@delon/theme 16.2.1 → 16.4.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 (57) hide show
  1. package/compact.css +369 -54
  2. package/compact.min.css +1 -1
  3. package/dark.css +370 -55
  4. package/dark.min.css +1 -1
  5. package/default.css +369 -54
  6. package/default.min.css +1 -1
  7. package/esm2022/layout-default/layout-header-item-trigger.directive.mjs +4 -4
  8. package/esm2022/layout-default/layout-header-item.component.mjs +4 -4
  9. package/esm2022/layout-default/layout-header.component.mjs +4 -4
  10. package/esm2022/layout-default/layout-nav.component.mjs +4 -4
  11. package/esm2022/layout-default/layout-top-menu-item.mjs +4 -4
  12. package/esm2022/layout-default/layout.component.mjs +4 -4
  13. package/esm2022/layout-default/layout.module.mjs +5 -5
  14. package/esm2022/layout-default/layout.service.mjs +4 -4
  15. package/esm2022/setting-drawer/setting-drawer-item.component.mjs +4 -4
  16. package/esm2022/setting-drawer/setting-drawer.component.mjs +4 -4
  17. package/esm2022/setting-drawer/setting-drawer.module.mjs +5 -5
  18. package/esm2022/src/locale/locale.module.mjs +5 -5
  19. package/esm2022/src/locale/locale.service.mjs +4 -4
  20. package/esm2022/src/pipes/date/date.pipe.mjs +6 -11
  21. package/esm2022/src/pipes/keys/keys.pipe.mjs +4 -4
  22. package/esm2022/src/pipes/safe/html.pipe.mjs +4 -4
  23. package/esm2022/src/pipes/safe/url.pipe.mjs +4 -4
  24. package/esm2022/src/pipes/yn/yn.pipe.mjs +25 -20
  25. package/esm2022/src/services/drawer/drawer.helper.mjs +32 -9
  26. package/esm2022/src/services/http/http.client.mjs +4 -4
  27. package/esm2022/src/services/http/http.decorator.mjs +4 -4
  28. package/esm2022/src/services/i18n/i18n-url.guard.mjs +10 -6
  29. package/esm2022/src/services/i18n/i18n.mjs +7 -7
  30. package/esm2022/src/services/i18n/i18n.pipe.mjs +4 -4
  31. package/esm2022/src/services/menu/menu.service.mjs +4 -4
  32. package/esm2022/src/services/modal/modal.helper.mjs +12 -9
  33. package/esm2022/src/services/responsive/responsive.mjs +4 -4
  34. package/esm2022/src/services/rtl/rtl.service.mjs +4 -4
  35. package/esm2022/src/services/settings/settings.service.mjs +4 -4
  36. package/esm2022/src/services/title/title.service.mjs +4 -4
  37. package/esm2022/src/theme.module.mjs +5 -5
  38. package/esm2022/src/version.mjs +1 -1
  39. package/esm2022/theme-btn/theme-btn.component.mjs +4 -4
  40. package/esm2022/theme-btn/theme-btn.module.mjs +5 -5
  41. package/fesm2022/layout-default.mjs +25 -25
  42. package/fesm2022/layout-default.mjs.map +1 -1
  43. package/fesm2022/setting-drawer.mjs +10 -10
  44. package/fesm2022/setting-drawer.mjs.map +1 -1
  45. package/fesm2022/theme-btn.mjs +7 -7
  46. package/fesm2022/theme-btn.mjs.map +1 -1
  47. package/fesm2022/theme.mjs +131 -101
  48. package/fesm2022/theme.mjs.map +1 -1
  49. package/layout-default/style/_aside.less +1 -2
  50. package/package.json +4 -4
  51. package/src/pipes/yn/yn.pipe.d.ts +6 -0
  52. package/src/services/drawer/drawer.helper.d.ts +7 -2
  53. package/src/services/http/http.decorator.d.ts +2 -1
  54. package/src/services/i18n/i18n-url.guard.d.ts +6 -2
  55. package/src/services/modal/modal.helper.d.ts +2 -2
  56. package/system/antd/_tag.less +13 -0
  57. package/system/utils/_scrollbar.less +2 -4
@@ -83,10 +83,10 @@ class ThemeBtnComponent {
83
83
  this.doc.body.removeChild(el);
84
84
  }
