@toolbox-web/grid-react 0.5.0 → 0.7.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 (100) hide show
  1. package/README.md +158 -2
  2. package/chunks/feature-registry-Y3KvnN54.js +26 -0
  3. package/features/clipboard.d.ts +18 -0
  4. package/features/clipboard.d.ts.map +1 -0
  5. package/features/clipboard.js +6 -0
  6. package/features/column-virtualization.d.ts +16 -0
  7. package/features/column-virtualization.d.ts.map +1 -0
  8. package/features/column-virtualization.js +6 -0
  9. package/features/context-menu.d.ts +16 -0
  10. package/features/context-menu.d.ts.map +1 -0
  11. package/features/context-menu.js +6 -0
  12. package/features/editing.d.ts +16 -0
  13. package/features/editing.d.ts.map +1 -0
  14. package/features/editing.js +3 -0
  15. package/features/export.d.ts +16 -0
  16. package/features/export.d.ts.map +1 -0
  17. package/features/export.js +6 -0
  18. package/features/filtering.d.ts +16 -0
  19. package/features/filtering.d.ts.map +1 -0
  20. package/features/filtering.js +6 -0
  21. package/features/grouping-columns.d.ts +16 -0
  22. package/features/grouping-columns.d.ts.map +1 -0
  23. package/features/grouping-columns.js +6 -0
  24. package/features/grouping-rows.d.ts +16 -0
  25. package/features/grouping-rows.d.ts.map +1 -0
  26. package/features/grouping-rows.js +6 -0
  27. package/features/index.d.ts +1 -0
  28. package/features/index.d.ts.map +1 -0
  29. package/features/index.js +22 -0
  30. package/features/master-detail.d.ts +18 -0
  31. package/features/master-detail.d.ts.map +1 -0
  32. package/features/master-detail.js +6 -0
  33. package/features/pinned-columns.d.ts +16 -0
  34. package/features/pinned-columns.d.ts.map +1 -0
  35. package/features/pinned-columns.js +6 -0
  36. package/features/pinned-rows.d.ts +16 -0
  37. package/features/pinned-rows.d.ts.map +1 -0
  38. package/features/pinned-rows.js +6 -0
  39. package/features/pivot.d.ts +16 -0
  40. package/features/pivot.d.ts.map +1 -0
  41. package/features/pivot.js +3 -0
  42. package/features/print.d.ts +16 -0
  43. package/features/print.d.ts.map +1 -0
  44. package/features/print.js +3 -0
  45. package/features/reorder.d.ts +16 -0
  46. package/features/reorder.d.ts.map +1 -0
  47. package/features/reorder.js +6 -0
  48. package/features/responsive.d.ts +16 -0
  49. package/features/responsive.d.ts.map +1 -0
  50. package/features/responsive.js +6 -0
  51. package/features/row-reorder.d.ts +16 -0
  52. package/features/row-reorder.d.ts.map +1 -0
  53. package/features/row-reorder.js +3 -0
  54. package/features/selection.d.ts +16 -0
  55. package/features/selection.d.ts.map +1 -0
  56. package/features/selection.js +3 -0
  57. package/features/server-side.d.ts +16 -0
  58. package/features/server-side.d.ts.map +1 -0
  59. package/features/server-side.js +3 -0
  60. package/features/sorting.d.ts +16 -0
  61. package/features/sorting.d.ts.map +1 -0
  62. package/features/sorting.js +3 -0
  63. package/features/tree.d.ts +16 -0
  64. package/features/tree.d.ts.map +1 -0
  65. package/features/tree.js +6 -0
  66. package/features/undo-redo.d.ts +18 -0
  67. package/features/undo-redo.d.ts.map +1 -0
  68. package/features/undo-redo.js +6 -0
  69. package/features/visibility.d.ts +16 -0
  70. package/features/visibility.d.ts.map +1 -0
  71. package/features/visibility.js +6 -0
  72. package/index.d.ts +6 -3
  73. package/index.d.ts.map +1 -1
  74. package/index.js +608 -420
  75. package/lib/column-shorthand.d.ts +59 -0
  76. package/lib/column-shorthand.d.ts.map +1 -0
  77. package/lib/context-types.d.ts +1 -1
  78. package/lib/data-grid.d.ts +61 -26
  79. package/lib/data-grid.d.ts.map +1 -1
  80. package/lib/event-props.d.ts +305 -0
  81. package/lib/event-props.d.ts.map +1 -0
  82. package/lib/feature-props.d.ts +320 -0
  83. package/lib/feature-props.d.ts.map +1 -0
  84. package/lib/feature-registry.d.ts +56 -0
  85. package/lib/feature-registry.d.ts.map +1 -0
  86. package/lib/grid-column.d.ts +1 -1
  87. package/lib/grid-detail-panel.d.ts +3 -0
  88. package/lib/grid-detail-panel.d.ts.map +1 -1
  89. package/lib/grid-responsive-card.d.ts +3 -0
  90. package/lib/grid-responsive-card.d.ts.map +1 -1
  91. package/lib/grid-type-registry.d.ts +1 -1
  92. package/lib/react-column-config.d.ts +1 -1
  93. package/lib/react-grid-adapter.d.ts +1 -1
  94. package/lib/use-grid-event.d.ts +23 -19
  95. package/lib/use-grid-event.d.ts.map +1 -1
  96. package/lib/use-grid.d.ts +46 -2
  97. package/lib/use-grid.d.ts.map +1 -1
  98. package/lib/use-sync-plugins.d.ts +21 -0
  99. package/lib/use-sync-plugins.d.ts.map +1 -0
  100. package/package.json +11 -1
