|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { CommonModule } from '@angular/common';
|
|
|
|
|
import { HttpClientModule, HttpClientXsrfModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
|
|
|
import { HTTP_INTERCEPTORS, HttpClientModule, HttpClientXsrfModule } from '@angular/common/http';
|
|
|
|
|
import { APP_INITIALIZER, Injector, ModuleWithProviders, NgModule } from '@angular/core';
|
|
|
|
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
|
|
|
import { RouterModule } from '@angular/router';
|
|
|
|
|
@ -29,7 +29,7 @@ import { LocaleProvider } from './providers/locale.provider';
|
|
|
|
|
import { LocalizationService } from './services/localization.service';
|
|
|
|
|
import { oAuthStorage } from './strategies/auth-flow.strategy';
|
|
|
|
|
import { localizationContributor, LOCALIZATIONS } from './tokens/localization.token';
|
|
|
|
|
import { coreOptionsFactory, CORE_OPTIONS } from './tokens/options.token';
|
|
|
|
|
import { CORE_OPTIONS, coreOptionsFactory } from './tokens/options.token';
|
|
|
|
|
import { TENANT_KEY } from './tokens/tenant-key.token';
|
|
|
|
|
import { noop } from './utils/common-utils';
|
|
|
|
|
import './utils/date-extensions';
|
|
|
|
|
@ -49,61 +49,60 @@ export function storageFactory(): OAuthStorage {
|
|
|
|
|
* This module will be imported and exported by all others.
|
|
|
|
|
*/
|
|
|
|
|
@NgModule({
|
|
|
|
|
exports: [
|
|
|
|
|
CommonModule,
|
|
|
|
|
HttpClientModule,
|
|
|
|
|
FormsModule,
|
|
|
|
|
ReactiveFormsModule,
|
|
|
|
|
RouterModule,
|
|
|
|
|
LocalizationModule,
|
|
|
|
|
AbstractNgModelComponent,
|
|
|
|
|
AutofocusDirective,
|
|
|
|
|
DynamicLayoutComponent,
|
|
|
|
|
ForDirective,
|
|
|
|
|
FormSubmitDirective,
|
|
|
|
|
InitDirective,
|
|
|
|
|
InputEventDebounceDirective,
|
|
|
|
|
PermissionDirective,
|
|
|
|
|
ReplaceableRouteContainerComponent,
|
|
|
|
|
ReplaceableTemplateDirective,
|
|
|
|
|
RouterOutletComponent,
|
|
|
|
|
SortPipe,
|
|
|
|
|
StopPropagationDirective,
|
|
|
|
|
ToInjectorPipe,
|
|
|
|
|
ShortDateTimePipe,
|
|
|
|
|
ShortTimePipe,
|
|
|
|
|
ShortDatePipe
|
|
|
|
|
],
|
|
|
|
|
imports: [
|
|
|
|
|
OAuthModule,
|
|
|
|
|
CommonModule,
|
|
|
|
|
HttpClientModule,
|
|
|
|
|
FormsModule,
|
|
|
|
|
ReactiveFormsModule,
|
|
|
|
|
RouterModule,
|
|
|
|
|
LocalizationModule,
|
|
|
|
|
],
|
|
|
|
|
declarations: [
|
|
|
|
|
AbstractNgModelComponent,
|
|
|
|
|
AutofocusDirective,
|
|
|
|
|
DynamicLayoutComponent,
|
|
|
|
|
ForDirective,
|
|
|
|
|
FormSubmitDirective,
|
|
|
|
|
InitDirective,
|
|
|
|
|
InputEventDebounceDirective,
|
|
|
|
|
PermissionDirective,
|
|
|
|
|
ReplaceableRouteContainerComponent,
|
|
|
|
|
ReplaceableTemplateDirective,
|
|
|
|
|
RouterOutletComponent,
|
|
|
|
|
SortPipe,
|
|
|
|
|
StopPropagationDirective,
|
|
|
|
|
ToInjectorPipe,
|
|
|
|
|
ShortDateTimePipe,
|
|
|
|
|
ShortTimePipe,
|
|
|
|
|
ShortDatePipe
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
providers: [LocalizationPipe]
|
|
|
|
|
exports: [
|
|
|
|
|
CommonModule,
|
|
|
|
|
HttpClientModule,
|
|
|
|
|
FormsModule,
|
|
|
|
|
ReactiveFormsModule,
|
|
|
|
|
RouterModule,
|
|
|
|
|
LocalizationModule,
|
|
|
|
|
AbstractNgModelComponent,
|
|
|
|
|
AutofocusDirective,
|
|
|
|
|
DynamicLayoutComponent,
|
|
|
|
|
ForDirective,
|
|
|
|
|
FormSubmitDirective,
|
|
|
|
|
InitDirective,
|
|
|
|
|
InputEventDebounceDirective,
|
|
|
|
|
PermissionDirective,
|
|
|
|
|
ReplaceableRouteContainerComponent,
|
|
|
|
|
ReplaceableTemplateDirective,
|
|
|
|
|
RouterOutletComponent,
|
|
|
|
|
SortPipe,
|
|
|
|
|
StopPropagationDirective,
|
|
|
|
|
ToInjectorPipe,
|
|
|
|
|
ShortDateTimePipe,
|
|
|
|
|
ShortTimePipe,
|
|
|
|
|
ShortDatePipe,
|
|
|
|
|
],
|
|
|
|
|
imports: [
|
|
|
|
|
OAuthModule,
|
|
|
|
|
CommonModule,
|
|
|
|
|
HttpClientModule,
|
|
|
|
|
FormsModule,
|
|
|
|
|
ReactiveFormsModule,
|
|
|
|
|
RouterModule,
|
|
|
|
|
LocalizationModule,
|
|
|
|
|
],
|
|
|
|
|
declarations: [
|
|
|
|
|
AbstractNgModelComponent,
|
|
|
|
|
AutofocusDirective,
|
|
|
|
|
DynamicLayoutComponent,
|
|
|
|
|
ForDirective,
|
|
|
|
|
FormSubmitDirective,
|
|
|
|
|
InitDirective,
|
|
|
|
|
InputEventDebounceDirective,
|
|
|
|
|
PermissionDirective,
|
|
|
|
|
ReplaceableRouteContainerComponent,
|
|
|
|
|
ReplaceableTemplateDirective,
|
|
|
|
|
RouterOutletComponent,
|
|
|
|
|
SortPipe,
|
|
|
|
|
StopPropagationDirective,
|
|
|
|
|
ToInjectorPipe,
|
|
|
|
|
ShortDateTimePipe,
|
|
|
|
|
ShortTimePipe,
|
|
|
|
|
ShortDatePipe,
|
|
|
|
|
],
|
|
|
|
|
providers: [LocalizationPipe],
|
|
|
|
|
})
|
|
|
|
|
export class BaseCoreModule {}
|
|
|
|
|
|
|
|
|
|
@ -116,7 +115,7 @@ export class BaseCoreModule {}
|
|
|
|
|
imports: [
|
|
|
|
|
BaseCoreModule,
|
|
|
|
|
LocalizationModule,
|
|
|
|
|
OAuthModule.forRoot(),
|
|
|
|
|
OAuthModule,
|
|
|
|
|
HttpClientXsrfModule.withOptions({
|
|
|
|
|
cookieName: 'XSRF-TOKEN',
|
|
|
|
|
headerName: 'RequestVerificationToken',
|
|
|
|
|
@ -191,6 +190,7 @@ export class CoreModule {
|
|
|
|
|
useValue: localizationContributor(options.localizations),
|
|
|
|
|
deps: [LocalizationService],
|
|
|
|
|
},
|
|
|
|
|
OAuthModule.forRoot().providers,
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
@ -209,7 +209,3 @@ export class CoreModule {
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ngxsStoragePluginSerialize(data) {
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|