Browse Source

refactoring

pull/22848/head
erdemcaygor 1 year ago
parent
commit
c37043560b
  1. 4
      npm/ng-packs/packages/account/src/lib/account.ts
  2. 2
      npm/ng-packs/packages/identity/src/lib/identity.ts
  3. 2
      npm/ng-packs/packages/tenant-management/src/lib/tenant-management.routes.ts
  4. 2
      npm/ng-packs/packages/tenant-management/src/lib/tenant-management.ts

4
npm/ng-packs/packages/account/src/lib/account.ts

@ -4,15 +4,12 @@ import { NgxValidateCoreModule } from '@ngx-validate/core';
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 { RE_LOGIN_CONFIRMATION_TOKEN } from './tokens';
import { ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS } from './tokens/extensions.token';
import { AccountExtensionsGuard } from './guards/extensions.guard';
export function provideAccount(options: AccountConfigOptions = {}) {
return [
importProvidersFrom(NgbDropdownModule, NgxValidateCoreModule),
AuthenticationFlowGuard,
{ provide: ACCOUNT_CONFIG_OPTIONS, useValue: options },
{
provide: 'ACCOUNT_OPTIONS',
@ -27,6 +24,5 @@ export function provideAccount(options: AccountConfigOptions = {}) {
provide: ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS,
useValue: options.editFormPropContributors,
},
AccountExtensionsGuard,
];
}

2
npm/ng-packs/packages/identity/src/lib/identity.ts

@ -5,7 +5,6 @@ import {
IDENTITY_ENTITY_PROP_CONTRIBUTORS,
IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS,
} from './tokens';
import { IdentityExtensionsGuard } from './guards';
import { IdentityConfigOptions } from './models';
export function provideIdentity(options: IdentityConfigOptions = {}) {
@ -30,6 +29,5 @@ export function provideIdentity(options: IdentityConfigOptions = {}) {
provide: IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS,
useValue: options.editFormPropContributors,
},
IdentityExtensionsGuard,
];
}

2
npm/ng-packs/packages/tenant-management/src/lib/tenant-management.routes.ts

@ -4,9 +4,7 @@ import {
authGuard,
permissionGuard,
ReplaceableComponents,
ReplaceableRouteContainerComponent,
ReplaceableRouteContainerStandaloneComponent,
RouterOutletComponent,
RouterOutletStandaloneComponent,
} from '@abp/ng.core';

2
npm/ng-packs/packages/tenant-management/src/lib/tenant-management.ts

@ -1,4 +1,3 @@
import { TenantManagementExtensionsGuard } from './guards/extensions.guard';
import { TenantManagementConfigOptions } from './models/config-options';
import {
TENANT_MANAGEMENT_CREATE_FORM_PROP_CONTRIBUTORS,
@ -30,6 +29,5 @@ export function provideTenantManagement(options: TenantManagementConfigOptions =
provide: TENANT_MANAGEMENT_EDIT_FORM_PROP_CONTRIBUTORS,
useValue: options.editFormPropContributors,
},
TenantManagementExtensionsGuard,
];
}

Loading…
Cancel
Save