@toolbox-web/grid-vue 0.7.1 → 0.9.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 (106) hide show
  1. package/features/clipboard.d.ts +0 -19
  2. package/features/clipboard.d.ts.map +1 -1
  3. package/features/clipboard.js +1 -3
  4. package/features/clipboard.js.map +1 -1
  5. package/features/column-virtualization.d.ts +0 -19
  6. package/features/column-virtualization.d.ts.map +1 -1
  7. package/features/column-virtualization.js +1 -3
  8. package/features/column-virtualization.js.map +1 -1
  9. package/features/context-menu.d.ts +0 -19
  10. package/features/context-menu.d.ts.map +1 -1
  11. package/features/context-menu.js +1 -3
  12. package/features/context-menu.js.map +1 -1
  13. package/features/editing.d.ts +0 -19
  14. package/features/editing.d.ts.map +1 -1
  15. package/features/editing.js +1 -3
  16. package/features/editing.js.map +1 -1
  17. package/features/export.d.ts.map +1 -1
  18. package/features/export.js +18 -20
  19. package/features/export.js.map +1 -1
  20. package/features/filtering.js +4 -4
  21. package/features/grouping-columns.d.ts +9 -0
  22. package/features/grouping-columns.d.ts.map +1 -1
  23. package/features/grouping-columns.js +22 -3
  24. package/features/grouping-columns.js.map +1 -1
  25. package/features/grouping-rows.d.ts +9 -0
  26. package/features/grouping-rows.d.ts.map +1 -1
  27. package/features/grouping-rows.js +21 -2
  28. package/features/grouping-rows.js.map +1 -1
  29. package/features/index.js +17 -18
  30. package/features/index.js.map +1 -1
  31. package/features/master-detail.d.ts +0 -22
  32. package/features/master-detail.d.ts.map +1 -1
  33. package/features/master-detail.js +1 -3
  34. package/features/master-detail.js.map +1 -1
  35. package/features/multi-sort.d.ts +0 -19
  36. package/features/multi-sort.d.ts.map +1 -1
  37. package/features/multi-sort.js +1 -4
  38. package/features/multi-sort.js.map +1 -1
  39. package/features/pinned-columns.d.ts +0 -22
  40. package/features/pinned-columns.d.ts.map +1 -1
  41. package/features/pinned-columns.js +1 -3
  42. package/features/pinned-columns.js.map +1 -1
  43. package/features/pinned-rows.d.ts +0 -21
  44. package/features/pinned-rows.d.ts.map +1 -1
  45. package/features/pinned-rows.js +26 -3
  46. package/features/pinned-rows.js.map +1 -1
  47. package/features/pivot.d.ts +0 -23
  48. package/features/pivot.d.ts.map +1 -1
  49. package/features/pivot.js +1 -3
  50. package/features/pivot.js.map +1 -1
  51. package/features/print.d.ts.map +1 -1
  52. package/features/print.js +9 -11
  53. package/features/print.js.map +1 -1
  54. package/features/reorder-columns.d.ts +1 -0
  55. package/features/reorder-columns.d.ts.map +1 -0
  56. package/features/reorder-columns.js +2 -0
  57. package/features/reorder-columns.js.map +1 -0
  58. package/features/reorder-rows.d.ts +1 -0
  59. package/features/reorder-rows.d.ts.map +1 -0
  60. package/features/reorder-rows.js +2 -0
  61. package/features/reorder-rows.js.map +1 -0
  62. package/features/reorder.d.ts +3 -17
  63. package/features/reorder.d.ts.map +1 -1
  64. package/features/reorder.js +1 -3
  65. package/features/reorder.js.map +1 -1
  66. package/features/responsive.d.ts +0 -23
  67. package/features/responsive.d.ts.map +1 -1
  68. package/features/responsive.js +1 -3
  69. package/features/responsive.js.map +1 -1
  70. package/features/row-reorder.d.ts +3 -17
  71. package/features/row-reorder.d.ts.map +1 -1
  72. package/features/row-reorder.js +1 -3
  73. package/features/row-reorder.js.map +1 -1
  74. package/features/selection.d.ts.map +1 -1
  75. package/features/selection.js +20 -22
  76. package/features/selection.js.map +1 -1
  77. package/features/server-side.d.ts +0 -21
  78. package/features/server-side.d.ts.map +1 -1
  79. package/features/server-side.js +1 -3
  80. package/features/server-side.js.map +1 -1
  81. package/features/tree.d.ts +0 -22
  82. package/features/tree.d.ts.map +1 -1
  83. package/features/tree.js +1 -3
  84. package/features/tree.js.map +1 -1
  85. package/features/undo-redo.d.ts.map +1 -1
  86. package/features/undo-redo.js +10 -12
  87. package/features/undo-redo.js.map +1 -1
  88. package/features/visibility.d.ts +0 -19
  89. package/features/visibility.d.ts.map +1 -1
  90. package/features/visibility.js +1 -3
  91. package/features/visibility.js.map +1 -1
  92. package/index.js +545 -395
  93. package/index.js.map +1 -1
  94. package/lib/TbwGrid.vue.d.ts +5 -1
  95. package/lib/TbwGrid.vue.d.ts.map +1 -1
  96. package/lib/feature-props.d.ts +12 -4
  97. package/lib/feature-props.d.ts.map +1 -1
  98. package/lib/feature-registry.d.ts +6 -51
  99. package/lib/feature-registry.d.ts.map +1 -1
  100. package/lib/vue-column-config.d.ts +20 -3
  101. package/lib/vue-column-config.d.ts.map +1 -1
  102. package/lib/vue-grid-adapter.d.ts +34 -0
  103. package/lib/vue-grid-adapter.d.ts.map +1 -1
  104. package/package.json +1 -1
  105. package/chunks/feature-registry-BgEOysSJ.js +0 -38
  106. package/chunks/feature-registry-BgEOysSJ.js.map +0 -1
