@adapttable/element-plus 0.0.0 → 0.1.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 +534 -1
- package/dist/ElementCard-BRZekaHr.cjs +41 -0
- package/dist/ElementCard-BRZekaHr.cjs.map +1 -0
- package/dist/ElementCard-DZdAU6x8.js +36 -0
- package/dist/ElementCard-DZdAU6x8.js.map +1 -0
- package/dist/ElementCheckbox-BQN4_eas.js +99 -0
- package/dist/ElementCheckbox-BQN4_eas.js.map +1 -0
- package/dist/ElementCheckbox-BewKx6sv.cjs +104 -0
- package/dist/ElementCheckbox-BewKx6sv.cjs.map +1 -0
- package/dist/ElementColumnMenuPanel-D7SdfclW.js +126 -0
- package/dist/ElementColumnMenuPanel-D7SdfclW.js.map +1 -0
- package/dist/ElementColumnMenuPanel-DRQbZVow.cjs +137 -0
- package/dist/ElementColumnMenuPanel-DRQbZVow.cjs.map +1 -0
- package/dist/ElementFilterHeaderRow-CR1aax4I.cjs +202 -0
- package/dist/ElementFilterHeaderRow-CR1aax4I.cjs.map +1 -0
- package/dist/ElementFilterHeaderRow-CjduRYN5.js +191 -0
- package/dist/ElementFilterHeaderRow-CjduRYN5.js.map +1 -0
- package/dist/ElementFilterHeaderRow.vue-aMWpPgI9.d.cts +33 -0
- package/dist/ElementFilterHeaderRow.vue-aMWpPgI9.d.cts.map +1 -0
- package/dist/ElementFilterHeaderRow.vue-aMWpPgI9.d.ts +33 -0
- package/dist/ElementFilterHeaderRow.vue-aMWpPgI9.d.ts.map +1 -0
- package/dist/ElementFilterSurface-DcPyYCK-.cjs +302 -0
- package/dist/ElementFilterSurface-DcPyYCK-.cjs.map +1 -0
- package/dist/ElementFilterSurface-DdvPfm1N.js +285 -0
- package/dist/ElementFilterSurface-DdvPfm1N.js.map +1 -0
- package/dist/ElementInput-BsoAvPfO.js +55 -0
- package/dist/ElementInput-BsoAvPfO.js.map +1 -0
- package/dist/ElementInput-vBVDBaLp.cjs +60 -0
- package/dist/ElementInput-vBVDBaLp.cjs.map +1 -0
- package/dist/ElementRowActions-BKfX2XRn.js +59 -0
- package/dist/ElementRowActions-BKfX2XRn.js.map +1 -0
- package/dist/ElementRowActions-B_rR7qSj.cjs +64 -0
- package/dist/ElementRowActions-B_rR7qSj.cjs.map +1 -0
- package/dist/ElementSelect-Cl5ZjuQM.js +65 -0
- package/dist/ElementSelect-Cl5ZjuQM.js.map +1 -0
- package/dist/ElementSelect-K1rRvu5q.cjs +70 -0
- package/dist/ElementSelect-K1rRvu5q.cjs.map +1 -0
- package/dist/assistant.cjs +301 -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 +297 -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-BFjBL9m3.cjs +77 -0
- package/dist/button-BFjBL9m3.cjs.map +1 -0
- package/dist/button-DwB4UxI2.js +66 -0
- package/dist/button-DwB4UxI2.js.map +1 -0
- package/dist/cell-navigation-BXE28fwQ.cjs +85 -0
- package/dist/cell-navigation-BXE28fwQ.cjs.map +1 -0
- package/dist/cell-navigation-THnr6YdK.js +74 -0
- package/dist/cell-navigation-THnr6YdK.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-DhUYYwWe.cjs +26 -0
- package/dist/checkbox-DhUYYwWe.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-menu-CfqfyZzs.js +115 -0
- package/dist/column-menu-CfqfyZzs.js.map +1 -0
- package/dist/column-menu-DfTLlqC-.cjs +126 -0
- package/dist/column-menu-DfTLlqC-.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-Bj1pck4x.cjs +82 -0
- package/dist/density-Bj1pck4x.cjs.map +1 -0
- package/dist/density-ChRp0NG3.js +77 -0
- package/dist/density-ChRp0NG3.js.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-BX-jUtdO.cjs +423 -0
- package/dist/editing-BX-jUtdO.cjs.map +1 -0
- package/dist/editing-BnLdNDlo.d.ts +60 -0
- package/dist/editing-BnLdNDlo.d.ts.map +1 -0
- package/dist/editing-C1Hy-MCQ.js +383 -0
- package/dist/editing-C1Hy-MCQ.js.map +1 -0
- package/dist/editing-Cg6ZNvSa.d.cts +60 -0
- package/dist/editing-Cg6ZNvSa.d.cts.map +1 -0
- package/dist/editing.cjs +22 -0
- package/dist/editing.d.cts +2 -0
- package/dist/editing.d.ts +2 -0
- package/dist/editing.js +2 -0
- package/dist/elementActionSlots-CbKE3WnM.js +8 -0
- package/dist/elementActionSlots-CbKE3WnM.js.map +1 -0
- package/dist/elementActionSlots-DlhU82H7.cjs +13 -0
- package/dist/elementActionSlots-DlhU82H7.cjs.map +1 -0
- package/dist/elementHierarchyControlSlots-Ctcmq3T2.js +21 -0
- package/dist/elementHierarchyControlSlots-Ctcmq3T2.js.map +1 -0
- package/dist/elementRemainingControls-BPGBbbUF.js +243 -0
- package/dist/elementRemainingControls-BPGBbbUF.js.map +1 -0
- package/dist/elementRemainingControls-CtY2jZWN.cjs +266 -0
- package/dist/elementRemainingControls-CtY2jZWN.cjs.map +1 -0
- package/dist/export-CL36qPVY.cjs +79 -0
- package/dist/export-CL36qPVY.cjs.map +1 -0
- package/dist/export-DR1t4N5Q.js +74 -0
- package/dist/export-DR1t4N5Q.js.map +1 -0
- package/dist/export.cjs +3 -0
- package/dist/export.d.cts +8 -0
- package/dist/export.d.cts.map +1 -0
- package/dist/export.d.ts +8 -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/filters-BA8vjGzr.cjs +201 -0
- package/dist/filters-BA8vjGzr.cjs.map +1 -0
- package/dist/filters-Dg22pfUy.js +191 -0
- package/dist/filters-Dg22pfUy.js.map +1 -0
- package/dist/filters.cjs +14 -0
- package/dist/filters.d.cts +54 -0
- package/dist/filters.d.cts.map +1 -0
- package/dist/filters.d.ts +54 -0
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +3 -0
- package/dist/find-in-table--8ZBYijC.js +57 -0
- package/dist/find-in-table--8ZBYijC.js.map +1 -0
- package/dist/find-in-table-DOn2Hua1.cjs +61 -0
- package/dist/find-in-table-DOn2Hua1.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/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 +144 -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 +144 -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/header-filters-B_WFdnIO.js +67 -0
- package/dist/header-filters-B_WFdnIO.js.map +1 -0
- package/dist/header-filters-DnlmROS8.cjs +77 -0
- package/dist/header-filters-DnlmROS8.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/index.cjs +485 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +25 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +483 -0
- package/dist/index.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 +82 -0
- package/dist/pivot.cjs.map +1 -0
- package/dist/pivot.d.cts +11 -0
- package/dist/pivot.d.cts.map +1 -0
- package/dist/pivot.d.ts +11 -0
- package/dist/pivot.d.ts.map +1 -0
- package/dist/pivot.js +81 -0
- package/dist/pivot.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 +163 -0
- package/dist/row-reorder.cjs.map +1 -0
- package/dist/row-reorder.d.cts +6 -0
- package/dist/row-reorder.d.cts.map +1 -0
- package/dist/row-reorder.d.ts +6 -0
- package/dist/row-reorder.d.ts.map +1 -0
- package/dist/row-reorder.js +157 -0
- package/dist/row-reorder.js.map +1 -0
- package/dist/rowActionsSlot-CdnzwBmt.js +11 -0
- package/dist/rowActionsSlot-CdnzwBmt.js.map +1 -0
- package/dist/rowActionsSlot-Ps5hHI6n.cjs +21 -0
- package/dist/rowActionsSlot-Ps5hHI6n.cjs.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-BtC15-kG.js +135 -0
- package/dist/saved-views-BtC15-kG.js.map +1 -0
- package/dist/saved-views-DLiRBZ13.cjs +146 -0
- package/dist/saved-views-DLiRBZ13.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-B-QczwA9.cjs +21 -0
- package/dist/scrollbarGutter-B-QczwA9.cjs.map +1 -0
- package/dist/scrollbarGutter-BNp0-4l1.js +16 -0
- package/dist/scrollbarGutter-BNp0-4l1.js.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/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-C-XuZg77.cjs +78 -0
- package/dist/status-bar-C-XuZg77.cjs.map +1 -0
- package/dist/status-bar-DaWh0Agh.js +68 -0
- package/dist/status-bar-DaWh0Agh.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 +434 -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/package.json +465 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Orwa Mahmoud
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,536 @@
|
|
|
1
1
|
# @adapttable/element-plus
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Requires Node.js **22.12.0 or newer**; packed releases are tested on Node 22.12 and Node 24.
|
|
4
|
+
|
|
5
|
+
AdaptTable's Vue data table with Element Plus controls and card surfaces.
|
|
6
|
+
|
|
7
|
+
```vue
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { ref } from "vue";
|
|
10
|
+
import { DataTable, type ColumnDef } from "@adapttable/element-plus";
|
|
11
|
+
import "element-plus/dist/index.css";
|
|
12
|
+
import "@adapttable/element-plus/styles.css";
|
|
13
|
+
|
|
14
|
+
interface Person {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
score: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const rows: Person[] = [
|
|
21
|
+
{ id: "ada", name: "Ada", score: 92 },
|
|
22
|
+
{ id: "bea", name: "Bea", score: 87 },
|
|
23
|
+
];
|
|
24
|
+
const columns: ColumnDef<Person>[] = [
|
|
25
|
+
{ key: "name", header: "Name", sortable: true },
|
|
26
|
+
{ key: "score", header: "Score", sortable: true },
|
|
27
|
+
];
|
|
28
|
+
const selectedIds = ref<string[]>([]);
|
|
29
|
+
const rowKey = (row: Person) => row.id;
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<DataTable
|
|
34
|
+
v-model:selected-ids="selectedIds"
|
|
35
|
+
:data="rows"
|
|
36
|
+
:columns="columns"
|
|
37
|
+
:row-key="rowKey"
|
|
38
|
+
:url-sync="false"
|
|
39
|
+
selectable
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
|
|
46
|
+
- Feature composition with 41 canonical factories and focused, opt-in imports.
|
|
47
|
+
- Sorting, multi-sort, pagination, global search, selection and selection
|
|
48
|
+
statistics, with host-controlled state.
|
|
49
|
+
- Filtering, custom filter types, the AND/OR filter tree and header filters.
|
|
50
|
+
- Cell editing, row and batch editing, dirty indicators, undo/redo and
|
|
51
|
+
host-owned save callbacks.
|
|
52
|
+
- Column management, column groups, resizing and fit-to-width.
|
|
53
|
+
- Grouping and aggregation, tree data, row expansion and nested tables.
|
|
54
|
+
- Row reordering, row pinning, pinned summary rows, row and column spanning,
|
|
55
|
+
full-width separator rows, row styling and virtualization.
|
|
56
|
+
- Keyboard navigation, cell ranges, Find, saved views, row actions, bulk actions,
|
|
57
|
+
a command palette, context menus and side-panel view controls.
|
|
58
|
+
- Optional assistant and approval surfaces with host-owned transport and
|
|
59
|
+
decisions.
|
|
60
|
+
- CSV export and host-owned print layout; PDF export and XLSX use optional
|
|
61
|
+
writers supplied to the export feature.
|
|
62
|
+
- Pivot data, a spreadsheet formula engine and sparklines through the shared
|
|
63
|
+
Vue binding's opt-in entries.
|
|
64
|
+
- Mobile card layouts, localized labels, RTL and server-side rendering (SSR)
|
|
65
|
+
with the host setup described below.
|
|
66
|
+
|
|
67
|
+
Import `pdfWriter` from `@adapttable/vue/pdf` or `xlsxWriter` from
|
|
68
|
+
`@adapttable/vue/xlsx` and pass it as the `writer` option to this adapter's
|
|
69
|
+
`exportCsv` factory. The adapter retains its own export controls.
|
|
70
|
+
|
|
71
|
+
For pivot data, import `pivot` and `pivotTableModel` from
|
|
72
|
+
`@adapttable/vue/pivot` and render the prepared rows and columns with this
|
|
73
|
+
adapter; the `pivot` entry's `PivotPanel` edits the axes and measures with
|
|
74
|
+
Element Plus controls. Formula columns come from
|
|
75
|
+
`buildFormulaColumns` in `@adapttable/vue/formula`, and SVG sparkline columns
|
|
76
|
+
from `sparklineColumn` in `@adapttable/vue/sparkline`.
|
|
77
|
+
|
|
78
|
+
## Rendering and styling
|
|
79
|
+
|
|
80
|
+
The desktop renderer places a semantic HTML table inside `ElCard`. The mobile
|
|
81
|
+
renderer uses an `ElCard` for each prepared row. Sorting, selection, search and
|
|
82
|
+
paging controls use Element Plus components; AdaptTable's Vue binding owns the
|
|
83
|
+
data model, query state and host-write callbacks.
|
|
84
|
+
|
|
85
|
+
Native table rows and cells retain their semantic attributes, spans and focus
|
|
86
|
+
references. The table surface uses one scroll owner. Its colors and spacing use
|
|
87
|
+
Element Plus theme variables. Load Element Plus's dark-theme CSS variables when
|
|
88
|
+
using its dark theme.
|
|
89
|
+
|
|
90
|
+
`classNames` styles the named part. Compound controls follow their kit's public
|
|
91
|
+
attribute API:
|
|
92
|
+
|
|
93
|
+
- `ElCheckbox`: the label host owns the part and styling class. Its associated
|
|
94
|
+
native input owns checked, mixed and disabled state, and receives focus.
|
|
95
|
+
- `ElInput`: the native input owns data attributes and its accessible name;
|
|
96
|
+
the Element Plus field host owns the styling class.
|
|
97
|
+
- `ElSelect`: the kit host owns the styling class; its native combobox owns the
|
|
98
|
+
accessible name and focus behavior.
|
|
99
|
+
|
|
100
|
+
## Filtering
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import { filters } from "@adapttable/element-plus/filters";
|
|
104
|
+
|
|
105
|
+
const features = [
|
|
106
|
+
filters<Person>([{ key: "name", type: "text" }], { tree: true }),
|
|
107
|
+
];
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Pass `features` to `DataTable`. Use `{ mode: "drawer" }` for an Element Plus
|
|
111
|
+
modal drawer. `FilterField`, `ChecklistFilter` and `FilterTreeBuilder` are also
|
|
112
|
+
available from the filtering entry point for custom layouts over the same
|
|
113
|
+
binding models.
|
|
114
|
+
|
|
115
|
+
The nonmodal popup uses `ElPopover` for positioning and dialog semantics, with
|
|
116
|
+
an `ElCard` content body. The `filters-popover` part and
|
|
117
|
+
`classNames.filtersPopover` belong to that body. The drawer's `filters-panel`
|
|
118
|
+
part and class belong to the actual `ElDrawer` dialog root. `ElDrawer` renders
|
|
119
|
+
its modal mask internally and exposes only `modalClass`, so
|
|
120
|
+
`classNames.filtersBackdrop` styles the mask and no `filters-backdrop` part is
|
|
121
|
+
written to it.
|
|
122
|
+
|
|
123
|
+
### Column header filters
|
|
124
|
+
|
|
125
|
+
Add `headerFilters()` alongside `filters(...)` to place an Element Plus filter
|
|
126
|
+
button in each configured column header:
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
import { filters } from "@adapttable/element-plus/filters";
|
|
130
|
+
import { headerFilters } from "@adapttable/element-plus/header-filters";
|
|
131
|
+
|
|
132
|
+
const features = [
|
|
133
|
+
filters<Person>([{ key: "name", type: "text" }]),
|
|
134
|
+
headerFilters(),
|
|
135
|
+
];
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The header popup uses `ElPopover` and the same binding-owned filter fields.
|
|
139
|
+
`FilterHeaderControl`, `FilterHeaderRow` and `ElementHeaderFilter` are available
|
|
140
|
+
from the header-filter entry point for custom layouts. Compact text and range
|
|
141
|
+
fields use `ElInput`; single and Boolean choices use `ElSelect`; multiple choices
|
|
142
|
+
use `ElCheckbox` inside an `ElPopover`. Their menus portal outside the scrolling
|
|
143
|
+
viewport and stay inside the table root during fullscreen. Popup stacking follows
|
|
144
|
+
`ElConfigProvider`'s `zIndex` setting.
|
|
145
|
+
|
|
146
|
+
Pass `dir="rtl"` or `dir="ltr"` to a standalone `FilterHeaderControl` or
|
|
147
|
+
`FilterHeaderRow` to keep its open popup synchronized with your reactive layout.
|
|
148
|
+
When `dir` is omitted, the multiselect menu reads its native trigger's computed
|
|
149
|
+
direction each time it opens. Inherited CSS direction is not observed while the
|
|
150
|
+
menu stays open.
|
|
151
|
+
|
|
152
|
+
## Optional view controls
|
|
153
|
+
|
|
154
|
+
Add density and fullscreen controls only where they are needed:
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
import { densityChooser } from "@adapttable/element-plus/density";
|
|
158
|
+
import { fullscreen } from "@adapttable/element-plus/fullscreen";
|
|
159
|
+
|
|
160
|
+
const features = [densityChooser(), fullscreen()];
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Pass `features` to `DataTable`. Density uses two visible Element Plus radio
|
|
164
|
+
buttons, Comfortable and Compact, with native radio-group keyboard behavior.
|
|
165
|
+
Their labels follow the table locale. Use `v-model:density` to keep density in
|
|
166
|
+
host state; a rejected request leaves the accepted choice checked. The same
|
|
167
|
+
toggle is available in desktop tables and mobile cards, including RTL layouts.
|
|
168
|
+
The fullscreen button appears only when the browser supports fullscreen; it
|
|
169
|
+
promotes the existing table root.
|
|
170
|
+
|
|
171
|
+
## Grouped, tree and detail rows
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
import { grouping } from "@adapttable/element-plus/grouping";
|
|
175
|
+
import { rowDetail } from "@adapttable/element-plus/row-detail";
|
|
176
|
+
|
|
177
|
+
const features = [
|
|
178
|
+
grouping("score", { groupFooters: true }),
|
|
179
|
+
rowDetail<Person>((person) => `Details for ${person.name}`),
|
|
180
|
+
];
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Group expansion, paging and selection use Element Plus buttons and checkboxes
|
|
184
|
+
in both desktop and mobile layouts. Group aggregates receive the original host
|
|
185
|
+
rows. The `tree` entry point exports `tree`, `useTreeExpansion` and
|
|
186
|
+
`useLazyChildren`; expansion and loading remain in the Vue binding.
|
|
187
|
+
|
|
188
|
+
`rowDetail`, `nestedTable`, `nestedTableDetail` and `useRowExpansion` are exported
|
|
189
|
+
from `row-detail`. The `nested-table` entry point also exports `nestedTable`.
|
|
190
|
+
Supply this kit's `DataTable` in a nested renderer to keep its controls and
|
|
191
|
+
inherited density consistent with the parent.
|
|
192
|
+
|
|
193
|
+
## Server rendering
|
|
194
|
+
|
|
195
|
+
Use Element Plus's documented per-request `ID_INJECTION_KEY` and
|
|
196
|
+
`ZINDEX_INJECTION_KEY` setup, with the same seeds on the server and client.
|
|
197
|
+
Also inject the actual `ssrContext.teleports` payload into its reported targets
|
|
198
|
+
before hydration, as described in the Element Plus SSR guide. Internal select
|
|
199
|
+
anchors can be present in that payload even when `teleported` is false.
|
|
200
|
+
|
|
201
|
+
Element Plus 2.14.7 assigns supplied form-control IDs after mounting. Checkbox
|
|
202
|
+
labels therefore use their native nested-label association during server
|
|
203
|
+
rendering. Input accessible names remain available through `aria-label`.
|
|
204
|
+
Applications that use external `label[for]` associations should account for
|
|
205
|
+
those IDs becoming available after hydration.
|
|
206
|
+
|
|
207
|
+
[Element Plus SSR documentation](https://element-plus.org/en-US/guide/ssr.html)
|
|
208
|
+
|
|
209
|
+
### npm 10 co-installation with Popper
|
|
210
|
+
|
|
211
|
+
The packed Node harness uses npm's `--legacy-peer-deps` consumer profile.
|
|
212
|
+
With npm 10.9.8, Element Plus 2.14.7's declared
|
|
213
|
+
`@popperjs/core: npm:@sxzz/popperjs-es@^2.11.8` dependency can be collapsed
|
|
214
|
+
onto a co-installed real `@popperjs/core`, causing an ESM `placements` error.
|
|
215
|
+
For that specific resolver profile, preserve the declared vendor identity
|
|
216
|
+
with this consumer `package.json` override:
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"overrides": {
|
|
221
|
+
"element-plus@2.14.7": {
|
|
222
|
+
"@popperjs/core": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.8.tgz"
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
This is the official `@sxzz/popperjs-es` tarball required by Element Plus;
|
|
229
|
+
it does not change vendor files or replace another kit's real Popper.
|
|
230
|
+
The selector applies only to Element Plus 2.14.7, leaving future releases
|
|
231
|
+
on their own declared dependency graph.
|
|
232
|
+
|
|
233
|
+
## Row actions
|
|
234
|
+
|
|
235
|
+
```ts
|
|
236
|
+
import { rowActions } from "@adapttable/element-plus/row-actions";
|
|
237
|
+
|
|
238
|
+
const features = [
|
|
239
|
+
rowActions<Person>([
|
|
240
|
+
{
|
|
241
|
+
key: "remove",
|
|
242
|
+
label: "Remove",
|
|
243
|
+
onClick: (person) => removePerson(person.id),
|
|
244
|
+
confirm: {
|
|
245
|
+
title: "Remove person?",
|
|
246
|
+
message: () => "This cannot be undone.",
|
|
247
|
+
confirmLabel: "Remove",
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
]),
|
|
251
|
+
];
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Row-action controls activate after client mount, following the Vue binding's
|
|
255
|
+
server-rendering lifecycle. Actions receive the original host row. Element Plus buttons request the action;
|
|
256
|
+
the host performs the change. Confirmation uses `ElMessageBox`, stays inside the
|
|
257
|
+
fullscreen table and uses the owning Vue app's providers. Dismissal, table
|
|
258
|
+
deactivation and unmount cancel that table's pending dialogs. Supply `confirm`
|
|
259
|
+
on `DataTable` to use your own confirmation handler.
|
|
260
|
+
|
|
261
|
+
## Pinned, summary and supplementary rows
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
import {
|
|
265
|
+
extraRows,
|
|
266
|
+
pinnedSummaryRows,
|
|
267
|
+
rowAppearance,
|
|
268
|
+
rowPinning,
|
|
269
|
+
} from "@adapttable/element-plus/rows";
|
|
270
|
+
|
|
271
|
+
const features = [
|
|
272
|
+
rowPinning(),
|
|
273
|
+
pinnedSummaryRows<Person>({
|
|
274
|
+
bottom: [{ id: "total", name: "Total", score: 179 }],
|
|
275
|
+
}),
|
|
276
|
+
extraRows([
|
|
277
|
+
{ key: "note", kind: "fullWidth", render: () => "Latest scores" },
|
|
278
|
+
]),
|
|
279
|
+
rowAppearance<Person>({
|
|
280
|
+
rowClassName: (person) => (person.score >= 90 ? "high-score" : undefined),
|
|
281
|
+
}),
|
|
282
|
+
];
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Data-row pin controls use Element Plus row actions. Pass a ref or getter through
|
|
286
|
+
`pinnedRowIds` and handle `onPinnedRowIdsChange` to control their state. A rejected
|
|
287
|
+
request leaves the rendered pin order unchanged. Grouped and tree tables do not
|
|
288
|
+
support data-row pinning. Independent summary rows remain outside selection,
|
|
289
|
+
sorting and filtering.
|
|
290
|
+
|
|
291
|
+
Desktop summaries and extras retain native table geometry, including spans.
|
|
292
|
+
Mobile summaries and supplementary content use `ElCard`; their data rows keep
|
|
293
|
+
all fields visible. Host row classes, styles and heights apply to the actual
|
|
294
|
+
row or card. Individual optional entries are also available at `/row-pinning`,
|
|
295
|
+
`/pinned-summary-rows`, `/extra-rows` and `/row-appearance`.
|
|
296
|
+
|
|
297
|
+
## Column controls
|
|
298
|
+
|
|
299
|
+
```ts
|
|
300
|
+
import { type ColumnInput } from "@adapttable/element-plus";
|
|
301
|
+
import {
|
|
302
|
+
collapsibleColumnGroups,
|
|
303
|
+
fitColumns,
|
|
304
|
+
multiSort,
|
|
305
|
+
resizableColumns,
|
|
306
|
+
} from "@adapttable/element-plus/columns";
|
|
307
|
+
|
|
308
|
+
const columns: ColumnInput<Person>[] = [
|
|
309
|
+
{
|
|
310
|
+
header: "Scorecard",
|
|
311
|
+
collapsedKey: "name",
|
|
312
|
+
children: [
|
|
313
|
+
{ key: "name", sortable: true },
|
|
314
|
+
{ key: "score", sortable: true },
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
];
|
|
318
|
+
const features = [
|
|
319
|
+
collapsibleColumnGroups(),
|
|
320
|
+
fitColumns(),
|
|
321
|
+
multiSort(),
|
|
322
|
+
resizableColumns(),
|
|
323
|
+
];
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Column-group toggles, sort actions and resize handles use `ElButton`. Shift-click
|
|
327
|
+
a desktop sort heading to add another priority. Resize handles support native
|
|
328
|
+
pointer interaction and direction-aware Arrow keys through the shared binding.
|
|
329
|
+
Use `v-model:column-layout` to accept layout requests; a supplied layout remains
|
|
330
|
+
authoritative until the host updates it.
|
|
331
|
+
|
|
332
|
+
Mobile cards follow the accepted column layout and sort order. They omit the
|
|
333
|
+
desktop group and resize controls. Header groups keep their native table spans
|
|
334
|
+
and their localized toggle names during server rendering and hydration.
|
|
335
|
+
|
|
336
|
+
## Find in table
|
|
337
|
+
|
|
338
|
+
```ts
|
|
339
|
+
import { findInTable } from "@adapttable/element-plus/find-in-table";
|
|
340
|
+
|
|
341
|
+
const features = [findInTable({ button: true })];
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Find searches the prepared rows without filtering them. Its optional toolbar
|
|
345
|
+
button opens an `ElInput` search field with `ElButton` previous, next and close
|
|
346
|
+
controls. Ctrl/Cmd+F is scoped to the active table. Enter and Shift+Enter move
|
|
347
|
+
between matches; Escape closes the bar and restores the preceding focus target.
|
|
348
|
+
The same controls and match markers work with mobile cards.
|
|
349
|
+
|
|
350
|
+
The field's `find-input` part and accessible name belong to its native input;
|
|
351
|
+
`classNames.findInput` styles the Element Plus host. Its focus target uses the
|
|
352
|
+
documented native `input`/`textarea` exposures and the binding's ref lifecycle.
|
|
353
|
+
`findBar` and `findButton` customize the remaining controls. Labels come from
|
|
354
|
+
the shared table labels. With URL synchronization enabled, the shared `find`
|
|
355
|
+
query restores the open bar and its value during server rendering and hydration.
|
|
356
|
+
|
|
357
|
+
## Cell navigation and status
|
|
358
|
+
|
|
359
|
+
```ts
|
|
360
|
+
import {
|
|
361
|
+
cellNavigation,
|
|
362
|
+
columnSelectionCheckbox,
|
|
363
|
+
} from "@adapttable/element-plus/cell-navigation";
|
|
364
|
+
import { selectionStats, statusBar } from "@adapttable/element-plus/status-bar";
|
|
365
|
+
|
|
366
|
+
const features = [
|
|
367
|
+
cellNavigation(),
|
|
368
|
+
columnSelectionCheckbox(),
|
|
369
|
+
statusBar(),
|
|
370
|
+
selectionStats(),
|
|
371
|
+
];
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Desktop cells use the binding's direction-aware keyboard navigation and range
|
|
375
|
+
selection. Column selection uses `ElCheckbox`; selecting a column moves focus
|
|
376
|
+
into its first grid cell. Status figures use `ElText`, with selection statistics
|
|
377
|
+
inside a polite native `output` live region. Both status features share one strip.
|
|
378
|
+
Standalone aliases are available at `/column-selection` and `/selection-stats`.
|
|
379
|
+
|
|
380
|
+
Fill requires `onCellFill` and editable columns. The host receives cell edit
|
|
381
|
+
requests and decides whether to apply them. The pointer-only fill square uses
|
|
382
|
+
Element Plus theme variables; keyboard fill remains in the shared grid model.
|
|
383
|
+
The handle is hidden from assistive technology and does not add a tab stop.
|
|
384
|
+
|
|
385
|
+
Mobile cards show the status figures and Find controls while omitting desktop
|
|
386
|
+
grid selection and fill handles. `classNames.statusBar`, `statusItem`,
|
|
387
|
+
`selectionStats`, and `fillHandle` style their corresponding semantic parts.
|
|
388
|
+
|
|
389
|
+
## Columns menu and renaming
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
import { columnMenu } from "@adapttable/element-plus/column-menu";
|
|
393
|
+
|
|
394
|
+
const features = [columnMenu()];
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
The Columns button opens an Element Plus popover containing a named `ElCard`
|
|
398
|
+
dialog, real search and action buttons, and `ElSelect` plugin choices. Use it to
|
|
399
|
+
show, hide, pin, reorder, resize or rename supported columns. Columns marked
|
|
400
|
+
`renameable: true` also receive a direct header rename action. Menu and header
|
|
401
|
+
renaming share the binding's validation, announcements and host callbacks.
|
|
402
|
+
|
|
403
|
+
Use `v-model:column-layout` to accept controlled layout changes. Until the host
|
|
404
|
+
updates the supplied layout, rejected pin, visibility and rename requests leave
|
|
405
|
+
the rendered columns unchanged. Renaming changes the display name, not the row
|
|
406
|
+
field key. The same Columns menu is available with mobile cards.
|
|
407
|
+
|
|
408
|
+
The real card content owns the panel part, id, accessible dialog name and native
|
|
409
|
+
ref. A documented virtual positioning reference lets the binding retain the
|
|
410
|
+
actual trigger's ARIA relationship and events. Nested choice popups attach beside
|
|
411
|
+
the scrolling card body, retaining its direction and dismissal boundary. The
|
|
412
|
+
managed panel follows its supplied container, including fullscreen containers.
|
|
413
|
+
The generic `ColumnMenu` component and `ColumnMenuSlotProps` are also exported
|
|
414
|
+
for headless compositions.
|
|
415
|
+
|
|
416
|
+
## Windowed rows and individual feature entries
|
|
417
|
+
|
|
418
|
+
```ts
|
|
419
|
+
import { virtualize } from "@adapttable/element-plus/virtualize";
|
|
420
|
+
|
|
421
|
+
const features = [
|
|
422
|
+
virtualize({ maxHeight: 360, estimateRowSize: 48, estimateCardSize: 160 }),
|
|
423
|
+
];
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Windowing belongs to the Vue binding. The Element Plus renderer retains its
|
|
427
|
+
single native scroll viewport, semantic table spacer rows and kit mobile cards.
|
|
428
|
+
It does not run a second table or virtualization engine. Omit the feature to
|
|
429
|
+
render every row in the current source scope.
|
|
430
|
+
|
|
431
|
+
Column features are available individually at `/column-groups`, `/fit-columns`,
|
|
432
|
+
`/multi-sort` and `/resizable-columns`, as well as through `/columns`.
|
|
433
|
+
`FilterHeaderControl` and `FilterHeaderRow` are available from the package root
|
|
434
|
+
and `/header-filters`; both routes retain the same component identities and
|
|
435
|
+
row-generic contracts.
|
|
436
|
+
|
|
437
|
+
## Bulk actions and print
|
|
438
|
+
|
|
439
|
+
```ts
|
|
440
|
+
import { bulkActions } from "@adapttable/element-plus/bulk-actions";
|
|
441
|
+
import { print } from "@adapttable/element-plus/print";
|
|
442
|
+
|
|
443
|
+
const features = [
|
|
444
|
+
bulkActions([{ key: "archive", label: "Archive", onClick: archiveRows }]),
|
|
445
|
+
print(printTable, true),
|
|
446
|
+
];
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Bulk selection, matching-row scope, confirmation, pending state and errors are
|
|
450
|
+
owned by the Vue binding. Element Plus supplies the real action buttons; the
|
|
451
|
+
table's confirmation handler is used when an action requests confirmation.
|
|
452
|
+
Controlled selection changes take effect when the host updates selected IDs.
|
|
453
|
+
The same action bar works with desktop tables and mobile cards.
|
|
454
|
+
|
|
455
|
+
Print calls the supplied host callback. Pass `true` as the second argument to
|
|
456
|
+
show the Element Plus print button; the default registers the capability without
|
|
457
|
+
adding a toolbar button. Importing the package root does not load either feature.
|
|
458
|
+
|
|
459
|
+
## Cell, row and batch editing
|
|
460
|
+
|
|
461
|
+
```ts
|
|
462
|
+
import {
|
|
463
|
+
editing,
|
|
464
|
+
editHistory,
|
|
465
|
+
undoRedoButtons,
|
|
466
|
+
} from "@adapttable/element-plus/editing";
|
|
467
|
+
import { batchEditing } from "@adapttable/element-plus/batch-editing";
|
|
468
|
+
|
|
469
|
+
const features = [editing(saveCell), editHistory(), undoRedoButtons()];
|
|
470
|
+
const stagedFeatures = [batchEditing(saveRows)];
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
Mark a column `editable: true` and choose its editor: text, number, date, datetime,
|
|
474
|
+
time, boolean, select, multi-select, or a host custom editor. Element Plus supplies
|
|
475
|
+
`ElInput`, `ElSelect`, `ElCheckbox` and `ElButton`; the binding owns drafts,
|
|
476
|
+
validation, parsing, save state, conflicts and host callbacks. The table never
|
|
477
|
+
mutates host rows.
|
|
478
|
+
|
|
479
|
+
Double-click a cell or press F2 to edit. Enter commits a cell; Escape cancels and
|
|
480
|
+
returns focus to its activation button. An open select consumes its own first
|
|
481
|
+
Escape, preserving the outer edit. Moving focus within a select does not save the
|
|
482
|
+
cell. The native input or the kit's supported focus method receives focus.
|
|
483
|
+
|
|
484
|
+
`rowEditing(saveRow)` provides row Save and Cancel buttons. `batchEditing(saveRows)`
|
|
485
|
+
keeps changes staged until the batch Save action. Both modes also work in mobile
|
|
486
|
+
cards. Failed host saves retain the shared error and retry/rollback behavior.
|
|
487
|
+
Custom editors receive the binding's guarded draft, keyboard and focus contract.
|
|
488
|
+
Compose `editing` with `editHistory` when row or batch history needs cell replay;
|
|
489
|
+
`undoRedoButtons` adds genuine Element Plus history controls.
|
|
490
|
+
|
|
491
|
+
Editors retain server-rendered structure for hydration and retire open kit
|
|
492
|
+
popups and stale callbacks when their table is cached or unmounted. Importing the
|
|
493
|
+
package root does not activate or load editing controls.
|
|
494
|
+
|
|
495
|
+
### Commands, saved views, grouping, and row moves
|
|
496
|
+
|
|
497
|
+
The canonical `command-palette`, `context-menu`, `export`, `grouping-panel`,
|
|
498
|
+
`row-reorder`, `saved-views`, and `side-panel` entries fill the shared Vue feature
|
|
499
|
+
contracts with Element Plus controls. Import the factories from those subpaths
|
|
500
|
+
and pass them to `DataTable` through `features`.
|
|
501
|
+
|
|
502
|
+
```ts
|
|
503
|
+
import { commandPalette } from "@adapttable/element-plus/command-palette";
|
|
504
|
+
import { contextMenu } from "@adapttable/element-plus/context-menu";
|
|
505
|
+
import { exportCsv } from "@adapttable/element-plus/export";
|
|
506
|
+
import { groupingPanel } from "@adapttable/element-plus/grouping-panel";
|
|
507
|
+
import { rowReorder } from "@adapttable/element-plus/row-reorder";
|
|
508
|
+
import { savedViews } from "@adapttable/element-plus/saved-views";
|
|
509
|
+
import { sidePanel } from "@adapttable/element-plus/side-panel";
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
Command search and active items remain in the shared command model; `ElDialog`
|
|
513
|
+
owns the palette's modal interaction. Context menus use `ElDropdown` and
|
|
514
|
+
`ElDropdownItem` for native menu navigation. Both surfaces honor their table's
|
|
515
|
+
fullscreen container. `ElButton`, `ElInput`, `ElSelect`, `ElCheckbox`, `ElTag`,
|
|
516
|
+
`ElCard`, `ElProgress`, and `ElLink` render the other controls without introducing
|
|
517
|
+
another feature store.
|
|
518
|
+
|
|
519
|
+
Grouping chips forward drag and keyboard interactions to the shared grouping
|
|
520
|
+
controller. Aggregation changes use the same shared operations and host
|
|
521
|
+
notifications. Row reorder requests preserve host row ownership; cross-group
|
|
522
|
+
and tree moves use the shared confirmation model rendered through `ElDialog`.
|
|
523
|
+
|
|
524
|
+
The `saved-views` entry also exports `SavedViewsPanel` and `SavedViewsPanelProps`
|
|
525
|
+
for management surfaces. Rename drafts, read-only/default rules, ordering, URL
|
|
526
|
+
state, and storage remain owned by the shared saved-view models. `sidePanel`
|
|
527
|
+
retains controlled panel selection, with native buttons and a native card frame.
|
|
528
|
+
|
|
529
|
+
### Optional assistant and pivot controls
|
|
530
|
+
|
|
531
|
+
The `assistant` entry provides `TableAssistant`, `AgentApproval`,
|
|
532
|
+
`tableAssistant()`, and `agentApproval()` using the binding's conversation and
|
|
533
|
+
approval contracts. Its sheet is an `ElDrawer`, examples use `ElDropdown`, the
|
|
534
|
+
composer is an `ElInput` textarea, and speech language choices use `ElSelect`.
|
|
535
|
+
It does not import an AI transport or own approval decisions. The `pivot` entry
|
|
536
|
+
provides a controlled `PivotPanel` with `ElSelect` and `ElButton` controls.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_button = require("./button-BFjBL9m3.cjs");
|
|
2
|
+
let vue = require("vue");
|
|
3
|
+
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
4
|
+
let element_plus = require("element-plus");
|
|
5
|
+
//#region src/presentation/ElementCard.ts
|
|
6
|
+
/** The actual ElCard root remains the semantic row and measurement target. */
|
|
7
|
+
const ElementCard = (0, vue.defineComponent)((props, { slots, attrs }) => {
|
|
8
|
+
const control = (0, vue.shallowRef)();
|
|
9
|
+
(0, _adapttable_vue_adapter.useElementRef)(() => {
|
|
10
|
+
const target = control.value?.$el;
|
|
11
|
+
if (target == null) return null;
|
|
12
|
+
return target instanceof HTMLElement ? target : null;
|
|
13
|
+
}, () => require_button.isElementRef(props.attrs.ref) ? props.attrs.ref : void 0);
|
|
14
|
+
return () => {
|
|
15
|
+
const incoming = (0, vue.mergeProps)(props.attrs, attrs);
|
|
16
|
+
const nativeAttrs = Object.fromEntries(Object.entries(incoming).filter(([name]) => name !== "ref"));
|
|
17
|
+
return (0, vue.h)(element_plus.ElCard, {
|
|
18
|
+
...(0, vue.mergeProps)({ class: "adapttable-element-plus-card" }, nativeAttrs),
|
|
19
|
+
shadow: "never",
|
|
20
|
+
bodyClass: "adapttable-element-plus-card-body",
|
|
21
|
+
bodyStyle: props.bodyStyle,
|
|
22
|
+
ref: control
|
|
23
|
+
}, slots);
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
name: "ElementCard",
|
|
27
|
+
props: {
|
|
28
|
+
attrs: { type: Object },
|
|
29
|
+
bodyStyle: { type: Object }
|
|
30
|
+
},
|
|
31
|
+
inheritAttrs: false
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
Object.defineProperty(exports, "ElementCard", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function() {
|
|
37
|
+
return ElementCard;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=ElementCard-BRZekaHr.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ElementCard-BRZekaHr.cjs","names":["defineComponent","shallowRef","isElementRef","mergeProps","h","ElCard"],"sources":["../src/presentation/ElementCard.ts"],"sourcesContent":["import type { Attrs } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport { type CardInstance, ElCard } from \"element-plus\";\nimport {\n type CSSProperties,\n defineComponent,\n h,\n mergeProps,\n type PropType,\n shallowRef,\n} from \"vue\";\n\nimport { isElementRef } from \"../controls/ref\";\n\n/** The actual ElCard root remains the semantic row and measurement target. */\nexport const ElementCard = defineComponent(\n (\n props: { readonly attrs: Attrs; readonly bodyStyle?: CSSProperties },\n { slots, attrs }\n ) => {\n const control = shallowRef<CardInstance>();\n useElementRef(\n () => {\n const target: unknown = control.value?.$el;\n if (target == null) return null;\n return target instanceof HTMLElement ? target : null;\n },\n () => (isElementRef(props.attrs.ref) ? props.attrs.ref : undefined)\n );\n return () => {\n const incoming = mergeProps(props.attrs, attrs);\n const nativeAttrs = Object.fromEntries(\n Object.entries(incoming).filter(([name]) => name !== \"ref\")\n );\n return h(\n ElCard,\n {\n ...mergeProps({ class: \"adapttable-element-plus-card\" }, nativeAttrs),\n shadow: \"never\",\n bodyClass: \"adapttable-element-plus-card-body\",\n bodyStyle: props.bodyStyle,\n ref: control,\n },\n slots\n );\n };\n },\n {\n name: \"ElementCard\",\n props: {\n attrs: { type: Object as PropType<Attrs> },\n bodyStyle: { type: Object as PropType<CSSProperties | undefined> },\n },\n inheritAttrs: false,\n }\n);\n"],"mappings":";;;;;;AAeA,MAAa,eAAA,GAAcA,IAAAA,gBAAAA,EAEvB,OACA,EAAE,OAAO,YACN;CACH,MAAM,WAAA,GAAUC,IAAAA,WAAAA,CAAyB;CACzC,CAAA,GAAA,wBAAA,cAAA,OACQ;EACJ,MAAM,SAAkB,QAAQ,OAAO;EACvC,IAAI,UAAU,MAAM,OAAO;EAC3B,OAAO,kBAAkB,cAAc,SAAS;CAClD,SACOC,eAAAA,aAAa,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,MAAM,KAAA,CAC3D;CACA,aAAa;EACX,MAAM,YAAA,GAAWC,IAAAA,WAAAA,CAAW,MAAM,OAAO,KAAK;EAC9C,MAAM,cAAc,OAAO,YACzB,OAAO,QAAQ,QAAQ,CAAC,CAAC,QAAQ,CAAC,UAAU,SAAS,KAAK,CAC5D;EACA,QAAA,GAAOC,IAAAA,EAAAA,CACLC,aAAAA,QACA;GACE,IAAA,GAAGF,IAAAA,WAAAA,CAAW,EAAE,OAAO,+BAA+B,GAAG,WAAW;GACpE,QAAQ;GACR,WAAW;GACX,WAAW,MAAM;GACjB,KAAK;EACP,GACA,KACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,OAA0B;EACzC,WAAW,EAAE,MAAM,OAA8C;CACnE;CACA,cAAc;AAChB,CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { n as isElementRef } from "./button-DwB4UxI2.js";
|
|
2
|
+
import { defineComponent, h, mergeProps, shallowRef } from "vue";
|
|
3
|
+
import { useElementRef } from "@adapttable/vue/adapter";
|
|
4
|
+
import { ElCard } from "element-plus";
|
|
5
|
+
//#region src/presentation/ElementCard.ts
|
|
6
|
+
/** The actual ElCard root remains the semantic row and measurement target. */
|
|
7
|
+
const ElementCard = defineComponent((props, { slots, attrs }) => {
|
|
8
|
+
const control = shallowRef();
|
|
9
|
+
useElementRef(() => {
|
|
10
|
+
const target = control.value?.$el;
|
|
11
|
+
if (target == null) return null;
|
|
12
|
+
return target instanceof HTMLElement ? target : null;
|
|
13
|
+
}, () => isElementRef(props.attrs.ref) ? props.attrs.ref : void 0);
|
|
14
|
+
return () => {
|
|
15
|
+
const incoming = mergeProps(props.attrs, attrs);
|
|
16
|
+
const nativeAttrs = Object.fromEntries(Object.entries(incoming).filter(([name]) => name !== "ref"));
|
|
17
|
+
return h(ElCard, {
|
|
18
|
+
...mergeProps({ class: "adapttable-element-plus-card" }, nativeAttrs),
|
|
19
|
+
shadow: "never",
|
|
20
|
+
bodyClass: "adapttable-element-plus-card-body",
|
|
21
|
+
bodyStyle: props.bodyStyle,
|
|
22
|
+
ref: control
|
|
23
|
+
}, slots);
|
|
24
|
+
};
|
|
25
|
+
}, {
|
|
26
|
+
name: "ElementCard",
|
|
27
|
+
props: {
|
|
28
|
+
attrs: { type: Object },
|
|
29
|
+
bodyStyle: { type: Object }
|
|
30
|
+
},
|
|
31
|
+
inheritAttrs: false
|
|
32
|
+
});
|
|
33
|
+
//#endregion
|
|
34
|
+
export { ElementCard as t };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=ElementCard-DZdAU6x8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ElementCard-DZdAU6x8.js","names":[],"sources":["../src/presentation/ElementCard.ts"],"sourcesContent":["import type { Attrs } from \"@adapttable/vue\";\nimport { useElementRef } from \"@adapttable/vue/adapter\";\nimport { type CardInstance, ElCard } from \"element-plus\";\nimport {\n type CSSProperties,\n defineComponent,\n h,\n mergeProps,\n type PropType,\n shallowRef,\n} from \"vue\";\n\nimport { isElementRef } from \"../controls/ref\";\n\n/** The actual ElCard root remains the semantic row and measurement target. */\nexport const ElementCard = defineComponent(\n (\n props: { readonly attrs: Attrs; readonly bodyStyle?: CSSProperties },\n { slots, attrs }\n ) => {\n const control = shallowRef<CardInstance>();\n useElementRef(\n () => {\n const target: unknown = control.value?.$el;\n if (target == null) return null;\n return target instanceof HTMLElement ? target : null;\n },\n () => (isElementRef(props.attrs.ref) ? props.attrs.ref : undefined)\n );\n return () => {\n const incoming = mergeProps(props.attrs, attrs);\n const nativeAttrs = Object.fromEntries(\n Object.entries(incoming).filter(([name]) => name !== \"ref\")\n );\n return h(\n ElCard,\n {\n ...mergeProps({ class: \"adapttable-element-plus-card\" }, nativeAttrs),\n shadow: \"never\",\n bodyClass: \"adapttable-element-plus-card-body\",\n bodyStyle: props.bodyStyle,\n ref: control,\n },\n slots\n );\n };\n },\n {\n name: \"ElementCard\",\n props: {\n attrs: { type: Object as PropType<Attrs> },\n bodyStyle: { type: Object as PropType<CSSProperties | undefined> },\n },\n inheritAttrs: false,\n }\n);\n"],"mappings":";;;;;;AAeA,MAAa,cAAc,iBAEvB,OACA,EAAE,OAAO,YACN;CACH,MAAM,UAAU,WAAyB;CACzC,oBACQ;EACJ,MAAM,SAAkB,QAAQ,OAAO;EACvC,IAAI,UAAU,MAAM,OAAO;EAC3B,OAAO,kBAAkB,cAAc,SAAS;CAClD,SACO,aAAa,MAAM,MAAM,GAAG,IAAI,MAAM,MAAM,MAAM,KAAA,CAC3D;CACA,aAAa;EACX,MAAM,WAAW,WAAW,MAAM,OAAO,KAAK;EAC9C,MAAM,cAAc,OAAO,YACzB,OAAO,QAAQ,QAAQ,CAAC,CAAC,QAAQ,CAAC,UAAU,SAAS,KAAK,CAC5D;EACA,OAAO,EACL,QACA;GACE,GAAG,WAAW,EAAE,OAAO,+BAA+B,GAAG,WAAW;GACpE,QAAQ;GACR,WAAW;GACX,WAAW,MAAM;GACjB,KAAK;EACP,GACA,KACF;CACF;AACF,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EAAE,MAAM,OAA0B;EACzC,WAAW,EAAE,MAAM,OAA8C;CACnE;CACA,cAAc;AAChB,CACF"}
|