Browse Source

nx and ng 13 update

pull/11262/head
muhammedaltug 5 years ago
parent
commit
4a8449410d
  1. 1
      npm/ng-packs/.gitignore
  2. 3
      npm/ng-packs/apps/dev-app/jest.config.js
  3. 12
      npm/ng-packs/apps/dev-app/src/polyfills.ts
  4. 11
      npm/ng-packs/apps/dev-app/src/test-setup.ts
  5. 132
      npm/ng-packs/migrations.json
  6. 3
      npm/ng-packs/nx.json
  7. 72
      npm/ng-packs/package.json
  8. 3
      npm/ng-packs/packages/account-core/jest.config.js
  9. 11
      npm/ng-packs/packages/account-core/src/test-setup.ts
  10. 4
      npm/ng-packs/packages/account-core/tsconfig.lib.prod.json
  11. 3
      npm/ng-packs/packages/account/jest.config.js
  12. 5
      npm/ng-packs/packages/account/ng-package.json
  13. 11
      npm/ng-packs/packages/account/src/test-setup.ts
  14. 4
      npm/ng-packs/packages/account/tsconfig.lib.prod.json
  15. 3
      npm/ng-packs/packages/components/jest.config.js
  16. 5
      npm/ng-packs/packages/components/ng-package.json
  17. 2
      npm/ng-packs/packages/components/package.json
  18. 10
      npm/ng-packs/packages/components/src/test-setup.ts
  19. 4
      npm/ng-packs/packages/components/tsconfig.lib.prod.json
  20. 3
      npm/ng-packs/packages/core/jest.config.js
  21. 14
      npm/ng-packs/packages/core/locale/src/utils/register-locale.ts
  22. 2
      npm/ng-packs/packages/core/package.json
  23. 101
      npm/ng-packs/packages/core/src/lib/core.module.ts
  24. 11
      npm/ng-packs/packages/core/src/test-setup.ts
  25. 6
      npm/ng-packs/packages/core/tsconfig.lib.prod.json
  26. 3
      npm/ng-packs/packages/feature-management/jest.config.js
  27. 4
      npm/ng-packs/packages/feature-management/ng-package.json
  28. 11
      npm/ng-packs/packages/feature-management/src/test-setup.ts
  29. 4
      npm/ng-packs/packages/feature-management/tsconfig.lib.prod.json
  30. 3
      npm/ng-packs/packages/identity/jest.config.js
  31. 11
      npm/ng-packs/packages/identity/src/test-setup.ts
  32. 4
      npm/ng-packs/packages/identity/tsconfig.lib.prod.json
  33. 3
      npm/ng-packs/packages/permission-management/jest.config.js
  34. 4
      npm/ng-packs/packages/permission-management/ng-package.json
  35. 11
      npm/ng-packs/packages/permission-management/src/test-setup.ts
  36. 4
      npm/ng-packs/packages/permission-management/tsconfig.lib.prod.json
  37. 3
      npm/ng-packs/packages/schematics/jest.config.js
  38. 11
      npm/ng-packs/packages/schematics/src/test-setup.ts
  39. 3
      npm/ng-packs/packages/setting-management/jest.config.js
  40. 5
      npm/ng-packs/packages/setting-management/ng-package.json
  41. 11
      npm/ng-packs/packages/setting-management/src/test-setup.ts
  42. 4
      npm/ng-packs/packages/setting-management/tsconfig.lib.prod.json
  43. 3
      npm/ng-packs/packages/tenant-management/jest.config.js
  44. 11
      npm/ng-packs/packages/tenant-management/src/test-setup.ts
  45. 4
      npm/ng-packs/packages/tenant-management/tsconfig.lib.prod.json
  46. 3
      npm/ng-packs/packages/theme-basic/jest.config.js
  47. 5
      npm/ng-packs/packages/theme-basic/ng-package.json
  48. 59
      npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts
  49. 11
      npm/ng-packs/packages/theme-basic/src/test-setup.ts
  50. 4
      npm/ng-packs/packages/theme-basic/tsconfig.lib.prod.json
  51. 3
      npm/ng-packs/packages/theme-shared/jest.config.js
  52. 3
      npm/ng-packs/packages/theme-shared/ng-package.json
  53. 3
      npm/ng-packs/packages/theme-shared/package.json
  54. 26
      npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts
  55. 10
      npm/ng-packs/packages/theme-shared/src/test-setup.ts
  56. 4
      npm/ng-packs/packages/theme-shared/tsconfig.lib.prod.json

