Upgrade to angular 13

This commit is contained in:
Chris Chen 2024-04-06 09:27:08 -07:00
parent 853b7069f9
commit dc49c0a958
15 changed files with 41279 additions and 46304 deletions

1
.gitignore vendored
View File

@ -23,6 +23,7 @@
!.vscode/extensions.json !.vscode/extensions.json
# misc # misc
/.angular/cache
/.sass-cache /.sass-cache
/connect.lock /connect.lock
/coverage /coverage

View File

@ -149,17 +149,6 @@
} }
] ]
} }
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"typeCheck": true,
"exclude": []
}
} }
} }
}, },
@ -174,15 +163,6 @@
"protractorConfig": "./protractor.conf.js", "protractorConfig": "./protractor.conf.js",
"devServerTarget": "ngx-admin-demo:serve" "devServerTarget": "ngx-admin-demo:serve"
} }
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": []
}
} }
} }
} }

87083
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,116 +1,114 @@
{ {
"name": "ngx-admin", "name": "ngx-admin",
"version": "8.0.0", "version": "8.0.0",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/akveo/ngx-admin.git" "url": "git+https://github.com/akveo/ngx-admin.git"
}, },
"bugs": { "bugs": {
"url": "https://github.com/akveo/ngx-admin/issues" "url": "https://github.com/akveo/ngx-admin/issues"
}, },
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"conventional-changelog": "conventional-changelog", "conventional-changelog": "conventional-changelog",
"start": "ng serve", "start": "ng serve",
"build": "ng build --output-path \\\\ArkNAS\\docker\\nginx-proxy\\data\\ChurchAngular --configuration production", "build": "ng build --output-path \\\\ArkNAS\\docker\\nginx-proxy\\data\\ChurchAngular --configuration production",
"build:prod": "npm run build -- --configuration production --aot", "build:prod": "npm run build -- --configuration production --aot",
"test": "ng test", "test": "ng test",
"test:coverage": "rimraf coverage && npm run test -- --code-coverage", "test:coverage": "rimraf coverage && npm run test -- --code-coverage",
"lint": "ng lint", "lint": "ng lint",
"lint:fix": "ng lint ngx-admin-demo --fix", "lint:fix": "ng lint ngx-admin-demo --fix",
"lint:styles": "stylelint ./src/**/*.scss", "lint:styles": "stylelint ./src/**/*.scss",
"lint:ci": "npm run lint && npm run lint:styles", "lint:ci": "npm run lint && npm run lint:styles",
"pree2e": "webdriver-manager update --standalone false --gecko false", "pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "ng e2e", "e2e": "ng e2e",
"docs": "compodoc -p src/tsconfig.app.json -d docs", "docs": "compodoc -p src/tsconfig.app.json -d docs",
"docs:serve": "compodoc -p src/tsconfig.app.json -d docs -s", "docs:serve": "compodoc -p src/tsconfig.app.json -d docs -s",
"prepush": "npm run lint:ci", "prepush": "npm run lint:ci",
"release:changelog": "npm run conventional-changelog -- -p angular -i CHANGELOG.md -s", "release:changelog": "npm run conventional-changelog -- -p angular -i CHANGELOG.md -s",
"postinstall": "ngcc --properties es2015 es5 browser module main --first-only --create-ivy-entry-points --tsconfig \"./src/tsconfig.app.json\"" "postinstall": "ngcc --properties es2015 es5 browser module main --first-only --create-ivy-entry-points --tsconfig \"./src/tsconfig.app.json\""
}, },
"dependencies": { "dependencies": {
"@angular/animations": "^12.2.16", "@angular/animations": "^13.4.0",
"@angular/cdk": "12.1.0", "@angular/cdk": "13.3.9",
"@angular/common": "^12.2.16", "@angular/common": "^13.4.0",
"@angular/compiler": "^12.2.16", "@angular/compiler": "^13.4.0",
"@angular/core": "^12.2.16", "@angular/core": "^13.4.0",
"@angular/forms": "^12.2.16", "@angular/forms": "^13.4.0",
"@angular/google-maps": "^12.2.13", "@angular/google-maps": "^12.2.13",
"@angular/platform-browser": "^12.2.16", "@angular/platform-browser": "^13.4.0",
"@angular/platform-browser-dynamic": "^12.2.16", "@angular/platform-browser-dynamic": "^13.4.0",
"@angular/router": "^12.2.16", "@angular/router": "^13.4.0",
"@asymmetrik/ngx-leaflet": "3.0.1", "@asymmetrik/ngx-leaflet": "3.0.1",
"@microsoft/signalr": "^6.0.8", "@microsoft/signalr": "^6.0.8",
"@nebular/auth": "8.0.0", "@nebular/auth": "9.0.3",
"@nebular/date-fns": "^9.0.3", "@nebular/date-fns": "^9.0.3",
"@nebular/eva-icons": "8.0.0", "@nebular/eva-icons": "9.0.3",
"@nebular/security": "8.0.0", "@nebular/security": "9.0.3",
"@nebular/theme": "8.0.0", "@nebular/theme": "9.0.3",
"angular2-chartjs": "0.4.1", "angular2-chartjs": "0.4.1",
"angular2-qrcode": "^2.0.3", "angular2-qrcode": "^2.0.3",
"bootstrap": "4.3.1", "bootstrap": "4.3.1",
"chart.js": "2.7.1", "chart.js": "2.7.1",
"ckeditor": "4.7.3", "ckeditor": "4.7.3",
"classlist.js": "1.1.20150312", "core-js": "2.5.1",
"core-js": "2.5.1", "echarts": "^4.9.0",
"echarts": "^4.9.0", "eva-icons": "^1.1.3",
"eva-icons": "^1.1.3", "file-saver": "^2.0.5",
"file-saver": "^2.0.5", "intl": "1.2.5",
"intl": "1.2.5", "ionicons": "2.0.1",
"ionicons": "2.0.1", "leaflet": "1.2.0",
"leaflet": "1.2.0", "nebular-icons": "1.1.0",
"nebular-icons": "1.1.0", "ng-in-viewport": "^13.0.1",
"ng-in-viewport": "^13.0.1", "ng2-ckeditor": "~1.2.9",
"ng2-ckeditor": "~1.2.9", "ng2-completer": "^9.0.1",
"ng2-completer": "^9.0.1", "ngx-echarts": "^4.2.2",
"ngx-echarts": "^4.2.2", "ngx-infinite-scroll": "^13.0.2",
"ngx-infinite-scroll": "^13.0.2", "ngx-mask": "^12.0.0",
"ngx-mask": "^12.0.0", "node-sass": "^4.14.1",
"node-sass": "^4.14.1", "normalize.css": "6.0.0",
"normalize.css": "6.0.0", "pace-js": "1.0.2",
"pace-js": "1.0.2", "roboto-fontface": "0.8.0",
"roboto-fontface": "0.8.0", "rxjs": "6.6.2",
"rxjs": "6.6.2", "rxjs-compat": "6.3.0",
"rxjs-compat": "6.3.0", "socicon": "3.0.5",
"socicon": "3.0.5", "style-loader": "^1.3.0",
"style-loader": "^1.3.0", "tinymce": "4.5.7",
"tinymce": "4.5.7", "tslib": "^2.3.1",
"tslib": "^2.3.1", "typeface-exo": "0.0.22",
"typeface-exo": "0.0.22", "typeit": "^8.7.0",
"typeit": "^8.7.0", "zone.js": "~0.11.4"
"web-animations-js": "^2.3.2", },
"zone.js": "~0.11.4" "devDependencies": {
}, "@angular-devkit/build-angular": "^13.3.11",
"devDependencies": { "@angular/cli": "^13.3.11",
"@angular-devkit/build-angular": "^12.1.4", "@angular/compiler-cli": "^13.4.0",
"@angular/cli": "^12.2.17", "@angular/language-service": "13.4.0",
"@angular/compiler-cli": "^12.2.16", "@compodoc/compodoc": "1.0.1",
"@angular/language-service": "12.1.0", "@fortawesome/fontawesome-free": "^5.2.0",
"@compodoc/compodoc": "1.0.1", "@schematics/angular": "^14.1.3",
"@fortawesome/fontawesome-free": "^5.2.0", "@types/d3-color": "1.0.5",
"@schematics/angular": "^14.1.3", "@types/jasmine": "~3.3.0",
"@types/d3-color": "1.0.5", "@types/jasminewd2": "2.0.3",
"@types/jasmine": "~3.3.0", "@types/leaflet": "1.2.3",
"@types/jasminewd2": "2.0.3", "@types/node": "^12.12.70",
"@types/leaflet": "1.2.3", "codelyzer": "^6.0.2",
"@types/node": "^12.12.70", "conventional-changelog-cli": "1.3.4",
"codelyzer": "^6.0.2", "husky": "0.13.3",
"conventional-changelog-cli": "1.3.4", "jasmine-core": "~3.6.0",
"husky": "0.13.3", "jasmine-spec-reporter": "~5.0.0",
"jasmine-core": "~3.6.0", "karma": "~6.3.19",
"jasmine-spec-reporter": "~5.0.0", "karma-chrome-launcher": "~3.1.1",
"karma": "~6.3.19", "karma-cli": "1.0.1",
"karma-chrome-launcher": "~3.1.1", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-cli": "1.0.1", "karma-jasmine": "~4.0.2",
"karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine-html-reporter": "^1.7.0",
"karma-jasmine": "~4.0.2", "npm-run-all": "4.0.2",
"karma-jasmine-html-reporter": "^1.7.0", "protractor": "~7.0.0",
"npm-run-all": "4.0.2", "rimraf": "2.6.1",
"protractor": "~7.0.0", "stylelint": "7.13.0",
"rimraf": "2.6.1", "ts-node": "3.2.2",
"stylelint": "7.13.0", "typescript": "~4.6.4"
"ts-node": "3.2.2", }
"typescript": "~4.2.3||~4.3.0"
}
} }

