@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
- * 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":";"}
@@ -1,22 +1 @@
1
- /**
2
- * Pinned rows feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `pinnedRows` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/pinned-rows';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid :pinnedRows="{
14
- * bottom: [{ type: 'aggregation', aggregator: 'sum' }],
15
- * }" />
16
- * </template>
17
- * ```
18
- *
19
- * @packageDocumentation
20
- */
21
- export {};
22
1
  //# sourceMappingURL=pinned-rows.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pinned-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/pinned-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
1
+ {"version":3,"file":"pinned-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/pinned-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,wCAAwC,CAAC"}
@@ -1,4 +1,2 @@
1
- import { PinnedRowsPlugin as e } from "@toolbox-web/grid/plugins/pinned-rows";
2
- import { r as n } from "../chunks/feature-registry-BgEOysSJ.js";
3
- n("pinnedRows", (r) => r === !0 ? new e() : new e(r ?? void 0));
1
+ import "@toolbox-web/grid/features/pinned-rows";
4
2
  //# sourceMappingURL=pinned-rows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pinned-rows.js","sources":["../../../../libs/grid-vue/src/features/pinned-rows.ts"],"sourcesContent":["/**\n * Pinned rows feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `pinnedRows` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/pinned-rows';\n * </script>\n *\n * <template>\n * <TbwGrid :pinnedRows=\"{\n * bottom: [{ type: 'aggregation', aggregator: 'sum' }],\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { PinnedRowsPlugin } from '@toolbox-web/grid/plugins/pinned-rows';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('pinnedRows', (config) => {\n if (config === true) {\n return new PinnedRowsPlugin();\n }\n return new PinnedRowsPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","PinnedRowsPlugin"],"mappings":";;AAwBAA,EAAgB,cAAc,CAACC,MACzBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAiBD,KAAU,MAAS,CAChD;"}