85
85
  }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", 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 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.8", 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 />\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", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i5.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i6.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i6.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i7.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", 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 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.10", 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 />\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", dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i5.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i6.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i6.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i7.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
88
88
  }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ThemeBtnComponent, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ThemeBtnComponent, decorators: [{
90
90
  type: Component,
91
91
  args: [{ selector: 'theme-btn', host: {
92
92
  '[class.theme-btn]': `true`,
@@ -112,16 +112,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImpor
112
112
 
113
113
  const COMPONENTS = [ThemeBtnComponent];
114
114
  class ThemeBtnModule {
115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ThemeBtnModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
116
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: ThemeBtnModule, declarations: [ThemeBtnComponent], imports: [CommonModule, NzDropDownModule, NzToolTipModule], exports: [ThemeBtnComponent] }); }
117
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ThemeBtnModule, providers: [
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ThemeBtnModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
116
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: ThemeBtnModule, declarations: [ThemeBtnComponent], imports: [CommonModule, NzDropDownModule, NzToolTipModule], exports: [ThemeBtnComponent] }); }
117
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ThemeBtnModule, providers: [
118
118
  {
119
119
  provide: ALAIN_THEME_BTN_KEYS,
120
120
  useValue: 'site-theme'
121
121
  }
122
122
  ], imports: [CommonModule, NzDropDownModule, NzToolTipModule] }); }
123
123
  }
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ThemeBtnModule, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ThemeBtnModule, decorators: [{
125
125
  type: NgModule,
126
126
  args: [{
127
127
  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 ChangeDetectorRef,\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 { takeUntilDestroyed } from '@angular/core/rxjs-interop';\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 dir$ = this.directionality.change?.pipe(takeUntilDestroyed());\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 private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.dir = this.directionality.value;\n this.dir$.subscribe((direction: Direction) => {\n this.dir = direction;\n this.cdr.detectChanges();\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 }\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 />\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;MA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A,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAd,cAAc,EAAA,YAAA,EAAA,CAbP,iBAAiB,CAGzB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAA,EAAA,OAAA,EAAA,CAHvC,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;AAaxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EATd,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,oBAAoB;AAC7B,gBAAA,QAAQ,EAAE,YAAY;AACvB,aAAA;AACF,SAAA,EAAA,OAAA,EAAA,CANS,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAU9C,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;AACpB,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
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 ChangeDetectorRef,\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 { takeUntilDestroyed } from '@angular/core/rxjs-interop';\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 dir$ = this.directionality.change?.pipe(takeUntilDestroyed());\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 private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.dir = this.directionality.value;\n this.dir$.subscribe((direction: Direction) => {\n this.dir = direction;\n this.cdr.detectChanges();\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 }\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 />\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;AAc5B,IAAA,WAAA,CACU,QAAmB,EACnB,SAA6B,EAC7B,QAAkB,EACA,GAAc,EACpB,cAA8B,EACZ,IAAY,EAC1C,GAAsB,EAAA;QANtB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QACnB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAoB;QAC7B,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;QACA,IAAG,CAAA,GAAA,GAAH,GAAG,CAAW;QACpB,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;QAC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AA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,EATd,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,oBAAoB;AAC7B,gBAAA,QAAQ,EAAE,YAAY;AACvB,aAAA;AACF,SAAA,EAAA,OAAA,EAAA,CANS,YAAY,EAAE,gBAAgB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAU9C,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;AACpB,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
@@ -18,8 +18,7 @@ import * as i2 from '@angular/cdk/drag-drop';
18
18
  import * as i1$6 from 'ng-zorro-antd/drawer';
19
19
  import * as i1$7 from '@angular/common/http';
20
20
  import { HttpParams, HttpContextToken } from '@angular/common/http';
21
- import { formatDistanceToNow, format } from 'date-fns';
22
- import { toDate } from '@delon/util/date-time';
21
+ import { formatDate } from '@delon/util/date-time';
23
22
  import * as i1$8 from 'ng-zorro-antd/i18n';
24
23
  import { NzI18nModule } from 'ng-zorro-antd/i18n';
25
24
  import { OverlayModule } from '@angular/cdk/overlay';
@@ -115,10 +114,10 @@ class AlainI18nBaseService {
115
114
  }
116
115
  return content;
117
116
  }
118
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18nBaseService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
119
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18nBaseService }); }
117
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18nBaseService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
118
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18nBaseService }); }
120
119
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18nBaseService, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18nBaseService, decorators: [{
122
121
  type: Injectable
123
122
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }]; } });
124
123
  class AlainI18NServiceFake extends AlainI18nBaseService {
@@ -130,10 +129,10 @@ class AlainI18NServiceFake extends AlainI18nBaseService {
130
129
  getLangs() {
131
130
  return [];
132
131
  }
133
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18NServiceFake, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
134
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18NServiceFake, providedIn: 'root' }); }
132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18NServiceFake, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
133
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18NServiceFake, providedIn: 'root' }); }
135
134
  }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18NServiceFake, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18NServiceFake, decorators: [{
137
136
  type: Injectable,
138
137
  args: [{ providedIn: 'root' }]
139
138
  }] });