1
npm/ng-packs/.gitignore

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

3
npm/ng-packs/apps/dev-app/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/apps/dev-app', coverageDirectory: '../../coverage/apps/dev-app',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

12
npm/ng-packs/apps/dev-app/src/polyfills.ts

@ -18,18 +18,6 @@
* BROWSER POLYFILLS * BROWSER POLYFILLS
*/ */
/**
* IE11 requires the following for NgClass support on SVG elements
*/
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/** /**
* By default, zone.js will patch all possible macroTask and DomEvents * By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags * user can disable parts of macroTask/DomEvents patch by setting following flags

11
npm/ng-packs/apps/dev-app/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

132
npm/ng-packs/migrations.json

@ -1,60 +1,132 @@
{ {
"migrations": [ "migrations": [
{ {
"version": "13.0.0-beta.1", "version": "13.2.0",
"description": "Add default base to nx.json if its not currently set", "description": "Set --parallel=1 for existing repos to preserve the existing behavior",
"factory": "./src/migrations/update-13-0-0/set-default-base-if-not-set",
"cli": "nx", "cli": "nx",
"implementation": "./src/migrations/update-13-2-0/set-parallel-default",
"package": "@nrwl/workspace", "package": "@nrwl/workspace",
"name": "set-default-base-if-not-set" "name": "set-parallel-default"
}, },
{ {
"version": "13.0.0-beta.4", "version": "13.3.0-beta.0",
"description": "Move global settings into nx.json, and project specific settings into workspace.json", "description": "@nrwl/workspace:tsc is now @nrwl/js:tsc",
"cli": "nx", "cli": "nx",
"implementation": "./src/migrations/update-13-0-0/config-locations/config-locations", "implementation": "./src/migrations/update-13-3-0/update-tsc-executor-location",
"package": "@nrwl/workspace", "package": "@nrwl/workspace",
"name": "13-0-0-config-locations" "name": "13-3-0-tsc-location"
}, },
{ {
"cli": "nx", "cli": "nx",
"version": "12.9.0", "version": "13.2.0-beta.1",
"description": "Fixes invalid importPaths for buildable and publishable libs.", "description": "Remove deprecated options from webpack-server and webpack-browser.",
"factory": "./src/migrations/update-12-9-0/update-invalid-import-paths", "factory": "./src/migrations/update-13-2-0/update-angular-config",
"package": "@nrwl/angular", "package": "@nrwl/angular",
"name": "update-invalid-import-paths" "name": "update-angular-config"
}, },
{ {
"cli": "nx", "cli": "nx",
"version": "13.0.0-beta.10", "version": "13.2.0-beta.1",
"description": "Adds postcss packages needed for Tailwind support if ng-packagr is already installed.", "description": "Remove enableIvy and add compilationMode to library tsconfig and remove deprecated ng-packagr options.",
"factory": "./src/migrations/update-13-0-0/add-postcss-packages", "factory": "./src/migrations/update-13-2-0/update-libraries",
"package": "@nrwl/angular", "package": "@nrwl/angular",
"name": "add-postcss-packages" "name": "update-libraries"
}, },
{ {
"cli": "nx", "cli": "nx",
"version": "12.8.0-beta.0", "version": "13.2.0-beta.1",
"description": "Remove Typescript Preprocessor Plugin", "description": "Update jest config to support jest-preset-angular",
"factory": "./src/migrations/update-12-8-0/remove-typescript-plugin", "factory": "./src/migrations/update-13-2-0/update-angular-jest-config",
"package": "@nrwl/cypress", "package": "@nrwl/angular",
"name": "remove-typescript-plugin" "name": "update-angular-jest-config"
}, },
{ {
"cli": "nx", "cli": "nx",
"version": "12.9.0-beta.0", "version": "13.2.0-beta.1",
"description": "Add outputs for caching", "description": "Move some imports from @nrwl/angular/testing to jasmine-marbles",
"factory": "./src/migrations/update-12-9-0/add-outputs", "factory": "./src/migrations/update-13-2-0/update-testing-imports",
"package": "@nrwl/linter", "package": "@nrwl/angular",
"name": "add-outputs" "name": "update-testing-imports"
},
{
"cli": "nx",
"version": "13.2.0",
"description": "In Angular version 13, the `teardown` flag in `TestBed` will be enabled by default. This migration automatically opts out existing apps from the new teardown behavior.",
"factory": "./src/migrations/update-13-2-0/opt-out-testbed-teardown",
"package": "@nrwl/angular",
"name": "opt-out-testbed-teardown"
},
{
"cli": "nx",
"version": "13.3.0-beta.0",
"description": "In Angular version 13, the ESM became a first class citizen. This means the webpack config generated must be modified to support modules.",
"factory": "./src/migrations/update-13-3-0/update-mfe-webpack-config",
"package": "@nrwl/angular",
"name": "update-mfe-config-to-module-syntax"
},
{
"version": "13.0.0",
"factory": "./update-13/schematic-options",
"description": "Remove no longer valid Angular schematic options from `angular.json`.",
"package": "@angular/cli",
"name": "schematic-options-13"
},
{
"version": "13.0.0",
"factory": "./update-13/update-angular-config",
"description": "Remove deprecated options from 'angular.json' that are no longer present in v13.",
"package": "@angular/cli",
"name": "update-angular-config-v13"
},
{
"version": "13.0.0",
"factory": "./update-13/update-libraries",
"description": "Update library projects to be published in partial mode and removed deprecated options from ng-packagr configuration.",
"package": "@angular/cli",
"name": "update-libraries-v13"
},
{
"version": "13.0.0",
"factory": "./update-13/drop-ie-polyfills",
"description": "Remove polyfills required only for Internet Explorer which is no longer supported.",
"package": "@angular/cli",
"name": "drop-ie-polyfills"
},
{
"version": "13.0.0",
"factory": "./update-13/update-gitignore",
"description": "Updating '.gitignore' to include '.angular/cache'.",
"package": "@angular/cli",
"name": "update-gitignore"
},
{
"version": "13.0.0-beta",
"description": "Migrates `[routerLink]=\"\"` in templates to `[routerLink]=\"[]\"` because these links are likely intended to route to the current page with updated fragment/query params.",
"factory": "./migrations/router-link-empty-expression/index",
"package": "@angular/core",
"name": "migration-v13-router-link-empty-expression"
},
{
"version": "13.0.0-beta",
"description": "In Angular version 13, the `teardown` flag in `TestBed` will be enabled by default. This migration automatically opts out existing apps from the new teardown behavior.",
"factory": "./migrations/testbed-teardown/index",
"package": "@angular/core",
"name": "migration-v13-testbed-teardown"
},
{
"version": "13.1.0-beta",
"description": "As of Angular version 13, `entryComponents` are no longer necessary.",
"factory": "./migrations/entry-components/index",
"package": "@angular/core",
"name": "migration-v13.1-entry-components"
}, },
{ {
"cli": "nx", "cli": "nx",
"version": "12.9.0-beta.0", "version": "13.3.0-beta.0",
"description": "Remove ESLint parserOptions.project config if no rules requiring type-checking are in use", "description": "Update eslint-rules jest.config.js in order to support ESLint v8 exports mapping, remove category field",
"factory": "./src/migrations/update-12-4-0/remove-eslint-project-config-if-no-type-checking-rules", "factory": "./src/migrations/update-13-3-0/eslint-8-updates",
"package": "@nrwl/linter", "package": "@nrwl/linter",
"name": "remove-eslint-project-config-if-no-type-checking-rules-again" "name": "eslint-8-updates"
} }
] ]
} }

3
npm/ng-packs/nx.json

@ -14,7 +14,8 @@
"default": { "default": {
"runner": "@nrwl/workspace/tasks-runners/default", "runner": "@nrwl/workspace/tasks-runners/default",
"options": { "options": {
"cacheableOperations": ["build", "lint", "test", "e2e"] "cacheableOperations": ["build", "lint", "test", "e2e"],
"parallel": 3
} }
} }
}, },

72
npm/ng-packs/package.json

@ -38,24 +38,24 @@
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@abp/utils": "~5.0.1", "@abp/utils": "~5.0.1",
"@angular-devkit/build-angular": "12.2.13", "@angular-devkit/build-angular": "13.1.2",
"@angular-devkit/build-ng-packagr": "^0.1002.0", "@angular-devkit/build-ng-packagr": "^0.1002.0",
"@angular-devkit/schematics-cli": "~12.2.0", "@angular-devkit/schematics-cli": "~12.2.0",
"@angular-eslint/eslint-plugin": "~12.3.0", "@angular-eslint/eslint-plugin": "13.0.1",
"@angular-eslint/eslint-plugin-template": "~12.3.0", "@angular-eslint/eslint-plugin-template": "13.0.1",
"@angular-eslint/template-parser": "~12.3.0", "@angular-eslint/template-parser": "13.0.1",
"@angular/animations": "12.2.13", "@angular/animations": "13.1.1",
"@angular/cli": "12.2.13", "@angular/cli": "13.1.2",
"@angular/common": "12.2.13", "@angular/common": "13.1.1",
"@angular/compiler": "12.2.13", "@angular/compiler": "13.1.1",
"@angular/compiler-cli": "12.2.13", "@angular/compiler-cli": "13.1.1",
"@angular/core": "12.2.13", "@angular/core": "13.1.1",
"@angular/forms": "12.2.13", "@angular/forms": "13.1.1",
"@angular/language-service": "12.2.13", "@angular/language-service": "13.1.1",
"@angular/localize": "12.2.13", "@angular/localize": "13.1.1",
"@angular/platform-browser": "12.2.13", "@angular/platform-browser": "13.1.1",
"@angular/platform-browser-dynamic": "12.2.13", "@angular/platform-browser-dynamic": "13.1.1",
"@angular/router": "12.2.13", "@angular/router": "13.1.1",
"@abp/ng.account": "~5.0.1", "@abp/ng.account": "~5.0.1",
"@abp/ng.account.core": "~5.0.1", "@abp/ng.account.core": "~5.0.1",
"@abp/ng.core": "~5.0.1", "@abp/ng.core": "~5.0.1",
@ -68,41 +68,42 @@
"@abp/ng.theme.basic": "~5.0.1", "@abp/ng.theme.basic": "~5.0.1",
"@abp/ng.theme.shared": "~5.0.1", "@abp/ng.theme.shared": "~5.0.1",
"@fortawesome/fontawesome-free": "^5.15.4", "@fortawesome/fontawesome-free": "^5.15.4",
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.2", "@ng-bootstrap/ng-bootstrap": "~12.0.0-beta.4",
"@ngneat/spectator": "^8.0.3", "@ngneat/spectator": "^8.0.3",
"@ngx-validate/core": "^0.1.1", "@ngx-validate/core": "^0.1.1",
"@nrwl/angular": "13.1.3", "@nrwl/angular": "13.4.3",
"@nrwl/cli": "13.1.3", "@nrwl/cli": "13.4.3",
"@nrwl/cypress": "13.1.3", "@nrwl/cypress": "13.4.3",
"@nrwl/eslint-plugin-nx": "13.1.3", "@nrwl/eslint-plugin-nx": "13.4.3",
"@nrwl/jest": "13.1.3", "@nrwl/jest": "13.4.3",
"@nrwl/linter": "13.1.3", "@nrwl/linter": "13.4.3",
"@nrwl/tao": "13.1.3", "@nrwl/tao": "13.4.3",
"@nrwl/workspace": "13.1.3", "@nrwl/workspace": "13.4.3",
"@schematics/angular": "~12.2.0", "@schematics/angular": "~12.2.0",
"@swimlane/ngx-datatable": "^19.0.0", "@swimlane/ngx-datatable": "^19.0.0",
"@types/jest": "27.0.2", "@types/jest": "27.0.2",
"@types/node": "14.14.33", "@types/node": "14.14.33",
"@typescript-eslint/eslint-plugin": "4.33.0", "@typescript-eslint/eslint-plugin": "5.3.1",
"@typescript-eslint/parser": "4.33.0", "@typescript-eslint/parser": "5.3.1",
"angular-oauth2-oidc": "^12.1.0", "angular-oauth2-oidc": "^13.0.1",
"bootstrap": "^5.1.1", "bootstrap": "^5.1.1",
"chart.js": "^3.5.1", "chart.js": "^3.5.1",
"cypress": "^7.3.0", "cypress": "^7.3.0",
"dotenv": "10.0.0", "dotenv": "10.0.0",
"eslint": "7.32.0", "eslint": "8.2.0",
"eslint-config-prettier": "8.1.0", "eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "^2.10.3", "eslint-plugin-cypress": "^2.10.3",
"got": "^11.5.2", "got": "^11.5.2",
"jest": "27.2.3", "jest": "27.2.3",
"jest-canvas-mock": "^2.3.1", "jest-canvas-mock": "^2.3.1",
"jest-preset-angular": "10.0.1", "jest-preset-angular": "11.0.0",
"jsonc-parser": "^2.3.0", "jsonc-parser": "^2.3.0",
"just-clone": "^3.2.1", "just-clone": "^3.2.1",
"just-compare": "^1.4.0", "just-compare": "^1.4.0",
"lerna": "^4.0.0", "lerna": "^4.0.0",
"ng-packagr": "12.2.5", "ng-packagr": "13.1.2",
"ng-zorro-antd": "^12.0.1", "ng-zorro-antd": "^13.0.0",
"@popperjs/core": "~2.11.2",
"postcss": "^8.3.9", "postcss": "^8.3.9",
"postcss-import": "^14.0.2", "postcss-import": "^14.0.2",
"postcss-preset-env": "^6.7.0", "postcss-preset-env": "^6.7.0",
@ -117,10 +118,7 @@
"tsickle": "^0.39.1", "tsickle": "^0.39.1",
"tslib": "^2.0.0", "tslib": "^2.0.0",
"tslint": "~6.1.0", "tslint": "~6.1.0",
"typescript": "4.3.5", "typescript": "4.5.4",
"zone.js": "~0.11.4" "zone.js": "0.11.4"
},
"resolutions": {
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.2"
} }
} }

3
npm/ng-packs/packages/account-core/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/account-core', coverageDirectory: '../../coverage/packages/account-core',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

11
npm/ng-packs/packages/account-core/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/account-core/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/account/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/account', coverageDirectory: '../../coverage/packages/account',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

5
npm/ng-packs/packages/account/ng-package.json

@ -4,5 +4,8 @@
"lib": { "lib": {
"entryFile": "src/public-api.ts" "entryFile": "src/public-api.ts"
}, },
"allowedNonPeerDependencies": ["@abp/ng.theme.shared", "@abp/ng.account.core"] "allowedNonPeerDependencies": [
"@abp/ng.theme.shared",
"@abp/ng.account.core"
]
} }

11
npm/ng-packs/packages/account/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/account/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/components/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/components', coverageDirectory: '../../coverage/packages/components',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

5
npm/ng-packs/packages/components/ng-package.json

@ -4,5 +4,8 @@
"lib": { "lib": {
"entryFile": "src/public-api.ts" "entryFile": "src/public-api.ts"
}, },
"allowedNonPeerDependencies": ["ng-zorro-antd", "chart.js"] "allowedNonPeerDependencies": [
"ng-zorro-antd",
"chart.js"
]
} }

2
npm/ng-packs/packages/components/package.json

@ -13,7 +13,7 @@
}, },
"dependencies": { "dependencies": {
"chart.js": "^3.5.1", "chart.js": "^3.5.1",
"ng-zorro-antd": "^12.0.1", "ng-zorro-antd": "^13.0.0",
"tslib": "^2.0.0" "tslib": "^2.0.0"
}, },
"publishConfig": { "publishConfig": {

10
npm/ng-packs/packages/components/src/test-setup.ts

@ -1,3 +1,13 @@
import 'jest-canvas-mock'; import 'jest-canvas-mock';
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/components/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/core/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/core', coverageDirectory: '../../coverage/packages/core',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

14
npm/ng-packs/packages/core/locale/src/utils/register-locale.ts

@ -23,16 +23,22 @@ export function registerLocale(
) { ) {
return (locale: string): Promise<any> => { return (locale: string): Promise<any> => {
localeMap = { ...differentLocales, ...cultureNameLocaleFileMap }; localeMap = { ...differentLocales, ...cultureNameLocaleFileMap };
const localePath = `/locales/${localeMap[locale] || locale}`;
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
return import( return import(
/* webpackMode: "lazy-once" */ /* webpackMode: "lazy-once" */
/* webpackChunkName: "locales"*/ /* webpackChunkName: "locales"*/
/* webpackInclude: /[/\\](ar|cs|en|en-GB|es|de|fi|fr|hi|hu|is|it|pt|tr|ru|ro|sk|sl|zh-Hans|zh-Hant).js/ */ /* webpackInclude: /[/\\](ar|cs|en|en-GB|es|de|fi|fr|hi|hu|is|it|pt|tr|ru|ro|sk|sl|zh-Hans|zh-Hant)\.(mjs|js)$/ */
/* webpackExclude: /[/\\]global|extra/ */ /* webpackExclude: /[/\\]global|extra/ */
`@angular/common/locales/${localeMap[locale] || locale}.js` `@angular/common${localePath}`
) )
.then(resolve) .then(val => {
let module = val;
while (module.default) {
module = module.default;
}
resolve({ default: module });
})
.catch(error => { .catch(error => {
errorHandlerFn({ errorHandlerFn({
resolve, resolve,

2
npm/ng-packs/packages/core/package.json

@ -8,7 +8,7 @@
}, },
"dependencies": { "dependencies": {
"@abp/utils": "~5.0.1", "@abp/utils": "~5.0.1",
"angular-oauth2-oidc": "^12.1.0", "angular-oauth2-oidc": "^13.0.1",
"just-clone": "^3.2.1", "just-clone": "^3.2.1",
"just-compare": "^1.4.0", "just-compare": "^1.4.0",
"ts-toolbelt": "6.15.4", "ts-toolbelt": "6.15.4",

101
npm/ng-packs/packages/core/src/lib/core.module.ts

@ -46,59 +46,54 @@ export function storageFactory(): OAuthStorage {
* This module will be imported and exported by all others. * This module will be imported and exported by all others.
*/ */
@NgModule({ @NgModule({
exports: [ exports: [
CommonModule, CommonModule,
HttpClientModule, HttpClientModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule, RouterModule,
LocalizationModule, LocalizationModule,
AbstractNgModelComponent, AbstractNgModelComponent,
AutofocusDirective, AutofocusDirective,
DynamicLayoutComponent, DynamicLayoutComponent,
ForDirective, ForDirective,
FormSubmitDirective, FormSubmitDirective,
InitDirective, InitDirective,
InputEventDebounceDirective, InputEventDebounceDirective,
PermissionDirective, PermissionDirective,
ReplaceableRouteContainerComponent, ReplaceableRouteContainerComponent,
ReplaceableTemplateDirective, ReplaceableTemplateDirective,
RouterOutletComponent, RouterOutletComponent,
SortPipe, SortPipe,
StopPropagationDirective, StopPropagationDirective,
ToInjectorPipe, ToInjectorPipe,
], ],
imports: [ imports: [
OAuthModule, OAuthModule,
CommonModule, CommonModule,
HttpClientModule, HttpClientModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
RouterModule, RouterModule,
LocalizationModule, LocalizationModule,
], ],
declarations: [ declarations: [
AbstractNgModelComponent, AbstractNgModelComponent,
AutofocusDirective, AutofocusDirective,
DynamicLayoutComponent, DynamicLayoutComponent,
ForDirective, ForDirective,
FormSubmitDirective, FormSubmitDirective,
InitDirective, InitDirective,
InputEventDebounceDirective, InputEventDebounceDirective,
PermissionDirective, PermissionDirective,
ReplaceableRouteContainerComponent, ReplaceableRouteContainerComponent,
ReplaceableTemplateDirective, ReplaceableTemplateDirective,
RouterOutletComponent, RouterOutletComponent,
SortPipe, SortPipe,
StopPropagationDirective, StopPropagationDirective,
ToInjectorPipe, ToInjectorPipe,
], ],
providers: [LocalizationPipe], providers: [LocalizationPipe]
entryComponents: [
RouterOutletComponent,
DynamicLayoutComponent,
ReplaceableRouteContainerComponent,
],
}) })
export class BaseCoreModule {} export class BaseCoreModule {}

11
npm/ng-packs/packages/core/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

6
npm/ng-packs/packages/core/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false, "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/feature-management/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/feature-management', coverageDirectory: '../../coverage/packages/feature-management',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

4
npm/ng-packs/packages/feature-management/ng-package.json

@ -4,5 +4,7 @@
"lib": { "lib": {
"entryFile": "src/public-api.ts" "entryFile": "src/public-api.ts"
}, },
"allowedNonPeerDependencies": ["@abp/ng.theme.shared"] "allowedNonPeerDependencies": [
"@abp/ng.theme.shared"
]
} }

11
npm/ng-packs/packages/feature-management/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/feature-management/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/identity/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/identity', coverageDirectory: '../../coverage/packages/identity',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

11
npm/ng-packs/packages/identity/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/identity/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/permission-management/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/permission-management', coverageDirectory: '../../coverage/packages/permission-management',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

4
npm/ng-packs/packages/permission-management/ng-package.json

@ -4,5 +4,7 @@
"lib": { "lib": {
"entryFile": "src/public-api.ts" "entryFile": "src/public-api.ts"
}, },
"allowedNonPeerDependencies": ["@abp/ng.theme.shared"] "allowedNonPeerDependencies": [
"@abp/ng.theme.shared"
]
} }

11
npm/ng-packs/packages/permission-management/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/permission-management/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/schematics/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/schematics', coverageDirectory: '../../coverage/packages/schematics',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

11
npm/ng-packs/packages/schematics/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

3
npm/ng-packs/packages/setting-management/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/setting-management', coverageDirectory: '../../coverage/packages/setting-management',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

5
npm/ng-packs/packages/setting-management/ng-package.json

@ -4,5 +4,8 @@
"lib": { "lib": {
"entryFile": "src/public-api.ts" "entryFile": "src/public-api.ts"
}, },
"allowedNonPeerDependencies": ["@abp/ng.theme.shared", "@abp/ng.components"] "allowedNonPeerDependencies": [
"@abp/ng.theme.shared",
"@abp/ng.components"
]
} }

11
npm/ng-packs/packages/setting-management/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/setting-management/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/tenant-management/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/tenant-management', coverageDirectory: '../../coverage/packages/tenant-management',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

11
npm/ng-packs/packages/tenant-management/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/tenant-management/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/theme-basic/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/theme-basic', coverageDirectory: '../../coverage/packages/theme-basic',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

5
npm/ng-packs/packages/theme-basic/ng-package.json

@ -4,5 +4,8 @@
"lib": { "lib": {
"entryFile": "src/public-api.ts" "entryFile": "src/public-api.ts"
}, },
"allowedNonPeerDependencies": ["@abp/ng.theme.shared", "@abp/ng.account.core"] "allowedNonPeerDependencies": [
"@abp/ng.theme.shared",
"@abp/ng.account.core"
]
} }

59
npm/ng-packs/packages/theme-basic/src/lib/theme-basic.module.ts

@ -28,36 +28,35 @@ import { BASIC_THEME_USER_MENU_PROVIDERS } from './providers/user-menu.provider'
export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent]; export const LAYOUTS = [ApplicationLayoutComponent, AccountLayoutComponent, EmptyLayoutComponent];
@NgModule({ @NgModule({
declarations: [ declarations: [
...LAYOUTS, ...LAYOUTS,
ValidationErrorComponent, ValidationErrorComponent,
LogoComponent, LogoComponent,
NavItemsComponent, NavItemsComponent,
RoutesComponent, RoutesComponent,
CurrentUserComponent, CurrentUserComponent,
LanguagesComponent, LanguagesComponent,
PageAlertContainerComponent, PageAlertContainerComponent,
TenantBoxComponent, TenantBoxComponent,
AuthWrapperComponent, AuthWrapperComponent,
], ],
exports: [ exports: [
...LAYOUTS, ...LAYOUTS,
ValidationErrorComponent, ValidationErrorComponent,
LogoComponent, LogoComponent,
NavItemsComponent, NavItemsComponent,
RoutesComponent, RoutesComponent,
CurrentUserComponent, CurrentUserComponent,
LanguagesComponent, LanguagesComponent,
PageAlertContainerComponent, PageAlertContainerComponent,
], ],
imports: [ imports: [
CoreModule, CoreModule,
ThemeSharedModule, ThemeSharedModule,
NgbCollapseModule, NgbCollapseModule,
NgbDropdownModule, NgbDropdownModule,
NgxValidateCoreModule, NgxValidateCoreModule,
], ]
entryComponents: [...LAYOUTS, ValidationErrorComponent, CurrentUserComponent, LanguagesComponent],
}) })
export class BaseThemeBasicModule {} export class BaseThemeBasicModule {}

