updated to angular 14

pull/83/head
Chris Veilleux 2022-07-20 17:21:52 -05:00
parent 62cb8a1b37
commit 3e7e63bb7e
33 changed files with 3156 additions and 3134 deletions

View File

@ -896,6 +896,5 @@
} }
} }
} }
}, }
"defaultProject": "internet"
} }

6091
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,16 +14,16 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~13.3.11", "@angular/animations": "^14.1.0",
"@angular/cdk": "^13.3.9", "@angular/cdk": "^14.1.0",
"@angular/common": "~13.3.11", "@angular/common": "^14.1.0",
"@angular/compiler": "~13.3.11", "@angular/compiler": "^14.1.0",
"@angular/core": "~13.3.11", "@angular/core": "^14.1.0",
"@angular/forms": "~13.3.11", "@angular/forms": "^14.1.0",
"@angular/material": "^13.3.9", "@angular/material": "^14.1.0",
"@angular/platform-browser": "~13.3.11", "@angular/platform-browser": "^14.1.0",
"@angular/platform-browser-dynamic": "~13.3.11", "@angular/platform-browser-dynamic": "^14.1.0",
"@angular/router": "~13.3.11", "@angular/router": "^14.1.0",
"@fortawesome/fontawesome-svg-core": "^1.2.31", "@fortawesome/fontawesome-svg-core": "^1.2.31",
"@fortawesome/free-brands-svg-icons": "^5.15.0", "@fortawesome/free-brands-svg-icons": "^5.15.0",
"@fortawesome/free-solid-svg-icons": "^5.15.0", "@fortawesome/free-solid-svg-icons": "^5.15.0",
@ -35,10 +35,10 @@
"zone.js": "~0.11.4" "zone.js": "~0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~13.3.9", "@angular-devkit/build-angular": "^14.1.0",
"@angular/cli": "~13.3.9", "@angular/cli": "^14.1.0",
"@angular/compiler-cli": "~13.3.11", "@angular/compiler-cli": "^14.1.0",
"@angular/language-service": "~13.3.11", "@angular/language-service": "^14.1.0",
"@types/jasmine": "~3.6.0", "@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.8", "@types/jasminewd2": "^2.0.8",
"@types/node": "^14.11.2", "@types/node": "^14.11.2",
@ -50,7 +50,7 @@
"karma-coverage-istanbul-reporter": "~3.0.3", "karma-coverage-istanbul-reporter": "~3.0.3",
"karma-jasmine": "~4.0.0", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0", "karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^13.3.1", "ng-packagr": "^14.1.0",
"protractor": "~7.0.0", "protractor": "~7.0.0",
"ts-node": "~9.0.0", "ts-node": "~9.0.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",

View File

