@toolbox-web/grid 0.6.0 → 1.1.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 (197) hide show
  1. package/README.md +79 -26
  2. package/all.d.ts +1 -0
  3. package/all.d.ts.map +1 -1
  4. package/all.js +1899 -2696
  5. package/all.js.map +1 -1
  6. package/index.js +1498 -2489
  7. package/index.js.map +1 -1
  8. package/lib/core/constants.d.ts +8 -0
  9. package/lib/core/constants.d.ts.map +1 -1
  10. package/lib/core/grid.d.ts +704 -55
  11. package/lib/core/grid.d.ts.map +1 -1
  12. package/lib/core/internal/config-manager.d.ts +3 -7
  13. package/lib/core/internal/config-manager.d.ts.map +1 -1
  14. package/lib/core/internal/dom-builder.d.ts +2 -10
  15. package/lib/core/internal/dom-builder.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 +9 -1
  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 +10 -0
  25. package/lib/core/internal/validate-config.d.ts.map +1 -1
  26. package/lib/core/plugin/base-plugin.d.ts +103 -15
  27. package/lib/core/plugin/base-plugin.d.ts.map +1 -1
  28. package/lib/core/plugin/index.d.ts +1 -1
  29. package/lib/core/plugin/index.d.ts.map +1 -1
  30. package/lib/core/plugin/types.d.ts +33 -6
  31. package/lib/core/plugin/types.d.ts.map +1 -1
  32. package/lib/core/types.d.ts +376 -68
  33. package/lib/core/types.d.ts.map +1 -1
  34. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +89 -2
  35. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  36. package/lib/plugins/clipboard/index.d.ts +2 -0
  37. package/lib/plugins/clipboard/index.d.ts.map +1 -1
  38. package/lib/plugins/clipboard/index.js +46 -35
  39. package/lib/plugins/clipboard/index.js.map +1 -1
  40. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +57 -2
  41. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
  42. package/lib/plugins/column-virtualization/index.d.ts +2 -0
  43. package/lib/plugins/column-virtualization/index.d.ts.map +1 -1
  44. package/lib/plugins/column-virtualization/index.js +55 -43
  45. package/lib/plugins/column-virtualization/index.js.map +1 -1
  46. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +75 -5
  47. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  48. package/lib/plugins/context-menu/index.d.ts +3 -1
  49. package/lib/plugins/context-menu/index.d.ts.map +1 -1
  50. package/lib/plugins/context-menu/index.js +76 -66
  51. package/lib/plugins/context-menu/index.js.map +1 -1
  52. package/lib/plugins/editing/EditingPlugin.d.ts +107 -10
  53. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  54. package/lib/plugins/editing/editors.d.ts +9 -1
  55. package/lib/plugins/editing/editors.d.ts.map +1 -1
  56. package/lib/plugins/editing/index.d.ts +4 -2
  57. package/lib/plugins/editing/index.d.ts.map +1 -1
  58. package/lib/plugins/editing/index.js +458 -279
  59. package/lib/plugins/editing/index.js.map +1 -1
  60. package/lib/plugins/editing/types.d.ts +88 -0
  61. package/lib/plugins/editing/types.d.ts.map +1 -1
  62. package/lib/plugins/export/ExportPlugin.d.ts +73 -7
  63. package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
  64. package/lib/plugins/export/index.d.ts +2 -0
  65. package/lib/plugins/export/index.d.ts.map +1 -1
  66. package/lib/plugins/export/index.js +40 -33
  67. package/lib/plugins/export/index.js.map +1 -1
  68. package/lib/plugins/filtering/FilteringPlugin.d.ts +98 -2
  69. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  70. package/lib/plugins/filtering/index.d.ts +2 -0
  71. package/lib/plugins/filtering/index.d.ts.map +1 -1
  72. package/lib/plugins/filtering/index.js +31 -17
  73. package/lib/plugins/filtering/index.js.map +1 -1
  74. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +86 -7
  75. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
  76. package/lib/plugins/grouping-columns/index.d.ts +2 -0
  77. package/lib/plugins/grouping-columns/index.d.ts.map +1 -1
  78. package/lib/plugins/grouping-columns/index.js +57 -27
  79. package/lib/plugins/grouping-columns/index.js.map +1 -1
  80. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +81 -5
  81. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
  82. package/lib/plugins/grouping-rows/index.d.ts +3 -1
  83. package/lib/plugins/grouping-rows/index.d.ts.map +1 -1
  84. package/lib/plugins/grouping-rows/index.js +35 -21
  85. package/lib/plugins/grouping-rows/index.js.map +1 -1
  86. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +90 -5
  87. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
  88. package/lib/plugins/master-detail/index.d.ts +2 -0
  89. package/lib/plugins/master-detail/index.d.ts.map +1 -1
  90. package/lib/plugins/master-detail/index.js +33 -17
  91. package/lib/plugins/master-detail/index.js.map +1 -1
  92. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +83 -2
  93. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -1
  94. package/lib/plugins/multi-sort/index.d.ts +2 -0
  95. package/lib/plugins/multi-sort/index.d.ts.map +1 -1
  96. package/lib/plugins/multi-sort/index.js +33 -19
  97. package/lib/plugins/multi-sort/index.js.map +1 -1
  98. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +67 -3
  99. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
  100. package/lib/plugins/pinned-columns/index.d.ts +3 -1
  101. package/lib/plugins/pinned-columns/index.d.ts.map +1 -1
  102. package/lib/plugins/pinned-columns/index.js +43 -17
  103. package/lib/plugins/pinned-columns/index.js.map +1 -1
  104. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +71 -10
  105. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
  106. package/lib/plugins/pinned-rows/index.d.ts +3 -1
  107. package/lib/plugins/pinned-rows/index.d.ts.map +1 -1
  108. package/lib/plugins/pinned-rows/index.js +27 -17
  109. package/lib/plugins/pinned-rows/index.js.map +1 -1
  110. package/lib/plugins/pivot/PivotPlugin.d.ts +81 -4
  111. package/lib/plugins/pivot/PivotPlugin.d.ts.map +1 -1
  112. package/lib/plugins/pivot/index.d.ts +2 -0
  113. package/lib/plugins/pivot/index.d.ts.map +1 -1
  114. package/lib/plugins/pivot/index.js +32 -17
  115. package/lib/plugins/pivot/index.js.map +1 -1
  116. package/lib/plugins/reorder/ReorderPlugin.d.ts +71 -3
  117. package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -1
  118. package/lib/plugins/reorder/index.d.ts +2 -0
  119. package/lib/plugins/reorder/index.d.ts.map +1 -1
  120. package/lib/plugins/reorder/index.js +30 -18
  121. package/lib/plugins/reorder/index.js.map +1 -1
  122. package/lib/plugins/reorder/types.d.ts +0 -5
  123. package/lib/plugins/reorder/types.d.ts.map +1 -1
  124. package/lib/plugins/responsive/ResponsivePlugin.d.ts +123 -0
  125. package/lib/plugins/responsive/ResponsivePlugin.d.ts.map +1 -0
  126. package/lib/plugins/responsive/index.d.ts +11 -0
  127. package/lib/plugins/responsive/index.d.ts.map +1 -0
  128. package/lib/plugins/responsive/index.js +589 -0
  129. package/lib/plugins/responsive/index.js.map +1 -0
  130. package/lib/plugins/responsive/types.d.ts +133 -0
  131. package/lib/plugins/responsive/types.d.ts.map +1 -0
  132. package/lib/plugins/selection/SelectionPlugin.d.ts +90 -21
  133. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  134. package/lib/plugins/selection/index.d.ts +3 -2
  135. package/lib/plugins/selection/index.d.ts.map +1 -1
  136. package/lib/plugins/selection/index.js +125 -144
  137. package/lib/plugins/selection/index.js.map +1 -1
  138. package/lib/plugins/selection/types.d.ts +51 -4
  139. package/lib/plugins/selection/types.d.ts.map +1 -1
  140. package/lib/plugins/server-side/ServerSidePlugin.d.ts +65 -4
  141. package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +1 -1
  142. package/lib/plugins/server-side/index.d.ts +3 -1
  143. package/lib/plugins/server-side/index.d.ts.map +1 -1
  144. package/lib/plugins/server-side/index.js +27 -17
  145. package/lib/plugins/server-side/index.js.map +1 -1
  146. package/lib/plugins/tree/TreePlugin.d.ts +89 -2
  147. package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
  148. package/lib/plugins/tree/index.d.ts +3 -2
  149. package/lib/plugins/tree/index.d.ts.map +1 -1
  150. package/lib/plugins/tree/index.js +81 -94
  151. package/lib/plugins/tree/index.js.map +1 -1
  152. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +66 -3
  153. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -1
  154. package/lib/plugins/undo-redo/index.d.ts +3 -1
  155. package/lib/plugins/undo-redo/index.d.ts.map +1 -1
  156. package/lib/plugins/undo-redo/index.js +32 -22
  157. package/lib/plugins/undo-redo/index.js.map +1 -1
  158. package/lib/plugins/visibility/VisibilityPlugin.d.ts +86 -2
  159. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -1
  160. package/lib/plugins/visibility/index.d.ts +2 -0
  161. package/lib/plugins/visibility/index.d.ts.map +1 -1
  162. package/lib/plugins/visibility/index.js +28 -17
  163. package/lib/plugins/visibility/index.js.map +1 -1
  164. package/package.json +1 -1
  165. package/public.d.ts +30 -2
  166. package/public.d.ts.map +1 -1
  167. package/umd/grid.all.umd.js +31 -25
  168. package/umd/grid.all.umd.js.map +1 -1
  169. package/umd/grid.umd.js +21 -17
  170. package/umd/grid.umd.js.map +1 -1
  171. package/umd/plugins/clipboard.umd.js.map +1 -1
  172. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  173. package/umd/plugins/context-menu.umd.js.map +1 -1
  174. package/umd/plugins/editing.umd.js +1 -1
  175. package/umd/plugins/editing.umd.js.map +1 -1
  176. package/umd/plugins/export.umd.js.map +1 -1
  177. package/umd/plugins/filtering.umd.js.map +1 -1
  178. package/umd/plugins/grouping-columns.umd.js +1 -1
  179. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  180. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  181. package/umd/plugins/master-detail.umd.js.map +1 -1
  182. package/umd/plugins/multi-sort.umd.js.map +1 -1
  183. package/umd/plugins/pinned-columns.umd.js +1 -1
  184. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  185. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  186. package/umd/plugins/pivot.umd.js.map +1 -1
  187. package/umd/plugins/reorder.umd.js +1 -1
  188. package/umd/plugins/reorder.umd.js.map +1 -1
  189. package/umd/plugins/responsive.umd.js +2 -0
  190. package/umd/plugins/responsive.umd.js.map +1 -0
  191. package/umd/plugins/selection.umd.js +3 -1
  192. package/umd/plugins/selection.umd.js.map +1 -1
  193. package/umd/plugins/server-side.umd.js.map +1 -1
  194. package/umd/plugins/tree.umd.js +1 -1
  195. package/umd/plugins/tree.umd.js.map +1 -1
  196. package/umd/plugins/undo-redo.umd.js.map +1 -1
  197. package/umd/plugins/visibility.umd.js.map +1 -1