1
+ {"version":3,"file":"pinned-rows.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,24 +1 @@
1
- /**
2
- * Pivot feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `pivot` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/pivot';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid :pivot="{
14
- * rowFields: ['category'],
15
- * columnFields: ['year'],
16
- * valueField: 'sales',
17
- * }" />
18
- * </template>
19
- * ```
20
- *
21
- * @packageDocumentation
22
- */
23
- export {};
24
1
  //# sourceMappingURL=pivot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pivot.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/pivot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
1
+ {"version":3,"file":"pivot.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/pivot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,kCAAkC,CAAC"}
package/features/pivot.js CHANGED
@@ -1,4 +1,2 @@
1
- import { PivotPlugin as i } from "@toolbox-web/grid/plugins/pivot";
2
- import { r as o } from "../chunks/feature-registry-BgEOysSJ.js";
3
- o("pivot", (r) => new i(r ?? void 0));
1
+ import "@toolbox-web/grid/features/pivot";
4
2
  //# sourceMappingURL=pivot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pivot.js","sources":["../../../../libs/grid-vue/src/features/pivot.ts"],"sourcesContent":["/**\n * Pivot feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `pivot` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/pivot';\n * </script>\n *\n * <template>\n * <TbwGrid :pivot=\"{\n * rowFields: ['category'],\n * columnFields: ['year'],\n * valueField: 'sales',\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { PivotPlugin } from '@toolbox-web/grid/plugins/pivot';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('pivot', (config) => {\n return new PivotPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","PivotPlugin"],"mappings":";;AA0BAA,EAAgB,SAAS,CAACC,MACjB,IAAIC,EAAYD,KAAU,MAAS,CAC3C;"}
1
+ {"version":3,"file":"pivot.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1 @@
1
- {"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/print.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAYhF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,YAAY,IAAI,YAAY,CAsB3C"}
1
+ {"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/print.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAKrF,OAAO,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;OAEG;IACH,UAAU,EAAE,MAAM,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,YAAY,IAAI,YAAY,CAsB3C"}
package/features/print.js CHANGED
@@ -1,14 +1,12 @@
1
- import { PrintPlugin as n } from "@toolbox-web/grid/plugins/print";
2
- import { inject as o, ref as u } from "vue";
3
- import { r as g } from "../chunks/feature-registry-BgEOysSJ.js";
4
- import { G as s } from "../chunks/use-grid-DwjXrO19.js";
5
- g("print", (r) => r === !0 ? new n() : new n(r ?? void 0));
6
- function f() {
7
- const r = o(s, u(null)), i = () => r.value?.getPlugin(n);
1
+ import { inject as e, ref as o } from "vue";
2
+ import { G as g } from "../chunks/use-grid-B59B6XdD.js";
3
+ import "@toolbox-web/grid/features/print";
4
+ function s() {
5
+ const t = e(g, o(null)), n = () => t.value?.getPluginByName("print");
8
6
  return {
9
- print: async (t) => {
10
- const e = i();
11
- if (!e) {
7
+ print: async (i) => {
8
+ const r = n();
9
+ if (!r) {
12
10
  console.warn(
13
11
  `[tbw-grid:print] PrintPlugin not found.
14
12
 
@@ -17,12 +15,12 @@ function f() {
17
15
  );
18
16
  return;
19
17
  }
20
- await e.print(t);
18
+ await r.print(i);
21
19
  },
22
- isPrinting: () => i()?.isPrinting() ?? !1
20
+ isPrinting: () => n()?.isPrinting() ?? !1
23
21
  };
24
22
  }
25
23
  export {
26
- f as useGridPrint
24
+ s as useGridPrint
27
25
  };
28
26
  //# sourceMappingURL=print.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"print.js","sources":["../../../../libs/grid-vue/src/features/print.ts"],"sourcesContent":["/**\n * Print feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `print` prop on TbwGrid.\n * Also exports `useGridPrint()` composable for programmatic print control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/print';\n * </script>\n *\n * <template>\n * <TbwGrid print />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridPrint } from '@toolbox-web/grid-vue/features/print';\n *\n * const { print, isPrinting } = useGridPrint();\n * </script>\n *\n * <template>\n * <button @click=\"print\" :disabled=\"isPrinting()\">Print Grid</button>\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { PrintPlugin, type PrintParams } from '@toolbox-web/grid/plugins/print';\nimport { inject, ref } from 'vue';\nimport { registerFeature } from '../lib/feature-registry';\nimport { GRID_ELEMENT_KEY } from '../lib/use-grid';\n\nregisterFeature('print', (config) => {\n if (config === true) {\n return new PrintPlugin();\n }\n return new PrintPlugin(config ?? undefined);\n});\n\n/**\n * Print methods returned from useGridPrint.\n */\nexport interface PrintMethods {\n /**\n * Print the grid.\n * Opens browser print dialog after preparing the grid for printing.\n * @param params - Optional print parameters\n */\n print: (params?: PrintParams) => Promise<void>;\n\n /**\n * Check if a print operation is currently in progress.\n */\n isPrinting: () => boolean;\n}\n\n/**\n * Composable for programmatic print control.\n *\n * Must be used within a component that contains a TbwGrid with print enabled.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridPrint } from '@toolbox-web/grid-vue/features/print';\n *\n * const { print, isPrinting } = useGridPrint();\n *\n * async function handlePrint() {\n * await print({ title: 'My Report', isolate: true });\n * console.log('Print completed');\n * }\n * </script>\n *\n * <template>\n * <button @click=\"handlePrint\" :disabled=\"isPrinting()\">\n * {{ isPrinting() ? 'Printing...' : 'Print' }}\n * </button>\n * </template>\n * ```\n */\nexport function useGridPrint(): PrintMethods {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): PrintPlugin | undefined => {\n const grid = gridElement.value as DataGridElement | null;\n return grid?.getPlugin(PrintPlugin);\n };\n\n return {\n print: async (params?: PrintParams) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:print] PrintPlugin not found.\\n\\n` + ` → Enable print on the grid:\\n` + ` <TbwGrid print />`,\n );\n return;\n }\n await plugin.print(params);\n },\n\n isPrinting: () => getPlugin()?.isPrinting() ?? false,\n };\n}\n"],"names":["registerFeature","config","PrintPlugin","useGridPrint","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","params","plugin"],"mappings":";;;;AAuCAA,EAAgB,SAAS,CAACC,MACpBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAYD,KAAU,MAAS,CAC3C;AA4CM,SAASE,IAA6B;AAC3C,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,UAAUF,CAAW;AAGpC,SAAO;AAAA,IACL,OAAO,OAAOO,MAAyB;AACrC,YAAMC,IAASF,EAAA;AACf,UAAI,CAACE,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAEF;AAAA,MACF;AACA,YAAMA,EAAO,MAAMD,CAAM;AAAA,IAC3B;AAAA,IAEA,YAAY,MAAMD,KAAa,gBAAgB;AAAA,EAAA;AAEnD;"}
1
+ {"version":3,"file":"print.js","sources":["../../../../libs/grid-vue/src/features/print.ts"],"sourcesContent":["/**\n * Print feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `print` prop on TbwGrid.\n * Also exports `useGridPrint()` composable for programmatic print control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/print';\n * </script>\n *\n * <template>\n * <TbwGrid print />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridPrint } from '@toolbox-web/grid-vue/features/print';\n *\n * const { print, isPrinting } = useGridPrint();\n * </script>\n *\n * <template>\n * <button @click=\"print\" :disabled=\"isPrinting()\">Print Grid</button>\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { type PrintPlugin, type PrintParams } from '@toolbox-web/grid/plugins/print';\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/print';\n\n/**\n * Print methods returned from useGridPrint.\n */\nexport interface PrintMethods {\n /**\n * Print the grid.\n * Opens browser print dialog after preparing the grid for printing.\n * @param params - Optional print parameters\n */\n print: (params?: PrintParams) => Promise<void>;\n\n /**\n * Check if a print operation is currently in progress.\n */\n isPrinting: () => boolean;\n}\n\n/**\n * Composable for programmatic print control.\n *\n * Must be used within a component that contains a TbwGrid with print enabled.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridPrint } from '@toolbox-web/grid-vue/features/print';\n *\n * const { print, isPrinting } = useGridPrint();\n *\n * async function handlePrint() {\n * await print({ title: 'My Report', isolate: true });\n * console.log('Print completed');\n * }\n * </script>\n *\n * <template>\n * <button @click=\"handlePrint\" :disabled=\"isPrinting()\">\n * {{ isPrinting() ? 'Printing...' : 'Print' }}\n * </button>\n * </template>\n * ```\n */\nexport function useGridPrint(): PrintMethods {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): PrintPlugin | undefined => {\n const grid = gridElement.value as DataGridElement | null;\n return grid?.getPluginByName('print');\n };\n\n return {\n print: async (params?: PrintParams) => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:print] PrintPlugin not found.\\n\\n` + ` → Enable print on the grid:\\n` + ` <TbwGrid print />`,\n );\n return;\n }\n await plugin.print(params);\n },\n\n isPrinting: () => getPlugin()?.isPrinting() ?? false,\n };\n}\n"],"names":["useGridPrint","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","params","plugin"],"mappings":";;;AAmFO,SAASA,IAA6B;AAC3C,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,gBAAgB,OAAO;AAGtC,SAAO;AAAA,IACL,OAAO,OAAOK,MAAyB;AACrC,YAAMC,IAASF,EAAA;AACf,UAAI,CAACE,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAEF;AAAA,MACF;AACA,YAAMA,EAAO,MAAMD,CAAM;AAAA,IAC3B;AAAA,IAEA,YAAY,MAAMD,KAAa,gBAAgB;AAAA,EAAA;AAEnD;"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=reorder-columns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder-columns.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/reorder-columns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,4CAA4C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import "@toolbox-web/grid/features/reorder-columns";
2
+ //# sourceMappingURL=reorder-columns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder-columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=reorder-rows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder-rows.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/reorder-rows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,yCAAyC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import "@toolbox-web/grid/features/reorder-rows";
2
+ //# sourceMappingURL=reorder-rows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reorder-rows.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,20 +1,6 @@
1
1
  /**
2
- * Column reorder feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `reorder` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/reorder';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid reorder />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
2
+ * @deprecated Import from `@toolbox-web/grid-vue/features/reorder-columns` instead.
3
+ * This re-export will be removed in v2.0.
18
4
  */
19
- export {};
5
+ export {} from './reorder-columns';
20
6
  //# sourceMappingURL=reorder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/reorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/reorder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,4 +1,2 @@
1
- import { ReorderPlugin as e } from "@toolbox-web/grid/plugins/reorder";
2
- import { r as t } from "../chunks/feature-registry-BgEOysSJ.js";
3
- t("reorder", (r) => r === !0 ? new e() : new e(r ?? void 0));
1
+
4
2
  //# sourceMappingURL=reorder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reorder.js","sources":["../../../../libs/grid-vue/src/features/reorder.ts"],"sourcesContent":["/**\n * Column reorder feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `reorder` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/reorder';\n * </script>\n *\n * <template>\n * <TbwGrid reorder />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('reorder', (config) => {\n if (config === true) {\n return new ReorderPlugin();\n }\n return new ReorderPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","ReorderPlugin"],"mappings":";;AAsBAA,EAAgB,WAAW,CAACC,MACtBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAcD,KAAU,MAAS,CAC7C;"}
1
+ {"version":3,"file":"reorder.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,24 +1 @@
1
- /**
2
- * Responsive feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `responsive` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/responsive';
10
- * import { h } from 'vue';
11
- * </script>
12
- *
13
- * <template>
14
- * <TbwGrid :responsive="{
15
- * breakpoint: 768,
16
- * cardRenderer: (row) => h(EmployeeCard, { employee: row }),
17
- * }" />
18
- * </template>
19
- * ```
20
- *
21
- * @packageDocumentation
22
- */
23
- export {};
24
1
  //# sourceMappingURL=responsive.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/responsive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
1
+ {"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/responsive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,uCAAuC,CAAC"}
@@ -1,4 +1,2 @@
1
- import { ResponsivePlugin as e } from "@toolbox-web/grid/plugins/responsive";
2
- import { r as i } from "../chunks/feature-registry-BgEOysSJ.js";
3
- i("responsive", (r) => r === !0 ? new e() : new e(r ?? void 0));
1
+ import "@toolbox-web/grid/features/responsive";
4
2
  //# sourceMappingURL=responsive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive.js","sources":["../../../../libs/grid-vue/src/features/responsive.ts"],"sourcesContent":["/**\n * Responsive feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `responsive` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/responsive';\n * import { h } from 'vue';\n * </script>\n *\n * <template>\n * <TbwGrid :responsive=\"{\n * breakpoint: 768,\n * cardRenderer: (row) => h(EmployeeCard, { employee: row }),\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ResponsivePlugin } from '@toolbox-web/grid/plugins/responsive';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('responsive', (config) => {\n if (config === true) {\n return new ResponsivePlugin();\n }\n return new ResponsivePlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","ResponsivePlugin"],"mappings":";;AA0BAA,EAAgB,cAAc,CAACC,MACzBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAiBD,KAAU,MAAS,CAChD;"}
1
+ {"version":3,"file":"responsive.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,20 +1,6 @@
1
1
  /**
2
- * Row reorder feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `rowReorder` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/row-reorder';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid rowReorder />
14
- * </template>
15
- * ```
16
- *
17
- * @packageDocumentation
2
+ * @deprecated Import from `@toolbox-web/grid-vue/features/reorder-rows` instead.
3
+ * This re-export will be removed in v2.0.
18
4
  */
19
- export {};
5
+ export {} from './reorder-rows';
20
6
  //# sourceMappingURL=row-reorder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"row-reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/row-reorder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
1
+ {"version":3,"file":"row-reorder.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/row-reorder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,4 +1,2 @@
1
- import { RowReorderPlugin as e } from "@toolbox-web/grid/plugins/row-reorder";
2
- import { r as o } from "../chunks/feature-registry-BgEOysSJ.js";
3
- o("rowReorder", (r) => r === !0 ? new e() : new e(r ?? void 0));
1
+
4
2
  //# sourceMappingURL=row-reorder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"row-reorder.js","sources":["../../../../libs/grid-vue/src/features/row-reorder.ts"],"sourcesContent":["/**\n * Row reorder feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `rowReorder` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/row-reorder';\n * </script>\n *\n * <template>\n * <TbwGrid rowReorder />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { RowReorderPlugin } from '@toolbox-web/grid/plugins/row-reorder';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('rowReorder', (config) => {\n if (config === true) {\n return new RowReorderPlugin();\n }\n return new RowReorderPlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","RowReorderPlugin"],"mappings":";;AAsBAA,EAAgB,cAAc,CAACC,MACzBA,MAAW,KACN,IAAIC,EAAA,IAEN,IAAIA,EAAiBD,KAAU,MAAS,CAChD;"}
1
+ {"version":3,"file":"row-reorder.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAc5G;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,OAAO;IAC9C;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B;;;OAGG;IACH,YAAY,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAEtD;;OAEG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAEzC;;;;;;;;OAQG;IACH,eAAe,EAAE,MAAM,IAAI,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAG,OAAO,KAAK,gBAAgB,CAAC,IAAI,CAAC,CA0DzE"}
1
+ {"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAwB,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAKjH,OAAO,sCAAsC,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB,CAAC,IAAI,GAAG,OAAO;IAC9C;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B;;;OAGG;IACH,YAAY,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAEtD;;OAEG;IACH,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAEzC;;;;;;;;OAQG;IACH,eAAe,EAAE,MAAM,IAAI,EAAE,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,GAAG,OAAO,KAAK,gBAAgB,CAAC,IAAI,CAAC,CA0DzE"}
@@ -1,13 +1,11 @@
1
- import { SelectionPlugin as s } from "@toolbox-web/grid/plugins/selection";
2
- import { inject as u, ref as g } from "vue";
3
- import { r as d } from "../chunks/feature-registry-BgEOysSJ.js";
4
- import { G as a } from "../chunks/use-grid-DwjXrO19.js";
5
- d("selection", (t) => t === "cell" || t === "row" || t === "range" ? new s({ mode: t }) : new s(t ?? void 0));
6
- function R() {
7
- const t = u(a, g(null)), n = () => t.value?.getPlugin(s);
1
+ import { inject as s, ref as g } from "vue";
2
+ import { G as u } from "../chunks/use-grid-B59B6XdD.js";
3
+ import "@toolbox-web/grid/features/selection";
4
+ function w() {
5
+ const c = s(u, g(null)), t = () => c.value?.getPluginByName("selection");
8
6
  return {
9
7
  selectAll: () => {
10
- const e = n();
8
+ const e = t();
11
9
  if (!e) {
12
10
  console.warn(
13
11
  `[tbw-grid:selection] SelectionPlugin not found.
@@ -17,28 +15,28 @@ function R() {
17
15
  );
18
16
  return;
19
17
  }
20
- const o = t.value, c = e.config?.mode;
21
- if (c === "row") {
22
- const l = o?.rows?.length ?? 0, r = /* @__PURE__ */ new Set();
23
- for (let i = 0; i < l; i++) r.add(i);
24
- e.selected = r, e.requestAfterRender?.();
25
- } else if (c === "range") {
26
- const l = o?.rows?.length ?? 0, r = o?._columns?.length ?? 0;
27
- l > 0 && r > 0 && e.setRanges([{ from: { row: 0, col: 0 }, to: { row: l - 1, col: r - 1 } }]);
18
+ const n = c.value, i = e.config?.mode;
19
+ if (i === "row") {
20
+ const l = n?.rows?.length ?? 0, o = /* @__PURE__ */ new Set();
21
+ for (let r = 0; r < l; r++) o.add(r);
22
+ e.selected = o, e.requestAfterRender?.();
23
+ } else if (i === "range") {
24
+ const l = n?.rows?.length ?? 0, o = n?._columns?.length ?? 0;
25
+ l > 0 && o > 0 && e.setRanges([{ from: { row: 0, col: 0 }, to: { row: l - 1, col: o - 1 } }]);
28
26
  }
29
27
  },
30
28
  clearSelection: () => {
31
- n()?.clearSelection();
29
+ t()?.clearSelection();
32
30
  },
33
- getSelection: () => n()?.getSelection() ?? null,
34
- isCellSelected: (e, o) => n()?.isCellSelected(e, o) ?? !1,
31
+ getSelection: () => t()?.getSelection() ?? null,
32
+ isCellSelected: (e, n) => t()?.isCellSelected(e, n) ?? !1,
35
33
  setRanges: (e) => {
36
- n()?.setRanges(e);
34
+ t()?.setRanges(e);
37
35
  },
38
- getSelectedRows: () => n()?.getSelectedRows() ?? []
36
+ getSelectedRows: () => t()?.getSelectedRows() ?? []
39
37
  };
40
38
  }
41
39
  export {
42
- R as useGridSelection
40
+ w as useGridSelection
43
41
  };
44
42
  //# sourceMappingURL=selection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selection.js","sources":["../../../../libs/grid-vue/src/features/selection.ts"],"sourcesContent":["/**\n * Selection feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `selection` prop on TbwGrid.\n * Also exports `useGridSelection()` composable for programmatic selection control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/selection';\n * </script>\n *\n * <template>\n * <TbwGrid selection=\"range\" />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridSelection } from '@toolbox-web/grid-vue/features/selection';\n *\n * const { selectAll, clearSelection, getSelection } = useGridSelection();\n *\n * function handleSelectAll() {\n * selectAll();\n * }\n * </script>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { SelectionPlugin, type CellRange, type SelectionResult } from '@toolbox-web/grid/plugins/selection';\nimport { inject, ref } from 'vue';\nimport { registerFeature } from '../lib/feature-registry';\nimport { GRID_ELEMENT_KEY } from '../lib/use-grid';\n\nregisterFeature('selection', (config) => {\n // Handle shorthand: 'cell', 'row', 'range'\n if (config === 'cell' || config === 'row' || config === 'range') {\n return new SelectionPlugin({ mode: config });\n }\n // Full config object\n return new SelectionPlugin(config ?? undefined);\n});\n\n/**\n * Selection methods returned from useGridSelection.\n *\n * Uses the injected grid element from TbwGrid's provide/inject.\n * Methods work immediately when grid is available.\n */\nexport interface SelectionMethods<TRow = unknown> {\n /**\n * Select all rows (row mode) or all cells (range mode).\n */\n selectAll: () => void;\n\n /**\n * Clear all selection.\n */\n clearSelection: () => void;\n\n /**\n * Get the current selection state.\n * Use this to derive selected rows, indices, etc.\n */\n getSelection: () => SelectionResult | null;\n\n /**\n * Check if a specific cell is selected.\n */\n isCellSelected: (row: number, col: number) => boolean;\n\n /**\n * Set selection ranges programmatically.\n */\n setRanges: (ranges: CellRange[]) => void;\n\n /**\n * Get actual row objects for the current selection.\n * Works in all selection modes (row, cell, range) — resolves indices\n * against the grid's processed (sorted/filtered) rows.\n *\n * This is the recommended way to get selected rows. Unlike manual\n * index mapping, it correctly resolves rows even when the grid is\n * sorted or filtered.\n */\n getSelectedRows: () => TRow[];\n}\n\n/**\n * Composable for programmatic selection control.\n *\n * Must be used within a component that contains a TbwGrid with the selection feature enabled.\n * Uses Vue's provide/inject, so it works reliably regardless of when the grid renders.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridSelection } from '@toolbox-web/grid-vue/features/selection';\n *\n * const { selectAll, clearSelection, getSelection } = useGridSelection();\n *\n * function exportSelected() {\n * const selection = getSelection();\n * if (!selection) return;\n * // Derive rows from selection.ranges and grid.rows\n * }\n * </script>\n * ```\n */\nexport function useGridSelection<TRow = unknown>(): SelectionMethods<TRow> {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): SelectionPlugin | undefined => {\n const grid = gridElement.value as DataGridElement<TRow> | null;\n return grid?.getPlugin(SelectionPlugin);\n };\n\n return {\n selectAll: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:selection] SelectionPlugin not found.\\n\\n` +\n ` → Enable selection on the grid:\\n` +\n ` <TbwGrid selection=\"range\" />`,\n );\n return;\n }\n const grid = gridElement.value as DataGridElement<TRow> | null;\n // Cast to any to access protected config\n const mode = (plugin as any).config?.mode;\n\n if (mode === 'row') {\n const rowCount = grid?.rows?.length ?? 0;\n const allIndices = new Set<number>();\n for (let i = 0; i < rowCount; i++) allIndices.add(i);\n (plugin as any).selected = allIndices;\n (plugin as any).requestAfterRender?.();\n } else if (mode === 'range') {\n const rowCount = grid?.rows?.length ?? 0;\n const colCount = (grid as any)?._columns?.length ?? 0;\n if (rowCount > 0 && colCount > 0) {\n plugin.setRanges([{ from: { row: 0, col: 0 }, to: { row: rowCount - 1, col: colCount - 1 } }]);\n }\n }\n },\n\n clearSelection: () => {\n getPlugin()?.clearSelection();\n },\n\n getSelection: () => {\n return getPlugin()?.getSelection() ?? null;\n },\n\n isCellSelected: (row: number, col: number) => {\n return getPlugin()?.isCellSelected(row, col) ?? false;\n },\n\n setRanges: (ranges: CellRange[]) => {\n getPlugin()?.setRanges(ranges);\n },\n\n getSelectedRows: (): TRow[] => {\n return getPlugin()?.getSelectedRows<TRow>() ?? [];\n },\n };\n}\n"],"names":["registerFeature","config","SelectionPlugin","useGridSelection","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","plugin","grid","mode","rowCount","allIndices","colCount","row","col","ranges"],"mappings":";;;;AAuCAA,EAAgB,aAAa,CAACC,MAExBA,MAAW,UAAUA,MAAW,SAASA,MAAW,UAC/C,IAAIC,EAAgB,EAAE,MAAMD,GAAQ,IAGtC,IAAIC,EAAgBD,KAAU,MAAS,CAC/C;AAoEM,SAASE,IAA2D;AACzE,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,UAAUF,CAAe;AAGxC,SAAO;AAAA,IACL,WAAW,MAAM;AACf,YAAMO,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,YAAMC,IAAON,EAAY,OAEnBO,IAAQF,EAAe,QAAQ;AAErC,UAAIE,MAAS,OAAO;AAClB,cAAMC,IAAWF,GAAM,MAAM,UAAU,GACjCG,wBAAiB,IAAA;AACvB,iBAAS,IAAI,GAAG,IAAID,GAAU,IAAK,CAAAC,EAAW,IAAI,CAAC;AAClD,QAAAJ,EAAe,WAAWI,GAC1BJ,EAAe,qBAAA;AAAA,MAClB,WAAWE,MAAS,SAAS;AAC3B,cAAMC,IAAWF,GAAM,MAAM,UAAU,GACjCI,IAAYJ,GAAc,UAAU,UAAU;AACpD,QAAIE,IAAW,KAAKE,IAAW,KAC7BL,EAAO,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,GAAG,KAAK,EAAA,GAAK,IAAI,EAAE,KAAKG,IAAW,GAAG,KAAKE,IAAW,EAAA,EAAE,CAAG,CAAC;AAAA,MAEjG;AAAA,IACF;AAAA,IAEA,gBAAgB,MAAM;AACpB,MAAAN,EAAA,GAAa,eAAA;AAAA,IACf;AAAA,IAEA,cAAc,MACLA,EAAA,GAAa,aAAA,KAAkB;AAAA,IAGxC,gBAAgB,CAACO,GAAaC,MACrBR,EAAA,GAAa,eAAeO,GAAKC,CAAG,KAAK;AAAA,IAGlD,WAAW,CAACC,MAAwB;AAClC,MAAAT,EAAA,GAAa,UAAUS,CAAM;AAAA,IAC/B;AAAA,IAEA,iBAAiB,MACRT,EAAA,GAAa,gBAAA,KAA2B,CAAA;AAAA,EACjD;AAEJ;"}
1
+ {"version":3,"file":"selection.js","sources":["../../../../libs/grid-vue/src/features/selection.ts"],"sourcesContent":["/**\n * Selection feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `selection` prop on TbwGrid.\n * Also exports `useGridSelection()` composable for programmatic selection control.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/selection';\n * </script>\n *\n * <template>\n * <TbwGrid selection=\"range\" />\n * </template>\n * ```\n *\n * @example Using the composable\n * ```vue\n * <script setup>\n * import { useGridSelection } from '@toolbox-web/grid-vue/features/selection';\n *\n * const { selectAll, clearSelection, getSelection } = useGridSelection();\n *\n * function handleSelectAll() {\n * selectAll();\n * }\n * </script>\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { DataGridElement } from '@toolbox-web/grid';\nimport { type SelectionPlugin, type CellRange, type SelectionResult } from '@toolbox-web/grid/plugins/selection';\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/selection';\n\n/**\n * Selection methods returned from useGridSelection.\n *\n * Uses the injected grid element from TbwGrid's provide/inject.\n * Methods work immediately when grid is available.\n */\nexport interface SelectionMethods<TRow = unknown> {\n /**\n * Select all rows (row mode) or all cells (range mode).\n */\n selectAll: () => void;\n\n /**\n * Clear all selection.\n */\n clearSelection: () => void;\n\n /**\n * Get the current selection state.\n * Use this to derive selected rows, indices, etc.\n */\n getSelection: () => SelectionResult | null;\n\n /**\n * Check if a specific cell is selected.\n */\n isCellSelected: (row: number, col: number) => boolean;\n\n /**\n * Set selection ranges programmatically.\n */\n setRanges: (ranges: CellRange[]) => void;\n\n /**\n * Get actual row objects for the current selection.\n * Works in all selection modes (row, cell, range) — resolves indices\n * against the grid's processed (sorted/filtered) rows.\n *\n * This is the recommended way to get selected rows. Unlike manual\n * index mapping, it correctly resolves rows even when the grid is\n * sorted or filtered.\n */\n getSelectedRows: () => TRow[];\n}\n\n/**\n * Composable for programmatic selection control.\n *\n * Must be used within a component that contains a TbwGrid with the selection feature enabled.\n * Uses Vue's provide/inject, so it works reliably regardless of when the grid renders.\n *\n * @example\n * ```vue\n * <script setup>\n * import { useGridSelection } from '@toolbox-web/grid-vue/features/selection';\n *\n * const { selectAll, clearSelection, getSelection } = useGridSelection();\n *\n * function exportSelected() {\n * const selection = getSelection();\n * if (!selection) return;\n * // Derive rows from selection.ranges and grid.rows\n * }\n * </script>\n * ```\n */\nexport function useGridSelection<TRow = unknown>(): SelectionMethods<TRow> {\n const gridElement = inject(GRID_ELEMENT_KEY, ref(null));\n\n const getPlugin = (): SelectionPlugin | undefined => {\n const grid = gridElement.value as DataGridElement<TRow> | null;\n return grid?.getPluginByName('selection');\n };\n\n return {\n selectAll: () => {\n const plugin = getPlugin();\n if (!plugin) {\n console.warn(\n `[tbw-grid:selection] SelectionPlugin not found.\\n\\n` +\n ` → Enable selection on the grid:\\n` +\n ` <TbwGrid selection=\"range\" />`,\n );\n return;\n }\n const grid = gridElement.value as DataGridElement<TRow> | null;\n // Cast to any to access protected config\n const mode = (plugin as any).config?.mode;\n\n if (mode === 'row') {\n const rowCount = grid?.rows?.length ?? 0;\n const allIndices = new Set<number>();\n for (let i = 0; i < rowCount; i++) allIndices.add(i);\n (plugin as any).selected = allIndices;\n (plugin as any).requestAfterRender?.();\n } else if (mode === 'range') {\n const rowCount = grid?.rows?.length ?? 0;\n const colCount = (grid as any)?._columns?.length ?? 0;\n if (rowCount > 0 && colCount > 0) {\n plugin.setRanges([{ from: { row: 0, col: 0 }, to: { row: rowCount - 1, col: colCount - 1 } }]);\n }\n }\n },\n\n clearSelection: () => {\n getPlugin()?.clearSelection();\n },\n\n getSelection: () => {\n return getPlugin()?.getSelection() ?? null;\n },\n\n isCellSelected: (row: number, col: number) => {\n return getPlugin()?.isCellSelected(row, col) ?? false;\n },\n\n setRanges: (ranges: CellRange[]) => {\n getPlugin()?.setRanges(ranges);\n },\n\n getSelectedRows: (): TRow[] => {\n return getPlugin()?.getSelectedRows<TRow>() ?? [];\n },\n };\n}\n"],"names":["useGridSelection","gridElement","inject","GRID_ELEMENT_KEY","ref","getPlugin","plugin","grid","mode","rowCount","allIndices","i","colCount","row","col","ranges"],"mappings":";;;AA2GO,SAASA,IAA2D;AACzE,QAAMC,IAAcC,EAAOC,GAAkBC,EAAI,IAAI,CAAC,GAEhDC,IAAY,MACHJ,EAAY,OACZ,gBAAgB,WAAW;AAG1C,SAAO;AAAA,IACL,WAAW,MAAM;AACf,YAAMK,IAASD,EAAA;AACf,UAAI,CAACC,GAAQ;AACX,gBAAQ;AAAA,UACN;AAAA;AAAA;AAAA;AAAA,QAAA;AAIF;AAAA,MACF;AACA,YAAMC,IAAON,EAAY,OAEnBO,IAAQF,EAAe,QAAQ;AAErC,UAAIE,MAAS,OAAO;AAClB,cAAMC,IAAWF,GAAM,MAAM,UAAU,GACjCG,wBAAiB,IAAA;AACvB,iBAASC,IAAI,GAAGA,IAAIF,GAAUE,IAAK,CAAAD,EAAW,IAAIC,CAAC;AAClD,QAAAL,EAAe,WAAWI,GAC1BJ,EAAe,qBAAA;AAAA,MAClB,WAAWE,MAAS,SAAS;AAC3B,cAAMC,IAAWF,GAAM,MAAM,UAAU,GACjCK,IAAYL,GAAc,UAAU,UAAU;AACpD,QAAIE,IAAW,KAAKG,IAAW,KAC7BN,EAAO,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,GAAG,KAAK,EAAA,GAAK,IAAI,EAAE,KAAKG,IAAW,GAAG,KAAKG,IAAW,EAAA,EAAE,CAAG,CAAC;AAAA,MAEjG;AAAA,IACF;AAAA,IAEA,gBAAgB,MAAM;AACpB,MAAAP,EAAA,GAAa,eAAA;AAAA,IACf;AAAA,IAEA,cAAc,MACLA,EAAA,GAAa,aAAA,KAAkB;AAAA,IAGxC,gBAAgB,CAACQ,GAAaC,MACrBT,EAAA,GAAa,eAAeQ,GAAKC,CAAG,KAAK;AAAA,IAGlD,WAAW,CAACC,MAAwB;AAClC,MAAAV,EAAA,GAAa,UAAUU,CAAM;AAAA,IAC/B;AAAA,IAEA,iBAAiB,MACRV,EAAA,GAAa,gBAAA,KAA2B,CAAA;AAAA,EACjD;AAEJ;"}
@@ -1,22 +1 @@
1
- /**
2
- * Server-side feature for @toolbox-web/grid-vue
3
- *
4
- * Import this module to enable the `serverSide` prop on TbwGrid.
5
- *
6
- * @example
7
- * ```vue
8
- * <script setup>
9
- * import '@toolbox-web/grid-vue/features/server-side';
10
- * </script>
11
- *
12
- * <template>
13
- * <TbwGrid :serverSide="{
14
- * dataSource: async (params) => fetchData(params),
15
- * }" />
16
- * </template>
17
- * ```
18
- *
19
- * @packageDocumentation
20
- */
21
- export {};
22
1
  //# sourceMappingURL=server-side.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-side.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/server-side.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG"}
1
+ {"version":3,"file":"server-side.d.ts","sourceRoot":"","sources":["../../../../libs/grid-vue/src/features/server-side.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,wCAAwC,CAAC"}
@@ -1,4 +1,2 @@
1
- import { ServerSidePlugin as e } from "@toolbox-web/grid/plugins/server-side";
2
- import { r as i } from "../chunks/feature-registry-BgEOysSJ.js";
3
- i("serverSide", (r) => new e(r ?? void 0));
1
+ import "@toolbox-web/grid/features/server-side";
4
2
  //# sourceMappingURL=server-side.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server-side.js","sources":["../../../../libs/grid-vue/src/features/server-side.ts"],"sourcesContent":["/**\n * Server-side feature for @toolbox-web/grid-vue\n *\n * Import this module to enable the `serverSide` prop on TbwGrid.\n *\n * @example\n * ```vue\n * <script setup>\n * import '@toolbox-web/grid-vue/features/server-side';\n * </script>\n *\n * <template>\n * <TbwGrid :serverSide=\"{\n * dataSource: async (params) => fetchData(params),\n * }\" />\n * </template>\n * ```\n *\n * @packageDocumentation\n */\n\nimport { ServerSidePlugin } from '@toolbox-web/grid/plugins/server-side';\nimport { registerFeature } from '../lib/feature-registry';\n\nregisterFeature('serverSide', (config) => {\n return new ServerSidePlugin(config ?? undefined);\n});\n"],"names":["registerFeature","config","ServerSidePlugin"],"mappings":";;AAwBAA,EAAgB,cAAc,CAACC,MACtB,IAAIC,EAAiBD,KAAU,MAAS,CAChD;"}
1
+ {"version":3,"file":"server-side.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}