@delon/theme 13.1.0 → 13.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +1 -1
  2. package/compact.css +9 -12
  3. package/compact.min.css +1 -1
  4. package/dark.css +13 -16
  5. package/dark.min.css +1 -1
  6. package/default.css +9 -12
  7. package/default.min.css +1 -1
  8. package/esm2020/layout-default/layout-header-item-trigger.directive.mjs +3 -3
  9. package/esm2020/layout-default/layout-header-item.component.mjs +3 -3
  10. package/esm2020/layout-default/layout-header.component.mjs +3 -3
  11. package/esm2020/layout-default/layout-nav.component.mjs +3 -3
  12. package/esm2020/layout-default/layout.component.mjs +3 -3
  13. package/esm2020/layout-default/layout.module.mjs +4 -4
  14. package/esm2020/public_api.mjs +2 -3
  15. package/esm2020/setting-drawer/setting-drawer-item.component.mjs +3 -3
  16. package/esm2020/setting-drawer/setting-drawer.component.mjs +3 -3
  17. package/esm2020/setting-drawer/setting-drawer.module.mjs +4 -4
  18. package/esm2020/src/locale/locale.module.mjs +4 -4
  19. package/esm2020/src/locale/locale.service.mjs +3 -3
  20. package/esm2020/src/pipes/date/date.pipe.mjs +3 -3
  21. package/esm2020/src/pipes/keys/keys.pipe.mjs +3 -3
  22. package/esm2020/src/pipes/safe/html.pipe.mjs +3 -3
  23. package/esm2020/src/pipes/safe/url.pipe.mjs +3 -3
  24. package/esm2020/src/pipes/yn/yn.pipe.mjs +3 -3
  25. package/esm2020/src/services/drawer/drawer.helper.mjs +3 -3
  26. package/esm2020/src/services/http/http.client.mjs +3 -3
  27. package/esm2020/src/services/http/http.decorator.mjs +3 -3
  28. package/esm2020/src/services/i18n/i18n-url.guard.mjs +36 -0
  29. package/esm2020/src/services/i18n/i18n.mjs +8 -8
  30. package/esm2020/src/services/i18n/i18n.pipe.mjs +3 -3
  31. package/esm2020/src/services/i18n/index.mjs +4 -0
  32. package/esm2020/src/services/menu/menu.service.mjs +3 -3
  33. package/esm2020/src/services/modal/modal.helper.mjs +3 -3
  34. package/esm2020/src/services/responsive/responsive.mjs +3 -3
  35. package/esm2020/src/services/rtl/rtl.service.mjs +3 -3
  36. package/esm2020/src/services/settings/settings.service.mjs +3 -3
  37. package/esm2020/src/services/title/title.service.mjs +3 -3
  38. package/esm2020/src/theme.module.mjs +8 -8
  39. package/esm2020/src/version.mjs +1 -1
  40. package/esm2020/theme-btn/theme-btn.component.mjs +9 -5
  41. package/esm2020/theme-btn/theme-btn.module.mjs +4 -4
  42. package/fesm2015/layout-blank.mjs.map +1 -1
  43. package/fesm2015/layout-default.mjs +19 -19
  44. package/fesm2015/layout-default.mjs.map +1 -1
  45. package/fesm2015/setting-drawer.mjs +10 -10
  46. package/fesm2015/setting-drawer.mjs.map +1 -1
  47. package/fesm2015/theme-btn.mjs +12 -8
  48. package/fesm2015/theme-btn.mjs.map +1 -1
  49. package/fesm2015/theme.mjs +103 -69
  50. package/fesm2015/theme.mjs.map +1 -1
  51. package/fesm2020/layout-blank.mjs.map +1 -1
  52. package/fesm2020/layout-default.mjs +19 -19
  53. package/fesm2020/layout-default.mjs.map +1 -1
  54. package/fesm2020/setting-drawer.mjs +10 -10
  55. package/fesm2020/setting-drawer.mjs.map +1 -1
  56. package/fesm2020/theme-btn.mjs +12 -8
  57. package/fesm2020/theme-btn.mjs.map +1 -1
  58. package/fesm2020/theme.mjs +100 -69
  59. package/fesm2020/theme.mjs.map +1 -1
  60. package/package.json +4 -4
  61. package/public_api.d.ts +1 -2
  62. package/src/services/i18n/i18n-url.guard.d.ts +15 -0
  63. package/src/services/i18n/index.d.ts +3 -0
  64. package/theme-btn/theme-btn.component.d.ts +3 -2
@@ -1,7 +1,7 @@
1
1
  import * as i7 from '@angular/common';
2
2
  import { DOCUMENT, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, isDevMode, Component, ChangeDetectionStrategy, Inject, Optional, Input, NgModule } from '@angular/core';
4
+ import { InjectionToken, isDevMode, EventEmitter, Component, ChangeDetectionStrategy, Inject, Optional, Input, Output, NgModule } from '@angular/core';
5
5
  import { Subject } from 'rxjs';
6
6
  import { takeUntil } from 'rxjs/operators';
7
7
  import * as i1 from '@delon/util/config';
@@ -31,6 +31,7 @@ class ThemeBtnComponent {
31
31
  ];
32
32
  this.devTips = `When the dark.css file can't be found, you need to run it once: npm run theme`;
33
33
  this.deployUrl = '';
34
+ this.themeChange = new EventEmitter();
34
35
  this.destroy$ = new Subject();
35
36
  this.dir = 'ltr';
36
37
  }
@@ -58,6 +59,7 @@ class ThemeBtnComponent {
58
59
  return;
59
60
  }
60
61
  this.theme = theme;
62
+ this.themeChange.emit(theme);
61
63
  this.renderer.setAttribute(this.doc.body, 'data-theme', theme);