@@ -419,10 +418,10 @@ class MenuService {
419
418
  this._change$.unsubscribe();
420
419
  this.i18n$.unsubscribe();
421
420
  }
422
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: MenuService, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1$1.ACLService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
423
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: MenuService, providedIn: 'root' }); }
421
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: MenuService, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1$1.ACLService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
422
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: MenuService, providedIn: 'root' }); }
424
423
  }
425
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: MenuService, decorators: [{
424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: MenuService, decorators: [{
426
425
  type: Injectable,
427
426
  args: [{ providedIn: 'root' }]
428
427
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -519,10 +518,10 @@ class SettingsService {
519
518
  getUser() {
520
519
  return this._user;
521
520
  }
522
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: SettingsService, deps: [{ token: i1$2.Platform }, { token: ALAIN_SETTING_KEYS }], target: i0.ɵɵFactoryTarget.Injectable }); }
523
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: SettingsService, providedIn: 'root' }); }
521
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SettingsService, deps: [{ token: i1$2.Platform }, { token: ALAIN_SETTING_KEYS }], target: i0.ɵɵFactoryTarget.Injectable }); }
522
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SettingsService, providedIn: 'root' }); }
524
523
  }
525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: SettingsService, decorators: [{
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: SettingsService, decorators: [{
526
525
  type: Injectable,
527
526
  args: [{ providedIn: 'root' }]
528
527
  }], ctorParameters: function () { return [{ type: i1$2.Platform }, { type: undefined, decorators: [{
@@ -572,10 +571,10 @@ class ResponsiveService {
572
571
  clsMap.push(`${antColClass}-xxl-${paddingSpan(rule.xxl)}`);
573
572
  return clsMap;
574
573
  }
575
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ResponsiveService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
576
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ResponsiveService, providedIn: 'root' }); }
574
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ResponsiveService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
575
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ResponsiveService, providedIn: 'root' }); }
577
576
  }
578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ResponsiveService, decorators: [{
577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ResponsiveService, decorators: [{
579
578
  type: Injectable,
580
579
  args: [{ providedIn: 'root' }]
581
580
  }], ctorParameters: function () { return [{ type: i1.AlainConfigService }]; } });
@@ -661,10 +660,10 @@ class RTLService {
661
660
  this.delon.set(name, { direction: this.dir });
662
661
  });
663
662
  }
664
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", 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 }); }
665
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: RTLService, providedIn: 'root' }); }
663
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", 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 }); }
664
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: RTLService, providedIn: 'root' }); }
666
665
  }
667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: RTLService, decorators: [{
666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: RTLService, decorators: [{
668
667
  type: Injectable,
669
668
  args: [{ providedIn: 'root' }]
670
669
  }], ctorParameters: function () { return [{ type: i1$3.Directionality }, { type: SettingsService }, { type: i3.NzConfigService }, { type: i1.AlainConfigService }, { type: i1$2.Platform }, { type: undefined, decorators: [{
@@ -792,10 +791,10 @@ class TitleService {
792
791
  ngOnDestroy() {
793
792
  this.tit$?.unsubscribe();
794
793
  }
795
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", 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 }); }
796
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: TitleService, providedIn: 'root' }); }
794
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", 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 }); }
795
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: TitleService, providedIn: 'root' }); }
797
796
  }
798
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: TitleService, decorators: [{
797
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: TitleService, decorators: [{
799
798
  type: Injectable,
800
799
  args: [{ providedIn: 'root' }]
801
800
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1$4.Title }, { type: MenuService }, { type: undefined, decorators: [{
@@ -815,10 +814,10 @@ class I18nPipe {
815
814
  transform(key, params) {
816
815
  return this.i18n.fanyi(key, params);
817
816
  }
818
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: I18nPipe, deps: [{ token: ALAIN_I18N_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe }); }
819
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: I18nPipe, name: "i18n" }); }
817
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: I18nPipe, deps: [{ token: ALAIN_I18N_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe }); }
818
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: I18nPipe, name: "i18n" }); }
820
819
  }
