mirror of https://github.com/abpframework/abp.git
1207 changed files with 6521 additions and 123505 deletions
@ -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; |
|
||||
@ -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"] |
|
||||
} |
|
||||
@ -1,9 +1,11 @@ |
|||||
{ |
{ |
||||
"extends": "../../tsconfig.json", |
"extends": "./tsconfig.json", |
||||
"compilerOptions": { |
"compilerOptions": { |
||||
"outDir": "../../out-tsc/spec", |
"outDir": "../../dist/out-tsc", |
||||
"types": ["node", "jest"] |
"module": "commonjs", |
||||
|
"types": ["jest", "node"], |
||||
|
"esModuleInterop": true |
||||
}, |
}, |
||||
"files": ["src/polyfills.ts"], |
"files": ["src/test-setup.ts"], |
||||
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"] |
"include": ["**/*.spec.ts", "**/*.d.ts"] |
||||
} |
} |
||||
|
|||||
@ -1,7 +0,0 @@ |
|||||
{ |
|
||||
"extends": "../../tslint.json", |
|
||||
"rules": { |
|
||||
"directive-selector": [true, "attribute", "app", "camelCase"], |
|
||||
"component-selector": [true, "element", "app", "kebab-case"] |
|
||||
} |
|
||||
} |
|
||||
@ -1,19 +1,5 @@ |
|||||
|
const { getJestProjects } = require('@nrwl/jest'); |
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
globals: { |
projects: getJestProjects(), |
||||
'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',
|
|
||||
// ],
|
|
||||
}; |
}; |
||||
|
|||||
@ -1,5 +1,5 @@ |
|||||
{ |
{ |
||||
"version": "1.1.1", |
"version": "1.0.0", |
||||
"packages": ["dist/*"], |
"packages": ["dist/packages/*"], |
||||
"npmClient": "yarn" |
"npmClient": "yarn" |
||||
} |
} |
||||
|
|||||
@ -1,5 +1,7 @@ |
|||||
{ |
{ |
||||
"version": "4.4.0", |
"version": "4.4.0", |
||||
"packages": ["packages/*"], |
"packages": [ |
||||
|
"packages/*" |
||||
|
], |
||||
"npmClient": "yarn" |
"npmClient": "yarn" |
||||
} |
} |
||||
|
|||||
@ -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.* |
|
||||
@ -1,6 +0,0 @@ |
|||||
{ |
|
||||
"printWidth": 100, |
|
||||
"singleQuote": true, |
|
||||
"trailingComma": "all", |
|
||||
"arrowParens": "avoid" |
|
||||
} |
|
||||
@ -1,9 +0,0 @@ |
|||||
{ |
|
||||
"recommendations": [ |
|
||||
"angular.ng-template", |
|
||||
"nrwl.angular-console", |
|
||||
"esbenp.prettier-vscode", |
|
||||
"firsttris.vscode-jest-runner", |
|
||||
"dbaeumer.vscode-eslint" |
|
||||
] |
|
||||
} |
|
||||
@ -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! |
|
||||
@ -1,24 +0,0 @@ |
|||||
# Abp Ng Packages |
|
||||
|
|
||||
<a href="https://github.com/abpframework/abp/actions?query=workflow%3AAngular"></a> |
|
||||
<a href="https://github.com/abpframework/abp/labels/ui-angular"></a> |
|
||||
<a href="https://github.com/abpframework/abp/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3Aui-angular"></a> |
|
||||
<a href="https://npmjs.org/package/@abp/ng.core"></a> |
|
||||
 |