11
npm/ng-packs/packages/theme-basic/src/test-setup.ts

@ -1 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/theme-basic/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

3
npm/ng-packs/packages/theme-shared/jest.config.js

@ -10,8 +10,9 @@ module.exports = {
}, },
coverageDirectory: '../../coverage/packages/theme-shared', coverageDirectory: '../../coverage/packages/theme-shared',
transform: { transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular', '^.+.(ts|mjs|js|html)$': 'jest-preset-angular',
}, },
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes', 'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot', 'jest-preset-angular/build/serializers/ng-snapshot',

3
npm/ng-packs/packages/theme-shared/ng-package.json

@ -10,6 +10,7 @@
"@ng-bootstrap/ng-bootstrap", "@ng-bootstrap/ng-bootstrap",
"@ngx-validate/core", "@ngx-validate/core",
"@swimlane/ngx-datatable", "@swimlane/ngx-datatable",
"bootstrap" "bootstrap",
"@popperjs/core"
] ]
} }

3
npm/ng-packs/packages/theme-shared/package.json

@ -9,8 +9,9 @@
"dependencies": { "dependencies": {
"@abp/ng.core": "~5.0.1", "@abp/ng.core": "~5.0.1",
"@fortawesome/fontawesome-free": "^5.15.4", "@fortawesome/fontawesome-free": "^5.15.4",
"@ng-bootstrap/ng-bootstrap": "11.0.0-beta.2", "@ng-bootstrap/ng-bootstrap": "~12.0.0-beta.4",
"@ngx-validate/core": "^0.1.1", "@ngx-validate/core": "^0.1.1",
"@popperjs/core": "~2.11.2",
"@swimlane/ngx-datatable": "^19.0.0", "@swimlane/ngx-datatable": "^19.0.0",
"bootstrap": "^5.1.1", "bootstrap": "^5.1.1",
"tslib": "^2.0.0" "tslib": "^2.0.0"

26
npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts

@ -52,22 +52,16 @@ const declarationsWithExports = [
]; ];
@NgModule({ @NgModule({
imports: [ imports: [
CoreModule, CoreModule,
NgxDatatableModule, NgxDatatableModule,
NgxValidateCoreModule, NgxValidateCoreModule,
NgbPaginationModule, NgbPaginationModule,
EllipsisModule, EllipsisModule,
], ],
declarations: [...declarationsWithExports, HttpErrorWrapperComponent], declarations: [...declarationsWithExports, HttpErrorWrapperComponent],
exports: [NgxDatatableModule, EllipsisModule, ...declarationsWithExports], exports: [NgxDatatableModule, EllipsisModule, ...declarationsWithExports],
providers: [DatePipe], providers: [DatePipe]
entryComponents: [
HttpErrorWrapperComponent,
LoadingComponent,
ToastContainerComponent,
ConfirmationComponent,
],
}) })
export class BaseThemeSharedModule {} export class BaseThemeSharedModule {}

10
npm/ng-packs/packages/theme-shared/src/test-setup.ts

@ -1,2 +1,12 @@
import 'jest-preset-angular/setup-jest'; import 'jest-preset-angular/setup-jest';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
getTestBed().resetTestEnvironment();
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {
teardown: { destroyAfterEach: false },
});

4
npm/ng-packs/packages/theme-shared/tsconfig.lib.prod.json

@ -1,11 +1,9 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{ {
"extends": "./tsconfig.lib.json", "extends": "./tsconfig.lib.json",
"compilerOptions": { "compilerOptions": {
"declarationMap": false "declarationMap": false
}, },
"angularCompilerOptions": { "angularCompilerOptions": {
"compilationMode": "partial", "compilationMode": "partial"
"enableIvy": true
} }
} }

Loading…
Cancel
Save