@quickbuilder.io/data-grid 0.0.0-stage → 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.
- package/LICENSE +21 -0
- package/README.md +308 -2
- package/dist/index.d.mts +884 -0
- package/dist/index.d.ts +884 -0
- package/dist/index.js +605 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +577 -0
- package/dist/index.mjs.map +1 -0
- package/dist/react.d.mts +1372 -0
- package/dist/react.d.ts +1372 -0
- package/dist/react.js +6728 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +6696 -0
- package/dist/react.mjs.map +1 -0
- package/package.json +87 -4
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,1372 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopoverMenuProps } from '@quickbuilder.io/design-system/react';
|
|
3
|
+
|
|
4
|
+
interface DataGridFrameworkAdapterSupport {
|
|
5
|
+
framework: 'react' | 'vue' | 'preact' | 'qwik' | 'astro' | 'svelte' | 'solid' | 'web-components';
|
|
6
|
+
entrypoint?: string;
|
|
7
|
+
status: 'implemented' | 'unsupported';
|
|
8
|
+
}
|
|
9
|
+
interface DataGridFrameworkAdapterContract {
|
|
10
|
+
apiVersion: 1;
|
|
11
|
+
capabilities: readonly string[];
|
|
12
|
+
entrypoint: string;
|
|
13
|
+
framework: string;
|
|
14
|
+
id: string;
|
|
15
|
+
packageName: '@quickbuilder.io/data-grid';
|
|
16
|
+
status: 'implemented';
|
|
17
|
+
}
|
|
18
|
+
declare const dataGridFrameworkAdapterSupport: readonly [{
|
|
19
|
+
readonly framework: "react";
|
|
20
|
+
readonly entrypoint: "@quickbuilder.io/data-grid/react";
|
|
21
|
+
readonly status: "implemented";
|
|
22
|
+
}, {
|
|
23
|
+
readonly framework: "vue";
|
|
24
|
+
readonly status: "unsupported";
|
|
25
|
+
}, {
|
|
26
|
+
readonly framework: "preact";
|
|
27
|
+
readonly status: "unsupported";
|
|
28
|
+
}, {
|
|
29
|
+
readonly framework: "qwik";
|
|
30
|
+
readonly status: "unsupported";
|
|
31
|
+
}, {
|
|
32
|
+
readonly framework: "astro";
|
|
33
|
+
readonly status: "unsupported";
|
|
34
|
+
}, {
|
|
35
|
+
readonly framework: "svelte";
|
|
36
|
+
readonly status: "unsupported";
|
|
37
|
+
}, {
|
|
38
|
+
readonly framework: "solid";
|
|
39
|
+
readonly status: "unsupported";
|
|
40
|
+
}, {
|
|
41
|
+
readonly framework: "web-components";
|
|
42
|
+
readonly status: "unsupported";
|
|
43
|
+
}];
|
|
44
|
+
declare const frameworkAdapterSupport: readonly [{
|
|
45
|
+
readonly framework: "react";
|
|
46
|
+
readonly entrypoint: "@quickbuilder.io/data-grid/react";
|
|
47
|
+
readonly status: "implemented";
|
|
48
|
+
}, {
|
|
49
|
+
readonly framework: "vue";
|
|
50
|
+
readonly status: "unsupported";
|
|
51
|
+
}, {
|
|
52
|
+
readonly framework: "preact";
|
|
53
|
+
readonly status: "unsupported";
|
|
54
|
+
}, {
|
|
55
|
+
readonly framework: "qwik";
|
|
56
|
+
readonly status: "unsupported";
|
|
57
|
+
}, {
|
|
58
|
+
readonly framework: "astro";
|
|
59
|
+
readonly status: "unsupported";
|
|
60
|
+
}, {
|
|
61
|
+
readonly framework: "svelte";
|
|
62
|
+
readonly status: "unsupported";
|
|
63
|
+
}, {
|
|
64
|
+
readonly framework: "solid";
|
|
65
|
+
readonly status: "unsupported";
|
|
66
|
+
}, {
|
|
67
|
+
readonly framework: "web-components";
|
|
68
|
+
readonly status: "unsupported";
|
|
69
|
+
}];
|
|
70
|
+
|
|
71
|
+
type DataGridCapabilityPackage = 'community' | 'pro' | 'deferred-premium';
|
|
72
|
+
type DataGridCapabilityStatus = 'implemented' | 'partial' | 'planned';
|
|
73
|
+
type DataGridCapabilityCategory = 'main' | 'advanced' | 'component' | 'platform';
|
|
74
|
+
interface DataGridCapabilityFeature {
|
|
75
|
+
id: string;
|
|
76
|
+
label: string;
|
|
77
|
+
category: DataGridCapabilityCategory;
|
|
78
|
+
packageTarget: DataGridCapabilityPackage;
|
|
79
|
+
status: DataGridCapabilityStatus;
|
|
80
|
+
}
|
|
81
|
+
declare const dataGridCapabilityFeatures: readonly [{
|
|
82
|
+
readonly id: "layout";
|
|
83
|
+
readonly label: "Layout";
|
|
84
|
+
readonly category: "main";
|
|
85
|
+
readonly packageTarget: "community";
|
|
86
|
+
readonly status: "partial";
|
|
87
|
+
}, {
|
|
88
|
+
readonly id: "columns";
|
|
89
|
+
readonly label: "Columns";
|
|
90
|
+
readonly category: "main";
|
|
91
|
+
readonly packageTarget: "community";
|
|
92
|
+
readonly status: "partial";
|
|
93
|
+
}, {
|
|
94
|
+
readonly id: "column-resizing";
|
|
95
|
+
readonly label: "Column resizing";
|
|
96
|
+
readonly category: "main";
|
|
97
|
+
readonly packageTarget: "community";
|
|
98
|
+
readonly status: "partial";
|
|
99
|
+
}, {
|
|
100
|
+
readonly id: "column-reordering";
|
|
101
|
+
readonly label: "Column reordering";
|
|
102
|
+
readonly category: "main";
|
|
103
|
+
readonly packageTarget: "community";
|
|
104
|
+
readonly status: "partial";
|
|
105
|
+
}, {
|
|
106
|
+
readonly id: "column-spanning";
|
|
107
|
+
readonly label: "Column spanning";
|
|
108
|
+
readonly category: "main";
|
|
109
|
+
readonly packageTarget: "community";
|
|
110
|
+
readonly status: "implemented";
|
|
111
|
+
}, {
|
|
112
|
+
readonly id: "column-groups";
|
|
113
|
+
readonly label: "Column groups";
|
|
114
|
+
readonly category: "main";
|
|
115
|
+
readonly packageTarget: "pro";
|
|
116
|
+
readonly status: "partial";
|
|
117
|
+
}, {
|
|
118
|
+
readonly id: "pinned-columns";
|
|
119
|
+
readonly label: "Pinned columns";
|
|
120
|
+
readonly category: "main";
|
|
121
|
+
readonly packageTarget: "community";
|
|
122
|
+
readonly status: "partial";
|
|
123
|
+
}, {
|
|
124
|
+
readonly id: "pinned-rows";
|
|
125
|
+
readonly label: "Pinned rows";
|
|
126
|
+
readonly category: "main";
|
|
127
|
+
readonly packageTarget: "pro";
|
|
128
|
+
readonly status: "implemented";
|
|
129
|
+
}, {
|
|
130
|
+
readonly id: "rows";
|
|
131
|
+
readonly label: "Rows";
|
|
132
|
+
readonly category: "main";
|
|
133
|
+
readonly packageTarget: "community";
|
|
134
|
+
readonly status: "partial";
|
|
135
|
+
}, {
|
|
136
|
+
readonly id: "row-reordering";
|
|
137
|
+
readonly label: "Row reordering";
|
|
138
|
+
readonly category: "main";
|
|
139
|
+
readonly packageTarget: "pro";
|
|
140
|
+
readonly status: "implemented";
|
|
141
|
+
}, {
|
|
142
|
+
readonly id: "row-spanning";
|
|
143
|
+
readonly label: "Row spanning";
|
|
144
|
+
readonly category: "main";
|
|
145
|
+
readonly packageTarget: "deferred-premium";
|
|
146
|
+
readonly status: "planned";
|
|
147
|
+
}, {
|
|
148
|
+
readonly id: "cells";
|
|
149
|
+
readonly label: "Cells";
|
|
150
|
+
readonly category: "main";
|
|
151
|
+
readonly packageTarget: "community";
|
|
152
|
+
readonly status: "partial";
|
|
153
|
+
}, {
|
|
154
|
+
readonly id: "editing";
|
|
155
|
+
readonly label: "Editing";
|
|
156
|
+
readonly category: "main";
|
|
157
|
+
readonly packageTarget: "community";
|
|
158
|
+
readonly status: "partial";
|
|
159
|
+
}, {
|
|
160
|
+
readonly id: "sorting";
|
|
161
|
+
readonly label: "Sorting";
|
|
162
|
+
readonly category: "main";
|
|
163
|
+
readonly packageTarget: "community";
|
|
164
|
+
readonly status: "partial";
|
|
165
|
+
}, {
|
|
166
|
+
readonly id: "filtering";
|
|
167
|
+
readonly label: "Filtering";
|
|
168
|
+
readonly category: "main";
|
|
169
|
+
readonly packageTarget: "community";
|
|
170
|
+
readonly status: "partial";
|
|
171
|
+
}, {
|
|
172
|
+
readonly id: "pagination";
|
|
173
|
+
readonly label: "Pagination";
|
|
174
|
+
readonly category: "main";
|
|
175
|
+
readonly packageTarget: "community";
|
|
176
|
+
readonly status: "implemented";
|
|
177
|
+
}, {
|
|
178
|
+
readonly id: "selection";
|
|
179
|
+
readonly label: "Selection";
|
|
180
|
+
readonly category: "main";
|
|
181
|
+
readonly packageTarget: "community";
|
|
182
|
+
readonly status: "partial";
|
|
183
|
+
}, {
|
|
184
|
+
readonly id: "cell-selection";
|
|
185
|
+
readonly label: "Cell selection";
|
|
186
|
+
readonly category: "main";
|
|
187
|
+
readonly packageTarget: "community";
|
|
188
|
+
readonly status: "partial";
|
|
189
|
+
}, {
|
|
190
|
+
readonly id: "virtualization";
|
|
191
|
+
readonly label: "Virtualization";
|
|
192
|
+
readonly category: "main";
|
|
193
|
+
readonly packageTarget: "community";
|
|
194
|
+
readonly status: "partial";
|
|
195
|
+
}, {
|
|
196
|
+
readonly id: "header-filters";
|
|
197
|
+
readonly label: "Header filters";
|
|
198
|
+
readonly category: "main";
|
|
199
|
+
readonly packageTarget: "pro";
|
|
200
|
+
readonly status: "implemented";
|
|
201
|
+
}, {
|
|
202
|
+
readonly id: "accessibility";
|
|
203
|
+
readonly label: "Accessibility";
|
|
204
|
+
readonly category: "main";
|
|
205
|
+
readonly packageTarget: "community";
|
|
206
|
+
readonly status: "partial";
|
|
207
|
+
}, {
|
|
208
|
+
readonly id: "localization";
|
|
209
|
+
readonly label: "Localization";
|
|
210
|
+
readonly category: "main";
|
|
211
|
+
readonly packageTarget: "community";
|
|
212
|
+
readonly status: "partial";
|
|
213
|
+
}, {
|
|
214
|
+
readonly id: "tree-data";
|
|
215
|
+
readonly label: "Tree data";
|
|
216
|
+
readonly category: "advanced";
|
|
217
|
+
readonly packageTarget: "pro";
|
|
218
|
+
readonly status: "partial";
|
|
219
|
+
}, {
|
|
220
|
+
readonly id: "master-detail";
|
|
221
|
+
readonly label: "Master-detail row panels";
|
|
222
|
+
readonly category: "advanced";
|
|
223
|
+
readonly packageTarget: "pro";
|
|
224
|
+
readonly status: "implemented";
|
|
225
|
+
}, {
|
|
226
|
+
readonly id: "row-grouping";
|
|
227
|
+
readonly label: "Row grouping";
|
|
228
|
+
readonly category: "advanced";
|
|
229
|
+
readonly packageTarget: "pro";
|
|
230
|
+
readonly status: "partial";
|
|
231
|
+
}, {
|
|
232
|
+
readonly id: "aggregation";
|
|
233
|
+
readonly label: "Aggregation";
|
|
234
|
+
readonly category: "advanced";
|
|
235
|
+
readonly packageTarget: "pro";
|
|
236
|
+
readonly status: "partial";
|
|
237
|
+
}, {
|
|
238
|
+
readonly id: "pivoting";
|
|
239
|
+
readonly label: "Pivoting";
|
|
240
|
+
readonly category: "advanced";
|
|
241
|
+
readonly packageTarget: "pro";
|
|
242
|
+
readonly status: "implemented";
|
|
243
|
+
}, {
|
|
244
|
+
readonly id: "export";
|
|
245
|
+
readonly label: "Export";
|
|
246
|
+
readonly category: "advanced";
|
|
247
|
+
readonly packageTarget: "community";
|
|
248
|
+
readonly status: "partial";
|
|
249
|
+
}, {
|
|
250
|
+
readonly id: "copy-paste";
|
|
251
|
+
readonly label: "Copy and paste";
|
|
252
|
+
readonly category: "advanced";
|
|
253
|
+
readonly packageTarget: "pro";
|
|
254
|
+
readonly status: "partial";
|
|
255
|
+
}, {
|
|
256
|
+
readonly id: "undo-redo";
|
|
257
|
+
readonly label: "Undo and redo";
|
|
258
|
+
readonly category: "advanced";
|
|
259
|
+
readonly packageTarget: "pro";
|
|
260
|
+
readonly status: "partial";
|
|
261
|
+
}, {
|
|
262
|
+
readonly id: "scrolling";
|
|
263
|
+
readonly label: "Scrolling";
|
|
264
|
+
readonly category: "advanced";
|
|
265
|
+
readonly packageTarget: "community";
|
|
266
|
+
readonly status: "partial";
|
|
267
|
+
}, {
|
|
268
|
+
readonly id: "list-view";
|
|
269
|
+
readonly label: "List view";
|
|
270
|
+
readonly category: "advanced";
|
|
271
|
+
readonly packageTarget: "community";
|
|
272
|
+
readonly status: "planned";
|
|
273
|
+
}, {
|
|
274
|
+
readonly id: "server-side-data";
|
|
275
|
+
readonly label: "Server-side data";
|
|
276
|
+
readonly category: "advanced";
|
|
277
|
+
readonly packageTarget: "community";
|
|
278
|
+
readonly status: "partial";
|
|
279
|
+
}, {
|
|
280
|
+
readonly id: "server-side-hierarchy";
|
|
281
|
+
readonly label: "Server-side hierarchy";
|
|
282
|
+
readonly category: "advanced";
|
|
283
|
+
readonly packageTarget: "pro";
|
|
284
|
+
readonly status: "partial";
|
|
285
|
+
}, {
|
|
286
|
+
readonly id: "server-side-export";
|
|
287
|
+
readonly label: "Server-side export";
|
|
288
|
+
readonly category: "advanced";
|
|
289
|
+
readonly packageTarget: "community";
|
|
290
|
+
readonly status: "partial";
|
|
291
|
+
}, {
|
|
292
|
+
readonly id: "server-side-hierarchy-export";
|
|
293
|
+
readonly label: "Server-side hierarchy export";
|
|
294
|
+
readonly category: "advanced";
|
|
295
|
+
readonly packageTarget: "pro";
|
|
296
|
+
readonly status: "partial";
|
|
297
|
+
}, {
|
|
298
|
+
readonly id: "charts-integration";
|
|
299
|
+
readonly label: "Charts integration";
|
|
300
|
+
readonly category: "advanced";
|
|
301
|
+
readonly packageTarget: "pro";
|
|
302
|
+
readonly status: "implemented";
|
|
303
|
+
}, {
|
|
304
|
+
readonly id: "ai-assistant";
|
|
305
|
+
readonly label: "AI assistant";
|
|
306
|
+
readonly category: "advanced";
|
|
307
|
+
readonly packageTarget: "pro";
|
|
308
|
+
readonly status: "implemented";
|
|
309
|
+
}, {
|
|
310
|
+
readonly id: "toolbar";
|
|
311
|
+
readonly label: "Toolbar";
|
|
312
|
+
readonly category: "component";
|
|
313
|
+
readonly packageTarget: "community";
|
|
314
|
+
readonly status: "implemented";
|
|
315
|
+
}, {
|
|
316
|
+
readonly id: "export-controls";
|
|
317
|
+
readonly label: "Export controls";
|
|
318
|
+
readonly category: "component";
|
|
319
|
+
readonly packageTarget: "community";
|
|
320
|
+
readonly status: "implemented";
|
|
321
|
+
}, {
|
|
322
|
+
readonly id: "quick-filter";
|
|
323
|
+
readonly label: "Quick filter";
|
|
324
|
+
readonly category: "component";
|
|
325
|
+
readonly packageTarget: "community";
|
|
326
|
+
readonly status: "implemented";
|
|
327
|
+
}, {
|
|
328
|
+
readonly id: "columns-panel";
|
|
329
|
+
readonly label: "Columns panel";
|
|
330
|
+
readonly category: "component";
|
|
331
|
+
readonly packageTarget: "community";
|
|
332
|
+
readonly status: "implemented";
|
|
333
|
+
}, {
|
|
334
|
+
readonly id: "filter-panel";
|
|
335
|
+
readonly label: "Filter panel";
|
|
336
|
+
readonly category: "component";
|
|
337
|
+
readonly packageTarget: "community";
|
|
338
|
+
readonly status: "implemented";
|
|
339
|
+
}, {
|
|
340
|
+
readonly id: "column-menu";
|
|
341
|
+
readonly label: "Column menu";
|
|
342
|
+
readonly category: "component";
|
|
343
|
+
readonly packageTarget: "community";
|
|
344
|
+
readonly status: "implemented";
|
|
345
|
+
}, {
|
|
346
|
+
readonly id: "preset-controls";
|
|
347
|
+
readonly label: "Preset controls";
|
|
348
|
+
readonly category: "component";
|
|
349
|
+
readonly packageTarget: "pro";
|
|
350
|
+
readonly status: "partial";
|
|
351
|
+
}, {
|
|
352
|
+
readonly id: "prompt-field";
|
|
353
|
+
readonly label: "Prompt field";
|
|
354
|
+
readonly category: "component";
|
|
355
|
+
readonly packageTarget: "pro";
|
|
356
|
+
readonly status: "implemented";
|
|
357
|
+
}, {
|
|
358
|
+
readonly id: "pivot-panel";
|
|
359
|
+
readonly label: "Pivot panel";
|
|
360
|
+
readonly category: "component";
|
|
361
|
+
readonly packageTarget: "pro";
|
|
362
|
+
readonly status: "implemented";
|
|
363
|
+
}, {
|
|
364
|
+
readonly id: "charts-panel";
|
|
365
|
+
readonly label: "Charts panel";
|
|
366
|
+
readonly category: "component";
|
|
367
|
+
readonly packageTarget: "pro";
|
|
368
|
+
readonly status: "implemented";
|
|
369
|
+
}, {
|
|
370
|
+
readonly id: "ai-assistant-panel";
|
|
371
|
+
readonly label: "AI assistant panel";
|
|
372
|
+
readonly category: "component";
|
|
373
|
+
readonly packageTarget: "pro";
|
|
374
|
+
readonly status: "implemented";
|
|
375
|
+
}, {
|
|
376
|
+
readonly id: "api-object";
|
|
377
|
+
readonly label: "API object";
|
|
378
|
+
readonly category: "platform";
|
|
379
|
+
readonly packageTarget: "community";
|
|
380
|
+
readonly status: "partial";
|
|
381
|
+
}, {
|
|
382
|
+
readonly id: "events";
|
|
383
|
+
readonly label: "Events";
|
|
384
|
+
readonly category: "platform";
|
|
385
|
+
readonly packageTarget: "community";
|
|
386
|
+
readonly status: "partial";
|
|
387
|
+
}, {
|
|
388
|
+
readonly id: "state";
|
|
389
|
+
readonly label: "State";
|
|
390
|
+
readonly category: "platform";
|
|
391
|
+
readonly packageTarget: "community";
|
|
392
|
+
readonly status: "partial";
|
|
393
|
+
}, {
|
|
394
|
+
readonly id: "state-presets";
|
|
395
|
+
readonly label: "State presets";
|
|
396
|
+
readonly category: "platform";
|
|
397
|
+
readonly packageTarget: "pro";
|
|
398
|
+
readonly status: "partial";
|
|
399
|
+
}, {
|
|
400
|
+
readonly id: "performance";
|
|
401
|
+
readonly label: "Performance";
|
|
402
|
+
readonly category: "platform";
|
|
403
|
+
readonly packageTarget: "community";
|
|
404
|
+
readonly status: "implemented";
|
|
405
|
+
}, {
|
|
406
|
+
readonly id: "styling";
|
|
407
|
+
readonly label: "Styling";
|
|
408
|
+
readonly category: "platform";
|
|
409
|
+
readonly packageTarget: "community";
|
|
410
|
+
readonly status: "implemented";
|
|
411
|
+
}, {
|
|
412
|
+
readonly id: "custom-subcomponents";
|
|
413
|
+
readonly label: "Custom subcomponents";
|
|
414
|
+
readonly category: "platform";
|
|
415
|
+
readonly packageTarget: "community";
|
|
416
|
+
readonly status: "implemented";
|
|
417
|
+
}, {
|
|
418
|
+
readonly id: "overlays";
|
|
419
|
+
readonly label: "Overlays";
|
|
420
|
+
readonly category: "platform";
|
|
421
|
+
readonly packageTarget: "community";
|
|
422
|
+
readonly status: "implemented";
|
|
423
|
+
}];
|
|
424
|
+
declare const dataGridCapabilityFeatureIds: ("localization" | "layout" | "columns" | "column-resizing" | "column-reordering" | "column-spanning" | "column-groups" | "pinned-columns" | "pinned-rows" | "rows" | "row-reordering" | "row-spanning" | "cells" | "editing" | "sorting" | "filtering" | "pagination" | "selection" | "cell-selection" | "virtualization" | "header-filters" | "accessibility" | "tree-data" | "master-detail" | "row-grouping" | "aggregation" | "pivoting" | "export" | "copy-paste" | "undo-redo" | "scrolling" | "list-view" | "server-side-data" | "server-side-hierarchy" | "server-side-export" | "server-side-hierarchy-export" | "charts-integration" | "ai-assistant" | "toolbar" | "export-controls" | "quick-filter" | "columns-panel" | "filter-panel" | "column-menu" | "preset-controls" | "prompt-field" | "pivot-panel" | "charts-panel" | "ai-assistant-panel" | "api-object" | "events" | "state" | "state-presets" | "performance" | "styling" | "custom-subcomponents" | "overlays")[];
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Framework-neutral Data Grid contracts.
|
|
428
|
+
*
|
|
429
|
+
* Rendering adapters specialize these contracts with their own column and
|
|
430
|
+
* renderable types. Business state, data-source requests, sorting, filtering,
|
|
431
|
+
* selection, transactions, and persistence models stay portable.
|
|
432
|
+
*/
|
|
433
|
+
type DataGridRowId = string | number;
|
|
434
|
+
type DataGridRow = object;
|
|
435
|
+
type DataGridSortDirection = 'ascending' | 'descending';
|
|
436
|
+
type DataGridColumnAlign = 'left' | 'center' | 'right';
|
|
437
|
+
type DataGridColumnType = 'string' | 'number' | 'date' | 'dateTime' | 'boolean' | 'singleSelect' | 'multiSelect' | 'actions';
|
|
438
|
+
type DataGridDensity = 'standard' | 'compact' | 'spacious';
|
|
439
|
+
type DataGridFilterOperator = 'contains' | 'equals' | 'startsWith' | 'endsWith' | 'notEquals' | 'notContains' | 'greaterThan' | 'greaterThanOrEqual' | 'lessThan' | 'lessThanOrEqual' | 'isEmpty' | 'isNotEmpty' | 'isAnyOf';
|
|
440
|
+
type DataGridColumnVisibilityModel = Record<string, boolean>;
|
|
441
|
+
type DataGridColumnWidthModel = Record<string, number>;
|
|
442
|
+
type DataGridColumnOrder = readonly string[];
|
|
443
|
+
type DataGridExportFormat = 'csv';
|
|
444
|
+
type DataGridExportScope = 'visible' | 'filtered' | 'selected' | 'all';
|
|
445
|
+
type DataGridScrollAlign = 'start' | 'center' | 'end' | 'nearest';
|
|
446
|
+
type DataGridDataSourceMode = 'client' | 'server';
|
|
447
|
+
type DataGridEditMode = 'cell' | 'row';
|
|
448
|
+
type DataGridEditCommitPolicy = 'explicit' | 'blur';
|
|
449
|
+
type DataGridRowEditMode = 'view' | 'edit';
|
|
450
|
+
type DataGridEditStartReason = 'api' | 'cell-double-click' | 'keyboard';
|
|
451
|
+
type DataGridEditStopReason = 'api' | 'enter-key' | 'escape-key' | 'tab-key' | 'cell-blur';
|
|
452
|
+
type DataGridRowUpdateReason = 'cell-clear' | 'cell-fill' | 'clipboard-paste' | 'redo' | 'undo';
|
|
453
|
+
type DataGridLoadingOverlayVariant = 'skeleton' | 'linear-progress' | 'circular-progress';
|
|
454
|
+
interface DataGridMotionOptions {
|
|
455
|
+
feedbackDurationMs?: number;
|
|
456
|
+
layoutDurationMs?: number;
|
|
457
|
+
}
|
|
458
|
+
interface DataGridPinnedColumns {
|
|
459
|
+
left?: readonly string[];
|
|
460
|
+
right?: readonly string[];
|
|
461
|
+
}
|
|
462
|
+
interface DataGridPinnedRows {
|
|
463
|
+
bottom?: readonly DataGridRowId[];
|
|
464
|
+
top?: readonly DataGridRowId[];
|
|
465
|
+
}
|
|
466
|
+
type DataGridPinnedRowPosition = keyof DataGridPinnedRows;
|
|
467
|
+
interface DataGridRowOrderChange<Row extends DataGridRow = DataGridRow> {
|
|
468
|
+
id: DataGridRowId;
|
|
469
|
+
oldIndex: number;
|
|
470
|
+
row: Row;
|
|
471
|
+
rowOrder: readonly DataGridRowId[];
|
|
472
|
+
targetIndex: number;
|
|
473
|
+
}
|
|
474
|
+
interface DataGridDetailPanelExpandedRowsChange<Row extends DataGridRow = DataGridRow> {
|
|
475
|
+
expandedRowIds: readonly DataGridRowId[];
|
|
476
|
+
rows: readonly Row[];
|
|
477
|
+
}
|
|
478
|
+
interface DataGridExportOptions {
|
|
479
|
+
fileName?: string;
|
|
480
|
+
format?: DataGridExportFormat;
|
|
481
|
+
includeHeaders?: boolean;
|
|
482
|
+
includeHiddenColumns?: boolean;
|
|
483
|
+
scope?: DataGridExportScope;
|
|
484
|
+
}
|
|
485
|
+
interface DataGridFilterItem {
|
|
486
|
+
field: string;
|
|
487
|
+
value: string;
|
|
488
|
+
operator?: DataGridFilterOperator;
|
|
489
|
+
/** Distinct values for isAnyOf. value remains the text editor value. */
|
|
490
|
+
values?: readonly string[];
|
|
491
|
+
}
|
|
492
|
+
interface DataGridFilterModel {
|
|
493
|
+
items?: readonly DataGridFilterItem[];
|
|
494
|
+
quickFilterValue?: string;
|
|
495
|
+
/** Column conditions use AND by default; quick search always intersects them. */
|
|
496
|
+
logicOperator?: 'and' | 'or';
|
|
497
|
+
}
|
|
498
|
+
interface DataGridPaginationModel {
|
|
499
|
+
page: number;
|
|
500
|
+
pageSize: number;
|
|
501
|
+
}
|
|
502
|
+
interface DataGridSortModel {
|
|
503
|
+
field: string;
|
|
504
|
+
direction: DataGridSortDirection;
|
|
505
|
+
}
|
|
506
|
+
interface DataGridExportRequest {
|
|
507
|
+
columnFields: readonly string[];
|
|
508
|
+
columnOrder: DataGridColumnOrder;
|
|
509
|
+
columnVisibilityModel: DataGridColumnVisibilityModel;
|
|
510
|
+
filterModel: DataGridFilterModel;
|
|
511
|
+
options: Required<DataGridExportOptions>;
|
|
512
|
+
paginationModel: DataGridPaginationModel;
|
|
513
|
+
requestId: number;
|
|
514
|
+
rowCount: number;
|
|
515
|
+
selectedRowIds: readonly DataGridRowId[];
|
|
516
|
+
signal: AbortSignal;
|
|
517
|
+
sortModel: DataGridSortModel | null;
|
|
518
|
+
visibleColumnFields: readonly string[];
|
|
519
|
+
}
|
|
520
|
+
interface DataGridExportResult {
|
|
521
|
+
data: string | Blob;
|
|
522
|
+
fileName?: string;
|
|
523
|
+
mimeType?: string;
|
|
524
|
+
}
|
|
525
|
+
interface DataGridExportDataSource {
|
|
526
|
+
exportData: (request: DataGridExportRequest) => string | Blob | DataGridExportResult | Promise<string | Blob | DataGridExportResult>;
|
|
527
|
+
}
|
|
528
|
+
interface DataGridCellParams<Row extends DataGridRow = DataGridRow> {
|
|
529
|
+
id: DataGridRowId;
|
|
530
|
+
row: Row;
|
|
531
|
+
rowIndex: number;
|
|
532
|
+
field: string;
|
|
533
|
+
value: unknown;
|
|
534
|
+
}
|
|
535
|
+
interface DataGridRowParams<Row extends DataGridRow = DataGridRow> {
|
|
536
|
+
id: DataGridRowId;
|
|
537
|
+
row: Row;
|
|
538
|
+
rowIndex: number;
|
|
539
|
+
}
|
|
540
|
+
interface DataGridCellPosition {
|
|
541
|
+
field: string;
|
|
542
|
+
id: DataGridRowId;
|
|
543
|
+
}
|
|
544
|
+
interface DataGridCellRange {
|
|
545
|
+
end: DataGridCellPosition;
|
|
546
|
+
start: DataGridCellPosition;
|
|
547
|
+
}
|
|
548
|
+
interface DataGridCellSelectionModel {
|
|
549
|
+
ranges: readonly DataGridCellRange[];
|
|
550
|
+
}
|
|
551
|
+
interface DataGridCellSelectionChange<Row extends DataGridRow = DataGridRow> {
|
|
552
|
+
model: DataGridCellSelectionModel;
|
|
553
|
+
selectedCellCount: number;
|
|
554
|
+
selectedCells: readonly DataGridCellParams<Row>[];
|
|
555
|
+
}
|
|
556
|
+
interface DataGridResolvedRow<Row extends DataGridRow = DataGridRow> {
|
|
557
|
+
id: DataGridRowId;
|
|
558
|
+
row: Row;
|
|
559
|
+
rowIndex: number;
|
|
560
|
+
}
|
|
561
|
+
interface DataGridRowEditChange<Row extends DataGridRow = DataGridRow> {
|
|
562
|
+
id: DataGridRowId;
|
|
563
|
+
row: Row;
|
|
564
|
+
oldRow: Row;
|
|
565
|
+
rowIndex: number;
|
|
566
|
+
reason: DataGridEditStopReason;
|
|
567
|
+
}
|
|
568
|
+
interface DataGridRowEditStartParams<Row extends DataGridRow = DataGridRow> {
|
|
569
|
+
id: DataGridRowId;
|
|
570
|
+
row: Row;
|
|
571
|
+
rowIndex: number;
|
|
572
|
+
field?: string;
|
|
573
|
+
reason: DataGridEditStartReason;
|
|
574
|
+
}
|
|
575
|
+
interface DataGridRowEditStopParams<Row extends DataGridRow = DataGridRow> {
|
|
576
|
+
id: DataGridRowId;
|
|
577
|
+
row: Row;
|
|
578
|
+
oldRow: Row;
|
|
579
|
+
rowIndex: number;
|
|
580
|
+
reason: DataGridEditStopReason;
|
|
581
|
+
}
|
|
582
|
+
interface DataGridRowEditErrorParams<Row extends DataGridRow = DataGridRow> {
|
|
583
|
+
id: DataGridRowId;
|
|
584
|
+
row: Row;
|
|
585
|
+
oldRow: Row;
|
|
586
|
+
rowIndex: number;
|
|
587
|
+
error: unknown;
|
|
588
|
+
}
|
|
589
|
+
/** Portable row-edit state; rendering adapters specialize the error payload. */
|
|
590
|
+
interface DataGridRowEditModelEntryContract<Row extends DataGridRow = DataGridRow, ErrorPayload = unknown> {
|
|
591
|
+
mode: DataGridRowEditMode;
|
|
592
|
+
values?: Partial<Row>;
|
|
593
|
+
errors?: Record<string, ErrorPayload>;
|
|
594
|
+
isProcessing?: boolean;
|
|
595
|
+
}
|
|
596
|
+
type DataGridRowEditModelContract<Row extends DataGridRow = DataGridRow, ErrorPayload = unknown> = Record<string, DataGridRowEditModelEntryContract<Row, ErrorPayload>>;
|
|
597
|
+
interface DataGridRowUpdate<Row extends DataGridRow = DataGridRow> {
|
|
598
|
+
id: DataGridRowId;
|
|
599
|
+
row: Row;
|
|
600
|
+
oldRow: Row;
|
|
601
|
+
rowIndex: number;
|
|
602
|
+
}
|
|
603
|
+
interface DataGridRowsUpdateChange<Row extends DataGridRow = DataGridRow> {
|
|
604
|
+
reason: DataGridRowUpdateReason;
|
|
605
|
+
updates: readonly DataGridRowUpdate<Row>[];
|
|
606
|
+
}
|
|
607
|
+
interface DataGridTransaction<Row extends DataGridRow = DataGridRow> {
|
|
608
|
+
id: string;
|
|
609
|
+
reason: DataGridRowUpdateReason;
|
|
610
|
+
updates: readonly DataGridRowUpdate<Row>[];
|
|
611
|
+
}
|
|
612
|
+
interface DataGridTransactionState<Row extends DataGridRow = DataGridRow> {
|
|
613
|
+
canRedo: boolean;
|
|
614
|
+
canUndo: boolean;
|
|
615
|
+
redoStack: readonly DataGridTransaction<Row>[];
|
|
616
|
+
undoStack: readonly DataGridTransaction<Row>[];
|
|
617
|
+
}
|
|
618
|
+
interface DataGridClipboardCopyOptions {
|
|
619
|
+
includeHeaders?: boolean;
|
|
620
|
+
}
|
|
621
|
+
interface DataGridClipboardPasteResult<Row extends DataGridRow = DataGridRow> {
|
|
622
|
+
appliedCellCount: number;
|
|
623
|
+
rejectedCellCount: number;
|
|
624
|
+
transaction: DataGridTransaction<Row> | null;
|
|
625
|
+
updatedRows: readonly DataGridRowUpdate<Row>[];
|
|
626
|
+
}
|
|
627
|
+
interface DataGridVirtualizationState {
|
|
628
|
+
columnEnabled: boolean;
|
|
629
|
+
columnEndIndex: number;
|
|
630
|
+
columnOverscanCount: number;
|
|
631
|
+
columnStartIndex: number;
|
|
632
|
+
enabled: boolean;
|
|
633
|
+
endIndex: number;
|
|
634
|
+
overscanRowCount: number;
|
|
635
|
+
renderedColumnCount: number;
|
|
636
|
+
renderedRowCount: number;
|
|
637
|
+
rowHeight: number;
|
|
638
|
+
scrollLeft: number;
|
|
639
|
+
scrollTop: number;
|
|
640
|
+
startIndex: number;
|
|
641
|
+
totalColumnCount: number;
|
|
642
|
+
totalRowCount: number;
|
|
643
|
+
viewportWidth: number;
|
|
644
|
+
viewportHeight: number;
|
|
645
|
+
}
|
|
646
|
+
interface DataGridServerRequestState {
|
|
647
|
+
filterModel: DataGridFilterModel;
|
|
648
|
+
paginationModel: DataGridPaginationModel;
|
|
649
|
+
rowCount: number;
|
|
650
|
+
sortModel: DataGridSortModel | null;
|
|
651
|
+
}
|
|
652
|
+
interface DataGridDataSourceRequest {
|
|
653
|
+
columnOrder: DataGridColumnOrder;
|
|
654
|
+
columnVisibilityModel: DataGridColumnVisibilityModel;
|
|
655
|
+
filterModel: DataGridFilterModel;
|
|
656
|
+
paginationModel: DataGridPaginationModel;
|
|
657
|
+
requestId: number;
|
|
658
|
+
signal: AbortSignal;
|
|
659
|
+
sortModel: DataGridSortModel | null;
|
|
660
|
+
visibleColumnFields: readonly string[];
|
|
661
|
+
}
|
|
662
|
+
interface DataGridDataSourceResponse<Row extends DataGridRow = DataGridRow> {
|
|
663
|
+
metadata?: Readonly<Record<string, unknown>>;
|
|
664
|
+
rowCount: number;
|
|
665
|
+
rows: readonly Row[];
|
|
666
|
+
}
|
|
667
|
+
interface DataGridDataSource<Row extends DataGridRow = DataGridRow> {
|
|
668
|
+
getRows: (request: DataGridDataSourceRequest) => DataGridDataSourceResponse<Row> | Promise<DataGridDataSourceResponse<Row>>;
|
|
669
|
+
}
|
|
670
|
+
interface DataGridDataSourceState<Row extends DataGridRow = DataGridRow> {
|
|
671
|
+
error: unknown;
|
|
672
|
+
lastRequest: DataGridDataSourceRequest | null;
|
|
673
|
+
loading: boolean;
|
|
674
|
+
rowCount: number;
|
|
675
|
+
rows: readonly Row[];
|
|
676
|
+
}
|
|
677
|
+
interface DataGridExportState {
|
|
678
|
+
error: unknown;
|
|
679
|
+
lastRequest: DataGridExportRequest | null;
|
|
680
|
+
loading: boolean;
|
|
681
|
+
}
|
|
682
|
+
interface DataGridStatePresetMetadata {
|
|
683
|
+
id?: string;
|
|
684
|
+
name?: string;
|
|
685
|
+
description?: string;
|
|
686
|
+
}
|
|
687
|
+
interface DataGridInitialStateContract<Row extends DataGridRow = DataGridRow, EditError = unknown> {
|
|
688
|
+
cellSelectionModel?: DataGridCellSelectionModel;
|
|
689
|
+
columnOrder?: DataGridColumnOrder;
|
|
690
|
+
pinnedColumns?: DataGridPinnedColumns;
|
|
691
|
+
pinnedRows?: DataGridPinnedRows;
|
|
692
|
+
columnVisibilityModel?: DataGridColumnVisibilityModel;
|
|
693
|
+
columnWidthModel?: DataGridColumnWidthModel;
|
|
694
|
+
density?: DataGridDensity;
|
|
695
|
+
detailPanelExpandedRowIds?: readonly DataGridRowId[];
|
|
696
|
+
filterModel?: DataGridFilterModel;
|
|
697
|
+
paginationModel?: DataGridPaginationModel;
|
|
698
|
+
rowOrder?: readonly DataGridRowId[];
|
|
699
|
+
rowEditModel?: DataGridRowEditModelContract<Row, EditError>;
|
|
700
|
+
rowSelectionModel?: readonly DataGridRowId[];
|
|
701
|
+
sortModel?: DataGridSortModel | null;
|
|
702
|
+
}
|
|
703
|
+
interface DataGridStateSnapshotContract<Row extends DataGridRow = DataGridRow, EditError = unknown> extends DataGridInitialStateContract<Row, EditError> {
|
|
704
|
+
}
|
|
705
|
+
interface DataGridStatePresetContract<Row extends DataGridRow = DataGridRow, EditError = unknown> extends DataGridStateSnapshotContract<Row, EditError>, DataGridStatePresetMetadata {
|
|
706
|
+
presetVersion: 1;
|
|
707
|
+
}
|
|
708
|
+
interface DataGridRowSelectionChange<Row extends DataGridRow = DataGridRow> {
|
|
709
|
+
selectedIds: readonly DataGridRowId[];
|
|
710
|
+
selectedRows: readonly Row[];
|
|
711
|
+
}
|
|
712
|
+
interface DataGridLocaleText {
|
|
713
|
+
clearSelectionLabel: string;
|
|
714
|
+
clipboardErrorLabel: string;
|
|
715
|
+
densityLabels: Record<DataGridDensity, string>;
|
|
716
|
+
retryLabel: string;
|
|
717
|
+
clearFiltersLabel: string;
|
|
718
|
+
rowsPerPageLabel: string;
|
|
719
|
+
exportErrorLabel: string;
|
|
720
|
+
serverExportRequiredLabel: string;
|
|
721
|
+
actionsColumnLabel: string;
|
|
722
|
+
assistantLabel: string;
|
|
723
|
+
addFilterLabel: string;
|
|
724
|
+
allItemsLabel: (rowCount: number) => string;
|
|
725
|
+
allRowsExportLabel: string;
|
|
726
|
+
allVisibleColumnsLabel: string;
|
|
727
|
+
clearAllFiltersLabel: string;
|
|
728
|
+
clearSortLabel: string;
|
|
729
|
+
columnsLabel: string;
|
|
730
|
+
columnsWithHiddenCountLabel: (hiddenCount: number) => string;
|
|
731
|
+
dataSourceErrorLabel: string;
|
|
732
|
+
editColumnLabel: (columnLabel: string) => string;
|
|
733
|
+
exportLabel: string;
|
|
734
|
+
exportPreparingLabel: string;
|
|
735
|
+
exportSelectedRowsDisabledLabel: string;
|
|
736
|
+
exportTitle: string;
|
|
737
|
+
filteredRowsExportLabel: string;
|
|
738
|
+
filterColumnAriaLabel: string;
|
|
739
|
+
filterColumnLabel: (columnLabel: string) => string;
|
|
740
|
+
filterOperatorAriaLabel: string;
|
|
741
|
+
filterOperatorLabels: Record<DataGridFilterOperator, string>;
|
|
742
|
+
filterValueAriaLabel: string;
|
|
743
|
+
filterValuePlaceholder: string;
|
|
744
|
+
filtersActiveLabel: (activeCount: number) => string;
|
|
745
|
+
filtersLabel: string;
|
|
746
|
+
headerFilterPlaceholder: string;
|
|
747
|
+
hideColumnLabel: string;
|
|
748
|
+
hiddenColumnsLabel: (hiddenCount: number) => string;
|
|
749
|
+
loadingRowsLabel: string;
|
|
750
|
+
manageFieldsDescription: string;
|
|
751
|
+
manageFieldsLabel: string;
|
|
752
|
+
manageViewLabel: string;
|
|
753
|
+
noActiveFiltersLabel: string;
|
|
754
|
+
noColumnFiltersLabel: string;
|
|
755
|
+
noResultsOverlayLabel: string;
|
|
756
|
+
noRowsLabel: string;
|
|
757
|
+
openColumnMenuLabel: (columnLabel: string) => string;
|
|
758
|
+
paginationLabel: string;
|
|
759
|
+
paginationStatusLabel: (page: number, pageCount: number, firstRow: number, lastRow: number, rowCount: number) => string;
|
|
760
|
+
pinLeftLabel: string;
|
|
761
|
+
pinRightLabel: string;
|
|
762
|
+
quickFilterLabel: string;
|
|
763
|
+
quickFilterPlaceholder: string;
|
|
764
|
+
removeFilterLabel: string;
|
|
765
|
+
reorderRowLabel: (rowIndex: number) => string;
|
|
766
|
+
rowReorderInstructionsLabel: string;
|
|
767
|
+
rowReorderUnavailableLabel: string;
|
|
768
|
+
rowReorderCancelledLabel: string;
|
|
769
|
+
rowReorderPositionLabel: (position: number, count: number) => string;
|
|
770
|
+
rowUpdateErrorLabel: string;
|
|
771
|
+
resetColumnsLabel: string;
|
|
772
|
+
resetViewLabel: string;
|
|
773
|
+
restoreSavedViewLabel: string;
|
|
774
|
+
resizeColumnLabel: (columnLabel: string) => string;
|
|
775
|
+
rowDetailsCollapseLabel: string;
|
|
776
|
+
rowDetailsExpandLabel: string;
|
|
777
|
+
rowSelectionLabel: (rowIndex: number) => string;
|
|
778
|
+
rowsSummaryLabel: (visibleRowCount: number, totalRowCount: number) => string;
|
|
779
|
+
selectedRowsExportLabel: string;
|
|
780
|
+
selectedRowsLabel: (selectedRowCount: number) => string;
|
|
781
|
+
selectAllRowsLabel: string;
|
|
782
|
+
saveCurrentViewLabel: string;
|
|
783
|
+
searchColumnsPlaceholder: string;
|
|
784
|
+
searchFiltersPlaceholder: string;
|
|
785
|
+
sortAscendingLabel: string;
|
|
786
|
+
sortByColumnLabel: (columnLabel: string, direction: DataGridSortDirection) => string;
|
|
787
|
+
sortDescendingLabel: string;
|
|
788
|
+
toggleColumnLabel: (columnLabel: string) => string;
|
|
789
|
+
ungroupedColumnsLabel: string;
|
|
790
|
+
unpinLabel: string;
|
|
791
|
+
visibleRowsExportLabel: string;
|
|
792
|
+
}
|
|
793
|
+
/** Minimal column port consumed by neutral sort/filter/export services. */
|
|
794
|
+
interface DataGridValueColumnContract<Row extends DataGridRow = DataGridRow, Renderable = unknown> {
|
|
795
|
+
field: keyof Row extends string ? Extract<keyof Row, string> | string : string;
|
|
796
|
+
headerName?: Renderable;
|
|
797
|
+
renderCell?: (params: DataGridCellParams<Row>) => Renderable;
|
|
798
|
+
sortComparator?: (left: unknown, right: unknown, leftRow: Row, rightRow: Row) => number;
|
|
799
|
+
valueFormatter?: (value: unknown, row: Row, rowIndex: number) => Renderable;
|
|
800
|
+
valueGetter?: (row: Row, rowIndex: number) => unknown;
|
|
801
|
+
}
|
|
802
|
+
/** Adapter-independent state shape used by selectors and headless hosts. */
|
|
803
|
+
interface DataGridStateContract<Row extends DataGridRow = DataGridRow, Column extends DataGridValueColumnContract<Row> = DataGridValueColumnContract<Row>> {
|
|
804
|
+
columns: readonly Column[];
|
|
805
|
+
dataSource: DataGridDataSourceState<Row>;
|
|
806
|
+
dataSourceMode: DataGridDataSourceMode;
|
|
807
|
+
export: DataGridExportState;
|
|
808
|
+
filterModel: DataGridFilterModel;
|
|
809
|
+
filteredRows: readonly DataGridResolvedRow<Row>[];
|
|
810
|
+
paginationModel: DataGridPaginationModel;
|
|
811
|
+
rowCount: number;
|
|
812
|
+
rows: readonly DataGridResolvedRow<Row>[];
|
|
813
|
+
selectedRows: readonly DataGridResolvedRow<Row>[];
|
|
814
|
+
sortModel: DataGridSortModel | null;
|
|
815
|
+
sortedRows: readonly DataGridResolvedRow<Row>[];
|
|
816
|
+
transactions: DataGridTransactionState<Row>;
|
|
817
|
+
virtualization: DataGridVirtualizationState;
|
|
818
|
+
visibleColumns: readonly Column[];
|
|
819
|
+
visibleRows: readonly DataGridResolvedRow<Row>[];
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
declare const defaultDataGridLocaleText: DataGridLocaleText;
|
|
823
|
+
declare function resolveDataGridLocaleText(overrides?: Partial<DataGridLocaleText>): DataGridLocaleText;
|
|
824
|
+
|
|
825
|
+
declare function dataGridVisibleColumnsSelector<Row extends DataGridRow, Column extends DataGridValueColumnContract<Row, any>>(state: DataGridStateContract<Row, Column>): readonly Column[];
|
|
826
|
+
declare function dataGridVisibleRowsSelector<Row extends DataGridRow, Column extends DataGridValueColumnContract<Row, any>>(state: DataGridStateContract<Row, Column>): readonly DataGridResolvedRow<Row>[];
|
|
827
|
+
declare function dataGridFilteredRowsSelector<Row extends DataGridRow, Column extends DataGridValueColumnContract<Row, any>>(state: DataGridStateContract<Row, Column>): readonly DataGridResolvedRow<Row>[];
|
|
828
|
+
declare function dataGridSelectedRowsSelector<Row extends DataGridRow, Column extends DataGridValueColumnContract<Row, any>>(state: DataGridStateContract<Row, Column>): readonly DataGridResolvedRow<Row>[];
|
|
829
|
+
|
|
830
|
+
type ResolvedDataGridRow<Row extends DataGridRow = DataGridRow> = DataGridResolvedRow<Row>;
|
|
831
|
+
declare function resolveDataGridRowId<Row extends DataGridRow>(row: Row, rowIndex: number, getRowId?: (row: Row, rowIndex: number) => DataGridRowId): DataGridRowId;
|
|
832
|
+
declare function getDataGridCellValue<Row extends DataGridRow, Renderable = unknown>(column: DataGridValueColumnContract<Row, Renderable>, row: Row, rowIndex: number): unknown;
|
|
833
|
+
declare function getDataGridColumnLabel<Row extends DataGridRow, Renderable = unknown>(column: DataGridValueColumnContract<Row, Renderable>): string;
|
|
834
|
+
declare function serializeDataGridCsv<Row extends DataGridRow, Renderable = unknown>(columns: readonly DataGridValueColumnContract<Row, Renderable>[], rows: readonly ResolvedDataGridRow<Row>[], options?: Pick<DataGridExportOptions, 'includeHeaders'>): string;
|
|
835
|
+
declare function compareDataGridValues(left: unknown, right: unknown): number;
|
|
836
|
+
declare function sortDataGridRows<Row extends DataGridRow, Renderable = unknown>(rows: readonly ResolvedDataGridRow<Row>[], columns: readonly DataGridValueColumnContract<Row, Renderable>[], sortModel: DataGridSortModel | readonly DataGridSortModel[] | null | undefined): readonly ResolvedDataGridRow<Row>[];
|
|
837
|
+
declare function filterDataGridRows<Row extends DataGridRow, Renderable = unknown>(rows: readonly ResolvedDataGridRow<Row>[], columns: readonly DataGridValueColumnContract<Row, Renderable>[], filterModel: DataGridFilterModel | undefined): readonly ResolvedDataGridRow<Row>[];
|
|
838
|
+
declare function isDataGridFilterActive(item: DataGridFilterItem): boolean;
|
|
839
|
+
declare function normalizeDataGridSortModel(field: string, direction: DataGridSortDirection): DataGridSortModel;
|
|
840
|
+
declare function renderDataGridCell<Row extends DataGridRow, Renderable = unknown>(column: DataGridValueColumnContract<Row, Renderable>, resolvedRow: ResolvedDataGridRow<Row>): Renderable;
|
|
841
|
+
declare function formatDataGridCellValue<Row extends DataGridRow, Renderable = unknown>(column: DataGridValueColumnContract<Row, Renderable>, resolvedRow: ResolvedDataGridRow<Row>): Renderable;
|
|
842
|
+
|
|
843
|
+
type TabularWorkbookCell = string | number | boolean | null | undefined;
|
|
844
|
+
interface TabularWorkbookOptions {
|
|
845
|
+
sheetName?: string;
|
|
846
|
+
}
|
|
847
|
+
/** Typed OOXML cells in a deterministic ZIP. Text is never interpreted as a formula. */
|
|
848
|
+
declare function exportTabularWorkbook(rows: readonly (readonly TabularWorkbookCell[])[], options?: TabularWorkbookOptions): Uint8Array;
|
|
849
|
+
|
|
850
|
+
/** Shared PDF 1.7 page assembly for first-party browser-rendered reports. */
|
|
851
|
+
interface RasterPdfAccessibility {
|
|
852
|
+
title: string;
|
|
853
|
+
language: string;
|
|
854
|
+
pageDescriptions: readonly string[];
|
|
855
|
+
}
|
|
856
|
+
declare function assembleRasterPdf(pages: readonly {
|
|
857
|
+
jpeg: Uint8Array;
|
|
858
|
+
width: number;
|
|
859
|
+
height: number;
|
|
860
|
+
}[], accessibility?: RasterPdfAccessibility): Uint8Array;
|
|
861
|
+
|
|
862
|
+
type TabularReportRows = readonly (readonly TabularWorkbookCell[])[];
|
|
863
|
+
declare function exportTabularCsv(rows: TabularReportRows): string;
|
|
864
|
+
/** Standalone SVG pages of an explicitly projected table, with repeated column headers. */
|
|
865
|
+
declare function exportTabularSvgPages(rows: TabularReportRows, options: {
|
|
866
|
+
title: string;
|
|
867
|
+
rowsPerPage?: number;
|
|
868
|
+
}): string[];
|
|
869
|
+
|
|
870
|
+
declare const dataGridPackageManifest: {
|
|
871
|
+
readonly packageName: "@quickbuilder.io/data-grid";
|
|
872
|
+
readonly displayName: "Quick Builder Data Grid";
|
|
873
|
+
readonly family: "data-grid";
|
|
874
|
+
readonly tier: "community";
|
|
875
|
+
readonly designSystemDependency: "@quickbuilder.io/design-system";
|
|
876
|
+
readonly status: "implemented";
|
|
877
|
+
};
|
|
878
|
+
declare const packageManifest: {
|
|
879
|
+
readonly packageName: "@quickbuilder.io/data-grid";
|
|
880
|
+
readonly displayName: "Quick Builder Data Grid";
|
|
881
|
+
readonly family: "data-grid";
|
|
882
|
+
readonly tier: "community";
|
|
883
|
+
readonly designSystemDependency: "@quickbuilder.io/design-system";
|
|
884
|
+
readonly status: "implemented";
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
type DataGridRenderable = React.ReactNode;
|
|
888
|
+
interface DataGridColumnHeaderParams<Row extends DataGridRow = DataGridRow> {
|
|
889
|
+
column: DataGridColumn<Row>;
|
|
890
|
+
columnIndex: number;
|
|
891
|
+
field: string;
|
|
892
|
+
sortDirection?: DataGridSortDirection;
|
|
893
|
+
}
|
|
894
|
+
interface DataGridCellEventParams<Row extends DataGridRow = DataGridRow> extends DataGridCellParams<Row> {
|
|
895
|
+
column: DataGridColumn<Row>;
|
|
896
|
+
}
|
|
897
|
+
interface DataGridCellSpanParams<Row extends DataGridRow = DataGridRow> extends DataGridCellParams<Row> {
|
|
898
|
+
column: DataGridColumn<Row>;
|
|
899
|
+
columnIndex: number;
|
|
900
|
+
visibleColumns: readonly DataGridColumn<Row>[];
|
|
901
|
+
}
|
|
902
|
+
interface DataGridEditCellParams<Row extends DataGridRow = DataGridRow> extends DataGridCellParams<Row> {
|
|
903
|
+
/** True for the cell that initiated editing; forward to the editor's focus prop. */
|
|
904
|
+
autoFocus: boolean;
|
|
905
|
+
draftRow: Row;
|
|
906
|
+
error?: React.ReactNode;
|
|
907
|
+
isProcessing: boolean;
|
|
908
|
+
setValue: (value: unknown) => void;
|
|
909
|
+
commit: () => void;
|
|
910
|
+
cancel: () => void;
|
|
911
|
+
}
|
|
912
|
+
interface DataGridColumn<Row extends DataGridRow = DataGridRow> {
|
|
913
|
+
field: keyof Row extends string ? Extract<keyof Row, string> | string : string;
|
|
914
|
+
headerName?: DataGridRenderable;
|
|
915
|
+
align?: DataGridColumnAlign;
|
|
916
|
+
type?: DataGridColumnType;
|
|
917
|
+
width?: string;
|
|
918
|
+
minWidth?: string;
|
|
919
|
+
maxWidth?: string;
|
|
920
|
+
colSpan?: number | ((params: DataGridCellSpanParams<Row>) => number | null | undefined);
|
|
921
|
+
cellClassName?: string | ((params: DataGridCellParams<Row>) => string);
|
|
922
|
+
/** CSS padding for rendered cells; editors retain the density's control padding. */
|
|
923
|
+
cellPadding?: React.CSSProperties['padding'];
|
|
924
|
+
/** CSS padding for this column's header, including custom header content. */
|
|
925
|
+
headerPadding?: React.CSSProperties['padding'];
|
|
926
|
+
/** Conditional cell appearance. Layout, keyboard focus and selection remain grid-owned. */
|
|
927
|
+
cellBackgroundColor?: string | ((params: DataGridCellParams<Row>) => string | undefined);
|
|
928
|
+
cellColor?: string | ((params: DataGridCellParams<Row>) => string | undefined);
|
|
929
|
+
disableColumnMenu?: boolean;
|
|
930
|
+
filterable?: boolean;
|
|
931
|
+
headerClassName?: string | ((params: DataGridColumnHeaderParams<Row>) => string);
|
|
932
|
+
hideable?: boolean;
|
|
933
|
+
resizable?: boolean;
|
|
934
|
+
reorderable?: boolean;
|
|
935
|
+
sortable?: boolean;
|
|
936
|
+
editable?: boolean;
|
|
937
|
+
editInputType?: React.HTMLInputTypeAttribute;
|
|
938
|
+
valueOptions?: readonly unknown[];
|
|
939
|
+
valueGetter?: (row: Row, rowIndex: number) => unknown;
|
|
940
|
+
valueFormatter?: (value: unknown, row: Row, rowIndex: number) => DataGridRenderable;
|
|
941
|
+
valueParser?: (value: unknown, row: Row) => unknown;
|
|
942
|
+
valueSetter?: (value: unknown, row: Row) => Row;
|
|
943
|
+
validateEditValue?: (value: unknown, row: Row) => React.ReactNode | null | undefined;
|
|
944
|
+
renderCell?: (params: DataGridCellParams<Row>) => DataGridRenderable;
|
|
945
|
+
renderEditCell?: (params: DataGridEditCellParams<Row>) => DataGridRenderable;
|
|
946
|
+
renderHeader?: (params: DataGridColumnHeaderParams<Row>) => DataGridRenderable;
|
|
947
|
+
sortComparator?: (left: unknown, right: unknown, leftRow: Row, rightRow: Row) => number;
|
|
948
|
+
}
|
|
949
|
+
interface DataGridColumnGroup {
|
|
950
|
+
fields: readonly string[];
|
|
951
|
+
id: string;
|
|
952
|
+
label: DataGridRenderable;
|
|
953
|
+
}
|
|
954
|
+
interface DataGridSelectedCellMatrixCell<Row extends DataGridRow = DataGridRow> extends DataGridCellParams<Row> {
|
|
955
|
+
column: DataGridColumn<Row>;
|
|
956
|
+
}
|
|
957
|
+
interface DataGridSelectedCellRangeMatrix<Row extends DataGridRow = DataGridRow> {
|
|
958
|
+
columns: readonly DataGridColumn<Row>[];
|
|
959
|
+
range: DataGridCellRange;
|
|
960
|
+
rows: readonly DataGridResolvedRow<Row>[];
|
|
961
|
+
values: readonly (readonly DataGridSelectedCellMatrixCell<Row>[])[];
|
|
962
|
+
}
|
|
963
|
+
interface DataGridSelectedCellMatrix<Row extends DataGridRow = DataGridRow> {
|
|
964
|
+
ranges: readonly DataGridSelectedCellRangeMatrix<Row>[];
|
|
965
|
+
selectedCellCount: number;
|
|
966
|
+
}
|
|
967
|
+
interface DataGridRowEditModelEntry<Row extends DataGridRow = DataGridRow> {
|
|
968
|
+
mode: DataGridRowEditMode;
|
|
969
|
+
values?: Partial<Row>;
|
|
970
|
+
errors?: Record<string, React.ReactNode>;
|
|
971
|
+
isProcessing?: boolean;
|
|
972
|
+
}
|
|
973
|
+
type DataGridRowEditModel<Row extends DataGridRow = DataGridRow> = Record<string, DataGridRowEditModelEntry<Row>>;
|
|
974
|
+
interface DataGridInitialState {
|
|
975
|
+
cellSelectionModel?: DataGridCellSelectionModel;
|
|
976
|
+
columnOrder?: DataGridColumnOrder;
|
|
977
|
+
pinnedColumns?: DataGridPinnedColumns;
|
|
978
|
+
pinnedRows?: DataGridPinnedRows;
|
|
979
|
+
columnVisibilityModel?: DataGridColumnVisibilityModel;
|
|
980
|
+
columnWidthModel?: DataGridColumnWidthModel;
|
|
981
|
+
density?: DataGridDensity;
|
|
982
|
+
detailPanelExpandedRowIds?: readonly DataGridRowId[];
|
|
983
|
+
filterModel?: DataGridFilterModel;
|
|
984
|
+
paginationModel?: DataGridPaginationModel;
|
|
985
|
+
rowOrder?: readonly DataGridRowId[];
|
|
986
|
+
rowEditModel?: DataGridRowEditModel;
|
|
987
|
+
rowSelectionModel?: readonly DataGridRowId[];
|
|
988
|
+
sortModel?: DataGridSortModel | null;
|
|
989
|
+
}
|
|
990
|
+
interface DataGridStateSnapshot {
|
|
991
|
+
cellSelectionModel?: DataGridCellSelectionModel;
|
|
992
|
+
columnOrder?: DataGridColumnOrder;
|
|
993
|
+
pinnedColumns?: DataGridPinnedColumns;
|
|
994
|
+
pinnedRows?: DataGridPinnedRows;
|
|
995
|
+
columnVisibilityModel?: DataGridColumnVisibilityModel;
|
|
996
|
+
columnWidthModel?: DataGridColumnWidthModel;
|
|
997
|
+
density?: DataGridDensity;
|
|
998
|
+
detailPanelExpandedRowIds?: readonly DataGridRowId[];
|
|
999
|
+
filterModel?: DataGridFilterModel;
|
|
1000
|
+
paginationModel?: DataGridPaginationModel;
|
|
1001
|
+
rowOrder?: readonly DataGridRowId[];
|
|
1002
|
+
rowEditModel?: DataGridRowEditModel;
|
|
1003
|
+
rowSelectionModel?: readonly DataGridRowId[];
|
|
1004
|
+
sortModel?: DataGridSortModel | null;
|
|
1005
|
+
}
|
|
1006
|
+
interface DataGridStatePreset extends DataGridStateSnapshot, DataGridStatePresetMetadata {
|
|
1007
|
+
presetVersion: 1;
|
|
1008
|
+
}
|
|
1009
|
+
interface DataGridState<Row extends DataGridRow = DataGridRow> {
|
|
1010
|
+
cellSelectionModel: DataGridCellSelectionModel;
|
|
1011
|
+
columns: readonly DataGridColumn<Row>[];
|
|
1012
|
+
columnOrder: DataGridColumnOrder;
|
|
1013
|
+
columnVisibilityModel: DataGridColumnVisibilityModel;
|
|
1014
|
+
columnWidthModel: DataGridColumnWidthModel;
|
|
1015
|
+
dataSource: DataGridDataSourceState<Row>;
|
|
1016
|
+
dataSourceMode: DataGridDataSourceMode;
|
|
1017
|
+
density: DataGridDensity;
|
|
1018
|
+
export: DataGridExportState;
|
|
1019
|
+
filterModel: DataGridFilterModel;
|
|
1020
|
+
filteredRows: readonly DataGridResolvedRow<Row>[];
|
|
1021
|
+
paginationEnabled: boolean;
|
|
1022
|
+
paginationModel: DataGridPaginationModel;
|
|
1023
|
+
pinnedColumns: Required<DataGridPinnedColumns>;
|
|
1024
|
+
pinnedRows: Required<DataGridPinnedRows>;
|
|
1025
|
+
detailPanelExpandedRowIds: readonly DataGridRowId[];
|
|
1026
|
+
rowOrder: readonly DataGridRowId[];
|
|
1027
|
+
rowEditModel: DataGridRowEditModel<Row>;
|
|
1028
|
+
rowSelectionModel: readonly DataGridRowId[];
|
|
1029
|
+
rowCount: number;
|
|
1030
|
+
rows: readonly DataGridResolvedRow<Row>[];
|
|
1031
|
+
selectedRows: readonly DataGridResolvedRow<Row>[];
|
|
1032
|
+
sortModel: DataGridSortModel | null;
|
|
1033
|
+
sortedRows: readonly DataGridResolvedRow<Row>[];
|
|
1034
|
+
transactions: DataGridTransactionState<Row>;
|
|
1035
|
+
virtualization: DataGridVirtualizationState;
|
|
1036
|
+
visibleColumns: readonly DataGridColumn<Row>[];
|
|
1037
|
+
visibleRows: readonly DataGridResolvedRow<Row>[];
|
|
1038
|
+
}
|
|
1039
|
+
interface DataGridApi<Row extends DataGridRow = DataGridRow> {
|
|
1040
|
+
clearCellSelection: () => void;
|
|
1041
|
+
cancelCellEditMode: (id: DataGridRowId, field: string) => void;
|
|
1042
|
+
cancelRowEditMode: (id: DataGridRowId) => void;
|
|
1043
|
+
canRedo: () => boolean;
|
|
1044
|
+
canUndo: () => boolean;
|
|
1045
|
+
clearSelection: () => void;
|
|
1046
|
+
commitCellEditMode: (id: DataGridRowId, field: string) => Promise<Row | null>;
|
|
1047
|
+
commitRowEditMode: (id: DataGridRowId) => Promise<Row | null>;
|
|
1048
|
+
copySelectionToClipboard: (options?: DataGridClipboardCopyOptions) => string;
|
|
1049
|
+
exportData: (options?: DataGridExportOptions) => string | Promise<string | Blob | DataGridExportResult>;
|
|
1050
|
+
exportPreset: (metadata?: DataGridStatePresetMetadata) => DataGridStatePreset;
|
|
1051
|
+
exportState: () => DataGridStateSnapshot;
|
|
1052
|
+
getRowWithUpdatedValues: (id: DataGridRowId) => Row | null;
|
|
1053
|
+
getCellSelectionModel: () => DataGridCellSelectionModel;
|
|
1054
|
+
getExportRows: (scope?: DataGridExportScope) => readonly DataGridResolvedRow<Row>[];
|
|
1055
|
+
getSelectedCellMatrix: () => DataGridSelectedCellMatrix<Row>;
|
|
1056
|
+
getSelectedRows: () => readonly DataGridResolvedRow<Row>[];
|
|
1057
|
+
getServerRequestState: () => DataGridServerRequestState;
|
|
1058
|
+
getState: () => DataGridState<Row>;
|
|
1059
|
+
getTransactionState: () => DataGridTransactionState<Row>;
|
|
1060
|
+
getVirtualizationState: () => DataGridVirtualizationState;
|
|
1061
|
+
getVisibleRows: () => readonly DataGridResolvedRow<Row>[];
|
|
1062
|
+
moveColumn: (field: string, targetIndex: number) => void;
|
|
1063
|
+
moveRow: (id: DataGridRowId, targetIndex: number) => void;
|
|
1064
|
+
pinRow: (id: DataGridRowId, position: DataGridPinnedRowPosition) => void;
|
|
1065
|
+
pinColumn: (field: string, side: keyof DataGridPinnedColumns) => void;
|
|
1066
|
+
pasteFromClipboard: (text: string) => DataGridClipboardPasteResult<Row>;
|
|
1067
|
+
redo: () => DataGridTransaction<Row> | null;
|
|
1068
|
+
reloadDataSource: () => void;
|
|
1069
|
+
restorePreset: (preset: DataGridStatePreset) => void;
|
|
1070
|
+
restoreState: (state: DataGridStateSnapshot) => void;
|
|
1071
|
+
/** Scroll owned viewport to nonnegative CSS-pixel offsets; browser bounds apply. */
|
|
1072
|
+
scrollToPosition: (position: {
|
|
1073
|
+
left?: number;
|
|
1074
|
+
top?: number;
|
|
1075
|
+
}) => void;
|
|
1076
|
+
scrollToRow: (rowIndex: number, align?: DataGridScrollAlign) => void;
|
|
1077
|
+
selectRow: (id: DataGridRowId, selected?: boolean) => void;
|
|
1078
|
+
setColumnOrder: (columnOrder: DataGridColumnOrder) => void;
|
|
1079
|
+
setCellSelectionModel: (model: DataGridCellSelectionModel) => void;
|
|
1080
|
+
setSelectedCellValues: (value: unknown) => DataGridClipboardPasteResult<Row>;
|
|
1081
|
+
setPinnedColumns: (pinnedColumns: DataGridPinnedColumns) => void;
|
|
1082
|
+
setColumnVisibility: (field: string, visible: boolean) => void;
|
|
1083
|
+
setColumnVisibilityModel: (model: DataGridColumnVisibilityModel) => void;
|
|
1084
|
+
setColumnWidth: (field: string, width: number) => void;
|
|
1085
|
+
setColumnWidthModel: (model: DataGridColumnWidthModel) => void;
|
|
1086
|
+
setDensity: (density: DataGridDensity) => void;
|
|
1087
|
+
setDetailPanelExpandedRowIds: (ids: readonly DataGridRowId[]) => void;
|
|
1088
|
+
setFilterModel: (model: DataGridFilterModel) => void;
|
|
1089
|
+
setEditCellValue: (id: DataGridRowId, field: string, value: unknown) => void;
|
|
1090
|
+
setPaginationModel: (model: DataGridPaginationModel) => void;
|
|
1091
|
+
setPinnedRows: (pinnedRows: DataGridPinnedRows) => void;
|
|
1092
|
+
setRowOrder: (rowOrder: readonly DataGridRowId[]) => void;
|
|
1093
|
+
setRowEditModel: (model: DataGridRowEditModel<Row>) => void;
|
|
1094
|
+
setSortModel: (model: DataGridSortModel | null) => void;
|
|
1095
|
+
startCellEditMode: (id: DataGridRowId, field: string) => void;
|
|
1096
|
+
startRowEditMode: (id: DataGridRowId, field?: string) => void;
|
|
1097
|
+
toggleDetailPanel: (id: DataGridRowId, expanded?: boolean) => void;
|
|
1098
|
+
unpinColumn: (field: string) => void;
|
|
1099
|
+
unpinRow: (id: DataGridRowId) => void;
|
|
1100
|
+
undo: () => DataGridTransaction<Row> | null;
|
|
1101
|
+
}
|
|
1102
|
+
type DataGridApiRef<Row extends DataGridRow = DataGridRow> = React.MutableRefObject<DataGridApi<Row> | null>;
|
|
1103
|
+
interface DataGridOverlayProps {
|
|
1104
|
+
message: React.ReactNode;
|
|
1105
|
+
}
|
|
1106
|
+
interface DataGridColumnsPanelProps<Row extends DataGridRow = DataGridRow> {
|
|
1107
|
+
columns: readonly DataGridColumn<Row>[];
|
|
1108
|
+
columnVisibilityModel: DataGridColumnVisibilityModel;
|
|
1109
|
+
hiddenColumnCount: number;
|
|
1110
|
+
localeText: DataGridLocaleText;
|
|
1111
|
+
visibleColumns: readonly DataGridColumn<Row>[];
|
|
1112
|
+
onColumnOrderChange: (columnOrder: DataGridColumnOrder) => void;
|
|
1113
|
+
onColumnVisibilityChange: (field: string, visible: boolean) => void;
|
|
1114
|
+
onResetColumnVisibility: () => void;
|
|
1115
|
+
}
|
|
1116
|
+
interface DataGridFilterPanelProps<Row extends DataGridRow = DataGridRow> {
|
|
1117
|
+
activeFilterCount: number;
|
|
1118
|
+
columns: readonly DataGridColumn<Row>[];
|
|
1119
|
+
filterModel: DataGridFilterModel;
|
|
1120
|
+
localeText: DataGridLocaleText;
|
|
1121
|
+
onClearFilters: () => void;
|
|
1122
|
+
onFilterModelChange: (filterModel: DataGridFilterModel) => void;
|
|
1123
|
+
}
|
|
1124
|
+
interface DataGridExportMenuProps<Row extends DataGridRow = DataGridRow> {
|
|
1125
|
+
serverExportAvailable?: boolean;
|
|
1126
|
+
localeText: DataGridLocaleText;
|
|
1127
|
+
state: DataGridState<Row>;
|
|
1128
|
+
triggerElement: PopoverMenuProps['triggerElement'];
|
|
1129
|
+
onExportData: (options?: DataGridExportOptions) => string | Promise<string | Blob | DataGridExportResult>;
|
|
1130
|
+
}
|
|
1131
|
+
type DataGridExportMenuRenderer = (triggerElement: PopoverMenuProps['triggerElement']) => PopoverMenuProps['children'];
|
|
1132
|
+
type DataGridProPanelKind = 'pivot' | 'charts' | 'assistant';
|
|
1133
|
+
interface DataGridToolbarProps<Row extends DataGridRow = DataGridRow> {
|
|
1134
|
+
density?: DataGridDensity;
|
|
1135
|
+
onDensityChange?: (density: DataGridDensity) => void;
|
|
1136
|
+
onClearSelection?: () => void;
|
|
1137
|
+
activeFilterCount: number;
|
|
1138
|
+
columns?: readonly DataGridColumn<Row>[];
|
|
1139
|
+
columnsPanel?: React.ReactNode;
|
|
1140
|
+
columnsPanelOpen: boolean;
|
|
1141
|
+
renderExportMenu?: DataGridExportMenuRenderer;
|
|
1142
|
+
filterPanel?: React.ReactNode;
|
|
1143
|
+
filterPanelOpen: boolean;
|
|
1144
|
+
filterModel: DataGridFilterModel;
|
|
1145
|
+
hiddenColumnCount: number;
|
|
1146
|
+
localeText: DataGridLocaleText;
|
|
1147
|
+
paginationEnabled: boolean;
|
|
1148
|
+
paginationModel: DataGridPaginationModel;
|
|
1149
|
+
paginationRowCount: number;
|
|
1150
|
+
proPanelOpen?: DataGridProPanelKind | null;
|
|
1151
|
+
quickFilterValue: string;
|
|
1152
|
+
savedViewAvailable: boolean;
|
|
1153
|
+
selectedRowCount: number;
|
|
1154
|
+
totalRowCount: number;
|
|
1155
|
+
visibleRowCount: number;
|
|
1156
|
+
onClearFilters: () => void;
|
|
1157
|
+
onColumnsPanelOpenChange: (open: boolean) => void;
|
|
1158
|
+
onFilterPanelOpenChange: (open: boolean) => void;
|
|
1159
|
+
onPageChange: (page: number) => void;
|
|
1160
|
+
onProPanelOpenChange?: (panel: DataGridProPanelKind | null) => void;
|
|
1161
|
+
onQuickFilterValueChange: (value: string) => void;
|
|
1162
|
+
onResetCurrentView: () => void;
|
|
1163
|
+
onRestoreSavedView: () => void;
|
|
1164
|
+
onSaveCurrentView: () => void;
|
|
1165
|
+
}
|
|
1166
|
+
interface DataGridColumnMenuRenderParams<Row extends DataGridRow = DataGridRow> {
|
|
1167
|
+
column: DataGridColumn<Row>;
|
|
1168
|
+
columnIndex: number;
|
|
1169
|
+
columnLabel: string;
|
|
1170
|
+
pinnedSide?: 'left' | 'right';
|
|
1171
|
+
sortDirection?: DataGridSortDirection;
|
|
1172
|
+
visibleColumnCount: number;
|
|
1173
|
+
}
|
|
1174
|
+
interface DataGridColumnMenuProps<Row extends DataGridRow = DataGridRow> extends DataGridColumnMenuRenderParams<Row> {
|
|
1175
|
+
localeText: DataGridLocaleText;
|
|
1176
|
+
onClearSort: () => void;
|
|
1177
|
+
onHideColumn: () => void;
|
|
1178
|
+
onPinColumn: (side: keyof DataGridPinnedColumns) => void;
|
|
1179
|
+
onSortColumn: (direction: DataGridSortDirection) => void;
|
|
1180
|
+
onUnpinColumn: () => void;
|
|
1181
|
+
renderActions?: (params: DataGridColumnMenuRenderParams<Row>) => React.ReactNode;
|
|
1182
|
+
}
|
|
1183
|
+
interface DataGridSlots<Row extends DataGridRow = DataGridRow> {
|
|
1184
|
+
columnMenu?: React.ComponentType<DataGridColumnMenuProps<Row>>;
|
|
1185
|
+
columnsPanel?: React.ComponentType<DataGridColumnsPanelProps<Row>>;
|
|
1186
|
+
emptyOverlay?: React.ComponentType<DataGridOverlayProps>;
|
|
1187
|
+
errorOverlay?: React.ComponentType<DataGridOverlayProps>;
|
|
1188
|
+
exportMenu?: React.ComponentType<DataGridExportMenuProps<Row>>;
|
|
1189
|
+
filterPanel?: React.ComponentType<DataGridFilterPanelProps<Row>>;
|
|
1190
|
+
loadingOverlay?: React.ComponentType<DataGridOverlayProps>;
|
|
1191
|
+
noResultsOverlay?: React.ComponentType<DataGridOverlayProps>;
|
|
1192
|
+
toolbar?: React.ComponentType<DataGridToolbarProps<Row>>;
|
|
1193
|
+
}
|
|
1194
|
+
interface DataGridSlotProps<Row extends DataGridRow = DataGridRow> {
|
|
1195
|
+
columnMenu?: Partial<DataGridColumnMenuProps<Row>>;
|
|
1196
|
+
columnsPanel?: Partial<DataGridColumnsPanelProps<Row>>;
|
|
1197
|
+
emptyOverlay?: Partial<DataGridOverlayProps>;
|
|
1198
|
+
errorOverlay?: Partial<DataGridOverlayProps>;
|
|
1199
|
+
filterPanel?: Partial<DataGridFilterPanelProps<Row>>;
|
|
1200
|
+
loadingOverlay?: Partial<DataGridOverlayProps>;
|
|
1201
|
+
noResultsOverlay?: Partial<DataGridOverlayProps>;
|
|
1202
|
+
toolbar?: Partial<DataGridToolbarProps<Row>>;
|
|
1203
|
+
}
|
|
1204
|
+
interface DataGridStyleOverrides {
|
|
1205
|
+
bodyCellBorderBottom?: string;
|
|
1206
|
+
bodyCellBorderRight?: string;
|
|
1207
|
+
headerBorderColor?: string;
|
|
1208
|
+
headerCellDividerColor?: string;
|
|
1209
|
+
/** Frozen body-cell and boundary shadows. Header and boundary dividers remain visible. */
|
|
1210
|
+
pinnedColumnShadow?: React.CSSProperties['boxShadow'];
|
|
1211
|
+
rootBorder?: string;
|
|
1212
|
+
rootBorderRadius?: React.CSSProperties['borderRadius'];
|
|
1213
|
+
rootBoxShadow?: React.CSSProperties['boxShadow'];
|
|
1214
|
+
rowHoverBackground?: string;
|
|
1215
|
+
rowSelectedBackground?: string;
|
|
1216
|
+
}
|
|
1217
|
+
interface DataGridProps<Row extends DataGridRow = DataGridRow> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'onSelect'> {
|
|
1218
|
+
columns: readonly DataGridColumn<Row>[];
|
|
1219
|
+
columnGroups?: readonly DataGridColumnGroup[];
|
|
1220
|
+
rows?: readonly Row[];
|
|
1221
|
+
caption?: React.ReactNode;
|
|
1222
|
+
dataSource?: DataGridDataSource<Row>;
|
|
1223
|
+
dataSourceMode?: DataGridDataSourceMode;
|
|
1224
|
+
exportDataSource?: DataGridExportDataSource;
|
|
1225
|
+
dataHook?: string;
|
|
1226
|
+
density?: DataGridDensity;
|
|
1227
|
+
defaultDensity?: DataGridDensity;
|
|
1228
|
+
onDensityChange?: (density: DataGridDensity) => void;
|
|
1229
|
+
emptyText?: React.ReactNode;
|
|
1230
|
+
horizontalScroll?: boolean;
|
|
1231
|
+
loading?: boolean;
|
|
1232
|
+
loadingOverlayVariant?: DataGridLoadingOverlayVariant;
|
|
1233
|
+
loadingOverlayNoRowsVariant?: DataGridLoadingOverlayVariant;
|
|
1234
|
+
loadingRows?: number;
|
|
1235
|
+
motion?: DataGridMotionOptions;
|
|
1236
|
+
styleOverrides?: DataGridStyleOverrides;
|
|
1237
|
+
localeText?: Partial<DataGridLocaleText>;
|
|
1238
|
+
stickyHeader?: boolean;
|
|
1239
|
+
initialState?: DataGridInitialState;
|
|
1240
|
+
apiRef?: DataGridApiRef<Row>;
|
|
1241
|
+
getRowId?: (row: Row, rowIndex: number) => DataGridRowId;
|
|
1242
|
+
getRowClassName?: (params: DataGridRowParams<Row>) => string;
|
|
1243
|
+
getCellClassName?: (params: DataGridCellEventParams<Row>) => string;
|
|
1244
|
+
columnOrder?: DataGridColumnOrder;
|
|
1245
|
+
defaultColumnOrder?: DataGridColumnOrder;
|
|
1246
|
+
onColumnOrderChange?: (columnOrder: DataGridColumnOrder) => void;
|
|
1247
|
+
pinnedColumns?: DataGridPinnedColumns;
|
|
1248
|
+
defaultPinnedColumns?: DataGridPinnedColumns;
|
|
1249
|
+
onPinnedColumnsChange?: (pinnedColumns: Required<DataGridPinnedColumns>) => void;
|
|
1250
|
+
columnVisibilityModel?: DataGridColumnVisibilityModel;
|
|
1251
|
+
defaultColumnVisibilityModel?: DataGridColumnVisibilityModel;
|
|
1252
|
+
onColumnVisibilityModelChange?: (columnVisibilityModel: DataGridColumnVisibilityModel) => void;
|
|
1253
|
+
columnWidthModel?: DataGridColumnWidthModel;
|
|
1254
|
+
defaultColumnWidthModel?: DataGridColumnWidthModel;
|
|
1255
|
+
onColumnWidthModelChange?: (columnWidthModel: DataGridColumnWidthModel) => void;
|
|
1256
|
+
pinnedRows?: DataGridPinnedRows;
|
|
1257
|
+
defaultPinnedRows?: DataGridPinnedRows;
|
|
1258
|
+
onPinnedRowsChange?: (pinnedRows: Required<DataGridPinnedRows>) => void;
|
|
1259
|
+
rowOrder?: readonly DataGridRowId[];
|
|
1260
|
+
defaultRowOrder?: readonly DataGridRowId[];
|
|
1261
|
+
onRowOrderChange?: (rowOrder: readonly DataGridRowId[], change: DataGridRowOrderChange<Row>) => void;
|
|
1262
|
+
rowReordering?: boolean;
|
|
1263
|
+
headerFilters?: boolean;
|
|
1264
|
+
disableColumnMenu?: boolean;
|
|
1265
|
+
detailPanelExpandedRowIds?: readonly DataGridRowId[];
|
|
1266
|
+
defaultDetailPanelExpandedRowIds?: readonly DataGridRowId[];
|
|
1267
|
+
onDetailPanelExpandedRowIdsChange?: (expandedRowIds: readonly DataGridRowId[], change: DataGridDetailPanelExpandedRowsChange<Row>) => void;
|
|
1268
|
+
getDetailPanelContent?: (params: DataGridCellParams<Row>) => React.ReactNode;
|
|
1269
|
+
checkboxSelection?: boolean;
|
|
1270
|
+
/** Excludes ineligible rows from individual and page selection. */
|
|
1271
|
+
isRowSelectable?: (params: DataGridRowParams<Row>) => boolean;
|
|
1272
|
+
/** Opt a data row into native drag events for host-owned drop interactions. */
|
|
1273
|
+
isRowDraggable?: (params: DataGridRowParams<Row>) => boolean;
|
|
1274
|
+
cellSelection?: boolean;
|
|
1275
|
+
cellSelectionModel?: DataGridCellSelectionModel;
|
|
1276
|
+
defaultCellSelectionModel?: DataGridCellSelectionModel;
|
|
1277
|
+
onCellSelectionModelChange?: (cellSelectionModel: DataGridCellSelectionModel, change: DataGridCellSelectionChange<Row>) => void;
|
|
1278
|
+
rowSelectionModel?: readonly DataGridRowId[];
|
|
1279
|
+
defaultRowSelectionModel?: readonly DataGridRowId[];
|
|
1280
|
+
onRowSelectionModelChange?: (selectedIds: readonly DataGridRowId[], change: DataGridRowSelectionChange<Row>) => void;
|
|
1281
|
+
onCellClick?: (params: DataGridCellEventParams<Row>, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
1282
|
+
onCellDoubleClick?: (params: DataGridCellEventParams<Row>, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
1283
|
+
onColumnHeaderClick?: (params: DataGridColumnHeaderParams<Row>, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
1284
|
+
/** Activates row content; selection, action controls, editable hosts, and portal events are excluded. */
|
|
1285
|
+
onRowClick?: (params: DataGridRowParams<Row>, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
1286
|
+
/** Same interactive-control exclusions as onRowClick. */
|
|
1287
|
+
onRowDoubleClick?: (params: DataGridRowParams<Row>, event: React.MouseEvent<HTMLDivElement>) => void;
|
|
1288
|
+
sortModel?: DataGridSortModel | null;
|
|
1289
|
+
defaultSortModel?: DataGridSortModel | null;
|
|
1290
|
+
onSortModelChange?: (sortModel: DataGridSortModel | null) => void;
|
|
1291
|
+
filterModel?: DataGridFilterModel;
|
|
1292
|
+
defaultFilterModel?: DataGridFilterModel;
|
|
1293
|
+
onFilterModelChange?: (filterModel: DataGridFilterModel) => void;
|
|
1294
|
+
editMode?: DataGridEditMode;
|
|
1295
|
+
editCommitPolicy?: DataGridEditCommitPolicy;
|
|
1296
|
+
rowEditModel?: DataGridRowEditModel<Row>;
|
|
1297
|
+
defaultRowEditModel?: DataGridRowEditModel<Row>;
|
|
1298
|
+
onRowEditModelChange?: (rowEditModel: DataGridRowEditModel<Row>) => void;
|
|
1299
|
+
onRowEditStart?: (params: DataGridRowEditStartParams<Row>) => void;
|
|
1300
|
+
onRowEditStop?: (params: DataGridRowEditStopParams<Row>) => void;
|
|
1301
|
+
onRowEditCancel?: (params: DataGridRowEditStopParams<Row>) => void;
|
|
1302
|
+
onRowEditCommit?: (change: DataGridRowEditChange<Row>) => void;
|
|
1303
|
+
onRowEditError?: (params: DataGridRowEditErrorParams<Row>) => void;
|
|
1304
|
+
processRowUpdate?: (row: Row, oldRow: Row, change: DataGridRowEditChange<Row>) => Row | Promise<Row>;
|
|
1305
|
+
onRowsUpdate?: (change: DataGridRowsUpdateChange<Row>) => void;
|
|
1306
|
+
isCellEditable?: (params: DataGridCellParams<Row>) => boolean;
|
|
1307
|
+
pagination?: boolean;
|
|
1308
|
+
/** Hides the built-in footer when the application owns cursor pagination or continuation controls. */
|
|
1309
|
+
hideFooter?: boolean;
|
|
1310
|
+
/** Positive page sizes offered by the footer. The current size is always included. */
|
|
1311
|
+
pageSizeOptions?: readonly number[];
|
|
1312
|
+
paginationModel?: DataGridPaginationModel;
|
|
1313
|
+
defaultPaginationModel?: DataGridPaginationModel;
|
|
1314
|
+
onPaginationModelChange?: (paginationModel: DataGridPaginationModel) => void;
|
|
1315
|
+
rowCount?: number;
|
|
1316
|
+
onDataSourceError?: (error: unknown, request: DataGridDataSourceRequest) => void;
|
|
1317
|
+
onDataSourceRequest?: (request: DataGridDataSourceRequest) => void;
|
|
1318
|
+
onDataSourceResponse?: (response: DataGridDataSourceResponse<Row>, request: DataGridDataSourceRequest) => void;
|
|
1319
|
+
onExportError?: (error: unknown, request: DataGridExportRequest) => void;
|
|
1320
|
+
onExportRequest?: (request: DataGridExportRequest) => void;
|
|
1321
|
+
onExportSuccess?: (result: DataGridExportResult, request: DataGridExportRequest) => void;
|
|
1322
|
+
onCsvExport?: (csv: string, options: DataGridExportOptions) => void;
|
|
1323
|
+
onPresetChange?: (preset: DataGridStatePreset) => void;
|
|
1324
|
+
virtualization?: boolean;
|
|
1325
|
+
columnVirtualization?: boolean;
|
|
1326
|
+
rowHeight?: number;
|
|
1327
|
+
overscanRowCount?: number;
|
|
1328
|
+
overscanColumnCount?: number;
|
|
1329
|
+
scrollViewportHeight?: number | string;
|
|
1330
|
+
scrollViewportWidth?: number;
|
|
1331
|
+
/** Measured scroll coordinates for composed surfaces, without reading private DOM. */
|
|
1332
|
+
onViewportChange?: (viewport: Pick<DataGridVirtualizationState, 'scrollLeft' | 'scrollTop' | 'viewportWidth' | 'viewportHeight'>) => void;
|
|
1333
|
+
disableClientSort?: boolean;
|
|
1334
|
+
rowActions?: (params: {
|
|
1335
|
+
id: DataGridRowId;
|
|
1336
|
+
row: Row;
|
|
1337
|
+
rowIndex: number;
|
|
1338
|
+
}) => DataGridRenderable;
|
|
1339
|
+
showToolbar?: boolean;
|
|
1340
|
+
slots?: DataGridSlots<Row>;
|
|
1341
|
+
slotProps?: DataGridSlotProps<Row>;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
declare function DataGridFilterPanel<Row extends DataGridRow>({ columns, filterModel, localeText, onFilterModelChange, }: DataGridFilterPanelProps<Row>): React.JSX.Element;
|
|
1345
|
+
declare const DataGrid: <Row extends DataGridRow = DataGridRow>(props: DataGridProps<Row> & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
1346
|
+
|
|
1347
|
+
declare function useDataGridApiRef<Row extends DataGridRow = DataGridRow>(): DataGridApiRef<Row>;
|
|
1348
|
+
|
|
1349
|
+
interface DataGridReactFrameworkAdapter extends DataGridFrameworkAdapterContract {
|
|
1350
|
+
framework: 'react';
|
|
1351
|
+
entrypoint: '@quickbuilder.io/data-grid/react';
|
|
1352
|
+
}
|
|
1353
|
+
declare const dataGridReactFrameworkAdapter: Readonly<{
|
|
1354
|
+
readonly apiVersion: 1;
|
|
1355
|
+
readonly id: "quickbuilder-react";
|
|
1356
|
+
readonly framework: "react";
|
|
1357
|
+
readonly packageName: "@quickbuilder.io/data-grid";
|
|
1358
|
+
readonly entrypoint: "@quickbuilder.io/data-grid/react";
|
|
1359
|
+
readonly status: "implemented";
|
|
1360
|
+
readonly capabilities: readonly string[];
|
|
1361
|
+
}>;
|
|
1362
|
+
declare const reactFrameworkAdapter: Readonly<{
|
|
1363
|
+
readonly apiVersion: 1;
|
|
1364
|
+
readonly id: "quickbuilder-react";
|
|
1365
|
+
readonly framework: "react";
|
|
1366
|
+
readonly packageName: "@quickbuilder.io/data-grid";
|
|
1367
|
+
readonly entrypoint: "@quickbuilder.io/data-grid/react";
|
|
1368
|
+
readonly status: "implemented";
|
|
1369
|
+
readonly capabilities: readonly string[];
|
|
1370
|
+
}>;
|
|
1371
|
+
|
|
1372
|
+
export { DataGrid, type DataGridApi, type DataGridApiRef, type DataGridCapabilityCategory, type DataGridCapabilityFeature, type DataGridCapabilityPackage, type DataGridCapabilityStatus, type DataGridCellEventParams, type DataGridCellParams, type DataGridCellPosition, type DataGridCellRange, type DataGridCellSelectionChange, type DataGridCellSelectionModel, type DataGridCellSpanParams, type DataGridClipboardCopyOptions, type DataGridClipboardPasteResult, type DataGridColumn, type DataGridColumnAlign, type DataGridColumnGroup, type DataGridColumnHeaderParams, type DataGridColumnMenuProps, type DataGridColumnMenuRenderParams, type DataGridColumnOrder, type DataGridColumnType, type DataGridColumnVisibilityModel, type DataGridColumnWidthModel, type DataGridColumnsPanelProps, type DataGridDataSource, type DataGridDataSourceMode, type DataGridDataSourceRequest, type DataGridDataSourceResponse, type DataGridDataSourceState, type DataGridDensity, type DataGridDetailPanelExpandedRowsChange, type DataGridEditCellParams, type DataGridEditCommitPolicy, type DataGridEditMode, type DataGridEditStartReason, type DataGridEditStopReason, type DataGridExportDataSource, type DataGridExportFormat, type DataGridExportMenuProps, type DataGridExportMenuRenderer, type DataGridExportOptions, type DataGridExportRequest, type DataGridExportResult, type DataGridExportScope, type DataGridExportState, type DataGridFilterItem, type DataGridFilterModel, type DataGridFilterOperator, DataGridFilterPanel, type DataGridFilterPanelProps, type DataGridFrameworkAdapterContract, type DataGridFrameworkAdapterSupport, type DataGridInitialState, type DataGridInitialStateContract, type DataGridLoadingOverlayVariant, type DataGridLocaleText, type DataGridMotionOptions, type DataGridOverlayProps, type DataGridPaginationModel, type DataGridPinnedColumns, type DataGridPinnedRowPosition, type DataGridPinnedRows, type DataGridProPanelKind, type DataGridProps, type DataGridReactFrameworkAdapter, type DataGridRenderable, type DataGridResolvedRow, type DataGridRow, type DataGridRowEditChange, type DataGridRowEditErrorParams, type DataGridRowEditMode, type DataGridRowEditModel, type DataGridRowEditModelContract, type DataGridRowEditModelEntry, type DataGridRowEditModelEntryContract, type DataGridRowEditStartParams, type DataGridRowEditStopParams, type DataGridRowId, type DataGridRowOrderChange, type DataGridRowParams, type DataGridRowSelectionChange, type DataGridRowUpdate, type DataGridRowUpdateReason, type DataGridRowsUpdateChange, type DataGridScrollAlign, type DataGridSelectedCellMatrix, type DataGridSelectedCellMatrixCell, type DataGridSelectedCellRangeMatrix, type DataGridServerRequestState, type DataGridSlotProps, type DataGridSlots, type DataGridSortDirection, type DataGridSortModel, type DataGridState, type DataGridStateContract, type DataGridStatePreset, type DataGridStatePresetContract, type DataGridStatePresetMetadata, type DataGridStateSnapshot, type DataGridStateSnapshotContract, type DataGridStyleOverrides, type DataGridToolbarProps, type DataGridTransaction, type DataGridTransactionState, type DataGridValueColumnContract, type DataGridVirtualizationState, type RasterPdfAccessibility, type ResolvedDataGridRow, type TabularReportRows, type TabularWorkbookCell, type TabularWorkbookOptions, assembleRasterPdf, compareDataGridValues, dataGridCapabilityFeatureIds, dataGridCapabilityFeatures, dataGridFilteredRowsSelector, dataGridFrameworkAdapterSupport, dataGridPackageManifest, dataGridReactFrameworkAdapter, dataGridSelectedRowsSelector, dataGridVisibleColumnsSelector, dataGridVisibleRowsSelector, defaultDataGridLocaleText, exportTabularCsv, exportTabularSvgPages, exportTabularWorkbook, filterDataGridRows, formatDataGridCellValue, frameworkAdapterSupport, getDataGridCellValue, getDataGridColumnLabel, isDataGridFilterActive, normalizeDataGridSortModel, packageManifest, reactFrameworkAdapter, renderDataGridCell, resolveDataGridLocaleText, resolveDataGridRowId, serializeDataGridCsv, sortDataGridRows, useDataGridApiRef };
|