Browse Source

move nx workspace to ng-packs folder

pull/9837/head
mehmet-erim 5 years ago
parent
commit
15b98cef79
  1. 2
      npm/ng-packs/.editorconfig
  2. 0
      npm/ng-packs/.eslintignore
  3. 0
      npm/ng-packs/.eslintrc.json
  4. 0
      npm/ng-packs/.prettierignore
  5. 3
      npm/ng-packs/.vscode/extensions.json
  6. 5
      npm/ng-packs/CONTRIBUTING.md
  7. 7
      npm/ng-packs/README.md
  8. 675
      npm/ng-packs/angular.json
  9. 0
      npm/ng-packs/apps/.gitkeep
  10. 0
      npm/ng-packs/apps/dev-app-e2e/.eslintrc.json
  11. 0
      npm/ng-packs/apps/dev-app-e2e/cypress.json
  12. 0
      npm/ng-packs/apps/dev-app-e2e/src/fixtures/example.json
  13. 0
      npm/ng-packs/apps/dev-app-e2e/src/integration/app.spec.ts
  14. 0
      npm/ng-packs/apps/dev-app-e2e/src/plugins/index.js
  15. 0
      npm/ng-packs/apps/dev-app-e2e/src/support/app.po.ts
  16. 0
      npm/ng-packs/apps/dev-app-e2e/src/support/commands.ts
  17. 0
      npm/ng-packs/apps/dev-app-e2e/src/support/index.ts
  18. 0
      npm/ng-packs/apps/dev-app-e2e/tsconfig.e2e.json
  19. 0
      npm/ng-packs/apps/dev-app-e2e/tsconfig.json
  20. 13
      npm/ng-packs/apps/dev-app/.browserslistrc
  21. 0
      npm/ng-packs/apps/dev-app/.eslintrc.json
  22. 0
      npm/ng-packs/apps/dev-app/jest.config.js
  23. 14
      npm/ng-packs/apps/dev-app/src/app/shared/shared.module.ts
  24. 43
      npm/ng-packs/apps/dev-app/src/environments/environment.regression.ts
  25. 12
      npm/ng-packs/apps/dev-app/src/polyfills.ts
  26. 0
      npm/ng-packs/apps/dev-app/src/test-setup.ts
  27. 0
      npm/ng-packs/apps/dev-app/tsconfig.app.json
  28. 10
      npm/ng-packs/apps/dev-app/tsconfig.dev.json
  29. 0
      npm/ng-packs/apps/dev-app/tsconfig.editor.json
  30. 0
      npm/ng-packs/apps/dev-app/tsconfig.json
  31. 12
      npm/ng-packs/apps/dev-app/tsconfig.spec.json
  32. 7
      npm/ng-packs/apps/dev-app/tslint.json
  33. 0
      npm/ng-packs/decorate-angular-cli.js
  34. 20
      npm/ng-packs/jest.config.js
  35. 0
      npm/ng-packs/jest.preset.js
  36. 4
      npm/ng-packs/lerna.publish.json
  37. 4
      npm/ng-packs/lerna.version.json
  38. 0
      npm/ng-packs/nx.json
  39. 52
      npm/ng-packs/nx/ng-packs/.gitignore
  40. 6
      npm/ng-packs/nx/ng-packs/.prettierrc
  41. 9
      npm/ng-packs/nx/ng-packs/.vscode/extensions.json
  42. 123
      npm/ng-packs/nx/ng-packs/CONTRIBUTING.md
  43. 24
      npm/ng-packs/nx/ng-packs/README.md
  44. 671
      npm/ng-packs/nx/ng-packs/angular.json
  45. 17
      npm/ng-packs/nx/ng-packs/apps/dev-app/.browserslistrc
  46. 34
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/app-routing.module.ts
  47. 10
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/app.component.ts
  48. 45
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/app.module.ts
  49. 11
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home-routing.module.ts
  50. 333
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home.component.html
  51. 19
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home.component.ts
  52. 10
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home.module.ts
  53. 20
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/route.provider.ts
  54. 13
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/shared/shared.module.ts
  55. 25
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/environments/environment.prod.ts
  56. 45
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/environments/environment.ts
  57. BIN
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/favicon.ico
  58. 15
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/index.html
  59. 13
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/main.ts
  60. 64
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/polyfills.ts
  61. 26
      npm/ng-packs/nx/ng-packs/apps/dev-app/src/styles.scss
  62. 16
      npm/ng-packs/nx/ng-packs/apps/dev-app/tsconfig.prod.json
  63. 5
      npm/ng-packs/nx/ng-packs/jest.config.js
  64. 5
      npm/ng-packs/nx/ng-packs/lerna.publish.json
  65. 7
      npm/ng-packs/nx/ng-packs/lerna.version.json
  66. 135
      npm/ng-packs/nx/ng-packs/package.json
  67. 3
      npm/ng-packs/nx/ng-packs/packages/account-core/README.md
  68. 20
      npm/ng-packs/nx/ng-packs/packages/account-core/jest.config.js
  69. 7
      npm/ng-packs/nx/ng-packs/packages/account-core/ng-package.json
  70. 21
      npm/ng-packs/nx/ng-packs/packages/account-core/package.json
  71. 46
      npm/ng-packs/nx/ng-packs/packages/account-core/src/lib/auth-wrapper.service.ts
  72. 68
      npm/ng-packs/nx/ng-packs/packages/account-core/src/lib/tenant-box.service.ts
  73. 6
      npm/ng-packs/nx/ng-packs/packages/account-core/src/public-api.ts
  74. 14
      npm/ng-packs/nx/ng-packs/packages/account-core/tsconfig.lib.json
  75. 11
      npm/ng-packs/nx/ng-packs/packages/account-core/tsconfig.lib.prod.json
  76. 11
      npm/ng-packs/nx/ng-packs/packages/account-core/tsconfig.spec.json
  77. 3
      npm/ng-packs/nx/ng-packs/packages/account/README.md
  78. 7
      npm/ng-packs/nx/ng-packs/packages/account/config/ng-package.json
  79. 21
      npm/ng-packs/nx/ng-packs/packages/account/config/src/account-config.module.ts
  80. 1
      npm/ng-packs/nx/ng-packs/packages/account/config/src/enums/index.ts
  81. 8
      npm/ng-packs/nx/ng-packs/packages/account/config/src/enums/route-names.ts
  82. 1
      npm/ng-packs/nx/ng-packs/packages/account/config/src/providers/index.ts
  83. 52
      npm/ng-packs/nx/ng-packs/packages/account/config/src/providers/route.provider.ts
  84. 3
      npm/ng-packs/nx/ng-packs/packages/account/config/src/public-api.ts
  85. 13
      npm/ng-packs/nx/ng-packs/packages/account/config/src/utils/factories.ts
  86. 20
      npm/ng-packs/nx/ng-packs/packages/account/jest.config.js
  87. 8
      npm/ng-packs/nx/ng-packs/packages/account/ng-package.json
  88. 16
      npm/ng-packs/nx/ng-packs/packages/account/package.json
  89. 87
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/account-routing.module.ts
  90. 59
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/account.module.ts
  91. 48
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html
  92. 100
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts
  93. 40
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.html
  94. 38
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts
  95. 7
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/index.ts
  96. 60
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/login/login.component.html
  97. 80
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/login/login.component.ts
  98. 62
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html
  99. 45
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts
  100. 46
      npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html

2
npm/ng-packs/.editorconfig

@ -1,4 +1,4 @@
# Editor configuration, see https://editorconfig.org
# Editor configuration, see http://editorconfig.org
root = true
[*]

0
npm/ng-packs/nx/ng-packs/.eslintignore → npm/ng-packs/.eslintignore

0
npm/ng-packs/nx/ng-packs/.eslintrc.json → npm/ng-packs/.eslintrc.json

0
npm/ng-packs/nx/ng-packs/.prettierignore → npm/ng-packs/.prettierignore

3
npm/ng-packs/.vscode/extensions.json

