From 71d574d2593608cca14a48ca9852b12fe10234e2 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Thu, 24 Aug 2023 17:25:57 +0300 Subject: [PATCH] Update angular to version 14 --- angular.json | 3 +-- package.json | 30 ++++++++++++------------ src/app/analytics/analytics.component.ts | 6 ++--- src/app/contact/contact.component.ts | 6 ++--- tsconfig.json | 2 +- 5 files changed, 23 insertions(+), 24 deletions(-) diff --git a/angular.json b/angular.json index e9db40e..9fd93b6 100644 --- a/angular.json +++ b/angular.json @@ -205,6 +205,5 @@ } } } - }, - "defaultProject": "usage-counts" + } } diff --git a/package.json b/package.json index 19ef68e..4fb9956 100644 --- a/package.json +++ b/package.json @@ -16,32 +16,32 @@ }, "private": true, "dependencies": { - "@angular/animations": "~13.4.0", + "@angular/animations": "~14.3.0", "@angular/cdk": "^13.3.9", - "@angular/common": "~13.4.0", - "@angular/compiler": "~13.4.0", - "@angular/core": "~13.4.0", - "@angular/forms": "~13.4.0", - "@angular/localize": "^13.4.0", + "@angular/common": "~14.3.0", + "@angular/compiler": "~14.3.0", + "@angular/core": "~14.3.0", + "@angular/forms": "~14.3.0", + "@angular/localize": "^14.3.0", "@angular/material": "^13.3.9", - "@angular/platform-browser": "~13.4.0", - "@angular/platform-browser-dynamic": "~13.4.0", - "@angular/router": "~13.4.0", + "@angular/platform-browser": "~14.3.0", + "@angular/platform-browser-dynamic": "~14.3.0", + "@angular/router": "~14.3.0", "clipboard": "^1.5.16", "core-js": "^2.5.4", "express": "^4.15.2", "jquery": "^3.4.1", - "ng-recaptcha": "^9.0.0", + "ng-recaptcha": "^10.0.0", "rxjs": "^6.5.1", "ts-md5": "^1.2.0", "tslib": "^2.0.0", "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "~13.3.11", - "@angular/cli": "~13.3.11", - "@angular/compiler-cli": "~13.4.0", - "@angular/language-service": "~13.4.0", + "@angular-devkit/build-angular": "~14.2.12", + "@angular/cli": "~14.2.12", + "@angular/compiler-cli": "~14.3.0", + "@angular/language-service": "~14.3.0", "@types/express": "^4.17.0", "@types/express-serve-static-core": "4.17.28", "@types/node": "^12.11.1", @@ -59,4 +59,4 @@ "ts-node": "~7.0.0", "typescript": "~4.6.4" } -} \ No newline at end of file +} diff --git a/src/app/analytics/analytics.component.ts b/src/app/analytics/analytics.component.ts index 01b97fd..66f0bec 100644 --- a/src/app/analytics/analytics.component.ts +++ b/src/app/analytics/analytics.component.ts @@ -1,6 +1,6 @@ import {Component, OnDestroy, OnInit, ViewChild} from '@angular/core'; import {CountryUsageStat, UsageStat} from '../entities/usage-stat'; -import {FormControl} from '@angular/forms'; +import {UntypedFormControl} from '@angular/forms'; import {Observable, Subscriber, Subscription} from 'rxjs'; import {UsageStatsService} from '../services/usage-stats.service'; import {map, startWith} from 'rxjs/operators'; @@ -21,7 +21,7 @@ import {SearchInputComponent} from '../openaireLibrary/sharedComponents/search-i styleUrls: ['analytics.component.css'], }) export class AnalyticsComponent implements OnInit, OnDestroy { - public countryFb: FormControl; + public countryFb: UntypedFormControl; public countries: Observable; public country: string; public loading: boolean = true; @@ -80,7 +80,7 @@ export class AnalyticsComponent implements OnInit, OnDestroy { } private init() { - this.countryFb = new FormControl(null); + this.countryFb = new UntypedFormControl(null); this.countries = this.countryFb.valueChanges .pipe( startWith(''), diff --git a/src/app/contact/contact.component.ts b/src/app/contact/contact.component.ts index 2855200..fe08b76 100644 --- a/src/app/contact/contact.component.ts +++ b/src/app/contact/contact.component.ts @@ -6,7 +6,7 @@ import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties' import {Composer} from '../openaireLibrary/utils/email/composer'; import {Meta, Title} from '@angular/platform-browser'; import {HelperFunctions} from '../openaireLibrary/utils/HelperFunctions.class'; -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; +import {UntypedFormBuilder, UntypedFormGroup, Validators} from '@angular/forms'; import {properties} from '../../environments/environment'; import {Subscriber, Subscription} from 'rxjs'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; @@ -24,7 +24,7 @@ export class ContactComponent implements OnInit, OnDestroy { public email: Email; public properties: EnvProperties = properties; - public contactForm: FormGroup; + public contactForm: UntypedFormGroup; @ViewChild('AlertModal') modal; description = 'Any questions? Contact us '; title = 'OpenAIRE - UsageCounts | Contact Us'; @@ -34,7 +34,7 @@ export class ContactComponent implements OnInit, OnDestroy { private emailService: EmailService, private _title: Title, private _piwikService: PiwikService, private _meta: Meta, private seoService: SEOService, - private fb: FormBuilder) { + private fb: UntypedFormBuilder) { } ngOnInit() { diff --git a/tsconfig.json b/tsconfig.json index 85001d5..fc8b4c1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,7 @@ "moduleResolution": "node", "experimentalDecorators": true, "importHelpers": true, - "target": "es2015", + "target": "es2020", "typeRoots": [ "node_modules/@types" ],