821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: I18nPipe, decorators: [{
820
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: I18nPipe, decorators: [{
822
821
  type: Pipe,
823
822
  args: [{ name: 'i18n' }]
824
823
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -838,10 +837,10 @@ class AlainI18NGuardService {
838
837
  }
839
838
  return of(true);
840
839
  }
841
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18NGuardService, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
842
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18NGuardService, providedIn: 'root' }); }
840
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18NGuardService, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
841
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18NGuardService, providedIn: 'root' }); }
843
842
  }
844
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainI18NGuardService, decorators: [{
843
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainI18NGuardService, decorators: [{
845
844
  type: Injectable,
846
845
  args: [{ providedIn: 'root' }]
847
846
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
@@ -851,7 +850,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImpor
851
850
  args: [ALAIN_I18N_TOKEN]
852
851
  }] }, { type: i1.AlainConfigService }]; } });
853
852
  /**
854
- * Simple 路由守卫, [ACL Document](https://ng-alain.com/auth/guard).
853
+ * Internationalization guard, automatically recognizes the language in Url and triggers the `ALAIN_I18N_TOKEN.use` method
854
+ *
855
+ * 国际化守卫,自动识别Url中的语言,并触发 `ALAIN_I18N_TOKEN.use` 方法
855
856
  *
856
857
  * ```ts
857
858
  * data: {
@@ -862,7 +863,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImpor
862
863
  */
863
864
  const alainI18nCanActivate = childRoute => inject(AlainI18NGuardService).process(childRoute);
864
865
  /**
865
- * Simple 路由守卫, [ACL Document](https://ng-alain.com/auth/guard).
866
+ * Internationalization guard, automatically recognizes the language in Url and triggers the `ALAIN_I18N_TOKEN.use` method
867
+ *
868
+ * 国际化守卫,自动识别Url中的语言,并触发 `ALAIN_I18N_TOKEN.use` 方法
866
869
  *
867
870
  * ```ts
868
871
  * data: {
@@ -980,10 +983,10 @@ class DelonLocaleService {
980
983
  getData(path) {
981
984
  return (this._locale[path] || {});
982
985
  }
983
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DelonLocaleService, deps: [{ token: DELON_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable }); }
984
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DelonLocaleService }); }
986
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DelonLocaleService, deps: [{ token: DELON_LOCALE }], target: i0.ɵɵFactoryTarget.Injectable }); }
987
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DelonLocaleService }); }
985
988
  }
986
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DelonLocaleService, decorators: [{
989
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DelonLocaleService, decorators: [{
987
990
  type: Injectable
988
991
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
989
992
  type: Inject,
@@ -999,11 +1002,11 @@ const DELON_LOCALE_SERVICE_PROVIDER = {
999
1002
  };
1000
1003
 
1001
1004
  class DelonLocaleModule {
1002
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DelonLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1003
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: DelonLocaleModule }); }
1004
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DelonLocaleModule, providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER] }); }
1005
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DelonLocaleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1006
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: DelonLocaleModule }); }
1007
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DelonLocaleModule, providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER] }); }
1005
1008
  }
1006
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DelonLocaleModule, decorators: [{
1009
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DelonLocaleModule, decorators: [{
1007
1010
  type: NgModule,
1008
1011
  args: [{
1009
1012
  providers: [{ provide: DELON_LOCALE, useValue: zhCN }, DELON_LOCALE_SERVICE_PROVIDER]
@@ -2022,9 +2025,12 @@ class ModalHelper {
2022
2025
  if (typeof size === 'number') {
2023
2026
  width = `${size}px`;
2024
2027
  }
2025
- else {
2028
+ else if (['sm', 'md', 'lg', 'xl'].includes(size)) {
2026
2029
  cls = `modal-${size}`;
2027
2030
  }
2031
+ else {
2032
+ width = size;
2033
+ }
2028
2034
  }
2029
2035
  if (includeTabs) {
2030
2036
  cls += ' modal-include-tabs';
@@ -2043,14 +2049,14 @@ class ModalHelper {
2043
2049
  };
2044
2050
  cls += ` ${this.dragClsPrefix} ${dragWrapCls}`;
2045
2051
  }
2046
- const defaultOptions = {
2052
+ const subject = this.srv.create({
2047
2053
  nzWrapClassName: cls,
2048
2054
  nzContent: comp,
2049
2055
  nzWidth: width ? width : undefined,
2050
2056
  nzFooter: null,
2051
- nzData: params
2052
- };
2053
- const subject = this.srv.create({ ...defaultOptions, ...modalOptions });
2057
+ nzData: params,
2058
+ ...modalOptions
2059
+ });
2054
2060
  // 保留 nzComponentParams 原有风格,但依然可以通过 @Inject(NZ_MODAL_DATA) 获取
2055
2061
  if (useNzData !== true) {
2056
2062
  Object.assign(subject.componentInstance, params);
@@ -2097,10 +2103,10 @@ class ModalHelper {
2097
2103
  };
2098
2104
  return this.create(comp, params, { ...options, modalOptions });
2099
2105
  }
2100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ModalHelper, deps: [{ token: i1$5.NzModalService }, { token: i2.DragDrop }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
2101
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ModalHelper, providedIn: 'root' }); }
2106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ModalHelper, deps: [{ token: i1$5.NzModalService }, { token: i2.DragDrop }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
2107
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ModalHelper, providedIn: 'root' }); }
2102
2108
  }
2103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: ModalHelper, decorators: [{
2109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: ModalHelper, decorators: [{
2104
2110
  type: Injectable,
2105
2111
  args: [{ providedIn: 'root' }]
2106
2112
  }], ctorParameters: function () { return [{ type: i1$5.NzModalService }, { type: i2.DragDrop }, { type: undefined, decorators: [{
@@ -2124,8 +2130,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImpor
2124
2130
  * this.NzDrawerRef.close(false);
2125
2131
  */
