@adapttable/ant-design-vue 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +555 -2
- package/dist/AnchoredPopover-B-zosogj.cjs +96 -0
- package/dist/AnchoredPopover-B-zosogj.cjs.map +1 -0
- package/dist/AnchoredPopover-B9QYyyy-.js +85 -0
- package/dist/AnchoredPopover-B9QYyyy-.js.map +1 -0
- package/dist/AntdCard-CFVZgsUM.js +34 -0
- package/dist/AntdCard-CFVZgsUM.js.map +1 -0
- package/dist/AntdCard-Jx9wJdT_.cjs +39 -0
- package/dist/AntdCard-Jx9wJdT_.cjs.map +1 -0
- package/dist/AntdCheckbox-D9gzdPeG.cjs +112 -0
- package/dist/AntdCheckbox-D9gzdPeG.cjs.map +1 -0
- package/dist/AntdCheckbox-D_B7eXrQ.js +107 -0
- package/dist/AntdCheckbox-D_B7eXrQ.js.map +1 -0
- package/dist/AntdColumnMenuPanel-BisjIL_u.js +126 -0
- package/dist/AntdColumnMenuPanel-BisjIL_u.js.map +1 -0
- package/dist/AntdColumnMenuPanel-QsF2AHKd.cjs +137 -0
- package/dist/AntdColumnMenuPanel-QsF2AHKd.cjs.map +1 -0
- package/dist/AntdFilterField-D-w-xtRS.js +337 -0
- package/dist/AntdFilterField-D-w-xtRS.js.map +1 -0
- package/dist/AntdFilterField-DYdwUyPe.cjs +366 -0
- package/dist/AntdFilterField-DYdwUyPe.cjs.map +1 -0
- package/dist/AntdFilterHeaderRow-C2zlhb1L.js +221 -0
- package/dist/AntdFilterHeaderRow-C2zlhb1L.js.map +1 -0
- package/dist/AntdFilterHeaderRow-DZ2Pq2BG.cjs +232 -0
- package/dist/AntdFilterHeaderRow-DZ2Pq2BG.cjs.map +1 -0
- package/dist/AntdFilterHeaderRow.vue-bSjrpoCP.d.cts +33 -0
- package/dist/AntdFilterHeaderRow.vue-bSjrpoCP.d.cts.map +1 -0
- package/dist/AntdFilterHeaderRow.vue-bSjrpoCP.d.ts +33 -0
- package/dist/AntdFilterHeaderRow.vue-bSjrpoCP.d.ts.map +1 -0
- package/dist/AntdInput-BFNEDXzq.cjs +97 -0
- package/dist/AntdInput-BFNEDXzq.cjs.map +1 -0
- package/dist/AntdInput-ONL_AJ3Y.js +92 -0
- package/dist/AntdInput-ONL_AJ3Y.js.map +1 -0
- package/dist/AntdRowActions-D2Pce95h.cjs +106 -0
- package/dist/AntdRowActions-D2Pce95h.cjs.map +1 -0
- package/dist/AntdRowActions-cZQk-mT_.js +101 -0
- package/dist/AntdRowActions-cZQk-mT_.js.map +1 -0
- package/dist/AntdSelect-D-Oy0101.js +140 -0
- package/dist/AntdSelect-D-Oy0101.js.map +1 -0
- package/dist/AntdSelect-DYoLHfOo.cjs +151 -0
- package/dist/AntdSelect-DYoLHfOo.cjs.map +1 -0
- package/dist/antdActionSlots-CjNxmqIB.cjs +13 -0
- package/dist/antdActionSlots-CjNxmqIB.cjs.map +1 -0
- package/dist/antdActionSlots-eKczvTu9.js +8 -0
- package/dist/antdActionSlots-eKczvTu9.js.map +1 -0
- package/dist/antdRemainingControls-CQcrvZpV.js +237 -0
- package/dist/antdRemainingControls-CQcrvZpV.js.map +1 -0
- package/dist/antdRemainingControls-CjAK8L7r.cjs +260 -0
- package/dist/antdRemainingControls-CjAK8L7r.cjs.map +1 -0
- package/dist/assistant.cjs +339 -0
- package/dist/assistant.cjs.map +1 -0
- package/dist/assistant.d.cts +10 -0
- package/dist/assistant.d.cts.map +1 -0
- package/dist/assistant.d.ts +10 -0
- package/dist/assistant.d.ts.map +1 -0
- package/dist/assistant.js +335 -0
- package/dist/assistant.js.map +1 -0
- package/dist/batch-editing.cjs +4 -0
- package/dist/batch-editing.d.cts +2 -0
- package/dist/batch-editing.d.ts +2 -0
- package/dist/batch-editing.js +2 -0
- package/dist/bulk-actions.cjs +15 -0
- package/dist/bulk-actions.cjs.map +1 -0
- package/dist/bulk-actions.d.cts +6 -0
- package/dist/bulk-actions.d.cts.map +1 -0
- package/dist/bulk-actions.d.ts +6 -0
- package/dist/bulk-actions.d.ts.map +1 -0
- package/dist/bulk-actions.js +14 -0
- package/dist/bulk-actions.js.map +1 -0
- package/dist/button-llfktOrH.cjs +77 -0
- package/dist/button-llfktOrH.cjs.map +1 -0
- package/dist/button-pAA17ogP.js +66 -0
- package/dist/button-pAA17ogP.js.map +1 -0
- package/dist/cell-navigation-C7nWnSxt.cjs +85 -0
- package/dist/cell-navigation-C7nWnSxt.cjs.map +1 -0
- package/dist/cell-navigation-gmXXkZ0E.js +74 -0
- package/dist/cell-navigation-gmXXkZ0E.js.map +1 -0
- package/dist/cell-navigation.cjs +4 -0
- package/dist/cell-navigation.d.cts +9 -0
- package/dist/cell-navigation.d.cts.map +1 -0
- package/dist/cell-navigation.d.ts +9 -0
- package/dist/cell-navigation.d.ts.map +1 -0
- package/dist/cell-navigation.js +2 -0
- package/dist/cell-span.cjs +8 -0
- package/dist/cell-span.d.cts +2 -0
- package/dist/cell-span.d.ts +2 -0
- package/dist/cell-span.js +2 -0
- package/dist/checkbox-BRHAklGV.js +21 -0
- package/dist/checkbox-BRHAklGV.js.map +1 -0
- package/dist/checkbox-DBL8jd6A.cjs +26 -0
- package/dist/checkbox-DBL8jd6A.cjs.map +1 -0
- package/dist/classNamesContext-18Wbxy4F.js +2 -0
- package/dist/column-groups.cjs +8 -0
- package/dist/column-groups.d.cts +2 -0
- package/dist/column-groups.d.ts +2 -0
- package/dist/column-groups.js +2 -0
- package/dist/column-layout.cjs +24 -0
- package/dist/column-layout.cjs.map +1 -0
- package/dist/column-layout.d.cts +12 -0
- package/dist/column-layout.d.cts.map +1 -0
- package/dist/column-layout.d.ts +12 -0
- package/dist/column-layout.d.ts.map +1 -0
- package/dist/column-layout.js +22 -0
- package/dist/column-layout.js.map +1 -0
- package/dist/column-menu-BIQ0V_l4.js +134 -0
- package/dist/column-menu-BIQ0V_l4.js.map +1 -0
- package/dist/column-menu-C8AEmjov.cjs +145 -0
- package/dist/column-menu-C8AEmjov.cjs.map +1 -0
- package/dist/column-menu.cjs +4 -0
- package/dist/column-menu.d.cts +34 -0
- package/dist/column-menu.d.cts.map +1 -0
- package/dist/column-menu.d.ts +34 -0
- package/dist/column-menu.d.ts.map +1 -0
- package/dist/column-menu.js +2 -0
- package/dist/column-selection.cjs +3 -0
- package/dist/column-selection.d.cts +2 -0
- package/dist/column-selection.d.ts +2 -0
- package/dist/column-selection.js +2 -0
- package/dist/columns.cjs +26 -0
- package/dist/columns.d.cts +3 -0
- package/dist/columns.d.ts +3 -0
- package/dist/columns.js +2 -0
- package/dist/command-palette.cjs +43 -0
- package/dist/command-palette.cjs.map +1 -0
- package/dist/command-palette.d.cts +7 -0
- package/dist/command-palette.d.cts.map +1 -0
- package/dist/command-palette.d.ts +7 -0
- package/dist/command-palette.d.ts.map +1 -0
- package/dist/command-palette.js +42 -0
- package/dist/command-palette.js.map +1 -0
- package/dist/context-menu.cjs +34 -0
- package/dist/context-menu.cjs.map +1 -0
- package/dist/context-menu.d.cts +7 -0
- package/dist/context-menu.d.cts.map +1 -0
- package/dist/context-menu.d.ts +7 -0
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +33 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/density-BGYZiREt.js +81 -0
- package/dist/density-BGYZiREt.js.map +1 -0
- package/dist/density-DwoIsjhn.cjs +86 -0
- package/dist/density-DwoIsjhn.cjs.map +1 -0
- package/dist/density.cjs +3 -0
- package/dist/density.d.cts +7 -0
- package/dist/density.d.cts.map +1 -0
- package/dist/density.d.ts +7 -0
- package/dist/density.d.ts.map +1 -0
- package/dist/density.js +2 -0
- package/dist/editing-C2bX-h0b.js +406 -0
- package/dist/editing-C2bX-h0b.js.map +1 -0
- package/dist/editing-D7nib8vf.d.cts +68 -0
- package/dist/editing-D7nib8vf.d.cts.map +1 -0
- package/dist/editing-DwmhJyRy.cjs +452 -0
- package/dist/editing-DwmhJyRy.cjs.map +1 -0
- package/dist/editing-EcNF6SH-.d.ts +68 -0
- package/dist/editing-EcNF6SH-.d.ts.map +1 -0
- package/dist/editing.cjs +13 -0
- package/dist/editing.d.cts +2 -0
- package/dist/editing.d.ts +2 -0
- package/dist/editing.js +2 -0
- package/dist/export-BvFzcnOH.cjs +15 -0
- package/dist/export-BvFzcnOH.cjs.map +1 -0
- package/dist/export-LdiMI-Kb.js +10 -0
- package/dist/export-LdiMI-Kb.js.map +1 -0
- package/dist/export-pdf.cjs +53 -0
- package/dist/export-pdf.cjs.map +1 -0
- package/dist/export-pdf.d.cts +8 -0
- package/dist/export-pdf.d.cts.map +1 -0
- package/dist/export-pdf.d.ts +8 -0
- package/dist/export-pdf.d.ts.map +1 -0
- package/dist/export-pdf.js +10 -0
- package/dist/export-pdf.js.map +1 -0
- package/dist/export-xlsx.cjs +23 -0
- package/dist/export-xlsx.cjs.map +1 -0
- package/dist/export-xlsx.d.cts +8 -0
- package/dist/export-xlsx.d.cts.map +1 -0
- package/dist/export-xlsx.d.ts +8 -0
- package/dist/export-xlsx.d.ts.map +1 -0
- package/dist/export-xlsx.js +10 -0
- package/dist/export-xlsx.js.map +1 -0
- package/dist/export.cjs +3 -0
- package/dist/export.d.cts +9 -0
- package/dist/export.d.cts.map +1 -0
- package/dist/export.d.ts +9 -0
- package/dist/export.d.ts.map +1 -0
- package/dist/export.js +2 -0
- package/dist/extra-rows.cjs +8 -0
- package/dist/extra-rows.d.cts +2 -0
- package/dist/extra-rows.d.ts +2 -0
- package/dist/extra-rows.js +2 -0
- package/dist/filtering.cjs +22 -0
- package/dist/filtering.cjs.map +1 -0
- package/dist/filtering.d.cts +13 -0
- package/dist/filtering.d.cts.map +1 -0
- package/dist/filtering.d.ts +13 -0
- package/dist/filtering.d.ts.map +1 -0
- package/dist/filtering.js +21 -0
- package/dist/filtering.js.map +1 -0
- package/dist/filters-B9Bku-_Z.js +256 -0
- package/dist/filters-B9Bku-_Z.js.map +1 -0
- package/dist/filters-C7_REVIj.cjs +308 -0
- package/dist/filters-C7_REVIj.cjs.map +1 -0
- package/dist/filters.cjs +21 -0
- package/dist/filters.d.cts +77 -0
- package/dist/filters.d.cts.map +1 -0
- package/dist/filters.d.ts +77 -0
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +3 -0
- package/dist/find-in-table-BwSZ3K3a.js +57 -0
- package/dist/find-in-table-BwSZ3K3a.js.map +1 -0
- package/dist/find-in-table-DrcHalH3.cjs +61 -0
- package/dist/find-in-table-DrcHalH3.cjs.map +1 -0
- package/dist/find-in-table.cjs +3 -0
- package/dist/find-in-table.d.cts +9 -0
- package/dist/find-in-table.d.cts.map +1 -0
- package/dist/find-in-table.d.ts +9 -0
- package/dist/find-in-table.d.ts.map +1 -0
- package/dist/find-in-table.js +2 -0
- package/dist/fit-columns.cjs +8 -0
- package/dist/fit-columns.d.cts +2 -0
- package/dist/fit-columns.d.ts +2 -0
- package/dist/fit-columns.js +2 -0
- package/dist/focusTrap-CBLumRSW.cjs +52 -0
- package/dist/focusTrap-CBLumRSW.cjs.map +1 -0
- package/dist/focusTrap-pCE3KCOC.js +41 -0
- package/dist/focusTrap-pCE3KCOC.js.map +1 -0
- package/dist/fullscreen.cjs +15 -0
- package/dist/fullscreen.cjs.map +1 -0
- package/dist/fullscreen.d.cts +6 -0
- package/dist/fullscreen.d.cts.map +1 -0
- package/dist/fullscreen.d.ts +6 -0
- package/dist/fullscreen.d.ts.map +1 -0
- package/dist/fullscreen.js +14 -0
- package/dist/fullscreen.js.map +1 -0
- package/dist/grouping-panel.cjs +145 -0
- package/dist/grouping-panel.cjs.map +1 -0
- package/dist/grouping-panel.d.cts +8 -0
- package/dist/grouping-panel.d.cts.map +1 -0
- package/dist/grouping-panel.d.ts +8 -0
- package/dist/grouping-panel.d.ts.map +1 -0
- package/dist/grouping-panel.js +145 -0
- package/dist/grouping-panel.js.map +1 -0
- package/dist/grouping.cjs +41 -0
- package/dist/grouping.cjs.map +1 -0
- package/dist/grouping.d.cts +10 -0
- package/dist/grouping.d.cts.map +1 -0
- package/dist/grouping.d.ts +10 -0
- package/dist/grouping.d.ts.map +1 -0
- package/dist/grouping.js +22 -0
- package/dist/grouping.js.map +1 -0
- package/dist/handlers-Br0_3lPS.cjs +17 -0
- package/dist/handlers-Br0_3lPS.cjs.map +1 -0
- package/dist/handlers-xPUYC5j6.js +12 -0
- package/dist/handlers-xPUYC5j6.js.map +1 -0
- package/dist/header-filters-0xo31PXV.js +70 -0
- package/dist/header-filters-0xo31PXV.js.map +1 -0
- package/dist/header-filters-DYsEkFD9.cjs +80 -0
- package/dist/header-filters-DYsEkFD9.cjs.map +1 -0
- package/dist/header-filters.cjs +7 -0
- package/dist/header-filters.d.cts +24 -0
- package/dist/header-filters.d.cts.map +1 -0
- package/dist/header-filters.d.ts +24 -0
- package/dist/header-filters.d.ts.map +1 -0
- package/dist/header-filters.js +3 -0
- package/dist/icon-BDUM_Xmy.js +18 -0
- package/dist/icon-BDUM_Xmy.js.map +1 -0
- package/dist/icon-CeQ6QTNJ.cjs +23 -0
- package/dist/icon-CeQ6QTNJ.cjs.map +1 -0
- package/dist/index.cjs +599 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +24 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +597 -0
- package/dist/index.js.map +1 -0
- package/dist/menuKeyboard-Be6RV6HV.cjs +81 -0
- package/dist/menuKeyboard-Be6RV6HV.cjs.map +1 -0
- package/dist/menuKeyboard-CpHOc6uW.js +70 -0
- package/dist/menuKeyboard-CpHOc6uW.js.map +1 -0
- package/dist/multi-sort.cjs +8 -0
- package/dist/multi-sort.d.cts +2 -0
- package/dist/multi-sort.d.ts +2 -0
- package/dist/multi-sort.js +2 -0
- package/dist/nested-table.cjs +8 -0
- package/dist/nested-table.d.cts +2 -0
- package/dist/nested-table.d.ts +2 -0
- package/dist/nested-table.js +2 -0
- package/dist/pinned-summary-rows.cjs +8 -0
- package/dist/pinned-summary-rows.d.cts +2 -0
- package/dist/pinned-summary-rows.d.ts +2 -0
- package/dist/pinned-summary-rows.js +2 -0
- package/dist/pivot.cjs +81 -0
- package/dist/pivot.cjs.map +1 -0
- package/dist/pivot.d.cts +10 -0
- package/dist/pivot.d.cts.map +1 -0
- package/dist/pivot.d.ts +10 -0
- package/dist/pivot.d.ts.map +1 -0
- package/dist/pivot.js +80 -0
- package/dist/pivot.js.map +1 -0
- package/dist/popupContainer-C0uOjWEO.cjs +27 -0
- package/dist/popupContainer-C0uOjWEO.cjs.map +1 -0
- package/dist/popupContainer-CzyUSIJI.js +22 -0
- package/dist/popupContainer-CzyUSIJI.js.map +1 -0
- package/dist/preset.cjs +40 -0
- package/dist/preset.cjs.map +1 -0
- package/dist/preset.d.cts +21 -0
- package/dist/preset.d.cts.map +1 -0
- package/dist/preset.d.ts +21 -0
- package/dist/preset.d.ts.map +1 -0
- package/dist/preset.js +38 -0
- package/dist/preset.js.map +1 -0
- package/dist/print.cjs +15 -0
- package/dist/print.cjs.map +1 -0
- package/dist/print.d.cts +6 -0
- package/dist/print.d.cts.map +1 -0
- package/dist/print.d.ts +6 -0
- package/dist/print.d.ts.map +1 -0
- package/dist/print.js +14 -0
- package/dist/print.js.map +1 -0
- package/dist/resizable-columns.cjs +8 -0
- package/dist/resizable-columns.d.cts +2 -0
- package/dist/resizable-columns.d.ts +2 -0
- package/dist/resizable-columns.js +2 -0
- package/dist/row-actions.cjs +15 -0
- package/dist/row-actions.cjs.map +1 -0
- package/dist/row-actions.d.cts +7 -0
- package/dist/row-actions.d.cts.map +1 -0
- package/dist/row-actions.d.ts +7 -0
- package/dist/row-actions.d.ts.map +1 -0
- package/dist/row-actions.js +14 -0
- package/dist/row-actions.js.map +1 -0
- package/dist/row-appearance.cjs +8 -0
- package/dist/row-appearance.d.cts +2 -0
- package/dist/row-appearance.d.ts +2 -0
- package/dist/row-appearance.js +2 -0
- package/dist/row-detail.cjs +28 -0
- package/dist/row-detail.d.cts +4 -0
- package/dist/row-detail.d.ts +4 -0
- package/dist/row-detail.js +4 -0
- package/dist/row-pinning.cjs +15 -0
- package/dist/row-pinning.cjs.map +1 -0
- package/dist/row-pinning.d.cts +8 -0
- package/dist/row-pinning.d.cts.map +1 -0
- package/dist/row-pinning.d.ts +8 -0
- package/dist/row-pinning.d.ts.map +1 -0
- package/dist/row-pinning.js +14 -0
- package/dist/row-pinning.js.map +1 -0
- package/dist/row-reorder.cjs +168 -0
- package/dist/row-reorder.cjs.map +1 -0
- package/dist/row-reorder.d.cts +7 -0
- package/dist/row-reorder.d.cts.map +1 -0
- package/dist/row-reorder.d.ts +7 -0
- package/dist/row-reorder.d.ts.map +1 -0
- package/dist/row-reorder.js +162 -0
- package/dist/row-reorder.js.map +1 -0
- package/dist/rowActionsSlot-75ZknCMX.cjs +21 -0
- package/dist/rowActionsSlot-75ZknCMX.cjs.map +1 -0
- package/dist/rowActionsSlot-CZsFwkQq.js +11 -0
- package/dist/rowActionsSlot-CZsFwkQq.js.map +1 -0
- package/dist/rows.cjs +30 -0
- package/dist/rows.d.cts +6 -0
- package/dist/rows.d.ts +6 -0
- package/dist/rows.js +4 -0
- package/dist/saved-views-B7Z6nwie.js +135 -0
- package/dist/saved-views-B7Z6nwie.js.map +1 -0
- package/dist/saved-views-DBXLa86I.cjs +146 -0
- package/dist/saved-views-DBXLa86I.cjs.map +1 -0
- package/dist/saved-views.cjs +4 -0
- package/dist/saved-views.d.cts +15 -0
- package/dist/saved-views.d.cts.map +1 -0
- package/dist/saved-views.d.ts +15 -0
- package/dist/saved-views.d.ts.map +1 -0
- package/dist/saved-views.js +2 -0
- package/dist/scrollbarGutter-C0KgyWkH.js +39 -0
- package/dist/scrollbarGutter-C0KgyWkH.js.map +1 -0
- package/dist/scrollbarGutter-LdIJUA1p.cjs +50 -0
- package/dist/scrollbarGutter-LdIJUA1p.cjs.map +1 -0
- package/dist/selection-stats.cjs +3 -0
- package/dist/selection-stats.d.cts +2 -0
- package/dist/selection-stats.d.ts +2 -0
- package/dist/selection-stats.js +2 -0
- package/dist/selection.cjs +8 -0
- package/dist/selection.d.cts +2 -0
- package/dist/selection.d.ts +2 -0
- package/dist/selection.js +2 -0
- package/dist/side-panel.cjs +29 -0
- package/dist/side-panel.cjs.map +1 -0
- package/dist/side-panel.d.cts +7 -0
- package/dist/side-panel.d.cts.map +1 -0
- package/dist/side-panel.d.ts +7 -0
- package/dist/side-panel.d.ts.map +1 -0
- package/dist/side-panel.js +28 -0
- package/dist/side-panel.js.map +1 -0
- package/dist/status-bar-D2UUx4zG.cjs +78 -0
- package/dist/status-bar-D2UUx4zG.cjs.map +1 -0
- package/dist/status-bar-DKc2qWoh.js +68 -0
- package/dist/status-bar-DKc2qWoh.js.map +1 -0
- package/dist/status-bar.cjs +4 -0
- package/dist/status-bar.d.cts +7 -0
- package/dist/status-bar.d.cts.map +1 -0
- package/dist/status-bar.d.ts +7 -0
- package/dist/status-bar.d.ts.map +1 -0
- package/dist/status-bar.js +2 -0
- package/dist/styles.css +869 -0
- package/dist/tree.cjs +21 -0
- package/dist/tree.d.cts +3 -0
- package/dist/tree.d.ts +3 -0
- package/dist/tree.js +3 -0
- package/dist/types-CLQKtnFl.d.cts +2 -0
- package/dist/types-CLQKtnFl.d.ts +2 -0
- package/dist/virtualize.cjs +8 -0
- package/dist/virtualize.d.cts +2 -0
- package/dist/virtualize.d.ts +2 -0
- package/dist/virtualize.js +2 -0
- package/dist/withAntdExport-D58sVJ7b.cjs +80 -0
- package/dist/withAntdExport-D58sVJ7b.cjs.map +1 -0
- package/dist/withAntdExport-QFf2KVNO.js +75 -0
- package/dist/withAntdExport-QFf2KVNO.js.map +1 -0
- package/package.json +533 -3
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_button = require("./button-llfktOrH.cjs");
|
|
3
|
+
const require_popupContainer = require("./popupContainer-C0uOjWEO.cjs");
|
|
4
|
+
let vue = require("vue");
|
|
5
|
+
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
6
|
+
let ant_design_vue = require("ant-design-vue");
|
|
7
|
+
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
8
|
+
let _adapttable_vue = require("@adapttable/vue");
|
|
9
|
+
//#region src/reorder/AntdRowMoveMenu.ts
|
|
10
|
+
/** The shared controller owns target selection and pending confirmation. */
|
|
11
|
+
const AntdRowMoveMenu = (0, vue.defineComponent)((props) => {
|
|
12
|
+
const active = (0, _adapttable_vue_adapter.useScopeActivity)();
|
|
13
|
+
let lifetime = 0;
|
|
14
|
+
(0, vue.watch)(active, () => lifetime++, { flush: "sync" });
|
|
15
|
+
const trigger = (0, vue.shallowRef)();
|
|
16
|
+
const description = `adapttable-row-move-${(0, vue.useId)()}`;
|
|
17
|
+
return () => {
|
|
18
|
+
const live = active.value;
|
|
19
|
+
const ticket = lifetime;
|
|
20
|
+
const items = props.items;
|
|
21
|
+
const owner = props.confirmation;
|
|
22
|
+
const isCurrent = () => live && active.value && ticket === lifetime;
|
|
23
|
+
const finish = (kind) => {
|
|
24
|
+
if (!isCurrent() || !owner) return;
|
|
25
|
+
if (props.confirmation?.onConfirm === owner.onConfirm && props.confirmation.onCancel === owner.onCancel) owner[kind]();
|
|
26
|
+
};
|
|
27
|
+
return (0, vue.h)("span", { "data-adapttable-part": "row-move-menu" }, [(0, vue.h)(ant_design_vue.Select, {
|
|
28
|
+
ref: trigger,
|
|
29
|
+
value: void 0,
|
|
30
|
+
placeholder: props.label,
|
|
31
|
+
"aria-label": props.label,
|
|
32
|
+
"data-adapttable-part": "row-move-menu-trigger",
|
|
33
|
+
getPopupContainer: require_popupContainer.popupContainer(false),
|
|
34
|
+
dropdownRender: (menu) => (0, vue.h)("div", { "data-adapttable-part": "row-move-menu-content" }, [menu?.menuNode]),
|
|
35
|
+
disabled: props.items.every((item) => item.disabled),
|
|
36
|
+
options: props.items.map((item) => ({
|
|
37
|
+
value: item.id,
|
|
38
|
+
label: item.label,
|
|
39
|
+
disabled: item.disabled,
|
|
40
|
+
title: item.disabledReason,
|
|
41
|
+
"data-adapttable-part": "row-move-menu-item"
|
|
42
|
+
})),
|
|
43
|
+
onChange: (value) => {
|
|
44
|
+
if (!isCurrent()) return;
|
|
45
|
+
const item = items.find((item) => item.id === value);
|
|
46
|
+
if (item && !item.disabled) item.onSelect();
|
|
47
|
+
(0, _adapttable_vue_adapter.scheduleTick)(() => {
|
|
48
|
+
if (isCurrent()) trigger.value?.$forceUpdate();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}), owner ? (0, vue.h)(ant_design_vue.Modal, {
|
|
52
|
+
open: active.value,
|
|
53
|
+
title: owner.title,
|
|
54
|
+
closable: false,
|
|
55
|
+
destroyOnClose: true,
|
|
56
|
+
keyboard: true,
|
|
57
|
+
wrapProps: {
|
|
58
|
+
"data-adapttable-part": "row-move-confirmation",
|
|
59
|
+
"aria-describedby": description,
|
|
60
|
+
"aria-modal": "true"
|
|
61
|
+
},
|
|
62
|
+
width: "min(28rem, calc(100vw - 2rem))",
|
|
63
|
+
getContainer: false,
|
|
64
|
+
onCancel: () => finish("onCancel")
|
|
65
|
+
}, {
|
|
66
|
+
default: () => (0, vue.h)("p", { id: description }, owner.description),
|
|
67
|
+
footer: () => [require_button.antdButton({
|
|
68
|
+
type: "button",
|
|
69
|
+
"data-adapttable-part": "row-move-cancel",
|
|
70
|
+
onClick: () => finish("onCancel")
|
|
71
|
+
}, owner.cancelLabel), require_button.antdButton({
|
|
72
|
+
type: "button",
|
|
73
|
+
"data-adapttable-part": "row-move-confirm",
|
|
74
|
+
onClick: () => finish("onConfirm")
|
|
75
|
+
}, owner.confirmLabel)]
|
|
76
|
+
}) : null]);
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
name: "AntdRowMoveMenu",
|
|
80
|
+
props: {
|
|
81
|
+
label: { type: String },
|
|
82
|
+
items: { type: Array },
|
|
83
|
+
confirmation: { type: Object }
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/reorder/antdReorderControls.ts
|
|
88
|
+
const antdReorderControls = {
|
|
89
|
+
Handle: ({ label, pressed, dragging, disabled, dragProps, onKeyDown, className }) => require_button.antdButton({
|
|
90
|
+
type: "button",
|
|
91
|
+
"aria-label": label,
|
|
92
|
+
"aria-pressed": pressed,
|
|
93
|
+
"data-dragging": dragging ? "" : void 0,
|
|
94
|
+
"data-adapttable-part": "row-reorder-handle",
|
|
95
|
+
"data-adapttable-grip": "",
|
|
96
|
+
class: className,
|
|
97
|
+
disabled,
|
|
98
|
+
draggable: dragProps.draggable,
|
|
99
|
+
onDragstart: (event) => {
|
|
100
|
+
if (event.dataTransfer) dragProps.onDragStart({
|
|
101
|
+
...event,
|
|
102
|
+
dataTransfer: event.dataTransfer,
|
|
103
|
+
clientY: event.clientY,
|
|
104
|
+
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
105
|
+
preventDefault: () => event.preventDefault()
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
onDragend: dragProps.onDragEnd,
|
|
109
|
+
onKeydown: (event) => onKeyDown({
|
|
110
|
+
key: event.key,
|
|
111
|
+
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
112
|
+
preventDefault: () => event.preventDefault()
|
|
113
|
+
})
|
|
114
|
+
}, "↕"),
|
|
115
|
+
Button: ({ label, part, disabled, onClick, className }) => require_button.antdButton({
|
|
116
|
+
type: "button",
|
|
117
|
+
"aria-label": label,
|
|
118
|
+
"data-adapttable-part": part,
|
|
119
|
+
class: className,
|
|
120
|
+
disabled,
|
|
121
|
+
onClick
|
|
122
|
+
}, label),
|
|
123
|
+
Menu: (props) => (0, vue.h)(AntdRowMoveMenu, props)
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/reorder/AntdRowReorder.vue
|
|
127
|
+
const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
128
|
+
__name: "AntdRowReorder",
|
|
129
|
+
props: {
|
|
130
|
+
model: {},
|
|
131
|
+
labels: {},
|
|
132
|
+
mobile: { type: Boolean },
|
|
133
|
+
classNames: {},
|
|
134
|
+
rowId: {},
|
|
135
|
+
localIndex: {},
|
|
136
|
+
row: {},
|
|
137
|
+
windowStart: {},
|
|
138
|
+
rowCount: {}
|
|
139
|
+
},
|
|
140
|
+
setup(__props) {
|
|
141
|
+
const props = __props;
|
|
142
|
+
const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
|
|
143
|
+
const Render = () => (0, _adapttable_vue_adapter.RowReorderChrome)({
|
|
144
|
+
...props,
|
|
145
|
+
classNames: { ...names.value },
|
|
146
|
+
slots: antdReorderControls
|
|
147
|
+
});
|
|
148
|
+
Render.props = [];
|
|
149
|
+
return (_ctx, _cache) => {
|
|
150
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)(Render);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/row-reorder.ts
|
|
156
|
+
function rowReorder(onRowReorder, options) {
|
|
157
|
+
return (0, _adapttable_vue_adapter.extendFeature)((0, _adapttable_vue_features.rowReorder)(onRowReorder, options), [(0, _adapttable_vue_adapter.slotRender)((0, _adapttable_vue_adapter.rowReorderControlKey)(), (props) => (0, vue.h)(_sfc_main, { ...props }))]);
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
exports.rowReorder = rowReorder;
|
|
161
|
+
Object.defineProperty(exports, "useRowReorder", {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function() {
|
|
164
|
+
return _adapttable_vue.useRowReorder;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=row-reorder.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-reorder.cjs","names":["defineComponent","useScopeActivity","shallowRef","useId","h","Select","popupContainer","Modal","antdButton","antdButton","h","extendFeature","bindingRowReorder","slotRender","rowReorderControlKey","h","AntdRowReorder"],"sources":["../src/reorder/AntdRowMoveMenu.ts","../src/reorder/antdReorderControls.ts","../src/reorder/AntdRowReorder.vue","../src/row-reorder.ts"],"sourcesContent":["import {\n type RowMoveMenuSlotProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { Modal, Select } from \"ant-design-vue\";\nimport {\n defineComponent,\n h,\n type PropType,\n shallowRef,\n useId,\n watch,\n} from \"vue\";\n\nimport { antdButton } from \"../controls/button\";\nimport { popupContainer } from \"../controls/popupContainer\";\n/** The shared controller owns target selection and pending confirmation. */\nexport const AntdRowMoveMenu = defineComponent(\n (props: RowMoveMenuSlotProps) => {\n const active = useScopeActivity();\n let lifetime = 0;\n watch(active, () => lifetime++, { flush: \"sync\" });\n const trigger = shallowRef<{ $forceUpdate(): void }>();\n const description = `adapttable-row-move-${useId()}`;\n return () => {\n const live = active.value;\n const ticket = lifetime;\n const items = props.items;\n const owner = props.confirmation;\n const isCurrent = () => live && active.value && ticket === lifetime;\n const finish = (kind: \"onConfirm\" | \"onCancel\") => {\n if (!isCurrent() || !owner) return;\n if (\n props.confirmation?.onConfirm === owner.onConfirm &&\n props.confirmation.onCancel === owner.onCancel\n )\n owner[kind]();\n };\n return h(\"span\", { \"data-adapttable-part\": \"row-move-menu\" }, [\n h(Select, {\n ref: trigger,\n value: undefined,\n placeholder: props.label,\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"row-move-menu-trigger\",\n getPopupContainer: popupContainer(false),\n // The list is the menu's content; the part names the element\n // that wraps it.\n dropdownRender: (menu) =>\n h(\"div\", { \"data-adapttable-part\": \"row-move-menu-content\" }, [\n menu?.menuNode,\n ]),\n disabled: props.items.every((item) => item.disabled),\n options: props.items.map((item) => ({\n value: item.id,\n label: item.label,\n disabled: item.disabled,\n title: item.disabledReason,\n \"data-adapttable-part\": \"row-move-menu-item\",\n })),\n onChange: (value: unknown) => {\n if (!isCurrent()) return;\n const item = items.find((item) => item.id === value);\n if (item && !item.disabled) item.onSelect();\n scheduleTick(() => {\n if (isCurrent()) trigger.value?.$forceUpdate();\n });\n },\n }),\n owner\n ? h(\n Modal,\n {\n open: active.value,\n title: owner.title,\n closable: false,\n destroyOnClose: true,\n keyboard: true,\n // The dialog does not forward attributes, so its name, part\n // and description go on the wrapper that carries role=dialog.\n wrapProps: {\n \"data-adapttable-part\": \"row-move-confirmation\",\n \"aria-describedby\": description,\n \"aria-modal\": \"true\",\n },\n width: \"min(28rem, calc(100vw - 2rem))\",\n getContainer: false,\n onCancel: () => finish(\"onCancel\"),\n },\n {\n default: () => h(\"p\", { id: description }, owner.description),\n footer: () => [\n antdButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-cancel\",\n onClick: () => finish(\"onCancel\"),\n },\n owner.cancelLabel\n ),\n antdButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-confirm\",\n onClick: () => finish(\"onConfirm\"),\n },\n owner.confirmLabel\n ),\n ],\n }\n )\n : null,\n ]);\n };\n },\n {\n name: \"AntdRowMoveMenu\",\n props: {\n label: { type: String as PropType<RowMoveMenuSlotProps[\"label\"]> },\n items: { type: Array as PropType<RowMoveMenuSlotProps[\"items\"]> },\n confirmation: {\n type: Object as PropType<RowMoveMenuSlotProps[\"confirmation\"]>,\n },\n },\n }\n);\n","import type { RowReorderControlSlots } from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { antdButton } from \"../controls/button\";\nimport { AntdRowMoveMenu } from \"./AntdRowMoveMenu\";\n\nexport const antdReorderControls: RowReorderControlSlots = {\n Handle: ({\n label,\n pressed,\n dragging,\n disabled,\n dragProps,\n onKeyDown,\n className,\n }) =>\n antdButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"aria-pressed\": pressed,\n \"data-dragging\": dragging ? \"\" : undefined,\n \"data-adapttable-part\": \"row-reorder-handle\",\n \"data-adapttable-grip\": \"\",\n class: className,\n disabled,\n draggable: dragProps.draggable,\n onDragstart: (event: DragEvent) => {\n if (event.dataTransfer)\n dragProps.onDragStart({\n ...event,\n dataTransfer: event.dataTransfer,\n clientY: event.clientY,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n });\n },\n onDragend: dragProps.onDragEnd,\n onKeydown: (event: KeyboardEvent) =>\n onKeyDown({\n key: event.key,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n }),\n },\n \"↕\"\n ),\n Button: ({ label, part, disabled, onClick, className }) =>\n antdButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"data-adapttable-part\": part,\n class: className,\n disabled,\n onClick,\n },\n label\n ),\n Menu: (props) => h(AntdRowMoveMenu, props),\n};\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n RowReorderChrome,\n type RowReorderControlProps,\n} from \"@adapttable/vue/adapter\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { antdReorderControls } from \"./antdReorderControls\";\n\nconst props = defineProps<RowReorderControlProps<TRow>>();\nconst names = useClassNames();\nconst Render = () =>\n RowReorderChrome({\n ...props,\n classNames: { ...names.value },\n slots: antdReorderControls,\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import type {\n RowReorderHandler,\n RowReorderOptions,\n TableFeature,\n} from \"@adapttable/vue\";\nimport {\n extendFeature,\n rowReorderControlKey,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { rowReorder as bindingRowReorder } from \"@adapttable/vue/features\";\nimport { h, type MaybeRefOrGetter } from \"vue\";\n\nimport AntdRowReorder from \"./reorder/AntdRowReorder.vue\";\nexport {\n type RowReorderHandler,\n type RowReorderOptions,\n useRowReorder,\n} from \"@adapttable/vue\";\nexport function rowReorder<TRow>(\n onRowReorder: RowReorderHandler<TRow>,\n options?: MaybeRefOrGetter<RowReorderOptions<TRow> | undefined>\n): TableFeature<TRow> {\n return extendFeature(bindingRowReorder(onRowReorder, options), [\n slotRender(rowReorderControlKey<TRow>(), (props) =>\n h(AntdRowReorder<TRow>, { ...props })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;;AAkBA,MAAa,mBAAA,GAAkBA,IAAAA,gBAAAA,EAC5B,UAAgC;CAC/B,MAAM,UAAA,GAASC,wBAAAA,iBAAAA,CAAiB;CAChC,IAAI,WAAW;CACf,CAAA,GAAA,IAAA,MAAA,CAAM,cAAc,YAAY,EAAE,OAAO,OAAO,CAAC;CACjD,MAAM,WAAA,GAAUC,IAAAA,WAAAA,CAAqC;CACrD,MAAM,cAAc,wBAAA,GAAuBC,IAAAA,MAAAA,CAAM;CACjD,aAAa;EACX,MAAM,OAAO,OAAO;EACpB,MAAM,SAAS;EACf,MAAM,QAAQ,MAAM;EACpB,MAAM,QAAQ,MAAM;EACpB,MAAM,kBAAkB,QAAQ,OAAO,SAAS,WAAW;EAC3D,MAAM,UAAU,SAAmC;GACjD,IAAI,CAAC,UAAU,KAAK,CAAC,OAAO;GAC5B,IACE,MAAM,cAAc,cAAc,MAAM,aACxC,MAAM,aAAa,aAAa,MAAM,UAEtC,MAAM,KAAK,CAAC;EAChB;EACA,QAAA,GAAOC,IAAAA,EAAAA,CAAE,QAAQ,EAAE,wBAAwB,gBAAgB,GAAG,EAAA,GAC5DA,IAAAA,EAAAA,CAAEC,eAAAA,QAAQ;GACR,KAAK;GACL,OAAO,KAAA;GACP,aAAa,MAAM;GACnB,cAAc,MAAM;GACpB,wBAAwB;GACxB,mBAAmBC,uBAAAA,eAAe,KAAK;GAGvC,iBAAiB,UAAA,GACfF,IAAAA,EAAAA,CAAE,OAAO,EAAE,wBAAwB,wBAAwB,GAAG,CAC5D,MAAM,QACR,CAAC;GACH,UAAU,MAAM,MAAM,OAAO,SAAS,KAAK,QAAQ;GACnD,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ReorderHandler, RowReorderHandler as RowReorderHandler$1, RowReorderOptions, RowReorderOptions as RowReorderOptions$1, TableFeature, useRowReorder } from "@adapttable/vue";
|
|
2
|
+
import { MaybeRefOrGetter } from "vue";
|
|
3
|
+
//#region src/row-reorder.d.ts
|
|
4
|
+
declare function rowReorder<TRow>(onRowReorder: RowReorderHandler$1<TRow>, options?: MaybeRefOrGetter<RowReorderOptions$1<TRow> | undefined>): TableFeature<TRow>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { type RowReorderHandler, type RowReorderOptions, rowReorder, useRowReorder };
|
|
7
|
+
//# sourceMappingURL=row-reorder.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-reorder.d.cts","names":[],"sources":["../src/row-reorder.ts"],"mappings":";;;iBAmBgB,WAAW,MACzB,cAAc,oBAAkB,OAChC,UAAU,iBAAiB,oBAAkB,qBAC5C,aAAa"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from "vue";
|
|
2
|
+
import { RowReorderHandler, RowReorderHandler as RowReorderHandler$1, RowReorderOptions, RowReorderOptions as RowReorderOptions$1, TableFeature, useRowReorder } from "@adapttable/vue";
|
|
3
|
+
//#region src/row-reorder.d.ts
|
|
4
|
+
declare function rowReorder<TRow>(onRowReorder: RowReorderHandler$1<TRow>, options?: MaybeRefOrGetter<RowReorderOptions$1<TRow> | undefined>): TableFeature<TRow>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { type RowReorderHandler, type RowReorderOptions, rowReorder, useRowReorder };
|
|
7
|
+
//# sourceMappingURL=row-reorder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-reorder.d.ts","names":[],"sources":["../src/row-reorder.ts"],"mappings":";;;iBAmBgB,WAAW,MACzB,cAAc,oBAAkB,OAChC,UAAU,iBAAiB,oBAAkB,qBAC5C,aAAa"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { t as antdButton } from "./button-pAA17ogP.js";
|
|
2
|
+
import { t as popupContainer } from "./popupContainer-CzyUSIJI.js";
|
|
3
|
+
import { n as useClassNames } from "./classNamesContext-18Wbxy4F.js";
|
|
4
|
+
import { createBlock, defineComponent, h, openBlock, shallowRef, useId, watch } from "vue";
|
|
5
|
+
import { RowReorderChrome, extendFeature, rowReorderControlKey, scheduleTick, slotRender, useScopeActivity } from "@adapttable/vue/adapter";
|
|
6
|
+
import { Modal, Select } from "ant-design-vue";
|
|
7
|
+
import { rowReorder as rowReorder$1 } from "@adapttable/vue/features";
|
|
8
|
+
import { useRowReorder } from "@adapttable/vue";
|
|
9
|
+
//#region src/reorder/AntdRowMoveMenu.ts
|
|
10
|
+
/** The shared controller owns target selection and pending confirmation. */
|
|
11
|
+
const AntdRowMoveMenu = defineComponent((props) => {
|
|
12
|
+
const active = useScopeActivity();
|
|
13
|
+
let lifetime = 0;
|
|
14
|
+
watch(active, () => lifetime++, { flush: "sync" });
|
|
15
|
+
const trigger = shallowRef();
|
|
16
|
+
const description = `adapttable-row-move-${useId()}`;
|
|
17
|
+
return () => {
|
|
18
|
+
const live = active.value;
|
|
19
|
+
const ticket = lifetime;
|
|
20
|
+
const items = props.items;
|
|
21
|
+
const owner = props.confirmation;
|
|
22
|
+
const isCurrent = () => live && active.value && ticket === lifetime;
|
|
23
|
+
const finish = (kind) => {
|
|
24
|
+
if (!isCurrent() || !owner) return;
|
|
25
|
+
if (props.confirmation?.onConfirm === owner.onConfirm && props.confirmation.onCancel === owner.onCancel) owner[kind]();
|
|
26
|
+
};
|
|
27
|
+
return h("span", { "data-adapttable-part": "row-move-menu" }, [h(Select, {
|
|
28
|
+
ref: trigger,
|
|
29
|
+
value: void 0,
|
|
30
|
+
placeholder: props.label,
|
|
31
|
+
"aria-label": props.label,
|
|
32
|
+
"data-adapttable-part": "row-move-menu-trigger",
|
|
33
|
+
getPopupContainer: popupContainer(false),
|
|
34
|
+
dropdownRender: (menu) => h("div", { "data-adapttable-part": "row-move-menu-content" }, [menu?.menuNode]),
|
|
35
|
+
disabled: props.items.every((item) => item.disabled),
|
|
36
|
+
options: props.items.map((item) => ({
|
|
37
|
+
value: item.id,
|
|
38
|
+
label: item.label,
|
|
39
|
+
disabled: item.disabled,
|
|
40
|
+
title: item.disabledReason,
|
|
41
|
+
"data-adapttable-part": "row-move-menu-item"
|
|
42
|
+
})),
|
|
43
|
+
onChange: (value) => {
|
|
44
|
+
if (!isCurrent()) return;
|
|
45
|
+
const item = items.find((item) => item.id === value);
|
|
46
|
+
if (item && !item.disabled) item.onSelect();
|
|
47
|
+
scheduleTick(() => {
|
|
48
|
+
if (isCurrent()) trigger.value?.$forceUpdate();
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}), owner ? h(Modal, {
|
|
52
|
+
open: active.value,
|
|
53
|
+
title: owner.title,
|
|
54
|
+
closable: false,
|
|
55
|
+
destroyOnClose: true,
|
|
56
|
+
keyboard: true,
|
|
57
|
+
wrapProps: {
|
|
58
|
+
"data-adapttable-part": "row-move-confirmation",
|
|
59
|
+
"aria-describedby": description,
|
|
60
|
+
"aria-modal": "true"
|
|
61
|
+
},
|
|
62
|
+
width: "min(28rem, calc(100vw - 2rem))",
|
|
63
|
+
getContainer: false,
|
|
64
|
+
onCancel: () => finish("onCancel")
|
|
65
|
+
}, {
|
|
66
|
+
default: () => h("p", { id: description }, owner.description),
|
|
67
|
+
footer: () => [antdButton({
|
|
68
|
+
type: "button",
|
|
69
|
+
"data-adapttable-part": "row-move-cancel",
|
|
70
|
+
onClick: () => finish("onCancel")
|
|
71
|
+
}, owner.cancelLabel), antdButton({
|
|
72
|
+
type: "button",
|
|
73
|
+
"data-adapttable-part": "row-move-confirm",
|
|
74
|
+
onClick: () => finish("onConfirm")
|
|
75
|
+
}, owner.confirmLabel)]
|
|
76
|
+
}) : null]);
|
|
77
|
+
};
|
|
78
|
+
}, {
|
|
79
|
+
name: "AntdRowMoveMenu",
|
|
80
|
+
props: {
|
|
81
|
+
label: { type: String },
|
|
82
|
+
items: { type: Array },
|
|
83
|
+
confirmation: { type: Object }
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/reorder/antdReorderControls.ts
|
|
88
|
+
const antdReorderControls = {
|
|
89
|
+
Handle: ({ label, pressed, dragging, disabled, dragProps, onKeyDown, className }) => antdButton({
|
|
90
|
+
type: "button",
|
|
91
|
+
"aria-label": label,
|
|
92
|
+
"aria-pressed": pressed,
|
|
93
|
+
"data-dragging": dragging ? "" : void 0,
|
|
94
|
+
"data-adapttable-part": "row-reorder-handle",
|
|
95
|
+
"data-adapttable-grip": "",
|
|
96
|
+
class: className,
|
|
97
|
+
disabled,
|
|
98
|
+
draggable: dragProps.draggable,
|
|
99
|
+
onDragstart: (event) => {
|
|
100
|
+
if (event.dataTransfer) dragProps.onDragStart({
|
|
101
|
+
...event,
|
|
102
|
+
dataTransfer: event.dataTransfer,
|
|
103
|
+
clientY: event.clientY,
|
|
104
|
+
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
105
|
+
preventDefault: () => event.preventDefault()
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
onDragend: dragProps.onDragEnd,
|
|
109
|
+
onKeydown: (event) => onKeyDown({
|
|
110
|
+
key: event.key,
|
|
111
|
+
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
112
|
+
preventDefault: () => event.preventDefault()
|
|
113
|
+
})
|
|
114
|
+
}, "↕"),
|
|
115
|
+
Button: ({ label, part, disabled, onClick, className }) => antdButton({
|
|
116
|
+
type: "button",
|
|
117
|
+
"aria-label": label,
|
|
118
|
+
"data-adapttable-part": part,
|
|
119
|
+
class: className,
|
|
120
|
+
disabled,
|
|
121
|
+
onClick
|
|
122
|
+
}, label),
|
|
123
|
+
Menu: (props) => h(AntdRowMoveMenu, props)
|
|
124
|
+
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/reorder/AntdRowReorder.vue
|
|
127
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
128
|
+
__name: "AntdRowReorder",
|
|
129
|
+
props: {
|
|
130
|
+
model: {},
|
|
131
|
+
labels: {},
|
|
132
|
+
mobile: { type: Boolean },
|
|
133
|
+
classNames: {},
|
|
134
|
+
rowId: {},
|
|
135
|
+
localIndex: {},
|
|
136
|
+
row: {},
|
|
137
|
+
windowStart: {},
|
|
138
|
+
rowCount: {}
|
|
139
|
+
},
|
|
140
|
+
setup(__props) {
|
|
141
|
+
const props = __props;
|
|
142
|
+
const names = useClassNames();
|
|
143
|
+
const Render = () => RowReorderChrome({
|
|
144
|
+
...props,
|
|
145
|
+
classNames: { ...names.value },
|
|
146
|
+
slots: antdReorderControls
|
|
147
|
+
});
|
|
148
|
+
Render.props = [];
|
|
149
|
+
return (_ctx, _cache) => {
|
|
150
|
+
return openBlock(), createBlock(Render);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/row-reorder.ts
|
|
156
|
+
function rowReorder(onRowReorder, options) {
|
|
157
|
+
return extendFeature(rowReorder$1(onRowReorder, options), [slotRender(rowReorderControlKey(), (props) => h(_sfc_main, { ...props }))]);
|
|
158
|
+
}
|
|
159
|
+
//#endregion
|
|
160
|
+
export { rowReorder, useRowReorder };
|
|
161
|
+
|
|
162
|
+
//# sourceMappingURL=row-reorder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"row-reorder.js","names":["bindingRowReorder","AntdRowReorder"],"sources":["../src/reorder/AntdRowMoveMenu.ts","../src/reorder/antdReorderControls.ts","../src/reorder/AntdRowReorder.vue","../src/row-reorder.ts"],"sourcesContent":["import {\n type RowMoveMenuSlotProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { Modal, Select } from \"ant-design-vue\";\nimport {\n defineComponent,\n h,\n type PropType,\n shallowRef,\n useId,\n watch,\n} from \"vue\";\n\nimport { antdButton } from \"../controls/button\";\nimport { popupContainer } from \"../controls/popupContainer\";\n/** The shared controller owns target selection and pending confirmation. */\nexport const AntdRowMoveMenu = defineComponent(\n (props: RowMoveMenuSlotProps) => {\n const active = useScopeActivity();\n let lifetime = 0;\n watch(active, () => lifetime++, { flush: \"sync\" });\n const trigger = shallowRef<{ $forceUpdate(): void }>();\n const description = `adapttable-row-move-${useId()}`;\n return () => {\n const live = active.value;\n const ticket = lifetime;\n const items = props.items;\n const owner = props.confirmation;\n const isCurrent = () => live && active.value && ticket === lifetime;\n const finish = (kind: \"onConfirm\" | \"onCancel\") => {\n if (!isCurrent() || !owner) return;\n if (\n props.confirmation?.onConfirm === owner.onConfirm &&\n props.confirmation.onCancel === owner.onCancel\n )\n owner[kind]();\n };\n return h(\"span\", { \"data-adapttable-part\": \"row-move-menu\" }, [\n h(Select, {\n ref: trigger,\n value: undefined,\n placeholder: props.label,\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"row-move-menu-trigger\",\n getPopupContainer: popupContainer(false),\n // The list is the menu's content; the part names the element\n // that wraps it.\n dropdownRender: (menu) =>\n h(\"div\", { \"data-adapttable-part\": \"row-move-menu-content\" }, [\n menu?.menuNode,\n ]),\n disabled: props.items.every((item) => item.disabled),\n options: props.items.map((item) => ({\n value: item.id,\n label: item.label,\n disabled: item.disabled,\n title: item.disabledReason,\n \"data-adapttable-part\": \"row-move-menu-item\",\n })),\n onChange: (value: unknown) => {\n if (!isCurrent()) return;\n const item = items.find((item) => item.id === value);\n if (item && !item.disabled) item.onSelect();\n scheduleTick(() => {\n if (isCurrent()) trigger.value?.$forceUpdate();\n });\n },\n }),\n owner\n ? h(\n Modal,\n {\n open: active.value,\n title: owner.title,\n closable: false,\n destroyOnClose: true,\n keyboard: true,\n // The dialog does not forward attributes, so its name, part\n // and description go on the wrapper that carries role=dialog.\n wrapProps: {\n \"data-adapttable-part\": \"row-move-confirmation\",\n \"aria-describedby\": description,\n \"aria-modal\": \"true\",\n },\n width: \"min(28rem, calc(100vw - 2rem))\",\n getContainer: false,\n onCancel: () => finish(\"onCancel\"),\n },\n {\n default: () => h(\"p\", { id: description }, owner.description),\n footer: () => [\n antdButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-cancel\",\n onClick: () => finish(\"onCancel\"),\n },\n owner.cancelLabel\n ),\n antdButton(\n {\n type: \"button\",\n \"data-adapttable-part\": \"row-move-confirm\",\n onClick: () => finish(\"onConfirm\"),\n },\n owner.confirmLabel\n ),\n ],\n }\n )\n : null,\n ]);\n };\n },\n {\n name: \"AntdRowMoveMenu\",\n props: {\n label: { type: String as PropType<RowMoveMenuSlotProps[\"label\"]> },\n items: { type: Array as PropType<RowMoveMenuSlotProps[\"items\"]> },\n confirmation: {\n type: Object as PropType<RowMoveMenuSlotProps[\"confirmation\"]>,\n },\n },\n }\n);\n","import type { RowReorderControlSlots } from \"@adapttable/vue/adapter\";\nimport { h } from \"vue\";\n\nimport { antdButton } from \"../controls/button\";\nimport { AntdRowMoveMenu } from \"./AntdRowMoveMenu\";\n\nexport const antdReorderControls: RowReorderControlSlots = {\n Handle: ({\n label,\n pressed,\n dragging,\n disabled,\n dragProps,\n onKeyDown,\n className,\n }) =>\n antdButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"aria-pressed\": pressed,\n \"data-dragging\": dragging ? \"\" : undefined,\n \"data-adapttable-part\": \"row-reorder-handle\",\n \"data-adapttable-grip\": \"\",\n class: className,\n disabled,\n draggable: dragProps.draggable,\n onDragstart: (event: DragEvent) => {\n if (event.dataTransfer)\n dragProps.onDragStart({\n ...event,\n dataTransfer: event.dataTransfer,\n clientY: event.clientY,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n });\n },\n onDragend: dragProps.onDragEnd,\n onKeydown: (event: KeyboardEvent) =>\n onKeyDown({\n key: event.key,\n currentTarget:\n event.currentTarget instanceof HTMLElement\n ? event.currentTarget\n : null,\n preventDefault: () => event.preventDefault(),\n }),\n },\n \"↕\"\n ),\n Button: ({ label, part, disabled, onClick, className }) =>\n antdButton(\n {\n type: \"button\",\n \"aria-label\": label,\n \"data-adapttable-part\": part,\n class: className,\n disabled,\n onClick,\n },\n label\n ),\n Menu: (props) => h(AntdRowMoveMenu, props),\n};\n","<script setup lang=\"ts\" generic=\"TRow\">\nimport {\n RowReorderChrome,\n type RowReorderControlProps,\n} from \"@adapttable/vue/adapter\";\n\nimport { useClassNames } from \"../classNamesContext\";\nimport { antdReorderControls } from \"./antdReorderControls\";\n\nconst props = defineProps<RowReorderControlProps<TRow>>();\nconst names = useClassNames();\nconst Render = () =>\n RowReorderChrome({\n ...props,\n classNames: { ...names.value },\n slots: antdReorderControls,\n });\n\n// Declare no props so Vue forwards all root attributes, including id and data-*.\nconst renderProps: string[] = [];\nRender.props = renderProps;\n</script>\n\n<template>\n <Render />\n</template>\n","import type {\n RowReorderHandler,\n RowReorderOptions,\n TableFeature,\n} from \"@adapttable/vue\";\nimport {\n extendFeature,\n rowReorderControlKey,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { rowReorder as bindingRowReorder } from \"@adapttable/vue/features\";\nimport { h, type MaybeRefOrGetter } from \"vue\";\n\nimport AntdRowReorder from \"./reorder/AntdRowReorder.vue\";\nexport {\n type RowReorderHandler,\n type RowReorderOptions,\n useRowReorder,\n} from \"@adapttable/vue\";\nexport function rowReorder<TRow>(\n onRowReorder: RowReorderHandler<TRow>,\n options?: MaybeRefOrGetter<RowReorderOptions<TRow> | undefined>\n): TableFeature<TRow> {\n return extendFeature(bindingRowReorder(onRowReorder, options), [\n slotRender(rowReorderControlKey<TRow>(), (props) =>\n h(AntdRowReorder<TRow>, { ...props })\n ),\n ]);\n}\n"],"mappings":";;;;;;;;;;AAkBA,MAAa,kBAAkB,iBAC5B,UAAgC;CAC/B,MAAM,SAAS,iBAAiB;CAChC,IAAI,WAAW;CACf,MAAM,cAAc,YAAY,EAAE,OAAO,O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5B,MAAM,eACJ,iBAAiB;GACf,GAAG;GACH,YAAY,EAAE,GAAG,MAAM,MAAM;GAC7B,OAAO;EACT,CAAC;EAIH,OAAO,QAAQ,CAAA;;GAIb,OAAA,UAAA,GAAA,YAAU,MAAA;;;;;;ACLZ,SAAgB,WACd,cACA,SACoB;CACpB,OAAO,cAAcA,aAAkB,cAAc,OAAO,GAAG,CAC7D,WAAW,qBAA2B,IAAI,UACxC,EAAEC,WAAsB,EAAE,GAAG,MAAM,CAAC,CACtC,CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/rowActionsSlot.ts
|
|
2
|
+
/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */
|
|
3
|
+
const ROW_ACTIONS_CONTROL = (0, require("@adapttable/vue/adapter").featureSlotKey)("ant-design-vue-row-actions-control", { single: true });
|
|
4
|
+
function rowActionsControlKey() {
|
|
5
|
+
return ROW_ACTIONS_CONTROL;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
Object.defineProperty(exports, "ROW_ACTIONS_CONTROL", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function() {
|
|
11
|
+
return ROW_ACTIONS_CONTROL;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "rowActionsControlKey", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function() {
|
|
17
|
+
return rowActionsControlKey;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=rowActionsSlot-75ZknCMX.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rowActionsSlot-75ZknCMX.cjs","names":["featureSlotKey"],"sources":["../src/rowActionsSlot.ts"],"sourcesContent":["import type { FeatureSlotKey, RowActionControl } from \"@adapttable/vue\";\nimport {\n type DataTableClassNames,\n featureSlotKey,\n type RowActionsLayout,\n} from \"@adapttable/vue/adapter\";\n\nexport interface RowActionsControlProps<TRow> {\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: \"ltr\" | \"rtl\";\n readonly classNames: DataTableClassNames;\n}\n\n/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */\nexport const ROW_ACTIONS_CONTROL = featureSlotKey<\n RowActionsControlProps<unknown>\n>(\"ant-design-vue-row-actions-control\", { single: true });\n\nexport function rowActionsControlKey<TRow>(): FeatureSlotKey<\n RowActionsControlProps<TRow>\n> {\n return ROW_ACTIONS_CONTROL;\n}\n"],"mappings":";;AAgBA,MAAa,uBAAA,oCAAsBA,CAAAA,CAAAA,eAAAA,CAEjC,sCAAsC,EAAE,QAAQ,KAAK,CAAC;AAExD,SAAgB,uBAEd;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { featureSlotKey } from "@adapttable/vue/adapter";
|
|
2
|
+
//#region src/rowActionsSlot.ts
|
|
3
|
+
/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */
|
|
4
|
+
const ROW_ACTIONS_CONTROL = featureSlotKey("ant-design-vue-row-actions-control", { single: true });
|
|
5
|
+
function rowActionsControlKey() {
|
|
6
|
+
return ROW_ACTIONS_CONTROL;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { rowActionsControlKey as n, ROW_ACTIONS_CONTROL as t };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=rowActionsSlot-CZsFwkQq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rowActionsSlot-CZsFwkQq.js","names":[],"sources":["../src/rowActionsSlot.ts"],"sourcesContent":["import type { FeatureSlotKey, RowActionControl } from \"@adapttable/vue\";\nimport {\n type DataTableClassNames,\n featureSlotKey,\n type RowActionsLayout,\n} from \"@adapttable/vue/adapter\";\n\nexport interface RowActionsControlProps<TRow> {\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: \"ltr\" | \"rtl\";\n readonly classNames: DataTableClassNames;\n}\n\n/** A lightweight channel; only rowActions() or rowPinning() loads its native menu. */\nexport const ROW_ACTIONS_CONTROL = featureSlotKey<\n RowActionsControlProps<unknown>\n>(\"ant-design-vue-row-actions-control\", { single: true });\n\nexport function rowActionsControlKey<TRow>(): FeatureSlotKey<\n RowActionsControlProps<TRow>\n> {\n return ROW_ACTIONS_CONTROL;\n}\n"],"mappings":";;;AAgBA,MAAa,sBAAsB,eAEjC,sCAAsC,EAAE,QAAQ,KAAK,CAAC;AAExD,SAAgB,uBAEd;CACA,OAAO;AACT"}
|
package/dist/rows.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_row_actions = require("./row-actions.cjs");
|
|
3
|
+
const require_row_pinning = require("./row-pinning.cjs");
|
|
4
|
+
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
5
|
+
Object.defineProperty(exports, "cellSpan", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return _adapttable_vue_features.cellSpan;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "extraRows", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function() {
|
|
14
|
+
return _adapttable_vue_features.extraRows;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "pinnedSummaryRows", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function() {
|
|
20
|
+
return _adapttable_vue_features.pinnedSummaryRows;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
exports.rowActions = require_row_actions.rowActions;
|
|
24
|
+
Object.defineProperty(exports, "rowAppearance", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function() {
|
|
27
|
+
return _adapttable_vue_features.rowAppearance;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
exports.rowPinning = require_row_pinning.rowPinning;
|
package/dist/rows.d.cts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { rowActions } from "./row-actions.cjs";
|
|
2
|
+
import { rowPinning } from "./row-pinning.cjs";
|
|
3
|
+
import { CellSpanAppearance, CellSpanRequest, ConfirmHandler, ConfirmRequest, ExtraRowKind, GetCellSpan, GetCellSpanArgs, PinnedRows, PinnedSummaryEntry, RowAction, RowHeight, RowMutationHandlers, RowPinSide, RowPinState, RowStyle } from "@adapttable/vue";
|
|
4
|
+
import { ExtraEntry, ExtraRow } from "@adapttable/vue/adapter";
|
|
5
|
+
import { RowAppearanceOptions, RowPinningFeatureOptions, cellSpan, extraRows, pinnedSummaryRows, rowAppearance } from "@adapttable/vue/features";
|
|
6
|
+
export { type CellSpanAppearance, type CellSpanRequest, type ConfirmHandler, type ConfirmRequest, type ExtraEntry, type ExtraRow, type ExtraRowKind, type GetCellSpan, type GetCellSpanArgs, type PinnedRows, type PinnedSummaryEntry, type RowAction, type RowAppearanceOptions, type RowHeight, type RowMutationHandlers, type RowPinSide, type RowPinState, type RowPinningFeatureOptions, type RowStyle, cellSpan, extraRows, pinnedSummaryRows, rowActions, rowAppearance, rowPinning };
|
package/dist/rows.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { rowActions } from "./row-actions.js";
|
|
2
|
+
import { rowPinning } from "./row-pinning.js";
|
|
3
|
+
import { ExtraEntry, ExtraRow } from "@adapttable/vue/adapter";
|
|
4
|
+
import { RowAppearanceOptions, RowPinningFeatureOptions, cellSpan, extraRows, pinnedSummaryRows, rowAppearance } from "@adapttable/vue/features";
|
|
5
|
+
import { CellSpanAppearance, CellSpanRequest, ConfirmHandler, ConfirmRequest, ExtraRowKind, GetCellSpan, GetCellSpanArgs, PinnedRows, PinnedSummaryEntry, RowAction, RowHeight, RowMutationHandlers, RowPinSide, RowPinState, RowStyle } from "@adapttable/vue";
|
|
6
|
+
export { type CellSpanAppearance, type CellSpanRequest, type ConfirmHandler, type ConfirmRequest, type ExtraEntry, type ExtraRow, type ExtraRowKind, type GetCellSpan, type GetCellSpanArgs, type PinnedRows, type PinnedSummaryEntry, type RowAction, type RowAppearanceOptions, type RowHeight, type RowMutationHandlers, type RowPinSide, type RowPinState, type RowPinningFeatureOptions, type RowStyle, cellSpan, extraRows, pinnedSummaryRows, rowActions, rowAppearance, rowPinning };
|
package/dist/rows.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { rowActions } from "./row-actions.js";
|
|
2
|
+
import { rowPinning } from "./row-pinning.js";
|
|
3
|
+
import { cellSpan, extraRows, pinnedSummaryRows, rowAppearance } from "@adapttable/vue/features";
|
|
4
|
+
export { cellSpan, extraRows, pinnedSummaryRows, rowActions, rowAppearance, rowPinning };
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { t as antdButton } from "./button-pAA17ogP.js";
|
|
2
|
+
import { t as _sfc_main } from "./AntdInput-ONL_AJ3Y.js";
|
|
3
|
+
import { t as AntdCard } from "./AntdCard-CFVZgsUM.js";
|
|
4
|
+
import { t as AntdColumnMenuPanel } from "./AntdColumnMenuPanel-BisjIL_u.js";
|
|
5
|
+
import { defineComponent, h } from "vue";
|
|
6
|
+
import { SAVED_VIEWS_CONTROL, SavedViewsMenuChrome, SavedViewsPanelChrome, extendFeature, managedOverlayPanel, slotRender } from "@adapttable/vue/adapter";
|
|
7
|
+
import { Tag } from "ant-design-vue";
|
|
8
|
+
import { savedViews } from "@adapttable/vue/features";
|
|
9
|
+
//#region src/views/antdSavedViewsControls.ts
|
|
10
|
+
const antdSavedViewsMenuSlots = {
|
|
11
|
+
Trigger: ({ attrs, label }) => antdButton(attrs, label),
|
|
12
|
+
Button: ({ attrs, label }) => antdButton(attrs, label),
|
|
13
|
+
Input: ({ attrs, value, onChange }) => h(_sfc_main, {
|
|
14
|
+
...attrs,
|
|
15
|
+
value,
|
|
16
|
+
onChange
|
|
17
|
+
}),
|
|
18
|
+
Panel: managedOverlayPanel((control) => h(AntdColumnMenuPanel, {
|
|
19
|
+
control,
|
|
20
|
+
initialFocus: "input[data-adapttable-part=\"views-input\"]"
|
|
21
|
+
}))
|
|
22
|
+
};
|
|
23
|
+
function antdSavedViewsPanelSlots(names) {
|
|
24
|
+
return {
|
|
25
|
+
Surface: (props) => h(AntdCard, { attrs: {
|
|
26
|
+
"data-adapttable-part": props["data-adapttable-part"],
|
|
27
|
+
class: props.className
|
|
28
|
+
} }, { default: () => [
|
|
29
|
+
h("h2", { "data-adapttable-part": "saved-views-title" }, props.title),
|
|
30
|
+
props.children,
|
|
31
|
+
props.footer ? h("span", { "data-adapttable-part": "saved-views-footer" }, [props.footer]) : null
|
|
32
|
+
] }),
|
|
33
|
+
Row: (props) => h("div", {
|
|
34
|
+
key: props.viewName,
|
|
35
|
+
class: names().viewsRow,
|
|
36
|
+
"data-adapttable-part": props["data-adapttable-part"],
|
|
37
|
+
style: props.layout.row
|
|
38
|
+
}, [h("div", {
|
|
39
|
+
"data-adapttable-part": "saved-view-caption",
|
|
40
|
+
style: props.layout.caption
|
|
41
|
+
}, [
|
|
42
|
+
props.isEditing ? props.name : antdButton({
|
|
43
|
+
type: "button",
|
|
44
|
+
title: props.applyLabel,
|
|
45
|
+
class: names().viewsItem,
|
|
46
|
+
onClick: props.onApply
|
|
47
|
+
}, [props.name]),
|
|
48
|
+
props.isDefault ? h(Tag, { "data-adapttable-part": "saved-view-default" }, { default: () => props.defaultLabel }) : null,
|
|
49
|
+
props.readOnly ? h(Tag, { "data-adapttable-part": "saved-view-readonly" }, { default: () => props.readOnlyLabel }) : null
|
|
50
|
+
]), h("div", {
|
|
51
|
+
"data-adapttable-part": "saved-view-controls",
|
|
52
|
+
style: props.layout.controls
|
|
53
|
+
}, props.controls.map((control) => antdButton({
|
|
54
|
+
key: control.key,
|
|
55
|
+
type: "button",
|
|
56
|
+
class: names().viewsDelete,
|
|
57
|
+
title: control.label,
|
|
58
|
+
"aria-label": control.label,
|
|
59
|
+
"aria-pressed": control.pressed,
|
|
60
|
+
disabled: !control.onPress,
|
|
61
|
+
onClick: control.onPress,
|
|
62
|
+
style: props.layout.control
|
|
63
|
+
}, [control.icon])))]),
|
|
64
|
+
Input: (props) => h(_sfc_main, {
|
|
65
|
+
inputRef: (element) => {
|
|
66
|
+
if (element instanceof HTMLInputElement || element === null) props.ref(element);
|
|
67
|
+
},
|
|
68
|
+
class: names().viewsInput,
|
|
69
|
+
"aria-label": props.label,
|
|
70
|
+
value: props.value,
|
|
71
|
+
onChange: props.onChange,
|
|
72
|
+
onKeydown: (event) => {
|
|
73
|
+
if (event.isComposing) return;
|
|
74
|
+
if (event.key === "Enter") {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
props.onCommit();
|
|
77
|
+
}
|
|
78
|
+
if (event.key === "Escape") {
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
event.stopPropagation();
|
|
81
|
+
props.onCancel();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}),
|
|
85
|
+
Empty: ({ message }) => h("p", message)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/saved-views.ts
|
|
90
|
+
/** Ant Design Vue management surface over the binding's rename and ordering model. */
|
|
91
|
+
const SavedViewsPanel = defineComponent((props) => {
|
|
92
|
+
const slots = antdSavedViewsPanelSlots(() => props.classNames ?? {});
|
|
93
|
+
return () => {
|
|
94
|
+
const { classNames, ...panelProps } = props;
|
|
95
|
+
return h(SavedViewsPanelChrome, {
|
|
96
|
+
...panelProps,
|
|
97
|
+
className: [props.className, classNames?.viewsPanel].filter(Boolean).join(" "),
|
|
98
|
+
slots
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
}, {
|
|
102
|
+
name: "SavedViewsPanel",
|
|
103
|
+
props: {
|
|
104
|
+
views: { type: Array },
|
|
105
|
+
onApply: { type: Function },
|
|
106
|
+
onRename: { type: Function },
|
|
107
|
+
onMove: { type: Function },
|
|
108
|
+
onSetDefault: { type: Function },
|
|
109
|
+
onRemove: { type: Function },
|
|
110
|
+
labels: { type: Object },
|
|
111
|
+
footer: {
|
|
112
|
+
type: [
|
|
113
|
+
String,
|
|
114
|
+
Number,
|
|
115
|
+
Boolean,
|
|
116
|
+
Array,
|
|
117
|
+
Object
|
|
118
|
+
],
|
|
119
|
+
default: void 0
|
|
120
|
+
},
|
|
121
|
+
className: { type: String },
|
|
122
|
+
classNames: { type: Object }
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
/** The table creates the saved-view model once; this fill only renders it. */
|
|
126
|
+
function savedViews$1(options) {
|
|
127
|
+
return extendFeature(savedViews(options), [slotRender(SAVED_VIEWS_CONTROL, (props) => h(SavedViewsMenuChrome, {
|
|
128
|
+
...props,
|
|
129
|
+
slots: antdSavedViewsMenuSlots
|
|
130
|
+
}))]);
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { savedViews$1 as n, SavedViewsPanel as t };
|
|
134
|
+
|
|
135
|
+
//# sourceMappingURL=saved-views-B7Z6nwie.js.map
|