@delon/abc 17.0.4 → 17.1.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 (240) hide show
  1. package/auto-focus/auto-focus.directive.d.ts +7 -12
  2. package/avatar-list/avatar-list-item.component.d.ts +1 -1
  3. package/avatar-list/avatar-list.component.d.ts +10 -12
  4. package/avatar-list/avatar-list.module.d.ts +6 -6
  5. package/cell/cell-host.directive.d.ts +3 -5
  6. package/cell/cell.component.d.ts +10 -15
  7. package/cell/cell.service.d.ts +4 -7
  8. package/count-down/count-down.component.d.ts +1 -1
  9. package/count-down/count-down.module.d.ts +4 -4
  10. package/date-picker/date-picker.module.d.ts +6 -6
  11. package/date-picker/range-shortcut.component.d.ts +2 -2
  12. package/date-picker/range.directive.d.ts +7 -9
  13. package/down-file/down-file.directive.d.ts +6 -7
  14. package/down-file/down-file.module.d.ts +4 -4
  15. package/ellipsis/ellipsis.component.d.ts +12 -15
  16. package/ellipsis/ellipsis.module.d.ts +5 -5
  17. package/error-collect/error-collect.component.d.ts +14 -14
  18. package/error-collect/error-collect.module.d.ts +4 -4
  19. package/esm2022/auto-focus/auto-focus.directive.mjs +21 -32
  20. package/esm2022/auto-focus/auto-focus.module.mjs +4 -4
  21. package/esm2022/avatar-list/avatar-list-item.component.mjs +6 -5
  22. package/esm2022/avatar-list/avatar-list.component.mjs +28 -34
  23. package/esm2022/avatar-list/avatar-list.module.mjs +6 -7
  24. package/esm2022/cell/cell-host.directive.mjs +10 -10
  25. package/esm2022/cell/cell.component.mjs +43 -59
  26. package/esm2022/cell/cell.module.mjs +4 -4
  27. package/esm2022/cell/cell.service.mjs +13 -14
  28. package/esm2022/count-down/count-down.component.mjs +9 -7
  29. package/esm2022/count-down/count-down.module.mjs +6 -7
  30. package/esm2022/date-picker/date-picker.module.mjs +6 -7
  31. package/esm2022/date-picker/range-shortcut.component.mjs +9 -9
  32. package/esm2022/date-picker/range.directive.mjs +16 -19
  33. package/esm2022/down-file/down-file.directive.mjs +17 -18
  34. package/esm2022/down-file/down-file.module.mjs +7 -8
  35. package/esm2022/ellipsis/ellipsis.component.mjs +36 -49
  36. package/esm2022/ellipsis/ellipsis.module.mjs +6 -7
  37. package/esm2022/error-collect/error-collect.component.mjs +27 -36
  38. package/esm2022/error-collect/error-collect.module.mjs +6 -7
  39. package/esm2022/exception/exception.component.mjs +21 -25
  40. package/esm2022/exception/exception.module.mjs +6 -7
  41. package/esm2022/footer-toolbar/footer-toolbar.component.mjs +18 -28
  42. package/esm2022/footer-toolbar/footer-toolbar.module.mjs +6 -7
  43. package/esm2022/full-content/full-content-toggle.directive.mjs +11 -10
  44. package/esm2022/full-content/full-content.component.mjs +26 -38
  45. package/esm2022/full-content/full-content.module.mjs +6 -7
  46. package/esm2022/full-content/full-content.service.mjs +3 -3
  47. package/esm2022/global-footer/global-footer-item.component.mjs +9 -12
  48. package/esm2022/global-footer/global-footer.component.mjs +23 -28
  49. package/esm2022/global-footer/global-footer.module.mjs +6 -7
  50. package/esm2022/hotkey/hotkey.directive.mjs +14 -14
  51. package/esm2022/hotkey/hotkey.module.mjs +4 -4
  52. package/esm2022/let/let.directive.mjs +3 -3
  53. package/esm2022/let/let.module.mjs +4 -4
  54. package/esm2022/loading/loading.component.mjs +8 -8
  55. package/esm2022/loading/loading.module.mjs +6 -7
  56. package/esm2022/loading/loading.service.mjs +15 -17
  57. package/esm2022/lodop/lodop.module.mjs +4 -4
  58. package/esm2022/lodop/lodop.service.mjs +10 -10
  59. package/esm2022/media/media.component.mjs +24 -25
  60. package/esm2022/media/media.module.mjs +6 -7
  61. package/esm2022/media/media.service.mjs +15 -15
  62. package/esm2022/notice-icon/notice-icon-tab.component.mjs +16 -9
  63. package/esm2022/notice-icon/notice-icon.component.mjs +40 -39
  64. package/esm2022/notice-icon/notice-icon.module.mjs +10 -9
  65. package/esm2022/observers/observer-size.mjs +18 -18
  66. package/esm2022/onboarding/onboarding.component.mjs +24 -30
  67. package/esm2022/onboarding/onboarding.module.mjs +25 -9
  68. package/esm2022/onboarding/onboarding.service.mjs +26 -33
  69. package/esm2022/page-header/page-header.component.mjs +61 -84
  70. package/esm2022/page-header/page-header.module.mjs +9 -9
  71. package/esm2022/pdf/pdf.component.mjs +46 -71
  72. package/esm2022/pdf/pdf.module.mjs +6 -7
  73. package/esm2022/qr/qr.component.mjs +11 -19
  74. package/esm2022/qr/qr.module.mjs +4 -4
  75. package/esm2022/quick-menu/quick-menu.component.mjs +21 -29
  76. package/esm2022/quick-menu/quick-menu.module.mjs +6 -7
  77. package/esm2022/result/result.component.mjs +20 -22
  78. package/esm2022/result/result.module.mjs +6 -7
  79. package/esm2022/reuse-tab/provide.mjs +2 -1
  80. package/esm2022/reuse-tab/reuse-tab-context-menu.component.mjs +13 -14
  81. package/esm2022/reuse-tab/reuse-tab-context.component.mjs +12 -16
  82. package/esm2022/reuse-tab/reuse-tab-context.directive.mjs +9 -9
  83. package/esm2022/reuse-tab/reuse-tab-context.service.mjs +9 -10
  84. package/esm2022/reuse-tab/reuse-tab.component.mjs +58 -93
  85. package/esm2022/reuse-tab/reuse-tab.module.mjs +4 -4
  86. package/esm2022/reuse-tab/reuse-tab.service.mjs +71 -60
  87. package/esm2022/reuse-tab/reuse-tab.strategy.mjs +5 -3
  88. package/esm2022/se/se-container.component.mjs +62 -79
  89. package/esm2022/se/se.component.mjs +42 -59
  90. package/esm2022/se/se.module.mjs +6 -7
  91. package/esm2022/sg/sg-container.component.mjs +12 -20
  92. package/esm2022/sg/sg.component.mjs +21 -27
  93. package/esm2022/sg/sg.module.mjs +6 -7
  94. package/esm2022/st/st-column-source.mjs +4 -4
  95. package/esm2022/st/st-data-source.mjs +4 -4
  96. package/esm2022/st/st-export.mjs +30 -21
  97. package/esm2022/st/st-filter.component.mjs +11 -11
  98. package/esm2022/st/st-row.directive.mjs +12 -14
  99. package/esm2022/st/st-widget-host.directive.mjs +10 -10
  100. package/esm2022/st/st-widget.mjs +3 -3
  101. package/esm2022/st/st.component.mjs +82 -124
  102. package/esm2022/st/st.module.mjs +4 -4
  103. package/esm2022/sv/sv-container.component.mjs +60 -78
  104. package/esm2022/sv/sv-value.component.mjs +9 -7
  105. package/esm2022/sv/sv.component.mjs +35 -48
  106. package/esm2022/sv/sv.module.mjs +6 -7
  107. package/esm2022/tag-select/tag-select.component.mjs +19 -24
  108. package/esm2022/tag-select/tag-select.module.mjs +6 -7
  109. package/esm2022/xlsx/xlsx.directive.mjs +9 -9
  110. package/esm2022/xlsx/xlsx.module.mjs +4 -4
  111. package/esm2022/xlsx/xlsx.service.mjs +13 -13
  112. package/esm2022/zip/zip.service.mjs +13 -13
  113. package/exception/exception.component.d.ts +13 -13
  114. package/exception/exception.module.d.ts +7 -7
  115. package/fesm2022/auto-focus.mjs +24 -35
  116. package/fesm2022/auto-focus.mjs.map +1 -1
  117. package/fesm2022/avatar-list.mjs +37 -46
  118. package/fesm2022/avatar-list.mjs.map +1 -1
  119. package/fesm2022/cell.mjs +67 -84
  120. package/fesm2022/cell.mjs.map +1 -1
  121. package/fesm2022/chart-observer-size.mjs +17 -17
  122. package/fesm2022/chart-observer-size.mjs.map +1 -1
  123. package/fesm2022/count-down.mjs +13 -13
  124. package/fesm2022/count-down.mjs.map +1 -1
  125. package/fesm2022/date-picker.mjs +28 -33
  126. package/fesm2022/date-picker.mjs.map +1 -1
  127. package/fesm2022/down-file.mjs +22 -25
  128. package/fesm2022/down-file.mjs.map +1 -1
  129. package/fesm2022/ellipsis.mjs +40 -56
  130. package/fesm2022/ellipsis.mjs.map +1 -1
  131. package/fesm2022/error-collect.mjs +31 -42
  132. package/fesm2022/error-collect.mjs.map +1 -1
  133. package/fesm2022/exception.mjs +25 -34
  134. package/fesm2022/exception.mjs.map +1 -1
  135. package/fesm2022/footer-toolbar.mjs +22 -35
  136. package/fesm2022/footer-toolbar.mjs.map +1 -1
  137. package/fesm2022/full-content.mjs +40 -52
  138. package/fesm2022/full-content.mjs.map +1 -1
  139. package/fesm2022/global-footer.mjs +34 -45
  140. package/fesm2022/global-footer.mjs.map +1 -1
  141. package/fesm2022/hotkey.mjs +17 -17
  142. package/fesm2022/hotkey.mjs.map +1 -1
  143. package/fesm2022/let.mjs +7 -7
  144. package/fesm2022/loading.mjs +26 -33
  145. package/fesm2022/loading.mjs.map +1 -1
  146. package/fesm2022/lodop.mjs +13 -13
  147. package/fesm2022/lodop.mjs.map +1 -1
  148. package/fesm2022/media.mjs +40 -42
  149. package/fesm2022/media.mjs.map +1 -1
  150. package/fesm2022/notice-icon.mjs +61 -62
  151. package/fesm2022/notice-icon.mjs.map +1 -1
  152. package/fesm2022/onboarding.mjs +71 -72
  153. package/fesm2022/onboarding.mjs.map +1 -1
  154. package/fesm2022/page-header.mjs +68 -97
  155. package/fesm2022/page-header.mjs.map +1 -1
  156. package/fesm2022/pdf.mjs +50 -77
  157. package/fesm2022/pdf.mjs.map +1 -1
  158. package/fesm2022/qr.mjs +14 -22
  159. package/fesm2022/qr.mjs.map +1 -1
  160. package/fesm2022/quick-menu.mjs +25 -37
  161. package/fesm2022/quick-menu.mjs.map +1 -1
  162. package/fesm2022/result.mjs +24 -29
  163. package/fesm2022/result.mjs.map +1 -1
  164. package/fesm2022/reuse-tab.mjs +175 -206
  165. package/fesm2022/reuse-tab.mjs.map +1 -1
  166. package/fesm2022/se.mjs +104 -141
  167. package/fesm2022/se.mjs.map +1 -1
  168. package/fesm2022/sg.mjs +34 -47
  169. package/fesm2022/sg.mjs.map +1 -1
  170. package/fesm2022/st.mjs +148 -180
  171. package/fesm2022/st.mjs.map +1 -1
  172. package/fesm2022/sv.mjs +102 -135
  173. package/fesm2022/sv.mjs.map +1 -1
  174. package/fesm2022/tag-select.mjs +23 -31
  175. package/fesm2022/tag-select.mjs.map +1 -1
  176. package/fesm2022/xlsx.mjs +22 -22
  177. package/fesm2022/xlsx.mjs.map +1 -1
  178. package/fesm2022/zip.mjs +12 -12
  179. package/fesm2022/zip.mjs.map +1 -1
  180. package/footer-toolbar/footer-toolbar.component.d.ts +6 -10
  181. package/footer-toolbar/footer-toolbar.module.d.ts +5 -5
  182. package/full-content/full-content-toggle.directive.d.ts +2 -4
  183. package/full-content/full-content.component.d.ts +11 -16
  184. package/full-content/full-content.module.d.ts +4 -4
  185. package/global-footer/global-footer-item.component.d.ts +2 -3
  186. package/global-footer/global-footer.component.d.ts +12 -16
  187. package/global-footer/global-footer.module.d.ts +5 -5
  188. package/hotkey/hotkey.directive.d.ts +4 -6
  189. package/loading/loading.component.d.ts +2 -2
  190. package/loading/loading.module.d.ts +7 -7
  191. package/loading/loading.service.d.ts +5 -8
  192. package/lodop/lodop.service.d.ts +2 -3
  193. package/media/media.component.d.ts +9 -13
  194. package/media/media.module.d.ts +3 -3
  195. package/media/media.service.d.ts +3 -5
  196. package/notice-icon/notice-icon-tab.component.d.ts +1 -1
  197. package/notice-icon/notice-icon.component.d.ts +9 -11
  198. package/notice-icon/notice-icon.module.d.ts +13 -13
  199. package/observers/observer-size.d.ts +4 -5
  200. package/onboarding/onboarding.component.d.ts +7 -10
  201. package/onboarding/onboarding.module.d.ts +8 -8
  202. package/onboarding/onboarding.service.d.ts +9 -16
  203. package/package.json +5 -5
  204. package/page-header/page-header.component.d.ts +24 -27
  205. package/page-header/page-header.module.d.ts +9 -9
  206. package/pdf/pdf.component.d.ts +22 -22
  207. package/pdf/pdf.module.d.ts +4 -4
  208. package/pdf/pdf.types.d.ts +1 -1
  209. package/qr/qr.component.d.ts +3 -4
  210. package/quick-menu/quick-menu.component.d.ts +8 -10
  211. package/quick-menu/quick-menu.module.d.ts +5 -5
  212. package/result/result.component.d.ts +8 -9
  213. package/result/result.module.d.ts +5 -5
  214. package/reuse-tab/reuse-tab-context-menu.component.d.ts +1 -3
  215. package/reuse-tab/reuse-tab-context.component.d.ts +4 -7
  216. package/reuse-tab/reuse-tab-context.directive.d.ts +1 -3
  217. package/reuse-tab/reuse-tab-context.service.d.ts +1 -3
  218. package/reuse-tab/reuse-tab.component.d.ts +21 -28
  219. package/reuse-tab/reuse-tab.service.d.ts +10 -12
  220. package/reuse-tab/reuse-tab.strategy.d.ts +1 -3
  221. package/se/se-container.component.d.ts +20 -21
  222. package/se/se.component.d.ts +17 -21
  223. package/se/se.module.d.ts +7 -7
  224. package/sg/sg-container.component.d.ts +4 -5
  225. package/sg/sg.component.d.ts +9 -12
  226. package/sg/sg.module.d.ts +4 -4
  227. package/st/st-export.d.ts +3 -4
  228. package/st/st-filter.component.d.ts +2 -3
  229. package/st/st-row.directive.d.ts +3 -4
  230. package/st/st-widget-host.directive.d.ts +3 -5
  231. package/st/st.component.d.ts +36 -40
  232. package/sv/sv-container.component.d.ts +19 -20
  233. package/sv/sv-value.component.d.ts +1 -1
  234. package/sv/sv.component.d.ts +13 -16
  235. package/sv/sv.module.d.ts +9 -9
  236. package/tag-select/tag-select.component.d.ts +11 -13
  237. package/tag-select/tag-select.module.d.ts +5 -5
  238. package/xlsx/xlsx.directive.d.ts +1 -3
  239. package/xlsx/xlsx.service.d.ts +4 -7
  240. package/zip/zip.service.d.ts +4 -7