@@ -0,0 +1,320 @@
1
+ import { ClipboardConfig, ColumnVirtualizationConfig, ContextMenuConfig, ExportConfig, FilterConfig, GroupingColumnsConfig, GroupingRowsConfig, MasterDetailConfig, MultiSortConfig, PinnedRowsConfig, PivotConfig, PrintConfig, ReorderConfig, ResponsivePluginConfig, RowReorderConfig, SelectionConfig, ServerSideConfig, TreeConfig, UndoRedoConfig, VisibilityConfig } from '@toolbox-web/grid/all';
2
+ /**
3
+ * Feature props for declarative plugin configuration.
4
+ * Each prop lazily loads its corresponding plugin when used.
5
+ *
6
+ * @template TRow - The row data type
7
+ */
8
+ export interface FeatureProps<TRow = unknown> {
9
+ /**
10
+ * Enable cell/row/range selection.
11
+ *
12
+ * @requires `import '@toolbox-web/grid-react/features/selection';`
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * // Shorthand - just the mode
17
+ * <DataGrid selection="range" />
18
+ *
19
+ * // Full config
20
+ * <DataGrid selection={{ mode: 'range', checkbox: true }} />
21
+ * ```
22
+ */
23
+ selection?: 'cell' | 'row' | 'range' | SelectionConfig<TRow>;
24
+ /**
25
+ * Enable inline cell editing.
26
+ *
27
+ * @requires `import '@toolbox-web/grid-react/features/editing';`
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * // Enable with default trigger (dblclick)
32
+ * <DataGrid editing />
33
+ *
34
+ * // Specify trigger
35
+ * <DataGrid editing="click" />
36
+ * <DataGrid editing="dblclick" />
37
+ * <DataGrid editing="manual" />
38
+ * ```
39
+ */
40
+ editing?: boolean | 'click' | 'dblclick' | 'manual';
41
+ /**
42
+ * Enable clipboard copy/paste.
43
+ * Requires selection to be enabled (will be auto-added).
44
+ *
45
+ * @requires `import '@toolbox-web/grid-react/features/clipboard';`
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * <DataGrid selection="range" clipboard />
50
+ * ```
51
+ */
52
+ clipboard?: boolean | ClipboardConfig;
53
+ /**
54
+ * Enable right-click context menu.
55
+ *
56
+ * @requires `import '@toolbox-web/grid-react/features/context-menu';`
57
+ *
58
+ * @example
59
+ * ```tsx
60
+ * <DataGrid contextMenu />
61
+ * <DataGrid contextMenu={{ items: customItems }} />
62
+ * ```
63
+ */
64
+ contextMenu?: boolean | ContextMenuConfig;
65
+ /**
66
+ * Enable column sorting.
67
+ *
68
+ * @requires `import '@toolbox-web/grid-react/features/sorting';`
69
+ *
70
+ * @example
71
+ * ```tsx
72
+ * // Enable with default (multi-sort)
73
+ * <DataGrid sorting />
74
+ *
75
+ * // Single column sort only
76
+ * <DataGrid sorting="single" />
77
+ *
78
+ * // Multi-column sort
79
+ * <DataGrid sorting="multi" />
80
+ *
81
+ * // Full config
82
+ * <DataGrid sorting={{ maxSortLevels: 3 }} />
83
+ * ```
84
+ */
85
+ sorting?: boolean | 'single' | 'multi' | MultiSortConfig;
86
+ /**
87
+ * Enable column filtering.
88
+ *
89
+ * @requires `import '@toolbox-web/grid-react/features/filtering';`
90
+ *
91
+ * @example
92
+ * ```tsx
93
+ * <DataGrid filtering />
94
+ * <DataGrid filtering={{ debounceMs: 200 }} />
95
+ * ```
96
+ */
97
+ filtering?: boolean | FilterConfig<TRow>;
98
+ /**
99
+ * Enable column drag-to-reorder.
100
+ *
101
+ * @requires `import '@toolbox-web/grid-react/features/reorder';`
102
+ *
103
+ * @example
104
+ * ```tsx
105
+ * <DataGrid reorder />
106
+ * ```
107
+ */
108
+ reorder?: boolean | ReorderConfig;
109
+ /**
110
+ * Enable column visibility toggle panel.
111
+ *
112
+ * @requires `import '@toolbox-web/grid-react/features/visibility';`
113
+ *
114
+ * @example
115
+ * ```tsx
116
+ * <DataGrid visibility />
117
+ * ```
118
+ */
119
+ visibility?: boolean | VisibilityConfig;
120
+ /**
121
+ * Enable pinned/sticky columns.
122
+ * Columns are pinned via the `sticky` column property.
123
+ *
124
+ * @requires `import '@toolbox-web/grid-react/features/pinned-columns';`
125
+ *
126
+ * @example
127
+ * ```tsx
128
+ * <DataGrid pinnedColumns columns={[
129
+ * { field: 'id', sticky: 'left' },
130
+ * { field: 'name' },
131
+ * { field: 'actions', sticky: 'right' },
132
+ * ]} />
133
+ * ```
134
+ */
135
+ pinnedColumns?: boolean;
136
+ /**
137
+ * Enable multi-level column headers (column groups).
138
+ *
139
+ * @requires `import '@toolbox-web/grid-react/features/grouping-columns';`
140
+ *
141
+ * @example
142
+ * ```tsx
143
+ * <DataGrid groupingColumns={{
144
+ * columnGroups: [
145
+ * { header: 'Personal Info', children: ['firstName', 'lastName'] },
146
+ * ],
147
+ * }} />
148
+ * ```
149
+ */
150
+ groupingColumns?: boolean | GroupingColumnsConfig;
151
+ /**
152
+ * Enable horizontal column virtualization for wide grids.
153
+ *
154
+ * @requires `import '@toolbox-web/grid-react/features/column-virtualization';`
155
+ *
156
+ * @example
157
+ * ```tsx
158
+ * <DataGrid columnVirtualization />
159
+ * ```
160
+ */
161
+ columnVirtualization?: boolean | ColumnVirtualizationConfig;
162
+ /**
163
+ * Enable row drag-to-reorder.
164
+ *
165
+ * @requires `import '@toolbox-web/grid-react/features/row-reorder';`
166
+ *
167
+ * @example
168
+ * ```tsx
169
+ * <DataGrid rowReorder />
170
+ * ```
171
+ */
172
+ rowReorder?: boolean | RowReorderConfig;
173
+ /**
174
+ * Enable row grouping by field values.
175
+ *
176
+ * @requires `import '@toolbox-web/grid-react/features/grouping-rows';`
177
+ *
178
+ * @example
179
+ * ```tsx
180
+ * <DataGrid groupingRows={{
181
+ * groupBy: ['department', 'team'],
182
+ * defaultExpanded: true,
183
+ * }} />
184
+ * ```
185
+ */
186
+ groupingRows?: GroupingRowsConfig;
187
+ /**
188
+ * Enable pinned rows (aggregation/status bar).
189
+ *
190
+ * @requires `import '@toolbox-web/grid-react/features/pinned-rows';`
191
+ *
192
+ * @example
193
+ * ```tsx
194
+ * <DataGrid pinnedRows={{
195
+ * bottom: [{ type: 'aggregation', aggregator: 'sum' }],
196
+ * }} />
197
+ * ```
198
+ */
199
+ pinnedRows?: boolean | PinnedRowsConfig;
200
+ /**
201
+ * Enable hierarchical tree view.
202
+ *
203
+ * @requires `import '@toolbox-web/grid-react/features/tree';`
204
+ *
205
+ * @example
206
+ * ```tsx
207
+ * <DataGrid tree={{
208
+ * childrenField: 'children',
209
+ * defaultExpanded: true,
210
+ * }} />
211
+ * ```
212
+ */
213
+ tree?: boolean | TreeConfig;
214
+ /**
215
+ * Enable master-detail expandable rows.
216
+ *
217
+ * @requires `import '@toolbox-web/grid-react/features/master-detail';`
218
+ *
219
+ * @example
220
+ * ```tsx
221
+ * <DataGrid masterDetail={{
222
+ * renderer: (row) => <OrderDetails order={row} />,
223
+ * }} />
224
+ * ```
225
+ */
226
+ masterDetail?: MasterDetailConfig;
227
+ /**
228
+ * Enable responsive card layout for narrow viewports.
229
+ *
230
+ * @requires `import '@toolbox-web/grid-react/features/responsive';`
231
+ *
232
+ * @example
233
+ * ```tsx
234
+ * <DataGrid responsive={{
235
+ * breakpoint: 768,
236
+ * cardRenderer: (row) => <EmployeeCard employee={row} />,
237
+ * }} />
238
+ * ```
239
+ */
240
+ responsive?: boolean | ResponsivePluginConfig;
241
+ /**
242
+ * Enable undo/redo for cell edits.
243
+ * Requires editing to be enabled (will be auto-added).
244
+ *
245
+ * @requires `import '@toolbox-web/grid-react/features/undo-redo';`
246
+ *
247
+ * @example
248
+ * ```tsx
249
+ * <DataGrid editing="dblclick" undoRedo />
250
+ * ```
251
+ */
252
+ undoRedo?: boolean | UndoRedoConfig;
253
+ /**
254
+ * Enable CSV/JSON export functionality.
255
+ *
256
+ * @requires `import '@toolbox-web/grid-react/features/export';`
257
+ *
258
+ * @example
259
+ * ```tsx
260
+ * <DataGrid export />
261
+ * <DataGrid export={{ filename: 'data.csv' }} />
262
+ * ```
263
+ */
264
+ export?: boolean | ExportConfig;
265
+ /**
266
+ * Enable print functionality.
267
+ *
268
+ * @requires `import '@toolbox-web/grid-react/features/print';`
269
+ *
270
+ * @example
271
+ * ```tsx
272
+ * <DataGrid print />
273
+ * ```
274
+ */
275
+ print?: boolean | PrintConfig;
276
+ /**
277
+ * Enable pivot table functionality.
278
+ *
279
+ * @requires `import '@toolbox-web/grid-react/features/pivot';`
280
+ *
281
+ * @example
282
+ * ```tsx
283
+ * <DataGrid pivot={{
284
+ * rowFields: ['category'],
285
+ * columnFields: ['year'],
286
+ * valueField: 'sales',
287
+ * }} />
288
+ * ```
289
+ */
290
+ pivot?: PivotConfig;
291
+ /**
292
+ * Enable server-side data operations.
293
+ *
294
+ * @requires `import '@toolbox-web/grid-react/features/server-side';`
295
+ *
296
+ * @example
297
+ * ```tsx
298
+ * <DataGrid serverSide={{
299
+ * dataSource: async (params) => fetchData(params),
300
+ * }} />
301
+ * ```
302
+ */
303
+ serverSide?: ServerSideConfig;
304
+ }
305
+ /**
306
+ * Props for controlling SSR behavior.
307
+ */
308
+ export interface SSRProps {
309
+ /**
310
+ * Enable SSR mode - disables feature plugins for server-side rendering.
311
+ * In SSR mode, the grid renders without interactive features.
312
+ * @default false
313
+ */
314
+ ssr?: boolean;
315
+ }
316
+ /**
317
+ * All feature-related props combined.
318
+ */
319
+ export type AllFeatureProps<TRow = unknown> = FeatureProps<TRow> & SSRProps;
320
+ //# sourceMappingURL=feature-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-props.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,0BAA0B,EAC1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D;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAExC;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAElC;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IAMxC;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAMlC;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;IAM9C;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC;IAMpC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAC;IAEhC;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAM9B;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,IAAI,GAAG,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { FeatureProps } from './feature-props';
2
+ /**
3
+ * Feature names - keys of the FeatureProps interface.
4
+ */
5
+ export type FeatureName = keyof FeatureProps;
6
+ /**
7
+ * Plugin factory function type.
8
+ * Takes configuration and returns a plugin instance.
9
+ */
10
+ export type PluginFactory<TConfig = unknown> = (config: TConfig) => unknown;
11
+ /**
12
+ * Register a feature's plugin factory.
13
+ * Called by side-effect feature imports.
14
+ *
15
+ * @param name - The feature name (matches the prop name on DataGrid)
16
+ * @param factory - Function that creates the plugin instance
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * // features/selection.ts
21
+ * import { SelectionPlugin } from '@toolbox-web/grid/plugins/selection';
22
+ * import { registerFeature } from '../feature-registry';
23
+ *
24
+ * registerFeature('selection', (config) => new SelectionPlugin(config));
25
+ * ```
26
+ */
27
+ export declare function registerFeature<TConfig = unknown>(name: FeatureName, factory: PluginFactory<TConfig>): void;
28
+ /**
29
+ * Check if a feature is registered.
30
+ */
31
+ export declare function isFeatureRegistered(name: FeatureName): boolean;
32
+ /**
33
+ * Get a registered feature's factory.
34
+ * Returns undefined if not registered.
35
+ */
36
+ export declare function getFeatureFactory(name: FeatureName): PluginFactory | undefined;
37
+ /**
38
+ * Get all registered feature names.
39
+ * Useful for debugging.
40
+ */
41
+ export declare function getRegisteredFeatures(): FeatureName[];
42
+ /**
43
+ * Create a plugin instance for a feature.
44
+ * Shows a helpful warning if the feature is not registered.
45
+ *
46
+ * @param name - Feature name
47
+ * @param config - Plugin configuration
48
+ * @returns Plugin instance or undefined if not registered
49
+ */
50
+ export declare function createPluginFromFeature<TConfig = unknown>(name: FeatureName, config: TConfig): unknown | undefined;
51
+ /**
52
+ * Clear the registry. For testing only.
53
+ * @internal
54
+ */
55
+ export declare function clearFeatureRegistry(): void;
56
+ //# sourceMappingURL=feature-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-registry.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/feature-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,OAAO,IAAI,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;AAuB5E;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,OAAO,GAAG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,GAAG,IAAI,CAK3G;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAE9D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,aAAa,GAAG,SAAS,CAE9E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,GAAG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAqBlH;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C"}
@@ -1,4 +1,4 @@
1
- import { CellRenderContext, ColumnEditorContext } from '../../../../dist/libs/grid/index.d.ts';
1
+ import { CellRenderContext, ColumnEditorContext } from '@toolbox-web/grid';
2
2
  import { ReactNode } from 'react';
