@mui/x-data-grid-generator 7.0.0-alpha.9 → 7.0.0-beta.1

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 CHANGED
@@ -3,6 +3,269 @@
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-beta.1
7
+
8
+ _Feb 1, 2024_
9
+
10
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🏃 Improve the filtering performance of the Data Grid by changing the `GridColDef` methods signatures (#11573) @cherniavskii
13
+ - 🎁 The Line Chart component now has animation by default (#11620) @alexfauquette
14
+ - 🚀 All charts have click handlers (#11411) @alexfauquette
15
+ Test their respective documentation demonstrations to know more about the data format:
16
+
17
+ - [Scatter Chart](https://next.mui.com/x/react-charts/scatter/#click-event)
18
+ - [Line Chart](https://next.mui.com/x/react-charts/lines/#click-event)
19
+ - [Bar Chart](https://next.mui.com/x/react-charts/bars/#click-event)
20
+ - [Pie Chart](https://next.mui.com/x/react-charts/pie/#click-event)
21
+
22
+ Big thanks to @giladappsforce and @yaredtsy for their contribution on exploring this feature.
23
+
24
+ ### Data Grid
25
+
26
+ ### Breaking changes
27
+
28
+ - The signature of `GridColDef['valueGetter']` has been changed for performance reasons:
29
+
30
+ ```diff
31
+ - valueGetter: ({ value, row }) => value,
32
+ + valueGetter: (value, row, column, apiRef) => value,
33
+ ```
34
+
35
+ The `GridValueGetterParams` interface has been removed:
36
+
37
+ ```diff
38
+ - const customValueGetter = (params: GridValueGetterParams) => params.row.budget;
39
+ + const customValueGetter: GridValueGetterFn = (value, row) => row.budget;
40
+ ```
41
+
42
+ - The signature of `GridColDef['valueFormatter']` has been changed for performance reasons:
43
+
44
+ ```diff
45
+ - valueFormatter: ({ value }) => value,
46
+ + valueFormatter: (value, row, column, apiRef) => value,
47
+ ```
48
+
49
+ The `GridValueFormatterParams` interface has been removed:
50
+
51
+ ```diff
52
+ - const gridDateFormatter = ({ value, field, id }: GridValueFormatterParams<Date>) => value.toLocaleDateString();
53
+ + const gridDateFormatter: GridValueFormatter = (value: Date) => value.toLocaleDateString();
54
+ ```
55
+
56
+ - The signature of `GridColDef['valueSetter']` has been changed for performance reasons:
57
+
58
+ ```diff
59
+ - valueSetter: (params) => {
60
+ - const [firstName, lastName] = params.value!.toString().split(' ');
61
+ - return { ...params.row, firstName, lastName };
62
+ - }
63
+ + valueSetter: (value, row) => {
64
+ + const [firstName, lastName] = value!.toString().split(' ');
65
+ + return { ...row, firstName, lastName };
66
+ +}
67
+ ```
68
+
69
+ The `GridValueSetterParams` interface has been removed:
70
+
71
+ ```diff
72
+ - const setFullName = (params: GridValueSetterParams) => {
73
+ - const [firstName, lastName] = params.value!.toString().split(' ');
74
+ - return { ...params.row, firstName, lastName };
75
+ - };
76
+ + const setFullName: GridValueSetter<Row> = (value, row) => {
77
+ + const [firstName, lastName] = value!.toString().split(' ');
78
+ + return { ...row, firstName, lastName };
79
+ + }
80
+ ```
81
+
82
+ - The signature of `GridColDef['valueParser']` has been changed for performance reasons:
83
+
84
+ ```diff
85
+ - valueParser: (value, params: GridCellParams) => value.toLowerCase(),
86
+ + valueParser: (value, row, column, apiRef) => value.toLowerCase(),
87
+ ```
88
+
89
+ - The signature of `GridColDef['colSpan']` has been changed for performance reasons:
90
+
91
+ ```diff
92
+ - colSpan: ({ row, field, value }: GridCellParams) => (row.id === 'total' ? 2 : 1),
93
+ + colSpan: (value, row, column, apiRef) => (row.id === 'total' ? 2 : 1),
94
+ ```
95
+
96
+ - The signature of `GridColDef['pastedValueParser']` has been changed for performance reasons:
97
+
98
+ ```diff
99
+ - pastedValueParser: (value, params) => new Date(value),
100
+ + pastedValueParser: (value, row, column, apiRef) => new Date(value),
101
+ ```
102
+
103
+ - The signature of `GridColDef['groupingValueGetter']` has been changed for performance reasons:
104
+
105
+ ```diff
106
+ - groupingValueGetter: (params) => params.value.name,
107
+ + groupingValueGetter: (value: { name: string }) => value.name,
108
+ ```
109
+
110
+ #### `@mui/x-data-grid@7.0.0-beta.1`
111
+
112
+ - [DataGrid] Add `toggleAllMode` prop to the `columnsManagement` slot (#10794) @H999
113
+ - [DataGrid] Change `GridColDef` methods signatures (#11573) @cherniavskii
114
+ - [DataGrid] Fix row reorder with cell selection (#11783) @PEsteves8
115
+ - [DataGrid] Make columns management' casing consistent (#11858) @MBilalShafi
116
+ - [l10n] Improve Hebrew (he-IL) locale (#11788) @danielmishan85
117
+
118
+ #### `@mui/x-data-grid-pro@7.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
119
+
120
+ Same changes as in `@mui/x-data-grid@7.0.0-beta.1`.
121
+
122
+ #### `@mui/x-data-grid-premium@7.0.0-beta.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
123
+
124
+ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.1`.
125
+
126
+ ### Date Pickers
127
+
128
+ #### `@mui/x-date-pickers@7.0.0-beta.1`
129
+
130
+ - [TimePicker] Add missing toolbar classes descriptions (#11856) @LukasTy
131
+
132
+ #### `@mui/x-date-pickers-pro@7.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
133
+
134
+ Same changes as in `@mui/x-date-pickers@7.0.0-beta.1`.
135
+
136
+ ### Charts
137
+
138
+ #### Breaking changes
139
+
140
+ - The line chart now have animation by default.
141
+ You can disable it with `skipAnimation` prop.
142
+ See [animation documentation](next.mui.com/x/react-charts/lines/#animation) for more information.
143
+
144
+ - Pie charts `onClick` get renamed `onItemClick` for consistency with other charts click callback.
145
+
146
+ `@mui/x-charts@7.0.0-beta.1`
147
+
148
+ - [charts] Add `onClick` support (#11411) @alexfauquette
149
+ - [charts] Add line animation (#11620) @alexfauquette
150
+ - [charts] Document how to modify color according to values (#11824) @alexfauquette
151
+ - [charts] Fix Tooltip crash with out of range lines (#11898) @alexfauquette
152
+
153
+ ### Docs
154
+
155
+ - [docs] Add a general uplift to the changelog page (#11396) @danilo-leal
156
+ - [docs] Do not reference the Tree View overview page in the API pages (#11826) @flaviendelangle
157
+ - [docs] Fix charts API links (#11832) @alexfauquette
158
+ - [docs] Improve Support page (#11556) @oliviertassinari
159
+ - [docs] Improve column visibility documentation (#11857) @MBilalShafi
160
+ - [docs] Polish header @oliviertassinari
161
+ - [docs] Sync support page with core @oliviertassinari
162
+ - [docs] Update whats new page with "v7 Beta blogpost" content (#11879) @joserodolfofreitas
163
+
164
+ ### Core
165
+
166
+ - [core] Rely on immutable ref when possible (#11847) @oliviertassinari
167
+ - [core] Bump monorepo (#11897) @alexfauquette
168
+
169
+ ## 7.0.0-beta.0
170
+
171
+ _Jan 26, 2024_
172
+
173
+ We are glad to announce MUI X v7 beta!
174
+ This version has several improvements, bug fixes, and exciting features 🎉.
175
+ We want to offer a big thanks to the 7 contributors who made this release possible ✨:
176
+
177
+ - 🚀 Release the [Date Time Range Picker](https://next.mui.com/x/react-date-pickers/date-time-range-picker/) component (#9528) @LukasTy
178
+
179
+ <img src="https://github.com/mui/mui-x/assets/4941090/122bb7bc-5e72-4e11-a8e5-96f3026de922" width="510" height="652" alt="Date Time Range Picker example" />
180
+
181
+ - 🎁 New column management panel design for the Data Grid (#11770) @MBilalShafi
182
+
183
+ <img width="310" alt="image" src="https://github.com/mui/mui-x/assets/12609561/a79dac8b-d54d-4e69-a63a-ef78f3993f37">
184
+
185
+ - 🐞 Bugfixes
186
+ - 📚 Documentation improvements
187
+
188
+ ### Data Grid
189
+
190
+ #### Breaking changes
191
+
192
+ - The columns management component has been redesigned and the component was extracted from the `ColumnsPanel` which now only serves as a wrapper to display the component above the headers as a panel. As a result, a new slot `columnsManagement` and the related prop `slotProps.columnsManagement` have been introduced. The props corresponding to the columns management component which were previously passed to the prop `slotProps.columnsPanel` should now be passed to `slotProps.columnsManagement`. `slotProps.columnsPanel` could still be used to override props corresponding to the `Panel` component used in `ColumnsPanel` which uses [`Popper`](https://next.mui.com/material-ui/react-popper/) component under the hood.
193
+
194
+ ```diff
195
+ <DataGrid
196
+ slotProps={{
197
+ - columnsPanel: {
198
+ + columnsManagement: {
199
+ sort: 'asc',
200
+ autoFocusSearchField: false,
201
+ },
202
+ }}
203
+ />
204
+ ```
205
+
206
+ - `Show all` and `Hide all` buttons in the `ColumnsPanel` have been combined into one `Show/Hide All` toggle in the new columns management component. The related props `disableShowAllButton` and `disableHideAllButton` have been replaced with a new prop `disableShowHideToggle`.
207
+
208
+ ```diff
209
+ <DataGrid
210
+ - disableShowAllButton
211
+ - disableHideAllButton
212
+ + disableShowHideToggle
213
+ />
214
+ ```
215
+
216
+ #### `@mui/x-data-grid@7.0.0-beta.0`
217
+
218
+ - [DataGrid] Export `GridColumnTypes` interface for custom column types (#11742) @cherniavskii
219
+ - [DataGrid] Initialize `apiRef` early (#11792) @cherniavskii
220
+ - [DataGrid] New column management panel design (#11770) @MBilalShafi
221
+ - [DataGrid] Fix support for tree with more than 50,000 children (#11757) @zenazn
222
+
223
+ #### `@mui/x-data-grid-pro@7.0.0-beta.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
224
+
225
+ Same changes as in `@mui/x-data-grid@7.0.0-beta.0`.
226
+
227
+ #### `@mui/x-data-grid-premium@7.0.0-beta.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
228
+
229
+ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.0`.
230
+
231
+ ### Date Pickers
232
+
233
+ #### `@mui/x-date-pickers@7.0.0-beta.0`
234
+
235
+ - [pickers] Apply the `layout.tabs` class to `Tabs` slot (#11781) @LukasTy
236
+ - [pickers] Avoid deep imports (#11794) @LukasTy
237
+ - [pickers] Fields typing optimization (#11779) @LukasTy
238
+
239
+ #### `@mui/x-date-pickers-pro@7.0.0-beta.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
240
+
241
+ Same changes as in `@mui/x-date-pickers@7.0.0-beta.0`, plus:
242
+
243
+ - [pickers] Add `DateTimeRangePicker` component (#9528) @LukasTy
244
+ - [pickers] Add `DateTimeRangePicker` theme augmentation (#11814) @LukasTy
245
+ - [DateRangePicker] Remove `calendars` prop on `Mobile` (#11752) @LukasTy
246
+
247
+ ### Tree View / `@mui/x-tree-view@7.0.0-beta.0`
248
+
249
+ - [TreeView] Remove unused props from prop-types and typing (#11778) @flaviendelangle
250
+ - [TreeView] Throw an error when two items have the same id (#11715) @flaviendelangle
251
+
252
+ ### Docs
253
+
254
+ - [docs] Add `contextValue` to the headless tree view doc (#11705) @flaviendelangle
255
+ - [docs] Add section for the `disableSelection` prop (#11821) @flaviendelangle
256
+ - [docs] Fix brand name non-breaking space (#11758) @oliviertassinari
257
+ - [docs] Fix typo in Data Grid components page (#11775) @flaviendelangle
258
+ - [docs] Fix use of quote, should use callout (#11759) @oliviertassinari
259
+ - [docs] Improve error message for MUI Vale rule @oliviertassinari
260
+ - [docs] Include `DateTimeRangePicker` in relevant demos (#11815) @LukasTy
261
+ - [docs] Add recipe for sorting row groups by the number of child rows (#11164) @cherniavskii
262
+
263
+ ### Core
264
+
265
+ - [core] Cleanup script and alias setup (#11749) @LukasTy
266
+ - [core] Polish issue templates @oliviertassinari
267
+ - [code-infra] Update prettier and pretty-quick (#11735) @Janpot
268
+
6
269
  ## 7.0.0-alpha.9
7
270
 
8
271
  _Jan 19, 2024_
@@ -138,14 +401,14 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`.
138
401
  #### Breaking changes
139
402
 
140
403
  - The `expandIcon` / `defaultExpandIcon` props, used to expand the children of a node (rendered when it is collapsed),
141
- is now defined as a slot both on the Tree View and the Tree Item components.
404
+ is now defined as a slot both on the Tree View and the Tree Item components.
142
405
 
143
406
  If you were using the `ChevronRight` icon from `@mui/icons-material`,
144
407
  you can stop passing it to your component because it is now the default value:
145
408
 
146
409
  ```diff
147
410
  -import ChevronRightIcon from '@mui/icons-material/ChevronRight';
148
-
411
+
149
412
  <SimpleTreeView
150
413
  - defaultExpandIcon={<ChevronRightIcon />}
151
414
  >
@@ -180,14 +443,14 @@ is now defined as a slot both on the Tree View and the Tree Item components.
180
443
  ```
181
444
 
182
445
  - The `collapseIcon` / `defaultCollapseIcon` props, used to collapse the children of a node (rendered when it is expanded),
183
- is now defined as a slot both on the Tree View and the Tree Item components.
446
+ is now defined as a slot both on the Tree View and the Tree Item components.
184
447
 
185
448
  If you were using the `ExpandMore` icon from `@mui/icons-material`,
186
449
  you can stop passing it to your component because it is now the default value:
187
450
 
188
451
  ```diff
189
452
  - import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
190
-
453
+
191
454
  <SimpleTreeView
192
455
  - defaultCollapseIcon={<ExpandMoreIcon />}
193
456
  >
@@ -227,14 +490,14 @@ is now defined as a slot both on the Tree View and the Tree Item components.
227
490
  ```diff
228
491
  -import { TreeItem, useTreeItem } from '@mui/x-tree-view/TreeItem';
229
492
  +import { TreeItem, useTreeItemState } from '@mui/x-tree-view/TreeItem';
230
-
493
+
231
494
  const CustomContent = React.forwardRef((props, ref) => {
232
495
  - const { disabled } = useTreeItem(props.nodeId);
233
496
  + const { disabled } = useTreeItemState(props.nodeId);
234
-
497
+
235
498
  // Render some UI
236
499
  });
237
-
500
+
238
501
  function App() {
239
502
  return (
240
503
  <SimpleTreeView>
@@ -412,7 +675,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.8`.
412
675
 
413
676
  - [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11628) @LukasTy
414
677
  - [docs] Improve `git diff` format @oliviertassinari
415
- - [docs] Push up the MUI X brand (#11533) @oliviertassinari
678
+ - [docs] Push up the MUI X brand (#11533) @oliviertassinari
416
679
  - [docs] Remove old data grid translation files (#11646) @cherniavskii
417
680
  - [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
418
681
  - [docs] Improve charts landing page (#11570) @oliviertassinari
@@ -422,8 +685,8 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.8`.
422
685
  - [core] Lock `jsdom` version (#11652) @cherniavskii
423
686
  - [core] Remove PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD (#11608) @oliviertassinari
424
687
  - [core] Simplify isSsr logic (#11606) @oliviertassinari
425
- - [core] Sync playwright cache between MUI X and Material UI (#11607) @oliviertassinari
426
- - [core] Use MUI X official name in errors (#11645) @oliviertassinari
688
+ - [core] Sync playwright cache between MUI X and Material UI (#11607) @oliviertassinari
689
+ - [core] Use MUI X official name in errors (#11645) @oliviertassinari
427
690
 
428
691
  ## 7.0.0-alpha.7
429
692
 
@@ -455,7 +718,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
455
718
  items={MUI_X_PRODUCTS}
456
719
  defaultCollapseIcon={<ExpandMoreIcon />}
457
720
  defaultExpandIcon={<ChevronRightIcon />}
458
- />
721
+ />;
459
722
  ```
460
723
 
461
724
  - 🌍 Improve Czech (cs-CZ) locale on the Data Grid
@@ -559,10 +822,10 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.7`.
559
822
 
560
823
  - [core] Fix release changelog (#11496) @romgrk
561
824
  - [core] Fix use of ::before & ::after (#11515) @oliviertassinari
562
- - [core] Localize the issue template to MUI X (#11511) @oliviertassinari
825
+ - [core] Localize the issue template to MUI X (#11511) @oliviertassinari
563
826
  - [core] Regen api files (#11542) @flaviendelangle
564
827
  - [core] Remove issue emoji @oliviertassinari
565
- - [core] Sync the release instructions with MUI Core @oliviertassinari
828
+ - [core] Sync the release instructions with MUI Core @oliviertassinari
566
829
  - [core] Yaml format match most common convention @oliviertassinari
567
830
 
568
831
  ## 7.0.0-alpha.6
@@ -600,6 +863,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
600
863
  getOptionLabel: (value: any) => value.name,
601
864
  };
602
865
  ```
866
+
603
867
  - The `filterModel` now supports `Date` objects as values for `date` and `dateTime` column types.
604
868
  The `filterModel` still accepts strings as values for `date` and `dateTime` column types,
605
869
  but all updates to the `filterModel` coming from the UI (e.g. filter panel) will set the value as a `Date` object.
@@ -693,7 +957,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
693
957
  #### Breaking changes
694
958
 
695
959
  - The slot interfaces got renamed to match with `@mui/base` naming.
696
- The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
960
+ The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
697
961
 
698
962
  ```diff
699
963
  -DateCalendarSlotsComponent
@@ -1071,7 +1335,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.3`.
1071
1335
  - [docs] Polish Next.js header description @oliviertassinari
1072
1336
  - [docs] Remove the `newFeature` flag on v6 features (#11168) @flaviendelangle
1073
1337
  - [docs] Simplify a bit chart demo (#11173) @oliviertassinari
1074
- - [docs] Standardize the usage of callouts in the MUI X docs (#7127) @samuelsycamore
1338
+ - [docs] Standardize the usage of callouts in the MUI X docs (#7127) @samuelsycamore
1075
1339
  - [docs] Adjust the Data Grid demo page design (#11231) @danilo-leal
1076
1340
 
1077
1341
  ### Core
@@ -1460,15 +1724,15 @@ And if you need the exact same output you can apply the following transformation
1460
1724
  // For Day.js
1461
1725
  -const isoString = adapter.toISO(value);
1462
1726
  +const isoString = value.toISOString();
1463
-
1727
+
1464
1728
  // For Luxon
1465
1729
  -const isoString = adapter.toISO(value);
1466
1730
  +const isoString = value.toUTC().toISO({ format: 'extended' });
1467
-
1731
+
1468
1732
  // For DateFns
1469
1733
  -const isoString = adapter.toISO(value);
1470
1734
  +const isoString = dateFns.formatISO(value, { format: 'extended' });
1471
-
1735
+
1472
1736
  // For Moment
1473
1737
  -const isoString = adapter.toISO(value);
1474
1738
  +const isoString = value.toISOString();
@@ -1772,6 +2036,90 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
1772
2036
  - [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
1773
2037
  - [license] Correctly throw errors (#10924) @oliviertassinari
1774
2038
 
2039
+ ## 6.19.3
2040
+
2041
+ _Feb 1, 2024_
2042
+
2043
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
2044
+
2045
+ - 🌍 Improve Hebrew (he-IL) locale (#11831) @danielmishan85
2046
+ - 🐞 Bugfixes
2047
+ - 📚 Documentation improvements
2048
+
2049
+ ### Data Grid
2050
+
2051
+ #### `@mui/x-data-grid@6.19.3`
2052
+
2053
+ - [l10n] Improve Hebrew (he-IL) locale (@danielmishan85) (#11831)
2054
+
2055
+ #### `@mui/x-data-grid-pro@6.19.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
2056
+
2057
+ Same changes as in `@mui/x-data-grid@6.19.3`.
2058
+
2059
+ #### `@mui/x-data-grid-premium@6.19.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
2060
+
2061
+ Same changes as in `@mui/x-data-grid-pro@6.19.3`.
2062
+
2063
+ ### Date Pickers
2064
+
2065
+ #### `@mui/x-date-pickers@6.19.3`
2066
+
2067
+ - [TimePicker] Add missing toolbar classes descriptions (#11862) @LukasTy
2068
+
2069
+ #### `@mui/x-date-pickers-pro@6.19.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
2070
+
2071
+ Same changes as in `@mui/x-date-pickers@6.19.3`.
2072
+
2073
+ ### Charts / `@mui/x-charts@6.19.3`
2074
+
2075
+ - [charts] Document how to modify color according to values (#11854) @alexfauquette
2076
+
2077
+ ### Docs
2078
+
2079
+ - [docs] Add a general uplift to the whats new page (#11883) @danilo-leal
2080
+ - [docs] Fix 404 (#11852) @alexfauquette
2081
+ - [docs] Fix <title> generation (#11825) @alexfauquette
2082
+ - [docs] Fix docs:api when typo in slots typing (#11861) @alexfauquette
2083
+ - [docs] Improve Support page (#11556) @oliviertassinari
2084
+ - [docs] Sync support page with core @oliviertassinari
2085
+ - [docs] These API don't exist in MUI X v6 @oliviertassinari
2086
+ - [docs] Update whats new page with v7 Beta blogpost content (#11886) @joserodolfofreitas
2087
+
2088
+ ## 6.19.2
2089
+
2090
+ _Jan 25, 2024_
2091
+
2092
+ We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights ✨:
2093
+
2094
+ - 🚀 Apply the `layout.tabs` class to `Tabs` slot (@LukasTy) (#11782)
2095
+ - 🐞 Bugfixes
2096
+
2097
+ ### Date Pickers
2098
+
2099
+ #### `@mui/x-date-pickers@6.19.2`
2100
+
2101
+ - [pickers] Apply the `layout.tabs` class to `Tabs` slot (@LukasTy) (#11782)
2102
+
2103
+ #### `@mui/x-date-pickers-pro@6.19.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
2104
+
2105
+ Same changes as in `@mui/x-date-pickers@6.19.2`, plus:
2106
+
2107
+ - [DateRangePicker] Remove `calendars` prop on `Mobile` (@LukasTy) (#11771)
2108
+
2109
+ ### Data Grid
2110
+
2111
+ #### `@mui/x-data-grid@6.19.2`
2112
+
2113
+ - [DataGrid] Fix support for tree with more than 50,000 children (@zenazn) (#11808)
2114
+
2115
+ #### `@mui/x-data-grid-pro@6.19.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
2116
+
2117
+ Same changes as in `@mui/x-data-grid@6.19.2`.
2118
+
2119
+ #### `@mui/x-data-grid-premium@6.19.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
2120
+
2121
+ Same changes as in `@mui/x-data-grid-pro@6.19.2`.
2122
+
1775
2123
  ## 6.19.1
1776
2124
 
1777
2125
  _Jan 19, 2024_
@@ -1836,7 +2184,7 @@ Same changes as in `@mui/x-date-pickers@6.19.0`.
1836
2184
 
1837
2185
  - [docs] Add missing component @oliviertassinari
1838
2186
  - [docs] Fix parsing of `x-date-pickers-pro` demo adapter imports (#11637) @LukasTy
1839
- - [docs] Push up the MUI X brand (#11533) @oliviertassinari
2187
+ - [docs] Push up the MUI X brand (#11533) @oliviertassinari
1840
2188
  - [docs] Improve Server-side data grid docs (#11589) @oliviertassinari
1841
2189
  - [docs] Add demo to the charts overview page (#11586) @danilo-leal
1842
2190
  - [docs] Fix 404 links in the docs @oliviertassinari
@@ -2196,7 +2544,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
2196
2544
  - 🥧 Pie charts are now animated.
2197
2545
  - 📈 Line charts now support partial data, and can interpolate missing data https://mui.com/x/react-charts/lines/#skip-missing-points.
2198
2546
 
2199
- <img src="https://github.com/mui/mui-x/assets/3165635/d2d50b1b-ee29-4e4c-9ebe-629c06f3093e" width="683" height="436" />
2547
+ <img src="https://github.com/mui/mui-x/assets/3165635/d2d50b1b-ee29-4e4c-9ebe-629c06f3093e" width="683" height="436" alt="Charts partial data" />
2200
2548
 
2201
2549
  - ✨ The data grid allows to ignore [diacritics](https://en.wikipedia.org/wiki/Diacritic) when filtering.
2202
2550
  - 📚 Documentation improvements
@@ -2690,7 +3038,7 @@ Same changes as in `@mui/x-date-pickers@6.15.0`.
2690
3038
  - [docs] Add missing MIT packages on the Licensing page (#10348) @flaviendelangle
2691
3039
  - [docs] Clearer component pattern @oliviertassinari
2692
3040
  - [docs] Easier to understand demo (#10370) @oliviertassinari
2693
- - [docs] Fix `301` to Material UI @oliviertassinari
3041
+ - [docs] Fix `301` to Material UI @oliviertassinari
2694
3042
  - [docs] Improve the column visibility section (#10327) @MBilalShafi
2695
3043
  - [docs] Improve the documentation section `rowIdentifier` (#10326) @MBilalShafi
2696
3044
  - [docs] Improve pickers localization documentation (#10202) @flaviendelangle
@@ -2768,12 +3116,12 @@ Same changes as in `@mui/x-date-pickers@6.14.0`.
2768
3116
  - [docs] Add conditional range picker props example (#10227) @LukasTy
2769
3117
  - [docs] Add toolbar to the multi-filters demo (#10223) @MBilalShafi
2770
3118
  - [docs] Avoid the use of "We" @oliviertassinari
2771
- - [docs] Clarify MUI vs. MUI Core difference @oliviertassinari
3119
+ - [docs] Clarify MUI vs. MUI Core difference @oliviertassinari
2772
3120
  - [docs] Enable `ariaV7` flag for demos using `useDemoData` hook (#10204) @cherniavskii
2773
3121
  - [docs] Fix Tree View link to API references (#10282) @oliviertassinari
2774
3122
  - [docs] Fix image layout shift (#10313) @oliviertassinari
2775
- - [docs] Fix link to MUI X from readme logo @oliviertassinari
2776
- - [docs] Fix redirection to Base UI URLs @oliviertassinari
3123
+ - [docs] Fix link to MUI X from readme logo @oliviertassinari
3124
+ - [docs] Fix redirection to Base UI URLs @oliviertassinari
2777
3125
  - [docs] Improve Tree View demos (#10268) @oliviertassinari
2778
3126
  - [docs] Improve docs for ref type props (#10273) @michelengelen
2779
3127
  - [docs] Improve npm package README (#10269) @oliviertassinari
@@ -2857,7 +3205,7 @@ Same changes as in `@mui/x-date-pickers@6.13.0`, plus:
2857
3205
  - [docs] Improve the week picker example (#8257) @flaviendelangle
2858
3206
  - [docs] Include code links in the data grid demo (#10219) @cherniavskii
2859
3207
  - [docs] Polish page for SEO (#10216) @oliviertassinari
2860
- - [docs] Use `Base UI` `Portal` for the quick filter recipe (#10188) @DanailH
3208
+ - [docs] Use `Base UI` `Portal` for the quick filter recipe (#10188) @DanailH
2861
3209
 
2862
3210
  ### Core
2863
3211
 
@@ -3118,7 +3466,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
3118
3466
 
3119
3467
  - ⌚️ Move the tree view component from `@mui/lab` package
3120
3468
 
3121
- The `<TreeView />` component has been moved to the MUI X repository.
3469
+ The `<TreeView />` component has been moved to the MUI X repository.
3122
3470
  It is now accessible from its own package: `@mui/x-tree-view`.
3123
3471
 
3124
3472
  - 🌍 Improve Hebrew (he-IL), Finnish (fi-FI), and Italian (it-IT) locales on the data grid
@@ -3180,7 +3528,7 @@ Same changes as in `@mui/x-date-pickers@6.11.0`.
3180
3528
 
3181
3529
  - [docs] Add Tree View doc (#9825) @flaviendelangle
3182
3530
  - [docs] Add charts nav item (#9821) @LukasTy
3183
- - [docs] Add charts to MUI X introduction pages (#9704) @joserodolfofreitas
3531
+ - [docs] Add charts to MUI X introduction pages (#9704) @joserodolfofreitas
3184
3532
  - [docs] Add example for avoiding picker views layout shift (#9781) @noraleonte
3185
3533
  - [docs] Consistency of Next.js App Router @oliviertassinari
3186
3534
  - [docs] Fix API page regression: bring back slots section (#9866) @alexfauquette
@@ -3249,7 +3597,7 @@ Same changes as in `@mui/x-date-pickers@6.10.2`.
3249
3597
  ### Docs
3250
3598
 
3251
3599
  - [docs] Add `pnpm` in more places @oliviertassinari
3252
- - [docs] Add `pnpm` installation instructions for MUI X (#9707) @richbustos
3600
+ - [docs] Add `pnpm` installation instructions for MUI X (#9707) @richbustos
3253
3601
  - [docs] Align pickers "uncontrolled vs controlled" sections (#9772) @LukasTy
3254
3602
  - [docs] Apply style guide to the data grid Layout page (#9673) @richbustos
3255
3603
  - [docs] Differentiate between packages in `slotProps` docs (#9668) @cherniavskii
@@ -3558,7 +3906,7 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
3558
3906
 
3559
3907
  - 🚀 Introducing UTC and timezone support for pickers.
3560
3908
 
3561
- <img width="774" src="https://github.com/mui/mui-x/assets/3165635/ad95a404-ee67-4aff-b996-ad6cbb322348">
3909
+ <img width="774" src="https://github.com/mui/mui-x/assets/3165635/ad95a404-ee67-4aff-b996-ad6cbb322348" alt="Pickers time zone switching">
3562
3910
 
3563
3911
  Visit the [documentation](https://mui.com/x/react-date-pickers/timezone/) to learn how to use it.
3564
3912
 
@@ -3610,7 +3958,7 @@ Same changes as in `@mui/x-date-pickers@6.9.0`.
3610
3958
 
3611
3959
  - [docs] Add examples of using different time view renderers (#9360) @LukasTy
3612
3960
  - [docs] Add recipe for single-click editing (#8365) @m4theushw
3613
- - [docs] Fix Base UI references (#9349) @oliviertassinari
3961
+ - [docs] Fix Base UI references (#9349) @oliviertassinari
3614
3962
  - [docs] Fix random screenshot generation (#9364) @cherniavskii
3615
3963
  - [docs] Remove random generation from chart doc example (#9343) @flaviendelangle
3616
3964
  - [docs] Sync h1 with sidenav link (#9252) @oliviertassinari
@@ -3794,7 +4142,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
3794
4142
 
3795
4143
  - 🚀 New date time picking UI on [`DesktopDateTimePicker`](https://mui.com/x/react-date-pickers/date-time-picker/)
3796
4144
 
3797
- <img src="https://github.com/mui/mui-x/assets/3165635/4e1fe9f9-03eb-4f23-99dd-80212b21fb23" width="840" height="506" />
4145
+ <img src="https://github.com/mui/mui-x/assets/3165635/4e1fe9f9-03eb-4f23-99dd-80212b21fb23" width="840" height="506" alt="Desktop Date Time Picker example" />
3798
4146
 
3799
4147
  - 🚀 Performance improvements
3800
4148
  - 🐞 Bugfixes
@@ -3870,7 +4218,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
3870
4218
 
3871
4219
  - 💫 Introduce filtering on column headers for `DataGridPro` and `DataGridPremium`:
3872
4220
 
3873
- <img src="https://github.com/mui/mui-x/releases/download/v6.5.0/recording.gif" width="840" height="506" />
4221
+ <img src="https://github.com/mui/mui-x/releases/download/v6.5.0/recording.gif" width="840" height="506" alt="Filtering on column headers example" />
3874
4222
 
3875
4223
  See [the documentation](https://mui.com/x/react-data-grid/filtering/header-filters/) for more information
3876
4224
 
@@ -4029,7 +4377,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
4029
4377
 
4030
4378
  - 🚀 New [time-picking UI](https://mui.com/x/react-date-pickers/digital-clock/) designed for desktops (#7958) @LukasTy
4031
4379
 
4032
- <img src="https://user-images.githubusercontent.com/4941090/235072007-de39a397-e4a4-4c98-8e10-5ee4ad440108.gif" width="494" />
4380
+ <img src="https://user-images.githubusercontent.com/4941090/235072007-de39a397-e4a4-4c98-8e10-5ee4ad440108.gif" width="494" alt="New digital clock time picker" />
4033
4381
 
4034
4382
  - ✨ Picker fields [now always include a leading zero](https://mui.com/x/react-date-pickers/adapters-locale/#respect-leading-zeros-in-fields) on digit sections (#8527) @flaviendelangle
4035
4383
  - 🌍 Improve Chinese (zh-CN), French (fr-FR), and Turkish (tr-TR) locales
@@ -4405,7 +4753,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
4405
4753
  - [docs] Add a warning for `luxon` macro tokens (#8245) @flaviendelangle
4406
4754
  - [docs] Complete pickers customization pages (#8066) @alexfauquette
4407
4755
  - [docs] Fix 301 redirection @oliviertassinari
4408
- - [docs] Fix 404 links to customization Material UI APIs (#8200) @oliviertassinari
4756
+ - [docs] Fix 404 links to customization Material UI APIs (#8200) @oliviertassinari
4409
4757
  - [docs] Fix `moment-hijri` demo (#8255) @LukasTy
4410
4758
  - [docs] Improve migration diff (#8240) @oliviertassinari
4411
4759
  - [docs] Change **What's new** page url to point to announcement blog post (#8186) @joserodolfofreitas
@@ -4836,7 +5184,7 @@ We'd like to offer a big thanks to the 17 contributors who made this release pos
4836
5184
 
4837
5185
  _Jan 19, 2023_
4838
5186
 
4839
- After a long period in alpha, we're glad to announce the first MUI X v6 beta!
5187
+ After a long period in alpha, we're glad to announce the first MUI X v6 beta!
4840
5188
  We encourage you to try out this version, packed with improvements, bug fixes, and a few highlighted features ✨:
4841
5189
 
4842
5190
  **Data Grid**
@@ -6092,7 +6440,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
6092
6440
  #### Breaking changes
6093
6441
 
6094
6442
  - The `ToolbarComponent` has been replaced by a `Toolbar` component slot.
6095
- You can find more information about this pattern in the [Base UI documentation](https://mui.com/base-ui/getting-started/usage/#shared-props):
6443
+ You can find more information about this pattern in the [Base UI documentation](https://mui.com/base-ui/getting-started/usage/#shared-props):
6096
6444
 
6097
6445
  ```diff
6098
6446
  // Same on all other pickers
@@ -6243,7 +6591,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
6243
6591
 
6244
6592
  #### Breaking changes
6245
6593
 
6246
- - All the props used by the mobile and desktop wrappers to override components or components' props have been replaced by component slots. You can find more information about this pattern in the [Base UI documentation](https://mui.com/base-ui/getting-started/usage/#shared-props).
6594
+ - All the props used by the mobile and desktop wrappers to override components or components' props have been replaced by component slots. You can find more information about this pattern in the [Base UI documentation](https://mui.com/base-ui/getting-started/usage/#shared-props).
6247
6595
 
6248
6596
  Some of the names have also been prefixed by `desktop` when it was unclear that the behavior was only applied on the desktop version of the pickers (or the responsive version when used on a desktop).
6249
6597
 
@@ -6432,7 +6780,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
6432
6780
  #### Breaking changes
6433
6781
 
6434
6782
  - The `renderDay` prop has been replaced by a `Day` component slot.
6435
- You can find more information about this pattern in the [Base UI documentation](https://mui.com/base-ui/getting-started/usage/#shared-props).
6783
+ You can find more information about this pattern in the [Base UI documentation](https://mui.com/base-ui/getting-started/usage/#shared-props).
6436
6784
 
6437
6785
  ```diff
6438
6786
  // Same for any other date, date time or date range picker.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # `@mui/x-data-grid-generator`
2
2
 
3
- This package is used to generate data and build demos for the [MUI X Data Grid](https://mui.com/x/react-data-grid/).
3
+ This package is used to generate data and build demos for the [MUI X Data Grid](https://mui.com/x/react-data-grid/).
4
4
 
5
5
  ⚠️ Do not use this package in production.
@@ -85,9 +85,7 @@ export const getCommodityColumns = (editable = false) => [{
85
85
  }, {
86
86
  field: 'subTotal',
87
87
  headerName: 'Sub Total',
88
- valueGetter: ({
89
- row
90
- }) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
88
+ valueGetter: (value, row) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
91
89
  type: 'number',
92
90
  width: 120
93
91
  }, {
@@ -101,9 +99,7 @@ export const getCommodityColumns = (editable = false) => [{
101
99
  }, {
102
100
  field: 'feeAmount',
103
101
  headerName: 'Fee Amount',
104
- valueGetter: ({
105
- row
106
- }) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
102
+ valueGetter: (value, row) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
107
103
  type: 'number',
108
104
  width: 120
109
105
  }, {
@@ -117,9 +113,7 @@ export const getCommodityColumns = (editable = false) => [{
117
113
  }, {
118
114
  field: 'totalPrice',
119
115
  headerName: 'Total in USD',
120
- valueGetter: ({
121
- row
122
- }) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
116
+ valueGetter: (value, row) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
123
117
  renderCell: renderTotalPrice,
124
118
  type: 'number',
125
119
  width: 160
@@ -173,10 +167,8 @@ export const getCommodityColumns = (editable = false) => [{
173
167
  }
174
168
  return value;
175
169
  },
176
- valueFormatter: ({
177
- value
178
- }) => value == null ? void 0 : value.label,
179
- groupingValueGetter: params => params.value.code,
170
+ valueFormatter: value => value == null ? void 0 : value.label,
171
+ groupingValueGetter: value => value.code,
180
172
  sortComparator: (v1, v2, param1, param2) => gridStringOrNumberComparator(v1.label, v2.label, param1, param2),
181
173
  editable,
182
174
  width: 120
@@ -11,9 +11,9 @@ export const getEmployeeColumns = () => [{
11
11
  headerName: 'Avatar',
12
12
  generateData: randomColor,
13
13
  renderCell: renderAvatar,
14
- valueGetter: params => params.row.name == null || params.row.avatar == null ? null : {
15
- name: params.row.name,
16
- color: params.row.avatar
14
+ valueGetter: (value, row) => row.name == null || row.avatar == null ? null : {
15
+ name: row.name,
16
+ color: row.avatar
17
17
  },
18
18
  sortable: false,
19
19
  filterable: false,
@@ -77,9 +77,7 @@ export const getEmployeeColumns = () => [{
77
77
  headerName: 'Country',
78
78
  type: 'singleSelect',
79
79
  valueOptions: COUNTRY_ISO_OPTIONS_SORTED,
80
- valueFormatter: ({
81
- value
82
- }) => value == null ? void 0 : value.label,
80
+ valueFormatter: value => value == null ? void 0 : value.label,
83
81
  generateData: randomCountry,
84
82
  renderCell: renderCountry,
85
83
  renderEditCell: renderEditCountry,
@@ -124,9 +122,7 @@ export const getEmployeeColumns = () => [{
124
122
  headerName: 'Salary',
125
123
  generateData: () => randomInt(30000, 80000),
126
124
  type: 'number',
127
- valueFormatter: ({
128
- value
129
- }) => {
125
+ valueFormatter: value => {
130
126
  if (!value || typeof value !== 'number') {
131
127
  return value;
132
128
  }
@@ -15,9 +15,7 @@ const COLUMNS = [{
15
15
  type: 'number',
16
16
  width: 150,
17
17
  groupable: false,
18
- valueFormatter: ({
19
- value
20
- }) => {
18
+ valueFormatter: value => {
21
19
  if (!value) {
22
20
  return '';
23
21
  }
@@ -48,12 +48,12 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
48
48
  groupable?: boolean | undefined;
49
49
  pinnable?: boolean | undefined;
50
50
  sortComparator?: import("@mui/x-data-grid-pro").GridComparatorFn<any> | undefined;
51
- type?: import("@mui/x-data-grid-pro").GridNativeColTypes | undefined;
51
+ type?: import("@mui/x-data-grid-pro").GridColType | undefined;
52
52
  align?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
53
- valueGetter?: ((params: import("@mui/x-data-grid-pro").GridValueGetterParams<any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => any) | undefined;
54
- valueSetter?: ((params: import("@mui/x-data-grid-pro").GridValueSetterParams<any, any>) => any) | undefined;
55
- valueFormatter?: ((params: import("@mui/x-data-grid-pro").GridValueFormatterParams<any>) => any) | undefined;
56
- valueParser?: ((value: any, params?: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode> | undefined) => any) | undefined;
53
+ valueGetter?: import("@mui/x-data-grid-pro").GridValueGetter<any, any, any, never> | undefined;
54
+ valueSetter?: import("@mui/x-data-grid-pro").GridValueSetter<any, any, any> | undefined;
55
+ valueFormatter?: import("@mui/x-data-grid-pro").GridValueFormatter<any, any, any, never> | undefined;
56
+ valueParser?: import("@mui/x-data-grid-pro").GridValueParser<any, any, any> | undefined;
57
57
  cellClassName?: import("@mui/x-data-grid-pro").GridCellClassNamePropType<any, any> | undefined;
58
58
  renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
59
59
  renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
@@ -68,12 +68,12 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
68
68
  getApplyQuickFilterFn?: import("@mui/x-data-grid-pro").GetApplyQuickFilterFn<any, any> | undefined;
69
69
  disableReorder?: boolean | undefined;
70
70
  disableExport?: boolean | undefined;
71
- colSpan?: number | ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => number | undefined) | undefined;
71
+ colSpan?: number | import("@mui/x-data-grid-pro").GridColSpanFn<any, any, any> | undefined;
72
72
  renderHeaderFilter?: ((params: import("@mui/x-data-grid-pro").GridHeaderFilterCellProps) => React.ReactNode) | undefined;
73
73
  aggregable?: boolean | undefined;
74
74
  availableAggregationFunctions?: string[] | undefined;
75
- groupingValueGetter?: ((params: import("@mui/x-data-grid-premium").GridGroupingValueGetterParams<any, any>) => import("@mui/x-data-grid-pro").GridKeyValue | null | undefined) | undefined;
76
- pastedValueParser?: ((value: string, params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => any) | undefined;
75
+ groupingValueGetter?: import("@mui/x-data-grid-premium").GridGroupingValueGetter<any> | undefined;
76
+ pastedValueParser?: import("@mui/x-data-grid-premium").GridPastedValueParser<any, any, any> | undefined;
77
77
  generateData?: ((row: any, context: import("..").GridDataGeneratorContext) => any) | undefined;
78
78
  dataGeneratorUniquenessEnabled?: boolean | undefined;
79
79
  hide?: boolean | undefined;
@@ -96,10 +96,10 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
96
96
  pinnable?: boolean | undefined;
97
97
  sortComparator?: import("@mui/x-data-grid-pro").GridComparatorFn<any> | undefined;
98
98
  align?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
99
- valueGetter?: ((params: import("@mui/x-data-grid-pro").GridValueGetterParams<any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => any) | undefined;
100
- valueSetter?: ((params: import("@mui/x-data-grid-pro").GridValueSetterParams<any, any>) => any) | undefined;
101
- valueFormatter?: ((params: import("@mui/x-data-grid-pro").GridValueFormatterParams<any>) => any) | undefined;
102
- valueParser?: ((value: any, params?: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode> | undefined) => any) | undefined;
99
+ valueGetter?: import("@mui/x-data-grid-pro").GridValueGetter<any, any, any, never> | undefined;
100
+ valueSetter?: import("@mui/x-data-grid-pro").GridValueSetter<any, any, any> | undefined;
101
+ valueFormatter?: import("@mui/x-data-grid-pro").GridValueFormatter<any, any, any, never> | undefined;
102
+ valueParser?: import("@mui/x-data-grid-pro").GridValueParser<any, any, any> | undefined;
103
103
  cellClassName?: import("@mui/x-data-grid-pro").GridCellClassNamePropType<any, any> | undefined;
104
104
  renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
105
105
  renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
@@ -114,12 +114,12 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
114
114
  getApplyQuickFilterFn?: import("@mui/x-data-grid-pro").GetApplyQuickFilterFn<any, any> | undefined;
115
115
  disableReorder?: boolean | undefined;
116
116
  disableExport?: boolean | undefined;
117
- colSpan?: number | ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => number | undefined) | undefined;
117
+ colSpan?: number | import("@mui/x-data-grid-pro").GridColSpanFn<any, any, any> | undefined;
118
118
  renderHeaderFilter?: ((params: import("@mui/x-data-grid-pro").GridHeaderFilterCellProps) => React.ReactNode) | undefined;
119
119
  aggregable?: boolean | undefined;
120
120
  availableAggregationFunctions?: string[] | undefined;
121
- groupingValueGetter?: ((params: import("@mui/x-data-grid-premium").GridGroupingValueGetterParams<any, any>) => import("@mui/x-data-grid-pro").GridKeyValue | null | undefined) | undefined;
122
- pastedValueParser?: ((value: string, params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => any) | undefined;
121
+ groupingValueGetter?: import("@mui/x-data-grid-premium").GridGroupingValueGetter<any> | undefined;
122
+ pastedValueParser?: import("@mui/x-data-grid-premium").GridPastedValueParser<any, any, any> | undefined;
123
123
  generateData?: ((row: any, context: import("..").GridDataGeneratorContext) => any) | undefined;
124
124
  dataGeneratorUniquenessEnabled?: boolean | undefined;
125
125
  hide?: boolean | undefined;
@@ -144,10 +144,10 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
144
144
  pinnable?: boolean | undefined;
145
145
  sortComparator?: import("@mui/x-data-grid-pro").GridComparatorFn<any> | undefined;
146
146
  align?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
147
- valueGetter?: ((params: import("@mui/x-data-grid-pro").GridValueGetterParams<any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => any) | undefined;
148
- valueSetter?: ((params: import("@mui/x-data-grid-pro").GridValueSetterParams<any, any>) => any) | undefined;
149
- valueFormatter?: ((params: import("@mui/x-data-grid-pro").GridValueFormatterParams<any>) => any) | undefined;
150
- valueParser?: ((value: any, params?: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode> | undefined) => any) | undefined;
147
+ valueGetter?: import("@mui/x-data-grid-pro").GridValueGetter<any, any, any, never> | undefined;
148
+ valueSetter?: import("@mui/x-data-grid-pro").GridValueSetter<any, any, any> | undefined;
149
+ valueFormatter?: import("@mui/x-data-grid-pro").GridValueFormatter<any, any, any, never> | undefined;
150
+ valueParser?: import("@mui/x-data-grid-pro").GridValueParser<any, any, any> | undefined;
151
151
  cellClassName?: import("@mui/x-data-grid-pro").GridCellClassNamePropType<any, any> | undefined;
152
152
  renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
153
153
  renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
@@ -162,12 +162,12 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
162
162
  getApplyQuickFilterFn?: import("@mui/x-data-grid-pro").GetApplyQuickFilterFn<any, any> | undefined;
163
163
  disableReorder?: boolean | undefined;
164
164
  disableExport?: boolean | undefined;
165
- colSpan?: number | ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => number | undefined) | undefined;
165
+ colSpan?: number | import("@mui/x-data-grid-pro").GridColSpanFn<any, any, any> | undefined;
166
166
  renderHeaderFilter?: ((params: import("@mui/x-data-grid-pro").GridHeaderFilterCellProps) => React.ReactNode) | undefined;
167
167
  aggregable?: boolean | undefined;
168
168
  availableAggregationFunctions?: string[] | undefined;
169
- groupingValueGetter?: ((params: import("@mui/x-data-grid-premium").GridGroupingValueGetterParams<any, any>) => import("@mui/x-data-grid-pro").GridKeyValue | null | undefined) | undefined;
170
- pastedValueParser?: ((value: string, params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => any) | undefined;
169
+ groupingValueGetter?: import("@mui/x-data-grid-premium").GridGroupingValueGetter<any> | undefined;
170
+ pastedValueParser?: import("@mui/x-data-grid-premium").GridPastedValueParser<any, any, any> | undefined;
171
171
  generateData?: ((row: any, context: import("..").GridDataGeneratorContext) => any) | undefined;
172
172
  dataGeneratorUniquenessEnabled?: boolean | undefined;
173
173
  hide?: boolean | undefined;
package/hooks/useQuery.js CHANGED
@@ -4,16 +4,10 @@ import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-p
4
4
  import { isDeepEqual } from '@mui/x-data-grid/internals';
5
5
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
6
6
  import { randomInt } from '../services/random-generator';
7
+ const apiRef = {};
7
8
  const simplifiedValueGetter = (field, colDef) => row => {
8
9
  var _colDef$valueGetter;
9
- const params = {
10
- id: row.id,
11
- row,
12
- field,
13
- rowNode: {}
14
- };
15
- // @ts-ignore
16
- return ((_colDef$valueGetter = colDef.valueGetter) == null ? void 0 : _colDef$valueGetter.call(colDef, params)) || row[field];
10
+ return ((_colDef$valueGetter = colDef.valueGetter) == null ? void 0 : _colDef$valueGetter.call(colDef, row[row.id], row, colDef, apiRef)) || row[field];
17
11
  };
18
12
  const getRowComparator = (sortModel, columnsWithDefaultColDef) => {
19
13
  if (!sortModel) {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.9
2
+ * @mui/x-data-grid-generator v7.0.0-beta.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -91,8 +91,7 @@ export var getCommodityColumns = function getCommodityColumns() {
91
91
  }, {
92
92
  field: 'subTotal',
93
93
  headerName: 'Sub Total',
94
- valueGetter: function valueGetter(_ref) {
95
- var row = _ref.row;
94
+ valueGetter: function valueGetter(value, row) {
96
95
  return row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice;
97
96
  },
98
97
  type: 'number',
@@ -110,8 +109,7 @@ export var getCommodityColumns = function getCommodityColumns() {
110
109
  }, {
111
110
  field: 'feeAmount',
112
111
  headerName: 'Fee Amount',
113
- valueGetter: function valueGetter(_ref2) {
114
- var row = _ref2.row;
112
+ valueGetter: function valueGetter(value, row) {
115
113
  return row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice;
116
114
  },
117
115
  type: 'number',
@@ -127,8 +125,7 @@ export var getCommodityColumns = function getCommodityColumns() {
127
125
  }, {
128
126
  field: 'totalPrice',
129
127
  headerName: 'Total in USD',
130
- valueGetter: function valueGetter(_ref3) {
131
- var row = _ref3.row;
128
+ valueGetter: function valueGetter(value, row) {
132
129
  return row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice;
133
130
  },
134
131
  renderCell: renderTotalPrice,
@@ -186,12 +183,11 @@ export var getCommodityColumns = function getCommodityColumns() {
186
183
  }
187
184
  return value;
188
185
  },
189
- valueFormatter: function valueFormatter(_ref4) {
190
- var value = _ref4.value;
186
+ valueFormatter: function valueFormatter(value) {
191
187
  return value == null ? void 0 : value.label;
192
188
  },
193
- groupingValueGetter: function groupingValueGetter(params) {
194
- return params.value.code;
189
+ groupingValueGetter: function groupingValueGetter(value) {
190
+ return value.code;
195
191
  },
196
192
  sortComparator: function sortComparator(v1, v2, param1, param2) {
197
193
  return gridStringOrNumberComparator(v1.label, v2.label, param1, param2);
@@ -12,10 +12,10 @@ export var getEmployeeColumns = function getEmployeeColumns() {
12
12
  headerName: 'Avatar',
13
13
  generateData: randomColor,
14
14
  renderCell: renderAvatar,
15
- valueGetter: function valueGetter(params) {
16
- return params.row.name == null || params.row.avatar == null ? null : {
17
- name: params.row.name,
18
- color: params.row.avatar
15
+ valueGetter: function valueGetter(value, row) {
16
+ return row.name == null || row.avatar == null ? null : {
17
+ name: row.name,
18
+ color: row.avatar
19
19
  };
20
20
  },
21
21
  sortable: false,
@@ -80,8 +80,7 @@ export var getEmployeeColumns = function getEmployeeColumns() {
80
80
  headerName: 'Country',
81
81
  type: 'singleSelect',
82
82
  valueOptions: COUNTRY_ISO_OPTIONS_SORTED,
83
- valueFormatter: function valueFormatter(_ref) {
84
- var value = _ref.value;
83
+ valueFormatter: function valueFormatter(value) {
85
84
  return value == null ? void 0 : value.label;
86
85
  },
87
86
  generateData: randomCountry,
@@ -132,8 +131,7 @@ export var getEmployeeColumns = function getEmployeeColumns() {
132
131
  return randomInt(30000, 80000);
133
132
  },
134
133
  type: 'number',
135
- valueFormatter: function valueFormatter(_ref2) {
136
- var value = _ref2.value;
134
+ valueFormatter: function valueFormatter(value) {
137
135
  if (!value || typeof value !== 'number') {
138
136
  return value;
139
137
  }
@@ -15,8 +15,7 @@ var COLUMNS = [{
15
15
  type: 'number',
16
16
  width: 150,
17
17
  groupable: false,
18
- valueFormatter: function valueFormatter(_ref) {
19
- var value = _ref.value;
18
+ valueFormatter: function valueFormatter(value) {
20
19
  if (!value) {
21
20
  return '';
22
21
  }
@@ -8,17 +8,11 @@ import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-p
8
8
  import { isDeepEqual } from '@mui/x-data-grid/internals';
9
9
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
10
10
  import { randomInt } from '../services/random-generator';
11
+ var apiRef = {};
11
12
  var simplifiedValueGetter = function simplifiedValueGetter(field, colDef) {
12
13
  return function (row) {
13
14
  var _colDef$valueGetter;
14
- var params = {
15
- id: row.id,
16
- row: row,
17
- field: field,
18
- rowNode: {}
19
- };
20
- // @ts-ignore
21
- return ((_colDef$valueGetter = colDef.valueGetter) == null ? void 0 : _colDef$valueGetter.call(colDef, params)) || row[field];
15
+ return ((_colDef$valueGetter = colDef.valueGetter) == null ? void 0 : _colDef$valueGetter.call(colDef, row[row.id], row, colDef, apiRef)) || row[field];
22
16
  };
23
17
  };
24
18
  var getRowComparator = function getRowComparator(sortModel, columnsWithDefaultColDef) {
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.9
2
+ * @mui/x-data-grid-generator v7.0.0-beta.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -85,9 +85,7 @@ export const getCommodityColumns = (editable = false) => [{
85
85
  }, {
86
86
  field: 'subTotal',
87
87
  headerName: 'Sub Total',
88
- valueGetter: ({
89
- row
90
- }) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
88
+ valueGetter: (value, row) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
91
89
  type: 'number',
92
90
  width: 120
93
91
  }, {
@@ -101,9 +99,7 @@ export const getCommodityColumns = (editable = false) => [{
101
99
  }, {
102
100
  field: 'feeAmount',
103
101
  headerName: 'Fee Amount',
104
- valueGetter: ({
105
- row
106
- }) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
102
+ valueGetter: (value, row) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
107
103
  type: 'number',
108
104
  width: 120
109
105
  }, {
@@ -117,9 +113,7 @@ export const getCommodityColumns = (editable = false) => [{
117
113
  }, {
118
114
  field: 'totalPrice',
119
115
  headerName: 'Total in USD',
120
- valueGetter: ({
121
- row
122
- }) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
116
+ valueGetter: (value, row) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
123
117
  renderCell: renderTotalPrice,
124
118
  type: 'number',
125
119
  width: 160
@@ -173,10 +167,8 @@ export const getCommodityColumns = (editable = false) => [{
173
167
  }
174
168
  return value;
175
169
  },
176
- valueFormatter: ({
177
- value
178
- }) => value?.label,
179
- groupingValueGetter: params => params.value.code,
170
+ valueFormatter: value => value?.label,
171
+ groupingValueGetter: value => value.code,
180
172
  sortComparator: (v1, v2, param1, param2) => gridStringOrNumberComparator(v1.label, v2.label, param1, param2),
181
173
  editable,
182
174
  width: 120
@@ -11,9 +11,9 @@ export const getEmployeeColumns = () => [{
11
11
  headerName: 'Avatar',
12
12
  generateData: randomColor,
13
13
  renderCell: renderAvatar,
14
- valueGetter: params => params.row.name == null || params.row.avatar == null ? null : {
15
- name: params.row.name,
16
- color: params.row.avatar
14
+ valueGetter: (value, row) => row.name == null || row.avatar == null ? null : {
15
+ name: row.name,
16
+ color: row.avatar
17
17
  },
18
18
  sortable: false,
19
19
  filterable: false,
@@ -77,9 +77,7 @@ export const getEmployeeColumns = () => [{
77
77
  headerName: 'Country',
78
78
  type: 'singleSelect',
79
79
  valueOptions: COUNTRY_ISO_OPTIONS_SORTED,
80
- valueFormatter: ({
81
- value
82
- }) => value?.label,
80
+ valueFormatter: value => value?.label,
83
81
  generateData: randomCountry,
84
82
  renderCell: renderCountry,
85
83
  renderEditCell: renderEditCountry,
@@ -124,9 +122,7 @@ export const getEmployeeColumns = () => [{
124
122
  headerName: 'Salary',
125
123
  generateData: () => randomInt(30000, 80000),
126
124
  type: 'number',
127
- valueFormatter: ({
128
- value
129
- }) => {
125
+ valueFormatter: value => {
130
126
  if (!value || typeof value !== 'number') {
131
127
  return value;
132
128
  }
@@ -15,9 +15,7 @@ const COLUMNS = [{
15
15
  type: 'number',
16
16
  width: 150,
17
17
  groupable: false,
18
- valueFormatter: ({
19
- value
20
- }) => {
18
+ valueFormatter: value => {
21
19
  if (!value) {
22
20
  return '';
23
21
  }
@@ -4,15 +4,9 @@ import { getGridDefaultColumnTypes, GridLogicOperator } from '@mui/x-data-grid-p
4
4
  import { isDeepEqual } from '@mui/x-data-grid/internals';
5
5
  import { useDemoData, getColumnsFromOptions, getInitialState } from './useDemoData';
6
6
  import { randomInt } from '../services/random-generator';
7
+ const apiRef = {};
7
8
  const simplifiedValueGetter = (field, colDef) => row => {
8
- const params = {
9
- id: row.id,
10
- row,
11
- field,
12
- rowNode: {}
13
- };
14
- // @ts-ignore
15
- return colDef.valueGetter?.(params) || row[field];
9
+ return colDef.valueGetter?.(row[row.id], row, colDef, apiRef) || row[field];
16
10
  };
17
11
  const getRowComparator = (sortModel, columnsWithDefaultColDef) => {
18
12
  if (!sortModel) {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.9
2
+ * @mui/x-data-grid-generator v7.0.0-beta.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -91,9 +91,7 @@ const getCommodityColumns = (editable = false) => [{
91
91
  }, {
92
92
  field: 'subTotal',
93
93
  headerName: 'Sub Total',
94
- valueGetter: ({
95
- row
96
- }) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
94
+ valueGetter: (value, row) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
97
95
  type: 'number',
98
96
  width: 120
99
97
  }, {
@@ -107,9 +105,7 @@ const getCommodityColumns = (editable = false) => [{
107
105
  }, {
108
106
  field: 'feeAmount',
109
107
  headerName: 'Fee Amount',
110
- valueGetter: ({
111
- row
112
- }) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
108
+ valueGetter: (value, row) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
113
109
  type: 'number',
114
110
  width: 120
115
111
  }, {
@@ -123,9 +119,7 @@ const getCommodityColumns = (editable = false) => [{
123
119
  }, {
124
120
  field: 'totalPrice',
125
121
  headerName: 'Total in USD',
126
- valueGetter: ({
127
- row
128
- }) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
122
+ valueGetter: (value, row) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
129
123
  renderCell: _renderer.renderTotalPrice,
130
124
  type: 'number',
131
125
  width: 160
@@ -179,10 +173,8 @@ const getCommodityColumns = (editable = false) => [{
179
173
  }
180
174
  return value;
181
175
  },
182
- valueFormatter: ({
183
- value
184
- }) => value?.label,
185
- groupingValueGetter: params => params.value.code,
176
+ valueFormatter: value => value?.label,
177
+ groupingValueGetter: value => value.code,
186
178
  sortComparator: (v1, v2, param1, param2) => (0, _xDataGridPremium.gridStringOrNumberComparator)(v1.label, v2.label, param1, param2),
187
179
  editable,
188
180
  width: 120
@@ -17,9 +17,9 @@ const getEmployeeColumns = () => [{
17
17
  headerName: 'Avatar',
18
18
  generateData: _services.randomColor,
19
19
  renderCell: _renderer.renderAvatar,
20
- valueGetter: params => params.row.name == null || params.row.avatar == null ? null : {
21
- name: params.row.name,
22
- color: params.row.avatar
20
+ valueGetter: (value, row) => row.name == null || row.avatar == null ? null : {
21
+ name: row.name,
22
+ color: row.avatar
23
23
  },
24
24
  sortable: false,
25
25
  filterable: false,
@@ -83,9 +83,7 @@ const getEmployeeColumns = () => [{
83
83
  headerName: 'Country',
84
84
  type: 'singleSelect',
85
85
  valueOptions: _staticData.COUNTRY_ISO_OPTIONS_SORTED,
86
- valueFormatter: ({
87
- value
88
- }) => value?.label,
86
+ valueFormatter: value => value?.label,
89
87
  generateData: _services.randomCountry,
90
88
  renderCell: _renderer.renderCountry,
91
89
  renderEditCell: _renderer.renderEditCountry,
@@ -130,9 +128,7 @@ const getEmployeeColumns = () => [{
130
128
  headerName: 'Salary',
131
129
  generateData: () => (0, _services.randomInt)(30000, 80000),
132
130
  type: 'number',
133
- valueFormatter: ({
134
- value
135
- }) => {
131
+ valueFormatter: value => {
136
132
  if (!value || typeof value !== 'number') {
137
133
  return value;
138
134
  }
@@ -21,9 +21,7 @@ const COLUMNS = [{
21
21
  type: 'number',
22
22
  width: 150,
23
23
  groupable: false,
24
- valueFormatter: ({
25
- value
26
- }) => {
24
+ valueFormatter: value => {
27
25
  if (!value) {
28
26
  return '';
29
27
  }
@@ -13,15 +13,9 @@ var _useDemoData = require("./useDemoData");
13
13
  var _randomGenerator = require("../services/random-generator");
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ const apiRef = {};
16
17
  const simplifiedValueGetter = (field, colDef) => row => {
17
- const params = {
18
- id: row.id,
19
- row,
20
- field,
21
- rowNode: {}
22
- };
23
- // @ts-ignore
24
- return colDef.valueGetter?.(params) || row[field];
18
+ return colDef.valueGetter?.(row[row.id], row, colDef, apiRef) || row[field];
25
19
  };
26
20
  const getRowComparator = (sortModel, columnsWithDefaultColDef) => {
27
21
  if (!sortModel) {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v7.0.0-alpha.9
2
+ * @mui/x-data-grid-generator v7.0.0-beta.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "7.0.0-alpha.9",
3
+ "version": "7.0.0-beta.1",
4
4
  "description": "Generate fake data for demo purposes only.",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",
@@ -22,9 +22,9 @@
22
22
  "directory": "packages/grid/x-data-grid-generator"
23
23
  },
24
24
  "dependencies": {
25
- "@babel/runtime": "^7.23.8",
26
- "@mui/base": "^5.0.0-beta.32",
27
- "@mui/x-data-grid-premium": "7.0.0-alpha.9",
25
+ "@babel/runtime": "^7.23.9",
26
+ "@mui/base": "^5.0.0-beta.34",
27
+ "@mui/x-data-grid-premium": "7.0.0-beta.1",
28
28
  "chance": "^1.1.11",
29
29
  "clsx": "^2.1.0",
30
30
  "lru-cache": "^7.18.3"