Skip to content

Commit ff2e5fc

Browse files
committed
ftr: update angular to v14
TRACEFOSS-1023
1 parent 4543c2d commit ff2e5fc

File tree

13 files changed

+2281
-337
lines changed

13 files changed

+2281
-337
lines changed

angular.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,5 @@
243243
}
244244
}
245245
}
246-
},
247-
"defaultProject": "trace-x"
246+
}
248247
}

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
"private": true,
3535
"dependencies": {
3636
"@angular-material-components/datetime-picker": "7.0.1",
37-
"@angular/animations": "13.3.6",
37+
"@angular/animations": "14.2.12",
3838
"@angular/cdk": "13.3.6",
39-
"@angular/common": "13.3.6",
40-
"@angular/compiler": "13.3.6",
41-
"@angular/core": "13.3.6",
42-
"@angular/forms": "13.3.6",
39+
"@angular/common": "14.2.12",
40+
"@angular/compiler": "14.2.12",
41+
"@angular/core": "14.2.12",
42+
"@angular/forms": "14.2.12",
4343
"@angular/material": "13.3.6",
44-
"@angular/platform-browser": "13.3.6",
45-
"@angular/platform-browser-dynamic": "13.3.6",
46-
"@angular/router": "13.3.6",
44+
"@angular/platform-browser": "14.2.12",
45+
"@angular/platform-browser-dynamic": "14.2.12",
46+
"@angular/router": "14.2.12",
4747
"@deck.gl/core": "8.8.20",
4848
"@deck.gl/layers": "8.7.12",
4949
"@deck.gl/mapbox": "8.8.22",
@@ -68,15 +68,15 @@
6868
},
6969
"devDependencies": {
7070
"@angular-builders/custom-webpack": "13.1.0",
71-
"@angular-devkit/build-angular": "13.3.5",
71+
"@angular-devkit/build-angular": "14.2.10",
7272
"@angular-eslint/builder": "15.1.0",
7373
"@angular-eslint/eslint-plugin": "15.2.0",
7474
"@angular-eslint/eslint-plugin-template": "13.2.1",
7575
"@angular-eslint/schematics": "13.5.0",
7676
"@angular-eslint/template-parser": "13.2.1",
77-
"@angular/cli": "13.3.5",
78-
"@angular/compiler-cli": "13.3.6",
79-
"@angular/language-service": "13.3.6",
77+
"@angular/cli": "14.2.10",
78+
"@angular/compiler-cli": "14.2.12",
79+
"@angular/language-service": "14.2.12",
8080
"@badeball/cypress-cucumber-preprocessor": "^15.0.0",
8181
"@bahmutov/cypress-esbuild-preprocessor": "^2.1.5",
8282
"@commitlint/cli": "17.4.2",
@@ -116,7 +116,7 @@
116116
"stylelint-config-standard-scss": "4.0.0",
117117
"ts-loader": "^9.4.2",
118118
"ts-node": "10.9.1",
119-
"typescript": "4.6.4",
119+
"typescript": "4.9.5",
120120
"webpack-bundle-analyzer": "4.5.0"
121121
},
122122
"msw": {

src/app/modules/core/core.routing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const routes: Routes = [
4141
];
4242

4343
@NgModule({
44-
imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload', relativeLinkResolution: 'legacy' })],
44+
imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })],
4545
exports: [RouterModule],
4646
providers: [AuthGuard],
4747
})

src/app/modules/shared/components/request-investigation/request-investigation.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
********************************************************************************/
2121

2222
import { Component, EventEmitter, Input, Output } from '@angular/core';
23-
import { FormControl, FormGroup, Validators } from '@angular/forms';
23+
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
2424
import { getInvestigationInboxRoute } from '@page/investigations/investigations-external-route';
2525
import { OtherPartsFacade } from '@page/other-parts/core/other-parts.facade';
2626
import { Part } from '@page/parts/model/parts.model';
@@ -51,12 +51,12 @@ export class RequestInvestigationComponent {
5151
private readonly ctaSnackbarService: CtaSnackbarService,
5252
) {}
5353

