[DEV] update to angular17

This commit is contained in:
Edouard DUPIN 2024-02-15 22:59:35 +01:00
parent b4157877c3
commit d37ce25621
9 changed files with 9219 additions and 13757 deletions

View File

@ -1,88 +1,112 @@
{ {
"$schema" : "./node_modules/@angular/cli/lib/config/schema.json", "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version" : 1, "version": 1,
"newProjectRoot" : "projects", "newProjectRoot": "projects",
"defaultProject" : "karusic", "defaultProject": "karusic",
"projects" : { "projects": {
"karusic" : { "karusic": {
"root" : "", "root": "",
"sourceRoot" : "src", "sourceRoot": "src",
"projectType" : "application", "projectType": "application",
"architect" : { "architect": {
"build" : { "build": {
"builder" : "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options" : { "options": {
"outputPath" : "dist", "outputPath": "dist",
"index" : "src/index.html", "index": "src/index.html",
"main" : "src/main.ts", "main": "src/main.ts",
"tsConfig" : "src/tsconfig.app.json", "tsConfig": "src/tsconfig.app.json",
"polyfills" : "src/polyfills.ts", "polyfills": [
"assets" : [ "src/assets", "src/favicon.ico" ], "zone.js"
"styles" : [ "src/styles.less", "src/generic_page.less", "src/theme.color.blue.less", "src/theme.checkbox.less", "src/theme.modal.less" ], ],
"scripts" : [ ] "assets": [
"src/assets",
"src/favicon.ico"
],
"styles": [
"src/styles.less",
"src/generic_page.less",
"src/theme.color.blue.less",
"src/theme.checkbox.less",
"src/theme.modal.less"
],
"scripts": []
}, },
"configurations" : { "configurations": {
"production" : { "production": {
"optimization" : true, "optimization": true,
"outputHashing" : "all", "outputHashing": "all",
"sourceMap" : false, "sourceMap": false,
"namedChunks" : false, "namedChunks": false,
"aot" : true, "aot": true,
"extractLicenses" : true, "extractLicenses": true,
"vendorChunk" : false, "vendorChunk": false,
"buildOptimizer" : true, "buildOptimizer": true,
"fileReplacements" : [ { "fileReplacements": [
"replace" : "src/environments/environment.ts", {
"with" : "src/environments/environment.prod.ts" "replace": "src/environments/environment.ts",
} ] "with": "src/environments/environment.prod.ts"
}
]
}, },
"develop" : { "develop": {
"optimization" : false, "optimization": false,
"outputHashing" : "none", "outputHashing": "none",
"sourceMap" : true, "sourceMap": true,
"namedChunks" : true, "namedChunks": true,
"aot" : true, "aot": true,
"extractLicenses" : true, "extractLicenses": true,
"vendorChunk" : true, "vendorChunk": true,
"buildOptimizer" : false "buildOptimizer": false
} }
} }
}, },
"serve" : { "serve": {
"builder" : "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options" : { "options": {
"browserTarget" : "karusic:build" "browserTarget": "karusic:build"
}, },
"configurations" : { "configurations": {
"production" : { "production": {
"browserTarget" : "karusic:build:production" "browserTarget": "karusic:build:production"
}, },
"develop" : { "develop": {
"browserTarget" : "karusic:build:develop" "browserTarget": "karusic:build:develop"
} }
} }
}, },
"extract-i18n" : { "extract-i18n": {
"builder" : "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options" : { "options": {
"browserTarget" : "karusic:build" "browserTarget": "karusic:build"
} }
}, },
"test" : { "test": {
"builder" : "@angular-devkit/build-angular:karma", "builder": "@angular-devkit/build-angular:karma",
"options" : { "options": {
"main" : "src/test.ts", "main": "src/test.ts",
"karmaConfig" : "./karma.conf.js", "karmaConfig": "./karma.conf.js",
"polyfills" : "src/polyfills.ts", "polyfills": [
"tsConfig" : "src/tsconfig.spec.json", "zone.js"
"scripts" : [ ], ],
"styles" : [ "src/styles.less", "src/generic_page.less", "src/theme.color.blue.less", "src/theme.checkbox.less", "src/theme.modal.less" ], "tsConfig": "src/tsconfig.spec.json",
"assets" : [ "src/assets", "src/favicon.ico" ] "scripts": [],
"styles": [
"src/styles.less",
"src/generic_page.less",
"src/theme.color.blue.less",
"src/theme.checkbox.less",
"src/theme.modal.less"
],
"assets": [
"src/assets",
"src/favicon.ico"
]
} }
}, },
"lint" : { "lint": {
"builder" : "@angular-eslint/builder:lint", "builder": "@angular-eslint/builder:lint",
"options" : { "options": {
"fix": true, "fix": true,
"eslintConfig": ".eslintrc.js", "eslintConfig": ".eslintrc.js",
"lintFilePatterns": [ "lintFilePatterns": [
@ -91,44 +115,53 @@
] ]
} }
}, },
"TTTTTTlint" : { "TTTTTTlint": {
"builder" : "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options" : { "options": {
"tsConfig" : [ "src/tsconfig.app.json", "src/tsconfig.spec.json" ], "tsConfig": [
"exclude" : [ "**/node_modules/**" ] "src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
} }
} }
} }
}, },
"karusic-e2e" : { "karusic-e2e": {
"root" : "e2e", "root": "e2e",
"sourceRoot" : "e2e", "sourceRoot": "e2e",
"projectType" : "application", "projectType": "application",
"architect" : { "architect": {
"e2e" : { "e2e": {
"builder" : "@angular-devkit/build-angular:protractor", "builder": "@angular-devkit/build-angular:protractor",
"options" : { "options": {
"protractorConfig" : "./protractor.conf.js", "protractorConfig": "./protractor.conf.js",
"devServerTarget" : "karusic:serve" "devServerTarget": "karusic:serve"
} }
}, },
"lint" : { "lint": {
"builder" : "@angular-devkit/build-angular:tslint", "builder": "@angular-devkit/build-angular:tslint",
"options" : { "options": {
"tsConfig" : [ "e2e/tsconfig.e2e.json" ], "tsConfig": [
"exclude" : [ "**/node_modules/**" ] "e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
} }
} }
} }
} }
}, },
"schematics" : { "schematics": {
"@schematics/angular:component" : { "@schematics/angular:component": {
"prefix" : "app", "prefix": "app",
"style" : "less" "style": "less"
}, },
"@schematics/angular:directive" : { "@schematics/angular:directive": {
"prefix" : "app" "prefix": "app"
} }
} }
} }

22557
front/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,32 +9,35 @@
"build": "ng build --prod", "build": "ng build --prod",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e",
"update_packages": "ncu --upgrade",
"install_dependency": "npm install"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^14.2.10", "@angular/animations": "^17.2.0",
"@angular/cdk": "^14.2.7", "@angular/cdk": "^17.1.2",
"@angular/common": "^14.2.10", "@angular/common": "^17.2.0",
"@angular/compiler": "^14.2.10", "@angular/compiler": "^17.2.0",
"@angular/core": "^14.2.10", "@angular/core": "^17.2.0",
"@angular/forms": "^14.2.10", "@angular/forms": "^17.2.0",
"@angular/material": "^14.2.7", "@angular/material": "^17.1.2",
"@angular/platform-browser": "^14.2.10", "@angular/platform-browser": "^17.2.0",
"@angular/platform-browser-dynamic": "^14.2.10", "@angular/platform-browser-dynamic": "^17.2.0",
"@angular/router": "^14.2.10", "@angular/router": "^17.2.0",
"rxjs": "^7.5.7", "rxjs": "^7.8.1",
"zone.js": "^0.12.0" "zone.js": "^0.14.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^14.2.9", "@angular-devkit/build-angular": "^17.2.0",
"@angular-eslint/builder": "14.2.0", "@angular-eslint/builder": "17.2.1",
"@angular-eslint/eslint-plugin": "14.2.0", "@angular-eslint/eslint-plugin": "17.2.1",
"@angular-eslint/eslint-plugin-template": "14.2.0", "@angular-eslint/eslint-plugin-template": "17.2.1",
"@angular-eslint/schematics": "14.2.0", "@angular-eslint/schematics": "17.2.1",
"@angular-eslint/template-parser": "14.2.0", "@angular-eslint/template-parser": "17.2.1",
"@angular/cli": "^14.2.9", "@angular/cli": "^17.2.0",
"@angular/compiler-cli": "^14.2.10", "@angular/compiler-cli": "^17.2.0",
"@angular/language-service": "^14.2.10" "@angular/language-service": "^17.2.0",
"npm-check-updates": "^16.14.15"
} }
} }