@@ -1,16 +1,80 @@
1
1
  import { BaseGridPlugin } from '../../core/plugin/base-plugin';
2
2
  import { ReorderConfig } from './types';
3
3
  /**
4
- * Column Reordering Plugin for tbw-grid
4
+ * Column Reorder Plugin for tbw-grid
5
5
  *
6
- * @example
6
+ * Lets users rearrange columns by dragging and dropping column headers. Supports smooth
7
+ * FLIP animations, fade transitions, or instant reordering. Animation respects the
8
+ * grid-level `animation.mode` setting.
9
+ *
10
+ * ## Installation
11
+ *
12
+ * ```ts
13
+ * import { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';
14
+ * ```
15
+ *
16
+ * ## Configuration Options
17
+ *
18
+ * | Option | Type | Default | Description |
19
+ * |--------|------|---------|-------------|
20
+ * | `animation` | `false \| 'flip' \| 'fade'` | `'flip'` | Animation type for column moves |
21
+ * | `animationDuration` | `number` | `200` | Animation duration in ms |
22
+ *
23
+ * ## Keyboard Shortcuts
24
+ *
25
+ * | Key | Action |
26
+ * |-----|--------|
27
+ * | `Alt + ←` | Move focused column left |
28
+ * | `Alt + →` | Move focused column right |
29
+ *
30
+ * ## Events
31
+ *
32
+ * | Event | Detail | Cancelable | Description |
33
+ * |-------|--------|------------|-------------|
34
+ * | `column-move` | `{ field, fromIndex, toIndex, columnOrder }` | Yes | Fired when a column move is attempted |
35
+ *
36
+ * @example Basic Drag-and-Drop Reordering
7
37
  * ```ts
8
- * new ReorderPlugin()
38
+ * import '@toolbox-web/grid';
39
+ * import { ReorderPlugin } from '@toolbox-web/grid/plugins/reorder';
40
+ *
41
+ * const grid = document.querySelector('tbw-grid');
42
+ * grid.gridConfig = {
43
+ * columns: [
44
+ * { field: 'id', header: 'ID' },
45
+ * { field: 'name', header: 'Name' },
46
+ * { field: 'email', header: 'Email' },
47
+ * ],
48
+ * plugins: [new ReorderPlugin({ animation: 'flip', animationDuration: 200 })],
49
+ * };
50
+ *
51
+ * // Persist column order
52
+ * grid.addEventListener('column-move', (e) => {
53
+ * localStorage.setItem('columnOrder', JSON.stringify(e.detail.columnOrder));
54
+ * });
9
55
  * ```
56
+ *
57
+ * @example Prevent Moves That Break Group Boundaries
58
+ * ```ts
59
+ * grid.addEventListener('column-move', (e) => {
60
+ * if (!isValidMoveWithinGroup(e.detail.field, e.detail.fromIndex, e.detail.toIndex)) {
61
+ * e.preventDefault(); // Column snaps back to original position
62
+ * }
63
+ * });
64
+ * ```
65
+ *
66
+ * @see {@link ReorderConfig} for all configuration options
67
+ * @see {@link ColumnMoveDetail} for the event detail structure
68
+ * @see {@link GroupingColumnsPlugin} for column group integration
69
+ *
70
+ * @internal Extends BaseGridPlugin
10
71
  */
