[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

@ -16,9 +16,20 @@
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills" : "src/polyfills.ts",
"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" ],
"polyfills": [
"zone.js"
],
"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": {
@ -31,10 +42,12 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements" : [ {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
} ]
}
]
},
"develop": {
"optimization": false,
@ -73,11 +86,22 @@
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills" : "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "src/tsconfig.spec.json",
"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" ]
"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": {
@ -94,8 +118,13 @@
"TTTTTTlint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig" : [ "src/tsconfig.app.json", "src/tsconfig.spec.json" ],
"exclude" : [ "**/node_modules/**" ]
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
@ -115,8 +144,12 @@
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig" : [ "e2e/tsconfig.e2e.json" ],
"exclude" : [ "**/node_modules/**" ]
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}

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

View File

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

View File

@ -12,7 +12,7 @@ import { arrayUnique } from 'common/utils/arrayTools';
@Component({
selector: 'app-album',
templateUrl: './album.html'
templateUrl: './album.html',
})
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,20 +53,7 @@
**/
// 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.

View File

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