54-
private readonly textAreaControl = new FormControl(undefined, [
54+
private readonly textAreaControl = new UntypedFormControl(undefined, [
5555
Validators.required,
5656
Validators.maxLength(1000),
5757
Validators.minLength(15),
5858
]);
59-
public readonly investigationFormGroup = new FormGroup({ description: this.textAreaControl });
59+
public readonly investigationFormGroup = new UntypedFormGroup({ description: this.textAreaControl });
6060

6161
public submitInvestigation(): void {
6262
this.investigationFormGroup.markAllAsTouched();

src/app/modules/shared/components/textarea/textarea.component.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@
1919
* SPDX-License-Identifier: Apache-2.0
2020
********************************************************************************/
2121

22-
import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
22+
import { UntypedFormControl, UntypedFormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
2323
import { TextareaComponent } from '@shared/components/textarea/textarea.component';
2424
import { SharedModule } from '@shared/shared.module';
2525
import { fireEvent, screen } from '@testing-library/angular';
2626
import { renderComponent } from '@tests/test-render.utils';
2727

2828
describe('TextareaComponent', () => {
2929
const renderTextarea = async (label = 'Label') => {
30-
const form = new FormGroup({
31-
formField: new FormControl(undefined, [Validators.required]),
30+
const form = new UntypedFormGroup({
31+
formField: new UntypedFormControl(undefined, [Validators.required]),
3232
});
3333

3434
await renderComponent(
@@ -40,8 +40,8 @@ describe('TextareaComponent', () => {
4040
declarations: [TextareaComponent],
4141
imports: [ReactiveFormsModule, SharedModule],
4242
componentProperties: {
43-
form: new FormGroup({
44-
formField: new FormControl(undefined, [Validators.required]),
43+
form: new UntypedFormGroup({
44+
formField: new UntypedFormControl(undefined, [Validators.required]),
4545
}),
4646
},
4747
},

src/app/modules/shared/modules/modal/core/modal.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
********************************************************************************/
2121

2222
import { TemplateRef } from '@angular/core';
23-
import { FormGroup } from '@angular/forms';
23+
import { UntypedFormGroup } from '@angular/forms';
2424

2525
export interface ModalData {
2626
title: string;
@@ -31,5 +31,5 @@ export interface ModalData {
3131
template: TemplateRef<unknown>;
3232
onConfirm: (isConfirmed: boolean) => void;
3333

34-
formGroup?: FormGroup;
34+
formGroup?: UntypedFormGroup;
3535
}

src/app/modules/shared/modules/notification/modal/accept/accept-notification-modal.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
********************************************************************************/
2121

2222
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';
23-
import { FormControl, FormGroup, Validators } from '@angular/forms';
23+
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
2424
import { ToastService } from '@shared/components/toasts/toast.service';
2525
import { Notification } from '@shared/model/notification.model';
2626
import { ModalData } from '@shared/modules/modal/core/modal.model';
@@ -38,10 +38,10 @@ export class AcceptNotificationModalComponent {
3838

3939
public notification: Notification;
4040
public readonly formGroup;
41-
private readonly textAreaControl = new FormControl();
41+
private readonly textAreaControl = new UntypedFormControl();
4242

4343
constructor(private readonly toastService: ToastService, private readonly confirmModalService: ModalService) {
44-
this.formGroup = new FormGroup({ reason: this.textAreaControl });
44+
this.formGroup = new UntypedFormGroup({ reason: this.textAreaControl });
4545
}
4646

4747
public show(notification: Notification): void {

src/app/modules/shared/modules/notification/modal/cancel/cancel-notification-modal.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
********************************************************************************/
2121

2222
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';
23-
import { FormControl, FormGroup, Validators } from '@angular/forms';
23+
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
2424
import { ToastService } from '@shared/components/toasts/toast.service';
2525
import { Notification } from '@shared/model/notification.model';
2626
import { ModalData } from '@shared/modules/modal/core/modal.model';
@@ -38,10 +38,10 @@ export class CancelNotificationModalComponent {
3838

3939
public notification: Notification;
4040
public readonly formGroup;
41-
private readonly textAreaControl = new FormControl();
41+
private readonly textAreaControl = new UntypedFormControl();
4242

4343
constructor(private readonly toastService: ToastService, private readonly confirmModalService: ModalService) {
44-
this.formGroup = new FormGroup({ notificationId: this.textAreaControl });
44+
this.formGroup = new UntypedFormGroup({ notificationId: this.textAreaControl });
4545
}
4646

4747
public show(notification: any): void {

src/app/modules/shared/modules/notification/modal/close/close-notification-modal.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
********************************************************************************/
2121

2222
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';
23-
import { FormControl, FormGroup, Validators } from '@angular/forms';
23+
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
2424
import { ToastService } from '@shared/components/toasts/toast.service';
2525
import { Notification } from '@shared/model/notification.model';
2626
import { ModalData } from '@shared/modules/modal/core/modal.model';
@@ -38,10 +38,10 @@ export class CloseNotificationModalComponent {
3838

3939
public notification: Notification;
4040
public readonly formGroup;
41-
private readonly textAreaControl = new FormControl();
41+
private readonly textAreaControl = new UntypedFormControl();
4242

4343
constructor(private readonly toastService: ToastService, private readonly confirmModalService: ModalService) {
44-
this.formGroup = new FormGroup({ reason: this.textAreaControl });
44+
this.formGroup = new UntypedFormGroup({ reason: this.textAreaControl });
4545
}
4646

4747
public show(notification: Notification): void {

src/app/modules/shared/modules/notification/modal/decline/decline-notification-modal.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
********************************************************************************/
2121

2222
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';
23-
import { FormControl, FormGroup, Validators } from '@angular/forms';
23+
import { UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms';
2424
import { ToastService } from '@shared/components/toasts/toast.service';
2525
import { Notification } from '@shared/model/notification.model';
2626
import { ModalData } from '@shared/modules/modal/core/modal.model';
@@ -38,10 +38,10 @@ export class DeclineNotificationModalComponent {
3838

3939
public notification: Notification;
4040
public readonly formGroup;
41-
private readonly textAreaControl = new FormControl();
41+
private readonly textAreaControl = new UntypedFormControl();
4242

4343
constructor(private readonly toastService: ToastService, private readonly confirmModalService: ModalService) {
44-
this.formGroup = new FormGroup({ reason: this.textAreaControl });
44+
this.formGroup = new UntypedFormGroup({ reason: this.textAreaControl });
4545
}
4646

4747
public show(notification: Notification): void {

0 commit comments

Comments
 (0)