@toolbox-web/grid 0.5.0 → 1.0.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 (182) hide show
  1. package/README.md +80 -27
  2. package/all.js +725 -1731
  3. package/all.js.map +1 -1
  4. package/index.js +1431 -2379
  5. package/index.js.map +1 -1
  6. package/lib/core/constants.d.ts +8 -0
  7. package/lib/core/constants.d.ts.map +1 -1
  8. package/lib/core/grid.d.ts +721 -55
  9. package/lib/core/grid.d.ts.map +1 -1
  10. package/lib/core/internal/config-manager.d.ts +3 -7
  11. package/lib/core/internal/config-manager.d.ts.map +1 -1
  12. package/lib/core/internal/dom-builder.d.ts +2 -10
  13. package/lib/core/internal/dom-builder.d.ts.map +1 -1
  14. package/lib/core/internal/event-delegation.d.ts +21 -0
  15. package/lib/core/internal/event-delegation.d.ts.map +1 -1
  16. package/lib/core/internal/inference.d.ts.map +1 -1
  17. package/lib/core/internal/keyboard.d.ts.map +1 -1
  18. package/lib/core/internal/render-scheduler.d.ts +2 -0
  19. package/lib/core/internal/render-scheduler.d.ts.map +1 -1
  20. package/lib/core/internal/rows.d.ts +10 -2
  21. package/lib/core/internal/rows.d.ts.map +1 -1
  22. package/lib/core/internal/shell.d.ts +41 -41
  23. package/lib/core/internal/shell.d.ts.map +1 -1
  24. package/lib/core/internal/validate-config.d.ts.map +1 -1
  25. package/lib/core/plugin/base-plugin.d.ts +2 -15
  26. package/lib/core/plugin/base-plugin.d.ts.map +1 -1
  27. package/lib/core/plugin/types.d.ts +33 -6
  28. package/lib/core/plugin/types.d.ts.map +1 -1
  29. package/lib/core/types.d.ts +411 -68
  30. package/lib/core/types.d.ts.map +1 -1
  31. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +89 -2
  32. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  33. package/lib/plugins/clipboard/index.d.ts +2 -0
  34. package/lib/plugins/clipboard/index.d.ts.map +1 -1
  35. package/lib/plugins/clipboard/index.js +24 -35
  36. package/lib/plugins/clipboard/index.js.map +1 -1
  37. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +57 -2
  38. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
  39. package/lib/plugins/column-virtualization/index.d.ts +2 -0
  40. package/lib/plugins/column-virtualization/index.d.ts.map +1 -1
  41. package/lib/plugins/column-virtualization/index.js +7 -17
  42. package/lib/plugins/column-virtualization/index.js.map +1 -1
  43. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +75 -5
  44. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  45. package/lib/plugins/context-menu/index.d.ts +3 -1
  46. package/lib/plugins/context-menu/index.d.ts.map +1 -1
  47. package/lib/plugins/context-menu/index.js +15 -27
  48. package/lib/plugins/context-menu/index.js.map +1 -1
  49. package/lib/plugins/editing/EditingPlugin.d.ts +101 -9
  50. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  51. package/lib/plugins/editing/editors.d.ts +9 -1
  52. package/lib/plugins/editing/editors.d.ts.map +1 -1
  53. package/lib/plugins/editing/index.d.ts +4 -2
  54. package/lib/plugins/editing/index.d.ts.map +1 -1
  55. package/lib/plugins/editing/index.js +412 -279
  56. package/lib/plugins/editing/index.js.map +1 -1
  57. package/lib/plugins/editing/types.d.ts +88 -0
  58. package/lib/plugins/editing/types.d.ts.map +1 -1
  59. package/lib/plugins/export/ExportPlugin.d.ts +73 -7
  60. package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
  61. package/lib/plugins/export/index.d.ts +2 -0
  62. package/lib/plugins/export/index.d.ts.map +1 -1
  63. package/lib/plugins/export/index.js +4 -19
  64. package/lib/plugins/export/index.js.map +1 -1
  65. package/lib/plugins/filtering/FilteringPlugin.d.ts +98 -2
  66. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  67. package/lib/plugins/filtering/index.d.ts +2 -0
  68. package/lib/plugins/filtering/index.d.ts.map +1 -1
  69. package/lib/plugins/filtering/index.js +50 -58
  70. package/lib/plugins/filtering/index.js.map +1 -1
  71. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +80 -6
  72. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
  73. package/lib/plugins/grouping-columns/index.d.ts +2 -0
  74. package/lib/plugins/grouping-columns/index.d.ts.map +1 -1
  75. package/lib/plugins/grouping-columns/index.js +10 -21
  76. package/lib/plugins/grouping-columns/index.js.map +1 -1
  77. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +81 -5
  78. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
  79. package/lib/plugins/grouping-rows/index.d.ts +3 -1
  80. package/lib/plugins/grouping-rows/index.d.ts.map +1 -1
  81. package/lib/plugins/grouping-rows/index.js +13 -21
  82. package/lib/plugins/grouping-rows/index.js.map +1 -1
  83. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +90 -5
  84. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
  85. package/lib/plugins/master-detail/index.d.ts +2 -0
  86. package/lib/plugins/master-detail/index.d.ts.map +1 -1
  87. package/lib/plugins/master-detail/index.js +11 -17
  88. package/lib/plugins/master-detail/index.js.map +1 -1
  89. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +83 -2
  90. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -1
  91. package/lib/plugins/multi-sort/index.d.ts +2 -0
  92. package/lib/plugins/multi-sort/index.d.ts.map +1 -1
  93. package/lib/plugins/multi-sort/index.js +11 -19
  94. package/lib/plugins/multi-sort/index.js.map +1 -1
  95. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +61 -2
  96. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
  97. package/lib/plugins/pinned-columns/index.d.ts +3 -1
  98. package/lib/plugins/pinned-columns/index.d.ts.map +1 -1
  99. package/lib/plugins/pinned-columns/index.js +7 -17
  100. package/lib/plugins/pinned-columns/index.js.map +1 -1
  101. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +71 -10
  102. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
  103. package/lib/plugins/pinned-rows/index.d.ts +3 -1
  104. package/lib/plugins/pinned-rows/index.d.ts.map +1 -1
  105. package/lib/plugins/pinned-rows/index.js +5 -17
  106. package/lib/plugins/pinned-rows/index.js.map +1 -1
  107. package/lib/plugins/pivot/PivotPlugin.d.ts +81 -4
  108. package/lib/plugins/pivot/PivotPlugin.d.ts.map +1 -1
  109. package/lib/plugins/pivot/index.d.ts +2 -0
  110. package/lib/plugins/pivot/index.d.ts.map +1 -1
  111. package/lib/plugins/pivot/index.js +10 -17
  112. package/lib/plugins/pivot/index.js.map +1 -1
  113. package/lib/plugins/reorder/ReorderPlugin.d.ts +71 -3
  114. package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -1
  115. package/lib/plugins/reorder/index.d.ts +2 -0
  116. package/lib/plugins/reorder/index.d.ts.map +1 -1
  117. package/lib/plugins/reorder/index.js +8 -18
  118. package/lib/plugins/reorder/index.js.map +1 -1
  119. package/lib/plugins/reorder/types.d.ts +0 -5
  120. package/lib/plugins/reorder/types.d.ts.map +1 -1
  121. package/lib/plugins/selection/SelectionPlugin.d.ts +84 -20
  122. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  123. package/lib/plugins/selection/index.d.ts +2 -1
  124. package/lib/plugins/selection/index.d.ts.map +1 -1
  125. package/lib/plugins/selection/index.js +70 -131
  126. package/lib/plugins/selection/index.js.map +1 -1
  127. package/lib/plugins/selection/types.d.ts +25 -4
  128. package/lib/plugins/selection/types.d.ts.map +1 -1
  129. package/lib/plugins/server-side/ServerSidePlugin.d.ts +65 -4
  130. package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +1 -1
  131. package/lib/plugins/server-side/index.d.ts +3 -1
  132. package/lib/plugins/server-side/index.d.ts.map +1 -1
  133. package/lib/plugins/server-side/index.js +5 -17
  134. package/lib/plugins/server-side/index.js.map +1 -1
  135. package/lib/plugins/tree/TreePlugin.d.ts +89 -2
  136. package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
  137. package/lib/plugins/tree/index.d.ts +3 -2
  138. package/lib/plugins/tree/index.d.ts.map +1 -1
  139. package/lib/plugins/tree/index.js +59 -94
  140. package/lib/plugins/tree/index.js.map +1 -1
  141. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +66 -3
  142. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -1
  143. package/lib/plugins/undo-redo/index.d.ts +3 -1
  144. package/lib/plugins/undo-redo/index.d.ts.map +1 -1
  145. package/lib/plugins/undo-redo/index.js +5 -17
  146. package/lib/plugins/undo-redo/index.js.map +1 -1
  147. package/lib/plugins/visibility/VisibilityPlugin.d.ts +86 -2
  148. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -1
  149. package/lib/plugins/visibility/index.d.ts +2 -0
  150. package/lib/plugins/visibility/index.d.ts.map +1 -1
  151. package/lib/plugins/visibility/index.js +6 -17
  152. package/lib/plugins/visibility/index.js.map +1 -1
  153. package/package.json +6 -6
  154. package/public.d.ts +72 -2
  155. package/public.d.ts.map +1 -1
  156. package/umd/grid.all.umd.js +16 -16
  157. package/umd/grid.all.umd.js.map +1 -1
  158. package/umd/grid.umd.js +9 -9
  159. package/umd/grid.umd.js.map +1 -1
  160. package/umd/plugins/clipboard.umd.js.map +1 -1
  161. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  162. package/umd/plugins/context-menu.umd.js.map +1 -1
  163. package/umd/plugins/editing.umd.js +1 -1
  164. package/umd/plugins/editing.umd.js.map +1 -1
  165. package/umd/plugins/export.umd.js.map +1 -1
  166. package/umd/plugins/filtering.umd.js.map +1 -1
  167. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  168. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  169. package/umd/plugins/master-detail.umd.js.map +1 -1
  170. package/umd/plugins/multi-sort.umd.js.map +1 -1
  171. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  172. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  173. package/umd/plugins/pivot.umd.js.map +1 -1
  174. package/umd/plugins/reorder.umd.js +1 -1
  175. package/umd/plugins/reorder.umd.js.map +1 -1
  176. package/umd/plugins/selection.umd.js +1 -1
  177. package/umd/plugins/selection.umd.js.map +1 -1
  178. package/umd/plugins/server-side.umd.js.map +1 -1
  179. package/umd/plugins/tree.umd.js +1 -1
  180. package/umd/plugins/tree.umd.js.map +1 -1
  181. package/umd/plugins/undo-redo.umd.js.map +1 -1
  182. package/umd/plugins/visibility.umd.js.map +1 -1
