Update from Angular 12 to 13.

This commit is contained in:
Dan 2023-01-19 10:09:00 -05:00
parent ec24a3621a
commit e816bdb1ba
7 changed files with 3458 additions and 11136 deletions

1
.gitignore vendored
View File

@ -33,6 +33,7 @@ speed-measure-plugin*.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
**/coverage

14419
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -16,17 +16,9 @@
},
"private": false,
"peerDependencies": {
"@angular/animations": "^12.2.1",
"@angular/cdk": "^12.2.1",
"@angular/common": "^12.2.1",
"@angular/compiler": "^12.2.1",
"@angular/core": "^12.2.1",
"@angular/flex-layout": "^12.0.0-beta.34",
"@angular/forms": "^12.2.1",
"@angular/material": "^12.2.1",
"@angular/platform-browser": "^12.2.1",
"@angular/platform-browser-dynamic": "^12.2.1",
"@angular/router": "^12.2.1",
"@ngx-formly/core": "^5.10.22",
"@ngx-formly/material": "^5.10.22",
"@sentry/browser": "^5.30.0",
@ -43,26 +35,26 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^12.2.1",
"@angular-devkit/build-angular": "^13.3.10",
"@angular-eslint/builder": "^12.3.1",
"@angular-eslint/eslint-plugin": "12.3.1",
"@angular-eslint/eslint-plugin-template": "12.3.1",
"@angular-eslint/schematics": "12.3.1",
"@angular-eslint/template-parser": "12.3.1",
"@angular/animations": "^12.2.1",
"@angular/animations": "^13.3.12",
"@angular/cdk": "^12.2.1",
"@angular/cli": "^12.2.1",
"@angular/common": "^12.2.1",
"@angular/compiler": "^12.2.1",
"@angular/compiler-cli": "^12.2.1",
"@angular/core": "^12.2.1",
"@angular/cli": "^13.3.10",
"@angular/common": "^13.3.12",
"@angular/compiler": "^13.3.12",
"@angular/compiler-cli": "^13.3.12",
"@angular/core": "^13.3.12",
"@angular/flex-layout": "^12.0.0-beta.34",
"@angular/forms": "^12.2.1",
"@angular/language-service": "^12.2.1",
"@angular/forms": "^13.3.12",
"@angular/language-service": "^13.3.12",
"@angular/material": "^12.2.1",
"@angular/platform-browser": "^12.2.1",
"@angular/platform-browser-dynamic": "^12.2.1",
"@angular/router": "^12.2.1",
"@angular/platform-browser": "^13.3.12",
"@angular/platform-browser-dynamic": "^13.3.12",
"@angular/router": "^13.3.12",
"@ngx-formly/core": "^5.10.22",
"@ngx-formly/material": "^5.10.22",
"@sentry/browser": "^5.30.0",
@ -86,7 +78,7 @@
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"lodash.isequal": "^4.5.0",
"ng-packagr": "^12.1.0",
"ng-packagr": "^13.3.1",
"ngx-device-detector": "^2.1.1",
"ngx-file-drop": "^11.1.0",
"ngx-highlightjs": "^4.1.4",
@ -96,11 +88,11 @@
"rxjs": "^6.5.5",
"ts-node": "~8.6.2",
"tslib": "^2.0.0",
"typescript": "~4.3.5",
"typescript": "~4.6.4",
"zone.js": "~0.11.4"
},
"dependencies": {
"@sentry/angular": "^6.19.6",
"@sentry/tracing": "^6.19.6"
}
}
}

View File

@ -2,23 +2,6 @@
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/sartography-workflow-lib",
"lib": {
"entryFile": "src/public-api.ts",
"umdModuleIds": {
"@ngx-formly/core": "ngxFormlyCore",
"@ngx-formly/material": "ngxFormlyMaterial",
"@ngx-formly/material/datepicker": "ngxFormlyMaterialDatepicker",
"ngx-file-drop": "ngxFileDrop",
"ngx-markdown": "ngxMarkdown",
"ngx-device-detector": "ngxDeviceDetector",
"ngx-highlightjs": "ngxHighlightjs",
"@yellowspot/ng-truncate": "ngTruncate",
"lodash.isequal": "lodashIsEqual",
"lodash/cloneDeep": "lodashCloneDeep",
"@ngx-formly/material/multicheckbox" : "ngFormlyMulticheckbox",
"@ngx-formly/material/radio" : "ngFormlyRadio",
"@sentry/browser" : "sentryBrowser",
"@ngx-formly/core/select" : "ngFormlySelect",
"lodash": "lodash"
}
"entryFile": "src/public-api.ts"
}
}