@@ -1 +1 @@
1
- {"version":3,"file":"tag-select.mjs","sources":["../../../../packages/abc/tag-select/tag-select.component.ts","../../../../packages/abc/tag-select/tag-select.component.html","../../../../packages/abc/tag-select/tag-select.module.ts","../../../../packages/abc/tag-select/tag-select.ts"],"sourcesContent":["import { Direction, Directionality } from '@angular/cdk/bidi';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n EventEmitter,\n Input,\n OnInit,\n Optional,\n Output,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { DelonLocaleService, LocaleData } from '@delon/theme';\nimport { BooleanInput, InputBoolean } from '@delon/util/decorator';\n\n@Component({\n selector: 'tag-select',\n exportAs: 'tagSelect',\n templateUrl: './tag-select.component.html',\n host: {\n '[class.tag-select]': 'true',\n '[class.tag-select-rtl]': `dir === 'rtl'`,\n '[class.tag-select-rtl__has-expand]': `dir === 'rtl' && expandable`,\n '[class.tag-select__has-expand]': 'expandable',\n '[class.tag-select__expanded]': 'expand'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class TagSelectComponent implements OnInit {\n static ngAcceptInputType_expandable: BooleanInput;\n\n private destroy$ = inject(DestroyRef);\n locale: LocaleData = {};\n expand = false;\n dir: Direction = 'ltr';\n\n /** 是否启用 `展开与收进` */\n @Input() @InputBoolean() expandable = true;\n @Output() readonly change = new EventEmitter<boolean>();\n\n constructor(\n private i18n: DelonLocaleService,\n @Optional() private directionality: Directionality,\n private cdr: ChangeDetectorRef\n ) {}\n\n ngOnInit(): void {\n this.dir = this.directionality.value;\n this.directionality.change?.pipe(takeUntilDestroyed(this.destroy$)).subscribe((direction: Direction) => {\n this.dir = direction;\n });\n this.i18n.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(() => {\n this.locale = this.i18n.getData('tagSelect');\n this.cdr.detectChanges();\n });\n }\n\n trigger(): void {\n this.expand = !this.expand;\n this.change.emit(this.expand);\n }\n}\n","<ng-content />\n@if (expandable) {\n <a class=\"ant-tag ant-tag-checkable tag-select__trigger\" (click)=\"trigger()\">\n {{ expand ? locale.collapse : locale.expand }}\n <i nz-icon nzType=\"down\" [style.transform]=\"expand ? 'rotate(-180deg)' : null\"></i>\n </a>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DelonLocaleModule } from '@delon/theme';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { TagSelectComponent } from './tag-select.component';\n\nconst COMPONENTS = [TagSelectComponent];\n\n@NgModule({\n imports: [CommonModule, NzIconModule, DelonLocaleModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class TagSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAkCa,kBAAkB,CAAA;AA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-select.component.html","../../../../packages/abc/tag-select/tag-select.module.ts","../../../../packages/abc/tag-select/tag-select.ts"],"sourcesContent":["import { Direction, Directionality } from '@angular/cdk/bidi';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport { DelonLocaleService, LocaleData } from '@delon/theme';\nimport { NzIconDirective } from 'ng-zorro-antd/icon';\n\n@Component({\n selector: 'tag-select',\n exportAs: 'tagSelect',\n templateUrl: './tag-select.component.html',\n host: {\n '[class.tag-select]': 'true',\n '[class.tag-select-rtl]': `dir === 'rtl'`,\n '[class.tag-select-rtl__has-expand]': `dir === 'rtl' && expandable`,\n '[class.tag-select__has-expand]': 'expandable',\n '[class.tag-select__expanded]': 'expand'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [NzIconDirective]\n})\nexport class TagSelectComponent implements OnInit {\n private readonly i18n = inject(DelonLocaleService);\n private readonly directionality = inject(Directionality, { optional: true });\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly destroy$ = inject(DestroyRef);\n locale: LocaleData = {};\n expand = false;\n dir?: Direction = 'ltr';\n\n /** 是否启用 `展开与收进` */\n @Input({ transform: booleanAttribute }) expandable = true;\n @Output() readonly change = new EventEmitter<boolean>();\n\n ngOnInit(): void {\n this.dir = this.directionality?.value;\n this.directionality?.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(direction => {\n this.dir = direction;\n this.cdr.detectChanges();\n });\n this.i18n.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(() => {\n this.locale = this.i18n.getData('tagSelect');\n this.cdr.detectChanges();\n });\n }\n\n trigger(): void {\n this.expand = !this.expand;\n this.change.emit(this.expand);\n }\n}\n","<ng-content />\n@if (expandable) {\n <a class=\"ant-tag ant-tag-checkable tag-select__trigger\" (click)=\"trigger()\">\n {{ expand ? locale.collapse : locale.expand }}\n <i nz-icon nzType=\"down\" [style.transform]=\"expand ? 'rotate(-180deg)' : null\"></i>\n </a>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DelonLocaleModule } from '@delon/theme';\nimport { NzIconModule } from 'ng-zorro-antd/icon';\n\nimport { TagSelectComponent } from './tag-select.component';\n\nconst COMPONENTS = [TagSelectComponent];\n\n@NgModule({\n imports: [CommonModule, NzIconModule, DelonLocaleModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class TagSelectModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAoCa,kBAAkB,CAAA;AAjB/B,IAAA,WAAA,GAAA;AAkBmB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAClC,IAAc,CAAA,cAAA,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5D,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAM,CAAA,MAAA,GAAe,EAAE,CAAC;QACxB,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;QACf,IAAG,CAAA,GAAA,GAAe,KAAK,CAAC;;QAGgB,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAW,CAAC;AAkBzD,KAAA;IAhBC,QAAQ,GAAA;QACN,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC;AACtC,QAAA,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,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A,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAf,eAAe,EAAA,OAAA,EAAA,CAHhB,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAHrC,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAAlB,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA;AAMzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAHhB,OAAA,EAAA,CAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG5C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,GAAG,UAAU,CAAC;AACvE,oBAAA,OAAO,EAAE,UAAU;AACpB,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
package/fesm2022/xlsx.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  import { __decorate } from 'tslib';
2
+ import { HttpClient } from '@angular/common/http';
2
3
  import * as i0 from '@angular/core';
3
- import { Injectable, Directive, Input, NgModule } from '@angular/core';
4
+ import { inject, NgZone, Injectable, Directive, Input, NgModule } from '@angular/core';
4
5
  import isUtf8 from 'isutf8';
5
6
  import { ZoneOutside } from '@delon/util/decorator';
6
- import * as i1 from '@angular/common/http';
7
- import * as i2 from '@delon/util/other';
8
- import * as i3 from '@delon/util/config';
7
+ import { LazyService } from '@delon/util/other';
8
+ import * as i1 from '@delon/util/config';
9
9
 
10
10
  class XlsxService {
11
- constructor(http, lazy, configSrv, ngZone) {
12
- this.http = http;
13
- this.lazy = lazy;
14
- this.ngZone = ngZone;
11
+ constructor(configSrv) {
12
+ this.http = inject(HttpClient);
13
+ this.lazy = inject(LazyService);
14
+ this.ngZone = inject(NgZone);
15
15
  this.cog = configSrv.merge('xlsx', {
16
16
  url: 'https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js',
17
17
  modules: [`https://cdn.jsdelivr.net/npm/xlsx/dist/cpexcel.js`]
@@ -113,8 +113,8 @@ class XlsxService {
113
113
  } while (val > 0);
114
114
  return res;
115
115
  }
116
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxService, deps: [{ token: i1.HttpClient }, { token: i2.LazyService }, { token: i3.AlainConfigService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
117
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxService, providedIn: 'root' }); }
116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
117
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxService, providedIn: 'root' }); }
118
118
  }
119
119
  __decorate([
120
120
  ZoneOutside()
@@ -122,22 +122,22 @@ __decorate([
122
122
  __decorate([
123
123
  ZoneOutside()
124
124
  ], XlsxService.prototype, "export", null);
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxService, decorators: [{
125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxService, decorators: [{
126
126
  type: Injectable,
127
127
  args: [{ providedIn: 'root' }]
128
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.LazyService }, { type: i3.AlainConfigService }, { type: i0.NgZone }], propDecorators: { read: [], export: [] } });
128
+ }], ctorParameters: () => [{ type: i1.AlainConfigService }], propDecorators: { read: [], export: [] } });
129
129
 
130
130
  class XlsxDirective {
131
- constructor(srv) {
132
- this.srv = srv;
131
+ constructor() {
132
+ this.srv = inject(XlsxService);
133
133
  }
134
134
  _click() {
135
135
  this.srv.export(this.data);
136
136
  }
137
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxDirective, deps: [{ token: XlsxService }], target: i0.ɵɵFactoryTarget.Directive }); }
138
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: XlsxDirective, isStandalone: true, selector: "[xlsx]", inputs: { data: ["xlsx", "data"] }, host: { listeners: { "click": "_click()" } }, exportAs: ["xlsx"], ngImport: i0 }); }
137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
138
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.1.0", type: XlsxDirective, isStandalone: true, selector: "[xlsx]", inputs: { data: ["xlsx", "data"] }, host: { listeners: { "click": "_click()" } }, exportAs: ["xlsx"], ngImport: i0 }); }
139
139
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxDirective, decorators: [{
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxDirective, decorators: [{
141
141
  type: Directive,
142
142
  args: [{
143
143
  selector: '[xlsx]',
@@ -147,18 +147,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImpor
147
147
  },
148
148
  standalone: true
149
149
  }]
150
- }], ctorParameters: () => [{ type: XlsxService }], propDecorators: { data: [{
150
+ }], propDecorators: { data: [{
151
151
  type: Input,
152
152
  args: ['xlsx']
153
153
  }] } });