@@ -4,19 +4,98 @@ import { MultiSortConfig, SortModel } from './types';
4
4
  /**
5
5
  * Multi-Sort Plugin for tbw-grid
6
6
  *
7
- * @example
7
+ * Enables sorting by multiple columns at once—hold Shift and click additional column
8
+ * headers to build up a sort stack. Priority badges show the sort order, so users
9
+ * always know which column takes precedence.
10
+ *
11
+ * ## Installation
12
+ *
13
+ * ```ts
14
+ * import { MultiSortPlugin } from '@toolbox-web/grid/plugins/multi-sort';
15
+ * ```
16
+ *
17
+ * ## Configuration Options
18
+ *
19
+ * | Option | Type | Default | Description |
20
+ * |--------|------|---------|-------------|
21
+ * | `maxSortColumns` | `number` | `3` | Maximum columns to sort by |
22
+ * | `showSortIndex` | `boolean` | `true` | Show sort priority badges |
23
+ * | `initialSort` | `SortModel[]` | - | Pre-configured sort order on load |
24
+ *
25
+ * ## Keyboard Shortcuts
26
+ *
27
+ * | Shortcut | Action |
28
+ * |----------|--------|
29
+ * | `Click header` | Sort by column (clears other sorts) |
30
+ * | `Shift + Click` | Add column to multi-sort stack |
31
+ * | `Ctrl + Click` | Toggle sort direction |
32
+ *
33
+ * ## Events
34
+ *
35
+ * | Event | Detail | Description |
36
+ * |-------|--------|-------------|
37
+ * | `sort-change` | `{ sortModel: SortModel[] }` | Fired when sort changes |
38
+ *
39
+ * ## Programmatic API
40
+ *
41
+ * | Method | Signature | Description |
42
+ * |--------|-----------|-------------|
43
+ * | `setSort` | `(sortModel: SortModel[]) => void` | Set sort programmatically |
44
+ * | `getSortModel` | `() => SortModel[]` | Get current sort model |
45
+ * | `clearSort` | `() => void` | Clear all sorting |
46
+ * | `addSort` | `(field, direction) => void` | Add a column to sort |
47
+ * | `removeSort` | `(field) => void` | Remove a column from sort |
48
+ *
49
+ * @example Basic Multi-Column Sorting
50
+ * ```ts
51
+ * import '@toolbox-web/grid';
52
+ * import { MultiSortPlugin } from '@toolbox-web/grid/plugins/multi-sort';
53
+ *
54
+ * const grid = document.querySelector('tbw-grid');
55
+ * grid.gridConfig = {
56
+ * columns: [
57
+ * { field: 'name', header: 'Name', sortable: true },
58
+ * { field: 'department', header: 'Department', sortable: true },
59
+ * { field: 'salary', header: 'Salary', type: 'number', sortable: true },
60
+ * ],
61
+ * plugins: [new MultiSortPlugin({ maxSortColumns: 3, showSortIndex: true })],
62
+ * };
63
+ *
64
+ * grid.addEventListener('sort-change', (e) => {
65
+ * console.log('Active sorts:', e.detail.sortModel);
66
+ * });
67
+ * ```
68
+ *
69
+ * @example Initial Sort Configuration
8
70
  * ```ts
9
- * new MultiSortPlugin({ maxSortColumns: 3, showSortIndex: true })
71
+ * new MultiSortPlugin({
72
+ * initialSort: [
73
+ * { field: 'department', direction: 'asc' },
74
+ * { field: 'salary', direction: 'desc' },
75
+ * ],
76
+ * })
10
77
  * ```
78
+ *
79
+ * @see {@link MultiSortConfig} for all configuration options
80
+ * @see {@link SortModel} for the sort model structure
81
+ *
82
+ * @internal Extends BaseGridPlugin
11
83
  */
