Upgrade to Angular 16

Merge `angular-update-16` into `dev` branch
This commit is contained in:
Adam Saghy
2025-05-23 18:47:20 +02:00
parent c7c2f60182
commit 19a14e5b5b
882 changed files with 14895 additions and 14340 deletions
@@ -2,7 +2,7 @@
<mat-card>
<form [formGroup]="roleForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="column">
<div class="layout-column">
<mat-form-field>
<mat-label>{{ 'labels.inputs.Name' | translate }}</mat-label>
<input matInput required formControlName="name" />
@@ -23,7 +23,7 @@
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
<button type="button" mat-raised-button [routerLink]="['../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
@@ -2,7 +2,7 @@
<mat-card>
<form [formGroup]="roleForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="column">
<div class="layout-column">
<mat-form-field>
<mat-label>{{ 'labels.inputs.Role Name' | translate }}</mat-label>
<input matInput disabled formControlName="name" />
@@ -19,7 +19,7 @@
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<mat-card-actions class="layout-row align-center gap-5px responsive-column">
<button type="button" mat-raised-button [routerLink]="['../../']">
{{ 'labels.buttons.Cancel' | translate }}
</button>
@@ -1,4 +1,4 @@
<div class="container m-b-20" fxLayout="row" fxLayoutAlign="end" fxLayoutGap="20px" [routerLink]="['add']">
<div class="container m-b-20 layout-row layout-align-end gap-20px" [routerLink]="['add']">
<div #buttonAddRole class="in-block">
<button mat-raised-button color="primary">
<fa-icon icon="plus" class="m-r-10"></fa-icon>
@@ -8,8 +8,8 @@
</div>
<div class="container">
<div #filter fxLayout="row" fxLayoutGap="20px">
<mat-form-field fxFlex>
<div #filter class="layout-row gap-20px">
<mat-form-field class="flex-fill">
<mat-label>{{ 'labels.inputs.Filter' | translate }}</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)" />
</mat-form-field>
@@ -69,7 +69,7 @@
<ng-template #templateButtonAddRole let-popover="popover">
<h2>{{ 'labels.buttons.Add Role' | translate }}</h2>
<p class="mw300">{{ 'labels.text.To create a new role' | translate }}.</p>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -88,7 +88,7 @@
<ng-template #templateFilter let-popover="popover">
<h4>{{ 'labels.heading.Search bar to filter roles' | translate }}.</h4>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -118,7 +118,7 @@
>{{ 'labels.inputs.Manage Roles and Permission' | translate }}</a
>
</h4>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<div class="layout-row align-end gap-2px responsive-column">
<button mat-raised-button color="warn" (click)="popover.close(); configurationWizardService.closeConfigWizard()">
{{ 'labels.buttons.Close' | translate }}
</button>
@@ -1,6 +1,5 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -12,7 +11,7 @@ import { SystemService } from '../system.service';
* Roles and Permissions data resolver.
*/
@Injectable()
export class RolesAndPermissionsResolver implements Resolve<Object> {
export class RolesAndPermissionsResolver {
/**
* @param {SystemService} systemService System service.
*/
@@ -1,4 +1,4 @@
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column" class="container m-b-20">
<div class="layout-row align-end gap-2px responsive-column container m-b-20">
<button
mat-raised-button
color="primary"
@@ -45,20 +45,20 @@
<div class="container m-b-20">
<mat-card class="mat-elevation-z8">
<mat-card-content>
<div fxLayout="row wrap" class="content">
<div fxFlex="40%" fxFlex.lt-md="50%" class="header">
<div class="layout-row-wrap">
<div class="flex-40 flex-lt-md-50 header">
<b>{{ 'labels.inputs.Name' | translate }}:</b>
</div>
<div fxFlex="60%" fxFlex.lt-md="50%">
<div class="flex-60 flex-lt-md-50">
{{ rolePermissionService.name }}
</div>
<div fxFlex="40%" fxFlex.lt-md="50%" class="header">
<div class="flex-40 flex-lt-md-50 header">
<b>{{ 'labels.inputs.Role Description' | translate }}:</b>
</div>
<div fxFlex="60%" fxFlex.lt-md="50%">
<div class="flex-60 flex-lt-md-50">
{{ rolePermissionService.description }}
</div>
</div>
@@ -69,22 +69,14 @@
<div class="mat-elevation-z8 container">
<mat-card>
<ng-container>
<div fxLayout="row" class="permission-selected">
<div fxFlex="75">
<div class="permission-selected layout-row">
<div class="flex-75">
<h3>
{{ 'labels.buttons.Permissions' | translate }}: <strong>{{ formatName(previousGrouping) }}</strong>
</h3>
</div>
<div
fxFlex="25"
fxLayout="row"
fxLayout.xs="column"
fxLayoutAlign="end"
fxLayoutGap="5px"
*ngIf="!isDisabled"
class="select-deselect"
>
<div class="flex-25 layout-row layout-xs-column layout-align-end gap-5px select-deselect" *ngIf="!isDisabled">
<button mat-raised-button color="primary" (click)="selectAll()">
{{ 'labels.buttons.Select All' | translate }}
</button>
@@ -94,8 +86,8 @@
</div>
</div>
<div fxLayout="row">
<div fxFlex="30" fxLayout="column">
<div class="layout-row">
<div class="layout-column flex-30">
<mat-list>
<mat-list-item
[ngClass]="selectedItem === grouping ? 'active' : 'inactive'"
@@ -111,7 +103,7 @@
<mat-divider [vertical]="true"></mat-divider>
<div fxFlex="70" fxLayout="column" class="list-permission">
<div class="flex-70 layout-column list-permission">
<form [formGroup]="formGroup" (submit)="submit()">
<div *ngFor="let permission of permissions.permissions" class="display-permissions">
<div formArrayName="roster">
@@ -127,7 +119,7 @@
</div>
</ng-container>
<div fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px" *ngIf="!isDisabled">
<div class="layout-row layout-align-center gap-5px layout-xs-column" *ngIf="!isDisabled">
<mat-card-actions>
<button type="button" mat-raised-button (click)="cancel(); restoreCheckboxes()">
{{ 'labels.buttons.Cancel' | translate }}
@@ -1,6 +1,6 @@
/** Angular Imports */
import { Injectable } from '@angular/core';
import { Resolve, ActivatedRouteSnapshot } from '@angular/router';
import { ActivatedRouteSnapshot } from '@angular/router';
/** rxjs Imports */
import { Observable } from 'rxjs';
@@ -12,7 +12,7 @@ import { SystemService } from '../../system.service';
* Roles and Permission data resolver.
*/
@Injectable()
export class ViewRoleResolver implements Resolve<Object> {
export class ViewRoleResolver {
/**
* @param {SystemService} systemService System service.
*/