mirror of https://github.com/abpframework/abp
parent
c6ad4da7b9
commit
6938753783
@ -1,3 +0,0 @@
|
|||||||
# @abp/ng.account.config
|
|
||||||
|
|
||||||
[docs.abp.io](https://docs.abp.io)
|
|
@ -1,6 +0,0 @@
|
|||||||
const jestConfig = require('../../jest.config');
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
...jestConfig,
|
|
||||||
name: 'account-config',
|
|
||||||
};
|
|
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
||||||
"dest": "../../dist/account-config",
|
|
||||||
"lib": {
|
|
||||||
"entryFile": "src/public-api.ts"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@abp/ng.account.config",
|
|
||||||
"version": "2.9.0",
|
|
||||||
"homepage": "https://abp.io",
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/abpframework/abp.git"
|
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,37 +0,0 @@
|
|||||||
import { CoreModule, noop } from '@abp/ng.core';
|
|
||||||
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
||||||
import { APP_INITIALIZER, InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';
|
|
||||||
import { AccountConfigService } from './services/account-config.service';
|
|
||||||
|
|
||||||
export interface AccountConfigOptions {
|
|
||||||
redirectUrl?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function accountOptionsFactory(options: AccountConfigOptions) {
|
|
||||||
return {
|
|
||||||
redirectUrl: '/',
|
|
||||||
...options,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export const ACCOUNT_OPTIONS = new InjectionToken('ACCOUNT_OPTIONS');
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [CoreModule, ThemeSharedModule],
|
|
||||||
providers: [{ provide: APP_INITIALIZER, multi: true, deps: [AccountConfigService], useFactory: noop }],
|
|
||||||
})
|
|
||||||
export class AccountConfigModule {
|
|
||||||
static forRoot(options = {} as AccountConfigOptions): ModuleWithProviders<AccountConfigModule> {
|
|
||||||
return {
|
|
||||||
ngModule: AccountConfigModule,
|
|
||||||
providers: [
|
|
||||||
{ provide: ACCOUNT_OPTIONS, useValue: options },
|
|
||||||
{
|
|
||||||
provide: 'ACCOUNT_OPTIONS',
|
|
||||||
useFactory: accountOptionsFactory,
|
|
||||||
deps: [ACCOUNT_OPTIONS],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
import { addAbpRoutes, eLayoutType } from '@abp/ng.core';
|
|
||||||
import { Injectable } from '@angular/core';
|
|
||||||
import { eAccountRouteNames } from '@abp/ng.account';
|
|
||||||
|
|
||||||
@Injectable({
|
|
||||||
providedIn: 'root',
|
|
||||||
})
|
|
||||||
export class AccountConfigService {
|
|
||||||
constructor() {
|
|
||||||
addAbpRoutes({
|
|
||||||
name: eAccountRouteNames.Account,
|
|
||||||
path: 'account',
|
|
||||||
invisible: true,
|
|
||||||
layout: eLayoutType.application,
|
|
||||||
children: [
|
|
||||||
{ path: 'login', name: eAccountRouteNames.Login, order: 1 },
|
|
||||||
{ path: 'register', name: eAccountRouteNames.Register, order: 2 },
|
|
||||||
{ path: 'manage-profile', name: eAccountRouteNames.ManageProfile, order: 3 },
|
|
||||||
],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
export * from './lib/services/account-config.service';
|
|
||||||
export * from './lib/account-config.module';
|
|
@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.prod.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"outDir": "../../out-tsc/lib",
|
|
||||||
"target": "es2015",
|
|
||||||
"declaration": true,
|
|
||||||
"inlineSources": true,
|
|
||||||
"types": [],
|
|
||||||
"lib": ["dom", "es2018"]
|
|
||||||
},
|
|
||||||
"angularCompilerOptions": {
|
|
||||||
"skipTemplateCodegen": true,
|
|
||||||
"strictMetadataEmit": true,
|
|
||||||
"fullTemplateTypeCheck": true,
|
|
||||||
"strictInjectionParameters": true,
|
|
||||||
"enableResourceInlining": true
|
|
||||||
},
|
|
||||||
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.lib.json",
|
|
||||||
"angularCompilerOptions": {
|
|
||||||
"enableIvy": false
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.prod.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"emitDecoratorMetadata": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"outDir": "../../dist/out-tsc",
|
|
||||||
"module": "commonjs",
|
|
||||||
"types": ["jest", "node"]
|
|
||||||
},
|
|
||||||
"include": ["**/*.spec.ts", "**/*.d.ts"]
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tslint.json",
|
|
||||||
"rules": {
|
|
||||||
"directive-selector": [
|
|
||||||
true,
|
|
||||||
"attribute",
|
|
||||||
"abp",
|
|
||||||
"camelCase"
|
|
||||||
],
|
|
||||||
"component-selector": [
|
|
||||||
true,
|
|
||||||
"element",
|
|
||||||
"abp",
|
|
||||||
"kebab-case"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue