@delon/abc 19.1.0 → 20.0.0-beta.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 (246) hide show
  1. package/auto-focus/index.d.ts +19 -2
  2. package/cell/index.d.ts +316 -6
  3. package/cell/style/index.less +1 -1
  4. package/count-down/index.d.ts +26 -5
  5. package/date-picker/index.d.ts +51 -5
  6. package/down-file/index.d.ts +34 -5
  7. package/ellipsis/index.d.ts +55 -5
  8. package/error-collect/index.d.ts +35 -5
  9. package/exception/index.d.ts +45 -5
  10. package/fesm2022/auto-focus.mjs +7 -7
  11. package/fesm2022/cell.mjs +14 -15
  12. package/fesm2022/cell.mjs.map +1 -1
  13. package/fesm2022/chart-observer-size.mjs +11 -11
  14. package/fesm2022/count-down.mjs +8 -9
  15. package/fesm2022/count-down.mjs.map +1 -1
  16. package/fesm2022/date-picker.mjs +16 -15
  17. package/fesm2022/date-picker.mjs.map +1 -1
  18. package/fesm2022/down-file.mjs +8 -8
  19. package/fesm2022/ellipsis.mjs +9 -9
  20. package/fesm2022/ellipsis.mjs.map +1 -1
  21. package/fesm2022/error-collect.mjs +15 -15
  22. package/fesm2022/error-collect.mjs.map +1 -1
  23. package/fesm2022/exception.mjs +94 -78
  24. package/fesm2022/exception.mjs.map +1 -1
  25. package/fesm2022/footer-toolbar.mjs +44 -22
  26. package/fesm2022/footer-toolbar.mjs.map +1 -1
  27. package/fesm2022/full-content.mjs +25 -38
  28. package/fesm2022/full-content.mjs.map +1 -1
  29. package/fesm2022/global-footer.mjs +79 -60
  30. package/fesm2022/global-footer.mjs.map +1 -1
  31. package/fesm2022/hotkey.mjs +8 -8
  32. package/fesm2022/loading.mjs +12 -12
  33. package/fesm2022/loading.mjs.map +1 -1
  34. package/fesm2022/lodop.mjs +12 -11
  35. package/fesm2022/lodop.mjs.map +1 -1
  36. package/fesm2022/media.mjs +12 -13
  37. package/fesm2022/media.mjs.map +1 -1
  38. package/fesm2022/notice-icon.mjs +19 -29
  39. package/fesm2022/notice-icon.mjs.map +1 -1
  40. package/fesm2022/onboarding.mjs +14 -14
  41. package/fesm2022/onboarding.mjs.map +1 -1
  42. package/fesm2022/page-header.mjs +22 -27
  43. package/fesm2022/page-header.mjs.map +1 -1
  44. package/fesm2022/pdf.mjs +13 -13
  45. package/fesm2022/pdf.mjs.map +1 -1
  46. package/fesm2022/quick-menu.mjs +9 -9
  47. package/fesm2022/quick-menu.mjs.map +1 -1
  48. package/fesm2022/reuse-tab.mjs +32 -38
  49. package/fesm2022/reuse-tab.mjs.map +1 -1
  50. package/fesm2022/se.mjs +20 -21
  51. package/fesm2022/se.mjs.map +1 -1
  52. package/fesm2022/sg.mjs +17 -18
  53. package/fesm2022/sg.mjs.map +1 -1
  54. package/fesm2022/st.mjs +84 -87
  55. package/fesm2022/st.mjs.map +1 -1
  56. package/fesm2022/sv.mjs +23 -25
  57. package/fesm2022/sv.mjs.map +1 -1
  58. package/fesm2022/tag-select.mjs +13 -29
  59. package/fesm2022/tag-select.mjs.map +1 -1
  60. package/fesm2022/xlsx.mjs +16 -15
  61. package/fesm2022/xlsx.mjs.map +1 -1
  62. package/fesm2022/zip.mjs +8 -7
  63. package/fesm2022/zip.mjs.map +1 -1
  64. package/footer-toolbar/index.d.ts +23 -5
  65. package/footer-toolbar/style/index.less +1 -1
  66. package/full-content/index.d.ts +55 -5
  67. package/global-footer/index.d.ts +44 -5
  68. package/hotkey/index.d.ts +25 -5
  69. package/index.d.ts +2 -5
  70. package/index.less +0 -2
  71. package/loading/index.d.ts +93 -5
  72. package/lodop/index.d.ts +277 -5
  73. package/media/index.d.ts +61 -5
  74. package/notice-icon/index.d.ts +90 -5
  75. package/notice-icon/style/index.less +2 -2
  76. package/observers/index.d.ts +34 -5
  77. package/onboarding/index.d.ts +212 -5
  78. package/package.json +5 -13
  79. package/page-header/index.d.ts +83 -5
  80. package/page-header/style/index.less +1 -1
  81. package/pdf/index.d.ts +142 -5
  82. package/quick-menu/index.d.ts +38 -5
  83. package/quick-menu/style/index.less +2 -2
  84. package/reuse-tab/index.d.ts +512 -3
  85. package/se/index.d.ts +129 -5
  86. package/sg/index.d.ts +44 -5
  87. package/st/index.d.ts +1708 -3
  88. package/st/style/index.less +1 -1
  89. package/sv/index.d.ts +96 -5
  90. package/sv/style/index.less +1 -1
  91. package/tag-select/index.d.ts +27 -5
  92. package/theme-dark.less +0 -4
  93. package/theme-default.less +0 -8
  94. package/xlsx/index.d.ts +71 -5
  95. package/zip/index.d.ts +65 -5
  96. package/auto-focus/auto-focus.directive.d.ts +0 -10
  97. package/auto-focus/auto-focus.module.d.ts +0 -7
  98. package/avatar-list/avatar-list-item.component.d.ts +0 -9
  99. package/avatar-list/avatar-list.component.d.ts +0 -29
  100. package/avatar-list/avatar-list.module.d.ts +0 -14
  101. package/avatar-list/index.d.ts +0 -5
  102. package/avatar-list/public_api.d.ts +0 -3
  103. package/avatar-list/style/index.less +0 -53
  104. package/avatar-list/style/rtl.less +0 -3
  105. package/cell/cell-host.directive.d.ts +0 -10
  106. package/cell/cell.component.d.ts +0 -30
  107. package/cell/cell.module.d.ts +0 -17
  108. package/cell/cell.service.d.ts +0 -19
  109. package/cell/cell.types.d.ts +0 -234
  110. package/cell/provide.d.ts +0 -10
  111. package/count-down/count-down.component.d.ts +0 -15
  112. package/count-down/count-down.module.d.ts +0 -9
  113. package/count-down/public_api.d.ts +0 -2
  114. package/date-picker/date-picker.module.d.ts +0 -11
  115. package/date-picker/public_api.d.ts +0 -3
  116. package/date-picker/range-shortcut.component.d.ts +0 -10
  117. package/date-picker/range.directive.d.ts +0 -30
  118. package/down-file/down-file.directive.d.ts +0 -23
  119. package/down-file/down-file.module.d.ts +0 -9
  120. package/down-file/public_api.d.ts +0 -2
  121. package/ellipsis/ellipsis.component.d.ts +0 -43
  122. package/ellipsis/ellipsis.module.d.ts +0 -10
  123. package/ellipsis/public_api.d.ts +0 -2
  124. package/error-collect/error-collect.component.d.ts +0 -23
  125. package/error-collect/error-collect.module.d.ts +0 -9
  126. package/error-collect/public_api.d.ts +0 -2
  127. package/exception/exception.component.d.ts +0 -36
  128. package/exception/exception.module.d.ts +0 -12
  129. package/exception/public_api.d.ts +0 -2
  130. package/fesm2022/avatar-list.mjs +0 -132
  131. package/fesm2022/avatar-list.mjs.map +0 -1
  132. package/fesm2022/result.mjs +0 -84
  133. package/fesm2022/result.mjs.map +0 -1
  134. package/footer-toolbar/footer-toolbar.component.d.ts +0 -14
  135. package/footer-toolbar/footer-toolbar.module.d.ts +0 -10
  136. package/footer-toolbar/public_api.d.ts +0 -2
  137. package/full-content/full-content-toggle.directive.d.ts +0 -7
  138. package/full-content/full-content.component.d.ts +0 -32
  139. package/full-content/full-content.module.d.ts +0 -9
  140. package/full-content/full-content.service.d.ts +0 -10
  141. package/full-content/public_api.d.ts +0 -4
  142. package/global-footer/global-footer-item.component.d.ts +0 -10
  143. package/global-footer/global-footer.component.d.ts +0 -22
  144. package/global-footer/global-footer.module.d.ts +0 -10
  145. package/global-footer/global-footer.types.d.ts +0 -7
  146. package/global-footer/public_api.d.ts +0 -4
  147. package/hotkey/hotkey.directive.d.ts +0 -16
  148. package/hotkey/hotkey.module.d.ts +0 -7
  149. package/hotkey/public_api.d.ts +0 -2
  150. package/loading/loading.component.d.ts +0 -11
  151. package/loading/loading.module.d.ts +0 -12
  152. package/loading/loading.service.d.ts +0 -34
  153. package/loading/loading.types.d.ts +0 -35
  154. package/loading/public_api.d.ts +0 -4
  155. package/lodop/lodop.module.d.ts +0 -6
  156. package/lodop/lodop.service.d.ts +0 -74
  157. package/lodop/lodop.types.d.ts +0 -193
  158. package/lodop/public_api.d.ts +0 -3
  159. package/media/media.component.d.ts +0 -33
  160. package/media/media.module.d.ts +0 -8
  161. package/media/media.service.d.ts +0 -17
  162. package/media/public_api.d.ts +0 -3
  163. package/notice-icon/notice-icon-tab.component.d.ts +0 -13
  164. package/notice-icon/notice-icon.component.d.ts +0 -25
  165. package/notice-icon/notice-icon.module.d.ts +0 -18
  166. package/notice-icon/notice-icon.types.d.ts +0 -36
  167. package/notice-icon/public_api.d.ts +0 -4
  168. package/observers/observer-size.d.ts +0 -31
  169. package/observers/public-api.d.ts +0 -1
  170. package/onboarding/onboarding.component.d.ts +0 -35
  171. package/onboarding/onboarding.module.d.ts +0 -13
  172. package/onboarding/onboarding.service.d.ts +0 -58
  173. package/onboarding/onboarding.storage.d.ts +0 -11
  174. package/onboarding/onboarding.types.d.ts +0 -95
  175. package/onboarding/public_api.d.ts +0 -5
  176. package/page-header/page-header.component.d.ts +0 -70
  177. package/page-header/page-header.module.d.ts +0 -14
  178. package/page-header/public_api.d.ts +0 -2
  179. package/pdf/pdf.component.d.ts +0 -101
  180. package/pdf/pdf.config.d.ts +0 -2
  181. package/pdf/pdf.module.d.ts +0 -9
  182. package/pdf/pdf.types.d.ts +0 -29
  183. package/pdf/public_api.d.ts +0 -4
  184. package/public_api.d.ts +0 -2
  185. package/quick-menu/public_api.d.ts +0 -2
  186. package/quick-menu/quick-menu.component.d.ts +0 -26
  187. package/quick-menu/quick-menu.module.d.ts +0 -10
  188. package/result/index.d.ts +0 -5
  189. package/result/public_api.d.ts +0 -2
  190. package/result/result.component.d.ts +0 -21
  191. package/result/result.module.d.ts +0 -13
  192. package/result/style/index.less +0 -66
  193. package/result/style/rtl.less +0 -3
  194. package/reuse-tab/lifecycle_hooks.d.ts +0 -16
  195. package/reuse-tab/provide.d.ts +0 -28
  196. package/reuse-tab/public_api.d.ts +0 -14
  197. package/reuse-tab/reuse-tab-context-menu.component.d.ts +0 -21
  198. package/reuse-tab/reuse-tab-context.component.d.ts +0 -11
  199. package/reuse-tab/reuse-tab-context.directive.d.ts +0 -10
  200. package/reuse-tab/reuse-tab-context.service.d.ts +0 -14
  201. package/reuse-tab/reuse-tab.cache.d.ts +0 -16
  202. package/reuse-tab/reuse-tab.component.d.ts +0 -79
  203. package/reuse-tab/reuse-tab.interfaces.d.ts +0 -110
  204. package/reuse-tab/reuse-tab.module.d.ts +0 -17
  205. package/reuse-tab/reuse-tab.service.d.ts +0 -192
  206. package/reuse-tab/reuse-tab.state.d.ts +0 -14
  207. package/reuse-tab/reuse-tab.strategy.d.ts +0 -10
  208. package/se/public_api.d.ts +0 -4
  209. package/se/se-container.component.d.ts +0 -49
  210. package/se/se.component.d.ts +0 -60
  211. package/se/se.module.d.ts +0 -12
  212. package/se/se.types.d.ts +0 -9
  213. package/sg/public_api.d.ts +0 -3
  214. package/sg/sg-container.component.d.ts +0 -15
  215. package/sg/sg.component.d.ts +0 -19
  216. package/sg/sg.module.d.ts +0 -9
  217. package/st/provide.d.ts +0 -10
  218. package/st/public_api.d.ts +0 -12
  219. package/st/st-column-source.d.ts +0 -47
  220. package/st/st-data-source.d.ts +0 -77
  221. package/st/st-export.d.ts +0 -11
  222. package/st/st-filter.component.d.ts +0 -23
  223. package/st/st-row.directive.d.ts +0 -20
  224. package/st/st-widget-host.directive.d.ts +0 -12
  225. package/st/st-widget.d.ts +0 -11
  226. package/st/st.component.d.ts +0 -295
  227. package/st/st.config.d.ts +0 -2
  228. package/st/st.interfaces.d.ts +0 -1193
  229. package/st/st.module.d.ts +0 -9
  230. package/st/st.types.d.ts +0 -77
  231. package/sv/public_api.d.ts +0 -4
  232. package/sv/sv-container.component.d.ts +0 -39
  233. package/sv/sv-value.component.d.ts +0 -10
  234. package/sv/sv.component.d.ts +0 -34
  235. package/sv/sv.module.d.ts +0 -14
  236. package/tag-select/public_api.d.ts +0 -2
  237. package/tag-select/tag-select.component.d.ts +0 -21
  238. package/tag-select/tag-select.module.d.ts +0 -10
  239. package/xlsx/public_api.d.ts +0 -4
  240. package/xlsx/xlsx.directive.d.ts +0 -9
  241. package/xlsx/xlsx.module.d.ts +0 -7
  242. package/xlsx/xlsx.service.d.ts +0 -27
  243. package/xlsx/xlsx.types.d.ts +0 -27
  244. package/zip/public_api.d.ts +0 -2
  245. package/zip/zip.service.d.ts +0 -34
  246. package/zip/zip.types.d.ts +0 -28