62
64
  const dom = this.doc.getElementById(this.KEYS);
63
65
  if (dom) {
@@ -84,9 +86,9 @@ class ThemeBtnComponent {
84
86
  this.destroy$.complete();
85
87
  }
86
88
  }
87
- ThemeBtnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ThemeBtnComponent, deps: [{ token: i0.Renderer2 }, { token: i1.AlainConfigService }, { token: i2.Platform }, { token: DOCUMENT }, { token: i3.Directionality, optional: true }, { token: ALAIN_THEME_BTN_KEYS }], target: i0.ɵɵFactoryTarget.Component });
88
- ThemeBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.2", type: ThemeBtnComponent, selector: "theme-btn", inputs: { types: "types", devTips: "devTips", deployUrl: "deployUrl" }, host: { properties: { "class.theme-btn": "true", "class.theme-btn-rtl": "dir === 'rtl'" } }, ngImport: i0, template: "<div\n class=\"ant-avatar ant-avatar-circle ant-avatar-icon\"\n nz-dropdown\n nzPlacement=\"topCenter\"\n [nzDropdownMenu]=\"types.length > 0 ? menu : null\"\n>\n <svg\n nz-tooltip\n [nzTooltipTitle]=\"isDev ? devTips : null\"\n class=\"anticon\"\n role=\"img\"\n width=\"21\"\n height=\"21\"\n viewBox=\"0 0 21 21\"\n fill=\"currentColor\"\n >\n <g fill-rule=\"evenodd\">\n <g fill-rule=\"nonzero\">\n <path\n d=\"M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z\"\n ></path>\n </g>\n </g>\n </svg>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n <li nz-menu-item *ngFor=\"let i of types\" (click)=\"onThemeChange(i.key)\">{{ i.text }}</li>\n </ul>\n </nz-dropdown-menu>\n</div>\n", components: [{ type: i4.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }], directives: [{ type: i4.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { type: i5.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ThemeBtnComponent, decorators: [{
89
+ ThemeBtnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThemeBtnComponent, deps: [{ token: i0.Renderer2 }, { token: i1.AlainConfigService }, { token: i2.Platform }, { token: DOCUMENT }, { token: i3.Directionality, optional: true }, { token: ALAIN_THEME_BTN_KEYS }], target: i0.ɵɵFactoryTarget.Component });
90
+ ThemeBtnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.6", type: ThemeBtnComponent, selector: "theme-btn", inputs: { types: "types", devTips: "devTips", deployUrl: "deployUrl" }, outputs: { themeChange: "themeChange" }, host: { properties: { "class.theme-btn": "true", "class.theme-btn-rtl": "dir === 'rtl'" } }, ngImport: i0, template: "<div\n class=\"ant-avatar ant-avatar-circle ant-avatar-icon\"\n nz-dropdown\n nzPlacement=\"topCenter\"\n [nzDropdownMenu]=\"types.length > 0 ? menu : null\"\n>\n <svg\n nz-tooltip\n [nzTooltipTitle]=\"isDev ? devTips : null\"\n class=\"anticon\"\n role=\"img\"\n width=\"21\"\n height=\"21\"\n viewBox=\"0 0 21 21\"\n fill=\"currentColor\"\n >\n <g fill-rule=\"evenodd\">\n <g fill-rule=\"nonzero\">\n <path\n d=\"M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z\"\n ></path>\n </g>\n </g>\n </svg>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n <li nz-menu-item *ngFor=\"let i of types\" (click)=\"onThemeChange(i.key)\">{{ i.text }}</li>\n </ul>\n </nz-dropdown-menu>\n</div>\n", components: [{ type: i4.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }], directives: [{ type: i4.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { type: i5.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { type: i6.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThemeBtnComponent, decorators: [{
90
92
  type: Component,
91
93
  args: [{ selector: 'theme-btn', host: {
92
94
  '[class.theme-btn]': `true`,
@@ -108,20 +110,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
108
110
  type: Input
109
111
  }], deployUrl: [{
110
112
  type: Input
113
+ }], themeChange: [{
114
+ type: Output
111
115
  }] } });
112
116
 
113
117
  const COMPONENTS = [ThemeBtnComponent];
114
118
  class ThemeBtnModule {
115
119
  }
116
- ThemeBtnModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ThemeBtnModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
117
- ThemeBtnModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ThemeBtnModule, declarations: [ThemeBtnComponent], imports: [CommonModule, NzDropDownModule, NzToolTipModule], exports: [ThemeBtnComponent] });
118
- ThemeBtnModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ThemeBtnModule, providers: [
120
+ ThemeBtnModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThemeBtnModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
121
+ ThemeBtnModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThemeBtnModule, declarations: [ThemeBtnComponent], imports: [CommonModule, NzDropDownModule, NzToolTipModule], exports: [ThemeBtnComponent] });
122
+ ThemeBtnModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThemeBtnModule, providers: [
119
123
  {
120
124
  provide: ALAIN_THEME_BTN_KEYS,
121
125
  useValue: 'site-theme'
122
126
  }
123
127
  ], imports: [[CommonModule, NzDropDownModule, NzToolTipModule]] });
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ThemeBtnModule, decorators: [{
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ThemeBtnModule, decorators: [{
125
129
  type: NgModule,
126
130
  args: [{
127
131
  imports: [CommonModule, NzDropDownModule, NzToolTipModule],
@@ -1 +1 @@
1
- {"version":3,"file":"theme-btn.mjs","sources":["../../../../packages/theme/theme-btn/theme-btn.component.ts","../../../../packages/theme/theme-btn/theme-btn.component.html","../../../../packages/theme/theme-btn/theme-btn.module.ts","../../../../packages/theme/theme-btn/theme-btn.ts"],"sourcesContent":["import { Direction, Directionality } from '@angular/cdk/bidi';\nimport { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n Inject,\n InjectionToken,\n Input,\n isDevMode,\n OnDestroy,\n OnInit,\n Optional,\n Renderer2\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface ThemeBtnType {\n key: string;\n text: string;\n}\n\nexport const ALAIN_THEME_BTN_KEYS = new InjectionToken<string>('ALAIN_THEME_BTN_KEYS');\n\n@Component({\n selector: 'theme-btn',\n templateUrl: './theme-btn.component.html',\n host: {\n '[class.theme-btn]': `true`,\n '[class.theme-btn-rtl]': `dir === 'rtl'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThemeBtnComponent implements OnInit, OnDestroy {\n private theme = 'default';\n isDev = isDevMode();\n @Input() types: ThemeBtnType[] = [\n { key: 'default', text: 'Default Theme' },\n { key: 'dark', text: 'Dark Theme' },\n { key: 'compact', text: 'Compact Theme' }\n ];\n @Input() devTips = `When the dark.css file can't be found, you need to run it once: npm run theme`;\n @Input() deployUrl = '';\n private destroy$ = new Subject<void>();\n dir: Direction = 'ltr';\n\n constructor(\n private renderer: Renderer2,\n private configSrv: AlainConfigService,\n private platform: Platform,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n @Optional() private directionality: Directionality,\n @Inject(ALAIN_THEME_BTN_KEYS) private KEYS: string\n ) {}\n\n ngOnInit(): void {\n this.dir = this.directionality.value;\n this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction: Direction) => {\n this.dir = direction;\n });\n this.initTheme();\n }\n\n private initTheme(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.theme = localStorage.getItem(this.KEYS) || 'default';\n this.updateChartTheme();\n this.onThemeChange(this.theme);\n }\n\n private updateChartTheme(): void {\n this.configSrv.set('chart', { theme: this.theme === 'dark' ? 'dark' : '' });\n }\n\n onThemeChange(theme: string): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.theme = theme;\n this.renderer.setAttribute(this.doc.body, 'data-theme', theme);\n const dom = this.doc.getElementById(this.KEYS);\n if (dom) {\n dom.remove();\n }\n localStorage.removeItem(this.KEYS);\n if (theme !== 'default') {\n const el = this.doc.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.id = this.KEYS;\n el.href = `${this.deployUrl}assets/style.${theme}.css`;\n\n localStorage.setItem(this.KEYS, theme);\n this.doc.body.append(el);\n }\n this.updateChartTheme();\n }\n\n ngOnDestroy(): void {\n const el = this.doc.getElementById(this.KEYS);\n if (el != null) {\n this.doc.body.removeChild(el);\n }\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<div\n class=\"ant-avatar ant-avatar-circle ant-avatar-icon\"\n nz-dropdown\n nzPlacement=\"topCenter\"\n [nzDropdownMenu]=\"types.length > 0 ? menu : null\"\n>\n <svg\n nz-tooltip\n [nzTooltipTitle]=\"isDev ? devTips : null\"\n class=\"anticon\"\n role=\"img\"\n width=\"21\"\n height=\"21\"\n viewBox=\"0 0 21 21\"\n fill=\"currentColor\"\n >\n <g fill-rule=\"evenodd\">\n <g fill-rule=\"nonzero\">\n <path\n d=\"M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z\"\n ></path>\n </g>\n </g>\n </svg>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n <li nz-menu-item *ngFor=\"let i of types\" (click)=\"onThemeChange(i.key)\">{{ i.text }}</li>\n </ul>\n </nz-dropdown-menu>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzDropDownModule } from 'ng-zorro-antd/dropdown';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { ALAIN_THEME_BTN_KEYS, ThemeBtnComponent } from './theme-btn.component';\n\nconst COMPONENTS = [ThemeBtnComponent];\n\n@NgModule({\n imports: [CommonModule, NzDropDownModule, NzToolTipModule],\n providers: [\n {\n provide: ALAIN_THEME_BTN_KEYS,\n useValue: 'site-theme'\n }\n ],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class ThemeBtnModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA0Ba,oBAAoB,GAAG,IAAI,cAAc,CAAS,sBAAsB,EAAE;MAW1E,iBAAiB;IAa5B,YACU,QAAmB,EACnB,SAA6B,EAC7B,QAAkB,EACA,GAAc,EACpB,cAA8B,EACZ,IAAY;QAL1C,aAAQ,GAAR,QAAQ,CAAW;QACnB,cAAS,GAAT,SAAS,CAAoB;QAC7B,aAAQ,GAAR,QAAQ,CAAU;QACA,QAAG,GAAH,GAAG,CAAW;QACpB,mBAAc,GAAd,cAAc,CAAgB;QACZ,SAAI,GAAJ,IAAI,CAAQ;QAlB5C,UAAK,GAAG,SAAS,CAAC;QAC1B,UAAK,GAAG,SAAS,EAAE,CAAC;QACX,UAAK,GAAmB;YAC/B,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe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BAT7B,SAAS;+BACE,WAAW,QAEf;wBACJ,mBAAmB,EAAE,MAAM;wBAC3B,uBAAuB,EAAE,eAAe;qBACzC,mBACgB,uBAAuB,CAAC,MAAM;;;8BAmB5C,MAAM;+BAAC,QAAQ;;8BACf,QAAQ;;8BACR,MAAM;+BAAC,oBAAoB;;yBAhBrB,KAAK;sBAAb,KAAK;gBAKG,OAAO;sBAAf,KAAK;gBACG,SAAS;sBAAjB,KAAK;;;AEtCR,MAAM,UAAU,GAAG,CAAC,iBAAiB,CAAC,CAAC;MAa1B,cAAc;;2GAAd,cAAc;4GAAd,cAAc,iBAbP,iBAAiB,aAGzB,YAAY,EAAE,gBAAgB,EAAE,eAAe,aAHvC,iBAAiB;4GAaxB,cAAc,aATd;QACT;YACE,OAAO,EAAE,oBAAoB;YAC7B,QAAQ,EAAE,YAAY;SACvB;KACF,YANQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAC;2FAU/C,cAAc;kBAX1B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAC;oBAC1D,SAAS,EAAE;wBACT;4BACE,OAAO,EAAE,oBAAoB;4BAC7B,QAAQ,EAAE,YAAY;yBACvB;qBACF;oBACD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACpBD;;;;;;"}
1
+ {"version":3,"file":"theme-btn.mjs","sources":["../../../../packages/theme/theme-btn/theme-btn.component.ts","../../../../packages/theme/theme-btn/theme-btn.component.html","../../../../packages/theme/theme-btn/theme-btn.module.ts","../../../../packages/theme/theme-btn/theme-btn.ts"],"sourcesContent":["import { Direction, Directionality } from '@angular/cdk/bidi';\nimport { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n isDevMode,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Renderer2\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport interface ThemeBtnType {\n key: string;\n text: string;\n}\n\nexport const ALAIN_THEME_BTN_KEYS = new InjectionToken<string>('ALAIN_THEME_BTN_KEYS');\n\n@Component({\n selector: 'theme-btn',\n templateUrl: './theme-btn.component.html',\n host: {\n '[class.theme-btn]': `true`,\n '[class.theme-btn-rtl]': `dir === 'rtl'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ThemeBtnComponent implements OnInit, OnDestroy {\n private theme = 'default';\n isDev = isDevMode();\n @Input() types: ThemeBtnType[] = [\n { key: 'default', text: 'Default Theme' },\n { key: 'dark', text: 'Dark Theme' },\n { key: 'compact', text: 'Compact Theme' }\n ];\n @Input() devTips = `When the dark.css file can't be found, you need to run it once: npm run theme`;\n @Input() deployUrl = '';\n @Output() readonly themeChange = new EventEmitter<string>();\n private destroy$ = new Subject<void>();\n dir: Direction = 'ltr';\n\n constructor(\n private renderer: Renderer2,\n private configSrv: AlainConfigService,\n private platform: Platform,\n @Inject(DOCUMENT) private doc: NzSafeAny,\n @Optional() private directionality: Directionality,\n @Inject(ALAIN_THEME_BTN_KEYS) private KEYS: string\n ) {}\n\n ngOnInit(): void {\n this.dir = this.directionality.value;\n this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction: Direction) => {\n this.dir = direction;\n });\n this.initTheme();\n }\n\n private initTheme(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.theme = localStorage.getItem(this.KEYS) || 'default';\n this.updateChartTheme();\n this.onThemeChange(this.theme);\n }\n\n private updateChartTheme(): void {\n this.configSrv.set('chart', { theme: this.theme === 'dark' ? 'dark' : '' });\n }\n\n onThemeChange(theme: string): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.theme = theme;\n this.themeChange.emit(theme);\n this.renderer.setAttribute(this.doc.body, 'data-theme', theme);\n const dom = this.doc.getElementById(this.KEYS);\n if (dom) {\n dom.remove();\n }\n localStorage.removeItem(this.KEYS);\n if (theme !== 'default') {\n const el = this.doc.createElement('link');\n el.type = 'text/css';\n el.rel = 'stylesheet';\n el.id = this.KEYS;\n el.href = `${this.deployUrl}assets/style.${theme}.css`;\n\n localStorage.setItem(this.KEYS, theme);\n this.doc.body.append(el);\n }\n this.updateChartTheme();\n }\n\n ngOnDestroy(): void {\n const el = this.doc.getElementById(this.KEYS);\n if (el != null) {\n this.doc.body.removeChild(el);\n }\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<div\n class=\"ant-avatar ant-avatar-circle ant-avatar-icon\"\n nz-dropdown\n nzPlacement=\"topCenter\"\n [nzDropdownMenu]=\"types.length > 0 ? menu : null\"\n>\n <svg\n nz-tooltip\n [nzTooltipTitle]=\"isDev ? devTips : null\"\n class=\"anticon\"\n role=\"img\"\n width=\"21\"\n height=\"21\"\n viewBox=\"0 0 21 21\"\n fill=\"currentColor\"\n >\n <g fill-rule=\"evenodd\">\n <g fill-rule=\"nonzero\">\n <path\n d=\"M7.02 3.635l12.518 12.518a1.863 1.863 0 010 2.635l-1.317 1.318a1.863 1.863 0 01-2.635 0L3.068 7.588A2.795 2.795 0 117.02 3.635zm2.09 14.428a.932.932 0 110 1.864.932.932 0 010-1.864zm-.043-9.747L7.75 9.635l9.154 9.153 1.318-1.317-9.154-9.155zM3.52 12.473c.514 0 .931.417.931.931v.932h.932a.932.932 0 110 1.864h-.932v.931a.932.932 0 01-1.863 0l-.001-.931h-.93a.932.932 0 010-1.864h.93v-.932c0-.514.418-.931.933-.931zm15.374-3.727a1.398 1.398 0 110 2.795 1.398 1.398 0 010-2.795zM4.385 4.953a.932.932 0 000 1.317l2.046 2.047L7.75 7 5.703 4.953a.932.932 0 00-1.318 0zM14.701.36a.932.932 0 01.931.932v.931h.932a.932.932 0 010 1.864h-.933l.001.932a.932.932 0 11-1.863 0l-.001-.932h-.93a.932.932 0 110-1.864h.93v-.931a.932.932 0 01.933-.932z\"\n ></path>\n </g>\n </g>\n </svg>\n <nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu nzSelectable>\n <li nz-menu-item *ngFor=\"let i of types\" (click)=\"onThemeChange(i.key)\">{{ i.text }}</li>\n </ul>\n </nz-dropdown-menu>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzDropDownModule } from 'ng-zorro-antd/dropdown';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { ALAIN_THEME_BTN_KEYS, ThemeBtnComponent } from './theme-btn.component';\n\nconst COMPONENTS = [ThemeBtnComponent];\n\n@NgModule({\n imports: [CommonModule, NzDropDownModule, NzToolTipModule],\n providers: [\n {\n provide: ALAIN_THEME_BTN_KEYS,\n useValue: 'site-theme'\n }\n ],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class ThemeBtnModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MA4Ba,oBAAoB,GAAG,IAAI,cAAc,CAAS,sBAAsB,EAAE;MAW1E,iBAAiB,CAAA;IAc5B,WACU,CAAA,QAAmB,EACnB,SAA6B,EAC7B,QAAkB,EACA,GAAc,EACpB,cAA8B,EACZ,IAAY,EAAA;AAL1C,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;AACnB,QAAA,IAAS,CAAA,SAAA,GAAT,SAAS,CAAoB;AAC7B,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AACA,QAAA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAW;AACpB,QAAA,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;AACZ,QAAA,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAQ;AAnB5C,QAAA,IAAK,CAAA,KAAA,GAAG,SAAS,CAAC;AAC1B,QAAA,IAAK,CAAA,KAAA,GA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ANQ,CAAC,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAC,CAAA,EAAA,CAAA,CAAA;2FAU/C,cAAc,EAAA,UAAA,EAAA,CAAA;kBAX1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAC;AAC1D,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,oBAAoB;AAC7B,4BAAA,QAAQ,EAAE,YAAY;AACvB,yBAAA;AACF,qBAAA;AACD,oBAAA,YAAY,EAAE,UAAU;AACxB,oBAAA,OAAO,EAAE,UAAU;iBACpB,CAAA;;;ACpBD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, inject, Injectable, Optional, Inject, Pipe, SkipSelf, NgModule, Injector, Version } from '@angular/core';
3
- import { BehaviorSubject, Subject, Observable, of, throwError } from 'rxjs';
3
+ import { BehaviorSubject, Subject, of, Observable, throwError } from 'rxjs';
4
4
  import { filter, share, map, delay, tap, switchMap, finalize, catchError } from 'rxjs/operators';
5
5
  import * as i1 from '@delon/util/config';
6
6
  import { AlainConfigService } from '@delon/util/config';
@@ -115,14 +115,14 @@ class AlainI18nBaseService {
115
115
  return content;
116
116
  }
117
117
  }
118
- AlainI18nBaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainI18nBaseService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
119
- AlainI18nBaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainI18nBaseService });
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainI18nBaseService, decorators: [{
118
+ AlainI18nBaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18nBaseService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
119
+ AlainI18nBaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18nBaseService });
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18nBaseService, decorators: [{
121
121
  type: Injectable
122
122
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }]; } });
123
123
  class AlainI18NServiceFake extends AlainI18nBaseService {
124
124
  use(lang, data) {
125
- this._data = this.flatData(data, []);
125
+ this._data = this.flatData(data !== null && data !== void 0 ? data : {}, []);
126
126
  this._currentLang = lang;
127
127
  this._change$.next(lang);
128
128
  }
@@ -130,9 +130,9 @@ class AlainI18NServiceFake extends AlainI18nBaseService {
130
130
  return [];
131
131
  }
132
132
  }
133
- AlainI18NServiceFake.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainI18NServiceFake, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
134
- AlainI18NServiceFake.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainI18NServiceFake, providedIn: 'root' });
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainI18NServiceFake, decorators: [{
133
+ AlainI18NServiceFake.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18NServiceFake, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
134
+ AlainI18NServiceFake.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18NServiceFake, providedIn: 'root' });
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18NServiceFake, decorators: [{
136
136
  type: Injectable,
137
137
  args: [{ providedIn: 'root' }]
138
138
  }] });
@@ -369,9 +369,9 @@ class MenuService {
369
369
  this.i18n$.unsubscribe();
370
370
  }
371
371
  }
