mirror of https://github.com/abpframework/abp.git
7 changed files with 83 additions and 83 deletions
@ -1,28 +0,0 @@ |
|||
import { importProvidersFrom } from '@angular/core'; |
|||
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; |
|||
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 { RE_LOGIN_CONFIRMATION_TOKEN } from './tokens'; |
|||
import { ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS } from './tokens/extensions.token'; |
|||
|
|||
export function provideAccount(options: AccountConfigOptions = {}) { |
|||
return [ |
|||
importProvidersFrom(NgbDropdownModule, NgxValidateCoreModule), |
|||
{ provide: ACCOUNT_CONFIG_OPTIONS, useValue: options }, |
|||
{ |
|||
provide: 'ACCOUNT_OPTIONS', |
|||
useFactory: accountConfigOptionsFactory, |
|||
deps: [ACCOUNT_CONFIG_OPTIONS], |
|||
}, |
|||
{ |
|||
provide: RE_LOGIN_CONFIRMATION_TOKEN, |
|||
useValue: options.isPersonalSettingsChangedConfirmationActive ?? true, |
|||
}, |
|||
{ |
|||
provide: ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS, |
|||
useValue: options.editFormPropContributors, |
|||
}, |
|||
]; |
|||
} |
|||
@ -1,34 +0,0 @@ |
|||
import { |
|||
IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, |
|||
IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, |
|||
IDENTITY_ENTITY_ACTION_CONTRIBUTORS, |
|||
IDENTITY_ENTITY_PROP_CONTRIBUTORS, |
|||
IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, |
|||
} from './tokens'; |
|||
import { IdentityConfigOptions } from './models'; |
|||
import { Provider } from '@angular/core'; |
|||
|
|||
export function provideIdentity(options: IdentityConfigOptions = {}): Provider[] { |
|||
return [ |
|||
{ |
|||
provide: IDENTITY_ENTITY_ACTION_CONTRIBUTORS, |
|||
useValue: options.entityActionContributors, |
|||
}, |
|||
{ |
|||
provide: IDENTITY_TOOLBAR_ACTION_CONTRIBUTORS, |
|||
useValue: options.toolbarActionContributors, |
|||
}, |
|||
{ |
|||
provide: IDENTITY_ENTITY_PROP_CONTRIBUTORS, |
|||
useValue: options.entityPropContributors, |
|||
}, |
|||
{ |
|||
provide: IDENTITY_CREATE_FORM_PROP_CONTRIBUTORS, |
|||
useValue: options.createFormPropContributors, |
|||
}, |
|||
{ |
|||
provide: IDENTITY_EDIT_FORM_PROP_CONTRIBUTORS, |
|||
useValue: options.editFormPropContributors, |
|||
}, |
|||
]; |
|||
} |
|||
Loading…
Reference in new issue