View File

@ -8,15 +8,12 @@ import { ContextMenuModule } from '../../ui/context-menu/context-menu.module';
const components = [RightClickMenuDirective,]; const components = [RightClickMenuDirective,];
@NgModule({ @NgModule({
declarations: [...components], declarations: [...components],
entryComponents: [ imports: [
ContextMenuComponent CommonModule,
], NbDialogModule,
imports: [ ContextMenuModule
CommonModule, ],
NbDialogModule, exports: [...components]
ContextMenuModule
],
exports: [...components],
}) })
export class RightClickMenuModule { } export class RightClickMenuModule { }

View File

@ -2,10 +2,9 @@ import { Component } from '@angular/core';
import { CalendarKitMonthCellComponent } from './month-cell/month-cell.component'; import { CalendarKitMonthCellComponent } from './month-cell/month-cell.component';
@Component({ @Component({
selector: 'ngx-calendar-kit', selector: 'ngx-calendar-kit',
templateUrl: 'calendar-kit.component.html', templateUrl: 'calendar-kit.component.html',
styleUrls: ['calendar-kit.component.scss'], styleUrls: ['calendar-kit.component.scss']
entryComponents: [CalendarKitMonthCellComponent],
}) })
export class CalendarKitFullCalendarShowcaseComponent { export class CalendarKitFullCalendarShowcaseComponent {
month = new Date(); month = new Date();

View File

@ -3,10 +3,9 @@ import { NbCalendarRange, NbDateService } from '@nebular/theme';
import { DayCellComponent } from './day-cell/day-cell.component'; import { DayCellComponent } from './day-cell/day-cell.component';
@Component({ @Component({
selector: 'ngx-calendar', selector: 'ngx-calendar',
templateUrl: 'calendar.component.html', templateUrl: 'calendar.component.html',
styleUrls: ['calendar.component.scss'], styleUrls: ['calendar.component.scss']
entryComponents: [DayCellComponent],
}) })
export class CalendarComponent { export class CalendarComponent {

View File

@ -77,18 +77,15 @@ const SERVICES = [
]; ];
@NgModule({ @NgModule({
imports: [ imports: [
...MODULES, ...MODULES,
], ],
declarations: [ declarations: [
...COMPONENTS, ...COMPONENTS,
], ],
providers: [ providers: [
...SERVICES, ...SERVICES,
], ]
entryComponents: [
...ENTRY_COMPONENTS,
],
}) })
export class ModalOverlaysModule { export class ModalOverlaysModule {
} }

View File

@ -7,26 +7,23 @@ import { InitFocusModule } from '../../directives/init-focus/init-focus.module';
import { AlertDlgComponent } from './alert-dlg.component'; import { AlertDlgComponent } from './alert-dlg.component';
import { DropDownListModule } from '../drop-down-list/drop-down-list.module'; import { DropDownListModule } from '../drop-down-list/drop-down-list.module';
@NgModule({ @NgModule({
declarations: [AlertDlgComponent], declarations: [AlertDlgComponent],
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
NbInputModule, NbInputModule,
NbCardModule, NbCardModule,
NbButtonModule, NbButtonModule,
NbIconModule, NbIconModule,
NbTooltipModule, NbTooltipModule,
NbProgressBarModule, NbProgressBarModule,
MaskDirectiveModule, MaskDirectiveModule,
InitFocusModule, InitFocusModule,
DropDownListModule DropDownListModule
], ],
exports: [ exports: [
AlertDlgComponent AlertDlgComponent
], ]
entryComponents: [
AlertDlgComponent,
]
} }
) )
export class AlertDlgModule { } export class AlertDlgModule { }

View File

@ -7,25 +7,23 @@ import { CalendarViewComponent } from './calendar-view/calendar-view.component';
import { RegexValidatorModule } from '../../directives/regex-validator/regex-validator.module'; import { RegexValidatorModule } from '../../directives/regex-validator/regex-validator.module';
@NgModule({ @NgModule({
declarations: [DateInputComponent, CalendarViewComponent], declarations: [DateInputComponent, CalendarViewComponent],
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
NbInputModule, NbInputModule,
NbDatepickerModule, NbDatepickerModule,
NbIconModule,
NbIconModule, NbButtonModule,
NbButtonModule, RegexValidatorModule,
RegexValidatorModule, NbIconModule,
NbIconModule, NbButtonModule,
NbButtonModule, NbCardModule,
NbCardModule, NbCalendarKitModule,
NbCalendarKitModule, NbTooltipModule,
NbTooltipModule, ],
], exports: [
exports: [ DateInputComponent
DateInputComponent ]
],
entryComponents: [CalendarViewComponent]
}) })
export class DateInputModule { } export class DateInputModule { }

