Update angular core and cli to version 14

This commit is contained in:
Konstantinos Triantafyllou 2022-09-23 13:25:18 +03:00
parent 4ea92912d2
commit 612fa0ef2f
9 changed files with 53 additions and 54 deletions

View File

@ -267,6 +267,5 @@
}
}
}
},
"defaultProject": "monitor-dashboard"
}
}

View File

@ -21,18 +21,18 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~13.3.11",
"@angular/animations": "^14.2.3",
"@angular/cdk": "^13.3.9",
"@angular/common": "~13.3.11",
"@angular/compiler": "~13.3.11",
"@angular/core": "~13.3.11",
"@angular/forms": "~13.3.11",
"@angular/localize": "^13.3.11",
"@angular/common": "^14.2.3",
"@angular/compiler": "^14.2.3",
"@angular/core": "^14.2.3",
"@angular/forms": "^14.2.3",
"@angular/localize": "^14.2.3",
"@angular/material": "^13.3.9",
"@angular/platform-browser": "~13.3.11",
"@angular/platform-browser-dynamic": "~13.3.11",
"@angular/platform-server": "~13.3.11",
"@angular/router": "~13.3.11",
"@angular/platform-browser": "^14.2.3",
"@angular/platform-browser-dynamic": "^14.2.3",
"@angular/platform-server": "^14.2.3",
"@angular/router": "^14.2.3",
"@nguniversal/express-engine": "^13.1.1",
"clipboard": "^1.5.16",
"core-js": "^2.5.4",
@ -47,10 +47,10 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.3.9",
"@angular/cli": "~13.3.9",
"@angular/compiler-cli": "~13.3.11",
"@angular/language-service": "~13.3.11",
"@angular-devkit/build-angular": "^14.2.3",
"@angular/cli": "^14.2.3",
"@angular/compiler-cli": "^14.2.3",
"@angular/language-service": "^14.2.3",
"@nguniversal/builders": "^13.1.1",
"@types/compression": "^1.7.0",
"@types/express": "^4.17.0",

View File