12
84
  export declare class MultiSortPlugin extends BaseGridPlugin<MultiSortConfig> {
85
+ /** @internal */
13
86
  readonly name = "multiSort";
87
+ /** @internal */
14
88
  readonly styles: string;
89
+ /** @internal */
15
90
  protected get defaultConfig(): Partial<MultiSortConfig>;
16
91
  private sortModel;
92
+ /** @internal */
17
93
  detach(): void;
94
+ /** @internal */
18
95
  processRows(rows: readonly unknown[]): unknown[];
96
+ /** @internal */
19
97
  onHeaderClick(event: HeaderClickEvent): boolean;
98
+ /** @internal */
20
99
  afterRender(): void;
21
100
  /**
22
101
  * Get the current sort model.
@@ -46,11 +125,13 @@ export declare class MultiSortPlugin extends BaseGridPlugin<MultiSortConfig> {
46
125
  getSortDirection(field: string): 'asc' | 'desc' | undefined;
47
126
  /**
48
127
  * Return sort state for a column if it's in the sort model.
128
+ * @internal
49
129
  */
50
130
  getColumnState(field: string): Partial<ColumnState> | undefined;
51
131
  /**
52
132
  * Apply sort state from column state.
53
133
  * Rebuilds the sort model from all column states.
134
+ * @internal
54
135
  */
55
136
  applyColumnState(field: string, state: ColumnState): void;
56
137
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSortPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/multi-sort/MultiSortPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;;GAOG;AACH,qBAAa,eAAgB,SAAQ,cAAc,CAAC,eAAe,CAAC;IAClE,QAAQ,CAAC,IAAI,eAAe;IAC5B,SAAkB,MAAM,SAAU;IAElC,cAAuB,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC,CAK/D;IAGD,OAAO,CAAC,SAAS,CAAmB;IAK3B,MAAM,IAAI,IAAI;IAOd,WAAW,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE;IAOhD,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO;IAe/C,WAAW,IAAI,IAAI;IAiE5B;;;OAGG;IACH,YAAY,IAAI,SAAS,EAAE;IAI3B;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI;IAMtC;;OAEG;IACH,SAAS,IAAI,IAAI;IAMjB;;;;OAIG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI/C;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS;IAO3D;;OAEG;IACM,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS;IAaxE;;;OAGG;IACM,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI;CA2BnE"}
1
+ {"version":3,"file":"MultiSortPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/multi-sort/MultiSortPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH,qBAAa,eAAgB,SAAQ,cAAc,CAAC,eAAe,CAAC;IAClE,gBAAgB;IAChB,QAAQ,CAAC,IAAI,eAAe;IAC5B,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,eAAe,CAAC,CAK/D;IAGD,OAAO,CAAC,SAAS,CAAmB;IAKpC,gBAAgB;IACP,MAAM,IAAI,IAAI;IAOvB,gBAAgB;IACP,WAAW,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE;IAOzD,gBAAgB;IACP,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO;IAexD,gBAAgB;IACP,WAAW,IAAI,IAAI;IAiE5B;;;OAGG;IACH,YAAY,IAAI,SAAS,EAAE;IAI3B;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,IAAI;IAMtC;;OAEG;IACH,SAAS,IAAI,IAAI;IAMjB;;;;OAIG;IACH,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI/C;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS;IAO3D;;;OAGG;IACM,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,SAAS;IAaxE;;;;OAIG;IACM,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI;CA2BnE"}
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Multi Sort Plugin Entry Point
3
3
  * Re-exports plugin class and types for tree-shakeable imports.
4
+ *
5
+ * @module Plugins/Multi-Sort
4
6
  */
5
7
  export { MultiSortPlugin } from './MultiSortPlugin';
6
8
  export type { MultiSortConfig, SortModel } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/multi-sort/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/multi-sort/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -184,23 +184,6 @@ class x {
184
184
  get gridElement() {
185
185
  return this.grid;
186
186
  }
187
- /**
188
- * Get the render root of the grid for DOM queries.
189
- * @deprecated Use `gridElement` instead. This getter exists only for backward compatibility.
190
- *
191
- * With Shadow DOM removed, the grid element itself is the render root.
192
- * All new code should use `this.gridElement` for DOM queries.
193
- *
194
- * @example
195
- * // OLD (deprecated)
196
- * const rows = this.shadowRoot?.querySelector('.rows');
197
- *
198
- * // NEW (preferred)
199
- * const rows = this.gridElement.querySelector('.rows');
200
- */
201
- get shadowRoot() {
202
- return this.gridElement;
203
- }
204
187
  /**
205
188
  * Get the disconnect signal for event listener cleanup.
206
189
  * This signal is aborted when the grid disconnects from the DOM.
@@ -328,9 +311,12 @@ function m(r, t) {
328
311
  return r.find((e) => e.field === t)?.direction;
329
312
  }
330
313
  const M = '@layer tbw-plugins{.header-cell[data-sort=asc]:after{content:"↑";margin-left:4px;opacity:.8}.header-cell[data-sort=desc]:after{content:"↓";margin-left:4px;opacity:.8}.sort-indicator{margin-left:4px;opacity:.8}.sort-index{font-size:10px;background:var(--tbw-multi-sort-badge-bg, var(--tbw-color-panel-bg));color:var(--tbw-multi-sort-badge-color, var(--tbw-color-fg));border-radius:50%;width:14px;height:14px;display:inline-flex;align-items:center;justify-content:center;margin-left:2px;font-weight:600}}';
331
- class w extends x {
314
+ class I extends x {
315
+ /** @internal */
332
316
  name = "multiSort";
317
+ /** @internal */
333
318
  styles = M;
319
+ /** @internal */
334
320
  get defaultConfig() {
335
321
  return {
336
322
  maxSortColumns: 3,
@@ -341,19 +327,23 @@ class w extends x {
341
327
  sortModel = [];
342
328
  // #endregion
343
329
  // #region Lifecycle
330
+ /** @internal */
344
331
  detach() {
345
332
  this.sortModel = [];
346
333
  }
347
334
  // #endregion
348
335
  // #region Hooks
336
+ /** @internal */
349
337
  processRows(t) {
350
338
  return this.sortModel.length === 0 ? [...t] : S([...t], this.sortModel, [...this.columns]);
351
339
  }
340
+ /** @internal */
352
341
  onHeaderClick(t) {
353
342
  if (!this.columns.find((n) => n.field === t.field)?.sortable) return !1;
354
343
  const o = t.originalEvent.shiftKey, i = this.config.maxSortColumns ?? 3;
355
344
  return this.sortModel = C(this.sortModel, t.field, o, i), this.emit("sort-change", { sortModel: [...this.sortModel] }), this.requestRender(), !0;
356
345
  }
346
+ /** @internal */
357
347
  afterRender() {
358
348
  const t = this.gridElement;
359
349
  if (!t) return;
@@ -417,6 +407,7 @@ class w extends x {
417
407
  // #region Column State Hooks
418
408
  /**
419
409
  * Return sort state for a column if it's in the sort model.
410
+ * @internal
420
411
  */
421
412
  getColumnState(t) {
422
413
  const e = this.sortModel.findIndex((i) => i.field === t);
@@ -430,6 +421,7 @@ class w extends x {
430
421
  /**
431
422
  * Apply sort state from column state.
432
423
  * Rebuilds the sort model from all column states.
424
+ * @internal
433
425
  */
434
426
  applyColumnState(t, e) {
435
427
  if (!e.sort) {
@@ -445,6 +437,6 @@ class w extends x {
445
437
  // #endregion
446
438
  }
447
439
  export {
448
- w as MultiSortPlugin
440
+ I as MultiSortPlugin
449
441
  };
450
442
  //# sourceMappingURL=index.js.map