add eqlair project

This commit is contained in:
Tykayn 2025-10-01 17:29:17 +02:00 committed by tykayn
parent 55489a049a
commit 51b48fb3ba
35 changed files with 10791 additions and 0 deletions

17
eqlair/.editorconfig Normal file
View file

@ -0,0 +1,17 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false
[*.md]
max_line_length = off
trim_trailing_whitespace = false

42
eqlair/.gitignore vendored Normal file
View file

@ -0,0 +1,42 @@
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
# Compiled output
/dist
/tmp
/out-tsc
/bazel-out
# Node
/node_modules
npm-debug.log
yarn-error.log
# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
# System files
.DS_Store
Thumbs.db

4
eqlair/.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}

20
eqlair/.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}

42
eqlair/.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}

59
eqlair/README.md Normal file
View file

@ -0,0 +1,59 @@
# Eqlair
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.1.1.
## Development server
To start a local development server, run:
```bash
ng serve
```
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
## Code scaffolding
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
```bash
ng generate component component-name
```
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
```bash
ng generate --help
```
## Building
To build the project run:
```bash
ng build
```
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
## Running unit tests
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
```bash
ng test
```
## Running end-to-end tests
For end-to-end (e2e) testing, run:
```bash
ng e2e
```
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
## Additional Resources
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

98
eqlair/angular.json Normal file
View file

@ -0,0 +1,98 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"eqlair": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular/build:application",
"options": {
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.scss"
]
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "eqlair:build:production"
},
"development": {
"buildTarget": "eqlair:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular/build:extract-i18n"
},
"test": {
"builder": "@angular/build:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"tsConfig": "tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.scss"
]
}
}
}
}
}
}

10031
eqlair/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

49
eqlair/package.json Normal file
View file

@ -0,0 +1,49 @@
{
"name": "eqlair",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"link-sae-lib": "bash ./scripts/link-sae-lib.sh",
"postinstall": "npm run link-sae-lib",
"test": "ng test"
},
"prettier": {
"overrides": [
{
"files": "*.html",
"options": {
"parser": "angular"
}
}
]
},
"private": true,
"dependencies": {
"@angular/common": "^20.1.0",
"@angular/compiler": "^20.1.0",
"@angular/core": "^20.1.0",
"@angular/forms": "^20.1.0",
"@angular/platform-browser": "^20.1.0",
"@angular/router": "^20.1.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular/build": "^20.1.1",
"@angular/cli": "^20.1.1",
"@angular/compiler-cli": "^20.1.0",
"@types/jasmine": "~5.1.0",
"sae-lib": "file:../my-workspace/projects/sae-lib",
"jasmine-core": "~5.8.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.1.0",
"typescript": "~5.8.2"
}
}

BIN
eqlair/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

39
eqlair/scripts/link-sae-lib.sh Executable file
View file

@ -0,0 +1,39 @@
#!/bin/bash
# Script pour lier sae-lib comme un module npm local
# Vérifier si npm est installé
if ! [ -x "$(command -v npm)" ]; then
echo 'Erreur: npm n est pas installé.' >&2
exit 1
fi
# Configurer npm pour utiliser un répertoire dans l'espace utilisateur
NPM_PREFIX="$HOME/.npm-global"
mkdir -p "$NPM_PREFIX"
npm config set prefix "$NPM_PREFIX"
# Ajouter temporairement au PATH
export PATH="$NPM_PREFIX/bin:$PATH"
# Aller dans le dossier de la bibliothèque
cd ../my-workspace/projects/sae-lib
# Vérifier si package.json existe
if [ ! -f "package.json" ]; then
echo "Erreur: package.json n\'existe pas dans le dossier sae-lib." >&2
exit 1
fi
echo "Création d'un lien npm pour sae-lib..."
npm link
cd ../../../sae-csc
# Utiliser le lien dans l'application
echo "Utilisation du lien dans l'application sae-csc..."
npm link sae-lib
cd ../sae-airwatch
npm link sae-lib
echo "Lien créé avec succès. sae-lib est maintenant disponible comme un module npm."

View file

@ -0,0 +1,12 @@
import { ApplicationConfig, provideBrowserGlobalErrorListeners, provideZoneChangeDetection } from '@angular/core';
import { provideRouter } from '@angular/router';
import { routes } from './app.routes';
export const appConfig: ApplicationConfig = {
providers: [
provideBrowserGlobalErrorListeners(),
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes)
]
};

3
eqlair/src/app/app.html Normal file
View file

@ -0,0 +1,3 @@
<app-main-nav></app-main-nav>
<router-outlet/>

View file

@ -0,0 +1,20 @@
import {Routes} from '@angular/router';
import {Home} from './pages/home/home';
import {Results} from './pages/results/results';
export const routes: Routes = [
{
path: 'home',
component: Home
},
{
path: 'answer',
component: Results
},
{
path: '',
component: Home
},
];

25
eqlair/src/app/app.scss Normal file
View file

@ -0,0 +1,25 @@
// Styles globaux supplémentaires
html, body {
height: 80vw;
width: 100%;
margin: 0;
padding: 2rem;
}
* {
box-sizing: border-box;
}
sae-feedback-button .feedback-button {
top: 140px;
}
app-top-navigation {
position: fixed;
width: 100%;
z-index: 200;
}
a {
cursor: pointer;
}

View file

@ -0,0 +1,23 @@
import { TestBed } from '@angular/core/testing';
import { App } from './app';
describe('App', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [App],
}).compileComponents();
});
it('should create the app', () => {
const fixture = TestBed.createComponent(App);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it('should render title', () => {
const fixture = TestBed.createComponent(App);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toContain('Hello, eqlair');
});
});