View File

@ -118,63 +118,59 @@ export class AppFormlyConfig {
}
@NgModule({
declarations: [
AutocompleteFieldComponent,
FileBaseComponent,
FileFieldComponent,
FileUploadComponent,
FileValueAccessorDirective,
FormPrintoutComponent,
HelpDialogComponent,
HelpWrapperComponent,
MarkdownDescriptionWrapperComponent,
PanelWrapperComponent,
RadioDataFieldComponent,
RepeatSectionConfirmDialogComponent,
RepeatTypeComponent
],
imports: [
CommonModule,
FlexLayoutModule,
FormlyMatDatepickerModule,
FormlyMaterialModule,
FormlyModule.forRoot(AppFormlyConfig.config),
FormlySelectModule,
FormsModule,
MarkdownModule.forRoot(),
MatAutocompleteModule,
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatDialogModule,
MatIconModule,
MatInputModule,
MatRadioModule,
MatTableModule,
MatProgressSpinnerModule,
NgxFileDropModule,
ReactiveFormsModule,
SartographyPipesModule,
TruncateModule,
],
exports: [
AutocompleteFieldComponent,
FileBaseComponent,
FileFieldComponent,
FileUploadComponent,
FormPrintoutComponent,
HelpDialogComponent,
HelpWrapperComponent,
MarkdownDescriptionWrapperComponent,
PanelWrapperComponent,
RadioDataFieldComponent,
RepeatTypeComponent
],
providers: [],
entryComponents: [
HelpDialogComponent,
RepeatSectionConfirmDialogComponent
],
declarations: [
AutocompleteFieldComponent,
FileBaseComponent,
FileFieldComponent,
FileUploadComponent,
FileValueAccessorDirective,
FormPrintoutComponent,
HelpDialogComponent,
HelpWrapperComponent,
MarkdownDescriptionWrapperComponent,
PanelWrapperComponent,
RadioDataFieldComponent,
RepeatSectionConfirmDialogComponent,
RepeatTypeComponent
],
imports: [
CommonModule,
FlexLayoutModule,
FormlyMatDatepickerModule,
FormlyMaterialModule,
FormlyModule.forRoot(AppFormlyConfig.config),
FormlySelectModule,
FormsModule,
MarkdownModule.forRoot(),
MatAutocompleteModule,
MatButtonModule,
MatCardModule,
MatCheckboxModule,
MatDialogModule,
MatIconModule,
MatInputModule,
MatRadioModule,
MatTableModule,
MatProgressSpinnerModule,
NgxFileDropModule,
ReactiveFormsModule,
SartographyPipesModule,
TruncateModule,
],
exports: [
AutocompleteFieldComponent,
FileBaseComponent,
FileFieldComponent,
FileUploadComponent,
FormPrintoutComponent,
HelpDialogComponent,
HelpWrapperComponent,
MarkdownDescriptionWrapperComponent,
PanelWrapperComponent,
RadioDataFieldComponent,
RepeatTypeComponent
],
providers: []
})
export class SartographyFormsModule {
}

View File

@ -47,7 +47,8 @@ export function createComponent<T>({
declarations: [FormlyTestComponent, ...(declarations || [])],
imports: [ReactiveFormsModule, FormlyModule.forRoot(config), ...(imports || [])],
providers: providers || [],
}).overrideComponent(FormlyTestComponent, {
teardown: { destroyAfterEach: false }
}).overrideComponent(FormlyTestComponent, {
set: {
template,
inputs: Object.keys(inputs),

View File

@ -13,7 +13,9 @@ declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false }
}
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);