@mui/x-data-grid 6.18.0 → 7.0.0-alpha.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/CHANGELOG.md +212 -5
- package/DataGrid/DataGrid.js +0 -10
- package/DataGrid/useDataGridProps.js +9 -14
- package/colDef/gridActionsColDef.js +1 -2
- package/colDef/gridBooleanColDef.js +0 -1
- package/colDef/gridBooleanOperators.js +3 -4
- package/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/colDef/gridDateOperators.js +10 -11
- package/colDef/gridNumericColDef.js +1 -3
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridNumericOperators.js +13 -14
- package/colDef/gridSingleSelectOperators.js +5 -6
- package/colDef/gridStringColDef.js +1 -3
- package/colDef/gridStringOperators.d.ts +2 -2
- package/colDef/gridStringOperators.js +17 -13
- package/components/cell/GridActionsCell.js +19 -12
- package/components/cell/GridCell.js +4 -4
- package/constants/defaultGridSlotsComponents.js +17 -17
- package/hooks/features/export/useGridPrintExport.js +7 -10
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -0
- package/hooks/features/filter/gridFilterUtils.js +20 -71
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +2 -1
- package/hooks/features/rows/useGridRows.js +4 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/internals/utils/computeSlots.d.ts +4 -6
- package/internals/utils/computeSlots.js +10 -9
- package/internals/utils/index.d.ts +0 -1
- package/internals/utils/index.js +0 -1
- package/internals/utils/useProps.d.ts +1 -8
- package/internals/utils/useProps.js +5 -8
- package/joy/icons.d.ts +1 -2
- package/joy/joySlots.d.ts +1 -2
- package/legacy/DataGrid/DataGrid.js +0 -10
- package/legacy/DataGrid/useDataGridProps.js +10 -18
- package/legacy/colDef/gridActionsColDef.js +1 -2
- package/legacy/colDef/gridBooleanColDef.js +0 -1
- package/legacy/colDef/gridBooleanOperators.js +3 -4
- package/legacy/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/legacy/colDef/gridDateOperators.js +10 -11
- package/legacy/colDef/gridNumericColDef.js +1 -3
- package/legacy/colDef/gridNumericOperators.js +13 -14
- package/legacy/colDef/gridSingleSelectOperators.js +5 -6
- package/legacy/colDef/gridStringColDef.js +1 -3
- package/legacy/colDef/gridStringOperators.js +17 -13
- package/legacy/components/cell/GridActionsCell.js +21 -12
- package/legacy/components/cell/GridCell.js +6 -4
- package/legacy/constants/defaultGridSlotsComponents.js +17 -17
- package/legacy/hooks/features/export/useGridPrintExport.js +7 -10
- package/legacy/hooks/features/filter/gridFilterUtils.js +20 -71
- package/legacy/hooks/features/filter/useGridFilter.js +2 -1
- package/legacy/hooks/features/rows/useGridRows.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -1
- package/legacy/internals/utils/computeSlots.js +10 -9
- package/legacy/internals/utils/index.js +0 -1
- package/legacy/internals/utils/useProps.js +5 -6
- package/legacy/locales/csCZ.js +2 -2
- package/legacy/material/index.js +48 -48
- package/legacy/utils/getPublicApiRef.js +5 -0
- package/locales/csCZ.js +2 -2
- package/material/index.js +48 -48
- package/models/api/gridFilterApi.d.ts +5 -0
- package/models/colDef/gridColDef.d.ts +4 -14
- package/models/colDef/index.d.ts +1 -1
- package/models/gridFilterOperator.d.ts +4 -16
- package/models/gridIconSlotsComponent.d.ts +35 -36
- package/models/gridSlotsComponent.d.ts +31 -34
- package/models/index.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +3 -14
- package/modern/DataGrid/DataGrid.js +0 -10
- package/modern/DataGrid/useDataGridProps.js +7 -9
- package/modern/colDef/gridActionsColDef.js +1 -2
- package/modern/colDef/gridBooleanColDef.js +0 -1
- package/modern/colDef/gridBooleanOperators.js +3 -4
- package/modern/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/modern/colDef/gridDateOperators.js +10 -11
- package/modern/colDef/gridNumericColDef.js +1 -3
- package/modern/colDef/gridNumericOperators.js +13 -14
- package/modern/colDef/gridSingleSelectOperators.js +5 -6
- package/modern/colDef/gridStringColDef.js +1 -3
- package/modern/colDef/gridStringOperators.js +17 -13
- package/modern/components/cell/GridActionsCell.js +18 -12
- package/modern/components/cell/GridCell.js +3 -3
- package/modern/constants/defaultGridSlotsComponents.js +17 -17
- package/modern/hooks/features/export/useGridPrintExport.js +6 -10
- package/modern/hooks/features/filter/gridFilterUtils.js +20 -70
- package/modern/hooks/features/filter/useGridFilter.js +2 -1
- package/modern/hooks/features/rows/useGridRows.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/internals/utils/computeSlots.js +10 -9
- package/modern/internals/utils/index.js +0 -1
- package/modern/internals/utils/useProps.js +5 -8
- package/modern/locales/csCZ.js +2 -2
- package/modern/material/index.js +48 -48
- package/modern/utils/getPublicApiRef.js +5 -0
- package/node/DataGrid/DataGrid.js +0 -10
- package/node/DataGrid/useDataGridProps.js +6 -8
- package/node/colDef/gridActionsColDef.js +1 -2
- package/node/colDef/gridBooleanColDef.js +0 -1
- package/node/colDef/gridBooleanOperators.js +3 -4
- package/node/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/node/colDef/gridDateOperators.js +10 -11
- package/node/colDef/gridNumericColDef.js +1 -3
- package/node/colDef/gridNumericOperators.js +14 -14
- package/node/colDef/gridSingleSelectOperators.js +5 -6
- package/node/colDef/gridStringColDef.js +1 -3
- package/node/colDef/gridStringOperators.js +18 -13
- package/node/components/cell/GridActionsCell.js +18 -12
- package/node/components/cell/GridCell.js +3 -3
- package/node/constants/defaultGridSlotsComponents.js +17 -17
- package/node/hooks/features/export/useGridPrintExport.js +5 -9
- package/node/hooks/features/filter/gridFilterUtils.js +21 -70
- package/node/hooks/features/filter/useGridFilter.js +2 -1
- package/node/hooks/features/rows/useGridRows.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +13 -13
- package/node/internals/utils/computeSlots.js +10 -8
- package/node/internals/utils/index.js +0 -11
- package/node/internals/utils/useProps.js +4 -8
- package/node/locales/csCZ.js +2 -2
- package/node/material/index.js +48 -48
- package/node/utils/getPublicApiRef.js +11 -0
- package/package.json +1 -1
- package/utils/getPublicApiRef.d.ts +3 -0
- package/utils/getPublicApiRef.js +5 -0
- package/colDef/utils.d.ts +0 -21
- package/colDef/utils.js +0 -51
- package/internals/utils/slotsMigration.d.ts +0 -4
- package/internals/utils/slotsMigration.js +0 -13
- package/legacy/colDef/utils.js +0 -51
- package/legacy/internals/utils/slotsMigration.js +0 -14
- package/modern/colDef/utils.js +0 -51
- package/modern/internals/utils/slotsMigration.js +0 -13
- package/node/colDef/utils.js +0 -63
- package/node/internals/utils/slotsMigration.js +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,213 @@
|
|
|
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.0
|
|
7
|
+
|
|
8
|
+
_Nov 10, 2023_
|
|
9
|
+
|
|
10
|
+
We're thrilled to announce the first alpha release of our next major version, v7.
|
|
11
|
+
This release introduces a few breaking changes, paving the way for the upcoming features like Pivoting and DateTimeRangePicker.
|
|
12
|
+
|
|
13
|
+
A special shoutout to thank the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
14
|
+
|
|
15
|
+
- 🚀 First v7 alpha release
|
|
16
|
+
- ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
|
|
17
|
+
- 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/)
|
|
18
|
+
- 💫 New recipes added for the data grid
|
|
19
|
+
- 📈 `<ChartsReferenceLine />` component is now available
|
|
20
|
+
- 🌍 Add Basque (eu) locale, improve Czech (cs-CZ) and Spanish (es-ES) locales
|
|
21
|
+
- 🐞 Bugfixes
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### Breaking changes
|
|
27
|
+
|
|
28
|
+
- The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead. See [components section](/x/react-data-grid/components/) for more details.
|
|
29
|
+
- The print export will now only print the selected rows if there are any.
|
|
30
|
+
If there are no selected rows, it will print all rows. This makes the print export consistent with the other exports.
|
|
31
|
+
You can [customize the rows to export by using the `getRowsToExport` function](/x/react-data-grid/export/#customizing-the-rows-to-export).
|
|
32
|
+
- The `getApplyFilterFnV7` in `GridFilterOperator` was renamed to `getApplyFilterFn`.
|
|
33
|
+
If you use `getApplyFilterFnV7` directly - rename it to `getApplyFilterFn`.
|
|
34
|
+
- The signature of the function returned by `getApplyFilterFn` has changed for performance reasons:
|
|
35
|
+
|
|
36
|
+
```diff
|
|
37
|
+
const getApplyFilterFn: GetApplyFilterFn<any, unknown> = (filterItem) => {
|
|
38
|
+
if (!filterItem.value) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
const filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
|
|
42
|
+
- return (cellParams) => {
|
|
43
|
+
- const { value } = cellParams;
|
|
44
|
+
+ return (value, row, colDef, apiRef) => {
|
|
45
|
+
return value != null ? filterRegex.test(String(value)) : false;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The `getApplyQuickFilterFnV7` in `GridColDef` was renamed to `getApplyQuickFilterFn`.
|
|
51
|
+
If you use `getApplyQuickFilterFnV7` directly - rename it to `getApplyQuickFilterFn`.
|
|
52
|
+
- The signature of the function returned by `getApplyQuickFilterFn` has changed for performance reasons:
|
|
53
|
+
|
|
54
|
+
```diff
|
|
55
|
+
const getGridStringQuickFilterFn: GetApplyQuickFilterFn<any, unknown> = (value) => {
|
|
56
|
+
if (!value) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
const filterRegex = new RegExp(escapeRegExp(value), 'i');
|
|
60
|
+
- return (cellParams) => {
|
|
61
|
+
- const { formattedValue } = cellParams;
|
|
62
|
+
+ return (value, row, column, apiRef) => {
|
|
63
|
+
+ let formattedValue = apiRef.current.getRowFormattedValue(row, column);
|
|
64
|
+
return formattedValue != null ? filterRegex.test(formattedValue.toString()) : false;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-data-grid@7.0.0-alpha.0`
|
|
70
|
+
|
|
71
|
+
- [DataGrid] Fix for error thrown when removing skeleton rows, after sorting is applied (#10807) @benjaminbialy
|
|
72
|
+
- [DataGrid] Fix: `undefined` slot value (#10937) @romgrk
|
|
73
|
+
- [DataGrid] Print selected rows by default (#10846) @cherniavskii
|
|
74
|
+
- [DataGrid] Remove deprecated `components` and `componentsProps` (#10911) @MBilalShafi
|
|
75
|
+
- [DataGrid] Remove legacy filtering API (#10897) @cherniavskii
|
|
76
|
+
- [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10882) @michelengelen
|
|
77
|
+
- [DataGrid] Added a recipe for using non-native select in filter panel (#10916) @michelengelen
|
|
78
|
+
- [DataGrid] Added a recipe to style cells without impacting the aggregation cells (#10913) @michelengelen
|
|
79
|
+
- [l10n] Improve Czech (cs-CZ) locale (#10949) @luborepka
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.0`, plus:
|
|
84
|
+
|
|
85
|
+
- [DataGridPro] Autosize Columns - Fix headers being cut off (#10666) @gitstart
|
|
86
|
+
- [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
|
|
87
|
+
|
|
88
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
89
|
+
|
|
90
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.0`, plus:
|
|
91
|
+
|
|
92
|
+
- [DataGridPremium] Render aggregation label when `renderHeader` is used (#10936) @cherniavskii
|
|
93
|
+
|
|
94
|
+
### Date Pickers
|
|
95
|
+
|
|
96
|
+
#### Breaking changes
|
|
97
|
+
|
|
98
|
+
- The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead.
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.0`
|
|
101
|
+
|
|
102
|
+
- [pickers] Escape non tokens words (#10400) @alexfauquette
|
|
103
|
+
- [fields] Fix `MultiInputTimeRangeField` section selection (#10922) @noraleonte
|
|
104
|
+
- [pickers] Refine `referenceDate` behavior in views (#10863) @LukasTy
|
|
105
|
+
- [pickers] Remove `components` and `componentsProps` props (#10700) @alexfauquette
|
|
106
|
+
- [l10n] Add Basque (eu) locale and improve Spanish (es-ES) locale (#10819) @lajtomekadimon
|
|
107
|
+
- [pickers] Add short weekdays token (#10988) @alexfauquette
|
|
108
|
+
|
|
109
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
110
|
+
|
|
111
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.0`.
|
|
112
|
+
|
|
113
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.0`
|
|
114
|
+
|
|
115
|
+
#### Breaking changes
|
|
116
|
+
|
|
117
|
+
Types for `slots` and `slotProps` got renamed by removing the "Component" which is meaningless for charts.
|
|
118
|
+
Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.
|
|
119
|
+
|
|
120
|
+
Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
121
|
+
|
|
122
|
+
```diff
|
|
123
|
+
-ChartsTooltipSlotsComponent
|
|
124
|
+
+ChartsTooltipSlots
|
|
125
|
+
|
|
126
|
+
-ChartsTooltipSlotComponentProps
|
|
127
|
+
+ChartsTooltipSlotProps
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- [charts] Add `<ChartsReferenceLine />` component (#10597) (#10946) @alexfauquette
|
|
131
|
+
- [charts] Improve properties JSDoc (#10931) (#10955) @alexfauquette
|
|
132
|
+
- [charts] Rename `slots` and `slotProps` types (#10875) @alexfauquette
|
|
133
|
+
|
|
134
|
+
### `@mui/x-codemod@7.0.0-alpha.0`
|
|
135
|
+
|
|
136
|
+
- [codemod] Add `v7.0.0/preset-safe` (#10973) @LukasTy
|
|
137
|
+
|
|
138
|
+
### Docs
|
|
139
|
+
|
|
140
|
+
- [docs] Add `@next` tag to the installation instructions (#10963) @MBilalShafi
|
|
141
|
+
- [docs] Document how to hide the legend (#10951) @alexfauquette
|
|
142
|
+
- [docs] Fix typo in the migration guide (#10972) @flaviendelangle
|
|
143
|
+
|
|
144
|
+
### Core
|
|
145
|
+
|
|
146
|
+
- [core] Adds migration docs for charts, pickers and tree view (#10926) @michelengelen
|
|
147
|
+
- [core] Bump monorepo (#10959) @LukasTy
|
|
148
|
+
- [core] Changed prettier branch value to next (#10917) @michelengelen
|
|
149
|
+
- [core] Fix GitHub title tag consistency @oliviertassinari
|
|
150
|
+
- [core] Fixed wrong package names in migration docs (#10953) @michelengelen
|
|
151
|
+
- [core] Merge `master` into `next` (#10929) @cherniavskii
|
|
152
|
+
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
153
|
+
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
154
|
+
|
|
155
|
+
## 6.18.1
|
|
156
|
+
|
|
157
|
+
_Nov 9, 2023_
|
|
158
|
+
|
|
159
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
160
|
+
|
|
161
|
+
- ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
|
|
162
|
+
- 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/) published
|
|
163
|
+
- 📈 `<ChartsReferenceLine />` component is now available
|
|
164
|
+
- 🐞 Bugfixes
|
|
165
|
+
- 📚 Documentation improvements
|
|
166
|
+
|
|
167
|
+
### Data Grid
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-data-grid@6.18.1`
|
|
170
|
+
|
|
171
|
+
- [DataGrid] Fix cell value type in quick filtering v7 (#10884) @cherniavskii
|
|
172
|
+
- [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10947) @michelengelen
|
|
173
|
+
- [DataGrid] Fix `undefined` slot values (#10934) @romgrk
|
|
174
|
+
|
|
175
|
+
#### `@mui/x-data-grid-pro@6.18.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
176
|
+
|
|
177
|
+
Same changes as in `@mui/x-data-grid@6.18.1`, plus:
|
|
178
|
+
|
|
179
|
+
- [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
|
|
180
|
+
|
|
181
|
+
#### `@mui/x-data-grid-premium@6.18.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
182
|
+
|
|
183
|
+
Same changes as in `@mui/x-data-grid-pro@6.18.1`, plus:
|
|
184
|
+
|
|
185
|
+
- [DataGridPremium] Render aggregation label when `renderHeader` is used (#10961) @cherniavskii
|
|
186
|
+
|
|
187
|
+
### Date Pickers
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-date-pickers@6.18.1`
|
|
190
|
+
|
|
191
|
+
- [fields] Fix multi input date time field section selection (#10915) @noraleonte
|
|
192
|
+
- [pickers] Always use up-to-date `defaultView` (#10889) @LukasTy
|
|
193
|
+
|
|
194
|
+
#### `@mui/x-date-pickers-pro@6.18.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
195
|
+
|
|
196
|
+
Same changes as in `@mui/x-date-pickers@6.18.1`.
|
|
197
|
+
|
|
198
|
+
### Charts / `@mui/x-charts@6.18.1`
|
|
199
|
+
|
|
200
|
+
- [charts] Add `<ChartsReferenceLine />` component (#10597) @wascou
|
|
201
|
+
- [charts] Improve properties JSDoc (#10931) @alexfauquette
|
|
202
|
+
|
|
203
|
+
### Docs
|
|
204
|
+
|
|
205
|
+
- [docs] Fix charts docs as stable (#10888) @alexfauquette
|
|
206
|
+
- [docs] Document how to hide the legend (#10954) @alexfauquette
|
|
207
|
+
|
|
208
|
+
### Core
|
|
209
|
+
|
|
210
|
+
- [core] Adds new alpha version to version select on the docs (#10944) @michelengelen
|
|
211
|
+
- [core] Fix GitHub title tag consistency @oliviertassinari
|
|
212
|
+
|
|
6
213
|
## 6.18.0
|
|
7
214
|
|
|
8
215
|
_Nov 3, 2023_
|
|
@@ -357,7 +564,7 @@ Same changes as in `@mui/x-date-pickers@6.16.1`, plus:
|
|
|
357
564
|
|
|
358
565
|
- [core] Fix casing consistency with legal and marketing content @oliviertassinari
|
|
359
566
|
- [core] Revert the link in the priority support ticket description (#10517) @michelengelen
|
|
360
|
-
- [
|
|
567
|
+
- [changelog] Polish image @oliviertassinari
|
|
361
568
|
|
|
362
569
|
## 6.16.0
|
|
363
570
|
|
|
@@ -1149,7 +1356,7 @@ Same changes as in `@mui/x-date-pickers@6.10.1`.
|
|
|
1149
1356
|
### Core
|
|
1150
1357
|
|
|
1151
1358
|
- [core] Add `validate` command (#9714) @romgrk
|
|
1152
|
-
- [
|
|
1359
|
+
- [changelog] Update generator to new format @oliviertassinari
|
|
1153
1360
|
|
|
1154
1361
|
## 6.10.0
|
|
1155
1362
|
|
|
@@ -1207,7 +1414,7 @@ Same changes as in `@mui/x-date-pickers@6.10.0`.
|
|
|
1207
1414
|
|
|
1208
1415
|
- [core] Disambiguate eslint plugin name @oliviertassinari
|
|
1209
1416
|
- [core] Update priority support issue template and prompt (#9574) @DanailH
|
|
1210
|
-
- [
|
|
1417
|
+
- [changelog] Clarify each plan (#9446) @oliviertassinari
|
|
1211
1418
|
- [license] Fix error terminology (#9614) @oliviertassinari
|
|
1212
1419
|
|
|
1213
1420
|
## 6.9.2
|
|
@@ -1356,8 +1563,8 @@ Same changes as in `@mui/x-date-pickers@6.9.1`.
|
|
|
1356
1563
|
- [core] Fix priority support prompt action (#9472) @DanailH
|
|
1357
1564
|
- [core] Update `uses` for priority support action (#9480) @DanailH
|
|
1358
1565
|
- [core] Bumb update monorepo (#9476) @alexfauquette
|
|
1359
|
-
- [
|
|
1360
|
-
- [
|
|
1566
|
+
- [changelog] Fix media quality (#9439) @oliviertassinari
|
|
1567
|
+
- [changelog] Remove height img attribute @oliviertassinari
|
|
1361
1568
|
- [test] Skip flaky row pinning tests in JSDOM (#9511) @cherniavskii
|
|
1362
1569
|
|
|
1363
1570
|
## 6.9.0
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -125,16 +125,6 @@ DataGridRaw.propTypes = {
|
|
|
125
125
|
* If defined, the grid will ignore the `hide` property in [[GridColDef]].
|
|
126
126
|
*/
|
|
127
127
|
columnVisibilityModel: PropTypes.object,
|
|
128
|
-
/**
|
|
129
|
-
* Overridable components.
|
|
130
|
-
* @deprecated Use `slots` instead.
|
|
131
|
-
*/
|
|
132
|
-
components: PropTypes.object,
|
|
133
|
-
/**
|
|
134
|
-
* Overridable components props dynamically passed to the component at rendering.
|
|
135
|
-
* @deprecated Use the `slotProps` prop instead.
|
|
136
|
-
*/
|
|
137
|
-
componentsProps: PropTypes.object,
|
|
138
128
|
/**
|
|
139
129
|
* Set the density of the grid.
|
|
140
130
|
* @default "standard"
|
|
@@ -4,7 +4,7 @@ import { useThemeProps } from '@mui/material/styles';
|
|
|
4
4
|
import { GRID_DEFAULT_LOCALE_TEXT } from '../constants';
|
|
5
5
|
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '../constants/defaultGridSlotsComponents';
|
|
6
6
|
import { GridEditModes } from '../models';
|
|
7
|
-
import { computeSlots, useProps
|
|
7
|
+
import { computeSlots, useProps } from '../internals/utils';
|
|
8
8
|
const DATA_GRID_FORCED_PROPS = {
|
|
9
9
|
disableMultipleColumnsFiltering: true,
|
|
10
10
|
disableMultipleColumnsSorting: true,
|
|
@@ -72,24 +72,19 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
72
72
|
clipboardCopyCellDelimiter: '\t',
|
|
73
73
|
rowPositionsDebounceMs: 166
|
|
74
74
|
};
|
|
75
|
-
const defaultSlots =
|
|
75
|
+
const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
76
76
|
export const useDataGridProps = inProps => {
|
|
77
|
-
const
|
|
77
|
+
const themedProps = useProps(useThemeProps({
|
|
78
78
|
props: inProps,
|
|
79
79
|
name: 'MuiDataGrid'
|
|
80
80
|
}));
|
|
81
81
|
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
82
82
|
const slots = React.useMemo(() => computeSlots({
|
|
83
83
|
defaultSlots,
|
|
84
|
-
slots: themedProps.slots
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
localeText,
|
|
91
|
-
slots,
|
|
92
|
-
slotProps: (_themedProps$slotProp = themedProps.slotProps) != null ? _themedProps$slotProp : componentsProps
|
|
93
|
-
}, DATA_GRID_FORCED_PROPS);
|
|
94
|
-
}, [themedProps, localeText, slots, componentsProps]);
|
|
84
|
+
slots: themedProps.slots
|
|
85
|
+
}), [themedProps.slots]);
|
|
86
|
+
return React.useMemo(() => _extends({}, DATA_GRID_PROPS_DEFAULT_VALUES, themedProps, {
|
|
87
|
+
localeText,
|
|
88
|
+
slots
|
|
89
|
+
}, DATA_GRID_FORCED_PROPS), [themedProps, localeText, slots]);
|
|
95
90
|
};
|
|
@@ -14,6 +14,5 @@ export const GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
14
14
|
disableColumnMenu: true,
|
|
15
15
|
disableExport: true,
|
|
16
16
|
renderCell: renderActionsCell,
|
|
17
|
-
getApplyQuickFilterFn: undefined
|
|
18
|
-
getApplyQuickFilterFnV7: undefined
|
|
17
|
+
getApplyQuickFilterFn: undefined
|
|
19
18
|
});
|
|
@@ -36,7 +36,6 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
36
36
|
valueFormatter: gridBooleanFormatter,
|
|
37
37
|
filterOperators: getGridBooleanOperators(),
|
|
38
38
|
getApplyQuickFilterFn: undefined,
|
|
39
|
-
getApplyQuickFilterFnV7: undefined,
|
|
40
39
|
// @ts-ignore
|
|
41
40
|
aggregable: false,
|
|
42
41
|
// @ts-ignore
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GridFilterInputBoolean } from '../components/panel/filterPanel/GridFilterInputBoolean';
|
|
2
|
-
|
|
3
|
-
export const getGridBooleanOperators = () => convertLegacyOperators([{
|
|
2
|
+
export const getGridBooleanOperators = () => [{
|
|
4
3
|
value: 'is',
|
|
5
|
-
|
|
4
|
+
getApplyFilterFn: filterItem => {
|
|
6
5
|
if (!filterItem.value) {
|
|
7
6
|
return null;
|
|
8
7
|
}
|
|
@@ -12,4 +11,4 @@ export const getGridBooleanOperators = () => convertLegacyOperators([{
|
|
|
12
11
|
};
|
|
13
12
|
},
|
|
14
13
|
InputComponent: GridFilterInputBoolean
|
|
15
|
-
}]
|
|
14
|
+
}];
|
|
@@ -19,7 +19,6 @@ export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF
|
|
|
19
19
|
disableReorder: true,
|
|
20
20
|
disableExport: true,
|
|
21
21
|
getApplyQuickFilterFn: undefined,
|
|
22
|
-
getApplyQuickFilterFnV7: undefined,
|
|
23
22
|
valueGetter: params => {
|
|
24
23
|
const selectionLookup = selectedIdsLookupSelector(params.api.state, params.api.instanceId);
|
|
25
24
|
return selectionLookup[params.id] !== undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GridFilterInputDate } from '../components/panel/filterPanel/GridFilterInputDate';
|
|
2
|
-
import { convertLegacyOperators } from './utils';
|
|
3
2
|
const dateRegex = /(\d+)-(\d+)-(\d+)/;
|
|
4
3
|
const dateTimeRegex = /(\d+)-(\d+)-(\d+)T(\d+):(\d+)/;
|
|
5
4
|
function buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {
|
|
@@ -22,9 +21,9 @@ function buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {
|
|
|
22
21
|
return compareFn(timeToCompare, time);
|
|
23
22
|
};
|
|
24
23
|
}
|
|
25
|
-
export const getGridDateOperators = showTime =>
|
|
24
|
+
export const getGridDateOperators = showTime => [{
|
|
26
25
|
value: 'is',
|
|
27
|
-
|
|
26
|
+
getApplyFilterFn: filterItem => {
|
|
28
27
|
return buildApplyFilterFn(filterItem, (value1, value2) => value1 === value2, showTime);
|
|
29
28
|
},
|
|
30
29
|
InputComponent: GridFilterInputDate,
|
|
@@ -33,7 +32,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
|
|
|
33
32
|
}
|
|
34
33
|
}, {
|
|
35
34
|
value: 'not',
|
|
36
|
-
|
|
35
|
+
getApplyFilterFn: filterItem => {
|
|
37
36
|
return buildApplyFilterFn(filterItem, (value1, value2) => value1 !== value2, showTime);
|
|
38
37
|
},
|
|
39
38
|
InputComponent: GridFilterInputDate,
|
|
@@ -42,7 +41,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
|
|
|
42
41
|
}
|
|
43
42
|
}, {
|
|
44
43
|
value: 'after',
|
|
45
|
-
|
|
44
|
+
getApplyFilterFn: filterItem => {
|
|
46
45
|
return buildApplyFilterFn(filterItem, (value1, value2) => value1 > value2, showTime);
|
|
47
46
|
},
|
|
48
47
|
InputComponent: GridFilterInputDate,
|
|
@@ -51,7 +50,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
|
|
|
51
50
|
}
|
|
52
51
|
}, {
|
|
53
52
|
value: 'onOrAfter',
|
|
54
|
-
|
|
53
|
+
getApplyFilterFn: filterItem => {
|
|
55
54
|
return buildApplyFilterFn(filterItem, (value1, value2) => value1 >= value2, showTime);
|
|
56
55
|
},
|
|
57
56
|
InputComponent: GridFilterInputDate,
|
|
@@ -60,7 +59,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
|
|
|
60
59
|
}
|
|
61
60
|
}, {
|
|
62
61
|
value: 'before',
|
|
63
|
-
|
|
62
|
+
getApplyFilterFn: filterItem => {
|
|
64
63
|
return buildApplyFilterFn(filterItem, (value1, value2) => value1 < value2, showTime, !showTime);
|
|
65
64
|
},
|
|
66
65
|
InputComponent: GridFilterInputDate,
|
|
@@ -69,7 +68,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
|
|
|
69
68
|
}
|
|
70
69
|
}, {
|
|
71
70
|
value: 'onOrBefore',
|
|
72
|
-
|
|
71
|
+
getApplyFilterFn: filterItem => {
|
|
73
72
|
return buildApplyFilterFn(filterItem, (value1, value2) => value1 <= value2, showTime);
|
|
74
73
|
},
|
|
75
74
|
InputComponent: GridFilterInputDate,
|
|
@@ -78,7 +77,7 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
|
|
|
78
77
|
}
|
|
79
78
|
}, {
|
|
80
79
|
value: 'isEmpty',
|
|
81
|
-
|
|
80
|
+
getApplyFilterFn: () => {
|
|
82
81
|
return value => {
|
|
83
82
|
return value == null;
|
|
84
83
|
};
|
|
@@ -86,10 +85,10 @@ export const getGridDateOperators = showTime => convertLegacyOperators([{
|
|
|
86
85
|
requiresFilterValue: false
|
|
87
86
|
}, {
|
|
88
87
|
value: 'isNotEmpty',
|
|
89
|
-
|
|
88
|
+
getApplyFilterFn: () => {
|
|
90
89
|
return value => {
|
|
91
90
|
return value != null;
|
|
92
91
|
};
|
|
93
92
|
},
|
|
94
93
|
requiresFilterValue: false
|
|
95
|
-
}]
|
|
94
|
+
}];
|
|
@@ -3,7 +3,6 @@ import { gridNumberComparator } from '../hooks/features/sorting/gridSortingUtils
|
|
|
3
3
|
import { isNumber } from '../utils/utils';
|
|
4
4
|
import { getGridNumericOperators, getGridNumericQuickFilterFn } from './gridNumericOperators';
|
|
5
5
|
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
6
|
-
import { convertQuickFilterV7ToLegacy } from './utils';
|
|
7
6
|
export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
8
7
|
type: 'number',
|
|
9
8
|
align: 'right',
|
|
@@ -14,6 +13,5 @@ export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
14
13
|
value
|
|
15
14
|
}) => isNumber(value) ? value.toLocaleString() : value || '',
|
|
16
15
|
filterOperators: getGridNumericOperators(),
|
|
17
|
-
getApplyQuickFilterFn:
|
|
18
|
-
getApplyQuickFilterFnV7: getGridNumericQuickFilterFn
|
|
16
|
+
getApplyQuickFilterFn: getGridNumericQuickFilterFn
|
|
19
17
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridFilterOperator } from '../models/gridFilterOperator';
|
|
2
|
-
import type {
|
|
3
|
-
export declare const getGridNumericQuickFilterFn:
|
|
2
|
+
import type { GetApplyQuickFilterFn } from '../models/colDef/gridColDef';
|
|
3
|
+
export declare const getGridNumericQuickFilterFn: GetApplyQuickFilterFn<any, number | string | null>;
|
|
4
4
|
export declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import { GridFilterInputValue } from '../components/panel/filterPanel/GridFilterInputValue';
|
|
2
2
|
import { GridFilterInputMultipleValue } from '../components/panel/filterPanel/GridFilterInputMultipleValue';
|
|
3
|
-
import { convertLegacyOperators, tagInternalFilter } from './utils';
|
|
4
3
|
const parseNumericValue = value => {
|
|
5
4
|
if (value == null) {
|
|
6
5
|
return null;
|
|
7
6
|
}
|
|
8
7
|
return Number(value);
|
|
9
8
|
};
|
|
10
|
-
export const getGridNumericQuickFilterFn =
|
|
9
|
+
export const getGridNumericQuickFilterFn = value => {
|
|
11
10
|
if (value == null || Number.isNaN(value) || value === '') {
|
|
12
11
|
return null;
|
|
13
12
|
}
|
|
14
13
|
return columnValue => {
|
|
15
14
|
return parseNumericValue(columnValue) === parseNumericValue(value);
|
|
16
15
|
};
|
|
17
|
-
}
|
|
18
|
-
export const getGridNumericOperators = () =>
|
|
16
|
+
};
|
|
17
|
+
export const getGridNumericOperators = () => [{
|
|
19
18
|
value: '=',
|
|
20
|
-
|
|
19
|
+
getApplyFilterFn: filterItem => {
|
|
21
20
|
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
22
21
|
return null;
|
|
23
22
|
}
|
|
@@ -31,7 +30,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
31
30
|
}
|
|
32
31
|
}, {
|
|
33
32
|
value: '!=',
|
|
34
|
-
|
|
33
|
+
getApplyFilterFn: filterItem => {
|
|
35
34
|
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
36
35
|
return null;
|
|
37
36
|
}
|
|
@@ -45,7 +44,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
45
44
|
}
|
|
46
45
|
}, {
|
|
47
46
|
value: '>',
|
|
48
|
-
|
|
47
|
+
getApplyFilterFn: filterItem => {
|
|
49
48
|
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
50
49
|
return null;
|
|
51
50
|
}
|
|
@@ -62,7 +61,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
62
61
|
}
|
|
63
62
|
}, {
|
|
64
63
|
value: '>=',
|
|
65
|
-
|
|
64
|
+
getApplyFilterFn: filterItem => {
|
|
66
65
|
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
67
66
|
return null;
|
|
68
67
|
}
|
|
@@ -79,7 +78,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
79
78
|
}
|
|
80
79
|
}, {
|
|
81
80
|
value: '<',
|
|
82
|
-
|
|
81
|
+
getApplyFilterFn: filterItem => {
|
|
83
82
|
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
84
83
|
return null;
|
|
85
84
|
}
|
|
@@ -96,7 +95,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
96
95
|
}
|
|
97
96
|
}, {
|
|
98
97
|
value: '<=',
|
|
99
|
-
|
|
98
|
+
getApplyFilterFn: filterItem => {
|
|
100
99
|
if (filterItem.value == null || Number.isNaN(filterItem.value)) {
|
|
101
100
|
return null;
|
|
102
101
|
}
|
|
@@ -113,7 +112,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
113
112
|
}
|
|
114
113
|
}, {
|
|
115
114
|
value: 'isEmpty',
|
|
116
|
-
|
|
115
|
+
getApplyFilterFn: () => {
|
|
117
116
|
return value => {
|
|
118
117
|
return value == null;
|
|
119
118
|
};
|
|
@@ -121,7 +120,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
121
120
|
requiresFilterValue: false
|
|
122
121
|
}, {
|
|
123
122
|
value: 'isNotEmpty',
|
|
124
|
-
|
|
123
|
+
getApplyFilterFn: () => {
|
|
125
124
|
return value => {
|
|
126
125
|
return value != null;
|
|
127
126
|
};
|
|
@@ -129,7 +128,7 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
129
128
|
requiresFilterValue: false
|
|
130
129
|
}, {
|
|
131
130
|
value: 'isAnyOf',
|
|
132
|
-
|
|
131
|
+
getApplyFilterFn: filterItem => {
|
|
133
132
|
if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {
|
|
134
133
|
return null;
|
|
135
134
|
}
|
|
@@ -141,4 +140,4 @@ export const getGridNumericOperators = () => convertLegacyOperators([{
|
|
|
141
140
|
InputComponentProps: {
|
|
142
141
|
type: 'number'
|
|
143
142
|
}
|
|
144
|
-
}]
|
|
143
|
+
}];
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { GridFilterInputSingleSelect } from '../components/panel/filterPanel/GridFilterInputSingleSelect';
|
|
2
2
|
import { GridFilterInputMultipleSingleSelect } from '../components/panel/filterPanel/GridFilterInputMultipleSingleSelect';
|
|
3
3
|
import { isObject } from '../utils/utils';
|
|
4
|
-
import { convertLegacyOperators } from './utils';
|
|
5
4
|
const parseObjectValue = value => {
|
|
6
5
|
if (value == null || !isObject(value)) {
|
|
7
6
|
return value;
|
|
8
7
|
}
|
|
9
8
|
return value.value;
|
|
10
9
|
};
|
|
11
|
-
export const getGridSingleSelectOperators = () =>
|
|
10
|
+
export const getGridSingleSelectOperators = () => [{
|
|
12
11
|
value: 'is',
|
|
13
|
-
|
|
12
|
+
getApplyFilterFn: filterItem => {
|
|
14
13
|
if (filterItem.value == null || filterItem.value === '') {
|
|
15
14
|
return null;
|
|
16
15
|
}
|
|
@@ -19,7 +18,7 @@ export const getGridSingleSelectOperators = () => convertLegacyOperators([{
|
|
|
19
18
|
InputComponent: GridFilterInputSingleSelect
|
|
20
19
|
}, {
|
|
21
20
|
value: 'not',
|
|
22
|
-
|
|
21
|
+
getApplyFilterFn: filterItem => {
|
|
23
22
|
if (filterItem.value == null || filterItem.value === '') {
|
|
24
23
|
return null;
|
|
25
24
|
}
|
|
@@ -28,7 +27,7 @@ export const getGridSingleSelectOperators = () => convertLegacyOperators([{
|
|
|
28
27
|
InputComponent: GridFilterInputSingleSelect
|
|
29
28
|
}, {
|
|
30
29
|
value: 'isAnyOf',
|
|
31
|
-
|
|
30
|
+
getApplyFilterFn: filterItem => {
|
|
32
31
|
if (!Array.isArray(filterItem.value) || filterItem.value.length === 0) {
|
|
33
32
|
return null;
|
|
34
33
|
}
|
|
@@ -36,4 +35,4 @@ export const getGridSingleSelectOperators = () => convertLegacyOperators([{
|
|
|
36
35
|
return value => filterItemValues.includes(parseObjectValue(value));
|
|
37
36
|
},
|
|
38
37
|
InputComponent: GridFilterInputMultipleSingleSelect
|
|
39
|
-
}]
|
|
38
|
+
}];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { renderEditInputCell } from '../components/cell/GridEditInputCell';
|
|
2
2
|
import { gridStringOrNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
3
3
|
import { getGridStringOperators, getGridStringQuickFilterFn } from './gridStringOperators';
|
|
4
|
-
import { convertQuickFilterV7ToLegacy } from './utils';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* TODO: Move pro and premium properties outside of this Community file
|
|
@@ -24,6 +23,5 @@ export const GRID_STRING_COL_DEF = {
|
|
|
24
23
|
align: 'left',
|
|
25
24
|
filterOperators: getGridStringOperators(),
|
|
26
25
|
renderEditCell: renderEditInputCell,
|
|
27
|
-
getApplyQuickFilterFn:
|
|
28
|
-
getApplyQuickFilterFnV7: getGridStringQuickFilterFn
|
|
26
|
+
getApplyQuickFilterFn: getGridStringQuickFilterFn
|
|
29
27
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GetApplyQuickFilterFn } from '../models/colDef/gridColDef';
|
|
2
2
|
import { GridFilterOperator } from '../models/gridFilterOperator';
|
|
3
|
-
export declare const getGridStringQuickFilterFn:
|
|
3
|
+
export declare const getGridStringQuickFilterFn: GetApplyQuickFilterFn<any, unknown>;
|
|
4
4
|
export declare const getGridStringOperators: (disableTrim?: boolean) => GridFilterOperator<any, number | string | null, any>[];
|