@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zip.mjs","sources":["../../../../packages/abc/zip/zip.service.ts","../../../../packages/abc/zip/zip.module.ts","../../../../packages/abc/zip/zip.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, NgZone } from '@angular/core';\n\nimport { saveAs } from 'file-saver';\n\nimport { AlainConfigService, AlainZipConfig } from '@delon/util/config';\nimport { ZoneOutside } from '@delon/util/decorator';\nimport { LazyResult, LazyService } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\nimport { ZipSaveOptions } from './zip.types';\n\ndeclare var JSZip: NzSafeAny;\n\n@Injectable({ providedIn: 'root' })\nexport class ZipService {\n private cog: AlainZipConfig;\n\n constructor(\n private http: HttpClient,\n private lazy: LazyService,\n configSrv: AlainConfigService,\n private ngZone: NgZone\n ) {\n this.cog = configSrv.merge('zip', {\n url: 'https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js',\n utils: []\n })!;\n }\n\n private init(): Promise<LazyResult[]> {\n return this.lazy.load([this.cog.url!].concat(this.cog.utils!));\n }\n\n private check(zip: NzSafeAny): void {\n if (!zip) throw new Error('get instance via `ZipService.create()`');\n }\n\n /** 解压 */\n @ZoneOutside()\n read(fileOrUrl: File | string, options?: NzSafeAny): Promise<NzSafeAny> {\n return new Promise<NzSafeAny>((resolve, reject) => {\n const resolveCallback = (data: NzSafeAny): void => {\n this.ngZone.run(() => resolve(data));\n };\n this.init().then(() => {\n // from url\n if (typeof fileOrUrl === 'string') {\n this.http.request('GET', fileOrUrl, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => {\n JSZip.loadAsync(res, options).then((ret: NzSafeAny) => resolveCallback(ret));\n },\n error: (err: NzSafeAny) => {\n reject(err);\n }\n });\n return;\n }\n // from file\n const reader: FileReader = new FileReader();\n reader.onload = (e: NzSafeAny) => {\n JSZip.loadAsync(e.target.result, options).then((ret: NzSafeAny) => resolveCallback(ret));\n };\n reader.readAsBinaryString(fileOrUrl as File);\n });\n });\n }\n\n /** 创建 Zip 实例,用于创建压缩文件 */\n create(): Promise<NzSafeAny> {\n return new Promise<NzSafeAny>(resolve => {\n this.init().then(() => {\n const zipFile: NzSafeAny = new JSZip();\n resolve(zipFile);\n });\n });\n }\n\n /**\n * 下载URL资源并写入 zip\n *\n * @param zip Zip 实例\n * @param path Zip 路径,例如: `text.txt`、`txt/hi.txt`\n * @param url URL 地址\n */\n pushUrl(zip: NzSafeAny, path: string, url: string): Promise<void> {\n this.check(zip);\n return new Promise<void>((resolve, reject) => {\n this.http.request('GET', url, { responseType: 'arraybuffer' }).subscribe({\n next: (res: ArrayBuffer) => {\n zip.file(path, res);\n resolve();\n },\n error: (error: NzSafeAny) => {\n reject({ url, error });\n }\n });\n });\n }\n\n /**\n * 保存Zip并执行打开保存对话框\n *\n * @param zip zip 对象,务必通过 `create()` 构建\n * @param options 额外参数,\n */\n save(zip: NzSafeAny, options?: ZipSaveOptions): Promise<void> {\n this.check(zip);\n const opt = { ...options } as ZipSaveOptions;\n return new Promise<void>((resolve, reject) => {\n zip.generateAsync({ type: 'blob', ...opt.options }, opt.update).then(\n (data: Blob) => {\n if (opt.callback) opt.callback(data);\n saveAs(data, opt.filename || 'download.zip');\n resolve();\n },\n (err: NzSafeAny) => {\n reject(err);\n }\n );\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\n@NgModule({\n imports: [CommonModule]\n})\nexport class ZipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAea,UAAU;IAGrB,YACU,IAAgB,EAChB,IAAiB,EACzB,SAA6B,EACrB,MAAc;QAHd,SAAI,GAAJ,IAAI,CAAY;QAChB,SAAI,GAAJ,IAAI,CAAa;QAEjB,WAAM,GAAN,MAAM,CAAQ;QAEtB,IAAI,CAAC,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE;YAChC,GAAG,EAAE,wDAAwD;YAC7D,KAAK,EAAE,EAAE;SACV,CAAE,CAAC;KACL;IAEO,IAAI;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAM,CAAC,CAAC,CAAC;KAChE;IAEO,KAAK,CAAC,GAAc;QAC1B,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;KACrE;;IAID,IAAI,CAAC,SAAwB,EAAE,OAAmB;QAChD,OAAO,IAAI,OAAO,CAAY,CAAC,OAAO,EAAE,MAAM;YAC5C,MAAM,eAAe,GAAG,CAAC,IAAe;gBACtC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;aACtC,CAAC;YACF,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;;gBAEf,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE;oBACjC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,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../packages/abc/public_api.ts","../../../../packages/abc/abc.ts"],"sourcesContent":["// https://github.com/ng-packagr/ng-packagr/issues/1655\nexport default void 0;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"AAAA;AACA,iBAAe,KAAK,CAAC;;ACDrB;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { Directive, Input, NgModule } from '@angular/core';
|
|
4
|
+
import { InputBoolean, InputNumber } from '@delon/util/decorator';
|
|
5
|
+
|
|
6
|
+
class AutoFocusDirective {
|
|
7
|
+
constructor(el, cdr) {
|
|
8
|
+
this.el = el;
|
|
9
|
+
this.cdr = cdr;
|
|
10
|
+
this.enabled = true;
|
|
11
|
+
this.delay = 300;
|
|
12
|
+
}
|
|
13
|
+
ngAfterViewInit() {
|
|
14
|
+
const el = this.el.nativeElement;
|
|
15
|
+
if (!(el instanceof HTMLElement) || !this.enabled) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this._focusoutTimeout = setTimeout(() => {
|
|
19
|
+
el.focus({ preventScroll: false });
|
|
20
|
+
this.cdr.markForCheck();
|
|
21
|
+
}, this.delay);
|
|
22
|
+
}
|
|
23
|
+
ngOnDestroy() {
|
|
24
|
+
if (this._focusoutTimeout) {
|
|
25
|
+
clearTimeout(this._focusoutTimeout);
|
|
26
|
+
this._focusoutTimeout = null;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
AutoFocusDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusDirective, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
31
|
+
AutoFocusDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: AutoFocusDirective, selector: "[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]", inputs: { enabled: "enabled", delay: "delay" }, exportAs: ["autoFocus"], ngImport: i0 });
|
|
32
|
+
__decorate([
|
|
33
|
+
InputBoolean()
|
|
34
|
+
], AutoFocusDirective.prototype, "enabled", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
InputNumber()
|
|
37
|
+
], AutoFocusDirective.prototype, "delay", void 0);
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusDirective, decorators: [{
|
|
39
|
+
type: Directive,
|
|
40
|
+
args: [{
|
|
41
|
+
selector: '[auto-focus], input[autofocus="autofocus"], textarea[autofocus="autofocus"]',
|
|
42
|
+
exportAs: 'autoFocus'
|
|
43
|
+
}]
|
|
44
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { enabled: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}], delay: [{
|
|
47
|
+
type: Input
|
|
48
|
+
}] } });
|
|
49
|
+
|
|
50
|
+
const COMPONENTS = [AutoFocusDirective];
|
|
51
|
+
class AutoFocusModule {
|
|
52
|
+
}
|
|
53
|
+
AutoFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
54
|
+
AutoFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule, declarations: [AutoFocusDirective], exports: [AutoFocusDirective] });
|
|
55
|
+
AutoFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule });
|
|
56
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AutoFocusModule, decorators: [{
|
|
57
|
+
type: NgModule,
|
|
58
|
+
args: [{
|
|
59
|
+
declarations: COMPONENTS,
|
|
60
|
+
exports: COMPONENTS
|
|
61
|
+
}]
|
|
62
|
+
}] });
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Generated bundle index. Do not edit.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
export { AutoFocusDirective, AutoFocusModule };
|
|
69
|
+
//# sourceMappingURL=autoFocus.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoFocus.mjs","sources":["../../../../packages/abc/auto-focus/auto-focus.directive.ts","../../../../packages/abc/auto-focus/auto-focus.module.ts","../../../../packages/abc/auto-focus/autoFocus.ts"],"sourcesContent":["import { AfterViewInit, ChangeDetectorRef, Directive, ElementRef, Input, OnDestroy } from '@angular/core';\n\nimport { BooleanInput, InputBoolean, InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n@Directive({\n selector: '[auto-focus], input[autofocus=\"autofocus\"], textarea[autofocus=\"autofocus\"]',\n exportAs: 'autoFocus'\n})\nexport class AutoFocusDirective implements AfterViewInit, OnDestroy {\n static ngAcceptInputType_enabled: BooleanInput;\n static ngAcceptInputType_delay: NumberInput;\n\n private _focusoutTimeout: NzSafeAny;\n @Input() @InputBoolean() enabled = true;\n @Input() @InputNumber() delay = 300;\n\n constructor(private el: ElementRef<HTMLElement>, private cdr: ChangeDetectorRef) {}\n\n ngAfterViewInit(): void {\n const el = this.el.nativeElement;\n if (!(el instanceof HTMLElement) || !this.enabled) {\n return;\n }\n this._focusoutTimeout = setTimeout(() => {\n el.focus({ preventScroll: false });\n this.cdr.markForCheck();\n }, this.delay);\n }\n\n ngOnDestroy(): void {\n if (this._focusoutTimeout) {\n clearTimeout(this._focusoutTimeout);\n this._focusoutTimeout = null;\n }\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { AutoFocusDirective } from './auto-focus.directive';\n\nconst COMPONENTS = [AutoFocusDirective];\n\n@NgModule({\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class AutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MASa,kBAAkB;IAQ7B,YAAoB,EAA2B,EAAU,GAAsB;QAA3D,OAAE,GAAF,EAAE,CAAyB;QAAU,QAAG,GAAH,GAAG,CAAmB;QAHtD,YAAO,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,GAAG,CAAC;KAE+C;IAEnF,eAAe;QACb,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;QACjC,IAAI,EAAE,EAAE,YAAY,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACjD,OAAO;SACR;QACD,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC;YACjC,EAAE,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,CAAC;YACnC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;SACzB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;KAChB;IAED,WAAW;QACT,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACzB,YAAY,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;SAC9B;KACF;;+GA1BU,kBAAkB;mGAAlB,kBAAkB;AAKJ;IAAf,YAAY,EAAE;mDAAgB;AAChB;IAAd,WAAW,EAAE;iDAAa;2FANzB,kBAAkB;kBAJ9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,6EAA6E;oBACvF,QAAQ,EAAE,WAAW;iBACtB;iIAM0B,OAAO;sBAA/B,KAAK;gBACkB,KAAK;sBAA5B,KAAK;;;ACXR,MAAM,UAAU,GAAG,CAAC,kBAAkB,CAAC,CAAC;MAM3B,eAAe;;4GAAf,eAAe;6GAAf,eAAe,iBANR,kBAAkB,aAAlB,kBAAkB;6GAMzB,eAAe;2FAAf,eAAe;kBAJ3B,QAAQ;mBAAC;oBACR,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACTD;;;;;;"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Optional, ContentChildren, NgModule } from '@angular/core';
|
|
3
|
+
import { __decorate } from 'tslib';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { takeUntil } from 'rxjs/operators';
|
|
6
|
+
import { InputNumber } from '@delon/util/decorator';
|
|
7
|
+
import * as i1 from '@angular/cdk/bidi';
|
|
8
|
+
import * as i2 from 'ng-zorro-antd/avatar';
|
|
9
|
+
import { NzAvatarModule } from 'ng-zorro-antd/avatar';
|
|
10
|
+
import * as i3 from '@angular/common';
|
|
11
|
+
import { CommonModule } from '@angular/common';
|
|
12
|
+
import * as i4 from 'ng-zorro-antd/tooltip';
|
|
13
|
+
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
|
|
14
|
+
|
|
15
|
+
class AvatarListItemComponent {
|
|
16
|
+
}
|
|
17
|
+
AvatarListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
AvatarListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AvatarListItemComponent, selector: "avatar-list-item, [avatar-list-item]", inputs: { src: "src", text: "text", icon: "icon", tips: "tips" }, exportAs: ["avatarListItem"], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListItemComponent, decorators: [{
|
|
20
|
+
type: Component,
|
|
21
|
+
args: [{
|
|
22
|
+
selector: 'avatar-list-item, [avatar-list-item]',
|
|
23
|
+
exportAs: 'avatarListItem',
|
|
24
|
+
template: `<ng-content></ng-content>`,
|
|
25
|
+
preserveWhitespaces: false,
|
|
26
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
27
|
+
encapsulation: ViewEncapsulation.None
|
|
28
|
+
}]
|
|
29
|
+
}], propDecorators: { src: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], text: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], icon: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], tips: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}] } });
|
|
38
|
+
|
|
39
|
+
class AvatarListComponent {
|
|
40
|
+
constructor(cdr, directionality) {
|
|
41
|
+
this.cdr = cdr;
|
|
42
|
+
this.directionality = directionality;
|
|
43
|
+
this.inited = false;
|
|
44
|
+
this.destroy$ = new Subject();
|
|
45
|
+
this.items = [];
|
|
46
|
+
this.exceedCount = 0;
|
|
47
|
+
this.dir = 'ltr';
|
|
48
|
+
this.cls = '';
|
|
49
|
+
this.avatarSize = 'default';
|
|
50
|
+
this.maxLength = 0;
|
|
51
|
+
this.excessItemsStyle = null;
|
|
52
|
+
}
|
|
53
|
+
set size(value) {
|
|
54
|
+
this.cls = `avatar-list__item${value === 'default' ? '' : ` avatar-list__${value}`}`;
|
|
55
|
+
switch (value) {
|
|
56
|
+
case 'large':
|
|
57
|
+
case 'small':
|
|
58
|
+
case 'default':
|
|
59
|
+
this.avatarSize = value;
|
|
60
|
+
break;
|
|
61
|
+
default:
|
|
62
|
+
this.avatarSize = 'small';
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
gen() {
|
|
67
|
+
const { _items } = this;
|
|
68
|
+
const maxLength = this.maxLength > 0 ? this.maxLength : _items.length;
|
|
69
|
+
const numOfChildren = _items.length;
|
|
70
|
+
const numToShow = maxLength > 0 && maxLength >= numOfChildren ? numOfChildren : maxLength;
|
|
71
|
+
this.items = _items.toArray().slice(0, numToShow);
|
|
72
|
+
this.exceedCount = numToShow < numOfChildren ? numOfChildren - maxLength : 0;
|
|
73
|
+
this.cdr.detectChanges();
|
|
74
|
+
}
|
|
75
|
+
ngAfterViewInit() {
|
|
76
|
+
this.dir = this.directionality.value;
|
|
77
|
+
this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction) => {
|
|
78
|
+
this.dir = direction;
|
|
79
|
+
});
|
|
80
|
+
this.gen();
|
|
81
|
+
this.inited = true;
|
|
82
|
+
}
|
|
83
|
+
ngOnChanges() {
|
|
84
|
+
if (this.inited) {
|
|
85
|
+
this.gen();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
ngOnDestroy() {
|
|
89
|
+
this.destroy$.next();
|
|
90
|
+
this.destroy$.complete();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
AvatarListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Directionality, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
94
|
+
AvatarListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: AvatarListComponent, selector: "avatar-list", inputs: { size: "size", maxLength: "maxLength", excessItemsStyle: "excessItemsStyle" }, host: { properties: { "class.avatar-list": "true", "class.avatar-list-rtl": "dir === 'rtl'" } }, queries: [{ propertyName: "_items", predicate: AvatarListItemComponent }], exportAs: ["avatarList"], usesOnChanges: true, ngImport: i0, template: "<ul class=\"avatar-list__wrap\">\n <li *ngFor=\"let i of items\" [ngClass]=\"cls\">\n <nz-avatar\n *ngIf=\"i.tips\"\n nz-tooltip\n [nzTooltipTitle]=\"i.tips\"\n [nzSrc]=\"i.src\"\n [nzText]=\"i.text\"\n [nzIcon]=\"i.icon\"\n [nzSize]=\"avatarSize\"\n ></nz-avatar>\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\"></nz-avatar>\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar\n [nzSize]=\"avatarSize\"\n style=\"cursor: auto\"\n [ngStyle]=\"excessItemsStyle\"\n [nzText]=\"'+' + exceedCount\"\n ></nz-avatar>\n </li>\n</ul>\n", components: [{ type: i2.NzAvatarComponent, selector: "nz-avatar", inputs: ["nzShape", "nzSize", "nzGap", "nzText", "nzSrc", "nzSrcSet", "nzAlt", "nzIcon"], outputs: ["nzError"], exportAs: ["nzAvatar"] }], directives: [{ type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NzTooltipDirective, selector: "[nz-tooltip]", inputs: ["nzTooltipTitle", "nzTooltipTitleContext", "nz-tooltip", "nzTooltipTrigger", "nzTooltipPlacement", "nzTooltipOrigin", "nzTooltipVisible", "nzTooltipMouseEnterDelay", "nzTooltipMouseLeaveDelay", "nzTooltipOverlayClassName", "nzTooltipOverlayStyle", "nzTooltipArrowPointAtCenter", "nzTooltipColor"], outputs: ["nzTooltipVisibleChange"], exportAs: ["nzTooltip"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
95
|
+
__decorate([
|
|
96
|
+
InputNumber()
|
|
97
|
+
], AvatarListComponent.prototype, "maxLength", void 0);
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListComponent, decorators: [{
|
|
99
|
+
type: Component,
|
|
100
|
+
args: [{ selector: 'avatar-list', exportAs: 'avatarList', host: {
|
|
101
|
+
'[class.avatar-list]': 'true',
|
|
102
|
+
'[class.avatar-list-rtl]': `dir === 'rtl'`
|
|
103
|
+
}, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<ul class=\"avatar-list__wrap\">\n <li *ngFor=\"let i of items\" [ngClass]=\"cls\">\n <nz-avatar\n *ngIf=\"i.tips\"\n nz-tooltip\n [nzTooltipTitle]=\"i.tips\"\n [nzSrc]=\"i.src\"\n [nzText]=\"i.text\"\n [nzIcon]=\"i.icon\"\n [nzSize]=\"avatarSize\"\n ></nz-avatar>\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\"></nz-avatar>\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar\n [nzSize]=\"avatarSize\"\n style=\"cursor: auto\"\n [ngStyle]=\"excessItemsStyle\"\n [nzText]=\"'+' + exceedCount\"\n ></nz-avatar>\n </li>\n</ul>\n" }]
|
|
104
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.Directionality, decorators: [{
|
|
105
|
+
type: Optional
|
|
106
|
+
}] }]; }, propDecorators: { _items: [{
|
|
107
|
+
type: ContentChildren,
|
|
108
|
+
args: [AvatarListItemComponent, { descendants: false }]
|
|
109
|
+
}], size: [{
|
|
110
|
+
type: Input
|
|
111
|
+
}], maxLength: [{
|
|
112
|
+
type: Input
|
|
113
|
+
}], excessItemsStyle: [{
|
|
114
|
+
type: Input
|
|
115
|
+
}] } });
|
|
116
|
+
|
|
117
|
+
const COMPONENTS = [AvatarListComponent, AvatarListItemComponent];
|
|
118
|
+
class AvatarListModule {
|
|
119
|
+
}
|
|
120
|
+
AvatarListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
121
|
+
AvatarListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, declarations: [AvatarListComponent, AvatarListItemComponent], imports: [CommonModule, NzAvatarModule, NzToolTipModule], exports: [AvatarListComponent, AvatarListItemComponent] });
|
|
122
|
+
AvatarListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, imports: [[CommonModule, NzAvatarModule, NzToolTipModule]] });
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: AvatarListModule, decorators: [{
|
|
124
|
+
type: NgModule,
|
|
125
|
+
args: [{
|
|
126
|
+
imports: [CommonModule, NzAvatarModule, NzToolTipModule],
|
|
127
|
+
declarations: COMPONENTS,
|
|
128
|
+
exports: COMPONENTS
|
|
129
|
+
}]
|
|
130
|
+
}] });
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Generated bundle index. Do not edit.
|
|
134
|
+
*/
|
|
135
|
+
|
|
136
|
+
export { AvatarListComponent, AvatarListItemComponent, AvatarListModule };
|
|
137
|
+
//# sourceMappingURL=avatarList.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatarList.mjs","sources":["../../../../packages/abc/avatar-list/avatar-list-item.component.ts","../../../../packages/abc/avatar-list/avatar-list.component.ts","../../../../packages/abc/avatar-list/avatar-list.component.html","../../../../packages/abc/avatar-list/avatar-list.module.ts","../../../../packages/abc/avatar-list/avatarList.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'avatar-list-item, [avatar-list-item]',\n exportAs: 'avatarListItem',\n template: `<ng-content></ng-content>`,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class AvatarListItemComponent {\n @Input() src?: string;\n @Input() text?: string;\n @Input() icon?: string;\n @Input() tips?: string;\n}\n","import { Direction, Directionality } from '@angular/cdk/bidi';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n QueryList,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nimport { InputNumber, NumberInput } from '@delon/util/decorator';\nimport type { NgStyleInterface, NzSizeLDSType } from 'ng-zorro-antd/core/types';\n\nimport { AvatarListItemComponent } from './avatar-list-item.component';\n\n@Component({\n selector: 'avatar-list',\n exportAs: 'avatarList',\n templateUrl: './avatar-list.component.html',\n host: {\n '[class.avatar-list]': 'true',\n '[class.avatar-list-rtl]': `dir === 'rtl'`\n },\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class AvatarListComponent implements AfterViewInit, OnChanges, OnDestroy {\n static ngAcceptInputType_maxLength: NumberInput;\n\n private inited = false;\n @ContentChildren(AvatarListItemComponent, { descendants: false })\n private _items!: QueryList<AvatarListItemComponent>;\n private destroy$ = new Subject<void>();\n\n items: AvatarListItemComponent[] = [];\n exceedCount = 0;\n dir: Direction = 'ltr';\n\n cls = '';\n avatarSize: NzSizeLDSType = 'default';\n @Input()\n set size(value: 'large' | 'small' | 'mini' | 'default') {\n this.cls = `avatar-list__item${value === 'default' ? '' : ` avatar-list__${value}`}`;\n switch (value) {\n case 'large':\n case 'small':\n case 'default':\n this.avatarSize = value;\n break;\n default:\n this.avatarSize = 'small';\n break;\n }\n }\n @Input() @InputNumber() maxLength = 0;\n @Input() excessItemsStyle: NgStyleInterface | null = null;\n\n constructor(private cdr: ChangeDetectorRef, @Optional() private directionality: Directionality) {}\n\n private gen(): void {\n const { _items } = this;\n const maxLength = this.maxLength > 0 ? this.maxLength : _items.length;\n const numOfChildren = _items.length;\n const numToShow = maxLength > 0 && maxLength >= numOfChildren ? numOfChildren : maxLength;\n this.items = _items.toArray().slice(0, numToShow);\n this.exceedCount = numToShow < numOfChildren ? numOfChildren - maxLength : 0;\n this.cdr.detectChanges();\n }\n\n ngAfterViewInit(): void {\n this.dir = this.directionality.value;\n this.directionality.change?.pipe(takeUntil(this.destroy$)).subscribe((direction: Direction) => {\n this.dir = direction;\n });\n this.gen();\n this.inited = true;\n }\n\n ngOnChanges(): void {\n if (this.inited) {\n this.gen();\n }\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","<ul class=\"avatar-list__wrap\">\n <li *ngFor=\"let i of items\" [ngClass]=\"cls\">\n <nz-avatar\n *ngIf=\"i.tips\"\n nz-tooltip\n [nzTooltipTitle]=\"i.tips\"\n [nzSrc]=\"i.src\"\n [nzText]=\"i.text\"\n [nzIcon]=\"i.icon\"\n [nzSize]=\"avatarSize\"\n ></nz-avatar>\n <nz-avatar *ngIf=\"!i.tips\" [nzSrc]=\"i.src\" [nzText]=\"i.text\" [nzIcon]=\"i.icon\" [nzSize]=\"avatarSize\"></nz-avatar>\n </li>\n <li *ngIf=\"exceedCount > 0\" [ngClass]=\"cls\">\n <nz-avatar\n [nzSize]=\"avatarSize\"\n style=\"cursor: auto\"\n [ngStyle]=\"excessItemsStyle\"\n [nzText]=\"'+' + exceedCount\"\n ></nz-avatar>\n </li>\n</ul>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { NzAvatarModule } from 'ng-zorro-antd/avatar';\nimport { NzToolTipModule } from 'ng-zorro-antd/tooltip';\n\nimport { AvatarListItemComponent } from './avatar-list-item.component';\nimport { AvatarListComponent } from './avatar-list.component';\n\nconst COMPONENTS = [AvatarListComponent, AvatarListItemComponent];\n\n@NgModule({\n imports: [CommonModule, NzAvatarModule, NzToolTipModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class AvatarListModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAUa,uBAAuB;;oHAAvB,uBAAuB;wGAAvB,uBAAuB,4KALxB,2BAA2B;2FAK1B,uBAAuB;kBARnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,sCAAsC;oBAChD,QAAQ,EAAE,gBAAgB;oBAC1B,QAAQ,EAAE,2BAA2B;oBACrC,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAEU,GAAG;sBAAX,KAAK;gBACG,IAAI;sBAAZ,KAAK;gBACG,IAAI;sBAAZ,KAAK;gBACG,IAAI;sBAAZ,KAAK;;;MCoBK,mBAAmB;IA+B9B,YAAoB,GAAsB,EAAsB,cAA8B;QAA1E,QAAG,GAAH,GAAG,CAAmB;QAAsB,mBAAc,GAAd,cAAc,CAAgB;QA5BtF,WAAM,GAAG,KAAK,CAAC;QAGf,aAAQ,GAAG,IAAI,OAAO,EAAQ,CAAC;QAEvC,UAAK,GAA8B,EAAE,CAAC;QACtC,gBAAW,GAAG,CAAC,CAAC;QAChB,QAAG,GAAc,KAAK,CAAC;QAEvB,QAAG,GAAG,EAAE,CAAC;QACT,eAAU,GAAkB,SAAS,CAAC;QAed,cAAS,GAAG,CAAC,CAAC;QAC7B,qBAAgB,GAA4B,IAAI,CAAC;KAEwC;IAjBlG,IACI,IAAI,CAAC,KAA6C;QACpD,IAAI,CAAC,GAAG,GAAG,oBAAoB,KAAK,KAAK,SAAS,GAAG,EAAE,GAAG,iBAAiB,KAAK,EAAE,EAAE,CAAC;QACrF,QAAQ,KAAK;YACX,KAAK,OAAO,CAAC;YACb,KAAK,OAAO,CAAC;YACb,KAAK,SAAS;gBACZ,IAA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;;gHA7DU,mBAAmB;oGAAnB,mBAAmB,mQAIb,uBAAuB,4ECtC1C,grBAsBA;ADwC0B;IAAd,WAAW,EAAE;sDAAe;2FA5B3B,mBAAmB;kBAZ/B,SAAS;+BACE,aAAa,YACb,YAAY,QAEhB;wBACJ,qBAAqB,EAAE,MAAM;wBAC7B,yBAAyB,EAAE,eAAe;qBAC3C,uBACoB,KAAK,mBACT,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI;;0BAiCQ,QAAQ;4CA1B7C,MAAM;sBADb,eAAe;uBAAC,uBAAuB,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;gBAW5D,IAAI;sBADP,KAAK;gBAckB,SAAS;sBAAhC,KAAK;gBACG,gBAAgB;sBAAxB,KAAK;;;AEtDR,MAAM,UAAU,GAAG,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;MAOrD,gBAAgB;;6GAAhB,gBAAgB;8GAAhB,gBAAgB,iBAPT,mBAAmB,EAAE,uBAAuB,aAGpD,YAAY,EAAE,cAAc,EAAE,eAAe,aAHrC,mBAAmB,EAAE,uBAAuB;8GAOnD,gBAAgB,YAJlB,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;2FAI7C,gBAAgB;kBAL5B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;oBACxD,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACfD;;;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, Component, ChangeDetectionStrategy, ViewEncapsulation, ViewChild, Input, Output, NgModule } from '@angular/core';
|
|
3
|
+
import { addSeconds, format } from 'date-fns';
|
|
4
|
+
import * as i1 from 'ngx-countdown';
|
|
5
|
+
import { CountdownModule } from 'ngx-countdown';
|
|
6
|
+
import * as i2 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
|
|
9
|
+
class CountDownComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.event = new EventEmitter();
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 目标时间
|
|
15
|
+
*/
|
|
16
|
+
set target(value) {
|
|
17
|
+
this.config = {
|
|
18
|
+
format: `HH:mm:ss`,
|
|
19
|
+
stopTime: typeof value === 'number' ? addSeconds(new Date(), value).valueOf() : +format(value, 't')
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
handleEvent(e) {
|
|
23
|
+
this.event.emit(e);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
CountDownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
27
|
+
CountDownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: CountDownComponent, selector: "count-down", inputs: { config: "config", target: "target" }, outputs: { event: "event" }, viewQueries: [{ propertyName: "instance", first: true, predicate: ["cd"], descendants: true }], exportAs: ["countDown"], ngImport: i0, template: ` <countdown #cd *ngIf="config" [config]="config" (event)="handleEvent($event)"></countdown> `, isInline: true, components: [{ type: i1.CountdownComponent, selector: "countdown", inputs: ["config", "render"], outputs: ["event"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownComponent, decorators: [{
|
|
29
|
+
type: Component,
|
|
30
|
+
args: [{
|
|
31
|
+
selector: 'count-down',
|
|
32
|
+
exportAs: 'countDown',
|
|
33
|
+
template: ` <countdown #cd *ngIf="config" [config]="config" (event)="handleEvent($event)"></countdown> `,
|
|
34
|
+
preserveWhitespaces: false,
|
|
35
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
|
+
encapsulation: ViewEncapsulation.None
|
|
37
|
+
}]
|
|
38
|
+
}], propDecorators: { instance: [{
|
|
39
|
+
type: ViewChild,
|
|
40
|
+
args: ['cd', { static: false }]
|
|
41
|
+
}], config: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], target: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}], event: [{
|
|
46
|
+
type: Output
|
|
47
|
+
}] } });
|
|
48
|
+
|
|
49
|
+
const COMPONENTS = [CountDownComponent];
|
|
50
|
+
class CountDownModule {
|
|
51
|
+
}
|
|
52
|
+
CountDownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
53
|
+
CountDownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, declarations: [CountDownComponent], imports: [CommonModule, CountdownModule], exports: [CountDownComponent] });
|
|
54
|
+
CountDownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, imports: [[CommonModule, CountdownModule]] });
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: CountDownModule, decorators: [{
|
|
56
|
+
type: NgModule,
|
|
57
|
+
args: [{
|
|
58
|
+
imports: [CommonModule, CountdownModule],
|
|
59
|
+
declarations: COMPONENTS,
|
|
60
|
+
exports: COMPONENTS
|
|
61
|
+
}]
|
|
62
|
+
}] });
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Generated bundle index. Do not edit.
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
export { CountDownComponent, CountDownModule };
|
|
69
|
+
//# sourceMappingURL=count-down.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"count-down.mjs","sources":["../../../../packages/abc/count-down/count-down.component.ts","../../../../packages/abc/count-down/count-down.module.ts","../../../../packages/abc/count-down/count-down.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\n\nimport { addSeconds, format } from 'date-fns';\nimport { CountdownComponent, CountdownConfig, CountdownEvent } from 'ngx-countdown';\n\n@Component({\n selector: 'count-down',\n exportAs: 'countDown',\n template: ` <countdown #cd *ngIf=\"config\" [config]=\"config\" (event)=\"handleEvent($event)\"></countdown> `,\n preserveWhitespaces: false,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class CountDownComponent {\n @ViewChild('cd', { static: false }) readonly instance!: CountdownComponent;\n\n @Input() config?: CountdownConfig;\n\n /**\n * 目标时间\n */\n @Input()\n set target(value: number | Date) {\n this.config = {\n format: `HH:mm:ss`,\n stopTime: typeof value === 'number' ? addSeconds(new Date(), value).valueOf() : +format(value, 't')\n };\n }\n\n @Output() readonly event = new EventEmitter<CountdownEvent>();\n\n handleEvent(e: CountdownEvent): void {\n this.event.emit(e);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CountdownModule } from 'ngx-countdown';\n\nimport { CountDownComponent } from './count-down.component';\n\nconst COMPONENTS = [CountDownComponent];\n\n@NgModule({\n imports: [CommonModule, CountdownModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class CountDownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAqBa,kBAAkB;IAR/B;QAwBqB,UAAK,GAAG,IAAI,YAAY,EAAkB,CAAC;KAK/D;;;;IAbC,IACI,MAAM,CAAC,KAAoB;QAC7B,IAAI,CAAC,MAAM,GAAG;YACZ,MAAM,EAAE,UAAU;YAClB,QAAQ,EAAE,OAAO,KAAK,KAAK,QAAQ,GAAG,UAAU,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC;SACpG,CAAC;KACH;IAID,WAAW,CAAC,CAAiB;QAC3B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACpB;;+GApBU,kBAAkB;mGAAlB,kBAAkB,wPALnB,8FAA8F;2FAK7F,kBAAkB;kBAR9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,YAAY;oBACtB,QAAQ,EAAE,WAAW;oBACrB,QAAQ,EAAE,8FAA8F;oBACxG,mBAAmB,EAAE,KAAK;oBAC1B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;iBACtC;8BAE8C,QAAQ;sBAApD,SAAS;uBAAC,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;gBAEzB,MAAM;sBAAd,KAAK;gBAMF,MAAM;sBADT,KAAK;gBAQa,KAAK;sBAAvB,MAAM;;;AC9BT,MAAM,UAAU,GAAG,CAAC,kBAAkB,CAAC,CAAC;MAO3B,eAAe;;4GAAf,eAAe;6GAAf,eAAe,iBAPR,kBAAkB,aAG1B,YAAY,EAAE,eAAe,aAHrB,kBAAkB;6GAOzB,eAAe,YAJjB,CAAC,YAAY,EAAE,eAAe,CAAC;2FAI7B,eAAe;kBAL3B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,CAAC;oBACxC,YAAY,EAAE,UAAU;oBACxB,OAAO,EAAE,UAAU;iBACpB;;;ACbD;;;;;;"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import * as i1 from '@angular/common';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { Component, ViewChild, EventEmitter, Directive, Host, Optional, Input, Output, NgModule } from '@angular/core';
|
|
5
|
+
import { FormsModule } from '@angular/forms';
|
|
6
|
+
import * as i3 from 'ng-zorro-antd/date-picker';
|
|
7
|
+
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
|
|
8
|
+
import { Subject } from 'rxjs';
|
|
9
|
+
import { getTimeDistance, fixEndTimeOfRange } from '@delon/util/date-time';
|
|
10
|
+
import { assert, deepMergeKey } from '@delon/util/other';
|
|
11
|
+
import * as i1$1 from '@angular/platform-browser';
|
|
12
|
+
import * as i2 from '@delon/util/config';
|
|
13
|
+
|
|
14
|
+
class RangePickerShortcutTplComponent {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.list = [];
|
|
17
|
+
}
|
|
18
|
+
click(_) { }
|
|
19
|
+
}
|
|
20
|
+
RangePickerShortcutTplComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerShortcutTplComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
RangePickerShortcutTplComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: RangePickerShortcutTplComponent, selector: "ng-component", viewQueries: [{ propertyName: "tpl", first: true, predicate: ["tpl"], descendants: true, static: true }], ngImport: i0, template: `
|
|
22
|
+
<ng-template #tpl>
|
|
23
|
+
<a
|
|
24
|
+
*ngFor="let i of list; let first = first"
|
|
25
|
+
(click)="click(i)"
|
|
26
|
+
[innerHTML]="i._text"
|
|
27
|
+
[ngClass]="{ 'ml-sm': !first }"
|
|
28
|
+
></a>
|
|
29
|
+
</ng-template>
|
|
30
|
+
`, isInline: true, directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerShortcutTplComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{
|
|
34
|
+
selector: '',
|
|
35
|
+
template: `
|
|
36
|
+
<ng-template #tpl>
|
|
37
|
+
<a
|
|
38
|
+
*ngFor="let i of list; let first = first"
|
|
39
|
+
(click)="click(i)"
|
|
40
|
+
[innerHTML]="i._text"
|
|
41
|
+
[ngClass]="{ 'ml-sm': !first }"
|
|
42
|
+
></a>
|
|
43
|
+
</ng-template>
|
|
44
|
+
`
|
|
45
|
+
}]
|
|
46
|
+
}], propDecorators: { tpl: [{
|
|
47
|
+
type: ViewChild,
|
|
48
|
+
args: ['tpl', { static: true }]
|
|
49
|
+
}] } });
|
|
50
|
+
|
|
51
|
+
class RangePickerDirective {
|
|
52
|
+
constructor(dom, configSrv, nativeComp, resolver, injector) {
|
|
53
|
+
this.dom = dom;
|
|
54
|
+
this.nativeComp = nativeComp;
|
|
55
|
+
this.resolver = resolver;
|
|
56
|
+
this.injector = injector;
|
|
57
|
+
this._shortcut = null;
|
|
58
|
+
this.destroy$ = new Subject();
|
|
59
|
+
this.shortcutFactory = null;
|
|
60
|
+
this.start = null;
|
|
61
|
+
this.end = null;
|
|
62
|
+
this.ngModelEndChange = new EventEmitter();
|
|
63
|
+
assert(!!nativeComp, `It should be attached to nz-range-picker component, for example: '<nz-range-picker [(ngModel)]="i.start" extend [(ngModelEnd)]="i.end" shortcut></nz-range-picker>'`);
|
|
64
|
+
const cog = configSrv.merge('dataRange', {
|
|
65
|
+
nzFormat: 'yyyy-MM-dd',
|
|
66
|
+
nzAllowClear: true,
|
|
67
|
+
nzAutoFocus: false,
|
|
68
|
+
nzPopupStyle: { position: 'relative' },
|
|
69
|
+
nzShowToday: true,
|
|
70
|
+
shortcuts: {
|
|
71
|
+
enabled: false,
|
|
72
|
+
closed: true,
|
|
73
|
+
list: [
|
|
74
|
+
{
|
|
75
|
+
text: '今天',
|
|
76
|
+
fn: () => getTimeDistance('today')
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
text: '昨天',
|
|
80
|
+
fn: () => getTimeDistance('yesterday')
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
text: '近3天',
|
|
84
|
+
fn: () => getTimeDistance(-2)
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
text: '近7天',
|
|
88
|
+
fn: () => getTimeDistance(-6)
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
text: '本周',
|
|
92
|
+
fn: () => getTimeDistance('week')
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
text: '本月',
|
|
96
|
+
fn: () => getTimeDistance('month')
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
text: '全年',
|
|
100
|
+
fn: () => getTimeDistance('year')
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
this.defaultShortcuts = { ...cog.shortcuts };
|
|
106
|
+
Object.assign(this, cog);
|
|
107
|
+
}
|
|
108
|
+
set shortcut(val) {
|
|
109
|
+
const item = deepMergeKey({ list: [] }, true, this.defaultShortcuts, val == null ? {} : val);
|
|
110
|
+
if (typeof val !== 'object') {
|
|
111
|
+
item.enabled = val !== false;
|
|
112
|
+
}
|
|
113
|
+
(item.list || []).forEach(i => {
|
|
114
|
+
i._text = this.dom.bypassSecurityTrustHtml(i.text);
|
|
115
|
+
});
|
|
116
|
+
this._shortcut = item;
|
|
117
|
+
this.refreshShortcut();
|
|
118
|
+
}
|
|
119
|
+
get shortcut() {
|
|
120
|
+
return this._shortcut;
|
|
121
|
+
}
|
|
122
|
+
get dp() {
|
|
123
|
+
return this.nativeComp.datePicker;
|
|
124
|
+
}
|
|
125
|
+
get srv() {
|
|
126
|
+
return this.dp.datePickerService;
|
|
127
|
+
}
|
|
128
|
+
cd() {
|
|
129
|
+
this.dp.cdr.markForCheck();
|
|
130
|
+
}
|
|
131
|
+
overrideNative() {
|
|
132
|
+
const dp = this.dp;
|
|
133
|
+
dp.writeValue = (value) => {
|
|
134
|
+
const dates = (value && this.ngModelEnd ? [value, this.ngModelEnd] : []).filter(w => !!w);
|
|
135
|
+
this.srv.setValue(this.srv.makeValue(dates));
|
|
136
|
+
this.start = dates.length > 0 ? dates[0] : null;
|
|
137
|
+
this.end = dates.length > 0 ? dates[1] : null;
|
|
138
|
+
this.cd();
|
|
139
|
+
};
|
|
140
|
+
const oldOnChangeFn = dp.onChangeFn;
|
|
141
|
+
dp.onChangeFn = (list) => {
|
|
142
|
+
let start = null;
|
|
143
|
+
let end = null;
|
|
144
|
+
if (list.length > 0 && list.filter(w => w != null).length === 2) {
|
|
145
|
+
[start, end] = fixEndTimeOfRange([list[0], list[1]]);
|
|
146
|
+
}
|
|
147
|
+
this.start = start;
|
|
148
|
+
this.end = end;
|
|
149
|
+
oldOnChangeFn(start);
|
|
150
|
+
this.ngModelEnd = end;
|
|
151
|
+
this.ngModelEndChange.emit(end);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
refreshShortcut() {
|
|
155
|
+
if (!this._shortcut) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const { enabled, list } = this._shortcut;
|
|
159
|
+
let extraFooter;
|
|
160
|
+
if (!this.nativeComp || !enabled) {
|
|
161
|
+
extraFooter = undefined;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
if (!this.shortcutFactory) {
|
|
165
|
+
const factory = this.resolver.resolveComponentFactory(RangePickerShortcutTplComponent);
|
|
166
|
+
this.shortcutFactory = factory.create(this.injector);
|
|
167
|
+
}
|
|
168
|
+
const { instance } = this.shortcutFactory;
|
|
169
|
+
instance.list = list;
|
|
170
|
+
instance.click = (item) => {
|
|
171
|
+
const res = item.fn([this.start, this.end]);
|
|
172
|
+
this.srv.setValue(this.srv.makeValue(res));
|
|
173
|
+
this.dp.onChangeFn(res);
|
|
174
|
+
this.dp.close();
|
|
175
|
+
};
|
|
176
|
+
extraFooter = instance.tpl;
|
|
177
|
+
}
|
|
178
|
+
this.nativeComp.datePicker.extraFooter = extraFooter;
|
|
179
|
+
Promise.resolve().then(() => this.cd());
|
|
180
|
+
}
|
|
181
|
+
ngAfterViewInit() {
|
|
182
|
+
this.overrideNative();
|
|
183
|
+
this.refreshShortcut();
|
|
184
|
+
}
|
|
185
|
+
destoryShortcut() {
|
|
186
|
+
if (this.shortcutFactory != null) {
|
|
187
|
+
this.shortcutFactory.destroy();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
ngOnDestroy() {
|
|
191
|
+
this.destoryShortcut();
|
|
192
|
+
this.destroy$.next();
|
|
193
|
+
this.destroy$.complete();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
RangePickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerDirective, deps: [{ token: i1$1.DomSanitizer }, { token: i2.AlainConfigService }, { token: i3.NzRangePickerComponent, host: true, optional: true }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
|
|
197
|
+
RangePickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: RangePickerDirective, selector: "nz-range-picker[extend]", inputs: { shortcut: "shortcut", ngModelEnd: "ngModelEnd" }, outputs: { ngModelEndChange: "ngModelEndChange" }, exportAs: ["extendRangePicker"], ngImport: i0 });
|
|
198
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: RangePickerDirective, decorators: [{
|
|
199
|
+
type: Directive,
|
|
200
|
+
args: [{
|
|
201
|
+
selector: 'nz-range-picker[extend]',
|
|
202
|
+
exportAs: 'extendRangePicker'
|
|
203
|
+
}]
|
|
204
|
+
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }, { type: i2.AlainConfigService }, { type: i3.NzRangePickerComponent, decorators: [{
|
|
205
|
+
type: Host
|
|
206
|
+
}, {
|
|
207
|
+
type: Optional
|
|
208
|
+
}] }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }]; }, propDecorators: { shortcut: [{
|
|
209
|
+
type: Input
|
|
210
|
+
}], ngModelEnd: [{
|
|
211
|
+
type: Input
|
|
212
|
+
}], ngModelEndChange: [{
|
|
213
|
+
type: Output
|
|
214
|
+
}] } });
|
|
215
|
+
|
|
216
|
+
const COMPONENTS = [RangePickerDirective, RangePickerShortcutTplComponent];
|
|
217
|
+
class DatePickerModule {
|
|
218
|
+
}
|
|
219
|
+
DatePickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
220
|
+
DatePickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, declarations: [RangePickerDirective, RangePickerShortcutTplComponent], imports: [CommonModule, FormsModule, NzDatePickerModule], exports: [RangePickerDirective, RangePickerShortcutTplComponent] });
|
|
221
|
+
DatePickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, imports: [[CommonModule, FormsModule, NzDatePickerModule]] });
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: DatePickerModule, decorators: [{
|
|
223
|
+
type: NgModule,
|
|
224
|
+
args: [{
|
|
225
|
+
imports: [CommonModule, FormsModule, NzDatePickerModule],
|
|
226
|
+
declarations: COMPONENTS,
|
|
227
|
+
exports: COMPONENTS
|
|
228
|
+
}]
|
|
229
|
+
}] });
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Generated bundle index. Do not edit.
|
|
233
|
+
*/
|
|
234
|
+
|
|
235
|
+
export { DatePickerModule, RangePickerDirective, RangePickerShortcutTplComponent };
|
|
236
|
+
//# sourceMappingURL=datePicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datePicker.mjs","sources":["../../../../packages/abc/date-picker/range-shortcut.component.ts","../../../../packages/abc/date-picker/range.directive.ts","../../../../packages/abc/date-picker/date-picker.module.ts","../../../../packages/abc/date-picker/datePicker.ts"],"sourcesContent":["import { Component, TemplateRef, ViewChild } from '@angular/core';\n\nimport { AlainDateRangePickerShortcutItem } from '@delon/util/config';\n\n@Component({\n selector: '',\n template: `\n <ng-template #tpl>\n <a\n *ngFor=\"let i of list; let first = first\"\n (click)=\"click(i)\"\n [innerHTML]=\"i._text\"\n [ngClass]=\"{ 'ml-sm': !first }\"\n ></a>\n </ng-template>\n `\n})\nexport class RangePickerShortcutTplComponent {\n @ViewChild('tpl', { static: true })\n tpl!: TemplateRef<void>;\n\n list: AlainDateRangePickerShortcutItem[] = [];\n\n click(_: AlainDateRangePickerShortcutItem): void {}\n}\n","import {\n AfterViewInit,\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n EventEmitter,\n Host,\n Injector,\n Input,\n OnDestroy,\n Optional,\n Output,\n TemplateRef\n} from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { Subject } from 'rxjs';\n\nimport { AlainConfigService, AlainDateRangePickerShortcut, AlainDateRangePickerShortcutItem } from '@delon/util/config';\nimport { fixEndTimeOfRange, getTimeDistance } from '@delon/util/date-time';\nimport { assert, deepMergeKey } from '@delon/util/other';\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { NzDatePickerComponent, NzRangePickerComponent } from 'ng-zorro-antd/date-picker';\nimport { DatePickerService } from 'ng-zorro-antd/date-picker/date-picker.service';\n\nimport { RangePickerShortcutTplComponent } from './range-shortcut.component';\n\n@Directive({\n selector: 'nz-range-picker[extend]',\n exportAs: 'extendRangePicker'\n})\nexport class RangePickerDirective implements OnDestroy, AfterViewInit {\n static ngAcceptInputType_shortcut: AlainDateRangePickerShortcut | string | null;\n\n private defaultShortcuts: AlainDateRangePickerShortcut;\n private _shortcut: AlainDateRangePickerShortcut | null = null;\n private destroy$ = new Subject<void>();\n private shortcutFactory: ComponentRef<RangePickerShortcutTplComponent> | null = null;\n start: Date | null = null;\n end: Date | null = null;\n\n @Input()\n set shortcut(val: AlainDateRangePickerShortcut | null) {\n const item = deepMergeKey(\n { list: [] },\n true,\n this.defaultShortcuts,\n val == null ? {} : val\n ) as AlainDateRangePickerShortcut;\n if (typeof val !== 'object') {\n item.enabled = val !== false;\n }\n (item.list || []).forEach(i => {\n i._text = this.dom.bypassSecurityTrustHtml(i.text);\n });\n this._shortcut = item;\n this.refreshShortcut();\n }\n get shortcut(): AlainDateRangePickerShortcut | null {\n return this._shortcut;\n }\n @Input() ngModelEnd: NzSafeAny;\n @Output() readonly ngModelEndChange = new EventEmitter<NzSafeAny>();\n\n private get dp(): NzDatePickerComponent {\n return this.nativeComp.datePicker;\n }\n\n private get srv(): DatePickerService {\n return this.dp.datePickerService;\n }\n\n constructor(\n private dom: DomSanitizer,\n configSrv: AlainConfigService,\n @Host() @Optional() private nativeComp: NzRangePickerComponent,\n private resolver: ComponentFactoryResolver,\n private injector: Injector\n ) {\n assert(\n !!nativeComp,\n `It should be attached to nz-range-picker component, for example: '<nz-range-picker [(ngModel)]=\"i.start\" extend [(ngModelEnd)]=\"i.end\" shortcut></nz-range-picker>'`\n );\n const cog = configSrv.merge('dataRange', {\n nzFormat: 'yyyy-MM-dd',\n nzAllowClear: true,\n nzAutoFocus: false,\n nzPopupStyle: { position: 'relative' },\n nzShowToday: true,\n shortcuts: {\n enabled: false,\n closed: true,\n list: [\n {\n text: '今天',\n fn: () => getTimeDistance('today')\n },\n {\n text: '昨天',\n fn: () => getTimeDistance('yesterday')\n },\n {\n text: '近3天',\n fn: () => getTimeDistance(-2)\n },\n {\n text: '近7天',\n fn: () => getTimeDistance(-6)\n },\n {\n text: '本周',\n fn: () => getTimeDistance('week')\n },\n {\n text: '本月',\n fn: () => getTimeDistance('month')\n },\n {\n text: '全年',\n fn: () => getTimeDistance('year')\n }\n ]\n }\n })!;\n this.defaultShortcuts = { ...cog.shortcuts } as AlainDateRangePickerShortcut;\n Object.assign(this, cog);\n }\n\n private cd(): void {\n (this.dp as NzSafeAny).cdr.markForCheck();\n }\n\n private overrideNative(): void {\n const dp = this.dp;\n dp.writeValue = (value: Date) => {\n const dates = (value && this.ngModelEnd ? [value, this.ngModelEnd] : []).filter(w => !!w);\n this.srv.setValue(this.srv.makeValue(dates));\n this.start = dates.length > 0 ? dates[0] : null;\n this.end = dates.length > 0 ? dates[1] : null;\n this.cd();\n };\n\n const oldOnChangeFn = dp.onChangeFn;\n dp.onChangeFn = (list: Array<Date | null>) => {\n let start: Date | null = null;\n let end: Date | null = null;\n if (list.length > 0 && list.filter(w => w != null).length === 2) {\n [start, end] = fixEndTimeOfRange([list[0]!, list[1]!]);\n }\n this.start = start;\n this.end = end;\n oldOnChangeFn(start);\n this.ngModelEnd = end;\n this.ngModelEndChange.emit(end);\n };\n }\n\n private refreshShortcut(): void {\n if (!this._shortcut) {\n return;\n }\n const { enabled, list } = this._shortcut;\n let extraFooter: TemplateRef<NzSafeAny> | undefined;\n if (!this.nativeComp || !enabled) {\n extraFooter = undefined;\n } else {\n if (!this.shortcutFactory) {\n const factory = this.resolver.resolveComponentFactory(RangePickerShortcutTplComponent);\n this.shortcutFactory = factory.create(this.injector);\n }\n const { instance } = this.shortcutFactory;\n instance.list = list!;\n instance.click = (item: AlainDateRangePickerShortcutItem) => {\n const res = item.fn([this.start, this.end]);\n this.srv.setValue(this.srv.makeValue(res as Date[]));\n this.dp.onChangeFn(res);\n this.dp.close();\n };\n extraFooter = instance.tpl;\n }\n this.nativeComp.datePicker.extraFooter = extraFooter;\n Promise.resolve().then(() => this.cd());\n }\n\n ngAfterViewInit(): void {\n this.overrideNative();\n this.refreshShortcut();\n }\n\n private destoryShortcut(): void {\n if (this.shortcutFactory != null) {\n this.shortcutFactory.destroy();\n }\n }\n\n ngOnDestroy(): void {\n this.destoryShortcut();\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\nimport { NzDatePickerModule } from 'ng-zorro-antd/date-picker';\n\nimport { RangePickerShortcutTplComponent } from './range-shortcut.component';\nimport { RangePickerDirective } from './range.directive';\n\nconst COMPONENTS = [RangePickerDirective, RangePickerShortcutTplComponent];\n\n@NgModule({\n imports: [CommonModule, FormsModule, NzDatePickerModule],\n declarations: COMPONENTS,\n exports: COMPONENTS\n})\nexport class DatePickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAiBa,+BAA+B;IAb5C;QAiBE,SAAI,GAAuC,EAAE,CAAC;KAG/C;IADC,KAAK,CAAC,CAAmC,KAAU;;4HANxC,+BAA+B;gHAA/B,+BAA+B,8JAXhC;;;;;;;;;GAST;2FAEU,+BAA+B;kBAb3C,SAAS;mBAAC;oBACT,QAAQ,EAAE,EAAE;oBACZ,QAAQ,EAAE;;;;;;;;;GAST;iBACF;8BAGC,GAAG;sBADF,SAAS;uBAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;MCYvB,oBAAoB;IAyC/B,YACU,GAAiB,EACzB,SAA6B,EACD,UAAkC,EACtD,QAAkC,EAClC,QAAkB;QAJlB,QAAG,GAAH,GAAG,CAAc;QAEG,eAAU,GAAV,UAAU,CAAwB;QACtD,aAAQ,GAAR,QAAQ,CAA0B;QAClC,aAAQ,GAAR,QAAQ,CAAU;QA1CpB,cAAS,GAAwC,IAAI,CAAC;QACtD,aAAQ,GAAG,IAAI,OAAO,EAAQ,CAAC;QAC/B,oBAAe,GAAyD,IAAI,CAAC;QACrF,UAAK,GAAgB,IAAI,CAAC;QAC1B,QAAG,GAAgB,IAAI,CAAC;QAuBL,qBAAgB,GAAG,IAAI,YAAY,EAAa,CAAC;QAiBlE,M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