@ -25,7 +25,7 @@ import { AccountDefaults } from '@account/models/defaults.model';
import { AccountPreferences } from '@account/models/preferences.model'; import { AccountPreferences } from '@account/models/preferences.model';
import { Device } from '@account/models/device.model'; import { Device } from '@account/models/device.model';
import { DeviceAttribute } from '@account/models/deviceAttribute.model'; import { DeviceAttribute } from '@account/models/deviceAttribute.model';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { handleError } from '@account/app/app.service'; import { handleError } from '@account/app/app.service';
const defaultsUrl = '/api/defaults'; const defaultsUrl = '/api/defaults';
@ -55,7 +55,7 @@ export class DeviceService {
return this.http.get<Device>(deviceUrl + '/' + deviceId); return this.http.get<Device>(deviceUrl + '/' + deviceId);
} }
addDevice(deviceForm: FormGroup) { addDevice(deviceForm: UntypedFormGroup) {
this.http.post<any>(deviceUrl, deviceForm.value).subscribe(); this.http.post<any>(deviceUrl, deviceForm.value).subscribe();
} }
@ -63,11 +63,11 @@ export class DeviceService {
return this.http.delete(deviceUrl + '/' + device.id); return this.http.delete(deviceUrl + '/' + device.id);
} }
updateDevice(deviceId: string, deviceForm: FormGroup): Observable<any> { updateDevice(deviceId: string, deviceForm: UntypedFormGroup): Observable<any> {
return this.http.patch(deviceUrl + '/' + deviceId, deviceForm.value); return this.http.patch(deviceUrl + '/' + deviceId, deviceForm.value);
} }
addAccountPreferences(preferencesForm: FormGroup) { addAccountPreferences(preferencesForm: UntypedFormGroup) {
return this.http.post<any>(preferencesUrl, preferencesForm.value); return this.http.post<any>(preferencesUrl, preferencesForm.value);
} }
@ -77,15 +77,15 @@ export class DeviceService {
); );
} }
updateAccountPreferences(preferencesForm: FormGroup): Observable<any> { updateAccountPreferences(preferencesForm: UntypedFormGroup): Observable<any> {
return this.http.patch<any>(preferencesUrl, preferencesForm.value); return this.http.patch<any>(preferencesUrl, preferencesForm.value);
} }
addAccountDefaults(defaultsForm: FormGroup) { addAccountDefaults(defaultsForm: UntypedFormGroup) {
return this.http.post<any>(defaultsUrl, defaultsForm.value); return this.http.post<any>(defaultsUrl, defaultsForm.value);
} }
updateAccountDefaults(defaultsForm: FormGroup) { updateAccountDefaults(defaultsForm: UntypedFormGroup) {
return this.http.patch<any>(defaultsUrl, defaultsForm.value); return this.http.patch<any>(defaultsUrl, defaultsForm.value);
} }

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { AccountDefaults } from '@account/models/defaults.model'; import { AccountDefaults } from '@account/models/defaults.model';
import { DeviceService } from '@account/http/device.service'; import { DeviceService } from '@account/http/device.service';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
@ -33,7 +33,7 @@ const fiveSeconds = 5000;
export class DefaultsCardComponent implements OnInit { export class DefaultsCardComponent implements OnInit {
@Input() addingDevice = false; @Input() addingDevice = false;
@Input() defaults: AccountDefaults; @Input() defaults: AccountDefaults;
@Input() defaultsForm: FormGroup; @Input() defaultsForm: UntypedFormGroup;
private snackbarConfig = new MatSnackBarConfig(); private snackbarConfig = new MatSnackBarConfig();
constructor( constructor(

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'account-device-edit-card', selector: 'account-device-edit-card',
@ -25,7 +25,7 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./device-edit-card.component.scss'] styleUrls: ['./device-edit-card.component.scss']
}) })
export class DeviceEditCardComponent implements OnInit { export class DeviceEditCardComponent implements OnInit {
@Input() deviceForm: FormGroup; @Input() deviceForm: UntypedFormGroup;
@Input() addDevice = false; @Input() addDevice = false;
@Input() pantacorId: string; @Input() pantacorId: string;
@Output() saveChanges = new EventEmitter<boolean>(); @Output() saveChanges = new EventEmitter<boolean>();

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { AbstractControl, FormGroup } from '@angular/forms'; import { AbstractControl, UntypedFormGroup } from '@angular/forms';
import { Country } from '@account/models/country.model'; import { Country } from '@account/models/country.model';
import { Region } from '@account/models/region.model'; import { Region } from '@account/models/region.model';
import { City } from '@account/models/city.model'; import { City } from '@account/models/city.model';
@ -32,7 +32,7 @@ import { Subject } from 'rxjs';
}) })
export class GeographyCardComponent implements OnInit { export class GeographyCardComponent implements OnInit {
@Input() geographyRequired: boolean; @Input() geographyRequired: boolean;
@Input() geoForm: FormGroup; @Input() geoForm: UntypedFormGroup;
@Input() required: boolean; @Input() required: boolean;
public countryControl: AbstractControl; public countryControl: AbstractControl;
public regionControl: AbstractControl; public regionControl: AbstractControl;

View File

@ -18,7 +18,7 @@ and limitations under the License.
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { OptionButtonsConfig } from '@account/models/option-buttons-config.model'; import { OptionButtonsConfig } from '@account/models/option-buttons-config.model';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'account-preferences-card', selector: 'account-preferences-card',
@ -27,7 +27,7 @@ import { FormGroup } from '@angular/forms';
}) })
export class PreferencesCardComponent implements OnInit { export class PreferencesCardComponent implements OnInit {
@Input() addingDevice = false; @Input() addingDevice = false;
@Input() preferencesForm: FormGroup; @Input() preferencesForm: UntypedFormGroup;
public measurementOptionsConfig: OptionButtonsConfig; public measurementOptionsConfig: OptionButtonsConfig;
public timeFormatOptionsConfig: OptionButtonsConfig; public timeFormatOptionsConfig: OptionButtonsConfig;
public dateFormatOptionsConfig: OptionButtonsConfig; public dateFormatOptionsConfig: OptionButtonsConfig;

View File

@ -1,5 +1,5 @@
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { OptionButtonsConfig } from '@account/models/option-buttons-config.model'; import { OptionButtonsConfig } from '@account/models/option-buttons-config.model';
@Component({ @Component({
@ -8,7 +8,7 @@ import { OptionButtonsConfig } from '@account/models/option-buttons-config.model
styleUrls: ['./software-release-card.component.scss'] styleUrls: ['./software-release-card.component.scss']
}) })
export class SoftwareReleaseCardComponent implements OnInit { export class SoftwareReleaseCardComponent implements OnInit {
@Input() softwareReleaseForm: FormGroup; @Input() softwareReleaseForm: UntypedFormGroup;
public releaseChannelConfig: OptionButtonsConfig; public releaseChannelConfig: OptionButtonsConfig;
constructor() { constructor() {

View File

@ -1,5 +1,5 @@
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { MatSlideToggleChange } from '@angular/material/slide-toggle'; import { MatSlideToggleChange } from '@angular/material/slide-toggle';
import { OptionButtonsConfig } from '@account/models/option-buttons-config.model'; import { OptionButtonsConfig } from '@account/models/option-buttons-config.model';
@ -9,7 +9,7 @@ import { OptionButtonsConfig } from '@account/models/option-buttons-config.model
styleUrls: ['./software-update-card.component.scss'] styleUrls: ['./software-update-card.component.scss']
}) })
export class SoftwareUpdateCardComponent implements OnInit { export class SoftwareUpdateCardComponent implements OnInit {
@Input() softwareUpdateForm: FormGroup; @Input() softwareUpdateForm: UntypedFormGroup;
public automaticUpdate = false; public automaticUpdate = false;
constructor() { } constructor() { }

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { MatSlideToggleChange } from '@angular/material/slide-toggle'; import { MatSlideToggleChange } from '@angular/material/slide-toggle';
@Component({ @Component({
@ -26,7 +26,7 @@ import { MatSlideToggleChange } from '@angular/material/slide-toggle';
styleUrls: ['./ssh-card.component.scss'] styleUrls: ['./ssh-card.component.scss']
}) })
export class SshCardComponent implements OnInit { export class SshCardComponent implements OnInit {
@Input() sshForm: FormGroup; @Input() sshForm: UntypedFormGroup;
public sshKeyHint: string; public sshKeyHint: string;
constructor() { constructor() {

View File

@ -18,7 +18,7 @@ and limitations under the License.
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { OptionButtonsConfig } from '@account/models/option-buttons-config.model'; import { OptionButtonsConfig } from '@account/models/option-buttons-config.model';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'account-voice-card', selector: 'account-voice-card',
@ -26,7 +26,7 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./voice-card.component.scss'] styleUrls: ['./voice-card.component.scss']
}) })
export class VoiceCardComponent implements OnInit { export class VoiceCardComponent implements OnInit {
@Input() voiceForm: FormGroup; @Input() voiceForm: UntypedFormGroup;
public voiceOptionsConfig: OptionButtonsConfig; public voiceOptionsConfig: OptionButtonsConfig;
constructor() { constructor() {

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { OptionButtonsConfig } from '@account/models/option-buttons-config.model'; import { OptionButtonsConfig } from '@account/models/option-buttons-config.model';
@Component({ @Component({
@ -26,7 +26,7 @@ import { OptionButtonsConfig } from '@account/models/option-buttons-config.model
styleUrls: ['./wake-word-card.component.scss'] styleUrls: ['./wake-word-card.component.scss']
}) })
export class WakeWordCardComponent implements OnInit { export class WakeWordCardComponent implements OnInit {
@Input() wakeWordForm: FormGroup; @Input() wakeWordForm: UntypedFormGroup;
public wakeWordOptionsConfig: OptionButtonsConfig; public wakeWordOptionsConfig: OptionButtonsConfig;

View File

@ -21,8 +21,8 @@ import { MediaChange, MediaObserver } from '@angular/flex-layout';
import { import {
AbstractControl, AbstractControl,
AsyncValidatorFn, AsyncValidatorFn,
FormBuilder, UntypedFormBuilder,
FormGroup, UntypedFormGroup,
ValidationErrors, ValidationErrors,
Validators Validators
} from '@angular/forms'; } from '@angular/forms';
@ -67,15 +67,15 @@ export function deviceNameValidator(deviceService: DeviceService): AsyncValidato
export class AddComponent implements OnInit { export class AddComponent implements OnInit {
public alignVertical: boolean; public alignVertical: boolean;
public defaults: AccountDefaults; public defaults: AccountDefaults;
public defaultsForm: FormGroup; public defaultsForm: UntypedFormGroup;
public deviceForm: FormGroup; public deviceForm: UntypedFormGroup;
private mediaWatcher: Subscription; private mediaWatcher: Subscription;
public preferencesForm: FormGroup; public preferencesForm: UntypedFormGroup;
public preferences: AccountPreferences; public preferences: AccountPreferences;
public stepDoneIcon = faCheck; public stepDoneIcon = faCheck;
constructor( constructor(
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
public mediaObserver: MediaObserver, public mediaObserver: MediaObserver,
private deviceService: DeviceService, private deviceService: DeviceService,
private route: ActivatedRoute private route: ActivatedRoute

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { AccountDefaults } from '@account/models/defaults.model'; import { AccountDefaults } from '@account/models/defaults.model';
@ -29,9 +29,9 @@ import { AccountDefaults } from '@account/models/defaults.model';
}) })
export class DefaultsComponent implements OnInit { export class DefaultsComponent implements OnInit {
public defaults: AccountDefaults; public defaults: AccountDefaults;
public defaultsForm: FormGroup; public defaultsForm: UntypedFormGroup;
constructor(private formBuilder: FormBuilder, private route: ActivatedRoute) { } constructor(private formBuilder: UntypedFormBuilder, private route: ActivatedRoute) { }
ngOnInit() { ngOnInit() {
this.route.data.subscribe( this.route.data.subscribe(

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { AbstractControl, AsyncValidatorFn, FormBuilder, FormGroup, ValidationErrors, Validators } from '@angular/forms'; import { AbstractControl, AsyncValidatorFn, UntypedFormBuilder, UntypedFormGroup, ValidationErrors, Validators } from '@angular/forms';
import { DeviceService } from '@account/http/device.service'; import { DeviceService } from '@account/http/device.service';
import { Device } from '@account/models/device.model'; import { Device } from '@account/models/device.model';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
@ -48,7 +48,7 @@ export function sshKeyValidator(deviceService: DeviceService): AsyncValidatorFn
}) })
export class DeviceEditComponent implements OnInit { export class DeviceEditComponent implements OnInit {
public advancedSettingsDesc: string[]; public advancedSettingsDesc: string[];
public deviceForm: FormGroup; public deviceForm: UntypedFormGroup;
private deviceId: string; private deviceId: string;
public device$ = new Observable<Device>(); public device$ = new Observable<Device>();
public pantacorId: string; public pantacorId: string;
@ -56,7 +56,7 @@ export class DeviceEditComponent implements OnInit {
constructor( constructor(
private deviceService: DeviceService, private deviceService: DeviceService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
private route: ActivatedRoute, private route: ActivatedRoute,
private router: Router, private router: Router,
private snackbar: MatSnackBar private snackbar: MatSnackBar

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, OnInit, Input } from '@angular/core'; import { Component, OnInit, Input } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { AccountPreferences } from '@account/models/preferences.model'; import { AccountPreferences } from '@account/models/preferences.model';
import { DeviceService } from '@account/http/device.service'; import { DeviceService } from '@account/http/device.service';
@ -32,12 +32,12 @@ import { ActivatedRoute } from '@angular/router';
export class PreferencesComponent implements OnInit { export class PreferencesComponent implements OnInit {
@Input() deviceSetup: boolean; @Input() deviceSetup: boolean;
public preferences: AccountPreferences; public preferences: AccountPreferences;
public preferencesForm: FormGroup; public preferencesForm: UntypedFormGroup;
public measurementOptionsConfig: OptionButtonsConfig; public measurementOptionsConfig: OptionButtonsConfig;
public timeFormatOptionsConfig: OptionButtonsConfig; public timeFormatOptionsConfig: OptionButtonsConfig;
public dateFormatOptionsConfig: OptionButtonsConfig; public dateFormatOptionsConfig: OptionButtonsConfig;
constructor(private deviceService: DeviceService, private formBuilder: FormBuilder, private route: ActivatedRoute) { constructor(private deviceService: DeviceService, private formBuilder: UntypedFormBuilder, private route: ActivatedRoute) {
this.dateFormatOptionsConfig = { this.dateFormatOptionsConfig = {
label: 'Date Format', label: 'Date Format',
options: ['DD/MM/YYYY', 'MM/DD/YYYY'], options: ['DD/MM/YYYY', 'MM/DD/YYYY'],

View File

@ -19,7 +19,7 @@ and limitations under the License.
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { MembershipType } from '@account/models/membership.model'; import { MembershipType } from '@account/models/membership.model';
import { MembershipUpdate } from '@account/models/membership-update.model'; import { MembershipUpdate } from '@account/models/membership-update.model';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'account-membership-step', selector: 'account-membership-step',
@ -28,7 +28,7 @@ import { FormGroup } from '@angular/forms';
}) })
export class MembershipStepComponent implements OnInit { export class MembershipStepComponent implements OnInit {
@Input() membershipTypes: MembershipType[]; @Input() membershipTypes: MembershipType[];
@Input() newAcctForm: FormGroup; @Input() newAcctForm: UntypedFormGroup;
public membershipDescription: string[]; public membershipDescription: string[];
constructor() { constructor() {

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'account-open-dataset-step', selector: 'account-open-dataset-step',
@ -25,7 +25,7 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./open-dataset-step.component.scss'] styleUrls: ['./open-dataset-step.component.scss']
}) })
export class OpenDatasetStepComponent implements OnInit { export class OpenDatasetStepComponent implements OnInit {
@Input() newAcctForm: FormGroup; @Input() newAcctForm: UntypedFormGroup;
public openDatasetDescription: string[]; public openDatasetDescription: string[];
constructor() { } constructor() { }

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { AbstractControl, FormGroup } from '@angular/forms'; import { AbstractControl, UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'account-username-step', selector: 'account-username-step',
@ -25,7 +25,7 @@ import { AbstractControl, FormGroup } from '@angular/forms';
styleUrls: ['./username-step.component.scss'] styleUrls: ['./username-step.component.scss']
}) })
export class UsernameStepComponent implements OnInit { export class UsernameStepComponent implements OnInit {
@Input() newAcctForm: FormGroup; @Input() newAcctForm: UntypedFormGroup;
public whyUsernameParagraph: string; public whyUsernameParagraph: string;
public usernameControl: AbstractControl; public usernameControl: AbstractControl;

View File

@ -20,8 +20,8 @@ import { Component, OnInit } from '@angular/core';
import { MediaChange, MediaObserver } from '@angular/flex-layout'; import { MediaChange, MediaObserver } from '@angular/flex-layout';
import { import {
AbstractControl, AbstractControl,
FormBuilder, UntypedFormBuilder,
FormGroup, UntypedFormGroup,
ValidatorFn, ValidatorFn,
Validators Validators
} from '@angular/forms'; } from '@angular/forms';
@ -40,7 +40,7 @@ import {
const noDelay = 0; const noDelay = 0;
export function loginValidator(): ValidatorFn { export function loginValidator(): ValidatorFn {
return (loginGroup: FormGroup) => { return (loginGroup: UntypedFormGroup) => {
let valid = true; let valid = true;
const federatedToken = loginGroup.controls['federatedToken']; const federatedToken = loginGroup.controls['federatedToken'];
const userEnteredEmail = loginGroup.controls['userEnteredEmail']; const userEnteredEmail = loginGroup.controls['userEnteredEmail'];
@ -60,7 +60,7 @@ export function loginValidator(): ValidatorFn {
} }
export function membershipValidator(): ValidatorFn { export function membershipValidator(): ValidatorFn {
return (supportGroup: FormGroup) => { return (supportGroup: UntypedFormGroup) => {
let valid = true; let valid = true;
const membershipType = supportGroup.controls['membershipType']; const membershipType = supportGroup.controls['membershipType'];
const paymentToken = supportGroup.controls['paymentToken']; const paymentToken = supportGroup.controls['paymentToken'];
@ -85,13 +85,13 @@ export class NewComponent implements OnInit {
private mediaWatcher: Subscription; private mediaWatcher: Subscription;
public membershipControl: AbstractControl; public membershipControl: AbstractControl;
public membershipTypes: MembershipType[]; public membershipTypes: MembershipType[];
public newAcctForm: FormGroup; public newAcctForm: UntypedFormGroup;
public openDatasetControl: AbstractControl; public openDatasetControl: AbstractControl;
public stepDoneIcon = faCheck; public stepDoneIcon = faCheck;
public usernameControl: AbstractControl; public usernameControl: AbstractControl;
constructor( constructor(
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
public mediaObserver: MediaObserver, public mediaObserver: MediaObserver,
private profileService: ProfileService, private profileService: ProfileService,
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -3,7 +3,7 @@
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../../out-tsc/lib",
"declarationMap": true, "declarationMap": true,
"target": "es2015", "target": "es2020",
"module": "es2015", "module": "es2015",
"moduleResolution": "node", "moduleResolution": "node",
"declaration": true, "declaration": true,

View File

@ -3,7 +3,7 @@
"compilerOptions": { "compilerOptions": {
"outDir": "../../out-tsc/lib", "outDir": "../../out-tsc/lib",
"declarationMap": true, "declarationMap": true,
"target": "es2015", "target": "es2020",
"module": "es2015", "module": "es2015",
"moduleResolution": "node", "moduleResolution": "node",
"declaration": true, "declaration": true,

View File

@ -20,7 +20,7 @@ import { Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http'; import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { Observable, throwError } from 'rxjs'; import { Observable, throwError } from 'rxjs';
import { AbstractControl, FormGroup } from '@angular/forms'; import { AbstractControl, UntypedFormGroup } from '@angular/forms';
import { environment } from '../../../environments/environment'; import { environment } from '../../../environments/environment';
import { Agreement } from '@account/models/agreement.model'; import { Agreement } from '@account/models/agreement.model';
import { catchError } from 'rxjs/operators'; import { catchError } from 'rxjs/operators';
@ -67,7 +67,7 @@ export class ApiService {
* *
* @param loginForm: form containing the email and password of a user not using federated login * @param loginForm: form containing the email and password of a user not using federated login
*/ */
authorizeInternal (loginForm: FormGroup): Observable<any> { authorizeInternal (loginForm: UntypedFormGroup): Observable<any> {
const loginFormValues = loginForm.value; const loginFormValues = loginForm.value;
const rawCredentials = `${loginFormValues.email}:||:${loginFormValues.password}`; const rawCredentials = `${loginFormValues.email}:||:${loginFormValues.password}`;
const codedCredentials = btoa(rawCredentials); const codedCredentials = btoa(rawCredentials);
@ -112,7 +112,7 @@ export class ApiService {
return this.http.get<Agreement>(AGREEMENT_URL + '/' + url_suffix); return this.http.get<Agreement>(AGREEMENT_URL + '/' + url_suffix);
} }
addAccount(newAcctForm: FormGroup) { addAccount(newAcctForm: UntypedFormGroup) {
const formValues = newAcctForm.value; const formValues = newAcctForm.value;
if (formValues.login.email) { if (formValues.login.email) {
formValues.login.email = btoa(formValues.login.email); formValues.login.email = btoa(formValues.login.email);

View File

@ -18,7 +18,7 @@ and limitations under the License.
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { FormControl, Validators } from '@angular/forms'; import { UntypedFormControl, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@ -36,8 +36,8 @@ const fiveSeconds = 5000;
}) })
export class ChangePasswordComponent implements OnInit { export class ChangePasswordComponent implements OnInit {
public account$: Observable<PasswordChangeAccount>; public account$: Observable<PasswordChangeAccount>;
public emailControl = new FormControl(null, [Validators.required, Validators.email]); public emailControl = new UntypedFormControl(null, [Validators.required, Validators.email]);
public passwordControl = new FormControl(null, [Validators.required]); public passwordControl = new UntypedFormControl(null, [Validators.required]);
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import { MatDialog } from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog';
import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar'; import { MatSnackBar, MatSnackBarConfig } from '@angular/material/snack-bar';
@ -34,14 +34,14 @@ const fiveSeconds = 5000;
}) })
export class InternalLoginComponent implements OnInit { export class InternalLoginComponent implements OnInit {
public emailControl: AbstractControl; public emailControl: AbstractControl;
public loginForm: FormGroup; public loginForm: UntypedFormGroup;
public passwordControl: AbstractControl; public passwordControl: AbstractControl;
public passwordResetForm: FormGroup; public passwordResetForm: UntypedFormGroup;
constructor( constructor(
private authService: ApiService, private authService: ApiService,
private snackBar: MatSnackBar, private snackBar: MatSnackBar,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
public dialog: MatDialog public dialog: MatDialog
) { } ) { }

View File

@ -18,7 +18,7 @@ and limitations under the License.
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { FormControl, FormGroup } from '@angular/forms'; import { UntypedFormControl, FormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'sso-password-reset', selector: 'sso-password-reset',
@ -29,7 +29,7 @@ export class PasswordResetComponent implements OnInit {
constructor( constructor(
public dialogRef: MatDialogRef<PasswordResetComponent>, public dialogRef: MatDialogRef<PasswordResetComponent>,
@Inject(MAT_DIALOG_DATA) public dialogData: FormControl @Inject(MAT_DIALOG_DATA) public dialogData: UntypedFormControl
) { } ) { }
ngOnInit() { ngOnInit() {

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
import { faCheck } from '@fortawesome/free-solid-svg-icons'; import { faCheck } from '@fortawesome/free-solid-svg-icons';
@ -34,7 +34,7 @@ export class AgreementStepComponent implements OnInit {
public acceptedIcon = faCheck; public acceptedIcon = faCheck;
public agreementAccepted = false; public agreementAccepted = false;
public agreementContent: SafeHtml; public agreementContent: SafeHtml;
@Input() newAcctForm: FormGroup; @Input() newAcctForm: UntypedFormGroup;
@Input() step: string; @Input() step: string;
constructor(private apiService: ApiService, private sanitizer: DomSanitizer) { constructor(private apiService: ApiService, private sanitizer: DomSanitizer) {

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input, OnInit } from '@angular/core'; import { Component, Input, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
import { ApiService } from '../../../core/http/api.service'; import { ApiService } from '../../../core/http/api.service';
import { LoginToken } from '../../../shared/models/login-token.model'; import { LoginToken } from '../../../shared/models/login-token.model';
@ -30,7 +30,7 @@ import { environment } from '../../../../environments/environment';
styleUrls: ['./authentication-step.component.scss'] styleUrls: ['./authentication-step.component.scss']
}) })
export class AuthenticationStepComponent implements OnInit { export class AuthenticationStepComponent implements OnInit {
@Input() loginForm: FormGroup; @Input() loginForm: UntypedFormGroup;
public disableInternal = false; public disableInternal = false;
public federatedErrorMessage: string; public federatedErrorMessage: string;
public federatedLoginText: string; public federatedLoginText: string;

View File

@ -20,9 +20,9 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { import {
AbstractControl, AbstractControl,
AsyncValidatorFn, AsyncValidatorFn,
FormBuilder, UntypedFormBuilder,
FormControl, UntypedFormControl,
FormGroup, UntypedFormGroup,
ValidationErrors, ValidationErrors,
ValidatorFn, ValidatorFn,
Validators Validators
@ -43,7 +43,7 @@ import { SnackbarComponent } from 'shared';
export function loginValidator(): ValidatorFn { export function loginValidator(): ValidatorFn {
return (loginGroup: FormGroup) => { return (loginGroup: UntypedFormGroup) => {
let valid = true; let valid = true;
const federatedToken = loginGroup.controls['federatedToken']; const federatedToken = loginGroup.controls['federatedToken'];
const email = loginGroup.controls['email']; const email = loginGroup.controls['email'];
@ -88,14 +88,14 @@ export function uniqueEmailValidator(apiService: ApiService): AsyncValidatorFn {
export class NewAccountComponent implements OnInit { export class NewAccountComponent implements OnInit {
@ViewChild(AuthenticationStepComponent) authenticationStep: AuthenticationStepComponent; @ViewChild(AuthenticationStepComponent) authenticationStep: AuthenticationStepComponent;
public alignVertical: boolean; public alignVertical: boolean;
public loginForm: FormGroup; public loginForm: UntypedFormGroup;
private mediaWatcher: Subscription; private mediaWatcher: Subscription;
public newAcctForm: FormGroup; public newAcctForm: UntypedFormGroup;
public stepDoneIcon = faCheck; public stepDoneIcon = faCheck;
constructor( constructor(
private apiService: ApiService, private apiService: ApiService,
private formBuilder: FormBuilder, private formBuilder: UntypedFormBuilder,
public mediaObserver: MediaObserver, public mediaObserver: MediaObserver,
private snackbar: MatSnackBar, private snackbar: MatSnackBar,
private route: ActivatedRoute, private route: ActivatedRoute,
@ -118,7 +118,7 @@ export class NewAccountComponent implements OnInit {
buildForm() { buildForm() {
// As of this writing there is an issue with using "update on blur" using the form builder. // As of this writing there is an issue with using "update on blur" using the form builder.
// Building the email control separately as a workaround. // Building the email control separately as a workaround.
const emailControl = new FormControl( const emailControl = new UntypedFormControl(
null, null,
{ {
validators: [Validators.email], validators: [Validators.email],

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'sso-email-input', selector: 'sso-email-input',
@ -25,7 +25,7 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./email-input.component.scss'] styleUrls: ['./email-input.component.scss']
}) })
export class EmailInputComponent { export class EmailInputComponent {
@Input() formGroup: FormGroup; @Input() formGroup: UntypedFormGroup;
@Input() readOnly: boolean; @Input() readOnly: boolean;
@Input() required: boolean; @Input() required: boolean;

View File

@ -17,7 +17,7 @@ and limitations under the License.
***************************************************************************** */ ***************************************************************************** */
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { FormGroup } from '@angular/forms'; import { UntypedFormGroup } from '@angular/forms';
@Component({ @Component({
selector: 'sso-password-input', selector: 'sso-password-input',
@ -25,7 +25,7 @@ import { FormGroup } from '@angular/forms';
styleUrls: ['./password-input.component.scss'] styleUrls: ['./password-input.component.scss']
}) })
export class PasswordInputComponent { export class PasswordInputComponent {
@Input() formGroup: FormGroup; @Input() formGroup: UntypedFormGroup;
@Input() readOnly = false; @Input() readOnly = false;
@Input() required = false; @Input() required = false;

View File

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