3
3
  /**
4
4
  * Props for the GridColumn component.
@@ -85,4 +85,7 @@ export interface GridDetailPanelProps<TRow = unknown> {
85
85
  * 4. The React component is rendered into the detail row container
86
86
  */
87
87
  export declare function GridDetailPanel<TRow = unknown>(props: GridDetailPanelProps<TRow>): ReactElement;
88
+ export declare namespace GridDetailPanel {
89
+ var displayName: string;
90
+ }
88
91
  //# sourceMappingURL=grid-detail-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid-detail-panel.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/grid-detail-panel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AA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iB,CAC/B,WAAW,EAAE,WAAW,GACvB,CAAC,CAAC,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC,GAAG,SAAS,CAe/D;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,IAAI,GAAG,OAAO;IAClD;;;;;;;;;;OAUG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAEvD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,eAAe,CAAC,IAAI,GAAG,OAAO,EAAE,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,GAAG,YAAY,CAqE/F;yBArEe,eAAe"}
@@ -85,4 +85,7 @@ export interface GridResponsiveCardProps<TRow = unknown> {
85
85
  * 4. The React component is rendered into the card container
86
86
  */
87
87
  export declare function GridResponsiveCard<TRow = unknown>(props: GridResponsiveCardProps<TRow>): ReactElement;
88
+ export declare namespace GridResponsiveCard {
89
+ var displayName: string;
90
+ }
88
91
  //# sourceMappingURL=grid-responsive-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grid-responsive-card.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/grid-responsive-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,IAAI,GAAG,OAAO;IACnD,iCAAiC;IACjC,GAAG,EAAE,IAAI,CAAC;IACV,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAUD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,GACvB,CAAC,CAAC,GAAG,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC,GAAG,SAAS,CAelE;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,IAAI,GAAG,OAAO;IACrD;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAE1D;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAG,OAAO,EAAE,KAAK,EAAE,uBAAuB,CAAC,IAAI,CAAC,GAAG,YAAY,CAmDrG"}
1
+ {"version":3,"file":"grid-responsive-card.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/grid-responsive-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAkC,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,IAAI,GAAG,OAAO;IACnD,iCAAiC;IACjC,GAAG,EAAE,IAAI,CAAC;IACV,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAUD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,GACvB,CAAC,CAAC,GAAG,EAAE,qBAAqB,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC,GAAG,SAAS,CAelE;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,IAAI,GAAG,OAAO;IACrD;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,qBAAqB,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAE1D;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAG,OAAO,EAAE,KAAK,EAAE,uBAAuB,CAAC,IAAI,CAAC,GAAG,YAAY,CAmDrG;yBAnDe,kBAAkB"}
@@ -1,4 +1,4 @@
1
- import { CellRenderContext, ColumnEditorContext, TypeDefault } from '../../../../dist/libs/grid/index.d.ts';
1
+ import { CellRenderContext, ColumnEditorContext, TypeDefault } from '@toolbox-web/grid';
2
2
  import { FC, ReactNode } from 'react';
3
3
  /**
4
4
  * React-specific type default configuration.
@@ -1,4 +1,4 @@
1
- import { CellRenderContext, ColumnConfig, ColumnEditorContext, GridConfig } from '../../../../dist/libs/grid/index.d.ts';
1
+ import { CellRenderContext, ColumnConfig, ColumnEditorContext, GridConfig } from '@toolbox-web/grid';
2
2
  import { ReactNode } from 'react';
3
3
  /**
4
4
  * Extended column config that supports React components for renderers/editors.
@@ -1,4 +1,4 @@
1
- import { CellRenderContext, ColumnEditorContext, ColumnEditorSpec, ColumnViewRenderer, FrameworkAdapter, TypeDefault } from '../../../../dist/libs/grid/index.d.ts';
1
+ import { CellRenderContext, ColumnEditorContext, ColumnEditorSpec, ColumnViewRenderer, FrameworkAdapter, TypeDefault } from '@toolbox-web/grid';
2
2
  import { ReactNode } from 'react';
3
3
  import { TypeDefaultsMap } from './grid-type-registry';
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { DataGridElement } from '../../../../dist/libs/grid/index.d.ts';
1
+ import { DataGridElement } from '@toolbox-web/grid';
2
2
  /**
3
3
  * Type-safe grid event names and their payload types.
4
4
  */
@@ -37,30 +37,34 @@ export type GridEventMap<TRow = unknown> = {
37
37
  }>;
38
38
  };
