Browse Source
Merge pull request #8958 from abpframework/auto-merge/rel-4-3/371
Merge branch dev with rel-4.3
pull/8967/head
Bunyamin Coskuner
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
21 additions and
3 deletions
-
npm/ng-packs/packages/core/src/lib/tests/localization.service.spec.ts
-
npm/ng-packs/packages/theme-shared/extensions/src/tests/enum.util.spec.ts
-
npm/ng-packs/packages/theme-shared/src/lib/handlers/datepicker-config.ts
-
npm/ng-packs/packages/theme-shared/src/lib/handlers/index.ts
-
npm/ng-packs/packages/theme-shared/src/lib/theme-shared.module.ts
-
npm/ng-packs/packages/theme-shared/src/public-api.ts
|
|
|
@ -12,7 +12,6 @@ describe('LocalizationService', () => { |
|
|
|
let spectator: SpectatorService<LocalizationService>; |
|
|
|
let sessionState: SpyObject<SessionStateService>; |
|
|
|
let configState: SpyObject<ConfigStateService>; |
|
|
|
let router: SpyObject<Router>; |
|
|
|
let service: LocalizationService; |
|
|
|
|
|
|
|
const createService = createServiceFactory({ |
|
|
|
|
|
|
|
@ -110,5 +110,5 @@ function createMockLocalizationService() { |
|
|
|
const configState = new ConfigStateService(); |
|
|
|
configState.setState({ localization: mockL10n } as any); |
|
|
|
|
|
|
|
return new LocalizationService(mockSessionState, null, null, null, configState, null); |
|
|
|
return new LocalizationService(mockSessionState, null, null, configState, null); |
|
|
|
} |
|
|
|
|
|
|
|
@ -0,0 +1,11 @@ |
|
|
|
import { Injector } from '@angular/core'; |
|
|
|
import { NgbInputDatepickerConfig } from '@ng-bootstrap/ng-bootstrap'; |
|
|
|
|
|
|
|
export function initDatepickerConfig(injector: Injector) { |
|
|
|
const datepickerConfig = injector.get(NgbInputDatepickerConfig, null); |
|
|
|
if (datepickerConfig) { |
|
|
|
datepickerConfig.container = 'body'; |
|
|
|
} |
|
|
|
|
|
|
|
return () => {}; |
|
|
|
} |
|
|
|
@ -1,2 +1,3 @@ |
|
|
|
export * from './error.handler'; |
|
|
|
export * from './lazy-style.handler'; |
|
|
|
export * from './datepicker-config'; |
|
|
|
|
|
|
|
@ -38,6 +38,7 @@ import { THEME_SHARED_APPEND_CONTENT } from './tokens/append-content.token'; |
|
|
|
import { HTTP_ERROR_CONFIG, httpErrorConfigFactory } from './tokens/http-error.token'; |
|
|
|
import { DateParserFormatter } from './utils/date-parser-formatter'; |
|
|
|
import { ModalCloseDirective } from './components/modal/modal-close.directive'; |
|
|
|
import { initDatepickerConfig } from './handlers/datepicker-config'; |
|
|
|
|
|
|
|
const declarationsWithExports = [ |
|
|
|
BreadcrumbComponent, |
|
|
|
@ -110,6 +111,12 @@ export class ThemeSharedModule { |
|
|
|
deps: [Injector], |
|
|
|
useFactory: initLazyStyleHandler, |
|
|
|
}, |
|
|
|
{ |
|
|
|
provide: APP_INITIALIZER, |
|
|
|
multi: true, |
|
|
|
deps: [Injector], |
|
|
|
useFactory: initDatepickerConfig, |
|
|
|
}, |
|
|
|
{ provide: HTTP_ERROR_CONFIG, useValue: httpErrorConfig }, |
|
|
|
{ |
|
|
|
provide: 'HTTP_ERROR_CONFIG', |
|
|
|
|
|
|
|
@ -8,7 +8,7 @@ export { BOOTSTRAP } from './lib/constants/styles'; |
|
|
|
export * from './lib/constants/validation'; |
|
|
|
export * from './lib/directives'; |
|
|
|
export * from './lib/enums'; |
|
|
|
export { ErrorHandler } from './lib/handlers'; |
|
|
|
export * from './lib/handlers'; |
|
|
|
export * from './lib/models'; |
|
|
|
export * from './lib/providers'; |
|
|
|
export * from './lib/services'; |
|
|
|
|