View File

@ -19,26 +19,35 @@
</button> </button>
</div> </div>
</div> </div>
<div class="cover-area" *ngIf="artistCovers"> @if (artistCovers) {
<div class="cover"> <div class="cover-area">
<img src="{{artistCovers[0]}}"/> <div class="cover">
<img src="{{artistCovers[0]}}"/>
</div>
</div> </div>
</div> }
<div class="cover-area" *ngIf="albumCovers"> @if (albumCovers) {
<div class="cover"> <div class="cover-area">
<img src="{{albumCovers[0]}}"/> <div class="cover">
<img src="{{albumCovers[0]}}"/>
</div>
</div> </div>
}
</div>
@if (tracks) {
<div class="fill-content colomn_single">
<div class="clear"></div>
<div class="title" *ngIf="tracks.length > 1">Tracks:</div>
<div class="title" *ngIf="tracks.length == 1">Track:</div>
@for (data of tracks; track data.id;) {
<app-element-track
[element]="data"
(click)="onSelectTrack($event, data.id)"
(auxclick)="onSelectTrack($event, data.id)"></app-element-track>
} @empty {
Aucune piste accessible.
}
</div> </div>
</div> }
<div class="fill-content colomn_single" *ngIf="tracks">
<div class="clear"></div>
<div class="title" *ngIf="tracks.length > 1">Tracks:</div>
<div class="title" *ngIf="tracks.length == 1">Track:</div>
<app-element-track
*ngFor="let data of tracks"
[element]="data"
(click)="onSelectTrack($event, data.id)"
(auxclick)="onSelectTrack($event, data.id)"></app-element-track>
</div>
<div class="clear-end"></div> <div class="clear-end"></div>
</div> </div>

