@delon/abc 19.2.0 → 20.0.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 (239) hide show
  1. package/auto-focus/index.d.ts +19 -2
  2. package/cell/index.d.ts +316 -6
  3. package/count-down/index.d.ts +26 -5
  4. package/date-picker/index.d.ts +51 -5
  5. package/down-file/index.d.ts +34 -5
  6. package/ellipsis/index.d.ts +55 -5
  7. package/error-collect/index.d.ts +35 -5
  8. package/exception/index.d.ts +45 -5
  9. package/fesm2022/auto-focus.mjs +7 -7
  10. package/fesm2022/cell.mjs +14 -15
  11. package/fesm2022/cell.mjs.map +1 -1
  12. package/fesm2022/chart-observer-size.mjs +11 -11
  13. package/fesm2022/count-down.mjs +8 -9
  14. package/fesm2022/count-down.mjs.map +1 -1
  15. package/fesm2022/date-picker.mjs +16 -15
  16. package/fesm2022/date-picker.mjs.map +1 -1
  17. package/fesm2022/down-file.mjs +8 -8
  18. package/fesm2022/ellipsis.mjs +9 -9
  19. package/fesm2022/ellipsis.mjs.map +1 -1
  20. package/fesm2022/error-collect.mjs +15 -15
  21. package/fesm2022/error-collect.mjs.map +1 -1
  22. package/fesm2022/exception.mjs +94 -78
  23. package/fesm2022/exception.mjs.map +1 -1
  24. package/fesm2022/footer-toolbar.mjs +44 -22
  25. package/fesm2022/footer-toolbar.mjs.map +1 -1
  26. package/fesm2022/full-content.mjs +25 -38
  27. package/fesm2022/full-content.mjs.map +1 -1
  28. package/fesm2022/global-footer.mjs +79 -60
  29. package/fesm2022/global-footer.mjs.map +1 -1
  30. package/fesm2022/hotkey.mjs +8 -8
  31. package/fesm2022/loading.mjs +12 -12
  32. package/fesm2022/loading.mjs.map +1 -1
  33. package/fesm2022/lodop.mjs +12 -11
  34. package/fesm2022/lodop.mjs.map +1 -1
  35. package/fesm2022/media.mjs +12 -13
  36. package/fesm2022/media.mjs.map +1 -1
  37. package/fesm2022/notice-icon.mjs +19 -29
  38. package/fesm2022/notice-icon.mjs.map +1 -1
  39. package/fesm2022/onboarding.mjs +14 -14
  40. package/fesm2022/onboarding.mjs.map +1 -1
  41. package/fesm2022/page-header.mjs +22 -27
  42. package/fesm2022/page-header.mjs.map +1 -1
  43. package/fesm2022/pdf.mjs +13 -13
  44. package/fesm2022/pdf.mjs.map +1 -1
  45. package/fesm2022/quick-menu.mjs +9 -9
  46. package/fesm2022/quick-menu.mjs.map +1 -1
  47. package/fesm2022/reuse-tab.mjs +32 -38
  48. package/fesm2022/reuse-tab.mjs.map +1 -1
  49. package/fesm2022/se.mjs +20 -21
  50. package/fesm2022/se.mjs.map +1 -1
  51. package/fesm2022/sg.mjs +17 -18
  52. package/fesm2022/sg.mjs.map +1 -1
  53. package/fesm2022/st.mjs +73 -84
  54. package/fesm2022/st.mjs.map +1 -1
  55. package/fesm2022/sv.mjs +23 -25
  56. package/fesm2022/sv.mjs.map +1 -1
  57. package/fesm2022/tag-select.mjs +13 -29
  58. package/fesm2022/tag-select.mjs.map +1 -1
  59. package/fesm2022/xlsx.mjs +16 -15
  60. package/fesm2022/xlsx.mjs.map +1 -1
  61. package/fesm2022/zip.mjs +8 -7
  62. package/fesm2022/zip.mjs.map +1 -1
  63. package/footer-toolbar/index.d.ts +23 -5
  64. package/full-content/index.d.ts +55 -5
  65. package/global-footer/index.d.ts +44 -5
  66. package/hotkey/index.d.ts +25 -5
  67. package/index.d.ts +2 -5
  68. package/index.less +0 -2
  69. package/loading/index.d.ts +93 -5
  70. package/lodop/index.d.ts +277 -5
  71. package/media/index.d.ts +61 -5
  72. package/notice-icon/index.d.ts +90 -5
  73. package/observers/index.d.ts +34 -5
  74. package/onboarding/index.d.ts +212 -5
  75. package/package.json +5 -13
  76. package/page-header/index.d.ts +83 -5
  77. package/pdf/index.d.ts +142 -5
  78. package/quick-menu/index.d.ts +38 -5
  79. package/reuse-tab/index.d.ts +512 -3
  80. package/se/index.d.ts +129 -5
  81. package/sg/index.d.ts +44 -5
  82. package/st/index.d.ts +1708 -3
  83. package/sv/index.d.ts +96 -5
  84. package/tag-select/index.d.ts +27 -5
  85. package/theme-dark.less +0 -4
  86. package/theme-default.less +0 -8
  87. package/xlsx/index.d.ts +71 -5
  88. package/zip/index.d.ts +65 -5
  89. package/auto-focus/auto-focus.directive.d.ts +0 -10
  90. package/auto-focus/auto-focus.module.d.ts +0 -7
  91. package/avatar-list/avatar-list-item.component.d.ts +0 -9
  92. package/avatar-list/avatar-list.component.d.ts +0 -29
  93. package/avatar-list/avatar-list.module.d.ts +0 -14
  94. package/avatar-list/index.d.ts +0 -5
  95. package/avatar-list/public_api.d.ts +0 -3
  96. package/avatar-list/style/index.less +0 -53
  97. package/avatar-list/style/rtl.less +0 -3
  98. package/cell/cell-host.directive.d.ts +0 -10
  99. package/cell/cell.component.d.ts +0 -30
  100. package/cell/cell.module.d.ts +0 -17
  101. package/cell/cell.service.d.ts +0 -19
  102. package/cell/cell.types.d.ts +0 -234
  103. package/cell/provide.d.ts +0 -10
  104. package/count-down/count-down.component.d.ts +0 -15
  105. package/count-down/count-down.module.d.ts +0 -9
  106. package/count-down/public_api.d.ts +0 -2
  107. package/date-picker/date-picker.module.d.ts +0 -11
  108. package/date-picker/public_api.d.ts +0 -3
  109. package/date-picker/range-shortcut.component.d.ts +0 -10
  110. package/date-picker/range.directive.d.ts +0 -30
  111. package/down-file/down-file.directive.d.ts +0 -23
  112. package/down-file/down-file.module.d.ts +0 -9
  113. package/down-file/public_api.d.ts +0 -2
  114. package/ellipsis/ellipsis.component.d.ts +0 -43
  115. package/ellipsis/ellipsis.module.d.ts +0 -10
  116. package/ellipsis/public_api.d.ts +0 -2
  117. package/error-collect/error-collect.component.d.ts +0 -23
  118. package/error-collect/error-collect.module.d.ts +0 -9
  119. package/error-collect/public_api.d.ts +0 -2
  120. package/exception/exception.component.d.ts +0 -36
  121. package/exception/exception.module.d.ts +0 -12
  122. package/exception/public_api.d.ts +0 -2
  123. package/fesm2022/avatar-list.mjs +0 -132
  124. package/fesm2022/avatar-list.mjs.map +0 -1
  125. package/fesm2022/result.mjs +0 -84
  126. package/fesm2022/result.mjs.map +0 -1
  127. package/footer-toolbar/footer-toolbar.component.d.ts +0 -14
  128. package/footer-toolbar/footer-toolbar.module.d.ts +0 -10
  129. package/footer-toolbar/public_api.d.ts +0 -2
  130. package/full-content/full-content-toggle.directive.d.ts +0 -7
  131. package/full-content/full-content.component.d.ts +0 -32
  132. package/full-content/full-content.module.d.ts +0 -9
  133. package/full-content/full-content.service.d.ts +0 -10
  134. package/full-content/public_api.d.ts +0 -4
  135. package/global-footer/global-footer-item.component.d.ts +0 -10
  136. package/global-footer/global-footer.component.d.ts +0 -22
  137. package/global-footer/global-footer.module.d.ts +0 -10
  138. package/global-footer/global-footer.types.d.ts +0 -7
  139. package/global-footer/public_api.d.ts +0 -4
  140. package/hotkey/hotkey.directive.d.ts +0 -16
  141. package/hotkey/hotkey.module.d.ts +0 -7
  142. package/hotkey/public_api.d.ts +0 -2
  143. package/loading/loading.component.d.ts +0 -11
  144. package/loading/loading.module.d.ts +0 -12
  145. package/loading/loading.service.d.ts +0 -34
  146. package/loading/loading.types.d.ts +0 -35
  147. package/loading/public_api.d.ts +0 -4
  148. package/lodop/lodop.module.d.ts +0 -6
  149. package/lodop/lodop.service.d.ts +0 -74
  150. package/lodop/lodop.types.d.ts +0 -193
  151. package/lodop/public_api.d.ts +0 -3
  152. package/media/media.component.d.ts +0 -33
  153. package/media/media.module.d.ts +0 -8
  154. package/media/media.service.d.ts +0 -17
  155. package/media/public_api.d.ts +0 -3
  156. package/notice-icon/notice-icon-tab.component.d.ts +0 -13
  157. package/notice-icon/notice-icon.component.d.ts +0 -25
  158. package/notice-icon/notice-icon.module.d.ts +0 -18
  159. package/notice-icon/notice-icon.types.d.ts +0 -36
  160. package/notice-icon/public_api.d.ts +0 -4
  161. package/observers/observer-size.d.ts +0 -31
  162. package/observers/public-api.d.ts +0 -1
  163. package/onboarding/onboarding.component.d.ts +0 -35
  164. package/onboarding/onboarding.module.d.ts +0 -13
  165. package/onboarding/onboarding.service.d.ts +0 -58
  166. package/onboarding/onboarding.storage.d.ts +0 -11
  167. package/onboarding/onboarding.types.d.ts +0 -95
  168. package/onboarding/public_api.d.ts +0 -5
  169. package/page-header/page-header.component.d.ts +0 -70
  170. package/page-header/page-header.module.d.ts +0 -14
  171. package/page-header/public_api.d.ts +0 -2
  172. package/pdf/pdf.component.d.ts +0 -101
  173. package/pdf/pdf.config.d.ts +0 -2
  174. package/pdf/pdf.module.d.ts +0 -9
  175. package/pdf/pdf.types.d.ts +0 -29
  176. package/pdf/public_api.d.ts +0 -4
  177. package/public_api.d.ts +0 -2
  178. package/quick-menu/public_api.d.ts +0 -2
  179. package/quick-menu/quick-menu.component.d.ts +0 -26
  180. package/quick-menu/quick-menu.module.d.ts +0 -10
  181. package/result/index.d.ts +0 -5
  182. package/result/public_api.d.ts +0 -2
  183. package/result/result.component.d.ts +0 -21
  184. package/result/result.module.d.ts +0 -13
  185. package/result/style/index.less +0 -66
  186. package/result/style/rtl.less +0 -3
  187. package/reuse-tab/lifecycle_hooks.d.ts +0 -16
  188. package/reuse-tab/provide.d.ts +0 -28
  189. package/reuse-tab/public_api.d.ts +0 -14
  190. package/reuse-tab/reuse-tab-context-menu.component.d.ts +0 -21
  191. package/reuse-tab/reuse-tab-context.component.d.ts +0 -11
  192. package/reuse-tab/reuse-tab-context.directive.d.ts +0 -10
  193. package/reuse-tab/reuse-tab-context.service.d.ts +0 -14
  194. package/reuse-tab/reuse-tab.cache.d.ts +0 -16
  195. package/reuse-tab/reuse-tab.component.d.ts +0 -79
  196. package/reuse-tab/reuse-tab.interfaces.d.ts +0 -110
  197. package/reuse-tab/reuse-tab.module.d.ts +0 -17
  198. package/reuse-tab/reuse-tab.service.d.ts +0 -192
  199. package/reuse-tab/reuse-tab.state.d.ts +0 -14
  200. package/reuse-tab/reuse-tab.strategy.d.ts +0 -10
  201. package/se/public_api.d.ts +0 -4
  202. package/se/se-container.component.d.ts +0 -49
  203. package/se/se.component.d.ts +0 -60
  204. package/se/se.module.d.ts +0 -12
  205. package/se/se.types.d.ts +0 -9
  206. package/sg/public_api.d.ts +0 -3
  207. package/sg/sg-container.component.d.ts +0 -15
  208. package/sg/sg.component.d.ts +0 -19
  209. package/sg/sg.module.d.ts +0 -9
  210. package/st/provide.d.ts +0 -10
  211. package/st/public_api.d.ts +0 -12
  212. package/st/st-column-source.d.ts +0 -47
  213. package/st/st-data-source.d.ts +0 -77
  214. package/st/st-export.d.ts +0 -11
  215. package/st/st-filter.component.d.ts +0 -23
  216. package/st/st-row.directive.d.ts +0 -20
  217. package/st/st-widget-host.directive.d.ts +0 -12
  218. package/st/st-widget.d.ts +0 -11
  219. package/st/st.component.d.ts +0 -295
  220. package/st/st.config.d.ts +0 -2
  221. package/st/st.interfaces.d.ts +0 -1201
  222. package/st/st.module.d.ts +0 -9
  223. package/st/st.types.d.ts +0 -77
  224. package/sv/public_api.d.ts +0 -4
  225. package/sv/sv-container.component.d.ts +0 -39
  226. package/sv/sv-value.component.d.ts +0 -10
  227. package/sv/sv.component.d.ts +0 -34
  228. package/sv/sv.module.d.ts +0 -14
  229. package/tag-select/public_api.d.ts +0 -2
  230. package/tag-select/tag-select.component.d.ts +0 -21
  231. package/tag-select/tag-select.module.d.ts +0 -10
  232. package/xlsx/public_api.d.ts +0 -4
  233. package/xlsx/xlsx.directive.d.ts +0 -9
  234. package/xlsx/xlsx.module.d.ts +0 -7
  235. package/xlsx/xlsx.service.d.ts +0 -27
  236. package/xlsx/xlsx.types.d.ts +0 -27
  237. package/zip/public_api.d.ts +0 -2
  238. package/zip/zip.service.d.ts +0 -34
  239. package/zip/zip.types.d.ts +0 -28
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, NgZone, Directive, Input, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, NgZone, Input, Directive, NgModule } from '@angular/core';
3
3
  import { Platform } from '@angular/cdk/platform';