372
- MenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: MenuService, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1$1.ACLService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
373
- MenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: MenuService, providedIn: 'root' });
374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: MenuService, decorators: [{
372
+ MenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: MenuService, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1$1.ACLService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
373
+ MenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: MenuService, providedIn: 'root' });
374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: MenuService, decorators: [{
375
375
  type: Injectable,
376
376
  args: [{ providedIn: 'root' }]
377
377
  }], ctorParameters: function () {
@@ -462,9 +462,9 @@ class SettingsService {
462
462
  return this._user;
463
463
  }
464
464
  }
465
- SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: SettingsService, deps: [{ token: i1$2.Platform }, { token: ALAIN_SETTING_KEYS }], target: i0.ɵɵFactoryTarget.Injectable });
466
- SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: SettingsService, providedIn: 'root' });
467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: SettingsService, decorators: [{
465
+ SettingsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: SettingsService, deps: [{ token: i1$2.Platform }, { token: ALAIN_SETTING_KEYS }], target: i0.ɵɵFactoryTarget.Injectable });
466
+ SettingsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: SettingsService, providedIn: 'root' });
467
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: SettingsService, decorators: [{
468
468
  type: Injectable,
469
469
  args: [{ providedIn: 'root' }]
470
470
  }], ctorParameters: function () {
@@ -510,9 +510,9 @@ class ResponsiveService {
510
510
  return clsMap;
511
511
  }
512
512
  }
