@delon/abc 15.2.1 → 16.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.
- package/auto-focus/auto-focus.directive.d.ts +1 -1
- package/avatar-list/avatar-list-item.component.d.ts +1 -1
- package/avatar-list/avatar-list.component.d.ts +1 -1
- package/count-down/count-down.component.d.ts +1 -1
- package/date-picker/range.directive.d.ts +1 -1
- package/down-file/down-file.directive.d.ts +1 -1
- package/ellipsis/ellipsis.component.d.ts +1 -1
- package/error-collect/error-collect.component.d.ts +1 -1
- package/esm2022/auto-focus/auto-focus.directive.mjs +51 -0
- package/esm2022/auto-focus/auto-focus.module.mjs +18 -0
- package/esm2022/avatar-list/avatar-list-item.component.mjs +27 -0
- package/esm2022/avatar-list/avatar-list.component.mjs +89 -0
- package/esm2022/avatar-list/avatar-list.module.mjs +23 -0
- package/esm2022/count-down/count-down.component.mjs +46 -0
- package/esm2022/count-down/count-down.module.mjs +21 -0
- package/esm2022/date-picker/date-picker.module.mjs +23 -0
- package/esm2022/date-picker/range-shortcut.component.mjs +41 -0
- package/esm2022/date-picker/range.directive.mjs +174 -0
- package/esm2022/down-file/down-file.directive.mjs +115 -0
- package/esm2022/down-file/down-file.module.mjs +21 -0
- package/esm2022/ellipsis/ellipsis.component.mjs +233 -0
- package/esm2022/ellipsis/ellipsis.module.mjs +22 -0
- package/esm2022/error-collect/error-collect.component.mjs +122 -0
- package/esm2022/error-collect/error-collect.module.mjs +21 -0
- package/esm2022/exception/exception.component.mjs +109 -0
- package/esm2022/exception/exception.module.mjs +24 -0
- package/esm2022/footer-toolbar/footer-toolbar.component.mjs +45 -0
- package/esm2022/footer-toolbar/footer-toolbar.module.mjs +22 -0
- package/esm2022/full-content/full-content-toggle.directive.mjs +25 -0
- package/esm2022/full-content/full-content.component.mjs +140 -0
- package/esm2022/full-content/full-content.module.mjs +21 -0
- package/esm2022/full-content/full-content.service.mjs +23 -0
- package/esm2022/global-footer/global-footer-item.component.mjs +31 -0
- package/esm2022/global-footer/global-footer.component.mjs +73 -0
- package/esm2022/global-footer/global-footer.module.mjs +22 -0
- package/esm2022/hotkey/hotkey.directive.mjs +37 -0
- package/esm2022/hotkey/hotkey.module.mjs +18 -0
- package/esm2022/let/let.directive.mjs +38 -0
- package/esm2022/let/let.module.mjs +18 -0
- package/esm2022/loading/loading.component.mjs +27 -0
- package/esm2022/loading/loading.module.mjs +24 -0
- package/esm2022/loading/loading.service.mjs +91 -0
- package/esm2022/lodop/lodop.module.mjs +13 -0
- package/esm2022/lodop/lodop.service.mjs +223 -0
- package/esm2022/media/media.component.mjs +118 -0
- package/esm2022/media/media.module.mjs +20 -0
- package/esm2022/media/media.service.mjs +47 -0
- package/esm2022/notice-icon/notice-icon-tab.component.mjs +35 -0
- package/esm2022/notice-icon/notice-icon.component.mjs +90 -0
- package/esm2022/notice-icon/notice-icon.module.mjs +59 -0
- package/esm2022/observers/observer-size.mjs +119 -0
- package/esm2022/onboarding/onboarding.component.mjs +135 -0
- package/esm2022/onboarding/onboarding.module.mjs +27 -0
- package/esm2022/onboarding/onboarding.service.mjs +186 -0
- package/esm2022/page-header/page-header.component.mjs +247 -0
- package/esm2022/page-header/page-header.module.mjs +25 -0
- package/esm2022/pdf/pdf.component.mjs +474 -0
- package/esm2022/pdf/pdf.module.mjs +21 -0
- package/esm2022/qr/qr.component.mjs +137 -0
- package/esm2022/qr/qr.module.mjs +20 -0
- package/esm2022/quick-menu/quick-menu.component.mjs +90 -0
- package/esm2022/quick-menu/quick-menu.module.mjs +22 -0
- package/esm2022/result/result.component.mjs +61 -0
- package/esm2022/result/result.module.mjs +22 -0
- package/esm2022/reuse-tab/reuse-tab-context-menu.component.mjs +77 -0
- package/esm2022/reuse-tab/reuse-tab-context.component.mjs +34 -0
- package/esm2022/reuse-tab/reuse-tab-context.directive.mjs +36 -0
- package/esm2022/reuse-tab/reuse-tab-context.service.mjs +56 -0
- package/esm2022/reuse-tab/reuse-tab.component.mjs +368 -0
- package/esm2022/reuse-tab/reuse-tab.module.mjs +50 -0
- package/esm2022/reuse-tab/reuse-tab.service.mjs +559 -0
- package/esm2022/se/se-container.component.mjs +174 -0
- package/esm2022/se/se.component.mjs +235 -0
- package/esm2022/se/se.module.mjs +24 -0
- package/esm2022/sg/sg-container.component.mjs +53 -0
- package/esm2022/sg/sg.component.mjs +68 -0
- package/esm2022/sg/sg.module.mjs +21 -0
- package/esm2022/st/st-column-source.mjs +493 -0
- package/esm2022/st/st-data-source.mjs +480 -0
- package/esm2022/st/st-export.mjs +90 -0
- package/{esm2020 → esm2022}/st/st-filter.component.mjs +8 -7
- package/esm2022/st/st-row.directive.mjs +47 -0
- package/esm2022/st/st-widget-host.directive.mjs +32 -0
- package/esm2022/st/st-widget.mjs +27 -0
- package/esm2022/st/st.component.mjs +1004 -0
- package/esm2022/st/st.module.mjs +97 -0
- package/esm2022/sv/sv-container.component.mjs +127 -0
- package/esm2022/sv/sv-value.component.mjs +45 -0
- package/esm2022/sv/sv.component.mjs +120 -0
- package/esm2022/sv/sv.module.mjs +26 -0
- package/esm2022/tag-select/tag-select.component.mjs +64 -0
- package/esm2022/tag-select/tag-select.module.mjs +22 -0
- package/esm2022/xlsx/xlsx.directive.mjs +28 -0
- package/esm2022/xlsx/xlsx.module.mjs +20 -0
- package/esm2022/xlsx/xlsx.service.mjs +129 -0
- package/esm2022/zip/zip.module.mjs +16 -0
- package/esm2022/zip/zip.service.mjs +117 -0
- package/exception/exception.component.d.ts +1 -1
- package/{fesm2015 → fesm2022}/auto-focus.mjs +7 -7
- package/{fesm2015 → fesm2022}/auto-focus.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/avatar-list.mjs +10 -10
- package/fesm2022/avatar-list.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/chart-observer-size.mjs +10 -10
- package/fesm2022/chart-observer-size.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/count-down.mjs +7 -7
- package/fesm2022/count-down.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/date-picker.mjs +14 -13
- package/fesm2022/date-picker.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/down-file.mjs +8 -8
- package/fesm2022/down-file.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ellipsis.mjs +7 -7
- package/fesm2022/ellipsis.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/error-collect.mjs +9 -9
- package/fesm2022/error-collect.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/exception.mjs +7 -7
- package/fesm2022/exception.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/footer-toolbar.mjs +7 -7
- package/fesm2022/footer-toolbar.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/full-content.mjs +13 -13
- package/fesm2022/full-content.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/global-footer.mjs +10 -10
- package/fesm2022/global-footer.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/hotkey.mjs +7 -7
- package/{fesm2015 → fesm2022}/hotkey.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/let.mjs +9 -8
- package/fesm2022/let.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/loading.mjs +10 -11
- package/fesm2022/loading.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/lodop.mjs +7 -7
- package/{fesm2020 → fesm2022}/lodop.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/media.mjs +10 -10
- package/fesm2022/media.mjs.map +1 -0
- package/fesm2022/notice-icon.mjs +180 -0
- package/fesm2022/notice-icon.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/onboarding.mjs +10 -11
- package/{fesm2020 → fesm2022}/onboarding.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/page-header.mjs +7 -7
- package/{fesm2015 → fesm2022}/page-header.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/pdf.mjs +9 -9
- package/{fesm2020 → fesm2022}/pdf.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/qr.mjs +7 -7
- package/{fesm2020 → fesm2022}/qr.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/quick-menu.mjs +7 -7
- package/fesm2022/quick-menu.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/result.mjs +7 -7
- package/{fesm2020 → fesm2022}/result.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/reuse-tab.mjs +31 -31
- package/{fesm2015 → fesm2022}/reuse-tab.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/se.mjs +15 -15
- package/fesm2022/se.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/sg.mjs +10 -10
- package/fesm2022/sg.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/st.mjs +72 -72
- package/fesm2022/st.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/sv.mjs +20 -20
- package/fesm2022/sv.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/tag-select.mjs +7 -7
- package/fesm2022/tag-select.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/xlsx.mjs +10 -10
- package/fesm2022/xlsx.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/zip.mjs +7 -7
- package/{fesm2015 → fesm2022}/zip.mjs.map +1 -1
- package/footer-toolbar/footer-toolbar.component.d.ts +1 -1
- package/full-content/full-content.component.d.ts +1 -1
- package/global-footer/global-footer-item.component.d.ts +1 -1
- package/global-footer/global-footer.component.d.ts +1 -1
- package/hotkey/hotkey.directive.d.ts +1 -1
- package/let/let.directive.d.ts +1 -1
- package/loading/style/index.less +1 -4
- package/media/media.component.d.ts +1 -1
- package/notice-icon/notice-icon-tab.component.d.ts +1 -1
- package/notice-icon/notice-icon.component.d.ts +1 -1
- package/onboarding/style/index.less +1 -4
- package/package.json +105 -175
- package/page-header/page-header.component.d.ts +1 -1
- package/pdf/pdf.component.d.ts +1 -1
- package/qr/qr.component.d.ts +1 -1
- package/quick-menu/quick-menu.component.d.ts +1 -1
- package/result/result.component.d.ts +1 -1
- package/reuse-tab/reuse-tab-context-menu.component.d.ts +1 -1
- package/reuse-tab/reuse-tab-context.component.d.ts +1 -1
- package/reuse-tab/reuse-tab-context.directive.d.ts +1 -1
- package/reuse-tab/reuse-tab.component.d.ts +1 -1
- package/se/se-container.component.d.ts +1 -1
- package/se/se.component.d.ts +1 -1
- package/sg/sg-container.component.d.ts +1 -1
- package/sg/sg.component.d.ts +1 -1
- package/st/st-filter.component.d.ts +1 -1
- package/st/st-row.directive.d.ts +1 -1
- package/st/st-widget-host.directive.d.ts +1 -1
- package/st/st.component.d.ts +9 -5
- package/st/style/index.less +6 -2
- package/sv/sv-container.component.d.ts +1 -1
- package/sv/sv-value.component.d.ts +1 -1
- package/sv/sv.component.d.ts +1 -1
- package/tag-select/tag-select.component.d.ts +1 -1
- package/xlsx/xlsx.directive.d.ts +1 -1
- package/esm2020/auto-focus/auto-focus.directive.mjs +0 -50
- package/esm2020/auto-focus/auto-focus.module.mjs +0 -17
- package/esm2020/avatar-list/avatar-list-item.component.mjs +0 -26
- package/esm2020/avatar-list/avatar-list.component.mjs +0 -88
- package/esm2020/avatar-list/avatar-list.module.mjs +0 -22
- package/esm2020/count-down/count-down.component.mjs +0 -45
- package/esm2020/count-down/count-down.module.mjs +0 -20
- package/esm2020/date-picker/date-picker.module.mjs +0 -22
- package/esm2020/date-picker/range-shortcut.component.mjs +0 -40
- package/esm2020/date-picker/range.directive.mjs +0 -172
- package/esm2020/down-file/down-file.directive.mjs +0 -114
- package/esm2020/down-file/down-file.module.mjs +0 -20
- package/esm2020/ellipsis/ellipsis.component.mjs +0 -232
- package/esm2020/ellipsis/ellipsis.module.mjs +0 -21
- package/esm2020/error-collect/error-collect.component.mjs +0 -121
- package/esm2020/error-collect/error-collect.module.mjs +0 -20
- package/esm2020/exception/exception.component.mjs +0 -108
- package/esm2020/exception/exception.module.mjs +0 -23
- package/esm2020/footer-toolbar/footer-toolbar.component.mjs +0 -44
- package/esm2020/footer-toolbar/footer-toolbar.module.mjs +0 -21
- package/esm2020/full-content/full-content-toggle.directive.mjs +0 -24
- package/esm2020/full-content/full-content.component.mjs +0 -139
- package/esm2020/full-content/full-content.module.mjs +0 -20
- package/esm2020/full-content/full-content.service.mjs +0 -22
- package/esm2020/global-footer/global-footer-item.component.mjs +0 -30
- package/esm2020/global-footer/global-footer.component.mjs +0 -72
- package/esm2020/global-footer/global-footer.module.mjs +0 -21
- package/esm2020/hotkey/hotkey.directive.mjs +0 -36
- package/esm2020/hotkey/hotkey.module.mjs +0 -17
- package/esm2020/let/let.directive.mjs +0 -36
- package/esm2020/let/let.module.mjs +0 -17
- package/esm2020/loading/loading.component.mjs +0 -26
- package/esm2020/loading/loading.module.mjs +0 -24
- package/esm2020/loading/loading.service.mjs +0 -90
- package/esm2020/lodop/lodop.module.mjs +0 -12
- package/esm2020/lodop/lodop.service.mjs +0 -222
- package/esm2020/media/media.component.mjs +0 -117
- package/esm2020/media/media.module.mjs +0 -19
- package/esm2020/media/media.service.mjs +0 -46
- package/esm2020/notice-icon/notice-icon-tab.component.mjs +0 -34
- package/esm2020/notice-icon/notice-icon.component.mjs +0 -89
- package/esm2020/notice-icon/notice-icon.module.mjs +0 -58
- package/esm2020/observers/observer-size.mjs +0 -116
- package/esm2020/onboarding/onboarding.component.mjs +0 -134
- package/esm2020/onboarding/onboarding.module.mjs +0 -27
- package/esm2020/onboarding/onboarding.service.mjs +0 -185
- package/esm2020/page-header/page-header.component.mjs +0 -246
- package/esm2020/page-header/page-header.module.mjs +0 -24
- package/esm2020/pdf/pdf.component.mjs +0 -473
- package/esm2020/pdf/pdf.module.mjs +0 -20
- package/esm2020/qr/qr.component.mjs +0 -136
- package/esm2020/qr/qr.module.mjs +0 -19
- package/esm2020/quick-menu/quick-menu.component.mjs +0 -89
- package/esm2020/quick-menu/quick-menu.module.mjs +0 -21
- package/esm2020/result/result.component.mjs +0 -60
- package/esm2020/result/result.module.mjs +0 -21
- package/esm2020/reuse-tab/reuse-tab-context-menu.component.mjs +0 -76
- package/esm2020/reuse-tab/reuse-tab-context.component.mjs +0 -33
- package/esm2020/reuse-tab/reuse-tab-context.directive.mjs +0 -35
- package/esm2020/reuse-tab/reuse-tab-context.service.mjs +0 -55
- package/esm2020/reuse-tab/reuse-tab.component.mjs +0 -367
- package/esm2020/reuse-tab/reuse-tab.module.mjs +0 -49
- package/esm2020/reuse-tab/reuse-tab.service.mjs +0 -558
- package/esm2020/se/se-container.component.mjs +0 -172
- package/esm2020/se/se.component.mjs +0 -234
- package/esm2020/se/se.module.mjs +0 -23
- package/esm2020/sg/sg-container.component.mjs +0 -52
- package/esm2020/sg/sg.component.mjs +0 -67
- package/esm2020/sg/sg.module.mjs +0 -20
- package/esm2020/st/st-column-source.mjs +0 -492
- package/esm2020/st/st-data-source.mjs +0 -479
- package/esm2020/st/st-export.mjs +0 -89
- package/esm2020/st/st-row.directive.mjs +0 -45
- package/esm2020/st/st-widget-host.directive.mjs +0 -31
- package/esm2020/st/st-widget.mjs +0 -26
- package/esm2020/st/st.component.mjs +0 -1002
- package/esm2020/st/st.module.mjs +0 -96
- package/esm2020/sv/sv-container.component.mjs +0 -125
- package/esm2020/sv/sv-value.component.mjs +0 -44
- package/esm2020/sv/sv.component.mjs +0 -119
- package/esm2020/sv/sv.module.mjs +0 -25
- package/esm2020/tag-select/tag-select.component.mjs +0 -63
- package/esm2020/tag-select/tag-select.module.mjs +0 -21
- package/esm2020/xlsx/xlsx.directive.mjs +0 -27
- package/esm2020/xlsx/xlsx.module.mjs +0 -19
- package/esm2020/xlsx/xlsx.service.mjs +0 -128
- package/esm2020/zip/zip.module.mjs +0 -15
- package/esm2020/zip/zip.service.mjs +0 -116
- package/fesm2015/avatar-list.mjs +0 -139
- package/fesm2015/avatar-list.mjs.map +0 -1
- package/fesm2015/chart-observer-size.mjs +0 -124
- package/fesm2015/chart-observer-size.mjs.map +0 -1
- package/fesm2015/count-down.mjs +0 -69
- package/fesm2015/count-down.mjs.map +0 -1
- package/fesm2015/date-picker.mjs +0 -236
- package/fesm2015/date-picker.mjs.map +0 -1
- package/fesm2015/down-file.mjs +0 -141
- package/fesm2015/down-file.mjs.map +0 -1
- package/fesm2015/ellipsis.mjs +0 -258
- package/fesm2015/ellipsis.mjs.map +0 -1
- package/fesm2015/error-collect.mjs +0 -147
- package/fesm2015/error-collect.mjs.map +0 -1
- package/fesm2015/exception.mjs +0 -138
- package/fesm2015/exception.mjs.map +0 -1
- package/fesm2015/footer-toolbar.mjs +0 -70
- package/fesm2015/footer-toolbar.mjs.map +0 -1
- package/fesm2015/full-content.mjs +0 -202
- package/fesm2015/full-content.mjs.map +0 -1
- package/fesm2015/global-footer.mjs +0 -126
- package/fesm2015/global-footer.mjs.map +0 -1
- package/fesm2015/hotkey.mjs +0 -57
- package/fesm2015/let.mjs +0 -59
- package/fesm2015/let.mjs.map +0 -1
- package/fesm2015/loading.mjs +0 -142
- package/fesm2015/loading.mjs.map +0 -1
- package/fesm2015/lodop.mjs +0 -232
- package/fesm2015/lodop.mjs.map +0 -1
- package/fesm2015/media.mjs +0 -180
- package/fesm2015/media.mjs.map +0 -1
- package/fesm2015/notice-icon.mjs +0 -180
- package/fesm2015/notice-icon.mjs.map +0 -1
- package/fesm2015/onboarding.mjs +0 -336
- package/fesm2015/onboarding.mjs.map +0 -1
- package/fesm2015/page-header.mjs +0 -276
- package/fesm2015/pdf.mjs +0 -516
- package/fesm2015/pdf.mjs.map +0 -1
- package/fesm2015/qr.mjs.map +0 -1
- package/fesm2015/quick-menu.mjs +0 -114
- package/fesm2015/quick-menu.mjs.map +0 -1
- package/fesm2015/result.mjs +0 -88
- package/fesm2015/result.mjs.map +0 -1
- package/fesm2015/reuse-tab.mjs +0 -1217
- package/fesm2015/se.mjs +0 -444
- package/fesm2015/se.mjs.map +0 -1
- package/fesm2015/sg.mjs +0 -139
- package/fesm2015/sg.mjs.map +0 -1
- package/fesm2015/st.mjs +0 -2526
- package/fesm2015/st.mjs.map +0 -1
- package/fesm2015/sv.mjs +0 -308
- package/fesm2015/sv.mjs.map +0 -1
- package/fesm2015/tag-select.mjs +0 -91
- package/fesm2015/tag-select.mjs.map +0 -1
- package/fesm2015/xlsx.mjs +0 -172
- package/fesm2015/xlsx.mjs.map +0 -1
- package/fesm2015/zip.mjs +0 -136
- package/fesm2020/abc.mjs +0 -7
- package/fesm2020/abc.mjs.map +0 -1
- package/fesm2020/auto-focus.mjs +0 -71
- package/fesm2020/auto-focus.mjs.map +0 -1
- package/fesm2020/avatar-list.mjs.map +0 -1
- package/fesm2020/chart-observer-size.mjs.map +0 -1
- package/fesm2020/count-down.mjs.map +0 -1
- package/fesm2020/date-picker.mjs.map +0 -1
- package/fesm2020/down-file.mjs.map +0 -1
- package/fesm2020/ellipsis.mjs.map +0 -1
- package/fesm2020/error-collect.mjs.map +0 -1
- package/fesm2020/exception.mjs.map +0 -1
- package/fesm2020/footer-toolbar.mjs.map +0 -1
- package/fesm2020/full-content.mjs.map +0 -1
- package/fesm2020/global-footer.mjs.map +0 -1
- package/fesm2020/hotkey.mjs.map +0 -1
- package/fesm2020/let.mjs.map +0 -1
- package/fesm2020/loading.mjs.map +0 -1
- package/fesm2020/media.mjs.map +0 -1
- package/fesm2020/notice-icon.mjs +0 -180
- package/fesm2020/notice-icon.mjs.map +0 -1
- package/fesm2020/page-header.mjs.map +0 -1
- package/fesm2020/qr.mjs +0 -171
- package/fesm2020/quick-menu.mjs.map +0 -1
- package/fesm2020/reuse-tab.mjs.map +0 -1
- package/fesm2020/se.mjs.map +0 -1
- package/fesm2020/sg.mjs.map +0 -1
- package/fesm2020/st.mjs.map +0 -1
- package/fesm2020/sv.mjs.map +0 -1
- package/fesm2020/tag-select.mjs.map +0 -1
- package/fesm2020/xlsx.mjs.map +0 -1
- package/fesm2020/zip.mjs.map +0 -1
- /package/{esm2020 → esm2022}/abc.mjs +0 -0
- /package/{esm2020 → esm2022}/auto-focus/auto-focus.mjs +0 -0
- /package/{esm2020 → esm2022}/auto-focus/index.mjs +0 -0
- /package/{esm2020 → esm2022}/avatar-list/avatar-list.mjs +0 -0
- /package/{esm2020 → esm2022}/avatar-list/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/count-down/count-down.mjs +0 -0
- /package/{esm2020 → esm2022}/count-down/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/date-picker/date-picker.mjs +0 -0
- /package/{esm2020 → esm2022}/date-picker/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/down-file/down-file.mjs +0 -0
- /package/{esm2020 → esm2022}/down-file/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/ellipsis/ellipsis.mjs +0 -0
- /package/{esm2020 → esm2022}/ellipsis/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/error-collect/error-collect.mjs +0 -0
- /package/{esm2020 → esm2022}/error-collect/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/exception/exception.mjs +0 -0
- /package/{esm2020 → esm2022}/exception/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/footer-toolbar/footer-toolbar.mjs +0 -0
- /package/{esm2020 → esm2022}/footer-toolbar/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/full-content/full-content.mjs +0 -0
- /package/{esm2020 → esm2022}/full-content/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/global-footer/global-footer.mjs +0 -0
- /package/{esm2020 → esm2022}/global-footer/global-footer.types.mjs +0 -0
- /package/{esm2020 → esm2022}/global-footer/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/hotkey/hotkey.mjs +0 -0
- /package/{esm2020 → esm2022}/hotkey/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/let/index.mjs +0 -0
- /package/{esm2020 → esm2022}/let/let.mjs +0 -0
- /package/{esm2020 → esm2022}/loading/loading.mjs +0 -0
- /package/{esm2020 → esm2022}/loading/loading.types.mjs +0 -0
- /package/{esm2020 → esm2022}/loading/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/lodop/lodop.mjs +0 -0
- /package/{esm2020 → esm2022}/lodop/lodop.types.mjs +0 -0
- /package/{esm2020 → esm2022}/lodop/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/media/media.mjs +0 -0
- /package/{esm2020 → esm2022}/media/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/notice-icon/notice-icon.mjs +0 -0
- /package/{esm2020 → esm2022}/notice-icon/notice-icon.types.mjs +0 -0
- /package/{esm2020 → esm2022}/notice-icon/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/observers/chart-observer-size.mjs +0 -0
- /package/{esm2020 → esm2022}/observers/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/onboarding/onboarding.mjs +0 -0
- /package/{esm2020 → esm2022}/onboarding/onboarding.types.mjs +0 -0
- /package/{esm2020 → esm2022}/onboarding/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/page-header/page-header.mjs +0 -0
- /package/{esm2020 → esm2022}/page-header/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/pdf/pdf.config.mjs +0 -0
- /package/{esm2020 → esm2022}/pdf/pdf.mjs +0 -0
- /package/{esm2020 → esm2022}/pdf/pdf.types.mjs +0 -0
- /package/{esm2020 → esm2022}/pdf/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/qr/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/qr/qr.config.mjs +0 -0
- /package/{esm2020 → esm2022}/qr/qr.mjs +0 -0
- /package/{esm2020 → esm2022}/qr/qr.types.mjs +0 -0
- /package/{esm2020 → esm2022}/quick-menu/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/quick-menu/quick-menu.mjs +0 -0
- /package/{esm2020 → esm2022}/result/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/result/result.mjs +0 -0
- /package/{esm2020 → esm2022}/reuse-tab/lifecycle_hooks.mjs +0 -0
- /package/{esm2020 → esm2022}/reuse-tab/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/reuse-tab/reuse-tab.interfaces.mjs +0 -0
- /package/{esm2020 → esm2022}/reuse-tab/reuse-tab.mjs +0 -0
- /package/{esm2020 → esm2022}/reuse-tab/reuse-tab.state.mjs +0 -0
- /package/{esm2020 → esm2022}/reuse-tab/reuse-tab.strategy.mjs +0 -0
- /package/{esm2020 → esm2022}/se/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/se/se.mjs +0 -0
- /package/{esm2020 → esm2022}/se/se.types.mjs +0 -0
- /package/{esm2020 → esm2022}/sg/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/sg/sg.mjs +0 -0
- /package/{esm2020 → esm2022}/st/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/st/st.config.mjs +0 -0
- /package/{esm2020 → esm2022}/st/st.interfaces.mjs +0 -0
- /package/{esm2020 → esm2022}/st/st.mjs +0 -0
- /package/{esm2020 → esm2022}/st/st.types.mjs +0 -0
- /package/{esm2020 → esm2022}/sv/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/sv/sv.mjs +0 -0
- /package/{esm2020 → esm2022}/tag-select/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/tag-select/tag-select.mjs +0 -0
- /package/{esm2020 → esm2022}/xlsx/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/xlsx/xlsx.mjs +0 -0
- /package/{esm2020 → esm2022}/xlsx/xlsx.types.mjs +0 -0
- /package/{esm2020 → esm2022}/zip/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/zip/zip.mjs +0 -0
- /package/{esm2020 → esm2022}/zip/zip.types.mjs +0 -0
- /package/{fesm2015 → fesm2022}/abc.mjs +0 -0
- /package/{fesm2015 → fesm2022}/abc.mjs.map +0 -0
package/fesm2015/st.mjs
DELETED
|
@@ -1,2526 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Directive, Host, Input, Optional, Inject, EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, ViewChild, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1$1 from '@delon/theme';
|
|
4
|
-
import { ALAIN_I18N_TOKEN, DatePipe, YNPipe } from '@delon/theme';
|
|
5
|
-
import { warn, deepCopy, deepGet, deepMergeKey } from '@delon/util/other';
|
|
6
|
-
import * as i1 from '@angular/platform-browser';
|
|
7
|
-
import * as i3 from '@delon/acl';
|
|
8
|
-
import { DelonACLModule } from '@delon/acl';
|
|
9
|
-
import { HttpParams } from '@angular/common/http';
|
|
10
|
-
import { map, of, Subject, takeUntil, filter, from, isObservable } from 'rxjs';
|
|
11
|
-
import * as i7 from '@angular/common';
|
|
12
|
-
import { DOCUMENT, DecimalPipe, CommonModule } from '@angular/common';
|
|
13
|
-
import * as i3$1 from '@delon/util/format';
|
|
14
|
-
import { __awaiter, __decorate } from 'tslib';
|
|
15
|
-
import * as i1$2 from '@delon/abc/xlsx';
|
|
16
|
-
import { toBoolean, InputNumber, InputBoolean } from '@delon/util/decorator';
|
|
17
|
-
import * as i5 from '@delon/util/config';
|
|
18
|
-
import * as i6 from 'ng-zorro-antd/dropdown';
|
|
19
|
-
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
20
|
-
import * as i8 from '@angular/forms';
|
|
21
|
-
import { FormsModule } from '@angular/forms';
|
|
22
|
-
import * as i9$1 from '@delon/abc/let';
|
|
23
|
-
import { LetModule } from '@delon/abc/let';
|
|
24
|
-
import * as i10$1 from 'ng-zorro-antd/table';
|
|
25
|
-
import { NzTableModule } from 'ng-zorro-antd/table';
|
|
26
|
-
import * as i11 from 'ng-zorro-antd/icon';
|
|
27
|
-
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
28
|
-
import * as i12 from 'ng-zorro-antd/checkbox';
|
|
29
|
-
import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
|
|
30
|
-
import * as i13 from 'ng-zorro-antd/menu';
|
|
31
|
-
import { NzMenuModule } from 'ng-zorro-antd/menu';
|
|
32
|
-
import * as i14 from 'ng-zorro-antd/tooltip';
|
|
33
|
-
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
34
|
-
import * as i15 from 'ng-zorro-antd/resizable';
|
|
35
|
-
import { NzResizableModule } from 'ng-zorro-antd/resizable';
|
|
36
|
-
import * as i7$1 from 'ng-zorro-antd/radio';
|
|
37
|
-
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
38
|
-
import * as i8$1 from 'ng-zorro-antd/input';
|
|
39
|
-
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
40
|
-
import * as i9 from 'ng-zorro-antd/input-number';
|
|
41
|
-
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
42
|
-
import * as i10 from 'ng-zorro-antd/date-picker';
|
|
43
|
-
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
44
|
-
import * as i17 from '@angular/router';
|
|
45
|
-
import * as i18 from 'ng-zorro-antd/popconfirm';
|
|
46
|
-
import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
|
|
47
|
-
import * as i19 from 'ng-zorro-antd/badge';
|
|
48
|
-
import { NzBadgeModule } from 'ng-zorro-antd/badge';
|
|
49
|
-
import * as i20 from 'ng-zorro-antd/divider';
|
|
50
|
-
import { NzDividerModule } from 'ng-zorro-antd/divider';
|
|
51
|
-
import * as i22 from 'ng-zorro-antd/tag';
|
|
52
|
-
import { NzTagModule } from 'ng-zorro-antd/tag';
|
|
53
|
-
|
|
54
|
-
class STRowSource {
|
|
55
|
-
constructor() {
|
|
56
|
-
this.titles = {};
|
|
57
|
-
this.rows = {};
|
|
58
|
-
}
|
|
59
|
-
add(type, path, ref) {
|
|
60
|
-
this[type === 'title' ? 'titles' : 'rows'][path] = ref;
|
|
61
|
-
}
|
|
62
|
-
getTitle(path) {
|
|
63
|
-
return this.titles[path];
|
|
64
|
-
}
|
|
65
|
-
getRow(path) {
|
|
66
|
-
return this.rows[path];
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
STRowSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STRowSource, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
70
|
-
STRowSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STRowSource });
|
|
71
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STRowSource, decorators: [{
|
|
72
|
-
type: Injectable
|
|
73
|
-
}] });
|
|
74
|
-
class STRowDirective {
|
|
75
|
-
constructor(ref, source) {
|
|
76
|
-
this.ref = ref;
|
|
77
|
-
this.source = source;
|
|
78
|
-
}
|
|
79
|
-
ngOnInit() {
|
|
80
|
-
this.source.add(this.type, this.id, this.ref);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
STRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STRowDirective, deps: [{ token: i0.TemplateRef }, { token: STRowSource, host: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
84
|
-
STRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: STRowDirective, selector: "[st-row]", inputs: { id: ["st-row", "id"], type: "type" }, ngImport: i0 });
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STRowDirective, decorators: [{
|
|
86
|
-
type: Directive,
|
|
87
|
-
args: [{ selector: '[st-row]' }]
|
|
88
|
-
}], ctorParameters: function () {
|
|
89
|
-
return [{ type: i0.TemplateRef }, { type: STRowSource, decorators: [{
|
|
90
|
-
type: Host
|
|
91
|
-
}] }];
|
|
92
|
-
}, propDecorators: { id: [{
|
|
93
|
-
type: Input,
|
|
94
|
-
args: ['st-row']
|
|
95
|
-
}], type: [{
|
|
96
|
-
type: Input
|
|
97
|
-
}] } });
|
|
98
|
-
|
|
99
|
-
class STWidgetRegistry {
|
|
100
|
-
constructor() {
|
|
101
|
-
this._widgets = {};
|
|
102
|
-
}
|
|
103
|
-
get widgets() {
|
|
104
|
-
return this._widgets;
|
|
105
|
-
}
|
|
106
|
-
register(type, widget) {
|
|
107
|
-
this._widgets[type] = widget;
|
|
108
|
-
}
|
|
109
|
-
has(type) {
|
|
110
|
-
return this._widgets.hasOwnProperty(type);
|
|
111
|
-
}
|
|
112
|
-
get(type) {
|
|
113
|
-
return this._widgets[type];
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
STWidgetRegistry.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STWidgetRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
117
|
-
STWidgetRegistry.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STWidgetRegistry, providedIn: 'root' });
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STWidgetRegistry, decorators: [{
|
|
119
|
-
type: Injectable,
|
|
120
|
-
args: [{ providedIn: 'root' }]
|
|
121
|
-
}] });
|
|
122
|
-
|
|
123
|
-
class STColumnSource {
|
|
124
|
-
constructor(dom, rowSource, acl, i18nSrv, stWidgetRegistry) {
|
|
125
|
-
this.dom = dom;
|
|
126
|
-
this.rowSource = rowSource;
|
|
127
|
-
this.acl = acl;
|
|
128
|
-
this.i18nSrv = i18nSrv;
|
|
129
|
-
this.stWidgetRegistry = stWidgetRegistry;
|
|
130
|
-
}
|
|
131
|
-
setCog(val) {
|
|
132
|
-
this.cog = val;
|
|
133
|
-
}
|
|
134
|
-
fixPop(i, def) {
|
|
135
|
-
if (i.pop == null || i.pop === false) {
|
|
136
|
-
i.pop = false;
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
let pop = Object.assign({}, def);
|
|
140
|
-
if (typeof i.pop === 'string') {
|
|
141
|
-
pop.title = i.pop;
|
|
142
|
-
}
|
|
143
|
-
else if (typeof i.pop === 'object') {
|
|
144
|
-
pop = Object.assign(Object.assign({}, pop), i.pop);
|
|
145
|
-
}
|
|
146
|
-
if (typeof pop.condition !== 'function') {
|
|
147
|
-
pop.condition = () => false;
|
|
148
|
-
}
|
|
149
|
-
i.pop = pop;
|
|
150
|
-
}
|
|
151
|
-
btnCoerce(list) {
|
|
152
|
-
if (!list)
|
|
153
|
-
return [];
|
|
154
|
-
const ret = [];
|
|
155
|
-
const { modal, drawer, pop, btnIcon } = this.cog;
|
|
156
|
-
for (const item of list) {
|
|
157
|
-
if (this.acl && item.acl && !this.acl.can(item.acl)) {
|
|
158
|
-
continue;
|
|
159
|
-
}
|
|
160
|
-
if (item.type === 'modal' || item.type === 'static') {
|
|
161
|
-
if (item.modal == null || item.modal.component == null) {
|
|
162
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
163
|
-
console.warn(`[st] Should specify modal parameter when type is modal or static`);
|
|
164
|
-
}
|
|
165
|
-
item.type = 'none';
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
item.modal = Object.assign(Object.assign({ paramsName: 'record', size: 'lg' }, modal), item.modal);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
if (item.type === 'drawer') {
|
|
172
|
-
if (item.drawer == null || item.drawer.component == null) {
|
|
173
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
174
|
-
console.warn(`[st] Should specify drawer parameter when type is drawer`);
|
|
175
|
-
}
|
|
176
|
-
item.type = 'none';
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
item.drawer = Object.assign(Object.assign({ paramsName: 'record', size: 'lg' }, drawer), item.drawer);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
if (item.type === 'del' && typeof item.pop === 'undefined') {
|
|
183
|
-
item.pop = true;
|
|
184
|
-
}
|
|
185
|
-
// pop
|
|
186
|
-
this.fixPop(item, pop);
|
|
187
|
-
if (item.icon) {
|
|
188
|
-
item.icon = Object.assign(Object.assign({}, btnIcon), (typeof item.icon === 'string' ? { type: item.icon } : item.icon));
|
|
189
|
-
}
|
|
190
|
-
item.children = item.children && item.children.length > 0 ? this.btnCoerce(item.children) : [];
|
|
191
|
-
// i18n
|
|
192
|
-
if (item.i18n && this.i18nSrv) {
|
|
193
|
-
item.text = this.i18nSrv.fanyi(item.i18n);
|
|
194
|
-
}
|
|
195
|
-
ret.push(item);
|
|
196
|
-
}
|
|
197
|
-
this.btnCoerceIf(ret);
|
|
198
|
-
return ret;
|
|
199
|
-
}
|
|
200
|
-
btnCoerceIf(list) {
|
|
201
|
-
for (const item of list) {
|
|
202
|
-
item.iifBehavior = item.iifBehavior || this.cog.iifBehavior;
|
|
203
|
-
if (item.children && item.children.length > 0) {
|
|
204
|
-
this.btnCoerceIf(item.children);
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
item.children = [];
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
fixedCoerce(list) {
|
|
212
|
-
const countReduce = (a, b) => a + +b.width.toString().replace('px', '');
|
|
213
|
-
// left width
|
|
214
|
-
list
|
|
215
|
-
.filter(w => w.fixed && w.fixed === 'left' && w.width)
|
|
216
|
-
.forEach((item, idx) => (item._left = `${list.slice(0, idx).reduce(countReduce, 0)}px`));
|
|
217
|
-
// right width
|
|
218
|
-
list
|
|
219
|
-
.filter(w => w.fixed && w.fixed === 'right' && w.width)
|
|
220
|
-
.reverse()
|
|
221
|
-
.forEach((item, idx) => (item._right = `${idx > 0 ? list.slice(-idx).reduce(countReduce, 0) : 0}px`));
|
|
222
|
-
}
|
|
223
|
-
sortCoerce(item) {
|
|
224
|
-
const res = this.fixSortCoerce(item);
|
|
225
|
-
res.reName = Object.assign(Object.assign({}, this.cog.sortReName), res.reName);
|
|
226
|
-
return res;
|
|
227
|
-
}
|
|
228
|
-
fixSortCoerce(item) {
|
|
229
|
-
if (typeof item.sort === 'undefined') {
|
|
230
|
-
return { enabled: false };
|
|
231
|
-
}
|
|
232
|
-
let res = {};
|
|
233
|
-
if (typeof item.sort === 'string') {
|
|
234
|
-
res.key = item.sort;
|
|
235
|
-
}
|
|
236
|
-
else if (typeof item.sort !== 'boolean') {
|
|
237
|
-
res = item.sort;
|
|
238
|
-
}
|
|
239
|
-
else if (typeof item.sort === 'boolean') {
|
|
240
|
-
res.compare = (a, b) => a[item.indexKey] - b[item.indexKey];
|
|
241
|
-
}
|
|
242
|
-
if (!res.key) {
|
|
243
|
-
res.key = item.indexKey;
|
|
244
|
-
}
|
|
245
|
-
res.enabled = true;
|
|
246
|
-
return res;
|
|
247
|
-
}
|
|
248
|
-
filterCoerce(item) {
|
|
249
|
-
var _a, _b, _c;
|
|
250
|
-
if (item.filter == null) {
|
|
251
|
-
return null;
|
|
252
|
-
}
|
|
253
|
-
let res = item.filter;
|
|
254
|
-
res.type = res.type || 'default';
|
|
255
|
-
res.showOPArea = res.showOPArea !== false;
|
|
256
|
-
let icon = 'filter';
|
|
257
|
-
let iconTheme = 'fill';
|
|
258
|
-
let fixMenus = true;
|
|
259
|
-
let value = undefined;
|
|
260
|
-
switch (res.type) {
|
|
261
|
-
case 'keyword':
|
|
262
|
-
icon = 'search';
|
|
263
|
-
iconTheme = 'outline';
|
|
264
|
-
break;
|
|
265
|
-
case 'number':
|
|
266
|
-
icon = 'search';
|
|
267
|
-
iconTheme = 'outline';
|
|
268
|
-
res.number = Object.assign({ step: 1, min: -Infinity, max: Infinity }, res.number);
|
|
269
|
-
break;
|
|
270
|
-
case 'date':
|
|
271
|
-
icon = 'calendar';
|
|
272
|
-
iconTheme = 'outline';
|
|
273
|
-
res.date = Object.assign({ range: false, mode: 'date', showToday: true, showNow: false }, res.date);
|
|
274
|
-
break;
|
|
275
|
-
case 'custom':
|
|
276
|
-
break;
|
|
277
|
-
default:
|
|
278
|
-
fixMenus = false;
|
|
279
|
-
break;
|
|
280
|
-
}
|
|
281
|
-
if (fixMenus && (res.menus == null || res.menus.length === 0)) {
|
|
282
|
-
res.menus = [{ value }];
|
|
283
|
-
}
|
|
284
|
-
if (((_a = res.menus) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
285
|
-
return null;
|
|
286
|
-
}
|
|
287
|
-
if (typeof res.multiple === 'undefined') {
|
|
288
|
-
res.multiple = true;
|
|
289
|
-
}
|
|
290
|
-
res.confirmText = res.confirmText || this.cog.filterConfirmText;
|
|
291
|
-
res.clearText = res.clearText || this.cog.filterClearText;
|
|
292
|
-
res.key = res.key || item.indexKey;
|
|
293
|
-
res.icon = res.icon || icon;
|
|
294
|
-
const baseIcon = { type: icon, theme: iconTheme };
|
|
295
|
-
if (typeof res.icon === 'string') {
|
|
296
|
-
res.icon = Object.assign(Object.assign({}, baseIcon), { type: res.icon });
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
res.icon = Object.assign(Object.assign({}, baseIcon), res.icon);
|
|
300
|
-
}
|
|
301
|
-
this.updateDefault(res);
|
|
302
|
-
if (this.acl) {
|
|
303
|
-
res.menus = (_b = res.menus) === null || _b === void 0 ? void 0 : _b.filter(w => this.acl.can(w.acl));
|
|
304
|
-
}
|
|
305
|
-
return ((_c = res.menus) === null || _c === void 0 ? void 0 : _c.length) === 0 ? null : res;
|
|
306
|
-
}
|
|
307
|
-
restoreRender(item) {
|
|
308
|
-
if (item.renderTitle) {
|
|
309
|
-
item.__renderTitle =
|
|
310
|
-
typeof item.renderTitle === 'string'
|
|
311
|
-
? this.rowSource.getTitle(item.renderTitle)
|
|
312
|
-
: item.renderTitle;
|
|
313
|
-
}
|
|
314
|
-
if (item.render) {
|
|
315
|
-
item.__render =
|
|
316
|
-
typeof item.render === 'string' ? this.rowSource.getRow(item.render) : item.render;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
widgetCoerce(item) {
|
|
320
|
-
var _a;
|
|
321
|
-
if (item.type !== 'widget')
|
|
322
|
-
return;
|
|
323
|
-
if (item.widget == null || !this.stWidgetRegistry.has(item.widget.type)) {
|
|
324
|
-
delete item.type;
|
|
325
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
326
|
-
warn(`st: No widget for type "${(_a = item.widget) === null || _a === void 0 ? void 0 : _a.type}"`);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
genHeaders(rootColumns) {
|
|
331
|
-
const rows = [];
|
|
332
|
-
const widths = [];
|
|
333
|
-
const fillRowCells = (columns, colIndex, rowIndex = 0) => {
|
|
334
|
-
// Init rows
|
|
335
|
-
rows[rowIndex] = rows[rowIndex] || [];
|
|
336
|
-
let currentColIndex = colIndex;
|
|
337
|
-
const colSpans = columns.map(column => {
|
|
338
|
-
const cell = {
|
|
339
|
-
column,
|
|
340
|
-
colStart: currentColIndex,
|
|
341
|
-
hasSubColumns: false
|
|
342
|
-
};
|
|
343
|
-
let colSpan = 1;
|
|
344
|
-
const subColumns = column.children;
|
|
345
|
-
if (Array.isArray(subColumns) && subColumns.length > 0) {
|
|
346
|
-
colSpan = fillRowCells(subColumns, currentColIndex, rowIndex + 1).reduce((total, count) => total + count, 0);
|
|
347
|
-
cell.hasSubColumns = true;
|
|
348
|
-
}
|
|
349
|
-
else {
|
|
350
|
-
widths.push(cell.column.width || '');
|
|
351
|
-
}
|
|
352
|
-
if ('colSpan' in column) {
|
|
353
|
-
colSpan = column.colSpan;
|
|
354
|
-
}
|
|
355
|
-
if ('rowSpan' in column) {
|
|
356
|
-
cell.rowSpan = column.rowSpan;
|
|
357
|
-
}
|
|
358
|
-
cell.colSpan = colSpan;
|
|
359
|
-
cell.colEnd = cell.colStart + colSpan - 1;
|
|
360
|
-
rows[rowIndex].push(cell);
|
|
361
|
-
currentColIndex += colSpan;
|
|
362
|
-
return colSpan;
|
|
363
|
-
});
|
|
364
|
-
return colSpans;
|
|
365
|
-
};
|
|
366
|
-
fillRowCells(rootColumns, 0);
|
|
367
|
-
// Handle `rowSpan`
|
|
368
|
-
const rowCount = rows.length;
|
|
369
|
-
for (let rowIndex = 0; rowIndex < rowCount; rowIndex += 1) {
|
|
370
|
-
rows[rowIndex].forEach(cell => {
|
|
371
|
-
if (!('rowSpan' in cell) && !cell.hasSubColumns) {
|
|
372
|
-
cell.rowSpan = rowCount - rowIndex;
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
return { headers: rows, headerWidths: rowCount > 1 ? widths : null };
|
|
377
|
-
}
|
|
378
|
-
cleanCond(list) {
|
|
379
|
-
const res = [];
|
|
380
|
-
const copyList = deepCopy(list);
|
|
381
|
-
for (const item of copyList) {
|
|
382
|
-
if (typeof item.iif === 'function' && !item.iif(item)) {
|
|
383
|
-
continue;
|
|
384
|
-
}
|
|
385
|
-
if (this.acl && item.acl && !this.acl.can(item.acl)) {
|
|
386
|
-
continue;
|
|
387
|
-
}
|
|
388
|
-
if (Array.isArray(item.children) && item.children.length > 0) {
|
|
389
|
-
item.children = this.cleanCond(item.children);
|
|
390
|
-
}
|
|
391
|
-
res.push(item);
|
|
392
|
-
}
|
|
393
|
-
return res;
|
|
394
|
-
}
|
|
395
|
-
mergeClass(item) {
|
|
396
|
-
const builtInClassNames = [];
|
|
397
|
-
if (item._isTruncate) {
|
|
398
|
-
builtInClassNames.push('text-truncate');
|
|
399
|
-
}
|
|
400
|
-
const rawClassName = item.className;
|
|
401
|
-
if (!rawClassName) {
|
|
402
|
-
const typeClass = {
|
|
403
|
-
number: 'text-right',
|
|
404
|
-
currency: 'text-right',
|
|
405
|
-
date: 'text-center'
|
|
406
|
-
}[item.type];
|
|
407
|
-
if (typeClass) {
|
|
408
|
-
builtInClassNames.push(typeClass);
|
|
409
|
-
}
|
|
410
|
-
item._className = builtInClassNames;
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
const rawClassNameIsArray = Array.isArray(rawClassName);
|
|
414
|
-
if (!rawClassNameIsArray && typeof rawClassName === 'object') {
|
|
415
|
-
const objClassNames = rawClassName;
|
|
416
|
-
builtInClassNames.forEach(key => (objClassNames[key] = true));
|
|
417
|
-
item._className = objClassNames;
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
const arrayClassNames = rawClassNameIsArray ? Array.from(rawClassName) : [rawClassName];
|
|
421
|
-
arrayClassNames.splice(0, 0, ...builtInClassNames);
|
|
422
|
-
item._className = [...new Set(arrayClassNames)].filter(w => !!w);
|
|
423
|
-
}
|
|
424
|
-
process(list, options) {
|
|
425
|
-
if (!list || list.length === 0) {
|
|
426
|
-
return { columns: [], headers: [], headerWidths: null };
|
|
427
|
-
}
|
|
428
|
-
const { noIndex } = this.cog;
|
|
429
|
-
let checkboxCount = 0;
|
|
430
|
-
let radioCount = 0;
|
|
431
|
-
let point = 0;
|
|
432
|
-
const columns = [];
|
|
433
|
-
const processItem = (item) => {
|
|
434
|
-
var _a, _b;
|
|
435
|
-
// index
|
|
436
|
-
if (item.index) {
|
|
437
|
-
if (!Array.isArray(item.index)) {
|
|
438
|
-
item.index = item.index.toString().split('.');
|
|
439
|
-
}
|
|
440
|
-
item.indexKey = item.index.join('.');
|
|
441
|
-
}
|
|
442
|
-
// #region title
|
|
443
|
-
const tit = (typeof item.title === 'string' ? { text: item.title } : item.title) || {};
|
|
444
|
-
if (tit.i18n && this.i18nSrv) {
|
|
445
|
-
tit.text = this.i18nSrv.fanyi(tit.i18n);
|
|
446
|
-
}
|
|
447
|
-
if (tit.text) {
|
|
448
|
-
tit._text = this.dom.bypassSecurityTrustHtml(tit.text);
|
|
449
|
-
}
|
|
450
|
-
item.title = tit;
|
|
451
|
-
// #endregion
|
|
452
|
-
// no
|
|
453
|
-
if (item.type === 'no') {
|
|
454
|
-
item.noIndex = item.noIndex == null ? noIndex : item.noIndex;
|
|
455
|
-
}
|
|
456
|
-
// checkbox
|
|
457
|
-
if (item.selections == null) {
|
|
458
|
-
item.selections = [];
|
|
459
|
-
}
|
|
460
|
-
if (item.type === 'checkbox') {
|
|
461
|
-
++checkboxCount;
|
|
462
|
-
if (!item.width) {
|
|
463
|
-
item.width = `${item.selections.length > 0 ? 62 : 50}px`;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
if (this.acl) {
|
|
467
|
-
item.selections = item.selections.filter(w => this.acl.can(w.acl));
|
|
468
|
-
}
|
|
469
|
-
// radio
|
|
470
|
-
if (item.type === 'radio') {
|
|
471
|
-
++radioCount;
|
|
472
|
-
item.selections = [];
|
|
473
|
-
if (!item.width) {
|
|
474
|
-
item.width = '50px';
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
// types
|
|
478
|
-
if (item.type === 'yn') {
|
|
479
|
-
item.yn = Object.assign(Object.assign({ truth: true }, this.cog.yn), item.yn);
|
|
480
|
-
}
|
|
481
|
-
// date
|
|
482
|
-
if (item.type === 'date') {
|
|
483
|
-
item.dateFormat = item.dateFormat || ((_a = this.cog.date) === null || _a === void 0 ? void 0 : _a.format);
|
|
484
|
-
}
|
|
485
|
-
if ((item.type === 'link' && typeof item.click !== 'function') ||
|
|
486
|
-
(item.type === 'badge' && item.badge == null) ||
|
|
487
|
-
(item.type === 'tag' && item.tag == null) ||
|
|
488
|
-
(item.type === 'enum' && item.enum == null)) {
|
|
489
|
-
item.type = '';
|
|
490
|
-
}
|
|
491
|
-
item._isTruncate = !!item.width && options.widthMode.strictBehavior === 'truncate' && item.type !== 'img';
|
|
492
|
-
// className
|
|
493
|
-
this.mergeClass(item);
|
|
494
|
-
// width
|
|
495
|
-
if (typeof item.width === 'number') {
|
|
496
|
-
item._width = item.width;
|
|
497
|
-
item.width = `${item.width}px`;
|
|
498
|
-
}
|
|
499
|
-
item._left = false;
|
|
500
|
-
item._right = false;
|
|
501
|
-
item.safeType = (_b = item.safeType) !== null && _b !== void 0 ? _b : options.safeType;
|
|
502
|
-
// sorter
|
|
503
|
-
item._sort = this.sortCoerce(item);
|
|
504
|
-
// filter
|
|
505
|
-
item.filter = this.filterCoerce(item);
|
|
506
|
-
// buttons
|
|
507
|
-
item.buttons = this.btnCoerce(item.buttons);
|
|
508
|
-
// widget
|
|
509
|
-
this.widgetCoerce(item);
|
|
510
|
-
// restore custom row
|
|
511
|
-
this.restoreRender(item);
|
|
512
|
-
// resizable
|
|
513
|
-
item.resizable = Object.assign(Object.assign({ disabled: true, bounds: 'window', minWidth: 60, maxWidth: 360, preview: true }, options.resizable), (typeof item.resizable === 'boolean' ? { disabled: !item.resizable } : item.resizable));
|
|
514
|
-
item.__point = point++;
|
|
515
|
-
return item;
|
|
516
|
-
};
|
|
517
|
-
const processList = (data) => {
|
|
518
|
-
for (const item of data) {
|
|
519
|
-
columns.push(processItem(item));
|
|
520
|
-
if (Array.isArray(item.children)) {
|
|
521
|
-
processList(item.children);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
};
|
|
525
|
-
const copyList = this.cleanCond(list);
|
|
526
|
-
processList(copyList);
|
|
527
|
-
if (checkboxCount > 1) {
|
|
528
|
-
throw new Error(`[st]: just only one column checkbox`);
|
|
529
|
-
}
|
|
530
|
-
if (radioCount > 1) {
|
|
531
|
-
throw new Error(`[st]: just only one column radio`);
|
|
532
|
-
}
|
|
533
|
-
this.fixedCoerce(columns);
|
|
534
|
-
return Object.assign({ columns: columns.filter(w => !Array.isArray(w.children) || w.children.length === 0) }, this.genHeaders(copyList));
|
|
535
|
-
}
|
|
536
|
-
restoreAllRender(columns) {
|
|
537
|
-
columns.forEach(i => this.restoreRender(i));
|
|
538
|
-
}
|
|
539
|
-
updateDefault(filter) {
|
|
540
|
-
if (filter.menus == null)
|
|
541
|
-
return this;
|
|
542
|
-
if (filter.type === 'default') {
|
|
543
|
-
filter.default = filter.menus.findIndex(w => w.checked) !== -1;
|
|
544
|
-
}
|
|
545
|
-
else {
|
|
546
|
-
filter.default = !!filter.menus[0].value;
|
|
547
|
-
}
|
|
548
|
-
return this;
|
|
549
|
-
}
|
|
550
|
-
cleanFilter(col) {
|
|
551
|
-
const f = col.filter;
|
|
552
|
-
f.default = false;
|
|
553
|
-
if (f.type === 'default') {
|
|
554
|
-
f.menus.forEach(i => (i.checked = false));
|
|
555
|
-
}
|
|
556
|
-
else {
|
|
557
|
-
f.menus[0].value = undefined;
|
|
558
|
-
}
|
|
559
|
-
return this;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
STColumnSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STColumnSource, deps: [{ token: i1.DomSanitizer }, { token: STRowSource, host: true }, { token: i3.ACLService, optional: true }, { token: ALAIN_I18N_TOKEN, optional: true }, { token: STWidgetRegistry }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
563
|
-
STColumnSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STColumnSource });
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STColumnSource, decorators: [{
|
|
565
|
-
type: Injectable
|
|
566
|
-
}], ctorParameters: function () {
|
|
567
|
-
return [{ type: i1.DomSanitizer }, { type: STRowSource, decorators: [{
|
|
568
|
-
type: Host
|
|
569
|
-
}] }, { type: i3.ACLService, decorators: [{
|
|
570
|
-
type: Optional
|
|
571
|
-
}] }, { type: undefined, decorators: [{
|
|
572
|
-
type: Optional
|
|
573
|
-
}, {
|
|
574
|
-
type: Inject,
|
|
575
|
-
args: [ALAIN_I18N_TOKEN]
|
|
576
|
-
}] }, { type: STWidgetRegistry }];
|
|
577
|
-
} });
|
|
578
|
-
|
|
579
|
-
class STDataSource {
|
|
580
|
-
constructor(http, datePipe, ynPipe, numberPipe, currencySrv, dom) {
|
|
581
|
-
this.http = http;
|
|
582
|
-
this.datePipe = datePipe;
|
|
583
|
-
this.ynPipe = ynPipe;
|
|
584
|
-
this.numberPipe = numberPipe;
|
|
585
|
-
this.currencySrv = currencySrv;
|
|
586
|
-
this.dom = dom;
|
|
587
|
-
this.sortTick = 0;
|
|
588
|
-
}
|
|
589
|
-
setCog(val) {
|
|
590
|
-
this.cog = val;
|
|
591
|
-
}
|
|
592
|
-
process(options) {
|
|
593
|
-
let data$;
|
|
594
|
-
let isRemote = false;
|
|
595
|
-
const { data, res, total, page, pi, ps, paginator, columns } = options;
|
|
596
|
-
let retTotal;
|
|
597
|
-
let retPs;
|
|
598
|
-
let retList;
|
|
599
|
-
let retPi;
|
|
600
|
-
let rawData;
|
|
601
|
-
let showPage = page.show;
|
|
602
|
-
if (typeof data === 'string') {
|
|
603
|
-
isRemote = true;
|
|
604
|
-
data$ = this.getByRemote(data, options).pipe(map(result => {
|
|
605
|
-
rawData = result;
|
|
606
|
-
let ret;
|
|
607
|
-
if (Array.isArray(result)) {
|
|
608
|
-
ret = result;
|
|
609
|
-
retTotal = ret.length;
|
|
610
|
-
retPs = retTotal;
|
|
611
|
-
showPage = false;
|
|
612
|
-
}
|
|
613
|
-
else {
|
|
614
|
-
const reName = res.reName;
|
|
615
|
-
if (typeof reName === 'function') {
|
|
616
|
-
const fnRes = reName(result, { pi, ps, total });
|
|
617
|
-
ret = fnRes.list;
|
|
618
|
-
retTotal = fnRes.total;
|
|
619
|
-
}
|
|
620
|
-
else {
|
|
621
|
-
// list
|
|
622
|
-
ret = deepGet(result, reName.list, []);
|
|
623
|
-
if (ret == null || !Array.isArray(ret)) {
|
|
624
|
-
ret = [];
|
|
625
|
-
}
|
|
626
|
-
// total
|
|
627
|
-
const resultTotal = reName.total && deepGet(result, reName.total, null);
|
|
628
|
-
retTotal = resultTotal == null ? total || 0 : +resultTotal;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
return deepCopy(ret);
|
|
632
|
-
}));
|
|
633
|
-
}
|
|
634
|
-
else if (Array.isArray(data)) {
|
|
635
|
-
data$ = of(data);
|
|
636
|
-
}
|
|
637
|
-
else {
|
|
638
|
-
// a cold observable
|
|
639
|
-
data$ = data;
|
|
640
|
-
}
|
|
641
|
-
if (!isRemote) {
|
|
642
|
-
data$ = data$.pipe(
|
|
643
|
-
// sort
|
|
644
|
-
map((result) => {
|
|
645
|
-
rawData = result;
|
|
646
|
-
let copyResult = deepCopy(result);
|
|
647
|
-
const sorterFn = this.getSorterFn(columns);
|
|
648
|
-
if (sorterFn) {
|
|
649
|
-
copyResult = copyResult.sort(sorterFn);
|
|
650
|
-
}
|
|
651
|
-
return copyResult;
|
|
652
|
-
}),
|
|
653
|
-
// filter
|
|
654
|
-
map((result) => {
|
|
655
|
-
columns
|
|
656
|
-
.filter(w => w.filter)
|
|
657
|
-
.forEach(c => {
|
|
658
|
-
const filter = c.filter;
|
|
659
|
-
const values = this.getFilteredData(filter);
|
|
660
|
-
if (values.length === 0)
|
|
661
|
-
return;
|
|
662
|
-
const onFilter = filter.fn;
|
|
663
|
-
if (typeof onFilter !== 'function') {
|
|
664
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
665
|
-
console.warn(`[st] Muse provide the fn function in filter`);
|
|
666
|
-
}
|
|
667
|
-
return;
|
|
668
|
-
}
|
|
669
|
-
result = result.filter(record => values.some(v => onFilter(v, record)));
|
|
670
|
-
});
|
|
671
|
-
return result;
|
|
672
|
-
}),
|
|
673
|
-
// paging
|
|
674
|
-
map((result) => {
|
|
675
|
-
if (paginator && page.front) {
|
|
676
|
-
const maxPageIndex = Math.ceil(result.length / ps);
|
|
677
|
-
retPi = Math.max(1, pi > maxPageIndex ? maxPageIndex : pi);
|
|
678
|
-
retTotal = result.length;
|
|
679
|
-
if (page.show === true) {
|
|
680
|
-
return result.slice((retPi - 1) * ps, retPi * ps);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
return result;
|
|
684
|
-
}));
|
|
685
|
-
}
|
|
686
|
-
// pre-process
|
|
687
|
-
if (typeof res.process === 'function') {
|
|
688
|
-
data$ = data$.pipe(map(result => res.process(result, rawData)));
|
|
689
|
-
}
|
|
690
|
-
data$ = data$.pipe(map(result => this.optimizeData({ result, columns, rowClassName: options.rowClassName })));
|
|
691
|
-
return data$.pipe(map(result => {
|
|
692
|
-
retList = result;
|
|
693
|
-
const realTotal = retTotal || total;
|
|
694
|
-
const realPs = retPs || ps;
|
|
695
|
-
return {
|
|
696
|
-
pi: retPi,
|
|
697
|
-
ps: retPs,
|
|
698
|
-
total: retTotal,
|
|
699
|
-
list: retList,
|
|
700
|
-
statistical: this.genStatistical(columns, retList, rawData),
|
|
701
|
-
pageShow: typeof showPage === 'undefined' ? realTotal > realPs : showPage
|
|
702
|
-
};
|
|
703
|
-
}));
|
|
704
|
-
}
|
|
705
|
-
get(item, col, idx) {
|
|
706
|
-
var _a;
|
|
707
|
-
try {
|
|
708
|
-
const safeHtml = col.safeType === 'safeHtml';
|
|
709
|
-
if (col.format) {
|
|
710
|
-
const formatRes = col.format(item, col, idx) || '';
|
|
711
|
-
return {
|
|
712
|
-
text: formatRes,
|
|
713
|
-
_text: safeHtml ? this.dom.bypassSecurityTrustHtml(formatRes) : formatRes,
|
|
714
|
-
org: formatRes,
|
|
715
|
-
safeType: col.safeType
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
const value = deepGet(item, col.index, col.default);
|
|
719
|
-
let text = value;
|
|
720
|
-
let color;
|
|
721
|
-
switch (col.type) {
|
|
722
|
-
case 'no':
|
|
723
|
-
text = this.getNoIndex(item, col, idx);
|
|
724
|
-
break;
|
|
725
|
-
case 'img':
|
|
726
|
-
text = value ? `<img src="${value}" class="img">` : '';
|
|
727
|
-
break;
|
|
728
|
-
case 'number':
|
|
729
|
-
text = this.numberPipe.transform(value, col.numberDigits);
|
|
730
|
-
break;
|
|
731
|
-
case 'currency':
|
|
732
|
-
text = this.currencySrv.format(value, (_a = col.currency) === null || _a === void 0 ? void 0 : _a.format);
|
|
733
|
-
break;
|
|
734
|
-
case 'date':
|
|
735
|
-
text = value === col.default ? col.default : this.datePipe.transform(value, col.dateFormat);
|
|
736
|
-
break;
|
|
737
|
-
case 'yn':
|
|
738
|
-
text = this.ynPipe.transform(value === col.yn.truth, col.yn.yes, col.yn.no, col.yn.mode, false);
|
|
739
|
-
break;
|
|
740
|
-
case 'enum':
|
|
741
|
-
text = col.enum[value];
|
|
742
|
-
break;
|
|
743
|
-
case 'tag':
|
|
744
|
-
case 'badge':
|
|
745
|
-
const data = col.type === 'tag' ? col.tag : col.badge;
|
|
746
|
-
if (data && data[text]) {
|
|
747
|
-
const dataItem = data[text];
|
|
748
|
-
text = dataItem.text;
|
|
749
|
-
color = dataItem.color;
|
|
750
|
-
}
|
|
751
|
-
else {
|
|
752
|
-
text = '';
|
|
753
|
-
}
|
|
754
|
-
break;
|
|
755
|
-
}
|
|
756
|
-
if (text == null)
|
|
757
|
-
text = '';
|
|
758
|
-
return {
|
|
759
|
-
text,
|
|
760
|
-
_text: safeHtml ? this.dom.bypassSecurityTrustHtml(text) : text,
|
|
761
|
-
org: value,
|
|
762
|
-
color,
|
|
763
|
-
safeType: col.safeType,
|
|
764
|
-
buttons: []
|
|
765
|
-
};
|
|
766
|
-
}
|
|
767
|
-
catch (ex) {
|
|
768
|
-
const text = `INVALID DATA`;
|
|
769
|
-
console.error(`Failed to get data`, item, col, ex);
|
|
770
|
-
return { text, _text: text, org: text, buttons: [], safeType: 'text' };
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
getByRemote(url, options) {
|
|
774
|
-
const { req, page, paginator, pi, ps, singleSort, multiSort, columns } = options;
|
|
775
|
-
const method = (req.method || 'GET').toUpperCase();
|
|
776
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
777
|
-
let params = {};
|
|
778
|
-
const reName = req.reName;
|
|
779
|
-
if (paginator) {
|
|
780
|
-
if (req.type === 'page') {
|
|
781
|
-
params = {
|
|
782
|
-
[reName.pi]: page.zeroIndexed ? pi - 1 : pi,
|
|
783
|
-
[reName.ps]: ps
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
else {
|
|
787
|
-
params = {
|
|
788
|
-
[reName.skip]: (pi - 1) * ps,
|
|
789
|
-
[reName.limit]: ps
|
|
790
|
-
};
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
params = Object.assign(Object.assign(Object.assign(Object.assign({}, params), req.params), this.getReqSortMap(singleSort, multiSort, columns)), this.getReqFilterMap(columns));
|
|
794
|
-
if (options.req.ignoreParamNull == true) {
|
|
795
|
-
Object.keys(params).forEach(key => {
|
|
796
|
-
if (params[key] == null)
|
|
797
|
-
delete params[key];
|
|
798
|
-
});
|
|
799
|
-
}
|
|
800
|
-
let reqOptions = {
|
|
801
|
-
params,
|
|
802
|
-
body: req.body,
|
|
803
|
-
headers: req.headers
|
|
804
|
-
};
|
|
805
|
-
if (method === 'POST' && req.allInBody === true) {
|
|
806
|
-
reqOptions = {
|
|
807
|
-
body: Object.assign(Object.assign({}, req.body), params),
|
|
808
|
-
headers: req.headers
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
if (typeof req.process === 'function') {
|
|
812
|
-
reqOptions = req.process(reqOptions);
|
|
813
|
-
}
|
|
814
|
-
if (!(reqOptions.params instanceof HttpParams)) {
|
|
815
|
-
reqOptions.params = new HttpParams({ fromObject: reqOptions.params });
|
|
816
|
-
}
|
|
817
|
-
if (typeof options.customRequest === 'function') {
|
|
818
|
-
return options.customRequest({ method, url, options: reqOptions });
|
|
819
|
-
}
|
|
820
|
-
return this.http.request(method, url, reqOptions);
|
|
821
|
-
}
|
|
822
|
-
optimizeData(options) {
|
|
823
|
-
const { result, columns, rowClassName } = options;
|
|
824
|
-
for (let i = 0, len = result.length; i < len; i++) {
|
|
825
|
-
result[i]._values = columns.map(c => {
|
|
826
|
-
if (Array.isArray(c.buttons) && c.buttons.length > 0) {
|
|
827
|
-
return { buttons: this.genButtons(c.buttons, result[i], c), _text: '' };
|
|
828
|
-
}
|
|
829
|
-
return this.get(result[i], c, i);
|
|
830
|
-
});
|
|
831
|
-
result[i]._rowClassName = [rowClassName ? rowClassName(result[i], i) : null, result[i].className]
|
|
832
|
-
.filter(w => !!w)
|
|
833
|
-
.join(' ');
|
|
834
|
-
}
|
|
835
|
-
return result;
|
|
836
|
-
}
|
|
837
|
-
getNoIndex(item, col, idx) {
|
|
838
|
-
return typeof col.noIndex === 'function' ? col.noIndex(item, col, idx) : col.noIndex + idx;
|
|
839
|
-
}
|
|
840
|
-
genButtons(_btns, item, col) {
|
|
841
|
-
const fn = (btns) => {
|
|
842
|
-
return deepCopy(btns).filter(btn => {
|
|
843
|
-
var _a;
|
|
844
|
-
const result = typeof btn.iif === 'function' ? btn.iif(item, btn, col) : true;
|
|
845
|
-
const isRenderDisabled = btn.iifBehavior === 'disabled';
|
|
846
|
-
btn._result = result;
|
|
847
|
-
btn._disabled = !result && isRenderDisabled;
|
|
848
|
-
if ((_a = btn.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
849
|
-
btn.children = fn(btn.children);
|
|
850
|
-
}
|
|
851
|
-
return result || isRenderDisabled;
|
|
852
|
-
});
|
|
853
|
-
};
|
|
854
|
-
const res = fn(_btns);
|
|
855
|
-
const fnText = (btns) => {
|
|
856
|
-
var _a;
|
|
857
|
-
for (const btn of btns) {
|
|
858
|
-
btn._text = typeof btn.text === 'function' ? btn.text(item, btn) : btn.text || '';
|
|
859
|
-
if ((_a = btn.children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
860
|
-
btn.children = fnText(btn.children);
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
return btns;
|
|
864
|
-
};
|
|
865
|
-
return this.fixMaxMultiple(fnText(res), col);
|
|
866
|
-
}
|
|
867
|
-
fixMaxMultiple(btns, col) {
|
|
868
|
-
const curCog = col.maxMultipleButton;
|
|
869
|
-
const btnSize = btns.length;
|
|
870
|
-
if (curCog == null || btnSize <= 0)
|
|
871
|
-
return btns;
|
|
872
|
-
const cog = Object.assign(Object.assign({}, this.cog.maxMultipleButton), (typeof curCog === 'number' ? { count: curCog } : curCog));
|
|
873
|
-
if (cog.count >= btnSize)
|
|
874
|
-
return btns;
|
|
875
|
-
const newBtns = btns.slice(0, cog.count);
|
|
876
|
-
newBtns.push({ _text: cog.text, children: btns.slice(cog.count) });
|
|
877
|
-
return newBtns;
|
|
878
|
-
}
|
|
879
|
-
// #region sort
|
|
880
|
-
getValidSort(columns) {
|
|
881
|
-
return columns.filter(item => item._sort && item._sort.enabled && item._sort.default).map(item => item._sort);
|
|
882
|
-
}
|
|
883
|
-
getSorterFn(columns) {
|
|
884
|
-
const sortList = this.getValidSort(columns);
|
|
885
|
-
if (sortList.length === 0) {
|
|
886
|
-
return;
|
|
887
|
-
}
|
|
888
|
-
const sortItem = sortList[0];
|
|
889
|
-
if (sortItem.compare === null) {
|
|
890
|
-
return;
|
|
891
|
-
}
|
|
892
|
-
if (typeof sortItem.compare !== 'function') {
|
|
893
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
894
|
-
console.warn(`[st] Muse provide the compare function in sort`);
|
|
895
|
-
}
|
|
896
|
-
return;
|
|
897
|
-
}
|
|
898
|
-
return (a, b) => {
|
|
899
|
-
const result = sortItem.compare(a, b);
|
|
900
|
-
if (result !== 0) {
|
|
901
|
-
return sortItem.default === 'descend' ? -result : result;
|
|
902
|
-
}
|
|
903
|
-
return 0;
|
|
904
|
-
};
|
|
905
|
-
}
|
|
906
|
-
get nextSortTick() {
|
|
907
|
-
return ++this.sortTick;
|
|
908
|
-
}
|
|
909
|
-
getReqSortMap(singleSort, multiSort, columns) {
|
|
910
|
-
let ret = {};
|
|
911
|
-
const sortList = this.getValidSort(columns);
|
|
912
|
-
if (multiSort) {
|
|
913
|
-
const ms = Object.assign({ key: 'sort', separator: '-', nameSeparator: '.', keepEmptyKey: true, arrayParam: false }, multiSort);
|
|
914
|
-
const sortMap = sortList
|
|
915
|
-
.sort((a, b) => a.tick - b.tick)
|
|
916
|
-
.map(item => item.key + ms.nameSeparator + ((item.reName || {})[item.default] || item.default));
|
|
917
|
-
ret = { [ms.key]: ms.arrayParam ? sortMap : sortMap.join(ms.separator) };
|
|
918
|
-
return sortMap.length === 0 && ms.keepEmptyKey === false ? {} : ret;
|
|
919
|
-
}
|
|
920
|
-
if (sortList.length === 0)
|
|
921
|
-
return ret;
|
|
922
|
-
const mapData = sortList[0];
|
|
923
|
-
let sortFiled = mapData.key;
|
|
924
|
-
let sortValue = (sortList[0].reName || {})[mapData.default] || mapData.default;
|
|
925
|
-
if (singleSort) {
|
|
926
|
-
sortValue = sortFiled + (singleSort.nameSeparator || '.') + sortValue;
|
|
927
|
-
sortFiled = singleSort.key || 'sort';
|
|
928
|
-
}
|
|
929
|
-
ret[sortFiled] = sortValue;
|
|
930
|
-
return ret;
|
|
931
|
-
}
|
|
932
|
-
// #endregion
|
|
933
|
-
// #region filter
|
|
934
|
-
getFilteredData(filter) {
|
|
935
|
-
return filter.type === 'default' ? filter.menus.filter(f => f.checked === true) : filter.menus.slice(0, 1);
|
|
936
|
-
}
|
|
937
|
-
getReqFilterMap(columns) {
|
|
938
|
-
let ret = {};
|
|
939
|
-
columns
|
|
940
|
-
.filter(w => w.filter && w.filter.default === true)
|
|
941
|
-
.forEach(col => {
|
|
942
|
-
const filter = col.filter;
|
|
943
|
-
const values = this.getFilteredData(filter);
|
|
944
|
-
let obj = {};
|
|
945
|
-
if (filter.reName) {
|
|
946
|
-
obj = filter.reName(filter.menus, col);
|
|
947
|
-
}
|
|
948
|
-
else {
|
|
949
|
-
obj[filter.key] = values.map(i => i.value).join(',');
|
|
950
|
-
}
|
|
951
|
-
ret = Object.assign(Object.assign({}, ret), obj);
|
|
952
|
-
});
|
|
953
|
-
return ret;
|
|
954
|
-
}
|
|
955
|
-
// #endregion
|
|
956
|
-
// #region statistical
|
|
957
|
-
genStatistical(columns, list, rawData) {
|
|
958
|
-
const res = {};
|
|
959
|
-
columns.forEach((col, index) => {
|
|
960
|
-
res[col.key || col.indexKey || index] =
|
|
961
|
-
col.statistical == null ? {} : this.getStatistical(col, index, list, rawData);
|
|
962
|
-
});
|
|
963
|
-
return res;
|
|
964
|
-
}
|
|
965
|
-
getStatistical(col, index, list, rawData) {
|
|
966
|
-
var _a;
|
|
967
|
-
const val = col.statistical;
|
|
968
|
-
const item = Object.assign({ digits: 2, currency: undefined }, (typeof val === 'string' ? { type: val } : val));
|
|
969
|
-
let res = { value: 0 };
|
|
970
|
-
let currency = false;
|
|
971
|
-
if (typeof item.type === 'function') {
|
|
972
|
-
res = item.type(this.getValues(index, list), col, list, rawData);
|
|
973
|
-
currency = true;
|
|
974
|
-
}
|
|
975
|
-
else {
|
|
976
|
-
switch (item.type) {
|
|
977
|
-
case 'count':
|
|
978
|
-
res.value = list.length;
|
|
979
|
-
break;
|
|
980
|
-
case 'distinctCount':
|
|
981
|
-
res.value = this.getValues(index, list).filter((value, idx, self) => self.indexOf(value) === idx).length;
|
|
982
|
-
break;
|
|
983
|
-
case 'sum':
|
|
984
|
-
res.value = this.toFixed(this.getSum(index, list), item.digits);
|
|
985
|
-
currency = true;
|
|
986
|
-
break;
|
|
987
|
-
case 'average':
|
|
988
|
-
res.value = this.toFixed(this.getSum(index, list) / list.length, item.digits);
|
|
989
|
-
currency = true;
|
|
990
|
-
break;
|
|
991
|
-
case 'max':
|
|
992
|
-
res.value = Math.max(...this.getValues(index, list));
|
|
993
|
-
currency = true;
|
|
994
|
-
break;
|
|
995
|
-
case 'min':
|
|
996
|
-
res.value = Math.min(...this.getValues(index, list));
|
|
997
|
-
currency = true;
|
|
998
|
-
break;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
if (item.currency === true || (item.currency == null && currency === true)) {
|
|
1002
|
-
res.text = this.currencySrv.format(res.value, (_a = col.currency) === null || _a === void 0 ? void 0 : _a.format);
|
|
1003
|
-
}
|
|
1004
|
-
else {
|
|
1005
|
-
res.text = String(res.value);
|
|
1006
|
-
}
|
|
1007
|
-
return res;
|
|
1008
|
-
}
|
|
1009
|
-
toFixed(val, digits) {
|
|
1010
|
-
if (isNaN(val) || !isFinite(val)) {
|
|
1011
|
-
return 0;
|
|
1012
|
-
}
|
|
1013
|
-
return parseFloat(val.toFixed(digits));
|
|
1014
|
-
}
|
|
1015
|
-
getValues(index, list) {
|
|
1016
|
-
return list.map(i => i._values[index].org).map(i => (i === '' || i == null ? 0 : i));
|
|
1017
|
-
}
|
|
1018
|
-
getSum(index, list) {
|
|
1019
|
-
return this.getValues(index, list).reduce((p, i) => (p += parseFloat(String(i))), 0);
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
STDataSource.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STDataSource, deps: [{ token: i1$1._HttpClient }, { token: i1$1.DatePipe, host: true }, { token: i1$1.YNPipe, host: true }, { token: i7.DecimalPipe, host: true }, { token: i3$1.CurrencyService }, { token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1023
|
-
STDataSource.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STDataSource });
|
|
1024
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STDataSource, decorators: [{
|
|
1025
|
-
type: Injectable
|
|
1026
|
-
}], ctorParameters: function () {
|
|
1027
|
-
return [{ type: i1$1._HttpClient }, { type: i1$1.DatePipe, decorators: [{
|
|
1028
|
-
type: Host
|
|
1029
|
-
}] }, { type: i1$1.YNPipe, decorators: [{
|
|
1030
|
-
type: Host
|
|
1031
|
-
}] }, { type: i7.DecimalPipe, decorators: [{
|
|
1032
|
-
type: Host
|
|
1033
|
-
}] }, { type: i3$1.CurrencyService }, { type: i1.DomSanitizer }];
|
|
1034
|
-
} });
|
|
1035
|
-
|
|
1036
|
-
class STExport {
|
|
1037
|
-
constructor(xlsxSrv) {
|
|
1038
|
-
this.xlsxSrv = xlsxSrv;
|
|
1039
|
-
}
|
|
1040
|
-
_stGet(item, col, index, colIndex) {
|
|
1041
|
-
const ret = { t: 's', v: '' };
|
|
1042
|
-
if (col.format) {
|
|
1043
|
-
ret.v = col.format(item, col, index);
|
|
1044
|
-
}
|
|
1045
|
-
else {
|
|
1046
|
-
const val = item._values ? item._values[colIndex].text : deepGet(item, col.index, '');
|
|
1047
|
-
ret.v = val;
|
|
1048
|
-
if (val != null) {
|
|
1049
|
-
switch (col.type) {
|
|
1050
|
-
case 'currency':
|
|
1051
|
-
ret.t = 'n';
|
|
1052
|
-
break;
|
|
1053
|
-
case 'date':
|
|
1054
|
-
// Can't be a empty value, it will cause `#NULL!`
|
|
1055
|
-
// See https://github.com/SheetJS/sheetjs/blob/master/docbits/52_datatype.md
|
|
1056
|
-
if (`${val}`.length > 0) {
|
|
1057
|
-
ret.t = 'd';
|
|
1058
|
-
// Number Formats: https://github.com/SheetJS/sheetjs/blob/master/docbits/63_numfmt.md
|
|
1059
|
-
ret.z = col.dateFormat;
|
|
1060
|
-
}
|
|
1061
|
-
break;
|
|
1062
|
-
case 'yn':
|
|
1063
|
-
const yn = col.yn;
|
|
1064
|
-
ret.v = val === yn.truth ? yn.yes : yn.no;
|
|
1065
|
-
break;
|
|
1066
|
-
}
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
ret.v = ret.v || '';
|
|
1070
|
-
return ret;
|
|
1071
|
-
}
|
|
1072
|
-
genSheet(opt) {
|
|
1073
|
-
const sheets = {};
|
|
1074
|
-
const sheet = (sheets[opt.sheetname || 'Sheet1'] = {});
|
|
1075
|
-
const dataLen = opt.data.length;
|
|
1076
|
-
let validColCount = 0;
|
|
1077
|
-
let loseCount = 0;
|
|
1078
|
-
const columns = opt.columens;
|
|
1079
|
-
if (columns.findIndex(w => w._width != null) !== -1) {
|
|
1080
|
-
// wpx: width in screen pixels https://github.com/SheetJS/sheetjs#column-properties
|
|
1081
|
-
sheet['!cols'] = columns.map(col => ({ wpx: col._width }));
|
|
1082
|
-
}
|
|
1083
|
-
for (let colIdx = 0; colIdx < columns.length; colIdx++) {
|
|
1084
|
-
const col = columns[colIdx];
|
|
1085
|
-
if (col.exported === false || !col.index || !(!col.buttons || col.buttons.length === 0)) {
|
|
1086
|
-
++loseCount;
|
|
1087
|
-
continue;
|
|
1088
|
-
}
|
|
1089
|
-
++validColCount;
|
|
1090
|
-
const columnName = this.xlsxSrv.numberToSchema(colIdx + 1 - loseCount);
|
|
1091
|
-
sheet[`${columnName}1`] = {
|
|
1092
|
-
t: 's',
|
|
1093
|
-
v: typeof col.title === 'object' ? col.title.text : col.title
|
|
1094
|
-
};
|
|
1095
|
-
for (let dataIdx = 0; dataIdx < dataLen; dataIdx++) {
|
|
1096
|
-
sheet[`${columnName}${dataIdx + 2}`] = this._stGet(opt.data[dataIdx], col, dataIdx, colIdx);
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
if (validColCount > 0 && dataLen > 0) {
|
|
1100
|
-
sheet['!ref'] = `A1:${this.xlsxSrv.numberToSchema(validColCount)}${dataLen + 1}`;
|
|
1101
|
-
}
|
|
1102
|
-
return sheets;
|
|
1103
|
-
}
|
|
1104
|
-
export(opt) {
|
|
1105
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1106
|
-
const sheets = this.genSheet(opt);
|
|
1107
|
-
return this.xlsxSrv.export({
|
|
1108
|
-
sheets,
|
|
1109
|
-
filename: opt.filename,
|
|
1110
|
-
callback: opt.callback
|
|
1111
|
-
});
|
|
1112
|
-
});
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
STExport.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STExport, deps: [{ token: i1$2.XlsxService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1116
|
-
STExport.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STExport });
|
|
1117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STExport, decorators: [{
|
|
1118
|
-
type: Injectable
|
|
1119
|
-
}], ctorParameters: function () {
|
|
1120
|
-
return [{ type: i1$2.XlsxService, decorators: [{
|
|
1121
|
-
type: Optional
|
|
1122
|
-
}] }];
|
|
1123
|
-
} });
|
|
1124
|
-
|
|
1125
|
-
class STWidgetHostDirective {
|
|
1126
|
-
constructor(stWidgetRegistry, viewContainerRef) {
|
|
1127
|
-
this.stWidgetRegistry = stWidgetRegistry;
|
|
1128
|
-
this.viewContainerRef = viewContainerRef;
|
|
1129
|
-
}
|
|
1130
|
-
ngOnInit() {
|
|
1131
|
-
const widget = this.column.widget;
|
|
1132
|
-
const componentType = this.stWidgetRegistry.get(widget.type);
|
|
1133
|
-
this.viewContainerRef.clear();
|
|
1134
|
-
const componentRef = this.viewContainerRef.createComponent(componentType);
|
|
1135
|
-
const { record, column } = this;
|
|
1136
|
-
const data = widget.params ? widget.params({ record, column }) : { record };
|
|
1137
|
-
Object.keys(data).forEach(key => {
|
|
1138
|
-
componentRef.instance[key] = data[key];
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
STWidgetHostDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STWidgetHostDirective, deps: [{ token: STWidgetRegistry }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1143
|
-
STWidgetHostDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: STWidgetHostDirective, selector: "[st-widget-host]", inputs: { record: "record", column: "column" }, ngImport: i0 });
|
|
1144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STWidgetHostDirective, decorators: [{
|
|
1145
|
-
type: Directive,
|
|
1146
|
-
args: [{ selector: '[st-widget-host]' }]
|
|
1147
|
-
}], ctorParameters: function () { return [{ type: STWidgetRegistry }, { type: i0.ViewContainerRef }]; }, propDecorators: { record: [{
|
|
1148
|
-
type: Input
|
|
1149
|
-
}], column: [{
|
|
1150
|
-
type: Input
|
|
1151
|
-
}] } });
|
|
1152
|
-
|
|
1153
|
-
const ST_DEFAULT_CONFIG = {
|
|
1154
|
-
pi: 1,
|
|
1155
|
-
ps: 10,
|
|
1156
|
-
size: 'default',
|
|
1157
|
-
responsive: true,
|
|
1158
|
-
responsiveHideHeaderFooter: false,
|
|
1159
|
-
req: {
|
|
1160
|
-
type: 'page',
|
|
1161
|
-
method: 'GET',
|
|
1162
|
-
allInBody: false,
|
|
1163
|
-
lazyLoad: false,
|
|
1164
|
-
ignoreParamNull: false,
|
|
1165
|
-
reName: { pi: 'pi', ps: 'ps', skip: 'skip', limit: 'limit' }
|
|
1166
|
-
},
|
|
1167
|
-
res: {
|
|
1168
|
-
reName: { list: ['list'], total: ['total'] }
|
|
1169
|
-
},
|
|
1170
|
-
page: {
|
|
1171
|
-
front: true,
|
|
1172
|
-
zeroIndexed: false,
|
|
1173
|
-
position: 'bottom',
|
|
1174
|
-
placement: 'right',
|
|
1175
|
-
show: true,
|
|
1176
|
-
showSize: false,
|
|
1177
|
-
pageSizes: [10, 20, 30, 40, 50],
|
|
1178
|
-
showQuickJumper: false,
|
|
1179
|
-
total: true,
|
|
1180
|
-
toTop: true,
|
|
1181
|
-
toTopOffset: 100,
|
|
1182
|
-
itemRender: null,
|
|
1183
|
-
simple: false
|
|
1184
|
-
},
|
|
1185
|
-
modal: {
|
|
1186
|
-
paramsName: 'record',
|
|
1187
|
-
size: 'lg',
|
|
1188
|
-
exact: true
|
|
1189
|
-
},
|
|
1190
|
-
drawer: {
|
|
1191
|
-
paramsName: 'record',
|
|
1192
|
-
size: 'md',
|
|
1193
|
-
footer: true,
|
|
1194
|
-
footerHeight: 55
|
|
1195
|
-
},
|
|
1196
|
-
pop: {
|
|
1197
|
-
title: '确认删除吗?',
|
|
1198
|
-
trigger: 'click',
|
|
1199
|
-
placement: 'top'
|
|
1200
|
-
},
|
|
1201
|
-
btnIcon: {
|
|
1202
|
-
theme: 'outline',
|
|
1203
|
-
spin: false
|
|
1204
|
-
},
|
|
1205
|
-
noIndex: 1,
|
|
1206
|
-
expandRowByClick: false,
|
|
1207
|
-
expandAccordion: false,
|
|
1208
|
-
widthMode: {
|
|
1209
|
-
type: 'default',
|
|
1210
|
-
strictBehavior: 'truncate'
|
|
1211
|
-
},
|
|
1212
|
-
virtualItemSize: 54,
|
|
1213
|
-
virtualMaxBufferPx: 200,
|
|
1214
|
-
virtualMinBufferPx: 100,
|
|
1215
|
-
iifBehavior: 'hide',
|
|
1216
|
-
loadingDelay: 0,
|
|
1217
|
-
safeType: 'safeHtml',
|
|
1218
|
-
date: {
|
|
1219
|
-
format: `yyyy-MM-dd HH:mm`
|
|
1220
|
-
},
|
|
1221
|
-
yn: {
|
|
1222
|
-
truth: true,
|
|
1223
|
-
yes: '是',
|
|
1224
|
-
mode: 'icon'
|
|
1225
|
-
},
|
|
1226
|
-
maxMultipleButton: {
|
|
1227
|
-
text: '更多',
|
|
1228
|
-
count: 2
|
|
1229
|
-
}
|
|
1230
|
-
};
|
|
1231
|
-
|
|
1232
|
-
class STFilterComponent {
|
|
1233
|
-
get icon() {
|
|
1234
|
-
return this.f.icon;
|
|
1235
|
-
}
|
|
1236
|
-
constructor(cdr) {
|
|
1237
|
-
this.cdr = cdr;
|
|
1238
|
-
this.visible = false;
|
|
1239
|
-
this.locale = {};
|
|
1240
|
-
this.n = new EventEmitter();
|
|
1241
|
-
this.handle = new EventEmitter();
|
|
1242
|
-
}
|
|
1243
|
-
stopPropagation($event) {
|
|
1244
|
-
$event.stopPropagation();
|
|
1245
|
-
}
|
|
1246
|
-
checkboxChange() {
|
|
1247
|
-
var _a;
|
|
1248
|
-
this.n.emit((_a = this.f.menus) === null || _a === void 0 ? void 0 : _a.filter(w => w.checked));
|
|
1249
|
-
}
|
|
1250
|
-
radioChange(item) {
|
|
1251
|
-
this.f.menus.forEach(i => (i.checked = false));
|
|
1252
|
-
item.checked = !item.checked;
|
|
1253
|
-
this.n.emit(item);
|
|
1254
|
-
}
|
|
1255
|
-
close(result) {
|
|
1256
|
-
if (result != null)
|
|
1257
|
-
this.handle.emit(result);
|
|
1258
|
-
this.visible = false;
|
|
1259
|
-
this.cdr.detectChanges();
|
|
1260
|
-
}
|
|
1261
|
-
confirm() {
|
|
1262
|
-
this.handle.emit(true);
|
|
1263
|
-
return this;
|
|
1264
|
-
}
|
|
1265
|
-
reset() {
|
|
1266
|
-
this.handle.emit(false);
|
|
1267
|
-
return this;
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
STFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1271
|
-
STFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: STFilterComponent, selector: "st-filter", inputs: { col: "col", locale: "locale", f: "f" }, outputs: { n: "n", handle: "handle" }, host: { properties: { "class.ant-table-filter-trigger-container": "true", "class.st__filter": "true", "class.ant-table-filter-trigger-container-open": "visible" } }, ngImport: i0, template: `
|
|
1272
|
-
<span
|
|
1273
|
-
class="ant-table-filter-trigger"
|
|
1274
|
-
[class.active]="visible || f.default"
|
|
1275
|
-
nz-dropdown
|
|
1276
|
-
[nzDropdownMenu]="filterMenu"
|
|
1277
|
-
nzTrigger="click"
|
|
1278
|
-
[nzClickHide]="false"
|
|
1279
|
-
[(nzVisible)]="visible"
|
|
1280
|
-
nzOverlayClassName="st__filter-wrap"
|
|
1281
|
-
(click)="stopPropagation($event)"
|
|
1282
|
-
>
|
|
1283
|
-
<i nz-icon [nzType]="icon.type" [nzTheme]="icon.theme!"></i>
|
|
1284
|
-
</span>
|
|
1285
|
-
<nz-dropdown-menu #filterMenu="nzDropdownMenu">
|
|
1286
|
-
<div class="ant-table-filter-dropdown">
|
|
1287
|
-
<ng-container [ngSwitch]="f.type">
|
|
1288
|
-
<div *ngSwitchCase="'keyword'" class="st__filter-keyword">
|
|
1289
|
-
<input
|
|
1290
|
-
type="text"
|
|
1291
|
-
nz-input
|
|
1292
|
-
[attr.placeholder]="f.placeholder"
|
|
1293
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1294
|
-
(ngModelChange)="n.emit($event)"
|
|
1295
|
-
(keyup.enter)="confirm()"
|
|
1296
|
-
/>
|
|
1297
|
-
</div>
|
|
1298
|
-
<div *ngSwitchCase="'number'" class="p-sm st__filter-number">
|
|
1299
|
-
<nz-input-number
|
|
1300
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1301
|
-
(ngModelChange)="n.emit($event)"
|
|
1302
|
-
[nzMin]="f.number!.min!"
|
|
1303
|
-
[nzMax]="f.number!.max!"
|
|
1304
|
-
[nzStep]="f.number!.step!"
|
|
1305
|
-
[nzPrecision]="f.number!.precision"
|
|
1306
|
-
[nzPlaceHolder]="f.placeholder!"
|
|
1307
|
-
class="width-100"
|
|
1308
|
-
></nz-input-number>
|
|
1309
|
-
</div>
|
|
1310
|
-
<div *ngSwitchCase="'date'" class="p-sm st__filter-date">
|
|
1311
|
-
<nz-date-picker
|
|
1312
|
-
*ngIf="!f.date!.range"
|
|
1313
|
-
nzInline
|
|
1314
|
-
[nzMode]="f.date!.mode"
|
|
1315
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1316
|
-
(ngModelChange)="n.emit($event)"
|
|
1317
|
-
[nzShowNow]="f.date!.showNow"
|
|
1318
|
-
[nzShowToday]="f.date!.showToday"
|
|
1319
|
-
[nzDisabledDate]="f.date!.disabledDate"
|
|
1320
|
-
[nzDisabledTime]="f.date!.disabledTime"
|
|
1321
|
-
></nz-date-picker>
|
|
1322
|
-
<nz-range-picker
|
|
1323
|
-
*ngIf="f.date!.range"
|
|
1324
|
-
nzInline
|
|
1325
|
-
[nzMode]="f.date!.mode"
|
|
1326
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1327
|
-
(ngModelChange)="n.emit($event)"
|
|
1328
|
-
[nzShowNow]="f.date!.showNow"
|
|
1329
|
-
[nzShowToday]="f.date!.showToday"
|
|
1330
|
-
[nzDisabledDate]="f.date!.disabledDate"
|
|
1331
|
-
[nzDisabledTime]="f.date!.disabledTime"
|
|
1332
|
-
></nz-range-picker>
|
|
1333
|
-
</div>
|
|
1334
|
-
<div *ngSwitchCase="'time'" class="p-sm st__filter-time"> </div>
|
|
1335
|
-
<div *ngSwitchCase="'custom'" class="st__filter-custom">
|
|
1336
|
-
<ng-template
|
|
1337
|
-
[ngTemplateOutlet]="f.custom!"
|
|
1338
|
-
[ngTemplateOutletContext]="{ $implicit: f, col: col, handle: this }"
|
|
1339
|
-
></ng-template>
|
|
1340
|
-
</div>
|
|
1341
|
-
<ul *ngSwitchDefault nz-menu>
|
|
1342
|
-
<ng-container *ngIf="f.multiple">
|
|
1343
|
-
<li nz-menu-item *ngFor="let filter of f.menus">
|
|
1344
|
-
<label nz-checkbox [(ngModel)]="filter.checked" (ngModelChange)="checkboxChange()">
|
|
1345
|
-
{{ filter.text }}
|
|
1346
|
-
</label>
|
|
1347
|
-
</li>
|
|
1348
|
-
</ng-container>
|
|
1349
|
-
<ng-container *ngIf="!f.multiple">
|
|
1350
|
-
<li nz-menu-item *ngFor="let filter of f.menus">
|
|
1351
|
-
<label nz-radio [ngModel]="filter.checked" (ngModelChange)="radioChange(filter)">
|
|
1352
|
-
{{ filter.text }}
|
|
1353
|
-
</label>
|
|
1354
|
-
</li>
|
|
1355
|
-
</ng-container>
|
|
1356
|
-
</ul>
|
|
1357
|
-
</ng-container>
|
|
1358
|
-
<div *ngIf="f.showOPArea" class="ant-table-filter-dropdown-btns">
|
|
1359
|
-
<a class="ant-table-filter-dropdown-link confirm" (click)="confirm()">
|
|
1360
|
-
<span>{{ f.confirmText || locale.filterConfirm }}</span>
|
|
1361
|
-
</a>
|
|
1362
|
-
<a class="ant-table-filter-dropdown-link clear" (click)="reset()">
|
|
1363
|
-
<span>{{ f.clearText || locale.filterReset }}</span>
|
|
1364
|
-
</a>
|
|
1365
|
-
</div>
|
|
1366
|
-
</div>
|
|
1367
|
-
</nz-dropdown-menu>
|
|
1368
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i7.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i7.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i7.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i11.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i12.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "directive", type: i13.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i13.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i6.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i6.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "component", type: i7$1.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus"], exportAs: ["nzRadio"] }, { kind: "directive", type: i8$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzSize", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: i9.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzSize", "nzMin", "nzMax", "nzParser", "nzPrecision", "nzPrecisionMode", "nzPlaceHolder", "nzStatus", "nzStep", "nzInputMode", "nzId", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBorderless", "nzFormatter"], outputs: ["nzBlur", "nzFocus"], exportAs: ["nzInputNumber"] }, { kind: "component", type: i10.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i10.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STFilterComponent, decorators: [{
|
|
1370
|
-
type: Component,
|
|
1371
|
-
args: [{
|
|
1372
|
-
selector: 'st-filter',
|
|
1373
|
-
template: `
|
|
1374
|
-
<span
|
|
1375
|
-
class="ant-table-filter-trigger"
|
|
1376
|
-
[class.active]="visible || f.default"
|
|
1377
|
-
nz-dropdown
|
|
1378
|
-
[nzDropdownMenu]="filterMenu"
|
|
1379
|
-
nzTrigger="click"
|
|
1380
|
-
[nzClickHide]="false"
|
|
1381
|
-
[(nzVisible)]="visible"
|
|
1382
|
-
nzOverlayClassName="st__filter-wrap"
|
|
1383
|
-
(click)="stopPropagation($event)"
|
|
1384
|
-
>
|
|
1385
|
-
<i nz-icon [nzType]="icon.type" [nzTheme]="icon.theme!"></i>
|
|
1386
|
-
</span>
|
|
1387
|
-
<nz-dropdown-menu #filterMenu="nzDropdownMenu">
|
|
1388
|
-
<div class="ant-table-filter-dropdown">
|
|
1389
|
-
<ng-container [ngSwitch]="f.type">
|
|
1390
|
-
<div *ngSwitchCase="'keyword'" class="st__filter-keyword">
|
|
1391
|
-
<input
|
|
1392
|
-
type="text"
|
|
1393
|
-
nz-input
|
|
1394
|
-
[attr.placeholder]="f.placeholder"
|
|
1395
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1396
|
-
(ngModelChange)="n.emit($event)"
|
|
1397
|
-
(keyup.enter)="confirm()"
|
|
1398
|
-
/>
|
|
1399
|
-
</div>
|
|
1400
|
-
<div *ngSwitchCase="'number'" class="p-sm st__filter-number">
|
|
1401
|
-
<nz-input-number
|
|
1402
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1403
|
-
(ngModelChange)="n.emit($event)"
|
|
1404
|
-
[nzMin]="f.number!.min!"
|
|
1405
|
-
[nzMax]="f.number!.max!"
|
|
1406
|
-
[nzStep]="f.number!.step!"
|
|
1407
|
-
[nzPrecision]="f.number!.precision"
|
|
1408
|
-
[nzPlaceHolder]="f.placeholder!"
|
|
1409
|
-
class="width-100"
|
|
1410
|
-
></nz-input-number>
|
|
1411
|
-
</div>
|
|
1412
|
-
<div *ngSwitchCase="'date'" class="p-sm st__filter-date">
|
|
1413
|
-
<nz-date-picker
|
|
1414
|
-
*ngIf="!f.date!.range"
|
|
1415
|
-
nzInline
|
|
1416
|
-
[nzMode]="f.date!.mode"
|
|
1417
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1418
|
-
(ngModelChange)="n.emit($event)"
|
|
1419
|
-
[nzShowNow]="f.date!.showNow"
|
|
1420
|
-
[nzShowToday]="f.date!.showToday"
|
|
1421
|
-
[nzDisabledDate]="f.date!.disabledDate"
|
|
1422
|
-
[nzDisabledTime]="f.date!.disabledTime"
|
|
1423
|
-
></nz-date-picker>
|
|
1424
|
-
<nz-range-picker
|
|
1425
|
-
*ngIf="f.date!.range"
|
|
1426
|
-
nzInline
|
|
1427
|
-
[nzMode]="f.date!.mode"
|
|
1428
|
-
[(ngModel)]="f.menus![0]!.value"
|
|
1429
|
-
(ngModelChange)="n.emit($event)"
|
|
1430
|
-
[nzShowNow]="f.date!.showNow"
|
|
1431
|
-
[nzShowToday]="f.date!.showToday"
|
|
1432
|
-
[nzDisabledDate]="f.date!.disabledDate"
|
|
1433
|
-
[nzDisabledTime]="f.date!.disabledTime"
|
|
1434
|
-
></nz-range-picker>
|
|
1435
|
-
</div>
|
|
1436
|
-
<div *ngSwitchCase="'time'" class="p-sm st__filter-time"> </div>
|
|
1437
|
-
<div *ngSwitchCase="'custom'" class="st__filter-custom">
|
|
1438
|
-
<ng-template
|
|
1439
|
-
[ngTemplateOutlet]="f.custom!"
|
|
1440
|
-
[ngTemplateOutletContext]="{ $implicit: f, col: col, handle: this }"
|
|
1441
|
-
></ng-template>
|
|
1442
|
-
</div>
|
|
1443
|
-
<ul *ngSwitchDefault nz-menu>
|
|
1444
|
-
<ng-container *ngIf="f.multiple">
|
|
1445
|
-
<li nz-menu-item *ngFor="let filter of f.menus">
|
|
1446
|
-
<label nz-checkbox [(ngModel)]="filter.checked" (ngModelChange)="checkboxChange()">
|
|
1447
|
-
{{ filter.text }}
|
|
1448
|
-
</label>
|
|
1449
|
-
</li>
|
|
1450
|
-
</ng-container>
|
|
1451
|
-
<ng-container *ngIf="!f.multiple">
|
|
1452
|
-
<li nz-menu-item *ngFor="let filter of f.menus">
|
|
1453
|
-
<label nz-radio [ngModel]="filter.checked" (ngModelChange)="radioChange(filter)">
|
|
1454
|
-
{{ filter.text }}
|
|
1455
|
-
</label>
|
|
1456
|
-
</li>
|
|
1457
|
-
</ng-container>
|
|
1458
|
-
</ul>
|
|
1459
|
-
</ng-container>
|
|
1460
|
-
<div *ngIf="f.showOPArea" class="ant-table-filter-dropdown-btns">
|
|
1461
|
-
<a class="ant-table-filter-dropdown-link confirm" (click)="confirm()">
|
|
1462
|
-
<span>{{ f.confirmText || locale.filterConfirm }}</span>
|
|
1463
|
-
</a>
|
|
1464
|
-
<a class="ant-table-filter-dropdown-link clear" (click)="reset()">
|
|
1465
|
-
<span>{{ f.clearText || locale.filterReset }}</span>
|
|
1466
|
-
</a>
|
|
1467
|
-
</div>
|
|
1468
|
-
</div>
|
|
1469
|
-
</nz-dropdown-menu>
|
|
1470
|
-
`,
|
|
1471
|
-
host: {
|
|
1472
|
-
'[class.ant-table-filter-trigger-container]': `true`,
|
|
1473
|
-
'[class.st__filter]': `true`,
|
|
1474
|
-
'[class.ant-table-filter-trigger-container-open]': `visible`
|
|
1475
|
-
},
|
|
1476
|
-
preserveWhitespaces: false,
|
|
1477
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1478
|
-
encapsulation: ViewEncapsulation.None
|
|
1479
|
-
}]
|
|
1480
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { col: [{
|
|
1481
|
-
type: Input
|
|
1482
|
-
}], locale: [{
|
|
1483
|
-
type: Input
|
|
1484
|
-
}], f: [{
|
|
1485
|
-
type: Input
|
|
1486
|
-
}], n: [{
|
|
1487
|
-
type: Output
|
|
1488
|
-
}], handle: [{
|
|
1489
|
-
type: Output
|
|
1490
|
-
}] } });
|
|
1491
|
-
|
|
1492
|
-
class STComponent {
|
|
1493
|
-
get req() {
|
|
1494
|
-
return this._req;
|
|
1495
|
-
}
|
|
1496
|
-
set req(value) {
|
|
1497
|
-
this._req = deepMergeKey({}, true, this.cog.req, value);
|
|
1498
|
-
}
|
|
1499
|
-
/** 返回体配置 */
|
|
1500
|
-
get res() {
|
|
1501
|
-
return this._res;
|
|
1502
|
-
}
|
|
1503
|
-
set res(value) {
|
|
1504
|
-
const item = (this._res = deepMergeKey({}, true, this.cog.res, value));
|
|
1505
|
-
const reName = item.reName;
|
|
1506
|
-
if (typeof reName !== 'function') {
|
|
1507
|
-
if (!Array.isArray(reName.list))
|
|
1508
|
-
reName.list = reName.list.split('.');
|
|
1509
|
-
if (!Array.isArray(reName.total))
|
|
1510
|
-
reName.total = reName.total.split('.');
|
|
1511
|
-
}
|
|
1512
|
-
this._res = item;
|
|
1513
|
-
}
|
|
1514
|
-
get page() {
|
|
1515
|
-
return this._page;
|
|
1516
|
-
}
|
|
1517
|
-
set page(value) {
|
|
1518
|
-
this._page = Object.assign(Object.assign({}, this.cog.page), value);
|
|
1519
|
-
this.updateTotalTpl();
|
|
1520
|
-
}
|
|
1521
|
-
get multiSort() {
|
|
1522
|
-
return this._multiSort;
|
|
1523
|
-
}
|
|
1524
|
-
set multiSort(value) {
|
|
1525
|
-
if ((typeof value === 'boolean' && !toBoolean(value)) ||
|
|
1526
|
-
(typeof value === 'object' && Object.keys(value).length === 0)) {
|
|
1527
|
-
this._multiSort = undefined;
|
|
1528
|
-
return;
|
|
1529
|
-
}
|
|
1530
|
-
this._multiSort = Object.assign({}, (typeof value === 'object' ? value : {}));
|
|
1531
|
-
}
|
|
1532
|
-
set widthMode(value) {
|
|
1533
|
-
this._widthMode = Object.assign(Object.assign({}, this.cog.widthMode), value);
|
|
1534
|
-
}
|
|
1535
|
-
get widthMode() {
|
|
1536
|
-
return this._widthMode;
|
|
1537
|
-
}
|
|
1538
|
-
set widthConfig(val) {
|
|
1539
|
-
this._widthConfig = val;
|
|
1540
|
-
this.customWidthConfig = val && val.length > 0;
|
|
1541
|
-
}
|
|
1542
|
-
set resizable(val) {
|
|
1543
|
-
this._resizable = typeof val === 'object' ? val : { disabled: !toBoolean(val) };
|
|
1544
|
-
}
|
|
1545
|
-
/**
|
|
1546
|
-
* Get the number of the current page
|
|
1547
|
-
*/
|
|
1548
|
-
get count() {
|
|
1549
|
-
return this._data.length;
|
|
1550
|
-
}
|
|
1551
|
-
/**
|
|
1552
|
-
* Get the data of the current page
|
|
1553
|
-
*/
|
|
1554
|
-
get list() {
|
|
1555
|
-
return this._data;
|
|
1556
|
-
}
|
|
1557
|
-
get noColumns() {
|
|
1558
|
-
return this.columns == null;
|
|
1559
|
-
}
|
|
1560
|
-
constructor(i18nSrv, cdr, el, exportSrv, doc, columnSource, dataSource, delonI18n, configSrv, cms) {
|
|
1561
|
-
this.cdr = cdr;
|
|
1562
|
-
this.el = el;
|
|
1563
|
-
this.exportSrv = exportSrv;
|
|
1564
|
-
this.doc = doc;
|
|
1565
|
-
this.columnSource = columnSource;
|
|
1566
|
-
this.dataSource = dataSource;
|
|
1567
|
-
this.delonI18n = delonI18n;
|
|
1568
|
-
this.cms = cms;
|
|
1569
|
-
this.destroy$ = new Subject();
|
|
1570
|
-
this.totalTpl = ``;
|
|
1571
|
-
this.customWidthConfig = false;
|
|
1572
|
-
this._widthConfig = [];
|
|
1573
|
-
this.locale = {};
|
|
1574
|
-
this._loading = false;
|
|
1575
|
-
this._data = [];
|
|
1576
|
-
this._statistical = {};
|
|
1577
|
-
this._isPagination = true;
|
|
1578
|
-
this._allChecked = false;
|
|
1579
|
-
this._allCheckedDisabled = false;
|
|
1580
|
-
this._indeterminate = false;
|
|
1581
|
-
this._headers = [];
|
|
1582
|
-
this._columns = [];
|
|
1583
|
-
this.contextmenuList = [];
|
|
1584
|
-
this.ps = 10;
|
|
1585
|
-
this.pi = 1;
|
|
1586
|
-
this.total = 0;
|
|
1587
|
-
this.loading = null;
|
|
1588
|
-
this.loadingDelay = 0;
|
|
1589
|
-
this.loadingIndicator = null;
|
|
1590
|
-
this.bordered = false;
|
|
1591
|
-
this.scroll = { x: null, y: null };
|
|
1592
|
-
this.showHeader = true;
|
|
1593
|
-
this.expandRowByClick = false;
|
|
1594
|
-
this.expandAccordion = false;
|
|
1595
|
-
this.expand = null;
|
|
1596
|
-
this.responsive = true;
|
|
1597
|
-
this.error = new EventEmitter();
|
|
1598
|
-
this.change = new EventEmitter();
|
|
1599
|
-
this.virtualScroll = false;
|
|
1600
|
-
this.virtualItemSize = 54;
|
|
1601
|
-
this.virtualMaxBufferPx = 200;
|
|
1602
|
-
this.virtualMinBufferPx = 100;
|
|
1603
|
-
this.virtualForTrackBy = index => index;
|
|
1604
|
-
this.delonI18n.change.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
1605
|
-
this.locale = this.delonI18n.getData('st');
|
|
1606
|
-
if (this._columns.length > 0) {
|
|
1607
|
-
this.updateTotalTpl();
|
|
1608
|
-
this.cd();
|
|
1609
|
-
}
|
|
1610
|
-
});
|
|
1611
|
-
i18nSrv.change
|
|
1612
|
-
.pipe(takeUntil(this.destroy$), filter(() => this._columns.length > 0))
|
|
1613
|
-
.subscribe(() => this.refreshColumns());
|
|
1614
|
-
this.setCog(configSrv.merge('st', ST_DEFAULT_CONFIG));
|
|
1615
|
-
}
|
|
1616
|
-
setCog(cog) {
|
|
1617
|
-
const copyMultiSort = Object.assign({}, cog.multiSort);
|
|
1618
|
-
// Because multiSort.global will affect the result, it should be removed first, and multiSort will be operated again after processing.
|
|
1619
|
-
delete cog.multiSort;
|
|
1620
|
-
this.cog = cog;
|
|
1621
|
-
Object.assign(this, cog);
|
|
1622
|
-
if (copyMultiSort.global !== false) {
|
|
1623
|
-
this.multiSort = copyMultiSort;
|
|
1624
|
-
}
|
|
1625
|
-
this.columnSource.setCog(cog);
|
|
1626
|
-
this.dataSource.setCog(cog);
|
|
1627
|
-
}
|
|
1628
|
-
cd() {
|
|
1629
|
-
this.cdr.detectChanges();
|
|
1630
|
-
return this;
|
|
1631
|
-
}
|
|
1632
|
-
refreshData() {
|
|
1633
|
-
this._data = [...this._data];
|
|
1634
|
-
return this.cd();
|
|
1635
|
-
}
|
|
1636
|
-
renderTotal(total, range) {
|
|
1637
|
-
return this.totalTpl
|
|
1638
|
-
? this.totalTpl.replace('{{total}}', total).replace('{{range[0]}}', range[0]).replace('{{range[1]}}', range[1])
|
|
1639
|
-
: '';
|
|
1640
|
-
}
|
|
1641
|
-
changeEmit(type, data) {
|
|
1642
|
-
const res = {
|
|
1643
|
-
type,
|
|
1644
|
-
pi: this.pi,
|
|
1645
|
-
ps: this.ps,
|
|
1646
|
-
total: this.total
|
|
1647
|
-
};
|
|
1648
|
-
if (data != null) {
|
|
1649
|
-
res[type] = data;
|
|
1650
|
-
}
|
|
1651
|
-
this.change.emit(res);
|
|
1652
|
-
}
|
|
1653
|
-
// #region data
|
|
1654
|
-
/**
|
|
1655
|
-
* 获取过滤后所有数据
|
|
1656
|
-
* - 本地数据:包含排序、过滤后不分页数据
|
|
1657
|
-
* - 远程数据:不传递 `pi`、`ps` 两个参数
|
|
1658
|
-
*/
|
|
1659
|
-
get filteredData() {
|
|
1660
|
-
return this.loadData({ paginator: false }).then(res => res.list);
|
|
1661
|
-
}
|
|
1662
|
-
updateTotalTpl() {
|
|
1663
|
-
const { total } = this.page;
|
|
1664
|
-
if (typeof total === 'string' && total.length) {
|
|
1665
|
-
this.totalTpl = total;
|
|
1666
|
-
}
|
|
1667
|
-
else if (toBoolean(total)) {
|
|
1668
|
-
this.totalTpl = this.locale.total;
|
|
1669
|
-
}
|
|
1670
|
-
else {
|
|
1671
|
-
this.totalTpl = '';
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
setLoading(val) {
|
|
1675
|
-
if (this.loading == null) {
|
|
1676
|
-
this._loading = val;
|
|
1677
|
-
this.cdr.detectChanges();
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
loadData(options) {
|
|
1681
|
-
const { pi, ps, data, req, res, page, total, singleSort, multiSort, rowClassName } = this;
|
|
1682
|
-
return new Promise((resolvePromise, rejectPromise) => {
|
|
1683
|
-
if (this.data$) {
|
|
1684
|
-
this.data$.unsubscribe();
|
|
1685
|
-
}
|
|
1686
|
-
this.data$ = this.dataSource
|
|
1687
|
-
.process(Object.assign({ pi,
|
|
1688
|
-
ps,
|
|
1689
|
-
total,
|
|
1690
|
-
data,
|
|
1691
|
-
req,
|
|
1692
|
-
res,
|
|
1693
|
-
page, columns: this._columns, singleSort,
|
|
1694
|
-
multiSort,
|
|
1695
|
-
rowClassName, paginator: true, customRequest: this.customRequest || this.cog.customRequest }, options))
|
|
1696
|
-
.pipe(takeUntil(this.destroy$))
|
|
1697
|
-
.subscribe({
|
|
1698
|
-
next: result => resolvePromise(result),
|
|
1699
|
-
error: error => {
|
|
1700
|
-
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
1701
|
-
console.warn('st.loadDate', error);
|
|
1702
|
-
}
|
|
1703
|
-
rejectPromise(error);
|
|
1704
|
-
}
|
|
1705
|
-
});
|
|
1706
|
-
});
|
|
1707
|
-
}
|
|
1708
|
-
loadPageData() {
|
|
1709
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1710
|
-
this.setLoading(true);
|
|
1711
|
-
try {
|
|
1712
|
-
const result = yield this.loadData();
|
|
1713
|
-
this.setLoading(false);
|
|
1714
|
-
const undefinedString = 'undefined';
|
|
1715
|
-
if (typeof result.pi !== undefinedString) {
|
|
1716
|
-
this.pi = result.pi;
|
|
1717
|
-
}
|
|
1718
|
-
if (typeof result.ps !== undefinedString) {
|
|
1719
|
-
this.ps = result.ps;
|
|
1720
|
-
}
|
|
1721
|
-
if (typeof result.total !== undefinedString) {
|
|
1722
|
-
this.total = result.total;
|
|
1723
|
-
}
|
|
1724
|
-
if (typeof result.pageShow !== undefinedString) {
|
|
1725
|
-
this._isPagination = result.pageShow;
|
|
1726
|
-
}
|
|
1727
|
-
this._data = result.list;
|
|
1728
|
-
this._statistical = result.statistical;
|
|
1729
|
-
this.changeEmit('loaded', result.list);
|
|
1730
|
-
// Should be re-render in next tike when using virtual scroll
|
|
1731
|
-
// https://github.com/ng-alain/ng-alain/issues/1836
|
|
1732
|
-
if (this.cdkVirtualScrollViewport) {
|
|
1733
|
-
Promise.resolve().then(() => this.cdkVirtualScrollViewport.checkViewportSize());
|
|
1734
|
-
}
|
|
1735
|
-
return this._refCheck();
|
|
1736
|
-
}
|
|
1737
|
-
catch (error) {
|
|
1738
|
-
this.setLoading(false);
|
|
1739
|
-
if (!this.destroy$.closed) {
|
|
1740
|
-
this.cdr.detectChanges();
|
|
1741
|
-
this.error.emit({ type: 'req', error });
|
|
1742
|
-
}
|
|
1743
|
-
return this;
|
|
1744
|
-
}
|
|
1745
|
-
});
|
|
1746
|
-
}
|
|
1747
|
-
/** 清空所有数据 */
|
|
1748
|
-
clear(cleanStatus = true) {
|
|
1749
|
-
if (cleanStatus) {
|
|
1750
|
-
this.clearStatus();
|
|
1751
|
-
}
|
|
1752
|
-
this._data = [];
|
|
1753
|
-
return this.cd();
|
|
1754
|
-
}
|
|
1755
|
-
/** 清空所有状态 */
|
|
1756
|
-
clearStatus() {
|
|
1757
|
-
return this.clearCheck().clearRadio().clearFilter().clearSort();
|
|
1758
|
-
}
|
|
1759
|
-
/**
|
|
1760
|
-
* 根据页码重新加载数据
|
|
1761
|
-
*
|
|
1762
|
-
* @param pi 指定当前页码,默认:`1`
|
|
1763
|
-
* @param extraParams 重新指定 `extraParams` 值
|
|
1764
|
-
* @param options 选项
|
|
1765
|
-
*/
|
|
1766
|
-
load(pi = 1, extraParams, options) {
|
|
1767
|
-
if (pi !== -1)
|
|
1768
|
-
this.pi = pi;
|
|
1769
|
-
if (typeof extraParams !== 'undefined') {
|
|
1770
|
-
this.req.params = options && options.merge ? Object.assign(Object.assign({}, this.req.params), extraParams) : extraParams;
|
|
1771
|
-
}
|
|
1772
|
-
this._change('pi', options);
|
|
1773
|
-
return this;
|
|
1774
|
-
}
|
|
1775
|
-
/**
|
|
1776
|
-
* 重新刷新当前页
|
|
1777
|
-
*
|
|
1778
|
-
* @param extraParams 重新指定 `extraParams` 值
|
|
1779
|
-
*/
|
|
1780
|
-
reload(extraParams, options) {
|
|
1781
|
-
return this.load(-1, extraParams, options);
|
|
1782
|
-
}
|
|
1783
|
-
/**
|
|
1784
|
-
* 重置且重新设置 `pi` 为 `1`,包含以下值:
|
|
1785
|
-
* - `check` 数据
|
|
1786
|
-
* - `radio` 数据
|
|
1787
|
-
* - `sort` 数据
|
|
1788
|
-
* - `fileter` 数据
|
|
1789
|
-
*
|
|
1790
|
-
* @param extraParams 重新指定 `extraParams` 值
|
|
1791
|
-
*/
|
|
1792
|
-
reset(extraParams, options) {
|
|
1793
|
-
this.clearStatus().load(1, extraParams, options);
|
|
1794
|
-
return this;
|
|
1795
|
-
}
|
|
1796
|
-
_toTop(enforce) {
|
|
1797
|
-
var _a;
|
|
1798
|
-
if (!(enforce == null ? this.page.toTop : enforce))
|
|
1799
|
-
return;
|
|
1800
|
-
const el = this.el.nativeElement;
|
|
1801
|
-
el.scrollIntoView();
|
|
1802
|
-
// fix header height
|
|
1803
|
-
this.doc.documentElement.scrollTop -= this.page.toTopOffset;
|
|
1804
|
-
if (this.scroll) {
|
|
1805
|
-
if (this.cdkVirtualScrollViewport) {
|
|
1806
|
-
this.cdkVirtualScrollViewport.scrollTo({
|
|
1807
|
-
top: 0,
|
|
1808
|
-
left: 0
|
|
1809
|
-
});
|
|
1810
|
-
}
|
|
1811
|
-
else {
|
|
1812
|
-
(_a = el.querySelector('.ant-table-body, .ant-table-content')) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);
|
|
1813
|
-
}
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
_change(type, options) {
|
|
1817
|
-
if (type === 'pi' || (type === 'ps' && this.pi <= Math.ceil(this.total / this.ps))) {
|
|
1818
|
-
this.loadPageData().then(() => this._toTop(options === null || options === void 0 ? void 0 : options.toTop));
|
|
1819
|
-
}
|
|
1820
|
-
this.changeEmit(type);
|
|
1821
|
-
}
|
|
1822
|
-
closeOtherExpand(item) {
|
|
1823
|
-
if (this.expandAccordion === false)
|
|
1824
|
-
return;
|
|
1825
|
-
this._data.filter(i => i !== item).forEach(i => (i.expand = false));
|
|
1826
|
-
}
|
|
1827
|
-
_rowClick(e, item, index, dbl) {
|
|
1828
|
-
const el = e.target;
|
|
1829
|
-
if (el.nodeName === 'INPUT')
|
|
1830
|
-
return;
|
|
1831
|
-
const { expand, expandRowByClick } = this;
|
|
1832
|
-
if (!!expand && item.showExpand !== false && expandRowByClick) {
|
|
1833
|
-
item.expand = !item.expand;
|
|
1834
|
-
this.closeOtherExpand(item);
|
|
1835
|
-
this.changeEmit('expand', item);
|
|
1836
|
-
return;
|
|
1837
|
-
}
|
|
1838
|
-
const data = { e, item, index };
|
|
1839
|
-
if (dbl) {
|
|
1840
|
-
this.changeEmit('dblClick', data);
|
|
1841
|
-
}
|
|
1842
|
-
else {
|
|
1843
|
-
this._clickRowClassName(el, item, index);
|
|
1844
|
-
this.changeEmit('click', data);
|
|
1845
|
-
}
|
|
1846
|
-
}
|
|
1847
|
-
_clickRowClassName(el, item, index) {
|
|
1848
|
-
const cr = this.clickRowClassName;
|
|
1849
|
-
if (cr == null)
|
|
1850
|
-
return;
|
|
1851
|
-
const config = Object.assign({ exclusive: false }, (typeof cr === 'string' ? { fn: () => cr } : cr));
|
|
1852
|
-
const className = config.fn(item, index);
|
|
1853
|
-
const trEl = el.closest('tr');
|
|
1854
|
-
if (config.exclusive) {
|
|
1855
|
-
trEl.parentElement.querySelectorAll('tr').forEach((a) => a.classList.remove(className));
|
|
1856
|
-
}
|
|
1857
|
-
if (trEl.classList.contains(className)) {
|
|
1858
|
-
trEl.classList.remove(className);
|
|
1859
|
-
}
|
|
1860
|
-
else {
|
|
1861
|
-
trEl.classList.add(className);
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1864
|
-
_expandChange(item, expand) {
|
|
1865
|
-
item.expand = expand;
|
|
1866
|
-
this.closeOtherExpand(item);
|
|
1867
|
-
this.changeEmit('expand', item);
|
|
1868
|
-
}
|
|
1869
|
-
_stopPropagation(ev) {
|
|
1870
|
-
ev.stopPropagation();
|
|
1871
|
-
}
|
|
1872
|
-
_refColAndData() {
|
|
1873
|
-
this._columns
|
|
1874
|
-
.filter(w => w.type === 'no')
|
|
1875
|
-
.forEach(c => this._data.forEach((i, idx) => {
|
|
1876
|
-
const text = `${this.dataSource.getNoIndex(i, c, idx)}`;
|
|
1877
|
-
i._values[c.__point] = { text, _text: text, org: idx, safeType: 'text' };
|
|
1878
|
-
}));
|
|
1879
|
-
return this.refreshData();
|
|
1880
|
-
}
|
|
1881
|
-
/**
|
|
1882
|
-
* Add a rows in the table, like this:
|
|
1883
|
-
*
|
|
1884
|
-
* ```
|
|
1885
|
-
* this.st.addRow(stDataItem)
|
|
1886
|
-
* ```
|
|
1887
|
-
*
|
|
1888
|
-
* **TIPS:** Don't change the `total` value, it is recommended to use the `reload` method if needed
|
|
1889
|
-
*/
|
|
1890
|
-
addRow(data, options) {
|
|
1891
|
-
var _a;
|
|
1892
|
-
if (!Array.isArray(data))
|
|
1893
|
-
data = [data];
|
|
1894
|
-
this._data.splice((_a = options === null || options === void 0 ? void 0 : options.index) !== null && _a !== void 0 ? _a : 0, 0, ...data);
|
|
1895
|
-
return this.optimizeData()._refColAndData();
|
|
1896
|
-
}
|
|
1897
|
-
/**
|
|
1898
|
-
* Remove a row in the table, like this:
|
|
1899
|
-
*
|
|
1900
|
-
* ```
|
|
1901
|
-
* this.st.removeRow(0)
|
|
1902
|
-
* this.st.removeRow(stDataItem)
|
|
1903
|
-
* ```
|
|
1904
|
-
*
|
|
1905
|
-
* **TIPS:** Don't change the `total` value, it is recommended to use the `reload` method if needed
|
|
1906
|
-
*/
|
|
1907
|
-
removeRow(data) {
|
|
1908
|
-
if (typeof data === 'number') {
|
|
1909
|
-
this._data.splice(data, 1);
|
|
1910
|
-
}
|
|
1911
|
-
else {
|
|
1912
|
-
if (!Array.isArray(data)) {
|
|
1913
|
-
data = [data];
|
|
1914
|
-
}
|
|
1915
|
-
const curData = this._data;
|
|
1916
|
-
for (var i = curData.length; i--;) {
|
|
1917
|
-
if (data.indexOf(curData[i]) !== -1) {
|
|
1918
|
-
curData.splice(i, 1);
|
|
1919
|
-
}
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
|
-
return this._refCheck()._refColAndData();
|
|
1923
|
-
}
|
|
1924
|
-
/**
|
|
1925
|
-
* Sets the row value for the `index` in the table, like this:
|
|
1926
|
-
*
|
|
1927
|
-
* - `optinos.refreshSchema` Whether to refresh of st schemas
|
|
1928
|
-
* - `optinos.emitReload` Whether to trigger a reload http request when data is url
|
|
1929
|
-
*
|
|
1930
|
-
* ```
|
|
1931
|
-
* this.st.setRow(0, { price: 100 })
|
|
1932
|
-
* this.st.setRow(0, { price: 100, name: 'asdf' })
|
|
1933
|
-
* this.st.setRow(item, { price: 100 })
|
|
1934
|
-
* ```
|
|
1935
|
-
*/
|
|
1936
|
-
setRow(index, item, options) {
|
|
1937
|
-
options = Object.assign({ refreshSchema: false, emitReload: false }, options);
|
|
1938
|
-
if (typeof index !== 'number') {
|
|
1939
|
-
index = this._data.indexOf(index);
|
|
1940
|
-
}
|
|
1941
|
-
this._data[index] = deepMergeKey(this._data[index], false, item);
|
|
1942
|
-
this.optimizeData();
|
|
1943
|
-
if (options.refreshSchema) {
|
|
1944
|
-
this.resetColumns({ emitReload: options.emitReload });
|
|
1945
|
-
return this;
|
|
1946
|
-
}
|
|
1947
|
-
return this.refreshData();
|
|
1948
|
-
}
|
|
1949
|
-
// #endregion
|
|
1950
|
-
// #region sort
|
|
1951
|
-
sort(col, idx, value) {
|
|
1952
|
-
if (this.multiSort) {
|
|
1953
|
-
col._sort.default = value;
|
|
1954
|
-
col._sort.tick = this.dataSource.nextSortTick;
|
|
1955
|
-
}
|
|
1956
|
-
else {
|
|
1957
|
-
this._columns.forEach((item, index) => (item._sort.default = index === idx ? value : null));
|
|
1958
|
-
}
|
|
1959
|
-
this.cdr.detectChanges();
|
|
1960
|
-
this.loadPageData();
|
|
1961
|
-
const res = {
|
|
1962
|
-
value,
|
|
1963
|
-
map: this.dataSource.getReqSortMap(this.singleSort, this.multiSort, this._columns),
|
|
1964
|
-
column: col
|
|
1965
|
-
};
|
|
1966
|
-
this.changeEmit('sort', res);
|
|
1967
|
-
}
|
|
1968
|
-
clearSort() {
|
|
1969
|
-
this._columns.forEach(item => (item._sort.default = null));
|
|
1970
|
-
return this;
|
|
1971
|
-
}
|
|
1972
|
-
// #endregion
|
|
1973
|
-
// #region filter
|
|
1974
|
-
_handleFilter(col, confirm) {
|
|
1975
|
-
if (!confirm) {
|
|
1976
|
-
this.columnSource.cleanFilter(col);
|
|
1977
|
-
}
|
|
1978
|
-
// 过滤表示一种数据的变化应重置页码为 `1`
|
|
1979
|
-
this.pi = 1;
|
|
1980
|
-
this.columnSource.updateDefault(col.filter);
|
|
1981
|
-
this.loadPageData();
|
|
1982
|
-
this.changeEmit('filter', col);
|
|
1983
|
-
}
|
|
1984
|
-
handleFilterNotify(value) {
|
|
1985
|
-
this.changeEmit('filterChange', value);
|
|
1986
|
-
}
|
|
1987
|
-
clearFilter() {
|
|
1988
|
-
this._columns.filter(w => w.filter && w.filter.default === true).forEach(col => this.columnSource.cleanFilter(col));
|
|
1989
|
-
return this;
|
|
1990
|
-
}
|
|
1991
|
-
// #endregion
|
|
1992
|
-
// #region checkbox
|
|
1993
|
-
/** 清除所有 `checkbox` */
|
|
1994
|
-
clearCheck() {
|
|
1995
|
-
return this.checkAll(false);
|
|
1996
|
-
}
|
|
1997
|
-
_refCheck() {
|
|
1998
|
-
const validData = this._data.filter(w => !w.disabled);
|
|
1999
|
-
const checkedList = validData.filter(w => w.checked === true);
|
|
2000
|
-
this._allChecked = checkedList.length > 0 && checkedList.length === validData.length;
|
|
2001
|
-
const allUnChecked = validData.every(value => !value.checked);
|
|
2002
|
-
this._indeterminate = !this._allChecked && !allUnChecked;
|
|
2003
|
-
this._allCheckedDisabled = this._data.length === this._data.filter(w => w.disabled).length;
|
|
2004
|
-
return this.cd();
|
|
2005
|
-
}
|
|
2006
|
-
checkAll(checked) {
|
|
2007
|
-
checked = typeof checked === 'undefined' ? this._allChecked : checked;
|
|
2008
|
-
this._data.filter(w => !w.disabled).forEach(i => (i.checked = checked));
|
|
2009
|
-
return this._refCheck()._checkNotify().refreshData();
|
|
2010
|
-
}
|
|
2011
|
-
_rowSelection(row) {
|
|
2012
|
-
row.select(this._data);
|
|
2013
|
-
return this._refCheck()._checkNotify();
|
|
2014
|
-
}
|
|
2015
|
-
_checkNotify() {
|
|
2016
|
-
const res = this._data.filter(w => !w.disabled && w.checked === true);
|
|
2017
|
-
this.changeEmit('checkbox', res);
|
|
2018
|
-
return this;
|
|
2019
|
-
}
|
|
2020
|
-
// #endregion
|
|
2021
|
-
// #region radio
|
|
2022
|
-
/** 清除所有 `radio` */
|
|
2023
|
-
clearRadio() {
|
|
2024
|
-
this._data.filter(w => w.checked).forEach(item => (item.checked = false));
|
|
2025
|
-
this.changeEmit('radio', null);
|
|
2026
|
-
return this.refreshData();
|
|
2027
|
-
}
|
|
2028
|
-
// #endregion
|
|
2029
|
-
_handleTd(ev) {
|
|
2030
|
-
switch (ev.type) {
|
|
2031
|
-
case 'checkbox':
|
|
2032
|
-
this._refCheck()._checkNotify();
|
|
2033
|
-
break;
|
|
2034
|
-
case 'radio':
|
|
2035
|
-
this.changeEmit('radio', ev.item);
|
|
2036
|
-
this.refreshData();
|
|
2037
|
-
break;
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
// #region export
|
|
2041
|
-
/**
|
|
2042
|
-
* 导出当前页,确保已经注册 `XlsxModule`
|
|
2043
|
-
*
|
|
2044
|
-
* @param newData 重新指定数据;若为 `true` 表示使用 `filteredData` 数据
|
|
2045
|
-
* @param opt 额外参数
|
|
2046
|
-
*/
|
|
2047
|
-
export(newData, opt) {
|
|
2048
|
-
const data = Array.isArray(newData)
|
|
2049
|
-
? this.dataSource.optimizeData({ columns: this._columns, result: newData })
|
|
2050
|
-
: this._data;
|
|
2051
|
-
(newData === true ? from(this.filteredData) : of(data)).subscribe((res) => this.exportSrv.export(Object.assign(Object.assign({ columens: this._columns }, opt), { data: res })));
|
|
2052
|
-
}
|
|
2053
|
-
// #endregion
|
|
2054
|
-
// #region resizable
|
|
2055
|
-
colResize({ width }, column) {
|
|
2056
|
-
column.width = `${width}px`;
|
|
2057
|
-
this.changeEmit('resize', column);
|
|
2058
|
-
}
|
|
2059
|
-
// #endregion
|
|
2060
|
-
// #region contextmenu
|
|
2061
|
-
onContextmenu(event) {
|
|
2062
|
-
if (!this.contextmenu) {
|
|
2063
|
-
return;
|
|
2064
|
-
}
|
|
2065
|
-
event.preventDefault();
|
|
2066
|
-
event.stopPropagation();
|
|
2067
|
-
const colEl = event.target.closest('[data-col-index]');
|
|
2068
|
-
if (!colEl) {
|
|
2069
|
-
return;
|
|
2070
|
-
}
|
|
2071
|
-
const colIndex = Number(colEl.dataset.colIndex);
|
|
2072
|
-
const rowIndex = Number(colEl.closest('tr').dataset.index);
|
|
2073
|
-
const isTitle = isNaN(rowIndex);
|
|
2074
|
-
const obs$ = this.contextmenu({
|
|
2075
|
-
event,
|
|
2076
|
-
type: isTitle ? 'head' : 'body',
|
|
2077
|
-
rowIndex: isTitle ? null : rowIndex,
|
|
2078
|
-
colIndex,
|
|
2079
|
-
data: isTitle ? null : this.list[rowIndex],
|
|
2080
|
-
column: this._columns[colIndex]
|
|
2081
|
-
});
|
|
2082
|
-
(isObservable(obs$) ? obs$ : of(obs$))
|
|
2083
|
-
.pipe(takeUntil(this.destroy$), filter(res => res.length > 0))
|
|
2084
|
-
.subscribe(res => {
|
|
2085
|
-
this.contextmenuList = res.map(i => {
|
|
2086
|
-
if (!Array.isArray(i.children)) {
|
|
2087
|
-
i.children = [];
|
|
2088
|
-
}
|
|
2089
|
-
return i;
|
|
2090
|
-
});
|
|
2091
|
-
this.cdr.detectChanges();
|
|
2092
|
-
this.cms.create(event, this.contextmenuTpl);
|
|
2093
|
-
});
|
|
2094
|
-
}
|
|
2095
|
-
// #endregion
|
|
2096
|
-
get cdkVirtualScrollViewport() {
|
|
2097
|
-
return this.orgTable.cdkVirtualScrollViewport;
|
|
2098
|
-
}
|
|
2099
|
-
resetColumns(options) {
|
|
2100
|
-
options = Object.assign({ emitReload: true, preClearData: false }, options);
|
|
2101
|
-
if (typeof options.columns !== 'undefined') {
|
|
2102
|
-
this.columns = options.columns;
|
|
2103
|
-
}
|
|
2104
|
-
if (typeof options.pi !== 'undefined') {
|
|
2105
|
-
this.pi = options.pi;
|
|
2106
|
-
}
|
|
2107
|
-
if (typeof options.ps !== 'undefined') {
|
|
2108
|
-
this.ps = options.ps;
|
|
2109
|
-
}
|
|
2110
|
-
if (options.emitReload) {
|
|
2111
|
-
// Should clean data, Because of changing columns may cause inaccurate data
|
|
2112
|
-
options.preClearData = true;
|
|
2113
|
-
}
|
|
2114
|
-
if (options.preClearData) {
|
|
2115
|
-
this._data = [];
|
|
2116
|
-
}
|
|
2117
|
-
this.refreshColumns();
|
|
2118
|
-
if (options.emitReload) {
|
|
2119
|
-
return this.loadPageData();
|
|
2120
|
-
}
|
|
2121
|
-
else {
|
|
2122
|
-
this.cd();
|
|
2123
|
-
return Promise.resolve(this);
|
|
2124
|
-
}
|
|
2125
|
-
}
|
|
2126
|
-
refreshColumns() {
|
|
2127
|
-
const res = this.columnSource.process(this.columns, {
|
|
2128
|
-
widthMode: this.widthMode,
|
|
2129
|
-
resizable: this._resizable,
|
|
2130
|
-
safeType: this.cog.safeType
|
|
2131
|
-
});
|
|
2132
|
-
this._columns = res.columns;
|
|
2133
|
-
this._headers = res.headers;
|
|
2134
|
-
if (this.customWidthConfig === false && res.headerWidths != null) {
|
|
2135
|
-
this._widthConfig = res.headerWidths;
|
|
2136
|
-
}
|
|
2137
|
-
return this;
|
|
2138
|
-
}
|
|
2139
|
-
optimizeData() {
|
|
2140
|
-
this._data = this.dataSource.optimizeData({
|
|
2141
|
-
columns: this._columns,
|
|
2142
|
-
result: this._data,
|
|
2143
|
-
rowClassName: this.rowClassName
|
|
2144
|
-
});
|
|
2145
|
-
return this;
|
|
2146
|
-
}
|
|
2147
|
-
/**
|
|
2148
|
-
* Return pure data, `st` internally maintains a set of data for caching, this part of data may affect the backend
|
|
2149
|
-
*
|
|
2150
|
-
* 返回纯净数据,`st` 内部会维护一组用于缓存的数据,这部分数据可能会影响后端
|
|
2151
|
-
*/
|
|
2152
|
-
pureItem(itemOrIndex) {
|
|
2153
|
-
if (typeof itemOrIndex === 'number') {
|
|
2154
|
-
itemOrIndex = this._data[itemOrIndex];
|
|
2155
|
-
}
|
|
2156
|
-
if (!itemOrIndex) {
|
|
2157
|
-
return null;
|
|
2158
|
-
}
|
|
2159
|
-
const copyItem = deepCopy(itemOrIndex);
|
|
2160
|
-
['_values', '_rowClassName'].forEach(key => delete copyItem[key]);
|
|
2161
|
-
return copyItem;
|
|
2162
|
-
}
|
|
2163
|
-
ngAfterViewInit() {
|
|
2164
|
-
this.columnSource.restoreAllRender(this._columns);
|
|
2165
|
-
}
|
|
2166
|
-
ngOnChanges(changes) {
|
|
2167
|
-
if (changes.columns) {
|
|
2168
|
-
this.refreshColumns().optimizeData();
|
|
2169
|
-
}
|
|
2170
|
-
const changeData = changes.data;
|
|
2171
|
-
if (changeData && changeData.currentValue && !(this.req.lazyLoad && changeData.firstChange)) {
|
|
2172
|
-
this.loadPageData();
|
|
2173
|
-
}
|
|
2174
|
-
if (changes.loading) {
|
|
2175
|
-
this._loading = changes.loading.currentValue;
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2178
|
-
ngOnDestroy() {
|
|
2179
|
-
this.destroy$.next();
|
|
2180
|
-
this.destroy$.complete();
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
STComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STComponent, deps: [{ token: ALAIN_I18N_TOKEN, optional: true }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: STExport }, { token: DOCUMENT }, { token: STColumnSource }, { token: STDataSource }, { token: i1$1.DelonLocaleService }, { token: i5.AlainConfigService }, { token: i6.NzContextMenuService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2184
|
-
STComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: STComponent, selector: "st", inputs: { req: "req", res: "res", page: "page", data: "data", columns: "columns", contextmenu: "contextmenu", ps: "ps", pi: "pi", total: "total", loading: "loading", loadingDelay: "loadingDelay", loadingIndicator: "loadingIndicator", bordered: "bordered", size: "size", scroll: "scroll", singleSort: "singleSort", multiSort: "multiSort", rowClassName: "rowClassName", clickRowClassName: "clickRowClassName", widthMode: "widthMode", widthConfig: "widthConfig", resizable: "resizable", header: "header", showHeader: "showHeader", footer: "footer", bodyHeader: "bodyHeader", body: "body", expandRowByClick: "expandRowByClick", expandAccordion: "expandAccordion", expand: "expand", noResult: "noResult", responsive: "responsive", responsiveHideHeaderFooter: "responsiveHideHeaderFooter", virtualScroll: "virtualScroll", virtualItemSize: "virtualItemSize", virtualMaxBufferPx: "virtualMaxBufferPx", virtualMinBufferPx: "virtualMinBufferPx", customRequest: "customRequest", virtualForTrackBy: "virtualForTrackBy" }, outputs: { error: "error", change: "change" }, host: { properties: { "class.st": "true", "class.st__p-left": "page.placement === 'left'", "class.st__p-center": "page.placement === 'center'", "class.st__width-strict": "widthMode.type === 'strict'", "class.st__row-class": "rowClassName", "class.ant-table-rep": "responsive", "class.ant-table-rep__hide-header-footer": "responsiveHideHeaderFooter" } }, providers: [STDataSource, STRowSource, STColumnSource, STExport, DatePipe, YNPipe, DecimalPipe], viewQueries: [{ propertyName: "orgTable", first: true, predicate: ["table"], descendants: true }, { propertyName: "contextmenuTpl", first: true, predicate: ["contextmenuTpl"], descendants: true }], exportAs: ["st"], usesOnChanges: true, ngImport: i0, template: "<ng-template #titleTpl let-i>\n <span [innerHTML]=\"i._text\"></span>\n <small *ngIf=\"i.optional\" class=\"st__head-optional\" [innerHTML]=\"i.optional\"></small>\n <i\n *ngIf=\"i.optionalHelp\"\n class=\"st__head-tip\"\n nz-tooltip\n [nzTooltipTitle]=\"i.optionalHelp\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n</ng-template>\n<ng-template #chkAllTpl let-custom>\n <label\n nz-checkbox\n class=\"st__checkall\"\n [nzDisabled]=\"_allCheckedDisabled\"\n [(ngModel)]=\"_allChecked\"\n [nzIndeterminate]=\"_indeterminate\"\n (ngModelChange)=\"checkAll()\"\n [class.ant-table-selection-select-all-custom]=\"custom\"\n ></label>\n</ng-template>\n<nz-table\n #table\n [nzData]=\"_data\"\n [(nzPageIndex)]=\"pi\"\n (nzPageIndexChange)=\"_change('pi')\"\n [(nzPageSize)]=\"ps\"\n (nzPageSizeChange)=\"_change('ps')\"\n [nzTotal]=\"total\"\n [nzShowPagination]=\"_isPagination\"\n [nzFrontPagination]=\"false\"\n [nzBordered]=\"bordered\"\n [nzSize]=\"size\"\n [nzLoading]=\"noColumns || _loading\"\n [nzLoadingDelay]=\"loadingDelay\"\n [nzLoadingIndicator]=\"loadingIndicator\"\n [nzTitle]=\"header!\"\n [nzFooter]=\"footer!\"\n [nzScroll]=\"scroll\"\n [nzVirtualItemSize]=\"virtualItemSize\"\n [nzVirtualMaxBufferPx]=\"virtualMaxBufferPx\"\n [nzVirtualMinBufferPx]=\"virtualMinBufferPx\"\n [nzVirtualForTrackBy]=\"virtualForTrackBy\"\n [nzNoResult]=\"noResult!\"\n [nzPageSizeOptions]=\"page.pageSizes!\"\n [nzShowQuickJumper]=\"page.showQuickJumper\"\n [nzShowSizeChanger]=\"page.showSize\"\n [nzPaginationPosition]=\"page.position!\"\n [nzPaginationType]=\"page.type!\"\n [nzItemRender]=\"page.itemRender!\"\n [nzSimple]=\"page.simple\"\n [nzShowTotal]=\"totalTpl\"\n [nzWidthConfig]=\"_widthConfig\"\n (contextmenu)=\"onContextmenu($event)\"\n [class.st__no-column]=\"noColumns\"\n>\n <thead *ngIf=\"showHeader\">\n <tr *ngFor=\"let row of _headers; let rowFirst = first\">\n <th *ngIf=\"rowFirst && expand\" nzWidth=\"50px\" [rowSpan]=\"_headers.length\"></th>\n <ng-container *ngFor=\"let h of row; let index = index; let last = last\">\n <th\n *let=\"h.column as _c\"\n [colSpan]=\"h.colSpan\"\n [rowSpan]=\"h.rowSpan\"\n [nzWidth]=\"$any(_c).width\"\n [nzLeft]=\"_c._left!\"\n [nzRight]=\"_c._right!\"\n [ngClass]=\"_c._className\"\n [attr.data-col]=\"_c.indexKey\"\n [attr.data-col-index]=\"index\"\n [nzShowSort]=\"_c._sort.enabled\"\n [nzSortOrder]=\"$any(_c)._sort.default\"\n (nzSortOrderChange)=\"sort(_c, index, $event)\"\n [nzCustomFilter]=\"!!_c.filter\"\n [class.st__has-filter]=\"_c.filter\"\n nz-resizable\n [nzDisabled]=\"last || $any(_c).resizable.disabled\"\n [nzMaxWidth]=\"$any(_c).resizable.maxWidth\"\n [nzMinWidth]=\"$any(_c).resizable.minWidth\"\n [nzBounds]=\"$any(_c).resizable.bounds\"\n [nzPreview]=\"$any(_c).resizable.preview\"\n (nzResizeEnd)=\"colResize($event, _c)\"\n >\n <nz-resize-handle *ngIf=\"$any(!last && !$any(_c).resizable.disabled)\" nzDirection=\"right\">\n <i></i>\n </nz-resize-handle>\n <ng-template\n #renderTitle\n [ngTemplateOutlet]=\"_c.__renderTitle!\"\n [ngTemplateOutletContext]=\"{ $implicit: h.column, index: index }\"\n ></ng-template>\n <ng-container *ngIf=\"!_c.__renderTitle; else renderTitle\">\n <ng-container [ngSwitch]=\"_c.type\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <ng-container *ngIf=\"_c.selections!.length === 0\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: false }\">\n </ng-template>\n </ng-container>\n <div *ngIf=\"_c.selections!.length > 0\" class=\"ant-table-selection\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: true }\">\n </ng-template>\n <div *ngIf=\"_c.selections!.length\" class=\"ant-table-selection-extra\">\n <div\n nz-dropdown\n nzPlacement=\"bottomLeft\"\n [nzDropdownMenu]=\"selectionMenu\"\n class=\"ant-table-selection-down st__checkall-selection\"\n >\n <i nz-icon nzType=\"down\"></i>\n </div>\n </div>\n <nz-dropdown-menu #selectionMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"ant-table-selection-menu\">\n <li\n nz-menu-item\n *ngFor=\"let rw of _c.selections\"\n (click)=\"_rowSelection(rw)\"\n [innerHTML]=\"rw.text\"\n ></li>\n </ul>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _c.title }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"_c.filter\">\n <st-filter\n nz-th-extra\n [col]=\"h.column\"\n [f]=\"_c.filter\"\n [locale]=\"locale\"\n (n)=\"handleFilterNotify($event)\"\n (handle)=\"_handleFilter(_c, $event)\"\n ></st-filter>\n </ng-container>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody class=\"st__body\">\n <ng-container *ngIf=\"!_loading\">\n <ng-template\n [ngTemplateOutlet]=\"bodyHeader!\"\n [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"\n ></ng-template>\n </ng-container>\n <ng-template #bodyTpl let-i let-index=\"index\">\n <tr\n [attr.data-index]=\"index\"\n (click)=\"_rowClick($event, i, index, false)\"\n (dblclick)=\"_rowClick($event, i, index, true)\"\n [ngClass]=\"i._rowClassName\"\n >\n <td\n *ngIf=\"expand\"\n [nzShowExpand]=\"expand && i.showExpand !== false\"\n [nzExpand]=\"i.expand\"\n (nzExpandChange)=\"_expandChange(i, $event)\"\n (click)=\"_stopPropagation($event)\"\n nzWidth=\"50px\"\n ></td>\n <td\n *ngFor=\"let c of _columns; let cIdx = index\"\n [nzLeft]=\"!!c._left\"\n [nzRight]=\"!!c._right\"\n [attr.data-col-index]=\"cIdx\"\n [ngClass]=\"c._className\"\n [attr.colspan]=\"c.colSpan\"\n >\n <span *ngIf=\"responsive\" class=\"ant-table-rep__title\">\n <ng-template [ngTemplateOutlet]=\"titleTpl\" [ngTemplateOutletContext]=\"{ $implicit: c.title }\"></ng-template>\n </span>\n <st-td [data]=\"_data\" [i]=\"i\" [index]=\"index\" [c]=\"c\" [cIdx]=\"cIdx\" (n)=\"_handleTd($event)\"></st-td>\n </td>\n </tr>\n <tr [nzExpand]=\"i.expand\">\n <ng-template\n [ngTemplateOutlet]=\"expand\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\"\n ></ng-template>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!virtualScroll\">\n <ng-container *ngFor=\"let i of _data; let index = index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"virtualScroll\">\n <ng-template nz-virtual-scroll let-i let-index=\"index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!_loading\">\n <ng-template [ngTemplateOutlet]=\"body!\" [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"></ng-template>\n </ng-container>\n </tbody>\n <ng-template #totalTpl let-range=\"range\" let-total>{{ renderTotal(total, range) }}</ng-template>\n</nz-table>\n<nz-dropdown-menu #contextmenuTpl=\"nzDropdownMenu\">\n <ul nz-menu class=\"st__contextmenu\">\n <ng-container *ngFor=\"let i of contextmenuList\">\n <li nz-menu-item *ngIf=\"i.children!.length === 0\" (click)=\"i.fn!(i)\" [innerHTML]=\"i.text\"></li>\n <li nz-submenu *ngIf=\"i.children!.length > 0\" [nzTitle]=\"i.text\">\n <ul>\n <li nz-menu-item *ngFor=\"let ci of i.children\" (click)=\"ci.fn!(ci)\" [innerHTML]=\"ci.text\"></li>\n </ul>\n </li>\n </ng-container>\n </ul>\n</nz-dropdown-menu>\n", dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i7.NgClass; }), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(function () { return i7.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(function () { return i7.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(function () { return i7.NgTemplateOutlet; }), selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i0.forwardRef(function () { return i7.NgSwitch; }), selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i0.forwardRef(function () { return i7.NgSwitchCase; }), selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i0.forwardRef(function () { return i7.NgSwitchDefault; }), selector: "[ngSwitchDefault]" }, { kind: "directive", type: i0.forwardRef(function () { return i8.NgControlStatus; }), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(function () { return i8.NgModel; }), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i0.forwardRef(function () { return i9$1.LetDirective; }), selector: "[let]", inputs: ["let"] }, { kind: "component", type: i0.forwardRef(function () { return i10$1.NzTableComponent; }), selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzPaginationPosition", "nzScroll", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange"], exportAs: ["nzTable"] }, { kind: "component", type: i0.forwardRef(function () { return i10$1.NzThAddOnComponent; }), selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i0.forwardRef(function () { return i10$1.NzTableCellDirective; }), selector: "th:not(.nz-disable-th):not([mat-cell]), td:not(.nz-disable-td):not([mat-cell])" }, { kind: "directive", type: i0.forwardRef(function () { return i10$1.NzThMeasureDirective; }), selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i0.forwardRef(function () { return i10$1.NzTdAddOnComponent; }), selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i0.forwardRef(function () { return i10$1.NzTheadComponent; }), selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i0.forwardRef(function () { return i10$1.NzTbodyComponent; }), selector: "tbody" }, { kind: "directive", type: i0.forwardRef(function () { return i10$1.NzTrDirective; }), selector: "tr:not([mat-row]):not([mat-header-row]):not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "directive", type: i0.forwardRef(function () { return i10$1.NzTableVirtualScrollDirective; }), selector: "[nz-virtual-scroll]", exportAs: ["nzVirtualScroll"] }, { kind: "directive", type: i0.forwardRef(function () { return i10$1.NzCellFixedDirective; }), selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: ["nzRight", "nzLeft", "colspan", "colSpan"] }, { kind: "directive", type: i0.forwardRef(function () { return i10$1.NzTrExpandDirective; }), selector: "tr[nzExpand]", inputs: ["nzExpand"] }, { kind: "component", type: i0.forwardRef(function () { return i10$1.NzTableFixedRowComponent; }), selector: "tr[nz-table-fixed-row], tr[nzExpand]" }, { kind: "directive", type: i0.forwardRef(function () { return i11.NzIconDirective; }), selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i0.forwardRef(function () { return i12.NzCheckboxComponent; }), selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "directive", type: i0.forwardRef(function () { return i13.NzMenuDirective; }), selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i0.forwardRef(function () { return i13.NzMenuItemDirective; }), selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: i0.forwardRef(function () { return i13.NzSubMenuComponent; }), selector: "[nz-submenu]", inputs: ["nzMenuClassName", "nzPaddingLeft", "nzTitle", "nzIcon", "nzOpen", "nzDisabled", "nzPlacement"], outputs: ["nzOpenChange"], exportAs: ["nzSubmenu"] }, { kind: "directive", type: i0.forwardRef(function () { return i6.NzDropDownDirective; }), selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "component", type: i0.forwardRef(function () { return i6.NzDropdownMenuComponent; }), selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "directive", type: i0.forwardRef(function () { return i14.NzTooltipDirective; }), selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: i0.forwardRef(function () { return i15.NzResizableDirective; }), selector: "[nz-resizable]", inputs: ["nzBounds", "nzMaxHeight", "nzMaxWidth", "nzMinHeight", "nzMinWidth", "nzGridColumnCount", "nzMaxColumn", "nzMinColumn", "nzLockAspectRatio", "nzPreview", "nzDisabled"], outputs: ["nzResize", "nzResizeEnd", "nzResizeStart"], exportAs: ["nzResizable"] }, { kind: "component", type: i0.forwardRef(function () { return i15.NzResizeHandleComponent; }), selector: "nz-resize-handle, [nz-resize-handle]", inputs: ["nzDirection"], outputs: ["nzMouseDown"], exportAs: ["nzResizeHandle"] }, { kind: "component", type: i0.forwardRef(function () { return STFilterComponent; }), selector: "st-filter", inputs: ["col", "locale", "f"], outputs: ["n", "handle"] }, { kind: "component", type: i0.forwardRef(function () { return STTdComponent; }), selector: "st-td", inputs: ["c", "cIdx", "data", "i", "index"], outputs: ["n"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2185
|
-
__decorate([
|
|
2186
|
-
InputNumber()
|
|
2187
|
-
], STComponent.prototype, "ps", void 0);
|
|
2188
|
-
__decorate([
|
|
2189
|
-
InputNumber()
|
|
2190
|
-
], STComponent.prototype, "pi", void 0);
|
|
2191
|
-
__decorate([
|
|
2192
|
-
InputNumber()
|
|
2193
|
-
], STComponent.prototype, "total", void 0);
|
|
2194
|
-
__decorate([
|
|
2195
|
-
InputNumber()
|
|
2196
|
-
], STComponent.prototype, "loadingDelay", void 0);
|
|
2197
|
-
__decorate([
|
|
2198
|
-
InputBoolean()
|
|
2199
|
-
], STComponent.prototype, "bordered", void 0);
|
|
2200
|
-
__decorate([
|
|
2201
|
-
InputBoolean()
|
|
2202
|
-
], STComponent.prototype, "showHeader", void 0);
|
|
2203
|
-
__decorate([
|
|
2204
|
-
InputBoolean()
|
|
2205
|
-
], STComponent.prototype, "expandRowByClick", void 0);
|
|
2206
|
-
__decorate([
|
|
2207
|
-
InputBoolean()
|
|
2208
|
-
], STComponent.prototype, "expandAccordion", void 0);
|
|
2209
|
-
__decorate([
|
|
2210
|
-
InputBoolean()
|
|
2211
|
-
], STComponent.prototype, "responsive", void 0);
|
|
2212
|
-
__decorate([
|
|
2213
|
-
InputBoolean()
|
|
2214
|
-
], STComponent.prototype, "responsiveHideHeaderFooter", void 0);
|
|
2215
|
-
__decorate([
|
|
2216
|
-
InputBoolean()
|
|
2217
|
-
], STComponent.prototype, "virtualScroll", void 0);
|
|
2218
|
-
__decorate([
|
|
2219
|
-
InputNumber()
|
|
2220
|
-
], STComponent.prototype, "virtualItemSize", void 0);
|
|
2221
|
-
__decorate([
|
|
2222
|
-
InputNumber()
|
|
2223
|
-
], STComponent.prototype, "virtualMaxBufferPx", void 0);
|
|
2224
|
-
__decorate([
|
|
2225
|
-
InputNumber()
|
|
2226
|
-
], STComponent.prototype, "virtualMinBufferPx", void 0);
|
|
2227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STComponent, decorators: [{
|
|
2228
|
-
type: Component,
|
|
2229
|
-
args: [{ selector: 'st', exportAs: 'st', providers: [STDataSource, STRowSource, STColumnSource, STExport, DatePipe, YNPipe, DecimalPipe], host: {
|
|
2230
|
-
'[class.st]': `true`,
|
|
2231
|
-
'[class.st__p-left]': `page.placement === 'left'`,
|
|
2232
|
-
'[class.st__p-center]': `page.placement === 'center'`,
|
|
2233
|
-
'[class.st__width-strict]': `widthMode.type === 'strict'`,
|
|
2234
|
-
'[class.st__row-class]': `rowClassName`,
|
|
2235
|
-
'[class.ant-table-rep]': `responsive`,
|
|
2236
|
-
'[class.ant-table-rep__hide-header-footer]': `responsiveHideHeaderFooter`
|
|
2237
|
-
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template #titleTpl let-i>\n <span [innerHTML]=\"i._text\"></span>\n <small *ngIf=\"i.optional\" class=\"st__head-optional\" [innerHTML]=\"i.optional\"></small>\n <i\n *ngIf=\"i.optionalHelp\"\n class=\"st__head-tip\"\n nz-tooltip\n [nzTooltipTitle]=\"i.optionalHelp\"\n nz-icon\n nzType=\"question-circle\"\n ></i>\n</ng-template>\n<ng-template #chkAllTpl let-custom>\n <label\n nz-checkbox\n class=\"st__checkall\"\n [nzDisabled]=\"_allCheckedDisabled\"\n [(ngModel)]=\"_allChecked\"\n [nzIndeterminate]=\"_indeterminate\"\n (ngModelChange)=\"checkAll()\"\n [class.ant-table-selection-select-all-custom]=\"custom\"\n ></label>\n</ng-template>\n<nz-table\n #table\n [nzData]=\"_data\"\n [(nzPageIndex)]=\"pi\"\n (nzPageIndexChange)=\"_change('pi')\"\n [(nzPageSize)]=\"ps\"\n (nzPageSizeChange)=\"_change('ps')\"\n [nzTotal]=\"total\"\n [nzShowPagination]=\"_isPagination\"\n [nzFrontPagination]=\"false\"\n [nzBordered]=\"bordered\"\n [nzSize]=\"size\"\n [nzLoading]=\"noColumns || _loading\"\n [nzLoadingDelay]=\"loadingDelay\"\n [nzLoadingIndicator]=\"loadingIndicator\"\n [nzTitle]=\"header!\"\n [nzFooter]=\"footer!\"\n [nzScroll]=\"scroll\"\n [nzVirtualItemSize]=\"virtualItemSize\"\n [nzVirtualMaxBufferPx]=\"virtualMaxBufferPx\"\n [nzVirtualMinBufferPx]=\"virtualMinBufferPx\"\n [nzVirtualForTrackBy]=\"virtualForTrackBy\"\n [nzNoResult]=\"noResult!\"\n [nzPageSizeOptions]=\"page.pageSizes!\"\n [nzShowQuickJumper]=\"page.showQuickJumper\"\n [nzShowSizeChanger]=\"page.showSize\"\n [nzPaginationPosition]=\"page.position!\"\n [nzPaginationType]=\"page.type!\"\n [nzItemRender]=\"page.itemRender!\"\n [nzSimple]=\"page.simple\"\n [nzShowTotal]=\"totalTpl\"\n [nzWidthConfig]=\"_widthConfig\"\n (contextmenu)=\"onContextmenu($event)\"\n [class.st__no-column]=\"noColumns\"\n>\n <thead *ngIf=\"showHeader\">\n <tr *ngFor=\"let row of _headers; let rowFirst = first\">\n <th *ngIf=\"rowFirst && expand\" nzWidth=\"50px\" [rowSpan]=\"_headers.length\"></th>\n <ng-container *ngFor=\"let h of row; let index = index; let last = last\">\n <th\n *let=\"h.column as _c\"\n [colSpan]=\"h.colSpan\"\n [rowSpan]=\"h.rowSpan\"\n [nzWidth]=\"$any(_c).width\"\n [nzLeft]=\"_c._left!\"\n [nzRight]=\"_c._right!\"\n [ngClass]=\"_c._className\"\n [attr.data-col]=\"_c.indexKey\"\n [attr.data-col-index]=\"index\"\n [nzShowSort]=\"_c._sort.enabled\"\n [nzSortOrder]=\"$any(_c)._sort.default\"\n (nzSortOrderChange)=\"sort(_c, index, $event)\"\n [nzCustomFilter]=\"!!_c.filter\"\n [class.st__has-filter]=\"_c.filter\"\n nz-resizable\n [nzDisabled]=\"last || $any(_c).resizable.disabled\"\n [nzMaxWidth]=\"$any(_c).resizable.maxWidth\"\n [nzMinWidth]=\"$any(_c).resizable.minWidth\"\n [nzBounds]=\"$any(_c).resizable.bounds\"\n [nzPreview]=\"$any(_c).resizable.preview\"\n (nzResizeEnd)=\"colResize($event, _c)\"\n >\n <nz-resize-handle *ngIf=\"$any(!last && !$any(_c).resizable.disabled)\" nzDirection=\"right\">\n <i></i>\n </nz-resize-handle>\n <ng-template\n #renderTitle\n [ngTemplateOutlet]=\"_c.__renderTitle!\"\n [ngTemplateOutletContext]=\"{ $implicit: h.column, index: index }\"\n ></ng-template>\n <ng-container *ngIf=\"!_c.__renderTitle; else renderTitle\">\n <ng-container [ngSwitch]=\"_c.type\">\n <ng-container *ngSwitchCase=\"'checkbox'\">\n <ng-container *ngIf=\"_c.selections!.length === 0\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: false }\">\n </ng-template>\n </ng-container>\n <div *ngIf=\"_c.selections!.length > 0\" class=\"ant-table-selection\">\n <ng-template [ngTemplateOutlet]=\"chkAllTpl\" [ngTemplateOutletContext]=\"{ $implicit: true }\">\n </ng-template>\n <div *ngIf=\"_c.selections!.length\" class=\"ant-table-selection-extra\">\n <div\n nz-dropdown\n nzPlacement=\"bottomLeft\"\n [nzDropdownMenu]=\"selectionMenu\"\n class=\"ant-table-selection-down st__checkall-selection\"\n >\n <i nz-icon nzType=\"down\"></i>\n </div>\n </div>\n <nz-dropdown-menu #selectionMenu=\"nzDropdownMenu\">\n <ul nz-menu class=\"ant-table-selection-menu\">\n <li\n nz-menu-item\n *ngFor=\"let rw of _c.selections\"\n (click)=\"_rowSelection(rw)\"\n [innerHTML]=\"rw.text\"\n ></li>\n </ul>\n </nz-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-template\n [ngTemplateOutlet]=\"titleTpl\"\n [ngTemplateOutletContext]=\"{ $implicit: _c.title }\"\n ></ng-template>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"_c.filter\">\n <st-filter\n nz-th-extra\n [col]=\"h.column\"\n [f]=\"_c.filter\"\n [locale]=\"locale\"\n (n)=\"handleFilterNotify($event)\"\n (handle)=\"_handleFilter(_c, $event)\"\n ></st-filter>\n </ng-container>\n </th>\n </ng-container>\n </tr>\n </thead>\n <tbody class=\"st__body\">\n <ng-container *ngIf=\"!_loading\">\n <ng-template\n [ngTemplateOutlet]=\"bodyHeader!\"\n [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"\n ></ng-template>\n </ng-container>\n <ng-template #bodyTpl let-i let-index=\"index\">\n <tr\n [attr.data-index]=\"index\"\n (click)=\"_rowClick($event, i, index, false)\"\n (dblclick)=\"_rowClick($event, i, index, true)\"\n [ngClass]=\"i._rowClassName\"\n >\n <td\n *ngIf=\"expand\"\n [nzShowExpand]=\"expand && i.showExpand !== false\"\n [nzExpand]=\"i.expand\"\n (nzExpandChange)=\"_expandChange(i, $event)\"\n (click)=\"_stopPropagation($event)\"\n nzWidth=\"50px\"\n ></td>\n <td\n *ngFor=\"let c of _columns; let cIdx = index\"\n [nzLeft]=\"!!c._left\"\n [nzRight]=\"!!c._right\"\n [attr.data-col-index]=\"cIdx\"\n [ngClass]=\"c._className\"\n [attr.colspan]=\"c.colSpan\"\n >\n <span *ngIf=\"responsive\" class=\"ant-table-rep__title\">\n <ng-template [ngTemplateOutlet]=\"titleTpl\" [ngTemplateOutletContext]=\"{ $implicit: c.title }\"></ng-template>\n </span>\n <st-td [data]=\"_data\" [i]=\"i\" [index]=\"index\" [c]=\"c\" [cIdx]=\"cIdx\" (n)=\"_handleTd($event)\"></st-td>\n </td>\n </tr>\n <tr [nzExpand]=\"i.expand\">\n <ng-template\n [ngTemplateOutlet]=\"expand\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\"\n ></ng-template>\n </tr>\n </ng-template>\n <ng-container *ngIf=\"!virtualScroll\">\n <ng-container *ngFor=\"let i of _data; let index = index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"virtualScroll\">\n <ng-template nz-virtual-scroll let-i let-index=\"index\">\n <ng-template [ngTemplateOutlet]=\"bodyTpl\" [ngTemplateOutletContext]=\"{ $implicit: i, index: index }\">\n </ng-template>\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!_loading\">\n <ng-template [ngTemplateOutlet]=\"body!\" [ngTemplateOutletContext]=\"{ $implicit: _statistical }\"></ng-template>\n </ng-container>\n </tbody>\n <ng-template #totalTpl let-range=\"range\" let-total>{{ renderTotal(total, range) }}</ng-template>\n</nz-table>\n<nz-dropdown-menu #contextmenuTpl=\"nzDropdownMenu\">\n <ul nz-menu class=\"st__contextmenu\">\n <ng-container *ngFor=\"let i of contextmenuList\">\n <li nz-menu-item *ngIf=\"i.children!.length === 0\" (click)=\"i.fn!(i)\" [innerHTML]=\"i.text\"></li>\n <li nz-submenu *ngIf=\"i.children!.length > 0\" [nzTitle]=\"i.text\">\n <ul>\n <li nz-menu-item *ngFor=\"let ci of i.children\" (click)=\"ci.fn!(ci)\" [innerHTML]=\"ci.text\"></li>\n </ul>\n </li>\n </ng-container>\n </ul>\n</nz-dropdown-menu>\n" }]
|
|
2238
|
-
}], ctorParameters: function () {
|
|
2239
|
-
return [{ type: undefined, decorators: [{
|
|
2240
|
-
type: Optional
|
|
2241
|
-
}, {
|
|
2242
|
-
type: Inject,
|
|
2243
|
-
args: [ALAIN_I18N_TOKEN]
|
|
2244
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: STExport }, { type: undefined, decorators: [{
|
|
2245
|
-
type: Inject,
|
|
2246
|
-
args: [DOCUMENT]
|
|
2247
|
-
}] }, { type: STColumnSource }, { type: STDataSource }, { type: i1$1.DelonLocaleService }, { type: i5.AlainConfigService }, { type: i6.NzContextMenuService }];
|
|
2248
|
-
}, propDecorators: { orgTable: [{
|
|
2249
|
-
type: ViewChild,
|
|
2250
|
-
args: ['table']
|
|
2251
|
-
}], contextmenuTpl: [{
|
|
2252
|
-
type: ViewChild,
|
|
2253
|
-
args: ['contextmenuTpl']
|
|
2254
|
-
}], req: [{
|
|
2255
|
-
type: Input
|
|
2256
|
-
}], res: [{
|
|
2257
|
-
type: Input
|
|
2258
|
-
}], page: [{
|
|
2259
|
-
type: Input
|
|
2260
|
-
}], data: [{
|
|
2261
|
-
type: Input
|
|
2262
|
-
}], columns: [{
|
|
2263
|
-
type: Input
|
|
2264
|
-
}], contextmenu: [{
|
|
2265
|
-
type: Input
|
|
2266
|
-
}], ps: [{
|
|
2267
|
-
type: Input
|
|
2268
|
-
}], pi: [{
|
|
2269
|
-
type: Input
|
|
2270
|
-
}], total: [{
|
|
2271
|
-
type: Input
|
|
2272
|
-
}], loading: [{
|
|
2273
|
-
type: Input
|
|
2274
|
-
}], loadingDelay: [{
|
|
2275
|
-
type: Input
|
|
2276
|
-
}], loadingIndicator: [{
|
|
2277
|
-
type: Input
|
|
2278
|
-
}], bordered: [{
|
|
2279
|
-
type: Input
|
|
2280
|
-
}], size: [{
|
|
2281
|
-
type: Input
|
|
2282
|
-
}], scroll: [{
|
|
2283
|
-
type: Input
|
|
2284
|
-
}], singleSort: [{
|
|
2285
|
-
type: Input
|
|
2286
|
-
}], multiSort: [{
|
|
2287
|
-
type: Input
|
|
2288
|
-
}], rowClassName: [{
|
|
2289
|
-
type: Input
|
|
2290
|
-
}], clickRowClassName: [{
|
|
2291
|
-
type: Input
|
|
2292
|
-
}], widthMode: [{
|
|
2293
|
-
type: Input
|
|
2294
|
-
}], widthConfig: [{
|
|
2295
|
-
type: Input
|
|
2296
|
-
}], resizable: [{
|
|
2297
|
-
type: Input
|
|
2298
|
-
}], header: [{
|
|
2299
|
-
type: Input
|
|
2300
|
-
}], showHeader: [{
|
|
2301
|
-
type: Input
|
|
2302
|
-
}], footer: [{
|
|
2303
|
-
type: Input
|
|
2304
|
-
}], bodyHeader: [{
|
|
2305
|
-
type: Input
|
|
2306
|
-
}], body: [{
|
|
2307
|
-
type: Input
|
|
2308
|
-
}], expandRowByClick: [{
|
|
2309
|
-
type: Input
|
|
2310
|
-
}], expandAccordion: [{
|
|
2311
|
-
type: Input
|
|
2312
|
-
}], expand: [{
|
|
2313
|
-
type: Input
|
|
2314
|
-
}], noResult: [{
|
|
2315
|
-
type: Input
|
|
2316
|
-
}], responsive: [{
|
|
2317
|
-
type: Input
|
|
2318
|
-
}], responsiveHideHeaderFooter: [{
|
|
2319
|
-
type: Input
|
|
2320
|
-
}], error: [{
|
|
2321
|
-
type: Output
|
|
2322
|
-
}], change: [{
|
|
2323
|
-
type: Output
|
|
2324
|
-
}], virtualScroll: [{
|
|
2325
|
-
type: Input
|
|
2326
|
-
}], virtualItemSize: [{
|
|
2327
|
-
type: Input
|
|
2328
|
-
}], virtualMaxBufferPx: [{
|
|
2329
|
-
type: Input
|
|
2330
|
-
}], virtualMinBufferPx: [{
|
|
2331
|
-
type: Input
|
|
2332
|
-
}], customRequest: [{
|
|
2333
|
-
type: Input
|
|
2334
|
-
}], virtualForTrackBy: [{
|
|
2335
|
-
type: Input
|
|
2336
|
-
}] } });
|
|
2337
|
-
class STTdComponent {
|
|
2338
|
-
get routerState() {
|
|
2339
|
-
const { pi, ps, total } = this.stComp;
|
|
2340
|
-
return { pi, ps, total };
|
|
2341
|
-
}
|
|
2342
|
-
constructor(stComp, router, modalHelper, drawerHelper) {
|
|
2343
|
-
this.stComp = stComp;
|
|
2344
|
-
this.router = router;
|
|
2345
|
-
this.modalHelper = modalHelper;
|
|
2346
|
-
this.drawerHelper = drawerHelper;
|
|
2347
|
-
this.n = new EventEmitter();
|
|
2348
|
-
}
|
|
2349
|
-
report(type) {
|
|
2350
|
-
this.n.emit({ type, item: this.i, col: this.c });
|
|
2351
|
-
}
|
|
2352
|
-
_checkbox(value) {
|
|
2353
|
-
this.i.checked = value;
|
|
2354
|
-
this.report('checkbox');
|
|
2355
|
-
}
|
|
2356
|
-
_radio() {
|
|
2357
|
-
this.data.filter(w => !w.disabled).forEach(i => (i.checked = false));
|
|
2358
|
-
this.i.checked = true;
|
|
2359
|
-
this.report('radio');
|
|
2360
|
-
}
|
|
2361
|
-
_link(e) {
|
|
2362
|
-
this._stopPropagation(e);
|
|
2363
|
-
const res = this.c.click(this.i, this.stComp);
|
|
2364
|
-
if (typeof res === 'string') {
|
|
2365
|
-
this.router.navigateByUrl(res, { state: this.routerState });
|
|
2366
|
-
}
|
|
2367
|
-
return false;
|
|
2368
|
-
}
|
|
2369
|
-
_stopPropagation(ev) {
|
|
2370
|
-
ev.preventDefault();
|
|
2371
|
-
ev.stopPropagation();
|
|
2372
|
-
}
|
|
2373
|
-
_btn(btn, ev) {
|
|
2374
|
-
ev === null || ev === void 0 ? void 0 : ev.stopPropagation();
|
|
2375
|
-
const cog = this.stComp.cog;
|
|
2376
|
-
let record = this.i;
|
|
2377
|
-
if (btn.type === 'modal' || btn.type === 'static') {
|
|
2378
|
-
if (cog.modal.pureRecoard === true) {
|
|
2379
|
-
record = this.stComp.pureItem(record);
|
|
2380
|
-
}
|
|
2381
|
-
const modal = btn.modal;
|
|
2382
|
-
const obj = { [modal.paramsName]: record };
|
|
2383
|
-
this.modalHelper[btn.type === 'modal' ? 'create' : 'createStatic'](modal.component, Object.assign(Object.assign({}, obj), (modal.params && modal.params(record))), deepMergeKey({}, true, cog.modal, modal))
|
|
2384
|
-
.pipe(filter(w => typeof w !== 'undefined'))
|
|
2385
|
-
.subscribe((res) => this.btnCallback(record, btn, res));
|
|
2386
|
-
return;
|
|
2387
|
-
}
|
|
2388
|
-
else if (btn.type === 'drawer') {
|
|
2389
|
-
if (cog.drawer.pureRecoard === true) {
|
|
2390
|
-
record = this.stComp.pureItem(record);
|
|
2391
|
-
}
|
|
2392
|
-
const drawer = btn.drawer;
|
|
2393
|
-
const obj = { [drawer.paramsName]: record };
|
|
2394
|
-
this.drawerHelper
|
|
2395
|
-
.create(drawer.title, drawer.component, Object.assign(Object.assign({}, obj), (drawer.params && drawer.params(record))), deepMergeKey({}, true, cog.drawer, drawer))
|
|
2396
|
-
.pipe(filter(w => typeof w !== 'undefined'))
|
|
2397
|
-
.subscribe(res => this.btnCallback(record, btn, res));
|
|
2398
|
-
return;
|
|
2399
|
-
}
|
|
2400
|
-
else if (btn.type === 'link') {
|
|
2401
|
-
const clickRes = this.btnCallback(record, btn);
|
|
2402
|
-
if (typeof clickRes === 'string') {
|
|
2403
|
-
this.router.navigateByUrl(clickRes, { state: this.routerState });
|
|
2404
|
-
}
|
|
2405
|
-
return;
|
|
2406
|
-
}
|
|
2407
|
-
this.btnCallback(record, btn);
|
|
2408
|
-
}
|
|
2409
|
-
btnCallback(record, btn, modal) {
|
|
2410
|
-
if (!btn.click)
|
|
2411
|
-
return;
|
|
2412
|
-
if (typeof btn.click === 'string') {
|
|
2413
|
-
switch (btn.click) {
|
|
2414
|
-
case 'load':
|
|
2415
|
-
this.stComp.load();
|
|
2416
|
-
break;
|
|
2417
|
-
case 'reload':
|
|
2418
|
-
this.stComp.reload();
|
|
2419
|
-
break;
|
|
2420
|
-
}
|
|
2421
|
-
}
|
|
2422
|
-
else {
|
|
2423
|
-
return btn.click(record, modal, this.stComp);
|
|
2424
|
-
}
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
STTdComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STTdComponent, deps: [{ token: STComponent, host: true }, { token: i17.Router }, { token: i1$1.ModalHelper }, { token: i1$1.DrawerHelper }], target: i0.ɵɵFactoryTarget.Component });
|
|
2428
|
-
STTdComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: STTdComponent, selector: "st-td", inputs: { c: "c", cIdx: "cIdx", data: "data", i: "i", index: "index" }, outputs: { n: "n" }, ngImport: i0, template: "<ng-template #btnTpl let-i let-child=\"child\">\n <ng-container *ngIf=\"!i.tooltip\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </ng-container>\n <span *ngIf=\"i.tooltip\" nz-tooltip [nzTooltipTitle]=\"i.tooltip\" [class.d-block]=\"child\" [class.width-100]=\"child\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </span>\n</ng-template>\n<ng-template #btnItemTpl let-i>\n <a\n *ngIf=\"i.pop\"\n nz-popconfirm\n [nzPopconfirmTitle]=\"i.pop.title\"\n [nzIcon]=\"i.pop.icon\"\n [nzCondition]=\"i.pop.condition(i)\"\n [nzCancelText]=\"i.pop.cancelText\"\n [nzOkText]=\"i.pop.okText\"\n [nzOkType]=\"i.pop.okType\"\n (nzOnConfirm)=\"_btn(i)\"\n class=\"st__btn-text\"\n [ngClass]=\"i.className\"\n (click)=\"_stopPropagation($event)\"\n >\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </a>\n <a *ngIf=\"!i.pop\" (click)=\"_btn(i, $event)\" class=\"st__btn-text\" [ngClass]=\"i.className\">\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </a>\n</ng-template>\n<ng-template #btnTextTpl let-i>\n <ng-container *ngIf=\"i.icon\">\n <i\n *ngIf=\"!i.icon.iconfont\"\n nz-icon\n [nzType]=\"i.icon.type\"\n [nzTheme]=\"i.icon.theme\"\n [nzSpin]=\"i.icon.spin\"\n [nzTwotoneColor]=\"i.icon.twoToneColor\"\n ></i>\n <i *ngIf=\"i.icon.iconfont\" nz-icon [nzIconfont]=\"i.icon.iconfont\"></i>\n </ng-container>\n <span [innerHTML]=\"i._text\" [ngClass]=\"{ 'pl-xs': i.icon }\"></span>\n</ng-template>\n<ng-template\n #render\n [ngTemplateOutlet]=\"c.__render!\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index, column: c }\"\n></ng-template>\n<ng-container *ngIf=\"!c.__render; else render\">\n <ng-container [ngSwitch]=\"c.type\">\n <label\n *ngSwitchCase=\"'checkbox'\"\n nz-checkbox\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_checkbox($event)\"\n ></label>\n <label\n *ngSwitchCase=\"'radio'\"\n nz-radio\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_radio()\"\n ></label>\n <a\n *ngSwitchCase=\"'link'\"\n (click)=\"_link($event)\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"i._values[cIdx].text\"\n ></a>\n <ng-container *ngIf=\"i._values[cIdx].text\">\n <nz-tag *ngSwitchCase=\"'tag'\" [nzColor]=\"i._values[cIdx].color\">\n <span [innerHTML]=\"i._values[cIdx]._text\"></span>\n </nz-tag>\n <nz-badge *ngSwitchCase=\"'badge'\" [nzStatus]=\"i._values[cIdx].color\" [nzText]=\"i._values[cIdx].text\"></nz-badge>\n </ng-container>\n <ng-template *ngSwitchCase=\"'widget'\" st-widget-host [record]=\"i\" [column]=\"c\"></ng-template\n ><ng-container *ngSwitchDefault>\n <span\n *ngIf=\"c.safeType !== 'text'\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n <span\n *ngIf=\"c.safeType === 'text'\"\n [innerText]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let btn of i._values[cIdx].buttons; let last = last\">\n <a *ngIf=\"btn.children!.length > 0\" nz-dropdown [nzDropdownMenu]=\"btnMenu\" nzOverlayClassName=\"st__btn-sub\">\n <span [innerHTML]=\"btn._text\"></span>\n <i nz-icon nzType=\"down\"></i>\n </a>\n <nz-dropdown-menu #btnMenu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let subBtn of btn.children!\">\n <li *ngIf=\"subBtn.type !== 'divider'\" nz-menu-item [class.st__btn-disabled]=\"subBtn._disabled\">\n <ng-template [ngTemplateOutlet]=\"btnTpl\" [ngTemplateOutletContext]=\"{ $implicit: subBtn, child: true }\">\n </ng-template>\n </li>\n <li *ngIf=\"subBtn.type === 'divider'\" nz-menu-divider></li>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n <span *ngIf=\"btn.children!.length === 0\" [class.st__btn-disabled]=\"btn._disabled\">\n <ng-template [ngTemplateOutlet]=\"btnTpl\" [ngTemplateOutletContext]=\"{ $implicit: btn, child: false }\">\n </ng-template>\n </span>\n <nz-divider *ngIf=\"!last\" nzType=\"vertical\"></nz-divider>\n </ng-container>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i7.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i7.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i7.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i18.NzPopconfirmDirective, selector: "[nz-popconfirm]", inputs: ["nzPopconfirmArrowPointAtCenter", "nzPopconfirmTitle", "nz-popconfirm", "nzPopconfirmTrigger", "nzPopconfirmPlacement", "nzPopconfirmOrigin", "nzPopconfirmMouseEnterDelay", "nzPopconfirmMouseLeaveDelay", "nzPopconfirmOverlayClassName", "nzPopconfirmOverlayStyle", "nzPopconfirmVisible", "nzOkText", "nzOkType", "nzOkDanger", "nzCancelText", "nzBeforeConfirm", "nzIcon", "nzCondition", "nzPopconfirmShowArrow", "nzPopconfirmBackdrop", "nzAutofocus"], outputs: ["nzPopconfirmVisibleChange", "nzOnCancel", "nzOnConfirm"], exportAs: ["nzPopconfirm"] }, { kind: "directive", type: i11.NzIconDirective, selector: "[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: i19.NzBadgeComponent, selector: "nz-badge", inputs: ["nzShowZero", "nzShowDot", "nzStandalone", "nzDot", "nzOverflowCount", "nzColor", "nzStyle", "nzText", "nzTitle", "nzStatus", "nzCount", "nzOffset", "nzSize"], exportAs: ["nzBadge"] }, { kind: "component", type: i12.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "component", type: i20.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "directive", type: i13.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "directive", type: i13.NzMenuItemDirective, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "directive", type: i13.NzMenuDividerDirective, selector: "[nz-menu-divider]", exportAs: ["nzMenuDivider"] }, { kind: "directive", type: i6.NzDropDownDirective, selector: "[nz-dropdown]", inputs: ["nzDropdownMenu", "nzTrigger", "nzMatchWidthElement", "nzBackdrop", "nzClickHide", "nzDisabled", "nzVisible", "nzOverlayClassName", "nzOverlayStyle", "nzPlacement"], outputs: ["nzVisibleChange"], exportAs: ["nzDropdown"] }, { kind: "directive", type: i6.NzDropDownADirective, selector: "a[nz-dropdown]" }, { kind: "component", type: i6.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "component", type: i7$1.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus"], exportAs: ["nzRadio"] }, { kind: "component", type: i22.NzTagComponent, selector: "nz-tag", inputs: ["nzMode", "nzColor", "nzChecked"], outputs: ["nzOnClose", "nzCheckedChange"], exportAs: ["nzTag"] }, { kind: "directive", type: i14.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { kind: "directive", type: STWidgetHostDirective, selector: "[st-widget-host]", inputs: ["record", "column"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2429
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STTdComponent, decorators: [{
|
|
2430
|
-
type: Component,
|
|
2431
|
-
args: [{ selector: 'st-td', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ng-template #btnTpl let-i let-child=\"child\">\n <ng-container *ngIf=\"!i.tooltip\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </ng-container>\n <span *ngIf=\"i.tooltip\" nz-tooltip [nzTooltipTitle]=\"i.tooltip\" [class.d-block]=\"child\" [class.width-100]=\"child\">\n <ng-template [ngTemplateOutlet]=\"btnItemTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </span>\n</ng-template>\n<ng-template #btnItemTpl let-i>\n <a\n *ngIf=\"i.pop\"\n nz-popconfirm\n [nzPopconfirmTitle]=\"i.pop.title\"\n [nzIcon]=\"i.pop.icon\"\n [nzCondition]=\"i.pop.condition(i)\"\n [nzCancelText]=\"i.pop.cancelText\"\n [nzOkText]=\"i.pop.okText\"\n [nzOkType]=\"i.pop.okType\"\n (nzOnConfirm)=\"_btn(i)\"\n class=\"st__btn-text\"\n [ngClass]=\"i.className\"\n (click)=\"_stopPropagation($event)\"\n >\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </a>\n <a *ngIf=\"!i.pop\" (click)=\"_btn(i, $event)\" class=\"st__btn-text\" [ngClass]=\"i.className\">\n <ng-template [ngTemplateOutlet]=\"btnTextTpl\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </a>\n</ng-template>\n<ng-template #btnTextTpl let-i>\n <ng-container *ngIf=\"i.icon\">\n <i\n *ngIf=\"!i.icon.iconfont\"\n nz-icon\n [nzType]=\"i.icon.type\"\n [nzTheme]=\"i.icon.theme\"\n [nzSpin]=\"i.icon.spin\"\n [nzTwotoneColor]=\"i.icon.twoToneColor\"\n ></i>\n <i *ngIf=\"i.icon.iconfont\" nz-icon [nzIconfont]=\"i.icon.iconfont\"></i>\n </ng-container>\n <span [innerHTML]=\"i._text\" [ngClass]=\"{ 'pl-xs': i.icon }\"></span>\n</ng-template>\n<ng-template\n #render\n [ngTemplateOutlet]=\"c.__render!\"\n [ngTemplateOutletContext]=\"{ $implicit: i, index: index, column: c }\"\n></ng-template>\n<ng-container *ngIf=\"!c.__render; else render\">\n <ng-container [ngSwitch]=\"c.type\">\n <label\n *ngSwitchCase=\"'checkbox'\"\n nz-checkbox\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_checkbox($event)\"\n ></label>\n <label\n *ngSwitchCase=\"'radio'\"\n nz-radio\n [nzDisabled]=\"i.disabled\"\n [ngModel]=\"i.checked\"\n (ngModelChange)=\"_radio()\"\n ></label>\n <a\n *ngSwitchCase=\"'link'\"\n (click)=\"_link($event)\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"i._values[cIdx].text\"\n ></a>\n <ng-container *ngIf=\"i._values[cIdx].text\">\n <nz-tag *ngSwitchCase=\"'tag'\" [nzColor]=\"i._values[cIdx].color\">\n <span [innerHTML]=\"i._values[cIdx]._text\"></span>\n </nz-tag>\n <nz-badge *ngSwitchCase=\"'badge'\" [nzStatus]=\"i._values[cIdx].color\" [nzText]=\"i._values[cIdx].text\"></nz-badge>\n </ng-container>\n <ng-template *ngSwitchCase=\"'widget'\" st-widget-host [record]=\"i\" [column]=\"c\"></ng-template\n ><ng-container *ngSwitchDefault>\n <span\n *ngIf=\"c.safeType !== 'text'\"\n [innerHTML]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n <span\n *ngIf=\"c.safeType === 'text'\"\n [innerText]=\"i._values[cIdx]._text\"\n [attr.title]=\"c._isTruncate ? i._values[cIdx].text : null\"\n ></span>\n </ng-container>\n </ng-container>\n <ng-container *ngFor=\"let btn of i._values[cIdx].buttons; let last = last\">\n <a *ngIf=\"btn.children!.length > 0\" nz-dropdown [nzDropdownMenu]=\"btnMenu\" nzOverlayClassName=\"st__btn-sub\">\n <span [innerHTML]=\"btn._text\"></span>\n <i nz-icon nzType=\"down\"></i>\n </a>\n <nz-dropdown-menu #btnMenu=\"nzDropdownMenu\">\n <ul nz-menu>\n <ng-container *ngFor=\"let subBtn of btn.children!\">\n <li *ngIf=\"subBtn.type !== 'divider'\" nz-menu-item [class.st__btn-disabled]=\"subBtn._disabled\">\n <ng-template [ngTemplateOutlet]=\"btnTpl\" [ngTemplateOutletContext]=\"{ $implicit: subBtn, child: true }\">\n </ng-template>\n </li>\n <li *ngIf=\"subBtn.type === 'divider'\" nz-menu-divider></li>\n </ng-container>\n </ul>\n </nz-dropdown-menu>\n <span *ngIf=\"btn.children!.length === 0\" [class.st__btn-disabled]=\"btn._disabled\">\n <ng-template [ngTemplateOutlet]=\"btnTpl\" [ngTemplateOutletContext]=\"{ $implicit: btn, child: false }\">\n </ng-template>\n </span>\n <nz-divider *ngIf=\"!last\" nzType=\"vertical\"></nz-divider>\n </ng-container>\n</ng-container>\n" }]
|
|
2432
|
-
}], ctorParameters: function () {
|
|
2433
|
-
return [{ type: STComponent, decorators: [{
|
|
2434
|
-
type: Host
|
|
2435
|
-
}] }, { type: i17.Router }, { type: i1$1.ModalHelper }, { type: i1$1.DrawerHelper }];
|
|
2436
|
-
}, propDecorators: { c: [{
|
|
2437
|
-
type: Input
|
|
2438
|
-
}], cIdx: [{
|
|
2439
|
-
type: Input
|
|
2440
|
-
}], data: [{
|
|
2441
|
-
type: Input
|
|
2442
|
-
}], i: [{
|
|
2443
|
-
type: Input
|
|
2444
|
-
}], index: [{
|
|
2445
|
-
type: Input
|
|
2446
|
-
}], n: [{
|
|
2447
|
-
type: Output
|
|
2448
|
-
}] } });
|
|
2449
|
-
|
|
2450
|
-
const COMPONENTS = [STComponent, STRowDirective, STWidgetHostDirective];
|
|
2451
|
-
class STModule {
|
|
2452
|
-
}
|
|
2453
|
-
STModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2454
|
-
STModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: STModule, declarations: [STComponent, STRowDirective, STWidgetHostDirective, STFilterComponent, STTdComponent], imports: [CommonModule,
|
|
2455
|
-
FormsModule,
|
|
2456
|
-
DelonACLModule,
|
|
2457
|
-
LetModule,
|
|
2458
|
-
NzPopconfirmModule,
|
|
2459
|
-
NzTableModule,
|
|
2460
|
-
NzIconModule,
|
|
2461
|
-
NzBadgeModule,
|
|
2462
|
-
NzCheckboxModule,
|
|
2463
|
-
NzDividerModule,
|
|
2464
|
-
NzDropDownModule,
|
|
2465
|
-
NzMenuModule,
|
|
2466
|
-
NzRadioModule,
|
|
2467
|
-
NzTagModule,
|
|
2468
|
-
NzInputModule,
|
|
2469
|
-
NzToolTipModule,
|
|
2470
|
-
NzResizableModule,
|
|
2471
|
-
NzInputNumberModule,
|
|
2472
|
-
NzDatePickerModule], exports: [STComponent, STRowDirective, STWidgetHostDirective] });
|
|
2473
|
-
STModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STModule, imports: [CommonModule,
|
|
2474
|
-
FormsModule,
|
|
2475
|
-
DelonACLModule,
|
|
2476
|
-
LetModule,
|
|
2477
|
-
NzPopconfirmModule,
|
|
2478
|
-
NzTableModule,
|
|
2479
|
-
NzIconModule,
|
|
2480
|
-
NzBadgeModule,
|
|
2481
|
-
NzCheckboxModule,
|
|
2482
|
-
NzDividerModule,
|
|
2483
|
-
NzDropDownModule,
|
|
2484
|
-
NzMenuModule,
|
|
2485
|
-
NzRadioModule,
|
|
2486
|
-
NzTagModule,
|
|
2487
|
-
NzInputModule,
|
|
2488
|
-
NzToolTipModule,
|
|
2489
|
-
NzResizableModule,
|
|
2490
|
-
NzInputNumberModule,
|
|
2491
|
-
NzDatePickerModule] });
|
|
2492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: STModule, decorators: [{
|
|
2493
|
-
type: NgModule,
|
|
2494
|
-
args: [{
|
|
2495
|
-
imports: [
|
|
2496
|
-
CommonModule,
|
|
2497
|
-
FormsModule,
|
|
2498
|
-
DelonACLModule,
|
|
2499
|
-
LetModule,
|
|
2500
|
-
NzPopconfirmModule,
|
|
2501
|
-
NzTableModule,
|
|
2502
|
-
NzIconModule,
|
|
2503
|
-
NzBadgeModule,
|
|
2504
|
-
NzCheckboxModule,
|
|
2505
|
-
NzDividerModule,
|
|
2506
|
-
NzDropDownModule,
|
|
2507
|
-
NzMenuModule,
|
|
2508
|
-
NzRadioModule,
|
|
2509
|
-
NzTagModule,
|
|
2510
|
-
NzInputModule,
|
|
2511
|
-
NzToolTipModule,
|
|
2512
|
-
NzResizableModule,
|
|
2513
|
-
NzInputNumberModule,
|
|
2514
|
-
NzDatePickerModule
|
|
2515
|
-
],
|
|
2516
|
-
declarations: [...COMPONENTS, STFilterComponent, STTdComponent],
|
|
2517
|
-
exports: COMPONENTS
|
|
2518
|
-
}]
|
|
2519
|
-
}] });
|
|
2520
|
-
|
|
2521
|
-
/**
|
|
2522
|
-
* Generated bundle index. Do not edit.
|
|
2523
|
-
*/
|
|
2524
|
-
|
|
2525
|
-
export { STColumnSource, STComponent, STDataSource, STExport, STModule, STRowDirective, STWidgetHostDirective, STWidgetRegistry, ST_DEFAULT_CONFIG };
|
|
2526
|
-
//# sourceMappingURL=st.mjs.map
|