@toolbox-web/grid 0.6.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 (180) hide show
  1. package/README.md +79 -26
  2. package/all.js +731 -1739
  3. package/all.js.map +1 -1
  4. package/index.js +1382 -2410
  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 +704 -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/inference.d.ts.map +1 -1
  15. package/lib/core/internal/keyboard.d.ts.map +1 -1
  16. package/lib/core/internal/render-scheduler.d.ts +2 -0
  17. package/lib/core/internal/render-scheduler.d.ts.map +1 -1
  18. package/lib/core/internal/rows.d.ts +9 -1
  19. package/lib/core/internal/rows.d.ts.map +1 -1
  20. package/lib/core/internal/shell.d.ts +41 -41
  21. package/lib/core/internal/shell.d.ts.map +1 -1
  22. package/lib/core/internal/validate-config.d.ts.map +1 -1
  23. package/lib/core/plugin/base-plugin.d.ts +2 -15
  24. package/lib/core/plugin/base-plugin.d.ts.map +1 -1
  25. package/lib/core/plugin/types.d.ts +33 -6
  26. package/lib/core/plugin/types.d.ts.map +1 -1
  27. package/lib/core/types.d.ts +376 -68
  28. package/lib/core/types.d.ts.map +1 -1
  29. package/lib/plugins/clipboard/ClipboardPlugin.d.ts +89 -2
  30. package/lib/plugins/clipboard/ClipboardPlugin.d.ts.map +1 -1
  31. package/lib/plugins/clipboard/index.d.ts +2 -0
  32. package/lib/plugins/clipboard/index.d.ts.map +1 -1
  33. package/lib/plugins/clipboard/index.js +24 -35
  34. package/lib/plugins/clipboard/index.js.map +1 -1
  35. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts +57 -2
  36. package/lib/plugins/column-virtualization/ColumnVirtualizationPlugin.d.ts.map +1 -1
  37. package/lib/plugins/column-virtualization/index.d.ts +2 -0
  38. package/lib/plugins/column-virtualization/index.d.ts.map +1 -1
  39. package/lib/plugins/column-virtualization/index.js +7 -17
  40. package/lib/plugins/column-virtualization/index.js.map +1 -1
  41. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts +75 -5
  42. package/lib/plugins/context-menu/ContextMenuPlugin.d.ts.map +1 -1
  43. package/lib/plugins/context-menu/index.d.ts +3 -1
  44. package/lib/plugins/context-menu/index.d.ts.map +1 -1
  45. package/lib/plugins/context-menu/index.js +15 -27
  46. package/lib/plugins/context-menu/index.js.map +1 -1
  47. package/lib/plugins/editing/EditingPlugin.d.ts +101 -9
  48. package/lib/plugins/editing/EditingPlugin.d.ts.map +1 -1
  49. package/lib/plugins/editing/editors.d.ts +9 -1
  50. package/lib/plugins/editing/editors.d.ts.map +1 -1
  51. package/lib/plugins/editing/index.d.ts +4 -2
  52. package/lib/plugins/editing/index.d.ts.map +1 -1
  53. package/lib/plugins/editing/index.js +412 -279
  54. package/lib/plugins/editing/index.js.map +1 -1
  55. package/lib/plugins/editing/types.d.ts +88 -0
  56. package/lib/plugins/editing/types.d.ts.map +1 -1
  57. package/lib/plugins/export/ExportPlugin.d.ts +73 -7
  58. package/lib/plugins/export/ExportPlugin.d.ts.map +1 -1
  59. package/lib/plugins/export/index.d.ts +2 -0
  60. package/lib/plugins/export/index.d.ts.map +1 -1
  61. package/lib/plugins/export/index.js +4 -19
  62. package/lib/plugins/export/index.js.map +1 -1
  63. package/lib/plugins/filtering/FilteringPlugin.d.ts +98 -2
  64. package/lib/plugins/filtering/FilteringPlugin.d.ts.map +1 -1
  65. package/lib/plugins/filtering/index.d.ts +2 -0
  66. package/lib/plugins/filtering/index.d.ts.map +1 -1
  67. package/lib/plugins/filtering/index.js +50 -58
  68. package/lib/plugins/filtering/index.js.map +1 -1
  69. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts +80 -6
  70. package/lib/plugins/grouping-columns/GroupingColumnsPlugin.d.ts.map +1 -1
  71. package/lib/plugins/grouping-columns/index.d.ts +2 -0
  72. package/lib/plugins/grouping-columns/index.d.ts.map +1 -1
  73. package/lib/plugins/grouping-columns/index.js +10 -21
  74. package/lib/plugins/grouping-columns/index.js.map +1 -1
  75. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts +81 -5
  76. package/lib/plugins/grouping-rows/GroupingRowsPlugin.d.ts.map +1 -1
  77. package/lib/plugins/grouping-rows/index.d.ts +3 -1
  78. package/lib/plugins/grouping-rows/index.d.ts.map +1 -1
  79. package/lib/plugins/grouping-rows/index.js +13 -21
  80. package/lib/plugins/grouping-rows/index.js.map +1 -1
  81. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts +90 -5
  82. package/lib/plugins/master-detail/MasterDetailPlugin.d.ts.map +1 -1
  83. package/lib/plugins/master-detail/index.d.ts +2 -0
  84. package/lib/plugins/master-detail/index.d.ts.map +1 -1
  85. package/lib/plugins/master-detail/index.js +11 -17
  86. package/lib/plugins/master-detail/index.js.map +1 -1
  87. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts +83 -2
  88. package/lib/plugins/multi-sort/MultiSortPlugin.d.ts.map +1 -1
  89. package/lib/plugins/multi-sort/index.d.ts +2 -0
  90. package/lib/plugins/multi-sort/index.d.ts.map +1 -1
  91. package/lib/plugins/multi-sort/index.js +11 -19
  92. package/lib/plugins/multi-sort/index.js.map +1 -1
  93. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts +61 -2
  94. package/lib/plugins/pinned-columns/PinnedColumnsPlugin.d.ts.map +1 -1
  95. package/lib/plugins/pinned-columns/index.d.ts +3 -1
  96. package/lib/plugins/pinned-columns/index.d.ts.map +1 -1
  97. package/lib/plugins/pinned-columns/index.js +7 -17
  98. package/lib/plugins/pinned-columns/index.js.map +1 -1
  99. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts +71 -10
  100. package/lib/plugins/pinned-rows/PinnedRowsPlugin.d.ts.map +1 -1
  101. package/lib/plugins/pinned-rows/index.d.ts +3 -1
  102. package/lib/plugins/pinned-rows/index.d.ts.map +1 -1
  103. package/lib/plugins/pinned-rows/index.js +5 -17
  104. package/lib/plugins/pinned-rows/index.js.map +1 -1
  105. package/lib/plugins/pivot/PivotPlugin.d.ts +81 -4
  106. package/lib/plugins/pivot/PivotPlugin.d.ts.map +1 -1
  107. package/lib/plugins/pivot/index.d.ts +2 -0
  108. package/lib/plugins/pivot/index.d.ts.map +1 -1
  109. package/lib/plugins/pivot/index.js +10 -17
  110. package/lib/plugins/pivot/index.js.map +1 -1
  111. package/lib/plugins/reorder/ReorderPlugin.d.ts +71 -3
  112. package/lib/plugins/reorder/ReorderPlugin.d.ts.map +1 -1
  113. package/lib/plugins/reorder/index.d.ts +2 -0
  114. package/lib/plugins/reorder/index.d.ts.map +1 -1
  115. package/lib/plugins/reorder/index.js +8 -18
  116. package/lib/plugins/reorder/index.js.map +1 -1
  117. package/lib/plugins/reorder/types.d.ts +0 -5
  118. package/lib/plugins/reorder/types.d.ts.map +1 -1
  119. package/lib/plugins/selection/SelectionPlugin.d.ts +84 -20
  120. package/lib/plugins/selection/SelectionPlugin.d.ts.map +1 -1
  121. package/lib/plugins/selection/index.d.ts +2 -1
  122. package/lib/plugins/selection/index.d.ts.map +1 -1
  123. package/lib/plugins/selection/index.js +70 -131
  124. package/lib/plugins/selection/index.js.map +1 -1
  125. package/lib/plugins/selection/types.d.ts +25 -4
  126. package/lib/plugins/selection/types.d.ts.map +1 -1
  127. package/lib/plugins/server-side/ServerSidePlugin.d.ts +65 -4
  128. package/lib/plugins/server-side/ServerSidePlugin.d.ts.map +1 -1
  129. package/lib/plugins/server-side/index.d.ts +3 -1
  130. package/lib/plugins/server-side/index.d.ts.map +1 -1
  131. package/lib/plugins/server-side/index.js +5 -17
  132. package/lib/plugins/server-side/index.js.map +1 -1
  133. package/lib/plugins/tree/TreePlugin.d.ts +89 -2
  134. package/lib/plugins/tree/TreePlugin.d.ts.map +1 -1
  135. package/lib/plugins/tree/index.d.ts +3 -2
  136. package/lib/plugins/tree/index.d.ts.map +1 -1
  137. package/lib/plugins/tree/index.js +59 -94
  138. package/lib/plugins/tree/index.js.map +1 -1
  139. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts +66 -3
  140. package/lib/plugins/undo-redo/UndoRedoPlugin.d.ts.map +1 -1
  141. package/lib/plugins/undo-redo/index.d.ts +3 -1
  142. package/lib/plugins/undo-redo/index.d.ts.map +1 -1
  143. package/lib/plugins/undo-redo/index.js +5 -17
  144. package/lib/plugins/undo-redo/index.js.map +1 -1
  145. package/lib/plugins/visibility/VisibilityPlugin.d.ts +86 -2
  146. package/lib/plugins/visibility/VisibilityPlugin.d.ts.map +1 -1
  147. package/lib/plugins/visibility/index.d.ts +2 -0
  148. package/lib/plugins/visibility/index.d.ts.map +1 -1
  149. package/lib/plugins/visibility/index.js +6 -17
  150. package/lib/plugins/visibility/index.js.map +1 -1
  151. package/package.json +1 -1
  152. package/public.d.ts +30 -2
  153. package/public.d.ts.map +1 -1
  154. package/umd/grid.all.umd.js +19 -19
  155. package/umd/grid.all.umd.js.map +1 -1
  156. package/umd/grid.umd.js +11 -11
  157. package/umd/grid.umd.js.map +1 -1
  158. package/umd/plugins/clipboard.umd.js.map +1 -1
  159. package/umd/plugins/column-virtualization.umd.js.map +1 -1
  160. package/umd/plugins/context-menu.umd.js.map +1 -1
  161. package/umd/plugins/editing.umd.js +1 -1
  162. package/umd/plugins/editing.umd.js.map +1 -1
  163. package/umd/plugins/export.umd.js.map +1 -1
  164. package/umd/plugins/filtering.umd.js.map +1 -1
  165. package/umd/plugins/grouping-columns.umd.js.map +1 -1
  166. package/umd/plugins/grouping-rows.umd.js.map +1 -1
  167. package/umd/plugins/master-detail.umd.js.map +1 -1
  168. package/umd/plugins/multi-sort.umd.js.map +1 -1
  169. package/umd/plugins/pinned-columns.umd.js.map +1 -1
  170. package/umd/plugins/pinned-rows.umd.js.map +1 -1
  171. package/umd/plugins/pivot.umd.js.map +1 -1
  172. package/umd/plugins/reorder.umd.js +1 -1
  173. package/umd/plugins/reorder.umd.js.map +1 -1
  174. package/umd/plugins/selection.umd.js +1 -1
  175. package/umd/plugins/selection.umd.js.map +1 -1
  176. package/umd/plugins/server-side.umd.js.map +1 -1
  177. package/umd/plugins/tree.umd.js +1 -1
  178. package/umd/plugins/tree.umd.js.map +1 -1
  179. package/umd/plugins/undo-redo.umd.js.map +1 -1
  180. package/umd/plugins/visibility.umd.js.map +1 -1