513
- ResponsiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ResponsiveService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
514
- ResponsiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ResponsiveService, providedIn: 'root' });
515
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ResponsiveService, decorators: [{
513
+ ResponsiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ResponsiveService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
514
+ ResponsiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ResponsiveService, providedIn: 'root' });
515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ResponsiveService, decorators: [{
516
516
  type: Injectable,
517
517
  args: [{ providedIn: 'root' }]
518
518
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }]; } });
@@ -599,9 +599,9 @@ class RTLService {
599
599
  });
600
600
  }
601
601
  }
602
- RTLService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: RTLService, deps: [{ token: i1$3.Directionality }, { token: SettingsService }, { token: i3.NzConfigService }, { token: i1.AlainConfigService }, { token: i1$2.Platform }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
603
- RTLService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: RTLService, providedIn: 'root' });
604
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: RTLService, decorators: [{
602
+ RTLService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RTLService, deps: [{ token: i1$3.Directionality }, { token: SettingsService }, { token: i3.NzConfigService }, { token: i1.AlainConfigService }, { token: i1$2.Platform }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
603
+ RTLService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RTLService, providedIn: 'root' });
604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: RTLService, decorators: [{
605
605
  type: Injectable,
606
606
  args: [{ providedIn: 'root' }]
607
607
  }], ctorParameters: function () {
@@ -712,9 +712,9 @@ class TitleService {
712
712
  this.i18n$.unsubscribe();
713
713
  }
714
714
  }
715
- TitleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: TitleService, deps: [{ token: i0.Injector }, { token: i1$4.Title }, { token: MenuService }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
716
- TitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: TitleService, providedIn: 'root' });
717
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: TitleService, decorators: [{
715
+ TitleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: TitleService, deps: [{ token: i0.Injector }, { token: i1$4.Title }, { token: MenuService }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
716
+ TitleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: TitleService, providedIn: 'root' });
717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: TitleService, decorators: [{
718
718
  type: Injectable,
719
719
  args: [{ providedIn: 'root' }]
720
720
  }], ctorParameters: function () {
@@ -737,9 +737,9 @@ class I18nPipe {
737
737
  return this.i18n.fanyi(key, params);
738
738
  }
739
739
  }
740
- I18nPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: I18nPipe, deps: [{ token: ALAIN_I18N_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe });
741
- I18nPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: I18nPipe, name: "i18n" });
742
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: I18nPipe, decorators: [{
740
+ I18nPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: I18nPipe, deps: [{ token: ALAIN_I18N_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe });
741
+ I18nPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: I18nPipe, name: "i18n" });
742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: I18nPipe, decorators: [{
743
743
  type: Pipe,
744
744
  args: [{ name: 'i18n' }]
745
745
  }], ctorParameters: function () {
@@ -749,6 +749,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImpor
749
749
  }] }];