4
4
  import { install, uninstall } from '@github/hotkey';
5
5
 
@@ -22,10 +22,10 @@ class HotkeyDirective {
22
22
  return;
23
23
  this.ngZone.runOutsideAngular(() => uninstall(this.el));
24
24
  }
25
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: HotkeyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
26
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.6", type: HotkeyDirective, isStandalone: true, selector: "[hotkey]", inputs: { hotkey: "hotkey" }, ngImport: i0 });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HotkeyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
26
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: HotkeyDirective, isStandalone: true, selector: "[hotkey]", inputs: { hotkey: "hotkey" }, ngImport: i0 });
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: HotkeyDirective, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HotkeyDirective, decorators: [{
29
29
  type: Directive,
30
30
  args: [{ selector: '[hotkey]' }]
31
31
  }], propDecorators: { hotkey: [{
@@ -35,11 +35,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
35
35
 
36
36
  const DIRECTIVES = [HotkeyDirective];
37
37
  class HotkeyModule {
38
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: HotkeyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
39
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: HotkeyModule, imports: [HotkeyDirective], exports: [HotkeyDirective] });
40
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: HotkeyModule });
38
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HotkeyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
39
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: HotkeyModule, imports: [HotkeyDirective], exports: [HotkeyDirective] });
40
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HotkeyModule });
41
41
  }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: HotkeyModule, decorators: [{
42
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: HotkeyModule, decorators: [{
43
43
  type: NgModule,
44
44
  args: [{
45
45
  imports: DIRECTIVES,
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, ViewEncapsulation, inject, Injectable, NgModule } from '@angular/core';
2
+ import { ViewEncapsulation, ChangeDetectionStrategy, Component, inject, Injectable, NgModule } from '@angular/core';
3
3
  import { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';
4
4
  import { NzSpinComponent, NzSpinModule } from 'ng-zorro-antd/spin';
5
5
  import { Directionality } from '@angular/cdk/bidi';
@@ -18,15 +18,15 @@ class LoadingDefaultComponent {
18
18
  get custom() {
19
19
  return this.options.custom;
20
20
  }
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingDefaultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: LoadingDefaultComponent, isStandalone: true, selector: "loading-default", host: { properties: { "class.loading-default": "true", "class.loading-default-rtl": "dir === 'rtl'" } }, ngImport: i0, template: "@if (options.type! !== 'text') {\n <div class=\"loading-default__icon\">\n @switch (options.type) {\n @case ('spin') {\n <nz-spin nzSimple />\n }\n @case ('icon') {\n <nz-icon [nzType]=\"icon.type!\" [nzTheme]=\"icon.theme!\" [nzSpin]=\"icon.spin\" />\n }\n @default {\n <div class=\"loading-default__custom\" [style]=\"custom.style!\" [innerHTML]=\"custom.html\"></div>\n }\n }\n </div>\n}\n@if (options.text) {\n <div class=\"loading-default__text\">{{ options.text }}</div>\n}\n", dependencies: [{ kind: "component", type: NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
21
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingDefaultComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: LoadingDefaultComponent, isStandalone: true, selector: "loading-default", host: { properties: { "class.loading-default": "true", "class.loading-default-rtl": "dir === 'rtl'" } }, ngImport: i0, template: "@if (options.type! !== 'text') {\n <div class=\"loading-default__icon\">\n @switch (options.type) {\n @case ('spin') {\n <nz-spin nzSimple />\n }\n @case ('icon') {\n <nz-icon [nzType]=\"icon.type!\" [nzTheme]=\"icon.theme!\" [nzSpin]=\"icon.spin\" />\n }\n @default {\n <div class=\"loading-default__custom\" [style]=\"custom.style!\" [innerHTML]=\"custom.html\"></div>\n }\n }\n </div>\n}\n@if (options.text) {\n <div class=\"loading-default__text\">{{ options.text }}</div>\n}\n", dependencies: [{ kind: "component", type: NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingDefaultComponent, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingDefaultComponent, decorators: [{
25
25
  type: Component,
26
26
  args: [{ selector: 'loading-default', host: {
27
27
  '[class.loading-default]': 'true',
28
28
  '[class.loading-default-rtl]': `dir === 'rtl'`
29
- }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NzSpinComponent, NzIconDirective], template: "@if (options.type! !== 'text') {\n <div class=\"loading-default__icon\">\n @switch (options.type) {\n @case ('spin') {\n <nz-spin nzSimple />\n }\n @case ('icon') {\n <nz-icon [nzType]=\"icon.type!\" [nzTheme]=\"icon.theme!\" [nzSpin]=\"icon.spin\" />\n }\n @default {\n <div class=\"loading-default__custom\" [style]=\"custom.style!\" [innerHTML]=\"custom.html\"></div>\n }\n }\n </div>\n}\n@if (options.text) {\n <div class=\"loading-default__text\">{{ options.text }}</div>\n}\n" }]
29
+ }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NzSpinComponent, NzIconDirective], template: "@if (options.type! !== 'text') {\n <div class=\"loading-default__icon\">\n @switch (options.type) {\n @case ('spin') {\n <nz-spin nzSimple />\n }\n @case ('icon') {\n <nz-icon [nzType]=\"icon.type!\" [nzTheme]=\"icon.theme!\" [nzSpin]=\"icon.spin\" />\n }\n @default {\n <div class=\"loading-default__custom\" [style]=\"custom.style!\" [innerHTML]=\"custom.html\"></div>\n }\n }\n </div>\n}\n@if (options.text) {\n <div class=\"loading-default__text\">{{ options.text }}</div>\n}\n" }]
30
30
  }] });
31
31
 
32
32
  class LoadingService {
@@ -104,21 +104,21 @@ class LoadingService {
104
104
  ngOnDestroy() {
105
105
  this.loading$.unsubscribe();
106
106
  }
107
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
108
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingService, providedIn: 'root' });
107
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
108
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingService, providedIn: 'root' });
109
109
  }
110
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingService, decorators: [{
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingService, decorators: [{
111
111
  type: Injectable,
112
112
  args: [{ providedIn: 'root' }]
113
113
  }], ctorParameters: () => [] });
114
114
 
115
115
  const COMPONENTS = [LoadingDefaultComponent];
116
116
  class LoadingModule {
117
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
118
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: LoadingModule, imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule, LoadingDefaultComponent], exports: [LoadingDefaultComponent] });
119
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingModule, imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule, COMPONENTS] });
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
118
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: LoadingModule, imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule, LoadingDefaultComponent], exports: [LoadingDefaultComponent] });
119
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingModule, imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule, COMPONENTS] });
120
120
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LoadingModule, decorators: [{
121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LoadingModule, decorators: [{
122
122
  type: NgModule,
123
123
  args: [{
124
124
  imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule, ...COMPONENTS],
@@ -1 +1 @@
1
- {"version":3,"file":"loading.mjs","sources":["../../../../packages/abc/loading/loading.component.ts","../../../../packages/abc/loading/loading.component.html","../../../../packages/abc/loading/loading.service.ts","../../../../packages/abc/loading/loading.module.ts","../../../../packages/abc/loading/loading.ts"],"sourcesContent":["import { Direction } from '@angular/cdk/bidi';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\nimport { NzSpinComponent } from 'ng-zorro-antd/spin';\n\nimport { LoadingCustom, LoadingIcon, LoadingShowOptions } from './loading.types';\n\n@Component({\n selector: 'loading-default',\n templateUrl: './loading.component.html',\n host: {\n '[class.loading-default]': 'true',\n '[class.loading-default-rtl]': `dir === 'rtl'`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzSpinComponent, NzIconDirective]\n})\nexport class LoadingDefaultComponent {\n options!: LoadingShowOptions;\n dir?: Direction = 'ltr';\n\n get icon(): LoadingIcon {\n return this.options.icon!;\n }\n\n get custom(): LoadingCustom {\n return this.options.custom!;\n }\n}\n","@if (options.type! !== 'text') {\n <div class=\"loading-default__icon\">\n @switch (options.type) {\n @case ('spin') {\n <nz-spin nzSimple />\n }\n @case ('icon') {\n <nz-icon [nzType]=\"icon.type!\" [nzTheme]=\"icon.theme!\" [nzSpin]=\"icon.spin\" />\n }\n @default {\n <div class=\"loading-default__custom\" [style]=\"custom.style!\" [innerHTML]=\"custom.html\"></div>\n }\n }\n </div>\n}\n@if (options.text) {\n <div class=\"loading-default__text\">{{ options.text }}</div>\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ComponentRef, Injectable, OnDestroy, inject } from '@angular/core';\nimport { Subject, Subscription, timer, debounce } from 'rxjs';\n\nimport { AlainConfigService, AlainLoadingConfig } from '@delon/util/config';\n\nimport { LoadingDefaultComponent } from './loading.component';\nimport { LoadingShowOptions } from './loading.types';\n\n@Injectable({ providedIn: 'root' })\nexport class LoadingService implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly configSrv = inject(AlainConfigService);\n private readonly directionality = inject(Directionality);\n\n private _overlayRef?: OverlayRef;\n private compRef: ComponentRef<LoadingDefaultComponent> | null = null;\n private opt: LoadingShowOptions | null = null;\n private cog: AlainLoadingConfig;\n private n$ = new Subject<void>();\n private loading$: Subscription;\n\n get instance(): LoadingDefaultComponent | null {\n return this.compRef != null ? this.compRef.instance : null;\n }\n\n constructor() {\n this.cog = this.configSrv.merge('loading', {\n type: 'spin',\n text: '加载中...',\n icon: {\n type: 'loading',\n theme: 'outline',\n spin: true\n },\n delay: 0\n })!;\n this.loading$ = this.n$\n .asObservable()\n .pipe(debounce(() => timer(this.opt!.delay!)))\n .subscribe(() => this.create());\n }\n\n private create(): void {\n if (this.opt == null) return;\n\n this._close(false);\n\n this._overlayRef = this.overlay.create({\n positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),\n scrollStrategy: this.overlay.scrollStrategies.block(),\n hasBackdrop: true,\n backdropClass: 'loading-backdrop'\n });\n this.compRef = this._overlayRef.attach(new ComponentPortal(LoadingDefaultComponent));\n const dir = this.configSrv.get('loading')!.direction || this.directionality.value;\n if (this.instance != null) {\n this.instance!.options = this.opt;\n this.instance!.dir = dir;\n }\n this.compRef.changeDetectorRef.markForCheck();\n }\n\n /**\n * Open a new loading indicator\n *\n * 打开一个新加载指示符\n */\n open(options?: LoadingShowOptions): void {\n this.opt = { ...this.cog, ...options };\n this.n$.next();\n }\n\n private _close(cleanOpt: boolean): void {\n if (cleanOpt) this.opt = null;\n if (!this._overlayRef) return;\n this._overlayRef.detach();\n this.compRef = null;\n }\n\n /**\n * Turn off a loading indicator\n *\n * 关闭一个加载指示符\n */\n close(): void {\n this._close(true);\n }\n\n ngOnDestroy(): void {\n this.loading$.unsubscribe();\n }\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\n\nimport { LoadingDefaultComponent } from './loading.component';\n\nconst COMPONENTS = [LoadingDefaultComponent];\n\n@NgModule({\n imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class LoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],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AQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC;AAC/F,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"loading.mjs","sources":["../../../../packages/abc/loading/loading.component.ts","../../../../packages/abc/loading/loading.component.html","../../../../packages/abc/loading/loading.service.ts","../../../../packages/abc/loading/loading.module.ts","../../../../packages/abc/loading/loading.ts"],"sourcesContent":["import { Direction } from '@angular/cdk/bidi';\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\nimport { NzSpinComponent } from 'ng-zorro-antd/spin';\n\nimport { LoadingCustom, LoadingIcon, LoadingShowOptions } from './loading.types';\n\n@Component({\n selector: 'loading-default',\n templateUrl: './loading.component.html',\n host: {\n '[class.loading-default]': 'true',\n '[class.loading-default-rtl]': `dir === 'rtl'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzSpinComponent, NzIconDirective]\n})\nexport class LoadingDefaultComponent {\n options!: LoadingShowOptions;\n dir?: Direction = 'ltr';\n\n get icon(): LoadingIcon {\n return this.options.icon!;\n }\n\n get custom(): LoadingCustom {\n return this.options.custom!;\n }\n}\n","@if (options.type! !== 'text') {\n <div class=\"loading-default__icon\">\n @switch (options.type) {\n @case ('spin') {\n <nz-spin nzSimple />\n }\n @case ('icon') {\n <nz-icon [nzType]=\"icon.type!\" [nzTheme]=\"icon.theme!\" [nzSpin]=\"icon.spin\" />\n }\n @default {\n <div class=\"loading-default__custom\" [style]=\"custom.style!\" [innerHTML]=\"custom.html\"></div>\n }\n }\n </div>\n}\n@if (options.text) {\n <div class=\"loading-default__text\">{{ options.text }}</div>\n}\n","import { Directionality } from '@angular/cdk/bidi';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ComponentRef, Injectable, OnDestroy, inject } from '@angular/core';\nimport { Subject, Subscription, timer, debounce } from 'rxjs';\n\nimport { AlainConfigService, AlainLoadingConfig } from '@delon/util/config';\n\nimport { LoadingDefaultComponent } from './loading.component';\nimport { LoadingShowOptions } from './loading.types';\n\n@Injectable({ providedIn: 'root' })\nexport class LoadingService implements OnDestroy {\n private readonly overlay = inject(Overlay);\n private readonly configSrv = inject(AlainConfigService);\n private readonly directionality = inject(Directionality);\n\n private _overlayRef?: OverlayRef;\n private compRef: ComponentRef<LoadingDefaultComponent> | null = null;\n private opt: LoadingShowOptions | null = null;\n private cog: AlainLoadingConfig;\n private n$ = new Subject<void>();\n private loading$: Subscription;\n\n get instance(): LoadingDefaultComponent | null {\n return this.compRef != null ? this.compRef.instance : null;\n }\n\n constructor() {\n this.cog = this.configSrv.merge('loading', {\n type: 'spin',\n text: '加载中...',\n icon: {\n type: 'loading',\n theme: 'outline',\n spin: true\n },\n delay: 0\n })!;\n this.loading$ = this.n$\n .asObservable()\n .pipe(debounce(() => timer(this.opt!.delay!)))\n .subscribe(() => this.create());\n }\n\n private create(): void {\n if (this.opt == null) return;\n\n this._close(false);\n\n this._overlayRef = this.overlay.create({\n positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),\n scrollStrategy: this.overlay.scrollStrategies.block(),\n hasBackdrop: true,\n backdropClass: 'loading-backdrop'\n });\n this.compRef = this._overlayRef.attach(new ComponentPortal(LoadingDefaultComponent));\n const dir = this.configSrv.get('loading')!.direction || this.directionality.value;\n if (this.instance != null) {\n this.instance!.options = this.opt;\n this.instance!.dir = dir;\n }\n this.compRef.changeDetectorRef.markForCheck();\n }\n\n /**\n * Open a new loading indicator\n *\n * 打开一个新加载指示符\n */\n open(options?: LoadingShowOptions): void {\n this.opt = { ...this.cog, ...options };\n this.n$.next();\n }\n\n private _close(cleanOpt: boolean): void {\n if (cleanOpt) this.opt = null;\n if (!this._overlayRef) return;\n this._overlayRef.detach();\n this.compRef = null;\n }\n\n /**\n * Turn off a loading indicator\n *\n * 关闭一个加载指示符\n */\n close(): void {\n this._close(true);\n }\n\n ngOnDestroy(): void {\n this.loading$.unsubscribe();\n }\n}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { PortalModule } from '@angular/cdk/portal';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzIconModule } from 'ng-zorro-antd/icon';\nimport { NzSpinModule } from 'ng-zorro-antd/spin';\n\nimport { LoadingDefaultComponent } from './loading.component';\n\nconst COMPONENTS = [LoadingDefaultComponent];\n\n@NgModule({\n imports: [CommonModule, OverlayModule, PortalModule, NzIconModule, NzSpinModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class LoadingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAmBa,uBAAuB,CAAA;AAClC,IAAA,OAAO;IACP,GAAG,GAAe,KAAK;AAEvB,IAAA,IAAI,IAAI,GAAA;AACN,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,IAAK;;AAG3B,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,MAAO;;uGATlB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,ECnBpC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,2BAAA,EAAA,eAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA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b,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAHd,OAAA,EAAA,CAAA,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAH7D,uBAAuB,aAAvB,uBAAuB,CAAA,EAAA,CAAA;wGAM9B,aAAa,EAAA,OAAA,EAAA,CAHd,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAK,UAAU,CAAA,EAAA,CAAA;;2FAGnF,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC;AAC/F,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACfD;;AAEG;;;;"}
@@ -1,11 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Injectable, NgModule } from '@angular/core';
3
3
  import { Subject, of } from 'rxjs';
4
+ import { AlainConfigService } from '@delon/util/config';
4
5
  import { LazyService } from '@delon/util/other';
5
- import * as i1 from '@delon/util/config';
6
6
 
7
7
  class LodopService {
8
8
  scriptSrv = inject(LazyService);
9
+ cogSrv = inject(AlainConfigService);
9
10
  defaultConfig;
10
11
  _cog;
11
12
  pending = false;
@@ -13,8 +14,8 @@ class LodopService {
13
14
  _init = new Subject();
14
15
  _events = new Subject();
15
16
  printBuffer = [];
16
- constructor(configSrv) {
17
- this.defaultConfig = configSrv.merge('lodop', {
17
+ constructor() {
18
+ this.defaultConfig = this.cogSrv.merge('lodop', {
18
19
  url: 'http://localhost:8443/CLodopfuncs.js',
19
20
  name: 'CLODOP',
20
21
  companyName: '',
@@ -217,20 +218,20 @@ class LodopService {
217
218
  this._init.unsubscribe();
218
219
  this._events.unsubscribe();
219
220
  }
220
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LodopService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
221
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LodopService, providedIn: 'root' });
221
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LodopService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
222
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LodopService, providedIn: 'root' });
222
223
  }
223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LodopService, decorators: [{
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LodopService, decorators: [{
224
225
  type: Injectable,
225
226
  args: [{ providedIn: 'root' }]
226
- }], ctorParameters: () => [{ type: i1.AlainConfigService }] });
227
+ }], ctorParameters: () => [] });
227
228
 
228
229
  class LodopModule {
229
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LodopModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
230
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: LodopModule });
231
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LodopModule });
230
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LodopModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
231
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: LodopModule });
232
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LodopModule });
232
233
  }
233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LodopModule, decorators: [{
234
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: LodopModule, decorators: [{
234
235
  type: NgModule,
235
236
  args: [{}]
236
237
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"lodop.mjs","sources":["../../../../packages/abc/lodop/lodop.service.ts","../../../../packages/abc/lodop/lodop.module.ts","../../../../packages/abc/lodop/lodop.ts"],"sourcesContent":["import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { Observable, of, Subject } from 'rxjs';\n\nimport { AlainConfigService, AlainLodopConfig } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { Lodop, LodopPrintResult, LodopResult } from './lodop.types';\n\n@Injectable({ providedIn: 'root' })\nexport class LodopService implements OnDestroy {\n private readonly scriptSrv = inject(LazyService);\n\n private defaultConfig: AlainLodopConfig;\n private _cog!: AlainLodopConfig;\n private pending = false;\n private _lodop: Lodop | null = null;\n private _init = new Subject<LodopResult>();\n private _events = new Subject<LodopPrintResult>();\n private printBuffer: NzSafeAny[] = [];\n\n constructor(configSrv: AlainConfigService) {\n this.defaultConfig = configSrv.merge('lodop', {\n url: 'http://localhost:8443/CLodopfuncs.js',\n name: 'CLODOP',\n companyName: '',\n checkMaxCount: 100\n })!;\n this.cog = this.defaultConfig;\n }\n\n /**\n * Get or set configuration, **Note:** Resetting will invert and reload script resources\n *\n * 获取或重新设置配置,**注:**重新设置会倒置重新加载脚本资源\n */\n get cog(): AlainLodopConfig {\n return this._cog;\n }\n set cog(value: AlainLodopConfig) {\n this._cog = {\n ...this.defaultConfig,\n ...value\n };\n }\n\n /**\n * Event change notification\n *\n * 事件变更通知\n */\n get events(): Observable<LodopPrintResult> {\n return this._events.asObservable();\n }\n\n /**\n * Get lodop object\n *\n * 获取 lodop 对象\n */\n get lodop(): Observable<LodopResult> {\n if (this._lodop) return of({ ok: true, lodop: this._lodop } as LodopResult);\n if (this.pending) return this._init.asObservable();\n\n this.request();\n\n return this._init.asObservable();\n }\n\n /**\n * Get printer list\n *\n * 获取打印机列表\n */\n get printer(): string[] {\n this.check();\n const ret: string[] = [];\n const count = this._lodop!.GET_PRINTER_COUNT();\n for (let index = 0; index < count; index++) {\n ret.push(this._lodop!.GET_PRINTER_NAME(index));\n }\n return ret;\n }\n\n private check(): void {\n if (!this._lodop) throw new Error(`请务必先调用 lodop 获取对象`);\n }\n\n private request(): void {\n this.pending = true;\n const urlObj = new URL(this.cog.url!);\n urlObj.searchParams.set('name', this.cog.name!);\n const url = urlObj.toString();\n\n let checkMaxCount = this.cog.checkMaxCount as number;\n const onResolve = (status: NzSafeAny, error?: NzSafeAny): void => {\n this._init.next({\n ok: status === 'ok',\n status,\n error,\n lodop: this._lodop!\n });\n };\n const checkStatus = (): void => {\n --checkMaxCount;\n if (this._lodop!.webskt && this._lodop!.webskt.readyState === 1) {\n onResolve('ok');\n } else {\n if (checkMaxCount < 0) {\n onResolve('check-limit');\n return;\n }\n setTimeout(() => checkStatus(), 100);\n }\n };\n\n this.scriptSrv.loadScript(url).then((res: NzSafeAny) => {\n if (res.status !== 'ok') {\n this.pending = false;\n onResolve('script-load-error', res[0]);\n return;\n }\n const win = window as NzSafeAny;\n if (Object.prototype.hasOwnProperty.call(win, this.cog.name!)) {\n this._lodop = win[this.cog.name!] as Lodop;\n }\n if (this._lodop === null) {\n onResolve('load-variable-name-error', { name: this.cog.name });\n return;\n }\n this._lodop.SET_LICENSES(this.cog.companyName!, this.cog.license!, this.cog.licenseA, this.cog.licenseB);\n checkStatus();\n });\n }\n\n /**\n * Reset lodop object\n *\n * 重置 lodop 对象\n */\n reset(): void {\n this._lodop = null;\n this.pending = false;\n this.request();\n }\n\n /**\n * Attach code to the `lodop` object, the string class supports dynamic parameters of `{{key}}`,\n * **Note:** The code refers to the string data generated by the print design\n *\n * 附加代码至 `lodop` 对象上,字符串类支持 `{{key}}` 的动态参数,**注:** 代码是指打印设计所产生字符串数据\n */\n attachCode(code: string, contextObj?: NzSafeAny, parser?: RegExp): void {\n this.check();\n if (!parser) parser = /LODOP\\.([^(]+)\\(([^\\n]+)?\\);/i;\n code.split('\\n').forEach(line => {\n const res = parser!.exec(line.trim());\n if (!res) return;\n const fn = this._lodop![res[1]];\n if (fn) {\n let arr: NzSafeAny[] | null = null;\n try {\n const fakeFn = new Function(`return [${res[2]}]`);\n arr = fakeFn();\n } catch {}\n\n if (arr != null && Array.isArray(arr) && contextObj) {\n for (let i = 0; i < arr.length; i++) {\n if (typeof arr[i] === 'string') {\n arr[i] = (arr[i] as string).replace(/{{(.*?)}}/g, (_match, key) => contextObj[key.trim()] || '');\n }\n }\n }\n fn.apply(this._lodop, arr!);\n }\n });\n }\n\n /**\n * The code is automatically returned after opening the print design and closing,\n * **Note:** Automatically listen for the `On_Return` event, and it will be removed after running\n *\n * 打开打印设计关闭后自动返回代码,**注:** 自动监听 `On_Return` 事件,运行后会移除\n */\n design(): Promise<string> {\n this.check();\n const tid = this._lodop!.PRINT_DESIGN();\n return new Promise(resolve => {\n this._lodop!.On_Return = (taskID: string, value: boolean | string) => {\n if (tid !== taskID) return;\n this._lodop!.On_Return = null;\n resolve(`${value}`);\n };\n });\n }\n private printDo(): void {\n const data = this.printBuffer.shift();\n if (!data) return;\n this.attachCode(data.code, data.item, data.parser);\n const tid = this._lodop!.PRINT();\n this._lodop!.On_Return = (taskID: string, value: boolean | string) => {\n if (tid !== taskID) return;\n this._lodop!.On_Return = null;\n this._events.next({\n ok: value === true,\n error: value === true ? null : value,\n ...data\n });\n this.printDo();\n };\n }\n\n /**\n * Print immediately, generally used for batch printing\n *\n * 立即打印,一般用于批量套打\n */\n print(code: string, contextObj: NzSafeAny, parser?: RegExp): void {\n this.check();\n if (contextObj) {\n this.printBuffer.push(\n ...(Array.isArray(contextObj) ? contextObj : [contextObj]).map(item => {\n return { code, parser, item };\n })\n );\n }\n this.printDo();\n }\n\n ngOnDestroy(): void {\n this._init.unsubscribe();\n this._events.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\n\n@NgModule({})\nexport class LodopModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAUa,YAAY,CAAA;AACN,IAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;AAExC,IAAA,aAAa;AACb,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAiB,IAAI;AAC3B,IAAA,KAAK,GAAG,IAAI,OAAO,EAAe;AAClC,IAAA,OAAO,GAAG,IAAI,OAAO,EAAoB;IACzC,WAAW,GAAgB,EAAE;AAErC,IAAA,WAAA,CAAY,SAA6B,EAAA;QACvC,IAAI,CAAC,aAAa,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE;AAC5C,YAAA,GAAG,EAAE,sCAAsC;AAC3C,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,aAAa,EAAE;AAChB,SAAA,CAAE;AACH,QAAA,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,aAAa;;AAG/B;;;;AAIG;AACH,IAAA,IAAI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;;IAElB,IAAI,GAAG,CAAC,KAAuB,EAAA;QAC7B,IAAI,CAAC,IAAI,GAAG;YACV,GAAG,IAAI,CAAC,aAAa;AACrB,YAAA,GAAG;SACJ;;AAGH;;;;AAIG;AACH,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,OAAO,CAA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EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAX,WAAW,EAAA,CAAA;wGAAX,WAAW,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,QAAQ;mBAAC,EAAE;;;ACFZ;;AAEG;;;;"}
1
+ {"version":3,"file":"lodop.mjs","sources":["../../../../packages/abc/lodop/lodop.service.ts","../../../../packages/abc/lodop/lodop.module.ts","../../../../packages/abc/lodop/lodop.ts"],"sourcesContent":["import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { Observable, of, Subject } from 'rxjs';\n\nimport { AlainConfigService, AlainLodopConfig } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { Lodop, LodopPrintResult, LodopResult } from './lodop.types';\n\n@Injectable({ providedIn: 'root' })\nexport class LodopService implements OnDestroy {\n private readonly scriptSrv = inject(LazyService);\n private readonly cogSrv = inject(AlainConfigService);\n\n private defaultConfig: AlainLodopConfig;\n private _cog!: AlainLodopConfig;\n private pending = false;\n private _lodop: Lodop | null = null;\n private _init = new Subject<LodopResult>();\n private _events = new Subject<LodopPrintResult>();\n private printBuffer: NzSafeAny[] = [];\n\n constructor() {\n this.defaultConfig = this.cogSrv.merge('lodop', {\n url: 'http://localhost:8443/CLodopfuncs.js',\n name: 'CLODOP',\n companyName: '',\n checkMaxCount: 100\n })!;\n this.cog = this.defaultConfig;\n }\n\n /**\n * Get or set configuration, **Note:** Resetting will invert and reload script resources\n *\n * 获取或重新设置配置,**注:**重新设置会倒置重新加载脚本资源\n */\n get cog(): AlainLodopConfig {\n return this._cog;\n }\n set cog(value: AlainLodopConfig) {\n this._cog = {\n ...this.defaultConfig,\n ...value\n };\n }\n\n /**\n * Event change notification\n *\n * 事件变更通知\n */\n get events(): Observable<LodopPrintResult> {\n return this._events.asObservable();\n }\n\n /**\n * Get lodop object\n *\n * 获取 lodop 对象\n */\n get lodop(): Observable<LodopResult> {\n if (this._lodop) return of({ ok: true, lodop: this._lodop } as LodopResult);\n if (this.pending) return this._init.asObservable();\n\n this.request();\n\n return this._init.asObservable();\n }\n\n /**\n * Get printer list\n *\n * 获取打印机列表\n */\n get printer(): string[] {\n this.check();\n const ret: string[] = [];\n const count = this._lodop!.GET_PRINTER_COUNT();\n for (let index = 0; index < count; index++) {\n ret.push(this._lodop!.GET_PRINTER_NAME(index));\n }\n return ret;\n }\n\n private check(): void {\n if (!this._lodop) throw new Error(`请务必先调用 lodop 获取对象`);\n }\n\n private request(): void {\n this.pending = true;\n const urlObj = new URL(this.cog.url!);\n urlObj.searchParams.set('name', this.cog.name!);\n const url = urlObj.toString();\n\n let checkMaxCount = this.cog.checkMaxCount as number;\n const onResolve = (status: NzSafeAny, error?: NzSafeAny): void => {\n this._init.next({\n ok: status === 'ok',\n status,\n error,\n lodop: this._lodop!\n });\n };\n const checkStatus = (): void => {\n --checkMaxCount;\n if (this._lodop!.webskt && this._lodop!.webskt.readyState === 1) {\n onResolve('ok');\n } else {\n if (checkMaxCount < 0) {\n onResolve('check-limit');\n return;\n }\n setTimeout(() => checkStatus(), 100);\n }\n };\n\n this.scriptSrv.loadScript(url).then((res: NzSafeAny) => {\n if (res.status !== 'ok') {\n this.pending = false;\n onResolve('script-load-error', res[0]);\n return;\n }\n const win = window as NzSafeAny;\n if (Object.prototype.hasOwnProperty.call(win, this.cog.name!)) {\n this._lodop = win[this.cog.name!] as Lodop;\n }\n if (this._lodop === null) {\n onResolve('load-variable-name-error', { name: this.cog.name });\n return;\n }\n this._lodop.SET_LICENSES(this.cog.companyName!, this.cog.license!, this.cog.licenseA, this.cog.licenseB);\n checkStatus();\n });\n }\n\n /**\n * Reset lodop object\n *\n * 重置 lodop 对象\n */\n reset(): void {\n this._lodop = null;\n this.pending = false;\n this.request();\n }\n\n /**\n * Attach code to the `lodop` object, the string class supports dynamic parameters of `{{key}}`,\n * **Note:** The code refers to the string data generated by the print design\n *\n * 附加代码至 `lodop` 对象上,字符串类支持 `{{key}}` 的动态参数,**注:** 代码是指打印设计所产生字符串数据\n */\n attachCode(code: string, contextObj?: NzSafeAny, parser?: RegExp): void {\n this.check();\n if (!parser) parser = /LODOP\\.([^(]+)\\(([^\\n]+)?\\);/i;\n code.split('\\n').forEach(line => {\n const res = parser!.exec(line.trim());\n if (!res) return;\n const fn = this._lodop![res[1]];\n if (fn) {\n let arr: NzSafeAny[] | null = null;\n try {\n const fakeFn = new Function(`return [${res[2]}]`);\n arr = fakeFn();\n } catch {}\n\n if (arr != null && Array.isArray(arr) && contextObj) {\n for (let i = 0; i < arr.length; i++) {\n if (typeof arr[i] === 'string') {\n arr[i] = (arr[i] as string).replace(/{{(.*?)}}/g, (_match, key) => contextObj[key.trim()] || '');\n }\n }\n }\n fn.apply(this._lodop, arr!);\n }\n });\n }\n\n /**\n * The code is automatically returned after opening the print design and closing,\n * **Note:** Automatically listen for the `On_Return` event, and it will be removed after running\n *\n * 打开打印设计关闭后自动返回代码,**注:** 自动监听 `On_Return` 事件,运行后会移除\n */\n design(): Promise<string> {\n this.check();\n const tid = this._lodop!.PRINT_DESIGN();\n return new Promise(resolve => {\n this._lodop!.On_Return = (taskID: string, value: boolean | string) => {\n if (tid !== taskID) return;\n this._lodop!.On_Return = null;\n resolve(`${value}`);\n };\n });\n }\n private printDo(): void {\n const data = this.printBuffer.shift();\n if (!data) return;\n this.attachCode(data.code, data.item, data.parser);\n const tid = this._lodop!.PRINT();\n this._lodop!.On_Return = (taskID: string, value: boolean | string) => {\n if (tid !== taskID) return;\n this._lodop!.On_Return = null;\n this._events.next({\n ok: value === true,\n error: value === true ? null : value,\n ...data\n });\n this.printDo();\n };\n }\n\n /**\n * Print immediately, generally used for batch printing\n *\n * 立即打印,一般用于批量套打\n */\n print(code: string, contextObj: NzSafeAny, parser?: RegExp): void {\n this.check();\n if (contextObj) {\n this.printBuffer.push(\n ...(Array.isArray(contextObj) ? contextObj : [contextObj]).map(item => {\n return { code, parser, item };\n })\n );\n }\n this.printDo();\n }\n\n ngOnDestroy(): void {\n this._init.unsubscribe();\n this._events.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\n\n@NgModule({})\nexport class LodopModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAUa,YAAY,CAAA;AACN,IAAA,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAE5C,IAAA,aAAa;AACb,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAiB,IAAI;AAC3B,IAAA,KAAK,GAAG,IAAI,OAAO,EAAe;AAClC,IAAA,OAAO,GAAG,IAAI,OAAO,EAAoB;IACzC,WAAW,GAAgB,EAAE;AAErC,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE;AAC9C,YAAA,GAAG,EAAE,sCAAsC;AAC3C,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,WAAW,EAAE,EAAE;AACf,YAAA,aAAa,EAAE;AAChB,SAAA,CAAE;AACH,QAAA,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,aAAa;;AAG/B;;;;AAIG;AACH,IAAA,IAAI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;;IAElB,IAAI,GAAG,CAAC,KAAuB,EAAA;QAC7B,IAAI,CAAC,IAAI,GAAG;YACV,GAAG,IAAI,CAAC,aAAa;AACrB,YAAA,GAAG;SACJ;;AAGH;;;;AAIG;AACH,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;;AAGpC;;;;AAIG;AACH,IAAA,IAAI,KAAK,GAAA;QACP,IAAI,IAAI,CAAC,MAAM;AAAE,YAAA,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE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ACFZ;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import { Platform } from '@angular/cdk/platform';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, Injectable, DestroyRef, ElementRef, Renderer2, NgZone, EventEmitter, numberAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, NgModule } from '@angular/core';
4
+ import { inject, Injectable, DestroyRef, ElementRef, Renderer2, NgZone, EventEmitter, numberAttribute, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { Subject, share, timer, take } from 'rxjs';
7
7
  import { ZoneOutside } from '@delon/util/decorator';
@@ -41,10 +41,10 @@ class MediaService {
41
41
  notify() {
42
42
  return this.notify$.asObservable().pipe(share());
43
43
  }
44
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
45
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaService, providedIn: 'root' });
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
45
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaService, providedIn: 'root' });
46
46
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaService, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaService, decorators: [{
48
48
  type: Injectable,
49
49
  args: [{ providedIn: 'root' }]
50
50
  }] });
@@ -124,22 +124,21 @@ class MediaComponent {
124
124
  this.destroy();
125
125
  this._p = null;
126
126
  }
127
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
128
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.2.6", type: MediaComponent, isStandalone: true, selector: "media, [media]", inputs: { type: "type", source: "source", options: "options", delay: ["delay", "delay", numberAttribute] }, outputs: { ready: "ready" }, host: { properties: { "style.display": "'block'" } }, exportAs: ["mediaComponent"], usesOnChanges: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
127
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
128
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "20.0.4", type: MediaComponent, isStandalone: true, selector: "media, [media]", inputs: { type: "type", source: "source", options: "options", delay: ["delay", "delay", numberAttribute] }, outputs: { ready: "ready" }, host: { classAttribute: "d-block" }, exportAs: ["mediaComponent"], usesOnChanges: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
129
129
  }
130
130
  __decorate([
131
131
  ZoneOutside()
132
132
  ], MediaComponent.prototype, "initDelay", null);
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaComponent, decorators: [{
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaComponent, decorators: [{
134
134
  type: Component,
135
135
  args: [{
136
136
  selector: 'media, [media]',
137
137
  exportAs: 'mediaComponent',
138
138
  template: `<ng-content />`,
139
139
  host: {
140
- '[style.display]': `'block'`
140
+ class: 'd-block'
141
141
  },
142
- preserveWhitespaces: false,
143
142
  changeDetection: ChangeDetectionStrategy.OnPush,
144
143
  encapsulation: ViewEncapsulation.None
145
144
  }]
@@ -158,11 +157,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
158
157
 
159
158
  const COMPONENTS = [MediaComponent];
160
159
  class MediaModule {
161
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
162
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: MediaModule, imports: [CommonModule, MediaComponent], exports: [MediaComponent] });
163
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaModule, imports: [CommonModule] });
160
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
161
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: MediaModule, imports: [CommonModule, MediaComponent], exports: [MediaComponent] });
162
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaModule, imports: [CommonModule] });
164
163
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: MediaModule, decorators: [{
164
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: MediaModule, decorators: [{
166
165
  type: NgModule,
167
166
  args: [{
168
167
  imports: [CommonModule, ...COMPONENTS],
@@ -1 +1 @@
1
- {"version":3,"file":"media.mjs","sources":["../../../../packages/abc/media/media.service.ts","../../../../packages/abc/media/media.component.ts","../../../../packages/abc/media/media.module.ts","../../../../packages/abc/media/media.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { Observable, Subject, share } from 'rxjs';\n\nimport { AlainConfigService, AlainMediaConfig } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class MediaService {\n private readonly cogSrv = inject(AlainConfigService);\n private readonly lazySrv = inject(LazyService);\n\n private _cog!: AlainMediaConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainMediaConfig {\n return this._cog;\n }\n set cog(val: AlainMediaConfig) {\n this._cog = this.cogSrv.merge(\n 'media',\n {\n urls: ['https://cdn.jsdelivr.net/npm/plyr/dist/plyr.min.js', 'https://cdn.jsdelivr.net/npm/plyr/dist/plyr.css']\n },\n val\n )!;\n }\n\n load(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv.load(this.cog.urls!).then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n notify(): Observable<void> {\n return this.notify$.asObservable().pipe(share());\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChange,\n ViewEncapsulation,\n inject,\n numberAttribute\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { timer, take } from 'rxjs';\n\nimport type Plyr from 'plyr';\n\nimport { ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { MediaService } from './media.service';\n\nexport type MediaType = 'html5' | 'youtube' | 'video' | 'audio';\n\n@Component({\n selector: 'media, [media]',\n exportAs: 'mediaComponent',\n template: `<ng-content />`,\n host: {\n '[style.display]': `'block'`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class MediaComponent implements OnChanges, AfterViewInit, OnDestroy {\n private readonly destroy$ = inject(DestroyRef);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly ngZone = inject(NgZone);\n private readonly srv = inject(MediaService);\n private readonly platform = inject(Platform);\n\n private _p?: Plyr | null;\n private videoEl?: HTMLElement;\n\n @Input() type: MediaType = 'video';\n @Input() source?: string | Plyr.SourceInfo;\n @Input() options?: Plyr.Options;\n @Input({ transform: numberAttribute }) delay = 0;\n @Output() readonly ready = new EventEmitter<Plyr>();\n\n get player(): Plyr | undefined | null {\n return this._p;\n }\n\n @ZoneOutside()\n private initDelay(): void {\n timer(this.delay)\n .pipe(takeUntilDestroyed(this.destroy$))\n .subscribe(() => this.ngZone.runOutsideAngular(() => this.init()));\n }\n\n private init(): void {\n const winPlyr = (window as NzSafeAny).Plyr;\n if (!winPlyr) {\n throw new Error(\n `No window.Plyr found, please make sure that cdn or local path exists, the current referenced path is: ${JSON.stringify(\n this.srv.cog.urls\n )}`\n );\n }\n\n this.ensureElement();\n\n const player: Plyr = (this._p = new winPlyr(this.videoEl, {\n ...this.srv.cog.options\n }));\n\n player.on('ready', () => this.ngZone.run(() => this.ready.next(player)));\n\n this.uploadSource();\n }\n\n private ensureElement(): void {\n const { type } = this;\n let el = this.el.querySelector(type) as HTMLElement;\n if (!el) {\n el = this.renderer.createElement(type);\n (el as HTMLVideoElement).controls = true;\n this.el.appendChild(el);\n }\n this.videoEl = el;\n }\n\n private destroy(): void {\n if (this._p) {\n this._p.destroy();\n }\n }\n\n private uploadSource(): void {\n if (this._p == null) return;\n\n const { source, type } = this;\n this._p.source = (typeof source === 'string' ? { type, sources: [{ src: source }] } : source) as Plyr.SourceInfo;\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.srv\n .notify()\n .pipe(takeUntilDestroyed(this.destroy$), take(1))\n .subscribe(() => this.initDelay());\n\n this.srv.load();\n }\n\n ngOnChanges(changes: { [p in keyof MediaComponent]?: SimpleChange }): void {\n this.srv.cog = { options: this.options };\n if (changes.source) {\n this.uploadSource();\n }\n }\n\n ngOnDestroy(): void {\n this.destroy();\n this._p = null;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { MediaComponent } from './media.component';\n\nconst COMPONENTS = [MediaComponent];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class MediaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAOa,YAAY,CAAA;AACN,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACnC,IAAA,OAAO,GAAG,MAAM,CAAC,WAAW,CAAC;AAEtC,IAAA,IAAI;IACJ,OAAO,GAAG,KAAK;IACf,MAAM,GAAG,KAAK;AACd,IAAA,OAAO,GAAG,IAAI,OAAO,EAAQ;AAErC,IAAA,IAAI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;;IAElB,IAAI,GAAG,CAAC,GAAqB,EAAA;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAC3B,OAAO,EACP;AACE,YAAA,IAAI,EAAE,CAAC,oDAAoD,EAAE,iDAAiD;SAC/G,EACD,GAAG,CACH;;IAGJ,IAAI,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,gBAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;;AAErB,YAAA,OAAO,IAAI;;AAEb,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAK,CAAC,CAAC,IAAI,CAAC,MAAK;AAC1C,YAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,YA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,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHZ,OAAA,EAAA,CAAA,YAAY,EAHJ,cAAc,aAAd,cAAc,CAAA,EAAA,CAAA;AAMrB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAHZ,YAAY,CAAA,EAAA,CAAA;;2FAGX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,UAAU,CAAC;AACtC,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"media.mjs","sources":["../../../../packages/abc/media/media.service.ts","../../../../packages/abc/media/media.component.ts","../../../../packages/abc/media/media.module.ts","../../../../packages/abc/media/media.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { Observable, Subject, share } from 'rxjs';\n\nimport { AlainConfigService, AlainMediaConfig } from '@delon/util/config';\nimport { LazyService } from '@delon/util/other';\n\n@Injectable({ providedIn: 'root' })\nexport class MediaService {\n private readonly cogSrv = inject(AlainConfigService);\n private readonly lazySrv = inject(LazyService);\n\n private _cog!: AlainMediaConfig;\n private loading = false;\n private loaded = false;\n private notify$ = new Subject<void>();\n\n get cog(): AlainMediaConfig {\n return this._cog;\n }\n set cog(val: AlainMediaConfig) {\n this._cog = this.cogSrv.merge(\n 'media',\n {\n urls: ['https://cdn.jsdelivr.net/npm/plyr/dist/plyr.min.js', 'https://cdn.jsdelivr.net/npm/plyr/dist/plyr.css']\n },\n val\n )!;\n }\n\n load(): this {\n if (this.loading) {\n if (this.loaded) {\n this.notify$.next();\n }\n return this;\n }\n this.loading = true;\n this.lazySrv.load(this.cog.urls!).then(() => {\n this.loaded = true;\n this.notify$.next();\n });\n return this;\n }\n\n notify(): Observable<void> {\n return this.notify$.asObservable().pipe(share());\n }\n}\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n Renderer2,\n SimpleChange,\n ViewEncapsulation,\n inject,\n numberAttribute\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { timer, take } from 'rxjs';\n\nimport type Plyr from 'plyr';\n\nimport { ZoneOutside } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { MediaService } from './media.service';\n\nexport type MediaType = 'html5' | 'youtube' | 'video' | 'audio';\n\n@Component({\n selector: 'media, [media]',\n exportAs: 'mediaComponent',\n template: `<ng-content />`,\n host: {\n class: 'd-block'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class MediaComponent implements OnChanges, AfterViewInit, OnDestroy {\n private readonly destroy$ = inject(DestroyRef);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly ngZone = inject(NgZone);\n private readonly srv = inject(MediaService);\n private readonly platform = inject(Platform);\n\n private _p?: Plyr | null;\n private videoEl?: HTMLElement;\n\n @Input() type: MediaType = 'video';\n @Input() source?: string | Plyr.SourceInfo;\n @Input() options?: Plyr.Options;\n @Input({ transform: numberAttribute }) delay = 0;\n @Output() readonly ready = new EventEmitter<Plyr>();\n\n get player(): Plyr | undefined | null {\n return this._p;\n }\n\n @ZoneOutside()\n private initDelay(): void {\n timer(this.delay)\n .pipe(takeUntilDestroyed(this.destroy$))\n .subscribe(() => this.ngZone.runOutsideAngular(() => this.init()));\n }\n\n private init(): void {\n const winPlyr = (window as NzSafeAny).Plyr;\n if (!winPlyr) {\n throw new Error(\n `No window.Plyr found, please make sure that cdn or local path exists, the current referenced path is: ${JSON.stringify(\n this.srv.cog.urls\n )}`\n );\n }\n\n this.ensureElement();\n\n const player: Plyr = (this._p = new winPlyr(this.videoEl, {\n ...this.srv.cog.options\n }));\n\n player.on('ready', () => this.ngZone.run(() => this.ready.next(player)));\n\n this.uploadSource();\n }\n\n private ensureElement(): void {\n const { type } = this;\n let el = this.el.querySelector(type) as HTMLElement;\n if (!el) {\n el = this.renderer.createElement(type);\n (el as HTMLVideoElement).controls = true;\n this.el.appendChild(el);\n }\n this.videoEl = el;\n }\n\n private destroy(): void {\n if (this._p) {\n this._p.destroy();\n }\n }\n\n private uploadSource(): void {\n if (this._p == null) return;\n\n const { source, type } = this;\n this._p.source = (typeof source === 'string' ? { type, sources: [{ src: source }] } : source) as Plyr.SourceInfo;\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n this.srv\n .notify()\n .pipe(takeUntilDestroyed(this.destroy$), take(1))\n .subscribe(() => this.initDelay());\n\n this.srv.load();\n }\n\n ngOnChanges(changes: { [p in keyof MediaComponent]?: SimpleChange }): void {\n this.srv.cog = { options: this.options };\n if (changes.source) {\n this.uploadSource();\n }\n }\n\n ngOnDestroy(): void {\n this.destroy();\n this._p = null;\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { MediaComponent } from './media.component';\n\nconst COMPONENTS = [MediaComponent];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class MediaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAOa,YAAY,CAAA;AACN,IAAA,MAAM,GAA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AA;;2FAGX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,UAAU,CAAC;AACtC,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -1,33 +1,31 @@
1
1
  import { NgTemplateOutlet, CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { input, output, Component, ViewEncapsulation, inject, numberAttribute, booleanAttribute, signal, effect, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
+ import { input, output, ViewEncapsulation, Component, inject, numberAttribute, booleanAttribute, signal, effect, ChangeDetectionStrategy, NgModule } from '@angular/core';
4
4
  import { NzStringTemplateOutletDirective, NzOutletModule } from 'ng-zorro-antd/core/outlet';
5
5
  import { NzListComponent, NzListItemComponent, NzListItemMetaComponent, NzListModule } from 'ng-zorro-antd/list';
6
6
  import { NzTagComponent, NzTagModule } from 'ng-zorro-antd/tag';
7
- import { toSignal } from '@angular/core/rxjs-interop';
8
- import { map } from 'rxjs';
9
7
  import { DelonLocaleService, DelonLocaleModule } from '@delon/theme';
10
8
  import { NzBadgeComponent, NzBadgeModule } from 'ng-zorro-antd/badge';
11
9
  import { NzDropDownDirective, NzDropdownMenuComponent, NzDropDownModule } from 'ng-zorro-antd/dropdown';
12
10
  import { NzIconDirective, NzIconModule } from 'ng-zorro-antd/icon';
13
11
  import { NzSpinComponent, NzSpinModule } from 'ng-zorro-antd/spin';
14
- import { NzTabSetComponent, NzTabComponent, NzTabsModule } from 'ng-zorro-antd/tabs';
12
+ import { NzTabsComponent, NzTabComponent, NzTabsModule } from 'ng-zorro-antd/tabs';
15
13
 
16
14
  class NoticeIconTabComponent {
17
15
  locale = input.required();
18
16
  item = input.required();
19
17
  select = output();
20
18
  clear = output();
21
- onClick(item) {
22
- this.select.emit({ title: this.item().title, item });
19
+ onClick(item, event) {
20
+ this.select.emit({ title: this.item().title, item, event });
23
21
  }
24
22
  onClear() {
25
23
  this.clear.emit(this.item().title);
26
24
  }
27
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: NoticeIconTabComponent, isStandalone: true, selector: "notice-icon-tab", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { select: "select", clear: "clear" }, exportAs: ["noticeIconTab"], ngImport: i0, template: "@let d = item();\n@let list = d.list;\n@if (list && list.length > 0) {\n <ng-template [ngTemplateOutlet]=\"listTpl\" />\n} @else {\n <div class=\"notice-icon__notfound\">\n @if (d.emptyImage) {\n <img class=\"notice-icon__notfound-img\" [attr.src]=\"d.emptyImage\" alt=\"not found\" />\n }\n <p>\n <ng-container *nzStringTemplateOutlet=\"d.emptyText\">\n {{ d.emptyText || locale().emptyText }}\n </ng-container>\n </p>\n </div>\n}\n<ng-template #listTpl>\n <nz-list [nzDataSource]=\"list\" [nzRenderItem]=\"item\">\n <ng-template #item let-item>\n <nz-list-item (click)=\"onClick(item)\" [class.notice-icon__item-read]=\"item.read\">\n <nz-list-item-meta [nzTitle]=\"nzTitle\" [nzDescription]=\"nzDescription\" [nzAvatar]=\"item.avatar\">\n <ng-template #nzTitle>\n <ng-container *nzStringTemplateOutlet=\"item.title; context: { $implicit: item }\">\n {{ item.title }}\n </ng-container>\n @if (item.extra) {\n <div class=\"notice-icon__item-extra\">\n <nz-tag [nzColor]=\"item.color\">{{ item.extra }}</nz-tag>\n </div>\n }\n </ng-template>\n <ng-template #nzDescription>\n @if (item.description) {\n <div class=\"notice-icon__item-desc\">\n <ng-container *nzStringTemplateOutlet=\"item.description; context: { $implicit: item }\">\n {{ item.description }}\n </ng-container>\n </div>\n }\n @if (item.datetime) {\n <div class=\"notice-icon__item-time\">{{ item.datetime }}</div>\n }\n </ng-template>\n </nz-list-item-meta>\n </nz-list-item>\n </ng-template>\n </nz-list>\n <div class=\"notice-icon__clear\" (click)=\"onClear()\">{{ d.clearText || locale().clearText }}</div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzListComponent, selector: "nz-list, [nz-list]", inputs: ["nzDataSource", "nzBordered", "nzGrid", "nzHeader", "nzFooter", "nzItemLayout", "nzRenderItem", "nzLoading", "nzLoadMore", "nzPagination", "nzSize", "nzSplit", "nzNoResult"], exportAs: ["nzList"] }, { kind: "component", type: NzListItemComponent, selector: "nz-list-item, [nz-list-item]", inputs: ["nzActions", "nzContent", "nzExtra", "nzNoFlex"], exportAs: ["nzListItem"] }, { kind: "component", type: NzListItemMetaComponent, selector: "nz-list-item-meta, [nz-list-item-meta]", inputs: ["nzAvatar", "nzTitle", "nzDescription"], exportAs: ["nzListItemMeta"] }, { kind: "component", type: NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }], encapsulation: i0.ViewEncapsulation.None });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
26
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: NoticeIconTabComponent, isStandalone: true, selector: "notice-icon-tab", inputs: { locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: true, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { select: "select", clear: "clear" }, exportAs: ["noticeIconTab"], ngImport: i0, template: "@let d = item();\n@let list = d.list;\n@if (list && list.length > 0) {\n <ng-template [ngTemplateOutlet]=\"listTpl\" />\n} @else {\n <div class=\"notice-icon__notfound\">\n @if (d.emptyImage) {\n <img class=\"notice-icon__notfound-img\" [attr.src]=\"d.emptyImage\" alt=\"not found\" />\n }\n <p>\n <ng-container *nzStringTemplateOutlet=\"d.emptyText\">\n {{ d.emptyText || locale().emptyText }}\n </ng-container>\n </p>\n </div>\n}\n<ng-template #listTpl>\n <nz-list [nzDataSource]=\"list\" [nzRenderItem]=\"item\">\n <ng-template #item let-item>\n <nz-list-item (click)=\"onClick(item, $event)\" [class.notice-icon__item-read]=\"item.read\">\n <nz-list-item-meta [nzTitle]=\"nzTitle\" [nzDescription]=\"nzDescription\" [nzAvatar]=\"item.avatar\">\n <ng-template #nzTitle>\n <ng-container *nzStringTemplateOutlet=\"item.title; context: { $implicit: item }\">\n {{ item.title }}\n </ng-container>\n @if (item.extra) {\n <div class=\"notice-icon__item-extra\">\n <nz-tag [nzColor]=\"item.color\">{{ item.extra }}</nz-tag>\n </div>\n }\n </ng-template>\n <ng-template #nzDescription>\n @if (item.description) {\n <div class=\"notice-icon__item-desc\">\n <ng-container *nzStringTemplateOutlet=\"item.description; context: { $implicit: item }\">\n {{ item.description }}\n </ng-container>\n </div>\n }\n @if (item.datetime) {\n <div class=\"notice-icon__item-time\">{{ item.datetime }}</div>\n }\n </ng-template>\n </nz-list-item-meta>\n </nz-list-item>\n </ng-template>\n </nz-list>\n <div class=\"notice-icon__clear\" (click)=\"onClear()\">{{ d.clearText || locale().clearText }}</div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: NzListComponent, selector: "nz-list, [nz-list]", inputs: ["nzDataSource", "nzBordered", "nzGrid", "nzHeader", "nzFooter", "nzItemLayout", "nzRenderItem", "nzLoading", "nzLoadMore", "nzPagination", "nzSize", "nzSplit", "nzNoResult"], exportAs: ["nzList"] }, { kind: "component", type: NzListItemComponent, selector: "nz-list-item, [nz-list-item]", inputs: ["nzActions", "nzContent", "nzExtra", "nzNoFlex"], exportAs: ["nzListItem"] }, { kind: "component", type: NzListItemMetaComponent, selector: "nz-list-item-meta, [nz-list-item-meta]", inputs: ["nzAvatar", "nzTitle", "nzDescription"], exportAs: ["nzListItemMeta"] }, { kind: "component", type: NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked", "nzBordered"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }], encapsulation: i0.ViewEncapsulation.None });
29
27
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconTabComponent, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconTabComponent, decorators: [{
31
29
  type: Component,
32
30
  args: [{ selector: 'notice-icon-tab', exportAs: 'noticeIconTab', preserveWhitespaces: false, encapsulation: ViewEncapsulation.None, imports: [
33
31
  NgTemplateOutlet,
@@ -36,13 +34,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
36
34
  NzListItemComponent,
37
35
  NzListItemMetaComponent,
38
36
  NzTagComponent
39
- ], template: "@let d = item();\n@let list = d.list;\n@if (list && list.length > 0) {\n <ng-template [ngTemplateOutlet]=\"listTpl\" />\n} @else {\n <div class=\"notice-icon__notfound\">\n @if (d.emptyImage) {\n <img class=\"notice-icon__notfound-img\" [attr.src]=\"d.emptyImage\" alt=\"not found\" />\n }\n <p>\n <ng-container *nzStringTemplateOutlet=\"d.emptyText\">\n {{ d.emptyText || locale().emptyText }}\n </ng-container>\n </p>\n </div>\n}\n<ng-template #listTpl>\n <nz-list [nzDataSource]=\"list\" [nzRenderItem]=\"item\">\n <ng-template #item let-item>\n <nz-list-item (click)=\"onClick(item)\" [class.notice-icon__item-read]=\"item.read\">\n <nz-list-item-meta [nzTitle]=\"nzTitle\" [nzDescription]=\"nzDescription\" [nzAvatar]=\"item.avatar\">\n <ng-template #nzTitle>\n <ng-container *nzStringTemplateOutlet=\"item.title; context: { $implicit: item }\">\n {{ item.title }}\n </ng-container>\n @if (item.extra) {\n <div class=\"notice-icon__item-extra\">\n <nz-tag [nzColor]=\"item.color\">{{ item.extra }}</nz-tag>\n </div>\n }\n </ng-template>\n <ng-template #nzDescription>\n @if (item.description) {\n <div class=\"notice-icon__item-desc\">\n <ng-container *nzStringTemplateOutlet=\"item.description; context: { $implicit: item }\">\n {{ item.description }}\n </ng-container>\n </div>\n }\n @if (item.datetime) {\n <div class=\"notice-icon__item-time\">{{ item.datetime }}</div>\n }\n </ng-template>\n </nz-list-item-meta>\n </nz-list-item>\n </ng-template>\n </nz-list>\n <div class=\"notice-icon__clear\" (click)=\"onClear()\">{{ d.clearText || locale().clearText }}</div>\n</ng-template>\n" }]
37
+ ], template: "@let d = item();\n@let list = d.list;\n@if (list && list.length > 0) {\n <ng-template [ngTemplateOutlet]=\"listTpl\" />\n} @else {\n <div class=\"notice-icon__notfound\">\n @if (d.emptyImage) {\n <img class=\"notice-icon__notfound-img\" [attr.src]=\"d.emptyImage\" alt=\"not found\" />\n }\n <p>\n <ng-container *nzStringTemplateOutlet=\"d.emptyText\">\n {{ d.emptyText || locale().emptyText }}\n </ng-container>\n </p>\n </div>\n}\n<ng-template #listTpl>\n <nz-list [nzDataSource]=\"list\" [nzRenderItem]=\"item\">\n <ng-template #item let-item>\n <nz-list-item (click)=\"onClick(item, $event)\" [class.notice-icon__item-read]=\"item.read\">\n <nz-list-item-meta [nzTitle]=\"nzTitle\" [nzDescription]=\"nzDescription\" [nzAvatar]=\"item.avatar\">\n <ng-template #nzTitle>\n <ng-container *nzStringTemplateOutlet=\"item.title; context: { $implicit: item }\">\n {{ item.title }}\n </ng-container>\n @if (item.extra) {\n <div class=\"notice-icon__item-extra\">\n <nz-tag [nzColor]=\"item.color\">{{ item.extra }}</nz-tag>\n </div>\n }\n </ng-template>\n <ng-template #nzDescription>\n @if (item.description) {\n <div class=\"notice-icon__item-desc\">\n <ng-container *nzStringTemplateOutlet=\"item.description; context: { $implicit: item }\">\n {{ item.description }}\n </ng-container>\n </div>\n }\n @if (item.datetime) {\n <div class=\"notice-icon__item-time\">{{ item.datetime }}</div>\n }\n </ng-template>\n </nz-list-item-meta>\n </nz-list-item>\n </ng-template>\n </nz-list>\n <div class=\"notice-icon__clear\" (click)=\"onClear()\">{{ d.clearText || locale().clearText }}</div>\n</ng-template>\n" }]
40
38
  }] });
41
39
 
42
40
  class NoticeIconComponent {
43
- locale = toSignal(inject(DelonLocaleService).change.pipe(map(data => data['noticeIcon'])), {
44
- requireSync: true
45
- });
41
+ locale = inject(DelonLocaleService).valueSignal('noticeIcon');
46
42
  data = input([]);
47
43
  count = input(undefined, { transform: numberAttribute });
48
44
  loading = input(false, { transform: booleanAttribute });
@@ -66,34 +62,28 @@ class NoticeIconComponent {
66
62
  this.delayShow.set(result);
67
63
  this.popoverVisibleChange.emit(result);
68
64
  }
69
- onSelect(i) {
70
- this.select.emit(i);
71
- }
72
- onClear(title) {
73
- this.clear.emit(title);
74
- }
75
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
76
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: NoticeIconComponent, isStandalone: true, selector: "notice-icon", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, popoverVisible: { classPropertyName: "popoverVisible", publicName: "popoverVisible", isSignal: true, isRequired: false, transformFunction: null }, btnClass: { classPropertyName: "btnClass", publicName: "btnClass", isSignal: true, isRequired: false, transformFunction: null }, btnIconClass: { classPropertyName: "btnIconClass", publicName: "btnIconClass", isSignal: true, isRequired: false, transformFunction: null }, centered: { classPropertyName: "centered", publicName: "centered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select", clear: "clear", popoverVisibleChange: "popoverVisibleChange" }, host: { properties: { "class.notice-icon__btn": "true" } }, exportAs: ["noticeIcon"], ngImport: i0, template: "<ng-template #badgeTpl>\n <nz-badge [nzCount]=\"count()\" [class]=\"btnClass()\" [nzStyle]=\"{ 'box-shadow': 'none' }\">\n <nz-icon nzType=\"bell\" [class]=\"btnIconClass()\" />\n </nz-badge>\n</ng-template>\n@let d = data();\n@if (d.length <= 0) {\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n} @else {\n <div\n nz-dropdown\n [nzVisible]=\"popoverVisible()\"\n (nzVisibleChange)=\"onVisibleChange($event)\"\n nzTrigger=\"click\"\n nzPlacement=\"bottomRight\"\n [nzOverlayClassName]=\"overlayCls()\"\n [nzDropdownMenu]=\"noticeMenu\"\n >\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n </div>\n <nz-dropdown-menu #noticeMenu=\"nzDropdownMenu\">\n <nz-spin [nzSpinning]=\"loading()\" [nzDelay]=\"0\">\n @if (delayShow()) {\n <nz-tabset [nzSelectedIndex]=\"0\" [nzCentered]=\"centered()\">\n @for (i of d; track $index) {\n <nz-tab [nzTitle]=\"i.title\">\n <notice-icon-tab [locale]=\"locale()\" [item]=\"i\" (select)=\"onSelect($event)\" (clear)=\"onClear($event)\" />\n </nz-tab>\n }\n </nz-tabset>\n }\n </nz-spin>\n </nz-dropdown-menu>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzBadgeComponent, selector: "nz-badge", inputs: ["nzShowZero", "nzShowDot", "nzStandalone", "nzDot", "nzOverflowCount", "nzColor", "nzStyle", "nzText", "nzTitle", "nzStatus", "nzCount", "nzOffset", "nzSize"], exportAs: ["nzBadge"] }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "component", type: NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "component", type: NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { kind: "component", type: NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: NoticeIconTabComponent, selector: "notice-icon-tab", inputs: ["locale", "item"], outputs: ["select", "clear"], exportAs: ["noticeIconTab"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
65
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
66
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: NoticeIconComponent, isStandalone: true, selector: "notice-icon", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, popoverVisible: { classPropertyName: "popoverVisible", publicName: "popoverVisible", isSignal: true, isRequired: false, transformFunction: null }, btnClass: { classPropertyName: "btnClass", publicName: "btnClass", isSignal: true, isRequired: false, transformFunction: null }, btnIconClass: { classPropertyName: "btnIconClass", publicName: "btnIconClass", isSignal: true, isRequired: false, transformFunction: null }, centered: { classPropertyName: "centered", publicName: "centered", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select", clear: "clear", popoverVisibleChange: "popoverVisibleChange" }, host: { properties: { "class.notice-icon__btn": "true" } }, exportAs: ["noticeIcon"], ngImport: i0, template: "<ng-template #badgeTpl>\n <nz-badge [nzCount]=\"count()\" [class]=\"btnClass()\" [nzStyle]=\"{ 'box-shadow': 'none' }\">\n <nz-icon nzType=\"bell\" [class]=\"btnIconClass()\" />\n </nz-badge>\n</ng-template>\n@let d = data();\n@if (d.length <= 0) {\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n} @else {\n <div\n nz-dropdown\n [nzVisible]=\"popoverVisible()\"\n (nzVisibleChange)=\"onVisibleChange($event)\"\n nzTrigger=\"click\"\n nzPlacement=\"bottomRight\"\n [nzOverlayClassName]=\"overlayCls()\"\n [nzDropdownMenu]=\"noticeMenu\"\n >\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n </div>\n <nz-dropdown-menu #noticeMenu=\"nzDropdownMenu\">\n <nz-spin [nzSpinning]=\"loading()\" [nzDelay]=\"0\">\n @if (delayShow()) {\n <nz-tabs [nzSelectedIndex]=\"0\" [nzCentered]=\"centered()\">\n @for (i of d; track $index) {\n <nz-tab [nzTitle]=\"i.title\">\n <notice-icon-tab [locale]=\"locale()\" [item]=\"i\" (select)=\"select.emit($event)\" (clear)=\"clear.emit($event)\" />\n </nz-tab>\n }\n </nz-tabs>\n }\n </nz-spin>\n </nz-dropdown-menu>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NzBadgeComponent, selector: "nz-badge", inputs: ["nzShowZero", "nzShowDot", "nzStandalone", "nzDot", "nzOverflowCount", "nzColor", "nzStyle", "nzText", "nzTitle", "nzStatus", "nzCount", "nzOffset", "nzSize"], exportAs: ["nzBadge"] }, { kind: "directive", type: NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "directive", type: NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "component", type: NzSpinComponent, selector: "nz-spin", inputs: ["nzIndicator", "nzSize", "nzTip", "nzDelay", "nzSimple", "nzSpinning"], exportAs: ["nzSpin"] }, { kind: "component", type: NzTabsComponent, selector: "nz-tabs,nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact", "nzDestroyInactiveTabPane"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabs"] }, { kind: "component", type: NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { kind: "component", type: NoticeIconTabComponent, selector: "notice-icon-tab", inputs: ["locale", "item"], outputs: ["select", "clear"], exportAs: ["noticeIconTab"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
77
67
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconComponent, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconComponent, decorators: [{
79
69
  type: Component,
80
- args: [{ selector: 'notice-icon', exportAs: 'noticeIcon', host: { '[class.notice-icon__btn]': 'true' }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
70
+ args: [{ selector: 'notice-icon', exportAs: 'noticeIcon', host: { '[class.notice-icon__btn]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
81
71
  NgTemplateOutlet,
82
72
  NzBadgeComponent,
83
73
  NzIconDirective,
84
74
  NzDropDownDirective,
85
75
  NzDropdownMenuComponent,
86
76
  NzSpinComponent,
87
- NzTabSetComponent,
77
+ NzTabsComponent,
88
78
  NzTabComponent,
89
79
  NoticeIconTabComponent
90
- ], template: "<ng-template #badgeTpl>\n <nz-badge [nzCount]=\"count()\" [class]=\"btnClass()\" [nzStyle]=\"{ 'box-shadow': 'none' }\">\n <nz-icon nzType=\"bell\" [class]=\"btnIconClass()\" />\n </nz-badge>\n</ng-template>\n@let d = data();\n@if (d.length <= 0) {\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n} @else {\n <div\n nz-dropdown\n [nzVisible]=\"popoverVisible()\"\n (nzVisibleChange)=\"onVisibleChange($event)\"\n nzTrigger=\"click\"\n nzPlacement=\"bottomRight\"\n [nzOverlayClassName]=\"overlayCls()\"\n [nzDropdownMenu]=\"noticeMenu\"\n >\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n </div>\n <nz-dropdown-menu #noticeMenu=\"nzDropdownMenu\">\n <nz-spin [nzSpinning]=\"loading()\" [nzDelay]=\"0\">\n @if (delayShow()) {\n <nz-tabset [nzSelectedIndex]=\"0\" [nzCentered]=\"centered()\">\n @for (i of d; track $index) {\n <nz-tab [nzTitle]=\"i.title\">\n <notice-icon-tab [locale]=\"locale()\" [item]=\"i\" (select)=\"onSelect($event)\" (clear)=\"onClear($event)\" />\n </nz-tab>\n }\n </nz-tabset>\n }\n </nz-spin>\n </nz-dropdown-menu>\n}\n" }]
80
+ ], template: "<ng-template #badgeTpl>\n <nz-badge [nzCount]=\"count()\" [class]=\"btnClass()\" [nzStyle]=\"{ 'box-shadow': 'none' }\">\n <nz-icon nzType=\"bell\" [class]=\"btnIconClass()\" />\n </nz-badge>\n</ng-template>\n@let d = data();\n@if (d.length <= 0) {\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n} @else {\n <div\n nz-dropdown\n [nzVisible]=\"popoverVisible()\"\n (nzVisibleChange)=\"onVisibleChange($event)\"\n nzTrigger=\"click\"\n nzPlacement=\"bottomRight\"\n [nzOverlayClassName]=\"overlayCls()\"\n [nzDropdownMenu]=\"noticeMenu\"\n >\n <ng-template [ngTemplateOutlet]=\"badgeTpl\" />\n </div>\n <nz-dropdown-menu #noticeMenu=\"nzDropdownMenu\">\n <nz-spin [nzSpinning]=\"loading()\" [nzDelay]=\"0\">\n @if (delayShow()) {\n <nz-tabs [nzSelectedIndex]=\"0\" [nzCentered]=\"centered()\">\n @for (i of d; track $index) {\n <nz-tab [nzTitle]=\"i.title\">\n <notice-icon-tab [locale]=\"locale()\" [item]=\"i\" (select)=\"select.emit($event)\" (clear)=\"clear.emit($event)\" />\n </nz-tab>\n }\n </nz-tabs>\n }\n </nz-spin>\n </nz-dropdown-menu>\n}\n" }]
91
81
  }], ctorParameters: () => [] });
92
82
 
93
83
  const COMPONENTS = [NoticeIconComponent];
94
84
  class NoticeIconModule {
95
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
96
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconModule, imports: [CommonModule,
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
86
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconModule, imports: [CommonModule,
97
87
  DelonLocaleModule,
98
88
  NzBadgeModule,
99
89
  NzDropDownModule,
@@ -103,7 +93,7 @@ class NoticeIconModule {
103
93
  NzTabsModule,
104
94
  NzTagModule,
105
95
  NzOutletModule, NoticeIconComponent, NoticeIconTabComponent], exports: [NoticeIconComponent] });
106
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconModule, imports: [CommonModule,
96
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconModule, imports: [CommonModule,
107
97
  DelonLocaleModule,
108
98
  NzBadgeModule,
109
99
  NzDropDownModule,
@@ -114,7 +104,7 @@ class NoticeIconModule {
114
104
  NzTagModule,
115
105
  NzOutletModule, COMPONENTS, NoticeIconTabComponent] });
116
106
  }
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeIconModule, decorators: [{
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NoticeIconModule, decorators: [{
118
108
  type: NgModule,
119
109
  args: [{
120
110
  imports: [