@@ -10,6 +10,17 @@ declare module '../../core/types' {
10
10
  editable?: boolean;
11
11
  /** Optional custom editor factory or element tag name. Requires EditingPlugin. */
12
12
  editor?: ColumnEditorSpec<TRow, TValue>;
13
+ /**
14
+ * Configuration parameters for built-in editors.
15
+ * Shape depends on column type (NumberEditorParams, TextEditorParams, DateEditorParams, SelectEditorParams).
16
+ * Requires EditingPlugin.
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * { field: 'price', type: 'number', editable: true, editorParams: { min: 0, max: 1000, step: 0.01 } }
21
+ * ```
22
+ */
23
+ editorParams?: EditorParams;
13
24
  }
14
25
  }
15
26
  /**
@@ -31,6 +42,8 @@ export interface EditingConfig {
31
42
  export interface EditorContext<T = any, V = unknown> {
32
43
  /** The row data object */
33
44
  row: T;
45
+ /** Stable row identifier (from getRowId) */
46
+ rowId: string;
34
47
  /** Current cell value */
35
48
  value: V;
36
49
  /** Field name being edited */
@@ -41,5 +54,80 @@ export interface EditorContext<T = any, V = unknown> {
41
54
  commit: (newValue: V) => void;
42
55
  /** Call to cancel editing */
43
56
  cancel: () => void;
57
+ /**
58
+ * Update other fields in this row.
59
+ * Useful for editors that affect multiple fields (e.g., address lookup).
60
+ * Changes will be committed with source: 'cascade'.
61
+ */
62
+ updateRow: (changes: Partial<T>) => void;
63
+ }
64
+ /**
65
+ * Configuration parameters for the built-in number editor.
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * { field: 'price', type: 'number', editable: true, editorParams: { min: 0, max: 1000, step: 0.01 } }
70
+ * ```
71
+ */
72
+ export interface NumberEditorParams {
73
+ /** Minimum allowed value */
74
+ min?: number;
75
+ /** Maximum allowed value */
76
+ max?: number;
77
+ /** Step increment for up/down arrows */
78
+ step?: number;
79
+ /** Placeholder text when empty */
80
+ placeholder?: string;
81
+ }
82
+ /**
83
+ * Configuration parameters for the built-in text editor.
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * { field: 'name', editable: true, editorParams: { maxLength: 50, placeholder: 'Enter name...' } }
88
+ * ```
89
+ */
90
+ export interface TextEditorParams {
91
+ /** Maximum character length */
92
+ maxLength?: number;
93
+ /** Regex pattern for validation (HTML5 pattern attribute) */
94
+ pattern?: string;
95
+ /** Placeholder text when empty */
96
+ placeholder?: string;
44
97
  }
