ep-craft 0.1.36 → 0.1.38
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/dist/components/avatar/EpAvatar.vue.d.ts +20 -0
- package/dist/components/avatar/EpAvatar.vue.js +72 -0
- package/dist/components/avatar/EpAvatar2.vue.js +4 -0
- package/dist/components/avatar/avatar.d.ts +68 -0
- package/dist/components/avatar/avatar.js +59 -0
- package/dist/components/avatar/constants.d.ts +7 -0
- package/dist/components/avatar/constants.js +6 -0
- package/dist/components/avatar/index.d.ts +13 -2
- package/dist/components/avatar/index.js +8 -3
- package/dist/components/avatar/instance.d.ts +2 -0
- package/dist/components/badge/EpBadge.vue.d.ts +28 -0
- package/dist/components/badge/EpBadge.vue.js +75 -0
- package/dist/components/badge/EpBadge2.vue.js +4 -0
- package/dist/components/badge/badge.d.ts +67 -0
- package/dist/components/badge/badge.js +69 -0
- package/dist/components/badge/index.d.ts +11 -2
- package/dist/components/badge/index.js +9 -4
- package/dist/components/badge/instance.d.ts +2 -0
- package/dist/components/calendar/EpCalendar.vue.d.ts +50 -0
- package/dist/components/calendar/EpCalendar.vue.js +154 -0
- package/dist/components/calendar/EpCalendar2.vue.js +4 -0
- package/dist/components/calendar/EpDateTable.vue.d.ts +27 -0
- package/dist/components/calendar/EpDateTable.vue.js +89 -0
- package/dist/components/calendar/EpDateTable2.vue.js +4 -0
- package/dist/components/calendar/EpSelectController.vue.d.ts +8 -0
- package/dist/components/calendar/EpSelectController.vue.js +88 -0
- package/dist/components/calendar/EpSelectController2.vue.js +4 -0
- package/dist/components/calendar/calendar.d.ts +54 -0
- package/dist/components/calendar/calendar.js +45 -0
- package/dist/components/calendar/date-table.d.ts +53 -0
- package/dist/components/calendar/date-table.js +41 -0
- package/dist/components/calendar/index.d.ts +13 -2
- package/dist/components/calendar/index.js +9 -4
- package/dist/components/calendar/instance.d.ts +5 -0
- package/dist/components/calendar/select-controller.d.ts +31 -0
- package/dist/components/calendar/select-controller.js +21 -0
- package/dist/components/calendar/use-calendar.d.ts +13 -0
- package/dist/components/calendar/use-calendar.js +84 -0
- package/dist/components/calendar/use-date-table.d.ts +18 -0
- package/dist/components/calendar/use-date-table.js +99 -0
- package/dist/components/card/EpCard.vue.d.ts +22 -0
- package/dist/components/card/EpCard.vue.js +64 -0
- package/dist/components/card/EpCard2.vue.js +4 -0
- package/dist/components/card/card.d.ts +51 -0
- package/dist/components/card/card.js +49 -0
- package/dist/components/card/index.d.ts +11 -2
- package/dist/components/card/index.js +5 -4
- package/dist/components/card/instance.d.ts +2 -0
- package/dist/components/carousel/EpCarousel.vue.d.ts +1 -1
- package/dist/components/cascader/EpCascader.vue.d.ts +4 -4
- package/dist/components/config-provider/index.js +5 -4
- package/dist/components/config-provider/src/config-provider-props.d.ts +3 -6
- package/dist/components/config-provider/src/config-provider-props.js +1 -1
- package/dist/components/config-provider/src/hooks/use-global-config.js +75 -47
- package/dist/components/countdown/EpCountdown.vue.d.ts +28 -0
- package/dist/components/countdown/EpCountdown.vue.js +71 -0
- package/dist/components/countdown/EpCountdown2.vue.js +4 -0
- package/dist/components/countdown/countdown.d.ts +48 -0
- package/dist/components/countdown/countdown.js +50 -0
- package/dist/components/countdown/index.d.ts +11 -2
- package/dist/components/countdown/index.js +9 -4
- package/dist/components/countdown/instance.d.ts +2 -0
- package/dist/components/countdown/utils.d.ts +3 -0
- package/dist/components/countdown/utils.js +40 -0
- package/dist/components/date-picker-panel/src/composables/use-basic-date-table.d.ts +1 -1
- package/dist/components/date-picker-panel/src/date-picker-panel.d.ts +1 -1
- package/dist/components/dialog/EpDialog.vue.d.ts +61 -0
- package/dist/components/dialog/EpDialog.vue.js +214 -0
- package/dist/components/dialog/EpDialog2.vue.js +4 -0
- package/dist/components/dialog/EpDialogContent.vue.d.ts +31 -0
- package/dist/components/dialog/EpDialogContent.vue.js +108 -0
- package/dist/components/dialog/EpDialogContent2.vue.js +4 -0
- package/dist/components/dialog/constants.d.ts +12 -0
- package/dist/components/dialog/constants.js +5 -0
- package/dist/components/dialog/dialog-content.d.ts +84 -0
- package/dist/components/dialog/dialog-content.js +90 -0
- package/dist/components/dialog/dialog.d.ts +173 -0
- package/dist/components/dialog/dialog.js +156 -0
- package/dist/components/dialog/index.d.ts +20 -2
- package/dist/components/dialog/index.js +24 -4
- package/dist/components/dialog/instance.d.ts +2 -0
- package/dist/components/dialog/use-dialog.d.ts +35 -0
- package/dist/components/dialog/use-dialog.js +176 -0
- package/dist/components/drawer/EpDrawer.vue.d.ts +67 -0
- package/dist/components/drawer/EpDrawer.vue.js +234 -0
- package/dist/components/drawer/EpDrawer2.vue.js +4 -0
- package/dist/components/drawer/drawer.d.ts +105 -0
- package/dist/components/drawer/drawer.js +42 -0
- package/dist/components/drawer/index.d.ts +14 -2
- package/dist/components/drawer/index.js +9 -4
- package/dist/components/drawer/instance.d.ts +2 -0
- package/dist/components/drawer/useResizable.d.ts +7 -0
- package/dist/components/drawer/useResizable.js +50 -0
- package/dist/components/empty/EpEmpty.vue.d.ts +20 -0
- package/dist/components/empty/EpEmpty.vue.js +62 -0
- package/dist/components/empty/EpEmpty2.vue.js +4 -0
- package/dist/components/empty/empty.d.ts +27 -0
- package/dist/components/empty/empty.js +26 -0
- package/dist/components/empty/img-empty.vue.d.ts +2 -0
- package/dist/components/empty/img-empty.vue.js +141 -0
- package/dist/components/empty/img-empty2.vue.js +4 -0
- package/dist/components/empty/index.d.ts +11 -2
- package/dist/components/empty/index.js +9 -4
- package/dist/components/empty/instance.d.ts +2 -0
- package/dist/components/form/index.js +11 -9
- package/dist/components/form/src/form-item.js +5 -5
- package/dist/components/form/src/form.js +5 -6
- package/dist/components/form-item/index.js +6 -5
- package/dist/components/infinite-scroll/index.d.ts +26 -0
- package/dist/components/infinite-scroll/index.js +15 -0
- package/dist/components/infinite-scroll/src/index.d.ts +20 -0
- package/dist/components/infinite-scroll/src/index.js +109 -0
- package/dist/components/link/EpLink.vue.d.ts +24 -0
- package/dist/components/link/EpLink.vue.js +86 -0
- package/dist/components/link/EpLink2.vue.js +4 -0
- package/dist/components/link/index.d.ts +11 -2
- package/dist/components/link/index.js +5 -3
- package/dist/components/link/instance.d.ts +2 -0
- package/dist/components/link/link.d.ts +56 -0
- package/dist/components/link/link.js +51 -0
- package/dist/components/loading/index.d.ts +15 -0
- package/dist/components/loading/index.js +13 -0
- package/dist/components/loading/src/directive.d.ts +13 -0
- package/dist/components/loading/src/directive.js +62 -0
- package/dist/components/loading/src/loading.d.ts +34 -0
- package/dist/components/loading/src/loading.js +121 -0
- package/dist/components/loading/src/service.d.ts +8 -0
- package/dist/components/loading/src/service.js +67 -0
- package/dist/components/loading/src/types.d.ts +47 -0
- package/dist/components/message/index.d.ts +3 -0
- package/dist/components/message/index.js +18 -0
- package/dist/components/message/src/instance.d.ts +18 -0
- package/dist/components/message/src/instance.js +18 -0
- package/dist/components/message/src/message.d.ts +175 -0
- package/dist/components/message/src/message.js +160 -0
- package/dist/components/message/src/message.vue.d.ts +38 -0
- package/dist/components/message/src/message.vue.js +156 -0
- package/dist/components/message/src/message2.vue.js +4 -0
- package/dist/components/message/src/method.d.ts +5 -0
- package/dist/components/message/src/method.js +123 -0
- package/dist/components/message-box/index.d.ts +6 -0
- package/dist/components/message-box/index.js +9 -0
- package/dist/components/message-box/src/index.vue.d.ts +5517 -0
- package/dist/components/message-box/src/index.vue.js +203 -0
- package/dist/components/message-box/src/index2.vue.js +237 -0
- package/dist/components/message-box/src/message-box.type.d.ts +167 -0
- package/dist/components/message-box/src/messageBox.d.ts +3 -0
- package/dist/components/message-box/src/messageBox.js +102 -0
- package/dist/components/notification/index.d.ts +3 -0
- package/dist/components/notification/index.js +15 -0
- package/dist/components/notification/src/notification.d.ts +157 -0
- package/dist/components/notification/src/notification.js +127 -0
- package/dist/components/notification/src/notification.vue.d.ts +34 -0
- package/dist/components/notification/src/notification.vue.js +146 -0
- package/dist/components/notification/src/notification2.vue.js +4 -0
- package/dist/components/notification/src/notify.d.ts +15 -0
- package/dist/components/notification/src/notify.js +100 -0
- package/dist/components/option/index.js +3 -3
- package/dist/components/overlay/index.d.ts +8 -0
- package/dist/components/overlay/overlay.d.ts +73 -0
- package/dist/components/overlay/overlay.js +80 -0
- package/dist/components/page-header/EpPageHeader.vue.d.ts +30 -0
- package/dist/components/page-header/EpPageHeader.vue.js +109 -0
- package/dist/components/page-header/EpPageHeader2.vue.js +4 -0
- package/dist/components/page-header/index.d.ts +13 -2
- package/dist/components/page-header/index.js +9 -4
- package/dist/components/page-header/instance.d.ts +2 -0
- package/dist/components/page-header/page-header.d.ts +26 -0
- package/dist/components/page-header/page-header.js +33 -0
- package/dist/components/popconfirm/EpPopconfirm.vue.d.ts +36 -0
- package/dist/components/popconfirm/EpPopconfirm.vue.js +146 -0
- package/dist/components/popconfirm/EpPopconfirm2.vue.js +4 -0
- package/dist/components/popconfirm/index.d.ts +14 -2
- package/dist/components/popconfirm/index.js +9 -4
- package/dist/components/popconfirm/instance.d.ts +2 -0
- package/dist/components/popconfirm/popconfirm.d.ts +106 -0
- package/dist/components/popconfirm/popconfirm.js +103 -0
- package/dist/components/progress/src/progress.vue.d.ts +1 -1
- package/dist/components/result/EpResult.vue.d.ts +23 -0
- package/dist/components/result/EpResult.vue.js +71 -0
- package/dist/components/result/EpResult2.vue.js +4 -0
- package/dist/components/result/index.d.ts +11 -2
- package/dist/components/result/index.js +10 -4
- package/dist/components/result/instance.d.ts +2 -0
- package/dist/components/result/result.d.ts +35 -0
- package/dist/components/result/result.js +47 -0
- package/dist/components/select/index.d.ts +21 -21
- package/dist/components/select/select.vue.d.ts +7 -7
- package/dist/components/select/select2.vue.js +12 -12
- package/dist/components/select/src/option.vue.js +5 -5
- package/dist/components/select-v2/src/select.vue.d.ts +8 -8
- package/dist/components/space/index.d.ts +15 -2
- package/dist/components/space/index.js +23 -4
- package/dist/components/space/instance.d.ts +2 -0
- package/dist/components/space/item.d.ts +29 -0
- package/dist/components/space/item.js +30 -0
- package/dist/components/space/space.d.ts +92 -0
- package/dist/components/space/space.js +182 -0
- package/dist/components/space/use-space.d.ts +7 -0
- package/dist/components/space/use-space.js +47 -0
- package/dist/components/statistic/EpStatistic.vue.d.ts +28 -0
- package/dist/components/statistic/EpStatistic.vue.js +82 -0
- package/dist/components/statistic/EpStatistic2.vue.js +4 -0
- package/dist/components/statistic/index.d.ts +11 -2
- package/dist/components/statistic/index.js +8 -4
- package/dist/components/statistic/instance.d.ts +2 -0
- package/dist/components/statistic/statistic.d.ts +58 -0
- package/dist/components/statistic/statistic.js +59 -0
- package/dist/components/table-v2/index.d.ts +21 -2
- package/dist/components/table-v2/index.js +11 -4
- package/dist/components/table-v2/src/EpTableV2.d.ts +359 -0
- package/dist/components/table-v2/src/EpTableV2.js +287 -0
- package/dist/components/table-v2/src/cell.d.ts +27 -0
- package/dist/components/table-v2/src/common.d.ts +42 -0
- package/dist/components/table-v2/src/common.js +38 -0
- package/dist/components/table-v2/src/components/cell.d.ts +4 -0
- package/dist/components/table-v2/src/components/cell.js +20 -0
- package/dist/components/table-v2/src/components/expand-icon.d.ts +15 -0
- package/dist/components/table-v2/src/components/expand-icon.js +30 -0
- package/dist/components/table-v2/src/components/header-cell.d.ts +4 -0
- package/dist/components/table-v2/src/components/header-cell.js +15 -0
- package/dist/components/table-v2/src/components/header-row.d.ts +59 -0
- package/dist/components/table-v2/src/components/header-row.js +41 -0
- package/dist/components/table-v2/src/components/header.d.ts +105 -0
- package/dist/components/table-v2/src/components/header.js +98 -0
- package/dist/components/table-v2/src/components/index.d.ts +11 -0
- package/dist/components/table-v2/src/components/row.d.ts +166 -0
- package/dist/components/table-v2/src/components/row.js +176 -0
- package/dist/components/table-v2/src/components/sort-icon.d.ts +9 -0
- package/dist/components/table-v2/src/components/sort-icon.js +21 -0
- package/dist/components/table-v2/src/composables/index.d.ts +11 -0
- package/dist/components/table-v2/src/composables/use-columns.d.ts +128 -0
- package/dist/components/table-v2/src/composables/use-columns.js +73 -0
- package/dist/components/table-v2/src/composables/use-data.d.ts +14 -0
- package/dist/components/table-v2/src/composables/use-data.js +33 -0
- package/dist/components/table-v2/src/composables/use-row.d.ts +31 -0
- package/dist/components/table-v2/src/composables/use-row.js +83 -0
- package/dist/components/table-v2/src/composables/use-scrollbar.d.ts +31 -0
- package/dist/components/table-v2/src/composables/use-scrollbar.js +53 -0
- package/dist/components/table-v2/src/composables/use-styles.d.ts +23 -0
- package/dist/components/table-v2/src/composables/use-styles.js +66 -0
- package/dist/components/table-v2/src/composables/utils.d.ts +3 -0
- package/dist/components/table-v2/src/composables/utils.js +19 -0
- package/dist/components/table-v2/src/constants.d.ts +18 -0
- package/dist/components/table-v2/src/constants.js +12 -0
- package/dist/components/table-v2/src/grid.d.ts +105 -0
- package/dist/components/table-v2/src/grid.js +56 -0
- package/dist/components/table-v2/src/header-cell.d.ts +13 -0
- package/dist/components/table-v2/src/header-row.d.ts +26 -0
- package/dist/components/table-v2/src/header-row.js +20 -0
- package/dist/components/table-v2/src/header.d.ts +44 -0
- package/dist/components/table-v2/src/header.js +35 -0
- package/dist/components/table-v2/src/private.d.ts +1 -0
- package/dist/components/table-v2/src/private.js +4 -0
- package/dist/components/table-v2/src/renderers/cell.d.ts +11 -0
- package/dist/components/table-v2/src/renderers/cell.js +101 -0
- package/dist/components/table-v2/src/renderers/empty.d.ts +7 -0
- package/dist/components/table-v2/src/renderers/empty.js +15 -0
- package/dist/components/table-v2/src/renderers/footer.d.ts +7 -0
- package/dist/components/table-v2/src/renderers/footer.js +14 -0
- package/dist/components/table-v2/src/renderers/header-cell.d.ts +14 -0
- package/dist/components/table-v2/src/renderers/header-cell.js +77 -0
- package/dist/components/table-v2/src/renderers/header.d.ts +9 -0
- package/dist/components/table-v2/src/renderers/header.js +53 -0
- package/dist/components/table-v2/src/renderers/left-table.d.ts +8 -0
- package/dist/components/table-v2/src/renderers/left-table.js +22 -0
- package/dist/components/table-v2/src/renderers/main-table.d.ts +8 -0
- package/dist/components/table-v2/src/renderers/main-table.js +21 -0
- package/dist/components/table-v2/src/renderers/overlay.d.ts +3 -0
- package/dist/components/table-v2/src/renderers/overlay.js +14 -0
- package/dist/components/table-v2/src/renderers/right-table.d.ts +8 -0
- package/dist/components/table-v2/src/renderers/right-table.js +22 -0
- package/dist/components/table-v2/src/renderers/row.d.ts +11 -0
- package/dist/components/table-v2/src/renderers/row.js +98 -0
- package/dist/components/table-v2/src/row.d.ts +101 -0
- package/dist/components/table-v2/src/row.js +53 -0
- package/dist/components/table-v2/src/table-grid.d.ts +236 -0
- package/dist/components/table-v2/src/table-grid.js +240 -0
- package/dist/components/table-v2/src/table.d.ts +194 -0
- package/dist/components/table-v2/src/table.js +134 -0
- package/dist/components/table-v2/src/tokens.d.ts +9 -0
- package/dist/components/table-v2/src/tokens.js +5 -0
- package/dist/components/table-v2/src/types.d.ts +99 -0
- package/dist/components/table-v2/src/use-table.d.ts +98 -0
- package/dist/components/table-v2/src/use-table.js +162 -0
- package/dist/components/table-v2/src/utils.d.ts +8 -0
- package/dist/components/table-v2/src/utils.js +15 -0
- package/dist/components/time-picker/src/time-picker-com/panel-time-pick.vue.d.ts +2 -2
- package/dist/components/time-picker/src/time-picker-com/panel-time-range.vue.d.ts +2 -2
- package/dist/components/tour/EpTour.vue.d.ts +1 -1
- package/dist/components/tree-select/src/tree-select.vue.d.ts +10 -10
- package/dist/components/tree-v2/EpTreeNode.vue.d.ts +17 -0
- package/dist/components/tree-v2/EpTreeNode.vue.js +127 -0
- package/dist/components/tree-v2/EpTreeNode2.vue.js +4 -0
- package/dist/components/tree-v2/EpTreeV2.vue.d.ts +61 -0
- package/dist/components/tree-v2/EpTreeV2.vue.js +168 -0
- package/dist/components/tree-v2/EpTreeV22.vue.js +4 -0
- package/dist/components/tree-v2/composables/useCheck.d.ts +15 -0
- package/dist/components/tree-v2/composables/useCheck.js +142 -0
- package/dist/components/tree-v2/composables/useFilter.d.ts +8 -0
- package/dist/components/tree-v2/composables/useFilter.js +50 -0
- package/dist/components/tree-v2/composables/useTree.d.ts +404 -0
- package/dist/components/tree-v2/composables/useTree.js +228 -0
- package/dist/components/tree-v2/index.d.ts +11 -2
- package/dist/components/tree-v2/index.js +5 -2
- package/dist/components/tree-v2/instance.d.ts +2 -0
- package/dist/components/tree-v2/tree-node-content.d.ts +20 -0
- package/dist/components/tree-v2/tree-node-content.js +33 -0
- package/dist/components/tree-v2/types.d.ts +97 -0
- package/dist/components/tree-v2/virtual-tree.d.ts +122 -0
- package/dist/components/tree-v2/virtual-tree.js +140 -0
- package/dist/components/virtual-list/src/builders/build-grid.d.ts +211 -0
- package/dist/components/virtual-list/src/builders/build-grid.js +449 -0
- package/dist/components/virtual-list/src/components/dynamic-size-grid.d.ts +212 -0
- package/dist/components/virtual-list/src/components/dynamic-size-grid.js +200 -0
- package/dist/components/virtual-list/src/components/fixed-size-grid.d.ts +199 -0
- package/dist/components/virtual-list/src/components/fixed-size-grid.js +126 -0
- package/dist/components/virtual-list/src/hooks/use-grid-touch.d.ts +8 -0
- package/dist/components/virtual-list/src/hooks/use-grid-touch.js +40 -0
- package/dist/components/virtual-list/src/hooks/use-grid-wheel.d.ts +13 -0
- package/dist/components/virtual-list/src/hooks/use-grid-wheel.js +30 -0
- package/dist/components/virtual-list/src/props.js +16 -17
- package/dist/components/virtual-list/src/utils.js +14 -13
- package/dist/components/watermark/EpWatermark.vue.d.ts +18 -0
- package/dist/components/watermark/EpWatermark.vue.js +174 -0
- package/dist/components/watermark/EpWatermark2.vue.js +4 -0
- package/dist/components/watermark/index.d.ts +13 -2
- package/dist/components/watermark/index.js +8 -4
- package/dist/components/watermark/instance.d.ts +2 -0
- package/dist/components/watermark/useClips.d.ts +6 -0
- package/dist/components/watermark/useClips.js +91 -0
- package/dist/components/watermark/utils.d.ts +8 -0
- package/dist/components/watermark/utils.js +21 -0
- package/dist/components/watermark/watermark.d.ts +71 -0
- package/dist/components/watermark/watermark.js +60 -0
- package/dist/constants/date.js +9 -0
- package/dist/directives/index.d.ts +11 -0
- package/dist/directives/index.js +25 -0
- package/dist/directives/trap-focus/index.js +40 -0
- package/dist/ep-craft.js +410 -373
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/use-draggable/index.d.ts +6 -0
- package/dist/hooks/use-draggable/index.js +51 -0
- package/dist/hooks/use-locale/index.js +12 -12
- package/dist/hooks/use-namespace/index.js +23 -23
- package/dist/hooks/use-same-target/index.d.ts +5 -0
- package/dist/hooks/use-same-target/index.js +20 -0
- package/dist/hooks/use-z-index/index.js +15 -15
- package/dist/index.d.ts +32 -2
- package/dist/utils/dom/aria.js +16 -12
- package/dist/utils/vue/icon.js +10 -6
- package/dist/utils/vue/install.js +23 -20
- package/dist/utils/vue/vnode.js +32 -22
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +34 -1
- package/package.json +1 -1
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import type { UnwrapRef } from 'vue';
|
|
2
|
+
import type { ResetAfterIndex } from '../../virtual-list/src/components/dynamic-size-grid';
|
|
3
|
+
import type { GridDefaultSlotParams, GridScrollOptions, Alignment as ScrollStrategy } from '../../virtual-list';
|
|
4
|
+
import type { TableV2GridProps } from './grid';
|
|
5
|
+
declare const TableGrid: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
readonly columns: {
|
|
7
|
+
readonly type: import("vue").PropType<import("./common").AnyColumn[]>;
|
|
8
|
+
readonly required: true;
|
|
9
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
10
|
+
__epPropKey: true;
|
|
11
|
+
};
|
|
12
|
+
readonly data: {
|
|
13
|
+
readonly type: import("vue").PropType<any[]>;
|
|
14
|
+
readonly required: true;
|
|
15
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
16
|
+
__epPropKey: true;
|
|
17
|
+
};
|
|
18
|
+
readonly fixedData: {
|
|
19
|
+
readonly type: import("vue").PropType<any[]>;
|
|
20
|
+
readonly required: false;
|
|
21
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
22
|
+
__epPropKey: true;
|
|
23
|
+
};
|
|
24
|
+
readonly estimatedRowHeight: {
|
|
25
|
+
readonly default: undefined;
|
|
26
|
+
readonly type: import("vue").PropType<number>;
|
|
27
|
+
readonly required: false;
|
|
28
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
29
|
+
readonly __epPropKey: true;
|
|
30
|
+
};
|
|
31
|
+
readonly width: {
|
|
32
|
+
readonly type: import("vue").PropType<number>;
|
|
33
|
+
readonly required: true;
|
|
34
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
35
|
+
__epPropKey: true;
|
|
36
|
+
};
|
|
37
|
+
readonly height: {
|
|
38
|
+
readonly type: import("vue").PropType<number>;
|
|
39
|
+
readonly required: true;
|
|
40
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
41
|
+
__epPropKey: true;
|
|
42
|
+
};
|
|
43
|
+
readonly headerWidth: {
|
|
44
|
+
readonly type: import("vue").PropType<number>;
|
|
45
|
+
readonly required: true;
|
|
46
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
47
|
+
__epPropKey: true;
|
|
48
|
+
};
|
|
49
|
+
readonly headerHeight: import("../../../utils").EpPropFinalized<(new (...args: any[]) => number | number[]) | (() => number | number[]) | (((new (...args: any[]) => number | number[]) | (() => number | number[])) | null)[], unknown, unknown, 50, boolean>;
|
|
50
|
+
readonly bodyWidth: {
|
|
51
|
+
readonly type: import("vue").PropType<number>;
|
|
52
|
+
readonly required: true;
|
|
53
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
54
|
+
__epPropKey: true;
|
|
55
|
+
};
|
|
56
|
+
readonly rowHeight: {
|
|
57
|
+
readonly type: import("vue").PropType<number>;
|
|
58
|
+
readonly required: true;
|
|
59
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
60
|
+
__epPropKey: true;
|
|
61
|
+
};
|
|
62
|
+
readonly cache: import("../../../utils").EpPropFinalized<NumberConstructor, never, never, 2, false>;
|
|
63
|
+
readonly useIsScrolling: BooleanConstructor;
|
|
64
|
+
readonly scrollbarAlwaysOn: BooleanConstructor;
|
|
65
|
+
readonly scrollbarStartGap: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
66
|
+
readonly scrollbarEndGap: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 2, boolean>;
|
|
67
|
+
readonly class: StringConstructor;
|
|
68
|
+
readonly style: {
|
|
69
|
+
readonly type: import("vue").PropType<import("vue").CSSProperties>;
|
|
70
|
+
readonly required: false;
|
|
71
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
72
|
+
__epPropKey: true;
|
|
73
|
+
};
|
|
74
|
+
readonly containerStyle: {
|
|
75
|
+
readonly type: import("vue").PropType<import("vue").CSSProperties>;
|
|
76
|
+
readonly required: false;
|
|
77
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
78
|
+
__epPropKey: true;
|
|
79
|
+
};
|
|
80
|
+
readonly getRowHeight: {
|
|
81
|
+
readonly type: import("vue").PropType<import("../../virtual-list").ItemSize>;
|
|
82
|
+
readonly required: true;
|
|
83
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
84
|
+
__epPropKey: true;
|
|
85
|
+
};
|
|
86
|
+
readonly rowKey: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string | number | symbol) | (() => import("./types").KeyType) | (((new (...args: any[]) => string | number | symbol) | (() => import("./types").KeyType)) | null)[], unknown, unknown, "id", boolean>;
|
|
87
|
+
readonly onRowsRendered: {
|
|
88
|
+
readonly type: import("vue").PropType<(params: import("./grid").onRowRenderedParams) => void>;
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
91
|
+
__epPropKey: true;
|
|
92
|
+
};
|
|
93
|
+
readonly onScroll: {
|
|
94
|
+
readonly type: import("vue").PropType<(...args: any[]) => void>;
|
|
95
|
+
readonly required: false;
|
|
96
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
97
|
+
__epPropKey: true;
|
|
98
|
+
};
|
|
99
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
100
|
+
readonly columns: {
|
|
101
|
+
readonly type: import("vue").PropType<import("./common").AnyColumn[]>;
|
|
102
|
+
readonly required: true;
|
|
103
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
104
|
+
__epPropKey: true;
|
|
105
|
+
};
|
|
106
|
+
readonly data: {
|
|
107
|
+
readonly type: import("vue").PropType<any[]>;
|
|
108
|
+
readonly required: true;
|
|
109
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
110
|
+
__epPropKey: true;
|
|
111
|
+
};
|
|
112
|
+
readonly fixedData: {
|
|
113
|
+
readonly type: import("vue").PropType<any[]>;
|
|
114
|
+
readonly required: false;
|
|
115
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
116
|
+
__epPropKey: true;
|
|
117
|
+
};
|
|
118
|
+
readonly estimatedRowHeight: {
|
|
119
|
+
readonly default: undefined;
|
|
120
|
+
readonly type: import("vue").PropType<number>;
|
|
121
|
+
readonly required: false;
|
|
122
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
123
|
+
readonly __epPropKey: true;
|
|
124
|
+
};
|
|
125
|
+
readonly width: {
|
|
126
|
+
readonly type: import("vue").PropType<number>;
|
|
127
|
+
readonly required: true;
|
|
128
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
129
|
+
__epPropKey: true;
|
|
130
|
+
};
|
|
131
|
+
readonly height: {
|
|
132
|
+
readonly type: import("vue").PropType<number>;
|
|
133
|
+
readonly required: true;
|
|
134
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
135
|
+
__epPropKey: true;
|
|
136
|
+
};
|
|
137
|
+
readonly headerWidth: {
|
|
138
|
+
readonly type: import("vue").PropType<number>;
|
|
139
|
+
readonly required: true;
|
|
140
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
141
|
+
__epPropKey: true;
|
|
142
|
+
};
|
|
143
|
+
readonly headerHeight: import("../../../utils").EpPropFinalized<(new (...args: any[]) => number | number[]) | (() => number | number[]) | (((new (...args: any[]) => number | number[]) | (() => number | number[])) | null)[], unknown, unknown, 50, boolean>;
|
|
144
|
+
readonly bodyWidth: {
|
|
145
|
+
readonly type: import("vue").PropType<number>;
|
|
146
|
+
readonly required: true;
|
|
147
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
148
|
+
__epPropKey: true;
|
|
149
|
+
};
|
|
150
|
+
readonly rowHeight: {
|
|
151
|
+
readonly type: import("vue").PropType<number>;
|
|
152
|
+
readonly required: true;
|
|
153
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
154
|
+
__epPropKey: true;
|
|
155
|
+
};
|
|
156
|
+
readonly cache: import("../../../utils").EpPropFinalized<NumberConstructor, never, never, 2, false>;
|
|
157
|
+
readonly useIsScrolling: BooleanConstructor;
|
|
158
|
+
readonly scrollbarAlwaysOn: BooleanConstructor;
|
|
159
|
+
readonly scrollbarStartGap: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
160
|
+
readonly scrollbarEndGap: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 2, boolean>;
|
|
161
|
+
readonly class: StringConstructor;
|
|
162
|
+
readonly style: {
|
|
163
|
+
readonly type: import("vue").PropType<import("vue").CSSProperties>;
|
|
164
|
+
readonly required: false;
|
|
165
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
166
|
+
__epPropKey: true;
|
|
167
|
+
};
|
|
168
|
+
readonly containerStyle: {
|
|
169
|
+
readonly type: import("vue").PropType<import("vue").CSSProperties>;
|
|
170
|
+
readonly required: false;
|
|
171
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
172
|
+
__epPropKey: true;
|
|
173
|
+
};
|
|
174
|
+
readonly getRowHeight: {
|
|
175
|
+
readonly type: import("vue").PropType<import("../../virtual-list").ItemSize>;
|
|
176
|
+
readonly required: true;
|
|
177
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
178
|
+
__epPropKey: true;
|
|
179
|
+
};
|
|
180
|
+
readonly rowKey: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string | number | symbol) | (() => import("./types").KeyType) | (((new (...args: any[]) => string | number | symbol) | (() => import("./types").KeyType)) | null)[], unknown, unknown, "id", boolean>;
|
|
181
|
+
readonly onRowsRendered: {
|
|
182
|
+
readonly type: import("vue").PropType<(params: import("./grid").onRowRenderedParams) => void>;
|
|
183
|
+
readonly required: false;
|
|
184
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
185
|
+
__epPropKey: true;
|
|
186
|
+
};
|
|
187
|
+
readonly onScroll: {
|
|
188
|
+
readonly type: import("vue").PropType<(...args: any[]) => void>;
|
|
189
|
+
readonly required: false;
|
|
190
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
191
|
+
__epPropKey: true;
|
|
192
|
+
};
|
|
193
|
+
}>> & Readonly<{}>, {
|
|
194
|
+
readonly useIsScrolling: boolean;
|
|
195
|
+
readonly scrollbarAlwaysOn: boolean;
|
|
196
|
+
readonly cache: number;
|
|
197
|
+
readonly estimatedRowHeight: number;
|
|
198
|
+
readonly scrollbarStartGap: number;
|
|
199
|
+
readonly scrollbarEndGap: number;
|
|
200
|
+
readonly rowKey: import("../../../utils").EpPropMergeType<(new (...args: any[]) => string | number | symbol) | (() => import("./types").KeyType) | (((new (...args: any[]) => string | number | symbol) | (() => import("./types").KeyType)) | null)[], unknown, unknown>;
|
|
201
|
+
readonly headerHeight: import("../../../utils").EpPropMergeType<(new (...args: any[]) => number | number[]) | (() => number | number[]) | (((new (...args: any[]) => number | number[]) | (() => number | number[])) | null)[], unknown, unknown>;
|
|
202
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
203
|
+
export default TableGrid;
|
|
204
|
+
export type TableGridRowSlotParams = {
|
|
205
|
+
columns: TableV2GridProps['columns'];
|
|
206
|
+
rowData: any;
|
|
207
|
+
} & GridDefaultSlotParams;
|
|
208
|
+
export type TableGridInstance = InstanceType<typeof TableGrid> & UnwrapRef<{
|
|
209
|
+
forceUpdate: () => void;
|
|
210
|
+
/**
|
|
211
|
+
* @description fetch total height
|
|
212
|
+
*/
|
|
213
|
+
totalHeight: number;
|
|
214
|
+
/**
|
|
215
|
+
* @description scrollTo a position
|
|
216
|
+
* @param { number | ScrollToOptions } arg1
|
|
217
|
+
* @param { number } arg2
|
|
218
|
+
*/
|
|
219
|
+
scrollTo(leftOrOptions: number | GridScrollOptions, top?: number): void;
|
|
220
|
+
/**
|
|
221
|
+
* @description scroll vertically to position y
|
|
222
|
+
*/
|
|
223
|
+
scrollToTop(scrollTop: number): void;
|
|
224
|
+
/**
|
|
225
|
+
* @description scroll to a given row
|
|
226
|
+
* @params row {Number} which row to scroll to
|
|
227
|
+
* @params @optional strategy {ScrollStrategy} use what strategy to scroll to
|
|
228
|
+
*/
|
|
229
|
+
scrollToRow(row: number, strategy: ScrollStrategy): void;
|
|
230
|
+
/**
|
|
231
|
+
* @description reset rendered state after row index
|
|
232
|
+
* @param { number } rowIndex
|
|
233
|
+
* @param { boolean } forceUpdate
|
|
234
|
+
*/
|
|
235
|
+
resetAfterRowIndex: ResetAfterIndex;
|
|
236
|
+
}>;
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { defineComponent as q, inject as Q, provide as X, onActivated as Z, nextTick as $, unref as i, createVNode as L, ref as A, computed as f, watch as O } from "vue";
|
|
2
|
+
import ee from "../../virtual-list/src/components/dynamic-size-grid.js";
|
|
3
|
+
import te from "../../virtual-list/src/components/fixed-size-grid.js";
|
|
4
|
+
import { isNumber as N } from "../../../utils/types.js";
|
|
5
|
+
import "lodash-unified";
|
|
6
|
+
import "@vueuse/core";
|
|
7
|
+
import { isObject as oe } from "@vue/shared";
|
|
8
|
+
import "@element-plus/icons-vue";
|
|
9
|
+
import "./components/cell.js";
|
|
10
|
+
import "./components/header-cell.js";
|
|
11
|
+
import "./header-row.js";
|
|
12
|
+
import re from "./components/header.js";
|
|
13
|
+
import "./row.js";
|
|
14
|
+
import { TableV2InjectionKey as ie, TABLE_V2_GRID_INJECTION_KEY as le } from "./tokens.js";
|
|
15
|
+
import "../../icon/index.js";
|
|
16
|
+
import "./components/expand-icon.js";
|
|
17
|
+
import { tableV2GridProps as ce } from "./grid.js";
|
|
18
|
+
import { sum as ae } from "./utils.js";
|
|
19
|
+
const ne = "EpTableV2Grid", de = (r) => {
|
|
20
|
+
const c = A(), a = A(), n = A(0), u = f(() => {
|
|
21
|
+
const {
|
|
22
|
+
data: e,
|
|
23
|
+
rowHeight: t,
|
|
24
|
+
estimatedRowHeight: o
|
|
25
|
+
} = r;
|
|
26
|
+
if (!o)
|
|
27
|
+
return e.length * t;
|
|
28
|
+
}), s = f(() => {
|
|
29
|
+
const {
|
|
30
|
+
fixedData: e,
|
|
31
|
+
rowHeight: t
|
|
32
|
+
} = r;
|
|
33
|
+
return ((e == null ? void 0 : e.length) || 0) * t;
|
|
34
|
+
}), h = f(() => ae(r.headerHeight)), T = f(() => {
|
|
35
|
+
const {
|
|
36
|
+
height: e
|
|
37
|
+
} = r;
|
|
38
|
+
return Math.max(0, e - i(h) - i(s));
|
|
39
|
+
}), H = f(() => i(h) + i(s) > 0), R = ({
|
|
40
|
+
data: e,
|
|
41
|
+
rowIndex: t
|
|
42
|
+
}) => e[t][r.rowKey];
|
|
43
|
+
function b({
|
|
44
|
+
rowCacheStart: e,
|
|
45
|
+
rowCacheEnd: t,
|
|
46
|
+
rowVisibleStart: o,
|
|
47
|
+
rowVisibleEnd: l
|
|
48
|
+
}) {
|
|
49
|
+
var d;
|
|
50
|
+
(d = r.onRowsRendered) == null || d.call(r, {
|
|
51
|
+
rowCacheStart: e,
|
|
52
|
+
rowCacheEnd: t,
|
|
53
|
+
rowVisibleStart: o,
|
|
54
|
+
rowVisibleEnd: l
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function y(e, t) {
|
|
58
|
+
var o;
|
|
59
|
+
(o = a.value) == null || o.resetAfterRowIndex(e, t);
|
|
60
|
+
}
|
|
61
|
+
function g(e, t) {
|
|
62
|
+
const o = i(c), l = i(a);
|
|
63
|
+
oe(e) ? (o == null || o.scrollToLeft(e.scrollLeft), n.value = e.scrollLeft, l == null || l.scrollTo(e)) : (o == null || o.scrollToLeft(e), n.value = e, l == null || l.scrollTo({
|
|
64
|
+
scrollLeft: e,
|
|
65
|
+
scrollTop: t
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
function I(e) {
|
|
69
|
+
var t;
|
|
70
|
+
(t = i(a)) == null || t.scrollTo({
|
|
71
|
+
scrollTop: e
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function x(e, t) {
|
|
75
|
+
const o = i(a);
|
|
76
|
+
if (!o) return;
|
|
77
|
+
const l = n.value;
|
|
78
|
+
o.scrollToItem(e, 0, t), l && g({
|
|
79
|
+
scrollLeft: l
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function G() {
|
|
83
|
+
var e, t;
|
|
84
|
+
(e = i(a)) == null || e.$forceUpdate(), (t = i(c)) == null || t.$forceUpdate();
|
|
85
|
+
}
|
|
86
|
+
return O(() => r.bodyWidth, () => {
|
|
87
|
+
var e;
|
|
88
|
+
N(r.estimatedRowHeight) && ((e = a.value) == null || e.resetAfter({
|
|
89
|
+
columnIndex: 0
|
|
90
|
+
}, !1));
|
|
91
|
+
}), {
|
|
92
|
+
bodyRef: a,
|
|
93
|
+
forceUpdate: G,
|
|
94
|
+
fixedRowHeight: s,
|
|
95
|
+
gridHeight: T,
|
|
96
|
+
hasHeader: H,
|
|
97
|
+
headerHeight: h,
|
|
98
|
+
headerRef: c,
|
|
99
|
+
totalHeight: u,
|
|
100
|
+
itemKey: R,
|
|
101
|
+
onItemRendered: b,
|
|
102
|
+
resetAfterRowIndex: y,
|
|
103
|
+
scrollTo: g,
|
|
104
|
+
scrollToTop: I,
|
|
105
|
+
scrollToRow: x,
|
|
106
|
+
scrollLeft: n
|
|
107
|
+
};
|
|
108
|
+
}, Ee = /* @__PURE__ */ q({
|
|
109
|
+
name: ne,
|
|
110
|
+
props: ce,
|
|
111
|
+
setup(r, {
|
|
112
|
+
slots: c,
|
|
113
|
+
expose: a
|
|
114
|
+
}) {
|
|
115
|
+
const {
|
|
116
|
+
ns: n
|
|
117
|
+
} = Q(ie), {
|
|
118
|
+
bodyRef: u,
|
|
119
|
+
fixedRowHeight: s,
|
|
120
|
+
gridHeight: h,
|
|
121
|
+
hasHeader: T,
|
|
122
|
+
headerRef: H,
|
|
123
|
+
headerHeight: R,
|
|
124
|
+
totalHeight: b,
|
|
125
|
+
forceUpdate: y,
|
|
126
|
+
itemKey: g,
|
|
127
|
+
onItemRendered: I,
|
|
128
|
+
resetAfterRowIndex: x,
|
|
129
|
+
scrollTo: G,
|
|
130
|
+
scrollToTop: e,
|
|
131
|
+
scrollToRow: t,
|
|
132
|
+
scrollLeft: o
|
|
133
|
+
} = de(r);
|
|
134
|
+
X(le, o), Z(async () => {
|
|
135
|
+
var m;
|
|
136
|
+
await $();
|
|
137
|
+
const d = (m = u.value) == null ? void 0 : m.states.scrollTop;
|
|
138
|
+
d && e(Math.round(d) + 1);
|
|
139
|
+
}), a({
|
|
140
|
+
forceUpdate: y,
|
|
141
|
+
/**
|
|
142
|
+
* @description fetch total height
|
|
143
|
+
*/
|
|
144
|
+
totalHeight: b,
|
|
145
|
+
/**
|
|
146
|
+
* @description scroll to a position
|
|
147
|
+
*/
|
|
148
|
+
scrollTo: G,
|
|
149
|
+
/**
|
|
150
|
+
* @description scroll vertically to position y
|
|
151
|
+
*/
|
|
152
|
+
scrollToTop: e,
|
|
153
|
+
/**
|
|
154
|
+
* @description scroll to a given row
|
|
155
|
+
* @params row {Number} which row to scroll to
|
|
156
|
+
* @params strategy {ScrollStrategy} use what strategy to scroll to
|
|
157
|
+
*/
|
|
158
|
+
scrollToRow: t,
|
|
159
|
+
/**
|
|
160
|
+
* @description reset rendered state after row index
|
|
161
|
+
*/
|
|
162
|
+
resetAfterRowIndex: x
|
|
163
|
+
});
|
|
164
|
+
const l = () => r.bodyWidth;
|
|
165
|
+
return () => {
|
|
166
|
+
const {
|
|
167
|
+
cache: d,
|
|
168
|
+
columns: m,
|
|
169
|
+
data: w,
|
|
170
|
+
fixedData: W,
|
|
171
|
+
useIsScrolling: D,
|
|
172
|
+
scrollbarAlwaysOn: K,
|
|
173
|
+
scrollbarEndGap: M,
|
|
174
|
+
scrollbarStartGap: V,
|
|
175
|
+
style: _,
|
|
176
|
+
rowHeight: E,
|
|
177
|
+
bodyWidth: U,
|
|
178
|
+
estimatedRowHeight: j,
|
|
179
|
+
headerWidth: z,
|
|
180
|
+
height: P,
|
|
181
|
+
width: S,
|
|
182
|
+
getRowHeight: k,
|
|
183
|
+
onScroll: B
|
|
184
|
+
} = r, v = N(j), F = v ? ee : te, J = i(R);
|
|
185
|
+
return L("div", {
|
|
186
|
+
role: "table",
|
|
187
|
+
class: [n.e("table"), r.class],
|
|
188
|
+
style: _
|
|
189
|
+
}, [L(F, {
|
|
190
|
+
ref: u,
|
|
191
|
+
data: w,
|
|
192
|
+
useIsScrolling: D,
|
|
193
|
+
itemKey: g,
|
|
194
|
+
columnCache: 0,
|
|
195
|
+
columnWidth: v ? l : U,
|
|
196
|
+
totalColumn: 1,
|
|
197
|
+
totalRow: w.length,
|
|
198
|
+
rowCache: d,
|
|
199
|
+
rowHeight: v ? k : E,
|
|
200
|
+
width: S,
|
|
201
|
+
height: i(h),
|
|
202
|
+
class: n.e("body"),
|
|
203
|
+
role: "rowgroup",
|
|
204
|
+
scrollbarStartGap: V,
|
|
205
|
+
scrollbarEndGap: M,
|
|
206
|
+
scrollbarAlwaysOn: K,
|
|
207
|
+
onScroll: B,
|
|
208
|
+
onItemRendered: I,
|
|
209
|
+
perfMode: !1
|
|
210
|
+
}, {
|
|
211
|
+
default: (p) => {
|
|
212
|
+
var C;
|
|
213
|
+
const Y = w[p.rowIndex];
|
|
214
|
+
return (C = c.row) == null ? void 0 : C.call(c, {
|
|
215
|
+
...p,
|
|
216
|
+
columns: m,
|
|
217
|
+
rowData: Y
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}), i(T) && L(re, {
|
|
221
|
+
ref: H,
|
|
222
|
+
class: n.e("header-wrapper"),
|
|
223
|
+
columns: m,
|
|
224
|
+
headerData: w,
|
|
225
|
+
headerHeight: r.headerHeight,
|
|
226
|
+
fixedHeaderData: W,
|
|
227
|
+
rowWidth: z,
|
|
228
|
+
rowHeight: E,
|
|
229
|
+
width: S,
|
|
230
|
+
height: Math.min(J + i(s), P)
|
|
231
|
+
}, {
|
|
232
|
+
dynamic: c.header,
|
|
233
|
+
fixed: c.row
|
|
234
|
+
})]);
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
export {
|
|
239
|
+
Ee as default
|
|
240
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import type { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import type { SortOrder } from './constants';
|
|
3
|
+
import type { Column, ColumnCommonParams, DataGetter, KeyType, RowCommonParams, SortBy, SortState } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Param types
|
|
6
|
+
*/
|
|
7
|
+
export type ColumnSortParams<T> = {
|
|
8
|
+
column: Column<T>;
|
|
9
|
+
key: KeyType;
|
|
10
|
+
order: SortOrder;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Renderer/Getter types
|
|
14
|
+
*/
|
|
15
|
+
export type ExtraCellPropGetter<T> = (params: ColumnCommonParams<T> & RowCommonParams & {
|
|
16
|
+
cellData: T;
|
|
17
|
+
rowData: any;
|
|
18
|
+
}) => any;
|
|
19
|
+
export type ExtractHeaderPropGetter<T> = (params: {
|
|
20
|
+
columns: Column<T>[];
|
|
21
|
+
headerIndex: number;
|
|
22
|
+
}) => any;
|
|
23
|
+
export type ExtractHeaderCellPropGetter<T> = (params: ColumnCommonParams<T> & {
|
|
24
|
+
headerIndex: number;
|
|
25
|
+
}) => any;
|
|
26
|
+
export type ExtractRowPropGetter<T> = (params: {
|
|
27
|
+
columns: Column<T>[];
|
|
28
|
+
} & RowCommonParams) => any;
|
|
29
|
+
export type HeaderClassNameGetter<T> = (params: {
|
|
30
|
+
columns: Column<T>[];
|
|
31
|
+
headerIndex: number;
|
|
32
|
+
}) => string;
|
|
33
|
+
export type RowClassNameGetter<T> = (params: {
|
|
34
|
+
columns: Column<T>[];
|
|
35
|
+
} & RowCommonParams) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Handler types
|
|
38
|
+
*/
|
|
39
|
+
export type ColumnSortHandler<T> = (params: ColumnSortParams<T>) => void;
|
|
40
|
+
export type ColumnResizeHandler<T> = (column: Column<T>, width: number) => void;
|
|
41
|
+
export type ExpandedRowsChangeHandler = (expandedRowKeys: KeyType[]) => void;
|
|
42
|
+
export declare const tableV2Props: {
|
|
43
|
+
readonly cache: import("../../../utils").EpPropFinalized<NumberConstructor, never, never, 2, false>;
|
|
44
|
+
readonly estimatedRowHeight: {
|
|
45
|
+
readonly default: undefined;
|
|
46
|
+
readonly type: import("vue").PropType<number>;
|
|
47
|
+
readonly required: false;
|
|
48
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
49
|
+
readonly __epPropKey: true;
|
|
50
|
+
};
|
|
51
|
+
readonly rowKey: import("../../../utils").EpPropFinalized<(new (...args: any[]) => string | number | symbol) | (() => KeyType) | (((new (...args: any[]) => string | number | symbol) | (() => KeyType)) | null)[], unknown, unknown, "id", boolean>;
|
|
52
|
+
readonly headerClass: {
|
|
53
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => string | HeaderClassNameGetter<any>) | (() => string | HeaderClassNameGetter<any>) | (((new (...args: any[]) => string | HeaderClassNameGetter<any>) | (() => string | HeaderClassNameGetter<any>)) | null)[], unknown, unknown>>;
|
|
54
|
+
readonly required: false;
|
|
55
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
56
|
+
__epPropKey: true;
|
|
57
|
+
};
|
|
58
|
+
readonly headerProps: {
|
|
59
|
+
readonly type: import("vue").PropType<any>;
|
|
60
|
+
readonly required: false;
|
|
61
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
62
|
+
__epPropKey: true;
|
|
63
|
+
};
|
|
64
|
+
readonly headerCellProps: {
|
|
65
|
+
readonly type: import("vue").PropType<any>;
|
|
66
|
+
readonly required: false;
|
|
67
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
68
|
+
__epPropKey: true;
|
|
69
|
+
};
|
|
70
|
+
readonly headerHeight: import("../../../utils").EpPropFinalized<(new (...args: any[]) => number | number[]) | (() => number | number[]) | (((new (...args: any[]) => number | number[]) | (() => number | number[])) | null)[], unknown, unknown, 50, boolean>;
|
|
71
|
+
readonly footerHeight: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
72
|
+
readonly rowClass: {
|
|
73
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => string | RowClassNameGetter<any>) | (() => string | RowClassNameGetter<any>) | (((new (...args: any[]) => string | RowClassNameGetter<any>) | (() => string | RowClassNameGetter<any>)) | null)[], unknown, unknown>>;
|
|
74
|
+
readonly required: false;
|
|
75
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
76
|
+
__epPropKey: true;
|
|
77
|
+
};
|
|
78
|
+
readonly rowProps: {
|
|
79
|
+
readonly type: import("vue").PropType<any>;
|
|
80
|
+
readonly required: false;
|
|
81
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
82
|
+
__epPropKey: true;
|
|
83
|
+
};
|
|
84
|
+
readonly rowHeight: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 50, boolean>;
|
|
85
|
+
readonly cellProps: {
|
|
86
|
+
readonly type: import("vue").PropType<import("../../../utils").EpPropMergeType<(new (...args: any[]) => Record<string, any> | ExtraCellPropGetter<any>) | (() => Record<string, any> | ExtraCellPropGetter<any>) | (((new (...args: any[]) => Record<string, any> | ExtraCellPropGetter<any>) | (() => Record<string, any> | ExtraCellPropGetter<any>)) | null)[], unknown, unknown>>;
|
|
87
|
+
readonly required: false;
|
|
88
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
89
|
+
__epPropKey: true;
|
|
90
|
+
};
|
|
91
|
+
readonly columns: {
|
|
92
|
+
readonly type: import("vue").PropType<import("./common").AnyColumn[]>;
|
|
93
|
+
readonly required: true;
|
|
94
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
95
|
+
__epPropKey: true;
|
|
96
|
+
};
|
|
97
|
+
readonly data: {
|
|
98
|
+
readonly type: import("vue").PropType<any[]>;
|
|
99
|
+
readonly required: true;
|
|
100
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
101
|
+
__epPropKey: true;
|
|
102
|
+
};
|
|
103
|
+
readonly dataGetter: {
|
|
104
|
+
readonly type: import("vue").PropType<DataGetter<any>>;
|
|
105
|
+
readonly required: false;
|
|
106
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
107
|
+
__epPropKey: true;
|
|
108
|
+
};
|
|
109
|
+
readonly fixedData: {
|
|
110
|
+
readonly type: import("vue").PropType<any[]>;
|
|
111
|
+
readonly required: false;
|
|
112
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
113
|
+
__epPropKey: true;
|
|
114
|
+
};
|
|
115
|
+
readonly expandColumnKey: StringConstructor;
|
|
116
|
+
readonly expandedRowKeys: import("../../../utils").EpPropFinalized<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | (((new (...args: any[]) => KeyType[]) | (() => KeyType[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
117
|
+
readonly defaultExpandedRowKeys: import("../../../utils").EpPropFinalized<(new (...args: any[]) => KeyType[]) | (() => KeyType[]) | (((new (...args: any[]) => KeyType[]) | (() => KeyType[])) | null)[], unknown, unknown, () => never[], boolean>;
|
|
118
|
+
readonly class: StringConstructor;
|
|
119
|
+
readonly fixed: BooleanConstructor;
|
|
120
|
+
readonly style: {
|
|
121
|
+
readonly type: import("vue").PropType<CSSProperties>;
|
|
122
|
+
readonly required: false;
|
|
123
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
124
|
+
__epPropKey: true;
|
|
125
|
+
};
|
|
126
|
+
readonly width: {
|
|
127
|
+
readonly type: import("vue").PropType<number>;
|
|
128
|
+
readonly required: true;
|
|
129
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
130
|
+
__epPropKey: true;
|
|
131
|
+
};
|
|
132
|
+
readonly height: {
|
|
133
|
+
readonly type: import("vue").PropType<number>;
|
|
134
|
+
readonly required: true;
|
|
135
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
136
|
+
__epPropKey: true;
|
|
137
|
+
};
|
|
138
|
+
readonly maxHeight: NumberConstructor;
|
|
139
|
+
readonly useIsScrolling: BooleanConstructor;
|
|
140
|
+
readonly indentSize: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
141
|
+
readonly iconSize: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 12, boolean>;
|
|
142
|
+
readonly hScrollbarSize: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
143
|
+
readonly vScrollbarSize: import("../../../utils").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
|
|
144
|
+
readonly scrollbarAlwaysOn: BooleanConstructor;
|
|
145
|
+
readonly sortBy: import("../../../utils").EpPropFinalized<(new (...args: any[]) => SortBy) | (() => SortBy) | (((new (...args: any[]) => SortBy) | (() => SortBy)) | null)[], unknown, unknown, () => {
|
|
146
|
+
key: KeyType;
|
|
147
|
+
order: SortOrder;
|
|
148
|
+
}, boolean>;
|
|
149
|
+
readonly sortState: import("../../../utils").EpPropFinalized<(new (...args: any[]) => SortState) | (() => SortState) | (((new (...args: any[]) => SortState) | (() => SortState)) | null)[], unknown, unknown, undefined, boolean>;
|
|
150
|
+
readonly onColumnSort: {
|
|
151
|
+
readonly type: import("vue").PropType<ColumnSortHandler<any>>;
|
|
152
|
+
readonly required: false;
|
|
153
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
154
|
+
__epPropKey: true;
|
|
155
|
+
};
|
|
156
|
+
readonly onExpandedRowsChange: {
|
|
157
|
+
readonly type: import("vue").PropType<ExpandedRowsChangeHandler>;
|
|
158
|
+
readonly required: false;
|
|
159
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
160
|
+
__epPropKey: true;
|
|
161
|
+
};
|
|
162
|
+
readonly onEndReached: {
|
|
163
|
+
readonly type: import("vue").PropType<(remainDistance: number) => void>;
|
|
164
|
+
readonly required: false;
|
|
165
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
166
|
+
__epPropKey: true;
|
|
167
|
+
};
|
|
168
|
+
readonly onRowExpand: {
|
|
169
|
+
readonly type: import("vue").PropType<import("./row").RowExpandHandler>;
|
|
170
|
+
readonly required: false;
|
|
171
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
172
|
+
__epPropKey: true;
|
|
173
|
+
};
|
|
174
|
+
readonly onScroll: {
|
|
175
|
+
readonly type: import("vue").PropType<(...args: any[]) => void>;
|
|
176
|
+
readonly required: false;
|
|
177
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
178
|
+
__epPropKey: true;
|
|
179
|
+
};
|
|
180
|
+
readonly onRowsRendered: {
|
|
181
|
+
readonly type: import("vue").PropType<(params: import("./grid").onRowRenderedParams) => void>;
|
|
182
|
+
readonly required: false;
|
|
183
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
184
|
+
__epPropKey: true;
|
|
185
|
+
};
|
|
186
|
+
readonly rowEventHandlers: {
|
|
187
|
+
readonly type: import("vue").PropType<import("./row").RowEventHandlers>;
|
|
188
|
+
readonly required: false;
|
|
189
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
190
|
+
__epPropKey: true;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
export type TableV2Props = ExtractPropTypes<typeof tableV2Props>;
|
|
194
|
+
export type TableV2PropsPublic = ExtractPublicPropTypes<typeof tableV2Props>;
|