2126
2132
  class DrawerHelper {
2127
- constructor(srv) {
2133
+ get openDrawers() {
2134
+ return this.parentDrawer ? this.parentDrawer.openDrawers : this.openDrawersAtThisLevel;
2135
+ }
2136
+ constructor(srv, parentDrawer) {
2128
2137
  this.srv = srv;
2138
+ this.parentDrawer = parentDrawer;
2139
+ this.openDrawersAtThisLevel = [];
2129
2140
  }
2130
2141
  /**
2131
2142
  * 构建一个抽屉
@@ -2161,8 +2172,9 @@ class DrawerHelper {
2161
2172
  'padding-bottom.px': footerHeight + 24
2162
2173
  };
2163
2174
  }
2164
- const subject = this.srv.create({ ...defaultOptions, ...drawerOptions });
2165
- const afterClose$ = subject.afterClose.subscribe((res) => {
2175
+ const ref = this.srv.create({ ...defaultOptions, ...drawerOptions });
2176
+ this.openDrawers.push(ref);
2177
+ const afterClose$ = ref.afterClose.subscribe((res) => {
2166
2178
  if (options.exact === true) {
2167
2179
  if (res != null) {
2168
2180
  observer.next(res);
@@ -2173,9 +2185,22 @@ class DrawerHelper {
2173
2185
  }
2174
2186
  observer.complete();
2175
2187
  afterClose$.unsubscribe();
2188
+ this.close(ref);
2176
2189
  });
2177
2190
  });
2178
2191
  }
2192
+ close(ref) {
2193
+ const idx = this.openDrawers.indexOf(ref);
2194
+ if (idx === -1)
2195
+ return;
2196
+ this.openDrawers.splice(idx, 1);
2197
+ }
2198
+ closeAll() {
2199
+ let i = this.openDrawers.length;
2200
+ while (i--) {
2201
+ this.openDrawers[i].close();
2202
+ }
2203
+ }
2179
2204
  /**
2180
2205
  * 构建一个抽屉,点击蒙层不允许关闭
2181
2206
  */
@@ -2186,13 +2211,17 @@ class DrawerHelper {
2186
2211
  };
2187
2212
  return this.create(title, comp, params, { ...options, drawerOptions });
2188
2213
  }
2189
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DrawerHelper, deps: [{ token: i1$6.NzDrawerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2190
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DrawerHelper, providedIn: 'root' }); }
2214
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DrawerHelper, deps: [{ token: i1$6.NzDrawerService }, { token: DrawerHelper, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
2215
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DrawerHelper, providedIn: 'root' }); }
2191
2216
  }