|
||||
|
|
||||
## 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). |
|
||||
@ -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" |
|
||||
} |
|
||||
@ -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. |
|
||||
@ -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 {} |
|
||||
@ -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 {} |
|
||||
@ -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 {} |
|
||||
@ -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 {} |
|
||||
@ -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&title=&aria-label=Star%20tabalinas%2Fjsgrid%20on%20GitHub&data-icon=octicon-star&data-text=Star&data-size=large&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&title=&aria-label=Issue%20tabalinas%2Fjsgrid%20on%20GitHub&data-icon=octicon-issue-opened&data-text=Issue&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&title=&aria-label=Fork%20tabalinas%2Fjsgrid%20on%20GitHub&data-icon=octicon-repo-forked&data-text=Fork&data-size=large&" |
|
||||
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> |
|
||||
@ -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(); |
|
||||
} |
|
||||
} |
|
||||
@ -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 {} |
|
||||
@ -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, |
|
||||
}, |
|
||||
]); |
|
||||
}; |
|
||||
} |
|
||||
@ -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 {} |
|
||||
@ -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; |
|
||||
@ -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; |
|
||||
|
Before Width: | Height: | Size: 101 KiB |
@ -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> |
|
||||
@ -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)); |
|
||||
@ -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 |
|
||||
*/ |
|
||||
@ -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%); |
|
||||
} |
|
||||
} |
|
||||
@ -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"] |
|
||||
} |
|
||||
@ -1,5 +0,0 @@ |
|||||
const { getJestProjects } = require('@nrwl/jest'); |
|
||||
|
|
||||
module.exports = { |
|
||||
projects: getJestProjects(), |
|
||||
}; |
|
||||
@ -1,5 +0,0 @@ |
|||||
{ |
|
||||
"version": "1.0.0", |
|
||||
"packages": ["dist/packages/*"], |
|
||||
"npmClient": "yarn" |
|
||||
} |
|
||||
@ -1,7 +0,0 @@ |
|||||
{ |
|
||||
"version": "4.4.0", |
|
||||
"packages": [ |
|
||||
"packages/*" |
|
||||
], |
|
||||
"npmClient": "yarn" |
|
||||
} |
|
||||
@ -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" |
|
||||
} |
|
||||
} |
|
||||
@ -1,3 +0,0 @@ |
|||||
# @abp/ng.account.core |
|
||||
|
|
||||
Visit the [ABP documentation](https://docs.abp.io) |
|
||||
@ -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', |
|
||||
], |
|
||||
}; |
|
||||
@ -1,7 +0,0 @@ |
|||||
{ |
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json", |
|
||||
"dest": "../../dist/packages/account-core", |
|
||||
"lib": { |
|
||||
"entryFile": "src/public-api.ts" |
|
||||
} |
|
||||
} |
|
||||
@ -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" |
|
||||
} |
|
||||
} |
|
||||
@ -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; |
|
||||
} |
|
||||
} |
|
||||
@ -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], |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
@ -1,6 +0,0 @@ |
|||||
/* |
|
||||
* Public API Surface of account-core |
|
||||
*/ |
|
||||
|
|
||||
export * from './lib/auth-wrapper.service'; |
|
||||
export * from './lib/tenant-box.service'; |
|
||||
@ -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"] |
|
||||
} |
|
||||
@ -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 |
|
||||
} |
|
||||
} |
|
||||
@ -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"] |
|
||||
} |
|
||||
@ -1,3 +0,0 @@ |
|||||
<h1> @abp/ng.account </h1> |
|
||||
|
|
||||
[docs.abp.io](https://docs.abp.io) |
|
||||
@ -1,7 +0,0 @@ |
|||||
{ |
|
||||
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", |
|
||||
"dest": "../../../dist/packages/account/config", |
|
||||
"lib": { |
|
||||
"entryFile": "src/public-api.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 +0,0 @@ |
|||||
export * from './route-names'; |
|
||||
@ -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 +0,0 @@ |
|||||
export * from './route.provider'; |
|
||||
@ -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, |
|
||||
}, |
|
||||
]); |
|
||||
}; |
|
||||
} |
|
||||
@ -1,3 +0,0 @@ |
|||||
export * from './account-config.module'; |
|
||||
export * from './enums'; |
|
||||
export * from './providers'; |
|
||||
@ -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); |
|
||||
}; |
|
||||
} |
|
||||
@ -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', |
|
||||
], |
|
||||
}; |
|
||||
@ -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"] |
|
||||
} |
|
||||
@ -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" |
|
||||
} |
|
||||
} |
|
||||
@ -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 {} |
|
||||
@ -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)); |
|
||||
} |
|
||||
} |
|
||||
@ -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> |
|
||||
@ -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'), |
|
||||
); |
|
||||
}, |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
@ -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> |
|
||||
@ -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; |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
@ -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'; |
|
||||
@ -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> |
|
||||
@ -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(); |
|
||||
} |
|
||||
} |
|
||||
@ -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> |
|
||||
@ -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; |
|
||||
} |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
@ -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…
Reference in new issue