View File

@ -7,27 +7,24 @@ import { DropDownMenuComponent } from './drop-down-menu/drop-down-menu.component
@NgModule({ @NgModule({
declarations: [ declarations: [
DropDownListComponent, DropDownListComponent,
DropDownMenuComponent, DropDownMenuComponent,
], ],
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
NbInputModule, NbInputModule,
NbSelectModule, NbSelectModule,
NbMenuModule, NbMenuModule,
NbContextMenuModule, NbContextMenuModule,
NbButtonModule, NbButtonModule,
NbIconModule, NbIconModule,
NbCardModule, NbCardModule,
NbTooltipModule, NbTooltipModule,
], ],
exports: [ exports: [
DropDownListComponent, DropDownListComponent,
], ]
entryComponents: [
DropDownMenuComponent
]
}) })
export class DropDownListModule { } export class DropDownListModule { }

View File

@ -33,35 +33,30 @@ const components = [
] ]
@NgModule({ @NgModule({
declarations: [...components, MultiRecordPickerDlgComponent], declarations: [...components, MultiRecordPickerDlgComponent],
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
NbButtonModule, NbButtonModule,
NbCalendarRangeModule, NbCalendarRangeModule,
NbCardModule, NbCardModule,
NbCheckboxModule, NbCheckboxModule,
NbDatepickerModule, NbDatepickerModule,
NbDialogModule, NbDialogModule,
NbIconModule, NbIconModule,
NbInputModule, NbInputModule,
NbSelectModule, NbSelectModule,
NbTooltipModule, NbTooltipModule,
NbAlertModule, NbAlertModule,
NbSpinnerModule, NbSpinnerModule,
CurrencyInputModule, CurrencyInputModule,
DragDropModule, DragDropModule,
DropDownListModule, DropDownListModule,
PagerModule, PagerModule,
RightClickMenuModule, RightClickMenuModule,
InitFocusModule, InitFocusModule,
InfiniteScrollModule InfiniteScrollModule
], ],
exports: [...components], exports: [...components]
entryComponents: [
FancyTableEditorComponent,
ConfirmDialogComponent,
],
}) })
export class FancyTableModule { } export class FancyTableModule { }