750
750
  } });
751
751
 
752
+ class AlainI18NGuard {
753
+ constructor(i18nSrv, cogSrv) {
754
+ this.i18nSrv = i18nSrv;
755
+ this.cogSrv = cogSrv;
756
+ }
757
+ resolve(route) {
758
+ var _a, _b;
759
+ const lang = route.params && route.params[(_b = (_a = this.cogSrv.get('themeI18n')) === null || _a === void 0 ? void 0 : _a.paramNameOfUrlGuard) !== null && _b !== void 0 ? _b : 'i18n'];
760
+ if (lang != null) {
761
+ this.i18nSrv.use(lang);
762
+ }
763
+ return of(true);
764
+ }
765
+ canActivateChild(childRoute, _) {
766
+ return this.resolve(childRoute);
767
+ }
768
+ canActivate(route, _) {
769
+ return this.resolve(route);
770
+ }
771
+ }
772
+ AlainI18NGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18NGuard, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
773
+ AlainI18NGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18NGuard, providedIn: 'root' });
774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainI18NGuard, decorators: [{
775
+ type: Injectable,
776
+ args: [{ providedIn: 'root' }]
777
+ }], ctorParameters: function () {
778
+ return [{ type: undefined, decorators: [{
779
+ type: Optional
780
+ }, {
781
+ type: Inject,
782
+ args: [ALAIN_I18N_TOKEN]
783
+ }] }, { type: i1.AlainConfigService }];
784
+ } });
785
+
752
786
  const DELON_LOCALE = new InjectionToken('delon-locale');
