@delon/abc 13.0.0 → 13.2.1

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 (182) hide show
  1. package/README.md +1 -1
  2. package/auto-focus/auto-focus.directive.d.ts +3 -1
  3. package/ellipsis/ellipsis.component.d.ts +1 -0
  4. package/error-collect/error-collect.component.d.ts +4 -2
  5. package/esm2020/auto-focus/auto-focus.directive.mjs +9 -7
  6. package/esm2020/auto-focus/auto-focus.module.mjs +4 -4
  7. package/esm2020/avatar-list/avatar-list-item.component.mjs +3 -3
  8. package/esm2020/avatar-list/avatar-list.component.mjs +3 -3
  9. package/esm2020/avatar-list/avatar-list.module.mjs +4 -4
  10. package/esm2020/count-down/count-down.component.mjs +3 -3
  11. package/esm2020/count-down/count-down.module.mjs +4 -4
  12. package/esm2020/date-picker/date-picker.module.mjs +4 -4
  13. package/esm2020/date-picker/range-shortcut.component.mjs +3 -3
  14. package/esm2020/date-picker/range.directive.mjs +3 -3
  15. package/esm2020/down-file/down-file.directive.mjs +3 -3
  16. package/esm2020/down-file/down-file.module.mjs +4 -4
  17. package/esm2020/ellipsis/ellipsis.component.mjs +8 -5
  18. package/esm2020/ellipsis/ellipsis.module.mjs +4 -4
  19. package/esm2020/error-collect/error-collect.component.mjs +12 -8
  20. package/esm2020/error-collect/error-collect.module.mjs +4 -4
  21. package/esm2020/exception/exception.component.mjs +3 -3
  22. package/esm2020/exception/exception.module.mjs +4 -4
  23. package/esm2020/footer-toolbar/footer-toolbar.component.mjs +3 -3
  24. package/esm2020/footer-toolbar/footer-toolbar.module.mjs +4 -4
  25. package/esm2020/full-content/full-content-toggle.directive.mjs +3 -3
  26. package/esm2020/full-content/full-content.component.mjs +17 -15
  27. package/esm2020/full-content/full-content.module.mjs +4 -4
  28. package/esm2020/full-content/full-content.service.mjs +3 -3
  29. package/esm2020/global-footer/global-footer-item.component.mjs +3 -3
  30. package/esm2020/global-footer/global-footer.component.mjs +3 -3
  31. package/esm2020/global-footer/global-footer.module.mjs +4 -4
  32. package/esm2020/image/image.directive.mjs +3 -3
  33. package/esm2020/image/image.module.mjs +4 -4
  34. package/esm2020/let/let.directive.mjs +3 -3
  35. package/esm2020/let/let.module.mjs +4 -4
  36. package/esm2020/loading/loading.component.mjs +3 -3
  37. package/esm2020/loading/loading.module.mjs +4 -4
  38. package/esm2020/loading/loading.service.mjs +3 -3
  39. package/esm2020/lodop/lodop.module.mjs +4 -4
  40. package/esm2020/lodop/lodop.service.mjs +3 -3
  41. package/esm2020/media/media.component.mjs +25 -13
  42. package/esm2020/media/media.module.mjs +4 -4
  43. package/esm2020/media/media.service.mjs +6 -5
  44. package/esm2020/media/public_api.mjs +1 -2
  45. package/esm2020/notice-icon/notice-icon-tab.component.mjs +3 -3
  46. package/esm2020/notice-icon/notice-icon.component.mjs +3 -3
  47. package/esm2020/notice-icon/notice-icon.module.mjs +4 -4
  48. package/esm2020/onboarding/onboarding.component.mjs +3 -3
  49. package/esm2020/onboarding/onboarding.module.mjs +4 -4
  50. package/esm2020/onboarding/onboarding.service.mjs +3 -3
  51. package/esm2020/page-header/page-header.component.mjs +3 -3
  52. package/esm2020/page-header/page-header.module.mjs +4 -4
  53. package/esm2020/pdf/pdf.component.mjs +27 -13
  54. package/esm2020/pdf/pdf.module.mjs +4 -4
  55. package/esm2020/qr/qr.component.mjs +5 -5
  56. package/esm2020/qr/qr.module.mjs +4 -4
  57. package/esm2020/quick-menu/quick-menu.component.mjs +3 -3
  58. package/esm2020/quick-menu/quick-menu.module.mjs +4 -4
  59. package/esm2020/result/result.component.mjs +3 -3
  60. package/esm2020/result/result.module.mjs +4 -4
  61. package/esm2020/reuse-tab/reuse-tab-context-menu.component.mjs +3 -3
  62. package/esm2020/reuse-tab/reuse-tab-context.component.mjs +3 -3
  63. package/esm2020/reuse-tab/reuse-tab-context.directive.mjs +3 -3
  64. package/esm2020/reuse-tab/reuse-tab-context.service.mjs +3 -3
  65. package/esm2020/reuse-tab/reuse-tab.component.mjs +3 -3
  66. package/esm2020/reuse-tab/reuse-tab.module.mjs +4 -4
  67. package/esm2020/reuse-tab/reuse-tab.service.mjs +3 -3
  68. package/esm2020/se/se-container.component.mjs +6 -6
  69. package/esm2020/se/se.component.mjs +11 -13
  70. package/esm2020/se/se.module.mjs +4 -4
  71. package/esm2020/sg/sg-container.component.mjs +3 -3
  72. package/esm2020/sg/sg.component.mjs +3 -3
  73. package/esm2020/sg/sg.module.mjs +4 -4
  74. package/esm2020/st/st-column-source.mjs +3 -3
  75. package/esm2020/st/st-data-source.mjs +3 -3
  76. package/esm2020/st/st-export.mjs +3 -3
  77. package/esm2020/st/st-filter.component.mjs +3 -3
  78. package/esm2020/st/st-row.directive.mjs +6 -6
  79. package/esm2020/st/st-widget-host.directive.mjs +3 -3
  80. package/esm2020/st/st-widget.mjs +3 -3
  81. package/esm2020/st/st.component.mjs +6 -6
  82. package/esm2020/st/st.module.mjs +4 -4
  83. package/esm2020/sv/sv-container.component.mjs +6 -6
  84. package/esm2020/sv/sv-value.component.mjs +3 -3
  85. package/esm2020/sv/sv.component.mjs +3 -3
  86. package/esm2020/sv/sv.module.mjs +4 -4
  87. package/esm2020/tag-select/tag-select.component.mjs +3 -3
  88. package/esm2020/tag-select/tag-select.module.mjs +4 -4
  89. package/esm2020/xlsx/xlsx.directive.mjs +3 -3
  90. package/esm2020/xlsx/xlsx.module.mjs +4 -4
  91. package/esm2020/xlsx/xlsx.service.mjs +3 -3
  92. package/esm2020/zip/zip.module.mjs +4 -4
  93. package/esm2020/zip/zip.service.mjs +3 -3
  94. package/fesm2015/auto-focus.mjs +12 -10
  95. package/fesm2015/auto-focus.mjs.map +1 -1
  96. package/fesm2015/avatar-list.mjs +10 -10
  97. package/fesm2015/count-down.mjs +7 -7
  98. package/fesm2015/date-picker.mjs +10 -10
  99. package/fesm2015/down-file.mjs +7 -7
  100. package/fesm2015/ellipsis.mjs +11 -8
  101. package/fesm2015/ellipsis.mjs.map +1 -1
  102. package/fesm2015/error-collect.mjs +15 -11
  103. package/fesm2015/error-collect.mjs.map +1 -1
  104. package/fesm2015/exception.mjs +7 -7
  105. package/fesm2015/footer-toolbar.mjs +7 -7
  106. package/fesm2015/full-content.mjs +26 -25
  107. package/fesm2015/full-content.mjs.map +1 -1
  108. package/fesm2015/global-footer.mjs +10 -10
  109. package/fesm2015/image.mjs +7 -7
  110. package/fesm2015/let.mjs +7 -7
  111. package/fesm2015/loading.mjs +10 -10
  112. package/fesm2015/lodop.mjs +7 -7
  113. package/fesm2015/media.mjs +32 -21
  114. package/fesm2015/media.mjs.map +1 -1
  115. package/fesm2015/notice-icon.mjs +10 -10
  116. package/fesm2015/onboarding.mjs +10 -10
  117. package/fesm2015/page-header.mjs +7 -7
  118. package/fesm2015/pdf.mjs +32 -17
  119. package/fesm2015/pdf.mjs.map +1 -1
  120. package/fesm2015/qr.mjs +8 -8
  121. package/fesm2015/qr.mjs.map +1 -1
  122. package/fesm2015/quick-menu.mjs +7 -7
  123. package/fesm2015/result.mjs +7 -7
  124. package/fesm2015/reuse-tab.mjs +22 -22
  125. package/fesm2015/se.mjs +20 -22
  126. package/fesm2015/se.mjs.map +1 -1
  127. package/fesm2015/sg.mjs +10 -10
  128. package/fesm2015/st.mjs +34 -34
  129. package/fesm2015/sv.mjs +16 -16
  130. package/fesm2015/tag-select.mjs +7 -7
  131. package/fesm2015/xlsx.mjs +10 -10
  132. package/fesm2015/zip.mjs +7 -7
  133. package/fesm2020/auto-focus.mjs +12 -10
  134. package/fesm2020/auto-focus.mjs.map +1 -1
  135. package/fesm2020/avatar-list.mjs +10 -10
  136. package/fesm2020/count-down.mjs +7 -7
  137. package/fesm2020/date-picker.mjs +10 -10
  138. package/fesm2020/down-file.mjs +7 -7
  139. package/fesm2020/ellipsis.mjs +11 -8
  140. package/fesm2020/ellipsis.mjs.map +1 -1
  141. package/fesm2020/error-collect.mjs +15 -11
  142. package/fesm2020/error-collect.mjs.map +1 -1
  143. package/fesm2020/exception.mjs +7 -7
  144. package/fesm2020/footer-toolbar.mjs +7 -7
  145. package/fesm2020/full-content.mjs +26 -24
  146. package/fesm2020/full-content.mjs.map +1 -1
  147. package/fesm2020/global-footer.mjs +10 -10
  148. package/fesm2020/image.mjs +7 -7
  149. package/fesm2020/let.mjs +7 -7
  150. package/fesm2020/loading.mjs +10 -10
  151. package/fesm2020/lodop.mjs +7 -7
  152. package/fesm2020/media.mjs +32 -21
  153. package/fesm2020/media.mjs.map +1 -1
  154. package/fesm2020/notice-icon.mjs +10 -10
  155. package/fesm2020/onboarding.mjs +10 -10
  156. package/fesm2020/page-header.mjs +7 -7
  157. package/fesm2020/pdf.mjs +31 -17
  158. package/fesm2020/pdf.mjs.map +1 -1
  159. package/fesm2020/qr.mjs +8 -8
  160. package/fesm2020/qr.mjs.map +1 -1
  161. package/fesm2020/quick-menu.mjs +7 -7
  162. package/fesm2020/result.mjs +7 -7
  163. package/fesm2020/reuse-tab.mjs +22 -22
  164. package/fesm2020/se.mjs +20 -22
  165. package/fesm2020/se.mjs.map +1 -1
  166. package/fesm2020/sg.mjs +10 -10
  167. package/fesm2020/st.mjs +34 -34
  168. package/fesm2020/sv.mjs +16 -16
  169. package/fesm2020/tag-select.mjs +7 -7
  170. package/fesm2020/xlsx.mjs +10 -10
  171. package/fesm2020/zip.mjs +7 -7
  172. package/full-content/full-content.component.d.ts +1 -3
  173. package/media/media.component.d.ts +11 -12
  174. package/media/public_api.d.ts +0 -1
  175. package/package.json +5 -4
  176. package/pdf/pdf.component.d.ts +2 -1
  177. package/pdf/style/index.less +2 -2
  178. package/qr/qr.component.d.ts +1 -1
  179. package/se/se.component.d.ts +1 -1
  180. package/se/style/index.less +2 -0
  181. package/esm2020/media/plyr.types.mjs +0 -2
  182. package/media/plyr.types.d.ts +0 -58
