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