753
787
 
754
788
  var zhCN = {
@@ -857,9 +891,9 @@ class DelonLocaleService {
857
891
  return (this._locale[path] || {});
858
892
  }
859
893
  }
860
- DelonLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DelonLocaleService, deps: [{ token: DELON_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
861
- DelonLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DelonLocaleService });
862
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DelonLocaleService, decorators: [{
894
+ DelonLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelonLocaleService, deps: [{ token: DELON_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable });
895
+ DelonLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelonLocaleService });
896
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelonLocaleService, decorators: [{
863
897
  type: Injectable
864
898
  }], ctorParameters: function () {
865
899
  return [{ type: undefined, decorators: [{
@@ -878,10 +912,10 @@ const DELON_LOCALE_SERVICE_PROVIDER = {
878
912
 
879
913
  class DelonLocaleModule {
880
914
  }
881
- DelonLocaleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DelonLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
882
- DelonLocaleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DelonLocaleModule });
883
- DelonLocaleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DelonLocaleModule, providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER] });
884
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DelonLocaleModule, decorators: [{
915
+ DelonLocaleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelonLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
916
+ DelonLocaleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelonLocaleModule });
917
+ DelonLocaleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelonLocaleModule, providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER] });
918
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DelonLocaleModule, decorators: [{
885
919
  type: NgModule,
886
920
  args: [{
887
921
  providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER]
@@ -1938,9 +1972,9 @@ class ModalHelper {
1938
1972
  return this.create(comp, params, Object.assign(Object.assign({}, options), { modalOptions }));
1939
1973
  }
1940
1974
  }
1941
- ModalHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ModalHelper, deps: [{ token: i1$5.NzModalService }], target: i0.ɵɵFactoryTarget.Injectable });
1942
- ModalHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ModalHelper, providedIn: 'root' });
1943
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: ModalHelper, decorators: [{
1975
+ ModalHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalHelper, deps: [{ token: i1$5.NzModalService }], target: i0.ɵɵFactoryTarget.Injectable });
1976
+ ModalHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalHelper, providedIn: 'root' });
1977
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ModalHelper, decorators: [{
1944
1978
  type: Injectable,
1945
1979
  args: [{ providedIn: 'root' }]
1946
1980
  }], ctorParameters: function () { return [{ type: i1$5.NzModalService }]; } });