@ -1,7 +1,10 @@
{
"recommendations": [
"angular.ng-template",
"nrwl.angular-console",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"dbaeumer.vscode-eslint",
"ms-vscode.vscode-typescript-tslint-plugin",
"visualstudioexptteam.vscodeintellicode",
"christian-kohler.path-intellisense",

5
npm/ng-packs/CONTRIBUTING.md

@ -8,16 +8,11 @@ Run `yarn` to install all dependencies, then run `yarn prepare:workspace` to pr
Run `yarn start` to start the `dev-app`. Navigate to http://localhost:4200/.
## Package
[Symlink Manager](https://github.com/mehmet-erim/symlink-manager) is used to manage symbolic link processes. Run `yarn symlink copy` to select the packages to develop.
## Application
The `dev-app` project is the same as the Angular UI template project. `dev-app` is used to see changes instantly.
If you will only develop the `dev-app`, you don't need to run `symlink-manager`.
> Reminder! If you have developed the `dev-app` template, you should do the same for the application and module templates.
For more information, see the [docs.abp.io](https://docs.abp.io)

7
npm/ng-packs/README.md

@ -8,20 +8,15 @@
## Getting started
Run `yarn` to install all dependencies, then run `yarn prepare:workspace` to prepare the ABP packages (might take 2 minutes).
Run `yarn` to install all dependencies.
Run `yarn start` to start the `dev-app`. Navigate to http://localhost:4200/.
## Development
### Package
[Symlink Manager](https://github.com/mehmet-erim/symlink-manager) is used to manage symbolic link processes. Run `yarn symlink copy` to select the packages to develop.
### Application
The `dev-app` project is the same as the Angular UI template project. `dev-app` is used to see changes instantly.
If you will only develop the `dev-app`, you don't need to run `symlink-manager`.
> Reminder! If you have developed the `dev-app` template, you should do the same for the application and module templates.
For more information, see the [docs.abp.io](https://docs.abp.io)

675
npm/ng-packs/angular.json

@ -1,75 +1,84 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "packages",
"projects": {
"core": {
"account": {
"projectType": "library",
"root": "packages/core",
"sourceRoot": "packages/core/src",
"root": "packages/account",
"sourceRoot": "packages/account/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/core/tsconfig.lib.json",
"project": "packages/core/ng-package.json"
"tsConfig": "packages/account/tsconfig.lib.json",
"project": "packages/account/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/core/tsconfig.lib.prod.json"
"tsConfig": "packages/account/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/account/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/account"],
"options": {
"coverage": true,
"jestConfig": "packages/account/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": ["packages/core/tsconfig.lib.json", "packages/core/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/account/src/**/*.ts",
"packages/account/src/**/*.html"
]
}
}
}
},
"theme-shared": {
"account-core": {
"projectType": "library",
"root": "packages/theme-shared",
"sourceRoot": "packages/theme-shared/src",
"root": "packages/account-core",
"sourceRoot": "packages/account-core/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/theme-shared/tsconfig.lib.json",
"project": "packages/theme-shared/ng-package.json"
"tsConfig": "packages/account-core/tsconfig.lib.json",
"project": "packages/account-core/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/theme-shared/tsconfig.lib.prod.json"
"tsConfig": "packages/account-core/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/account-core/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/account-core"],
"options": {
"coverage": true,
"jestConfig": "packages/account-core/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/theme-shared/tsconfig.lib.json",
"packages/theme-shared/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/account-core/src/**/*.ts",
"packages/account-core/src/**/*.html"
]
}
}
}
@ -89,172 +98,268 @@
"configurations": {
"production": {
"tsConfig": "packages/components/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/components/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/components"],
"options": {
"coverage": true,
"jestConfig": "packages/components/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/components/tsconfig.lib.json",
"packages/components/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/components/src/**/*.ts",
"packages/components/src/**/*.html"
]
}
}
}
},
"account-core": {
"core": {
"projectType": "library",
"root": "packages/account-core",
"sourceRoot": "packages/account-core/src",
"prefix": "lib",
"root": "packages/core",
"sourceRoot": "packages/core/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/account-core/tsconfig.lib.json",
"project": "packages/account-core/ng-package.json"
"tsConfig": "packages/core/tsconfig.lib.json",
"project": "packages/core/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/account-core/tsconfig.lib.prod.json"
"tsConfig": "packages/core/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/core/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/core"],
"options": {
"tsConfig": "tsconfig.json",
"coverage": true,
"jestConfig": "packages/core/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/account-core/tsconfig.lib.json",
"packages/account-core/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/core/src/**/*.ts",
"packages/core/src/**/*.html"
]
}
}
}
},
"theme-basic": {
"projectType": "library",
"root": "packages/theme-basic",
"sourceRoot": "packages/theme-basic/src",
"prefix": "abp",
"dev-app": {
"projectType": "application",
"root": "apps/dev-app",
"sourceRoot": "apps/dev-app/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"tsConfig": "packages/theme-basic/tsconfig.lib.json",
"project": "packages/theme-basic/ng-package.json"
"outputPath": "dist/apps/dev-app",
"index": "apps/dev-app/src/index.html",
"main": "apps/dev-app/src/main.ts",
"polyfills": "apps/dev-app/src/polyfills.ts",
"tsConfig": "apps/dev-app/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": ["chart.js", "js-sha256"],
"assets": [
"apps/dev-app/src/favicon.ico",
"apps/dev-app/src/assets"
],
"styles": [
{
"input": "node_modules/@abp/ng.theme.shared/styles/bootstrap-rtl.min.css",
"inject": false,
"bundleName": "bootstrap-rtl.min"
},
{
"input": "node_modules/bootstrap/dist/css/bootstrap.min.css",
"inject": true,
"bundleName": "bootstrap-ltr.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"inject": true,
"bundleName": "fontawesome-all.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"inject": true,
"bundleName": "fontawesome-v4-shims.min"
},
{
"input": "node_modules/@swimlane/ngx-datatable/index.css",
"inject": true,
"bundleName": "ngx-datatable-index"
},
{
"input": "node_modules/@swimlane/ngx-datatable/assets/icons.css",
"inject": true,
"bundleName": "ngx-datatable-icons"
},
{
"input": "node_modules/@swimlane/ngx-datatable/themes/material.css",
"inject": true,
"bundleName": "ngx-datatable-material"
},
"apps/dev-app/src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"tsConfig": "packages/theme-basic/tsconfig.lib.prod.json"
"tsConfig": "apps/dev-app/tsconfig.prod.json",
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "apps/dev-app/src/environments/environment.ts",
"with": "apps/dev-app/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "dev-app:build:production"
},
"development": {
"browserTarget": "dev-app:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"coverage": true,
"passWithNoTests": true
"browserTarget": "dev-app:build"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/theme-basic/tsconfig.lib.json",
"packages/theme-basic/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"apps/dev-app/src/**/*.ts",
"apps/dev-app/src/**/*.html"
]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/apps/dev-app"],
"options": {
"jestConfig": "apps/dev-app/jest.config.js",
"passWithNoTests": true
}
}
}
},
"permission-management": {
"projectType": "library",
"root": "packages/permission-management",
"sourceRoot": "packages/permission-management/src",
"prefix": "abp",
"dev-app-e2e": {
"root": "apps/dev-app-e2e",
"sourceRoot": "apps/dev-app-e2e/src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"e2e": {
"builder": "@nrwl/cypress:cypress",
"options": {
"tsConfig": "packages/permission-management/tsconfig.lib.json",
"project": "packages/permission-management/ng-package.json"
"cypressConfig": "apps/dev-app-e2e/cypress.json",
"tsConfig": "apps/dev-app-e2e/tsconfig.e2e.json",
"devServerTarget": "dev-app:serve:development"
},
"configurations": {
"production": {
"tsConfig": "packages/permission-management/tsconfig.lib.prod.json"
"devServerTarget": "dev-app:serve:production"
}
}
},
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"coverage": true,
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/permission-management/tsconfig.lib.json",
"packages/permission-management/tsconfig.spec.json"
]
"lintFilePatterns": ["apps/dev-app-e2e/**/*.{js,ts}"]
}
}
}
},
"account": {
"feature-management": {
"projectType": "library",
"root": "packages/account",
"sourceRoot": "packages/account/src",
"root": "packages/feature-management",
"sourceRoot": "packages/feature-management/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/account/tsconfig.lib.json",
"project": "packages/account/ng-package.json"
"tsConfig": "packages/feature-management/tsconfig.lib.json",
"project": "packages/feature-management/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/account/tsconfig.lib.prod.json"
"tsConfig": "packages/feature-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/feature-management/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/feature-management"],
"options": {
"coverage": true,
"jestConfig": "packages/feature-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/account/tsconfig.lib.json",
"packages/account/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/feature-management/src/**/*.ts",
"packages/feature-management/src/**/*.html"
]
}
}
}
@ -274,95 +379,93 @@
"configurations": {
"production": {
"tsConfig": "packages/identity/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/identity/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/identity"],
"options": {
"coverage": true,
"jestConfig": "packages/identity/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/identity/tsconfig.lib.json",
"packages/identity/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/identity/src/**/*.ts",
"packages/identity/src/**/*.html"
]
}
}
}
},
"feature-management": {
"permission-management": {
"projectType": "library",
"root": "packages/feature-management",
"sourceRoot": "packages/feature-management/src",
"root": "packages/permission-management",
"sourceRoot": "packages/permission-management/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/feature-management/tsconfig.lib.json",
"project": "packages/feature-management/ng-package.json"
"tsConfig": "packages/permission-management/tsconfig.lib.json",
"project": "packages/permission-management/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/feature-management/tsconfig.lib.prod.json"
"tsConfig": "packages/permission-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/permission-management/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/permission-management"],
"options": {
"coverage": true,
"jestConfig": "packages/permission-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/feature-management/tsconfig.lib.json",
"packages/feature-management/tsconfig.spec.json"
"lintFilePatterns": [
"packages/permission-management/src/**/*.ts",
"packages/permission-management/src/**/*.html"
]
}
}
}
},
"tenant-management": {
"schematics": {
"projectType": "library",
"root": "packages/tenant-management",
"sourceRoot": "packages/tenant-management/src",
"root": "packages/schematics",
"sourceRoot": "packages/schematics/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/tenant-management/tsconfig.lib.json",
"project": "packages/tenant-management/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/tenant-management/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/schematics"],
"options": {
"coverage": true,
"jestConfig": "packages/schematics/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/tenant-management/tsconfig.lib.json",
"packages/tenant-management/tsconfig.spec.json"
"lintFilePatterns": [
"packages/schematics/src/**/*.ts",
"packages/schematics/src/**/*.html"
]
}
}
@ -383,206 +486,186 @@
"configurations": {
"production": {
"tsConfig": "packages/setting-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/setting-management/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/setting-management"],
"options": {
"coverage": true,
"jestConfig": "packages/setting-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"packages/setting-management/tsconfig.lib.json",
"packages/setting-management/tsconfig.spec.json"
"lintFilePatterns": [
"packages/setting-management/src/**/*.ts",
"packages/setting-management/src/**/*.html"
]
}
}
}
},
"schematics": {
"tenant-management": {
"projectType": "library",
"root": "packages/schematics",
"sourceRoot": "packages/schematics/src",
"root": "packages/tenant-management",
"sourceRoot": "packages/tenant-management/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/schematics/tsconfig.lib.json",
"project": "packages/schematics/ng-package.json"
}
"tsConfig": "packages/identity/tsconfig.lib.json",
"project": "packages/identity/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/tenant-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/tenant-management/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@angular-builders/jest:run",
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/tenant-management"],
"options": {
"tsConfig": "tsconfig.json",
"coverage": true,
"jestConfig": "packages/tenant-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": ["packages/schematics/tsconfig.json"],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/tenant-management/src/**/*.ts",
"packages/tenant-management/src/**/*.html"
]
}
}
}
},
"dev-app": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "apps/dev-app",
"sourceRoot": "apps/dev-app/src",
"theme-basic": {
"projectType": "library",
"root": "packages/theme-basic",
"sourceRoot": "packages/theme-basic/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"outputPath": "dist/dev-app",
"index": "apps/dev-app/src/index.html",
"main": "apps/dev-app/src/main.ts",
"polyfills": "apps/dev-app/src/polyfills.ts",
"tsConfig": "apps/dev-app/tsconfig.dev.json",
"aot": true,
"allowedCommonJsDependencies": ["chart.js", "js-sha256"],
"assets": ["apps/dev-app/src/favicon.ico", "apps/dev-app/src/assets"],
"styles": [
{
"input": "node_modules/@abp/ng.theme.shared/styles/bootstrap-rtl.min.css",
"inject": false,
"bundleName": "bootstrap-rtl.min"
},
{
"input": "node_modules/bootstrap/dist/css/bootstrap.min.css",
"inject": true,
"bundleName": "bootstrap-ltr.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"inject": true,
"bundleName": "fontawesome-all.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"inject": true,
"bundleName": "fontawesome-v4-shims.min"
},
{
"input": "node_modules/@swimlane/ngx-datatable/index.css",
"inject": true,
"bundleName": "ngx-datatable-index"
},
{
"input": "node_modules/@swimlane/ngx-datatable/assets/icons.css",
"inject": true,
"bundleName": "ngx-datatable-icons"
},
{
"input": "node_modules/@swimlane/ngx-datatable/themes/material.css",
"inject": true,
"bundleName": "ngx-datatable-material"
},
"apps/dev-app/src/styles.scss"
],
"scripts": []
"tsConfig": "packages/theme-basic/tsconfig.lib.json",
"project": "packages/theme-basic/ng-package.json"
},
"configurations": {
"tsConfig": "apps/dev-app/tsconfig.prod.json",
"production": {
"fileReplacements": [
{
"replace": "apps/dev-app/src/environments/environment.ts",
"with": "apps/dev-app/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "1mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
},
"internal": {
"tsConfig": "apps/dev-app/tsconfig.dev.json",
"fileReplacements": [
{
"replace": "apps/dev-app/src/environments/environment.ts",
"with": "apps/dev-app/src/environments/environment.internal.ts"
}
]
"tsConfig": "packages/theme-basic/tsconfig.lib.prod.json"
},
"regression": {
"tsConfig": "apps/dev-app/tsconfig.dev.json",
"fileReplacements": [
{
"replace": "apps/dev-app/src/environments/environment.ts",
"with": "apps/dev-app/src/environments/environment.regression.ts"
}
]
"development": {
"tsConfig": "packages/theme-basic/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/theme-basic"],
"options": {
"jestConfig": "packages/theme-basic/jest.config.js",
"passWithNoTests": true
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"browserTarget": "dev-app:build"
"lintFilePatterns": [
"packages/theme-basic/src/**/*.ts",
"packages/theme-basic/src/**/*.html"
]
}
}
}
},
"theme-shared": {
"projectType": "library",
"root": "packages/theme-shared",
"sourceRoot": "packages/theme-shared/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/theme-shared/tsconfig.lib.json",
"project": "packages/theme-shared/ng-package.json"
},
"configurations": {
"production": {
"browserTarget": "dev-app:build:production"
},
"internal": {
"browserTarget": "dev-app:build:internal"
"tsConfig": "packages/theme-shared/tsconfig.lib.prod.json"
},
"regression": {
"browserTarget": "dev-app:build:regression"
"development": {
"tsConfig": "packages/theme-shared/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/theme-shared"],
"options": {
"browserTarget": "dev-app:build"
"jestConfig": "packages/theme-shared/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@nrwl/linter:eslint",
"options": {
"tsConfig": [
"apps/dev-app/tsconfig.dev.json",
"apps/dev-app/tsconfig.prod.json",
"apps/dev-app/tsconfig.spec.json"
],
"exclude": ["**/node_modules/**"]
"lintFilePatterns": [
"packages/theme-shared/src/**/*.ts",
"packages/theme-shared/src/**/*.html"
]
}
}
}
}
},
"cli": {
"analytics": false
"defaultCollection": "@nrwl/angular"
},
"schematics": {
"@nrwl/angular": {
"application": {
"linter": "eslint"
},
"library": {
"linter": "eslint"
},
"storybook-configuration": {
"linter": "eslint"
}
},
"@nrwl/angular:application": {
"style": "scss",
"linter": "eslint",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress"
},
"@nrwl/angular:library": {
"style": "scss",
"linter": "eslint",
"unitTestRunner": "jest",
"strict": false
},
"@nrwl/angular:component": {
"style": "scss"
}
},
"defaultProject": "dev-app"
}