@@ -1 +1 @@
1
- {"version":3,"file":"pdf.mjs","sources":["../../../../packages/abc/pdf/pdf.config.ts","../../../../packages/abc/pdf/pdf.types.ts","../../../../packages/abc/pdf/pdf.component.ts","../../../../packages/abc/pdf/pdf.module.ts","../../../../packages/abc/pdf/pdf.ts"],"sourcesContent":["import { AlainPdfConfig } from '@delon/util/config';\n\nexport const PDF_DEFULAT_CONFIG: AlainPdfConfig = {\n lib: `https://cdn.jsdelivr.net/npm/pdfjs-dist@2.x/`,\n showAll: true,\n renderText: true,\n showBorders: false,\n originalSize: true,\n fitToPage: false,\n autoReSize: true\n};\n","import type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport type PdfChangeEventType =\n | 'loaded'\n | 'load-progress'\n | 'pages-init'\n | 'page-rendered'\n | 'text-layer-rendered'\n | 'pi'\n | 'error';\nexport type PdfZoomScale = 'page-height' | 'page-fit' | 'page-width';\n\nexport interface PdfChangeEvent {\n type?: PdfChangeEventType;\n pi?: number;\n total?: number;\n pdf?: NzSafeAny;\n ev?: NzSafeAny;\n progress?: { loaded: number; total: number };\n error?: NzSafeAny;\n}\n\nexport enum PdfTextLayerMode {\n DISABLE = 0,\n ENABLE = 1,\n ENABLE_ENHANCE = 2\n}\n\nexport enum PdfExternalLinkTarget {\n NONE = 0, // Default value.\n SELF = 1,\n BLANK = 2,\n PARENT = 3,\n TOP = 4\n}\n","import { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n SimpleChange,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent, Subject } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport { LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { PDF_DEFULAT_CONFIG } from './pdf.config';\nimport { PdfChangeEvent, PdfChangeEventType, PdfExternalLinkTarget, PdfTextLayerMode, PdfZoomScale } from './pdf.types';\n\nconst CSS_UNITS: number = 96.0 / 72.0;\nconst BORDER_WIDTH = 9;\n\n@Component({\n selector: 'pdf',\n exportAs: 'pdf',\n template: `\n <nz-skeleton *ngIf=\"!inited || loading\"></nz-skeleton>\n <div class=\"pdf-container\">\n <div class=\"pdfViewer\"></div>\n </div>\n `,\n host: {\n '[class.d-block]': `true`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class PdfComponent implements OnChanges, AfterViewInit, OnDestroy {\n static ngAcceptInputType_pi: NumberInput;\n static ngAcceptInputType_delay: NumberInput;\n static ngAcceptInputType_showAllPages: BooleanInput;\n static ngAcceptInputType_stickToPage: BooleanInput;\n static ngAcceptInputType_originalSize: BooleanInput;\n static ngAcceptInputType_fitToPage: BooleanInput;\n static ngAcceptInputType_disableTextLayer: BooleanInput;\n static ngAcceptInputType_removePageBorders: BooleanInput;\n\n inited = false;\n private unsubscribe$ = new Subject<void>();\n private lib: string = '';\n private _pdf: NzSafeAny;\n private loadingTask: NzSafeAny;\n private _src: NzSafeAny;\n private lastSrc?: string;\n private _pi = 1;\n private _total = 0;\n private _showAll = true;\n private _rotation = 0;\n private _zoom = 1;\n private _renderText = true;\n private _loading = false;\n\n private multiPageViewer: NzSafeAny;\n private multiPageLinkService: NzSafeAny;\n private multiPageFindController: NzSafeAny;\n private singlePageViewer: NzSafeAny;\n private singlePageLinkService: NzSafeAny;\n private singlePageFindController: NzSafeAny;\n\n @Input() set src(dataOrBuffer: NzSafeAny) {\n this._src = dataOrBuffer;\n this.load();\n }\n @Input()\n @InputNumber()\n set pi(val: number) {\n this._pi = this.getValidPi(val);\n if (this._pdf) {\n this.pageViewer.scrollPageIntoView({ pageNumber: this._pi });\n }\n }\n @Input() @InputBoolean() set showAll(val: boolean) {\n this._showAll = val;\n this.resetDoc();\n }\n @Input() @InputBoolean() set renderText(val: boolean) {\n this._renderText = val;\n if (this._pdf) {\n this.pageViewer.textLayerMode = this._textLayerMode;\n this.resetDoc();\n }\n }\n @Input() textLayerMode: PdfTextLayerMode = PdfTextLayerMode.ENABLE;\n @Input() @InputBoolean() showBorders = false;\n @Input() @InputBoolean() stickToPage = false;\n @Input() @InputBoolean() originalSize = true;\n @Input() @InputBoolean() fitToPage = false;\n @Input() @InputNumber() set zoom(val: number) {\n if (val <= 0) return;\n this._zoom = val;\n }\n @Input() zoomScale: PdfZoomScale = 'page-width';\n @Input() @InputNumber() set rotation(val: number) {\n if (val % 90 !== 0) {\n console.warn(`Invalid rotation angle, shoule be divisible by 90.`);\n return;\n }\n this._rotation = val;\n }\n @Input() @InputBoolean() autoReSize = true;\n @Input() externalLinkTarget: PdfExternalLinkTarget = PdfExternalLinkTarget.BLANK;\n @Input() @InputNumber() delay?: number;\n @Output() readonly change = new EventEmitter<PdfChangeEvent>();\n\n get loading(): boolean {\n return this._loading;\n }\n\n get pdf(): NzSafeAny {\n return this._pdf;\n }\n\n get findController(): NzSafeAny {\n return this._showAll ? this.multiPageFindController : this.singlePageFindController;\n }\n\n get pageViewer(): NzSafeAny {\n return this._showAll ? this.multiPageViewer : this.singlePageViewer;\n }\n\n get linkService(): NzSafeAny {\n return this._showAll ? this.multiPageLinkService : this.singlePageLinkService;\n }\n\n private get _textLayerMode(): PdfTextLayerMode {\n return this._renderText ? this.textLayerMode : PdfTextLayerMode.DISABLE;\n }\n\n private get win(): NzSafeAny {\n return this.doc.defaultView || window;\n }\n\n private get el(): HTMLElement {\n return this._el.nativeElement.querySelector('.pdf-container') as HTMLElement;\n }\n\n constructor(\n private ngZone: NgZone,\n configSrv: AlainConfigService,\n private lazySrv: LazyService,\n private platform: Platform,\n private _el: ElementRef<HTMLElement>,\n @Optional() @Inject(DOCUMENT) private doc: NzSafeAny,\n private cdr: ChangeDetectorRef\n ) {\n const cog = configSrv.merge('pdf', PDF_DEFULAT_CONFIG)!;\n Object.assign(this, cog);\n\n const lib = cog.lib!;\n this.lib = lib.endsWith('/') ? lib : `${lib}/`;\n }\n\n private getValidPi(pi: number): number {\n if (pi < 1) return 1;\n const pdf = this._pdf;\n return pdf && pi > pdf.numPages ? pdf.numPages : pi;\n }\n\n private emit(type: PdfChangeEventType, opt?: PdfChangeEvent): void {\n this.ngZone.run(() =>\n this.change.emit({\n type,\n pdf: this._pdf,\n pi: this._pi,\n total: this._total,\n ...opt\n })\n );\n }\n\n private initDelay(): void {\n this.inited = true;\n this.cdr.detectChanges();\n this.win.pdfjsLib.GlobalWorkerOptions.workerSrc = `${this.lib}build/pdf.worker.min.js`;\n\n setTimeout(() => this.load(), this.delay);\n }\n\n setLoading(status: boolean): void {\n this.ngZone.run(() => {\n this._loading = status;\n this.cdr.detectChanges();\n });\n }\n\n @ZoneOutside()\n private load(): void {\n const { _src } = this;\n if (!this.inited || !_src) {\n return;\n }\n\n if (this.lastSrc === _src) {\n this.render();\n return;\n }\n\n this.destroy();\n this.ngZone.run(() => {\n this._loading = true;\n this.cdr.detectChanges();\n });\n this.setLoading(true);\n const loadingTask = (this.loadingTask = this.win.pdfjsLib.getDocument(_src));\n loadingTask.onProgress = (progress: { loaded: number; total: number }) => this.emit('load-progress', { progress });\n (loadingTask.promise as PromiseLike<void>)\n .then(\n (pdf: NzSafeAny) => {\n this._pdf = pdf;\n this.lastSrc = _src;\n this._total = pdf.numPages;\n\n this.emit('loaded');\n\n if (!this.pageViewer) {\n this.setupPageViewer();\n }\n\n this.resetDoc();\n this.render();\n },\n (error: NzSafeAny) => this.emit('error', { error })\n )\n .then(() => this.setLoading(false));\n }\n\n @ZoneOutside()\n private resetDoc(): void {\n const pdf = this._pdf;\n if (!pdf) {\n return;\n }\n this.cleanDoc();\n\n this.findController.setDocument(pdf);\n this.pageViewer.setDocument(pdf);\n this.linkService.setDocument(pdf, null);\n }\n\n private cleanDoc(): void {\n this.multiPageViewer.setDocument(null);\n this.singlePageViewer.setDocument(null);\n\n this.multiPageLinkService.setDocument(null, null);\n this.singlePageLinkService.setDocument(null, null);\n\n this.multiPageFindController.setDocument(null);\n this.singlePageFindController.setDocument(null);\n }\n\n private render(): void {\n const currentViewer = this.pageViewer;\n if (!currentViewer) {\n return;\n }\n\n if (this._rotation !== 0 || currentViewer.pagesRotation !== this._rotation) {\n setTimeout(() => {\n currentViewer.pagesRotation = this._rotation;\n });\n }\n\n if (this.stickToPage) {\n setTimeout(() => {\n currentViewer.currentPageNumber = this._pi;\n });\n }\n\n this.updateSize();\n }\n\n @ZoneOutside()\n private updateSize(): void {\n const currentViewer = this.pageViewer;\n this._pdf.getPage(currentViewer.currentPageNumber).then((page: NzSafeAny) => {\n const { _rotation, _zoom } = this;\n const rotation = _rotation || page.rotate;\n const viewportWidth =\n page.getViewport({\n scale: _zoom,\n rotation\n }).width * CSS_UNITS;\n let scale = _zoom;\n let stickToPage = true;\n\n // Scale the document when it shouldn't be in original size or doesn't fit into the viewport\n if (!this.originalSize || (this.fitToPage && viewportWidth > this.el.clientWidth)) {\n const viewPort = page.getViewport({ scale: 1, rotation });\n scale = this.getScale(viewPort.width, viewPort.height);\n stickToPage = !this.stickToPage;\n }\n\n currentViewer._setScale(scale, stickToPage);\n });\n }\n\n private getScale(viewportWidth: number, viewportHeight: number): number {\n const borderSize = this.showBorders ? 2 * BORDER_WIDTH : 0;\n const el = this.el;\n const containerWidth = el.clientWidth - borderSize;\n const containerHeight = el.clientHeight - borderSize;\n\n if (containerHeight === 0 || viewportHeight === 0 || containerWidth === 0 || viewportWidth === 0) {\n return 1;\n }\n\n let ratio = 1;\n switch (this.zoomScale) {\n case 'page-fit':\n ratio = Math.min(containerHeight / viewportHeight, containerWidth / viewportWidth);\n break;\n case 'page-height':\n ratio = containerHeight / viewportHeight;\n break;\n case 'page-width':\n default:\n ratio = containerWidth / viewportWidth;\n break;\n }\n\n return (this._zoom * ratio) / CSS_UNITS;\n }\n\n @ZoneOutside()\n private destroy(): void {\n const { loadingTask } = this;\n if (loadingTask && !loadingTask.destroyed) {\n loadingTask.destroy();\n }\n if (this._pdf) {\n this._pdf.destroy();\n this._pdf = null;\n this.cleanDoc();\n }\n }\n\n private setupPageViewer(): void {\n this.win.pdfjsLib.disableTextLayer = !this._renderText;\n this.win.pdfjsLib.externalLinkTarget = this.externalLinkTarget;\n\n this.setupMultiPageViewer();\n this.setupSinglePageViewer();\n }\n\n private createEventBus(): NzSafeAny {\n const eventBus = new this.win.pdfjsViewer.EventBus();\n eventBus.on(`pagesinit`, (ev: NzSafeAny) => {\n this.emit('pages-init', { ev });\n });\n eventBus.on(`pagerendered`, (ev: NzSafeAny) => {\n this.emit('page-rendered', { ev });\n });\n eventBus.on(`pagechanging`, (ev: NzSafeAny) => {\n const nowPi = ev.pageNumber;\n if (nowPi !== this._pi) {\n this._pi = nowPi;\n this.emit('pi', { ev });\n }\n });\n eventBus.on(`textlayerrendered`, (ev: NzSafeAny) => {\n this.emit('text-layer-rendered', { ev });\n });\n return eventBus;\n }\n\n private setupMultiPageViewer(): void {\n const VIEWER = this.win.pdfjsViewer;\n\n const eventBus = this.createEventBus();\n const linkService = (this.multiPageLinkService = new VIEWER.PDFLinkService({\n eventBus\n }));\n const findController = (this.multiPageFindController = new VIEWER.PDFFindController({\n eventBus,\n linkService\n }));\n\n const viewer = (this.multiPageViewer = new VIEWER.PDFViewer({\n eventBus,\n container: this.el,\n removePageBorders: !this.showBorders,\n textLayerMode: this._textLayerMode,\n linkService,\n findController\n }));\n linkService.setViewer(viewer);\n }\n\n private setupSinglePageViewer(): void {\n const VIEWER = this.win.pdfjsViewer;\n\n const eventBus = this.createEventBus();\n const linkService = (this.singlePageLinkService = new VIEWER.PDFLinkService({\n eventBus\n }));\n const findController = (this.singlePageFindController = new VIEWER.PDFFindController({\n eventBus,\n linkService\n }));\n\n const pageViewer = (this.singlePageViewer = new VIEWER.PDFSinglePageViewer({\n eventBus,\n container: this.el,\n removePageBorders: !this.showBorders,\n textLayerMode: this._textLayerMode,\n linkService,\n findController\n }));\n linkService.setViewer(pageViewer);\n pageViewer._currentPageNumber = this._pi;\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if (this.win.pdfjsLib) {\n this.initDelay();\n return;\n }\n const { lib } = this;\n this.lazySrv\n .load(`${lib}build/pdf.min.js`)\n .then(() => this.lazySrv.load([`${lib}web/pdf_viewer.js`, `${lib}web/pdf_viewer.css`]))\n .then(() => this.initDelay());\n\n this.ngZone.runOutsideAngular(() => this.initResize());\n }\n\n private initResize(): void {\n fromEvent(this.win, 'resize')\n .pipe(\n debounceTime(100),\n filter(() => this.autoReSize && this._pdf),\n takeUntil(this.unsubscribe$)\n )\n .subscribe(() => this.updateSize());\n }\n\n ngOnChanges(changes: { [p in keyof PdfComponent]?: SimpleChange }): void {\n if (this.inited && !changes.src) {\n this.render();\n }\n }\n\n ngOnDestroy(): void {\n const { unsubscribe$ } = this;\n unsubscribe$.next();\n unsubscribe$.complete();\n\n this.destroy();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { PdfComponent } from './pdf.component';\n\nconst COMPONENTS = [PdfComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdfModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAEa,kBAAkB,GAAmB;IAChD,GAAG,EAAE,8CAA8C;IACnD,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,IAAI;;;ICaN;AAAZ,WAAY,gBAAgB;IAC1B,6DAAW,CAAA;IACX,2DAAU,CAAA;IACV,2EAAkB,CAAA;AACpB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;IAEW;AA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,MAAM;2BAAC,QAAQ;4EAnFjB,GAAG;sBAAf,KAAK;gBAMF,EAAE;sBAFL,KAAK;gBAQuB,OAAO;sBAAnC,KAAK;gBAIuB,UAAU;sBAAtC,KAAK;gBAOG,aAAa;sBAArB,KAAK;gBACmB,WAAW;sBAAnC,KAAK;gBACmB,WAAW;sBAAnC,KAAK;gBACmB,YAAY;sBAApC,KAAK;gBACmB,SAAS;sBAAjC,KAAK;gBACsB,IAAI;sBAA/B,KAAK;gBAIG,SAAS;sBAAjB,KAAK;gBACsB,QAAQ;sBAAnC,KAAK;gBAOmB,UAAU;sBAAlC,KAAK;gBACG,kBAAkB;sBAA1B,KAAK;gBACkB,KAAK;sBAA5B,KAAK;gBACa,MAAM;sBAAxB,MAAM;gBAoFC,IAAI,MAyCJ,QAAQ,MA6CR,UAAU,MAoDV,OAAO;;ACnVjB,MAAM,UAAU,GAAG,CAAC,YAAY,CAAC,CAAC;MAOrB,SAAS;;sGAAT,SAAS;uGAAT,SAAS,iBAPF,YAAY,aAGpB,YAAY,EAAE,gBAAgB,aAHtB,YAAY;uGAOnB,SAAS,YAJX,CAAC,YAAY,EAAE,gBAAgB,CAAC;2FAI9B,SAAS;kBALrB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
1
+ {"version":3,"file":"pdf.mjs","sources":["../../../../packages/abc/pdf/pdf.config.ts","../../../../packages/abc/pdf/pdf.types.ts","../../../../packages/abc/pdf/pdf.component.ts","../../../../packages/abc/pdf/pdf.module.ts","../../../../packages/abc/pdf/pdf.ts"],"sourcesContent":["import { AlainPdfConfig } from '@delon/util/config';\n\nexport const PDF_DEFULAT_CONFIG: AlainPdfConfig = {\n lib: `https://cdn.jsdelivr.net/npm/pdfjs-dist@2.x/`,\n showAll: true,\n renderText: true,\n showBorders: false,\n originalSize: true,\n fitToPage: false,\n autoReSize: true\n};\n","import type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nexport type PdfChangeEventType =\n | 'loaded'\n | 'load-progress'\n | 'pages-init'\n | 'page-rendered'\n | 'text-layer-rendered'\n | 'pi'\n | 'error';\nexport type PdfZoomScale = 'page-height' | 'page-fit' | 'page-width';\n\nexport interface PdfChangeEvent {\n type?: PdfChangeEventType;\n pi?: number;\n total?: number;\n pdf?: NzSafeAny;\n ev?: NzSafeAny;\n progress?: { loaded: number; total: number };\n error?: NzSafeAny;\n}\n\nexport enum PdfTextLayerMode {\n DISABLE = 0,\n ENABLE = 1,\n ENABLE_ENHANCE = 2\n}\n\nexport enum PdfExternalLinkTarget {\n NONE = 0, // Default value.\n SELF = 1,\n BLANK = 2,\n PARENT = 3,\n TOP = 4\n}\n","import { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n SimpleChange,\n ViewEncapsulation\n} from '@angular/core';\nimport { fromEvent, Subject, timer } from 'rxjs';\nimport { debounceTime, filter, takeUntil } from 'rxjs/operators';\n\nimport { AlainConfigService } from '@delon/util/config';\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput, ZoneOutside } from '@delon/util/decorator';\nimport { LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { PDF_DEFULAT_CONFIG } from './pdf.config';\nimport { PdfChangeEvent, PdfChangeEventType, PdfExternalLinkTarget, PdfTextLayerMode, PdfZoomScale } from './pdf.types';\n\nconst CSS_UNITS: number = 96.0 / 72.0;\nconst BORDER_WIDTH = 9;\n\n@Component({\n selector: 'pdf',\n exportAs: 'pdf',\n template: `\n <nz-skeleton *ngIf=\"!inited || loading\"></nz-skeleton>\n <div class=\"pdf-container\">\n <div class=\"pdfViewer\"></div>\n </div>\n `,\n host: {\n '[class.d-block]': `true`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class PdfComponent implements OnChanges, AfterViewInit, OnDestroy {\n static ngAcceptInputType_pi: NumberInput;\n static ngAcceptInputType_delay: NumberInput;\n static ngAcceptInputType_showAllPages: BooleanInput;\n static ngAcceptInputType_stickToPage: BooleanInput;\n static ngAcceptInputType_originalSize: BooleanInput;\n static ngAcceptInputType_fitToPage: BooleanInput;\n static ngAcceptInputType_disableTextLayer: BooleanInput;\n static ngAcceptInputType_removePageBorders: BooleanInput;\n\n inited = false;\n private destroy$ = new Subject<void>();\n private lib: string = '';\n private _pdf: NzSafeAny;\n private loadingTask: NzSafeAny;\n private _src: NzSafeAny;\n private lastSrc?: string;\n private _pi = 1;\n private _total = 0;\n private _showAll = true;\n private _rotation = 0;\n private _zoom = 1;\n private _renderText = true;\n private _loading = false;\n\n private multiPageViewer: NzSafeAny;\n private multiPageLinkService: NzSafeAny;\n private multiPageFindController: NzSafeAny;\n private singlePageViewer: NzSafeAny;\n private singlePageLinkService: NzSafeAny;\n private singlePageFindController: NzSafeAny;\n\n @Input() set src(dataOrBuffer: NzSafeAny) {\n this._src = dataOrBuffer;\n this.load();\n }\n @Input()\n @InputNumber()\n set pi(val: number) {\n this._pi = this.getValidPi(val);\n if (this._pdf) {\n this.pageViewer.scrollPageIntoView({ pageNumber: this._pi });\n }\n }\n @Input() @InputBoolean() set showAll(val: boolean) {\n this._showAll = val;\n this.resetDoc();\n }\n @Input() @InputBoolean() set renderText(val: boolean) {\n this._renderText = val;\n if (this._pdf) {\n this.pageViewer.textLayerMode = this._textLayerMode;\n this.resetDoc();\n }\n }\n @Input() textLayerMode: PdfTextLayerMode = PdfTextLayerMode.ENABLE;\n @Input() @InputBoolean() showBorders = false;\n @Input() @InputBoolean() stickToPage = false;\n @Input() @InputBoolean() originalSize = true;\n @Input() @InputBoolean() fitToPage = false;\n @Input() @InputNumber() set zoom(val: number) {\n if (val <= 0) return;\n this._zoom = val;\n }\n @Input() zoomScale: PdfZoomScale = 'page-width';\n @Input() @InputNumber() set rotation(val: number) {\n if (val % 90 !== 0) {\n console.warn(`Invalid rotation angle, shoule be divisible by 90.`);\n return;\n }\n this._rotation = val;\n }\n @Input() @InputBoolean() autoReSize = true;\n @Input() externalLinkTarget: PdfExternalLinkTarget = PdfExternalLinkTarget.BLANK;\n @Input() @InputNumber() delay?: number;\n @Output() readonly change = new EventEmitter<PdfChangeEvent>();\n\n get loading(): boolean {\n return this._loading;\n }\n\n get pdf(): NzSafeAny {\n return this._pdf;\n }\n\n get findController(): NzSafeAny {\n return this._showAll ? this.multiPageFindController : this.singlePageFindController;\n }\n\n get pageViewer(): NzSafeAny {\n return this._showAll ? this.multiPageViewer : this.singlePageViewer;\n }\n\n get linkService(): NzSafeAny {\n return this._showAll ? this.multiPageLinkService : this.singlePageLinkService;\n }\n\n private get _textLayerMode(): PdfTextLayerMode {\n return this._renderText ? this.textLayerMode : PdfTextLayerMode.DISABLE;\n }\n\n private get win(): NzSafeAny {\n return this.doc.defaultView || window;\n }\n\n private get el(): HTMLElement {\n return this._el.nativeElement.querySelector('.pdf-container') as HTMLElement;\n }\n\n constructor(\n private ngZone: NgZone,\n configSrv: AlainConfigService,\n private lazySrv: LazyService,\n private platform: Platform,\n private _el: ElementRef<HTMLElement>,\n @Optional() @Inject(DOCUMENT) private doc: NzSafeAny,\n private cdr: ChangeDetectorRef\n ) {\n const cog = configSrv.merge('pdf', PDF_DEFULAT_CONFIG)!;\n Object.assign(this, cog);\n\n const lib = cog.lib!;\n this.lib = lib.endsWith('/') ? lib : `${lib}/`;\n }\n\n private getValidPi(pi: number): number {\n if (pi < 1) return 1;\n const pdf = this._pdf;\n return pdf && pi > pdf.numPages ? pdf.numPages : pi;\n }\n\n private emit(type: PdfChangeEventType, opt?: PdfChangeEvent): void {\n this.ngZone.run(() =>\n this.change.emit({\n type,\n pdf: this._pdf,\n pi: this._pi,\n total: this._total,\n ...opt\n })\n );\n }\n\n private initDelay(): void {\n if (!this.win.pdfjsLib) {\n throw new Error(\n `No window.pdfjsLib found, please make sure that cdn or local path exists, the current referenced path is: ${JSON.stringify(\n this.lib\n )}`\n );\n }\n this.inited = true;\n this.cdr.detectChanges();\n this.win.pdfjsLib.GlobalWorkerOptions.workerSrc = `${this.lib}build/pdf.worker.min.js`;\n\n timer(this.delay ?? 0)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.load());\n }\n\n setLoading(status: boolean): void {\n this.ngZone.run(() => {\n this._loading = status;\n this.cdr.detectChanges();\n });\n }\n\n @ZoneOutside()\n private load(): void {\n const { _src } = this;\n if (!this.inited || !_src) {\n return;\n }\n\n if (this.lastSrc === _src) {\n this.render();\n return;\n }\n\n this.destroy();\n this.ngZone.run(() => {\n this._loading = true;\n this.cdr.detectChanges();\n });\n this.setLoading(true);\n const loadingTask = (this.loadingTask = this.win.pdfjsLib.getDocument(_src));\n loadingTask.onProgress = (progress: { loaded: number; total: number }) => this.emit('load-progress', { progress });\n (loadingTask.promise as PromiseLike<void>)\n .then(\n (pdf: NzSafeAny) => {\n this._pdf = pdf;\n this.lastSrc = _src;\n this._total = pdf.numPages;\n\n this.emit('loaded');\n\n if (!this.pageViewer) {\n this.setupPageViewer();\n }\n\n this.resetDoc();\n this.render();\n },\n (error: NzSafeAny) => this.emit('error', { error })\n )\n .then(() => this.setLoading(false));\n }\n\n @ZoneOutside()\n private resetDoc(): void {\n const pdf = this._pdf;\n if (!pdf) {\n return;\n }\n this.cleanDoc();\n\n this.findController.setDocument(pdf);\n this.pageViewer.setDocument(pdf);\n this.linkService.setDocument(pdf, null);\n }\n\n private cleanDoc(): void {\n this.multiPageViewer.setDocument(null);\n this.singlePageViewer.setDocument(null);\n\n this.multiPageLinkService.setDocument(null, null);\n this.singlePageLinkService.setDocument(null, null);\n\n this.multiPageFindController.setDocument(null);\n this.singlePageFindController.setDocument(null);\n }\n\n private render(): void {\n const currentViewer = this.pageViewer;\n if (!currentViewer) {\n return;\n }\n\n if (this._rotation !== 0 || currentViewer.pagesRotation !== this._rotation) {\n this.timeExec(() => {\n currentViewer.pagesRotation = this._rotation;\n });\n }\n\n if (this.stickToPage) {\n this.timeExec(() => {\n currentViewer.currentPageNumber = this._pi;\n });\n }\n\n this.updateSize();\n }\n\n private timeExec(fn: () => void): void {\n this.ngZone.runOutsideAngular(() => {\n timer(0)\n .pipe(takeUntil(this.destroy$))\n .subscribe(() => this.ngZone.runOutsideAngular(() => fn()));\n });\n }\n\n @ZoneOutside()\n private updateSize(): void {\n const currentViewer = this.pageViewer;\n if (!currentViewer) return;\n\n this._pdf.getPage(currentViewer.currentPageNumber).then((page: NzSafeAny) => {\n const { _rotation, _zoom } = this;\n const rotation = _rotation || page.rotate;\n const viewportWidth =\n page.getViewport({\n scale: _zoom,\n rotation\n }).width * CSS_UNITS;\n let scale = _zoom;\n let stickToPage = true;\n\n // Scale the document when it shouldn't be in original size or doesn't fit into the viewport\n if (!this.originalSize || (this.fitToPage && viewportWidth > this.el.clientWidth)) {\n const viewPort = page.getViewport({ scale: 1, rotation });\n scale = this.getScale(viewPort.width, viewPort.height);\n stickToPage = !this.stickToPage;\n }\n\n currentViewer._setScale(scale, stickToPage);\n });\n }\n\n private getScale(viewportWidth: number, viewportHeight: number): number {\n const borderSize = this.showBorders ? 2 * BORDER_WIDTH : 0;\n const el = this.el;\n const containerWidth = el.clientWidth - borderSize;\n const containerHeight = el.clientHeight - borderSize;\n\n if (containerHeight === 0 || viewportHeight === 0 || containerWidth === 0 || viewportWidth === 0) {\n return 1;\n }\n\n let ratio = 1;\n switch (this.zoomScale) {\n case 'page-fit':\n ratio = Math.min(containerHeight / viewportHeight, containerWidth / viewportWidth);\n break;\n case 'page-height':\n ratio = containerHeight / viewportHeight;\n break;\n case 'page-width':\n default:\n ratio = containerWidth / viewportWidth;\n break;\n }\n\n return (this._zoom * ratio) / CSS_UNITS;\n }\n\n @ZoneOutside()\n private destroy(): void {\n const { loadingTask } = this;\n if (loadingTask && !loadingTask.destroyed) {\n loadingTask.destroy();\n }\n if (this._pdf) {\n this._pdf.destroy();\n this._pdf = null;\n this.cleanDoc();\n }\n }\n\n private setupPageViewer(): void {\n this.win.pdfjsLib.disableTextLayer = !this._renderText;\n this.win.pdfjsLib.externalLinkTarget = this.externalLinkTarget;\n\n this.setupMultiPageViewer();\n this.setupSinglePageViewer();\n }\n\n private createEventBus(): NzSafeAny {\n const eventBus = new this.win.pdfjsViewer.EventBus();\n eventBus.on(`pagesinit`, (ev: NzSafeAny) => {\n this.emit('pages-init', { ev });\n });\n eventBus.on(`pagerendered`, (ev: NzSafeAny) => {\n this.emit('page-rendered', { ev });\n });\n eventBus.on(`pagechanging`, (ev: NzSafeAny) => {\n const nowPi = ev.pageNumber;\n if (nowPi !== this._pi) {\n this._pi = nowPi;\n this.emit('pi', { ev });\n }\n });\n eventBus.on(`textlayerrendered`, (ev: NzSafeAny) => {\n this.emit('text-layer-rendered', { ev });\n });\n return eventBus;\n }\n\n private setupMultiPageViewer(): void {\n const VIEWER = this.win.pdfjsViewer;\n\n const eventBus = this.createEventBus();\n const linkService = (this.multiPageLinkService = new VIEWER.PDFLinkService({\n eventBus\n }));\n const findController = (this.multiPageFindController = new VIEWER.PDFFindController({\n eventBus,\n linkService\n }));\n\n const viewer = (this.multiPageViewer = new VIEWER.PDFViewer({\n eventBus,\n container: this.el,\n removePageBorders: !this.showBorders,\n textLayerMode: this._textLayerMode,\n linkService,\n findController\n }));\n linkService.setViewer(viewer);\n }\n\n private setupSinglePageViewer(): void {\n const VIEWER = this.win.pdfjsViewer;\n\n const eventBus = this.createEventBus();\n const linkService = (this.singlePageLinkService = new VIEWER.PDFLinkService({\n eventBus\n }));\n const findController = (this.singlePageFindController = new VIEWER.PDFFindController({\n eventBus,\n linkService\n }));\n\n const pageViewer = (this.singlePageViewer = new VIEWER.PDFSinglePageViewer({\n eventBus,\n container: this.el,\n removePageBorders: !this.showBorders,\n textLayerMode: this._textLayerMode,\n linkService,\n findController\n }));\n linkService.setViewer(pageViewer);\n pageViewer._currentPageNumber = this._pi;\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if (this.win.pdfjsLib) {\n this.initDelay();\n return;\n }\n const { lib } = this;\n this.lazySrv\n .load(`${lib}build/pdf.min.js`)\n .then(() => this.lazySrv.load([`${lib}web/pdf_viewer.js`, `${lib}web/pdf_viewer.css`]))\n .then(() => this.initDelay());\n\n this.ngZone.runOutsideAngular(() => this.initResize());\n }\n\n private initResize(): void {\n fromEvent(this.win, 'resize')\n .pipe(\n debounceTime(100),\n filter(() => this.autoReSize && this._pdf),\n takeUntil(this.destroy$)\n )\n .subscribe(() => this.updateSize());\n }\n\n ngOnChanges(changes: { [p in keyof PdfComponent]?: SimpleChange }): void {\n if (this.inited && !changes.src) {\n this.render();\n }\n }\n\n ngOnDestroy(): void {\n const { destroy$ } = this;\n destroy$.next();\n destroy$.complete();\n\n this.destroy();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzSkeletonModule } from 'ng-zorro-antd/skeleton';\n\nimport { PdfComponent } from './pdf.component';\n\nconst COMPONENTS = [PdfComponent];\n\n@NgModule({\n imports: [CommonModule, NzSkeletonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class PdfModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAEa,kBAAkB,GAAmB;IAChD,GAAG,EAAE,8CAA8C;IACnD,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,IAAI;;;ICaN;AAAZ,WAAY,gBAAgB;IAC1B,6DAAW,CAAA;IACX,2DAAU,CAAA;IACV,2EAAkB,CAAA;AACpB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AAC,CAAC;MAOrB,SAAS;;sGAAT,SAAS;uGAAT,SAAS,iBAPF,YAAY,aAGpB,YAAY,EAAE,gBAAgB,aAHtB,YAAY;uGAOnB,SAAS,YAJX,CAAC,YAAY,EAAE,gBAAgB,CAAC;2FAI9B,SAAS;kBALrB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;oBACzC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
package/fesm2020/qr.mjs CHANGED
@@ -73,7 +73,7 @@ class QRComponent {
73
73
  mime: this.mime,
74
74
  padding: this.padding,
75
75
  size: this.size,
76
- value: this.toUtf8ByteArray(this.value)
76
+ value: typeof this.value === 'function' ? this.value() : this.toUtf8ByteArray(this.value)
77
77
  };
78
78
  this.option = option;
79
79
  this.init();
@@ -98,8 +98,8 @@ class QRComponent {
98
98
  }
99
99
  }
100
100
  }
101
- QRComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QRComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.AlainConfigService }, { token: i2.LazyService }, { token: i3.Platform }], target: i0.ɵɵFactoryTarget.Component });
102
- QRComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: QRComponent, selector: "qr", inputs: { background: "background", backgroundAlpha: "backgroundAlpha", foreground: "foreground", foregroundAlpha: "foregroundAlpha", level: "level", mime: "mime", padding: "padding", size: "size", value: "value", delay: "delay" }, outputs: { change: "change" }, host: { properties: { "style.display": "'inline-block'", "style.height.px": "size", "style.width.px": "size" } }, exportAs: ["qr"], usesOnChanges: true, ngImport: i0, template: ` <img *ngIf="dataURL" style="max-width: 100%; max-height: 100%;" [src]="dataURL" /> `, isInline: true, directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
101
+ QRComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QRComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.AlainConfigService }, { token: i2.LazyService }, { token: i3.Platform }], target: i0.ɵɵFactoryTarget.Component });
102
+ QRComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: QRComponent, selector: "qr", inputs: { background: "background", backgroundAlpha: "backgroundAlpha", foreground: "foreground", foregroundAlpha: "foregroundAlpha", level: "level", mime: "mime", padding: "padding", size: "size", value: "value", delay: "delay" }, outputs: { change: "change" }, host: { properties: { "style.display": "'inline-block'", "style.height.px": "size", "style.width.px": "size" } }, exportAs: ["qr"], usesOnChanges: true, ngImport: i0, template: ` <img *ngIf="dataURL" style="max-width: 100%; max-height: 100%;" [src]="dataURL" /> `, isInline: true, directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
103
103
  __decorate([
104
104
  InputNumber()
105
105
  ], QRComponent.prototype, "padding", void 0);