View File

@ -12,7 +12,7 @@ import { arrayUnique } from 'common/utils/arrayTools';
@Component({ @Component({
selector: 'app-album', selector: 'app-album',
templateUrl: './album.html' templateUrl: './album.html',
}) })
export class AlbumScene implements OnInit { export class AlbumScene implements OnInit {

@ -1 +1 @@
Subproject commit c3489422f2df7f16465b4358e868664af9cda81c Subproject commit 39b97f7c06e793ae05b6bad94d111adb878c9b7e

View File

@ -1,3 +1,50 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';
//import 'babel-polyfill';
/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
//import 'core-js/es7/reflect';
/** /**
@ -6,27 +53,14 @@
**/ **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`. // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
*/
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
/* /***************************************************************************************************
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;
/** *************************************************************************************************
* Zone JS is required by default for Angular itself. * Zone JS is required by default for Angular itself.
*/ */
import 'zone.js/dist/zone'; // Included with Angular CLI. import 'zone.js/dist/zone'; // Included with Angular CLI.
/** ************************************************************************************************* /***************************************************************************************************
* APPLICATION IMPORTS * APPLICATION IMPORTS
*/ */

View File

@ -9,19 +9,31 @@
"moduleResolution": "node", "moduleResolution": "node",
"emitDecoratorMetadata": true, "emitDecoratorMetadata": true,
"experimentalDecorators": true, "experimentalDecorators": true,
"target": "es2018", "target": "ES2021",
"typeRoots": [ "typeRoots": [
"node_modules/@types" "node_modules/@types"
], ],
"lib": [ "lib": [
"es2018", "ES2021",
"dom" "dom"
], ],
"module": "es2020", "module": "ES2022",
"baseUrl": "./src", "baseUrl": "./src",
"paths": { "paths": {
"@app/*": ["./src/app/*"], "@app/*": [
"@common/*": ["./src/common/*"] "./src/app/*"
],
"@common/*": [
"./src/common/*"
]
} }
},
"angularCompilerOptions": {
"_enabledBlockTypes": [
"if",
"switch",
"for",
"defer"
]
} }
} }