@ -1,6 +1,6 @@
import {Component, Input, OnDestroy, ViewChild} from "@angular/core";
import {Stakeholder} from "../../openaireLibrary/monitor/entities/stakeholder";
import {FormBuilder, FormGroup, Validators} from "@angular/forms";
import {UntypedFormBuilder, UntypedFormGroup, Validators} from "@angular/forms";
import {StakeholderUtils} from "../../utils/indicator-utils";
import {Option} from "../../openaireLibrary/sharedComponents/input/input.component";
import {Subscription} from "rxjs";
@ -108,7 +108,7 @@ import {NotificationHandler} from "../../openaireLibrary/utils/notification-hand
export class EditStakeholderComponent implements OnDestroy {
@Input()
public disableAlias: boolean = false;
public stakeholderFb: FormGroup;
public stakeholderFb: UntypedFormGroup;
public secure: boolean = false;
public stakeholderUtils: StakeholderUtils = new StakeholderUtils();
public defaultStakeholdersOptions: Option[];
@ -133,7 +133,7 @@ export class EditStakeholderComponent implements OnDestroy {
@ViewChild('notify', { static: true }) notify: NotifyFormComponent;
private notification: Notification;
constructor(private fb: FormBuilder,
constructor(private fb: UntypedFormBuilder,
private stakeholderService: StakeholderService,
private utilsService: UtilitiesService, private userManagementService: UserManagementService,) {
}

View File

@ -4,7 +4,7 @@ import {EnvProperties} from "../openaireLibrary/utils/properties/env-properties"
import {Stakeholder, StakeholderEntities, Visibility} from "../openaireLibrary/monitor/entities/stakeholder";
import {Subscriber, zip} from "rxjs";
import {StakeholderUtils} from "../utils/indicator-utils";
import {FormBuilder, FormGroup} from "@angular/forms";
import {UntypedFormBuilder, UntypedFormGroup} from "@angular/forms";
import {AlertModal} from "../openaireLibrary/utils/modal/alert";
import {Option} from "../openaireLibrary/sharedComponents/input/input.component";
import {Title} from "@angular/platform-browser";
@ -44,7 +44,7 @@ export class ManageStakeholdersComponent implements OnInit, OnDestroy {
/**
* Top filters
*/
public filters: FormGroup;
public filters: UntypedFormGroup;
public all: Option = {
value: 'all',
label: 'All'
@ -64,7 +64,7 @@ export class ManageStakeholdersComponent implements OnInit, OnDestroy {
private userManagementService: UserManagementService,
private route: ActivatedRoute,
private title: Title,
private fb: FormBuilder) {
private fb: UntypedFormBuilder) {
}
ngOnInit(): void {

View File

@ -21,7 +21,7 @@ import {
import {StatisticsService} from "../utils/services/statistics.service";
import {IndicatorUtils, StakeholderUtils} from "../utils/indicator-utils";
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
import {FormBuilder, FormControl} from "@angular/forms";
import {UntypedFormBuilder, UntypedFormControl} from "@angular/forms";
import {Subscriber, Subscription} from "rxjs";
import {User} from "../openaireLibrary/login/utils/helper.class";
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
@ -76,7 +76,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
};
@ViewChild('rangeFilter') rangeFilter: RangeFilterComponent;
privateStakeholder = false;
public keyword: FormControl;
public keyword: UntypedFormControl;
public statsUpdateDate: Date;
public stickyPageHeader: boolean = false;
public showDescriptionOverlay: boolean[] = [];
@ -104,7 +104,7 @@ export class MonitorComponent implements OnInit, OnDestroy {
private seoService: SEOService,
private cdr: ChangeDetectorRef,
private indexInfoService: IndexInfoService,
private sanitizer: DomSanitizer, private _fb: FormBuilder, private router: Router,
private sanitizer: DomSanitizer, private _fb: UntypedFormBuilder, private router: Router,
private configurationService: ConfigurationService) {
this.errorCodes = new ErrorCodes();
this.errorMessages = new ErrorMessagesComponent();

@ -1 +1 @@
Subproject commit 717ead02b2f154c3a91e799ed5701ea23b54f7e8
Subproject commit a31605e9d53684e54b67b9eef88e2b7e4833d62e

View File

@ -20,7 +20,7 @@ import {
Visibility
} from "../openaireLibrary/monitor/entities/stakeholder";
import {IndicatorUtils, StakeholderUtils} from "../utils/indicator-utils";
import {AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, Validators} from "@angular/forms";
import {AbstractControl, UntypedFormArray, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators} from "@angular/forms";
import {AlertModal} from "../openaireLibrary/utils/modal/alert";
import {StatisticsService} from "../utils/services/statistics.service";
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
@ -65,10 +65,10 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
public preview: string;
public indicatorUtils: IndicatorUtils = new IndicatorUtils();
public stakeholderUtils: StakeholderUtils = new StakeholderUtils();
public numberIndicatorFb: FormGroup;
public chartIndicatorFb: FormGroup;
public chartSections: FormArray;
public numberSections: FormArray;
public numberIndicatorFb: UntypedFormGroup;
public chartIndicatorFb: UntypedFormGroup;
public chartSections: UntypedFormArray;
public numberSections: UntypedFormArray;
/**
* Editable indicator
*/
@ -118,7 +118,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
private stakeholderService: StakeholderService,
private statisticsService: StatisticsService,
private notificationService: NotificationService,
private fb: FormBuilder,
private fb: UntypedFormBuilder,
private router: Router,
private cdr: ChangeDetectorRef,
private sanitizer: DomSanitizer) {
@ -348,12 +348,12 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex];
}
public get numberIndicatorPaths(): FormArray {
return this.numberIndicatorFb.get('indicatorPaths') as FormArray;
public get numberIndicatorPaths(): UntypedFormArray {
return this.numberIndicatorFb.get('indicatorPaths') as UntypedFormArray;
}
public get chartIndicatorPaths(): FormArray {
return this.chartIndicatorFb.get('indicatorPaths') as FormArray;
public get chartIndicatorPaths(): UntypedFormArray {
return this.chartIndicatorFb.get('indicatorPaths') as UntypedFormArray;
}
public getNumberClassBySize(size: IndicatorSize) {
@ -398,7 +398,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
}
public validateJsonPath(index: number, dirty: boolean = false) {
let indicatorPath: FormGroup = <FormGroup>this.numberIndicatorPaths.at(index);
let indicatorPath: UntypedFormGroup = <UntypedFormGroup>this.numberIndicatorPaths.at(index);
if (this.indicator.defaultId === null) {
this.getJsonPath(index).disable();
}
@ -443,20 +443,20 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
}));
}
public getJsonPath(index: number): FormArray {
return this.numberIndicatorPaths.at(index).get('jsonPath') as FormArray;
public getJsonPath(index: number): UntypedFormArray {
return this.numberIndicatorPaths.at(index).get('jsonPath') as UntypedFormArray;
}
public getCurrentJsonPath(index: number): string[] {
return this.section.indicators[this.index].indicatorPaths[index].jsonPath;
}
public getParameters(index: number): FormArray {
return this.chartIndicatorPaths.at(index).get('parameters') as FormArray;
public getParameters(index: number): UntypedFormArray {
return this.chartIndicatorPaths.at(index).get('parameters') as UntypedFormArray;
}
public getParameter(index: number, key: string): FormControl {
return this.getParameters(index).controls.filter(control => control.value.key === key)[0] as FormControl;
public getParameter(index: number, key: string): UntypedFormControl {
return this.getParameters(index).controls.filter(control => control.value.key === key)[0] as UntypedFormControl;
}
private getSecureUrlByStakeHolder(indicatorPath: IndicatorPath) {
@ -468,7 +468,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
return this.statisticsService.getChartUrl(indicatorPath.source, this.indicatorUtils.getFullUrl(this.stakeholder, indicatorPath));
}
public addNumberIndicatorPath(url: string = '', parameters: FormArray = new FormArray([]), source: string = 'stats-tool', jsonPath: FormArray = new FormArray([])) {
public addNumberIndicatorPath(url: string = '', parameters: UntypedFormArray = new UntypedFormArray([]), source: string = 'stats-tool', jsonPath: UntypedFormArray = new UntypedFormArray([])) {
if (jsonPath.length === 0) {
jsonPath.push(this.fb.control('', Validators.required));
}
@ -544,7 +544,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
}
}
public addChartIndicatorPath(value: string = '', parameters: FormArray = new FormArray([]), disableUrl: boolean = false, type: string = null) {
public addChartIndicatorPath(value: string = '', parameters: UntypedFormArray = new UntypedFormArray([]), disableUrl: boolean = false, type: string = null) {
this.chartIndicatorPaths.push(this.fb.group({
url: this.fb.control(value, [Validators.required, StringUtils.urlValidator()]),
parameters: parameters,
@ -570,9 +570,9 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
this.urlParameterizedMessage = null;
}
this.checkForSchemaEnhancements(this.chartIndicatorPaths.at(index).get('url').value);
(this.chartIndicatorPaths.at(index) as FormGroup).get('type').setValue(indicatorPath.type);
(this.chartIndicatorPaths.at(index) as UntypedFormGroup).get('type').setValue(indicatorPath.type);
let parameters = this.getParametersAsFormArray(indicatorPath);
(this.chartIndicatorPaths.at(index) as FormGroup).setControl('parameters', parameters);
(this.chartIndicatorPaths.at(index) as UntypedFormGroup).setControl('parameters', parameters);
if (!this.indicator.indicatorPaths[index]) {
this.indicator.indicatorPaths[index] = indicatorPath;
this.indicator.indicatorPaths[index].safeResourceUrl = this.getSecureUrlByStakeHolder(indicatorPath);
@ -593,7 +593,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
}
private getJsonPathAsFormArray(indicatorPath: IndicatorPath): FormArray {
private getJsonPathAsFormArray(indicatorPath: IndicatorPath): UntypedFormArray {
let jsonPath = this.fb.array([]);
if (indicatorPath.jsonPath) {
indicatorPath.jsonPath.forEach(path => {
@ -603,7 +603,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
return jsonPath;
}
private getParametersAsFormArray(indicatorPath: IndicatorPath): FormArray {
private getParametersAsFormArray(indicatorPath: IndicatorPath): UntypedFormArray {
let parameters = this.fb.array([]);
if (indicatorPath.parameters) {
Object.keys(indicatorPath.parameters).forEach(key => {

View File

@ -7,7 +7,7 @@ import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholde
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class";
import {AlertModal} from "../openaireLibrary/utils/modal/alert";
import {BehaviorSubject, Subject, Subscriber, Subscription} from "rxjs";
import {FormBuilder, FormGroup, Validators} from "@angular/forms";
import {UntypedFormBuilder, UntypedFormGroup, Validators} from "@angular/forms";
import {StakeholderUtils} from "../utils/indicator-utils";
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
import {IDeactivateComponent} from "../openaireLibrary/utils/can-exit.guard";
@ -55,7 +55,7 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
/**
* Current element and index of topic, category or subcategory to be deleted.
*/
public form: FormGroup;
public form: UntypedFormGroup;
public element: Topic | Category | SubCategory;
public type: 'topic' | 'category' | 'subcategory' = "topic";
public index: number = -1;
@ -70,7 +70,7 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
@ViewChild("subCategories") subCategories: TransitionGroupComponent;
public elementChildrenActionOnDelete: string;
public filters: FormGroup;
public filters: UntypedFormGroup;
public all: Option = {
value: 'all',
label: 'All'
@ -80,7 +80,7 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
private route: ActivatedRoute,
private router: Router,
private title: Title,
private fb: FormBuilder,
private fb: UntypedFormBuilder,
private stakeholderService: StakeholderService,
private userManagementService: UserManagementService,
private layoutService: LayoutService,

View File

@ -10,7 +10,7 @@
"moduleResolution": "node",
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"target": "es2020",
"typeRoots": [
"node_modules/@types"
],