@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,237 @@
|
|
|
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 { n as handleMenuKey, t as focusOnOpen } from "./menuKeyboard-CpHOc6uW.js";
|
|
5
|
+
import { defineComponent, h, onScopeDispose, shallowRef, watch } from "vue";
|
|
6
|
+
import { managedCommandPaletteSurface, scheduleTick, toVueAttrs, useScopeActivity } from "@adapttable/vue/adapter";
|
|
7
|
+
import { Dropdown, Menu, MenuDivider, MenuItem, Modal } from "ant-design-vue";
|
|
8
|
+
//#region src/actions/AntdCommandSurface.ts
|
|
9
|
+
/** The Ant Design Vue modal owns focus trapping, Escape and outside dismissal. */
|
|
10
|
+
const AntdCommandSurface = defineComponent((props) => {
|
|
11
|
+
const active = useScopeActivity();
|
|
12
|
+
const body = shallowRef(null);
|
|
13
|
+
return () => {
|
|
14
|
+
const owner = props.control;
|
|
15
|
+
return h(Modal, {
|
|
16
|
+
open: active.value && owner.open && owner.isCurrent(),
|
|
17
|
+
title: owner.label,
|
|
18
|
+
class: owner.className,
|
|
19
|
+
wrapProps: { dir: props.dir },
|
|
20
|
+
getContainer: props.container,
|
|
21
|
+
width: "min(32rem, calc(100vw - 2rem))",
|
|
22
|
+
destroyOnClose: true,
|
|
23
|
+
closable: false,
|
|
24
|
+
footer: null,
|
|
25
|
+
maskClosable: true,
|
|
26
|
+
keyboard: true,
|
|
27
|
+
onCancel: () => {
|
|
28
|
+
if (active.value && owner.isCurrent()) owner.onClose();
|
|
29
|
+
}
|
|
30
|
+
}, { default: () => h("div", {
|
|
31
|
+
ref: body,
|
|
32
|
+
"data-adapttable-part": "command-palette"
|
|
33
|
+
}, [owner.children]) });
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
name: "AntdCommandSurface",
|
|
37
|
+
props: {
|
|
38
|
+
control: { type: Object },
|
|
39
|
+
container: { type: Object },
|
|
40
|
+
dir: { type: String }
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/actions/AntdContextSurface.ts
|
|
45
|
+
/**
|
|
46
|
+
* The public dropdown API synchronizes the primitive with the binding's open
|
|
47
|
+
* session. The pointer position is a real, empty positioning host the dropdown
|
|
48
|
+
* anchors to, so Ant Design Vue aligns, flips and closes the menu itself.
|
|
49
|
+
*/
|
|
50
|
+
const AntdContextSurface = defineComponent((props) => {
|
|
51
|
+
const active = useScopeActivity();
|
|
52
|
+
let live = true;
|
|
53
|
+
let generation = 0;
|
|
54
|
+
onScopeDispose(() => {
|
|
55
|
+
live = false;
|
|
56
|
+
generation++;
|
|
57
|
+
});
|
|
58
|
+
const open = shallowRef(true);
|
|
59
|
+
let latest = () => false;
|
|
60
|
+
const focusMenu = focusOnOpen(scheduleTick, () => latest());
|
|
61
|
+
watch([active, () => props.at], () => {
|
|
62
|
+
generation++;
|
|
63
|
+
open.value = true;
|
|
64
|
+
}, {
|
|
65
|
+
flush: "sync",
|
|
66
|
+
immediate: true
|
|
67
|
+
});
|
|
68
|
+
return () => {
|
|
69
|
+
if (!active.value) return null;
|
|
70
|
+
const at = props.at;
|
|
71
|
+
const ticket = generation;
|
|
72
|
+
const onClose = props.onClose;
|
|
73
|
+
const isCurrent = () => live && active.value && ticket === generation && props.at === at && props.onClose === onClose;
|
|
74
|
+
latest = isCurrent;
|
|
75
|
+
const close = () => {
|
|
76
|
+
if (!isCurrent()) return;
|
|
77
|
+
onClose();
|
|
78
|
+
open.value = true;
|
|
79
|
+
};
|
|
80
|
+
return h(Dropdown, {
|
|
81
|
+
open: open.value,
|
|
82
|
+
trigger: ["contextmenu"],
|
|
83
|
+
placement: "bottomLeft",
|
|
84
|
+
destroyPopupOnHide: true,
|
|
85
|
+
getPopupContainer: () => props.container ?? props.anchorRef.current?.ownerDocument.body ?? document.body,
|
|
86
|
+
overlayStyle: { maxWidth: "calc(100vw - 1rem)" },
|
|
87
|
+
onOpenChange: (visible) => {
|
|
88
|
+
if (!visible) scheduleTick(close);
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
default: () => h("span", {
|
|
92
|
+
"aria-hidden": "true",
|
|
93
|
+
"data-adapttable-part": "context-menu-anchor",
|
|
94
|
+
style: {
|
|
95
|
+
position: "fixed",
|
|
96
|
+
insetInlineStart: `${at.x}px`,
|
|
97
|
+
insetBlockStart: `${at.y}px`,
|
|
98
|
+
inlineSize: 0,
|
|
99
|
+
blockSize: 0,
|
|
100
|
+
pointerEvents: "none"
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
overlay: () => h(Menu, {
|
|
104
|
+
"aria-label": props.label,
|
|
105
|
+
class: props.className,
|
|
106
|
+
dir: props.dir,
|
|
107
|
+
selectable: false,
|
|
108
|
+
"data-adapttable-part": "context-menu",
|
|
109
|
+
ref: focusMenu,
|
|
110
|
+
onKeydown: (event) => {
|
|
111
|
+
if (isCurrent() && handleMenuKey(event)) return;
|
|
112
|
+
const menu = event.currentTarget;
|
|
113
|
+
const target = event.target;
|
|
114
|
+
if (!isCurrent() || event.key !== "Escape" || event.defaultPrevented || event.isComposing || target instanceof Element && target.closest("[role=\"menu\"]") !== menu) return;
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
event.stopPropagation();
|
|
117
|
+
close();
|
|
118
|
+
}
|
|
119
|
+
}, { default: () => props.children })
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
}, {
|
|
123
|
+
name: "AntdContextSurface",
|
|
124
|
+
props: {
|
|
125
|
+
at: { type: Object },
|
|
126
|
+
anchorRef: { type: Object },
|
|
127
|
+
label: { type: String },
|
|
128
|
+
onClose: { type: Function },
|
|
129
|
+
container: { type: Object },
|
|
130
|
+
children: {
|
|
131
|
+
type: [
|
|
132
|
+
String,
|
|
133
|
+
Number,
|
|
134
|
+
Boolean,
|
|
135
|
+
Array,
|
|
136
|
+
Object
|
|
137
|
+
],
|
|
138
|
+
default: void 0
|
|
139
|
+
},
|
|
140
|
+
className: { type: String },
|
|
141
|
+
dir: { type: String }
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/actions/antdRemainingControls.ts
|
|
146
|
+
const antdActionButton = ({ attrs, label, icon }) => antdButton(attrs, [icon, label]);
|
|
147
|
+
const antdPaletteSlots = (names = () => ({}), container = () => void 0, dir = () => void 0) => ({
|
|
148
|
+
Surface: managedCommandPaletteSurface((control) => h(AntdCommandSurface, {
|
|
149
|
+
control,
|
|
150
|
+
container: container(),
|
|
151
|
+
dir: dir()
|
|
152
|
+
})),
|
|
153
|
+
Input: ({ inputProps }) => {
|
|
154
|
+
const { onChange, ref, value, ...attrs } = inputProps;
|
|
155
|
+
return h(_sfc_main, {
|
|
156
|
+
...toVueAttrs(attrs),
|
|
157
|
+
value,
|
|
158
|
+
inputRef: (element) => {
|
|
159
|
+
if (element instanceof HTMLInputElement || element === null) ref(element);
|
|
160
|
+
},
|
|
161
|
+
class: names().commandInput,
|
|
162
|
+
onChange
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
Item: ({ command, itemProps }) => antdButton({
|
|
166
|
+
...toVueAttrs(itemProps),
|
|
167
|
+
class: names().commandItem,
|
|
168
|
+
type: "button",
|
|
169
|
+
tabindex: -1,
|
|
170
|
+
disabled: command.disabled
|
|
171
|
+
}, command.label),
|
|
172
|
+
Empty: ({ message }) => h("p", {
|
|
173
|
+
"data-adapttable-part": "command-empty",
|
|
174
|
+
class: names().commandEmpty
|
|
175
|
+
}, message)
|
|
176
|
+
});
|
|
177
|
+
const antdContextMenuSlots = (names = () => ({}), dir = () => void 0) => ({
|
|
178
|
+
Surface: (props) => h(AntdContextSurface, {
|
|
179
|
+
...props,
|
|
180
|
+
dir: dir()
|
|
181
|
+
}),
|
|
182
|
+
Item: ({ item, onSelect }) => h(MenuItem, {
|
|
183
|
+
disabled: item.disabled,
|
|
184
|
+
"aria-disabled": item.disabled,
|
|
185
|
+
"data-danger": item.danger ? "" : void 0,
|
|
186
|
+
"data-adapttable-part": "context-menu-item",
|
|
187
|
+
class: names().contextMenuItem,
|
|
188
|
+
onClick: () => onSelect()
|
|
189
|
+
}, { default: () => item.label }),
|
|
190
|
+
Separator: () => h(MenuDivider, {
|
|
191
|
+
"data-adapttable-part": "context-menu-separator",
|
|
192
|
+
class: names().contextMenuSeparator
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
const antdSidePanelSlots = (names = () => ({})) => {
|
|
196
|
+
let closeChoice;
|
|
197
|
+
return {
|
|
198
|
+
Frame: (props) => {
|
|
199
|
+
const close = closeChoice;
|
|
200
|
+
return h(AntdCard, { attrs: {
|
|
201
|
+
"data-adapttable-part": "side-panel",
|
|
202
|
+
class: props.className,
|
|
203
|
+
"data-side": props.side,
|
|
204
|
+
style: {
|
|
205
|
+
minWidth: "min(18rem,100%)",
|
|
206
|
+
maxWidth: "100%"
|
|
207
|
+
},
|
|
208
|
+
onKeydownCapture: (event) => {
|
|
209
|
+
const target = event.target;
|
|
210
|
+
if (event.key === "Escape" && !event.defaultPrevented && !event.isComposing && target instanceof Element && target.getAttribute("role") === "combobox" && target.getAttribute("aria-expanded") !== "true" && !target.closest("[role=\"dialog\"],[role=\"menu\"]")) {
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
event.stopPropagation();
|
|
213
|
+
close?.();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
} }, { default: () => props.children });
|
|
217
|
+
},
|
|
218
|
+
Tab: (props) => antdButton({
|
|
219
|
+
...toVueAttrs(props.buttonProps),
|
|
220
|
+
class: names().sidePanelTab
|
|
221
|
+
}, props.panel.label),
|
|
222
|
+
Close: (props) => {
|
|
223
|
+
closeChoice = props.onClose;
|
|
224
|
+
return antdButton({
|
|
225
|
+
type: "button",
|
|
226
|
+
"aria-label": props.label,
|
|
227
|
+
"data-adapttable-part": "side-panel-close",
|
|
228
|
+
class: names().sidePanelClose,
|
|
229
|
+
onClick: props.onClose
|
|
230
|
+
}, props.label);
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
//#endregion
|
|
235
|
+
export { antdSidePanelSlots as i, antdContextMenuSlots as n, antdPaletteSlots as r, antdActionButton as t };
|
|
236
|
+
|
|
237
|
+
//# sourceMappingURL=antdRemainingControls-CQcrvZpV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antdRemainingControls-CQcrvZpV.js","names":["AntdInput"],"sources":["../src/actions/AntdCommandSurface.ts","../src/actions/AntdContextSurface.ts","../src/actions/antdRemainingControls.ts"],"sourcesContent":["import {\n type ManagedCommandPaletteSurfaceProps,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { Modal } from \"ant-design-vue\";\nimport { defineComponent, h, type PropType, shallowRef } from \"vue\";\n/** The Ant Design Vue modal owns focus trapping, Escape and outside dismissal. */\nexport const AntdCommandSurface = defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir?: \"ltr\" | \"rtl\";\n }) => {\n const active = useScopeActivity();\n const body = shallowRef<HTMLElement | null>(null);\n return () => {\n const owner = props.control;\n return h(\n Modal,\n {\n open: active.value && owner.open && owner.isCurrent(),\n title: owner.label,\n class: owner.className,\n wrapProps: { dir: props.dir },\n getContainer: props.container,\n width: \"min(32rem, calc(100vw - 2rem))\",\n destroyOnClose: true,\n closable: false,\n footer: null,\n maskClosable: true,\n keyboard: true,\n onCancel: () => {\n if (active.value && owner.isCurrent()) owner.onClose();\n },\n },\n {\n default: () =>\n h(\"div\", { ref: body, \"data-adapttable-part\": \"command-palette\" }, [\n owner.children,\n ]),\n }\n );\n };\n },\n {\n name: \"AntdCommandSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<(\"ltr\" | \"rtl\") | undefined> },\n },\n }\n);\n","import {\n type ContextMenuSurfaceProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { Dropdown, Menu } from \"ant-design-vue\";\nimport {\n defineComponent,\n h,\n onScopeDispose,\n type PropType,\n shallowRef,\n type VNodeChild,\n watch,\n} from \"vue\";\n\nimport { focusOnOpen, handleMenuKey } from \"../controls/menuKeyboard\";\n\n/**\n * The public dropdown API synchronizes the primitive with the binding's open\n * session. The pointer position is a real, empty positioning host the dropdown\n * anchors to, so Ant Design Vue aligns, flips and closes the menu itself.\n */\nexport const AntdContextSurface = defineComponent(\n (\n props: ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n }\n ) => {\n const active = useScopeActivity();\n let live = true;\n let generation = 0;\n onScopeDispose(() => {\n live = false;\n generation++;\n });\n const open = shallowRef(true);\n let latest: () => boolean = () => false;\n const focusMenu = focusOnOpen(scheduleTick, () => latest());\n watch(\n [active, () => props.at],\n () => {\n generation++;\n open.value = true;\n },\n { flush: \"sync\", immediate: true }\n );\n return () => {\n if (!active.value) return null;\n const at = props.at;\n const ticket = generation;\n const onClose = props.onClose;\n const isCurrent = () =>\n live &&\n active.value &&\n ticket === generation &&\n props.at === at &&\n props.onClose === onClose;\n latest = isCurrent;\n const close = () => {\n if (!isCurrent()) return;\n onClose();\n // A rejected controlled close keeps the same session open.\n open.value = true;\n };\n return h(\n Dropdown,\n {\n open: open.value,\n trigger: [\"contextmenu\"],\n placement: \"bottomLeft\",\n destroyPopupOnHide: true,\n getPopupContainer: () =>\n props.container ??\n props.anchorRef.current?.ownerDocument.body ??\n document.body,\n overlayStyle: { maxWidth: \"calc(100vw - 1rem)\" },\n // Ant Design Vue reports a cached table's deactivation as a close,\n // before this scope learns it is inactive. Reading the session a\n // tick later lets that retire the request instead of sending it.\n onOpenChange: (visible: boolean) => {\n if (!visible) scheduleTick(close);\n },\n },\n {\n default: () =>\n h(\"span\", {\n \"aria-hidden\": \"true\",\n \"data-adapttable-part\": \"context-menu-anchor\",\n style: {\n position: \"fixed\",\n insetInlineStart: `${at.x}px`,\n insetBlockStart: `${at.y}px`,\n inlineSize: 0,\n blockSize: 0,\n pointerEvents: \"none\",\n },\n }),\n overlay: () =>\n h(\n Menu,\n {\n \"aria-label\": props.label,\n class: props.className,\n dir: props.dir,\n selectable: false,\n \"data-adapttable-part\": \"context-menu\",\n ref: focusMenu,\n onKeydown: (event: KeyboardEvent) => {\n if (isCurrent() && handleMenuKey(event)) return;\n const menu = event.currentTarget;\n const target = event.target;\n if (\n !isCurrent() ||\n event.key !== \"Escape\" ||\n event.defaultPrevented ||\n event.isComposing ||\n // A submenu keeps the Escape that closes itself.\n (target instanceof Element &&\n target.closest('[role=\"menu\"]') !== menu)\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n close();\n },\n },\n { default: () => props.children }\n ),\n }\n );\n };\n },\n {\n name: \"AntdContextSurface\",\n props: {\n at: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"at\"]\n >,\n },\n anchorRef: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"anchorRef\"]\n >,\n },\n label: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"label\"]\n >,\n },\n onClose: {\n type: Function as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"onClose\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"children\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"className\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"dir\"]\n >,\n },\n },\n }\n);\n","import {\n type ActionButton,\n type CommandPaletteSlots,\n type ContextMenuSlots,\n managedCommandPaletteSurface,\n type SidePanelSlots,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { MenuDivider, MenuItem } from \"ant-design-vue\";\nimport { h } from \"vue\";\n\nimport AntdInput from \"../controls/AntdInput.vue\";\nimport { antdButton } from \"../controls/button\";\nimport { AntdCard } from \"../presentation/AntdCard\";\nimport { AntdCommandSurface } from \"./AntdCommandSurface\";\nimport { AntdContextSurface } from \"./AntdContextSurface\";\nexport const antdActionButton = ({ attrs, label, icon }: ActionButton) =>\n antdButton(attrs, [icon, label]);\nexport const antdPaletteSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n container: () => HTMLElement | undefined = () => undefined,\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): CommandPaletteSlots => ({\n Surface: managedCommandPaletteSurface((control) =>\n h(AntdCommandSurface, { control, container: container(), dir: dir() })\n ),\n Input: ({ inputProps }) => {\n const { onChange, ref, value, ...attrs } = inputProps;\n return h(AntdInput, {\n ...toVueAttrs(attrs),\n value,\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n ref(element);\n },\n class: names().commandInput,\n onChange,\n });\n },\n Item: ({ command, itemProps }) =>\n antdButton(\n {\n ...toVueAttrs(itemProps),\n class: names().commandItem,\n type: \"button\",\n tabindex: -1,\n disabled: command.disabled,\n },\n command.label\n ),\n Empty: ({ message }) =>\n h(\n \"p\",\n { \"data-adapttable-part\": \"command-empty\", class: names().commandEmpty },\n message\n ),\n});\nexport const antdContextMenuSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): ContextMenuSlots => ({\n Surface: (props) => h(AntdContextSurface, { ...props, dir: dir() }),\n Item: ({ item, onSelect }) =>\n h(\n MenuItem,\n {\n disabled: item.disabled,\n \"aria-disabled\": item.disabled,\n \"data-danger\": item.danger ? \"\" : undefined,\n \"data-adapttable-part\": \"context-menu-item\",\n class: names().contextMenuItem,\n onClick: () => onSelect(),\n },\n { default: () => item.label }\n ),\n Separator: () =>\n h(MenuDivider, {\n \"data-adapttable-part\": \"context-menu-separator\",\n class: names().contextMenuSeparator,\n }),\n});\nexport const antdSidePanelSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({})\n): SidePanelSlots => {\n let closeChoice: (() => void) | undefined;\n return {\n Frame: (props) => {\n const close = closeChoice;\n return h(\n AntdCard,\n {\n attrs: {\n \"data-adapttable-part\": \"side-panel\",\n class: props.className,\n \"data-side\": props.side,\n style: { minWidth: \"min(18rem,100%)\", maxWidth: \"100%\" },\n onKeydownCapture: (event: KeyboardEvent) => {\n const target = event.target;\n // Ant Design Vue's select stops Escape even while closed; forward that case to the\n // binding's current close callback before the native event is consumed.\n if (\n event.key === \"Escape\" &&\n !event.defaultPrevented &&\n !event.isComposing &&\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") !== \"true\" &&\n !target.closest('[role=\"dialog\"],[role=\"menu\"]')\n ) {\n event.preventDefault();\n event.stopPropagation();\n close?.();\n }\n },\n },\n },\n { default: () => props.children }\n );\n },\n Tab: (props) =>\n antdButton(\n { ...toVueAttrs(props.buttonProps), class: names().sidePanelTab },\n props.panel.label\n ),\n Close: (props) => {\n closeChoice = props.onClose;\n return antdButton(\n {\n type: \"button\",\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"side-panel-close\",\n class: names().sidePanelClose,\n onClick: props.onClose,\n },\n props.label\n );\n },\n };\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,qBAAqB,iBAC/B,UAIK;CACJ,MAAM,SAAS,iBAAiB;CAChC,MAAM,OAAO,WAA+B,IAAI;CAChD,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,OAAO,EACL,OACA;GACE,MAAM,OAAO,SAAS,MAAM,QAAQ,MAAM,UAAU;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IACnB,OAAO;KAAE,UAAU;KAAmB,UAAU;IAAO;IACvD,mBAAmB,UAAyB;KAC1C,MAAM,SAAS,MAAM;KAGrB,IACE,MAAM,QAAQ,YACd,CAAC,MAAM,oBACP,CAAC,MAAM,eACP,kBAAkB,WAClB,OAAO,aAAa,MAAM,MAAM,cAChC,OAAO,aAAa,eAAe,MAAM,UACzC,CAAC,OAAO,QAAQ,mCAA+B,GAC/C;MACA,MAAM,eAAe;MACrB,MAAM,gBAAgB;MACtB,QAAQ;KACV;IACF;GACF,EACF,GACA,EAAE,eAAe,MAAM,SAAS,CAClC;EACF;EACA,MAAM,UACJ,WACE;GAAE,GAAG,WAAW,MAAM,WAAW;GAAG,OAAO,MAAM,CAAC,CAAC;EAAa,GAChE,MAAM,MAAM,KACd;EACF,QAAQ,UAAU;GAChB,cAAc,MAAM;GACpB,OAAO,WACL;IACE,MAAM;IACN,cAAc,MAAM;IACpB,wBAAwB;IACxB,OAAO,MAAM,CAAC,CAAC;IACf,SAAS,MAAM;GACjB,GACA,MAAM,KACR;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
const require_button = require("./button-llfktOrH.cjs");
|
|
2
|
+
const require_AntdInput = require("./AntdInput-BFNEDXzq.cjs");
|
|
3
|
+
const require_AntdCard = require("./AntdCard-Jx9wJdT_.cjs");
|
|
4
|
+
const require_menuKeyboard = require("./menuKeyboard-Be6RV6HV.cjs");
|
|
5
|
+
let vue = require("vue");
|
|
6
|
+
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
7
|
+
let ant_design_vue = require("ant-design-vue");
|
|
8
|
+
//#region src/actions/AntdCommandSurface.ts
|
|
9
|
+
/** The Ant Design Vue modal owns focus trapping, Escape and outside dismissal. */
|
|
10
|
+
const AntdCommandSurface = (0, vue.defineComponent)((props) => {
|
|
11
|
+
const active = (0, _adapttable_vue_adapter.useScopeActivity)();
|
|
12
|
+
const body = (0, vue.shallowRef)(null);
|
|
13
|
+
return () => {
|
|
14
|
+
const owner = props.control;
|
|
15
|
+
return (0, vue.h)(ant_design_vue.Modal, {
|
|
16
|
+
open: active.value && owner.open && owner.isCurrent(),
|
|
17
|
+
title: owner.label,
|
|
18
|
+
class: owner.className,
|
|
19
|
+
wrapProps: { dir: props.dir },
|
|
20
|
+
getContainer: props.container,
|
|
21
|
+
width: "min(32rem, calc(100vw - 2rem))",
|
|
22
|
+
destroyOnClose: true,
|
|
23
|
+
closable: false,
|
|
24
|
+
footer: null,
|
|
25
|
+
maskClosable: true,
|
|
26
|
+
keyboard: true,
|
|
27
|
+
onCancel: () => {
|
|
28
|
+
if (active.value && owner.isCurrent()) owner.onClose();
|
|
29
|
+
}
|
|
30
|
+
}, { default: () => (0, vue.h)("div", {
|
|
31
|
+
ref: body,
|
|
32
|
+
"data-adapttable-part": "command-palette"
|
|
33
|
+
}, [owner.children]) });
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
name: "AntdCommandSurface",
|
|
37
|
+
props: {
|
|
38
|
+
control: { type: Object },
|
|
39
|
+
container: { type: Object },
|
|
40
|
+
dir: { type: String }
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/actions/AntdContextSurface.ts
|
|
45
|
+
/**
|
|
46
|
+
* The public dropdown API synchronizes the primitive with the binding's open
|
|
47
|
+
* session. The pointer position is a real, empty positioning host the dropdown
|
|
48
|
+
* anchors to, so Ant Design Vue aligns, flips and closes the menu itself.
|
|
49
|
+
*/
|
|
50
|
+
const AntdContextSurface = (0, vue.defineComponent)((props) => {
|
|
51
|
+
const active = (0, _adapttable_vue_adapter.useScopeActivity)();
|
|
52
|
+
let live = true;
|
|
53
|
+
let generation = 0;
|
|
54
|
+
(0, vue.onScopeDispose)(() => {
|
|
55
|
+
live = false;
|
|
56
|
+
generation++;
|
|
57
|
+
});
|
|
58
|
+
const open = (0, vue.shallowRef)(true);
|
|
59
|
+
let latest = () => false;
|
|
60
|
+
const focusMenu = require_menuKeyboard.focusOnOpen(_adapttable_vue_adapter.scheduleTick, () => latest());
|
|
61
|
+
(0, vue.watch)([active, () => props.at], () => {
|
|
62
|
+
generation++;
|
|
63
|
+
open.value = true;
|
|
64
|
+
}, {
|
|
65
|
+
flush: "sync",
|
|
66
|
+
immediate: true
|
|
67
|
+
});
|
|
68
|
+
return () => {
|
|
69
|
+
if (!active.value) return null;
|
|
70
|
+
const at = props.at;
|
|
71
|
+
const ticket = generation;
|
|
72
|
+
const onClose = props.onClose;
|
|
73
|
+
const isCurrent = () => live && active.value && ticket === generation && props.at === at && props.onClose === onClose;
|
|
74
|
+
latest = isCurrent;
|
|
75
|
+
const close = () => {
|
|
76
|
+
if (!isCurrent()) return;
|
|
77
|
+
onClose();
|
|
78
|
+
open.value = true;
|
|
79
|
+
};
|
|
80
|
+
return (0, vue.h)(ant_design_vue.Dropdown, {
|
|
81
|
+
open: open.value,
|
|
82
|
+
trigger: ["contextmenu"],
|
|
83
|
+
placement: "bottomLeft",
|
|
84
|
+
destroyPopupOnHide: true,
|
|
85
|
+
getPopupContainer: () => props.container ?? props.anchorRef.current?.ownerDocument.body ?? document.body,
|
|
86
|
+
overlayStyle: { maxWidth: "calc(100vw - 1rem)" },
|
|
87
|
+
onOpenChange: (visible) => {
|
|
88
|
+
if (!visible) (0, _adapttable_vue_adapter.scheduleTick)(close);
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
default: () => (0, vue.h)("span", {
|
|
92
|
+
"aria-hidden": "true",
|
|
93
|
+
"data-adapttable-part": "context-menu-anchor",
|
|
94
|
+
style: {
|
|
95
|
+
position: "fixed",
|
|
96
|
+
insetInlineStart: `${at.x}px`,
|
|
97
|
+
insetBlockStart: `${at.y}px`,
|
|
98
|
+
inlineSize: 0,
|
|
99
|
+
blockSize: 0,
|
|
100
|
+
pointerEvents: "none"
|
|
101
|
+
}
|
|
102
|
+
}),
|
|
103
|
+
overlay: () => (0, vue.h)(ant_design_vue.Menu, {
|
|
104
|
+
"aria-label": props.label,
|
|
105
|
+
class: props.className,
|
|
106
|
+
dir: props.dir,
|
|
107
|
+
selectable: false,
|
|
108
|
+
"data-adapttable-part": "context-menu",
|
|
109
|
+
ref: focusMenu,
|
|
110
|
+
onKeydown: (event) => {
|
|
111
|
+
if (isCurrent() && require_menuKeyboard.handleMenuKey(event)) return;
|
|
112
|
+
const menu = event.currentTarget;
|
|
113
|
+
const target = event.target;
|
|
114
|
+
if (!isCurrent() || event.key !== "Escape" || event.defaultPrevented || event.isComposing || target instanceof Element && target.closest("[role=\"menu\"]") !== menu) return;
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
event.stopPropagation();
|
|
117
|
+
close();
|
|
118
|
+
}
|
|
119
|
+
}, { default: () => props.children })
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
}, {
|
|
123
|
+
name: "AntdContextSurface",
|
|
124
|
+
props: {
|
|
125
|
+
at: { type: Object },
|
|
126
|
+
anchorRef: { type: Object },
|
|
127
|
+
label: { type: String },
|
|
128
|
+
onClose: { type: Function },
|
|
129
|
+
container: { type: Object },
|
|
130
|
+
children: {
|
|
131
|
+
type: [
|
|
132
|
+
String,
|
|
133
|
+
Number,
|
|
134
|
+
Boolean,
|
|
135
|
+
Array,
|
|
136
|
+
Object
|
|
137
|
+
],
|
|
138
|
+
default: void 0
|
|
139
|
+
},
|
|
140
|
+
className: { type: String },
|
|
141
|
+
dir: { type: String }
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/actions/antdRemainingControls.ts
|
|
146
|
+
const antdActionButton = ({ attrs, label, icon }) => require_button.antdButton(attrs, [icon, label]);
|
|
147
|
+
const antdPaletteSlots = (names = () => ({}), container = () => void 0, dir = () => void 0) => ({
|
|
148
|
+
Surface: (0, _adapttable_vue_adapter.managedCommandPaletteSurface)((control) => (0, vue.h)(AntdCommandSurface, {
|
|
149
|
+
control,
|
|
150
|
+
container: container(),
|
|
151
|
+
dir: dir()
|
|
152
|
+
})),
|
|
153
|
+
Input: ({ inputProps }) => {
|
|
154
|
+
const { onChange, ref, value, ...attrs } = inputProps;
|
|
155
|
+
return (0, vue.h)(require_AntdInput._sfc_main, {
|
|
156
|
+
...(0, _adapttable_vue_adapter.toVueAttrs)(attrs),
|
|
157
|
+
value,
|
|
158
|
+
inputRef: (element) => {
|
|
159
|
+
if (element instanceof HTMLInputElement || element === null) ref(element);
|
|
160
|
+
},
|
|
161
|
+
class: names().commandInput,
|
|
162
|
+
onChange
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
Item: ({ command, itemProps }) => require_button.antdButton({
|
|
166
|
+
...(0, _adapttable_vue_adapter.toVueAttrs)(itemProps),
|
|
167
|
+
class: names().commandItem,
|
|
168
|
+
type: "button",
|
|
169
|
+
tabindex: -1,
|
|
170
|
+
disabled: command.disabled
|
|
171
|
+
}, command.label),
|
|
172
|
+
Empty: ({ message }) => (0, vue.h)("p", {
|
|
173
|
+
"data-adapttable-part": "command-empty",
|
|
174
|
+
class: names().commandEmpty
|
|
175
|
+
}, message)
|
|
176
|
+
});
|
|
177
|
+
const antdContextMenuSlots = (names = () => ({}), dir = () => void 0) => ({
|
|
178
|
+
Surface: (props) => (0, vue.h)(AntdContextSurface, {
|
|
179
|
+
...props,
|
|
180
|
+
dir: dir()
|
|
181
|
+
}),
|
|
182
|
+
Item: ({ item, onSelect }) => (0, vue.h)(ant_design_vue.MenuItem, {
|
|
183
|
+
disabled: item.disabled,
|
|
184
|
+
"aria-disabled": item.disabled,
|
|
185
|
+
"data-danger": item.danger ? "" : void 0,
|
|
186
|
+
"data-adapttable-part": "context-menu-item",
|
|
187
|
+
class: names().contextMenuItem,
|
|
188
|
+
onClick: () => onSelect()
|
|
189
|
+
}, { default: () => item.label }),
|
|
190
|
+
Separator: () => (0, vue.h)(ant_design_vue.MenuDivider, {
|
|
191
|
+
"data-adapttable-part": "context-menu-separator",
|
|
192
|
+
class: names().contextMenuSeparator
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
const antdSidePanelSlots = (names = () => ({})) => {
|
|
196
|
+
let closeChoice;
|
|
197
|
+
return {
|
|
198
|
+
Frame: (props) => {
|
|
199
|
+
const close = closeChoice;
|
|
200
|
+
return (0, vue.h)(require_AntdCard.AntdCard, { attrs: {
|
|
201
|
+
"data-adapttable-part": "side-panel",
|
|
202
|
+
class: props.className,
|
|
203
|
+
"data-side": props.side,
|
|
204
|
+
style: {
|
|
205
|
+
minWidth: "min(18rem,100%)",
|
|
206
|
+
maxWidth: "100%"
|
|
207
|
+
},
|
|
208
|
+
onKeydownCapture: (event) => {
|
|
209
|
+
const target = event.target;
|
|
210
|
+
if (event.key === "Escape" && !event.defaultPrevented && !event.isComposing && target instanceof Element && target.getAttribute("role") === "combobox" && target.getAttribute("aria-expanded") !== "true" && !target.closest("[role=\"dialog\"],[role=\"menu\"]")) {
|
|
211
|
+
event.preventDefault();
|
|
212
|
+
event.stopPropagation();
|
|
213
|
+
close?.();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
} }, { default: () => props.children });
|
|
217
|
+
},
|
|
218
|
+
Tab: (props) => require_button.antdButton({
|
|
219
|
+
...(0, _adapttable_vue_adapter.toVueAttrs)(props.buttonProps),
|
|
220
|
+
class: names().sidePanelTab
|
|
221
|
+
}, props.panel.label),
|
|
222
|
+
Close: (props) => {
|
|
223
|
+
closeChoice = props.onClose;
|
|
224
|
+
return require_button.antdButton({
|
|
225
|
+
type: "button",
|
|
226
|
+
"aria-label": props.label,
|
|
227
|
+
"data-adapttable-part": "side-panel-close",
|
|
228
|
+
class: names().sidePanelClose,
|
|
229
|
+
onClick: props.onClose
|
|
230
|
+
}, props.label);
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
//#endregion
|
|
235
|
+
Object.defineProperty(exports, "antdActionButton", {
|
|
236
|
+
enumerable: true,
|
|
237
|
+
get: function() {
|
|
238
|
+
return antdActionButton;
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
Object.defineProperty(exports, "antdContextMenuSlots", {
|
|
242
|
+
enumerable: true,
|
|
243
|
+
get: function() {
|
|
244
|
+
return antdContextMenuSlots;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
Object.defineProperty(exports, "antdPaletteSlots", {
|
|
248
|
+
enumerable: true,
|
|
249
|
+
get: function() {
|
|
250
|
+
return antdPaletteSlots;
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
Object.defineProperty(exports, "antdSidePanelSlots", {
|
|
254
|
+
enumerable: true,
|
|
255
|
+
get: function() {
|
|
256
|
+
return antdSidePanelSlots;
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
//# sourceMappingURL=antdRemainingControls-CjAK8L7r.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"antdRemainingControls-CjAK8L7r.cjs","names":["defineComponent","useScopeActivity","shallowRef","h","Modal","defineComponent","useScopeActivity","shallowRef","focusOnOpen","scheduleTick","h","Dropdown","Menu","handleMenuKey","antdButton","managedCommandPaletteSurface","h","AntdInput","toVueAttrs","MenuItem","MenuDivider","AntdCard"],"sources":["../src/actions/AntdCommandSurface.ts","../src/actions/AntdContextSurface.ts","../src/actions/antdRemainingControls.ts"],"sourcesContent":["import {\n type ManagedCommandPaletteSurfaceProps,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { Modal } from \"ant-design-vue\";\nimport { defineComponent, h, type PropType, shallowRef } from \"vue\";\n/** The Ant Design Vue modal owns focus trapping, Escape and outside dismissal. */\nexport const AntdCommandSurface = defineComponent(\n (props: {\n readonly control: ManagedCommandPaletteSurfaceProps;\n readonly container?: HTMLElement;\n readonly dir?: \"ltr\" | \"rtl\";\n }) => {\n const active = useScopeActivity();\n const body = shallowRef<HTMLElement | null>(null);\n return () => {\n const owner = props.control;\n return h(\n Modal,\n {\n open: active.value && owner.open && owner.isCurrent(),\n title: owner.label,\n class: owner.className,\n wrapProps: { dir: props.dir },\n getContainer: props.container,\n width: \"min(32rem, calc(100vw - 2rem))\",\n destroyOnClose: true,\n closable: false,\n footer: null,\n maskClosable: true,\n keyboard: true,\n onCancel: () => {\n if (active.value && owner.isCurrent()) owner.onClose();\n },\n },\n {\n default: () =>\n h(\"div\", { ref: body, \"data-adapttable-part\": \"command-palette\" }, [\n owner.children,\n ]),\n }\n );\n };\n },\n {\n name: \"AntdCommandSurface\",\n props: {\n control: { type: Object as PropType<ManagedCommandPaletteSurfaceProps> },\n container: { type: Object as PropType<HTMLElement | undefined> },\n dir: { type: String as PropType<(\"ltr\" | \"rtl\") | undefined> },\n },\n }\n);\n","import {\n type ContextMenuSurfaceProps,\n scheduleTick,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { Dropdown, Menu } from \"ant-design-vue\";\nimport {\n defineComponent,\n h,\n onScopeDispose,\n type PropType,\n shallowRef,\n type VNodeChild,\n watch,\n} from \"vue\";\n\nimport { focusOnOpen, handleMenuKey } from \"../controls/menuKeyboard\";\n\n/**\n * The public dropdown API synchronizes the primitive with the binding's open\n * session. The pointer position is a real, empty positioning host the dropdown\n * anchors to, so Ant Design Vue aligns, flips and closes the menu itself.\n */\nexport const AntdContextSurface = defineComponent(\n (\n props: ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n }\n ) => {\n const active = useScopeActivity();\n let live = true;\n let generation = 0;\n onScopeDispose(() => {\n live = false;\n generation++;\n });\n const open = shallowRef(true);\n let latest: () => boolean = () => false;\n const focusMenu = focusOnOpen(scheduleTick, () => latest());\n watch(\n [active, () => props.at],\n () => {\n generation++;\n open.value = true;\n },\n { flush: \"sync\", immediate: true }\n );\n return () => {\n if (!active.value) return null;\n const at = props.at;\n const ticket = generation;\n const onClose = props.onClose;\n const isCurrent = () =>\n live &&\n active.value &&\n ticket === generation &&\n props.at === at &&\n props.onClose === onClose;\n latest = isCurrent;\n const close = () => {\n if (!isCurrent()) return;\n onClose();\n // A rejected controlled close keeps the same session open.\n open.value = true;\n };\n return h(\n Dropdown,\n {\n open: open.value,\n trigger: [\"contextmenu\"],\n placement: \"bottomLeft\",\n destroyPopupOnHide: true,\n getPopupContainer: () =>\n props.container ??\n props.anchorRef.current?.ownerDocument.body ??\n document.body,\n overlayStyle: { maxWidth: \"calc(100vw - 1rem)\" },\n // Ant Design Vue reports a cached table's deactivation as a close,\n // before this scope learns it is inactive. Reading the session a\n // tick later lets that retire the request instead of sending it.\n onOpenChange: (visible: boolean) => {\n if (!visible) scheduleTick(close);\n },\n },\n {\n default: () =>\n h(\"span\", {\n \"aria-hidden\": \"true\",\n \"data-adapttable-part\": \"context-menu-anchor\",\n style: {\n position: \"fixed\",\n insetInlineStart: `${at.x}px`,\n insetBlockStart: `${at.y}px`,\n inlineSize: 0,\n blockSize: 0,\n pointerEvents: \"none\",\n },\n }),\n overlay: () =>\n h(\n Menu,\n {\n \"aria-label\": props.label,\n class: props.className,\n dir: props.dir,\n selectable: false,\n \"data-adapttable-part\": \"context-menu\",\n ref: focusMenu,\n onKeydown: (event: KeyboardEvent) => {\n if (isCurrent() && handleMenuKey(event)) return;\n const menu = event.currentTarget;\n const target = event.target;\n if (\n !isCurrent() ||\n event.key !== \"Escape\" ||\n event.defaultPrevented ||\n event.isComposing ||\n // A submenu keeps the Escape that closes itself.\n (target instanceof Element &&\n target.closest('[role=\"menu\"]') !== menu)\n )\n return;\n event.preventDefault();\n event.stopPropagation();\n close();\n },\n },\n { default: () => props.children }\n ),\n }\n );\n };\n },\n {\n name: \"AntdContextSurface\",\n props: {\n at: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"at\"]\n >,\n },\n anchorRef: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"anchorRef\"]\n >,\n },\n label: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"label\"]\n >,\n },\n onClose: {\n type: Function as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"onClose\"]\n >,\n },\n container: {\n type: Object as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"container\"]\n >,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"children\"]\n >,\n default: undefined,\n },\n className: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"className\"]\n >,\n },\n dir: {\n type: String as PropType<\n (ContextMenuSurfaceProps<VNodeChild> & {\n readonly dir?: \"ltr\" | \"rtl\";\n })[\"dir\"]\n >,\n },\n },\n }\n);\n","import {\n type ActionButton,\n type CommandPaletteSlots,\n type ContextMenuSlots,\n managedCommandPaletteSurface,\n type SidePanelSlots,\n toVueAttrs,\n} from \"@adapttable/vue/adapter\";\nimport { MenuDivider, MenuItem } from \"ant-design-vue\";\nimport { h } from \"vue\";\n\nimport AntdInput from \"../controls/AntdInput.vue\";\nimport { antdButton } from \"../controls/button\";\nimport { AntdCard } from \"../presentation/AntdCard\";\nimport { AntdCommandSurface } from \"./AntdCommandSurface\";\nimport { AntdContextSurface } from \"./AntdContextSurface\";\nexport const antdActionButton = ({ attrs, label, icon }: ActionButton) =>\n antdButton(attrs, [icon, label]);\nexport const antdPaletteSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n container: () => HTMLElement | undefined = () => undefined,\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): CommandPaletteSlots => ({\n Surface: managedCommandPaletteSurface((control) =>\n h(AntdCommandSurface, { control, container: container(), dir: dir() })\n ),\n Input: ({ inputProps }) => {\n const { onChange, ref, value, ...attrs } = inputProps;\n return h(AntdInput, {\n ...toVueAttrs(attrs),\n value,\n inputRef: (element) => {\n if (element instanceof HTMLInputElement || element === null)\n ref(element);\n },\n class: names().commandInput,\n onChange,\n });\n },\n Item: ({ command, itemProps }) =>\n antdButton(\n {\n ...toVueAttrs(itemProps),\n class: names().commandItem,\n type: \"button\",\n tabindex: -1,\n disabled: command.disabled,\n },\n command.label\n ),\n Empty: ({ message }) =>\n h(\n \"p\",\n { \"data-adapttable-part\": \"command-empty\", class: names().commandEmpty },\n message\n ),\n});\nexport const antdContextMenuSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({}),\n dir: () => \"ltr\" | \"rtl\" | undefined = () => undefined\n): ContextMenuSlots => ({\n Surface: (props) => h(AntdContextSurface, { ...props, dir: dir() }),\n Item: ({ item, onSelect }) =>\n h(\n MenuItem,\n {\n disabled: item.disabled,\n \"aria-disabled\": item.disabled,\n \"data-danger\": item.danger ? \"\" : undefined,\n \"data-adapttable-part\": \"context-menu-item\",\n class: names().contextMenuItem,\n onClick: () => onSelect(),\n },\n { default: () => item.label }\n ),\n Separator: () =>\n h(MenuDivider, {\n \"data-adapttable-part\": \"context-menu-separator\",\n class: names().contextMenuSeparator,\n }),\n});\nexport const antdSidePanelSlots = (\n names: () => Readonly<Record<string, string | undefined>> = () => ({})\n): SidePanelSlots => {\n let closeChoice: (() => void) | undefined;\n return {\n Frame: (props) => {\n const close = closeChoice;\n return h(\n AntdCard,\n {\n attrs: {\n \"data-adapttable-part\": \"side-panel\",\n class: props.className,\n \"data-side\": props.side,\n style: { minWidth: \"min(18rem,100%)\", maxWidth: \"100%\" },\n onKeydownCapture: (event: KeyboardEvent) => {\n const target = event.target;\n // Ant Design Vue's select stops Escape even while closed; forward that case to the\n // binding's current close callback before the native event is consumed.\n if (\n event.key === \"Escape\" &&\n !event.defaultPrevented &&\n !event.isComposing &&\n target instanceof Element &&\n target.getAttribute(\"role\") === \"combobox\" &&\n target.getAttribute(\"aria-expanded\") !== \"true\" &&\n !target.closest('[role=\"dialog\"],[role=\"menu\"]')\n ) {\n event.preventDefault();\n event.stopPropagation();\n close?.();\n }\n },\n },\n },\n { default: () => props.children }\n );\n },\n Tab: (props) =>\n antdButton(\n { ...toVueAttrs(props.buttonProps), class: names().sidePanelTab },\n props.panel.label\n ),\n Close: (props) => {\n closeChoice = props.onClose;\n return antdButton(\n {\n type: \"button\",\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"side-panel-close\",\n class: names().sidePanelClose,\n onClick: props.onClose,\n },\n props.label\n );\n },\n };\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,sBAAA,GAAqBA,IAAAA,gBAAAA,EAC/B,UAIK;CACJ,MAAM,UAAA,GAASC,wBAAAA,iBAAAA,CAAiB;CAChC,MAAM,QAAA,GAAOC,IAAAA,WAAAA,CAA+B,IAAI;CAChD,aAAa;EACX,MAAM,QAAQ,MAAM;EACpB,QAAA,GAAOC,IAAAA,EAAAA,CACLC,eAAAA,OACA;GACE,MAAM,OAAO,SAAS,MAAM,QAAQ,MAAM,UAAU;GACpD,OAAO,MAAM;GACb,OAAO,MAAM;GACb,WAAW,EAAE,KAAK,MAAM,IAAI;GAC5B,cAAc,MAAM;GACpB,OAAO;GACP,gBAAgB;GAChB,UAAU;GACV,QAAQ;GACR,cAAc;GACd,UAAU;GACV,gBAAgB;IACd,IAAI,OAAO,SAAS,MAAM,UAAU,GAAG,MAAM,QAAQ;GACvD;EACF,GACA,EACE,gBAAA,GACED,IAAAA,EAAAA,CAAE,OAAO;GAAE,KAAK;GAAM,wBAAwB;EAAkB,GAAG,CACjE,MAAM,QACR,CAAC,EACL,CACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,SAAS,EAAE,MAAM,OAAsD;EACvE,WAAW,EAAE,MAAM,OAA4C;EAC/D,KAAK,EAAE,MAAM,OAAgD;CAC/D;AACF,CACF;;;;;;;;AC7BA,MAAa,sBAAA,GAAqBE,IAAAA,gBAAAA,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