39
39
  /**
40
- * Hook for subscribing to grid events with automatic cleanup.
40
+ * @deprecated Use event props directly on DataGrid instead of useGridEvent.
41
41
  *
42
- * ## Usage
42
+ * ## Migration Guide
43
43
  *
44
+ * **Before (useGridEvent):**
44
45
  * ```tsx
45
- * import { DataGrid, useGridEvent, DataGridRef } from '@toolbox-web/grid-react';
46
- * import { useRef } from 'react';
47
- *
48
- * function MyComponent() {
49
- * const gridRef = useRef<DataGridRef>(null);
46
+ * const gridRef = useRef<DataGridRef>(null);
47
+ * useGridEvent(gridRef, 'selection-change', (e) => console.log(e.detail));
48
+ * return <DataGrid ref={gridRef} rows={rows} />;
49
+ * ```
50
50
  *
51
- * // Subscribe to cell edit events
52
- * useGridEvent(gridRef, 'cell-edit', (event) => {
53
- * console.log('Cell edited:', event.detail);
54
- * });
51
+ * **After (event props):**
52
+ * ```tsx
53
+ * return (
54
+ * <DataGrid
55
+ * rows={rows}
56
+ * onSelectionChange={(e) => console.log(e.detail)}
57
+ * />
58
+ * );
59
+ * ```
55
60
  *
56
- * // Subscribe to row clicks
57
- * useGridEvent(gridRef, 'row-click', (event) => {
58
- * console.log('Row clicked:', event.detail.row);
59
- * });
61
+ * Event props provide:
62
+ * - Cleaner, more declarative API
63
+ * - Automatic cleanup (no manual ref management)
64
+ * - Better TypeScript inference
65
+ * - Consistent with React patterns
60
66
  *
61
- * return <DataGrid ref={gridRef} rows={rows} />;
62
- * }
63
- * ```
67
+ * See the full list of event props in the DataGrid documentation.
64
68
  *
65
69
  * @param gridRef - Ref to the DataGrid component or element
66
70
  * @param eventName - Name of the grid event to listen for
@@ -1 +1 @@
1
- {"version":3,"file":"use-grid-event.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/use-grid-event.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,IAAI,GAAG,OAAO,IAAI;IACzC,aAAa,EAAE,WAAW,CAAC;QA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C,CAAC;IACnE,cAAc,EAAE,WAAW,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACjE,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAG,OAAO,EAAE,CAAC,SAAS,MAAM,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,EACxG,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IAAE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;CAAE,GAAG,eAAe,GAAG,IAAI,CAAC,EACvF,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAC/C,IAAI,GAAE,OAAO,EAAO,GACnB,IAAI,CA4CN"}
package/lib/use-grid.d.ts CHANGED
@@ -1,9 +1,53 @@
1
- import { ColumnConfig, DataGridElement, GridConfig } from '../../../../dist/libs/grid/index.d.ts';
1
+ import { ColumnConfig, DataGridElement, GridConfig } from '@toolbox-web/grid';
2
2
  import { DataGridRef } from './data-grid';
3
+ /**
4
+ * Selection convenience methods returned from useGrid.
5
+ */
6
+ export interface SelectionMethods<TRow = unknown> {
7
+ /**
8
+ * Select all rows in the grid.
9
+ * Requires SelectionPlugin with mode: 'row'.
10
+ */
11
+ selectAll: () => void;
12
+ /**
13
+ * Clear all selection.
14
+ * Works with any SelectionPlugin mode.
15
+ */
16
+ clearSelection: () => void;
17
+ /**
18
+ * Get selected row indices.
19
+ * Returns Set of selected row indices.
20
+ */
21
+ getSelectedIndices: () => Set<number>;
22
+ /**
23
+ * Get selected rows data.
24
+ * Returns array of selected row objects.
25
+ */
26
+ getSelectedRows: () => TRow[];
27
+ }
28
+ /**
29
+ * Export convenience methods returned from useGrid.
30
+ */
31
+ export interface ExportMethods {
32
+ /**
33
+ * Export grid data to CSV file.
34
+ * Requires ExportPlugin to be loaded.
35
+ *
36
+ * @param filename - Optional filename (defaults to 'export.csv')
37
+ */
38
+ exportToCsv: (filename?: string) => void;
39
+ /**
40
+ * Export grid data to JSON file.
41
+ * Requires ExportPlugin to be loaded.
42
+ *
43
+ * @param filename - Optional filename (defaults to 'export.json')
44
+ */
45
+ exportToJson: (filename?: string) => void;
46
+ }
3
47
  /**
4
48
  * Return type for useGrid hook.
5
49
  */
