@mui/x-data-grid-generator 9.3.0 → 9.5.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 +296 -0
- package/LICENSE +21 -0
- package/columns/commodities.columns.js +16 -0
- package/columns/commodities.columns.mjs +18 -2
- package/hooks/serverUtils.d.mts +1 -1
- package/hooks/serverUtils.d.ts +1 -1
- package/hooks/serverUtils.js +68 -39
- package/hooks/serverUtils.mjs +68 -39
- package/hooks/useDemoData.d.mts +2 -1
- package/hooks/useDemoData.d.ts +2 -1
- package/hooks/useDemoData.js +8 -4
- package/hooks/useDemoData.mjs +8 -4
- package/hooks/useMockServer.d.mts +1 -0
- package/hooks/useMockServer.d.ts +1 -0
- package/hooks/useMockServer.js +11 -6
- package/hooks/useMockServer.mjs +11 -6
- package/hooks/useQuery.d.mts +57 -0
- package/hooks/useQuery.d.ts +57 -0
- package/index.js +3 -3
- package/index.mjs +3 -3
- package/package.json +8 -8
- package/services/random-generator.d.mts +3 -0
- package/services/random-generator.d.ts +3 -0
- package/services/random-generator.js +14 -1
- package/services/random-generator.mjs +11 -1
- package/services/static-data.d.mts +2 -0
- package/services/static-data.d.ts +2 -0
- package/services/static-data.js +3 -1
- package/services/static-data.mjs +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,301 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.5.0
|
|
4
|
+
|
|
5
|
+
_Jun 11, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 🎁 New [`multiSelect` column type for Data Grid Pro](https://mui.com/x/react-data-grid/column-definition/#MultiSelectColumn)
|
|
10
|
+
- 🚀 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.
|
|
11
|
+
- 🐞 Bugfixes
|
|
12
|
+
- 📚 Documentation improvements
|
|
13
|
+
|
|
14
|
+
Special thanks go out to community members @mustafajw07 and @Anexus5919 for their valuable contribution.
|
|
15
|
+
|
|
16
|
+
The following team members contributed to this release:
|
|
17
|
+
@alexfauquette, @JCQuintas, @rita-codes, @rluzists1, @sai6855, @siriwatknp, @arminmeh, @brijeshb42
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@9.5.0`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Restrict warning messages to non-production environments in various components (#22461) @sai6855
|
|
24
|
+
- [DataGrid] Prevent React state update before mount (#22374) @arminmeh
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@9.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@9.5.0`, plus:
|
|
29
|
+
|
|
30
|
+
- [DataGridPro] Add new `multiSelect` column type (#21157) @siriwatknp
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-premium@9.5.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid-pro@9.5.0`.
|
|
35
|
+
|
|
36
|
+
### Date and Time Pickers
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-date-pickers@9.5.0`
|
|
39
|
+
|
|
40
|
+
- [pickers] Fix missing export of `th-TH` (#22703) @alexfauquette
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-date-pickers-pro@9.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-date-pickers@9.5.0`.
|
|
45
|
+
|
|
46
|
+
### Charts
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-charts@9.5.0`
|
|
49
|
+
|
|
50
|
+
- [charts] Add `FocusedBar` component to `BarScatterComposition` demo (#22704) @sai6855
|
|
51
|
+
- [charts] Add dedicated Bubble Chart documentation page (#22688) @mustafajw07
|
|
52
|
+
- [charts] Add progressive scatter renderer (#22518) @JCQuintas
|
|
53
|
+
- [charts] Avoid full axis pipeline rebuild on resize (#22695) @JCQuintas
|
|
54
|
+
- [charts] Document focus indicator in composition page (#22712) @JCQuintas
|
|
55
|
+
- [charts] Fix `ChartsTooltip` `container` and `disablePortal` props being ignored (#22690) @JCQuintas
|
|
56
|
+
- [charts] Make ordinal scales O(1) to copy and re-range (#22691) @JCQuintas
|
|
57
|
+
- [charts] Stabilize WebGL bar rendering at sub-pixel widths (#22678) @JCQuintas
|
|
58
|
+
- [charts] Use the series config to define value types (#22693) @sai6855
|
|
59
|
+
- [charts] Decouple interaction hook from the cartesian zoom (#22708) @alexfauquette
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts-pro@9.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
62
|
+
|
|
63
|
+
Same changes as in `@mui/x-charts@9.5.0`, plus:
|
|
64
|
+
|
|
65
|
+
- [charts-pro] Add missing focus highlight (#22689) @alexfauquette
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-charts-premium@9.5.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
68
|
+
|
|
69
|
+
Same changes as in `@mui/x-charts-pro@9.5.0`, plus:
|
|
70
|
+
|
|
71
|
+
- [charts-premium] Set `Heatmap` WebGL render as stable (#22665) @alexfauquette
|
|
72
|
+
- [charts-premium] Stabilize candlestick charts (#22666) @alexfauquette
|
|
73
|
+
- [charts-premium] Stabilize the radial charts (#22655) @alexfauquette
|
|
74
|
+
|
|
75
|
+
### Scheduler
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-scheduler@9.0.0-beta.1`
|
|
78
|
+
|
|
79
|
+
Internal changes.
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.1`, plus:
|
|
84
|
+
|
|
85
|
+
- [scheduler] Remove dead CSS variable writes in `EventTimelinePremiumContent` (#22720) @rita-codes
|
|
86
|
+
- [scheduler] Show scope dialog when deleting a recurring event (#22552) @Anexus5919
|
|
87
|
+
|
|
88
|
+
### Core
|
|
89
|
+
|
|
90
|
+
- [docs-infra] Fix immutable cache headers for `/\_next/static` assets (#22747) @brijeshb42
|
|
91
|
+
- [docs-infra] Prefix `/\_next/static` cache header rule with `/x` basePath (#22748) @brijeshb42
|
|
92
|
+
- [code-infra] Update dependencies to resolve Dependabot security alerts (#22714) @Janpot
|
|
93
|
+
|
|
94
|
+
### Docs
|
|
95
|
+
|
|
96
|
+
- [docs] Fix broken links checker crashing on 404 known-targets fetch (#22707) @sai6855
|
|
97
|
+
- [docs] Fix country data (#22716) @alexfauquette
|
|
98
|
+
|
|
99
|
+
### Miscellaneous
|
|
100
|
+
|
|
101
|
+
- [legal] Update EULA links in docs (#22717) @rluzists1
|
|
102
|
+
|
|
103
|
+
## 9.4.0
|
|
104
|
+
|
|
105
|
+
<!-- generated comparing v9.3.0..master -->
|
|
106
|
+
|
|
107
|
+
_Jun 4, 2026_
|
|
108
|
+
|
|
109
|
+
We'd like to extend a big thank you to the 21 contributors who made this release possible. Here are some highlights ✨:
|
|
110
|
+
|
|
111
|
+
- 🎉 Scheduler is now in Beta shipping with Timeline vitualization and lazy loading
|
|
112
|
+
- 📆 Implement Event Timeline virtualization (#22339)
|
|
113
|
+
- 🫧 Introduce bubble charts (#22537)
|
|
114
|
+
- 🐞 Bugfixes
|
|
115
|
+
- 📚 Documentation improvements
|
|
116
|
+
|
|
117
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
118
|
+
@imxv, @mixelburg, @mustafajw07
|
|
119
|
+
|
|
120
|
+
The following team members contributed to this release:
|
|
121
|
+
@aemartos, @alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @joserodolfofreitas, @LukasTy, @MBilalShafi, @michelengelen, @mj12albert, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855
|
|
122
|
+
|
|
123
|
+
### Data Grid
|
|
124
|
+
|
|
125
|
+
#### `@mui/x-data-grid@9.4.0`
|
|
126
|
+
|
|
127
|
+
- [DataGrid] Fix `avg` aggregation when the average is zero (#22652) @mj12albert
|
|
128
|
+
- [DataGrid] Inherit icon `fontSize` from `baseIconButton` size (#22187) @imxv
|
|
129
|
+
- [DataGrid] Fix `noRowsOverlay` flicker between `dataSource` re-fetches (#22465) @LukasTy
|
|
130
|
+
|
|
131
|
+
#### `@mui/x-data-grid-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
132
|
+
|
|
133
|
+
Same changes as in `@mui/x-data-grid@9.4.0`.
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-data-grid-premium@9.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
136
|
+
|
|
137
|
+
> This release includes a version bump of the `@mui/x-internal-exceljs-fork` package to address the vulnerable dependencies.
|
|
138
|
+
> The following CVEs are fixed:
|
|
139
|
+
>
|
|
140
|
+
> - <https://github.com/advisories/GHSA-ph9p-34f9-6g65>
|
|
141
|
+
> - <https://github.com/isaacs/minimatch/security/advisories/GHSA-23c5-xmqv-rm74>
|
|
142
|
+
> - <https://github.com/advisories/GHSA-w5hq-g745-h8pq>
|
|
143
|
+
>
|
|
144
|
+
> To make this security update possible, we bumped the `node` version requirement from `>=14.0.0` to `>=14.17.0`.
|
|
145
|
+
> [Node.js 14.17.0](https://nodejs.org/en/blog/release/v14.17.0) was released in May 2021, so we consider it safe to bump the requirement without causing issues for our users.
|
|
146
|
+
|
|
147
|
+
Same changes as in `@mui/x-data-grid-pro@9.4.0`, plus:
|
|
148
|
+
|
|
149
|
+
- [DataGridPremium] Nested Lazy Loading (#21043) @MBilalShafi
|
|
150
|
+
- [DataGridPremium] Update exceljs fork (#22658) @cherniavskii
|
|
151
|
+
|
|
152
|
+
### Date and Time Pickers
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-date-pickers@9.4.0`
|
|
155
|
+
|
|
156
|
+
Internal changes.
|
|
157
|
+
|
|
158
|
+
#### `@mui/x-date-pickers-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
159
|
+
|
|
160
|
+
Same changes as in `@mui/x-date-pickers@9.4.0`.
|
|
161
|
+
|
|
162
|
+
### Charts
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-charts@9.4.0`
|
|
165
|
+
|
|
166
|
+
- [charts] Add functionality to hide elements during chart export (#22525) @sai6855
|
|
167
|
+
- [charts] Add option to show marks only on the first/last values (#22645) @alexfauquette
|
|
168
|
+
- [charts] Add text customization section and demo for axis labels (#22597) @sai6855
|
|
169
|
+
- [charts] Allow axes to scale according to the visible series only (#22566) @alexfauquette
|
|
170
|
+
- [charts] Correctly handle different identifiers for each series (#22556) @sai6855
|
|
171
|
+
- [charts] Fix inverted Y axis zoom/pan on ordinal scales (#22654) @JCQuintas
|
|
172
|
+
- [charts] Introduce bubble charts (#22537) @alexfauquette
|
|
173
|
+
- [charts] Let scatter chart tooltip ignore hidden series (#22614) @alexfauquette
|
|
174
|
+
- [charts] Make `'sqrt'` size mapping the default (#22683) @alexfauquette
|
|
175
|
+
- [charts] Remove unused proptypes (#22618) @alexfauquette
|
|
176
|
+
- [charts] Support module augmentation for slots (#22519) @sai6855
|
|
177
|
+
- [charts] Support multiple marker size in `findClosestPoint` (#22622) @alexfauquette
|
|
178
|
+
- [charts] Upgrade bezier-easing to v3 and use it for line chart hit-detection (#22608) @sai6855
|
|
179
|
+
- [charts] Use `useLayoutEffect` with `ResizeObserver` (#22646) @JCQuintas
|
|
180
|
+
|
|
181
|
+
#### `@mui/x-charts-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
182
|
+
|
|
183
|
+
Same changes as in `@mui/x-charts@9.4.0`, plus:
|
|
184
|
+
|
|
185
|
+
- [charts-pro] Auto-select range button matching current zoom (#22137) @JCQuintas
|
|
186
|
+
- [charts-pro] Support range values in `initialZoom` (#22563) @JCQuintas
|
|
187
|
+
|
|
188
|
+
#### `@mui/x-charts-premium@9.4.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
189
|
+
|
|
190
|
+
Same changes as in `@mui/x-charts-pro@9.4.0`, plus:
|
|
191
|
+
|
|
192
|
+
- [charts-premium] Support range-bar series in WebGL bar renderer (#22607) @JCQuintas
|
|
193
|
+
- [charts-premium] Fix `onAxisClick` for radial bar and lines (#22522) @alexfauquette
|
|
194
|
+
|
|
195
|
+
### Tree View
|
|
196
|
+
|
|
197
|
+
#### `@mui/x-tree-view@9.4.0`
|
|
198
|
+
|
|
199
|
+
Internal changes.
|
|
200
|
+
|
|
201
|
+
#### `@mui/x-tree-view-pro@9.4.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
202
|
+
|
|
203
|
+
Same changes as in `@mui/x-tree-view@9.4.0`.
|
|
204
|
+
|
|
205
|
+
### Scheduler
|
|
206
|
+
|
|
207
|
+
#### Breaking changes
|
|
208
|
+
|
|
209
|
+
The theme `styleOverrides` slots for the skeleton and the error container were
|
|
210
|
+
renamed and unified. The CSS utility class names (for example
|
|
211
|
+
`.MuiEventCalendar-eventSkeleton`) are **not** affected — only
|
|
212
|
+
`theme.components.*` overrides need updating.
|
|
213
|
+
|
|
214
|
+
**Event skeleton**
|
|
215
|
+
|
|
216
|
+
| Before | After |
|
|
217
|
+
| --------------------------------------- | ------------------------------ |
|
|
218
|
+
| `MuiEventCalendar` slot `EventSkeleton` | `MuiEventSkeleton` slot `Root` |
|
|
219
|
+
| `MuiEventTimeline` slot `EventSkeleton` | `MuiEventSkeleton` slot `Root` |
|
|
220
|
+
|
|
221
|
+
**Error container**
|
|
222
|
+
|
|
223
|
+
| Before | After |
|
|
224
|
+
| ------------------------------------------------------------- | --------------------------------------- |
|
|
225
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorContainer` | `MuiEventErrorContainer` slot `Root` |
|
|
226
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorAlert` | `MuiEventErrorContainer` slot `Alert` |
|
|
227
|
+
| `MuiEventCalendar` / `MuiEventTimeline` slot `ErrorMessage` | `MuiEventErrorContainer` slot `Message` |
|
|
228
|
+
|
|
229
|
+
If you customized these through the theme, update the component name and slot
|
|
230
|
+
names accordingly:
|
|
231
|
+
|
|
232
|
+
```diff
|
|
233
|
+
components: {
|
|
234
|
+
- MuiEventCalendar: {
|
|
235
|
+
+ MuiEventSkeleton: {
|
|
236
|
+
styleOverrides: {
|
|
237
|
+
- EventSkeleton: { /* ... */ },
|
|
238
|
+
+ Root: { /* ... */ },
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
#### `@mui/x-scheduler@9.0.0-beta.0`
|
|
246
|
+
|
|
247
|
+
- [scheduler] Add a prop to control whether the resource of an event can be cleared (#22464) @rita-codes
|
|
248
|
+
- [scheduler] Add week number labels to agenda, day and week views (#22594) @mustafajw07
|
|
249
|
+
- [scheduler] Add `weekStartsOn` preference and update date functions to support custom week start (#22426) @mustafajw07
|
|
250
|
+
- [scheduler] Export premium version of the standalone views (#22621) @flaviendelangle
|
|
251
|
+
- [scheduler] Implement timeline virtualization (#22339) @romgrk
|
|
252
|
+
- [scheduler] Split scheduler overview (#22453) @joserodolfofreitas
|
|
253
|
+
- [scheduler] Unify `EventSkeleton` and `ErrorContainer` between `EventCalendar` and `EventTimeline` (#22676) @noraleonte
|
|
254
|
+
|
|
255
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
256
|
+
|
|
257
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.0`.
|
|
258
|
+
|
|
259
|
+
### Docs
|
|
260
|
+
|
|
261
|
+
- [docs] Add a performance docs page for charts (#22656) @alexfauquette
|
|
262
|
+
- [docs] Add real dataset for maps documentation (#22599) @alexfauquette
|
|
263
|
+
- [docs] Add spacing between selects on charts overview demo (#22589) @bernardobelchior
|
|
264
|
+
- [docs] Reorganize existing chat docs navigation (#22478) @hasdfa
|
|
265
|
+
- [docs] Switch to visionscarto's world atlas dataset (#22669) @cherniavskii
|
|
266
|
+
- [docs] Update TreeView `domstructure` docs and add demo (#22420) @mj12albert
|
|
267
|
+
- [docs] Fix indexation of Scheduler (#22567) @oliviertassinari
|
|
268
|
+
- [docs] Fix wide layout on event timeline lazy loading and Import title (#22604) @rita-codes
|
|
269
|
+
- [docs] Derive class name owners for shared charts classes (#22674) @JCQuintas
|
|
270
|
+
|
|
271
|
+
### Core
|
|
272
|
+
|
|
273
|
+
- [code-infra] Drop unused and now-transitive deps from docs/package.json (#22549) @LukasTy
|
|
274
|
+
- [code-infra] Refresh CI Node pins to 22.22.3 (#22598) @LukasTy
|
|
275
|
+
- [code-infra] Skip empty product sections in changelog (#22541) @rita-codes
|
|
276
|
+
- [code-infra] Stabilize DataGridScrollRestoration visual regression test (#22553) @Janpot
|
|
277
|
+
- [internal] Add license to the `x-data-grid-generator` (#22240) @arminmeh
|
|
278
|
+
- [internal] Express default value for resource_class (#22569) @oliviertassinari
|
|
279
|
+
- [internal] Fix use of ellipsis (#21852) @oliviertassinari
|
|
280
|
+
- [internal] `useLayoutEffect` with `ResizeObserver` (#22428) @romgrk
|
|
281
|
+
|
|
282
|
+
### Miscellaneous
|
|
283
|
+
|
|
284
|
+
- [chat-headless] Add built-in chat adapters (#22479) @hasdfa
|
|
285
|
+
- [chat-headless] Harden runtime model and message errors (#22480) @hasdfa
|
|
286
|
+
- [core] Prepare for TypeScript 6 bump (#22551) @LukasTy
|
|
287
|
+
- [core] Use CircleCI Gen2 resource classes (#22610) @LukasTy
|
|
288
|
+
- [infra] Fix broken tag retrieval on `master` during release (#22174) @michelengelen
|
|
289
|
+
- [infra] Group Base UI renovate updates (#22590) @LukasTy
|
|
290
|
+
- [pnpm] Add security settings to pnpm-workspace.yaml (#22611) @Janpot
|
|
291
|
+
- [release] Fix release PR scripts (#22680) @JCQuintas
|
|
292
|
+
- [test] Add a Tree View regression test for lazy loading with getChildrenCount returning -1 (#22605) @mixelburg
|
|
293
|
+
- [test] Disable LCD subpixel antialiasing in regression screenshots (#22602) @Janpot
|
|
294
|
+
- [test] Fix flaky Data Grid Pro data source tree data tests (#22659) @LukasTy
|
|
295
|
+
- [test] Remove stale form-submit TODO from e2e suite (#22564) @LukasTy
|
|
296
|
+
- [x-license] Exclude test keys from the published npm package (#22647) @aemartos
|
|
297
|
+
- [test] Fix flaky WebGL benchmark by polling for canvas content (#22535) @JCQuintas
|
|
298
|
+
|
|
3
299
|
## 9.3.0
|
|
4
300
|
|
|
5
301
|
_May 21, 2026_
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Material-UI SAS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -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
|
}];
|
package/hooks/serverUtils.d.mts
CHANGED
|
@@ -69,7 +69,7 @@ export declare const processTreeDataRows: (rows: GridRowModel[], queryOptions: S
|
|
|
69
69
|
/**
|
|
70
70
|
* Simulates server data for row grouping feature
|
|
71
71
|
*/
|
|
72
|
-
export declare const processRowGroupingRows: (rows: GridValidRowModel[], queryOptions: ServerSideQueryOptions, serverOptions: ServerOptions, columnsWithDefaultColDef: GridColDef[]) => Promise<NestedDataRowsResponse>;
|
|
72
|
+
export declare const processRowGroupingRows: (rows: GridValidRowModel[], queryOptions: ServerSideQueryOptions, serverOptions: ServerOptions, columnsWithDefaultColDef: GridColDef[], nestedPagination: boolean) => Promise<NestedDataRowsResponse>;
|
|
73
73
|
/**
|
|
74
74
|
* Simulates server data for pivoting feature
|
|
75
75
|
*/
|
package/hooks/serverUtils.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare const processTreeDataRows: (rows: GridRowModel[], queryOptions: S
|
|
|
69
69
|
/**
|
|
70
70
|
* Simulates server data for row grouping feature
|
|
71
71
|
*/
|
|
72
|
-
export declare const processRowGroupingRows: (rows: GridValidRowModel[], queryOptions: ServerSideQueryOptions, serverOptions: ServerOptions, columnsWithDefaultColDef: GridColDef[]) => Promise<NestedDataRowsResponse>;
|
|
72
|
+
export declare const processRowGroupingRows: (rows: GridValidRowModel[], queryOptions: ServerSideQueryOptions, serverOptions: ServerOptions, columnsWithDefaultColDef: GridColDef[], nestedPagination: boolean) => Promise<NestedDataRowsResponse>;
|
|
73
73
|
/**
|
|
74
74
|
* Simulates server data for pivoting feature
|
|
75
75
|
*/
|
package/hooks/serverUtils.js
CHANGED
|
@@ -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(
|
|
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(
|
|
215
|
-
group: pathArray.
|
|
213
|
+
path: pathArray.slice(),
|
|
214
|
+
group: pathArray[pathArray.length - 1]
|
|
216
215
|
};
|
|
217
216
|
});
|
|
218
217
|
};
|
|
@@ -417,14 +416,18 @@ const processTreeDataRows = (rows, queryOptions, serverOptions, columnsWithDefau
|
|
|
417
416
|
let childRowsWithDescendantCounts = childRows.map(row => {
|
|
418
417
|
const descendants = findTreeDataRowChildren(filteredRows, row[pathKey], pathKey, -1);
|
|
419
418
|
const descendantCount = descendants.length;
|
|
419
|
+
const children = findTreeDataRowChildren(filteredRows, row[pathKey], pathKey, 1);
|
|
420
|
+
const childrenCount = children.length;
|
|
420
421
|
if (descendantCount > 0 && queryOptions.aggregationModel) {
|
|
421
422
|
// Parent row, compute aggregation
|
|
422
423
|
return (0, _extends2.default)({}, row, {
|
|
423
|
-
descendantCount
|
|
424
|
+
descendantCount,
|
|
425
|
+
childrenCount
|
|
424
426
|
}, applyAggregation(queryOptions.aggregationModel, columnsWithDefaultColDef, descendants, row.id));
|
|
425
427
|
}
|
|
426
428
|
return (0, _extends2.default)({}, row, {
|
|
427
|
-
descendantCount
|
|
429
|
+
descendantCount,
|
|
430
|
+
childrenCount
|
|
428
431
|
});
|
|
429
432
|
});
|
|
430
433
|
if (queryOptions.sortModel) {
|
|
@@ -436,15 +439,21 @@ const processTreeDataRows = (rows, queryOptions, serverOptions, columnsWithDefau
|
|
|
436
439
|
if (queryOptions.aggregationModel) {
|
|
437
440
|
aggregateRow = applyAggregation(queryOptions.aggregationModel, columnsWithDefaultColDef, filteredRows);
|
|
438
441
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
|
|
442
|
+
|
|
443
|
+
// Apply pagination using start/end if provided, otherwise fall back to paginationModel
|
|
444
|
+
if (queryOptions.groupKeys.length === 0 || nestedPagination) {
|
|
445
|
+
if (queryOptions.start !== undefined && queryOptions.end !== undefined) {
|
|
446
|
+
// Use start/end for range-based pagination (needed for nested lazy loading)
|
|
447
|
+
childRowsWithDescendantCounts = childRowsWithDescendantCounts.slice(queryOptions.start, queryOptions.end + 1);
|
|
448
|
+
} else if (queryOptions.paginationModel) {
|
|
449
|
+
// Fall back to paginationModel for backward compatibility
|
|
450
|
+
const {
|
|
451
|
+
pageSize,
|
|
452
|
+
page
|
|
453
|
+
} = queryOptions.paginationModel;
|
|
454
|
+
if (pageSize < childRowsWithDescendantCounts.length) {
|
|
455
|
+
childRowsWithDescendantCounts = childRowsWithDescendantCounts.slice(page * pageSize, page * pageSize + pageSize);
|
|
456
|
+
}
|
|
448
457
|
}
|
|
449
458
|
}
|
|
450
459
|
return new Promise(resolve => {
|
|
@@ -462,7 +471,7 @@ const processTreeDataRows = (rows, queryOptions, serverOptions, columnsWithDefau
|
|
|
462
471
|
* Simulates server data for row grouping feature
|
|
463
472
|
*/
|
|
464
473
|
exports.processTreeDataRows = processTreeDataRows;
|
|
465
|
-
const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDefaultColDef) => {
|
|
474
|
+
const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDefaultColDef, nestedPagination) => {
|
|
466
475
|
const {
|
|
467
476
|
minDelay = 100,
|
|
468
477
|
maxDelay = 300
|
|
@@ -478,7 +487,7 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
|
|
|
478
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));
|
|
479
488
|
}
|
|
480
489
|
const delay = (0, _randomGenerator.randomInt)(minDelay, maxDelay);
|
|
481
|
-
const pathsToAutogenerate = new
|
|
490
|
+
const pathsToAutogenerate = new Map();
|
|
482
491
|
let rowsWithPaths = rows;
|
|
483
492
|
const rowsWithMissingGroups = [];
|
|
484
493
|
|
|
@@ -490,13 +499,22 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
|
|
|
490
499
|
const colDef = columnsWithDefaultColDef.find(({
|
|
491
500
|
field: f
|
|
492
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
|
+
}
|
|
493
511
|
if (colDef?.groupingValueGetter) {
|
|
494
|
-
return String(colDef.groupingValueGetter(
|
|
512
|
+
return String(colDef.groupingValueGetter(rawValue, row, colDef, apiRef));
|
|
495
513
|
}
|
|
496
514
|
if (colDef?.valueGetter) {
|
|
497
|
-
return String(colDef.valueGetter(
|
|
515
|
+
return String(colDef.valueGetter(rawValue, row, colDef, apiRef));
|
|
498
516
|
}
|
|
499
|
-
return String(
|
|
517
|
+
return String(rawValue);
|
|
500
518
|
});
|
|
501
519
|
for (let index = 0; index < partialPath.length; index += 1) {
|
|
502
520
|
const value = partialPath[index];
|
|
@@ -509,9 +527,9 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
|
|
|
509
527
|
return acc;
|
|
510
528
|
}
|
|
511
529
|
const parentPath = partialPath.slice(0, index + 1);
|
|
512
|
-
const
|
|
513
|
-
if (!pathsToAutogenerate.has(
|
|
514
|
-
pathsToAutogenerate.
|
|
530
|
+
const key = JSON.stringify(parentPath);
|
|
531
|
+
if (!pathsToAutogenerate.has(key)) {
|
|
532
|
+
pathsToAutogenerate.set(key, parentPath);
|
|
515
533
|
}
|
|
516
534
|
}
|
|
517
535
|
acc.push((0, _extends2.default)({}, row, {
|
|
@@ -524,7 +542,7 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
|
|
|
524
542
|
path: ['']
|
|
525
543
|
}));
|
|
526
544
|
}
|
|
527
|
-
const autogeneratedRows = generateParentRows(pathsToAutogenerate);
|
|
545
|
+
const autogeneratedRows = generateParentRows(pathsToAutogenerate.values());
|
|
528
546
|
|
|
529
547
|
// apply plain filtering
|
|
530
548
|
const filteredRows = getTreeDataFilteredRows([...autogeneratedRows, ...rowsWithPaths, ...rowsWithMissingGroups], queryOptions.filterModel, columnsWithDefaultColDef);
|
|
@@ -546,14 +564,18 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
|
|
|
546
564
|
id
|
|
547
565
|
}) => typeof id !== 'string' || !id.startsWith('auto-generated-parent-'));
|
|
548
566
|
const descendantCount = descendants.length;
|
|
567
|
+
const children = findTreeDataRowChildren(filteredRows, row[pathKey], pathKey, 1);
|
|
568
|
+
const childrenCount = children.length;
|
|
549
569
|
if (descendantCount > 0 && queryOptions.aggregationModel) {
|
|
550
570
|
// Parent row, compute aggregation
|
|
551
571
|
return (0, _extends2.default)({}, row, {
|
|
552
|
-
descendantCount
|
|
572
|
+
descendantCount,
|
|
573
|
+
childrenCount
|
|
553
574
|
}, applyAggregation(queryOptions.aggregationModel, columnsWithDefaultColDef, descendants, row.id));
|
|
554
575
|
}
|
|
555
576
|
return (0, _extends2.default)({}, row, {
|
|
556
|
-
descendantCount
|
|
577
|
+
descendantCount,
|
|
578
|
+
childrenCount
|
|
557
579
|
});
|
|
558
580
|
});
|
|
559
581
|
if (queryOptions.sortModel) {
|
|
@@ -566,14 +588,21 @@ const processRowGroupingRows = (rows, queryOptions, serverOptions, columnsWithDe
|
|
|
566
588
|
if (queryOptions.aggregationModel) {
|
|
567
589
|
aggregateRow = applyAggregation(queryOptions.aggregationModel, columnsWithDefaultColDef, filteredRows);
|
|
568
590
|
}
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
if (
|
|
576
|
-
|
|
591
|
+
|
|
592
|
+
// Apply pagination using start/end if provided, otherwise fall back to paginationModel
|
|
593
|
+
if (queryOptions.groupKeys.length === 0 || nestedPagination) {
|
|
594
|
+
if (queryOptions.start !== undefined && queryOptions.end !== undefined) {
|
|
595
|
+
// Use start/end for range-based pagination (needed for nested lazy loading)
|
|
596
|
+
childRowsWithDescendantCounts = childRowsWithDescendantCounts.slice(queryOptions.start, queryOptions.end + 1);
|
|
597
|
+
} else if (queryOptions.paginationModel) {
|
|
598
|
+
// Fall back to paginationModel for backward compatibility
|
|
599
|
+
const {
|
|
600
|
+
pageSize,
|
|
601
|
+
page
|
|
602
|
+
} = queryOptions.paginationModel;
|
|
603
|
+
if (pageSize < childRowsWithDescendantCounts.length) {
|
|
604
|
+
childRowsWithDescendantCounts = childRowsWithDescendantCounts.slice(page * pageSize, (page + 1) * pageSize);
|
|
605
|
+
}
|
|
577
606
|
}
|
|
578
607
|
}
|
|
579
608
|
return new Promise(resolve => {
|
|
@@ -721,7 +750,7 @@ const processPivotingRows = (rows, queryOptions, serverOptions, columnsWithDefau
|
|
|
721
750
|
const pivotColumnKeys = Array.from(uniqueColumnGroups.keys());
|
|
722
751
|
|
|
723
752
|
// Add paths and generate parent rows based on `visibleRows` (pivot row fields)
|
|
724
|
-
const pathsToAutogenerate = new
|
|
753
|
+
const pathsToAutogenerate = new Map();
|
|
725
754
|
let rowsWithPaths = filteredRows;
|
|
726
755
|
const rowsWithMissingGroups = [];
|
|
727
756
|
if (visibleRows.length > 0) {
|
|
@@ -748,9 +777,9 @@ const processPivotingRows = (rows, queryOptions, serverOptions, columnsWithDefau
|
|
|
748
777
|
return acc;
|
|
749
778
|
}
|
|
750
779
|
const parentPath = partialPath.slice(0, index + 1);
|
|
751
|
-
const
|
|
752
|
-
if (!pathsToAutogenerate.has(
|
|
753
|
-
pathsToAutogenerate.
|
|
780
|
+
const key = JSON.stringify(parentPath);
|
|
781
|
+
if (!pathsToAutogenerate.has(key)) {
|
|
782
|
+
pathsToAutogenerate.set(key, parentPath);
|
|
754
783
|
}
|
|
755
784
|
}
|
|
756
785
|
acc.push((0, _extends2.default)({}, row, {
|
|
@@ -763,7 +792,7 @@ const processPivotingRows = (rows, queryOptions, serverOptions, columnsWithDefau
|
|
|
763
792
|
path: ['']
|
|
764
793
|
}));
|
|
765
794
|
}
|
|
766
|
-
const autogeneratedRows = generateParentRows(pathsToAutogenerate);
|
|
795
|
+
const autogeneratedRows = generateParentRows(pathsToAutogenerate.values());
|
|
767
796
|
|
|
768
797
|
// Apply tree data filtering to include missing parents and children
|
|
769
798
|
const filteredRowsWithGroups = getTreeDataFilteredRows([...autogeneratedRows, ...rowsWithPaths, ...rowsWithMissingGroups], queryOptions.filterModel, columnsWithDefaultColDef);
|