@toolbox-web/grid-react 0.6.0 → 0.8.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.
- package/README.md +158 -2
- package/chunks/feature-registry-Y3KvnN54.js +26 -0
- package/chunks/multi-sort-Ae2VVdZb.js +3 -0
- package/features/clipboard.d.ts +18 -0
- package/features/clipboard.d.ts.map +1 -0
- package/features/clipboard.js +6 -0
- package/features/column-virtualization.d.ts +16 -0
- package/features/column-virtualization.d.ts.map +1 -0
- package/features/column-virtualization.js +6 -0
- package/features/context-menu.d.ts +16 -0
- package/features/context-menu.d.ts.map +1 -0
- package/features/context-menu.js +6 -0
- package/features/editing.d.ts +16 -0
- package/features/editing.d.ts.map +1 -0
- package/features/editing.js +3 -0
- package/features/export.d.ts +16 -0
- package/features/export.d.ts.map +1 -0
- package/features/export.js +6 -0
- package/features/filtering.d.ts +16 -0
- package/features/filtering.d.ts.map +1 -0
- package/features/filtering.js +6 -0
- package/features/grouping-columns.d.ts +16 -0
- package/features/grouping-columns.d.ts.map +1 -0
- package/features/grouping-columns.js +6 -0
- package/features/grouping-rows.d.ts +16 -0
- package/features/grouping-rows.d.ts.map +1 -0
- package/features/grouping-rows.js +6 -0
- package/features/index.d.ts +1 -0
- package/features/index.d.ts.map +1 -0
- package/features/index.js +22 -0
- package/features/master-detail.d.ts +18 -0
- package/features/master-detail.d.ts.map +1 -0
- package/features/master-detail.js +6 -0
- package/features/multi-sort.d.ts +22 -0
- package/features/multi-sort.d.ts.map +1 -0
- package/features/pinned-columns.d.ts +16 -0
- package/features/pinned-columns.d.ts.map +1 -0
- package/features/pinned-columns.js +6 -0
- package/features/pinned-rows.d.ts +16 -0
- package/features/pinned-rows.d.ts.map +1 -0
- package/features/pinned-rows.js +6 -0
- package/features/pivot.d.ts +16 -0
- package/features/pivot.d.ts.map +1 -0
- package/features/pivot.js +3 -0
- package/features/print.d.ts +16 -0
- package/features/print.d.ts.map +1 -0
- package/features/print.js +3 -0
- package/features/reorder.d.ts +16 -0
- package/features/reorder.d.ts.map +1 -0
- package/features/reorder.js +6 -0
- package/features/responsive.d.ts +16 -0
- package/features/responsive.d.ts.map +1 -0
- package/features/responsive.js +6 -0
- package/features/row-reorder.d.ts +16 -0
- package/features/row-reorder.d.ts.map +1 -0
- package/features/row-reorder.js +3 -0
- package/features/selection.d.ts +16 -0
- package/features/selection.d.ts.map +1 -0
- package/features/selection.js +3 -0
- package/features/server-side.d.ts +16 -0
- package/features/server-side.d.ts.map +1 -0
- package/features/server-side.js +3 -0
- package/features/sorting.d.ts +1 -0
- package/features/sorting.d.ts.map +1 -0
- package/features/sorting.js +1 -0
- package/features/tree.d.ts +16 -0
- package/features/tree.d.ts.map +1 -0
- package/features/tree.js +6 -0
- package/features/undo-redo.d.ts +18 -0
- package/features/undo-redo.d.ts.map +1 -0
- package/features/undo-redo.js +6 -0
- package/features/visibility.d.ts +16 -0
- package/features/visibility.d.ts.map +1 -0
- package/features/visibility.js +6 -0
- package/index.d.ts +6 -3
- package/index.d.ts.map +1 -1
- package/index.js +625 -430
- package/lib/column-shorthand.d.ts +59 -0
- package/lib/column-shorthand.d.ts.map +1 -0
- package/lib/context-types.d.ts +1 -1
- package/lib/data-grid.d.ts +118 -26
- package/lib/data-grid.d.ts.map +1 -1
- package/lib/event-props.d.ts +305 -0
- package/lib/event-props.d.ts.map +1 -0
- package/lib/feature-props.d.ts +329 -0
- package/lib/feature-props.d.ts.map +1 -0
- package/lib/feature-registry.d.ts +56 -0
- package/lib/feature-registry.d.ts.map +1 -0
- package/lib/grid-column.d.ts +1 -1
- package/lib/grid-detail-panel.d.ts +3 -0
- package/lib/grid-detail-panel.d.ts.map +1 -1
- package/lib/grid-responsive-card.d.ts +3 -0
- package/lib/grid-responsive-card.d.ts.map +1 -1
- package/lib/grid-type-registry.d.ts +1 -1
- package/lib/grid-type-registry.d.ts.map +1 -1
- package/lib/react-column-config.d.ts +1 -1
- package/lib/react-grid-adapter.d.ts +1 -1
- package/lib/react-grid-adapter.d.ts.map +1 -1
- package/lib/use-grid-event.d.ts +23 -19
- package/lib/use-grid-event.d.ts.map +1 -1
- package/lib/use-grid.d.ts +46 -2
- package/lib/use-grid.d.ts.map +1 -1
- package/lib/use-sync-plugins.d.ts +21 -0
- package/lib/use-sync-plugins.d.ts.map +1 -0
- package/package.json +11 -1
|
@@ -0,0 +1,329 @@
|
|
|
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 multi-column sorting.
|
|
67
|
+
*
|
|
68
|
+
* Multi-sort allows users to sort by multiple columns simultaneously.
|
|
69
|
+
* For basic single-column sorting, columns with `sortable: true` work without this plugin.
|
|
70
|
+
* Use the `sortable` prop to disable all sorting grid-wide.
|
|
71
|
+
*
|
|
72
|
+
* @requires `import '@toolbox-web/grid-react/features/multi-sort';`
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* // Enable multi-column sorting
|
|
77
|
+
* <DataGrid multiSort />
|
|
78
|
+
*
|
|
79
|
+
* // Limit to single column (uses plugin but restricts to 1)
|
|
80
|
+
* <DataGrid multiSort="single" />
|
|
81
|
+
*
|
|
82
|
+
* // Full config
|
|
83
|
+
* <DataGrid multiSort={{ maxSortColumns: 3 }} />
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
multiSort?: boolean | 'single' | 'multi' | MultiSortConfig;
|
|
87
|
+
/**
|
|
88
|
+
* @deprecated Use `multiSort` instead. Will be removed in a future version.
|
|
89
|
+
*
|
|
90
|
+
* Enable column sorting. This is an alias for `multiSort`.
|
|
91
|
+
*
|
|
92
|
+
* @requires `import '@toolbox-web/grid-react/features/multi-sort';`
|
|
93
|
+
*/
|
|
94
|
+
sorting?: boolean | 'single' | 'multi' | MultiSortConfig;
|
|
95
|
+
/**
|
|
96
|
+
* Enable column filtering.
|
|
97
|
+
*
|
|
98
|
+
* @requires `import '@toolbox-web/grid-react/features/filtering';`
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```tsx
|
|
102
|
+
* <DataGrid filtering />
|
|
103
|
+
* <DataGrid filtering={{ debounceMs: 200 }} />
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
filtering?: boolean | FilterConfig<TRow>;
|
|
107
|
+
/**
|
|
108
|
+
* Enable column drag-to-reorder.
|
|
109
|
+
*
|
|
110
|
+
* @requires `import '@toolbox-web/grid-react/features/reorder';`
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```tsx
|
|
114
|
+
* <DataGrid reorder />
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
reorder?: boolean | ReorderConfig;
|
|
118
|
+
/**
|
|
119
|
+
* Enable column visibility toggle panel.
|
|
120
|
+
*
|
|
121
|
+
* @requires `import '@toolbox-web/grid-react/features/visibility';`
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```tsx
|
|
125
|
+
* <DataGrid visibility />
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
visibility?: boolean | VisibilityConfig;
|
|
129
|
+
/**
|
|
130
|
+
* Enable pinned/sticky columns.
|
|
131
|
+
* Columns are pinned via the `sticky` column property.
|
|
132
|
+
*
|
|
133
|
+
* @requires `import '@toolbox-web/grid-react/features/pinned-columns';`
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* <DataGrid pinnedColumns columns={[
|
|
138
|
+
* { field: 'id', sticky: 'left' },
|
|
139
|
+
* { field: 'name' },
|
|
140
|
+
* { field: 'actions', sticky: 'right' },
|
|
141
|
+
* ]} />
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
pinnedColumns?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Enable multi-level column headers (column groups).
|
|
147
|
+
*
|
|
148
|
+
* @requires `import '@toolbox-web/grid-react/features/grouping-columns';`
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```tsx
|
|
152
|
+
* <DataGrid groupingColumns={{
|
|
153
|
+
* columnGroups: [
|
|
154
|
+
* { header: 'Personal Info', children: ['firstName', 'lastName'] },
|
|
155
|
+
* ],
|
|
156
|
+
* }} />
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
groupingColumns?: boolean | GroupingColumnsConfig;
|
|
160
|
+
/**
|
|
161
|
+
* Enable horizontal column virtualization for wide grids.
|
|
162
|
+
*
|
|
163
|
+
* @requires `import '@toolbox-web/grid-react/features/column-virtualization';`
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```tsx
|
|
167
|
+
* <DataGrid columnVirtualization />
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
columnVirtualization?: boolean | ColumnVirtualizationConfig;
|
|
171
|
+
/**
|
|
172
|
+
* Enable row drag-to-reorder.
|
|
173
|
+
*
|
|
174
|
+
* @requires `import '@toolbox-web/grid-react/features/row-reorder';`
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```tsx
|
|
178
|
+
* <DataGrid rowReorder />
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
181
|
+
rowReorder?: boolean | RowReorderConfig;
|
|
182
|
+
/**
|
|
183
|
+
* Enable row grouping by field values.
|
|
184
|
+
*
|
|
185
|
+
* @requires `import '@toolbox-web/grid-react/features/grouping-rows';`
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
* ```tsx
|
|
189
|
+
* <DataGrid groupingRows={{
|
|
190
|
+
* groupBy: ['department', 'team'],
|
|
191
|
+
* defaultExpanded: true,
|
|
192
|
+
* }} />
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
groupingRows?: GroupingRowsConfig;
|
|
196
|
+
/**
|
|
197
|
+
* Enable pinned rows (aggregation/status bar).
|
|
198
|
+
*
|
|
199
|
+
* @requires `import '@toolbox-web/grid-react/features/pinned-rows';`
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```tsx
|
|
203
|
+
* <DataGrid pinnedRows={{
|
|
204
|
+
* bottom: [{ type: 'aggregation', aggregator: 'sum' }],
|
|
205
|
+
* }} />
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
pinnedRows?: boolean | PinnedRowsConfig;
|
|
209
|
+
/**
|
|
210
|
+
* Enable hierarchical tree view.
|
|
211
|
+
*
|
|
212
|
+
* @requires `import '@toolbox-web/grid-react/features/tree';`
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```tsx
|
|
216
|
+
* <DataGrid tree={{
|
|
217
|
+
* childrenField: 'children',
|
|
218
|
+
* defaultExpanded: true,
|
|
219
|
+
* }} />
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
222
|
+
tree?: boolean | TreeConfig;
|
|
223
|
+
/**
|
|
224
|
+
* Enable master-detail expandable rows.
|
|
225
|
+
*
|
|
226
|
+
* @requires `import '@toolbox-web/grid-react/features/master-detail';`
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```tsx
|
|
230
|
+
* <DataGrid masterDetail={{
|
|
231
|
+
* renderer: (row) => <OrderDetails order={row} />,
|
|
232
|
+
* }} />
|
|
233
|
+
* ```
|
|
234
|
+
*/
|
|
235
|
+
masterDetail?: MasterDetailConfig;
|
|
236
|
+
/**
|
|
237
|
+
* Enable responsive card layout for narrow viewports.
|
|
238
|
+
*
|
|
239
|
+
* @requires `import '@toolbox-web/grid-react/features/responsive';`
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```tsx
|
|
243
|
+
* <DataGrid responsive={{
|
|
244
|
+
* breakpoint: 768,
|
|
245
|
+
* cardRenderer: (row) => <EmployeeCard employee={row} />,
|
|
246
|
+
* }} />
|
|
247
|
+
* ```
|
|
248
|
+
*/
|
|
249
|
+
responsive?: boolean | ResponsivePluginConfig;
|
|
250
|
+
/**
|
|
251
|
+
* Enable undo/redo for cell edits.
|
|
252
|
+
* Requires editing to be enabled (will be auto-added).
|
|
253
|
+
*
|
|
254
|
+
* @requires `import '@toolbox-web/grid-react/features/undo-redo';`
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```tsx
|
|
258
|
+
* <DataGrid editing="dblclick" undoRedo />
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
undoRedo?: boolean | UndoRedoConfig;
|
|
262
|
+
/**
|
|
263
|
+
* Enable CSV/JSON export functionality.
|
|
264
|
+
*
|
|
265
|
+
* @requires `import '@toolbox-web/grid-react/features/export';`
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```tsx
|
|
269
|
+
* <DataGrid export />
|
|
270
|
+
* <DataGrid export={{ filename: 'data.csv' }} />
|
|
271
|
+
* ```
|
|
272
|
+
*/
|
|
273
|
+
export?: boolean | ExportConfig;
|
|
274
|
+
/**
|
|
275
|
+
* Enable print functionality.
|
|
276
|
+
*
|
|
277
|
+
* @requires `import '@toolbox-web/grid-react/features/print';`
|
|
278
|
+
*
|
|
279
|
+
* @example
|
|
280
|
+
* ```tsx
|
|
281
|
+
* <DataGrid print />
|
|
282
|
+
* ```
|
|
283
|
+
*/
|
|
284
|
+
print?: boolean | PrintConfig;
|
|
285
|
+
/**
|
|
286
|
+
* Enable pivot table functionality.
|
|
287
|
+
*
|
|
288
|
+
* @requires `import '@toolbox-web/grid-react/features/pivot';`
|
|
289
|
+
*
|
|
290
|
+
* @example
|
|
291
|
+
* ```tsx
|
|
292
|
+
* <DataGrid pivot={{
|
|
293
|
+
* rowFields: ['category'],
|
|
294
|
+
* columnFields: ['year'],
|
|
295
|
+
* valueField: 'sales',
|
|
296
|
+
* }} />
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
299
|
+
pivot?: PivotConfig;
|
|
300
|
+
/**
|
|
301
|
+
* Enable server-side data operations.
|
|
302
|
+
*
|
|
303
|
+
* @requires `import '@toolbox-web/grid-react/features/server-side';`
|
|
304
|
+
*
|
|
305
|
+
* @example
|
|
306
|
+
* ```tsx
|
|
307
|
+
* <DataGrid serverSide={{
|
|
308
|
+
* dataSource: async (params) => fetchData(params),
|
|
309
|
+
* }} />
|
|
310
|
+
* ```
|
|
311
|
+
*/
|
|
312
|
+
serverSide?: ServerSideConfig;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Props for controlling SSR behavior.
|
|
316
|
+
*/
|
|
317
|
+
export interface SSRProps {
|
|
318
|
+
/**
|
|
319
|
+
* Enable SSR mode - disables feature plugins for server-side rendering.
|
|
320
|
+
* In SSR mode, the grid renders without interactive features.
|
|
321
|
+
* @default false
|
|
322
|
+
*/
|
|
323
|
+
ssr?: boolean;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* All feature-related props combined.
|
|
327
|
+
*/
|
|
328
|
+
export type AllFeatureProps<TRow = unknown> = FeatureProps<TRow> & SSRProps;
|
|
329
|
+
//# sourceMappingURL=feature-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-props.d.ts","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{ 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"}
|
package/lib/grid-column.d.ts
CHANGED
|
@@ -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;AAC1E,OAAO,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,IAAI,GAAG,OAAO;IAChD,yCAAyC;IACzC,GAAG,EAAE,IAAI,CAAC;IACV,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;;GAGG;AACH,wBAAgB,iBAAiB,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"}
|
|
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;AAC1E,OAAO,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,IAAI,GAAG,OAAO;IAChD,yCAAyC;IACzC,GAAG,EAAE,IAAI,CAAC;IACV,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD;;;GAGG;AACH,wBAAgB,iBAAiB,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 '
|
|
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 +1 @@
|
|
|
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,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAEtD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,eAAe,GAAG,IAAI,CAE5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,EAC7D,IAAI,EAAE,MAAM,GACX,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,SAAS,CAG5C;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,GAAG,OAAO,EAC9D,YAAY,EAAE,gBAAgB,CAAC,IAAI,CAAC,EACpC,eAAe,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,WAAW,GAChD,WAAW,CAAC,IAAI,CAAC,CAuBnB;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,iDAAkB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CellRenderContext, ColumnConfig, ColumnEditorContext, GridConfig } from '
|
|
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 '
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-grid-adapter.d.ts","sourceRoot":"","sources":["../../../../libs/grid-react/src/lib/react-grid-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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AAI,IAAI;IAWf;;OAEG;IACH,OAAO,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI;CAYtC"}
|
package/lib/use-grid-event.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataGridElement } from '
|
|
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
|
-
*
|
|
40
|
+
* @deprecated Use event props directly on DataGrid instead of useGridEvent.
|
|
41
41
|
*
|
|
42
|
-
* ##
|
|
42
|
+
* ## Migration Guide
|
|
43
43
|
*
|
|
44
|
+
* **Before (useGridEvent):**
|
|
44
45
|
* ```tsx
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
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
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
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
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
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
|
-
*
|
|
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;QAAE,IAAI,EAAE,IAAI,EAAE,CAAA;KAAE,CAAC,CAAC;IAC7C,WAAW,EAAE,WAAW,CAAC;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC7F,WAAW,EAAE,WAAW,CAAC;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IACrF,qBAAqB,EAAE,WAAW,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC,CAAC;IAC3D,aAAa,EAAE,WAAW,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAChF,kBAAkB,EAAE,WAAW,CAAC;QAAE,YAAY,EAAE,IAAI,EAAE,CAAC;QAAC,eAAe,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACrF,eAAe,EAAE,WAAW,CAA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M,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,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 '
|
|
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) */
|
package/lib/use-grid.d.ts.map
CHANGED
|
@@ -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;AAC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,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,CAkDjH;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,WAAW,EAAE,CAa7F"}
|