@@ -109,7 +109,7 @@ __decorate([
109
109
  __decorate([
110
110
  InputNumber()
111
111
  ], QRComponent.prototype, "delay", void 0);
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QRComponent, decorators: [{
112
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QRComponent, decorators: [{
113
113
  type: Component,
114
114
  args: [{
115
115
  selector: 'qr',
@@ -151,10 +151,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
151
151
  const COMPONENTS = [QRComponent];
152
152
  class QRModule {
153
153
  }
154
- QRModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QRModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
155
- QRModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QRModule, declarations: [QRComponent], imports: [CommonModule], exports: [QRComponent] });
156
- QRModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QRModule, imports: [[CommonModule]] });
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QRModule, decorators: [{
154
+ QRModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QRModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
155
+ QRModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QRModule, declarations: [QRComponent], imports: [CommonModule], exports: [QRComponent] });
156
+ QRModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QRModule, imports: [[CommonModule]] });
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QRModule, decorators: [{
158
158
  type: NgModule,
159
159
  args: [{
160
160
  imports: [CommonModule],
@@ -1 +1 @@
1
- {"version":3,"file":"qr.mjs","sources":["../../../../packages/abc/qr/qr.config.ts","../../../../packages/abc/qr/qr.component.ts","../../../../packages/abc/qr/qr.module.ts","../../../../packages/abc/qr/qr.ts"],"sourcesContent":["import { AlainQRConfig } from '@delon/util/config';\n\nexport const QR_DEFULAT_CONFIG: AlainQRConfig = {\n lib: `https://cdn.jsdelivr.net/npm/qrious/dist/qrious.min.js`,\n background: 'white',\n backgroundAlpha: 1,\n foreground: 'black',\n foregroundAlpha: 1,\n level: 'L',\n mime: 'image/png',\n padding: 10,\n size: 220,\n delay: 0\n};\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { AlainConfigService, AlainQRConfig } from '@delon/util/config';\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport { LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { QR_DEFULAT_CONFIG } from './qr.config';\nimport { QROptions } from './qr.types';\n\n@Component({\n selector: 'qr',\n exportAs: 'qr',\n template: ` <img *ngIf=\"dataURL\" style=\"max-width: 100%; max-height: 100%;\" [src]=\"dataURL\" /> `,\n host: {\n '[style.display]': `'inline-block'`,\n '[style.height.px]': 'size',\n '[style.width.px]': 'size'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class QRComponent implements OnChanges, AfterViewInit, OnDestroy {\n static ngAcceptInputType_padding: NumberInput;\n static ngAcceptInputType_size: NumberInput;\n static ngAcceptInputType_delay: NumberInput;\n\n private lazy$?: Subscription;\n private qr: NzSafeAny;\n private cog: AlainQRConfig;\n private option!: QROptions;\n private inited = false;\n\n dataURL!: string;\n\n @Input() background?: string;\n @Input() backgroundAlpha?: number;\n @Input() foreground?: string;\n @Input() foregroundAlpha?: number;\n @Input() level?: string;\n @Input() mime?: string;\n @Input() @InputNumber() padding?: number;\n @Input() @InputNumber() size?: number;\n @Input() value = '';\n @Input() @InputNumber() delay?: number;\n @Output() readonly change = new EventEmitter<string>();\n\n constructor(\n private cdr: ChangeDetectorRef,\n configSrv: AlainConfigService,\n private lazySrv: LazyService,\n private platform: Platform\n ) {\n this.cog = configSrv.merge('qr', QR_DEFULAT_CONFIG)!;\n Object.assign(this, this.cog);\n }\n\n private init(): void {\n if (!this.inited) {\n return;\n }\n\n if (this.qr == null) {\n this.qr = new (window as NzSafeAny).QRious();\n }\n this.qr.set(this.option);\n this.dataURL = this.qr.toDataURL();\n this.change.emit(this.dataURL);\n this.cdr.detectChanges();\n }\n\n private initDelay(): void {\n this.inited = true;\n setTimeout(() => this.init(), this.delay);\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if ((window as NzSafeAny).QRious) {\n this.initDelay();\n return;\n }\n const url = this.cog.lib!;\n this.lazy$ = this.lazySrv.change\n .pipe(filter(ls => ls.length === 1 && ls[0].path === url && ls[0].status === 'ok'))\n .subscribe(() => this.initDelay());\n this.lazySrv.load(url);\n }\n\n ngOnChanges(): void {\n const option: QROptions = {\n background: this.background,\n backgroundAlpha: this.backgroundAlpha,\n foreground: this.foreground,\n foregroundAlpha: this.foregroundAlpha,\n level: this.level as NzSafeAny,\n mime: this.mime,\n padding: this.padding,\n size: this.size,\n value: this.toUtf8ByteArray(this.value)\n };\n this.option = option;\n this.init();\n }\n\n private toUtf8ByteArray(str: string): string {\n str = encodeURI(str);\n const result: number[] = [];\n for (let i = 0; i < str.length; i++) {\n if (str.charAt(i) !== '%') {\n result.push(str.charCodeAt(i));\n } else {\n result.push(parseInt(str.substring(i + 1, 2), 16));\n i += 2;\n }\n }\n return result.map(v => String.fromCharCode(v)).join('');\n }\n\n ngOnDestroy(): void {\n if (this.lazy$) {\n this.lazy$.unsubscribe();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { QRComponent } from './qr.component';\n\nconst COMPONENTS = [QRComponent];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class QRModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAEa,iBAAiB,GAAkB;IAC9C,GAAG,EAAE,wDAAwD;IAC7D,UAAU,EAAE,OAAO;IACnB,eAAe,EAAE,CAA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K;sBAAb,KAAK;gBACG,IAAI;sBAAZ,KAAK;gBACkB,OAAO;sBAA9B,KAAK;gBACkB,IAAI;sBAA3B,KAAK;gBACG,KAAK;sBAAb,KAAK;gBACkB,KAAK;sBAA5B,KAAK;gBACa,MAAM;sBAAxB,MAAM;;;ACvDT,MAAM,UAAU,GAAG,CAAC,WAAW,CAAC,CAAC;MAOpB,QAAQ;;qGAAR,QAAQ;sGAAR,QAAQ,iBAPD,WAAW,aAGnB,YAAY,aAHJ,WAAW;sGAOlB,QAAQ,YAJV,CAAC,YAAY,CAAC;2FAIZ,QAAQ;kBALpB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACXD;;;;;;"}
1
+ {"version":3,"file":"qr.mjs","sources":["../../../../packages/abc/qr/qr.config.ts","../../../../packages/abc/qr/qr.component.ts","../../../../packages/abc/qr/qr.module.ts","../../../../packages/abc/qr/qr.ts"],"sourcesContent":["import { AlainQRConfig } from '@delon/util/config';\n\nexport const QR_DEFULAT_CONFIG: AlainQRConfig = {\n lib: `https://cdn.jsdelivr.net/npm/qrious/dist/qrious.min.js`,\n background: 'white',\n backgroundAlpha: 1,\n foreground: 'black',\n foregroundAlpha: 1,\n level: 'L',\n mime: 'image/png',\n padding: 10,\n size: 220,\n delay: 0\n};\n","import { Platform } from '@angular/cdk/platform';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n Output,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { AlainConfigService, AlainQRConfig } from '@delon/util/config';\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport { LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { QR_DEFULAT_CONFIG } from './qr.config';\nimport { QROptions } from './qr.types';\n\n@Component({\n selector: 'qr',\n exportAs: 'qr',\n template: ` <img *ngIf=\"dataURL\" style=\"max-width: 100%; max-height: 100%;\" [src]=\"dataURL\" /> `,\n host: {\n '[style.display]': `'inline-block'`,\n '[style.height.px]': 'size',\n '[style.width.px]': 'size'\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class QRComponent implements OnChanges, AfterViewInit, OnDestroy {\n static ngAcceptInputType_padding: NumberInput;\n static ngAcceptInputType_size: NumberInput;\n static ngAcceptInputType_delay: NumberInput;\n\n private lazy$?: Subscription;\n private qr: NzSafeAny;\n private cog: AlainQRConfig;\n private option!: QROptions;\n private inited = false;\n\n dataURL!: string;\n\n @Input() background?: string;\n @Input() backgroundAlpha?: number;\n @Input() foreground?: string;\n @Input() foregroundAlpha?: number;\n @Input() level?: string;\n @Input() mime?: string;\n @Input() @InputNumber() padding?: number;\n @Input() @InputNumber() size?: number;\n @Input() value: string | (() => string) = '';\n @Input() @InputNumber() delay?: number;\n @Output() readonly change = new EventEmitter<string>();\n\n constructor(\n private cdr: ChangeDetectorRef,\n configSrv: AlainConfigService,\n private lazySrv: LazyService,\n private platform: Platform\n ) {\n this.cog = configSrv.merge('qr', QR_DEFULAT_CONFIG)!;\n Object.assign(this, this.cog);\n }\n\n private init(): void {\n if (!this.inited) {\n return;\n }\n\n if (this.qr == null) {\n this.qr = new (window as NzSafeAny).QRious();\n }\n this.qr.set(this.option);\n this.dataURL = this.qr.toDataURL();\n this.change.emit(this.dataURL);\n this.cdr.detectChanges();\n }\n\n private initDelay(): void {\n this.inited = true;\n setTimeout(() => this.init(), this.delay);\n }\n\n ngAfterViewInit(): void {\n if (!this.platform.isBrowser) {\n return;\n }\n if ((window as NzSafeAny).QRious) {\n this.initDelay();\n return;\n }\n const url = this.cog.lib!;\n this.lazy$ = this.lazySrv.change\n .pipe(filter(ls => ls.length === 1 && ls[0].path === url && ls[0].status === 'ok'))\n .subscribe(() => this.initDelay());\n this.lazySrv.load(url);\n }\n\n ngOnChanges(): void {\n const option: QROptions = {\n background: this.background,\n backgroundAlpha: this.backgroundAlpha,\n foreground: this.foreground,\n foregroundAlpha: this.foregroundAlpha,\n level: this.level as NzSafeAny,\n mime: this.mime,\n padding: this.padding,\n size: this.size,\n value: typeof this.value === 'function' ? this.value() : this.toUtf8ByteArray(this.value)\n };\n this.option = option;\n this.init();\n }\n\n private toUtf8ByteArray(str: string): string {\n str = encodeURI(str);\n const result: number[] = [];\n for (let i = 0; i < str.length; i++) {\n if (str.charAt(i) !== '%') {\n result.push(str.charCodeAt(i));\n } else {\n result.push(parseInt(str.substring(i + 1, 2), 16));\n i += 2;\n }\n }\n return result.map(v => String.fromCharCode(v)).join('');\n }\n\n ngOnDestroy(): void {\n if (this.lazy$) {\n this.lazy$.unsubscribe();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { QRComponent } from './qr.component';\n\nconst COMPONENTS = [QRComponent];\n\n@NgModule({\n imports: [CommonModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class QRModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAEa,iBAAiB,GAAkB;IAC9C,GAAG,EAAE,wDAAwD;IAC7D,UAAU,EAAE,OAAO;IACnB,eAAe,EAAE,CAAC;IAClB,UAAU,EAAE,OAAO;IACnB,eAAe,EAAE,CAAC;IAClB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,CAAC;;;MCyBG,WAAW;IAyBtB,YACU,GAAsB,EAC9B,SAA6B,EACrB,OAAoB,EACpB,QAAkB;QAHlB,QAAG,GAAH,GAAG,CAAmB;QAEtB,YAAO,GAAP,OAAO,CAAa;QACpB,aAAQ,GAAR,QA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AAQ;sGAAR,QAAQ,iBAPD,WAAW,aAGnB,YAAY,aAHJ,WAAW;sGAOlB,QAAQ,YAJV,CAAC,YAAY,CAAC;2FAIZ,QAAQ;kBALpB,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACXD;;;;;;"}
@@ -58,8 +58,8 @@ class QuickMenuComponent {
58
58
  }
59
59
  }
60
60
  }
61
- QuickMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QuickMenuComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
62
- QuickMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: QuickMenuComponent, selector: "quick-menu", inputs: { icon: "icon", top: "top", width: "width", bgColor: "bgColor", borderColor: "borderColor", expand: "expand" }, outputs: { expandChange: "expandChange" }, host: { listeners: { "click": "_click()" }, properties: { "class.quick-menu": "true" } }, exportAs: ["quickMenu"], usesOnChanges: true, ngImport: i0, template: "<div class=\"quick-menu__inner\">\n <div class=\"quick-menu__ctrl\" [ngStyle]=\"ctrlStyle\">\n <div class=\"quick-menu__ctrl-icon\">\n <ng-container *nzStringTemplateOutlet=\"icon\">\n <i nz-icon [nzType]=\"$any(icon)\"></i>\n </ng-container>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n", directives: [{ type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
61
+ QuickMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QuickMenuComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
62
+ QuickMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: QuickMenuComponent, selector: "quick-menu", inputs: { icon: "icon", top: "top", width: "width", bgColor: "bgColor", borderColor: "borderColor", expand: "expand" }, outputs: { expandChange: "expandChange" }, host: { listeners: { "click": "_click()" }, properties: { "class.quick-menu": "true" } }, exportAs: ["quickMenu"], usesOnChanges: true, ngImport: i0, template: "<div class=\"quick-menu__inner\">\n <div class=\"quick-menu__ctrl\" [ngStyle]=\"ctrlStyle\">\n <div class=\"quick-menu__ctrl-icon\">\n <ng-container *nzStringTemplateOutlet=\"icon\">\n <i nz-icon [nzType]=\"$any(icon)\"></i>\n </ng-container>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n", directives: [{ type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i2.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i3.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
63
63
  __decorate([
64
64
  InputNumber()
65
65
  ], QuickMenuComponent.prototype, "top", void 0);
@@ -69,7 +69,7 @@ __decorate([
69
69
  __decorate([
70
70
  InputBoolean()
71
71
  ], QuickMenuComponent.prototype, "expand", void 0);
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QuickMenuComponent, decorators: [{
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QuickMenuComponent, decorators: [{
73
73
  type: Component,
74
74
  args: [{ selector: 'quick-menu', exportAs: 'quickMenu', host: {
75
75
  '[class.quick-menu]': 'true',
@@ -94,10 +94,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
94
94
  const COMPONENTS = [QuickMenuComponent];
95
95
  class QuickMenuModule {
96
96
  }
97
- QuickMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QuickMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
98
- QuickMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QuickMenuModule, declarations: [QuickMenuComponent], imports: [CommonModule, NzIconModule, NzOutletModule], exports: [QuickMenuComponent] });
99
- QuickMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QuickMenuModule, imports: [[CommonModule, NzIconModule, NzOutletModule]] });
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: QuickMenuModule, decorators: [{
97
+ QuickMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QuickMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
98
+ QuickMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QuickMenuModule, declarations: [QuickMenuComponent], imports: [CommonModule, NzIconModule, NzOutletModule], exports: [QuickMenuComponent] });
99
+ QuickMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QuickMenuModule, imports: [[CommonModule, NzIconModule, NzOutletModule]] });
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: QuickMenuModule, decorators: [{
101
101
  type: NgModule,
102
102
  args: [{
103
103
  imports: [CommonModule, NzIconModule, NzOutletModule],
@@ -43,9 +43,9 @@ class ResultComponent {
43
43
  this.destroy$.complete();
44
44
  }
45
45
  }
46
- ResultComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ResultComponent, deps: [{ token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
47
- ResultComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ResultComponent, selector: "result", inputs: { type: "type", title: "title", description: "description", extra: "extra" }, host: { properties: { "class.result": "true", "class.result-rtl": "dir === 'rtl'" } }, exportAs: ["result"], ngImport: i0, template: "<div class=\"result__icon\">\n <i nz-icon [nzType]=\"_icon\" class=\"result__icon-{{ _type }}\"></i>\n</div>\n<div class=\"result__title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n</div>\n<div *ngIf=\"description\" class=\"result__desc\">\n <ng-container *nzStringTemplateOutlet=\"description\">{{ description }}</ng-container>\n</div>\n<div *ngIf=\"extra\" class=\"result__extra\">\n <ng-container *nzStringTemplateOutlet=\"extra\">{{ extra }}</ng-container>\n</div>\n<div class=\"result__actions\">\n <ng-content></ng-content>\n</div>\n", directives: [{ type: i2.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ResultComponent, decorators: [{
46
+ ResultComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ResultComponent, deps: [{ token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
47
+ ResultComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ResultComponent, selector: "result", inputs: { type: "type", title: "title", description: "description", extra: "extra" }, host: { properties: { "class.result": "true", "class.result-rtl": "dir === 'rtl'" } }, exportAs: ["result"], ngImport: i0, template: "<div class=\"result__icon\">\n <i nz-icon [nzType]=\"_icon\" class=\"result__icon-{{ _type }}\"></i>\n</div>\n<div class=\"result__title\">\n <ng-container *nzStringTemplateOutlet=\"title\">{{ title }}</ng-container>\n</div>\n<div *ngIf=\"description\" class=\"result__desc\">\n <ng-container *nzStringTemplateOutlet=\"description\">{{ description }}</ng-container>\n</div>\n<div *ngIf=\"extra\" class=\"result__extra\">\n <ng-container *nzStringTemplateOutlet=\"extra\">{{ extra }}</ng-container>\n</div>\n<div class=\"result__actions\">\n <ng-content></ng-content>\n</div>\n", directives: [{ type: i2.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { type: i3.NzStringTemplateOutletDirective, selector: "[nzStringTemplateOutlet]", inputs: ["nzStringTemplateOutletContext", "nzStringTemplateOutlet"], exportAs: ["nzStringTemplateOutlet"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ResultComponent, decorators: [{
49
49
  type: Component,
50
50
  args: [{ selector: 'result', exportAs: 'result', host: {
51
51
  '[class.result]': 'true',
@@ -66,10 +66,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
66
66
  const COMPONENTS = [ResultComponent];
67
67
  class ResultModule {
68
68
  }
69
- ResultModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ResultModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
70
- ResultModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ResultModule, declarations: [ResultComponent], imports: [CommonModule, NzIconModule, NzOutletModule], exports: [ResultComponent] });
71
- ResultModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ResultModule, imports: [[CommonModule, NzIconModule, NzOutletModule]] });
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ResultModule, decorators: [{
69
+ ResultModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ResultModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
70
+ ResultModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ResultModule, declarations: [ResultComponent], imports: [CommonModule, NzIconModule, NzOutletModule], exports: [ResultComponent] });
71
+ ResultModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ResultModule, imports: [[CommonModule, NzIconModule, NzOutletModule]] });
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ResultModule, decorators: [{
73
73
  type: NgModule,
74
74
  args: [{
75
75
  imports: [CommonModule, NzIconModule, NzOutletModule],
@@ -73,9 +73,9 @@ class ReuseTabContextMenuComponent {
73
73
  this.notify(null);
74
74
  }
75
75
  }
76
- ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
77
- ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ReuseTabContextMenuComponent, selector: "reuse-tab-context-menu", inputs: { i18n: "i18n", item: "item", event: "event", customContextMenu: "customContextMenu" }, outputs: { close: "close" }, host: { listeners: { "document:click": "closeMenu($event)", "document:contextmenu": "closeMenu($event)" } }, ngImport: i0, template: "<ul nz-menu>\n <li\n *ngIf=\"item.active\"\n nz-menu-item\n (click)=\"click($event, 'refresh')\"\n data-type=\"refresh\"\n [innerHTML]=\"i18n.refresh\"\n ></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'close')\"\n data-type=\"close\"\n [nzDisabled]=\"!item.closable\"\n [innerHTML]=\"i18n.close\"\n ></li>\n <li nz-menu-item (click)=\"click($event, 'closeOther')\" data-type=\"closeOther\" [innerHTML]=\"i18n.closeOther\"></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'closeRight')\"\n data-type=\"closeRight\"\n [nzDisabled]=\"item.last\"\n [innerHTML]=\"i18n.closeRight\"\n ></li>\n <ng-container *ngIf=\"customContextMenu!.length > 0\">\n <li nz-menu-divider></li>\n <li\n *ngFor=\"let i of customContextMenu\"\n nz-menu-item\n [attr.data-type]=\"i.id\"\n [nzDisabled]=\"isDisabled(i)\"\n (click)=\"click($event, 'custom', i)\"\n [innerHTML]=\"i.title\"\n ></li>\n </ng-container>\n</ul>\n", directives: [{ type: i2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { type: i2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
76
+ ReuseTabContextMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextMenuComponent, deps: [{ token: i1.DelonLocaleService }], target: i0.ɵɵFactoryTarget.Component });
77
+ ReuseTabContextMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ReuseTabContextMenuComponent, selector: "reuse-tab-context-menu", inputs: { i18n: "i18n", item: "item", event: "event", customContextMenu: "customContextMenu" }, outputs: { close: "close" }, host: { listeners: { "document:click": "closeMenu($event)", "document:contextmenu": "closeMenu($event)" } }, ngImport: i0, template: "<ul nz-menu>\n <li\n *ngIf=\"item.active\"\n nz-menu-item\n (click)=\"click($event, 'refresh')\"\n data-type=\"refresh\"\n [innerHTML]=\"i18n.refresh\"\n ></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'close')\"\n data-type=\"close\"\n [nzDisabled]=\"!item.closable\"\n [innerHTML]=\"i18n.close\"\n ></li>\n <li nz-menu-item (click)=\"click($event, 'closeOther')\" data-type=\"closeOther\" [innerHTML]=\"i18n.closeOther\"></li>\n <li\n nz-menu-item\n (click)=\"click($event, 'closeRight')\"\n data-type=\"closeRight\"\n [nzDisabled]=\"item.last\"\n [innerHTML]=\"i18n.closeRight\"\n ></li>\n <ng-container *ngIf=\"customContextMenu!.length > 0\">\n <li nz-menu-divider></li>\n <li\n *ngFor=\"let i of customContextMenu\"\n nz-menu-item\n [attr.data-type]=\"i.id\"\n [nzDisabled]=\"isDisabled(i)\"\n (click)=\"click($event, 'custom', i)\"\n [innerHTML]=\"i.title\"\n ></li>\n </ng-container>\n</ul>\n", directives: [{ type: i2.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { type: i2.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextMenuComponent, decorators: [{
79
79
  type: Component,
80
80
  args: [{ selector: 'reuse-tab-context-menu', host: {
81
81
  '(document:click)': 'closeMenu($event)',
@@ -135,9 +135,9 @@ class ReuseTabContextService {
135
135
  comp.onDestroy(() => sub$.unsubscribe());
136
136
  }
137
137
  }
138
- ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
139
- ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextService });
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextService, decorators: [{
138
+ ReuseTabContextService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable });
139
+ ReuseTabContextService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextService });
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextService, decorators: [{
141
141
  type: Injectable
142
142
  }], ctorParameters: function () { return [{ type: i1$1.Overlay }]; } });
143
143
 
@@ -156,9 +156,9 @@ class ReuseTabContextComponent {
156
156
  this.sub$.unsubscribe();
157
157
  }
158
158
  }
159
- ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
160
- ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: { i18n: "i18n" }, outputs: { change: "change" }, ngImport: i0, template: ``, isInline: true });
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
159
+ ReuseTabContextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextComponent, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Component });
160
+ ReuseTabContextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: { i18n: "i18n" }, outputs: { change: "change" }, ngImport: i0, template: ``, isInline: true });
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextComponent, decorators: [{
162
162
  type: Component,
163
163
  args: [{
164
164
  selector: 'reuse-tab-context',
@@ -184,9 +184,9 @@ class ReuseTabContextDirective {
184
184
  event.stopPropagation();
185
185
  }
186
186
  }
187
- ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
188
- ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: { item: ["reuse-tab-context-menu", "item"], customContextMenu: "customContextMenu" }, host: { listeners: { "contextmenu": "_onContextMenu($event)" } }, exportAs: ["reuseTabContextMenu"], ngImport: i0 });
189
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
187
+ ReuseTabContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextDirective, deps: [{ token: ReuseTabContextService }], target: i0.ɵɵFactoryTarget.Directive });
188
+ ReuseTabContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.5", type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: { item: ["reuse-tab-context-menu", "item"], customContextMenu: "customContextMenu" }, host: { listeners: { "contextmenu": "_onContextMenu($event)" } }, exportAs: ["reuseTabContextMenu"], ngImport: i0 });
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabContextDirective, decorators: [{
190
190
  type: Directive,
191
191
  args: [{
192
192
  selector: '[reuse-tab-context-menu]',
@@ -754,9 +754,9 @@ class ReuseTabService {
754
754
  }
755
755
  }
756
756
  }
757
- ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabService, deps: [{ token: i0.Injector }, { token: i1.MenuService }], target: i0.ɵɵFactoryTarget.Injectable });
758
- ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
759
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabService, decorators: [{
757
+ ReuseTabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabService, deps: [{ token: i0.Injector }, { token: i1.MenuService }], target: i0.ɵɵFactoryTarget.Injectable });
758
+ ReuseTabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabService, providedIn: 'root' });
759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabService, decorators: [{
760
760
  type: Injectable,
761
761
  args: [{ providedIn: 'root' }]
762
762
  }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.MenuService }]; } });
@@ -982,8 +982,8 @@ class ReuseTabComponent {
982
982
  destroy$.complete();
983
983
  }
984
984
  }
985
- ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabComponent, deps: [{ token: ReuseTabService }, { token: i0.ChangeDetectorRef }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }, { token: i3.Platform }], target: i0.ɵɵFactoryTarget.Component });
986
- ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: ReuseTabComponent, selector: "reuse-tab, [reuse-tab]", inputs: { mode: "mode", i18n: "i18n", debug: "debug", max: "max", tabMaxWidth: "tabMaxWidth", excludes: "excludes", allowClose: "allowClose", keepingScroll: "keepingScroll", keepingScrollContainer: "keepingScrollContainer", customContextMenu: "customContextMenu", tabBarExtraContent: "tabBarExtraContent", tabBarGutter: "tabBarGutter", tabBarStyle: "tabBarStyle", tabType: "tabType", routeParamMatchMode: "routeParamMatchMode", disabled: "disabled", titleRender: "titleRender" }, outputs: { change: "change", close: "close" }, host: { properties: { "class.reuse-tab": "true", "class.reuse-tab__line": "tabType === 'line'", "class.reuse-tab__card": "tabType === 'card'", "class.reuse-tab__disabled": "disabled" } }, providers: [ReuseTabContextService], viewQueries: [{ propertyName: "tabset", first: true, predicate: ["tabset"], descendants: true }], exportAs: ["reuseTab"], usesOnChanges: true, ngImport: i0, template: "<nz-tabset\n #tabset\n [nzSelectedIndex]=\"pos\"\n [nzAnimated]=\"false\"\n [nzType]=\"tabType\"\n [nzTabBarExtraContent]=\"tabBarExtraContent\"\n [nzTabBarGutter]=\"tabBarGutter\"\n [nzTabBarStyle]=\"tabBarStyle\"\n>\n <nz-tab *ngFor=\"let i of list; let index = index\" [nzTitle]=\"titleTemplate\" (nzClick)=\"_to(index)\">\n <ng-template #titleTemplate>\n <div\n [reuse-tab-context-menu]=\"i\"\n [customContextMenu]=\"customContextMenu\"\n class=\"reuse-tab__name\"\n [attr.title]=\"i.title\"\n >\n <span [class.reuse-tab__name-width]=\"tabMaxWidth\" [style.max-width.px]=\"tabMaxWidth\">\n <ng-container\n *ngIf=\"titleRender; else defaultTitle\"\n [ngTemplateOutlet]=\"titleRender\"\n [ngTemplateOutletContext]=\"{ $implicit: i }\"\n ></ng-container>\n <ng-template #defaultTitle>{{ i.title }}</ng-template>\n </span>\n </div>\n <i *ngIf=\"i.closable\" nz-icon nzType=\"close\" class=\"reuse-tab__op\" (click)=\"_close($event, index, false)\"></i>\n </ng-template>\n </nz-tab>\n</nz-tabset>\n<reuse-tab-context [i18n]=\"i18n\" (change)=\"contextMenuChange($event)\"></reuse-tab-context>\n", components: [{ type: i4.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { type: i4.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: ["i18n"], outputs: ["change"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: ["reuse-tab-context-menu", "customContextMenu"], exportAs: ["reuseTabContextMenu"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
985
+ ReuseTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabComponent, deps: [{ token: ReuseTabService }, { token: i0.ChangeDetectorRef }, { token: i2$1.Router }, { token: i2$1.ActivatedRoute }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: DOCUMENT }, { token: i3.Platform }], target: i0.ɵɵFactoryTarget.Component });
986
+ ReuseTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.5", type: ReuseTabComponent, selector: "reuse-tab, [reuse-tab]", inputs: { mode: "mode", i18n: "i18n", debug: "debug", max: "max", tabMaxWidth: "tabMaxWidth", excludes: "excludes", allowClose: "allowClose", keepingScroll: "keepingScroll", keepingScrollContainer: "keepingScrollContainer", customContextMenu: "customContextMenu", tabBarExtraContent: "tabBarExtraContent", tabBarGutter: "tabBarGutter", tabBarStyle: "tabBarStyle", tabType: "tabType", routeParamMatchMode: "routeParamMatchMode", disabled: "disabled", titleRender: "titleRender" }, outputs: { change: "change", close: "close" }, host: { properties: { "class.reuse-tab": "true", "class.reuse-tab__line": "tabType === 'line'", "class.reuse-tab__card": "tabType === 'card'", "class.reuse-tab__disabled": "disabled" } }, providers: [ReuseTabContextService], viewQueries: [{ propertyName: "tabset", first: true, predicate: ["tabset"], descendants: true }], exportAs: ["reuseTab"], usesOnChanges: true, ngImport: i0, template: "<nz-tabset\n #tabset\n [nzSelectedIndex]=\"pos\"\n [nzAnimated]=\"false\"\n [nzType]=\"tabType\"\n [nzTabBarExtraContent]=\"tabBarExtraContent\"\n [nzTabBarGutter]=\"tabBarGutter\"\n [nzTabBarStyle]=\"tabBarStyle\"\n>\n <nz-tab *ngFor=\"let i of list; let index = index\" [nzTitle]=\"titleTemplate\" (nzClick)=\"_to(index)\">\n <ng-template #titleTemplate>\n <div\n [reuse-tab-context-menu]=\"i\"\n [customContextMenu]=\"customContextMenu\"\n class=\"reuse-tab__name\"\n [attr.title]=\"i.title\"\n >\n <span [class.reuse-tab__name-width]=\"tabMaxWidth\" [style.max-width.px]=\"tabMaxWidth\">\n <ng-container\n *ngIf=\"titleRender; else defaultTitle\"\n [ngTemplateOutlet]=\"titleRender\"\n [ngTemplateOutletContext]=\"{ $implicit: i }\"\n ></ng-container>\n <ng-template #defaultTitle>{{ i.title }}</ng-template>\n </span>\n </div>\n <i *ngIf=\"i.closable\" nz-icon nzType=\"close\" class=\"reuse-tab__op\" (click)=\"_close($event, index, false)\"></i>\n </ng-template>\n </nz-tab>\n</nz-tabset>\n<reuse-tab-context [i18n]=\"i18n\" (change)=\"contextMenuChange($event)\"></reuse-tab-context>\n", components: [{ type: i4.NzTabSetComponent, selector: "nz-tabset", inputs: ["nzSelectedIndex", "nzTabPosition", "nzTabBarExtraContent", "nzCanDeactivate", "nzAddIcon", "nzTabBarStyle", "nzType", "nzSize", "nzAnimated", "nzTabBarGutter", "nzHideAdd", "nzCentered", "nzHideAll", "nzLinkRouter", "nzLinkExact"], outputs: ["nzSelectChange", "nzSelectedIndexChange", "nzTabListScroll", "nzClose", "nzAdd"], exportAs: ["nzTabset"] }, { type: i4.NzTabComponent, selector: "nz-tab", inputs: ["nzTitle", "nzClosable", "nzCloseIcon", "nzDisabled", "nzForceRender"], outputs: ["nzSelect", "nzDeselect", "nzClick", "nzContextmenu"], exportAs: ["nzTab"] }, { type: ReuseTabContextComponent, selector: "reuse-tab-context", inputs: ["i18n"], outputs: ["change"] }], directives: [{ type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: ReuseTabContextDirective, selector: "[reuse-tab-context-menu]", inputs: ["reuse-tab-context-menu", "customContextMenu"], exportAs: ["reuseTabContextMenu"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
987
987
  __decorate([
988
988
  InputBoolean()
989
989
  ], ReuseTabComponent.prototype, "debug", void 0);
@@ -1002,7 +1002,7 @@ __decorate([
1002
1002
  __decorate([
1003
1003
  InputBoolean()
1004
1004
  ], ReuseTabComponent.prototype, "disabled", void 0);
1005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabComponent, decorators: [{
1005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabComponent, decorators: [{
1006
1006
  type: Component,
1007
1007
  args: [{ selector: 'reuse-tab, [reuse-tab]', exportAs: 'reuseTab', host: {
1008
1008
  '[class.reuse-tab]': 'true',
@@ -1086,10 +1086,10 @@ const COMPONENTS = [ReuseTabComponent];
1086
1086
  const NOEXPORTS = [ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective];
1087
1087
  class ReuseTabModule {
1088
1088
  }
1089
- ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1090
- ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabModule, declarations: [ReuseTabComponent, ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule], exports: [ReuseTabComponent] });
1091
- ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabModule, imports: [[CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule]] });
1092
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: ReuseTabModule, decorators: [{
1089
+ ReuseTabModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1090
+ ReuseTabModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabModule, declarations: [ReuseTabComponent, ReuseTabContextMenuComponent, ReuseTabContextComponent, ReuseTabContextDirective], imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule], exports: [ReuseTabComponent] });
1091
+ ReuseTabModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabModule, imports: [[CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule]] });
1092
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.5", ngImport: i0, type: ReuseTabModule, decorators: [{
1093
1093
  type: NgModule,
1094
1094
  args: [{
1095
1095
  imports: [CommonModule, RouterModule, DelonLocaleModule, NzMenuModule, NzTabsModule, NzIconModule, OverlayModule],