@@ -2021,9 +2055,9 @@ class DrawerHelper {
2021
2055
  return this.create(title, comp, params, Object.assign(Object.assign({}, options), { drawerOptions }));
2022
2056
  }
2023
2057
  }
2024
- DrawerHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DrawerHelper, deps: [{ token: i1$6.NzDrawerService }], target: i0.ɵɵFactoryTarget.Injectable });
2025
- DrawerHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DrawerHelper, providedIn: 'root' });
2026
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DrawerHelper, decorators: [{
2058
+ DrawerHelper.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DrawerHelper, deps: [{ token: i1$6.NzDrawerService }], target: i0.ɵɵFactoryTarget.Injectable });
2059
+ DrawerHelper.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DrawerHelper, providedIn: 'root' });
2060
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DrawerHelper, decorators: [{
2027
2061
  type: Injectable,
2028
2062
  args: [{ providedIn: 'root' }]
2029
2063
  }], ctorParameters: function () { return [{ type: i1$6.NzDrawerService }]; } });
@@ -2149,9 +2183,9 @@ class _HttpClient {
2149
2183
  delay(0), tap(() => this.push()), switchMap(() => this.http.request(method, url, options)), finalize(() => this.pop()));
2150
2184
  }
2151
2185
  }
2152
- _HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: _HttpClient, deps: [{ token: i1$7.HttpClient }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2153
- _HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: _HttpClient, providedIn: 'root' });
2154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: _HttpClient, decorators: [{
2186
+ _HttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: _HttpClient, deps: [{ token: i1$7.HttpClient }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
2187
+ _HttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: _HttpClient, providedIn: 'root' });
2188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: _HttpClient, decorators: [{
2155
2189
  type: Injectable,
2156
2190
  args: [{ providedIn: 'root' }]
2157
2191
  }], ctorParameters: function () { return [{ type: i1$7.HttpClient }, { type: i1.AlainConfigService }]; } });
@@ -2168,9 +2202,9 @@ class BaseApi {
2168
2202
  this.injector = injector;
2169
2203
  }
2170
2204
  }
2171
- BaseApi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: BaseApi, deps: [{ token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2172
- BaseApi.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: BaseApi });
2173
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: BaseApi, decorators: [{
2205
+ BaseApi.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseApi, deps: [{ token: Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2206
+ BaseApi.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseApi });
2207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseApi, decorators: [{
2174
2208
  type: Injectable
2175
2209
  }], ctorParameters: function () {
2176
2210
  return [{ type: i0.Injector, decorators: [{
@@ -2375,9 +2409,9 @@ class DatePipe {
2375
2409
  return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt);
2376
2410
  }
2377
2411
  }
2378
- DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DatePipe, deps: [{ token: i1$8.NzI18nService }], target: i0.ɵɵFactoryTarget.Pipe });
2379
- DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DatePipe, name: "_date" });
2380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: DatePipe, decorators: [{
2412
+ DatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DatePipe, deps: [{ token: i1$8.NzI18nService }], target: i0.ɵɵFactoryTarget.Pipe });
2413
+ DatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DatePipe, name: "_date" });
2414
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: DatePipe, decorators: [{
2381
2415
  type: Pipe,
2382
2416
  args: [{ name: '_date' }]
2383
2417
  }], ctorParameters: function () { return [{ type: i1$8.NzI18nService }]; } });
@@ -2394,9 +2428,9 @@ class KeysPipe {
2394
2428
  return ret;
2395
2429
  }
2396
2430
  }
2397
- KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2398
- KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: KeysPipe, name: "keys" });
2399
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: KeysPipe, decorators: [{
2431
+ KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2432
+ KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KeysPipe, name: "keys" });
2433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: KeysPipe, decorators: [{
2400
2434
  type: Pipe,
2401
2435
  args: [{ name: 'keys' }]
2402
2436
  }] });
@@ -2429,9 +2463,9 @@ class YNPipe {
2429
2463
  return isSafeHtml ? this.dom.bypassSecurityTrustHtml(html) : html;
2430
2464
  }
2431
2465
  }
2432
- YNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: YNPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
2433
- YNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: YNPipe, name: "yn" });
2434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: YNPipe, decorators: [{
2466
+ YNPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: YNPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
2467
+ YNPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: YNPipe, name: "yn" });
2468
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: YNPipe, decorators: [{
2435
2469
  type: Pipe,
2436
2470
  args: [{ name: 'yn' }]
2437
2471
  }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
@@ -2444,9 +2478,9 @@ class HTMLPipe {
2444
2478
  return html ? this.dom.bypassSecurityTrustHtml(html) : '';
2445
2479
  }
2446
2480
  }
2447
- HTMLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: HTMLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
2448
- HTMLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: HTMLPipe, name: "html" });
2449
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: HTMLPipe, decorators: [{
2481
+ HTMLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HTMLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
2482
+ HTMLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HTMLPipe, name: "html" });
2483
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: HTMLPipe, decorators: [{
2450
2484
  type: Pipe,
2451
2485
  args: [{ name: 'html' }]
2452
2486
  }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
@@ -2459,9 +2493,9 @@ class URLPipe {
2459
2493
  return url ? this.dom.bypassSecurityTrustUrl(url) : '';
2460
2494
  }
2461
2495
  }
