@mui/x-data-grid-generator 9.4.0 → 9.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,256 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.6.0
4
+
5
+ _Jun 18, 2026_
6
+
7
+ We'd like to extend a big thank you to the 17 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - 📊 New features for the radial bar charts, like percentage min radius and disabling tick labels.
10
+
11
+ Special thanks go out to these community members for their valuable contributions:
12
+ @adamowski10, @Anexus5919, @Morteza-hp, @mustafajw07, @TargiX
13
+
14
+ The following team members contributed to this release:
15
+ @alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @hasdfa, @Janpot, @JCQuintas, @michelengelen, @noraleonte, @oliviertassinari, @rita-codes, @sai6855
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@9.6.0`
20
+
21
+ - [DataGrid] Define `overflowAnchor` style at the right element (#22849) @arminmeh
22
+ - [DataGrid] Fix scrollbars not showing up on scroll on iOS (#22832) @cherniavskii
23
+
24
+ #### `@mui/x-data-grid-pro@9.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
25
+
26
+ Same changes as in `@mui/x-data-grid@9.6.0`, plus:
27
+
28
+ - [DataGridPro] Prevent incorrect row range capping on the first page with known `rowCount` (#22808) @michelengelen
29
+
30
+ #### `@mui/x-data-grid-premium@9.6.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
31
+
32
+ Same changes as in `@mui/x-data-grid-pro@9.6.0`.
33
+
34
+ ### Date and Time Pickers
35
+
36
+ #### `@mui/x-date-pickers@9.6.0`
37
+
38
+ - [pickers] Fix `AdapterMomentHijri.getDaysInMonth` returning the Gregorian month length (#22774) @Anexus5919
39
+ - [l10n] Improve Persian (fa-IR) locale (#22454) @Morteza-hp
40
+
41
+ #### `@mui/x-date-pickers-pro@9.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
42
+
43
+ Same changes as in `@mui/x-date-pickers@9.6.0`.
44
+
45
+ ### Charts
46
+
47
+ #### `@mui/x-charts@9.6.0`
48
+
49
+ - [charts] Add `disableTickLabel` prop to radial axes (#22801) @JCQuintas
50
+ - [charts] Fix bug when `min` is in axis domain (#22827) @alexfauquette
51
+ - [charts] Fix wheel zoom not centering on cursor position (#22811) @JCQuintas
52
+ - [charts] Remove zoom gesture registration from community package (#22753) @sai6855
53
+ - [charts] Support percentage values for radial axis `minRadius`/`maxRadius` (#22803) @JCQuintas
54
+ - [charts] Support `unknownColor` in color scale (#22813) @alexfauquette
55
+ - [charts] Document click listener for scatter composition (#22809) @sai6855
56
+
57
+ #### `@mui/x-charts-pro@9.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
58
+
59
+ Same changes as in `@mui/x-charts@9.6.0`.
60
+
61
+ #### `@mui/x-charts-premium@9.6.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
62
+
63
+ Same changes as in `@mui/x-charts-pro@9.6.0`, plus:
64
+
65
+ - [charts-premium] Add `geoFeatureKey` to transform features identifier (#22848) @alexfauquette
66
+ - [charts-premium] Allow to remove Antartica (#22815) @alexfauquette
67
+ - [charts-premium] Regenerate `ScatterPlotPremium` `propTypes` (#22829) @rita-codes
68
+ - [charts-premium] Support maps tooltip positioned on items (#22648) @alexfauquette
69
+ - [docs] Show how to export maps (#22837) @alexfauquette
70
+
71
+
72
+ ### Tree View
73
+
74
+ #### `@mui/x-tree-view@9.6.0`
75
+
76
+ Internal changes.
77
+
78
+ #### `@mui/x-tree-view-pro@9.6.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
79
+
80
+ Same changes as in `@mui/x-tree-view@9.6.0`.
81
+
82
+ ### Scheduler
83
+
84
+ #### `@mui/x-scheduler@9.0.0-beta.2`
85
+
86
+ - [scheduler] Add dispose lifecycle to `SchedulerLazyLoadingPlugin` (#22532) @rita-codes
87
+ - [scheduler] Add responsive mobile week view and responsive typography (#22593) @noraleonte
88
+ - [scheduler] Add stable weekday token to `recurrenceWeeklyPresetLabel` (#22733) @mustafajw07
89
+ - [scheduler] Create accessibility documentation section (#22557) @mustafajw07
90
+ - [scheduler] Decouple `MonthViewProps` from day time grid props (#22802) @mustafajw07
91
+ - [scheduler] Export missing public scheduler types (#22785) @mustafajw07
92
+ - [scheduler] Fix JSDoc defaults and improve public type readability (#22784) @mustafajw07
93
+ - [scheduler] Fix `aria-labelledby` on events referencing non-existent header IDs (#22778) @rita-codes
94
+ - [scheduler] Move `EventCalendarStyledContext` to internals (#22787) @mustafajw07
95
+ - [scheduler] Normalize all-day recurring occurrences to whole days (#22792) @Anexus5919
96
+ - [scheduler] Recalculate `DayTimeGrid` `hasScroll` on container resize (#22780) @Anexus5919
97
+ - [scheduler] Recompute `nowUpdatedEveryMinute` only on timezone change (#22793) @Anexus5919
98
+ - [scheduler] Register auto-scroll once instead of on every render (#22794) @Anexus5919
99
+ - [scheduler] Remove duplicate dividers in the day/time grid (#22795) @Anexus5919
100
+ - [scheduler] Remove unused `--has-scroll` CSS variable from `DayTimeGrid` (#22799) @Anexus5919
101
+ - [scheduler] Remove vestigial async from internal drop handler (#22781) @mustafajw07
102
+ - [scheduler] Return a primitive key from the Calendar lazy-loading selector (#22791) @Anexus5919
103
+ - [scheduler] Throw on invalid event dates instead of emitting `NaN` timestamps (#22740) @rita-codes
104
+ - [scheduler] Tighten `StandaloneEventProps` data typing (#22796) @mustafajw07
105
+ - [scheduler] Update feedback banner to say beta instead of alpha (#22804) @rita-codes
106
+ - [scheduler] Use `@base-ui` `generateId` for event ids in `createEventModel` (#22788) @rita-codes
107
+ - [scheduler] Clear clipboard after pasting a cut event (#22773) @Anexus5919
108
+ - [scheduler] Show drag placeholder when re-entering the same position (#22775) @Anexus5919
109
+ - [scheduler] Validate missing and duplicate event ids (#22790) @Anexus5919
110
+ - [l10n] Improve Polish (pl-PL) locale (#22612) @adamowski10
111
+
112
+ #### `@mui/x-scheduler-premium@9.0.0-beta.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
113
+
114
+ Same changes as in `@mui/x-scheduler@9.0.0-beta.2`, plus:
115
+
116
+ - [scheduler-premium] Expose premium model types through public API (#22798) @mustafajw07
117
+ - [scheduler-premium] Remove non-functional `onPreferencesChange` prop from `EventTimelinePremium` (#22777) @rita-codes
118
+ - [scheduler-premium] Validate the `FREQ` value in `parseRRule`] (#22786) @rita-codes
119
+
120
+ ### Codemod
121
+
122
+ #### `@mui/x-codemod@9.6.0`
123
+
124
+ Internal changes.
125
+
126
+ ### Docs
127
+
128
+ - [docs] Fix link-check build timeout by disabling serve directory listing (#22836) @Janpot
129
+ - [docs] Show how to export maps (#22837) @alexfauquette
130
+ - [docs] Add radial bar overview demo with custom overlays (#22776) @JCQuintas
131
+ - [docs] Add weather composition demo (#22723) @TargiX
132
+ - [docs] Add docs overview gallery and playground (#22488) @hasdfa
133
+ - [docs] Clarify 'Scrolling without render gaps' (#22629) @oliviertassinari
134
+ - [docs] Fix typo in release instructions (#22864) @brijeshb42
135
+
136
+ ### Core
137
+
138
+ - [code-infra] Fix lint issues (#22757) @brijeshb42
139
+ - [code-infra] Fix remaining Dependabot security alerts (#22761) @Janpot
140
+ - [code-infra] Remove release:build from docs:build script (#22852) @brijeshb42
141
+ - [code-infra] Unpin `@mui/utils` version to allow dedupe (#22828) @mustafajw07
142
+ - [docs-infra] Cap Netlify Next.js build parallelism to avoid OOM (#22847) @Janpot
143
+ - [docs-infra] Remove i18n codebase (#22591) @brijeshb42
144
+ - [internal] Fix failing React 18 unit tests (#22846) @brijeshb42
145
+
146
+ ### Miscellaneous
147
+
148
+ - [core] Add remove-proptypes markers to generated `propTypes` (#22850) @JCQuintas
149
+ - [core] Bump vitest packages to 4.1.8 to fix browser-test version skew (#22845) @Janpot
150
+ - [core] Reduce e2e build concurrency to avoid OOM (#22843) @Janpot
151
+ - [core] Strip proptypes from Production bundles (#22750) @sai6855
152
+ - [test] Wait for `GridToolbarCustom` rows before screenshot (#22844) @Janpot
153
+
154
+ ## 9.5.0
155
+
156
+ _Jun 11, 2026_
157
+
158
+ We'd like to extend a big thank you to the 9 contributors who made this release possible. Here are some highlights ✨:
159
+
160
+ - 🎁 New [`multiSelect` column type for Data Grid Pro](https://mui.com/x/react-data-grid/column-definition/#MultiSelectColumn)
161
+ - 🚀 New [renderer="svg-progressive"](https://mui.com/x/react-charts/scatter/#progressive-renderer) paints scatter points in batched frames so large datasets render smoothly without blocking the main thread.
162
+ - 🐞 Bugfixes
163
+ - 📚 Documentation improvements
164
+
165
+ Special thanks go out to community members @mustafajw07 and @Anexus5919 for their valuable contribution.
166
+
167
+ The following team members contributed to this release:
168
+ @alexfauquette, @JCQuintas, @rita-codes, @rluzists1, @sai6855, @siriwatknp, @arminmeh, @brijeshb42
169
+
170
+ ### Data Grid
171
+
172
+ #### `@mui/x-data-grid@9.5.0`
173
+
174
+ - [DataGrid] Restrict warning messages to non-production environments in various components (#22461) @sai6855
175
+ - [DataGrid] Prevent React state update before mount (#22374) @arminmeh
176
+
177
+ #### `@mui/x-data-grid-pro@9.5.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
178
+
179
+ Same changes as in `@mui/x-data-grid@9.5.0`, plus:
180
+
181
+ - [DataGridPro] Add new `multiSelect` column type (#21157) @siriwatknp
182
+
183
+ #### `@mui/x-data-grid-premium@9.5.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
184
+
185
+ Same changes as in `@mui/x-data-grid-pro@9.5.0`.
186
+
187
+ ### Date and Time Pickers
188
+
189
+ #### `@mui/x-date-pickers@9.5.0`
190
+
191
+ - [pickers] Fix missing export of `th-TH` (#22703) @alexfauquette
192
+
193
+ #### `@mui/x-date-pickers-pro@9.5.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
194
+
195
+ Same changes as in `@mui/x-date-pickers@9.5.0`.
196
+
197
+ ### Charts
198
+
199
+ #### `@mui/x-charts@9.5.0`
200
+
201
+ - [charts] Add `FocusedBar` component to `BarScatterComposition` demo (#22704) @sai6855
202
+ - [charts] Add dedicated Bubble Chart documentation page (#22688) @mustafajw07
203
+ - [charts] Add progressive scatter renderer (#22518) @JCQuintas
204
+ - [charts] Avoid full axis pipeline rebuild on resize (#22695) @JCQuintas
205
+ - [charts] Document focus indicator in composition page (#22712) @JCQuintas
206
+ - [charts] Fix `ChartsTooltip` `container` and `disablePortal` props being ignored (#22690) @JCQuintas
207
+ - [charts] Make ordinal scales O(1) to copy and re-range (#22691) @JCQuintas
208
+ - [charts] Stabilize WebGL bar rendering at sub-pixel widths (#22678) @JCQuintas
209
+ - [charts] Use the series config to define value types (#22693) @sai6855
210
+ - [charts] Decouple interaction hook from the cartesian zoom (#22708) @alexfauquette
211
+
212
+ #### `@mui/x-charts-pro@9.5.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
213
+
214
+ Same changes as in `@mui/x-charts@9.5.0`, plus:
215
+
216
+ - [charts-pro] Add missing focus highlight (#22689) @alexfauquette
217
+
218
+ #### `@mui/x-charts-premium@9.5.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
219
+
220
+ Same changes as in `@mui/x-charts-pro@9.5.0`, plus:
221
+
222
+ - [charts-premium] Set `Heatmap` WebGL render as stable (#22665) @alexfauquette
223
+ - [charts-premium] Stabilize candlestick charts (#22666) @alexfauquette
224
+ - [charts-premium] Stabilize the radial charts (#22655) @alexfauquette
225
+
226
+ ### Scheduler
227
+
228
+ #### `@mui/x-scheduler@9.0.0-beta.1`
229
+
230
+ Internal changes.
231
+
232
+ #### `@mui/x-scheduler-premium@9.0.0-beta.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
233
+
234
+ Same changes as in `@mui/x-scheduler@9.0.0-beta.1`, plus:
235
+
236
+ - [scheduler] Remove dead CSS variable writes in `EventTimelinePremiumContent` (#22720) @rita-codes
237
+ - [scheduler] Show scope dialog when deleting a recurring event (#22552) @Anexus5919
238
+
239
+ ### Core
240
+
241
+ - [docs-infra] Fix immutable cache headers for `/\_next/static` assets (#22747) @brijeshb42
242
+ - [docs-infra] Prefix `/\_next/static` cache header rule with `/x` basePath (#22748) @brijeshb42
243
+ - [code-infra] Update dependencies to resolve Dependabot security alerts (#22714) @Janpot
244
+
245
+ ### Docs
246
+
247
+ - [docs] Fix broken links checker crashing on 404 known-targets fetch (#22707) @sai6855
248
+ - [docs] Fix country data (#22716) @alexfauquette
249
+
250
+ ### Miscellaneous
251
+
252
+ - [legal] Update EULA links in docs (#22717) @rluzists1
253
+
3
254
  ## 9.4.0
4
255
 
5
256
  <!-- generated comparing v9.3.0..master -->
@@ -23,6 +23,14 @@ const getCommodityColumns = (editable = false) => [{
23
23
  generateData: _services.randomCommodity,
24
24
  width: 180,
25
25
  editable
26
+ }, {
27
+ field: 'tags',
28
+ headerName: 'Tags',
29
+ generateData: _services.randomTradeTags,
30
+ type: 'multiSelect',
31
+ valueOptions: _staticData.TRADE_TAG_OPTIONS,
32
+ width: 220,
33
+ editable
26
34
  }, {
27
35
  field: 'traderName',
28
36
  headerName: 'Trader Name',
@@ -238,5 +246,13 @@ const getCommodityColumns = (editable = false) => [{
238
246
  type: 'date',
239
247
  width: 150,
240
248
  editable
249
+ }, {
250
+ field: 'certifications',
251
+ headerName: 'Certifications',
252
+ generateData: _services.randomCertifications,
253
+ type: 'multiSelect',
254
+ valueOptions: _staticData.CERTIFICATION_OPTIONS,
255
+ width: 200,
256
+ editable
241
257
  }];
242
258
  exports.getCommodityColumns = getCommodityColumns;
@@ -1,7 +1,7 @@
1
1
  import { gridStringOrNumberComparator } from '@mui/x-data-grid-premium';
2
- import { randomCommodity, randomDesk, randomEmail, randomFeeRate, generateFilledQuantity, randomId, randomIncoterm, generateIsFilled, randomQuantity, randomTraderName, randomUnitPrice, randomUnitPriceCurrency, randomStatusOptions, randomPnL, randomTradeDate, randomMaturityDate, randomBrokerId, randomCompanyName, randomCountry, randomCurrency, randomAddress, randomCity, randomUpdatedDate, randomCreatedDate, randomRateType, randomContractType, randomTaxCode } from "../services/index.mjs";
2
+ import { randomCommodity, randomDesk, randomEmail, randomFeeRate, generateFilledQuantity, randomId, randomIncoterm, generateIsFilled, randomQuantity, randomTraderName, randomUnitPrice, randomUnitPriceCurrency, randomStatusOptions, randomPnL, randomTradeDate, randomMaturityDate, randomBrokerId, randomCompanyName, randomCountry, randomCurrency, randomAddress, randomCity, randomUpdatedDate, randomCreatedDate, randomRateType, randomContractType, randomTaxCode, randomTradeTags, randomCertifications } from "../services/index.mjs";
3
3
  import { renderCountry, renderEmail, renderIncoterm, renderPnl, renderProgress, renderStatus, renderTotalPrice, renderEditCurrency, renderEditProgress, renderEditStatus, renderEditIncoterm, renderEditBoolean, renderEditCountry } from "../renderer/index.mjs";
4
- import { CONTRACT_TYPE_OPTIONS, COUNTRY_ISO_OPTIONS_SORTED, CURRENCY_OPTIONS, INCOTERM_OPTIONS, RATE_TYPE_OPTIONS, STATUS_OPTIONS, TAXCODE_OPTIONS } from "../services/static-data.mjs";
4
+ import { CONTRACT_TYPE_OPTIONS, COUNTRY_ISO_OPTIONS_SORTED, CURRENCY_OPTIONS, INCOTERM_OPTIONS, RATE_TYPE_OPTIONS, STATUS_OPTIONS, TAXCODE_OPTIONS, TRADE_TAG_OPTIONS, CERTIFICATION_OPTIONS } from "../services/static-data.mjs";
5
5
  export const getCommodityColumns = (editable = false) => [{
6
6
  field: 'id',
7
7
  generateData: randomId,
@@ -17,6 +17,14 @@ export const getCommodityColumns = (editable = false) => [{
17
17
  generateData: randomCommodity,
18
18
  width: 180,
19
19
  editable
20
+ }, {
21
+ field: 'tags',
22
+ headerName: 'Tags',
23
+ generateData: randomTradeTags,
24
+ type: 'multiSelect',
25
+ valueOptions: TRADE_TAG_OPTIONS,
26
+ width: 220,
27
+ editable
20
28
  }, {
21
29
  field: 'traderName',
22
30
  headerName: 'Trader Name',
@@ -232,4 +240,12 @@ export const getCommodityColumns = (editable = false) => [{
232
240
  type: 'date',
233
241
  width: 150,
234
242
  editable
243
+ }, {
244
+ field: 'certifications',
245
+ headerName: 'Certifications',
246
+ generateData: randomCertifications,
247
+ type: 'multiSelect',
248
+ valueOptions: CERTIFICATION_OPTIONS,
249
+ width: 200,
250
+ editable
235
251
  }];
@@ -207,12 +207,11 @@ const applyAggregation = (aggregationModel, colDefs, rows, groupId = 'root') =>
207
207
  return aggregateValues;
208
208
  };
209
209
  const generateParentRows = pathsToAutogenerate => {
210
- return Array.from(pathsToAutogenerate).map(path => {
211
- const pathArray = path.split(',');
210
+ return Array.from(pathsToAutogenerate).map(pathArray => {
212
211
  return {
213
212
  id: `auto-generated-parent-${pathArray.join('-')}`,
214
- path: pathArray.slice(0, pathArray.length),
215
- group: pathArray.slice(-1)[0]
213
+ path: pathArray.slice(),
214
+ group: pathArray[pathArray.length - 1]
216
215
  };
217
216
  });
218
217
  };
@@ -488,7 +487,7 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
488
487
  throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X: serverOptions.groupFields must be defined to compute row grouping data' : (0, _formatErrorMessage2.default)(103));
489
488
  }
490
489
  const delay = (0, _randomGenerator.randomInt)(minDelay, maxDelay);
491
- const pathsToAutogenerate = new Set();
490
+ const pathsToAutogenerate = new Map();
492
491
  let rowsWithPaths = rows;
493
492
  const rowsWithMissingGroups = [];
494
493
 
@@ -500,13 +499,22 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
500
499
  const colDef = columnsWithDefaultColDef.find(({
501
500
  field: f
502
501
  }) => f === field);
502
+ const rawValue = row[field];
503
+ // multiSelect (array) grouping: empty → missing group, non-empty → sorted-joined
504
+ // key so `['A','B']` and `['B','A']` collapse to one group (matches client).
505
+ if (Array.isArray(rawValue)) {
506
+ if (rawValue.length === 0) {
507
+ return undefined;
508
+ }
509
+ return [...rawValue].sort().join(',');
510
+ }
503
511
  if (colDef?.groupingValueGetter) {
504
- return String(colDef.groupingValueGetter(row[field], row, colDef, apiRef));
512
+ return String(colDef.groupingValueGetter(rawValue, row, colDef, apiRef));
505
513
  }
506
514
  if (colDef?.valueGetter) {
507
- return String(colDef.valueGetter(row[field], row, colDef, apiRef));
515
+ return String(colDef.valueGetter(rawValue, row, colDef, apiRef));
508
516
  }
509
- return String(row[field]);
517
+ return String(rawValue);
510
518
  });
511
519
  for (let index = 0; index < partialPath.length; index += 1) {
512
520
  const value = partialPath[index];
@@ -519,9 +527,9 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
519
527
  return acc;
520
528
  }
521
529
  const parentPath = partialPath.slice(0, index + 1);
522
- const strigifiedPath = parentPath.join(',');
523
- if (!pathsToAutogenerate.has(strigifiedPath)) {
524
- pathsToAutogenerate.add(strigifiedPath);
530
+ const key = JSON.stringify(parentPath);
531
+ if (!pathsToAutogenerate.has(key)) {
532
+ pathsToAutogenerate.set(key, parentPath);
525
533
  }
526
534
  }
527
535
  acc.push((0, _extends2.default)({}, row, {
@@ -534,7 +542,7 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
534
542
  path: ['']
535
543
  }));
536
544
  }
537
- const autogeneratedRows = generateParentRows(pathsToAutogenerate);
545
+ const autogeneratedRows = generateParentRows(pathsToAutogenerate.values());
538
546
 
539
547
  // apply plain filtering
540
548
  const filteredRows = getTreeDataFilteredRows([...autogeneratedRows, ...rowsWithPaths, ...rowsWithMissingGroups], queryOptions.filterModel, columnsWithDefaultColDef);
@@ -742,7 +750,7 @@ const processPivotingRows = (rows, queryOptions, serverOptions, columnsWithDefau
742
750
  const pivotColumnKeys = Array.from(uniqueColumnGroups.keys());
743
751
 
744
752
  // Add paths and generate parent rows based on `visibleRows` (pivot row fields)
745
- const pathsToAutogenerate = new Set();
753
+ const pathsToAutogenerate = new Map();
746
754
  let rowsWithPaths = filteredRows;
747
755
  const rowsWithMissingGroups = [];
748
756
  if (visibleRows.length > 0) {
@@ -769,9 +777,9 @@ const processPivotingRows = (rows, queryOptions, serverOptions, columnsWithDefau
769
777
  return acc;
770
778
  }
771
779
  const parentPath = partialPath.slice(0, index + 1);
772
- const stringifiedPath = parentPath.join(',');
773
- if (!pathsToAutogenerate.has(stringifiedPath)) {
774
- pathsToAutogenerate.add(stringifiedPath);
780
+ const key = JSON.stringify(parentPath);
781
+ if (!pathsToAutogenerate.has(key)) {
782
+ pathsToAutogenerate.set(key, parentPath);
775
783
  }
776
784
  }
777
785
  acc.push((0, _extends2.default)({}, row, {
@@ -784,7 +792,7 @@ const processPivotingRows = (rows, queryOptions, serverOptions, columnsWithDefau
784
792
  path: ['']
785
793
  }));
786
794
  }
787
- const autogeneratedRows = generateParentRows(pathsToAutogenerate);
795
+ const autogeneratedRows = generateParentRows(pathsToAutogenerate.values());
788
796
 
789
797
  // Apply tree data filtering to include missing parents and children
790
798
  const filteredRowsWithGroups = getTreeDataFilteredRows([...autogeneratedRows, ...rowsWithPaths, ...rowsWithMissingGroups], queryOptions.filterModel, columnsWithDefaultColDef);
@@ -200,12 +200,11 @@ const applyAggregation = (aggregationModel, colDefs, rows, groupId = 'root') =>
200
200
  return aggregateValues;
201
201
  };
202
202
  const generateParentRows = pathsToAutogenerate => {
203
- return Array.from(pathsToAutogenerate).map(path => {
204
- const pathArray = path.split(',');
203
+ return Array.from(pathsToAutogenerate).map(pathArray => {
205
204
  return {
206
205
  id: `auto-generated-parent-${pathArray.join('-')}`,
207
- path: pathArray.slice(0, pathArray.length),
208
- group: pathArray.slice(-1)[0]
206
+ path: pathArray.slice(),
207
+ group: pathArray[pathArray.length - 1]
209
208
  };
210
209
  });
211
210
  };
@@ -479,7 +478,7 @@ export const processRowGroupingRows = (rows, queryOptions, serverOptions, column
479
478
  throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X: serverOptions.groupFields must be defined to compute row grouping data' : _formatErrorMessage(103));
480
479
  }
481
480
  const delay = randomInt(minDelay, maxDelay);
482
- const pathsToAutogenerate = new Set();
481
+ const pathsToAutogenerate = new Map();
483
482
  let rowsWithPaths = rows;
484
483
  const rowsWithMissingGroups = [];
485
484
 
@@ -491,13 +490,22 @@ export const processRowGroupingRows = (rows, queryOptions, serverOptions, column
491
490
  const colDef = columnsWithDefaultColDef.find(({
492
491
  field: f
493
492
  }) => f === field);
493
+ const rawValue = row[field];
494
+ // multiSelect (array) grouping: empty → missing group, non-empty → sorted-joined
495
+ // key so `['A','B']` and `['B','A']` collapse to one group (matches client).
496
+ if (Array.isArray(rawValue)) {
497
+ if (rawValue.length === 0) {
498
+ return undefined;
499
+ }
500
+ return [...rawValue].sort().join(',');
501
+ }
494
502
  if (colDef?.groupingValueGetter) {
495
- return String(colDef.groupingValueGetter(row[field], row, colDef, apiRef));
503
+ return String(colDef.groupingValueGetter(rawValue, row, colDef, apiRef));
496
504
  }
497
505
  if (colDef?.valueGetter) {
498
- return String(colDef.valueGetter(row[field], row, colDef, apiRef));
506
+ return String(colDef.valueGetter(rawValue, row, colDef, apiRef));
499
507
  }
500
- return String(row[field]);
508
+ return String(rawValue);
501
509
  });
502
510
  for (let index = 0; index < partialPath.length; index += 1) {
503
511
  const value = partialPath[index];
@@ -510,9 +518,9 @@ export const processRowGroupingRows = (rows, queryOptions, serverOptions, column
510
518
  return acc;
511
519
  }
512
520
  const parentPath = partialPath.slice(0, index + 1);
513
- const strigifiedPath = parentPath.join(',');
514
- if (!pathsToAutogenerate.has(strigifiedPath)) {
515
- pathsToAutogenerate.add(strigifiedPath);
521
+ const key = JSON.stringify(parentPath);
522
+ if (!pathsToAutogenerate.has(key)) {
523
+ pathsToAutogenerate.set(key, parentPath);
516
524
  }
517
525
  }
518
526
  acc.push(_extends({}, row, {
@@ -525,7 +533,7 @@ export const processRowGroupingRows = (rows, queryOptions, serverOptions, column
525
533
  path: ['']
526
534
  }));
527
535
  }
528
- const autogeneratedRows = generateParentRows(pathsToAutogenerate);
536
+ const autogeneratedRows = generateParentRows(pathsToAutogenerate.values());
529
537
 
530
538
  // apply plain filtering
531
539
  const filteredRows = getTreeDataFilteredRows([...autogeneratedRows, ...rowsWithPaths, ...rowsWithMissingGroups], queryOptions.filterModel, columnsWithDefaultColDef);
@@ -732,7 +740,7 @@ export const processPivotingRows = (rows, queryOptions, serverOptions, columnsWi
732
740
  const pivotColumnKeys = Array.from(uniqueColumnGroups.keys());
733
741
 
734
742
  // Add paths and generate parent rows based on `visibleRows` (pivot row fields)
735
- const pathsToAutogenerate = new Set();
743
+ const pathsToAutogenerate = new Map();
736
744
  let rowsWithPaths = filteredRows;
737
745
  const rowsWithMissingGroups = [];
738
746
  if (visibleRows.length > 0) {
@@ -759,9 +767,9 @@ export const processPivotingRows = (rows, queryOptions, serverOptions, columnsWi
759
767
  return acc;
760
768
  }
761
769
  const parentPath = partialPath.slice(0, index + 1);
762
- const stringifiedPath = parentPath.join(',');
763
- if (!pathsToAutogenerate.has(stringifiedPath)) {
764
- pathsToAutogenerate.add(stringifiedPath);
770
+ const key = JSON.stringify(parentPath);
771
+ if (!pathsToAutogenerate.has(key)) {
772
+ pathsToAutogenerate.set(key, parentPath);
765
773
  }
766
774
  }
767
775
  acc.push(_extends({}, row, {
@@ -774,7 +782,7 @@ export const processPivotingRows = (rows, queryOptions, serverOptions, columnsWi
774
782
  path: ['']
775
783
  }));
776
784
  }
777
- const autogeneratedRows = generateParentRows(pathsToAutogenerate);
785
+ const autogeneratedRows = generateParentRows(pathsToAutogenerate.values());
778
786
 
779
787
  // Apply tree data filtering to include missing parents and children
780
788
  const filteredRowsWithGroups = getTreeDataFilteredRows([...autogeneratedRows, ...rowsWithPaths, ...rowsWithMissingGroups], queryOptions.filterModel, columnsWithDefaultColDef);
@@ -15,11 +15,12 @@ export interface UseDemoDataOptions {
15
15
  maxColumns?: number;
16
16
  visibleFields?: string[];
17
17
  editable?: boolean;
18
+ multiSelect?: boolean;
18
19
  treeData?: AddPathToDemoDataOptions;
19
20
  }
20
21
  export declare function extrapolateSeed(rowLength: number, data: GridDemoData): Promise<GridDemoData>;
21
22
  export declare const deepFreeze: <T>(object: T) => T;
22
- export interface ColumnsOptions extends Pick<UseDemoDataOptions, 'dataSet' | 'editable' | 'maxColumns' | 'visibleFields'> {}
23
+ export interface ColumnsOptions extends Pick<UseDemoDataOptions, 'dataSet' | 'editable' | 'maxColumns' | 'visibleFields' | 'multiSelect'> {}
23
24
  export declare const getColumnsFromOptions: (options: ColumnsOptions) => GridColDefGenerator[];
24
25
  export declare const getInitialState: (options: UseDemoDataOptions, columns: GridColDefGenerator[]) => {
25
26
  columns: {
@@ -15,11 +15,12 @@ export interface UseDemoDataOptions {
15
15
  maxColumns?: number;
16
16
  visibleFields?: string[];
17
17
  editable?: boolean;
18
+ multiSelect?: boolean;
18
19
  treeData?: AddPathToDemoDataOptions;
19
20
  }
20
21
  export declare function extrapolateSeed(rowLength: number, data: GridDemoData): Promise<GridDemoData>;
21
22
  export declare const deepFreeze: <T>(object: T) => T;
22
- export interface ColumnsOptions extends Pick<UseDemoDataOptions, 'dataSet' | 'editable' | 'maxColumns' | 'visibleFields'> {}
23
+ export interface ColumnsOptions extends Pick<UseDemoDataOptions, 'dataSet' | 'editable' | 'maxColumns' | 'visibleFields' | 'multiSelect'> {}
23
24
  export declare const getColumnsFromOptions: (options: ColumnsOptions) => GridColDefGenerator[];
24
25
  export declare const getInitialState: (options: UseDemoDataOptions, columns: GridColDefGenerator[]) => {
25
26
  columns: {
@@ -70,6 +70,9 @@ const deepFreeze = object => {
70
70
  exports.deepFreeze = deepFreeze;
71
71
  const getColumnsFromOptions = options => {
72
72
  let columns = options.dataSet === 'Commodity' ? (0, _commodities.getCommodityColumns)(options.editable) : (0, _employees.getEmployeeColumns)();
73
+ if (!options.multiSelect) {
74
+ columns = columns.filter(col => col.type !== 'multiSelect');
75
+ }
73
76
  if (options.visibleFields) {
74
77
  columns = columns.map(col => (0, _extends2.default)({}, col, {
75
78
  hide: !options.visibleFields?.includes(col.field)
@@ -108,9 +111,10 @@ const useDemoData = options => {
108
111
  dataSet: options.dataSet,
109
112
  editable: options.editable,
110
113
  maxColumns: options.maxColumns,
111
- visibleFields: options.visibleFields
114
+ visibleFields: options.visibleFields,
115
+ multiSelect: options.multiSelect
112
116
  });
113
- }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields]);
117
+ }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields, options.multiSelect]);
114
118
  const [data, setData] = React.useState(() => {
115
119
  return (0, _treeDataGenerator.addTreeDataOptionsToDemoData)({
116
120
  columns,
@@ -120,7 +124,7 @@ const useDemoData = options => {
120
124
  });
121
125
  React.useEffect(() => {
122
126
  const treeDataKey = (options.treeData?.maxDepth ?? 1) > 1 ? `${options.treeData?.maxDepth}-${options.treeData?.averageChildren ?? 2}-${options.treeData?.groupingField ?? ''}` : 'false';
123
- const cacheKey = `${options.dataSet}-${rowLength}-${index}-${options.maxColumns}-treeData:${treeDataKey}`;
127
+ const cacheKey = `${options.dataSet}-${rowLength}-${index}-${options.maxColumns}-multiSelect:${options.multiSelect ? 'true' : 'false'}-treeData:${treeDataKey}`;
124
128
 
125
129
  // Cache to allow fast switch between the JavaScript and TypeScript version
126
130
  // of the demos.
@@ -160,7 +164,7 @@ const useDemoData = options => {
160
164
  return () => {
161
165
  active = false;
162
166
  };
163
- }, [rowLength, options.dataSet, options.maxColumns, options.treeData?.maxDepth, options.treeData?.groupingField, options.treeData?.averageChildren, index, columns]);
167
+ }, [rowLength, options.dataSet, options.maxColumns, options.treeData?.maxDepth, options.treeData?.groupingField, options.treeData?.averageChildren, options.multiSelect, index, columns]);
164
168
  return {
165
169
  data,
166
170
  loading,
@@ -60,6 +60,9 @@ export const deepFreeze = object => {
60
60
  };
61
61
  export const getColumnsFromOptions = options => {
62
62
  let columns = options.dataSet === 'Commodity' ? getCommodityColumns(options.editable) : getEmployeeColumns();
63
+ if (!options.multiSelect) {
64
+ columns = columns.filter(col => col.type !== 'multiSelect');
65
+ }
63
66
  if (options.visibleFields) {
64
67
  columns = columns.map(col => _extends({}, col, {
65
68
  hide: !options.visibleFields?.includes(col.field)
@@ -96,9 +99,10 @@ export const useDemoData = options => {
96
99
  dataSet: options.dataSet,
97
100
  editable: options.editable,
98
101
  maxColumns: options.maxColumns,
99
- visibleFields: options.visibleFields
102
+ visibleFields: options.visibleFields,
103
+ multiSelect: options.multiSelect
100
104
  });
101
- }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields]);
105
+ }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields, options.multiSelect]);
102
106
  const [data, setData] = React.useState(() => {
103
107
  return addTreeDataOptionsToDemoData({
104
108
  columns,
@@ -108,7 +112,7 @@ export const useDemoData = options => {
108
112
  });
109
113
  React.useEffect(() => {
110
114
  const treeDataKey = (options.treeData?.maxDepth ?? 1) > 1 ? `${options.treeData?.maxDepth}-${options.treeData?.averageChildren ?? 2}-${options.treeData?.groupingField ?? ''}` : 'false';
111
- const cacheKey = `${options.dataSet}-${rowLength}-${index}-${options.maxColumns}-treeData:${treeDataKey}`;
115
+ const cacheKey = `${options.dataSet}-${rowLength}-${index}-${options.maxColumns}-multiSelect:${options.multiSelect ? 'true' : 'false'}-treeData:${treeDataKey}`;
112
116
 
113
117
  // Cache to allow fast switch between the JavaScript and TypeScript version
114
118
  // of the demos.
@@ -148,7 +152,7 @@ export const useDemoData = options => {
148
152
  return () => {
149
153
  active = false;
150
154
  };
151
- }, [rowLength, options.dataSet, options.maxColumns, options.treeData?.maxDepth, options.treeData?.groupingField, options.treeData?.averageChildren, index, columns]);
155
+ }, [rowLength, options.dataSet, options.maxColumns, options.treeData?.maxDepth, options.treeData?.groupingField, options.treeData?.averageChildren, options.multiSelect, index, columns]);
152
156
  return {
153
157
  data,
154
158
  loading,
@@ -22,6 +22,7 @@ interface UseMockServerOptions {
22
22
  maxColumns?: number;
23
23
  visibleFields?: string[];
24
24
  editable?: boolean;
25
+ multiSelect?: boolean;
25
26
  treeData?: AddPathToDemoDataOptions;
26
27
  derivedColumns?: boolean;
27
28
  }
@@ -22,6 +22,7 @@ interface UseMockServerOptions {
22
22
  maxColumns?: number;
23
23
  visibleFields?: string[];
24
24
  editable?: boolean;
25
+ multiSelect?: boolean;
25
26
  treeData?: AddPathToDemoDataOptions;
26
27
  derivedColumns?: boolean;
27
28
  }
@@ -45,6 +45,9 @@ const getColumnsFromOptions = options => {
45
45
  default:
46
46
  throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X: Unknown dataset' : (0, _formatErrorMessage2.default)(106));
47
47
  }
48
+ if (!options.multiSelect) {
49
+ columns = columns.filter(col => col.type !== 'multiSelect');
50
+ }
48
51
  if (options.visibleFields) {
49
52
  columns = columns.map(col => (0, _extends2.default)({}, col, {
50
53
  hide: !options.visibleFields?.includes(col.field)
@@ -133,9 +136,10 @@ const useMockServer = (dataSetOptions, serverOptions, shouldRequestsFail, nested
133
136
  editable: options.editable,
134
137
  maxColumns: options.maxColumns,
135
138
  visibleFields: options.visibleFields,
136
- derivedColumns: options.derivedColumns
139
+ derivedColumns: options.derivedColumns,
140
+ multiSelect: options.multiSelect
137
141
  });
138
- }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields, options.derivedColumns]);
142
+ }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields, options.derivedColumns, options.multiSelect]);
139
143
  const initialState = React.useMemo(() => getInitialState(columns, options.treeData?.groupingField), [columns, options.treeData?.groupingField]);
140
144
  const columnsWithDerivedColDef = React.useMemo(() => columns.map(column => (0, _extends2.default)({}, defaultColDef[column.type || 'string'], column)), [columns]);
141
145
  const columnsWithDefaultColDef = React.useMemo(() => columnsWithDerivedColDef.filter(column => !column.derivedFrom), [columnsWithDerivedColDef]);
@@ -38,6 +38,9 @@ const getColumnsFromOptions = options => {
38
38
  default:
39
39
  throw new Error(process.env.NODE_ENV !== "production" ? 'MUI X: Unknown dataset' : _formatErrorMessage(106));
40
40
  }
41
+ if (!options.multiSelect) {
42
+ columns = columns.filter(col => col.type !== 'multiSelect');
43
+ }
41
44
  if (options.visibleFields) {
42
45
  columns = columns.map(col => _extends({}, col, {
43
46
  hide: !options.visibleFields?.includes(col.field)
@@ -126,9 +129,10 @@ export const useMockServer = (dataSetOptions, serverOptions, shouldRequestsFail,
126
129
  editable: options.editable,
127
130
  maxColumns: options.maxColumns,
128
131
  visibleFields: options.visibleFields,
129
- derivedColumns: options.derivedColumns
132
+ derivedColumns: options.derivedColumns,
133
+ multiSelect: options.multiSelect
130
134
  });
131
- }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields, options.derivedColumns]);
135
+ }, [options.dataSet, options.editable, options.maxColumns, options.visibleFields, options.derivedColumns, options.multiSelect]);
132
136
  const initialState = React.useMemo(() => getInitialState(columns, options.treeData?.groupingField), [columns, options.treeData?.groupingField]);
133
137
  const columnsWithDerivedColDef = React.useMemo(() => columns.map(column => _extends({}, defaultColDef[column.type || 'string'], column)), [columns]);
134
138
  const columnsWithDefaultColDef = React.useMemo(() => columnsWithDerivedColDef.filter(column => !column.derivedFrom), [columnsWithDerivedColDef]);
@@ -167,6 +167,63 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
167
167
  dataGeneratorUniquenessEnabled?: boolean;
168
168
  hide?: boolean;
169
169
  derivedFrom?: string;
170
+ } | {
171
+ type: "multiSelect";
172
+ valueOptions?: import("@mui/x-data-grid").ValueOptions[] | ((params: import("@mui/x-data-grid").GridValueOptionsParams<any>) => Array<import("@mui/x-data-grid").ValueOptions>) | undefined;
173
+ getOptionLabel: (value: import("@mui/x-data-grid").ValueOptions) => string;
174
+ getOptionValue: (value: import("@mui/x-data-grid").ValueOptions) => string | number;
175
+ separator?: string;
176
+ field: string;
177
+ headerName?: string;
178
+ description?: string;
179
+ width?: number;
180
+ flex?: number;
181
+ minWidth?: number;
182
+ maxWidth?: number;
183
+ hideable?: boolean;
184
+ sortable?: boolean;
185
+ sortingOrder?: readonly import("@mui/x-data-grid").GridSortDirection[];
186
+ resizable?: boolean;
187
+ editable?: boolean;
188
+ groupable?: boolean;
189
+ pinnable?: boolean;
190
+ sortComparator?: import("@mui/x-data-grid").GridComparatorFn<any> | undefined;
191
+ getSortComparator?: ((sortDirection: import("@mui/x-data-grid").GridSortDirection) => import("@mui/x-data-grid").GridComparatorFn<any> | undefined) | undefined;
192
+ align?: import("@mui/x-data-grid").GridAlignment;
193
+ valueGetter?: import("@mui/x-data-grid").GridValueGetter<any, any, any, never> | undefined;
194
+ rowSpanValueGetter?: import("@mui/x-data-grid").GridValueGetter<any, any, any, never> | undefined;
195
+ valueSetter?: import("@mui/x-data-grid").GridValueSetter<any, any, any> | undefined;
196
+ valueFormatter?: import("@mui/x-data-grid").GridValueFormatter<any, any, any, never> | undefined;
197
+ valueParser?: import("@mui/x-data-grid").GridValueParser<any, any, any> | undefined;
198
+ cellClassName?: import("@mui/x-data-grid").GridCellClassNamePropType<any, any> | undefined;
199
+ display?: "text" | "flex";
200
+ renderCell?: ((params: import("@mui/x-data-grid").GridRenderCellParams<any, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
201
+ renderEditCell?: ((params: import("@mui/x-data-grid").GridRenderEditCellParams<any, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
202
+ preProcessEditCellProps?: ((params: import("@mui/x-data-grid").GridPreProcessEditCellProps) => import("@mui/x-data-grid").GridEditCellProps | Promise<import("@mui/x-data-grid").GridEditCellProps>) | undefined;
203
+ headerClassName?: import("@mui/x-data-grid").GridColumnHeaderClassNamePropType;
204
+ renderHeader?: ((params: import("@mui/x-data-grid").GridColumnHeaderParams<any, any, any>) => React.ReactNode) | undefined;
205
+ headerAlign?: import("@mui/x-data-grid").GridAlignment;
206
+ hideSortIcons?: boolean;
207
+ disableColumnMenu?: boolean;
208
+ filterable?: boolean;
209
+ filterOperators?: readonly import("@mui/x-data-grid").GridFilterOperator<any, any, any, any>[] | undefined;
210
+ getApplyQuickFilterFn?: import("@mui/x-data-grid").GetApplyQuickFilterFn<any, any> | undefined;
211
+ disableReorder?: boolean;
212
+ disableExport?: boolean;
213
+ colSpan?: number | import("@mui/x-data-grid").GridColSpanFn<any, any, any> | undefined;
214
+ examples?: any[] | undefined;
215
+ renderHeaderFilter?: (params: import("@mui/x-data-grid-pro").GridRenderHeaderFilterProps) => React.ReactNode;
216
+ aggregable?: boolean;
217
+ availableAggregationFunctions?: string[];
218
+ groupingValueGetter?: import("@mui/x-data-grid-premium").GridGroupingValueGetter<any> | undefined;
219
+ groupingValueSetter?: import("@mui/x-data-grid-premium").GridGroupingValueSetter<any> | undefined;
220
+ pastedValueParser?: import("@mui/x-data-grid-premium").GridPastedValueParser<any, any, any> | undefined;
221
+ pivotable?: boolean;
222
+ chartable?: boolean;
223
+ generateData?: (row: any, context: import("../index.mjs").GridDataGeneratorContext) => any;
224
+ dataGeneratorUniquenessEnabled?: boolean;
225
+ hide?: boolean;
226
+ derivedFrom?: string;
170
227
  })[];
171
228
  initialState: {
172
229
  columns: {
@@ -167,6 +167,63 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
167
167
  dataGeneratorUniquenessEnabled?: boolean;
168
168
  hide?: boolean;
169
169
  derivedFrom?: string;
170
+ } | {
171
+ type: "multiSelect";
172
+ valueOptions?: import("@mui/x-data-grid").ValueOptions[] | ((params: import("@mui/x-data-grid").GridValueOptionsParams<any>) => Array<import("@mui/x-data-grid").ValueOptions>) | undefined;
173
+ getOptionLabel: (value: import("@mui/x-data-grid").ValueOptions) => string;
174
+ getOptionValue: (value: import("@mui/x-data-grid").ValueOptions) => string | number;
175
+ separator?: string;
176
+ field: string;
177
+ headerName?: string;
178
+ description?: string;
179
+ width?: number;
180
+ flex?: number;
181
+ minWidth?: number;
182
+ maxWidth?: number;
183
+ hideable?: boolean;
184
+ sortable?: boolean;
185
+ sortingOrder?: readonly import("@mui/x-data-grid").GridSortDirection[];
186
+ resizable?: boolean;
187
+ editable?: boolean;
188
+ groupable?: boolean;
189
+ pinnable?: boolean;
190
+ sortComparator?: import("@mui/x-data-grid").GridComparatorFn<any> | undefined;
191
+ getSortComparator?: ((sortDirection: import("@mui/x-data-grid").GridSortDirection) => import("@mui/x-data-grid").GridComparatorFn<any> | undefined) | undefined;
192
+ align?: import("@mui/x-data-grid").GridAlignment;
193
+ valueGetter?: import("@mui/x-data-grid").GridValueGetter<any, any, any, never> | undefined;
194
+ rowSpanValueGetter?: import("@mui/x-data-grid").GridValueGetter<any, any, any, never> | undefined;
195
+ valueSetter?: import("@mui/x-data-grid").GridValueSetter<any, any, any> | undefined;
196
+ valueFormatter?: import("@mui/x-data-grid").GridValueFormatter<any, any, any, never> | undefined;
197
+ valueParser?: import("@mui/x-data-grid").GridValueParser<any, any, any> | undefined;
198
+ cellClassName?: import("@mui/x-data-grid").GridCellClassNamePropType<any, any> | undefined;
199
+ display?: "text" | "flex";
200
+ renderCell?: ((params: import("@mui/x-data-grid").GridRenderCellParams<any, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
201
+ renderEditCell?: ((params: import("@mui/x-data-grid").GridRenderEditCellParams<any, any, any, import("@mui/x-data-grid").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
202
+ preProcessEditCellProps?: ((params: import("@mui/x-data-grid").GridPreProcessEditCellProps) => import("@mui/x-data-grid").GridEditCellProps | Promise<import("@mui/x-data-grid").GridEditCellProps>) | undefined;
203
+ headerClassName?: import("@mui/x-data-grid").GridColumnHeaderClassNamePropType;
204
+ renderHeader?: ((params: import("@mui/x-data-grid").GridColumnHeaderParams<any, any, any>) => React.ReactNode) | undefined;
205
+ headerAlign?: import("@mui/x-data-grid").GridAlignment;
206
+ hideSortIcons?: boolean;
207
+ disableColumnMenu?: boolean;
208
+ filterable?: boolean;
209
+ filterOperators?: readonly import("@mui/x-data-grid").GridFilterOperator<any, any, any, any>[] | undefined;
210
+ getApplyQuickFilterFn?: import("@mui/x-data-grid").GetApplyQuickFilterFn<any, any> | undefined;
211
+ disableReorder?: boolean;
212
+ disableExport?: boolean;
213
+ colSpan?: number | import("@mui/x-data-grid").GridColSpanFn<any, any, any> | undefined;
214
+ examples?: any[] | undefined;
215
+ renderHeaderFilter?: (params: import("@mui/x-data-grid-pro").GridRenderHeaderFilterProps) => React.ReactNode;
216
+ aggregable?: boolean;
217
+ availableAggregationFunctions?: string[];
218
+ groupingValueGetter?: import("@mui/x-data-grid-premium").GridGroupingValueGetter<any> | undefined;
219
+ groupingValueSetter?: import("@mui/x-data-grid-premium").GridGroupingValueSetter<any> | undefined;
220
+ pastedValueParser?: import("@mui/x-data-grid-premium").GridPastedValueParser<any, any, any> | undefined;
221
+ pivotable?: boolean;
222
+ chartable?: boolean;
223
+ generateData?: (row: any, context: import("../index.js").GridDataGeneratorContext) => any;
224
+ dataGeneratorUniquenessEnabled?: boolean;
225
+ hide?: boolean;
226
+ derivedFrom?: string;
170
227
  })[];
171
228
  initialState: {
172
229
  columns: {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v9.4.0
2
+ * @mui/x-data-grid-generator v9.6.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v9.4.0
2
+ * @mui/x-data-grid-generator v9.6.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "9.4.0",
3
+ "version": "9.6.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Generate fake data for demo purposes only.",
6
6
  "license": "MIT",
@@ -25,10 +25,10 @@
25
25
  "chance": "^1.1.13",
26
26
  "clsx": "^2.1.1",
27
27
  "lru-cache": "^11.5.1",
28
- "@mui/x-data-grid": "^9.4.0",
29
- "@mui/x-data-grid-pro": "^9.4.0",
30
- "@mui/x-internals": "^9.1.0",
31
- "@mui/x-data-grid-premium": "^9.4.0"
28
+ "@mui/x-data-grid-premium": "^9.6.0",
29
+ "@mui/x-data-grid": "^9.6.0",
30
+ "@mui/x-internals": "^9.6.0",
31
+ "@mui/x-data-grid-pro": "^9.6.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@emotion/react": "^11.9.0",
@@ -136,6 +136,9 @@
136
136
  }
137
137
  }
138
138
  },
139
+ "imports": {
140
+ "#formatErrorMessage": "@mui/x-internals/formatErrorMessage"
141
+ },
139
142
  "main": "./index.js",
140
143
  "types": "./index.d.ts"
141
144
  }
@@ -5,6 +5,6 @@ interface DemoLinkProps {
5
5
  children: string;
6
6
  tabIndex: number;
7
7
  }
8
- export declare const DemoLink: React.NamedExoticComponent<DemoLinkProps>;
8
+ export declare const DemoLink: React.MemoExoticComponent<(props: DemoLinkProps) => import("react/jsx-runtime").JSX.Element>;
9
9
  export declare function renderLink(params: GridRenderCellParams<any, string, any>): "" | import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -5,6 +5,6 @@ interface DemoLinkProps {
5
5
  children: string;
6
6
  tabIndex: number;
7
7
  }
8
- export declare const DemoLink: React.NamedExoticComponent<DemoLinkProps>;
8
+ export declare const DemoLink: React.MemoExoticComponent<(props: DemoLinkProps) => import("react/jsx-runtime").JSX.Element>;
9
9
  export declare function renderLink(params: GridRenderCellParams<any, string, any>): "" | import("react/jsx-runtime").JSX.Element;
10
10
  export {};
@@ -8,6 +8,7 @@ export declare const randomRate: () => number;
8
8
  export declare const randomDate: (start: Date, end: Date) => Date;
9
9
  export declare const randomArrayItem: <T>(arr: T[]) => T;
10
10
  export declare const randomBoolean: () => boolean;
11
+ export declare const randomSubarray: <T>(arr: T[], min?: number, max?: number) => T[];
11
12
  export declare const randomColor: () => "#e91e63" | "#2196f3" | "#ff9800" | "#f44336" | "#4caf50" | "#03a9f4" | "#9c27b0";
12
13
  export declare const randomId: () => string;
13
14
  export declare const randomDesk: () => string;
@@ -40,6 +41,8 @@ export declare const randomUpdatedDate: () => Date;
40
41
  export declare const randomJobTitle: () => string;
41
42
  export declare const randomRating: () => number;
42
43
  export declare const randomName: ColumnDataGenerator<string>;
44
+ export declare const randomTradeTags: () => string[];
45
+ export declare const randomCertifications: () => string[];
43
46
  export declare const generateFilledQuantity: (data: {
44
47
  quantity: number;
45
48
  }) => number;
@@ -8,6 +8,7 @@ export declare const randomRate: () => number;
8
8
  export declare const randomDate: (start: Date, end: Date) => Date;
9
9
  export declare const randomArrayItem: <T>(arr: T[]) => T;
10
10
  export declare const randomBoolean: () => boolean;
11
+ export declare const randomSubarray: <T>(arr: T[], min?: number, max?: number) => T[];
11
12
  export declare const randomColor: () => "#e91e63" | "#2196f3" | "#ff9800" | "#f44336" | "#4caf50" | "#03a9f4" | "#9c27b0";
12
13
  export declare const randomId: () => string;
13
14
  export declare const randomDesk: () => string;
@@ -40,6 +41,8 @@ export declare const randomUpdatedDate: () => Date;
40
41
  export declare const randomJobTitle: () => string;
41
42
  export declare const randomRating: () => number;
42
43
  export declare const randomName: ColumnDataGenerator<string>;
44
+ export declare const randomTradeTags: () => string[];
45
+ export declare const randomCertifications: () => string[];
43
46
  export declare const generateFilledQuantity: (data: {
44
47
  quantity: number;
45
48
  }) => number;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.randomUserName = exports.randomUrl = exports.randomUpdatedDate = exports.randomUnitPriceCurrency = exports.randomUnitPrice = exports.randomTraderName = exports.randomTradeDate = exports.randomTaxCode = exports.randomStatusOptions = exports.randomRating = exports.randomRateType = exports.randomRate = exports.randomQuantity = exports.randomPrice = exports.randomPnL = exports.randomPhoneNumber = exports.randomName = exports.randomMaturityDate = exports.randomJobTitle = exports.randomInt = exports.randomIncoterm = exports.randomId = exports.randomFeeRate = exports.randomEmail = exports.randomDesk = exports.randomDate = exports.randomCurrency = exports.randomCreatedDate = exports.randomCountry = exports.randomContractType = exports.randomCompanyName = exports.randomCommodity = exports.randomColor = exports.randomCity = exports.randomBrokerId = exports.randomBoolean = exports.randomArrayItem = exports.randomAddress = exports.random = exports.generateIsFilled = exports.generateFilledQuantity = void 0;
6
+ exports.randomUserName = exports.randomUrl = exports.randomUpdatedDate = exports.randomUnitPriceCurrency = exports.randomUnitPrice = exports.randomTraderName = exports.randomTradeTags = exports.randomTradeDate = exports.randomTaxCode = exports.randomSubarray = exports.randomStatusOptions = exports.randomRating = exports.randomRateType = exports.randomRate = exports.randomQuantity = exports.randomPrice = exports.randomPnL = exports.randomPhoneNumber = exports.randomName = exports.randomMaturityDate = exports.randomJobTitle = exports.randomInt = exports.randomIncoterm = exports.randomId = exports.randomFeeRate = exports.randomEmail = exports.randomDesk = exports.randomDate = exports.randomCurrency = exports.randomCreatedDate = exports.randomCountry = exports.randomContractType = exports.randomCompanyName = exports.randomCommodity = exports.randomColor = exports.randomCity = exports.randomCertifications = exports.randomBrokerId = exports.randomBoolean = exports.randomArrayItem = exports.randomAddress = exports.random = exports.generateIsFilled = exports.generateFilledQuantity = void 0;
7
7
  exports.resetRandomGenerators = resetRandomGenerators;
8
8
  var _chance = require("chance");
9
9
  var _staticData = require("./static-data");
@@ -105,6 +105,15 @@ const randomArrayItem = arr => arr[randomInt(0, arr.length - 1)];
105
105
  exports.randomArrayItem = randomArrayItem;
106
106
  const randomBoolean = () => randomArrayItem([true, false]);
107
107
  exports.randomBoolean = randomBoolean;
108
+ const randomSubarray = (arr, min = 0, max) => {
109
+ const count = randomInt(min, max ?? arr.length);
110
+ const shuffled = [...arr].sort(() => chance.floating({
111
+ min: -1,
112
+ max: 1
113
+ }));
114
+ return shuffled.slice(0, count);
115
+ };
116
+ exports.randomSubarray = randomSubarray;
108
117
  const randomColor = () => randomArrayItem(_staticData.COLORS);
109
118
  exports.randomColor = randomColor;
110
119
  const randomId = () => chanceGuid.guid();
@@ -171,6 +180,10 @@ exports.randomJobTitle = randomJobTitle;
171
180
  const randomRating = () => randomInt(1, 5);
172
181
  exports.randomRating = randomRating;
173
182
  const randomName = exports.randomName = uniquenessHandler(() => chance.name());
183
+ const randomTradeTags = () => randomSubarray(_staticData.TRADE_TAG_OPTIONS, 1, 4);
184
+ exports.randomTradeTags = randomTradeTags;
185
+ const randomCertifications = () => randomSubarray(_staticData.CERTIFICATION_OPTIONS, 0, 3);
186
+ exports.randomCertifications = randomCertifications;
174
187
  const generateFilledQuantity = data => Number((data.quantity * randomRate()).toFixed()) / data.quantity;
175
188
  exports.generateFilledQuantity = generateFilledQuantity;
176
189
  const generateIsFilled = data => data.quantity === data.filledQuantity;
@@ -1,5 +1,5 @@
1
1
  import { Chance } from 'chance';
2
- import { COLORS, COMMODITY_OPTIONS, CONTRACT_TYPE_OPTIONS, COUNTRY_ISO_OPTIONS, CURRENCY_OPTIONS, INCOTERM_OPTIONS, RATE_TYPE_OPTIONS, STATUS_OPTIONS, TAXCODE_OPTIONS } from "./static-data.mjs";
2
+ import { CERTIFICATION_OPTIONS, COLORS, COMMODITY_OPTIONS, CONTRACT_TYPE_OPTIONS, COUNTRY_ISO_OPTIONS, CURRENCY_OPTIONS, INCOTERM_OPTIONS, RATE_TYPE_OPTIONS, STATUS_OPTIONS, TAXCODE_OPTIONS, TRADE_TAG_OPTIONS } from "./static-data.mjs";
3
3
  let chance;
4
4
  let chanceGuid;
5
5
 
@@ -91,6 +91,14 @@ export const randomDate = (start, end) => new Date(start.getTime() + chance.floa
91
91
  }) * (end.getTime() - start.getTime()));
92
92
  export const randomArrayItem = arr => arr[randomInt(0, arr.length - 1)];
93
93
  export const randomBoolean = () => randomArrayItem([true, false]);
94
+ export const randomSubarray = (arr, min = 0, max) => {
95
+ const count = randomInt(min, max ?? arr.length);
96
+ const shuffled = [...arr].sort(() => chance.floating({
97
+ min: -1,
98
+ max: 1
99
+ }));
100
+ return shuffled.slice(0, count);
101
+ };
94
102
  export const randomColor = () => randomArrayItem(COLORS);
95
103
  export const randomId = () => chanceGuid.guid();
96
104
  export const randomDesk = () => `D-${chance.integer({
@@ -126,5 +134,7 @@ export const randomUpdatedDate = () => dateRecent();
126
134
  export const randomJobTitle = () => chance.profession();
127
135
  export const randomRating = () => randomInt(1, 5);
128
136
  export const randomName = uniquenessHandler(() => chance.name());
137
+ export const randomTradeTags = () => randomSubarray(TRADE_TAG_OPTIONS, 1, 4);
138
+ export const randomCertifications = () => randomSubarray(CERTIFICATION_OPTIONS, 0, 3);
129
139
  export const generateFilledQuantity = data => Number((data.quantity * randomRate()).toFixed()) / data.quantity;
130
140
  export const generateIsFilled = data => data.quantity === data.filledQuantity;
@@ -5,6 +5,8 @@ export declare const RATE_TYPE_OPTIONS: string[];
5
5
  export declare const CONTRACT_TYPE_OPTIONS: string[];
6
6
  export declare const INCOTERM_OPTIONS: string[];
7
7
  export declare const COMMODITY_OPTIONS: string[];
8
+ export declare const TRADE_TAG_OPTIONS: string[];
9
+ export declare const CERTIFICATION_OPTIONS: string[];
8
10
  export declare const CURRENCY_OPTIONS: string[];
9
11
  export declare const COUNTRY_OPTIONS: string[];
10
12
  export interface CountryIsoOption {
@@ -5,6 +5,8 @@ export declare const RATE_TYPE_OPTIONS: string[];
5
5
  export declare const CONTRACT_TYPE_OPTIONS: string[];
6
6
  export declare const INCOTERM_OPTIONS: string[];
7
7
  export declare const COMMODITY_OPTIONS: string[];
8
+ export declare const TRADE_TAG_OPTIONS: string[];
9
+ export declare const CERTIFICATION_OPTIONS: string[];
8
10
  export declare const CURRENCY_OPTIONS: string[];
9
11
  export declare const COUNTRY_OPTIONS: string[];
10
12
  export interface CountryIsoOption {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TAXCODE_OPTIONS = exports.STATUS_OPTIONS = exports.RATE_TYPE_OPTIONS = exports.INCOTERM_OPTIONS = exports.CURRENCY_OPTIONS = exports.COUNTRY_OPTIONS = exports.COUNTRY_ISO_OPTIONS_SORTED = exports.COUNTRY_ISO_OPTIONS = exports.CONTRACT_TYPE_OPTIONS = exports.COMMODITY_OPTIONS = exports.COLORS = void 0;
6
+ exports.TRADE_TAG_OPTIONS = exports.TAXCODE_OPTIONS = exports.STATUS_OPTIONS = exports.RATE_TYPE_OPTIONS = exports.INCOTERM_OPTIONS = exports.CURRENCY_OPTIONS = exports.COUNTRY_OPTIONS = exports.COUNTRY_ISO_OPTIONS_SORTED = exports.COUNTRY_ISO_OPTIONS = exports.CONTRACT_TYPE_OPTIONS = exports.COMMODITY_OPTIONS = exports.COLORS = exports.CERTIFICATION_OPTIONS = void 0;
7
7
  var _colors = require("@mui/material/colors");
8
8
  const COLORS = exports.COLORS = [_colors.pink[500], _colors.blue[500], _colors.orange[500], _colors.red[500], _colors.green[500], _colors.lightBlue[500], _colors.purple[500]];
9
9
  const STATUS_OPTIONS = exports.STATUS_OPTIONS = ['Open', 'Partially Filled', 'Filled', 'Rejected'];
@@ -12,6 +12,8 @@ const RATE_TYPE_OPTIONS = exports.RATE_TYPE_OPTIONS = ['Fixed', 'Floating'];
12
12
  const CONTRACT_TYPE_OPTIONS = exports.CONTRACT_TYPE_OPTIONS = ['FP', 'TM', 'CR'];
13
13
  const INCOTERM_OPTIONS = exports.INCOTERM_OPTIONS = ['EXW (Ex Works)', 'FAS (Free Alongside Ship)', 'FCA (Free Carrier)', 'CPT (Carriage Paid To)', 'DAP (Delivered at Place)', 'DPU (Delivered at Place Unloaded)', 'DDP (Delivered Duty Paid)'];
14
14
  const COMMODITY_OPTIONS = exports.COMMODITY_OPTIONS = ['Corn', 'Oats', 'Rough Rice', 'Soybeans', 'Rapeseed', 'Soybeans', 'Soybean Meal', 'Soybean Oil', 'Wheat', 'Milk', 'Cocoa', 'Coffee C', 'Cotton No.2', 'Sugar No.11', 'Sugar No.14', 'Frozen Concentrated Orange Juice', 'Adzuki bean', 'Robusta coffee'];
15
+ const TRADE_TAG_OPTIONS = exports.TRADE_TAG_OPTIONS = ['Hedge', 'Speculative', 'Arbitrage', 'Spot', 'Forward', 'Option', 'Swap', 'Futures', 'Derivative', 'Leveraged', 'Short', 'Long', 'Day Trade', 'Swing', 'Scalping', 'Algorithmic', 'OTC', 'Exchange', 'Institutional', 'Retail'];
16
+ const CERTIFICATION_OPTIONS = exports.CERTIFICATION_OPTIONS = ['Fair Trade', 'Organic', 'Rainforest Alliance', 'UTZ', 'Non-GMO'];
15
17
  const CURRENCY_OPTIONS = exports.CURRENCY_OPTIONS = ['USD', 'GBP', 'JPY', 'EUR', 'BRL', 'MXN', 'AUD', 'CAD', 'NZD', 'ARS', 'CHF', 'THB', 'HKD', 'TRY'];
16
18
  const COUNTRY_OPTIONS = exports.COUNTRY_OPTIONS = ['United States', 'United Kingdom', 'Japan', 'France', 'Brazil', 'Mexico', 'Australia', 'Canada', 'New Zealand', 'Argentina', 'Switzerland', 'Thailand', 'Hong Kong', 'Turkey'];
17
19
  const COUNTRY_ISO_OPTIONS = exports.COUNTRY_ISO_OPTIONS = [{
@@ -6,6 +6,8 @@ export const RATE_TYPE_OPTIONS = ['Fixed', 'Floating'];
6
6
  export const CONTRACT_TYPE_OPTIONS = ['FP', 'TM', 'CR'];
7
7
  export const INCOTERM_OPTIONS = ['EXW (Ex Works)', 'FAS (Free Alongside Ship)', 'FCA (Free Carrier)', 'CPT (Carriage Paid To)', 'DAP (Delivered at Place)', 'DPU (Delivered at Place Unloaded)', 'DDP (Delivered Duty Paid)'];
8
8
  export const COMMODITY_OPTIONS = ['Corn', 'Oats', 'Rough Rice', 'Soybeans', 'Rapeseed', 'Soybeans', 'Soybean Meal', 'Soybean Oil', 'Wheat', 'Milk', 'Cocoa', 'Coffee C', 'Cotton No.2', 'Sugar No.11', 'Sugar No.14', 'Frozen Concentrated Orange Juice', 'Adzuki bean', 'Robusta coffee'];
9
+ export const TRADE_TAG_OPTIONS = ['Hedge', 'Speculative', 'Arbitrage', 'Spot', 'Forward', 'Option', 'Swap', 'Futures', 'Derivative', 'Leveraged', 'Short', 'Long', 'Day Trade', 'Swing', 'Scalping', 'Algorithmic', 'OTC', 'Exchange', 'Institutional', 'Retail'];
10
+ export const CERTIFICATION_OPTIONS = ['Fair Trade', 'Organic', 'Rainforest Alliance', 'UTZ', 'Non-GMO'];
9
11
  export const CURRENCY_OPTIONS = ['USD', 'GBP', 'JPY', 'EUR', 'BRL', 'MXN', 'AUD', 'CAD', 'NZD', 'ARS', 'CHF', 'THB', 'HKD', 'TRY'];
10
12
  export const COUNTRY_OPTIONS = ['United States', 'United Kingdom', 'Japan', 'France', 'Brazil', 'Mexico', 'Australia', 'Canada', 'New Zealand', 'Argentina', 'Switzerland', 'Thailand', 'Hong Kong', 'Turkey'];
11
13
  export const COUNTRY_ISO_OPTIONS = [{