@toolbox-web/grid-vue 0.7.0 → 0.8.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.
Files changed (109) hide show
  1. package/chunks/use-grid-B59B6XdD.js +22 -0
  2. package/chunks/use-grid-B59B6XdD.js.map +1 -0
  3. package/features/clipboard.d.ts +0 -19
  4. package/features/clipboard.d.ts.map +1 -1
  5. package/features/clipboard.js +1 -3
  6. package/features/clipboard.js.map +1 -1
  7. package/features/column-virtualization.d.ts +0 -19
  8. package/features/column-virtualization.d.ts.map +1 -1
  9. package/features/column-virtualization.js +1 -3
  10. package/features/column-virtualization.js.map +1 -1
  11. package/features/context-menu.d.ts +0 -19
  12. package/features/context-menu.d.ts.map +1 -1
  13. package/features/context-menu.js +1 -3
  14. package/features/context-menu.js.map +1 -1
  15. package/features/editing.d.ts +0 -19
  16. package/features/editing.d.ts.map +1 -1
  17. package/features/editing.js +1 -3
  18. package/features/editing.js.map +1 -1
  19. package/features/export.d.ts.map +1 -1
  20. package/features/export.js +18 -20
  21. package/features/export.js.map +1 -1
  22. package/features/filtering.js +33 -33
  23. package/features/filtering.js.map +1 -1
  24. package/features/grouping-columns.d.ts +0 -23
  25. package/features/grouping-columns.d.ts.map +1 -1
  26. package/features/grouping-columns.js +1 -3
  27. package/features/grouping-columns.js.map +1 -1
  28. package/features/grouping-rows.d.ts +0 -22
  29. package/features/grouping-rows.d.ts.map +1 -1
  30. package/features/grouping-rows.js +1 -3
  31. package/features/grouping-rows.js.map +1 -1
  32. package/features/index.js +20 -21
  33. package/features/index.js.map +1 -1
  34. package/features/master-detail.d.ts +0 -22
  35. package/features/master-detail.d.ts.map +1 -1
  36. package/features/master-detail.js +1 -3
  37. package/features/master-detail.js.map +1 -1
  38. package/features/multi-sort.d.ts +0 -19
  39. package/features/multi-sort.d.ts.map +1 -1
  40. package/features/multi-sort.js +1 -4
  41. package/features/multi-sort.js.map +1 -1
  42. package/features/pinned-columns.d.ts +0 -22
  43. package/features/pinned-columns.d.ts.map +1 -1
  44. package/features/pinned-columns.js +1 -3
  45. package/features/pinned-columns.js.map +1 -1
  46. package/features/pinned-rows.d.ts +0 -21
  47. package/features/pinned-rows.d.ts.map +1 -1
  48. package/features/pinned-rows.js +1 -3
  49. package/features/pinned-rows.js.map +1 -1
  50. package/features/pivot.d.ts +0 -23
  51. package/features/pivot.d.ts.map +1 -1
  52. package/features/pivot.js +1 -3
  53. package/features/pivot.js.map +1 -1
  54. package/features/print.d.ts.map +1 -1
  55. package/features/print.js +11 -13
  56. package/features/print.js.map +1 -1
  57. package/features/reorder-columns.d.ts +1 -0
  58. package/features/reorder-columns.d.ts.map +1 -0
  59. package/features/reorder-columns.js +2 -0
  60. package/features/reorder-columns.js.map +1 -0
  61. package/features/reorder-rows.d.ts +1 -0
  62. package/features/reorder-rows.d.ts.map +1 -0
  63. package/features/reorder-rows.js +2 -0
  64. package/features/reorder-rows.js.map +1 -0
  65. package/features/reorder.d.ts +3 -17
  66. package/features/reorder.d.ts.map +1 -1
  67. package/features/reorder.js +1 -3
  68. package/features/reorder.js.map +1 -1
  69. package/features/responsive.d.ts +0 -23
  70. package/features/responsive.d.ts.map +1 -1
  71. package/features/responsive.js +1 -3
  72. package/features/responsive.js.map +1 -1
  73. package/features/row-reorder.d.ts +3 -17
  74. package/features/row-reorder.d.ts.map +1 -1
  75. package/features/row-reorder.js +1 -3
  76. package/features/row-reorder.js.map +1 -1
  77. package/features/selection.d.ts.map +1 -1
  78. package/features/selection.js +20 -22
  79. package/features/selection.js.map +1 -1
  80. package/features/server-side.d.ts +0 -21
  81. package/features/server-side.d.ts.map +1 -1
  82. package/features/server-side.js +1 -3
  83. package/features/server-side.js.map +1 -1
  84. package/features/tree.d.ts +0 -22
  85. package/features/tree.d.ts.map +1 -1
  86. package/features/tree.js +1 -3
  87. package/features/tree.js.map +1 -1
  88. package/features/undo-redo.d.ts.map +1 -1
  89. package/features/undo-redo.js +10 -12
  90. package/features/undo-redo.js.map +1 -1
  91. package/features/visibility.d.ts +0 -19
  92. package/features/visibility.d.ts.map +1 -1
  93. package/features/visibility.js +1 -3
  94. package/features/visibility.js.map +1 -1
  95. package/index.js +87 -73
  96. package/index.js.map +1 -1
  97. package/lib/TbwGrid.vue.d.ts +5 -1
  98. package/lib/TbwGrid.vue.d.ts.map +1 -1
  99. package/lib/feature-props.d.ts +12 -4
  100. package/lib/feature-props.d.ts.map +1 -1
  101. package/lib/feature-registry.d.ts +6 -51
  102. package/lib/feature-registry.d.ts.map +1 -1
  103. package/lib/use-grid.d.ts +5 -0
  104. package/lib/use-grid.d.ts.map +1 -1
  105. package/package.json +1 -1
  106. package/chunks/feature-registry-BgEOysSJ.js +0 -38
  107. package/chunks/feature-registry-BgEOysSJ.js.map +0 -1
  108. package/chunks/use-grid-DwjXrO19.js +0 -21
  109. package/chunks/use-grid-DwjXrO19.js.map +0 -1