@@ -1,20 +1 @@
1
- /**
2
- * Clipboard feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `clipboard` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/clipboard';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid selection="range" clipboard />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
18
- */
19
- export {};
20
1
  //# sourceMappingURL=clipboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/clipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,sCAAsC,CAAC"}
@@ -1,4 +1,2 @@
1
- import { ClipboardPlugin as e } from "@toolbox-web/grid/plugins/clipboard";
2
- import { r as i } from "../chunks/feature-registry-BgEOysSJ.js";
3
- i("clipboard", (r) => r === !0 ? new e() : new e(r ?? void 0));
1
+ import "@toolbox-web/grid/features/clipboard";
4
2
  //# sourceMappingURL=clipboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clipboard.js","sources":["../../../../libs/grid-vue/src/features/clipboard.ts"],"sourcesContent":["/**\n * Clipboard feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `clipboard` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/clipboard';\n * </script>\n *\n * <template>\n * <TbwGrid selection=\"range\" clipboard />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ClipboardPlugin } from '@toolbox-web/grid/plugins/clipboard';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('clipboard', (config) => {\n if (config === true) {\n return new ClipboardPlugin();\n }\n return new ClipboardPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","ClipboardPlugin"],"mappings":";;AAsBAA,EAAgB,aAAa,CAACC,MACxBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAgBD,KAAU,MAAS,CAC/C;"}
