Update Angular and Material to v19

This commit is contained in:
2025-04-13 21:23:35 +02:00
parent e67ecf5ce4
commit 36621901da
26 changed files with 2716 additions and 2148 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -12,28 +12,28 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "^18.2.13", "@angular/animations": "^19.2.6",
"@angular/cdk": "^18.2.14", "@angular/cdk": "^19.2.9",
"@angular/common": "^18.2.13", "@angular/common": "^19.2.6",
"@angular/compiler": "^18.2.13", "@angular/compiler": "^19.2.6",
"@angular/core": "^18.2.13", "@angular/core": "^19.2.6",
"@angular/forms": "^18.2.13", "@angular/forms": "^19.2.6",
"@angular/material": "^18.2.14", "@angular/material": "^19.2.9",
"@angular/platform-browser": "^18.2.13", "@angular/platform-browser": "^19.2.6",
"@angular/platform-browser-dynamic": "^18.2.13", "@angular/platform-browser-dynamic": "^19.2.6",
"@angular/router": "^18.2.13", "@angular/router": "^19.2.6",
"@ngx-translate/core": "^15.0.0", "@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0", "@ngx-translate/http-loader": "^8.0.0",
"chart.js": "^4.3.0", "chart.js": "^4.3.0",
"ng2-charts": "^5.0.2", "ng2-charts": "^5.0.2",
"rxjs": "~7.8.0", "rxjs": "~7.8.0",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"zone.js": "~0.14.2" "zone.js": "~0.15.0"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "^18.2.18", "@angular-devkit/build-angular": "^19.2.7",
"@angular/cli": "~18.2.18", "@angular/cli": "~19.2.7",
"@angular/compiler-cli": "^18.2.13", "@angular/compiler-cli": "^19.2.6",
"@types/jasmine": "~4.3.0", "@types/jasmine": "~4.3.0",
"jasmine-core": "~5.1.0", "jasmine-core": "~5.1.0",
"karma": "~6.4.0", "karma": "~6.4.0",

View File