2462
- URLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: URLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
2463
- URLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: URLPipe, name: "url" });
2464
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: URLPipe, decorators: [{
2496
+ URLPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: URLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
2497
+ URLPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: URLPipe, name: "url" });
2498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: URLPipe, decorators: [{
2465
2499
  type: Pipe,
2466
2500
  args: [{ name: 'url' }]
2467
2501
  }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
@@ -2479,19 +2513,19 @@ class AlainThemeModule {
2479
2513
  static forRoot() {
2480
2514
  return {
2481
2515
  ngModule: AlainThemeModule,
2482
- providers: [...HELPERS]
2516
+ providers: HELPERS
2483
2517
  };
2484
2518
  }
2485
2519
  static forChild() {
2486
2520
  return {
2487
2521
  ngModule: AlainThemeModule,
2488
- providers: [...HELPERS]
2522
+ providers: HELPERS
2489
2523
  };
2490
2524
  }
2491
2525
  }
2492
- AlainThemeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainThemeModule, deps: [{ token: i1$9.NzIconService }], target: i0.ɵɵFactoryTarget.NgModule });
2493
- AlainThemeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainThemeModule, declarations: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule], exports: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe, DelonLocaleModule] });
2494
- AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainThemeModule, providers: [
2526
+ AlainThemeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainThemeModule, deps: [{ token: i1$9.NzIconService }], target: i0.ɵɵFactoryTarget.NgModule });
2527
+ AlainThemeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainThemeModule, declarations: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule], exports: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe, DelonLocaleModule] });
2528
+ AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainThemeModule, providers: [
2495
2529
  {
2496
2530
  provide: ALAIN_SETTING_KEYS,
2497
2531
  useValue: {
@@ -2501,11 +2535,11 @@ AlainThemeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versio
2501
2535
  }
2502
2536
  }
2503
2537
  ], imports: [[CommonModule, RouterModule, OverlayModule, NzI18nModule], DelonLocaleModule] });
2504
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.2", ngImport: i0, type: AlainThemeModule, decorators: [{
2538
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: AlainThemeModule, decorators: [{
2505
2539
  type: NgModule,
2506
2540
  args: [{
2507
2541
  imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule],
2508
- declarations: [...PIPES],
2542
+ declarations: PIPES,
2509
2543
  providers: [
2510
2544
  {
2511
2545
  provide: ALAIN_SETTING_KEYS,
@@ -2541,11 +2575,11 @@ class PreloadOptionalModules {
2541
2575
  }
2542
2576
  }
2543
2577
 
2544
- const VERSION = new Version('13.1.0');
2578
+ const VERSION = new Version('13.3.0');
2545
2579
 
2546
2580
  /**
2547
2581
  * Generated bundle index. Do not edit.
2548
2582
  */
2549
2583
 
2550
- export { ALAIN_I18N_TOKEN, ALAIN_SETTING_KEYS, AlainI18NServiceFake, AlainI18nBaseService, AlainThemeModule, BaseApi, BaseHeaders, BaseUrl, Body, DELETE, DELON_LOCALE, DELON_LOCALE_SERVICE_PROVIDER, DELON_LOCALE_SERVICE_PROVIDER_FACTORY, DatePipe, DelonLocaleModule, DelonLocaleService, DrawerHelper, FORM, GET, HEAD, HTMLPipe, HTML_DIR, Headers, I18nPipe, JSONP, KeysPipe, LTR, MenuService, ModalHelper, OPTIONS, PATCH, POST, PUT, Path, Payload, PreloadOptionalModules, Query, REP_MAX, RTL, RTLService, RTL_DELON_COMPONENTS, RTL_DIRECTION, RTL_NZ_COMPONENTS, ResponsiveService, SettingsService, TitleService, URLPipe, VERSION, YNPipe, _HttpClient, elGR as el_GR, enUS as en_US, esES as es_ES, frFR as fr_FR, hrHR as hr_HR, itIT as it_IT, jaJP as ja_JP, koKR as ko_KR, plPL as pl_PL, preloaderFinished, slSI as sl_SI, trTR as tr_TR, zhCN as zh_CN, zhTW as zh_TW };
2584
+ export { ALAIN_I18N_TOKEN, ALAIN_SETTING_KEYS, AlainI18NGuard, AlainI18NServiceFake, AlainI18nBaseService, AlainThemeModule, BaseApi, BaseHeaders, BaseUrl, Body, DELETE, DELON_LOCALE, DELON_LOCALE_SERVICE_PROVIDER, DELON_LOCALE_SERVICE_PROVIDER_FACTORY, DatePipe, DelonLocaleModule, DelonLocaleService, DrawerHelper, FORM, GET, HEAD, HTMLPipe, HTML_DIR, Headers, I18nPipe, JSONP, KeysPipe, LTR, MenuService, ModalHelper, OPTIONS, PATCH, POST, PUT, Path, Payload, PreloadOptionalModules, Query, REP_MAX, RTL, RTLService, RTL_DELON_COMPONENTS, RTL_DIRECTION, RTL_NZ_COMPONENTS, ResponsiveService, SettingsService, TitleService, URLPipe, VERSION, YNPipe, _HttpClient, elGR as el_GR, enUS as en_US, esES as es_ES, frFR as fr_FR, hrHR as hr_HR, itIT as it_IT, jaJP as ja_JP, koKR as ko_KR, plPL as pl_PL, preloaderFinished, slSI as sl_SI, trTR as tr_TR, zhCN as zh_CN, zhTW as zh_TW };
2551
2585
  //# sourceMappingURL=theme.mjs.map