@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
@@ -2,25 +2,103 @@ import { BaseGridPlugin, CellClickEvent, GridElement, RowClickEvent } from '../.
2
2
  import { ColumnConfig } from '../../core/types';
3
3
  import { MasterDetailConfig } from './types';
4
4
  /**
5
- * Master/Detail Plugin for tbw-grid
5
+ * Master-Detail Plugin for tbw-grid
6
+ *
7
+ * Creates expandable detail rows that reveal additional content beneath each master row.
8
+ * Perfect for order/line-item UIs, employee/department views, or any scenario where
9
+ * you need to show related data without navigating away.
10
+ *
11
+ * ## Installation
6
12
  *
7
- * @example
13
+ * ```ts
14
+ * import { MasterDetailPlugin } from '@toolbox-web/grid/plugins/master-detail';
15
+ * ```
16
+ *
17
+ * ## Configuration Options
18
+ *
19
+ * | Option | Type | Default | Description |
20
+ * |--------|------|---------|-------------|
21
+ * | `detailRenderer` | `(row) => HTMLElement \| string` | required | Render function for detail content |
22
+ * | `expandOnRowClick` | `boolean` | `false` | Expand when clicking the row |
23
+ * | `detailHeight` | `number \| 'auto'` | `'auto'` | Fixed height or auto-size |
24
+ * | `collapseOnClickOutside` | `boolean` | `false` | Collapse when clicking outside |
25
+ * | `showExpandColumn` | `boolean` | `true` | Show expand/collapse column |
26
+ * | `animation` | `false \| 'slide' \| 'fade'` | `'slide'` | Animation style |
27
+ *
28
+ * ## Programmatic API
29
+ *
30
+ * | Method | Signature | Description |
31
+ * |--------|-----------|-------------|
32
+ * | `expandRow` | `(rowIndex) => void` | Expand a specific row |
33
+ * | `collapseRow` | `(rowIndex) => void` | Collapse a specific row |
34
+ * | `toggleRow` | `(rowIndex) => void` | Toggle row expansion |
35
+ * | `expandAll` | `() => void` | Expand all rows |
36
+ * | `collapseAll` | `() => void` | Collapse all rows |
37
+ * | `isRowExpanded` | `(rowIndex) => boolean` | Check if row is expanded |
38
+ *
39
+ * ## CSS Custom Properties
40
+ *
41
+ * | Property | Default | Description |
42
+ * |----------|---------|-------------|
43
+ * | `--tbw-master-detail-bg` | `var(--tbw-color-row-alt)` | Detail row background |
44
+ * | `--tbw-master-detail-border` | `var(--tbw-color-border)` | Detail row border |
45
+ * | `--tbw-detail-padding` | `1em` | Detail content padding |
46
+ * | `--tbw-animation-duration` | `200ms` | Expand/collapse animation |
47
+ *
48
+ * @example Basic Master-Detail with HTML Template
49
+ * ```ts
50
+ * import '@toolbox-web/grid';
51
+ * import { MasterDetailPlugin } from '@toolbox-web/grid/plugins/master-detail';
52
+ *
53
+ * grid.gridConfig = {
54
+ * columns: [
55
+ * { field: 'orderId', header: 'Order ID' },
56
+ * { field: 'customer', header: 'Customer' },
57
+ * { field: 'total', header: 'Total', type: 'currency' },
58
+ * ],
59
+ * plugins: [
60
+ * new MasterDetailPlugin({
61
+ * detailRenderer: (row) => `
62
+ * <div class="order-details">
63
+ * <h4>Order Items</h4>
64
+ * <ul>${row.items.map(i => `<li>${i.name} - $${i.price}</li>`).join('')}</ul>
65
+ * </div>
66
+ * `,
67
+ * }),
68
+ * ],
69
+ * };
70
+ * ```
71
+ *
72
+ * @example Nested Grid in Detail
8
73
  * ```ts
9
74
  * new MasterDetailPlugin({
10
- * enabled: true,
11
- * detailRenderer: (row) => `<div>Details for ${row.name}</div>`,
12
- * expandOnRowClick: true,
75
+ * detailRenderer: (row) => {
76
+ * const childGrid = document.createElement('tbw-grid');
77
+ * childGrid.style.height = '200px';
78
+ * childGrid.gridConfig = { columns: [...] };
79
+ * childGrid.rows = row.items || [];
80
+ * return childGrid;
81
+ * },
13
82
  * })
14
83
  * ```
84
+ *
85
+ * @see {@link MasterDetailConfig} for all configuration options
86
+ * @see {@link DetailExpandDetail} for expand/collapse event details
87
+ *
88
+ * @internal Extends BaseGridPlugin
15
89
  */