@@ -1,23 +1 @@
1
- /**
2
- * Tree view feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `tree` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/tree';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid :tree="{
14
- * childrenField: 'children',
15
- * defaultExpanded: true,
16
- * }" />
17
- * </template>
18
- * ```
19
- *
20
- * @packageDocumentation
21
- */
22
- export {};
23
1
  //# sourceMappingURL=tree.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
1
+ {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,iCAAiC,CAAC"}
package/features/tree.js CHANGED
@@ -1,4 +1,2 @@
1
- import { TreePlugin as e } from "@toolbox-web/grid/plugins/tree";
2
- import { r as t } from "../chunks/feature-registry-BgEOysSJ.js";
3
- t("tree", (r) => r === !0 ? new e() : new e(r ?? void 0));
1
+ import "@toolbox-web/grid/features/tree";
4
2
  //# sourceMappingURL=tree.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","sources":["../../../../libs/grid-vue/src/features/tree.ts"],"sourcesContent":["/**\n * Tree view feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `tree` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/tree';\n * </script>\n *\n * <template>\n * <TbwGrid :tree=\"{\n * childrenField: 'children',\n * defaultExpanded: true,\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { TreePlugin } from '@toolbox-web/grid/plugins/tree';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('tree', (config) => {\n if (config === true) {\n return new TreePlugin();\n }\n return new TreePlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","TreePlugin"],"mappings":";;AAyBAA,EAAgB,QAAQ,CAACC,MACnBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAWD,KAAU,MAAS,CAC1C;"}
1
+ {"version":3,"file":"tree.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1 @@
1
- {"version":3,"file":"undo-redo.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/undo-redo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAY1F;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,IAAI,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAElC;;;OAGG;IACH,IAAI,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IAEzB;;OAEG;IACH,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;IAErC;;OAEG;IACH,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;IAErC;;;OAGG;IACH,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5F;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAE7B;;;;;OAKG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,IAAI,eAAe,CA+FjD"}
1
+ {"version":3,"file":"undo-redo.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/undo-redo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAGH,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAK/F,OAAO,sCAAsC,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,IAAI,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAElC;;;OAGG;IACH,IAAI,EAAE,MAAM,cAAc,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IAEvB;;OAEG;IACH,OAAO,EAAE,MAAM,OAAO,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IAEzB;;OAEG;IACH,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;IAErC;;OAEG;IACH,YAAY,EAAE,MAAM,cAAc,EAAE,CAAC;IAErC;;;OAGG;IACH,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5F;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAE7B;;;;;OAKG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,eAAe,IAAI,eAAe,CA+FjD"}
@@ -1,10 +1,8 @@
1
- import { UndoRedoPlugin as e } from "@toolbox-web/grid/plugins/undo-redo";
2
- import { inject as l, ref as c } from "vue";
3
- import { r as g } from "../chunks/feature-registry-BgEOysSJ.js";
4
- import { G as a } from "../chunks/use-grid-DwjXrO19.js";
5
- g("undoRedo", (d) => d === !0 ? new e() : new e(d ?? void 0));
6
- function w() {
7
- const d = l(a, c(null)), o = () => d.value?.getPlugin(e);
1
+ import { inject as u, ref as l } from "vue";
2
+ import { G as c } from "../chunks/use-grid-B59B6XdD.js";
3
+ import "@toolbox-web/grid/features/undo-redo";
4
+ function s() {
5
+ const e = u(c, l(null)), o = () => e.value?.getPluginByName("undoRedo");
8
6
  return {
9
7
  undo: () => {
10
8
  const n = o();
@@ -41,9 +39,9 @@ function w() {
41
39
  },
42
40
  getUndoStack: () => o()?.getUndoStack() ?? [],
43
41
  getRedoStack: () => o()?.getRedoStack() ?? [],
44
- recordEdit: (n, i, t, u) => {
45
- const r = o();
46
- if (!r) {
42
+ recordEdit: (n, i, r, t) => {
43
+ const d = o();
44
+ if (!d) {
47
45
  console.warn(
48
46
  `[tbw-grid:undoRedo] UndoRedoPlugin not found.
49
47
 
@@ -52,7 +50,7 @@ function w() {
52
50
  );
53
51
  return;
54
52
  }
55
- r.recordEdit(n, i, t, u);
53
+ d.recordEdit(n, i, r, t);
56
54
  },
57
55
  beginTransaction: () => {
58
56
  const n = o();
@@ -83,6 +81,6 @@ function w() {
83
81
  };
84
82
  }
85
83
  export {
86
- w as useGridUndoRedo
84
+ s as useGridUndoRedo
87
85
  };
88
86
  //# sourceMappingURL=undo-redo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"undo-redo.js","sources":["../../../../libs/grid-vue/src/features/undo-redo.ts"],"sourcesContent":["/**\n * Undo/Redo feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `undoRedo` prop on TbwGrid.\n * Also exports `useGridUndoRedo()` composable for programmatic undo/redo control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/undo-redo';\n * </script>\n *\n * <template>\n * <TbwGrid editing=\"dblclick\" undoRedo />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridUndoRedo } from '@toolbox-web/grid-vue/features/undo-redo';\n *\n * const { undo, redo, canUndo, canRedo } = useGridUndoRedo();\n * </script>\n *\n * <template>\n * <button @click=\"undo\" :disabled=\"!canUndo()\">Undo</button>\n * <button @click=\"redo\" :disabled=\"!canRedo()\">Redo</button>\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { UndoRedoPlugin, type UndoRedoAction } from '@toolbox-web/grid/plugins/undo-redo';\nimport { inject, ref } from 'vue';\nimport { registerFeature } from '../lib/feature-registry';\nimport { GRID_ELEMENT_KEY } from '../lib/use-grid';\n\nregisterFeature('undoRedo', (config) => {\n if (config === true) {\n return new UndoRedoPlugin();\n }\n return new UndoRedoPlugin(config ?? undefined);\n});\n\n/**\n * Undo/Redo methods returned from useGridUndoRedo.\n */\nexport interface UndoRedoMethods {\n /**\n * Undo the last edit action.\n * @returns The undone action (or compound action), or null if nothing to undo\n */\n undo: () => UndoRedoAction | null;\n\n /**\n * Redo the last undone action.\n * @returns The redone action (or compound action), or null if nothing to redo\n */\n redo: () => UndoRedoAction | null;\n\n /**\n * Check if there are any actions that can be undone.\n */\n canUndo: () => boolean;\n\n /**\n * Check if there are any actions that can be redone.\n */\n canRedo: () => boolean;\n\n /**\n * Clear all undo/redo history.\n */\n clearHistory: () => void;\n\n /**\n * Get a copy of the current undo stack.\n */\n getUndoStack: () => UndoRedoAction[];\n\n /**\n * Get a copy of the current redo stack.\n */\n getRedoStack: () => UndoRedoAction[];\n\n /**\n * Manually record an edit action.\n * If a transaction is active, the action is buffered; otherwise it's pushed to the undo stack.\n */\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => void;\n\n /**\n * Begin a transaction. All edits recorded until `endTransaction()` are grouped\n * into a single compound action for undo/redo.\n * @throws If a transaction is already active\n */\n beginTransaction: () => void;\n\n /**\n * End the active transaction and push the compound action to the undo stack.\n * If only one edit was recorded, it's pushed as a plain EditAction.\n * If no edits were recorded, the transaction is discarded.\n * @throws If no transaction is active\n */\n endTransaction: () => void;\n}\n\n/**\n * Composable for programmatic undo/redo control.\n *\n * Must be used within a component that contains a TbwGrid with undoRedo and editing enabled.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridUndoRedo } from '@toolbox-web/grid-vue/features/undo-redo';\n *\n * const { undo, redo, canUndo, canRedo, clearHistory } = useGridUndoRedo();\n * </script>\n *\n * <template>\n * <div class=\"toolbar\">\n * <button @click=\"undo\" :disabled=\"!canUndo()\">Undo</button>\n * <button @click=\"redo\" :disabled=\"!canRedo()\">Redo</button>\n * <button @click=\"clearHistory\">Clear History</button>\n * </div>\n * </template>\n * ```\n */\nexport function useGridUndoRedo(): UndoRedoMethods {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): UndoRedoPlugin | undefined => {\n const grid = gridElement.value as DataGridElement | null;\n return grid?.getPlugin(UndoRedoPlugin);\n };\n\n return {\n undo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return null;\n }\n return plugin.undo();\n },\n\n redo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return null;\n }\n return plugin.redo();\n },\n\n canUndo: () => getPlugin()?.canUndo() ?? false,\n\n canRedo: () => getPlugin()?.canRedo() ?? false,\n\n clearHistory: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.clearHistory();\n },\n\n getUndoStack: () => getPlugin()?.getUndoStack() ?? [],\n\n getRedoStack: () => getPlugin()?.getRedoStack() ?? [],\n\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.recordEdit(rowIndex, field, oldValue, newValue);\n },\n\n beginTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.beginTransaction();\n },\n\n endTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.endTransaction();\n },\n };\n}\n"],"names":["registerFeature","config","UndoRedoPlugin","useGridUndoRedo","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","plugin","rowIndex","field","oldValue","newValue"],"mappings":";;;;AAwCAA,EAAgB,YAAY,CAACC,MACvBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAeD,KAAU,MAAS,CAC9C;AAuFM,SAASE,IAAmC;AACjD,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,UAAUF,CAAc;AAGvC,SAAO;AAAA,IACL,MAAM,MAAM;AACV,YAAMO,IAASD,EAAA;AACf,aAAKC,IAQEA,EAAO,KAAA,KAPZ,QAAQ;AAAA,QACN;AAAA;AAAA;AAAA;AAAA,MAAA,GAIK;AAAA,IAGX;AAAA,IAEA,MAAM,MAAM;AACV,YAAMA,IAASD,EAAA;AACf,aAAKC,IAQEA,EAAO,KAAA,KAPZ,QAAQ;AAAA,QACN;AAAA;AAAA;AAAA;AAAA,MAAA,GAIK;AAAA,IAGX;AAAA,IAEA,SAAS,MAAMD,KAAa,aAAa;AAAA,IAEzC,SAAS,MAAMA,KAAa,aAAa;AAAA,IAEzC,cAAc,MAAM;AAClB,YAAMC,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,aAAA;AAAA,IACT;AAAA,IAEA,cAAc,MAAMD,KAAa,aAAA,KAAkB,CAAA;AAAA,IAEnD,cAAc,MAAMA,KAAa,aAAA,KAAkB,CAAA;AAAA,IAEnD,YAAY,CAACE,GAAkBC,GAAeC,GAAmBC,MAAsB;AACrF,YAAMJ,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,WAAWC,GAAUC,GAAOC,GAAUC,CAAQ;AAAA,IACvD;AAAA,IAEA,kBAAkB,MAAM;AACtB,YAAMJ,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,iBAAA;AAAA,IACT;AAAA,IAEA,gBAAgB,MAAM;AACpB,YAAMA,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,eAAA;AAAA,IACT;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"undo-redo.js","sources":["../../../../libs/grid-vue/src/features/undo-redo.ts"],"sourcesContent":["/**\n * Undo/Redo feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `undoRedo` prop on TbwGrid.\n * Also exports `useGridUndoRedo()` composable for programmatic undo/redo control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/undo-redo';\n * </script>\n *\n * <template>\n * <TbwGrid editing=\"dblclick\" undoRedo />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridUndoRedo } from '@toolbox-web/grid-vue/features/undo-redo';\n *\n * const { undo, redo, canUndo, canRedo } = useGridUndoRedo();\n * </script>\n *\n * <template>\n * <button @click=\"undo\" :disabled=\"!canUndo()\">Undo</button>\n * <button @click=\"redo\" :disabled=\"!canRedo()\">Redo</button>\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { type UndoRedoPlugin, type UndoRedoAction } from '@toolbox-web/grid/plugins/undo-redo';\nimport { inject, ref } from 'vue';\nimport { GRID_ELEMENT_KEY } from '../lib/use-grid';\n\n// Delegate to core feature registration\nimport '@toolbox-web/grid/features/undo-redo';\n\n/**\n * Undo/Redo methods returned from useGridUndoRedo.\n */\nexport interface UndoRedoMethods {\n /**\n * Undo the last edit action.\n * @returns The undone action (or compound action), or null if nothing to undo\n */\n undo: () => UndoRedoAction | null;\n\n /**\n * Redo the last undone action.\n * @returns The redone action (or compound action), or null if nothing to redo\n */\n redo: () => UndoRedoAction | null;\n\n /**\n * Check if there are any actions that can be undone.\n */\n canUndo: () => boolean;\n\n /**\n * Check if there are any actions that can be redone.\n */\n canRedo: () => boolean;\n\n /**\n * Clear all undo/redo history.\n */\n clearHistory: () => void;\n\n /**\n * Get a copy of the current undo stack.\n */\n getUndoStack: () => UndoRedoAction[];\n\n /**\n * Get a copy of the current redo stack.\n */\n getRedoStack: () => UndoRedoAction[];\n\n /**\n * Manually record an edit action.\n * If a transaction is active, the action is buffered; otherwise it's pushed to the undo stack.\n */\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => void;\n\n /**\n * Begin a transaction. All edits recorded until `endTransaction()` are grouped\n * into a single compound action for undo/redo.\n * @throws If a transaction is already active\n */\n beginTransaction: () => void;\n\n /**\n * End the active transaction and push the compound action to the undo stack.\n * If only one edit was recorded, it's pushed as a plain EditAction.\n * If no edits were recorded, the transaction is discarded.\n * @throws If no transaction is active\n */\n endTransaction: () => void;\n}\n\n/**\n * Composable for programmatic undo/redo control.\n *\n * Must be used within a component that contains a TbwGrid with undoRedo and editing enabled.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridUndoRedo } from '@toolbox-web/grid-vue/features/undo-redo';\n *\n * const { undo, redo, canUndo, canRedo, clearHistory } = useGridUndoRedo();\n * </script>\n *\n * <template>\n * <div class=\"toolbar\">\n * <button @click=\"undo\" :disabled=\"!canUndo()\">Undo</button>\n * <button @click=\"redo\" :disabled=\"!canRedo()\">Redo</button>\n * <button @click=\"clearHistory\">Clear History</button>\n * </div>\n * </template>\n * ```\n */\nexport function useGridUndoRedo(): UndoRedoMethods {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): UndoRedoPlugin | undefined => {\n const grid = gridElement.value as DataGridElement | null;\n return grid?.getPluginByName('undoRedo');\n };\n\n return {\n undo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return null;\n }\n return plugin.undo();\n },\n\n redo: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return null;\n }\n return plugin.redo();\n },\n\n canUndo: () => getPlugin()?.canUndo() ?? false,\n\n canRedo: () => getPlugin()?.canRedo() ?? false,\n\n clearHistory: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.clearHistory();\n },\n\n getUndoStack: () => getPlugin()?.getUndoStack() ?? [],\n\n getRedoStack: () => getPlugin()?.getRedoStack() ?? [],\n\n recordEdit: (rowIndex: number, field: string, oldValue: unknown, newValue: unknown) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.recordEdit(rowIndex, field, oldValue, newValue);\n },\n\n beginTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.beginTransaction();\n },\n\n endTransaction: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:undoRedo] UndoRedoPlugin not found.\\n\\n` +\n ` → Enable undo/redo on the grid:\\n` +\n ` <TbwGrid editing=\"dblclick\" undoRedo />`,\n );\n return;\n }\n plugin.endTransaction();\n },\n };\n}\n"],"names":["useGridUndoRedo","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","plugin","rowIndex","field","oldValue","newValue"],"mappings":";;;AA+HO,SAASA,IAAmC;AACjD,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,gBAAgB,UAAU;AAGzC,SAAO;AAAA,IACL,MAAM,MAAM;AACV,YAAMK,IAASD,EAAA;AACf,aAAKC,IAQEA,EAAO,KAAA,KAPZ,QAAQ;AAAA,QACN;AAAA;AAAA;AAAA;AAAA,MAAA,GAIK;AAAA,IAGX;AAAA,IAEA,MAAM,MAAM;AACV,YAAMA,IAASD,EAAA;AACf,aAAKC,IAQEA,EAAO,KAAA,KAPZ,QAAQ;AAAA,QACN;AAAA;AAAA;AAAA;AAAA,MAAA,GAIK;AAAA,IAGX;AAAA,IAEA,SAAS,MAAMD,KAAa,aAAa;AAAA,IAEzC,SAAS,MAAMA,KAAa,aAAa;AAAA,IAEzC,cAAc,MAAM;AAClB,YAAMC,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,aAAA;AAAA,IACT;AAAA,IAEA,cAAc,MAAMD,KAAa,aAAA,KAAkB,CAAA;AAAA,IAEnD,cAAc,MAAMA,KAAa,aAAA,KAAkB,CAAA;AAAA,IAEnD,YAAY,CAACE,GAAkBC,GAAeC,GAAmBC,MAAsB;AACrF,YAAMJ,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,WAAWC,GAAUC,GAAOC,GAAUC,CAAQ;AAAA,IACvD;AAAA,IAEA,kBAAkB,MAAM;AACtB,YAAMJ,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,iBAAA;AAAA,IACT;AAAA,IAEA,gBAAgB,MAAM;AACpB,YAAMA,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,eAAA;AAAA,IACT;AAAA,EAAA;AAEJ;"}
@@ -1,20 +1 @@
1
- /**
2
- * Column visibility feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `visibility` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/visibility';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid visibility />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
18
- */
19
- export {};
20
1
  //# sourceMappingURL=visibility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/visibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"visibility.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/visibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,uCAAuC,CAAC"}
@@ -1,4 +1,2 @@
1
- import { VisibilityPlugin as r } from "@toolbox-web/grid/plugins/visibility";
2
- import { r as e } from "../chunks/feature-registry-BgEOysSJ.js";
3
- e("visibility", (i) => i === !0 ? new r() : new r(i ?? void 0));
1
+ import "@toolbox-web/grid/features/visibility";
4
2
  //# sourceMappingURL=visibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"visibility.js","sources":["../../../../libs/grid-vue/src/features/visibility.ts"],"sourcesContent":["/**\n * Column visibility feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `visibility` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/visibility';\n * </script>\n *\n * <template>\n * <TbwGrid visibility />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { VisibilityPlugin } from '@toolbox-web/grid/plugins/visibility';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('visibility', (config) => {\n if (config === true) {\n return new VisibilityPlugin();\n }\n return new VisibilityPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","VisibilityPlugin"],"mappings":";;AAsBAA,EAAgB,cAAc,CAACC,MACzBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAiBD,KAAU,MAAS,CAChD;"}
1
+ {"version":3,"file":"visibility.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { defineComponent as y, provide as L, inject as F, createApp as f, createVNode as k, ref as R, computed as ne, onMounted as T, onBeforeUnmount as q, watch as G, createElementBlock as O, openBlock as P, renderSlot as U, useSlots as B, h as C } from "vue";
1
+ import { defineComponent as y, provide as F, inject as L, createApp as f, createVNode as k, ref as R, computed as ne, onMounted as O, onBeforeUnmount as q, watch as D, createElementBlock as P, openBlock as T, renderSlot as U, useSlots as B, h as E } from "vue";
2
2
  import { DataGridElement as re } from "@toolbox-web/grid";
3
- import { c as oe } from "./chunks/feature-registry-BgEOysSJ.js";
4
- import { a as Se, g as ke, b as Le, i as Fe, r as Me } from "./chunks/feature-registry-BgEOysSJ.js";
5
- import { G as H } from "./chunks/use-grid-DwjXrO19.js";
6
- import { u as Ae } from "./chunks/use-grid-DwjXrO19.js";
3
+ import { createPluginFromFeature as oe } from "@toolbox-web/grid/features/registry";
4
+ import { clearFeatureRegistry as Se, createPluginFromFeature as ke, getFeatureFactory as Fe, getRegisteredFeatures as Le, isFeatureRegistered as Me, registerFeature as Ne } from "@toolbox-web/grid/features/registry";
5
+ import { G as H } from "./chunks/use-grid-B59B6XdD.js";
6
+ import { u as We } from "./chunks/use-grid-B59B6XdD.js";
7
7
  const K = /* @__PURE__ */ Symbol("grid-icons");
8
8
  function ie() {
9
- return F(K, void 0);
9
+ return L(K, void 0);
10
10
  }
11
11
  const se = y({
12
12
  name: "GridIconProvider",
@@ -20,13 +20,13 @@ const se = y({
20
20
  }
21
21
  },
22
22
  setup(i, { slots: e }) {
23
- return L(K, i.icons), () => e.default?.();
23
+ return F(K, i.icons), () => e.default?.();
24
24
  }
25
25
  }), Y = /* @__PURE__ */ Symbol("grid-type-defaults");
26
26
  function J() {
27
- return F(Y, void 0);
27
+ return L(Y, void 0);
28
28
  }
29
- function Ce(i) {
29
+ function Ee(i) {
30
30
  return J()?.[i];
31
31
  }
32
32
  const de = y({
@@ -41,7 +41,7 @@ const de = y({
41
41
  }
42
42
  },
43
43
  setup(i, { slots: e }) {
44
- return L(Y, i.defaults), () => e.default?.();
44
+ return F(Y, i.defaults), () => e.default?.();
45
45
  }
46
46
  }), Q = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new Map();
47
47
  function le(i, e) {
@@ -74,7 +74,7 @@ function ue(i) {
74
74
  }
75
75
  return e;
76
76
  }
77
- function D(i) {
77
+ function _(i) {
78
78
  if (i == null || typeof i == "function" && i.prototype === void 0)
79
79
  return !1;
80
80
  if (typeof i == "object") {
@@ -89,10 +89,10 @@ function D(i) {
89
89
  }
90
90
  return !1;
91
91
  }
92
- function j(i) {
93
- return typeof i == "function" && !D(i);
92
+ function G(i) {
93
+ return typeof i == "function" && !_(i);
94
94
  }
95
- const E = /* @__PURE__ */ Symbol.for("tbw:vue-processed");
95
+ const C = /* @__PURE__ */ Symbol.for("tbw:vue-processed");
96
96
  class fe {
97
97
  mountedViews = [];
98
98
  /** Editor-specific views tracked separately for per-cell cleanup via releaseCell. */
@@ -140,11 +140,11 @@ class fe {
140
140
  const s = {
141
141
  editorParams: r.editorParams
142
142
  };
143
- r.renderer && (D(r.renderer) ? s.renderer = this.createConfigComponentRenderer(r.renderer) : j(r.renderer) && (s.renderer = this.createTypeRenderer(
143
+ r.renderer && (_(r.renderer) ? s.renderer = this.createConfigComponentRenderer(r.renderer) : G(r.renderer) && (s.renderer = this.createTypeRenderer(
144
144
  r.renderer
145
- ))), r.editor && (D(r.editor) ? s.editor = this.createConfigComponentEditor(
145
+ ))), r.editor && (_(r.editor) ? s.editor = this.createConfigComponentEditor(
146
146
  r.editor
147
- ) : j(r.editor) && (s.editor = this.createTypeEditor(
147
+ ) : G(r.editor) && (s.editor = this.createTypeEditor(
148
148
  r.editor
149
149
  ))), r.filterPanelRenderer && (s.filterPanelRenderer = this.createFilterPanelRenderer(r.filterPanelRenderer)), t[n] = s;
150
150
  }
@@ -159,22 +159,22 @@ class fe {
159
159
  */
160
160
  processColumn(e) {
161
161
  const t = { ...e };
162
- if (e.renderer && !e.renderer[E]) {
163
- if (D(e.renderer)) {
162
+ if (e.renderer && !e.renderer[C]) {
163
+ if (_(e.renderer)) {
164
164
  const n = this.createConfigComponentRenderer(e.renderer);
165
- n[E] = !0, t.renderer = n;
166
- } else if (j(e.renderer)) {
165
+ n[C] = !0, t.renderer = n;
166
+ } else if (G(e.renderer)) {
167
167
  const n = this.createConfigVNodeRenderer(e.renderer);
168
- n[E] = !0, t.renderer = n;
168
+ n[C] = !0, t.renderer = n;
169
169
  }
170
170
  }
171
- if (e.editor && !e.editor[E]) {
172
- if (D(e.editor)) {
171
+ if (e.editor && !e.editor[C]) {
172
+ if (_(e.editor)) {
173
173
  const n = this.createConfigComponentEditor(e.editor);
174
- n[E] = !0, t.editor = n;
175
- } else if (j(e.editor)) {
174
+ n[C] = !0, t.editor = n;
175
+ } else if (G(e.editor)) {
176
176
  const n = this.createConfigVNodeEditor(e.editor);
177
- n[E] = !0, t.editor = n;
177
+ n[C] = !0, t.editor = n;
178
178
  }
179
179
  }
180
180
  return t;
@@ -632,6 +632,11 @@ const pe = fe, Re = /* @__PURE__ */ y({
632
632
  default: void 0
633
633
  },
634
634
  /** Enable column drag-to-reorder */
635
+ reorderColumns: {
636
+ type: [Boolean, Object],
637
+ default: void 0
638
+ },
639
+ /** @deprecated Use `reorderColumns` instead */
635
640
  reorder: {
636
641
  type: [Boolean, Object],
637
642
  default: void 0
@@ -657,6 +662,11 @@ const pe = fe, Re = /* @__PURE__ */ y({
657
662
  default: void 0
658
663
  },
659
664
  /** Enable row drag-to-reorder */
665
+ reorderRows: {
666
+ type: [Boolean, Object],
667
+ default: void 0
668
+ },
669
+ /** @deprecated Use `reorderRows` instead */
660
670
  rowReorder: {
661
671
  type: [Boolean, Object],
662
672
  default: void 0
@@ -720,7 +730,7 @@ const pe = fe, Re = /* @__PURE__ */ y({
720
730
  }
721
731
  s();
722
732
  const d = i, l = t, a = R(null);
723
- L(H, a);
733
+ F(H, a);
724
734
  const c = J(), u = ie(), g = [
725
735
  "selection",
726
736
  "editing",
@@ -729,12 +739,16 @@ const pe = fe, Re = /* @__PURE__ */ y({
729
739
  "multiSort",
730
740
  "sorting",
731
741
  "filtering",
742
+ "reorderColumns",
732
743
  "reorder",
744
+ // deprecated alias for reorderColumns
733
745
  "visibility",
734
746
  "pinnedColumns",
735
747
  "groupingColumns",
736
748
  "columnVirtualization",
749
+ "reorderRows",
737
750
  "rowReorder",
751
+ // deprecated alias for reorderRows
738
752
  "groupingRows",
739
753
  "pinnedRows",
740
754
  "tree",
@@ -758,12 +772,12 @@ const pe = fe, Re = /* @__PURE__ */ y({
758
772
  return o;
759
773
  }
760
774
  const V = ne(() => {
761
- const o = d.gridConfig ?? {}, p = h(), b = o.plugins ?? [], m = [...p, ...b], _ = u ? { ...o.icons, ...u } : o.icons;
775
+ const o = d.gridConfig ?? {}, p = h(), b = o.plugins ?? [], m = [...p, ...b], j = u ? { ...o.icons, ...u } : o.icons;
762
776
  return {
763
777
  ...o,
764
778
  ...d.columns ? { columns: d.columns } : {},
765
779
  ...m.length > 0 ? { plugins: m } : {},
766
- ..._ ? { icons: _ } : {}
780
+ ...j ? { icons: j } : {}
767
781
  };
768
782
  });
769
783
  function M(o) {
@@ -793,13 +807,13 @@ const pe = fe, Re = /* @__PURE__ */ y({
793
807
  function Z(o, p) {
794
808
  const b = Object.getPrototypeOf(o), m = Object.getOwnPropertyDescriptor(b, "gridConfig");
795
809
  if (!m?.set || !m?.get) return;
796
- const _ = m.set, te = m.get;
810
+ const j = m.set, te = m.get;
797
811
  Object.defineProperty(o, "gridConfig", {
798
812
  get() {
799
813
  return te.call(this);
800
814
  },
801
815
  set(S) {
802
- S && p ? _.call(this, p.processGridConfig(S)) : _.call(this, S);
816
+ S && p ? j.call(this, p.processGridConfig(S)) : j.call(this, S);
803
817
  },
804
818
  configurable: !0
805
819
  });
@@ -807,7 +821,7 @@ const pe = fe, Re = /* @__PURE__ */ y({
807
821
  function ee(o) {
808
822
  delete o.gridConfig;
809
823
  }
810
- return T(() => {
824
+ return O(() => {
811
825
  const o = a.value;
812
826
  if (!o) return;
813
827
  const p = s();
@@ -815,24 +829,24 @@ const pe = fe, Re = /* @__PURE__ */ y({
815
829
  }), q(() => {
816
830
  const o = a.value;
817
831
  o && (ee(o), o.removeEventListener("cell-commit", M), o.removeEventListener("row-commit", N), o.removeEventListener("cell-click", A), o.removeEventListener("cell-dblclick", W), o.removeEventListener("selection-change", I), o.removeEventListener("row-toggle", x), o.removeEventListener("sort-change", $), o.removeEventListener("ready", z));
818
- }), G(
832
+ }), D(
819
833
  () => d.rows,
820
834
  (o) => {
821
835
  a.value && (a.value.rows = o);
822
836
  },
823
837
  { deep: !0 }
824
- ), G(
838
+ ), D(
825
839
  V,
826
840
  (o) => {
827
841
  a.value && o && (a.value.gridConfig = o);
828
842
  },
829
843
  { deep: !0 }
830
- ), G(
844
+ ), D(
831
845
  () => d.fitMode,
832
846
  (o) => {
833
847
  a.value && o && (a.value.fitMode = o);
834
848
  }
835
- ), G(
849
+ ), D(
836
850
  () => c,
837
851
  (o) => {
838
852
  s().setTypeDefaults(o ?? null);
@@ -847,14 +861,14 @@ const pe = fe, Re = /* @__PURE__ */ y({
847
861
  getConfig: () => a.value?.getConfig(),
848
862
  /** Wait for grid to be ready */
849
863
  ready: () => a.value?.ready()
850
- }), (o, p) => (P(), O("tbw-grid", {
864
+ }), (o, p) => (T(), P("tbw-grid", {
851
865
  ref_key: "gridRef",
852
866
  ref: a
853
867
  }, [
854
868
  U(o.$slots, "default")
855
869
  ], 512));
856
870
  }
857
- }), me = ["field", "header", "width", "min-width", "max-width", "sortable", "resizable", "editable", "type", "align", "hidden"], Te = /* @__PURE__ */ y({
871
+ }), me = ["field", "header", "width", "min-width", "max-width", "sortable", "resizable", "editable", "type", "align", "hidden"], Oe = /* @__PURE__ */ y({
858
872
  __name: "TbwGridColumn",
859
873
  props: {
860
874
  field: {},
@@ -871,22 +885,22 @@ const pe = fe, Re = /* @__PURE__ */ y({
871
885
  },
872
886
  setup(i) {
873
887
  const e = B(), t = R(null);
874
- return T(() => {
888
+ return O(() => {
875
889
  const n = t.value;
876
890
  if (!n) return;
877
891
  const r = !!e.cell, s = !!e.editor;
878
892
  r && le(n, (d) => {
879
893
  const l = e.cell;
880
- if (!l) return C("span");
894
+ if (!l) return E("span");
881
895
  const a = l({
882
896
  value: d.value,
883
897
  row: d.row,
884
898
  column: d.column
885
899
  });
886
- return C("div", { style: "display: contents" }, a);
900
+ return E("div", { style: "display: contents" }, a);
887
901
  }), s && ae(n, (d) => {
888
902
  const l = e.editor;
889
- if (!l) return C("span");
903
+ if (!l) return E("span");
890
904
  const a = l({
891
905
  value: d.value,
892
906
  row: d.row,
@@ -898,9 +912,9 @@ const pe = fe, Re = /* @__PURE__ */ y({
898
912
  updateRow: d.updateRow,
899
913
  onValueChange: d.onValueChange
900
914
  });
901
- return C("div", { style: "display: contents" }, a);
915
+ return E("div", { style: "display: contents" }, a);
902
916
  });
903
- }), (n, r) => (P(), O("tbw-grid-column", {
917
+ }), (n, r) => (T(), P("tbw-grid-column", {
904
918
  ref_key: "columnRef",
905
919
  ref: t,
906
920
  field: i.field,
@@ -916,7 +930,7 @@ const pe = fe, Re = /* @__PURE__ */ y({
916
930
  hidden: i.hidden
917
931
  }, null, 8, me));
918
932
  }
919
- }), ge = ["show-expand-column", "animation"], Oe = /* @__PURE__ */ y({
933
+ }), ge = ["show-expand-column", "animation"], Pe = /* @__PURE__ */ y({
920
934
  __name: "TbwGridDetailPanel",
921
935
  props: {
922
936
  showExpandColumn: { type: Boolean, default: !0 },
@@ -924,24 +938,24 @@ const pe = fe, Re = /* @__PURE__ */ y({
924
938
  },
925
939
  setup(i) {
926
940
  const e = R(null), t = B();
927
- return T(() => {
941
+ return O(() => {
928
942
  const n = e.value;
929
943
  !n || !t.default || Q.set(n, (r) => t.default?.(r));
930
- }), (n, r) => (P(), O("tbw-grid-detail", {
944
+ }), (n, r) => (T(), P("tbw-grid-detail", {
931
945
  ref_key: "detailRef",
932
946
  ref: e,
933
947
  "show-expand-column": i.showExpandColumn,
934
948
  animation: i.animation
935
949
  }, null, 8, ge));
936
950
  }
937
- }), Pe = /* @__PURE__ */ y({
951
+ }), Te = /* @__PURE__ */ y({
938
952
  __name: "TbwGridResponsiveCard",
939
953
  setup(i) {
940
954
  const e = R(null), t = B();
941
- return T(() => {
955
+ return O(() => {
942
956
  const n = e.value;
943
957
  !n || !t.default || X.set(n, (r) => t.default?.(r));
944
- }), (n, r) => (P(), O("tbw-grid-responsive-card", {
958
+ }), (n, r) => (T(), P("tbw-grid-responsive-card", {
945
959
  ref_key: "cardRef",
946
960
  ref: e
947
961
  }, null, 512));
@@ -949,11 +963,11 @@ const pe = fe, Re = /* @__PURE__ */ y({
949
963
  }), Ve = /* @__PURE__ */ y({
950
964
  __name: "TbwGridToolButtons",
951
965
  setup(i) {
952
- return (e, t) => (P(), O("tbw-grid-tool-buttons", null, [
966
+ return (e, t) => (T(), P("tbw-grid-tool-buttons", null, [
953
967
  U(e.$slots, "default")
954
968
  ]));
955
969
  }
956
- }), ye = /* @__PURE__ */ new WeakMap(), ve = ["id", "label", "icon", "position", "width"], _e = /* @__PURE__ */ y({
970
+ }), ye = /* @__PURE__ */ new WeakMap(), ve = ["id", "label", "icon", "position", "width"], je = /* @__PURE__ */ y({
957
971
  __name: "TbwGridToolPanel",
958
972
  props: {
959
973
  id: {},
@@ -964,10 +978,10 @@ const pe = fe, Re = /* @__PURE__ */ y({
964
978
  },
965
979
  setup(i) {
966
980
  const e = R(null), t = B();
967
- return T(() => {
981
+ return O(() => {
968
982
  const n = e.value;
969
983
  !n || !t.default || ye.set(n, (r) => t.default?.(r));
970
- }), (n, r) => (P(), O("tbw-grid-tool-panel", {
984
+ }), (n, r) => (T(), P("tbw-grid-tool-panel", {
971
985
  ref_key: "panelRef",
972
986
  ref: e,
973
987
  id: i.id,
@@ -978,10 +992,10 @@ const pe = fe, Re = /* @__PURE__ */ y({
978
992
  }, null, 8, ve));
979
993
  }
980
994
  });
981
- function De(i, e, t) {
982
- const n = t ?? F(H, R(null));
995
+ function _e(i, e, t) {
996
+ const n = t ?? L(H, R(null));
983
997
  let r = null;
984
- T(() => {
998
+ O(() => {
985
999
  const s = n.value;
986
1000
  if (!s) return;
987
1001
  const d = e;
@@ -990,7 +1004,7 @@ function De(i, e, t) {
990
1004
  r?.();
991
1005
  });
992
1006
  }
993
- const Ge = y({
1007
+ const De = y({
994
1008
  name: "GridProvider",
995
1009
  props: {
996
1010
  /**
@@ -1011,7 +1025,7 @@ const Ge = y({
1011
1025
  setup(i, { slots: e }) {
1012
1026
  return () => {
1013
1027
  let t = e.default?.();
1014
- return i.typeDefaults && (t = C(de, { defaults: i.typeDefaults }, () => t)), i.icons && (t = C(se, { icons: i.icons }, () => t)), t;
1028
+ return i.typeDefaults && (t = E(de, { defaults: i.typeDefaults }, () => t)), i.icons && (t = E(se, { icons: i.icons }, () => t)), t;
1015
1029
  };
1016
1030
  }
1017
1031
  });
@@ -1021,26 +1035,26 @@ export {
1021
1035
  Y as GRID_TYPE_DEFAULTS,
1022
1036
  fe as GridAdapter,
1023
1037
  se as GridIconProvider,
1024
- Ge as GridProvider,
1038
+ De as GridProvider,
1025
1039
  de as GridTypeProvider,
1026
1040
  Re as TbwGrid,
1027
- Te as TbwGridColumn,
1028
- Oe as TbwGridDetailPanel,
1029
- Pe as TbwGridResponsiveCard,
1041
+ Oe as TbwGridColumn,
1042
+ Pe as TbwGridDetailPanel,
1043
+ Te as TbwGridResponsiveCard,
1030
1044
  Ve as TbwGridToolButtons,
1031
- _e as TbwGridToolPanel,
1045
+ je as TbwGridToolPanel,
1032
1046
  pe as VueGridAdapter,
1033
1047
  Se as clearFeatureRegistry,
1034
- oe as createPluginFromFeature,
1035
- ke as getFeatureFactory,
1048
+ ke as createPluginFromFeature,
1049
+ Fe as getFeatureFactory,
1036
1050
  Le as getRegisteredFeatures,
1037
- Fe as isFeatureRegistered,
1038
- D as isVueComponent,
1039
- Me as registerFeature,
1040
- Ae as useGrid,
1041
- De as useGridEvent,
1051
+ Me as isFeatureRegistered,
1052
+ _ as isVueComponent,
1053
+ Ne as registerFeature,
1054
+ We as useGrid,
1055
+ _e as useGridEvent,
1042
1056
  ie as useGridIcons,
1043
1057
  J as useGridTypeDefaults,
1044
- Ce as useTypeDefault
1058
+ Ee as useTypeDefault
1045
1059
  };
1046
1060
  //# sourceMappingURL=index.js.map