1
+ {"version":3,"file":"clipboard.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,20 +1 @@
1
- /**
2
- * Column virtualization feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `columnVirtualization` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/column-virtualization';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid columnVirtualization />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
18
- */
19
- export {};
20
1
  //# sourceMappingURL=column-virtualization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-virtualization.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/column-virtualization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"column-virtualization.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/column-virtualization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,kDAAkD,CAAC"}
@@ -1,4 +1,2 @@
1
- import { ColumnVirtualizationPlugin as i } from "@toolbox-web/grid/plugins/column-virtualization";
2
- import { r as t } from "../chunks/feature-registry-BgEOysSJ.js";
3
- t("columnVirtualization", (r) => r === !0 ? new i() : new i(r ?? void 0));
1
+ import "@toolbox-web/grid/features/column-virtualization";
4
2
  //# sourceMappingURL=column-virtualization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"column-virtualization.js","sources":["../../../../libs/grid-vue/src/features/column-virtualization.ts"],"sourcesContent":["/**\n * Column virtualization feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `columnVirtualization` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/column-virtualization';\n * </script>\n *\n * <template>\n * <TbwGrid columnVirtualization />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ColumnVirtualizationPlugin } from '@toolbox-web/grid/plugins/column-virtualization';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('columnVirtualization', (config) => {\n if (config === true) {\n return new ColumnVirtualizationPlugin();\n }\n return new ColumnVirtualizationPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","ColumnVirtualizationPlugin"],"mappings":";;AAsBAA,EAAgB,wBAAwB,CAACC,MACnCA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAA2BD,KAAU,MAAS,CAC1D;"}
1
+ {"version":3,"file":"column-virtualization.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,20 +1 @@
1
- /**
2
- * Context menu feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `contextMenu` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/context-menu';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid contextMenu />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
18
- */
19
- export {};
20
1
  //# sourceMappingURL=context-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/context-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/context-menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,yCAAyC,CAAC"}
@@ -1,4 +1,2 @@
1
- import { ContextMenuPlugin as r } from "@toolbox-web/grid/plugins/context-menu";
2
- import { r as t } from "../chunks/feature-registry-BgEOysSJ.js";
3
- t("contextMenu", (e) => e === !0 ? new r() : new r(e ?? void 0));
1
+ import "@toolbox-web/grid/features/context-menu";
4
2
  //# sourceMappingURL=context-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.js","sources":["../../../../libs/grid-vue/src/features/context-menu.ts"],"sourcesContent":["/**\n * Context menu feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `contextMenu` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/context-menu';\n * </script>\n *\n * <template>\n * <TbwGrid contextMenu />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ContextMenuPlugin } from '@toolbox-web/grid/plugins/context-menu';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('contextMenu', (config) => {\n if (config === true) {\n return new ContextMenuPlugin();\n }\n return new ContextMenuPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","ContextMenuPlugin"],"mappings":";;AAsBAA,EAAgB,eAAe,CAACC,MAC1BA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAkBD,KAAU,MAAS,CACjD;"}
1
+ {"version":3,"file":"context-menu.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,20 +1 @@
1
- /**
2
- * Editing feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `editing` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/editing';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid editing="dblclick" />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
18
- */
19
- export {};
20
1
  //# sourceMappingURL=editing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/editing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"editing.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/editing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,oCAAoC,CAAC"}
@@ -1,4 +1,2 @@
1
- import { EditingPlugin as e } from "@toolbox-web/grid/plugins/editing";
2
- import { r as t } from "../chunks/feature-registry-BgEOysSJ.js";
3
- t("editing", (r) => r === !0 ? new e() : r === "click" || r === "dblclick" || r === "manual" ? new e({ editOn: r }) : new e(r ?? void 0));
1
+ import "@toolbox-web/grid/features/editing";
4
2
  //# sourceMappingURL=editing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"editing.js","sources":["../../../../libs/grid-vue/src/features/editing.ts"],"sourcesContent":["/**\n * Editing feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `editing` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/editing';\n * </script>\n *\n * <template>\n * <TbwGrid editing=\"dblclick\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { EditingPlugin } from '@toolbox-web/grid/plugins/editing';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('editing', (config) => {\n // Handle shorthand: true, 'click', 'dblclick', 'manual'\n if (config === true) {\n return new EditingPlugin(); // default trigger\n }\n if (config === 'click' || config === 'dblclick' || config === 'manual') {\n return new EditingPlugin({ editOn: config });\n }\n // Full config object\n return new EditingPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","EditingPlugin"],"mappings":";;AAsBAA,EAAgB,WAAW,CAACC,MAEtBA,MAAW,KACN,IAAIC,EAAA,IAETD,MAAW,WAAWA,MAAW,cAAcA,MAAW,WACrD,IAAIC,EAAc,EAAE,QAAQD,GAAQ,IAGtC,IAAIC,EAAcD,KAAU,MAAS,CAC7C;"}
1
+ {"version":3,"file":"editing.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1 @@
1
- {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAgB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAYtG;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAEzE;;;;OAIG;IACH,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAE3E;;;;OAIG;IACH,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAE1E;;OAEG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC;IAE3B;;OAEG;IACH,aAAa,EAAE,MAAM;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAwD7C"}
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAK3G,OAAO,mCAAmC,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAEzE;;;;OAIG;IACH,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAE3E;;;;OAIG;IACH,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAE1E;;OAEG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC;IAE3B;;OAEG;IACH,aAAa,EAAE,MAAM;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CACvE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,aAAa,IAAI,aAAa,CAwD7C"}
@@ -1,14 +1,12 @@
1
- import { ExportPlugin as i } from "@toolbox-web/grid/plugins/export";
2
- import { inject as p, ref as x } from "vue";
3
- import { r as l } from "../chunks/feature-registry-BgEOysSJ.js";
4
- import { G as u } from "../chunks/use-grid-B59B6XdD.js";
5
- l("export", (n) => n === !0 ? new i() : new i(n ?? void 0));
6
- function d() {
7
- const n = p(u, x(null)), o = () => n.value?.getPluginByName("export");
1
+ import { inject as i, ref as x } from "vue";
2
+ import { G as p } from "../chunks/use-grid-B59B6XdD.js";
3
+ import "@toolbox-web/grid/features/export";
4
+ function s() {
5
+ const n = i(p, x(null)), o = () => n.value?.getPluginByName("export");
8
6
  return {
9
- exportToCsv: (t, r) => {
10
- const e = o();
11
- if (!e) {
7
+ exportToCsv: (r, e) => {
8
+ const t = o();
9
+ if (!t) {
12
10
  console.warn(
13
11
  `[tbw-grid:export] ExportPlugin not found.
14
12
 
@@ -17,11 +15,11 @@ function d() {
17
15
  );
18
16
  return;
19
17
  }
20
- e.exportCsv({ ...r, fileName: t ?? r?.fileName ?? "export.csv" });
18
+ t.exportCsv({ ...e, fileName: r ?? e?.fileName ?? "export.csv" });
21
19
  },
22
- exportToExcel: (t, r) => {
23
- const e = o();
24
- if (!e) {
20
+ exportToExcel: (r, e) => {
21
+ const t = o();
22
+ if (!t) {
25
23
  console.warn(
26
24
  `[tbw-grid:export] ExportPlugin not found.
27
25
 
@@ -30,11 +28,11 @@ function d() {
30
28
  );
31
29
  return;
32
30
  }
33
- e.exportExcel({ ...r, fileName: t ?? r?.fileName ?? "export.xlsx" });
31
+ t.exportExcel({ ...e, fileName: r ?? e?.fileName ?? "export.xlsx" });
34
32
  },
35
- exportToJson: (t, r) => {
36
- const e = o();
37
- if (!e) {
33
+ exportToJson: (r, e) => {
34
+ const t = o();
35
+ if (!t) {
38
36
  console.warn(
39
37
  `[tbw-grid:export] ExportPlugin not found.
40
38
 
@@ -43,13 +41,13 @@ function d() {
43
41
  );
44
42
  return;
45
43
  }
46
- e.exportJson({ ...r, fileName: t ?? r?.fileName ?? "export.json" });
44
+ t.exportJson({ ...e, fileName: r ?? e?.fileName ?? "export.json" });
47
45
  },
48
46
  isExporting: () => o()?.isExporting() ?? !1,
49
47
  getLastExport: () => o()?.getLastExport() ?? null
50
48
  };
51
49
  }
52
50
  export {
53
- d as useGridExport
51
+ s as useGridExport
54
52
  };
55
53
  //# sourceMappingURL=export.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"export.js","sources":["../../../../libs/grid-vue/src/features/export.ts"],"sourcesContent":["/**\n * Export feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `export` prop on TbwGrid.\n * Also exports `useGridExport()` composable for programmatic export control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/export';\n * </script>\n *\n * <template>\n * <TbwGrid export />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridExport } from '@toolbox-web/grid-vue/features/export';\n *\n * const { exportToCsv, exportToExcel, exportToJson } = useGridExport();\n *\n * function handleExport() {\n * exportToCsv('employees.csv');\n * }\n * </script>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { ExportPlugin, type ExportFormat, type ExportParams } from '@toolbox-web/grid/plugins/export';\nimport { inject, ref } from 'vue';\nimport { registerFeature } from '../lib/feature-registry';\nimport { GRID_ELEMENT_KEY } from '../lib/use-grid';\n\nregisterFeature('export', (config) => {\n if (config === true) {\n return new ExportPlugin();\n }\n return new ExportPlugin(config ?? undefined);\n});\n\n/**\n * Export methods returned from useGridExport.\n */\nexport interface ExportMethods {\n /**\n * Export grid data to CSV file.\n * @param filename - Optional filename (defaults to 'export.csv')\n * @param params - Optional export parameters\n */\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to Excel file (XML Spreadsheet format).\n * @param filename - Optional filename (defaults to 'export.xlsx')\n * @param params - Optional export parameters\n */\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to JSON file.\n * @param filename - Optional filename (defaults to 'export.json')\n * @param params - Optional export parameters\n */\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Check if an export is currently in progress.\n */\n isExporting: () => boolean;\n\n /**\n * Get information about the last export.\n */\n getLastExport: () => { format: ExportFormat; timestamp: Date } | null;\n}\n\n/**\n * Composable for programmatic export control.\n *\n * Must be used within a component that contains a TbwGrid with the export feature enabled.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridExport } from '@toolbox-web/grid-vue/features/export';\n *\n * const { exportToCsv, exportToExcel, isExporting } = useGridExport();\n *\n * async function handleExport(format: 'csv' | 'excel' | 'json') {\n * if (isExporting()) return; // Prevent concurrent exports\n *\n * switch (format) {\n * case 'csv': exportToCsv('data.csv'); break;\n * case 'excel': exportToExcel('data.xlsx'); break;\n * case 'json': exportToJson('data.json'); break;\n * }\n * }\n * </script>\n * ```\n */\nexport function useGridExport(): ExportMethods {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): ExportPlugin | undefined => {\n const grid = gridElement.value as DataGridElement | null;\n return grid?.getPluginByName('export');\n };\n\n return {\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <TbwGrid :export=\"true\" />`,\n );\n return;\n }\n plugin.exportCsv({ ...params, fileName: filename ?? params?.fileName ?? 'export.csv' });\n },\n\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <TbwGrid :export=\"true\" />`,\n );\n return;\n }\n plugin.exportExcel({ ...params, fileName: filename ?? params?.fileName ?? 'export.xlsx' });\n },\n\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <TbwGrid :export=\"true\" />`,\n );\n return;\n }\n plugin.exportJson({ ...params, fileName: filename ?? params?.fileName ?? 'export.json' });\n },\n\n isExporting: () => {\n return getPlugin()?.isExporting() ?? false;\n },\n\n getLastExport: () => {\n return getPlugin()?.getLastExport() ?? null;\n },\n };\n}\n"],"names":["registerFeature","config","ExportPlugin","useGridExport","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","filename","params","plugin"],"mappings":";;;;AAuCAA,EAAgB,UAAU,CAACC,MACrBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAaD,KAAU,MAAS,CAC5C;AA8DM,SAASE,IAA+B;AAC7C,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,gBAAgB,QAAQ;AAGvC,SAAO;AAAA,IACL,aAAa,CAACK,GAAmBC,MAAmC;AAClE,YAAMC,IAASH,EAAA;AACf,UAAI,CAACG,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,UAAU,EAAE,GAAGD,GAAQ,UAAUD,KAAYC,GAAQ,YAAY,cAAc;AAAA,IACxF;AAAA,IAEA,eAAe,CAACD,GAAmBC,MAAmC;AACpE,YAAMC,IAASH,EAAA;AACf,UAAI,CAACG,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,YAAY,EAAE,GAAGD,GAAQ,UAAUD,KAAYC,GAAQ,YAAY,eAAe;AAAA,IAC3F;AAAA,IAEA,cAAc,CAACD,GAAmBC,MAAmC;AACnE,YAAMC,IAASH,EAAA;AACf,UAAI,CAACG,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,WAAW,EAAE,GAAGD,GAAQ,UAAUD,KAAYC,GAAQ,YAAY,eAAe;AAAA,IAC1F;AAAA,IAEA,aAAa,MACJF,EAAA,GAAa,YAAA,KAAiB;AAAA,IAGvC,eAAe,MACNA,EAAA,GAAa,cAAA,KAAmB;AAAA,EACzC;AAEJ;"}
1
+ {"version":3,"file":"export.js","sources":["../../../../libs/grid-vue/src/features/export.ts"],"sourcesContent":["/**\n * Export feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `export` prop on TbwGrid.\n * Also exports `useGridExport()` composable for programmatic export control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/export';\n * </script>\n *\n * <template>\n * <TbwGrid export />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridExport } from '@toolbox-web/grid-vue/features/export';\n *\n * const { exportToCsv, exportToExcel, exportToJson } = useGridExport();\n *\n * function handleExport() {\n * exportToCsv('employees.csv');\n * }\n * </script>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { type ExportPlugin, type ExportFormat, type ExportParams } from '@toolbox-web/grid/plugins/export';\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/export';\n\n/**\n * Export methods returned from useGridExport.\n */\nexport interface ExportMethods {\n /**\n * Export grid data to CSV file.\n * @param filename - Optional filename (defaults to 'export.csv')\n * @param params - Optional export parameters\n */\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to Excel file (XML Spreadsheet format).\n * @param filename - Optional filename (defaults to 'export.xlsx')\n * @param params - Optional export parameters\n */\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Export grid data to JSON file.\n * @param filename - Optional filename (defaults to 'export.json')\n * @param params - Optional export parameters\n */\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => void;\n\n /**\n * Check if an export is currently in progress.\n */\n isExporting: () => boolean;\n\n /**\n * Get information about the last export.\n */\n getLastExport: () => { format: ExportFormat; timestamp: Date } | null;\n}\n\n/**\n * Composable for programmatic export control.\n *\n * Must be used within a component that contains a TbwGrid with the export feature enabled.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridExport } from '@toolbox-web/grid-vue/features/export';\n *\n * const { exportToCsv, exportToExcel, isExporting } = useGridExport();\n *\n * async function handleExport(format: 'csv' | 'excel' | 'json') {\n * if (isExporting()) return; // Prevent concurrent exports\n *\n * switch (format) {\n * case 'csv': exportToCsv('data.csv'); break;\n * case 'excel': exportToExcel('data.xlsx'); break;\n * case 'json': exportToJson('data.json'); break;\n * }\n * }\n * </script>\n * ```\n */\nexport function useGridExport(): ExportMethods {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): ExportPlugin | undefined => {\n const grid = gridElement.value as DataGridElement | null;\n return grid?.getPluginByName('export');\n };\n\n return {\n exportToCsv: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <TbwGrid :export=\"true\" />`,\n );\n return;\n }\n plugin.exportCsv({ ...params, fileName: filename ?? params?.fileName ?? 'export.csv' });\n },\n\n exportToExcel: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <TbwGrid :export=\"true\" />`,\n );\n return;\n }\n plugin.exportExcel({ ...params, fileName: filename ?? params?.fileName ?? 'export.xlsx' });\n },\n\n exportToJson: (filename?: string, params?: Partial<ExportParams>) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:export] ExportPlugin not found.\\n\\n` +\n ` → Enable export on the grid:\\n` +\n ` <TbwGrid :export=\"true\" />`,\n );\n return;\n }\n plugin.exportJson({ ...params, fileName: filename ?? params?.fileName ?? 'export.json' });\n },\n\n isExporting: () => {\n return getPlugin()?.isExporting() ?? false;\n },\n\n getLastExport: () => {\n return getPlugin()?.getLastExport() ?? null;\n },\n };\n}\n"],"names":["useGridExport","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","filename","params","plugin"],"mappings":";;;AAqGO,SAASA,IAA+B;AAC7C,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,gBAAgB,QAAQ;AAGvC,SAAO;AAAA,IACL,aAAa,CAACK,GAAmBC,MAAmC;AAClE,YAAMC,IAASH,EAAA;AACf,UAAI,CAACG,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,UAAU,EAAE,GAAGD,GAAQ,UAAUD,KAAYC,GAAQ,YAAY,cAAc;AAAA,IACxF;AAAA,IAEA,eAAe,CAACD,GAAmBC,MAAmC;AACpE,YAAMC,IAASH,EAAA;AACf,UAAI,CAACG,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,YAAY,EAAE,GAAGD,GAAQ,UAAUD,KAAYC,GAAQ,YAAY,eAAe;AAAA,IAC3F;AAAA,IAEA,cAAc,CAACD,GAAmBC,MAAmC;AACnE,YAAMC,IAASH,EAAA;AACf,UAAI,CAACG,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,MAAAA,EAAO,WAAW,EAAE,GAAGD,GAAQ,UAAUD,KAAYC,GAAQ,YAAY,eAAe;AAAA,IAC1F;AAAA,IAEA,aAAa,MACJF,EAAA,GAAa,YAAA,KAAiB;AAAA,IAGvC,eAAe,MACNA,EAAA,GAAa,cAAA,KAAmB;AAAA,EACzC;AAEJ;"}
@@ -1,6 +1,6 @@
1
1
  import { FilteringPlugin as o } from "@toolbox-web/grid/plugins/filtering";
2
- import { createApp as u, inject as d, ref as f } from "vue";
3
- import { r as s } from "../chunks/feature-registry-BgEOysSJ.js";
2
+ import { inject as u, ref as d, createApp as f } from "vue";
3
+ import { registerFeature as s } from "@toolbox-web/grid/features/registry";
4
4
  import { G as a } from "../chunks/use-grid-B59B6XdD.js";
5
5
  s("filtering", (r) => {
6
6
  if (r === !0)
@@ -12,7 +12,7 @@ s("filtering", (r) => {
12
12
  const t = i.filterPanelRenderer;
13
13
  e.filterPanelRenderer = (n, g) => {
14
14
  const l = document.createElement("div");
15
- l.style.display = "contents", u({
15
+ l.style.display = "contents", f({
16
16
  render() {
17
17
  return t(g);
18
18
  }
@@ -22,7 +22,7 @@ s("filtering", (r) => {
22
22
  return new o(e);
23
23
  });
24
24
  function b() {
25
- const r = d(a, f(null)), i = () => r.value?.getPluginByName("filtering");
25
+ const r = u(a, d(null)), i = () => r.value?.getPluginByName("filtering");
26
26
  return {
27
27
  setFilter: (e, t) => {
28
28
  const n = i();
@@ -2,6 +2,7 @@
2
2
  * Column grouping feature for @toolbox-web/grid-vue
3
3
  *
4
4
  * Import this module to enable the `groupingColumns` prop on TbwGrid.
5
+ * Automatically bridges Vue render-function `groupHeaderRenderer` to vanilla DOM.
5
6
  *
6
7
  * @example
7
8
  * ```vue
@@ -18,6 +19,14 @@
18
19
  * </template>
19
20
  * ```
20
21
  *
22
+ * @example Custom group header renderer
23
+ * ```vue
24
+ * <TbwGrid :groupingColumns="{
25
+ * columnGroups: [...],
26
+ * groupHeaderRenderer: (params) => h('strong', `${params.label} (${params.columns.length})`),
27
+ * }" />
28
+ * ```
29
+ *
21
30
  * @packageDocumentation
22
31
  */
23
32
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"grouping-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/grouping-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
1
+ {"version":3,"file":"grouping-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/grouping-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG"}
@@ -1,4 +1,23 @@
1
- import { GroupingColumnsPlugin as e } from "@toolbox-web/grid/plugins/grouping-columns";
2
- import { r as u } from "../chunks/feature-registry-BgEOysSJ.js";
3
- u("groupingColumns", (r) => r === !0 ? new e() : new e(r ?? void 0));
1
+ import { GroupingColumnsPlugin as t } from "@toolbox-web/grid/plugins/grouping-columns";
2
+ import { createApp as i } from "vue";
3
+ import { registerFeature as s } from "@toolbox-web/grid/features/registry";
4
+ s("groupingColumns", (e) => {
5
+ if (e === !0)
6
+ return new t();
7
+ if (!e)
8
+ return new t();
9
+ const r = e, o = { ...r };
10
+ if (typeof r.groupHeaderRenderer == "function") {
11
+ const p = r.groupHeaderRenderer;
12
+ o.groupHeaderRenderer = (u) => {
13
+ const n = document.createElement("div");
14
+ return n.style.display = "contents", i({
15
+ render() {
16
+ return p(u);
17
+ }
18
+ }).mount(n), n;
19
+ };
20
+ }
21
+ return new t(o);
22
+ });
4
23
  //# sourceMappingURL=grouping-columns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grouping-columns.js","sources":["../../../../libs/grid-vue/src/features/grouping-columns.ts"],"sourcesContent":["/**\n * Column grouping feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `groupingColumns` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/grouping-columns';\n * </script>\n *\n * <template>\n * <TbwGrid :groupingColumns=\"{\n * columnGroups: [\n * { header: 'Personal Info', children: ['firstName', 'lastName'] },\n * ],\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { GroupingColumnsPlugin } from '@toolbox-web/grid/plugins/grouping-columns';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('groupingColumns', (config) => {\n if (config === true) {\n return new GroupingColumnsPlugin();\n }\n return new GroupingColumnsPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","GroupingColumnsPlugin"],"mappings":";;AA0BAA,EAAgB,mBAAmB,CAACC,MAC9BA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAsBD,KAAU,MAAS,CACrD;"}
1
+ {"version":3,"file":"grouping-columns.js","sources":["../../../../libs/grid-vue/src/features/grouping-columns.ts"],"sourcesContent":["/**\n * Column grouping feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `groupingColumns` prop on TbwGrid.\n * Automatically bridges Vue render-function `groupHeaderRenderer` to vanilla DOM.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/grouping-columns';\n * </script>\n *\n * <template>\n * <TbwGrid :groupingColumns=\"{\n * columnGroups: [\n * { header: 'Personal Info', children: ['firstName', 'lastName'] },\n * ],\n * }\" />\n * </template>\n * ```\n *\n * @example Custom group header renderer\n * ```vue\n * <TbwGrid :groupingColumns=\"{\n * columnGroups: [...],\n * groupHeaderRenderer: (params) => h('strong', `${params.label} (${params.columns.length})`),\n * }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport {\n GroupingColumnsPlugin,\n type GroupHeaderRenderParams,\n type GroupingColumnsConfig,\n} from '@toolbox-web/grid/plugins/grouping-columns';\nimport { createApp, type VNode } from 'vue';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('groupingColumns', (rawConfig) => {\n if (rawConfig === true) {\n return new GroupingColumnsPlugin();\n }\n if (!rawConfig) {\n return new GroupingColumnsPlugin();\n }\n\n const config = rawConfig as GroupingColumnsConfig & { groupHeaderRenderer?: unknown };\n const options = { ...config } as GroupingColumnsConfig;\n\n // Bridge Vue groupHeaderRenderer (returns VNode) to vanilla (returns HTMLElement | string | void)\n if (typeof config.groupHeaderRenderer === 'function') {\n const vueFn = config.groupHeaderRenderer as unknown as (params: GroupHeaderRenderParams) => VNode;\n options.groupHeaderRenderer = (params: GroupHeaderRenderParams) => {\n const wrapper = document.createElement('div');\n wrapper.style.display = 'contents';\n\n const app = createApp({\n render() {\n return vueFn(params);\n },\n });\n\n app.mount(wrapper);\n return wrapper;\n };\n }\n\n return new GroupingColumnsPlugin(options);\n});\n"],"names":["registerFeature","rawConfig","GroupingColumnsPlugin","config","options","vueFn","params","wrapper","createApp"],"mappings":";;;AAwCAA,EAAgB,mBAAmB,CAACC,MAAc;AAChD,MAAIA,MAAc;AAChB,WAAO,IAAIC,EAAA;AAEb,MAAI,CAACD;AACH,WAAO,IAAIC,EAAA;AAGb,QAAMC,IAASF,GACTG,IAAU,EAAE,GAAGD,EAAA;AAGrB,MAAI,OAAOA,EAAO,uBAAwB,YAAY;AACpD,UAAME,IAAQF,EAAO;AACrB,IAAAC,EAAQ,sBAAsB,CAACE,MAAoC;AACjE,YAAMC,IAAU,SAAS,cAAc,KAAK;AAC5C,aAAAA,EAAQ,MAAM,UAAU,YAEZC,EAAU;AAAA,QACpB,SAAS;AACP,iBAAOH,EAAMC,CAAM;AAAA,QACrB;AAAA,MAAA,CACD,EAEG,MAAMC,CAAO,GACVA;AAAA,IACT;AAAA,EACF;AAEA,SAAO,IAAIL,EAAsBE,CAAO;AAC1C,CAAC;"}
@@ -2,6 +2,7 @@
2
2
  * Row grouping feature for @toolbox-web/grid-vue
3
3
  *
4
4
  * Import this module to enable the `groupingRows` prop on TbwGrid.
5
+ * Automatically bridges Vue render-function `groupRowRenderer` to vanilla DOM.
5
6
  *
6
7
  * @example
7
8
  * ```vue
@@ -17,6 +18,14 @@
17
18
  * </template>
18
19
  * ```
19
20
  *
21
+ * @example Custom group row renderer
22
+ * ```vue
23
+ * <TbwGrid :groupingRows="{
24
+ * groupBy: ['department'],
25
+ * groupRowRenderer: (params) => h('strong', `${params.key}: ${params.value} (${params.rows.length})`),
26
+ * }" />
27
+ * ```
28
+ *
20
29
  * @packageDocumentation
21
30
  */
22
31
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"grouping-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/grouping-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
1
+ {"version":3,"file":"grouping-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/grouping-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG"}
@@ -1,4 +1,23 @@
1
1
  import { GroupingRowsPlugin as o } from "@toolbox-web/grid/plugins/grouping-rows";
2
- import { r as i } from "../chunks/feature-registry-BgEOysSJ.js";
3
- i("groupingRows", (r) => new o(r ?? void 0));
2
+ import { createApp as i } from "vue";
3
+ import { registerFeature as s } from "@toolbox-web/grid/features/registry";
4
+ s("groupingRows", (e) => {
5
+ if (e === !0)
6
+ return new o();
7
+ if (!e)
8
+ return new o();
9
+ const r = e, t = { ...r };
10
+ if (typeof r.groupRowRenderer == "function") {
11
+ const p = r.groupRowRenderer;
12
+ t.groupRowRenderer = (u) => {
13
+ const n = document.createElement("div");
14
+ return n.style.display = "contents", i({
15
+ render() {
16
+ return p(u);
17
+ }
18
+ }).mount(n), n;
19
+ };
20
+ }
21
+ return new o(t);
22
+ });
4
23
  //# sourceMappingURL=grouping-rows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"grouping-rows.js","sources":["../../../../libs/grid-vue/src/features/grouping-rows.ts"],"sourcesContent":["/**\n * Row grouping feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `groupingRows` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/grouping-rows';\n * </script>\n *\n * <template>\n * <TbwGrid :groupingRows=\"{\n * groupBy: ['department', 'team'],\n * defaultExpanded: true,\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { GroupingRowsPlugin } from '@toolbox-web/grid/plugins/grouping-rows';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('groupingRows', (config) => {\n return new GroupingRowsPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","GroupingRowsPlugin"],"mappings":";;AAyBAA,EAAgB,gBAAgB,CAACC,MACxB,IAAIC,EAAmBD,KAAU,MAAS,CAClD;"}
1
+ {"version":3,"file":"grouping-rows.js","sources":["../../../../libs/grid-vue/src/features/grouping-rows.ts"],"sourcesContent":["/**\n * Row grouping feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `groupingRows` prop on TbwGrid.\n * Automatically bridges Vue render-function `groupRowRenderer` to vanilla DOM.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/grouping-rows';\n * </script>\n *\n * <template>\n * <TbwGrid :groupingRows=\"{\n * groupBy: ['department', 'team'],\n * defaultExpanded: true,\n * }\" />\n * </template>\n * ```\n *\n * @example Custom group row renderer\n * ```vue\n * <TbwGrid :groupingRows=\"{\n * groupBy: ['department'],\n * groupRowRenderer: (params) => h('strong', `${params.key}: ${params.value} (${params.rows.length})`),\n * }\" />\n * ```\n *\n * @packageDocumentation\n */\n\nimport {\n GroupingRowsPlugin,\n type GroupingRowsConfig,\n type GroupRowRenderParams,\n} from '@toolbox-web/grid/plugins/grouping-rows';\nimport { createApp, type VNode } from 'vue';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('groupingRows', (rawConfig) => {\n if (rawConfig === true) {\n return new GroupingRowsPlugin();\n }\n if (!rawConfig) {\n return new GroupingRowsPlugin();\n }\n\n const config = rawConfig as GroupingRowsConfig & { groupRowRenderer?: unknown };\n const options = { ...config } as GroupingRowsConfig;\n\n // Bridge Vue groupRowRenderer (returns VNode) to vanilla (returns HTMLElement | string | void)\n if (typeof config.groupRowRenderer === 'function') {\n const vueFn = config.groupRowRenderer as unknown as (params: GroupRowRenderParams) => VNode;\n options.groupRowRenderer = (params: GroupRowRenderParams) => {\n const wrapper = document.createElement('div');\n wrapper.style.display = 'contents';\n\n const app = createApp({\n render() {\n return vueFn(params);\n },\n });\n\n app.mount(wrapper);\n return wrapper;\n };\n }\n\n return new GroupingRowsPlugin(options);\n});\n"],"names":["registerFeature","rawConfig","GroupingRowsPlugin","config","options","vueFn","params","wrapper","createApp"],"mappings":";;;AAuCAA,EAAgB,gBAAgB,CAACC,MAAc;AAC7C,MAAIA,MAAc;AAChB,WAAO,IAAIC,EAAA;AAEb,MAAI,CAACD;AACH,WAAO,IAAIC,EAAA;AAGb,QAAMC,IAASF,GACTG,IAAU,EAAE,GAAGD,EAAA;AAGrB,MAAI,OAAOA,EAAO,oBAAqB,YAAY;AACjD,UAAME,IAAQF,EAAO;AACrB,IAAAC,EAAQ,mBAAmB,CAACE,MAAiC;AAC3D,YAAMC,IAAU,SAAS,cAAc,KAAK;AAC5C,aAAAA,EAAQ,MAAM,UAAU,YAEZC,EAAU;AAAA,QACpB,SAAS;AACP,iBAAOH,EAAMC,CAAM;AAAA,QACrB;AAAA,MAAA,CACD,EAEG,MAAMC,CAAO,GACVA;AAAA,IACT;AAAA,EACF;AAEA,SAAO,IAAIL,EAAmBE,CAAO;AACvC,CAAC;"}
package/features/index.js CHANGED
@@ -1,23 +1,22 @@
1
- import "./clipboard.js";
2
- import "./column-virtualization.js";
3
- import "./context-menu.js";
4
- import "./editing.js";
5
- import "./export.js";
1
+ import "@toolbox-web/grid/features/clipboard";
2
+ import "@toolbox-web/grid/features/column-virtualization";
3
+ import "@toolbox-web/grid/features/context-menu";
4
+ import "@toolbox-web/grid/features/editing";
5
+ import "vue";
6
+ import "@toolbox-web/grid/features/export";
6
7
  import "./filtering.js";
7
8
  import "./grouping-columns.js";
8
9
  import "./grouping-rows.js";
9
- import "./master-detail.js";
10
- import "./multi-sort.js";
11
- import "./pinned-columns.js";
10
+ import "@toolbox-web/grid/features/master-detail";
11
+ import "@toolbox-web/grid/features/multi-sort";
12
+ import "@toolbox-web/grid/features/pinned-columns";
12
13
  import "./pinned-rows.js";
13
- import "./pivot.js";
14
- import "./print.js";
15
- import "./reorder.js";
16
- import "./responsive.js";
17
- import "./row-reorder.js";
18
- import "./selection.js";
19
- import "./server-side.js";
20
- import "./tree.js";
21
- import "./undo-redo.js";
22
- import "./visibility.js";
14
+ import "@toolbox-web/grid/features/pivot";
15
+ import "@toolbox-web/grid/features/print";
16
+ import "@toolbox-web/grid/features/responsive";
17
+ import "@toolbox-web/grid/features/selection";
18
+ import "@toolbox-web/grid/features/server-side";
19
+ import "@toolbox-web/grid/features/tree";
20
+ import "@toolbox-web/grid/features/undo-redo";
21
+ import "@toolbox-web/grid/features/visibility";
23
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -1,23 +1 @@
1
- /**
2
- * Master-detail feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `masterDetail` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/master-detail';
10
- * import { h } from 'vue';
11
- * </script>
12
- *
13
- * <template>
14
- * <TbwGrid :masterDetail="{
15
- * renderer: (row) => h(OrderDetails, { order: row }),
16
- * }" />
17
- * </template>
18
- * ```
19
- *
20
- * @packageDocumentation
21
- */
22
- export {};
23
1
  //# sourceMappingURL=master-detail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/master-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
1
+ {"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/master-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,0CAA0C,CAAC"}
@@ -1,4 +1,2 @@
1
- import { MasterDetailPlugin as e } from "@toolbox-web/grid/plugins/master-detail";
2
- import { r as t } from "../chunks/feature-registry-BgEOysSJ.js";
3
- t("masterDetail", (r) => new e(r ?? void 0));
1
+ import "@toolbox-web/grid/features/master-detail";
4
2
  //# sourceMappingURL=master-detail.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"master-detail.js","sources":["../../../../libs/grid-vue/src/features/master-detail.ts"],"sourcesContent":["/**\n * Master-detail feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `masterDetail` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/master-detail';\n * import { h } from 'vue';\n * </script>\n *\n * <template>\n * <TbwGrid :masterDetail=\"{\n * renderer: (row) => h(OrderDetails, { order: row }),\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { MasterDetailPlugin } from '@toolbox-web/grid/plugins/master-detail';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('masterDetail', (config) => {\n return new MasterDetailPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","MasterDetailPlugin"],"mappings":";;AAyBAA,EAAgB,gBAAgB,CAACC,MACxB,IAAIC,EAAmBD,KAAU,MAAS,CAClD;"}
1
+ {"version":3,"file":"master-detail.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,20 +1 @@
1
- /**
2
- * Multi-sort feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `multiSort` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/multi-sort';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid multiSort />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
18
- */
19
- export {};
20
1
  //# sourceMappingURL=multi-sort.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multi-sort.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/multi-sort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"multi-sort.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/multi-sort.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,uCAAuC,CAAC"}
@@ -1,5 +1,2 @@
1
- import { MultiSortPlugin as t } from "@toolbox-web/grid/plugins/multi-sort";
2
- import { r as e } from "../chunks/feature-registry-BgEOysSJ.js";
3
- e("multiSort", (r) => r === !0 || r === "multi" ? new t() : r === "single" ? new t({ maxSortColumns: 1 }) : new t(r ?? void 0));
4
- e("sorting", (r) => r === !0 || r === "multi" ? new t() : r === "single" ? new t({ maxSortColumns: 1 }) : new t(r ?? void 0));
1
+ import "@toolbox-web/grid/features/multi-sort";
5
2
  //# sourceMappingURL=multi-sort.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"multi-sort.js","sources":["../../../../libs/grid-vue/src/features/multi-sort.ts"],"sourcesContent":["/**\n * Multi-sort feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `multiSort` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/multi-sort';\n * </script>\n *\n * <template>\n * <TbwGrid multiSort />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { MultiSortPlugin } from '@toolbox-web/grid/plugins/multi-sort';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('multiSort', (config) => {\n if (config === true || config === 'multi') {\n return new MultiSortPlugin();\n }\n if (config === 'single') {\n return new MultiSortPlugin({ maxSortColumns: 1 });\n }\n return new MultiSortPlugin(config ?? undefined);\n});\n\n// Alias for backwards compatibility\nregisterFeature('sorting', (config) => {\n if (config === true || config === 'multi') {\n return new MultiSortPlugin();\n }\n if (config === 'single') {\n return new MultiSortPlugin({ maxSortColumns: 1 });\n }\n return new MultiSortPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","MultiSortPlugin"],"mappings":";;AAsBAA,EAAgB,aAAa,CAACC,MACxBA,MAAW,MAAQA,MAAW,UACzB,IAAIC,EAAA,IAETD,MAAW,WACN,IAAIC,EAAgB,EAAE,gBAAgB,GAAG,IAE3C,IAAIA,EAAgBD,KAAU,MAAS,CAC/C;AAGDD,EAAgB,WAAW,CAACC,MACtBA,MAAW,MAAQA,MAAW,UACzB,IAAIC,EAAA,IAETD,MAAW,WACN,IAAIC,EAAgB,EAAE,gBAAgB,GAAG,IAE3C,IAAIA,EAAgBD,KAAU,MAAS,CAC/C;"}
1
+ {"version":3,"file":"multi-sort.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,23 +1 @@
1
- /**
2
- * Pinned columns feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `pinnedColumns` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/pinned-columns';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid pinnedColumns :columns="[
14
- * { field: 'id', pinned: 'left' },
15
- * { field: 'name' },
16
- * ]" />
17
- * </template>
18
- * ```
19
- *
20
- * @packageDocumentation
21
- */
22
- export {};
23
1
  //# sourceMappingURL=pinned-columns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pinned-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/pinned-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
1
+ {"version":3,"file":"pinned-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/pinned-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,2CAA2C,CAAC"}
@@ -1,4 +1,2 @@
1
- import { PinnedColumnsPlugin as r } from "@toolbox-web/grid/plugins/pinned-columns";
2
- import { r as n } from "../chunks/feature-registry-BgEOysSJ.js";
3
- n("pinnedColumns", () => new r());
1
+ import "@toolbox-web/grid/features/pinned-columns";
4
2
  //# sourceMappingURL=pinned-columns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pinned-columns.js","sources":["../../../../libs/grid-vue/src/features/pinned-columns.ts"],"sourcesContent":["/**\n * Pinned columns feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `pinnedColumns` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/pinned-columns';\n * </script>\n *\n * <template>\n * <TbwGrid pinnedColumns :columns=\"[\n * { field: 'id', pinned: 'left' },\n * { field: 'name' },\n * ]\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { PinnedColumnsPlugin } from '@toolbox-web/grid/plugins/pinned-columns';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('pinnedColumns', () => {\n return new PinnedColumnsPlugin();\n});\n"],"names":["registerFeature","PinnedColumnsPlugin"],"mappings":";;AAyBAA,EAAgB,iBAAiB,MACxB,IAAIC,EAAA,CACZ;"}
1
+ {"version":3,"file":"pinned-columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}