@mui/x-data-grid-premium 8.0.0-alpha.12 → 8.0.0-alpha.13
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 +299 -0
- package/DataGridPremium/DataGridPremium.js +51 -39
- package/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/components/GridAggregationHeader.d.ts +1 -1
- package/components/GridAggregationHeader.js +7 -11
- package/components/GridColumnMenuAggregationItem.js +4 -4
- package/components/GridDataSourceGroupingCriteriaCell.js +5 -6
- package/components/GridFooterCell.js +5 -6
- package/components/GridGroupingColumnFooterCell.js +2 -1
- package/components/GridGroupingColumnLeafCell.js +3 -9
- package/components/GridGroupingCriteriaCell.js +3 -8
- package/components/promptControl/GridToolbarPromptControl.js +34 -32
- package/esm/DataGridPremium/DataGridPremium.js +51 -39
- package/esm/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/esm/components/GridAggregationHeader.d.ts +1 -1
- package/esm/components/GridAggregationHeader.js +7 -11
- package/esm/components/GridColumnMenuAggregationItem.js +4 -4
- package/esm/components/GridDataSourceGroupingCriteriaCell.js +6 -7
- package/esm/components/GridFooterCell.js +5 -6
- package/esm/components/GridGroupingColumnFooterCell.js +2 -1
- package/esm/components/GridGroupingColumnLeafCell.js +3 -8
- package/esm/components/GridGroupingCriteriaCell.js +3 -8
- package/esm/components/promptControl/GridToolbarPromptControl.js +34 -32
- package/esm/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
- package/esm/hooks/features/aggregation/useGridAggregation.js +6 -6
- package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
- package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/esm/hooks/features/dataSource/models.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
- package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
- package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
- package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
- package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
- package/esm/index.d.ts +0 -6
- package/esm/index.js +1 -7
- package/esm/models/dataGridPremiumProps.d.ts +7 -8
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
- package/hooks/features/aggregation/useGridAggregation.js +6 -6
- package/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
- package/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
- package/hooks/features/clipboard/useGridClipboardImport.js +2 -2
- package/hooks/features/dataSource/models.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
- package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
- package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
- package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
- package/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
- package/index.d.ts +0 -6
- package/index.js +2 -11
- package/models/dataGridPremiumProps.d.ts +7 -8
- package/modern/DataGridPremium/DataGridPremium.js +51 -39
- package/modern/DataGridPremium/useDataGridPremiumProps.js +2 -2
- package/modern/components/GridAggregationHeader.d.ts +1 -1
- package/modern/components/GridAggregationHeader.js +7 -11
- package/modern/components/GridColumnMenuAggregationItem.js +4 -4
- package/modern/components/GridDataSourceGroupingCriteriaCell.js +6 -7
- package/modern/components/GridFooterCell.js +5 -6
- package/modern/components/GridGroupingColumnFooterCell.js +2 -1
- package/modern/components/GridGroupingColumnLeafCell.js +3 -8
- package/modern/components/GridGroupingCriteriaCell.js +3 -8
- package/modern/components/promptControl/GridToolbarPromptControl.js +34 -32
- package/modern/hooks/features/aggregation/useGridAggregation.d.ts +1 -1
- package/modern/hooks/features/aggregation/useGridAggregation.js +6 -6
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +1 -1
- package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +6 -6
- package/modern/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/modern/hooks/features/dataSource/models.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +3 -3
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +1 -1
- package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +3 -3
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.d.ts +1 -1
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +1 -1
- package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +5 -5
- package/modern/index.d.ts +0 -6
- package/modern/index.js +1 -7
- package/modern/models/dataGridPremiumProps.d.ts +7 -8
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +5 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,305 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.13
|
|
9
|
+
|
|
10
|
+
_Feb 28, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Decouple `margin` and `axis-size`. A new API to support multiple axes (#16418) @JCQuintas
|
|
15
|
+
- 🗺️ Added Bangla (bn-BD) locale
|
|
16
|
+
- 🗺️ Improve Russian (ru-RU) and Hungarian (hu-HU) locale on the Data Grid
|
|
17
|
+
|
|
18
|
+
Special thanks go out to the community members for their contributions:
|
|
19
|
+
@denpiligrim, @lhilgert9, @noherczeg, @officialkidmax, @pcorpet.
|
|
20
|
+
Following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @MBilalShafi, @oliviertassinari, @romgrk.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The `slots.baseFormControl` component was removed.
|
|
30
|
+
|
|
31
|
+
- The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
|
|
32
|
+
|
|
33
|
+
1. If an initial `columnVisibilityModel` is provided, it resets to that model.
|
|
34
|
+
2. If a controlled `columnVisibilityModel` is provided, it resets to the first model value.
|
|
35
|
+
3. When the columns are updated (via the `columns` prop or `updateColumns()` API method), the reset reference point updates to the current `columnVisibilityModel`.
|
|
36
|
+
|
|
37
|
+
To revert to the previous behavior, provide a custom component to the `slots.columnsManagement`.
|
|
38
|
+
|
|
39
|
+
- The deprecated `LicenseInfo` export has been removed from the `@mui/x-data-grid-pro` and `@mui/x-data-grid-premium` packages.
|
|
40
|
+
You have to import it from `@mui/x-license` instead:
|
|
41
|
+
|
|
42
|
+
```diff
|
|
43
|
+
- import { LicenseInfo } from '@mui/x-data-grid-pro';
|
|
44
|
+
- import { LicenseInfo } from '@mui/x-data-grid-premium';
|
|
45
|
+
+ import { LicenseInfo } from '@mui/x-license';
|
|
46
|
+
|
|
47
|
+
LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY');
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The row selection model has been changed from `GridRowId[]` to `{ type: 'include' | 'exclude'; ids: Set<GridRowId> }`.
|
|
51
|
+
Using `Set` allows for a more efficient row selection management.
|
|
52
|
+
The `exclude` selection type allows to select all rows except the ones in the `ids` set.
|
|
53
|
+
|
|
54
|
+
This change impacts the following props:
|
|
55
|
+
|
|
56
|
+
- `rowSelectionModel`
|
|
57
|
+
- `onRowSelectionModelChange`
|
|
58
|
+
- `initialState.rowSelectionModel`
|
|
59
|
+
|
|
60
|
+
```diff
|
|
61
|
+
- const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>([]);
|
|
62
|
+
+ const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>({ type: 'include', ids: new Set() });
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This change also impacts the `gridRowSelectionStateSelector` selector.
|
|
66
|
+
For convenience, use the `gridRowSelectionManagerSelector` selector to handle both selection types:
|
|
67
|
+
|
|
68
|
+
```diff
|
|
69
|
+
- const rowSelection = gridRowSelectionStateSelector(apiRef);
|
|
70
|
+
- const isRowSelected = rowSelection.includes(rowId);
|
|
71
|
+
+ const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
|
|
72
|
+
+ const isRowSelected = rowSelectionManager.has(rowId);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
There is also a `createRowSelectionManager` utility function that can be used to manage the row selection:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const rowSelectionManager = createRowSelectionManager({
|
|
79
|
+
type: 'include',
|
|
80
|
+
ids: new Set(),
|
|
81
|
+
});
|
|
82
|
+
rowSelectionManager.select(rowId);
|
|
83
|
+
rowSelectionManager.unselect(rowId);
|
|
84
|
+
rowSelectionManager.has(rowId);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- The `selectedIdsLookupSelector` selector has been removed. Use the `gridRowSelectionManagerSelector` or `gridRowSelectionStateSelector` selectors instead.
|
|
88
|
+
- The `selectedGridRowsSelector` has been renamed to `gridRowSelectionIdsSelector`.
|
|
89
|
+
- The `selectedGridRowsCountSelector` has been renamed to `gridRowSelectionCountSelector`.
|
|
90
|
+
|
|
91
|
+
- The data source feature and its related props are now stable.
|
|
92
|
+
|
|
93
|
+
```diff
|
|
94
|
+
<DataGridPro
|
|
95
|
+
- unstable_dataSource={dataSource}
|
|
96
|
+
- unstable_dataSourceCache={cache}
|
|
97
|
+
- unstable_lazyLoading
|
|
98
|
+
- unstable_lazyLoadingRequestThrottleMs={100}
|
|
99
|
+
+ dataSource={dataSource}
|
|
100
|
+
+ dataSourceCache={cache}
|
|
101
|
+
+ lazyLoading
|
|
102
|
+
+ lazyLoadingRequestThrottleMs={100}
|
|
103
|
+
/>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- The data source API is now stable.
|
|
107
|
+
|
|
108
|
+
```diff
|
|
109
|
+
- apiRef.current.unstable_dataSource.getRows()
|
|
110
|
+
+ apiRef.current.dataSource.getRows()
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- The signature of `unstable_onDataSourceError()` has been updated to support future use-cases.
|
|
114
|
+
|
|
115
|
+
```diff
|
|
116
|
+
<DataGrid
|
|
117
|
+
- unstable_onDataSourceError={(error: Error, params: GridGetRowsParams) => {
|
|
118
|
+
- if (params.filterModel) {
|
|
119
|
+
- // do something
|
|
120
|
+
- }
|
|
121
|
+
- }}
|
|
122
|
+
+ unstable_onDataSourceError={(error: GridGetRowsError | GridUpdateRowError) => {
|
|
123
|
+
+ if (error instanceof GridGetRowsError && error.params.filterModel) {
|
|
124
|
+
+ // do something
|
|
125
|
+
+ }
|
|
126
|
+
+ }}
|
|
127
|
+
/>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- Fix the type of the `GridSortModel` to allow readonly arrays.
|
|
131
|
+
|
|
132
|
+
- `GridSortItem` interface is not exported anymore.
|
|
133
|
+
|
|
134
|
+
- The `showToolbar` prop is now required to display the toolbar.
|
|
135
|
+
|
|
136
|
+
It is no longer necessary to pass `GridToolbar` as a slot to display the default toolbar.
|
|
137
|
+
|
|
138
|
+
```diff
|
|
139
|
+
<DataGrid
|
|
140
|
+
+ showToolbar
|
|
141
|
+
- slots={{
|
|
142
|
+
- toolbar: GridToolbar,
|
|
143
|
+
- }}
|
|
144
|
+
/>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
#### `@mui/x-data-grid@8.0.0-alpha.13`
|
|
148
|
+
|
|
149
|
+
- [DataGrid] Add `showToolbar` prop to enable default toolbar (#16687) @KenanYusuf
|
|
150
|
+
- [DataGrid] Column Visibility: Update "Reset" button behavior (#16626) @MBilalShafi
|
|
151
|
+
- [DataGrid] Column management design updates (#16630) @KenanYusuf
|
|
152
|
+
- [DataGrid] Fix `showColumnVerticalBorder` prop (#16715) @KenanYusuf
|
|
153
|
+
- [DataGrid] Fix scrollbar overlapping cells on mount (#16639) @KenanYusuf
|
|
154
|
+
- [DataGrid] Fix: base `Select` menuprops `onClose()` (#16643) @romgrk
|
|
155
|
+
- [DataGrid] Make `GridSortItem` internal (#16732) @arminmeh
|
|
156
|
+
- [DataGrid] Make data source stable (#16710) @MBilalShafi
|
|
157
|
+
- [DataGrid] Reshape row selection model (#15651) @cherniavskii
|
|
158
|
+
- [DataGrid] Replace `sx` prop usage with `styled()` components (#16665) @KenanYusuf
|
|
159
|
+
- [DataGrid] Refactor: create base `Autocomplete` (#16390) @romgrk
|
|
160
|
+
- [DataGrid] Refactor: remove base form control (#16634) @romgrk
|
|
161
|
+
- [DataGrid] Refactor: remove base input label & adornment (#16646) @romgrk
|
|
162
|
+
- [DataGrid] Refactor: remove material containers (#16633) @romgrk
|
|
163
|
+
- [DataGrid] Refactor: theme to CSS variables (#16588) @romgrk
|
|
164
|
+
- [DataGrid] Update the signature of the `onDataSourceError()` callback (#16718) @MBilalShafi
|
|
165
|
+
- [DataGrid] Use readonly array for the `GridSortModel` (#16627) @pcorpet
|
|
166
|
+
- [DataGrid] Fix the popper focus trap (#16736) @romgrk
|
|
167
|
+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
|
|
168
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#16578) @noherczeg
|
|
169
|
+
- [l10n] Improve Russian (ru-RU) locale (#16591) @denpiligrim
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
172
|
+
|
|
173
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.13`, plus:
|
|
174
|
+
|
|
175
|
+
- [DataGridPro] Remove `LicenseInfo` reexports (#16671) @cherniavskii
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.13` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.13`, plus:
|
|
180
|
+
|
|
181
|
+
- [DataGridPremium] Use `valueGetter` to get row group keys (#16016) @cherniavskii
|
|
182
|
+
|
|
183
|
+
### Date and Time Pickers
|
|
184
|
+
|
|
185
|
+
#### Breaking changes
|
|
186
|
+
|
|
187
|
+
- The `<DateRangePicker />` now uses a `dialog` instead of a `tooltip` to render their view when used with a single input range field.
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.13`
|
|
190
|
+
|
|
191
|
+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
|
|
192
|
+
- [pickers] Clean the typing of the slots on the range pickers (#16670) @flaviendelangle
|
|
193
|
+
- [pickers] Fix Time Clock meridiem button selected styles (#16681) @LukasTy
|
|
194
|
+
- [pickers] Make the single input field the default field on range pickers (#16656) @flaviendelangle
|
|
195
|
+
- [pickers] Move the opening logic to the range fields (#16175) @flaviendelangle
|
|
196
|
+
|
|
197
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
198
|
+
|
|
199
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.13`.
|
|
200
|
+
|
|
201
|
+
### Charts
|
|
202
|
+
|
|
203
|
+
#### Breaking changes
|
|
204
|
+
|
|
205
|
+
- Charts array inputs are now `readonly`. Allowing externally defined `as const` to be used as a prop value of the React component.
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
const xAxis = [{ position: 'bottom' }] as const
|
|
209
|
+
<BarChart xAxis={xAxis} />
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
- Replace `topAxis`, `rightAxis`, `bottomAxis` and `leftAxis` props by the `position` property in the axis config.
|
|
213
|
+
If you were using them to place axis, set the `position` property to the corresponding value `'top' | 'right' | 'bottom' | 'left'`.
|
|
214
|
+
If you were disabling an axis by setting it to `null`, set its `position` to `'none'`.
|
|
215
|
+
|
|
216
|
+
```diff
|
|
217
|
+
<LineChart
|
|
218
|
+
yAxis={[
|
|
219
|
+
{
|
|
220
|
+
scaleType: 'linear',
|
|
221
|
+
+ position: 'right',
|
|
222
|
+
},
|
|
223
|
+
]}
|
|
224
|
+
series={[{ data: [1, 10, 30, 50, 70, 90, 100], label: 'linear' }]}
|
|
225
|
+
height={400}
|
|
226
|
+
- rightAxis={{}}
|
|
227
|
+
/>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
- Remove `position` prop from `ChartsXAxis` and `ChartsYAxis`.
|
|
231
|
+
The `position` prop has been removed from the `ChartsXAxis` and `ChartsYAxis` components. Configure it directly in the axis config.
|
|
232
|
+
|
|
233
|
+
```diff
|
|
234
|
+
<ChartContainer
|
|
235
|
+
yAxis={[
|
|
236
|
+
{
|
|
237
|
+
id: 'my-axis',
|
|
238
|
+
+ position: 'right',
|
|
239
|
+
},
|
|
240
|
+
]}
|
|
241
|
+
>
|
|
242
|
+
- <ChartsYAxis axisId="my-axis" position="right" />
|
|
243
|
+
+ <ChartsYAxis axisId="my-axis" />
|
|
244
|
+
</ChartContainer>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
- Add `minTickLabelGap` to x-axis, which allows users to define the minimum gap, in pixels, between two tick labels. The default value is 4px. Make sure to check your charts as the spacing between tick labels might have changed.
|
|
248
|
+
|
|
249
|
+
#### `@mui/x-charts@8.0.0-alpha.13`
|
|
250
|
+
|
|
251
|
+
- [charts] Accept component in `labelMarkType` (#16739) @bernardobelchior
|
|
252
|
+
- [charts] Add `minTickLabelGap` to x-axis (#16548) @bernardobelchior
|
|
253
|
+
- [charts] Add unit test for pie chart with empty series (#16663) @bernardobelchior
|
|
254
|
+
- [charts] Decouple `margin` and `axis-size` (#16418) @JCQuintas
|
|
255
|
+
- [charts] Display slider tooltip on demos (#16723) @JCQuintas
|
|
256
|
+
- [charts] Fix composition docs link (#16761) @bernardobelchior
|
|
257
|
+
- [charts] Fix default label measurement being off (#16635) @bernardobelchior
|
|
258
|
+
- [charts] Fix is highlighted memoization (#16592) @alexfauquette
|
|
259
|
+
- [charts] Fix missing `theme.shape` error in the tooltip (#16748) @alexfauquette
|
|
260
|
+
- [charts] Fix typo in error message (#16641) @JCQuintas
|
|
261
|
+
- [charts] Improve axis size docs (#16673) @JCQuintas
|
|
262
|
+
- [charts] Improve performance of rendering ticks in x-axis (#16536) @bernardobelchior
|
|
263
|
+
- [charts] Make `defaultizeAxis` function type-safe (#16642) @JCQuintas
|
|
264
|
+
- [charts] Make `series.data` readonly (#16645) @JCQuintas
|
|
265
|
+
- [charts] Migrate `ChartsUsageDemo` to TSX and removed NoSnap (#16686) @JCQuintas
|
|
266
|
+
- [charts] Prevent `position='none'` axes from rendering (#16727) @JCQuintas
|
|
267
|
+
- [charts] Make array inputs readonly (#16632) @JCQuintas
|
|
268
|
+
- [charts] Remove state initialization hack (#16520) @alexfauquette
|
|
269
|
+
- [charts] Remove redundant default axis (#16734) @bernardobelchior
|
|
270
|
+
|
|
271
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
272
|
+
|
|
273
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.13`, plus:
|
|
274
|
+
|
|
275
|
+
- [charts-pro] Add back zoom control (#16550) @alexfauquette
|
|
276
|
+
|
|
277
|
+
### Tree View
|
|
278
|
+
|
|
279
|
+
#### `@mui/x-tree-view@8.0.0-alpha.13`
|
|
280
|
+
|
|
281
|
+
Internal changes.
|
|
282
|
+
|
|
283
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
284
|
+
|
|
285
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.13`.
|
|
286
|
+
|
|
287
|
+
### `@mui/x-codemod@8.0.0-alpha.13`
|
|
288
|
+
|
|
289
|
+
- [codemod] Add a few Data Grid codemods (#16711) @MBilalShafi
|
|
290
|
+
- [codemod] Improve Pickers renaming codemod (#16685) @LukasTy
|
|
291
|
+
|
|
292
|
+
### Docs
|
|
293
|
+
|
|
294
|
+
- [docs] Fix charts with on bar and line pages (#16712) @alexfauquette
|
|
295
|
+
- [docs] Fix migration guide introduction for charts (#16679) @alexfauquette
|
|
296
|
+
- [docs] Fix remaining charts demos on mobile (#16728) @alexfauquette
|
|
297
|
+
- [docs] Fix scroll overflow on mobile (#16675) @oliviertassinari
|
|
298
|
+
- [docs] Improve Pickers migration page (#16682) @LukasTy
|
|
299
|
+
- [docs] Update small Pickers doc inconsistencies (#16724) @LukasTy
|
|
300
|
+
- [code-infra] Charts changes for `vitest` (#16755) @JCQuintas
|
|
301
|
+
- [code-infra] General packages changes for `vitest` (#16757) @JCQuintas
|
|
302
|
+
- [code-infra] Native Node.js ESM (#16603) @Janpot
|
|
303
|
+
- [infra] Update contributor acknowledgment wording (#16751) @michelengelen
|
|
304
|
+
- [test] Revert timeout increase for possibly slow tests (#16651) @LukasTy
|
|
305
|
+
- [x-license] Introduce usage telemetry (#13530) @hasdfa
|
|
306
|
+
|
|
8
307
|
## 8.0.0-alpha.12
|
|
9
308
|
|
|
10
309
|
_Feb 17, 2025_
|
|
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _xLicense = require("@mui/x-license");
|
|
14
14
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
15
15
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
16
|
+
var _material = require("@mui/x-data-grid/material");
|
|
16
17
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
17
18
|
var _useDataGridPremiumComponent = require("./useDataGridPremiumComponent");
|
|
18
19
|
var _useDataGridPremiumProps = require("./useDataGridPremiumProps");
|
|
@@ -22,6 +23,7 @@ var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAt
|
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const configuration = {
|
|
24
25
|
hooks: {
|
|
26
|
+
useCSSVariables: _material.useMaterialCSSVariables,
|
|
25
27
|
useGridAriaAttributes: _useGridAriaAttributes.useGridAriaAttributes,
|
|
26
28
|
useGridRowAriaAttributes: _useGridRowAriaAttributes.useGridRowAriaAttributes
|
|
27
29
|
}
|
|
@@ -63,7 +65,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
63
65
|
// ----------------------------------------------------------------------
|
|
64
66
|
/**
|
|
65
67
|
* Aggregation functions available on the grid.
|
|
66
|
-
* @default GRID_AGGREGATION_FUNCTIONS when `
|
|
68
|
+
* @default GRID_AGGREGATION_FUNCTIONS when `dataSource` is not provided, `{}` when `dataSource` is provided
|
|
67
69
|
*/
|
|
68
70
|
aggregationFunctions: _propTypes.default.object,
|
|
69
71
|
/**
|
|
@@ -180,6 +182,24 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
180
182
|
* If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].
|
|
181
183
|
*/
|
|
182
184
|
columnVisibilityModel: _propTypes.default.object,
|
|
185
|
+
/**
|
|
186
|
+
* Data source object.
|
|
187
|
+
*/
|
|
188
|
+
dataSource: _propTypes.default.shape({
|
|
189
|
+
getAggregatedValue: _propTypes.default.func,
|
|
190
|
+
getChildrenCount: _propTypes.default.func,
|
|
191
|
+
getGroupKey: _propTypes.default.func,
|
|
192
|
+
getRows: _propTypes.default.func.isRequired,
|
|
193
|
+
updateRow: _propTypes.default.func
|
|
194
|
+
}),
|
|
195
|
+
/**
|
|
196
|
+
* Data source cache object.
|
|
197
|
+
*/
|
|
198
|
+
dataSourceCache: _propTypes.default.shape({
|
|
199
|
+
clear: _propTypes.default.func.isRequired,
|
|
200
|
+
get: _propTypes.default.func.isRequired,
|
|
201
|
+
set: _propTypes.default.func.isRequired
|
|
202
|
+
}),
|
|
183
203
|
/**
|
|
184
204
|
* If above 0, the row children will be expanded up to this depth.
|
|
185
205
|
* If equal to -1, all the row children will be expanded.
|
|
@@ -494,6 +514,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
494
514
|
* @default false
|
|
495
515
|
*/
|
|
496
516
|
keepNonExistentRowsSelected: _propTypes.default.bool,
|
|
517
|
+
/**
|
|
518
|
+
* Used together with `dataSource` to enable lazy loading.
|
|
519
|
+
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
520
|
+
* and starts sending `start` and `end` values depending on the loading mode and the scroll position.
|
|
521
|
+
* @default false
|
|
522
|
+
*/
|
|
523
|
+
lazyLoading: _propTypes.default.bool,
|
|
524
|
+
/**
|
|
525
|
+
* If positive, the Data Grid will throttle data source requests on rendered rows interval change.
|
|
526
|
+
* @default 500
|
|
527
|
+
*/
|
|
528
|
+
lazyLoadingRequestThrottleMs: _propTypes.default.number,
|
|
497
529
|
/**
|
|
498
530
|
* If `true`, a loading overlay is displayed.
|
|
499
531
|
* @default false
|
|
@@ -670,6 +702,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
670
702
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
671
703
|
*/
|
|
672
704
|
onColumnWidthChange: _propTypes.default.func,
|
|
705
|
+
/**
|
|
706
|
+
* Callback fired when a data source request fails.
|
|
707
|
+
* @param {GridGetRowsError | GridUpdateRowError} error The data source error object.
|
|
708
|
+
*/
|
|
709
|
+
onDataSourceError: _propTypes.default.func,
|
|
673
710
|
/**
|
|
674
711
|
* Callback fired when the density changes.
|
|
675
712
|
* @param {GridDensity} density New density value.
|
|
@@ -691,6 +728,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
691
728
|
* @param {GridFetchRowsParams} params With all properties from [[GridFetchRowsParams]].
|
|
692
729
|
* @param {MuiEvent<{}>} event The event object.
|
|
693
730
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
731
|
+
* @deprecated Use the {@link https://next.mui.com/x/react-data-grid/server-side-data/lazy-loading/#viewport-loading Server-side data-Viewport loading} instead.
|
|
694
732
|
*/
|
|
695
733
|
onFetchRows: _propTypes.default.func,
|
|
696
734
|
/**
|
|
@@ -818,6 +856,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
818
856
|
* @param {GridRowScrollEndParams} params With all properties from [[GridRowScrollEndParams]].
|
|
819
857
|
* @param {MuiEvent<{}>} event The event object.
|
|
820
858
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
859
|
+
* @deprecated Use the {@link https://next.mui.com/x/react-data-grid/server-side-data/lazy-loading/#infinite-loading Server-side data-Infinite loading} instead.
|
|
821
860
|
*/
|
|
822
861
|
onRowsScrollEnd: _propTypes.default.func,
|
|
823
862
|
/**
|
|
@@ -941,7 +980,10 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
941
980
|
/**
|
|
942
981
|
* Sets the row selection model of the Data Grid.
|
|
943
982
|
*/
|
|
944
|
-
rowSelectionModel: _propTypes.default
|
|
983
|
+
rowSelectionModel: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({
|
|
984
|
+
ids: _propTypes.default.instanceOf(Set).isRequired,
|
|
985
|
+
type: _propTypes.default.oneOf(['exclude', 'include']).isRequired
|
|
986
|
+
}),
|
|
945
987
|
/**
|
|
946
988
|
* When `rowSelectionPropagation.descendants` is set to `true`.
|
|
947
989
|
* - Selecting a parent selects all its filtered descendants automatically.
|
|
@@ -963,6 +1005,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
963
1005
|
* Set it to 'client' if you would like enable infnite loading.
|
|
964
1006
|
* Set it to 'server' if you would like to enable lazy loading.
|
|
965
1007
|
* @default "client"
|
|
1008
|
+
* @deprecated Use the {@link https://next.mui.com/x/react-data-grid/server-side-data/lazy-loading/#viewport-loading Server-side data-Viewport loading} instead.
|
|
966
1009
|
*/
|
|
967
1010
|
rowsLoadingMode: _propTypes.default.oneOf(['client', 'server']),
|
|
968
1011
|
/**
|
|
@@ -981,7 +1024,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
981
1024
|
scrollbarSize: _propTypes.default.number,
|
|
982
1025
|
/**
|
|
983
1026
|
* Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
|
|
984
|
-
* If combined with `
|
|
1027
|
+
* If combined with `lazyLoading`, it defines the area where the next data request is triggered.
|
|
985
1028
|
* @default 80
|
|
986
1029
|
*/
|
|
987
1030
|
scrollEndThreshold: _propTypes.default.number,
|
|
@@ -995,6 +1038,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
995
1038
|
* @default false
|
|
996
1039
|
*/
|
|
997
1040
|
showColumnVerticalBorder: _propTypes.default.bool,
|
|
1041
|
+
/**
|
|
1042
|
+
* If `true`, the toolbar is displayed.
|
|
1043
|
+
* @default false
|
|
1044
|
+
*/
|
|
1045
|
+
showToolbar: _propTypes.default.bool,
|
|
998
1046
|
/**
|
|
999
1047
|
* Overridable components props dynamically passed to the component at rendering.
|
|
1000
1048
|
*/
|
|
@@ -1044,36 +1092,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1044
1092
|
* @default false
|
|
1045
1093
|
*/
|
|
1046
1094
|
treeData: _propTypes.default.bool,
|
|
1047
|
-
/**
|
|
1048
|
-
* Data source object.
|
|
1049
|
-
*/
|
|
1050
|
-
unstable_dataSource: _propTypes.default.shape({
|
|
1051
|
-
getAggregatedValue: _propTypes.default.func,
|
|
1052
|
-
getChildrenCount: _propTypes.default.func,
|
|
1053
|
-
getGroupKey: _propTypes.default.func,
|
|
1054
|
-
getRows: _propTypes.default.func.isRequired,
|
|
1055
|
-
updateRow: _propTypes.default.func
|
|
1056
|
-
}),
|
|
1057
|
-
/**
|
|
1058
|
-
* Data source cache object.
|
|
1059
|
-
*/
|
|
1060
|
-
unstable_dataSourceCache: _propTypes.default.shape({
|
|
1061
|
-
clear: _propTypes.default.func.isRequired,
|
|
1062
|
-
get: _propTypes.default.func.isRequired,
|
|
1063
|
-
set: _propTypes.default.func.isRequired
|
|
1064
|
-
}),
|
|
1065
|
-
/**
|
|
1066
|
-
* Used together with `unstable_dataSource` to enable lazy loading.
|
|
1067
|
-
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
1068
|
-
* and starts sending `start` and `end` values depending on the loading mode and the scroll position.
|
|
1069
|
-
* @default false
|
|
1070
|
-
*/
|
|
1071
|
-
unstable_lazyLoading: _propTypes.default.bool,
|
|
1072
|
-
/**
|
|
1073
|
-
* If positive, the Data Grid will throttle data source requests on rendered rows interval change.
|
|
1074
|
-
* @default 500
|
|
1075
|
-
*/
|
|
1076
|
-
unstable_lazyLoadingRequestThrottleMs: _propTypes.default.number,
|
|
1077
1095
|
/**
|
|
1078
1096
|
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
1079
1097
|
*/
|
|
@@ -1089,12 +1107,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1089
1107
|
* Use in combination with `unstable_listColumn`.
|
|
1090
1108
|
*/
|
|
1091
1109
|
unstable_listView: _propTypes.default.bool,
|
|
1092
|
-
/**
|
|
1093
|
-
* Callback fired when the data source request fails.
|
|
1094
|
-
* @param {Error} error The error object.
|
|
1095
|
-
* @param {GridGetRowsParams} params With all properties from [[GridGetRowsParams]].
|
|
1096
|
-
*/
|
|
1097
|
-
unstable_onDataSourceError: _propTypes.default.func,
|
|
1098
1110
|
/**
|
|
1099
1111
|
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
1100
1112
|
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
@@ -15,7 +15,7 @@ var _aggregation = require("../hooks/features/aggregation");
|
|
|
15
15
|
var _dataGridPremiumDefaultSlotsComponents = require("../constants/dataGridPremiumDefaultSlotsComponents");
|
|
16
16
|
const getDataGridPremiumForcedProps = themedProps => (0, _extends2.default)({
|
|
17
17
|
signature: _xDataGridPro.GridSignature.DataGridPremium
|
|
18
|
-
}, themedProps.
|
|
18
|
+
}, themedProps.dataSource ? {
|
|
19
19
|
filterMode: 'server',
|
|
20
20
|
sortingMode: 'server',
|
|
21
21
|
paginationMode: 'server'
|
|
@@ -53,7 +53,7 @@ const useDataGridPremiumProps = inProps => {
|
|
|
53
53
|
defaultSlots,
|
|
54
54
|
slots: themedProps.slots
|
|
55
55
|
}), [themedProps.slots]);
|
|
56
|
-
return React.useMemo(() => (0, _extends2.default)({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps.
|
|
56
|
+
return React.useMemo(() => (0, _extends2.default)({}, DATA_GRID_PREMIUM_PROPS_DEFAULT_VALUES, themedProps.dataSource ? {
|
|
57
57
|
aggregationFunctions: {}
|
|
58
58
|
} : {}, themedProps, {
|
|
59
59
|
localeText,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnHeaderParams } from '@mui/x-data-grid';
|
|
3
|
-
import type
|
|
3
|
+
import { type GridBaseColDef } from '@mui/x-data-grid/internals';
|
|
4
4
|
declare function GridAggregationHeader(props: GridColumnHeaderParams & {
|
|
5
5
|
renderHeader: GridBaseColDef['renderHeader'];
|
|
6
6
|
}): React.JSX.Element | null;
|
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
13
|
var _styles = require("@mui/material/styles");
|
|
14
14
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
15
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
15
16
|
var _gridAggregationUtils = require("../hooks/features/aggregation/gridAggregationUtils");
|
|
16
17
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
17
18
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
@@ -38,17 +39,12 @@ const GridAggregationHeaderRoot = (0, _styles.styled)('div', {
|
|
|
38
39
|
});
|
|
39
40
|
const GridAggregationFunctionLabel = (0, _styles.styled)('div', {
|
|
40
41
|
name: 'MuiDataGrid',
|
|
41
|
-
slot: 'AggregationColumnHeaderLabel'
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
fontSize: theme.typography.caption.fontSize,
|
|
48
|
-
lineHeight: 'normal',
|
|
49
|
-
color: theme.palette.text.secondary,
|
|
50
|
-
marginTop: -1
|
|
51
|
-
};
|
|
42
|
+
slot: 'AggregationColumnHeaderLabel'
|
|
43
|
+
})({
|
|
44
|
+
fontSize: _internals.vars.typography.small.fontSize,
|
|
45
|
+
lineHeight: 'normal',
|
|
46
|
+
color: _internals.vars.colors.foreground.muted,
|
|
47
|
+
marginTop: -1
|
|
52
48
|
});
|
|
53
49
|
const useUtilityClasses = ownerState => {
|
|
54
50
|
const {
|
|
@@ -32,8 +32,8 @@ function GridColumnMenuAggregationItem(props) {
|
|
|
32
32
|
const availableAggregationFunctions = React.useMemo(() => (0, _gridAggregationUtils.getAvailableAggregationFunctions)({
|
|
33
33
|
aggregationFunctions: rootProps.aggregationFunctions,
|
|
34
34
|
colDef,
|
|
35
|
-
isDataSource: !!rootProps.
|
|
36
|
-
}), [colDef, rootProps.aggregationFunctions, rootProps.
|
|
35
|
+
isDataSource: !!rootProps.dataSource
|
|
36
|
+
}), [colDef, rootProps.aggregationFunctions, rootProps.dataSource]);
|
|
37
37
|
const _ref = rootProps.slotProps?.baseSelect || {},
|
|
38
38
|
{
|
|
39
39
|
native: isBaseSelectNative = false
|
|
@@ -49,12 +49,12 @@ function GridColumnMenuAggregationItem(props) {
|
|
|
49
49
|
colDef,
|
|
50
50
|
aggregationFunctionName,
|
|
51
51
|
aggregationFunction: rootProps.aggregationFunctions[aggregationFunctionName],
|
|
52
|
-
isDataSource: !!rootProps.
|
|
52
|
+
isDataSource: !!rootProps.dataSource
|
|
53
53
|
})) {
|
|
54
54
|
return aggregationFunctionName;
|
|
55
55
|
}
|
|
56
56
|
return '';
|
|
57
|
-
}, [rootProps.aggregationFunctions, rootProps.
|
|
57
|
+
}, [rootProps.aggregationFunctions, rootProps.dataSource, aggregationModel, colDef]);
|
|
58
58
|
const handleAggregationItemChange = event => {
|
|
59
59
|
const newAggregationItem = event.target?.value || undefined;
|
|
60
60
|
const currentModel = (0, _gridAggregationSelectors.gridAggregationModelSelector)(apiRef);
|
|
@@ -9,7 +9,6 @@ exports.GridDataSourceGroupingCriteriaCell = GridDataSourceGroupingCriteriaCell;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _utils = require("@mui/utils");
|
|
12
|
-
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
13
12
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
14
13
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
15
14
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
@@ -41,7 +40,7 @@ function GridGroupingCriteriaCellIcon(props) {
|
|
|
41
40
|
const handleClick = event => {
|
|
42
41
|
if (!rowNode.childrenExpanded) {
|
|
43
42
|
// always fetch/get from cache the children when the node is expanded
|
|
44
|
-
apiRef.current.
|
|
43
|
+
apiRef.current.dataSource.fetchRows(id);
|
|
45
44
|
} else {
|
|
46
45
|
apiRef.current.setRowChildrenExpansion(id, !rowNode.childrenExpanded);
|
|
47
46
|
}
|
|
@@ -91,7 +90,7 @@ function GridDataSourceGroupingCriteriaCell(props) {
|
|
|
91
90
|
const classes = useUtilityClasses(rootProps);
|
|
92
91
|
let descendantCount = 0;
|
|
93
92
|
if (row) {
|
|
94
|
-
descendantCount = Math.max(rootProps.
|
|
93
|
+
descendantCount = Math.max(rootProps.dataSource?.getChildrenCount?.(row) ?? 0, 0);
|
|
95
94
|
}
|
|
96
95
|
let cellContent;
|
|
97
96
|
const colDef = apiRef.current.getColumn(rowNode.groupingField);
|
|
@@ -106,10 +105,10 @@ function GridDataSourceGroupingCriteriaCell(props) {
|
|
|
106
105
|
children: rowNode.groupingKey
|
|
107
106
|
});
|
|
108
107
|
}
|
|
109
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
110
109
|
className: classes.root,
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
style: {
|
|
111
|
+
marginLeft: rootProps.rowGroupingColumnMode === 'multiple' ? 0 : `calc(var(--DataGrid-cellOffsetMultiplier) * ${_internals.vars.spacing(rowNode.depth)})`
|
|
113
112
|
},
|
|
114
113
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
115
114
|
className: classes.toggle,
|
|
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
13
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
13
14
|
var _styles = require("@mui/material/styles");
|
|
14
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
16
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
@@ -19,12 +20,10 @@ const GridFooterCellRoot = (0, _styles.styled)('div', {
|
|
|
19
20
|
name: 'MuiDataGrid',
|
|
20
21
|
slot: 'FooterCell',
|
|
21
22
|
overridesResolver: (_, styles) => styles.footerCell
|
|
22
|
-
})(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
color: (theme.vars || theme).palette.primary.dark
|
|
27
|
-
}));
|
|
23
|
+
})({
|
|
24
|
+
fontWeight: _internals.vars.typography.fontWeight.medium,
|
|
25
|
+
color: _internals.vars.colors.foreground.accent
|
|
26
|
+
});
|
|
28
27
|
const useUtilityClasses = ownerState => {
|
|
29
28
|
const {
|
|
30
29
|
classes
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.GridGroupingColumnFooterCell = GridGroupingColumnFooterCell;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
11
12
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
12
13
|
var _GridFooterCell = require("./GridFooterCell");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -21,7 +22,7 @@ function GridGroupingColumnFooterCell(props) {
|
|
|
21
22
|
} else if (rootProps.rowGroupingColumnMode === 'multiple') {
|
|
22
23
|
sx.ml = 2;
|
|
23
24
|
} else {
|
|
24
|
-
sx.ml =
|
|
25
|
+
sx.ml = `calc(var(--DataGrid-cellOffsetMultiplier) * ${_internals.vars.spacing(props.rowNode.depth)})`;
|
|
25
26
|
}
|
|
26
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridFooterCell.GridFooterCell, (0, _extends2.default)({
|
|
27
28
|
sx: sx
|