154
154
 
155
155
  const COMPONENTS = [XlsxDirective];
156
156
  class XlsxModule {
157
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
158
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: XlsxModule, imports: [XlsxDirective], exports: [XlsxDirective] }); }
159
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxModule }); }
157
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
158
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.0", ngImport: i0, type: XlsxModule, imports: [XlsxDirective], exports: [XlsxDirective] }); }
159
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxModule }); }
160
160
  }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: XlsxModule, decorators: [{
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: XlsxModule, decorators: [{
162
162
  type: NgModule,
163
163
  args: [{
164
164
  imports: [COMPONENTS],
@@ -1 +1 @@
1
- {"version":3,"file":"xlsx.mjs","sources":["../../../../packages/abc/xlsx/xlsx.service.ts","../../../../packages/abc/xlsx/xlsx.directive.ts","../../../../packages/abc/xlsx/xlsx.module.ts","../../../../packages/abc/xlsx/xlsx.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, NgZone } from '@angular/core';\n\nimport isUtf8 from 'isutf8';\n\nimport { AlainConfigService, AlainXlsxConfig } from '@delon/util/config';\nimport { ZoneOutside } from '@delon/util/decorator';\nimport { LazyResult, LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { XlsxExportOptions, XlsxExportResult, XlsxExportSheet } from './xlsx.types';\n\ndeclare var XLSX: NzSafeAny;\ndeclare var cptable: NzSafeAny;\n\n@Injectable({ providedIn: 'root' })\nexport class XlsxService {\n constructor(\n private http: HttpClient,\n private lazy: LazyService,\n configSrv: AlainConfigService,\n private ngZone: NgZone\n ) {\n this.cog = configSrv.merge('xlsx', {\n url: 'https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js',\n modules: [`https://cdn.jsdelivr.net/npm/xlsx/dist/cpexcel.js`]\n })!;\n }\n private cog: AlainXlsxConfig;\n\n private init(): Promise<LazyResult[]> {\n return typeof XLSX !== 'undefined'\n ? Promise.resolve([])\n : this.lazy.load([this.cog.url!].concat(this.cog.modules!));\n }\n\n @ZoneOutside()\n private read(data: NzSafeAny): { [key: string]: NzSafeAny[][] } {\n const {\n read,\n utils: { sheet_to_json }\n } = XLSX;\n const ret: NzSafeAny = {};\n const buf = new Uint8Array(data);\n let type = 'array';\n if (!isUtf8(buf)) {\n try {\n data = cptable.utils.decode(936, buf);\n type = 'string';\n } catch {}\n }\n const wb = read(data, { type });\n wb.SheetNames.forEach((name: string) => {\n const sheet: NzSafeAny = wb.Sheets[name];\n ret[name] = sheet_to_json(sheet, { header: 1 });\n });\n return ret;\n }\n\n /**\n * 导入Excel并输出JSON,支持 `<input type=\"file\">`、URL 形式\n */\n import(fileOrUrl: File | string): Promise<{ [key: string]: NzSafeAny[][] }> {\n return new Promise<{ [key: string]: NzSafeAny[][] }>((resolve, reject) => {\n const r = (data: NzSafeAny): void => this.ngZone.run(() => resolve(this.read(data)));\n this.init()\n .then(() => {\n // from url\n if (typeof fileOrUrl === 'string') {\n this.http.request('GET', fileOrUrl, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => r(new Uint8Array(res)),\n error: (err: NzSafeAny) => reject(err)\n });\n return;\n }\n // from file\n const reader: FileReader = new FileReader();\n reader.onload = (e: NzSafeAny) => r(e.target.result);\n reader.onerror = (e: NzSafeAny) => reject(e);\n reader.readAsArrayBuffer(fileOrUrl);\n })\n .catch(() => reject(`Unable to load xlsx.js`));\n });\n }\n\n @ZoneOutside()\n async export(options: XlsxExportOptions): Promise<XlsxExportResult> {\n return new Promise<XlsxExportResult>((resolve, reject) => {\n this.init()\n .then(() => {\n options = { format: 'xlsx', ...options };\n const {\n writeFile,\n utils: { book_new, aoa_to_sheet, book_append_sheet }\n } = XLSX;\n const wb: NzSafeAny = book_new();\n if (Array.isArray(options.sheets)) {\n (options.sheets as XlsxExportSheet[]).forEach((value: XlsxExportSheet, index: number) => {\n const ws: NzSafeAny = aoa_to_sheet(value.data);\n book_append_sheet(wb, ws, value.name || `Sheet${index + 1}`);\n });\n } else {\n wb.SheetNames = Object.keys(options.sheets);\n wb.Sheets = options.sheets;\n }\n\n if (options.callback) options.callback(wb);\n\n const filename = options.filename || `export.${options.format}`;\n writeFile(wb, filename, {\n bookType: options.format,\n bookSST: false,\n type: 'array',\n ...options.opts\n });\n\n resolve({ filename, wb });\n })\n .catch(err => reject(err));\n });\n }\n\n /**\n * 数据转符号名\n * - `1` => `A`\n * - `27` => `AA`\n * - `703` => `AAA`\n */\n numberToSchema(val: number): string {\n const startCode = 'A'.charCodeAt(0);\n let res = '';\n\n do {\n --val;\n res = String.fromCharCode(startCode + (val % 26)) + res;\n val = (val / 26) >> 0;\n } while (val > 0);\n\n return res;\n }\n}\n","import { Directive, Input } from '@angular/core';\n\nimport { XlsxService } from './xlsx.service';\nimport { XlsxExportOptions } from './xlsx.types';\n\n@Directive({\n selector: '[xlsx]',\n exportAs: 'xlsx',\n host: {\n '(click)': '_click()'\n },\n standalone: true\n})\nexport class XlsxDirective {\n @Input('xlsx') data!: XlsxExportOptions;\n\n constructor(private srv: XlsxService) {}\n\n _click(): void {\n this.srv.export(this.data);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { XlsxDirective } from './xlsx.directive';\n\nconst COMPONENTS = [XlsxDirective];\n\n@NgModule({\n imports: [COMPONENTS],\n exports: COMPONENTS\n})\nexport class XlsxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.XlsxService"],"mappings":";;;;;;;;;MAgBa,WAAW,CAAA;AACtB,IAAA,WAAA,CACU,IAAgB,EAChB,IAAiB,EACzB,SAA6B,EACrB,MAAc,EAAA;QAHd,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAa;QAEjB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAEtB,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE;AACjC,YAAA,GAAG,EAAE,yDAAyD;YAC9D,OAAO,EAAE,CAAC,CAAA,iDAAA,CAAmD,CAAC;AAC/D,SAAA,CAAE,CAAC;KACL;IAGO,IAAI,GAAA;QACV,OAAO,OAAO,IAAI,KAAK,WAAW;AAChC,cAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;cACnB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAQ,CAAC,CAAC,CAAC;KAC/D;AAGO,IAAA,IAAI,CAAC,IAAe,EAAA;QAC1B,MAAM,EACJ,IAAI,EACJ,KAAK,EAAE,EAAE,aAAa,EAAE,EACzB,GAAG,IAAI,CAAC;QACT,MAAM,GAAG,GAAc,EAAE,CAAC;AAC1B,QAAA,MAAM,GAAG,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,IAAI,GAAG,OAAO,CAAC;AACnB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YAChB,IAAI;gBACF,IAAI,GAAG,OAAO,CAAC,KAAK,C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;AACrB,oBAAA,OAAO,EAAE,UAAU;AACpB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"xlsx.mjs","sources":["../../../../packages/abc/xlsx/xlsx.service.ts","../../../../packages/abc/xlsx/xlsx.directive.ts","../../../../packages/abc/xlsx/xlsx.module.ts","../../../../packages/abc/xlsx/xlsx.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, NgZone, inject } from '@angular/core';\n\nimport isUtf8 from 'isutf8';\n\nimport { AlainConfigService, AlainXlsxConfig } from '@delon/util/config';\nimport { ZoneOutside } from '@delon/util/decorator';\nimport { LazyResult, LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { XlsxExportOptions, XlsxExportResult, XlsxExportSheet } from './xlsx.types';\n\ndeclare var XLSX: NzSafeAny;\ndeclare var cptable: NzSafeAny;\n\n@Injectable({ providedIn: 'root' })\nexport class XlsxService {\n private readonly http = inject(HttpClient);\n private readonly lazy = inject(LazyService);\n private readonly ngZone = inject(NgZone);\n\n private cog: AlainXlsxConfig;\n\n constructor(configSrv: AlainConfigService) {\n this.cog = configSrv.merge('xlsx', {\n url: 'https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js',\n modules: [`https://cdn.jsdelivr.net/npm/xlsx/dist/cpexcel.js`]\n })!;\n }\n\n private init(): Promise<LazyResult[]> {\n return typeof XLSX !== 'undefined'\n ? Promise.resolve([])\n : this.lazy.load([this.cog.url!].concat(this.cog.modules!));\n }\n\n @ZoneOutside()\n private read(data: NzSafeAny): { [key: string]: NzSafeAny[][] } {\n const {\n read,\n utils: { sheet_to_json }\n } = XLSX;\n const ret: NzSafeAny = {};\n const buf = new Uint8Array(data);\n let type = 'array';\n if (!isUtf8(buf)) {\n try {\n data = cptable.utils.decode(936, buf);\n type = 'string';\n } catch {}\n }\n const wb = read(data, { type });\n wb.SheetNames.forEach((name: string) => {\n const sheet: NzSafeAny = wb.Sheets[name];\n ret[name] = sheet_to_json(sheet, { header: 1 });\n });\n return ret;\n }\n\n /**\n * 导入Excel并输出JSON,支持 `<input type=\"file\">`、URL 形式\n */\n import(fileOrUrl: File | string): Promise<{ [key: string]: NzSafeAny[][] }> {\n return new Promise<{ [key: string]: NzSafeAny[][] }>((resolve, reject) => {\n const r = (data: NzSafeAny): void => this.ngZone.run(() => resolve(this.read(data)));\n this.init()\n .then(() => {\n // from url\n if (typeof fileOrUrl === 'string') {\n this.http.request('GET', fileOrUrl, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => r(new Uint8Array(res)),\n error: (err: NzSafeAny) => reject(err)\n });\n return;\n }\n // from file\n const reader: FileReader = new FileReader();\n reader.onload = (e: NzSafeAny) => r(e.target.result);\n reader.onerror = (e: NzSafeAny) => reject(e);\n reader.readAsArrayBuffer(fileOrUrl);\n })\n .catch(() => reject(`Unable to load xlsx.js`));\n });\n }\n\n @ZoneOutside()\n async export(options: XlsxExportOptions): Promise<XlsxExportResult> {\n return new Promise<XlsxExportResult>((resolve, reject) => {\n this.init()\n .then(() => {\n options = { format: 'xlsx', ...options };\n const {\n writeFile,\n utils: { book_new, aoa_to_sheet, book_append_sheet }\n } = XLSX;\n const wb: NzSafeAny = book_new();\n if (Array.isArray(options.sheets)) {\n (options.sheets as XlsxExportSheet[]).forEach((value: XlsxExportSheet, index: number) => {\n const ws: NzSafeAny = aoa_to_sheet(value.data);\n book_append_sheet(wb, ws, value.name || `Sheet${index + 1}`);\n });\n } else {\n wb.SheetNames = Object.keys(options.sheets);\n wb.Sheets = options.sheets;\n }\n\n if (options.callback) options.callback(wb);\n\n const filename = options.filename || `export.${options.format}`;\n writeFile(wb, filename, {\n bookType: options.format,\n bookSST: false,\n type: 'array',\n ...options.opts\n });\n\n resolve({ filename, wb });\n })\n .catch(err => reject(err));\n });\n }\n\n /**\n * 数据转符号名\n * - `1` => `A`\n * - `27` => `AA`\n * - `703` => `AAA`\n */\n numberToSchema(val: number): string {\n const startCode = 'A'.charCodeAt(0);\n let res = '';\n\n do {\n --val;\n res = String.fromCharCode(startCode + (val % 26)) + res;\n val = (val / 26) >> 0;\n } while (val > 0);\n\n return res;\n }\n}\n","import { Directive, Input, inject } from '@angular/core';\n\nimport { XlsxService } from './xlsx.service';\nimport { XlsxExportOptions } from './xlsx.types';\n\n@Directive({\n selector: '[xlsx]',\n exportAs: 'xlsx',\n host: {\n '(click)': '_click()'\n },\n standalone: true\n})\nexport class XlsxDirective {\n private readonly srv = inject(XlsxService);\n\n @Input('xlsx') data!: XlsxExportOptions;\n\n _click(): void {\n this.srv.export(this.data);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { XlsxDirective } from './xlsx.directive';\n\nconst COMPONENTS = [XlsxDirective];\n\n@NgModule({\n imports: [COMPONENTS],\n exports: COMPONENTS\n})\nexport class XlsxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAgBa,WAAW,CAAA;AAOtB,IAAA,WAAA,CAAY,SAA6B,EAAA;AANxB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC1B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAC3B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAKvC,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE;AACjC,YAAA,GAAG,EAAE,yDAAyD;YAC9D,OAAO,EAAE,CAAC,CAAA,iDAAA,CAAmD,CAAC;AAC/D,SAAA,CAAE,CAAC;KACL;IAEO,IAAI,GAAA;QACV,OAAO,OAAO,IAAI,KAAK,WAAW;AAChC,cAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;cACnB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,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AAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,UAAU,CAAC;AACrB,oBAAA,OAAO,EAAE,UAAU;AACpB,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
package/fesm2022/zip.mjs CHANGED
@@ -1,17 +1,17 @@
1
1
  import { __decorate } from 'tslib';
2
+ import { HttpClient } from '@angular/common/http';
2
3
  import * as i0 from '@angular/core';
3
- import { Injectable } from '@angular/core';
4
+ import { inject, NgZone, Injectable } from '@angular/core';
4
5
  import { saveAs } from 'file-saver';
5
6
  import { ZoneOutside } from '@delon/util/decorator';
6
- import * as i1 from '@angular/common/http';
7
- import * as i2 from '@delon/util/other';
8
- import * as i3 from '@delon/util/config';
7
+ import { LazyService } from '@delon/util/other';
8
+ import * as i1 from '@delon/util/config';
9
9
 
10
10
  class ZipService {
11
- constructor(http, lazy, configSrv, ngZone) {
12
- this.http = http;
13
- this.lazy = lazy;
14
- this.ngZone = ngZone;
11
+ constructor(configSrv) {
12
+ this.http = inject(HttpClient);
13
+ this.lazy = inject(LazyService);
14
+ this.ngZone = inject(NgZone);
15
15
  this.cog = configSrv.merge('zip', {
16
16
  url: 'https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js',
17
17
  utils: []
@@ -104,16 +104,16 @@ class ZipService {
104
104
  });
105
105
  });
106
106
  }
107
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: ZipService, deps: [{ token: i1.HttpClient }, { token: i2.LazyService }, { token: i3.AlainConfigService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
108
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: ZipService, providedIn: 'root' }); }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: ZipService, deps: [{ token: i1.AlainConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
108
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: ZipService, providedIn: 'root' }); }
109
109
  }
110
110
  __decorate([
111
111
  ZoneOutside()
112
112
  ], ZipService.prototype, "read", null);
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: ZipService, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.0", ngImport: i0, type: ZipService, decorators: [{
114
114
  type: Injectable,
115
115
  args: [{ providedIn: 'root' }]
116
- }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.LazyService }, { type: i3.AlainConfigService }, { type: i0.NgZone }], propDecorators: { read: [] } });
116
+ }], ctorParameters: () => [{ type: i1.AlainConfigService }], propDecorators: { read: [] } });
117
117
 
118
118
  /**
119
119
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"zip.mjs","sources":["../../../../packages/abc/zip/zip.service.ts","../../../../packages/abc/zip/zip.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, NgZone } from '@angular/core';\n\nimport { saveAs } from 'file-saver';\nimport type jsZipType from 'jszip';\n\nimport { AlainConfigService, AlainZipConfig } from '@delon/util/config';\nimport { ZoneOutside } from '@delon/util/decorator';\nimport { LazyResult, LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { ZipSaveOptions } from './zip.types';\n\ndeclare var JSZip: jsZipType;\n\n@Injectable({ providedIn: 'root' })\nexport class ZipService {\n private cog: AlainZipConfig;\n\n constructor(\n private http: HttpClient,\n private lazy: LazyService,\n configSrv: AlainConfigService,\n private ngZone: NgZone\n ) {\n this.cog = configSrv.merge('zip', {\n url: 'https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js',\n utils: []\n })!;\n }\n\n private init(): Promise<LazyResult[]> {\n return this.lazy.load([this.cog.url!].concat(this.cog.utils!));\n }\n\n private check(zip?: jsZipType | null): void {\n if (!zip) throw new Error('get instance via `ZipService.create()`');\n }\n\n /** 解压 */\n @ZoneOutside()\n read(fileOrUrl: File | string, options?: jsZipType.JSZipLoadOptions): Promise<jsZipType> {\n return new Promise<jsZipType>((resolve, reject) => {\n const resolveCallback = (data: jsZipType): void => {\n this.ngZone.run(() => resolve(data));\n };\n this.init().then(() => {\n // from url\n if (typeof fileOrUrl === 'string') {\n this.http.request('GET', fileOrUrl, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => {\n JSZip.loadAsync(res, options).then((ret: jsZipType) => resolveCallback(ret));\n },\n error: err => {\n reject(err);\n }\n });\n return;\n }\n // from file\n const reader: FileReader = new FileReader();\n reader.onload = (e: ProgressEvent<FileReader>) => {\n JSZip.loadAsync(e.target!.result as ArrayBuffer, options).then((ret: jsZipType) => resolveCallback(ret));\n };\n reader.readAsBinaryString(fileOrUrl as File);\n });\n });\n }\n\n /** 创建 Zip 实例,用于创建压缩文件 */\n create(): Promise<jsZipType | null> {\n return new Promise<jsZipType | null>(resolve => {\n this.init()\n .then(() => {\n const zipFile = new JSZip();\n resolve(zipFile);\n })\n .catch(() => resolve(null));\n });\n }\n\n /**\n * 下载URL资源并写入 zip\n *\n * @param zip Zip 实例\n * @param path Zip 路径,例如: `text.txt`、`txt/hi.txt`\n * @param url URL 地址\n */\n pushUrl(zip: jsZipType | null, path: string, url: string): Promise<void> {\n this.check(zip);\n return new Promise<void>((resolve, reject) => {\n this.http.request('GET', url, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => {\n zip!.file(path, res);\n resolve();\n },\n error: error => {\n reject({ url, error });\n }\n });\n });\n }\n\n /**\n * 保存Zip并执行打开保存对话框\n *\n * @param zip zip 对象,务必通过 `create()` 构建\n * @param options 额外参数,\n */\n save(zip: jsZipType | null, options?: ZipSaveOptions): Promise<void> {\n this.check(zip);\n const opt = { filename: 'download.zip', ...options } as ZipSaveOptions;\n return new Promise<void>((resolve, reject) => {\n zip!.generateAsync<'blob'>({ type: 'blob', ...opt.options } as NzSafeAny, opt.update as NzSafeAny).then(\n data => {\n if (opt.callback) opt.callback(data);\n saveAs(data, opt.filename);\n resolve();\n },\n err => {\n reject(err);\n }\n );\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAgBa,UAAU,CAAA;AAGrB,IAAA,WAAA,CACU,IAAgB,EAChB,IAAiB,EACzB,SAA6B,EACrB,MAAc,EAAA;QAHd,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAa;QAEjB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAEtB,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE;AAChC,YAAA,GAAG,EAAE,wDAAwD;AAC7D,YAAA,KAAK,EAAE,EAAE;AACV,SAAA,CAAE,CAAC;KACL;IAEO,IAAI,GAAA;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAM,CAAC,CAAC,CAAC;KAChE;AAEO,IAAA,KAAK,CAAC,GAAsB,EAAA;AAClC,QAAA,IAAI,CAAC,GAAG;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KACrE;;IAID,IAAI,CAAC,SAAwB,EAAE,OAAoC,EAAA;QACjE,OAAO,IAAI,OAAO,CAAY,CAAC,OAAO,EAAE,MAAM,KAAI;AAChD,YAAA,MAAM,eAAe,GAAG,CAAC,IAAe,KAAU;AAChD,gBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,C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AQ,CAAC,CAAC;AAC3B,gBAAA,OAAO,EAAE,CAAC;aACX,EACD,GAAG,IAAG;gBACJ,MAAM,CAAC,GAAG,CAAC,CAAC;AACd,aAAC,CACF,CAAC;AACJ,SAAC,CAAC,CAAC;KACJ;8GA5GU,UAAU,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,UAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,cADG,MAAM,EAAA,CAAA,CAAA,EAAA;;AA0B9B,UAAA,CAAA;AADC,IAAA,WAAW,EAAE;AA2Bb,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,MAAA,EAAA,IAAA,CAAA,CAAA;2FAnDU,UAAU,EAAA,UAAA,EAAA,CAAA;kBADtB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;+JA0BhC,IAAI,EAAA,EAAA,EAAA,EAAA,CAAA;;ACzCN;;AAEG;;;;"}
1
+ {"version":3,"file":"zip.mjs","sources":["../../../../packages/abc/zip/zip.service.ts","../../../../packages/abc/zip/zip.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, NgZone, inject } from '@angular/core';\n\nimport { saveAs } from 'file-saver';\nimport type jsZipType from 'jszip';\n\nimport { AlainConfigService, AlainZipConfig } from '@delon/util/config';\nimport { ZoneOutside } from '@delon/util/decorator';\nimport { LazyResult, LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { ZipSaveOptions } from './zip.types';\n\ndeclare var JSZip: jsZipType;\n\n@Injectable({ providedIn: 'root' })\nexport class ZipService {\n private readonly http = inject(HttpClient);\n private readonly lazy = inject(LazyService);\n private readonly ngZone = inject(NgZone);\n\n private cog: AlainZipConfig;\n\n constructor(configSrv: AlainConfigService) {\n this.cog = configSrv.merge('zip', {\n url: 'https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js',\n utils: []\n })!;\n }\n\n private init(): Promise<LazyResult[]> {\n return this.lazy.load([this.cog.url!].concat(this.cog.utils!));\n }\n\n private check(zip?: jsZipType | null): void {\n if (!zip) throw new Error('get instance via `ZipService.create()`');\n }\n\n /** 解压 */\n @ZoneOutside()\n read(fileOrUrl: File | string, options?: jsZipType.JSZipLoadOptions): Promise<jsZipType> {\n return new Promise<jsZipType>((resolve, reject) => {\n const resolveCallback = (data: jsZipType): void => {\n this.ngZone.run(() => resolve(data));\n };\n this.init().then(() => {\n // from url\n if (typeof fileOrUrl === 'string') {\n this.http.request('GET', fileOrUrl, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => {\n JSZip.loadAsync(res, options).then((ret: jsZipType) => resolveCallback(ret));\n },\n error: err => {\n reject(err);\n }\n });\n return;\n }\n // from file\n const reader: FileReader = new FileReader();\n reader.onload = (e: ProgressEvent<FileReader>) => {\n JSZip.loadAsync(e.target!.result as ArrayBuffer, options).then((ret: jsZipType) => resolveCallback(ret));\n };\n reader.readAsBinaryString(fileOrUrl as File);\n });\n });\n }\n\n /** 创建 Zip 实例,用于创建压缩文件 */\n create(): Promise<jsZipType | null> {\n return new Promise<jsZipType | null>(resolve => {\n this.init()\n .then(() => {\n const zipFile = new JSZip();\n resolve(zipFile);\n })\n .catch(() => resolve(null));\n });\n }\n\n /**\n * 下载URL资源并写入 zip\n *\n * @param zip Zip 实例\n * @param path Zip 路径,例如: `text.txt`、`txt/hi.txt`\n * @param url URL 地址\n */\n pushUrl(zip: jsZipType | null, path: string, url: string): Promise<void> {\n this.check(zip);\n return new Promise<void>((resolve, reject) => {\n this.http.request('GET', url, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => {\n zip!.file(path, res);\n resolve();\n },\n error: error => {\n reject({ url, error });\n }\n });\n });\n }\n\n /**\n * 保存Zip并执行打开保存对话框\n *\n * @param zip zip 对象,务必通过 `create()` 构建\n * @param options 额外参数,\n */\n save(zip: jsZipType | null, options?: ZipSaveOptions): Promise<void> {\n this.check(zip);\n const opt = { filename: 'download.zip', ...options } as ZipSaveOptions;\n return new Promise<void>((resolve, reject) => {\n zip!.generateAsync<'blob'>({ type: 'blob', ...opt.options } as NzSafeAny, opt.update as NzSafeAny).then(\n data => {\n if (opt.callback) opt.callback(data);\n saveAs(data, opt.filename);\n resolve();\n },\n err => {\n reject(err);\n }\n );\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAgBa,UAAU,CAAA;AAOrB,IAAA,WAAA,CAAY,SAA6B,EAAA;AANxB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC1B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;AAC3B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QAKvC,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE;AAChC,YAAA,GAAG,EAAE,wDAAwD;AAC7D,YAAA,KAAK,EAAE,EAAE;AACV,SAAA,CAAE,CAAC;KACL;IAEO,IAAI,GAAA;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAM,CAAC,CAAC,CAAC;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ular/core';
2
- import { BooleanInput } from '@delon/util/decorator';
3
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
1
+ import { OnDestroy, OnInit, TemplateRef } from '@angular/core';
4
2
  import * as i0 from "@angular/core";
5
3
  export declare class FooterToolbarComponent implements OnInit, OnDestroy {
6
- private el;
7
- private renderer;
8
- private doc;
9
- static ngAcceptInputType_errorCollect: BooleanInput;
4
+ private readonly el;
5
+ private readonly renderer;
6
+ private readonly bodyCls;
10
7
  errorCollect: boolean;
11
8
  extra?: string | TemplateRef<void>;
12
- constructor(el: ElementRef, renderer: Renderer2, doc: NzSafeAny);
13
- private get bodyCls();
14
9
  ngOnInit(): void;
15
10
  ngOnDestroy(): void;
16
11
  static ɵfac: i0.ɵɵFactoryDeclaration<FooterToolbarComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<FooterToolbarComponent, "footer-toolbar", ["footerToolbar"], { "errorCollect": { "alias": "errorCollect"; "required": false; }; "extra": { "alias": "extra"; "required": false; }; }, {}, never, ["*"], false, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<FooterToolbarComponent, "footer-toolbar", ["footerToolbar"], { "errorCollect": { "alias": "errorCollect"; "required": false; }; "extra": { "alias": "extra"; "required": false; }; }, {}, never, ["*"], true, never>;
13
+ static ngAcceptInputType_errorCollect: unknown;
18
14
  }
@@ -1,10 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./footer-toolbar.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@delon/abc/error-collect";
5
- import * as i4 from "ng-zorro-antd/core/outlet";
2
+ import * as i1 from "@angular/common";
3
+ import * as i2 from "@delon/abc/error-collect";
4
+ import * as i3 from "ng-zorro-antd/core/outlet";
5
+ import * as i4 from "./footer-toolbar.component";
6
6
  export declare class FooterToolbarModule {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<FooterToolbarModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<FooterToolbarModule, [typeof i1.FooterToolbarComponent], [typeof i2.CommonModule, typeof i3.ErrorCollectModule, typeof i4.NzOutletModule], [typeof i1.FooterToolbarComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FooterToolbarModule, never, [typeof i1.CommonModule, typeof i2.ErrorCollectModule, typeof i3.NzOutletModule, typeof i4.FooterToolbarComponent], [typeof i4.FooterToolbarComponent]>;
9
9
  static ɵinj: i0.ɵɵInjectorDeclaration<FooterToolbarModule>;
10
10
  }
@@ -1,9 +1,7 @@
1
- import { FullContentComponent } from './full-content.component';
2
1
  import * as i0 from "@angular/core";
3
2
  export declare class FullContentToggleDirective {
4
- private parent;
5
- constructor(parent: FullContentComponent);
3
+ private readonly parent;
6
4
  _click(): void;
7
5
  static ɵfac: i0.ɵɵFactoryDeclaration<FullContentToggleDirective, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<FullContentToggleDirective, "[full-toggle]", ["fullToggle"], {}, {}, never, never, false, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FullContentToggleDirective, "[full-toggle]", ["fullToggle"], {}, {}, never, never, true, never>;
9
7
  }
@@ -1,28 +1,20 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
2
- import { Router } from '@angular/router';
3
- import { BooleanInput, NumberInput } from '@delon/util/decorator';
4
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
5
- import { FullContentService } from './full-content.service';
1
+ import { AfterViewInit, EventEmitter, OnChanges, OnDestroy, OnInit } from '@angular/core';
6
2
  import * as i0 from "@angular/core";
7
3
  export declare class FullContentComponent implements AfterViewInit, OnInit, OnChanges, OnDestroy {
8
- private el;
9
- private cdr;
10
- private srv;
11
- private router;
12
- private doc;
13
- static ngAcceptInputType_fullscreen: BooleanInput;
14
- static ngAcceptInputType_hideTitle: BooleanInput;
15
- static ngAcceptInputType_padding: NumberInput;
4
+ private readonly destroy$;
5
+ private readonly el;
6
+ private readonly cdr;
7
+ private readonly srv;
8
+ private readonly router;
9
+ private readonly doc;
16
10
  private bodyEl;
17
11
  private inited;
18
12
  private id;
19
- private destroy$;
20
13
  _height: number;
21
14
  fullscreen?: boolean;
22
15
  hideTitle: boolean;
23
16
  padding: number;
24
17
  readonly fullscreenChange: EventEmitter<boolean>;
25
- constructor(el: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, srv: FullContentService, router: Router, doc: NzSafeAny);
26
18
  private updateCls;
27
19
  private update;
28
20
  private updateHeight;
@@ -33,5 +25,8 @@ export declare class FullContentComponent implements AfterViewInit, OnInit, OnCh
33
25
  ngOnChanges(): void;
34
26
  ngOnDestroy(): void;
35
27
  static ɵfac: i0.ɵɵFactoryDeclaration<FullContentComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<FullContentComponent, "full-content", ["fullContent"], { "fullscreen": { "alias": "fullscreen"; "required": false; }; "hideTitle": { "alias": "hideTitle"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; }, { "fullscreenChange": "fullscreenChange"; }, never, ["*"], false, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<FullContentComponent, "full-content", ["fullContent"], { "fullscreen": { "alias": "fullscreen"; "required": false; }; "hideTitle": { "alias": "hideTitle"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; }, { "fullscreenChange": "fullscreenChange"; }, never, ["*"], true, never>;
29
+ static ngAcceptInputType_fullscreen: unknown;
30
+ static ngAcceptInputType_hideTitle: unknown;
31
+ static ngAcceptInputType_padding: unknown;
37
32
  }
@@ -1,9 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./full-content.component";
3
- import * as i2 from "./full-content-toggle.directive";
4
- import * as i3 from "@angular/common";
2
+ import * as i1 from "@angular/common";
3
+ import * as i2 from "./full-content.component";
4
+ import * as i3 from "./full-content-toggle.directive";
5
5
  export declare class FullContentModule {
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<FullContentModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<FullContentModule, [typeof i1.FullContentComponent, typeof i2.FullContentToggleDirective], [typeof i3.CommonModule], [typeof i1.FullContentComponent, typeof i2.FullContentToggleDirective]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FullContentModule, never, [typeof i1.CommonModule, typeof i2.FullContentComponent, typeof i3.FullContentToggleDirective], [typeof i2.FullContentComponent, typeof i3.FullContentToggleDirective]>;
8
8
  static ɵinj: i0.ɵɵInjectorDeclaration<FullContentModule>;
9
9
  }
@@ -1,11 +1,10 @@
1
1
  import { TemplateRef } from '@angular/core';
2
- import { BooleanInput } from '@delon/util/decorator';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class GlobalFooterItemComponent {
5
- static ngAcceptInputType_blankTarget: BooleanInput;
6
4
  host: TemplateRef<void>;
7
5
  href?: string;
8
6
  blankTarget?: boolean;
9
7
  static ɵfac: i0.ɵɵFactoryDeclaration<GlobalFooterItemComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<GlobalFooterItemComponent, "global-footer-item", ["globalFooterItem"], { "href": { "alias": "href"; "required": false; }; "blankTarget": { "alias": "blankTarget"; "required": false; }; }, {}, never, ["*"], false, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<GlobalFooterItemComponent, "global-footer-item", ["globalFooterItem"], { "href": { "alias": "href"; "required": false; }; "blankTarget": { "alias": "blankTarget"; "required": false; }; }, {}, never, ["*"], true, never>;
9
+ static ngAcceptInputType_blankTarget: unknown;
11
10
  }
@@ -1,26 +1,22 @@
1
- import { Direction, Directionality } from '@angular/cdk/bidi';
2
- import { ChangeDetectorRef, OnInit, QueryList } from '@angular/core';
3
- import { DomSanitizer } from '@angular/platform-browser';
4
- import { Router } from '@angular/router';
5
- import type { NzSafeAny } from 'ng-zorro-antd/core/types';
1
+ import { Direction } from '@angular/cdk/bidi';
2
+ import { OnInit, QueryList } from '@angular/core';
6
3
  import { GlobalFooterItemComponent } from './global-footer-item.component';
7
4
  import { GlobalFooterLink } from './global-footer.types';
8
5
  import * as i0 from "@angular/core";
9
6
  export declare class GlobalFooterComponent implements OnInit {
10
- private router;
11
- private win;
12
- private dom;
13
- private directionality;
14
- private cdr;
15
- private dir$;
7
+ private readonly router;
8
+ private readonly win;
9
+ private readonly dom;
10
+ private readonly directionality;
11
+ private readonly cdr;
12
+ private readonly destroy$;
16
13
  private _links;
17
- dir: Direction;
14
+ dir?: Direction;
18
15
  set links(val: GlobalFooterLink[]);
19
16
  get links(): GlobalFooterLink[];
20
- items: QueryList<GlobalFooterItemComponent>;
21
- constructor(router: Router, win: NzSafeAny, dom: DomSanitizer, directionality: Directionality, cdr: ChangeDetectorRef);
17
+ readonly items: QueryList<GlobalFooterItemComponent>;
22
18
  to(item: GlobalFooterLink | GlobalFooterItemComponent): void;
23
19
  ngOnInit(): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<GlobalFooterComponent, [null, null, null, { optional: true; }, null]>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<GlobalFooterComponent, "global-footer", ["globalFooter"], { "links": { "alias": "links"; "required": false; }; }, {}, ["items"], ["*"], false, never>;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<GlobalFooterComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<GlobalFooterComponent, "global-footer", ["globalFooter"], { "links": { "alias": "links"; "required": false; }; }, {}, ["items"], ["*"], true, never>;
26
22
  }
@@ -1,10 +1,10 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./global-footer.component";
3
- import * as i2 from "./global-footer-item.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/router";
2
+ import * as i1 from "@angular/common";
3
+ import * as i2 from "@angular/router";
4
+ import * as i3 from "./global-footer.component";
5
+ import * as i4 from "./global-footer-item.component";
6
6
  export declare class GlobalFooterModule {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<GlobalFooterModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<GlobalFooterModule, [typeof i1.GlobalFooterComponent, typeof i2.GlobalFooterItemComponent], [typeof i3.CommonModule, typeof i4.RouterModule], [typeof i1.GlobalFooterComponent, typeof i2.GlobalFooterItemComponent]>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<GlobalFooterModule, never, [typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.GlobalFooterComponent, typeof i4.GlobalFooterItemComponent], [typeof i3.GlobalFooterComponent, typeof i4.GlobalFooterItemComponent]>;
9
9
  static ɵinj: i0.ɵɵInjectorDeclaration<GlobalFooterModule>;
10
10
  }
@@ -1,17 +1,15 @@
1
- import { Platform } from '@angular/cdk/platform';
2
- import { ElementRef, NgZone, OnDestroy } from '@angular/core';
1
+ import { OnDestroy } from '@angular/core';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class HotkeyDirective implements OnDestroy {
5
- private el;
6
- private ngZone;
7
- private platform;
4
+ private readonly el;
5
+ private readonly ngZone;
6
+ private readonly platform;
8
7
  /**
9
8
  * Specify [hotkey format](https://github.com/github/hotkey#hotkey-string-format)
10
9
  *
11
10
  * 指定[热键格式](https://github.com/github/hotkey#hotkey-string-format)
12
11
  */
13
12
  set hotkey(key: string);
14
- constructor(el: ElementRef<HTMLElement>, ngZone: NgZone, platform: Platform);
15
13
  ngOnDestroy(): void;
16
14
  static ɵfac: i0.ɵɵFactoryDeclaration<HotkeyDirective, never>;
17
15
  static ɵdir: i0.ɵɵDirectiveDeclaration<HotkeyDirective, "[hotkey]", never, { "hotkey": { "alias": "hotkey"; "required": false; }; }, {}, never, never, true, never>;
@@ -3,9 +3,9 @@ import { LoadingCustom, LoadingIcon, LoadingShowOptions } from './loading.types'
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class LoadingDefaultComponent {
5
5
  options: LoadingShowOptions;
6
- dir: Direction;
6
+ dir?: Direction;
7
7
  get icon(): LoadingIcon;
8
8
  get custom(): LoadingCustom;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<LoadingDefaultComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<LoadingDefaultComponent, "loading-default", never, {}, {}, never, never, false, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadingDefaultComponent, "loading-default", never, {}, {}, never, never, true, never>;
11
11
  }
@@ -1,12 +1,12 @@
1
1
  import * as i0 from "@angular/core";
2
- import * as i1 from "./loading.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/cdk/overlay";
5
- import * as i4 from "@angular/cdk/portal";
6
- import * as i5 from "ng-zorro-antd/icon";
7
- import * as i6 from "ng-zorro-antd/spin";
2
+ import * as i1 from "@angular/common";
3
+ import * as i2 from "@angular/cdk/overlay";
4
+ import * as i3 from "@angular/cdk/portal";
5
+ import * as i4 from "ng-zorro-antd/icon";
6
+ import * as i5 from "ng-zorro-antd/spin";
7
+ import * as i6 from "./loading.component";
8
8
  export declare class LoadingModule {
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<LoadingModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<LoadingModule, [typeof i1.LoadingDefaultComponent], [typeof i2.CommonModule, typeof i3.OverlayModule, typeof i4.PortalModule, typeof i5.NzIconModule, typeof i6.NzSpinModule], [typeof i1.LoadingDefaultComponent]>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LoadingModule, never, [typeof i1.CommonModule, typeof i2.OverlayModule, typeof i3.PortalModule, typeof i4.NzIconModule, typeof i5.NzSpinModule, typeof i6.LoadingDefaultComponent], [typeof i6.LoadingDefaultComponent]>;
11
11
  static ɵinj: i0.ɵɵInjectorDeclaration<LoadingModule>;
12
12
  }
@@ -1,14 +1,11 @@
1
- import { Directionality } from '@angular/cdk/bidi';
2
- import { Overlay } from '@angular/cdk/overlay';
3
1
  import { OnDestroy } from '@angular/core';
4
- import { AlainConfigService } from '@delon/util/config';
5
2
  import { LoadingDefaultComponent } from './loading.component';
6
3
  import { LoadingShowOptions } from './loading.types';
7
4
  import * as i0 from "@angular/core";
8
5
  export declare class LoadingService implements OnDestroy {
9
- private overlay;
10
- private configSrv;
11
- private directionality;
6
+ private readonly overlay;
7
+ private readonly configSrv;
8
+ private readonly directionality;
12
9
  private _overlayRef?;
13
10
  private compRef;
14
11
  private opt;
@@ -16,7 +13,7 @@ export declare class LoadingService implements OnDestroy {
16
13
  private n$;
17
14
  private loading$;
18
15
  get instance(): LoadingDefaultComponent | null;
19
- constructor(overlay: Overlay, configSrv: AlainConfigService, directionality: Directionality);
16
+ constructor();
20
17
  private create;
21
18
  /**
22
19
  * Open a new loading indicator
@@ -32,6 +29,6 @@ export declare class LoadingService implements OnDestroy {
32
29
  */
33
30
  close(): void;
34
31
  ngOnDestroy(): void;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<LoadingService, [null, null, { optional: true; }]>;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingService, never>;
36
33
  static ɵprov: i0.ɵɵInjectableDeclaration<LoadingService>;
37
34
  }
@@ -1,12 +1,11 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { AlainConfigService, AlainLodopConfig } from '@delon/util/config';
4
- import { LazyService } from '@delon/util/other';
5
4
  import type { NzSafeAny } from 'ng-zorro-antd/core/types';
6
5
  import { LodopPrintResult, LodopResult } from './lodop.types';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class LodopService implements OnDestroy {
9
- private scriptSrv;
8
+ private readonly scriptSrv;
10
9
  private defaultConfig;
11
10
  private _cog;
12
11
  private pending;
@@ -14,7 +13,7 @@ export declare class LodopService implements OnDestroy {
14
13
  private _init;
15
14
  private _events;
16
15
  private printBuffer;
17
- constructor(scriptSrv: LazyService, configSrv: AlainConfigService);
16
+ constructor(configSrv: AlainConfigService);
18
17
  /**
19
18
  * Get or set configuration, **Note:** Resetting will invert and reload script resources
20
19
  *