@toolbox-web/grid 1.9.0 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all.js +712 -692
- package/all.js.map +1 -1
- package/index.js +321 -300
- package/index.js.map +1 -1
- package/lib/core/grid.d.ts +9 -0
- package/lib/core/grid.d.ts.map +1 -1
- package/lib/core/plugin/base-plugin.d.ts +11 -0
- package/lib/core/plugin/base-plugin.d.ts.map +1 -1
- package/lib/plugins/clipboard/index.js +9 -0
- package/lib/plugins/clipboard/index.js.map +1 -1
- package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +3 -0
- package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
- package/lib/plugins/column-virtualization/index.js +90 -57
- package/lib/plugins/column-virtualization/index.js.map +1 -1
- package/lib/plugins/context-menu/index.js +9 -0
- package/lib/plugins/context-menu/index.js.map +1 -1
- package/lib/plugins/editing/index.js +9 -0
- package/lib/plugins/editing/index.js.map +1 -1
- package/lib/plugins/export/index.js +38 -29
- package/lib/plugins/export/index.js.map +1 -1
- package/lib/plugins/filtering/index.js +14 -5
- package/lib/plugins/filtering/index.js.map +1 -1
- package/lib/plugins/grouping-columns/index.js +9 -0
- package/lib/plugins/grouping-columns/index.js.map +1 -1
- package/lib/plugins/grouping-rows/index.js +63 -54
- package/lib/plugins/grouping-rows/index.js.map +1 -1
- package/lib/plugins/master-detail/index.js +25 -16
- package/lib/plugins/master-detail/index.js.map +1 -1
- package/lib/plugins/multi-sort/index.js +13 -4
- package/lib/plugins/multi-sort/index.js.map +1 -1
- package/lib/plugins/pinned-columns/index.js +13 -4
- package/lib/plugins/pinned-columns/index.js.map +1 -1
- package/lib/plugins/pinned-rows/index.js +9 -0
- package/lib/plugins/pinned-rows/index.js.map +1 -1
- package/lib/plugins/pivot/index.js +13 -4
- package/lib/plugins/pivot/index.js.map +1 -1
- package/lib/plugins/print/index.js +9 -0
- package/lib/plugins/print/index.js.map +1 -1
- package/lib/plugins/reorder/index.js +13 -4
- package/lib/plugins/reorder/index.js.map +1 -1
- package/lib/plugins/responsive/index.js +42 -33
- package/lib/plugins/responsive/index.js.map +1 -1
- package/lib/plugins/row-reorder/index.js +10 -1
- package/lib/plugins/row-reorder/index.js.map +1 -1
- package/lib/plugins/selection/index.js +10 -1
- package/lib/plugins/selection/index.js.map +1 -1
- package/lib/plugins/server-side/index.js +29 -20
- package/lib/plugins/server-side/index.js.map +1 -1
- package/lib/plugins/tree/index.js +20 -11
- package/lib/plugins/tree/index.js.map +1 -1
- package/lib/plugins/undo-redo/index.js +15 -6
- package/lib/plugins/undo-redo/index.js.map +1 -1
- package/lib/plugins/visibility/index.js +9 -0
- package/lib/plugins/visibility/index.js.map +1 -1
- package/package.json +1 -1
- package/umd/grid.all.umd.js +14 -14
- package/umd/grid.all.umd.js.map +1 -1
- package/umd/grid.umd.js +14 -14
- package/umd/grid.umd.js.map +1 -1
- package/umd/plugins/column-virtualization.umd.js +1 -1
- package/umd/plugins/column-virtualization.umd.js.map +1 -1
- package/umd/plugins/row-reorder.umd.js +1 -1
- package/umd/plugins/row-reorder.umd.js.map +1 -1
- package/umd/plugins/selection.umd.js +1 -1
- package/umd/plugins/selection.umd.js.map +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentColor" d="M6 10.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5zm-2-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5z"/></svg>', u = {
|
|
2
2
|
expand: "▶",
|
|
3
3
|
collapse: "▼",
|
|
4
4
|
sortAsc: "▲",
|
|
@@ -7,8 +7,8 @@ const c = '<svg viewBox="0 0 16 16" width="12" height="12"><path fill="currentCo
|
|
|
7
7
|
submenuArrow: "▶",
|
|
8
8
|
dragHandle: "⋮⋮",
|
|
9
9
|
toolPanel: "☰",
|
|
10
|
-
filter:
|
|
11
|
-
filterActive:
|
|
10
|
+
filter: s,
|
|
11
|
+
filterActive: s,
|
|
12
12
|
print: "🖨️"
|
|
13
13
|
};
|
|
14
14
|
class h {
|
|
@@ -208,10 +208,19 @@ class h {
|
|
|
208
208
|
}
|
|
209
209
|
/**
|
|
210
210
|
* Request a re-render of the grid.
|
|
211
|
+
* Uses ROWS phase - does NOT trigger processColumns hooks.
|
|
211
212
|
*/
|
|
212
213
|
requestRender() {
|
|
213
214
|
this.grid?.requestRender?.();
|
|
214
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Request a columns re-render of the grid.
|
|
218
|
+
* Uses COLUMNS phase - triggers processColumns hooks.
|
|
219
|
+
* Use this when your plugin needs to reprocess column configuration.
|
|
220
|
+
*/
|
|
221
|
+
requestColumnsRender() {
|
|
222
|
+
this.grid?.requestColumnsRender?.();
|
|
223
|
+
}
|
|
215
224
|
/**
|
|
216
225
|
* Request a re-render and restore focus styling afterward.
|
|
217
226
|
* Use this when a plugin action (like expand/collapse) triggers a render
|
|
@@ -378,7 +387,7 @@ function l(n, t, e) {
|
|
|
378
387
|
// Clear redo on new action
|
|
379
388
|
};
|
|
380
389
|
}
|
|
381
|
-
function
|
|
390
|
+
function c(n) {
|
|
382
391
|
if (n.undoStack.length === 0)
|
|
383
392
|
return { newState: n, action: null };
|
|
384
393
|
const t = [...n.undoStack], e = t.pop();
|
|
@@ -470,7 +479,7 @@ class w extends h {
|
|
|
470
479
|
onKeyDown(t) {
|
|
471
480
|
const e = (t.ctrlKey || t.metaKey) && t.key === "z" && !t.shiftKey, r = (t.ctrlKey || t.metaKey) && (t.key === "y" || t.key === "z" && t.shiftKey);
|
|
472
481
|
if (e) {
|
|
473
|
-
const o =
|
|
482
|
+
const o = c({ undoStack: this.undoStack, redoStack: this.redoStack });
|
|
474
483
|
if (o.action) {
|
|
475
484
|
const i = this.rows;
|
|
476
485
|
i[o.action.rowIndex] && (i[o.action.rowIndex][o.action.field] = o.action.oldValue), this.undoStack = o.newState.undoStack, this.redoStack = o.newState.redoStack, this.emit("undo", {
|
|
@@ -517,7 +526,7 @@ class w extends h {
|
|
|
517
526
|
* @returns The undone action, or null if nothing to undo
|
|
518
527
|
*/
|
|
519
528
|
undo() {
|
|
520
|
-
const t =
|
|
529
|
+
const t = c({ undoStack: this.undoStack, redoStack: this.redoStack });
|
|
521
530
|
if (t.action) {
|
|
522
531
|
const e = this.rows;
|
|
523
532
|
e[t.action.rowIndex] && (e[t.action.rowIndex][t.action.field] = t.action.oldValue), this.undoStack = t.newState.undoStack, this.redoStack = t.newState.redoStack, this.requestRender();
|