6
- export interface UseGridReturn<TRow = unknown> {
50
+ export interface UseGridReturn<TRow = unknown> extends SelectionMethods<TRow>, ExportMethods {
7
51
  /** Ref to attach to the DataGrid component (returns DataGridRef handle) */
8
52
  ref: React.RefObject<DataGridRef<TRow> | null>;
9
53
  /** Direct access to the typed grid element (convenience for ref.current?.element) */
@@ -1 +1 @@
1
- {"version":3,"file":"use-grid.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/use-grid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,IAAI,GAAG,OAAO;IAC3C,2EAA2E;IAC3E,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/C,qFAAqF;IACrF,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChC,sCAAsC;IACtC,SAAS,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAClD,mCAAmC;IACnC,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EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,IAAI,GAAG,OAAO,CAAE,SAAQ,gBAAgB,CAAC,IAAI,CAAC,EAAE,aAAa;IAC1F,2EAA2E;IAC3E,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAC/C,qFAAqF;IACrF,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,gCAAgC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAChC,sCAAsC;IACtC,SAAS,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IAClD,mCAAmC;IACnC,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,yBAAyB;IACzB,WAAW,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,6BAA6B;IAC7B,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,+BAA+B;IAC/B,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,kCAAkC;IAClC,iBAAiB,EAAE,MAAM,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,OAAO,CAAC,IAAI,GAAG,OAAO,KAAK,aAAa,CAAC,IAAI,CAAC,CAyJ7D"}
@@ -0,0 +1,21 @@
1
+ import { AllFeatureProps } from './feature-props';
2
+ import { FeatureName } from './feature-registry';
3
+ /**
4
+ * Validates that all required dependencies are met for the requested features.
5
+ * Logs a warning if a dependency is missing.
6
+ */
7
+ export declare function validateFeatureDependencies(featureNames: FeatureName[]): void;
8
+ /**
9
+ * Creates plugin instances synchronously from feature props.
10
+ * Returns an array of plugin instances for all registered features.
11
+ *
12
+ * @param featureProps - The feature props from DataGrid
13
+ * @returns Array of plugin instances
14
+ */
15
+ export declare function createPluginsFromFeatures<TRow = unknown>(featureProps: Partial<AllFeatureProps<TRow>>): unknown[];
16
+ /**
17
+ * Get list of feature names that are enabled but not registered.
18
+ * Useful for debugging.
19
+ */
20
+ export declare function getUnregisteredFeatures(featureProps: Partial<AllFeatureProps>): FeatureName[];
21
+ //# sourceMappingURL=use-sync-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-sync-plugins.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/use-sync-plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAgD,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAWpG;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,IAAI,CAgB7E;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,GAAG,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,CAuCjH;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,WAAW,EAAE,CAa7F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolbox-web/grid-react",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "React adapter for @toolbox-web/grid data grid component",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -12,6 +12,16 @@
12
12
  "types": "./index.d.ts",
13
13
  "import": "./index.js",
14
14
  "default": "./index.js"
15
+ },
16
+ "./features": {
17
+ "types": "./features/index.d.ts",
18
+ "import": "./features/index.js",
19
+ "default": "./features/index.js"
20
+ },
21
+ "./features/*": {
22
+ "types": "./features/*.d.ts",
23
+ "import": "./features/*.js",
24
+ "default": "./features/*.js"
15
25
  }
16
26
  },
17
27
  "keywords": [