@@ -11,9 +11,10 @@ import { ConfigurationHelper } from "../services/configuration-helper";
import { ServiceCacheApi } from "../services/service-cache-api.service"; import { ServiceCacheApi } from "../services/service-cache-api.service";
@Component({ @Component({
selector: "app-root", selector: "app-root",
templateUrl: "./app.component.html", templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"] styleUrls: ["./app.component.css"],
standalone: false
}) })
export class AppComponent implements OnInit { export class AppComponent implements OnInit {
public title = "app"; public title = "app";

View File

@@ -1,5 +1,5 @@
import { BrowserModule } from "@angular/platform-browser"; import { BrowserModule } from "@angular/platform-browser";
import { APP_INITIALIZER, NgModule } from "@angular/core"; import { NgModule, inject, provideAppInitializer } from "@angular/core";
import { RouterModule, Routes } from "@angular/router"; import { RouterModule, Routes } from "@angular/router";
import { import {
HttpClient, HttpClient,
@@ -228,12 +228,10 @@ export function initConfig(configService: ConfigurationHelper) {
ConfigurationHelper, ConfigurationHelper,
DatePipe, DatePipe,
ServiceCacheApi, ServiceCacheApi,
{ provideAppInitializer(() => {
provide: APP_INITIALIZER, const initializerFn = (initConfig)(inject(ConfigurationHelper));
useFactory: initConfig, return initializerFn();
deps: [ConfigurationHelper], }),
multi: true,
},
{ provide: HTTP_INTERCEPTORS, useClass: JwtAuthInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: JwtAuthInterceptor, multi: true },
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
], ],

View File

@@ -9,9 +9,10 @@ import { AuthenticationService } from "../../services/authentication.service";
import { User } from "../../models/user"; import { User } from "../../models/user";
@Component({ @Component({
selector: "app-create-user", selector: "app-create-user",
templateUrl: "./create-user.component.html", templateUrl: "./create-user.component.html",
styleUrls: ["./create-user.component.css"] styleUrls: ["./create-user.component.css"],
standalone: false
}) })
export class CreateUserComponent implements OnInit { export class CreateUserComponent implements OnInit {
createForm: FormGroup; createForm: FormGroup;

View File

@@ -10,9 +10,10 @@ import { JumpTypeService } from "../../services/jump-type.service";
import { ServiceComm } from "../../services/service-comm.service"; import { ServiceComm } from "../../services/service-comm.service";
@Component({ @Component({
selector: "app-default", selector: "app-default",
templateUrl: "./default.component.html", templateUrl: "./default.component.html",
styleUrls: ["./default.component.css"] styleUrls: ["./default.component.css"],
standalone: false
}) })
export class DefaultComponent implements OnInit { export class DefaultComponent implements OnInit {
constructor(private serviceComm: ServiceComm, constructor(private serviceComm: ServiceComm,

View File

@@ -7,9 +7,10 @@ import { JumpService } from '../../services/jump.service';
import { ServiceComm } from '../../services/service-comm.service'; import { ServiceComm } from '../../services/service-comm.service';
@Component({ @Component({
selector: 'app-jump-infos', selector: 'app-jump-infos',
templateUrl: './jump-infos.component.html', templateUrl: './jump-infos.component.html',
styleUrls: ['./jump-infos.component.css'] styleUrls: ['./jump-infos.component.css'],
standalone: false
}) })
export class JumpInfosComponent implements OnInit { export class JumpInfosComponent implements OnInit {
public editMode: boolean; public editMode: boolean;

View File

@@ -12,9 +12,10 @@ import { AddAction } from '../../models/add-action.enum';
import { AircraftResp } from '../../models/aircraft'; import { AircraftResp } from '../../models/aircraft';
@Component({ @Component({
selector: 'app-list-of-aircrafts', selector: 'app-list-of-aircrafts',
templateUrl: './list-of-aircrafts.component.html', templateUrl: './list-of-aircrafts.component.html',
styleUrls: ['./list-of-aircrafts.component.css'] styleUrls: ['./list-of-aircrafts.component.css'],
standalone: false
}) })
export class ListOfAircraftsComponent implements OnInit { export class ListOfAircraftsComponent implements OnInit {
public displayedColumns: Array<string> = ['name', 'imageData']; public displayedColumns: Array<string> = ['name', 'imageData'];

View File

@@ -12,9 +12,10 @@ import { AuthenticationService } from '../../services/authentication.service';
import { NewDropZoneComponent } from '../new-drop-zone/new-drop-zone.component'; import { NewDropZoneComponent } from '../new-drop-zone/new-drop-zone.component';
@Component({ @Component({
selector: 'app-list-of-dzs', selector: 'app-list-of-dzs',
templateUrl: './list-of-dzs.component.html', templateUrl: './list-of-dzs.component.html',
styleUrls: ['./list-of-dzs.component.css'], styleUrls: ['./list-of-dzs.component.css'],
standalone: false
}) })
export class ListOfDzsComponent implements OnInit { export class ListOfDzsComponent implements OnInit {
public displayedColumns: Array<string> = [ public displayedColumns: Array<string> = [

View File

@@ -11,9 +11,10 @@ import { AddAction } from "../../models/add-action.enum";
import { NewGearComponent } from "../new-gear/new-gear.component"; import { NewGearComponent } from "../new-gear/new-gear.component";
@Component({ @Component({
selector: "app-list-of-gears", selector: "app-list-of-gears",
templateUrl: "./list-of-gears.component.html", templateUrl: "./list-of-gears.component.html",
styleUrls: ["./list-of-gears.component.css"] styleUrls: ["./list-of-gears.component.css"],
standalone: false
}) })
export class ListOfGearsComponent implements OnInit { export class ListOfGearsComponent implements OnInit {
public displayedColumns: Array<string> = [ public displayedColumns: Array<string> = [

View File

@@ -10,17 +10,18 @@ import { ImageResp } from '../../models/image';
import { AddAction } from '../../models/add-action.enum'; import { AddAction } from '../../models/add-action.enum';
@Component({ @Component({
selector: 'app-list-of-images', selector: 'app-list-of-images',
templateUrl: './list-of-images.component.html', templateUrl: './list-of-images.component.html',
styleUrls: ['./list-of-images.component.css'], styleUrls: ['./list-of-images.component.css'],
animations: [ animations: [
trigger('rotatedState', [ trigger('rotatedState', [
state('default', style({ transform: 'rotate(0)' })), state('default', style({ transform: 'rotate(0)' })),
state('rot90', style({ transform: 'rotate(-90deg)' })), state('rot90', style({ transform: 'rotate(-90deg)' })),
state('rot180', style({ transform: 'rotate(-180deg)' })), state('rot180', style({ transform: 'rotate(-180deg)' })),
state('rot270', style({ transform: 'rotate(-270deg)' })), state('rot270', style({ transform: 'rotate(-270deg)' })),
]) ])
] ],
standalone: false
}) })
export class ListOfImagesComponent implements OnInit { export class ListOfImagesComponent implements OnInit {
public displayedColumns: Array<string> = ['comment', 'data']; public displayedColumns: Array<string> = ['comment', 'data'];

View File

@@ -12,9 +12,10 @@ import { AuthenticationService } from '../../services/authentication.service';
import { NewJumpTypeComponent } from "../new-jump-type/new-jump-type.component"; import { NewJumpTypeComponent } from "../new-jump-type/new-jump-type.component";
@Component({ @Component({
selector: "app-list-of-jump-types", selector: "app-list-of-jump-types",
templateUrl: "./list-of-jump-types.component.html", templateUrl: "./list-of-jump-types.component.html",
styleUrls: ["./list-of-jump-types.component.css"] styleUrls: ["./list-of-jump-types.component.css"],
standalone: false
}) })
export class ListOfJumpTypesComponent implements OnInit { export class ListOfJumpTypesComponent implements OnInit {
public displayedColumns: Array<string> = ["name"]; public displayedColumns: Array<string> = ["name"];

View File

@@ -12,9 +12,10 @@ import { JumpInfosComponent } from "../jump-infos/jump-infos.component";
import { StatsService } from "../../services/stats.service"; import { StatsService } from "../../services/stats.service";
@Component({ @Component({
selector: "app-list-of-jumps", selector: "app-list-of-jumps",
templateUrl: "./list-of-jumps.component.html", templateUrl: "./list-of-jumps.component.html",
styleUrls: ["./list-of-jumps.component.css"], styleUrls: ["./list-of-jumps.component.css"],
standalone: false
}) })
export class ListOfJumpsComponent implements OnInit { export class ListOfJumpsComponent implements OnInit {
public displayedColumns: Array<string> = [ public displayedColumns: Array<string> = [

View File

@@ -13,7 +13,8 @@ import { TunnelFlight, TunnelFlightByMonth } from '../../models/tunnel-flight';
@Component({ @Component({
selector: 'app-list-of-tunnel-flights', selector: 'app-list-of-tunnel-flights',
templateUrl: './list-of-tunnel-flights.component.html', templateUrl: './list-of-tunnel-flights.component.html',
styleUrls: ['./list-of-tunnel-flights.component.css'] styleUrls: ['./list-of-tunnel-flights.component.css'],
standalone: false
}) })
export class ListOfTunnelFlightsComponent implements OnInit { export class ListOfTunnelFlightsComponent implements OnInit {
public barChartLegend = true; public barChartLegend = true;

View File

@@ -8,9 +8,10 @@ import { first } from 'rxjs/operators';
import { AuthenticationService } from '../../services/authentication.service'; import { AuthenticationService } from '../../services/authentication.service';
@Component({ @Component({
selector: 'app-login-user', selector: 'app-login-user',
templateUrl: './login-user.component.html', templateUrl: './login-user.component.html',
styleUrls: ['./login-user.component.css'] styleUrls: ['./login-user.component.css'],
standalone: false
}) })
export class LoginUserComponent implements OnInit, AfterViewInit { export class LoginUserComponent implements OnInit, AfterViewInit {
loginForm: FormGroup; loginForm: FormGroup;

View File

@@ -2,9 +2,10 @@ import { Component, OnInit } from "@angular/core";
import { TranslateService } from "@ngx-translate/core"; import { TranslateService } from "@ngx-translate/core";
@Component({ @Component({
selector: "app-login", selector: "app-login",
templateUrl: "./login.component.html", templateUrl: "./login.component.html",
styleUrls: ["./login.component.css"] styleUrls: ["./login.component.css"],
standalone: false
}) })
export class LoginComponent implements OnInit { export class LoginComponent implements OnInit {
public selectedLanguageFlag: string; public selectedLanguageFlag: string;

View File

@@ -5,9 +5,10 @@ import { ServiceComm } from '../../services/service-comm.service';
import { AddAction } from '../../models/add-action.enum'; import { AddAction } from '../../models/add-action.enum';
@Component({ @Component({
selector: 'app-new-aircraft', selector: 'app-new-aircraft',
templateUrl: './new-aircraft.component.html', templateUrl: './new-aircraft.component.html',
styleUrls: ['./new-aircraft.component.css'] styleUrls: ['./new-aircraft.component.css'],
standalone: false
}) })
export class NewAircraftComponent implements OnInit { export class NewAircraftComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;

View File

@@ -5,9 +5,10 @@ import { ServiceComm } from "../../services/service-comm.service";
import { DropzoneService } from "../../services/dropzone.service"; import { DropzoneService } from "../../services/dropzone.service";
@Component({ @Component({
selector: "app-new-drop-zone", selector: "app-new-drop-zone",
templateUrl: "./new-drop-zone.component.html", templateUrl: "./new-drop-zone.component.html",
styleUrls: ["./new-drop-zone.component.css"] styleUrls: ["./new-drop-zone.component.css"],
standalone: false
}) })
export class NewDropZoneComponent implements OnInit { export class NewDropZoneComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;

View File

@@ -6,9 +6,10 @@ import { GearService } from "../../services/gear.service";
import { AddAction } from "../../models/add-action.enum"; import { AddAction } from "../../models/add-action.enum";
@Component({ @Component({
selector: "app-new-gear", selector: "app-new-gear",
templateUrl: "./new-gear.component.html", templateUrl: "./new-gear.component.html",
styleUrls: ["./new-gear.component.css"] styleUrls: ["./new-gear.component.css"],
standalone: false
}) })
export class NewGearComponent implements OnInit { export class NewGearComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;

View File

@@ -5,9 +5,10 @@ import { ServiceComm } from "../../services/service-comm.service";
import { JumpTypeService } from "../../services/jump-type.service"; import { JumpTypeService } from "../../services/jump-type.service";
@Component({ @Component({
selector: "app-new-jump-type", selector: "app-new-jump-type",
templateUrl: "./new-jump-type.component.html", templateUrl: "./new-jump-type.component.html",
styleUrls: ["./new-jump-type.component.css"] styleUrls: ["./new-jump-type.component.css"],
standalone: false
}) })
export class NewJumpTypeComponent implements OnInit { export class NewJumpTypeComponent implements OnInit {
public addForm: FormGroup; public addForm: FormGroup;

View File

@@ -34,13 +34,14 @@ class PickDateAdapter extends NativeDateAdapter {
} }
@Component({ @Component({
selector: "app-new-jump", selector: "app-new-jump",
templateUrl: "./new-jump.component.html", templateUrl: "./new-jump.component.html",
styleUrls: ["./new-jump.component.css"], styleUrls: ["./new-jump.component.css"],
providers: [ providers: [
{ provide: DateAdapter, useClass: PickDateAdapter }, { provide: DateAdapter, useClass: PickDateAdapter },
{ provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS } { provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS }
] ],
standalone: false
}) })
export class NewJumpComponent implements OnInit { export class NewJumpComponent implements OnInit {
public beginDate: Date; public beginDate: Date;

View File

@@ -28,13 +28,14 @@ class PickDateAdapter extends NativeDateAdapter {
} }
@Component({ @Component({
selector: 'app-new-tunnel-flight', selector: 'app-new-tunnel-flight',
templateUrl: './new-tunnel-flight.component.html', templateUrl: './new-tunnel-flight.component.html',
styleUrls: ['./new-tunnel-flight.component.css'], styleUrls: ['./new-tunnel-flight.component.css'],
providers: [ providers: [
{ provide: DateAdapter, useClass: PickDateAdapter }, { provide: DateAdapter, useClass: PickDateAdapter },
{ provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS } { provide: MAT_DATE_FORMATS, useValue: PICK_FORMATS }
] ],
standalone: false
}) })
export class NewTunnelFlightComponent implements OnInit { export class NewTunnelFlightComponent implements OnInit {
public flightDate: Date; public flightDate: Date;

View File

@@ -10,9 +10,10 @@ import { StatsByDzResp, StatsByAircraftResp, StatsByGearResp,
StatsByJumpTypeResp, StatsByYearResp } from '../../models/stats'; StatsByJumpTypeResp, StatsByYearResp } from '../../models/stats';
@Component({ @Component({
selector: 'app-summary', selector: 'app-summary',
templateUrl: './summary.component.html', templateUrl: './summary.component.html',
styleUrls: ['./summary.component.css'] styleUrls: ['./summary.component.css'],
standalone: false
}) })
export class SummaryComponent implements OnInit { export class SummaryComponent implements OnInit {

View File

@@ -4,9 +4,10 @@ import { AuthenticationService } from '../../services/authentication.service';
import { User } from '../../models/user'; import { User } from '../../models/user';
@Component({ @Component({
selector: 'app-user-profile', selector: 'app-user-profile',
templateUrl: './user-profile.component.html', templateUrl: './user-profile.component.html',
styleUrls: ['./user-profile.component.css'], styleUrls: ['./user-profile.component.css'],
standalone: false
}) })
export class UserProfileComponent implements OnInit { export class UserProfileComponent implements OnInit {
public userForm: FormGroup; public userForm: FormGroup;

View File

@@ -31,7 +31,8 @@ $fontConfig: (
); );
// Compute font config // Compute font config
@include mat.core(); @include mat.elevation-classes();
@include mat.app-background();
// Foreground Elements // Foreground Elements

View File

@@ -138,7 +138,8 @@ mat.$dark-theme-background-palette: (background: $dark-background,
); );
// Compute font config // Compute font config
@include mat.core($fontConfig); @include mat.elevation-classes();
@include mat.app-background();
// Theme Config // Theme Config