View File

@ -3,11 +3,10 @@ import { CommonModule } from '@angular/common';
import { PopoverMsgComponent } from './popover-msg.component'; import { PopoverMsgComponent } from './popover-msg.component';
@NgModule({ @NgModule({
declarations: [PopoverMsgComponent], declarations: [PopoverMsgComponent],
imports: [ imports: [
CommonModule CommonModule
], ],
exports: [PopoverMsgComponent], exports: [PopoverMsgComponent]
entryComponents: [PopoverMsgComponent]
}) })
export class PopoverMsgModule { } export class PopoverMsgModule { }

View File

@ -16,14 +16,7 @@
/*************************************************************************************************** /***************************************************************************************************
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */ // Run `npm install --save classlist.js`. // Run `npm install --save web-animations-js`.
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import 'classlist.js'; // Run `npm install --save classlist.js`.
/** IE10 and IE11 requires the following to support `@angular/animation`. */
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** Evergreen browsers require these. **/ /** Evergreen browsers require these. **/
@ -31,10 +24,6 @@ import 'core-js/es6/reflect';
import 'core-js/es7/reflect'; import 'core-js/es7/reflect';
/** ALL Firefox browsers require the following to support `@angular/animation`. **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/*************************************************************************************************** /***************************************************************************************************
* Zone JS is required by Angular itself. * Zone JS is required by Angular itself.
*/ */

View File

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