16
90
  export declare class MasterDetailPlugin extends BaseGridPlugin<MasterDetailConfig> {
17
91
  #private;
92
+ /** @internal */
18
93
  readonly name = "masterDetail";
94
+ /** @internal */
19
95
  readonly styles: string;
96
+ /** @internal */
20
97
  protected get defaultConfig(): Partial<MasterDetailConfig>;
21
98
  /**
22
99
  * Called when plugin is attached to the grid.
23
100
  * Parses light DOM for `<tbw-grid-detail>` elements to configure detail templates.
101
+ * @internal
24
102
  */
25
103
  attach(grid: GridElement): void;
26
104
  /**
@@ -71,15 +149,22 @@ export declare class MasterDetailPlugin extends BaseGridPlugin<MasterDetailConfi
71
149
  * Toggle a row's detail and emit event.
72
150
  */
73
151
  private toggleAndEmit;
152
+ /** @internal */
74
153
  detach(): void;
154
+ /** @internal */
75
155
  processColumns(columns: readonly ColumnConfig[]): ColumnConfig[];
156
+ /** @internal */
76
157
  onRowClick(event: RowClickEvent): boolean | void;
158
+ /** @internal */
77
159
  onCellClick(event: CellClickEvent): boolean | void;
160
+ /** @internal */
78
161
  onKeyDown(event: KeyboardEvent): boolean | void;
162
+ /** @internal */
79
163
  afterRender(): void;
80
164
  /**
81
165
  * Called on scroll to sync detail elements with visible rows.
82
166
  * Removes details for rows that scrolled out of view and reattaches for visible rows.
167
+ * @internal
83
168
  */
84
169
  onScrollRender(): void;
85
170
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MasterDetailPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/master-detail/MasterDetailPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE3G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AASrD,OAAO,KAAK,EAA+C,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE/F;;;;;;;;;;;GAWG;AACH,qBAAa,kBAAmB,SAAQ,cAAc,CAAC,kBAAkB,CAAC;;IACxE,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,SAAkB,MAAM,SAAU;IAElC,cAAuB,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAQlE;IAID;;;OAGG;IACM,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI;IAKxC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,mBAAmB;IAqE3B;;;OAGG;IACH,OAAO,KAAK,cAAc,GAGzB;IAED;;OAEG;IACH,OAAO,CAAC,aAAa;IAarB;;OAEG;IACH,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,cAAc,CAAoC;IAE1D,yDAAyD;IACzD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,q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AAO,GAAG,IAAI;IAMzD,gBAAgB;IACP,WAAW,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,GAAG,IAAI;IAgB3D,gBAAgB;IACP,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,IAAI;IAsBxD,gBAAgB;IACP,WAAW,IAAI,IAAI;IAI5B;;;;OAIG;IACM,cAAc,IAAI,IAAI;IA2E/B;;;OAGG;IACM,cAAc,IAAI,MAAM;IAQjC;;;OAGG;IACM,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM;IAY7D;;;OAGG;IACM,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IA8CxF;;;OAGG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQ9B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQhC;;;OAGG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAQ9B;;;;OAIG;IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAKrC;;OAEG;IACH,SAAS,IAAI,IAAI;IAOjB;;OAEG;IACH,WAAW,IAAI,IAAI;IAKnB;;;OAGG;IACH,eAAe,IAAI,MAAM,EAAE;IAS3B;;;;OAIG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAK3D;;;;;;OAMG;IACH,qBAAqB,IAAI,IAAI;CA0B9B"}
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Master Detail Plugin Entry Point
3
3
  * Re-exports plugin class and types for tree-shakeable imports.
4
+ *
5
+ * @module Plugins/Master-Detail
4
6
  */
5
7
  export { MasterDetailPlugin } from './MasterDetailPlugin';
6
8
  export type { ExpandCollapseAnimation, MasterDetailConfig } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/master-detail/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/master-detail/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -119,6 +119,28 @@ class T {
119
119
  * ```
120
120
  */
121
121
  static dependencies;
122
+ /**
123
+ * Plugin manifest - declares owned properties, config rules, and hook priorities.
124
+ *
125
+ * This is read by the configuration validator to:
126
+ * - Validate that required plugins are loaded when their properties are used
127
+ * - Execute configRules to detect invalid/conflicting settings
128
+ * - Order hook execution based on priority
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * static override readonly manifest: PluginManifest<MyConfig> = {
133
+ * ownedProperties: [
134
+ * { property: 'myProp', level: 'column', description: 'the "myProp" column property' },
135
+ * ],
136
+ * configRules: [
137
+ * { id: 'myPlugin/conflict', severity: 'warn', message: '...', check: (c) => c.a && c.b },
138
+ * ],
139
+ * };
140
+ * ```
141
+ */
142
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
143
+ static manifest;
122
144
  /**
123
145
  * Plugin version - defaults to grid version for built-in plugins.
124
146
  * Third-party plugins can override with their own semver.
@@ -278,23 +300,6 @@ class T {
278
300
  get gridElement() {
279
301
  return this.grid;
280
302
  }
281
- /**
282
- * Get the render root of the grid for DOM queries.
283
- * @deprecated Use `gridElement` instead. This getter exists only for backward compatibility.
284
- *
285
- * With Shadow DOM removed, the grid element itself is the render root.
286
- * All new code should use `this.gridElement` for DOM queries.
287
- *
288
- * @example
289
- * // OLD (deprecated)
290
- * const rows = this.shadowRoot?.querySelector('.rows');
291
- *
292
- * // NEW (preferred)
293
- * const rows = this.gridElement.querySelector('.rows');
294
- */
295
- get shadowRoot() {
296
- return this.gridElement;
297
- }
298
303
  /**
299
304
  * Get the disconnect signal for event listener cleanup.
300
305
  * This signal is aborted when the grid disconnects from the DOM.
@@ -449,8 +454,11 @@ function M(n, e, t, i) {
449
454
  }
450
455
  const F = "@layer tbw-plugins{tbw-grid .cell[data-field=__tbw_expander]{border-right:none!important;padding:0;display:flex;align-items:center;justify-content:center}tbw-grid .header-row .cell[data-field=__tbw_expander]{display:none}tbw-grid .header-row .cell[data-field=__tbw_expander]+.cell{grid-column:1 / 3}tbw-grid .master-detail-expander{display:flex;align-items:center;justify-content:center;width:100%;height:100%}tbw-grid .master-detail-toggle{cursor:pointer;opacity:.7;-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:center}tbw-grid .master-detail-toggle:hover{opacity:1}tbw-grid .master-detail-row{grid-column:1 / -1;display:grid;background:var(--tbw-master-detail-bg, var(--tbw-color-row-alt));border-bottom:1px solid var(--tbw-master-detail-border, var(--tbw-color-border));overflow:hidden}tbw-grid .master-detail-cell{padding:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem));overflow:auto}tbw-grid .master-detail-row.tbw-expanding{animation:tbw-detail-expand var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}tbw-grid .master-detail-row.tbw-collapsing{animation:tbw-detail-collapse var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-detail-expand{0%{opacity:0;max-height:0;padding-top:0;padding-bottom:0}to{opacity:1;max-height:var(--tbw-detail-max-height, 31.25rem);padding-top:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem));padding-bottom:var(--tbw-detail-padding, var(--tbw-spacing-xl, 1rem))}}@keyframes tbw-detail-collapse{0%{opacity:1;max-height:var(--tbw-detail-max-height, 31.25rem)}to{opacity:0;max-height:0}}}";
451
456
  class w extends T {
457
+ /** @internal */
452
458
  name = "masterDetail";
459
+ /** @internal */
453
460
  styles = F;
461
+ /** @internal */
454
462
  get defaultConfig() {
455
463
  return {
456
464
  detailHeight: "auto",
@@ -465,6 +473,7 @@ class w extends T {
465
473
  /**
466
474
  * Called when plugin is attached to the grid.
467
475
  * Parses light DOM for `<tbw-grid-detail>` elements to configure detail templates.
476
+ * @internal
468
477
  */
469
478
  attach(e) {
470
479
  super.attach(e), this.parseLightDomDetail();
@@ -572,11 +581,13 @@ class w extends T {
572
581
  }
573
582
  // #endregion
574
583
  // #region Lifecycle
584
+ /** @internal */
575
585
  detach() {
576
586
  this.expandedRows.clear(), this.detailElements.clear();
577
587
  }
578
588
  // #endregion
579
589
  // #region Hooks
590
+ /** @internal */
580
591
  processColumns(e) {
581
592
  if (!this.config.detailRenderer || this.config.showExpandColumn === !1)
582
593
  return [...e];
@@ -591,15 +602,18 @@ class w extends T {
591
602
  return d.className = `master-detail-toggle${r ? " expanded" : ""}`, this.setIcon(d, this.resolveIcon(r ? "collapse" : "expand")), d.setAttribute("role", "button"), d.setAttribute("tabindex", "0"), d.setAttribute("aria-expanded", String(r)), d.setAttribute("aria-label", r ? "Collapse details" : "Expand details"), a.appendChild(d), a;
592
603
  }, [s, ...t];
593
604
  }
605
+ /** @internal */
594
606
  onRowClick(e) {
595
607
  if (!(!this.config.expandOnRowClick || !this.config.detailRenderer))
596
608
  return this.toggleAndEmit(e.row, e.rowIndex), !1;
597
609
  }
610
+ /** @internal */
598
611
  onCellClick(e) {
599
612
  if (e.originalEvent?.target?.classList.contains("master-detail-toggle"))
600
613
  return this.toggleAndEmit(e.row, e.rowIndex), !0;
601
614
  this.expandedRows.size > 0 && queueMicrotask(() => this.#e());
602
615
  }
616
+ /** @internal */
603
617
  onKeyDown(e) {
604
618
  if (e.key !== " ") return;
605
619
  const t = this.grid._focusCol, i = this.grid._focusRow, s = this.columns[t];
@@ -608,12 +622,14 @@ class w extends T {
608
622
  if (l)
609
623
  return e.preventDefault(), this.toggleAndEmit(l, i), this.requestRenderWithFocus(), !0;
610
624
  }
625
+ /** @internal */
611
626
  afterRender() {
612
627
  this.#e();
613
628
  }
614
629
  /**
615
630
  * Called on scroll to sync detail elements with visible rows.
616
631
  * Removes details for rows that scrolled out of view and reattaches for visible rows.
632
+ * @internal
617
633
  */
618
634
  onScrollRender() {
619
635
  !this.config.detailRenderer || this.expandedRows.size === 0 || this.#e();