11
72
  export declare class ReorderPlugin extends BaseGridPlugin<ReorderConfig> {
73
+ /** @internal */
12
74
  readonly name = "reorder";
75
+ /** @internal */
13
76
  readonly styles: string;
77
+ /** @internal */
14
78
  protected get defaultConfig(): Partial<ReorderConfig>;
15
79
  /**
16
80
  * Resolve animation type from plugin config.
@@ -34,11 +98,15 @@ export declare class ReorderPlugin extends BaseGridPlugin<ReorderConfig> {
34
98
  * Clear all drag-related classes from header cells.
35
99
  */
36
100
  private clearDragClasses;
101
+ /** @internal */
37
102
  attach(grid: import('../../core/plugin/base-plugin').GridElement): void;
103
+ /** @internal */
38
104
  detach(): void;
105
+ /** @internal */
39
106
  afterRender(): void;
40
107
  /**
41
108
  * Handle Alt+Arrow keyboard shortcuts for column reordering.
109
+ * @internal
42
110
  */
43
111
  onKeyDown(event: KeyboardEvent): boolean | void;
44
112
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ReorderPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/reorder/ReorderPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAkB,MAAM,+BAA+B,CAAC;AAI/E,OAAO,KAAK,EAAoB,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;GAOG;AACH,qBAAa,aAAc,SAAQ,cAAc,CAAC,aAAa,CAAC;IAC9D,QAAQ,CAAC,IAAI,aAAa;IAC1B,SAAkB,MAAM,SAAU;IAElC,cAAuB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAI7D;IAED;;;OAGG;IACH,OAAO,KAAK,aAAa,GAYxB;IAED;;;OAGG;IACH,cAAuB,iBAAiB,IAAI,MAAM,CAMjD;IAGD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAExC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IASf,MAAM,CAAC,IAAI,EAAE,OAAO,+BAA+B,EAAE,WAAW,GAAG,IAAI;IAiBvE,MAAM,IAAI,IAAI;IAUd,WAAW,IAAI,IAAI;IAiG5B;;OAEG;IACM,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI;IAyCxD;;;OAGG;IACH,cAAc,IAAI,MAAM,EAAE;IAI1B;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAoBhD;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIrC;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAQxB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAmDnB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAgDnB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAqB1B"}
1
+ {"version":3,"file":"ReorderPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/reorder/ReorderPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,cAAc,EAAkB,MAAM,+BAA+B,CAAC;AAI/E,OAAO,KAAK,EAAoB,aAAa,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,qBAAa,aAAc,SAAQ,cAAc,CAAC,aAAa,CAAC;IAC9D,gBAAgB;IAChB,QAAQ,CAAC,IAAI,aAAa;IAC1B,gBAAgB;IAChB,SAAkB,MAAM,SAAU;IAElC,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,aAAa,CAAC,CAI7D;IAED;;;OAGG;IACH,OAAO,KAAK,aAAa,GAQxB;IAED;;;OAGG;IACH,cAAuB,iBAAiB,IAAI,MAAM,CAMjD;IAGD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAuB;IAExC;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IASxB,gBAAgB;IACP,MAAM,CAAC,IAAI,EAAE,OAAO,+BAA+B,EAAE,WAAW,GAAG,IAAI;IAiBhF,gBAAgB;IACP,MAAM,IAAI,IAAI;IAUvB,gBAAgB;IACP,WAAW,IAAI,IAAI;IAiG5B;;;OAGG;IACM,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI;IAyCxD;;;OAGG;IACH,cAAc,IAAI,MAAM,EAAE;IAI1B;;;;OAIG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAoBhD;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIrC;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAQxB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAmDnB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAgDnB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAqB1B"}
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Reorder Plugin Entry Point
3
3
  * Re-exports plugin class and types for tree-shakeable imports.
4
+ *
5
+ * @module Plugins/Reorder
4
6
  */
5
7
  export { ReorderPlugin } from './ReorderPlugin';
6
8
  export type { ColumnMoveDetail, ReorderAnimation, ReorderConfig } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/reorder/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/reorder/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
@@ -78,6 +78,28 @@ class A {
78
78
  * ```
79
79
  */
80
80
  static dependencies;
81
+ /**
82
+ * Plugin manifest - declares owned properties, config rules, and hook priorities.
83
+ *
84
+ * This is read by the configuration validator to:
85
+ * - Validate that required plugins are loaded when their properties are used
86
+ * - Execute configRules to detect invalid/conflicting settings
87
+ * - Order hook execution based on priority
88
+ *
89
+ * @example
90
+ * ```typescript
91
+ * static override readonly manifest: PluginManifest<MyConfig> = {
92
+ * ownedProperties: [
93
+ * { property: 'myProp', level: 'column', description: 'the "myProp" column property' },
94
+ * ],
95
+ * configRules: [
96
+ * { id: 'myPlugin/conflict', severity: 'warn', message: '...', check: (c) => c.a && c.b },
97
+ * ],
98
+ * };
99
+ * ```
100
+ */
101
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
102
+ static manifest;
81
103
  /**
82
104
  * Plugin version - defaults to grid version for built-in plugins.
83
105
  * Third-party plugins can override with their own semver.
@@ -237,23 +259,6 @@ class A {
237
259
  get gridElement() {
238
260
  return this.grid;
239
261
  }
240
- /**
241
- * Get the render root of the grid for DOM queries.
242
- * @deprecated Use `gridElement` instead. This getter exists only for backward compatibility.
243
- *
244
- * With Shadow DOM removed, the grid element itself is the render root.
245
- * All new code should use `this.gridElement` for DOM queries.
246
- *
247
- * @example
248
- * // OLD (deprecated)
249
- * const rows = this.shadowRoot?.querySelector('.rows');
250
- *
251
- * // NEW (preferred)
252
- * const rows = this.gridElement.querySelector('.rows');
253
- */
254
- get shadowRoot() {
255
- return this.gridElement;
256
- }
257
262
  /**
258
263
  * Get the disconnect signal for event listener cleanup.
259
264
  * This signal is aborted when the grid disconnects from the DOM.
@@ -367,8 +372,11 @@ function p(l, e, t) {
367
372
  }
368
373
  const _ = '@layer tbw-plugins{.header-row>.cell[draggable=true]{cursor:grab;position:relative}.header-row>.cell.dragging{opacity:.5;cursor:grabbing}.header-row>.cell.drop-before:before{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.header-row>.cell.drop-after:after{content:"";position:absolute;right:0;top:0;bottom:0;width:2px;background:var(--tbw-reorder-indicator, var(--tbw-color-accent));z-index:1}.cell.flip-animating{transition:transform var(--tbw-animation-duration, .2s) ease-out;will-change:transform;z-index:1}@keyframes reorder-fade-in{0%{opacity:0}to{opacity:1}}.cell.fade-animating{animation:reorder-fade-in var(--tbw-animation-duration, .2s) ease-out backwards}}';
369
374
  class R extends A {
375
+ /** @internal */
370
376
  name = "reorder";
377
+ /** @internal */
371
378
  styles = _;
379
+ /** @internal */
372
380
  get defaultConfig() {
373
381
  return {
374
382
  animation: "flip"
@@ -380,7 +388,7 @@ class R extends A {
380
388
  * Uses base class isAnimationEnabled to respect grid-level settings.
381
389
  */
382
390
  get animationType() {
383
- return this.isAnimationEnabled ? this.config.animation !== void 0 ? this.config.animation : this.config.viewTransition === !1 ? !1 : (this.config.viewTransition === !0, "flip") : !1;
391
+ return this.isAnimationEnabled ? this.config.animation !== void 0 ? this.config.animation : "flip" : !1;
384
392
  }
385
393
  /**
386
394
  * Get animation duration, allowing plugin config override.
@@ -413,6 +421,7 @@ class R extends A {
413
421
  }
414
422
  // #endregion
415
423
  // #region Lifecycle
424
+ /** @internal */
416
425
  attach(e) {
417
426
  super.attach(e), e.addEventListener(
418
427
  "column-reorder-request",
@@ -423,11 +432,13 @@ class R extends A {
423
432
  { signal: this.disconnectSignal }
424
433
  );
425
434
  }
435
+ /** @internal */
426
436
  detach() {
427
437
  this.isDragging = !1, this.draggedField = null, this.draggedIndex = null, this.dropIndex = null;
428
438
  }
429
439
  // #endregion
430
440
  // #region Hooks
441
+ /** @internal */
431
442
  afterRender() {
432
443
  const e = this.gridElement;
433
444
  if (!e) return;
@@ -467,6 +478,7 @@ class R extends A {
467
478
  }
468
479
  /**
469
480
  * Handle Alt+Arrow keyboard shortcuts for column reordering.
481
+ * @internal
470
482
  */
471
483
  onKeyDown(e) {
472
484
  if (!e.altKey || e.key !== "ArrowLeft" && e.key !== "ArrowRight")