0
npm/ng-packs/nx/ng-packs/apps/.gitkeep → npm/ng-packs/apps/.gitkeep

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/.eslintrc.json → npm/ng-packs/apps/dev-app-e2e/.eslintrc.json

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/cypress.json → npm/ng-packs/apps/dev-app-e2e/cypress.json

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/src/fixtures/example.json → npm/ng-packs/apps/dev-app-e2e/src/fixtures/example.json

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/src/integration/app.spec.ts → npm/ng-packs/apps/dev-app-e2e/src/integration/app.spec.ts

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/src/plugins/index.js → npm/ng-packs/apps/dev-app-e2e/src/plugins/index.js

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/src/support/app.po.ts → npm/ng-packs/apps/dev-app-e2e/src/support/app.po.ts

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/src/support/commands.ts → npm/ng-packs/apps/dev-app-e2e/src/support/commands.ts

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/src/support/index.ts → npm/ng-packs/apps/dev-app-e2e/src/support/index.ts

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/tsconfig.e2e.json → npm/ng-packs/apps/dev-app-e2e/tsconfig.e2e.json

0
npm/ng-packs/nx/ng-packs/apps/dev-app-e2e/tsconfig.json → npm/ng-packs/apps/dev-app-e2e/tsconfig.json

13
npm/ng-packs/apps/dev-app/.browserslistrc

@ -2,11 +2,16 @@
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

0
npm/ng-packs/nx/ng-packs/apps/dev-app/.eslintrc.json → npm/ng-packs/apps/dev-app/.eslintrc.json

0
npm/ng-packs/nx/ng-packs/apps/dev-app/jest.config.js → npm/ng-packs/apps/dev-app/jest.config.js

14
npm/ng-packs/apps/dev-app/src/app/shared/shared.module.ts

@ -6,18 +6,8 @@ import { NgxValidateCoreModule } from '@ngx-validate/core';
@NgModule({
declarations: [],
imports: [
CoreModule,
ThemeSharedModule,
NgbDropdownModule,
NgxValidateCoreModule,
],
exports: [
CoreModule,
ThemeSharedModule,
NgbDropdownModule,
NgxValidateCoreModule,
],
imports: [CoreModule, ThemeSharedModule, NgbDropdownModule, NgxValidateCoreModule],
exports: [CoreModule, ThemeSharedModule, NgbDropdownModule, NgxValidateCoreModule],
providers: [],
})
export class SharedModule {}

43
npm/ng-packs/apps/dev-app/src/environments/environment.regression.ts

@ -1,43 +0,0 @@
import { Config } from '@abp/ng.core';
const baseUrl = 'http://localhost:4200';
export const environment = {
test: true,
production: false,
hmr: false,
application: {
baseUrl,
name: 'MyProjectName',
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44305',
redirectUri: baseUrl,
clientId: 'MyProjectName_App',
responseType: 'code',
scope: 'offline_access MyProjectName',
},
apis: {
default: {
url: 'https://localhost:44305',
rootNamespace: 'MyCompanyName.MyProjectName',
},
AbpFeatureManagement: {
url: 'https://localhost:44305',
rootNamespace: 'Volo.Abp',
},
AbpPermissionManagement: {
url: 'https://localhost:44305',
rootNamespace: 'Volo.Abp.PermissionManagement',
},
AbpTenantManagement: {
url: 'https://localhost:44305',
rootNamespace: 'Volo.Abp.TenantManagement',
},
AbpIdentity: {
url: 'https://localhost:44305',
rootNamespace: 'Volo.Abp',
},
},
} as Config.Environment;

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

@ -1,7 +1,3 @@
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
import '@angular/localize/init';
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
@ -22,7 +18,9 @@ import '@angular/localize/init';
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
/**
* IE11 requires the following for NgClass support on SVG elements
*/
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
@ -39,7 +37,7 @@ import '@angular/localize/init';
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
@ -59,7 +57,7 @@ import '@angular/localize/init';
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS

0
npm/ng-packs/nx/ng-packs/apps/dev-app/src/test-setup.ts → npm/ng-packs/apps/dev-app/src/test-setup.ts

0
npm/ng-packs/nx/ng-packs/apps/dev-app/tsconfig.app.json → npm/ng-packs/apps/dev-app/tsconfig.app.json

10
npm/ng-packs/apps/dev-app/tsconfig.dev.json

@ -1,10 +0,0 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"types": []
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.ts"],
"exclude": ["src/test.ts", "src/**/*.spec.ts", "src/environments/*.ts"]
}

0
npm/ng-packs/nx/ng-packs/apps/dev-app/tsconfig.editor.json → npm/ng-packs/apps/dev-app/tsconfig.editor.json

0
npm/ng-packs/nx/ng-packs/apps/dev-app/tsconfig.json → npm/ng-packs/apps/dev-app/tsconfig.json

12
npm/ng-packs/apps/dev-app/tsconfig.spec.json

@ -1,9 +1,11 @@
{
"extends": "../../tsconfig.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": ["node", "jest"]
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/polyfills.ts"],
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}

7
npm/ng-packs/apps/dev-app/tslint.json

@ -1,7 +0,0 @@
{
"extends": "../../tslint.json",
"rules": {
"directive-selector": [true, "attribute", "app", "camelCase"],
"component-selector": [true, "element", "app", "kebab-case"]
}
}

0
npm/ng-packs/nx/ng-packs/decorate-angular-cli.js → npm/ng-packs/decorate-angular-cli.js

20
npm/ng-packs/jest.config.js