13
eqlair/src/app/app.ts Normal file
View file

@ -0,0 +1,13 @@
import {Component, signal} from '@angular/core';
import {RouterOutlet} from '@angular/router';
import {MainNav} from './nav/main-nav/main-nav';
@Component({
selector: 'app-root',
imports: [RouterOutlet, MainNav],
templateUrl: './app.html',
styleUrl: './app.scss'
})
export class App {
protected readonly title = signal('eqlair');
}

View file

@ -0,0 +1,40 @@
<header class="container">
<nav aria-label="main navigation" class="navbar" role="navigation">
<div class="navbar-brand">
<a class="navbar-item" routerLink="home" routerLinkActive="active-link">
<!-- <app-logo></app-logo>-->
Eqlair
</a>
<a
(click)="toggleMenu()"
[class.is-active]="isMenuActive"
aria-expanded="false"
aria-label="menu"
class="navbar-burger"
role="button">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div [class.is-active]="isMenuActive" class="navbar-menu" id="navbarBasicExample">
<div class="navbar-start">
<a class="navbar-item">
Home
</a>
</div>
<div class="navbar-end">
<a class="navbar-item">
Eqlair
</a>
<a class="navbar-item" routerLink="answer" routerLinkActive="active-link">answer </a>
</div>
</div>
</nav>
</header>

View file

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MainNav } from './main-nav';
describe('MainNav', () => {
let component: MainNav;
let fixture: ComponentFixture<MainNav>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [MainNav]
})
.compileComponents();
fixture = TestBed.createComponent(MainNav);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,21 @@
import {Component} from '@angular/core';
import {RouterLink, RouterLinkActive} from '@angular/router';
@Component({
selector: 'app-main-nav',
imports: [
RouterLink,
RouterLink,
RouterLinkActive,
// Logo
],
templateUrl: './main-nav.html',
styleUrl: './main-nav.scss'
})
export class MainNav {
isMenuActive: boolean = false;
toggleMenu() {
}
}

View file

@ -0,0 +1,22 @@
<div id="home">
Eqlair, page d'accueil
<pre>
stepper, partie 1
</pre>
<pre>
prompt
</pre>
<textarea cols="30" id="" name="" rows="10"></textarea>
<pre>
filtres
<select id="filter_1" name="filter_1"></select>
<select id="filter_2" name="filter_2"></select>
</pre>
<br>
<sae-m-button [label]="'envoyer'" kind="primary"></sae-m-button>
<sae-feedback-button></sae-feedback-button>
</div>

View file

View file

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Home } from './home';
describe('Home', () => {
let component: Home;
let fixture: ComponentFixture<Home>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Home]
})
.compileComponents();
fixture = TestBed.createComponent(Home);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,16 @@
import {Component} from '@angular/core';
import {MainButton} from 'sae-lib/buttons/main-button/main-button';
import {FeedbackButton} from 'sae-lib/buttons/feedback-button/feedback-button';
@Component({
selector: 'app-home',
imports: [
MainButton,
FeedbackButton
],
templateUrl: './home.html',
styleUrl: './home.scss'
})
export class Home {
}

View file

@ -0,0 +1,14 @@
<div id="results">
<pre>
stepper, partie 2
</pre>
<pre>
résultats
</pre>
<pre>
chatbot en bas à droite
</pre>
</div>

View file

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Results } from './results';
describe('Results', () => {
let component: Results;
let fixture: ComponentFixture<Results>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [Results]
})
.compileComponents();
fixture = TestBed.createComponent(Results);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,11 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-results',
imports: [],
templateUrl: './results.html',
styleUrl: './results.scss'
})
export class Results {
}

13
eqlair/src/index.html Normal file
View file

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Eqlair</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>

6
eqlair/src/main.ts Normal file
View file

@ -0,0 +1,6 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { appConfig } from './app/app.config';
import { App } from './app/app';
bootstrapApplication(App, appConfig)
.catch((err) => console.error(err));

13
eqlair/src/styles.scss Normal file
View file

@ -0,0 +1,13 @@
// from global to more precise
// sass lang utils
@use "sass:color";
// lib SAE Aero styles
@use 'sae-lib/src/styles/index.scss';
@use 'sae-lib/buttons/feedback-button/feedback-button.scss';
//@use 'sae-lib/src/styles/feedback.scss';
/* Fichier de styles global pour l'application */
// Importer les styles principaux
@use "app/app.scss";
//@use 'styles/main.scss';

15
eqlair/tsconfig.app.json Normal file
View file

@ -0,0 +1,15 @@
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
},
"include": [
"src/**/*.ts"
],
"exclude": [
"src/**/*.spec.ts"
]
}

40
eqlair/tsconfig.json Normal file
View file

@ -0,0 +1,40 @@
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"compileOnSave": false,
"compilerOptions": {
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"isolatedModules": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "ES2022",
"module": "preserve",
"baseUrl": "./",
"paths": {
"@sae-lib/*": ["../my-workspace/projects/sae-lib/*"],
"sae-lib": ["../my-workspace/projects/sae-lib"],
"sae-lib/*": ["../my-workspace/projects/sae-lib/*"]
}
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"typeCheckHostBindings": true,
"strictTemplates": true
},
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

14
eqlair/tsconfig.spec.json Normal file
View file

@ -0,0 +1,14 @@
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"src/**/*.ts"
]
}