2192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DrawerHelper, decorators: [{
2217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DrawerHelper, decorators: [{
2193
2218
  type: Injectable,
2194
2219
  args: [{ providedIn: 'root' }]
2195
- }], ctorParameters: function () { return [{ type: i1$6.NzDrawerService }]; } });
2220
+ }], ctorParameters: function () { return [{ type: i1$6.NzDrawerService }, { type: DrawerHelper, decorators: [{
2221
+ type: Optional
2222
+ }, {
2223
+ type: SkipSelf
2224
+ }] }]; } });
2196
2225
 
2197
2226
  /* eslint-disable @typescript-eslint/no-explicit-any */
2198
2227
  /**
@@ -2333,10 +2362,10 @@ class _HttpClient {
2333
2362
  // Make sure to always be asynchronous, see issues: https://github.com/ng-alain/ng-alain/issues/1954
2334
2363
  delay(0), tap(() => this.push()), switchMap(() => this.http.request(method, url, options)), finalize(() => this.pop()));
2335
2364
  }
2336
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: _HttpClient, deps: [{ token: i1$7.HttpClient }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2337
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: _HttpClient, providedIn: 'root' }); }
2365
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: _HttpClient, deps: [{ token: i1$7.HttpClient }, { token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
2366
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: _HttpClient, providedIn: 'root' }); }
2338
2367
  }
2339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: _HttpClient, decorators: [{
2368
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: _HttpClient, decorators: [{
2340
2369
  type: Injectable,
2341
2370
  args: [{ providedIn: 'root' }]
2342
2371
  }], ctorParameters: function () { return [{ type: i1$7.HttpClient }, { type: i1.AlainConfigService }]; } });
@@ -2352,10 +2381,10 @@ class BaseApi {
2352
2381
  constructor(injector) {
2353
2382
  this.injector = injector;
2354
2383
  }
2355
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: BaseApi, deps: [{ token: Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
2356
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: BaseApi }); }
2384
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: BaseApi, deps: [{ token: Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
2385
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: BaseApi }); }
2357
2386
  }
2358
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: BaseApi, decorators: [{
2387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: BaseApi, decorators: [{
2359
2388
  type: Injectable
2360
2389
  }], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
2361
2390
  type: Inject,
@@ -2593,16 +2622,12 @@ class DatePipe {
2593
2622
  this.nzI18n = nzI18n;
2594
2623
  }
2595
2624
  transform(value, formatString = 'yyyy-MM-dd HH:mm') {
2596
- value = toDate(value);
2597
- if (isNaN(value))
2598
- return '';
2599
- const langOpt = { locale: this.nzI18n.getDateLocale() };
2600
- return formatString === 'fn' ? formatDistanceToNow(value, langOpt) : format(value, formatString, langOpt);
2625
+ return formatDate(value, formatString, this.nzI18n.getDateLocale());
2601
2626
  }
2602
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DatePipe, deps: [{ token: i1$8.NzI18nService }], target: i0.ɵɵFactoryTarget.Pipe }); }
2603
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: DatePipe, name: "_date" }); }
2627
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DatePipe, deps: [{ token: i1$8.NzI18nService }], target: i0.ɵɵFactoryTarget.Pipe }); }
2628
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: DatePipe, name: "_date" }); }
2604
2629
  }
2605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: DatePipe, decorators: [{
2630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: DatePipe, decorators: [{
2606
2631
  type: Pipe,
2607
2632
  args: [{ name: '_date' }]
2608
2633
  }], ctorParameters: function () { return [{ type: i1$8.NzI18nService }]; } });
@@ -2618,10 +2643,10 @@ class KeysPipe {
2618
2643
  });
2619
2644
  return ret;
2620
2645
  }
2621
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2622
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: KeysPipe, name: "keys" }); }
2646
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
2647
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: KeysPipe, name: "keys" }); }
2623
2648
  }
2624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: KeysPipe, decorators: [{
2649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: KeysPipe, decorators: [{
2625
2650
  type: Pipe,
2626
2651
  args: [{ name: 'keys' }]
2627
2652
  }] });
@@ -2630,33 +2655,38 @@ const ICON_YES = `<svg viewBox="64 64 896 896" fill="currentColor" width="1em" h
2630
2655
  const ICON_NO = `<svg viewBox="64 64 896 896" fill="currentColor" width="1em" height="1em" aria-hidden="true"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>`;
2631
2656
  const CLS_YES = `class="yn__yes"`;
2632
2657
  const CLS_NO = `class="yn__no"`;
2658
+ function yn(value, opt) {
2659
+ let html = '';
2660
+ let { yes, no, mode } = { ...opt };
2661
+ yes = yes || '是';
2662
+ no = no || '否';
2663
+ switch (mode) {
2664
+ case 'full':
2665
+ html = value
2666
+ ? `<i ${CLS_YES}>${ICON_YES}<span>${yes}</span></i>`
2667
+ : `<i ${CLS_NO}>${ICON_NO}<span>${no}</span></i>`;
2668
+ break;
2669
+ case 'text':
2670
+ html = value ? `<i ${CLS_YES}>${yes}</i>` : `<i ${CLS_NO}>${no}</i>`;
2671
+ break;
2672
+ default:
2673
+ html = value ? `<i ${CLS_YES} title="${yes}">${ICON_YES}</i>` : `<i ${CLS_NO} title="${no}">${ICON_NO}</i>`;
2674
+ break;
2675
+ }
2676
+ return html;
2677
+ }
2633
2678
  class YNPipe {
2634
2679
  constructor(dom) {
2635
2680
  this.dom = dom;
2636
2681
  }
2637
2682
  transform(value, yes, no, mode, isSafeHtml = true) {
2638
- let html = '';
2639
- yes = yes || '是';
2640
- no = no || '否';
2641
- switch (mode) {
2642
- case 'full':
2643
- html = value
2644
- ? `<i ${CLS_YES}>${ICON_YES}<span>${yes}</span></i>`
2645
- : `<i ${CLS_NO}>${ICON_NO}<span>${no}</span></i>`;
2646
- break;
2647
- case 'text':
2648
- html = value ? `<i ${CLS_YES}>${yes}</i>` : `<i ${CLS_NO}>${no}</i>`;
2649
- break;
2650
- default:
2651
- html = value ? `<i ${CLS_YES} title="${yes}">${ICON_YES}</i>` : `<i ${CLS_NO} title="${no}">${ICON_NO}</i>`;
2652
- break;
2653
- }
2683
+ const html = yn(value, { yes, no, mode });
2654
2684
  return isSafeHtml ? this.dom.bypassSecurityTrustHtml(html) : html;
2655
2685
  }
2656
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: YNPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
2657
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: YNPipe, name: "yn" }); }
2686
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: YNPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
2687
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: YNPipe, name: "yn" }); }
2658
2688
  }
2659
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: YNPipe, decorators: [{
2689
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: YNPipe, decorators: [{
2660
2690
  type: Pipe,
2661
2691
  args: [{ name: 'yn' }]
2662
2692
  }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
@@ -2668,10 +2698,10 @@ class HTMLPipe {
2668
2698
  transform(html) {
2669
2699
  return html ? this.dom.bypassSecurityTrustHtml(html) : '';
2670
2700
  }
2671
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HTMLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
2672
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: HTMLPipe, name: "html" }); }
2701
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: HTMLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
2702
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: HTMLPipe, name: "html" }); }
2673
2703
  }
2674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: HTMLPipe, decorators: [{
2704
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: HTMLPipe, decorators: [{
2675
2705
  type: Pipe,
2676
2706
  args: [{ name: 'html' }]
2677
2707
  }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
@@ -2683,10 +2713,10 @@ class URLPipe {
2683
2713
  transform(url) {
2684
2714
  return url ? this.dom.bypassSecurityTrustUrl(url) : '';
2685
2715
  }
2686
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: URLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
2687
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: URLPipe, name: "url" }); }
2716
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: URLPipe, deps: [{ token: i1$4.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
2717
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: URLPipe, name: "url" }); }
2688
2718
  }
2689
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: URLPipe, decorators: [{
2719
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: URLPipe, decorators: [{
2690
2720
  type: Pipe,
2691
2721
  args: [{ name: 'url' }]
2692
2722
  }], ctorParameters: function () { return [{ type: i1$4.DomSanitizer }]; } });
@@ -2713,9 +2743,9 @@ class AlainThemeModule {
2713
2743
  providers: HELPERS
2714
2744
  };
2715
2745
  }
2716
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainThemeModule, deps: [{ token: i1$9.NzIconService }], target: i0.ɵɵFactoryTarget.NgModule }); }
2717
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.8", ngImport: i0, type: AlainThemeModule, declarations: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule], exports: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe, DelonLocaleModule] }); }
2718
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainThemeModule, providers: [
2746
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainThemeModule, deps: [{ token: i1$9.NzIconService }], target: i0.ɵɵFactoryTarget.NgModule }); }
2747
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.10", ngImport: i0, type: AlainThemeModule, declarations: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule], exports: [DatePipe, KeysPipe, YNPipe, I18nPipe, HTMLPipe, URLPipe, DelonLocaleModule] }); }
2748
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainThemeModule, providers: [
2719
2749
  {
2720
2750
  provide: ALAIN_SETTING_KEYS,
2721
2751
  useValue: {
@@ -2726,7 +2756,7 @@ class AlainThemeModule {
2726
2756
  }
2727
2757
  ], imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule, DelonLocaleModule] }); }
2728
2758
  }
2729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.8", ngImport: i0, type: AlainThemeModule, decorators: [{
2759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.10", ngImport: i0, type: AlainThemeModule, decorators: [{
2730
2760
  type: NgModule,
2731
2761
  args: [{
2732
2762
  imports: [CommonModule, RouterModule, OverlayModule, NzI18nModule],
@@ -2765,11 +2795,11 @@ class PreloadOptionalModules {
2765
2795
  }
2766
2796
  }
2767
2797
 
2768
- const VERSION = new Version('16.2.1');
2798
+ const VERSION = new Version('16.4.0');
2769
2799
 
2770
2800
  /**
2771
2801
  * Generated bundle index. Do not edit.
2772
2802
  */
