Upgrade Angular 13 -> 14

This commit is contained in:
mike cullerton 2023-01-19 14:41:20 -05:00
parent 6579bfe869
commit ba3bc3a32a
13 changed files with 4813 additions and 17224 deletions

View File

@ -234,7 +234,6 @@
}
}
},
"defaultProject": "cr-connect-bpmn",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
@ -242,6 +241,8 @@
},
"cli": {
"analytics": false,
"defaultCollection": "@angular-eslint/schematics"
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}

21934
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -27,17 +27,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^13.3.12",
"@angular/cdk": "^13.3.9",
"@angular/common": "^13.3.12",
"@angular/compiler": "^13.3.12",
"@angular/core": "^13.3.12",
"@angular/flex-layout": "^13.0.0-beta.38",
"@angular/forms": "^13.3.12",
"@angular/material": "^13.3.9",
"@angular/platform-browser": "^13.3.12",
"@angular/platform-browser-dynamic": "^13.3.12",
"@angular/router": "^13.3.12",
"@angular/animations": "^14.2.12",
"@angular/cdk": "^14.2.7",
"@angular/common": "^14.2.12",
"@angular/compiler": "^14.2.12",
"@angular/core": "^14.2.12",
"@angular/flex-layout": "^14.0.0-beta.41",
"@angular/forms": "^14.2.12",
"@angular/material": "^14.2.7",
"@angular/platform-browser": "^14.2.12",
"@angular/platform-browser-dynamic": "^14.2.12",
"@angular/router": "^14.2.12",
"@bpmn-io/dmn-migrate": "^0.4.3",
"@ngx-formly/core": "^5.10.22",
"@ngx-formly/material": "^5.10.22",
@ -69,17 +69,17 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-builders/custom-webpack": "^13.1.0",
"@angular-devkit/build-angular": "^13.3.10",
"@angular-devkit/build-webpack": "^0.1303.10",
"@angular-eslint/builder": "^13.5.0",
"@angular-eslint/eslint-plugin": "^13.5.0",
"@angular-eslint/eslint-plugin-template": "^13.5.0",
"@angular-eslint/schematics": "^13.5.0",
"@angular-eslint/template-parser": "^13.5.0",
"@angular/cli": "^13.3.10",
"@angular/compiler-cli": "^13.3.12",
"@angular/language-service": "^13.3.12",
"@angular-builders/custom-webpack": "^14.1.0",
"@angular-devkit/build-angular": "^14.2.10",
"@angular-devkit/build-webpack": "^0.1402.10",
"@angular-eslint/builder": "^14.4.0",
"@angular-eslint/eslint-plugin": "^14.4.0",
"@angular-eslint/eslint-plugin-template": "^14.4.0",
"@angular-eslint/schematics": "^14.4.0",
"@angular-eslint/template-parser": "^14.4.0",
"@angular/cli": "^14.2.10",
"@angular/compiler-cli": "^14.2.12",
"@angular/language-service": "^14.2.12",
"@babel/compat-data": "^7.15.0",
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
@ -107,7 +107,7 @@
"postcss": "^8.3.6",
"postcss-loader": "^6.1.1",
"postcss-short": "^5.0.0",
"puppeteer": "^10.2.0",
"puppeteer": "^19.5.2",
"sonar-scanner": "^3.1.0",
"ts-node": "^10.2.0",
"typescript": "^4.6.4",

View File