@ -1,19 +1,5 @@
const { getJestProjects } = require('@nrwl/jest');
module.exports = {
globals: {
'ts-jest': {
allowSyntheticDefaultImports: true,
},
},
transform: {
'^.+\\.(ts|js|html)$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '<rootDir>/coverage',
coverageReporters: ['html'],
preset: 'jest-preset-angular',
setupFilesAfterEnv: ['<rootDir>/test-setup.ts', 'jest-canvas-mock'],
// snapshotSerializers: [
// 'jest-preset-angular/AngularSnapshotSerializer.js',
// 'jest-preset-angular/HTMLCommentSerializer.js',
// ],
projects: getJestProjects(),
};

0
npm/ng-packs/nx/ng-packs/jest.preset.js → npm/ng-packs/jest.preset.js

4
npm/ng-packs/lerna.publish.json

@ -1,5 +1,5 @@
{
"version": "1.1.1",
"packages": ["dist/*"],
"version": "1.0.0",
"packages": ["dist/packages/*"],
"npmClient": "yarn"
}

4
npm/ng-packs/lerna.version.json

@ -1,5 +1,7 @@
{
"version": "4.4.0",
"packages": ["packages/*"],
"packages": [
"packages/*"
],
"npmClient": "yarn"
}

0
npm/ng-packs/nx/ng-packs/nx.json → npm/ng-packs/nx.json

52
npm/ng-packs/nx/ng-packs/.gitignore

@ -1,52 +0,0 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# generic ignore files
*.gitignore.*
# compiled output
/tmp
/out-tsc
/dist
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
!**/[Pp]ackages/*
*.internal.*

6
npm/ng-packs/nx/ng-packs/.prettierrc

@ -1,6 +0,0 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid"
}

9
npm/ng-packs/nx/ng-packs/.vscode/extensions.json

@ -1,9 +0,0 @@
{
"recommendations": [
"angular.ng-template",
"nrwl.angular-console",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"dbaeumer.vscode-eslint"
]
}

123
npm/ng-packs/nx/ng-packs/CONTRIBUTING.md

@ -1,123 +0,0 @@
# Contributing to ABP Angular UI
We would love for you to contribute to ABP Angular UI and help make it even better than it is today.
# Development
Run `yarn` to install all dependencies, then run `yarn prepare:workspace` to prepare the ABP packages (might take 2 minutes).
Run `yarn start` to start the `dev-app`. Navigate to http://localhost:4200/.
## Application
The `dev-app` project is the same as the Angular UI template project. `dev-app` is used to see changes instantly.
> Reminder! If you have developed the `dev-app` template, you should do the same for the application and module templates.
For more information, see the [docs.abp.io](https://docs.abp.io)
# Committing changes
Before you commit, please ensure that your code passes the existing unit tests.
New features should be accompanied by new tests.
Every commit should contain only the changes related to the subject of that commit.
## Commit message format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:
```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```
The **header** is mandatory and the **scope** of the header is optional.
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.
The footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
```
docs(changelog): update changelog to beta.5
```
```
fix(release): need to depend on latest rxjs and zone.js
The version in our package.json gets copied to the one we publish, and users need the latest of these.
```
### Revert
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Type
Must be one of the following:
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- **ci**: Changes to our CI configuration files and scripts (example scope: scripts)
- **docs**: Documentation only changes
- **feat**: A new feature
- **fix**: A bug fix
- **perf**: A code change that improves performance
- **refactor**: A code change that neither fixes a bug nor adds a feature
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **test**: Adding missing tests or correcting existing tests
- **chore**: Other changes that don't modify src or test files
### Scope
The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages).
The following is the list of supported scopes:
- **core**
- **theme-shared**
- **theme-basic**
- **identity**
- **tenant-management**
- **feature-management**
- **permission-management**
- **setting-management**
There are currently a few exceptions to the "use package name" rule:
- **packaging**: used for changes that change the npm package layout in all of our packages, e.g.
public path changes, package.json changes done to all packages, d.ts file/format changes, changes
to bundles, etc.
- **scripts**: used for changes that change any script.
- **template**: used for changes that change `dev-app` and `app` template applications.
- **changelog**: used for updating the release notes in CHANGELOG.md
- none/empty string: useful for `style`, `test` and `refactor` changes that are done across all
packages (e.g. `style: add missing semicolons`) and for docs changes that are not related to a
specific package (e.g. `docs: fix typo in tutorial`).
### Subject
The subject contains a succinct description of the change:
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
# Thanks for contributing!

24
npm/ng-packs/nx/ng-packs/README.md

@ -1,24 +0,0 @@
# Abp Ng Packages
<a href="https://github.com/abpframework/abp/actions?query=workflow%3AAngular">![action badge](https://img.shields.io/github/workflow/status/abpframework/abp/Angular)</a>
<a href="https://github.com/abpframework/abp/labels/ui-angular">![issues](https://img.shields.io/github/issues/abpframework/abp/ui-angular)</a>
<a href="https://github.com/abpframework/abp/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Aui-angular">![pull requests](https://img.shields.io/github/issues-pr-raw/abpframework/abp/ui-angular)</a>
<a href="https://npmjs.org/package/@abp/ng.core">![npm](https://img.shields.io/npm/dm/@abp/ng.core)</a>
![npm version](https://img.shields.io/npm/v/@abp/ng.core?label=version)
## Getting started
Run `yarn` to install all dependencies.
Run `yarn start` to start the `dev-app`. Navigate to http://localhost:4200/.
## Development
### Application
The `dev-app` project is the same as the Angular UI template project. `dev-app` is used to see changes instantly.
> Reminder! If you have developed the `dev-app` template, you should do the same for the application and module templates.
For more information, see the [docs.abp.io](https://docs.abp.io)
If would you like contribute, see the [contribution guideline](./CONTRIBUTING.md).

671
npm/ng-packs/nx/ng-packs/angular.json

@ -1,671 +0,0 @@
{
"version": 1,
"projects": {
"account": {
"projectType": "library",
"root": "packages/account",
"sourceRoot": "packages/account/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/account/tsconfig.lib.json",
"project": "packages/account/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/account/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/account/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/account"],
"options": {
"jestConfig": "packages/account/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/account/src/**/*.ts",
"packages/account/src/**/*.html"
]
}
}
}
},
"account-core": {
"projectType": "library",
"root": "packages/account-core",
"sourceRoot": "packages/account-core/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/account-core/tsconfig.lib.json",
"project": "packages/account-core/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/account-core/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/account-core/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/account-core"],
"options": {
"jestConfig": "packages/account-core/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/account-core/src/**/*.ts",
"packages/account-core/src/**/*.html"
]
}
}
}
},
"components": {
"projectType": "library",
"root": "packages/components",
"sourceRoot": "packages/components/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/components/tsconfig.lib.json",
"project": "packages/components/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/components/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/components/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/components"],
"options": {
"jestConfig": "packages/components/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/components/src/**/*.ts",
"packages/components/src/**/*.html"
]
}
}
}
},
"core": {
"projectType": "library",
"root": "packages/core",
"sourceRoot": "packages/core/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/core/tsconfig.lib.json",
"project": "packages/core/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/core/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/core/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/core"],
"options": {
"jestConfig": "packages/core/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/core/src/**/*.ts",
"packages/core/src/**/*.html"
]
}
}
}
},
"dev-app": {
"projectType": "application",
"root": "apps/dev-app",
"sourceRoot": "apps/dev-app/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/dev-app",
"index": "apps/dev-app/src/index.html",
"main": "apps/dev-app/src/main.ts",
"polyfills": "apps/dev-app/src/polyfills.ts",
"tsConfig": "apps/dev-app/tsconfig.app.json",
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": ["chart.js", "js-sha256"],
"assets": [
"apps/dev-app/src/favicon.ico",
"apps/dev-app/src/assets"
],
"styles": [
{
"input": "node_modules/@abp/ng.theme.shared/styles/bootstrap-rtl.min.css",
"inject": false,
"bundleName": "bootstrap-rtl.min"
},
{
"input": "node_modules/bootstrap/dist/css/bootstrap.min.css",
"inject": true,
"bundleName": "bootstrap-ltr.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
"inject": true,
"bundleName": "fontawesome-all.min"
},
{
"input": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
"inject": true,
"bundleName": "fontawesome-v4-shims.min"
},
{
"input": "node_modules/@swimlane/ngx-datatable/index.css",
"inject": true,
"bundleName": "ngx-datatable-index"
},
{
"input": "node_modules/@swimlane/ngx-datatable/assets/icons.css",
"inject": true,
"bundleName": "ngx-datatable-icons"
},
{
"input": "node_modules/@swimlane/ngx-datatable/themes/material.css",
"inject": true,
"bundleName": "ngx-datatable-material"
},
"apps/dev-app/src/styles.scss"
],
"scripts": []
},
"configurations": {
"production": {
"tsConfig": "apps/dev-app/tsconfig.prod.json",
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "apps/dev-app/src/environments/environment.ts",
"with": "apps/dev-app/src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "dev-app:build:production"
},
"development": {
"browserTarget": "dev-app:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "dev-app:build"
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"apps/dev-app/src/**/*.ts",
"apps/dev-app/src/**/*.html"
]
}
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/apps/dev-app"],
"options": {
"jestConfig": "apps/dev-app/jest.config.js",
"passWithNoTests": true
}
}
}
},
"dev-app-e2e": {
"root": "apps/dev-app-e2e",
"sourceRoot": "apps/dev-app-e2e/src",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@nrwl/cypress:cypress",
"options": {
"cypressConfig": "apps/dev-app-e2e/cypress.json",
"tsConfig": "apps/dev-app-e2e/tsconfig.e2e.json",
"devServerTarget": "dev-app:serve:development"
},
"configurations": {
"production": {
"devServerTarget": "dev-app:serve:production"
}
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/dev-app-e2e/**/*.{js,ts}"]
}
}
}
},
"feature-management": {
"projectType": "library",
"root": "packages/feature-management",
"sourceRoot": "packages/feature-management/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/feature-management/tsconfig.lib.json",
"project": "packages/feature-management/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/feature-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/feature-management/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/feature-management"],
"options": {
"jestConfig": "packages/feature-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/feature-management/src/**/*.ts",
"packages/feature-management/src/**/*.html"
]
}
}
}
},
"identity": {
"projectType": "library",
"root": "packages/identity",
"sourceRoot": "packages/identity/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/identity/tsconfig.lib.json",
"project": "packages/identity/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/identity/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/identity/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/identity"],
"options": {
"jestConfig": "packages/identity/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/identity/src/**/*.ts",
"packages/identity/src/**/*.html"
]
}
}
}
},
"permission-management": {
"projectType": "library",
"root": "packages/permission-management",
"sourceRoot": "packages/permission-management/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/permission-management/tsconfig.lib.json",
"project": "packages/permission-management/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/permission-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/permission-management/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/permission-management"],
"options": {
"jestConfig": "packages/permission-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/permission-management/src/**/*.ts",
"packages/permission-management/src/**/*.html"
]
}
}
}
},
"schematics": {
"projectType": "library",
"root": "packages/schematics",
"sourceRoot": "packages/schematics/src",
"prefix": "abp",
"architect": {
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/schematics"],
"options": {
"jestConfig": "packages/schematics/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/schematics/src/**/*.ts",
"packages/schematics/src/**/*.html"
]
}
}
}
},
"setting-management": {
"projectType": "library",
"root": "packages/setting-management",
"sourceRoot": "packages/setting-management/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/setting-management/tsconfig.lib.json",
"project": "packages/setting-management/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/setting-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/setting-management/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/setting-management"],
"options": {
"jestConfig": "packages/setting-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/setting-management/src/**/*.ts",
"packages/setting-management/src/**/*.html"
]
}
}
}
},
"tenant-management": {
"projectType": "library",
"root": "packages/tenant-management",
"sourceRoot": "packages/tenant-management/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/identity/tsconfig.lib.json",
"project": "packages/identity/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/tenant-management/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/tenant-management/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/tenant-management"],
"options": {
"jestConfig": "packages/tenant-management/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/tenant-management/src/**/*.ts",
"packages/tenant-management/src/**/*.html"
]
}
}
}
},
"theme-basic": {
"projectType": "library",
"root": "packages/theme-basic",
"sourceRoot": "packages/theme-basic/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/theme-basic/tsconfig.lib.json",
"project": "packages/theme-basic/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/theme-basic/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/theme-basic/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/theme-basic"],
"options": {
"jestConfig": "packages/theme-basic/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/theme-basic/src/**/*.ts",
"packages/theme-basic/src/**/*.html"
]
}
}
}
},
"theme-shared": {
"projectType": "library",
"root": "packages/theme-shared",
"sourceRoot": "packages/theme-shared/src",
"prefix": "abp",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "packages/theme-shared/tsconfig.lib.json",
"project": "packages/theme-shared/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/theme-shared/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/theme-shared/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"builder": "@nrwl/jest:jest",
"outputs": ["coverage/packages/theme-shared"],
"options": {
"jestConfig": "packages/theme-shared/jest.config.js",
"passWithNoTests": true
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"packages/theme-shared/src/**/*.ts",
"packages/theme-shared/src/**/*.html"
]
}
}
}
}
},
"cli": {
"defaultCollection": "@nrwl/angular"
},
"schematics": {
"@nrwl/angular": {
"application": {
"linter": "eslint"
},
"library": {
"linter": "eslint"
},
"storybook-configuration": {
"linter": "eslint"
}
},
"@nrwl/angular:application": {
"style": "scss",
"linter": "eslint",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress"
},
"@nrwl/angular:library": {
"style": "scss",
"linter": "eslint",
"unitTestRunner": "jest",
"strict": false
},
"@nrwl/angular:component": {
"style": "scss"
}
},
"defaultProject": "dev-app"
}

17
npm/ng-packs/nx/ng-packs/apps/dev-app/.browserslistrc

@ -1,17 +0,0 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

34
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/app-routing.module.ts

@ -1,34 +0,0 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
pathMatch: 'full',
loadChildren: () => import('./home/home.module').then(m => m.HomeModule),
},
{
path: 'account',
loadChildren: () => import('@abp/ng.account').then(m => m.AccountModule.forLazy()),
},
{
path: 'identity',
loadChildren: () => import('@abp/ng.identity').then(m => m.IdentityModule.forLazy()),
},
{
path: 'tenant-management',
loadChildren: () =>
import('@abp/ng.tenant-management').then(m => m.TenantManagementModule.forLazy()),
},
{
path: 'setting-management',
loadChildren: () =>
import('@abp/ng.setting-management').then(m => m.SettingManagementModule.forLazy()),
},
];
@NgModule({
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
exports: [RouterModule],
})
export class AppRoutingModule {}

10
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/app.component.ts