2773
2803
 
2774
- export { ALAIN_I18N_TOKEN, ALAIN_SETTING_KEYS, AlainI18NGuardService, AlainI18NServiceFake, AlainI18nBaseService, AlainThemeModule, BaseApi, BaseHeaders, BaseUrl, Body, CUSTOM_ERROR, DELETE, DELON_LOCALE, DELON_LOCALE_SERVICE_PROVIDER, DELON_LOCALE_SERVICE_PROVIDER_FACTORY, DatePipe, DelonLocaleModule, DelonLocaleService, DrawerHelper, FORM, GET, HEAD, HTMLPipe, HTML_DIR, Headers, I18nPipe, IGNORE_BASE_URL, JSONP, KeysPipe, LTR, MenuService, ModalHelper, OPTIONS, PATCH, POST, PUT, Path, Payload, PreloadOptionalModules, Query, RAW_BODY, REP_MAX, RTL, RTLService, RTL_DELON_COMPONENTS, RTL_DIRECTION, RTL_NZ_COMPONENTS, ResponsiveService, SPAN_MAX, SettingsService, TitleService, URLPipe, VERSION, YNPipe, _HttpClient, alainI18nCanActivate, alainI18nCanActivateChild, 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 };
2804
+ export { ALAIN_I18N_TOKEN, ALAIN_SETTING_KEYS, AlainI18NGuardService, AlainI18NServiceFake, AlainI18nBaseService, AlainThemeModule, BaseApi, BaseHeaders, BaseUrl, Body, CUSTOM_ERROR, DELETE, DELON_LOCALE, DELON_LOCALE_SERVICE_PROVIDER, DELON_LOCALE_SERVICE_PROVIDER_FACTORY, DatePipe, DelonLocaleModule, DelonLocaleService, DrawerHelper, FORM, GET, HEAD, HTMLPipe, HTML_DIR, Headers, I18nPipe, IGNORE_BASE_URL, JSONP, KeysPipe, LTR, MenuService, ModalHelper, OPTIONS, PATCH, POST, PUT, Path, Payload, PreloadOptionalModules, Query, RAW_BODY, REP_MAX, RTL, RTLService, RTL_DELON_COMPONENTS, RTL_DIRECTION, RTL_NZ_COMPONENTS, ResponsiveService, SPAN_MAX, SettingsService, TitleService, URLPipe, VERSION, YNPipe, _HttpClient, alainI18nCanActivate, alainI18nCanActivateChild, 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, yn, zhCN as zh_CN, zhTW as zh_TW };
2775
2805
  //# sourceMappingURL=theme.mjs.map