98
+ /**
99
+ * Configuration parameters for the built-in date editor.
100
+ *
101
+ * @example
102
+ * ```typescript
103
+ * { field: 'startDate', type: 'date', editable: true, editorParams: { min: '2024-01-01' } }
104
+ * ```
105
+ */
106
+ export interface DateEditorParams {
107
+ /** Minimum date (ISO string: 'YYYY-MM-DD') */
108
+ min?: string;
109
+ /** Maximum date (ISO string: 'YYYY-MM-DD') */
110
+ max?: string;
111
+ /** Placeholder text when empty */
112
+ placeholder?: string;
113
+ }
114
+ /**
115
+ * Configuration parameters for the built-in select editor.
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * { field: 'status', type: 'select', editable: true, editorParams: { includeEmpty: true, emptyLabel: '-- Select --' } }
120
+ * ```
121
+ */
122
+ export interface SelectEditorParams {
123
+ /** Include an empty option at the start */
124
+ includeEmpty?: boolean;
125
+ /** Label for the empty option (default: '') */
126
+ emptyLabel?: string;
127
+ }
128
+ /**
129
+ * Union type of all editor parameter configurations.
130
+ * The applicable shape depends on the column type.
131
+ */
132
+ export type EditorParams = NumberEditorParams | TextEditorParams | DateEditorParams | SelectEditorParams;
45
133
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/editing/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMlG;;;GAGG;AACH,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,gBAAgB,CAAC,IAAI,EAAE,MAAM;QACrC,+EAA+E;QAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,kFAAkF;QAClF,MAAM,CAAC,EAAE,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;KACzC;CACF;AAMD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,OAAO;IACjD,0BAA0B;IAC1B,GAAG,EAAE,CAAC,CAAC;IACP,yBAAyB;IACzB,KAAK,EAAE,CAAC,CAAC;IACT,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,mCAAmC;IACnC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,6BAA6B;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/editing/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMlG;;;GAGG;AACH,OAAO,QAAQ,kBAAkB,CAAC;IAChC,UAAU,gBAAgB,CAAC,IAAI,EAAE,MAAM;QACrC,+EAA+E;QAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,kFAAkF;QAClF,MAAM,CAAC,EAAE,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACxC;;;;;;;;;WASG;QACH,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B;CACF;AAMD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,OAAO;IACjD,0BAA0B;IAC1B,GAAG,EAAE,CAAC,CAAC;IACP,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,KAAK,EAAE,CAAC,CAAC;IACT,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,mCAAmC;IACnC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,6BAA6B;IAC7B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;;;OAIG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC1C;AAMD;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,2CAA2C;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,kBAAkB,CAAC"}
@@ -3,18 +3,84 @@ import { ExportConfig, ExportFormat, ExportParams } from './types';
3
3
  /**
4
4
  * Export Plugin for tbw-grid
5
5
  *
6
- * @example
6
+ * Lets users download grid data as CSV, Excel (XML), or JSON with a single click
7
+ * or API call. Great for reporting, data backup, or letting users work with data
8
+ * in Excel. Integrates with SelectionPlugin to export only selected rows.
9
+ *
10
+ * ## Installation
11
+ *
7
12
  * ```ts
8
- * new ExportPlugin({
9
- * enabled: true,
10
- * fileName: 'my-data',
11
- * includeHeaders: true,
12
- * onlyVisible: true,
13
- * })
13
+ * import { ExportPlugin } from '@toolbox-web/grid/plugins/export';
14
14
  * ```
15
+ *
16
+ * ## Configuration Options
17
+ *
18
+ * | Option | Type | Default | Description |
19
+ * |--------|------|---------|-------------|
20
+ * | `fileName` | `string` | `'export'` | Base filename (without extension) |
21
+ * | `includeHeaders` | `boolean` | `true` | Include column headers in export |
22
+ * | `onlyVisible` | `boolean` | `true` | Export only visible columns |
23
+ * | `onlySelected` | `boolean` | `false` | Export only selected rows (requires SelectionPlugin) |
24
+ *
25
+ * ## Supported Formats
26
+ *
27
+ * | Format | Method | Description |
28
+ * |--------|--------|-------------|
29
+ * | CSV | `exportToCSV()` | Comma-separated values |
30
+ * | Excel | `exportToExcel()` | Excel XML format (.xlsx) |
31
+ * | JSON | `exportToJSON()` | JSON array of objects |
32
+ *
33
+ * ## Programmatic API
34
+ *
35
+ * | Method | Signature | Description |
36
+ * |--------|-----------|-------------|
37
+ * | `exportToCSV` | `(params?) => void` | Export as CSV file |
38
+ * | `exportToExcel` | `(params?) => void` | Export as Excel file |
39
+ * | `exportToJSON` | `(params?) => void` | Export as JSON file |
40
+ * | `isExporting` | `() => boolean` | Check if export is in progress |
41
+ *
42
+ * @example Basic Export with Button
43
+ * ```ts
44
+ * import '@toolbox-web/grid';
45
+ * import { ExportPlugin } from '@toolbox-web/grid/plugins/export';
46
+ *
47
+ * const grid = document.querySelector('tbw-grid');
48
+ * grid.gridConfig = {
49
+ * columns: [
50
+ * { field: 'name', header: 'Name' },
51
+ * { field: 'email', header: 'Email' },
52
+ * ],
53
+ * plugins: [new ExportPlugin({ fileName: 'employees', includeHeaders: true })],
54
+ * };
55
+ *
56
+ * // Trigger export via button
57
+ * document.getElementById('export-btn').addEventListener('click', () => {
58
+ * grid.getPlugin(ExportPlugin).exportToCSV();
59
+ * });
60
+ * ```
61
+ *
62
+ * @example Export Selected Rows Only
63
+ * ```ts
64
+ * import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';
65
+ *
66
+ * grid.gridConfig = {
67
+ * plugins: [
68
+ * new SelectionPlugin({ mode: 'row' }),
69
+ * new ExportPlugin({ onlySelected: true }),
70
+ * ],
71
+ * };
72
+ * ```
73
+ *
74
+ * @see {@link ExportConfig} for all configuration options
75
+ * @see {@link ExportParams} for method parameters
76
+ * @see {@link SelectionPlugin} for exporting selected rows
77
+ *
78
+ * @internal Extends BaseGridPlugin
15
79
  */