@ -1,5 +1,5 @@
import {AfterViewInit, Component, Inject, ViewChild} from '@angular/core';
import {FormControl, FormGroup} from '@angular/forms';
import {FormControl, UntypedFormGroup} from '@angular/forms';
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
import {FormlyFieldConfig, FormlyFormOptions} from '@ngx-formly/core';
import {cleanUpFilename, FileType, FileFieldComponent, ApiService} from 'sartography-workflow-lib';
@ -11,7 +11,7 @@ import {FileMetaDialogData} from '../../_interfaces/dialog-data';
styleUrls: ['./file-meta-dialog.component.scss']
})
export class FileMetaDialogComponent {
form: FormGroup = new FormGroup({});
form: UntypedFormGroup = new UntypedFormGroup({});
model: any = {};
options: FormlyFormOptions = {};
fields: FormlyFieldConfig[] = [];

View File

@ -1,5 +1,5 @@
import {Component, Inject} from '@angular/core';
import {FormControl, FormGroup} from '@angular/forms';
import {UntypedFormControl, UntypedFormGroup} from '@angular/forms';
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
import {FormlyFieldConfig, FormlyFormOptions} from '@ngx-formly/core';
import {ApiService, toSnakeCase} from 'sartography-workflow-lib';
@ -12,7 +12,7 @@ import {of} from "rxjs";
styleUrls: ['./workflow-spec-category-dialog.component.scss']
})
export class WorkflowSpecCategoryDialogComponent {
form: FormGroup = new FormGroup({});
form: UntypedFormGroup = new UntypedFormGroup({});
model: any = {};
options: FormlyFormOptions = {};
fields: FormlyFieldConfig[] = [];
@ -78,7 +78,7 @@ export class WorkflowSpecCategoryDialogComponent {
},
asyncValidators: {
uniqueID: {
expression: (control: FormControl) => {
expression: (control: UntypedFormControl) => {
return of(this.categories.indexOf(control.value) === -1);
},

View File

@ -1,5 +1,5 @@
import {Component, Inject} from '@angular/core';
import {FormControl, FormGroup, ValidationErrors} from '@angular/forms';
import {UntypedFormControl, UntypedFormGroup, ValidationErrors} from '@angular/forms';
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
import {FormlyFieldConfig, FormlyFormOptions, FormlyTemplateOptions} from '@ngx-formly/core';
import {ApiService, toSnakeCase} from 'sartography-workflow-lib';
@ -13,7 +13,7 @@ import {of} from "rxjs";
})
export class WorkflowSpecDialogComponent {
form: FormGroup = new FormGroup({});
form: UntypedFormGroup = new UntypedFormGroup({});
model: any = {};
options: FormlyFormOptions = {};
fields: FormlyFieldConfig[] = [];
@ -88,7 +88,7 @@ export class WorkflowSpecDialogComponent {
},
asyncValidators: {
uniqueID: {
expression: (control: FormControl) => {
expression: (control: UntypedFormControl) => {
return of(this.specs.indexOf(control.value) === -1);
},

View File

@ -1,8 +1,8 @@
import {FormControl} from '@angular/forms';
import {UntypedFormControl} from '@angular/forms';
import {ValidateEmail} from './email.validator';
describe('ValidateEmail', () => {
const control = new FormControl();
const control = new UntypedFormControl();
it('should return an error for an invalid email address', () => {
const emailsToTest = [

View File

@ -1,15 +1,15 @@
import {FormControl} from '@angular/forms';
import {UntypedFormControl} from '@angular/forms';
import {FormlyFieldConfig} from '@ngx-formly/core';
import {FieldType} from '@ngx-formly/material';
import * as Validators from './formly.validator';
describe('Formly Validators', () => {
let control: FormControl;
let control: UntypedFormControl;
let err: Error;
let field: FormlyFieldConfig;
beforeEach(() => {
control = new FormControl();
control = new UntypedFormControl();
err = new Error('some error');
field = {
type: 'email',

View File

@ -1,22 +1,22 @@
import {FormControl, ValidationErrors} from '@angular/forms';
import {UntypedFormControl, ValidationErrors} from '@angular/forms';
import {FieldType, FormlyFieldConfig} from '@ngx-formly/core';
import EMAIL_REGEX from './email.regex';
import PHONE_REGEX from './phone.regex';
import URL_REGEX from './url.regex';
export const EmailValidator = (control: FormControl): ValidationErrors => !control.value || EMAIL_REGEX.test(control.value) ? null : {email: true};
export const EmailValidator = (control: UntypedFormControl): ValidationErrors => !control.value || EMAIL_REGEX.test(control.value) ? null : {email: true};
export const EmailValidatorMessage = (err, field: FormlyFieldConfig) => `"${field.formControl.value}" is not a valid email address`;
export const UrlValidator = (control: FormControl): ValidationErrors => !control.value || URL_REGEX.test(control.value) ? null : {url: true};
export const UrlValidator = (control: UntypedFormControl): ValidationErrors => !control.value || URL_REGEX.test(control.value) ? null : {url: true};
export const UrlValidatorMessage = (err, field: FormlyFieldConfig) => `We cannot save "${field.formControl.value}". Please provide the full path, including http:// or https://`;
export const PhoneValidator = (control: FormControl): ValidationErrors => !control.value || PHONE_REGEX.test(control.value) ? null : {phone: true};
export const PhoneValidator = (control: UntypedFormControl): ValidationErrors => !control.value || PHONE_REGEX.test(control.value) ? null : {phone: true};
export const PhoneValidatorMessage = (err, field: FormlyFieldConfig) => `"${field.formControl.value}" is not a valid phone number`;
export const MulticheckboxValidator = (control: FormControl): ValidationErrors => {
export const MulticheckboxValidator = (control: UntypedFormControl): ValidationErrors => {
if (control.value) {
for (const key in control.value) {
if (control.value[key] === true) {

View File

@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import {ApiService} from 'sartography-workflow-lib';
import {MatDialogRef} from "@angular/material/dialog";
import {FormGroup} from "@angular/forms";
import {UntypedFormGroup} from "@angular/forms";
import {FormlyFieldConfig, FormlyFormOptions} from "@ngx-formly/core";
@Component({
@ -10,7 +10,7 @@ import {FormlyFieldConfig, FormlyFormOptions} from "@ngx-formly/core";
styleUrls: ['./git-merge-dialog.component.scss']
})
export class GitMergeDialogComponent {
form: FormGroup = new FormGroup({});
form: UntypedFormGroup = new UntypedFormGroup({});
model: any = {};
options: FormlyFormOptions = {};
fields: FormlyFieldConfig[] = [];

View File

@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import {FormGroup} from "@angular/forms";
import {UntypedFormGroup} from "@angular/forms";
import {FormlyFieldConfig, FormlyFormOptions} from "@ngx-formly/core";
import {MatDialogRef} from "@angular/material/dialog";
import {ApiService} from 'sartography-workflow-lib';
@ -11,7 +11,7 @@ import {ApiService} from 'sartography-workflow-lib';
styleUrls: ['./git-repo-dialog.component.scss']
})
export class GitRepoDialogComponent {
form: FormGroup = new FormGroup({});
form: UntypedFormGroup = new UntypedFormGroup({});
model: any = {};
options: FormlyFormOptions = {};
fields: FormlyFieldConfig[] = [];

View File

@ -26,7 +26,7 @@ import {
import { ActivatedRoute } from '@angular/router';
import { Location } from '@angular/common';
import { environment } from '../../environments/environment.runtime';
import { FormControl } from '@angular/forms';
import { UntypedFormControl } from '@angular/forms';
import { SettingsService } from '../settings.service';
import { MatButtonModule } from '@angular/material/button';
import {GitRepoDialogComponent} from "../git-repo-dialog/git-repo-dialog.component";
@ -56,7 +56,7 @@ export class WorkflowSpecListComponent implements OnInit {
selectedCat: WorkflowSpecCategory;
workflowSpecsByCategory: WorkflowSpecCategoryGroup[] = [];
categories: WorkflowSpecCategory[];
searchField: FormControl;
searchField: UntypedFormControl;
library_toggle: boolean;
gitRepo: GitRepo;
@ -84,7 +84,7 @@ export class WorkflowSpecListComponent implements OnInit {
}
});
this.searchField = new FormControl();
this.searchField = new UntypedFormControl();
this.searchField.valueChanges.subscribe(value => {
this._loadWorkflowSpecs(null, value);
});

View File

@ -11,7 +11,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"target": "es2020",
"typeRoots": [
"node_modules/@types"
],