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,
"dependencies": {
"@angular/animations": "^18.2.13",
"@angular/cdk": "^18.2.14",
"@angular/common": "^18.2.13",
"@angular/compiler": "^18.2.13",
"@angular/core": "^18.2.13",
"@angular/forms": "^18.2.13",
"@angular/material": "^18.2.14",
"@angular/platform-browser": "^18.2.13",
"@angular/platform-browser-dynamic": "^18.2.13",
"@angular/router": "^18.2.13",
"@angular/animations": "^19.2.6",
"@angular/cdk": "^19.2.9",
"@angular/common": "^19.2.6",
"@angular/compiler": "^19.2.6",
"@angular/core": "^19.2.6",
"@angular/forms": "^19.2.6",
"@angular/material": "^19.2.9",
"@angular/platform-browser": "^19.2.6",
"@angular/platform-browser-dynamic": "^19.2.6",
"@angular/router": "^19.2.6",
"@ngx-translate/core": "^15.0.0",
"@ngx-translate/http-loader": "^8.0.0",
"chart.js": "^4.3.0",
"ng2-charts": "^5.0.2",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.2"
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.18",
"@angular/cli": "~18.2.18",
"@angular/compiler-cli": "^18.2.13",
"@angular-devkit/build-angular": "^19.2.7",
"@angular/cli": "~19.2.7",
"@angular/compiler-cli": "^19.2.6",
"@types/jasmine": "~4.3.0",
"jasmine-core": "~5.1.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";
@Component({
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"]
selector: "app-root",
templateUrl: "./app.component.html",
styleUrls: ["./app.component.css"],
standalone: false
})
export class AppComponent implements OnInit {
public title = "app";

View File

@@ -1,5 +1,5 @@
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 {
HttpClient,
@@ -228,12 +228,10 @@ export function initConfig(configService: ConfigurationHelper) {
ConfigurationHelper,
DatePipe,
ServiceCacheApi,
{
provide: APP_INITIALIZER,
useFactory: initConfig,
deps: [ConfigurationHelper],
multi: true,
},
provideAppInitializer(() => {
const initializerFn = (initConfig)(inject(ConfigurationHelper));
return initializerFn();
}),
{ provide: HTTP_INTERCEPTORS, useClass: JwtAuthInterceptor, 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";
@Component({
selector: "app-create-user",
templateUrl: "./create-user.component.html",
styleUrls: ["./create-user.component.css"]
selector: "app-create-user",
templateUrl: "./create-user.component.html",
styleUrls: ["./create-user.component.css"],
standalone: false
})
export class CreateUserComponent implements OnInit {
createForm: FormGroup;

View File

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

View File

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

View File

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

View File

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

View File

@@ -13,7 +13,8 @@ import { TunnelFlight, TunnelFlightByMonth } from '../../models/tunnel-flight';
@Component({
selector: 'app-list-of-tunnel-flights',
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 {
public barChartLegend = true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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