@mui/x-data-grid 7.0.0-alpha.7 → 7.0.0-alpha.8
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/CHANGELOG.md +175 -49
- package/DataGrid/DataGrid.js +9 -21
- package/colDef/gridDateColDef.js +1 -1
- package/components/GridPagination.d.ts +4 -4
- package/components/GridPagination.js +1 -1
- package/components/cell/GridActionsCell.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +5 -5
- package/components/cell/GridCell.js +2 -2
- package/components/panel/GridPanel.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.d.ts +4 -0
- package/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/hooks/core/useGridLoggerFactory.js +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/hooks/features/editing/useGridCellEditing.js +4 -4
- package/hooks/features/editing/useGridRowEditing.js +4 -4
- package/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/hooks/features/export/useGridPrintExport.js +1 -1
- package/hooks/features/filter/gridFilterUtils.js +5 -5
- package/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/hooks/features/rows/gridRowsUtils.js +2 -2
- package/hooks/features/rows/useGridRows.js +7 -7
- package/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/hooks/utils/useGridApiContext.js +1 -1
- package/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/hooks/utils/useGridRootProps.js +1 -1
- package/hooks/utils/useGridSelector.js +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -2
- package/internals/index.d.ts +1 -0
- package/internals/utils/index.d.ts +1 -0
- package/internals/utils/index.js +2 -1
- package/internals/utils/propValidation.d.ts +4 -0
- package/internals/utils/propValidation.js +19 -0
- package/legacy/DataGrid/DataGrid.js +14 -23
- package/legacy/colDef/gridDateColDef.js +1 -1
- package/legacy/components/GridPagination.js +1 -1
- package/legacy/components/cell/GridActionsCell.js +1 -1
- package/legacy/components/cell/GridCell.js +2 -2
- package/legacy/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/legacy/hooks/core/useGridLoggerFactory.js +2 -2
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/legacy/hooks/features/editing/useGridCellEditing.js +4 -4
- package/legacy/hooks/features/editing/useGridRowEditing.js +4 -4
- package/legacy/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/legacy/hooks/features/export/useGridPrintExport.js +1 -1
- package/legacy/hooks/features/filter/gridFilterUtils.js +5 -5
- package/legacy/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/legacy/hooks/features/rows/gridRowsUtils.js +2 -2
- package/legacy/hooks/features/rows/useGridParamsApi.js +4 -5
- package/legacy/hooks/features/rows/useGridRows.js +7 -7
- package/legacy/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/legacy/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/legacy/hooks/utils/useGridApiContext.js +1 -1
- package/legacy/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/legacy/hooks/utils/useGridRootProps.js +1 -1
- package/legacy/hooks/utils/useGridSelector.js +1 -1
- package/legacy/index.js +1 -2
- package/legacy/internals/utils/index.js +2 -1
- package/legacy/internals/utils/propValidation.js +21 -0
- package/legacy/utils/createSelector.js +1 -1
- package/legacy/utils/exportAs.js +1 -1
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +9 -21
- package/modern/colDef/gridDateColDef.js +1 -1
- package/modern/components/GridPagination.js +1 -1
- package/modern/components/cell/GridActionsCell.js +1 -1
- package/modern/components/cell/GridCell.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/modern/hooks/core/useGridLoggerFactory.js +2 -2
- package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +4 -4
- package/modern/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +5 -5
- package/modern/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +2 -2
- package/modern/hooks/features/rows/useGridRows.js +7 -7
- package/modern/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/modern/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/modern/hooks/utils/useGridApiContext.js +1 -1
- package/modern/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/modern/hooks/utils/useGridRootProps.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +1 -1
- package/modern/index.js +1 -2
- package/modern/internals/utils/index.js +2 -1
- package/modern/internals/utils/propValidation.js +19 -0
- package/modern/utils/createSelector.js +1 -1
- package/modern/utils/exportAs.js +1 -1
- package/node/DataGrid/DataGrid.js +9 -21
- package/node/colDef/gridDateColDef.js +1 -1
- package/node/components/GridPagination.js +1 -1
- package/node/components/cell/GridActionsCell.js +1 -1
- package/node/components/cell/GridCell.js +2 -2
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +4 -0
- package/node/hooks/core/useGridLoggerFactory.js +2 -2
- package/node/hooks/features/columnGrouping/gridColumnGroupsUtils.js +1 -1
- package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +6 -4
- package/node/hooks/features/editing/useGridCellEditing.js +4 -4
- package/node/hooks/features/editing/useGridRowEditing.js +4 -4
- package/node/hooks/features/export/serializers/csvSerializer.js +1 -1
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterUtils.js +5 -5
- package/node/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/node/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/node/hooks/features/rows/gridRowsUtils.js +2 -2
- package/node/hooks/features/rows/useGridRows.js +7 -7
- package/node/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/node/hooks/features/sorting/gridSortingUtils.js +4 -2
- package/node/hooks/utils/useGridApiContext.js +1 -1
- package/node/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/node/hooks/utils/useGridRootProps.js +1 -1
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/index.js +1 -13
- package/node/internals/utils/index.js +11 -0
- package/node/internals/utils/propValidation.js +26 -0
- package/node/utils/createSelector.js +1 -1
- package/node/utils/exportAs.js +1 -1
- package/package.json +1 -1
- package/utils/createSelector.js +1 -1
- package/utils/exportAs.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,90 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.0.0-alpha.8
|
|
7
|
+
|
|
8
|
+
_Jan 11, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- ⏰ Support date-fns v3 (#11659) @LukasTy
|
|
13
|
+
Pickers support both v2 and v3 of date-fns. For v3 use `AdapterDateFnsV3`.
|
|
14
|
+
```js
|
|
15
|
+
// with date-fns v2.x
|
|
16
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
17
|
+
import de from 'date-fns/locale/de';
|
|
18
|
+
```
|
|
19
|
+
```js
|
|
20
|
+
// with date-fns v3.x
|
|
21
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
|
22
|
+
import { de } from 'date-fns/locale/de';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The import path for locales has been changed:
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
-import { enUS } from '@mui/x-data-grid';
|
|
33
|
+
+import { enUS } from '@mui/x-data-grid/locales';
|
|
34
|
+
|
|
35
|
+
-import { enUS } from '@mui/x-data-grid-pro';
|
|
36
|
+
+import { enUS } from '@mui/x-data-grid-pro/locales';
|
|
37
|
+
|
|
38
|
+
-import { enUS } from '@mui/x-data-grid-premium';
|
|
39
|
+
+import { enUS } from '@mui/x-data-grid-premium/locales';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid@7.0.0-alpha.8`
|
|
43
|
+
|
|
44
|
+
- [DataGrid] Stop exporting locales from the package root (#11614) @cherniavskii
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
47
|
+
|
|
48
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.8`.
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.8` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.8`.
|
|
53
|
+
|
|
54
|
+
### Date Pickers
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.8`
|
|
57
|
+
|
|
58
|
+
- [pickers] Add `date-fns@3.x` adapter (#11462) @LukasTy
|
|
59
|
+
- [pickers] Avoid deeper than 2nd level imports (#11588) @LukasTy
|
|
60
|
+
- [pickers] Fix clearable behavior blocking focus return to `OpenPickerButton` (#11642) @noraleonte
|
|
61
|
+
- [pickers] Move `DateRange` to `@mui/x-date-pickers-pro/models` (#11611) @flaviendelangle
|
|
62
|
+
- [l10n] Add missing Danish (da-DK) locale export (#11640) @etlos
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.8`.
|
|
67
|
+
|
|
68
|
+
### Tree View / `@mui/x-tree-view@7.0.0-alpha.8`
|
|
69
|
+
|
|
70
|
+
- [tree view] Cleanup `onKeyDown` handler (#11481) @flaviendelangle
|
|
71
|
+
- [tree view] Define the parameters used by each plugin to avoid listing them in each component (#11473) @flaviendelangle
|
|
72
|
+
|
|
73
|
+
### Docs
|
|
74
|
+
|
|
75
|
+
- [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11628) @LukasTy
|
|
76
|
+
- [docs] Improve `git diff` format @oliviertassinari
|
|
77
|
+
- [docs] Push up the MUI X brand (#11533) @oliviertassinari
|
|
78
|
+
- [docs] Remove old data grid translation files (#11646) @cherniavskii
|
|
79
|
+
- [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
|
|
80
|
+
- [docs] Improve charts landing page (#11570) @oliviertassinari
|
|
81
|
+
|
|
82
|
+
### Core
|
|
83
|
+
|
|
84
|
+
- [core] Lock `jsdom` version (#11652) @cherniavskii
|
|
85
|
+
- [core] Remove PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD (#11608) @oliviertassinari
|
|
86
|
+
- [core] Simplify isSsr logic (#11606) @oliviertassinari
|
|
87
|
+
- [core] Sync playwright cache between MUI X and Material UI (#11607) @oliviertassinari
|
|
88
|
+
- [core] Use MUI X official name in errors (#11645) @oliviertassinari
|
|
89
|
+
|
|
6
90
|
## 7.0.0-alpha.7
|
|
7
91
|
|
|
8
92
|
_Jan 5, 2024_
|
|
@@ -28,7 +112,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
|
|
|
28
112
|
label: 'Node 2',
|
|
29
113
|
},
|
|
30
114
|
];
|
|
31
|
-
|
|
115
|
+
|
|
32
116
|
<RichTreeView
|
|
33
117
|
items={MUI_X_PRODUCTS}
|
|
34
118
|
defaultCollapseIcon={<ExpandMoreIcon />}
|
|
@@ -88,10 +172,10 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.7`.
|
|
|
88
172
|
<TreeView
|
|
89
173
|
- onNodeToggle={handleExpansionChange}
|
|
90
174
|
+ onExpandedNodesChange={handleExpansionChange}
|
|
91
|
-
|
|
175
|
+
|
|
92
176
|
- expanded={expandedNodes}
|
|
93
177
|
+ expandedNodes={expandedNodes}
|
|
94
|
-
|
|
178
|
+
|
|
95
179
|
- defaultExpanded={defaultExpandedNodes}
|
|
96
180
|
+ defaultExpandedNodes={defaultExpandedNodes}
|
|
97
181
|
/>
|
|
@@ -274,10 +358,10 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
|
274
358
|
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
|
|
275
359
|
|
|
276
360
|
```diff
|
|
277
|
-
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
+
|
|
361
|
+
-DateCalendarSlotsComponent
|
|
362
|
+
-DateCalendarSlotsComponentsProps
|
|
363
|
+
+DateCalendarSlots
|
|
364
|
+
+DateCalendarSlotProps
|
|
281
365
|
```
|
|
282
366
|
|
|
283
367
|
- Move `inputRef` inside the props passed to the field hooks
|
|
@@ -285,26 +369,26 @@ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsP
|
|
|
285
369
|
The field hooks now only receive the props instead of an object containing both the props and the `inputRef`.
|
|
286
370
|
|
|
287
371
|
```diff
|
|
288
|
-
-
|
|
289
|
-
-
|
|
290
|
-
+
|
|
372
|
+
-const { inputRef, ...otherProps } = props
|
|
373
|
+
-const fieldResponse = useDateField({ props: otherProps, inputRef });
|
|
374
|
+
+const fieldResponse = useDateField(props);
|
|
291
375
|
```
|
|
292
376
|
|
|
293
377
|
If you are using a multi input range field hook, the same applies to `startInputRef` and `endInputRef` params
|
|
294
378
|
|
|
295
379
|
```diff
|
|
296
|
-
-
|
|
297
|
-
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
305
|
-
+
|
|
306
|
-
+
|
|
307
|
-
|
|
380
|
+
-const { inputRef: startInputRef, ...otherStartTextFieldProps } = startTextFieldProps
|
|
381
|
+
-const { inputRef: endInputRef, ...otherEndTextFieldProps } = endTextFieldProps
|
|
382
|
+
|
|
383
|
+
const fieldResponse = useMultiInputDateRangeField({
|
|
384
|
+
sharedProps,
|
|
385
|
+
- startTextFieldProps: otherStartTextFieldProps,
|
|
386
|
+
- endTextFieldProps: otherEndTextFieldProps,
|
|
387
|
+
- startInputRef
|
|
388
|
+
- endInputRef,
|
|
389
|
+
+ startTextFieldProps,
|
|
390
|
+
+ endTextFieldProps
|
|
391
|
+
});
|
|
308
392
|
```
|
|
309
393
|
|
|
310
394
|
- Rename the ref returned by the field hooks to `inputRef`
|
|
@@ -313,26 +397,26 @@ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsP
|
|
|
313
397
|
This ref was previously named `ref` and has been renamed `inputRef` for extra clarity.
|
|
314
398
|
|
|
315
399
|
```diff
|
|
316
|
-
|
|
400
|
+
const fieldResponse = useDateField(props);
|
|
317
401
|
|
|
318
|
-
-
|
|
319
|
-
+
|
|
402
|
+
-return <input ref={fieldResponse.ref} />
|
|
403
|
+
+return <input ref={fieldResponse.inputRef} />
|
|
320
404
|
```
|
|
321
405
|
|
|
322
406
|
If you are using a multi input range field hook, the same applies to the ref in the `startDate` and `endDate` objects
|
|
323
407
|
|
|
324
408
|
```diff
|
|
325
|
-
|
|
409
|
+
const fieldResponse = useDateField(props);
|
|
326
410
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
-
|
|
330
|
-
+
|
|
331
|
-
|
|
332
|
-
-
|
|
333
|
-
+
|
|
334
|
-
|
|
335
|
-
|
|
411
|
+
return (
|
|
412
|
+
<div>
|
|
413
|
+
- <input ref={fieldResponse.startDate.ref} />
|
|
414
|
+
+ <input ref={fieldResponse.startDate.inputRef} />
|
|
415
|
+
<span>–</span>
|
|
416
|
+
- <input ref={fieldResponse.endDate.ref} />
|
|
417
|
+
+ <input ref={fieldResponse.endDate.inputRef} />
|
|
418
|
+
</div>
|
|
419
|
+
)
|
|
336
420
|
```
|
|
337
421
|
|
|
338
422
|
- Restructure the API of `useClearableField`
|
|
@@ -342,23 +426,23 @@ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsP
|
|
|
342
426
|
You should now be able to directly pass the returned value from your field hook (e.g: `useDateField`) to `useClearableField`
|
|
343
427
|
|
|
344
428
|
```diff
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
352
|
-
-
|
|
353
|
-
-
|
|
354
|
-
-
|
|
355
|
-
-
|
|
429
|
+
const fieldResponse = useDateField(props);
|
|
430
|
+
|
|
431
|
+
-const { InputProps, onClear, clearable, slots, slotProps, ...otherFieldProps } = fieldResponse
|
|
432
|
+
-const { InputProps: ProcessedInputProps, fieldProps: processedFieldProps } = useClearableField({
|
|
433
|
+
- fieldProps: otherFieldProps,
|
|
434
|
+
- InputProps,
|
|
435
|
+
- clearable,
|
|
436
|
+
- onClear,
|
|
437
|
+
- slots,
|
|
438
|
+
- slotProps,
|
|
439
|
+
-});
|
|
356
440
|
-
|
|
357
|
-
-
|
|
441
|
+
- return <MyCustomTextField {...processedFieldProps} InputProps={ProcessedInputProps} />
|
|
358
442
|
|
|
359
|
-
+
|
|
443
|
+
+const processedFieldProps = useClearableField(fieldResponse);
|
|
360
444
|
+
|
|
361
|
-
+
|
|
445
|
+
+return <MyCustomTextField {...processedFieldProps} />
|
|
362
446
|
```
|
|
363
447
|
|
|
364
448
|
#### `@mui/x-date-pickers@7.0.0-alpha.5`
|
|
@@ -1340,6 +1424,48 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
1340
1424
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
1341
1425
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
1342
1426
|
|
|
1427
|
+
## 6.19.0
|
|
1428
|
+
|
|
1429
|
+
_Jan 11, 2024_
|
|
1430
|
+
|
|
1431
|
+
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
|
|
1432
|
+
|
|
1433
|
+
- ⏰ Support date-fns v3 (#11659) @LukasTy
|
|
1434
|
+
Pickers support both v2 and v3 of date-fns. For v3 use `AdapterDateFnsV3`.
|
|
1435
|
+
```js
|
|
1436
|
+
// with date-fns v2.x
|
|
1437
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
1438
|
+
import de from 'date-fns/locale/de';
|
|
1439
|
+
```
|
|
1440
|
+
```js
|
|
1441
|
+
// with date-fns v3.x
|
|
1442
|
+
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3';
|
|
1443
|
+
import { de } from 'date-fns/locale/de';
|
|
1444
|
+
```
|
|
1445
|
+
|
|
1446
|
+
### Date Pickers
|
|
1447
|
+
|
|
1448
|
+
#### `@mui/x-date-pickers@6.19.0`
|
|
1449
|
+
|
|
1450
|
+
- [pickers] Add date-fns@3.x adapter (#11659) @LukasTy
|
|
1451
|
+
- [pickers] Fix clearable behavior blocking focus return to `OpenPickerButton` (#11643) @noraleonte
|
|
1452
|
+
- [l10n] Add missing Danish (da-DK) locale export (#11641) @etlos
|
|
1453
|
+
|
|
1454
|
+
#### `@mui/x-date-pickers-pro@6.19.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
1455
|
+
|
|
1456
|
+
Same changes as in `@mui/x-date-pickers@6.19.0`.
|
|
1457
|
+
|
|
1458
|
+
### Docs
|
|
1459
|
+
|
|
1460
|
+
- [docs] Add missing component @oliviertassinari
|
|
1461
|
+
- [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11637) @LukasTy
|
|
1462
|
+
- [docs] Push up the MUI X brand (#11533) @oliviertassinari
|
|
1463
|
+
- [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
|
|
1464
|
+
- [docs] Add demo to the charts overview page (#11586) @danilo-leal
|
|
1465
|
+
- [docs] Fix 404 links in the docs @oliviertassinari
|
|
1466
|
+
- [docs] Improve landing page (#11570) @oliviertassinari
|
|
1467
|
+
- [docs] Give a general revision to the docs (#11249) @danilo-leal
|
|
1468
|
+
|
|
1343
1469
|
## 6.18.7
|
|
1344
1470
|
|
|
1345
1471
|
_Jan 5, 2024_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import { chainPropTypes } from '@mui/utils';
|
|
5
4
|
import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from '../components';
|
|
6
5
|
import { GridContextProvider } from '../context/GridContextProvider';
|
|
7
6
|
import { useDataGridComponent } from './useDataGridComponent';
|
|
8
7
|
import { useDataGridProps } from './useDataGridProps';
|
|
9
8
|
import { DataGridVirtualScroller } from '../components/DataGridVirtualScroller';
|
|
9
|
+
import { propValidatorsDataGrid, validateProps } from '../internals/utils/propValidation';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
const propValidators = [...propValidatorsDataGrid,
|
|
13
|
+
// Only validate in MIT version
|
|
14
|
+
props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n') || undefined];
|
|
12
15
|
const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref) {
|
|
13
16
|
const props = useDataGridProps(inProps);
|
|
14
17
|
const privateApiRef = useDataGridComponent(props.apiRef, props);
|
|
18
|
+
validateProps(props, propValidators);
|
|
15
19
|
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
16
20
|
privateApiRef: privateApiRef,
|
|
17
21
|
props: props,
|
|
@@ -63,12 +67,7 @@ DataGridRaw.propTypes = {
|
|
|
63
67
|
* If `true`, the pageSize is calculated according to the container size and the max number of rows to avoid rendering a vertical scroll bar.
|
|
64
68
|
* @default false
|
|
65
69
|
*/
|
|
66
|
-
autoPageSize:
|
|
67
|
-
if (props.autoHeight && props.autoPageSize) {
|
|
68
|
-
return new Error(['MUI: `<DataGrid autoPageSize={true} autoHeight={true} />` are not valid props.', 'You can not use both the `autoPageSize` and `autoHeight` props at the same time because `autoHeight` scales the height of the Data Grid according to the `pageSize`.', '', 'Please remove one of these two props.'].join('\n'));
|
|
69
|
-
}
|
|
70
|
-
return null;
|
|
71
|
-
}),
|
|
70
|
+
autoPageSize: PropTypes.bool,
|
|
72
71
|
/**
|
|
73
72
|
* Controls the modes of the cells.
|
|
74
73
|
*/
|
|
@@ -99,15 +98,9 @@ DataGridRaw.propTypes = {
|
|
|
99
98
|
*/
|
|
100
99
|
columnHeaderHeight: PropTypes.number,
|
|
101
100
|
/**
|
|
102
|
-
* Set of columns of type [[GridColDef
|
|
101
|
+
* Set of columns of type [[GridColDef]][].
|
|
103
102
|
*/
|
|
104
|
-
columns:
|
|
105
|
-
// @ts-ignore because otherwise `build:api` doesn't work
|
|
106
|
-
if (props.columns && props.columns.some(column => column.resizable)) {
|
|
107
|
-
return new Error([`MUI: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
|
|
108
|
-
}
|
|
109
|
-
return null;
|
|
110
|
-
}),
|
|
103
|
+
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
111
104
|
/**
|
|
112
105
|
* Number of rows from the `columnBuffer` that can be visible before a new slice is rendered.
|
|
113
106
|
* @default 3
|
|
@@ -552,12 +545,7 @@ DataGridRaw.propTypes = {
|
|
|
552
545
|
label: PropTypes.string.isRequired,
|
|
553
546
|
value: PropTypes.number.isRequired
|
|
554
547
|
})]).isRequired),
|
|
555
|
-
pagination:
|
|
556
|
-
if (props.pagination === false) {
|
|
557
|
-
return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination.'].join('\n'));
|
|
558
|
-
}
|
|
559
|
-
return null;
|
|
560
|
-
},
|
|
548
|
+
pagination: PropTypes.oneOf([true]),
|
|
561
549
|
/**
|
|
562
550
|
* Pagination can be processed on the server or client-side.
|
|
563
551
|
* Set it to 'client' if you would like to handle the pagination on the client-side.
|
package/colDef/gridDateColDef.js
CHANGED
|
@@ -10,7 +10,7 @@ function throwIfNotDateObject({
|
|
|
10
10
|
field
|
|
11
11
|
}) {
|
|
12
12
|
if (!(value instanceof Date)) {
|
|
13
|
-
throw new Error([`MUI: \`${columnType}\` column type only accepts \`Date\` objects as values.`, 'Use `valueGetter` to transform the value into a `Date` object.', `Row ID: ${rowId}, field: "${field}".`].join('\n'));
|
|
13
|
+
throw new Error([`MUI X: \`${columnType}\` column type only accepts \`Date\` objects as values.`, 'Use `valueGetter` to transform the value into a `Date` object.', `Row ID: ${rowId}, field: "${field}".`].join('\n'));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export function gridDateFormatter({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "hidden" | "color" | "page" | "content" | "size" | "style" | "height" | "translate" | "width" | "padding" | "disabled" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "
|
|
3
|
-
component?: React.ElementType<any> | undefined;
|
|
4
|
-
}>, "ref"> | Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "ref"> & React.RefAttributes<React.Component<any, any, any>>, "hidden" | "color" | "page" | "content" | "size" | "style" | "height" | "translate" | "width" | "padding" | "disabled" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "
|
|
5
|
-
component?: React.ElementType<any> | undefined;
|
|
2
|
+
export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "hidden" | "color" | "page" | "content" | "size" | "style" | "height" | "translate" | "width" | "padding" | "disabled" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "rowSpan" | "scope" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | "classes" | "variant" | "slotProps" | "slots" | "count" | "getItemAriaLabel" | "onPageChange" | "rowsPerPage" | "showFirstButton" | "showLastButton" | "labelDisplayedRows" | "labelRowsPerPage" | "onRowsPerPageChange" | "rowsPerPageOptions" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps"> & {
|
|
3
|
+
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
4
|
+
}>, "ref"> | Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "ref"> & React.RefAttributes<React.Component<any, any, any>>, "hidden" | "color" | "page" | "content" | "size" | "style" | "height" | "translate" | "width" | "padding" | "disabled" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "rowSpan" | "scope" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | "classes" | "variant" | "slotProps" | "slots" | "count" | "getItemAriaLabel" | "onPageChange" | "rowsPerPage" | "showFirstButton" | "showLastButton" | "labelDisplayedRows" | "labelRowsPerPage" | "onRowsPerPageChange" | "rowsPerPageOptions" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps"> & {
|
|
5
|
+
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
6
6
|
}>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -60,7 +60,7 @@ export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginat
|
|
|
60
60
|
const warnedOnceMissingInPageSizeOptions = React.useRef(false);
|
|
61
61
|
const pageSize = (_rootProps$pagination = (_rootProps$pagination2 = rootProps.paginationModel) == null ? void 0 : _rootProps$pagination2.pageSize) != null ? _rootProps$pagination : paginationModel.pageSize;
|
|
62
62
|
if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !isPageSizeIncludedInPageSizeOptions(pageSize)) {
|
|
63
|
-
console.warn([`MUI: The page size \`${paginationModel.pageSize}\` is not preset in the \`pageSizeOptions
|
|
63
|
+
console.warn([`MUI X: The page size \`${paginationModel.pageSize}\` is not preset in the \`pageSizeOptions\`.`, `Add it to show the pagination select.`].join('\n'));
|
|
64
64
|
warnedOnceMissingInPageSizeOptions.current = true;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -36,7 +36,7 @@ function GridActionsCell(props) {
|
|
|
36
36
|
const buttonId = useId();
|
|
37
37
|
const rootProps = useGridRootProps();
|
|
38
38
|
if (!hasActions(colDef)) {
|
|
39
|
-
throw new Error('MUI: Missing the `getActions` property in the `GridColDef`.');
|
|
39
|
+
throw new Error('MUI X: Missing the `getActions` property in the `GridColDef`.');
|
|
40
40
|
}
|
|
41
41
|
const options = colDef.getActions(apiRef.current.getRowParams(id));
|
|
42
42
|
const iconButtons = options.filter(option => !option.props.showInMenu);
|
|
@@ -16,24 +16,24 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<{
|
|
|
16
16
|
label: string;
|
|
17
17
|
icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
18
18
|
/** from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component */
|
|
19
|
-
component?: React.ElementType<any> | undefined;
|
|
19
|
+
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
20
20
|
} & {
|
|
21
21
|
showInMenu?: false | undefined;
|
|
22
22
|
icon: React.ReactElement;
|
|
23
23
|
} & import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
24
24
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
25
25
|
}, "color" | "size" | "style" | "disabled" | "action" | "className" | "tabIndex" | "children" | "sx" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
|
|
26
|
-
component?: React.ElementType<any> | undefined;
|
|
26
|
+
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
27
27
|
}, "ref"> | Omit<{
|
|
28
28
|
label: string;
|
|
29
29
|
icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
30
30
|
/** from https://mui.com/material-ui/api/button-base/#ButtonBase-prop-component */
|
|
31
|
-
component?: React.ElementType<any> | undefined;
|
|
31
|
+
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
32
32
|
} & {
|
|
33
33
|
showInMenu: true;
|
|
34
34
|
} & import("@mui/material/MenuItem").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
35
35
|
ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
|
|
36
|
-
}, "style" | "dense" | "disabled" | "action" | "
|
|
37
|
-
component?: React.ElementType<any> | undefined;
|
|
36
|
+
}, "style" | "dense" | "disabled" | "action" | "selected" | "autoFocus" | "className" | "tabIndex" | "children" | "sx" | "classes" | "disableGutters" | "divider" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef"> & {
|
|
37
|
+
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
38
38
|
}, "ref">) & React.RefAttributes<HTMLButtonElement>>;
|
|
39
39
|
export { GridActionsCellItem };
|
|
@@ -275,7 +275,7 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
277
|
if (!warnedOnce) {
|
|
278
|
-
console.warn([`MUI: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell == null ? void 0 : focusedCell.id}, field=${focusedCell == null ? void 0 : focusedCell.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
|
|
278
|
+
console.warn([`MUI X: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell == null ? void 0 : focusedCell.id}, field=${focusedCell == null ? void 0 : focusedCell.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
|
|
279
279
|
warnedOnce = true;
|
|
280
280
|
}
|
|
281
281
|
};
|
|
@@ -546,7 +546,7 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
546
546
|
return;
|
|
547
547
|
}
|
|
548
548
|
if (!warnedOnce) {
|
|
549
|
-
console.warn([`MUI: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell == null ? void 0 : focusedCell.id}, field=${focusedCell == null ? void 0 : focusedCell.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
|
|
549
|
+
console.warn([`MUI X: The cell with id=${rowId} and field=${field} received focus.`, `According to the state, the focus should be at id=${focusedCell == null ? void 0 : focusedCell.id}, field=${focusedCell == null ? void 0 : focusedCell.field}.`, "Not syncing the state may cause unwanted behaviors since the `cellFocusIn` event won't be fired.", 'Call `fireEvent.mouseUp` before the `fireEvent.click` to sync the focus with the state.'].join('\n'));
|
|
550
550
|
warnedOnce = true;
|
|
551
551
|
}
|
|
552
552
|
};
|
|
@@ -17,15 +17,15 @@ export interface GridPanelProps extends Partial<React.ComponentProps<typeof Grid
|
|
|
17
17
|
}
|
|
18
18
|
export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
|
|
19
19
|
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<Omit<import("@mui/base").PopperProps, "direction"> & {
|
|
20
|
-
component?: React.ElementType<any> | undefined;
|
|
20
|
+
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
21
21
|
components?: {
|
|
22
|
-
Root?: React.ElementType<any> | undefined;
|
|
22
|
+
Root?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
23
23
|
} | undefined;
|
|
24
24
|
componentsProps?: {
|
|
25
25
|
root?: import("@mui/base").SlotComponentProps<"div", import("@mui/base").PopperRootSlotPropsOverrides, import("@mui/base").PopperOwnProps> | undefined;
|
|
26
26
|
} | undefined;
|
|
27
27
|
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
28
|
-
} & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "
|
|
28
|
+
} & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "components" | "slotProps" | "slots" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "componentsProps" | keyof React.RefAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
29
29
|
ownerState: OwnerState;
|
|
30
30
|
}, {}, {}>;
|
|
31
31
|
declare const GridPanel: React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -91,7 +91,7 @@ const getLogicOperatorLocaleKey = logicOperator => {
|
|
|
91
91
|
case GridLogicOperator.Or:
|
|
92
92
|
return 'filterPanelOperatorOr';
|
|
93
93
|
default:
|
|
94
|
-
throw new Error('MUI: Invalid `logicOperator` property in the `GridFilterPanel`.');
|
|
94
|
+
throw new Error('MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.');
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
const getColumnLabel = col => col.headerName || col.field;
|
|
@@ -6,12 +6,16 @@ export type GridToolbarQuickFilterProps = TextFieldProps & {
|
|
|
6
6
|
* Function responsible for parsing text input in an array of independent values for quick filtering.
|
|
7
7
|
* @param {string} input The value entered by the user
|
|
8
8
|
* @returns {any[]} The array of value on which quick filter is applied
|
|
9
|
+
* @default (searchText: string) => searchText
|
|
10
|
+
* .split(' ')
|
|
11
|
+
* .filter((word) => word !== '')
|
|
9
12
|
*/
|
|
10
13
|
quickFilterParser?: (input: string) => any[];
|
|
11
14
|
/**
|
|
12
15
|
* Function responsible for formatting values of quick filter in a string when the model is modified
|
|
13
16
|
* @param {any[]} values The new values passed to the quick filter model
|
|
14
17
|
* @returns {string} The string to display in the text field
|
|
18
|
+
* @default (values: string[]) => values.join(' ')
|
|
15
19
|
*/
|
|
16
20
|
quickFilterFormatter?: (values: NonNullable<GridFilterModel['quickFilterValues']>) => string;
|
|
17
21
|
/**
|
|
@@ -124,12 +124,16 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
|
|
|
124
124
|
* Function responsible for formatting values of quick filter in a string when the model is modified
|
|
125
125
|
* @param {any[]} values The new values passed to the quick filter model
|
|
126
126
|
* @returns {string} The string to display in the text field
|
|
127
|
+
* @default (values: string[]) => values.join(' ')
|
|
127
128
|
*/
|
|
128
129
|
quickFilterFormatter: PropTypes.func,
|
|
129
130
|
/**
|
|
130
131
|
* Function responsible for parsing text input in an array of independent values for quick filtering.
|
|
131
132
|
* @param {string} input The value entered by the user
|
|
132
133
|
* @returns {any[]} The array of value on which quick filter is applied
|
|
134
|
+
* @default (searchText: string) => searchText
|
|
135
|
+
* .split(' ')
|
|
136
|
+
* .filter((word) => word !== '')
|
|
133
137
|
*/
|
|
134
138
|
quickFilterParser: PropTypes.func
|
|
135
139
|
} : void 0;
|