16
80
  export declare class ExportPlugin extends BaseGridPlugin<ExportConfig> {
81
+ /** @internal */
17
82
  readonly name = "export";
83
+ /** @internal */
18
84
  protected get defaultConfig(): Partial<ExportConfig>;
19
85
  private isExportingFlag;
20
86
  private lastExportInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"ExportPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/export/ExportPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,KAAK,EAAwB,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO9F;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAa,SAAQ,cAAc,CAAC,YAAY,CAAC;IAC5D,QAAQ,CAAC,IAAI,YAAY;IAEzB,cAAuB,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,CAO5D;IAGD,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,cAAc,CAA0D;IAKhF,OAAO,CAAC,aAAa;IAyFrB,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAI/C;;;OAGG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAIjD;;;OAGG;IACH,UAAU,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAIhD;;;OAGG;IACH,WAAW,IAAI,OAAO;IAItB;;;OAGG;IACH,aAAa,IAAI;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,GAAG,IAAI;CAIlE"}
1
+ {"version":3,"file":"ExportPlugin.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/export/ExportPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,KAAK,EAAwB,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO9F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,qBAAa,YAAa,SAAQ,cAAc,CAAC,YAAY,CAAC;IAC5D,gBAAgB;IAChB,QAAQ,CAAC,IAAI,YAAY;IAEzB,gBAAgB;IAChB,cAAuB,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,CAO5D;IAGD,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,cAAc,CAA0D;IAKhF,OAAO,CAAC,aAAa;IAyFrB,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAI/C;;;OAGG;IACH,WAAW,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAIjD;;;OAGG;IACH,UAAU,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAIhD;;;OAGG;IACH,WAAW,IAAI,OAAO;IAItB;;;OAGG;IACH,aAAa,IAAI;QAAE,MAAM,EAAE,YAAY,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,GAAG,IAAI;CAIlE"}
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Export Plugin Entry Point
3
3
  * Re-exports plugin class and types for tree-shakeable imports.
4
+ *
5
+ * @module Plugins/Export
4
6
  */
5
7
  export { ExportPlugin } from './ExportPlugin';
6
8
  export type { ExportFormat, ExportParams } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/export/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/grid/src/lib/plugins/export/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,YAAY,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.
@@ -379,8 +362,10 @@ function y(i, e) {
379
362
  });
380
363
  h(n, t);
381
364
  }
382
- class R extends x {
365
+ class v extends x {
366
+ /** @internal */
383
367
  name = "export";
368
+ /** @internal */
384
369
  get defaultConfig() {
385
370
  return {
386
371
  fileName: "export",
@@ -500,6 +485,6 @@ class R extends x {
500
485
  // #endregion
501
486
  }
502
487
  export {
503
- R as ExportPlugin
488
+ v as ExportPlugin
504
489
  };
505
490
  //# sourceMappingURL=index.js.map