@ -1,10 +0,0 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<abp-loader-bar></abp-loader-bar>
<abp-dynamic-layout></abp-dynamic-layout>
`,
})
export class AppComponent {}

45
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/app.module.ts

@ -1,45 +0,0 @@
import { AccountConfigModule } from '@abp/ng.account/config';
import { CoreModule } from '@abp/ng.core';
import { registerLocale } from '@abp/ng.core/locale';
import { IdentityConfigModule } from '@abp/ng.identity/config';
import { SettingManagementConfigModule } from '@abp/ng.setting-management/config';
import { TenantManagementConfigModule } from '@abp/ng.tenant-management/config';
import { ThemeBasicModule } from '@abp/ng.theme.basic';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsModule } from '@ngxs/store';
import { environment } from '../environments/environment';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { APP_ROUTE_PROVIDER } from './route.provider';
const INSPECTION_TOOLS = [NgxsLoggerPluginModule.forRoot({ disabled: true })];
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
CoreModule.forRoot({
environment,
registerLocaleFn: registerLocale(),
sendNullsAsQueryParam: false,
skipGetAppConfiguration: false,
}),
ThemeSharedModule.forRoot(),
AccountConfigModule.forRoot(),
IdentityConfigModule.forRoot(),
TenantManagementConfigModule.forRoot(),
SettingManagementConfigModule.forRoot(),
NgxsModule.forRoot(),
ThemeBasicModule.forRoot(),
...(environment.production || environment.test ? [] : INSPECTION_TOOLS),
],
providers: [APP_ROUTE_PROVIDER],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
export class AppModule {}

11
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home-routing.module.ts

@ -1,11 +0,0 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home.component';
const routes: Routes = [{ path: '', component: HomeComponent }];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class HomeRoutingModule {}

333
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home.component.html

@ -1,333 +0,0 @@
<div class="container">
<div class="p-5 text-center">
<div class="d-inline-block bg-success text-white p-1 h5 rounded mb-4" role="alert">
<h5 class="m-1">
<i class="fas fa-rocket"></i> Congratulations, <strong>MyProjectName</strong> is
successfully running!
</h5>
</div>
<h1>{{ '::Welcome' | abpLocalization }}</h1>
<p class="lead px-lg-5 mx-lg-5">{{ '::LongWelcomeMessage' | abpLocalization }}</p>
<a *ngIf="!hasLoggedIn" (click)="login()" class="px-4 btn btn-primary ml-1" role="button"
><i class="fa fa-sign-in"></i> {{ 'AbpAccount::Login' | abpLocalization }}</a
>
</div>
<div class="my-3 text-center">
<h3>Let's improve your application!</h3>
<p>Here are some links to help you get started:</p>
</div>
<div class="card mt-4 mb-5">
<div class="card-body">
<div class="row text-center justify-content-md-center">
<ng-container
*ngTemplateOutlet="
starterLinkTemplate;
context: {
$implicit: {
title: 'Learn the ABP Framework',
description:
'Explore the compherensive documentation to learn how to build a modern web application.',
links: [
{
href: 'https://docs.abp.io/en/abp/latest?ref=tmpl',
label: 'See Documents'
}
]
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
starterLinkTemplate;
context: {
$implicit: {
title: 'Samples',
description: 'See the example projects built with the ABP Framework.',
links: [
{
href: 'https://docs.abp.io/en/abp/latest/Samples/Index?ref=tmpl',
label: 'All samples'
}
]
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
starterLinkTemplate;
context: {
$implicit: {
title: 'ABP Community',
description: 'Get involved with a vibrant community and become a contributor.',
links: [
{
href: 'https://community.abp.io/',
label: 'Community'
},
{
href: 'https://docs.abp.io/en/abp/latest/Contribution/Index?ref=tmpl',
label: 'Contribute'
}
]
}
}
"
></ng-container>
</div>
<div class="row text-center mt-lg-3 justify-content-md-center">
<ng-container
*ngTemplateOutlet="
starterLinkTemplate;
context: {
$implicit: {
title: 'ABP Blog',
description: 'Take a look at our recently published articles.',
links: [
{
href: 'https://blog.abp.io/abp?ref=tmpl',
label: 'See Blog'
}
]
}
}
"
></ng-container>
<ng-template #githubButtonsTemplate>
<p class="mb-1">
<iframe
scrolling="no"
src="https://buttons.github.io/buttons.html#href=https%3A%2F%2Fgithub.com%2Fabpframework%2Fabp&amp;title=&amp;aria-label=Star%20tabalinas%2Fjsgrid%20on%20GitHub&amp;data-icon=octicon-star&amp;data-text=Star&amp;data-size=large&amp;data-show-count=true"
style="
width: 122px;
height: 28px;
border: none;
display: inline-block;
margin-right: 4px;
"
></iframe>
<iframe
scrolling="no"
src="https://buttons.github.io/buttons.html#href=https%3A%2F%2Fgithub.com%2Fabpframework%2Fabp%2Fissues&amp;title=&amp;aria-label=Issue%20tabalinas%2Fjsgrid%20on%20GitHub&amp;data-icon=octicon-issue-opened&amp;data-text=Issue&amp;data-size=large"
style="
width: 72px;
height: 28px;
border: none;
display: inline-block;
margin-right: 4px;
"
></iframe>
<iframe
scrolling="no"
src="https://buttons.github.io/buttons.html#href=https%3A%2F%2Fgithub.com%2Fabpframework%2Fabp%2Ffork&amp;title=&amp;aria-label=Fork%20tabalinas%2Fjsgrid%20on%20GitHub&amp;data-icon=octicon-repo-forked&amp;data-text=Fork&amp;data-size=large&amp;"
style="width: 72px; height: 28px; border: none; display: inline-block"
></iframe>
</p>
</ng-template>
<ng-container
*ngTemplateOutlet="
starterLinkTemplate;
context: {
$implicit: {
title: 'Github',
description:
'Do you love the ABP Framework? Please <strong>give a star</strong> to support it!',
links: [
{
href: 'https://github.com/abpframework/abp/issues/new?template=feature.md',
label: 'Request a feature'
}
],
customTemplate: githubButtonsTemplate
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
starterLinkTemplate;
context: {
$implicit: {
title: 'Stackoverflow',
description: 'See answers to previously asked questions or ask a new one.',
links: [
{
href: 'https://stackoverflow.com/questions/tagged/abp',
label: 'Questions'
},
{
href: 'https://stackoverflow.com/questions/ask',
label: 'Ask a Question'
}
]
}
}
"
></ng-container>
</div>
</div>
</div>
<div class="mt-5 my-3 text-center">
<h3>Meet the ABP Commercial</h3>
<p>A Complete Web Application Platform Built on the ABP Framework</p>
</div>
<div class="card mt-4 mb-5">
<div class="card-body">
<p class="px-lg-5 mx-lg-5 py-3 text-center">
<a href="https://commercial.abp.io/" target="_blank">ABP Commercial</a> is a platform based
on the open source ABP framework. It provides pre-built application modules, rapid
application development tooling, professional UI themes, premium support and more.
</p>
<div class="row text-center justify-content-md-center">
<ng-container
*ngTemplateOutlet="
featuresTemplate;
context: {
$implicit: {
title: 'Startup Templates',
href: 'https://commercial.abp.io/startup-templates?ref=tmpl'
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
featuresTemplate;
context: {
$implicit: {
title: 'Application Modules',
href: 'https://commercial.abp.io/modules?ref=tmpl'
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
featuresTemplate;
context: {
$implicit: {
title: 'Developer<br />Tools',
href: 'https://commercial.abp.io/tools?ref=tmpl'
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
featuresTemplate;
context: {
$implicit: {
title: 'UI<br />Themes',
href: 'https://commercial.abp.io/themes?ref=tmpl'
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
featuresTemplate;
context: {
$implicit: {
title: 'Premium Support',
href: 'https://support.abp.io/QA/Questions?ref=tmpl'
}
}
"
></ng-container>
<ng-container
*ngTemplateOutlet="
featuresTemplate;
context: {
$implicit: {
title: 'Additional Services',
href: 'https://commercial.abp.io/additional-services?ref=tmpl'
}
}
"
></ng-container>
</div>
</div>
</div>
<div class="mb-5 text-center">
<p class="align-middle">
<a href="https://twitter.com/abpframework" target="_blank" class="mx-2"
><i class="fa fa-twitter"></i><span class="text-secondary"> Abp Framework</span></a
>
<a href="https://twitter.com/abpcommercial" target="_blank" class="mx-2"
><i class="fa fa-twitter"></i><span class="text-secondary"> Abp Commercial</span></a
>
<a href="https://github.com/abpframework/abp" target="_blank" class="mx-2"
><i class="fa fa-github"></i><span class="text-secondary"> abpframework</span></a
>
</p>
</div>
</div>
<ng-template #starterLinkTemplate let-context>
<div class="col-lg-4 border-left">
<div class="p-4">
<h5 class="mb-3">
<i class="fas fa-cubes text-secondary d-block my-3 fa-2x"></i> {{ context.title }}
</h5>
<p [innerHTML]="context.description"></p>
<ng-container
*ngIf="context.customTemplate"
[ngTemplateOutlet]="context.customTemplate"
></ng-container>
<a
*ngFor="let link of context.links"
[href]="link.href"
target="_blank"
class="btn btn-link px-1"
>{{ link.label }} <i class="fas fa-chevron-right"></i
></a>
</div>
</div>
</ng-template>
<ng-template #featuresTemplate let-context>
<div class="col-lg-2 border-left">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i>
<span [innerHTML]="context.title"></span>
<a [href]="context.href" target="_blank" class="d-block mt-2 btn btn-sm btn-link"
>Details <i class="fas fa-chevron-right"></i
></a>
</h6>
</div>
</div>
</ng-template>
<style scoped>
.col-lg-2.border-left:nth-of-type(6n + 1) {
border-left: 0 !important;
}
.col-lg-4.border-left:nth-of-type(3n + 1) {
border-left: 0 !important;
}
@media (max-width: 991px) {
.border-left {
border-left: 0 !important;
}
}
</style>

19
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home.component.ts

@ -1,19 +0,0 @@
import { AuthService } from '@abp/ng.core';
import { Component } from '@angular/core';
import { OAuthService } from 'angular-oauth2-oidc';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
get hasLoggedIn(): boolean {
return this.oAuthService.hasValidAccessToken();
}
constructor(private oAuthService: OAuthService, private authService: AuthService) {}
login() {
this.authService.navigateToLogin();
}
}

10
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/home/home.module.ts

@ -1,10 +0,0 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module';
import { HomeRoutingModule } from './home-routing.module';
import { HomeComponent } from './home.component';
@NgModule({
declarations: [HomeComponent],
imports: [SharedModule, HomeRoutingModule],
})
export class HomeModule {}

20
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/route.provider.ts

@ -1,20 +0,0 @@
import { eLayoutType, RoutesService } from '@abp/ng.core';
import { APP_INITIALIZER } from '@angular/core';
export const APP_ROUTE_PROVIDER = [
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
];
function configureRoutes(routesService: RoutesService) {
return () => {
routesService.add([
{
path: '/',
name: '::Menu:Home',
iconClass: 'fas fa-home',
order: 1,
layout: eLayoutType.application,
},
]);
};
}

13
npm/ng-packs/nx/ng-packs/apps/dev-app/src/app/shared/shared.module.ts

@ -1,13 +0,0 @@
import { CoreModule } from '@abp/ng.core';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { NgModule } from '@angular/core';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgxValidateCoreModule } from '@ngx-validate/core';
@NgModule({
declarations: [],
imports: [CoreModule, ThemeSharedModule, NgbDropdownModule, NgxValidateCoreModule],
exports: [CoreModule, ThemeSharedModule, NgbDropdownModule, NgxValidateCoreModule],
providers: [],
})
export class SharedModule {}

25
npm/ng-packs/nx/ng-packs/apps/dev-app/src/environments/environment.prod.ts

@ -1,25 +0,0 @@
import { Config } from '@abp/ng.core';
const baseUrl = 'http://localhost:4200';
export const environment = {
production: true,
hmr: false,
application: {
baseUrl,
name: 'MyProjectName',
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44305',
redirectUri: baseUrl,
clientId: 'MyProjectName_App',
responseType: 'code',
scope: 'offline_access MyProjectName',
},
apis: {
default: {
url: 'https://localhost:44305',
},
},
} as Config.Environment;

45
npm/ng-packs/nx/ng-packs/apps/dev-app/src/environments/environment.ts

@ -1,45 +0,0 @@
import { Environment } from '@abp/ng.core';
const baseUrl = 'http://localhost:4200';
export const environment = {
production: false,
hmr: false,
application: {
baseUrl,
name: 'MyProjectName',
logoUrl: '',
},
oAuthConfig: {
issuer: 'https://localhost:44305',
clientId: 'MyProjectName_App',
dummyClientSecret: '1q2w3e*',
scope: 'offline_access MyProjectName',
responseType: 'code',
redirectUri: baseUrl,
},
apis: {
default: {
url: 'https://localhost:44305',
rootNamespace: 'MyCompanyName.MyProjectName',
},
AbpAccount: {
rootNamespace: 'Volo.Abp',
},
AbpFeatureManagement: {
rootNamespace: 'Volo.Abp',
},
AbpPermissionManagement: {
rootNamespace: 'Volo.Abp.PermissionManagement',
},
AbpTenantManagement: {
rootNamespace: 'Volo.Abp.TenantManagement',
},
AbpIdentity: {
rootNamespace: 'Volo.Abp',
},
AbpSettingManagement: {
rootNamespace: 'Volo.Abp.SettingManagement',
},
},
} as Environment;

BIN
npm/ng-packs/nx/ng-packs/apps/dev-app/src/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

15
npm/ng-packs/nx/ng-packs/apps/dev-app/src/index.html

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ABP Dev</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body class="bg-light">
<app-root>
<div class="donut centered"></div>
</app-root>
</body>
</html>

13
npm/ng-packs/nx/ng-packs/apps/dev-app/src/main.ts

@ -1,13 +0,0 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic()
.bootstrapModule(AppModule)
.catch(err => console.error(err));

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

@ -1,64 +0,0 @@
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* 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
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/

26
npm/ng-packs/nx/ng-packs/apps/dev-app/src/styles.scss

@ -1,26 +0,0 @@
/* You can add global styles to this file, and also import other style files */
@keyframes donut-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.donut {
display: inline-block;
border: 4px solid rgba(0, 0, 0, 0.1);
border-left-color: #7983ff;
border-radius: 50%;
width: 30px;
height: 30px;
animation: donut-spin 1.2s linear infinite;
&.centered {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}

16
npm/ng-packs/nx/ng-packs/apps/dev-app/tsconfig.prod.json

@ -1,16 +0,0 @@
{
"extends": "../../tsconfig.prod.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"types": [],
"paths": {}
},
"angularCompilerOptions": {
"enableIvy": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
},
"files": ["src/main.ts", "src/polyfills.ts"],
"include": ["src/**/*.ts"],
"exclude": ["src/test.ts", "src/**/*.spec.ts", "src/environments/*.ts"]
}

5
npm/ng-packs/nx/ng-packs/jest.config.js

@ -1,5 +0,0 @@
const { getJestProjects } = require('@nrwl/jest');
module.exports = {
projects: getJestProjects(),
};

5
npm/ng-packs/nx/ng-packs/lerna.publish.json

@ -1,5 +0,0 @@
{
"version": "1.0.0",
"packages": ["dist/packages/*"],
"npmClient": "yarn"
}

7
npm/ng-packs/nx/ng-packs/lerna.version.json

@ -1,7 +0,0 @@
{
"version": "4.4.0",
"packages": [
"packages/*"
],
"npmClient": "yarn"
}

135
npm/ng-packs/nx/ng-packs/package.json

@ -1,135 +0,0 @@
{
"name": "abp-ng-packs",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "nx",
"nx": "nx",
"start": "ng serve",
"build": "ng build",
"build:all": "nx run-many --target=build --all --exclude=dev-app,schematics",
"test": "ng test --detect-open-handles=true --run-in-band=true --watch-all=true",
"test:all": "nx run-many --target=test --all",
"lint": "nx workspace-lint && ng lint",
"lint:all": "nx run-many --target=lint --all",
"e2e": "ng e2e",
"affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs",
"affected:build": "nx affected:build",
"affected:e2e": "nx affected:e2e",
"affected:test": "nx affected:test",
"affected:lint": "nx affected:lint",
"affected:dep-graph": "nx affected:dep-graph",
"affected": "nx affected",
"format": "nx format:write",
"format:write": "nx format:write",
"format:check": "nx format:check",
"update": "nx migrate latest",
"workspace-generator": "nx workspace-generator",
"dep-graph": "nx dep-graph",
"help": "nx help",
"compile:ivy": "yarn ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points --tsconfig './tsconfig.prod.json' --source node_modules",
"postinstall": "node ./decorate-angular-cli.js && yarn compile:ivy",
"build:schematics": "cd scripts && yarn && yarn build:schematics && cd ..",
"dev:schematics": "tsc -p packages/schematics/tsconfig.json -w",
"ci": "yarn affected:lint && yarn affected:build && yarn affected:test",
"lerna": "lerna"
},
"private": true,
"devDependencies": {
"@abp/ng.account": "~4.4.0",
"@abp/ng.account.core": "~4.4.0",
"@abp/ng.core": "~4.4.0",
"@abp/ng.feature-management": "~4.4.0",
"@abp/ng.identity": "~4.4.0",
"@abp/ng.permission-management": "~4.4.0",
"@abp/ng.schematics": "~4.4.0",
"@abp/ng.setting-management": "~4.4.0",
"@abp/ng.tenant-management": "~4.4.0",
"@abp/ng.theme.basic": "~4.4.0",
"@abp/ng.theme.shared": "~4.4.0",
"@abp/utils": "^4.4.0",
"@angular-devkit/build-angular": "~12.2.0",
"@angular-devkit/build-ng-packagr": "^0.1002.0",
"@angular-devkit/schematics-cli": "~12.2.0",
"@angular-eslint/eslint-plugin": "~12.3.0",
"@angular-eslint/eslint-plugin-template": "~12.3.0",
"@angular-eslint/template-parser": "~12.3.0",
"@angular/animations": "~12.2.0",
"@angular/cli": "~12.2.0",
"@angular/common": "~12.2.0",
"@angular/compiler": "~12.2.0",
"@angular/compiler-cli": "^12.2.0",
"@angular/core": "~12.2.0",
"@angular/forms": "~12.2.0",
"@angular/language-service": "^12.2.0",
"@angular/localize": "~12.2.0",
"@angular/platform-browser": "~12.2.0",
"@angular/platform-browser-dynamic": "~12.2.0",
"@angular/router": "~12.2.0",
"@fortawesome/fontawesome-free": "^5.14.0",
"@ng-bootstrap/ng-bootstrap": "^7.0.0",
"@ngneat/spectator": "^8.0.3",
"@ngx-validate/core": "^0.0.13",
"@ngxs/store": "^3.7.0",
"@nrwl/angular": "12.6.5",
"@nrwl/cli": "12.6.5",
"@nrwl/cypress": "12.6.5",
"@nrwl/eslint-plugin-nx": "12.6.5",
"@nrwl/jest": "12.6.5",
"@nrwl/linter": "12.6.5",
"@nrwl/tao": "12.6.5",
"@nrwl/workspace": "12.6.5",
"@schematics/angular": "~12.2.0",
"@swimlane/ngx-datatable": "^17.1.0",
"@types/jest": "26.0.24",
"@types/node": "14.14.33",
"@typescript-eslint/eslint-plugin": "~4.28.3",
"@typescript-eslint/parser": "~4.28.3",
"angular-oauth2-oidc": "^12.0.2",
"bootstrap": "^4.5.0",
"chart.js": "^2.9.3",
"cypress": "^7.3.0",
"dotenv": "~10.0.0",
"eslint": "7.22.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-cypress": "^2.10.3",
"got": "^11.5.2",
"jest": "27.0.3",
"jest-canvas-mock": "^2.3.1",
"jest-preset-angular": "9.0.4",
"jsonc-parser": "^2.3.0",
"just-clone": "^3.1.0",
"just-compare": "^1.3.0",
"lerna": "^3.19.0",
"ng-packagr": "^12.2.0",
"ng-zorro-antd": "^11.0.1",
"ngxs-schematic": "^1.1.9",
"prettier": "^2.3.1",
"protractor": "~7.0.0",
"rxjs": "~6.6.0",
"should-quote": "^1.0.0",
"snq": "^1.0.3",
"ts-jest": "27.0.3",
"ts-node": "~9.1.1",
"ts-toolbelt": "6.15.4",
"tsickle": "^0.39.1",
"tslib": "^2.0.0",
"tslint": "~6.1.0",
"typescript": "~4.3.5",
"zone.js": "~0.11.4"
},
"dependencies": {
"@angular/animations": "^12.1.0",
"@angular/common": "^12.1.0",
"@angular/compiler": "^12.1.0",
"@angular/core": "^12.1.0",
"@angular/forms": "^12.1.0",
"@angular/platform-browser": "^12.1.0",
"@angular/platform-browser-dynamic": "^12.1.0",
"@angular/router": "^12.1.0",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
}
}

3
npm/ng-packs/nx/ng-packs/packages/account-core/README.md

@ -1,3 +0,0 @@
# @abp/ng.account.core
Visit the [ABP documentation](https://docs.abp.io)

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

@ -1,20 +0,0 @@
module.exports = {
displayName: 'account-core',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
coverageDirectory: '../../coverage/packages/account-core',
transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular',
},
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};

7
npm/ng-packs/nx/ng-packs/packages/account-core/ng-package.json

@ -1,7 +0,0 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/packages/account-core",
"lib": {
"entryFile": "src/public-api.ts"
}
}

21
npm/ng-packs/nx/ng-packs/packages/account-core/package.json

@ -1,21 +0,0 @@
{
"name": "@abp/ng.account.core",
"version": "4.4.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"peerDependencies": {
"@abp/ng.core": "~4.4.0",
"@abp/ng.theme.shared": "~4.4.0",
"@angular/common": ">=12.0.0",
"@angular/core": ">=12.0.0"
},
"dependencies": {
"tslib": "^2.0.0"
},
"publishConfig": {
"access": "public"
}
}

46
npm/ng-packs/nx/ng-packs/packages/account-core/src/lib/auth-wrapper.service.ts

@ -1,46 +0,0 @@
import { Injectable, Injector } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { ActivatedRoute } from '@angular/router';
import { ConfigStateService, MultiTenancyService } from '@abp/ng.core';
@Injectable()
export class AuthWrapperService {
isMultiTenancyEnabled$ = this.configState.getDeep$('multiTenancy.isEnabled');
get enableLocalLogin$(): Observable<boolean> {
return this.configState
.getSetting$('Abp.Account.EnableLocalLogin')
.pipe(map(value => value?.toLowerCase() !== 'false'));
}
tenantBoxKey = 'Account.TenantBoxComponent';
route: ActivatedRoute;
get isTenantBoxVisibleForCurrentRoute() {
return this.getMostInnerChild().data.tenantBoxVisible ?? true;
}
get isTenantBoxVisible() {
return this.isTenantBoxVisibleForCurrentRoute && this.multiTenancy.isTenantBoxVisible;
}
constructor(
public readonly multiTenancy: MultiTenancyService,
private configState: ConfigStateService,
injector: Injector,
) {
this.route = injector.get(ActivatedRoute);
}
private getMostInnerChild() {
let child = this.route.snapshot;
let depth = 0;
const depthLimit = 10;
while (child.firstChild && depth < depthLimit) {
child = child.firstChild;
depth++;
}
return child;
}
}

68
npm/ng-packs/nx/ng-packs/packages/account-core/src/lib/tenant-box.service.ts

@ -1,68 +0,0 @@
import { Injectable } from '@angular/core';
import { ToasterService } from '@abp/ng.theme.shared';
import {
AbpApplicationConfigurationService,
AbpTenantService,
ConfigStateService,
CurrentTenantDto,
SessionStateService,
} from '@abp/ng.core';
import { finalize } from 'rxjs/operators';
@Injectable()
export class TenantBoxService {
currentTenant$ = this.sessionState.getTenant$();
name: string;
isModalVisible: boolean;
modalBusy: boolean;
constructor(
private toasterService: ToasterService,
private tenantService: AbpTenantService,
private sessionState: SessionStateService,
private configState: ConfigStateService,
private appConfigService: AbpApplicationConfigurationService,
) {}
onSwitch() {
const tenant = this.sessionState.getTenant();
this.name = tenant?.name;
this.isModalVisible = true;
}
save() {
if (!this.name) {
this.setTenant(null);
this.isModalVisible = false;
return;
}
this.modalBusy = true;
this.tenantService
.findTenantByName(this.name, {})
.pipe(finalize(() => (this.modalBusy = false)))
.subscribe(({ success, tenantId: id, ...tenant }) => {
if (!success) {
this.showError();
return;
}
this.setTenant({ ...tenant, id, isAvailable: true });
this.isModalVisible = false;
});
}
private setTenant(tenant: CurrentTenantDto) {
this.sessionState.setTenant(tenant);
this.appConfigService.get().subscribe(res => this.configState.setState(res));
}
private showError() {
this.toasterService.error('AbpUiMultiTenancy::GivenTenantIsNotAvailable', 'AbpUi::Error', {
messageLocalizationParams: [this.name],
});
}
}

6
npm/ng-packs/nx/ng-packs/packages/account-core/src/public-api.ts

@ -1,6 +0,0 @@
/*
* Public API Surface of account-core
*/
export * from './lib/auth-wrapper.service';
export * from './lib/tenant-box.service';

14
npm/ng-packs/nx/ng-packs/packages/account-core/tsconfig.lib.json

@ -1,14 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"lib": ["dom", "es2018"]
},
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
"include": ["**/*.ts"]
}

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

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

11
npm/ng-packs/nx/ng-packs/packages/account-core/tsconfig.spec.json

@ -1,11 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"],
"esModuleInterop": true
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}

3
npm/ng-packs/nx/ng-packs/packages/account/README.md

@ -1,3 +0,0 @@
<h1> @abp/ng.account </h1>
[docs.abp.io](https://docs.abp.io)

7
npm/ng-packs/nx/ng-packs/packages/account/config/ng-package.json

@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/packages/account/config",
"lib": {
"entryFile": "src/public-api.ts"
}
}

21
npm/ng-packs/nx/ng-packs/packages/account/config/src/account-config.module.ts

@ -1,21 +0,0 @@
import { Injector, ModuleWithProviders, NgModule } from '@angular/core';
import { NAVIGATE_TO_MANAGE_PROFILE } from '@abp/ng.core';
import { ACCOUNT_ROUTE_PROVIDERS } from './providers/route.provider';
import { navigateToManageProfileFactory } from './utils/factories';
@NgModule()
export class AccountConfigModule {
static forRoot(): ModuleWithProviders<AccountConfigModule> {
return {
ngModule: AccountConfigModule,
providers: [
ACCOUNT_ROUTE_PROVIDERS,
{
provide: NAVIGATE_TO_MANAGE_PROFILE,
useFactory: navigateToManageProfileFactory,
deps: [Injector],
},
],
};
}
}

1
npm/ng-packs/nx/ng-packs/packages/account/config/src/enums/index.ts

@ -1 +0,0 @@
export * from './route-names';

8
npm/ng-packs/nx/ng-packs/packages/account/config/src/enums/route-names.ts

@ -1,8 +0,0 @@
export const enum eAccountRouteNames {
Account = 'AbpAccount::Menu:Account',
Login = 'AbpAccount::Login',
Register = 'AbpAccount::Register',
ManageProfile = 'AbpAccount::MyAccount',
ForgotPassword = 'AbpAccount::ForgotPassword',
ResetPassword = 'AbpAccount::ResetPassword',
}

1
npm/ng-packs/nx/ng-packs/packages/account/config/src/providers/index.ts

@ -1 +0,0 @@
export * from './route.provider';

52
npm/ng-packs/nx/ng-packs/packages/account/config/src/providers/route.provider.ts

@ -1,52 +0,0 @@
import { eLayoutType, RoutesService } from '@abp/ng.core';
import { APP_INITIALIZER } from '@angular/core';
import { eAccountRouteNames } from '../enums/route-names';
export const ACCOUNT_ROUTE_PROVIDERS = [
{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService], multi: true },
];
export function configureRoutes(routes: RoutesService) {
return () => {
routes.add([
{
path: undefined,
name: eAccountRouteNames.Account,
invisible: true,
layout: eLayoutType.account,
order: 1,
},
{
path: '/account/login',
name: eAccountRouteNames.Login,
parentName: eAccountRouteNames.Account,
order: 1,
},
{
path: '/account/register',
name: eAccountRouteNames.Register,
parentName: eAccountRouteNames.Account,
order: 2,
},
{
path: '/account/manage',
name: eAccountRouteNames.ManageProfile,
parentName: eAccountRouteNames.Account,
layout: eLayoutType.application,
order: 3,
},
{
path: '/account/forgot-password',
parentName: eAccountRouteNames.Account,
name: eAccountRouteNames.ForgotPassword,
invisible: true,
},
{
path: '/account/reset-password',
parentName: eAccountRouteNames.Account,
name: eAccountRouteNames.ResetPassword,
invisible: true,
},
]);
};
}

3
npm/ng-packs/nx/ng-packs/packages/account/config/src/public-api.ts

@ -1,3 +0,0 @@
export * from './account-config.module';
export * from './enums';
export * from './providers';

13
npm/ng-packs/nx/ng-packs/packages/account/config/src/utils/factories.ts

@ -1,13 +0,0 @@
import { Injector } from '@angular/core';
import { RoutesService } from '@abp/ng.core';
import { Router } from '@angular/router';
import { eAccountRouteNames } from '../enums/route-names';
export function navigateToManageProfileFactory(injector: Injector) {
return () => {
const router = injector.get(Router);
const routes = injector.get(RoutesService);
const { path } = routes.find(item => item.name === eAccountRouteNames.ManageProfile);
router.navigateByUrl(path);
};
}

20
npm/ng-packs/nx/ng-packs/packages/account/jest.config.js

@ -1,20 +0,0 @@
module.exports = {
displayName: 'account',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
coverageDirectory: '../../coverage/packages/account',
transform: {
'^.+\\.(ts|js|html)$': 'jest-preset-angular',
},
snapshotSerializers: [
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
],
};

8
npm/ng-packs/nx/ng-packs/packages/account/ng-package.json

@ -1,8 +0,0 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/packages/account",
"lib": {
"entryFile": "src/public-api.ts"
},
"allowedNonPeerDependencies": ["@abp/ng.theme.shared"]
}

16
npm/ng-packs/nx/ng-packs/packages/account/package.json

@ -1,16 +0,0 @@
{
"name": "@abp/ng.account",
"version": "4.4.0",
"homepage": "https://abp.io",
"repository": {
"type": "git",
"url": "https://github.com/abpframework/abp.git"
},
"dependencies": {
"@abp/ng.theme.shared": "~4.4.0",
"tslib": "^2.0.0"
},
"publishConfig": {
"access": "public"
}
}

87
npm/ng-packs/nx/ng-packs/packages/account/src/lib/account-routing.module.ts

@ -1,87 +0,0 @@
import {
AuthGuard,
DynamicLayoutComponent,
ReplaceableComponents,
ReplaceableRouteContainerComponent,
} from '@abp/ng.core';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ForgotPasswordComponent } from './components/forgot-password/forgot-password.component';
import { LoginComponent } from './components/login/login.component';
import { ManageProfileComponent } from './components/manage-profile/manage-profile.component';
import { RegisterComponent } from './components/register/register.component';
import { ResetPasswordComponent } from './components/reset-password/reset-password.component';
import { eAccountComponents } from './enums/components';
import { AuthenticationFlowGuard } from './guards/authentication-flow.guard';
const routes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: 'login' },
{
path: '',
component: DynamicLayoutComponent,
children: [
{
path: 'login',
component: ReplaceableRouteContainerComponent,
canActivate: [AuthenticationFlowGuard],
data: {
replaceableComponent: {
key: eAccountComponents.Login,
defaultComponent: LoginComponent,
} as ReplaceableComponents.RouteData<LoginComponent>,
},
},
{
path: 'register',
component: ReplaceableRouteContainerComponent,
canActivate: [AuthenticationFlowGuard],
data: {
replaceableComponent: {
key: eAccountComponents.Register,
defaultComponent: RegisterComponent,
} as ReplaceableComponents.RouteData<RegisterComponent>,
},
},
{
path: 'forgot-password',
component: ReplaceableRouteContainerComponent,
canActivate: [AuthenticationFlowGuard],
data: {
replaceableComponent: {
key: eAccountComponents.ForgotPassword,
defaultComponent: ForgotPasswordComponent,
} as ReplaceableComponents.RouteData<ForgotPasswordComponent>,
},
},
{
path: 'reset-password',
component: ReplaceableRouteContainerComponent,
canActivate: [],
data: {
tenantBoxVisible: false,
replaceableComponent: {
key: eAccountComponents.ResetPassword,
defaultComponent: ResetPasswordComponent,
} as ReplaceableComponents.RouteData<ResetPasswordComponent>,
},
},
{
path: 'manage',
component: ReplaceableRouteContainerComponent,
canActivate: [AuthGuard],
data: {
replaceableComponent: {
key: eAccountComponents.ManageProfile,
defaultComponent: ManageProfileComponent,
} as ReplaceableComponents.RouteData<ManageProfileComponent>,
},
},
],
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class AccountRoutingModule {}

59
npm/ng-packs/nx/ng-packs/packages/account/src/lib/account.module.ts

@ -1,59 +0,0 @@
import { CoreModule, LazyModuleFactory } from '@abp/ng.core';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { ModuleWithProviders, NgModule, NgModuleFactory } from '@angular/core';
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { NgxValidateCoreModule } from '@ngx-validate/core';
import { AccountRoutingModule } from './account-routing.module';
import { ChangePasswordComponent } from './components/change-password/change-password.component';
import { LoginComponent } from './components/login/login.component';
import { ManageProfileComponent } from './components/manage-profile/manage-profile.component';
import { PersonalSettingsComponent } from './components/personal-settings/personal-settings.component';
import { RegisterComponent } from './components/register/register.component';
import { AccountConfigOptions } from './models/config-options';
import { ACCOUNT_CONFIG_OPTIONS } from './tokens/config-options.token';
import { accountConfigOptionsFactory } from './utils/factory-utils';
import { AuthenticationFlowGuard } from './guards/authentication-flow.guard';
import { ForgotPasswordComponent } from './components/forgot-password/forgot-password.component';
import { ResetPasswordComponent } from './components/reset-password/reset-password.component';
const declarations = [
LoginComponent,
RegisterComponent,
ChangePasswordComponent,
ManageProfileComponent,
PersonalSettingsComponent,
ForgotPasswordComponent,
ResetPasswordComponent,
];
@NgModule({
declarations: [...declarations],
imports: [
CoreModule,
AccountRoutingModule,
ThemeSharedModule,
NgbDropdownModule,
NgxValidateCoreModule,
],
exports: [...declarations],
})
export class AccountModule {
static forChild(options = {} as AccountConfigOptions): ModuleWithProviders<AccountModule> {
return {
ngModule: AccountModule,
providers: [
AuthenticationFlowGuard,
{ provide: ACCOUNT_CONFIG_OPTIONS, useValue: options },
{
provide: 'ACCOUNT_OPTIONS',
useFactory: accountConfigOptionsFactory,
deps: [ACCOUNT_CONFIG_OPTIONS],
},
],
};
}
static forLazy(options = {} as AccountConfigOptions): NgModuleFactory<AccountModule> {
return new LazyModuleFactory(AccountModule.forChild(options));
}
}

48
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/change-password/change-password.component.html

@ -1,48 +0,0 @@
<form [formGroup]="form" (ngSubmit)="onSubmit()" [mapErrorsFn]="mapErrorsFn" validateOnSubmit>
<div *ngIf="!hideCurrentPassword" class="form-group">
<label for="current-password">{{
'AbpIdentity::DisplayName:CurrentPassword' | abpLocalization
}}</label
><span> * </span
><input
type="password"
id="current-password"
class="form-control"
formControlName="password"
autofocus
autocomplete="current-password"
/>
</div>
<div class="form-group">
<label for="new-password">{{ 'AbpIdentity::DisplayName:NewPassword' | abpLocalization }}</label
><span> * </span
><input
type="password"
id="new-password"
class="form-control"
formControlName="newPassword"
autocomplete="new-password"
/>
</div>
<div class="form-group">
<label for="confirm-new-password">{{
'AbpIdentity::DisplayName:NewPasswordConfirm' | abpLocalization
}}</label
><span> * </span
><input
type="password"
id="confirm-new-password"
class="form-control"
formControlName="repeatNewPassword"
autocomplete="new-password"
/>
</div>
<abp-button
iconClass="fa fa-check"
buttonClass="btn btn-primary color-white"
buttonType="submit"
[loading]="inProgress"
[disabled]="form?.invalid"
>{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button
>
</form>

100
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/change-password/change-password.component.ts

@ -1,100 +0,0 @@
import { Profile, ProfileService } from '@abp/ng.core';
import { getPasswordValidators, ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, Input, OnInit } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { comparePasswords, Validation } from '@ngx-validate/core';
import { finalize } from 'rxjs/operators';
import snq from 'snq';
import { Account } from '../../models/account';
import { ManageProfileStateService } from '../../services/manage-profile.state.service';
const { required } = Validators;
const PASSWORD_FIELDS = ['newPassword', 'repeatNewPassword'];
@Component({
selector: 'abp-change-password-form',
templateUrl: './change-password.component.html',
exportAs: 'abpChangePasswordForm',
})
export class ChangePasswordComponent
implements OnInit, Account.ChangePasswordComponentInputs, Account.ChangePasswordComponentOutputs
{
form: FormGroup;
inProgress: boolean;
hideCurrentPassword: boolean;
mapErrorsFn: Validation.MapErrorsFn = (errors, groupErrors, control) => {
if (PASSWORD_FIELDS.indexOf(String(control.name)) < 0) return errors;
return errors.concat(groupErrors.filter(({ key }) => key === 'passwordMismatch'));
};
constructor(
private fb: FormBuilder,
private injector: Injector,
private toasterService: ToasterService,
private profileService: ProfileService,
private manageProfileState: ManageProfileStateService,
) {}
ngOnInit(): void {
this.hideCurrentPassword = !this.manageProfileState.getProfile()?.hasPassword;
const passwordValidations = getPasswordValidators(this.injector);
this.form = this.fb.group(
{
password: ['', required],
newPassword: [
'',
{
validators: [required, ...passwordValidations],
},
],
repeatNewPassword: [
'',
{
validators: [required, ...passwordValidations],
},
],
},
{
validators: [comparePasswords(PASSWORD_FIELDS)],
},
);
if (this.hideCurrentPassword) this.form.removeControl('password');
}
onSubmit() {
if (this.form.invalid) return;
this.inProgress = true;
this.profileService
.changePassword({
...(!this.hideCurrentPassword && { currentPassword: this.form.get('password').value }),
newPassword: this.form.get('newPassword').value,
})
.pipe(finalize(() => (this.inProgress = false)))
.subscribe({
next: () => {
this.form.reset();
this.toasterService.success('AbpAccount::PasswordChangedMessage', '', {
life: 5000,
});
if (this.hideCurrentPassword) {
this.hideCurrentPassword = false;
this.form.addControl('password', new FormControl('', [required]));
}
},
error: err => {
this.toasterService.error(
snq(() => err.error.error.message, 'AbpAccount::DefaultErrorMessage'),
);
},
});
}
}

40
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.html

@ -1,40 +0,0 @@
<h4>{{ 'AbpAccount::ForgotPassword' | abpLocalization }}</h4>
<form
*ngIf="!isEmailSent; else emailSentTemplate"
[formGroup]="form"
(ngSubmit)="onSubmit()"
validateOnSubmit
>
<p>{{ 'AbpAccount::SendPasswordResetLink_Information' | abpLocalization }}</p>
<div class="form-group">
<label for="input-email-address">{{ 'AbpAccount::EmailAddress' | abpLocalization }}</label
><span> * </span>
<input type="email" id="input-email-address" class="form-control" formControlName="email" />
</div>
<abp-button
class="d-block"
buttonClass="mt-2 mb-3 btn btn-primary btn-block"
[loading]="inProgress"
buttonType="submit"
[disabled]="form?.invalid"
>
{{ 'AbpAccount::Submit' | abpLocalization }}
</abp-button>
<a routerLink="/account/login"
><i class="fa fa-long-arrow-left mr-1"></i>{{ 'AbpAccount::Login' | abpLocalization }}</a
>
</form>
<ng-template #emailSentTemplate>
<p>
{{ 'AbpAccount::PasswordResetMailSentMessage' | abpLocalization }}
</p>
<a routerLink="/account/login">
<button class="d-block mt-2 mb-3 btn btn-primary btn-block">
<i class="fa fa-long-arrow-left mr-1"></i>
{{ 'AbpAccount::BackToLogin' | abpLocalization }}
</button>
</a>
</ng-template>

38
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/forgot-password/forgot-password.component.ts

@ -1,38 +0,0 @@
import { Component } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { finalize } from 'rxjs/operators';
import { AccountService } from '../../proxy/account/account.service';
@Component({
selector: 'abp-forgot-password',
templateUrl: 'forgot-password.component.html',
})
export class ForgotPasswordComponent {
form: FormGroup;
inProgress: boolean;
isEmailSent = false;
constructor(private fb: FormBuilder, private accountService: AccountService) {
this.form = this.fb.group({
email: ['', [Validators.required, Validators.email]],
});
}
onSubmit() {
if (this.form.invalid) return;
this.inProgress = true;
this.accountService
.sendPasswordResetCode({
email: this.form.get('email').value,
appName: 'Angular',
})
.pipe(finalize(() => (this.inProgress = false)))
.subscribe(() => {
this.isEmailSent = true;
});
}
}

7
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/index.ts

@ -1,7 +0,0 @@
export * from './change-password/change-password.component';
export * from './forgot-password/forgot-password.component';
export * from './login/login.component';
export * from './manage-profile/manage-profile.component';
export * from './register/register.component';
export * from './personal-settings/personal-settings.component';
export * from './reset-password/reset-password.component';

60
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/login/login.component.html

@ -1,60 +0,0 @@
<h4>{{ 'AbpAccount::Login' | abpLocalization }}</h4>
<strong *ngIf="isSelfRegistrationEnabled">
{{ 'AbpAccount::AreYouANewUser' | abpLocalization }}
<a class="text-decoration-none" routerLink="/account/register" queryParamsHandling="preserve">{{
'AbpAccount::Register' | abpLocalization
}}</a>
</strong>
<form [formGroup]="form" (ngSubmit)="onSubmit()" validateOnSubmit class="mt-4">
<div class="form-group">
<label for="login-input-user-name-or-email-address">{{
'AbpAccount::UserNameOrEmailAddress' | abpLocalization
}}</label>
<input
class="form-control"
type="text"
id="login-input-user-name-or-email-address"
formControlName="username"
autocomplete="username"
autofocus
/>
</div>
<div class="form-group">
<label for="login-input-password">{{ 'AbpAccount::Password' | abpLocalization }}</label>
<input
class="form-control"
type="password"
id="login-input-password"
formControlName="password"
autocomplete="current-password"
/>
</div>
<div class="row">
<div class="col">
<label class="custom-checkbox custom-control mb-2" for="login-input-remember-me">
<input
class="form-check-input"
type="checkbox"
id="login-input-remember-me"
formControlName="rememberMe"
/>
{{ 'AbpAccount::RememberMe' | abpLocalization }}
</label>
</div>
<div class="text-right col">
<a routerLink="/account/forgot-password">{{
'AbpAccount::ForgotPassword' | abpLocalization
}}</a>
</div>
</div>
<abp-button
[loading]="inProgress"
buttonType="submit"
name="Action"
buttonClass="btn-block btn-lg mt-3 btn btn-primary"
>
{{ 'AbpAccount::Login' | abpLocalization }}
</abp-button>
</form>

80
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/login/login.component.ts

@ -1,80 +0,0 @@
import { ConfigStateService, AuthService } from '@abp/ng.core';
import { ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Store } from '@ngxs/store';
import { throwError } from 'rxjs';
import { catchError, finalize } from 'rxjs/operators';
import snq from 'snq';
import { eAccountComponents } from '../../enums/components';
import { getRedirectUrl } from '../../utils/auth-utils';
const { maxLength, required } = Validators;
@Component({
selector: 'abp-login',
templateUrl: './login.component.html',
})
export class LoginComponent implements OnInit {
form: FormGroup;
inProgress: boolean;
isSelfRegistrationEnabled = true;
authWrapperKey = eAccountComponents.AuthWrapper;
constructor(
protected injector: Injector,
protected fb: FormBuilder,
protected toasterService: ToasterService,
protected authService: AuthService,
protected configState: ConfigStateService,
) {}
ngOnInit() {
this.init();
this.buildForm();
}
protected init() {
this.isSelfRegistrationEnabled =
(
(this.configState.getSetting('Abp.Account.IsSelfRegistrationEnabled') as string) || ''
).toLowerCase() !== 'false';
}
protected buildForm() {
this.form = this.fb.group({
username: ['', [required, maxLength(255)]],
password: ['', [required, maxLength(128)]],
rememberMe: [false],
});
}
onSubmit() {
if (this.form.invalid) return;
this.inProgress = true;
const { username, password, rememberMe } = this.form.value;
const redirectUrl = getRedirectUrl(this.injector);
this.authService
.login({ username, password, rememberMe, redirectUrl })
.pipe(
catchError(err => {
this.toasterService.error(
snq(() => err.error.error_description) ||
snq(() => err.error.error.message, 'AbpAccount::DefaultErrorMessage'),
'Error',
{ life: 7000 },
);
return throwError(err);
}),
finalize(() => (this.inProgress = false)),
)
.subscribe();
}
}

62
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.html

@ -1,62 +0,0 @@
<div id="AbpContentToolbar"></div>
<div class="card border-0 shadow-sm min-h-400" [abpLoading]="(profile$ | async)?.userName">
<div class="card-body">
<div class="row">
<div class="col-12 col-md-3">
<ul class="nav flex-column nav-pills" id="nav-tab" role="tablist">
<li
*ngIf="!hideChangePasswordTab && (profile$ | async)"
class="nav-item"
(click)="selectedTab = 0"
>
<a
class="nav-link"
[ngClass]="{ active: selectedTab === 0 }"
role="tab"
href="javascript:void(0)"
>{{ 'AbpUi::ChangePassword' | abpLocalization }}</a
>
</li>
<li class="nav-item mb-2" (click)="selectedTab = 1">
<a
class="nav-link"
[ngClass]="{ active: selectedTab === 1 }"
role="tab"
href="javascript:void(0)"
>{{ 'AbpAccount::PersonalSettings' | abpLocalization }}</a
>
</li>
</ul>
</div>
<div *ngIf="profile$ | async" class="col-12 col-md-9">
<div class="tab-content" *ngIf="selectedTab === 0" [@fadeIn]>
<div class="tab-pane active" role="tabpanel">
<h4>
{{ 'AbpIdentity::ChangePassword' | abpLocalization }}
<hr />
</h4>
<abp-change-password-form
*abpReplaceableTemplate="{
componentKey: changePasswordKey
}"
></abp-change-password-form>
</div>
</div>
<div class="tab-content" *ngIf="selectedTab === 1" [@fadeIn]>
<div class="tab-pane active" role="tabpanel">
<h4>
{{ 'AbpIdentity::PersonalSettings' | abpLocalization }}
<hr />
</h4>
<abp-personal-settings-form
*abpReplaceableTemplate="{
componentKey: personalSettingsKey
}"
></abp-personal-settings-form>
</div>
</div>
</div>
</div>
</div>
</div>

45
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/manage-profile/manage-profile.component.ts

@ -1,45 +0,0 @@
import { Profile, ProfileService } from '@abp/ng.core';
import { fadeIn } from '@abp/ng.theme.shared';
import { transition, trigger, useAnimation } from '@angular/animations';
import { Component, OnInit } from '@angular/core';
import { eAccountComponents } from '../../enums/components';
import { ManageProfileStateService } from '../../services/manage-profile.state.service';
@Component({
selector: 'abp-manage-profile',
templateUrl: './manage-profile.component.html',
animations: [trigger('fadeIn', [transition(':enter', useAnimation(fadeIn))])],
styles: [
`
.min-h-400 {
min-height: 400px;
}
`,
],
})
export class ManageProfileComponent implements OnInit {
selectedTab = 0;
changePasswordKey = eAccountComponents.ChangePassword;
personalSettingsKey = eAccountComponents.PersonalSettings;
profile$ = this.manageProfileState.getProfile$();
hideChangePasswordTab: boolean;
constructor(
protected profileService: ProfileService,
protected manageProfileState: ManageProfileStateService,
) {}
ngOnInit() {
this.profileService.get().subscribe(profile => {
this.manageProfileState.setProfile(profile);
if (profile.isExternal) {
this.hideChangePasswordTab = true;
this.selectedTab = 1;
}
});
}
}

46
npm/ng-packs/nx/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.html

@ -1,46 +0,0 @@
<form validateOnSubmit *ngIf="form" [formGroup]="form" (ngSubmit)="submit()">
<div class="form-group">
<label for="username">{{ 'AbpIdentity::DisplayName:UserName' | abpLocalization }}</label
><span> * </span
><input
type="text"
id="username"
class="form-control"
formControlName="userName"
autofocus
(keydown.space)="$event.preventDefault()"
/>
</div>
<div class="row">
<div class="col col-md-6">
<div class="form-group">
<label for="name">{{ 'AbpIdentity::DisplayName:Name' | abpLocalization }}</label
><input type="text" id="name" class="form-control" formControlName="name" />
</div>
</div>
<div class="col col-md-6">
<div class="form-group">
<label for="surname">{{ 'AbpIdentity::DisplayName:Surname' | abpLocalization }}</label
><input type="text" id="surname" class="form-control" formControlName="surname" />
</div>
</div>
</div>
<div class="form-group">
<label for="email-address">{{ 'AbpIdentity::DisplayName:Email' | abpLocalization }}</label
><span> * </span
><input type="text" id="email-address" class="form-control" formControlName="email" />
</div>
<div class="form-group">
<label for="phone-number">{{ 'AbpIdentity::DisplayName:PhoneNumber' | abpLocalization }}</label
><input type="text" id="phone-number" class="form-control" formControlName="phoneNumber" />
</div>
<abp-button
buttonType="submit"
iconClass="fa fa-check"
buttonClass="btn btn-primary color-white"
[loading]="inProgress"
[disabled]="form?.invalid"
>
{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button
>
</form>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save