@@ -1 +1 @@
1
- {"version":3,"file":"exception.mjs","sources":["../../../../packages/abc/exception/exception.component.ts","../../../../packages/abc/exception/exception.component.html","../../../../packages/abc/exception/exception.module.ts","../../../../packages/abc/exception/exception.ts"],"sourcesContent":["import { Direction, Directionality } from '@angular/cdk/bidi';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n Input,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n inject\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DomSanitizer, SafeHtml, SafeUrl } from '@angular/platform-browser';\nimport { RouterLink } from '@angular/router';\n\nimport { DelonLocaleService, LocaleData } from '@delon/theme';\nimport { isEmpty } from '@delon/util/browser';\nimport { AlainConfigService } from '@delon/util/config';\nimport { NzButtonComponent } from 'ng-zorro-antd/button';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport type ExceptionType = 403 | 404 | 500;\n\n@Component({\n selector: 'exception',\n exportAs: 'exception',\n templateUrl: './exception.component.html',\n host: {\n '[class.exception]': 'true',\n '[class.exception-rtl]': `dir === 'rtl'`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkObserveContent, NzButtonComponent, RouterLink]\n})\nexport class ExceptionComponent implements OnInit {\n static ngAcceptInputType_type: ExceptionType | string;\n\n private readonly i18n = inject(DelonLocaleService);\n private readonly dom = inject(DomSanitizer);\n private readonly directionality = inject(Directionality);\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly destroy$ = inject(DestroyRef);\n\n @ViewChild('conTpl', { static: true }) private conTpl!: ElementRef;\n\n _type!: ExceptionType;\n locale: LocaleData = {};\n hasCon = false;\n dir?: Direction = 'ltr';\n\n _img: SafeUrl = '';\n _title: SafeHtml = '';\n _desc: SafeHtml = '';\n private typeDict!: Record<number | string, { img: string; title: string; desc?: string }>;\n\n @Input()\n set type(value: ExceptionType) {\n const item = this.typeDict[value];\n if (!item) return;\n\n this.fixImg(item.img);\n this._type = value;\n this._title = item.title;\n this._desc = '';\n }\n\n private fixImg(src: string): void {\n this._img = this.dom.bypassSecurityTrustStyle(`url('${src}')`);\n }\n\n @Input()\n set img(value: string) {\n this.fixImg(value);\n }\n\n @Input()\n set title(value: string) {\n this._title = this.dom.bypassSecurityTrustHtml(value);\n }\n\n @Input()\n set desc(value: string) {\n this._desc = this.dom.bypassSecurityTrustHtml(value);\n }\n\n @Input() backRouterLink: string | NzSafeAny[] = '/';\n\n checkContent(): void {\n this.hasCon = !isEmpty(this.conTpl.nativeElement);\n this.cdr.detectChanges();\n }\n\n constructor(configSrv: AlainConfigService) {\n configSrv.attach(this, 'exception', {\n typeDict: {\n 403: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg',\n title: '403'\n },\n 404: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg',\n title: '404'\n },\n 500: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg',\n title: '500'\n }\n }\n });\n }\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('exception');\n this.cdr.detectChanges();\n });\n this.checkContent();\n }\n}\n","<div class=\"exception__img-block\">\n <div class=\"exception__img\" [style.backgroundImage]=\"_img\"></div>\n</div>\n<div class=\"exception__cont\">\n <h1 class=\"exception__cont-title\" [innerHTML]=\"_title\"></h1>\n <div class=\"exception__cont-desc\" [innerHTML]=\"_desc || locale[_type]\"></div>\n <div class=\"exception__cont-actions\">\n <div (cdkObserveContent)=\"checkContent()\" #conTpl>\n <ng-content />\n </div>\n @if (!hasCon) {\n <button nz-button [routerLink]=\"backRouterLink\" [nzType]=\"'primary'\">\n {{ locale.backToHome }}\n </button>\n }\n </div>\n</div>\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { DelonLocaleModule } from '@delon/theme';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\n\nimport { ExceptionComponent } from './exception.component';\n\nconst COMPONENTS = [ExceptionComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ExceptionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAuCa,kBAAkB,CAAA;IAC7B,OAAO,sBAAsB;AAEZ,IAAA,IAAI,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACjC,IAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1B,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,IAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,IAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAEC,IAAA,MAAM;AAErD,IAAA,KAAK;IACL,MAAM,GAAe,EAAE;IACvB,MAAM,GAAG,KAAK;IACd,GAAG,GAAe,KAAK;IAEvB,IAAI,GAAY,EAAE;IAClB,MAAM,GAAa,EAAE;IACrB,KAAK,GAAa,EAAE;AACZ,IAAA,QAAQ;IAEhB,IACI,IAAI,CAAC,KAAoB,EAAA;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;AACjC,QAAA,IAAI,CAAC,IAAI;YAAE;AAEX,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AACrB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK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AAA,eAAe,EAHhB,OAAA,EAAA,CAAA,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAHtE,kBAAkB,aAAlB,kBAAkB,CAAA,EAAA,CAAA;wGAMzB,eAAe,EAAA,OAAA,EAAA,CAHhB,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAK,UAAU,CAAA,EAAA,CAAA;;2FAG5F,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;AACxG,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"exception.mjs","sources":["../../../../packages/abc/exception/exception.component.ts","../../../../packages/abc/exception/exception.module.ts","../../../../packages/abc/exception/exception.ts"],"sourcesContent":["import { Directionality } from '@angular/cdk/bidi';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n computed,\n effect,\n inject,\n input,\n signal,\n viewChild\n} from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { RouterLink } from '@angular/router';\n\nimport { DelonLocaleService } from '@delon/theme';\nimport { isEmpty } from '@delon/util/browser';\nimport { AlainConfigService, AlainExceptionType } from '@delon/util/config';\nimport { NzButtonComponent } from 'ng-zorro-antd/button';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport type ExceptionType = 403 | 404 | 500;\n\n@Component({\n selector: 'exception',\n exportAs: 'exception',\n template: `\n <div class=\"exception__img-block\">\n <div class=\"exception__img\" [style.backgroundImage]=\"_img()\"></div>\n </div>\n <div class=\"exception__cont\">\n @if (_title()) {\n <h1 class=\"exception__cont-title\" [innerHTML]=\"_title()\"></h1>\n }\n <div class=\"exception__cont-desc\" [innerHTML]=\"_desc()\"></div>\n <div class=\"exception__cont-actions\">\n <div (cdkObserveContent)=\"checkContent()\" #conTpl>\n <ng-content />\n </div>\n @if (!hasCon()) {\n <button nz-button [routerLink]=\"backRouterLink()\" [nzType]=\"'primary'\">\n {{ locale().backToHome }}\n </button>\n }\n </div>\n </div>\n `,\n host: {\n '[class.exception]': 'true',\n '[class.exception-rtl]': `dir() === 'rtl'`\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [CdkObserveContent, NzButtonComponent, RouterLink]\n})\nexport class ExceptionComponent {\n private readonly dom = inject(DomSanitizer);\n private readonly cogSrv = inject(AlainConfigService);\n\n private readonly conTpl = viewChild.required<ElementRef<HTMLElement>>('conTpl');\n locale = inject(DelonLocaleService).valueSignal('exception');\n dir = inject(Directionality).valueSignal;\n\n hasCon = signal(false);\n private typeDict!: NonNullable<AlainExceptionType['typeDict']>;\n typeItem = signal<NonNullable<AlainExceptionType['typeDict']>[ExceptionType] | null>(null);\n\n type = input<ExceptionType>(404);\n img = input<string>();\n title = input<string>();\n desc = input<string>();\n backRouterLink = input<string | NzSafeAny[]>('/');\n\n _img = computed(() => {\n const v = this.typeItem()?.img ?? this.img();\n return v == null ? null : this.dom.bypassSecurityTrustStyle(`url('${v}')`);\n });\n _title = computed(() => {\n const v = this.typeItem()?.title ?? this.title();\n return v == null ? null : this.dom.bypassSecurityTrustHtml(v);\n });\n _desc = computed(() => {\n const v = this.typeItem()?.desc ?? this.desc() ?? this.locale()[this.type()];\n return v == null ? null : this.dom.bypassSecurityTrustHtml(v);\n });\n\n constructor() {\n this.cogSrv.attach(this, 'exception', {\n typeDict: {\n 403: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/wZcnGqRDyhPOEYFcZDnb.svg',\n title: '403'\n },\n 404: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg',\n title: '404'\n },\n 500: {\n img: 'https://gw.alipayobjects.com/zos/rmsportal/RVRUAYdCGeYNBWoKiIwB.svg',\n title: '500'\n }\n }\n });\n\n effect(() => {\n const type = this.type();\n this.typeItem.set(this.typeDict?.[type]);\n });\n\n afterNextRender(() => {\n this.checkContent();\n });\n }\n\n checkContent(): void {\n this.hasCon.set(!isEmpty(this.conTpl().nativeElement));\n }\n}\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { DelonLocaleModule } from '@delon/theme';\nimport { NzButtonModule } from 'ng-zorro-antd/button';\n\nimport { ExceptionComponent } from './exception.component';\n\nconst COMPONENTS = [ExceptionComponent];\n\n@NgModule({\n imports: [CommonModule, ObserversModule, RouterModule, DelonLocaleModule, NzButtonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class ExceptionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA0Da,kBAAkB,CAAA;AACZ,IAAA,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;AAC1B,IAAA,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAEnC,IAAA,MAAM,GAAG,SAAS,CAAC,QAAQ,CAA0B,QAAQ,CAAC;IAC/E,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC;AAC5D,IAAA,GAAG,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW;AAExC,IAAA,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;AACd,IAAA,QAAQ;AAChB,IAAA,QAAQ,GAAG,MAAM,CAAoE,IAAI,CAAC;AAE1F,IAAA,IAAI,GAAG,KAAK,CAAgB,GAAG,CAAC;IAChC,GAAG,GAAG,KAAK,EAAU;IACrB,KAAK,GAAG,KAAK,EAAU;IACvB,IAAI,GAAG,KAAK,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iBAAiB,EAAE,cAAc,EAHtE,kBAAkB,aAAlB,kBAAkB,CAAA,EAAA,CAAA;wGAMzB,eAAe,EAAA,OAAA,EAAA,CAHhB,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAK,UAAU,CAAA,EAAA,CAAA;;2FAG5F,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;AACxG,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACfD;;AAEG;;;;"}
@@ -1,43 +1,65 @@
1
1
  import { DOCUMENT, CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ElementRef, Renderer2, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, NgModule } from '@angular/core';
3
+ import { inject, input, booleanAttribute, afterNextRender, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
4
  import { ErrorCollectComponent, ErrorCollectModule } from '@delon/abc/error-collect';
5
5
  import { NzStringTemplateOutletDirective, NzOutletModule } from 'ng-zorro-antd/core/outlet';
6
6
 
7
7
  const CLSBODY = 'footer-toolbar__body';
8
8
  class FooterToolbarComponent {
9
- el = inject(ElementRef).nativeElement;
10
- renderer = inject(Renderer2);
11
9
  bodyCls = inject(DOCUMENT).querySelector('body')?.classList;
12
- errorCollect = false;
13
- extra;
14
- ngOnInit() {
15
- this.renderer.addClass(this.el, 'footer-toolbar');
16
- this.bodyCls?.add(CLSBODY);
10
+ errorCollect = input(false, { transform: booleanAttribute });
11
+ extra = input();
12
+ constructor() {
13
+ afterNextRender(() => this.bodyCls?.add(CLSBODY));
17
14
  }
18
15
  ngOnDestroy() {
19
16
  this.bodyCls?.remove(CLSBODY);
20
17
  }
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FooterToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
22
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.1", type: FooterToolbarComponent, isStandalone: true, selector: "footer-toolbar", inputs: { errorCollect: ["errorCollect", "errorCollect", booleanAttribute], extra: "extra" }, exportAs: ["footerToolbar"], ngImport: i0, template: "<div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra\">{{ extra }}</ng-container>\n</div>\n<div class=\"footer-toolbar__right\">\n @if (errorCollect) {\n <error-collect />\n }\n <ng-content />\n</div>\n", dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: ErrorCollectComponent, selector: "error-collect, [error-collect]", inputs: ["freq", "offsetTop"], exportAs: ["errorCollect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FooterToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: FooterToolbarComponent, isStandalone: true, selector: "footer-toolbar", inputs: { errorCollect: { classPropertyName: "errorCollect", publicName: "errorCollect", isSignal: true, isRequired: false, transformFunction: null }, extra: { classPropertyName: "extra", publicName: "extra", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "footer-toolbar" }, exportAs: ["footerToolbar"], ngImport: i0, template: `
20
+ <div class="footer-toolbar__left">
21
+ <ng-container *nzStringTemplateOutlet="extra()">{{ extra() }}</ng-container>
22
+ </div>
23
+ <div class="footer-toolbar__right">
24
+ @if (errorCollect()) {
25
+ <error-collect />
26
+ }
27
+ <ng-content />
28
+ </div>
29
+ `, isInline: true, dependencies: [{ kind: "directive", type: NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { kind: "component", type: ErrorCollectComponent, selector: "error-collect, [error-collect]", inputs: ["freq", "offsetTop"], exportAs: ["errorCollect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
23
30
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FooterToolbarComponent, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FooterToolbarComponent, decorators: [{
25
32
  type: Component,
26
- args: [{ selector: 'footer-toolbar', exportAs: 'footerToolbar', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NzStringTemplateOutletDirective, ErrorCollectComponent], template: "<div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra\">{{ extra }}</ng-container>\n</div>\n<div class=\"footer-toolbar__right\">\n @if (errorCollect) {\n <error-collect />\n }\n <ng-content />\n</div>\n" }]
27
- }], propDecorators: { errorCollect: [{
28
- type: Input,
29
- args: [{ transform: booleanAttribute }]
30
- }], extra: [{
31
- type: Input
32
- }] } });
33
+ args: [{
34
+ selector: 'footer-toolbar',
35
+ exportAs: 'footerToolbar',
36
+ template: `
37
+ <div class="footer-toolbar__left">
38
+ <ng-container *nzStringTemplateOutlet="extra()">{{ extra() }}</ng-container>
39
+ </div>
40
+ <div class="footer-toolbar__right">
41
+ @if (errorCollect()) {
42
+ <error-collect />
43
+ }
44
+ <ng-content />
45
+ </div>
46
+ `,
47
+ host: {
48
+ class: 'footer-toolbar'
49
+ },
50
+ changeDetection: ChangeDetectionStrategy.OnPush,
51
+ encapsulation: ViewEncapsulation.None,
52
+ imports: [NzStringTemplateOutletDirective, ErrorCollectComponent]
53
+ }]
54
+ }], ctorParameters: () => [] });
33
55
 
34
56
  const COMPONENTS = [FooterToolbarComponent];
35
57
  class FooterToolbarModule {
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FooterToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
37
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.1", ngImport: i0, type: FooterToolbarModule, imports: [CommonModule, ErrorCollectModule, NzOutletModule, FooterToolbarComponent], exports: [FooterToolbarComponent] });
38
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FooterToolbarModule, imports: [CommonModule, ErrorCollectModule, NzOutletModule, COMPONENTS] });
58
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FooterToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
59
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: FooterToolbarModule, imports: [CommonModule, ErrorCollectModule, NzOutletModule, FooterToolbarComponent], exports: [FooterToolbarComponent] });
60
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FooterToolbarModule, imports: [CommonModule, ErrorCollectModule, NzOutletModule, COMPONENTS] });
39
61
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FooterToolbarModule, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FooterToolbarModule, decorators: [{
41
63
  type: NgModule,
42
64
  args: [{
43
65
  imports: [CommonModule, ErrorCollectModule, NzOutletModule, ...COMPONENTS],
@@ -1 +1 @@
1
- {"version":3,"file":"footer-toolbar.mjs","sources":["../../../../packages/abc/footer-toolbar/footer-toolbar.component.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.component.html","../../../../packages/abc/footer-toolbar/footer-toolbar.module.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n TemplateRef,\n ViewEncapsulation,\n booleanAttribute,\n inject\n} from '@angular/core';\n\nimport { ErrorCollectComponent } from '@delon/abc/error-collect';\nimport { NzStringTemplateOutletDirective } from 'ng-zorro-antd/core/outlet';\n\nconst CLSBODY = 'footer-toolbar__body';\n\n@Component({\n selector: 'footer-toolbar',\n exportAs: 'footerToolbar',\n templateUrl: './footer-toolbar.component.html',\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzStringTemplateOutletDirective, ErrorCollectComponent]\n})\nexport class FooterToolbarComponent implements OnInit, OnDestroy {\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly bodyCls = inject(DOCUMENT).querySelector('body')?.classList;\n\n @Input({ transform: booleanAttribute }) errorCollect = false;\n @Input() extra?: string | TemplateRef<void>;\n\n ngOnInit(): void {\n this.renderer.addClass(this.el, 'footer-toolbar');\n this.bodyCls?.add(CLSBODY);\n }\n\n ngOnDestroy(): void {\n this.bodyCls?.remove(CLSBODY);\n }\n}\n","<div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra\">{{ extra }}</ng-container>\n</div>\n<div class=\"footer-toolbar__right\">\n @if (errorCollect) {\n <error-collect />\n }\n <ng-content />\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ErrorCollectModule } from '@delon/abc/error-collect';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { FooterToolbarComponent } from './footer-toolbar.component';\n\nconst COMPONENTS = [FooterToolbarComponent];\n\n@NgModule({\n imports: [CommonModule, ErrorCollectModule, NzOutletModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class FooterToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAkBA,MAAM,OAAO,GAAG,sBAAsB;MAWzB,sBAAsB,CAAA;AAChB,IAAA,EAAE,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;AAClD,IAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAC5B,IAAA,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS;IAEpC,YAAY,GAAG,KAAK;AACnD,IAAA,KAAK;IAEd,QAAQ,GAAA;QACN,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,gBAAgB,CAAC;AACjD,QAAA,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC;;IAG5B,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;;uGAdpB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,2GAKb,gBAAgB,CAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EClCtC,mPASA,EDkBY,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,+BAA+B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B,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;AAC1E,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"footer-toolbar.mjs","sources":["../../../../packages/abc/footer-toolbar/footer-toolbar.component.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.module.ts","../../../../packages/abc/footer-toolbar/footer-toolbar.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n OnDestroy,\n TemplateRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n inject,\n input\n} from '@angular/core';\n\nimport { ErrorCollectComponent } from '@delon/abc/error-collect';\nimport { NzStringTemplateOutletDirective } from 'ng-zorro-antd/core/outlet';\n\nconst CLSBODY = 'footer-toolbar__body';\n\n@Component({\n selector: 'footer-toolbar',\n exportAs: 'footerToolbar',\n template: `\n <div class=\"footer-toolbar__left\">\n <ng-container *nzStringTemplateOutlet=\"extra()\">{{ extra() }}</ng-container>\n </div>\n <div class=\"footer-toolbar__right\">\n @if (errorCollect()) {\n <error-collect />\n }\n <ng-content />\n </div>\n `,\n host: {\n class: 'footer-toolbar'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [NzStringTemplateOutletDirective, ErrorCollectComponent]\n})\nexport class FooterToolbarComponent implements OnDestroy {\n private readonly bodyCls = inject(DOCUMENT).querySelector('body')?.classList;\n\n errorCollect = input(false, { transform: booleanAttribute });\n extra = input<string | TemplateRef<void>>();\n\n constructor() {\n afterNextRender(() => this.bodyCls?.add(CLSBODY));\n }\n\n ngOnDestroy(): void {\n this.bodyCls?.remove(CLSBODY);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ErrorCollectModule } from '@delon/abc/error-collect';\nimport { NzOutletModule } from 'ng-zorro-antd/core/outlet';\n\nimport { FooterToolbarComponent } from './footer-toolbar.component';\n\nconst COMPONENTS = [FooterToolbarComponent];\n\n@NgModule({\n imports: [CommonModule, ErrorCollectModule, NzOutletModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class FooterToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAgBA,MAAM,OAAO,GAAG,sBAAsB;MAuBzB,sBAAsB,CAAA;AAChB,IAAA,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,SAAS;IAE5E,YAAY,GAAG,KAAK,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC5D,KAAK,GAAG,KAAK,EAA8B;AAE3C,IAAA,WAAA,GAAA;AACE,QAAA,eAAe,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;;IAGnD,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;;uGAXpB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAlBvB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,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A,CAHpB,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAHxC,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAAtB,sBAAsB,CAAA,EAAA,CAAA;AAM7B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHpB,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAK,UAAU,CAAA,EAAA,CAAA;;2FAG9D,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;AAC1E,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACbD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { DOCUMENT, CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, inject, DestroyRef, ElementRef, ChangeDetectorRef, EventEmitter, booleanAttribute, numberAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, Directive, NgModule } from '@angular/core';
3
+ import { Injectable, inject, DestroyRef, ElementRef, ChangeDetectorRef, input, booleanAttribute, numberAttribute, model, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, NgModule } from '@angular/core';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { Router, ActivationStart, ActivationEnd } from '@angular/router';
6
6
  import { BehaviorSubject, share, fromEvent, debounceTime, filter } from 'rxjs';
@@ -14,10 +14,10 @@ class FullContentService {
14
14
  get change() {
15
15
  return this._change.pipe(share());
16
16
  }
17
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentService, providedIn: 'root' });
17
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
18
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentService, providedIn: 'root' });
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentService, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentService, decorators: [{
21
21
  type: Injectable,
22
22
  args: [{ providedIn: 'root' }]
23
23
  }] });
@@ -36,21 +36,20 @@ class FullContentComponent {
36
36
  inited = false;
37
37
  id = `_full-content-${Math.random().toString(36).substring(2)}`;
38
38
  _height = 0;
39
- fullscreen;
40
- hideTitle = true;
41
- padding = 24;
42
- fullscreenChange = new EventEmitter();
39
+ hideTitle = input(true, { transform: booleanAttribute });
40
+ padding = input(24, { transform: numberAttribute });
41
+ fullscreen = model();
43
42
  updateCls() {
44
43
  const clss = this.bodyEl.classList;
45
- if (this.fullscreen) {
44
+ if (this.fullscreen()) {
46
45
  clss.add(openedCls);
47
- if (this.hideTitle) {
46
+ if (this.hideTitle()) {
48
47
  clss.add(hideTitleCls);
49
48
  }
50
49
  }
51
50
  else {
52
51
  clss.remove(openedCls);
53
- if (this.hideTitle) {
52
+ if (this.hideTitle()) {
54
53
  clss.remove(hideTitleCls);
55
54
  }
56
55
  }
@@ -58,10 +57,10 @@ class FullContentComponent {
58
57
  update() {
59
58
  this.updateCls();
60
59
  this.updateHeight();
61
- this.fullscreenChange.emit(this.fullscreen);
60
+ this.fullscreen.set(this.fullscreen());
62
61
  }
63
62
  updateHeight() {
64
- this._height = this.bodyEl.getBoundingClientRect().height - this.el.getBoundingClientRect().top - this.padding;
63
+ this._height = this.bodyEl.getBoundingClientRect().height - this.el.getBoundingClientRect().top - this.padding();
65
64
  this.cdr.detectChanges();
66
65
  }
67
66
  removeInBody() {
@@ -94,7 +93,7 @@ class FullContentComponent {
94
93
  });
95
94
  }
96
95
  toggle() {
97
- this.fullscreen = !this.fullscreen;
96
+ this.fullscreen.set(!this.fullscreen());
98
97
  this.update();
99
98
  this.updateHeight();
100
99
  }
@@ -108,45 +107,33 @@ class FullContentComponent {
108
107
  ngOnDestroy() {
109
108
  this.removeInBody();
110
109
  }
111
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
112
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.1.1", type: FullContentComponent, isStandalone: true, selector: "full-content", inputs: { fullscreen: ["fullscreen", "fullscreen", booleanAttribute], hideTitle: ["hideTitle", "hideTitle", booleanAttribute], padding: ["padding", "padding", numberAttribute] }, outputs: { fullscreenChange: "fullscreenChange" }, host: { properties: { "class.full-content": "true", "style.height.px": "_height" } }, exportAs: ["fullContent"], usesOnChanges: true, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
110
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.4", type: FullContentComponent, isStandalone: true, selector: "full-content", inputs: { hideTitle: { classPropertyName: "hideTitle", publicName: "hideTitle", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null }, fullscreen: { classPropertyName: "fullscreen", publicName: "fullscreen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fullscreen: "fullscreenChange" }, host: { properties: { "class.full-content": "true", "style.height.px": "_height" } }, exportAs: ["fullContent"], usesOnChanges: true, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
113
112
  }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentComponent, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentComponent, decorators: [{
115
114
  type: Component,
116
115
  args: [{
117
116
  selector: 'full-content',
118
117
  exportAs: 'fullContent',
119
- template: ` <ng-content /> `,
118
+ template: `<ng-content />`,
120
119
  host: {
121
120
  '[class.full-content]': 'true',
122
121
  '[style.height.px]': '_height'
123
122
  },
124
- preserveWhitespaces: false,
125
123
  changeDetection: ChangeDetectionStrategy.OnPush,
126
124
  encapsulation: ViewEncapsulation.None
127
125
  }]
128
- }], propDecorators: { fullscreen: [{
129
- type: Input,
130
- args: [{ transform: booleanAttribute }]
131
- }], hideTitle: [{
132
- type: Input,
133
- args: [{ transform: booleanAttribute }]
134
- }], padding: [{
135
- type: Input,
136
- args: [{ transform: numberAttribute }]
137
- }], fullscreenChange: [{
138
- type: Output
139
- }] } });
126
+ }] });
140
127
 
141
128
  class FullContentToggleDirective {
142
129
  parent = inject(FullContentComponent);
143
130
  _click() {
144
131
  this.parent.toggle();
145
132
  }
146
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
147
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.1", type: FullContentToggleDirective, isStandalone: true, selector: "[full-toggle]", host: { listeners: { "click": "_click()" } }, exportAs: ["fullToggle"], ngImport: i0 });
133
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
134
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.4", type: FullContentToggleDirective, isStandalone: true, selector: "[full-toggle]", host: { listeners: { "click": "_click()" } }, exportAs: ["fullToggle"], ngImport: i0 });
148
135
  }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentToggleDirective, decorators: [{
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentToggleDirective, decorators: [{
150
137
  type: Directive,
151
138
  args: [{
152
139
  selector: '[full-toggle]',
@@ -159,11 +146,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImpor
159
146
 
160
147
  const COMPONENTS = [FullContentComponent, FullContentToggleDirective];
161
148
  class FullContentModule {
162
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
163
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.1", ngImport: i0, type: FullContentModule, imports: [CommonModule, FullContentComponent, FullContentToggleDirective], exports: [FullContentComponent, FullContentToggleDirective] });
164
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentModule, imports: [CommonModule] });
149
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
150
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: FullContentModule, imports: [CommonModule, FullContentComponent, FullContentToggleDirective], exports: [FullContentComponent, FullContentToggleDirective] });
151
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentModule, imports: [CommonModule] });
165
152
  }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: FullContentModule, decorators: [{
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: FullContentModule, decorators: [{
167
154
  type: NgModule,
168
155
  args: [{
169
156
  imports: [CommonModule, ...COMPONENTS],
@@ -1 +1 @@
1
- {"version":3,"file":"full-content.mjs","sources":["../../../../packages/abc/full-content/full-content.service.ts","../../../../packages/abc/full-content/full-content.component.ts","../../../../packages/abc/full-content/full-content-toggle.directive.ts","../../../../packages/abc/full-content/full-content.module.ts","../../../../packages/abc/full-content/full-content.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, share } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class FullContentService {\n private _change = new BehaviorSubject<boolean | null>(null);\n\n /** 切换全屏工作区状态 */\n toggle(): void {\n this._change.next(true);\n }\n\n get change(): Observable<boolean | null> {\n return this._change.pipe(share());\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n numberAttribute\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ActivationEnd, ActivationStart, Event, Router } from '@angular/router';\nimport { fromEvent, debounceTime, filter } from 'rxjs';\n\nimport { FullContentService } from './full-content.service';\n\nconst wrapCls = `full-content__body`;\nconst openedCls = `full-content__opened`;\nconst hideTitleCls = `full-content__hidden-title`;\n\n@Component({\n selector: 'full-content',\n exportAs: 'fullContent',\n template: ` <ng-content /> `,\n host: {\n '[class.full-content]': 'true',\n '[style.height.px]': '_height'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class FullContentComponent implements AfterViewInit, OnInit, OnChanges, OnDestroy {\n private readonly destroy$ = inject(DestroyRef);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly srv = inject(FullContentService);\n private readonly router = inject(Router);\n private readonly doc = inject(DOCUMENT);\n\n private bodyEl = this.doc.querySelector('body')!;\n private inited = false;\n private id = `_full-content-${Math.random().toString(36).substring(2)}`;\n\n _height = 0;\n\n @Input({ transform: booleanAttribute }) fullscreen?: boolean;\n @Input({ transform: booleanAttribute }) hideTitle = true;\n @Input({ transform: numberAttribute }) padding = 24;\n @Output() readonly fullscreenChange = new EventEmitter<boolean>();\n\n private updateCls(): void {\n const clss = this.bodyEl.classList;\n if (this.fullscreen) {\n clss.add(openedCls);\n if (this.hideTitle) {\n clss.add(hideTitleCls);\n }\n } else {\n clss.remove(openedCls);\n if (this.hideTitle) {\n clss.remove(hideTitleCls);\n }\n }\n }\n\n private update(): void {\n this.updateCls();\n this.updateHeight();\n this.fullscreenChange.emit(this.fullscreen);\n }\n\n private updateHeight(): void {\n this._height = this.bodyEl.getBoundingClientRect().height - this.el.getBoundingClientRect().top - this.padding;\n this.cdr.detectChanges();\n }\n\n private removeInBody(): void {\n this.bodyEl.classList.remove(wrapCls, openedCls, hideTitleCls);\n }\n\n ngOnInit(): void {\n this.inited = true;\n this.bodyEl.classList.add(wrapCls);\n this.el.id = this.id;\n\n this.updateCls();\n\n // when window resize\n fromEvent(window, 'resize')\n .pipe(takeUntilDestroyed(this.destroy$), debounceTime(200))\n .subscribe(() => this.updateHeight());\n\n // when servier changed\n this.srv.change\n .pipe(\n takeUntilDestroyed(this.destroy$),\n filter(res => res !== null)\n )\n .subscribe(() => this.toggle());\n\n // when router changed\n this.router.events\n .pipe(\n takeUntilDestroyed(this.destroy$),\n filter((e: Event) => e instanceof ActivationStart || e instanceof ActivationEnd),\n debounceTime(200)\n )\n .subscribe(() => {\n if (this.doc.querySelector(`#${this.id}`)) {\n this.bodyEl.classList.add(wrapCls);\n this.updateCls();\n } else {\n this.removeInBody();\n }\n });\n }\n\n toggle(): void {\n this.fullscreen = !this.fullscreen;\n this.update();\n this.updateHeight();\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => this.updateHeight());\n }\n\n ngOnChanges(): void {\n if (this.inited) this.update();\n }\n\n ngOnDestroy(): void {\n this.removeInBody();\n }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { FullContentComponent } from './full-content.component';\n\n@Directive({\n selector: '[full-toggle]',\n exportAs: 'fullToggle',\n host: {\n '(click)': '_click()'\n }\n})\nexport class FullContentToggleDirective {\n private readonly parent = inject(FullContentComponent);\n\n _click(): void {\n this.parent.toggle();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { FullContentToggleDirective } from './full-content-toggle.directive';\nimport { FullContentComponent } from './full-content.component';\n\nconst COMPONENTS = [FullContentComponent, FullContentToggleDirective];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class FullContentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAIa,kBAAkB,CAAA;AACrB,IAAA,OAAO,GAAG,IAAI,eAAe,CAAiB,IAAI,CAAC;;IAG3D,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;AAGzB,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;;uGATxB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAA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,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE;AACZ;AACF,iBAAA;;;ACJD,MAAM,UAAU,GAAG,CAAC,oBAAoB,EAAE,0BAA0B,CAAC;MAMxD,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAjB,iBAAiB,EAAA,OAAA,EAAA,CAHlB,YAAY,EAHJ,oBAAoB,EAAE,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAAhD,oBAAoB,EAAE,0BAA0B,CAAA,EAAA,CAAA;AAMvD,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHlB,YAAY,CAAA,EAAA,CAAA;;2FAGX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,UAAU,CAAC;AACtC,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"full-content.mjs","sources":["../../../../packages/abc/full-content/full-content.service.ts","../../../../packages/abc/full-content/full-content.component.ts","../../../../packages/abc/full-content/full-content-toggle.directive.ts","../../../../packages/abc/full-content/full-content.module.ts","../../../../packages/abc/full-content/full-content.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject, Observable, share } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class FullContentService {\n private _change = new BehaviorSubject<boolean | null>(null);\n\n /** 切换全屏工作区状态 */\n toggle(): void {\n this._change.next(true);\n }\n\n get change(): Observable<boolean | null> {\n return this._change.pipe(share());\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n ElementRef,\n OnChanges,\n OnDestroy,\n OnInit,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n input,\n model,\n numberAttribute\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ActivationEnd, ActivationStart, Event, Router } from '@angular/router';\nimport { fromEvent, debounceTime, filter } from 'rxjs';\n\nimport { FullContentService } from './full-content.service';\n\nconst wrapCls = `full-content__body`;\nconst openedCls = `full-content__opened`;\nconst hideTitleCls = `full-content__hidden-title`;\n\n@Component({\n selector: 'full-content',\n exportAs: 'fullContent',\n template: `<ng-content />`,\n host: {\n '[class.full-content]': 'true',\n '[style.height.px]': '_height'\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class FullContentComponent implements AfterViewInit, OnInit, OnChanges, OnDestroy {\n private readonly destroy$ = inject(DestroyRef);\n private readonly el: HTMLElement = inject(ElementRef).nativeElement;\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly srv = inject(FullContentService);\n private readonly router = inject(Router);\n private readonly doc = inject(DOCUMENT);\n\n private bodyEl = this.doc.querySelector('body')!;\n private inited = false;\n private id = `_full-content-${Math.random().toString(36).substring(2)}`;\n\n _height = 0;\n\n hideTitle = input(true, { transform: booleanAttribute });\n padding = input(24, { transform: numberAttribute });\n fullscreen = model<boolean>();\n\n private updateCls(): void {\n const clss = this.bodyEl.classList;\n if (this.fullscreen()) {\n clss.add(openedCls);\n if (this.hideTitle()) {\n clss.add(hideTitleCls);\n }\n } else {\n clss.remove(openedCls);\n if (this.hideTitle()) {\n clss.remove(hideTitleCls);\n }\n }\n }\n\n private update(): void {\n this.updateCls();\n this.updateHeight();\n this.fullscreen.set(this.fullscreen());\n }\n\n private updateHeight(): void {\n this._height = this.bodyEl.getBoundingClientRect().height - this.el.getBoundingClientRect().top - this.padding();\n this.cdr.detectChanges();\n }\n\n private removeInBody(): void {\n this.bodyEl.classList.remove(wrapCls, openedCls, hideTitleCls);\n }\n\n ngOnInit(): void {\n this.inited = true;\n this.bodyEl.classList.add(wrapCls);\n this.el.id = this.id;\n\n this.updateCls();\n\n // when window resize\n fromEvent(window, 'resize')\n .pipe(takeUntilDestroyed(this.destroy$), debounceTime(200))\n .subscribe(() => this.updateHeight());\n\n // when servier changed\n this.srv.change\n .pipe(\n takeUntilDestroyed(this.destroy$),\n filter(res => res !== null)\n )\n .subscribe(() => this.toggle());\n\n // when router changed\n this.router.events\n .pipe(\n takeUntilDestroyed(this.destroy$),\n filter((e: Event) => e instanceof ActivationStart || e instanceof ActivationEnd),\n debounceTime(200)\n )\n .subscribe(() => {\n if (this.doc.querySelector(`#${this.id}`)) {\n this.bodyEl.classList.add(wrapCls);\n this.updateCls();\n } else {\n this.removeInBody();\n }\n });\n }\n\n toggle(): void {\n this.fullscreen.set(!this.fullscreen());\n this.update();\n this.updateHeight();\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => this.updateHeight());\n }\n\n ngOnChanges(): void {\n if (this.inited) this.update();\n }\n\n ngOnDestroy(): void {\n this.removeInBody();\n }\n}\n","import { Directive, inject } from '@angular/core';\n\nimport { FullContentComponent } from './full-content.component';\n\n@Directive({\n selector: '[full-toggle]',\n exportAs: 'fullToggle',\n host: {\n '(click)': '_click()'\n }\n})\nexport class FullContentToggleDirective {\n private readonly parent = inject(FullContentComponent);\n\n _click(): void {\n this.parent.toggle();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { FullContentToggleDirective } from './full-content-toggle.directive';\nimport { FullContentComponent } from './full-content.component';\n\nconst COMPONENTS = [FullContentComponent, FullContentToggleDirective];\n\n@NgModule({\n imports: [CommonModule, ...COMPONENTS],\n exports: COMPONENTS\n})\nexport class FullContentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAIa,kBAAkB,CAAA;AACrB,IAAA,OAAO,GAAG,IAAI,eAAe,CAAiB,IAAI,CAAC;;IAG3D,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;;AAGzB,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;;uGATxB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cADL,MAAM,EAAA,CAAA;;2FACnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACqBlC,MAAM,OAAO,GAAG,CAAA,kBAAA,CAAoB;AACpC,MAAM,SAAS,GAAG,CAAA,oBAAA,CAAsB;AACxC,MAAM,YAAY,GAAG,CAAA,0BAAA,CAA4B;MAapC,oBAAoB,CAAA;AACd,IAAA,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;AAC7B,IAAA,EAAE,GAAgB,MAAM,CAAC,UAAU,CAAC,CAAC,aAAa;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AA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHlB,YAAY,CAAA,EAAA,CAAA;;2FAGX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,GAAG,UAAU,CAAC;AACtC,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -1,101 +1,120 @@
1
1
  import { Directionality } from '@angular/cdk/bidi';
2
2
  import { NgTemplateOutlet, CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, inject, ChangeDetectorRef, DestroyRef, ContentChildren, NgModule } from '@angular/core';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
+ import { viewChild, input, booleanAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, contentChildren, computed, NgModule } from '@angular/core';
6
5
  import { DomSanitizer } from '@angular/platform-browser';
7
6
  import { Router, RouterModule } from '@angular/router';
8
7
  import { WINDOW } from '@delon/util/token';
9
8
 
10
9
  class GlobalFooterItemComponent {
11
- host;
12
- href;
13
- blankTarget;
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.1.1", type: GlobalFooterItemComponent, isStandalone: true, selector: "global-footer-item", inputs: { href: "href", blankTarget: ["blankTarget", "blankTarget", booleanAttribute] }, viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true, static: true }], exportAs: ["globalFooterItem"], ngImport: i0, template: ` <ng-template #host><ng-content /></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
10
+ host = viewChild.required('host');
11
+ // @ViewChild('host', { static: true }) host!: TemplateRef<void>;
12
+ href = input();
13
+ blankTarget = input(false, { transform: booleanAttribute });
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.4", type: GlobalFooterItemComponent, isStandalone: true, selector: "global-footer-item", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null }, blankTarget: { classPropertyName: "blankTarget", publicName: "blankTarget", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "host", first: true, predicate: ["host"], descendants: true, isSignal: true }], exportAs: ["globalFooterItem"], ngImport: i0, template: `<ng-template #host><ng-content /></ng-template>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterItemComponent, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterItemComponent, decorators: [{
18
18
  type: Component,
19
19
  args: [{
20
20
  selector: 'global-footer-item',
21
21
  exportAs: 'globalFooterItem',
22
- template: ` <ng-template #host><ng-content /></ng-template> `,
23
- preserveWhitespaces: false,
22
+ template: `<ng-template #host><ng-content /></ng-template>`,
24
23
  changeDetection: ChangeDetectionStrategy.OnPush,
25
24
  encapsulation: ViewEncapsulation.None
26
25
  }]
27
- }], propDecorators: { host: [{
28
- type: ViewChild,
29
- args: ['host', { static: true }]
30
- }], href: [{
31
- type: Input
32
- }], blankTarget: [{
33
- type: Input,
34
- args: [{ transform: booleanAttribute }]
35
- }] } });
26
+ }] });
36
27
 
37
28
  class GlobalFooterComponent {
38
29
  router = inject(Router);
39
30
  win = inject(WINDOW);
40
31
  dom = inject(DomSanitizer);
41
- directionality = inject(Directionality);
42
- cdr = inject(ChangeDetectorRef);
43
- destroy$ = inject(DestroyRef);
44
- _links = [];
45
- dir = 'ltr';
46
- set links(val) {
47
- val.forEach(i => (i._title = this.dom.bypassSecurityTrustHtml(i.title)));
48
- this._links = val;
49
- }
50
- get links() {
51
- return this._links;
52
- }
53
- items;
32
+ dir = inject(Directionality).valueSignal;
33
+ links = input([]);
34
+ items = contentChildren(GlobalFooterItemComponent);
35
+ linkHtmls = computed(() => {
36
+ return this.links().map(item => {
37
+ if (typeof item.title === 'string') {
38
+ item.title = this.dom.bypassSecurityTrustHtml(item.title);
39
+ }
40
+ return item;
41
+ });
42
+ });
54
43
  to(item) {
55
- if (!item.href) {
44
+ const href = typeof item.href === 'string' ? item.href : item.href();
45
+ if (!href) {
56
46
  return;
57
47
  }
58
- if (item.blankTarget) {
59
- this.win.open(item.href);
48
+ const blankTarget = typeof item.blankTarget === 'boolean' ? item.blankTarget : item.blankTarget?.();
49
+ if (blankTarget) {
50
+ this.win.open(href);
60
51
  return;
61
52
  }
62
- if (/^https?:\/\//.test(item.href)) {
63
- this.win.location.href = item.href;
53
+ if (/^https?:\/\//.test(href)) {
54
+ this.win.location.href = href;
64
55
  }
65
56
  else {
66
- this.router.navigateByUrl(item.href);
57
+ this.router.navigateByUrl(href);
67
58
  }
68
59
  }
69
- ngOnInit() {
70
- this.dir = this.directionality.value;
71
- this.directionality.change.pipe(takeUntilDestroyed(this.destroy$)).subscribe(direction => {
72
- this.dir = direction;
73
- this.cdr.detectChanges();
74
- });
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
61
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.4", type: GlobalFooterComponent, isStandalone: true, selector: "global-footer", inputs: { links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.global-footer": "true", "class.global-footer-rtl": "dir() === 'rtl'" } }, queries: [{ propertyName: "items", predicate: GlobalFooterItemComponent, isSignal: true }], exportAs: ["globalFooter"], ngImport: i0, template: `
62
+ @if (linkHtmls().length > 0 || items().length > 0) {
63
+ <div class="global-footer__links">
64
+ @for (i of linkHtmls(); track $index) {
65
+ <a class="global-footer__links-item" (click)="to(i)" [innerHTML]="i.title"></a>
66
+ }
67
+ @for (i of items(); track $index) {
68
+ <a class="global-footer__links-item" (click)="to(i)">
69
+ <ng-container *ngTemplateOutlet="i.host()" />
70
+ </a>
71
+ }
72
+ </div>
75
73
  }
76
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
77
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.1", type: GlobalFooterComponent, isStandalone: true, selector: "global-footer", inputs: { links: "links" }, host: { properties: { "class.global-footer": "true", "class.global-footer-rtl": "dir === 'rtl'" } }, queries: [{ propertyName: "items", predicate: GlobalFooterItemComponent }], exportAs: ["globalFooter"], ngImport: i0, template: "@if (links.length > 0 || items.length > 0) {\n <div class=\"global-footer__links\">\n @for (i of links; track $index) {\n <a class=\"global-footer__links-item\" (click)=\"to(i)\" [innerHTML]=\"i._title\"></a>\n }\n @for (i of items; track $index) {\n <a class=\"global-footer__links-item\" (click)=\"to(i)\">\n <ng-container *ngTemplateOutlet=\"i.host\" />\n </a>\n }\n </div>\n}\n<div class=\"global-footer__copyright\">\n <ng-content />\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
74
+ <div class="global-footer__copyright">
75
+ <ng-content />
76
+ </div>
77
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
78
78
  }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterComponent, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterComponent, decorators: [{
80
80
  type: Component,
81
- args: [{ selector: 'global-footer', exportAs: 'globalFooter', host: {
81
+ args: [{
82
+ selector: 'global-footer',
83
+ exportAs: 'globalFooter',
84
+ template: `
85
+ @if (linkHtmls().length > 0 || items().length > 0) {
86
+ <div class="global-footer__links">
87
+ @for (i of linkHtmls(); track $index) {
88
+ <a class="global-footer__links-item" (click)="to(i)" [innerHTML]="i.title"></a>
89
+ }
90
+ @for (i of items(); track $index) {
91
+ <a class="global-footer__links-item" (click)="to(i)">
92
+ <ng-container *ngTemplateOutlet="i.host()" />
93
+ </a>
94
+ }
95
+ </div>
96
+ }
97
+ <div class="global-footer__copyright">
98
+ <ng-content />
99
+ </div>
100
+ `,
101
+ host: {
82
102
  '[class.global-footer]': 'true',
83
- '[class.global-footer-rtl]': `dir === 'rtl'`
84
- }, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet], template: "@if (links.length > 0 || items.length > 0) {\n <div class=\"global-footer__links\">\n @for (i of links; track $index) {\n <a class=\"global-footer__links-item\" (click)=\"to(i)\" [innerHTML]=\"i._title\"></a>\n }\n @for (i of items; track $index) {\n <a class=\"global-footer__links-item\" (click)=\"to(i)\">\n <ng-container *ngTemplateOutlet=\"i.host\" />\n </a>\n }\n </div>\n}\n<div class=\"global-footer__copyright\">\n <ng-content />\n</div>\n" }]
85
- }], propDecorators: { links: [{
86
- type: Input
87
- }], items: [{
88
- type: ContentChildren,
89
- args: [GlobalFooterItemComponent]
90
- }] } });
103
+ '[class.global-footer-rtl]': `dir() === 'rtl'`
104
+ },
105
+ changeDetection: ChangeDetectionStrategy.OnPush,
106
+ encapsulation: ViewEncapsulation.None,
107
+ imports: [NgTemplateOutlet]
108
+ }]
109
+ }] });
91
110
 
92
111
  const COMPONENTS = [GlobalFooterComponent, GlobalFooterItemComponent];
93
112
  class GlobalFooterModule {
94
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
95
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterModule, imports: [CommonModule, RouterModule, GlobalFooterComponent, GlobalFooterItemComponent], exports: [GlobalFooterComponent, GlobalFooterItemComponent] });
96
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterModule, imports: [CommonModule, RouterModule] });
113
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
114
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterModule, imports: [CommonModule, RouterModule, GlobalFooterComponent, GlobalFooterItemComponent], exports: [GlobalFooterComponent, GlobalFooterItemComponent] });
115
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterModule, imports: [CommonModule, RouterModule] });
97
116
  }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.1", ngImport: i0, type: GlobalFooterModule, decorators: [{
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: GlobalFooterModule, decorators: [{
99
118
  type: NgModule,
100
119
  args: [{
101
120
  imports: [CommonModule, RouterModule, ...COMPONENTS],