@mui/x-data-grid-premium 9.0.0-alpha.2 → 9.0.0-alpha.4
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 +246 -1
- package/DataGridPremium/DataGridPremium.js +14 -13
- package/DataGridPremium/DataGridPremium.mjs +8 -7
- package/components/GridAggregationHeader.js +3 -2
- package/components/GridAggregationHeader.mjs +3 -2
- package/components/GridPremiumToolbar.js +1 -1
- package/components/GridPremiumToolbar.mjs +1 -1
- package/components/columnMenu/menuItems/GridColumnMenuChartsItem.js +1 -1
- package/components/columnMenu/menuItems/GridColumnMenuChartsItem.mjs +1 -1
- package/hooks/features/aiAssistant/useGridAiAssistant.d.mts +1 -1
- package/hooks/features/aiAssistant/useGridAiAssistant.d.ts +1 -1
- package/hooks/features/aiAssistant/useGridAiAssistant.js +2 -3
- package/hooks/features/aiAssistant/useGridAiAssistant.mjs +2 -3
- package/hooks/features/chartsIntegration/useGridChartsIntegration.d.mts +2 -2
- package/hooks/features/chartsIntegration/useGridChartsIntegration.d.ts +2 -2
- package/hooks/features/chartsIntegration/useGridChartsIntegration.js +5 -5
- package/hooks/features/chartsIntegration/useGridChartsIntegration.mjs +5 -5
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/models/dataGridPremiumProps.d.mts +1 -3
- package/models/dataGridPremiumProps.d.ts +1 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,250 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.0.0-alpha.4
|
|
4
|
+
|
|
5
|
+
_Mar 19, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 🐞 Bugfixes and internal improvements
|
|
10
|
+
|
|
11
|
+
The following team members contributed to this release:
|
|
12
|
+
@aemartos, @alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @LukasTy, @mapache-salvaje, @michelengelen, @noraleonte, @rita-codes, @sai6855, @siriwatknp
|
|
13
|
+
|
|
14
|
+
### Data Grid
|
|
15
|
+
|
|
16
|
+
#### `@mui/x-data-grid@9.0.0-alpha.4`
|
|
17
|
+
|
|
18
|
+
- [DataGrid] Mark charts integration as stable (#21764) @JCQuintas
|
|
19
|
+
- [DataGrid] Move `elementOverrides` to constants and remove duplicates (#21618) @sai6855
|
|
20
|
+
- [DataGrid] Migrate from deprecated Material UI APIs (#21682) @siriwatknp
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
23
|
+
|
|
24
|
+
Same changes as in `@mui/x-data-grid@9.0.0-alpha.4`.
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-premium@9.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.4`.
|
|
29
|
+
|
|
30
|
+
### Date and Time Pickers
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-date-pickers@9.0.0-alpha.4`
|
|
33
|
+
|
|
34
|
+
- [pickers] Avoid stealing focus on click away (#13434) @LukasTy
|
|
35
|
+
- [pickers] Promote `fieldRef` to stable and add `clearValue` method (#21655) @michelengelen
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-date-pickers-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
38
|
+
|
|
39
|
+
Same changes as in `@mui/x-date-pickers@9.0.0-alpha.4`.
|
|
40
|
+
|
|
41
|
+
### Charts
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-charts@9.0.0-alpha.4`
|
|
44
|
+
|
|
45
|
+
- [charts] Add v9 chart series types and helper functions migration (#21009) @bernardobelchior
|
|
46
|
+
- [charts] Extract event listener to the layer container (#21751) @alexfauquette
|
|
47
|
+
- [charts] Fix WebGL print export canvas stretching (#21738) @JCQuintas
|
|
48
|
+
- [charts] Improve deprecation warnings (#21760) @alexfauquette
|
|
49
|
+
- [charts] Improve type safety in `identifierCleaner` (#21719) @bernardobelchior
|
|
50
|
+
- [charts] Make `preferStrictDomainInLineCharts` the default (#21744) @JCQuintas
|
|
51
|
+
- [charts] Move title and description to the layer container (#21757) @alexfauquette
|
|
52
|
+
- [charts] Refactor `FunnelChart` classes structure (#21652) @JCQuintas
|
|
53
|
+
- [charts] Refactor `Heatmap` classes structure (#21653) @JCQuintas
|
|
54
|
+
- [charts] Refactor `RadarChart` classes structure (#21650) @JCQuintas
|
|
55
|
+
- [charts] Refactor `SankeyChart` classes structure (#21654) @JCQuintas
|
|
56
|
+
- [charts] Refactor legend getters to use utility functions (#21628) @sai6855
|
|
57
|
+
- [charts] Remove deprecated `ChartContainer` and `ChartDataProvider` (#21777) @alexfauquette
|
|
58
|
+
- [charts] Remove deprecated `itemId` from `SeriesLegendItemContext` (#21788) @alexfauquette
|
|
59
|
+
- [charts] Remove deprecated `useMouseTracker()` (#21787) @alexfauquette
|
|
60
|
+
- [charts] Remove deprecated classes (#21775) @alexfauquette
|
|
61
|
+
- [charts] Remove deprecated props from PieArcLabel animation (#21789) @alexfauquette
|
|
62
|
+
- [charts] Remove get*UtilityClass from public exports (#21769) @JCQuintas
|
|
63
|
+
- [charts] Remove the deprecated `disableHover` property (#21785) @alexfauquette
|
|
64
|
+
- [charts] Remove the deprecated `message` prop (#21784) @alexfauquette
|
|
65
|
+
- [charts] Remove deprecated props about voronoi (#21796) @alexfauquette
|
|
66
|
+
- [charts] Remove deprecated pieArcClasses (#21795) @alexfauquette
|
|
67
|
+
- [charts] Rename `data-series-id` by `data-series` (#21761) @alexfauquette
|
|
68
|
+
- [charts] Rename `voronoiMaxRadius`/`disableVoronoi` to `hitAreaRadius`/`disableHitArea` (#21750) @bernardobelchior
|
|
69
|
+
- [charts] Update pt-PT locale (#21296) @bernardobelchior
|
|
70
|
+
- [charts] Use different shape per series by default (#21713) @alexfauquette
|
|
71
|
+
- [charts] Add className prop to Radar components (#21794) @JCQuintas
|
|
72
|
+
- [charts] Add className prop to shared chart components (#21792) @JCQuintas
|
|
73
|
+
- [charts] Add className prop to BarPlot (#21791) @JCQuintas
|
|
74
|
+
- [charts] Portal tooltip into ChartsLayerContainer (#21801) @JCQuintas
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-charts-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
77
|
+
|
|
78
|
+
Same changes as in `@mui/x-charts@9.0.0-alpha.4`, plus:
|
|
79
|
+
|
|
80
|
+
- [charts-pro] Allow `brush` interaction to accept `requiredKeys/pointerMode` (#21716) @JCQuintas
|
|
81
|
+
- [charts-pro] Remove deprecated `onAxisClick` for Heatmap (#21786) @alexfauquette
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-charts-premium@9.0.0-alpha.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
84
|
+
|
|
85
|
+
Same changes as in `@mui/x-charts-pro@9.0.0-alpha.4`, plus:
|
|
86
|
+
|
|
87
|
+
- [charts-premium] Add candlestick chart (#21129) @bernardobelchior
|
|
88
|
+
|
|
89
|
+
### Tree View
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view@9.0.0-alpha.4`
|
|
92
|
+
|
|
93
|
+
Internal changes.
|
|
94
|
+
|
|
95
|
+
#### `@mui/x-tree-view-pro@9.0.0-alpha.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
96
|
+
|
|
97
|
+
Same changes as in `@mui/x-tree-view@9.0.0-alpha.4`.
|
|
98
|
+
|
|
99
|
+
### Codemod
|
|
100
|
+
|
|
101
|
+
#### `@mui/x-codemod@9.0.0-alpha.4`
|
|
102
|
+
|
|
103
|
+
Internal changes.
|
|
104
|
+
|
|
105
|
+
### Docs
|
|
106
|
+
|
|
107
|
+
- [docs-infra] Exclude `ServerSideLazyLoadingRevalidation` from argos (#21734) @sai6855
|
|
108
|
+
- [docs] Update charts v9 migration guide to include premium package (#21743) @bernardobelchior
|
|
109
|
+
- [docs] Update v9 migration guides to install next tag (#21741) @bernardobelchior
|
|
110
|
+
- [docs] Revise the Pie chart docs (#21565) @mapache-salvaje
|
|
111
|
+
- [docs] Revise the Bar Chart docs (#21482) @mapache-salvaje
|
|
112
|
+
- [docs] Removed a `console.log` from an aggregation demo (#21698) @michelengelen
|
|
113
|
+
|
|
114
|
+
### Core
|
|
115
|
+
|
|
116
|
+
- [code-infra] Add pkg-pr-new as dev dependency (#21754) @Janpot
|
|
117
|
+
- [code-infra] Prevent `combiner` to have default parameters (#21707) @JCQuintas
|
|
118
|
+
- [code-infra] Remove CI coverage collection and upload to Codecov (#21671) @Janpot
|
|
119
|
+
- [internal] Remove @bernardobelchior from Charts CODEOWNERS (#21776) @Copilot
|
|
120
|
+
|
|
121
|
+
### Miscellaneous
|
|
122
|
+
|
|
123
|
+
- [x-license] Fix process.env.MUI_VERSION not being replaced during build (#21727) @aemartos
|
|
124
|
+
- [x-license] Add new watermark license status message (#21720) @aemartos
|
|
125
|
+
|
|
126
|
+
## 9.0.0-alpha.3
|
|
127
|
+
|
|
128
|
+
_Mar 12, 2026_
|
|
129
|
+
|
|
130
|
+
We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
131
|
+
|
|
132
|
+
- 🐞 Bugfixes and internal improvements
|
|
133
|
+
|
|
134
|
+
The following team members contributed to this release:
|
|
135
|
+
@aemartos, @alexfauquette, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @MBilalShafi, @michelengelen, @rita-codes, @sai6855, @siriwatknp
|
|
136
|
+
|
|
137
|
+
### Data Grid
|
|
138
|
+
|
|
139
|
+
#### `@mui/x-data-grid@9.0.0-alpha.3`
|
|
140
|
+
|
|
141
|
+
- [DataGrid] Fix crash when `rows` and `rowModesModel` are updated simultaneously (#21265) @michelengelen
|
|
142
|
+
- [DataGrid] Add missing `resizablePanelHandle` classes to `gridClasses` object (#21538) @sai6855
|
|
143
|
+
- [DataGrid] Refactor `headerAlign` style calls (#21541) @sai6855
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-data-grid-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
146
|
+
|
|
147
|
+
Same changes as in `@mui/x-data-grid@9.0.0-alpha.3`, plus:
|
|
148
|
+
|
|
149
|
+
- [DataGridPro] Add `role="presentation"` to detail panel toggle header content (#21634) @michelengelen
|
|
150
|
+
- [DataGridPro] Fix sorting not reflected in nested server-side data (#21619) @MBilalShafi
|
|
151
|
+
|
|
152
|
+
#### `@mui/x-data-grid-premium@9.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
153
|
+
|
|
154
|
+
Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.3`.
|
|
155
|
+
|
|
156
|
+
### Date and Time Pickers
|
|
157
|
+
|
|
158
|
+
#### `@mui/x-date-pickers@9.0.0-alpha.3`
|
|
159
|
+
|
|
160
|
+
- [pickers] Refactor `DateRangePickerDay` overrides to use a centralized `elementOverrides` object (#21426) @sai6855
|
|
161
|
+
- [pickers] Migrate from deprecated props for `PickersModalDialog` (#21702) @siriwatknp
|
|
162
|
+
|
|
163
|
+
#### `@mui/x-date-pickers-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
164
|
+
|
|
165
|
+
Same changes as in `@mui/x-date-pickers@9.0.0-alpha.3`.
|
|
166
|
+
|
|
167
|
+
### Charts
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-charts@9.0.0-alpha.3`
|
|
170
|
+
|
|
171
|
+
- [charts] Differentiate Line Plot roots classes (#21679) @JCQuintas
|
|
172
|
+
- [charts] Enable keyboard navigation by default (#21675) @alexfauquette
|
|
173
|
+
- [charts] Fix keyboard tooltip radar (#21667) @alexfauquette
|
|
174
|
+
- [charts] Fix selector default parameter (#21638) @JCQuintas
|
|
175
|
+
- [charts] Fix tooltip blink between node and pointer anchor (#21611) @alexfauquette
|
|
176
|
+
- [charts] Let tooltip and legend reflect the line shape (#21475) @alexfauquette
|
|
177
|
+
- [charts] Refactor `BarChart` classes structure (#21601) @JCQuintas
|
|
178
|
+
- [charts] Refactor `LineChart` classes structure (#21648) @JCQuintas
|
|
179
|
+
- [charts] Refactor `ScatterChart` classes structure (#21651) @JCQuintas
|
|
180
|
+
- [charts] Refactor `PieChart` classes structure (#21649) @JCQuintas
|
|
181
|
+
- [charts] Remove batch rendering checks in highlight selectors (#21646) @bernardobelchior
|
|
182
|
+
- [charts] Standardize generic arg names to `SeriesType` (#21694) @alexfauquette
|
|
183
|
+
- [charts] Simplify highlight hooks return types (#21695) @alexfauquette
|
|
184
|
+
|
|
185
|
+
#### `@mui/x-charts-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
186
|
+
|
|
187
|
+
Same changes as in `@mui/x-charts@9.0.0-alpha.3`, plus:
|
|
188
|
+
|
|
189
|
+
- [charts-pro] Fix heatmap style override from `arc` to `cell` (#21693) @Copilot
|
|
190
|
+
- [charts-pro] Fix image export truncated when page is zoomed out (#21685) @bernardobelchior
|
|
191
|
+
- [charts-pro] Speed-up heatmap cell search with an index lookup (#21130) @alexfauquette
|
|
192
|
+
- [charts-pro] Fix heatmap highlight not working (#21710) @Copilot
|
|
193
|
+
|
|
194
|
+
#### `@mui/x-charts-premium@9.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
195
|
+
|
|
196
|
+
Same changes as in `@mui/x-charts-pro@9.0.0-alpha.3`, plus:
|
|
197
|
+
|
|
198
|
+
- [charts-premium] Re-enable WebGL tests (#21708) @bernardobelchior
|
|
199
|
+
|
|
200
|
+
### Tree View
|
|
201
|
+
|
|
202
|
+
#### Breaking changes
|
|
203
|
+
|
|
204
|
+
- Remove `TreeViewBaseItem` type (use `TreeViewDefaultItemModelProperties` or a custom interface)
|
|
205
|
+
- Remove `useTreeViewApiRef` hook (use `useRichTreeViewApiRef`, `useSimpleTreeViewApiRef`, or `useRichTreeViewProApiRef`)
|
|
206
|
+
- Remove `status` from content slot props returned by `getContentProps()` (use `data-*` attributes; `status` on `useTreeItem` return value is unchanged)
|
|
207
|
+
- Remove deprecated CSS state classes from `treeItemClasses`: `expanded`, `selected`, `focused`, `disabled`, `editable`, `editing` (use `[data-expanded]`, `[data-selected]`, etc.)
|
|
208
|
+
- The `<RichTreeViewPro />` component has now virtualization enabled by default.
|
|
209
|
+
- The items used inside the `<RichTreeViewPro />` now have a default height of `32px`.
|
|
210
|
+
- The events of the `<RichTreeViewPro />` are now rendered as a flat list instead of a nested tree.
|
|
211
|
+
|
|
212
|
+
#### `@mui/x-tree-view@9.0.0-alpha.3`
|
|
213
|
+
|
|
214
|
+
- [tree view] Remove deprecated APIs (#21591) @flaviendelangle
|
|
215
|
+
- [tree view] Fix collapsed children not selected with `selectionPropagation.descendants` in `SimpleTreeView` (#21253) @flaviendelangle
|
|
216
|
+
|
|
217
|
+
#### `@mui/x-tree-view-pro@9.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
218
|
+
|
|
219
|
+
Same changes as in `@mui/x-tree-view@9.0.0-alpha.3`, plus:
|
|
220
|
+
|
|
221
|
+
- [RichTreeViewPro] Make the virtualization opt-out and port the layout doc from the data grid (#21461) @flaviendelangle
|
|
222
|
+
|
|
223
|
+
### Codemod
|
|
224
|
+
|
|
225
|
+
#### `@mui/x-codemod@9.0.0-alpha.3`
|
|
226
|
+
|
|
227
|
+
Internal changes.
|
|
228
|
+
|
|
229
|
+
### Docs
|
|
230
|
+
|
|
231
|
+
- [docs] Fix `AssistantWithDataSource` demo crashing (#21555) @sai6855
|
|
232
|
+
- [docs] Remove `Preview` pill from Sankey (#21623) @bernardobelchior
|
|
233
|
+
- [docs] Migrate internal Material UI deprecated APIs (#21680) @siriwatknp
|
|
234
|
+
- [docs] Remove `New` flag on Tree View and Date and Time Pickers features released before v9 alpha (#21585) @flaviendelangle
|
|
235
|
+
|
|
236
|
+
### Core
|
|
237
|
+
|
|
238
|
+
- [code-infra] Remove checkout step (#21688) @Janpot
|
|
239
|
+
- [code-infra] Fix contributor generation in changelog (#21718) @brijeshb42
|
|
240
|
+
- [docs-infra] Do not point to non-existent v8 subdomain (#21640) @cherniavskii
|
|
241
|
+
|
|
242
|
+
### Miscellaneous
|
|
243
|
+
|
|
244
|
+
- [test] Add missing tests for forwarding props to filter operators in DataGrid (#21441) @siriwatknp
|
|
245
|
+
- [x-license] Export additional license types and constants (#21625) @aemartos
|
|
246
|
+
- [x-license] Refactor license verification to accept package info object and add v9 version gating (#21690) @aemartos
|
|
247
|
+
|
|
3
248
|
## 9.0.0-alpha.2
|
|
4
249
|
|
|
5
250
|
_Mar 5, 2026_
|
|
@@ -92,7 +337,7 @@ Internal changes.
|
|
|
92
337
|
|
|
93
338
|
- [docs] Add backticks and parentheses to all functions and hooks (DX-173) (#21496) @mapache-salvaje
|
|
94
339
|
- [docs] Remove mentions of `mySvgRef` (#21559) @bernardobelchior
|
|
95
|
-
- [docs] Update Roadmap section in the docs
|
|
340
|
+
- [docs] Update Roadmap section in the docs (#20892) @alelthomas
|
|
96
341
|
- [docs] Add tutorial and example app for aggregation with row grouping (DX-162) (#21102) @mapache-salvaje
|
|
97
342
|
- [docs] Fix missing codemod docs (#21604) @JCQuintas
|
|
98
343
|
|
|
@@ -10,10 +10,9 @@ exports.DataGridPremium = void 0;
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var
|
|
14
|
-
var _Watermark = require("@mui/x-license/Watermark");
|
|
13
|
+
var _internals = require("@mui/x-license/internals");
|
|
15
14
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
16
|
-
var
|
|
15
|
+
var _internals2 = require("@mui/x-data-grid-pro/internals");
|
|
17
16
|
var _material = require("@mui/x-data-grid/material");
|
|
18
17
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
19
18
|
var _useDataGridPremiumComponent = require("./useDataGridPremiumComponent");
|
|
@@ -44,29 +43,32 @@ const configuration = {
|
|
|
44
43
|
if (props.aggregationRowsScope === 'all') {
|
|
45
44
|
return apiRef.current.getRowValue(row, column);
|
|
46
45
|
}
|
|
47
|
-
return (0,
|
|
46
|
+
return (0, _internals2.getRowValue)(row, column, apiRef);
|
|
48
47
|
},
|
|
49
48
|
useIsCellEditable: _useGridCellEditable.useIsCellEditable,
|
|
50
49
|
useGridRowsOverridableMethods: _useGridRowsOverridableMethods.useGridRowsOverridableMethods,
|
|
51
50
|
useGridParamsOverridableMethods: _useGridParamsOverridableMethods.useGridParamsOverridableMethods
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
const packageInfo = {
|
|
54
|
+
releaseDate: "MTc3Mzk2NDgwMDAwMA==",
|
|
55
|
+
version: "9.0.0-alpha.4",
|
|
56
|
+
name: 'x-data-grid-premium'
|
|
57
|
+
};
|
|
58
|
+
const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.Watermark, {
|
|
59
|
+
packageInfo: packageInfo
|
|
58
60
|
});
|
|
59
61
|
let dataGridPremiumPropValidators;
|
|
60
62
|
if (process.env.NODE_ENV !== 'production') {
|
|
61
|
-
dataGridPremiumPropValidators = [...
|
|
63
|
+
dataGridPremiumPropValidators = [..._internals2.propValidatorsDataGrid, ..._internals2.propValidatorsDataGridPro];
|
|
62
64
|
}
|
|
63
65
|
const DataGridPremiumRaw = (0, _forwardRef.forwardRef)(function DataGridPremium(inProps, ref) {
|
|
64
66
|
const initialProps = (0, _useDataGridPremiumProps.useDataGridPremiumProps)(inProps);
|
|
65
|
-
const privateApiRef = (0,
|
|
67
|
+
const privateApiRef = (0, _internals2.useGridApiInitialization)(initialProps.apiRef, initialProps);
|
|
66
68
|
const props = (0, _useDataGridPremiumComponent.useDataGridPremiumComponent)(privateApiRef, initialProps, configuration);
|
|
67
|
-
(0,
|
|
69
|
+
(0, _internals.useLicenseVerifier)(packageInfo);
|
|
68
70
|
if (process.env.NODE_ENV !== 'production') {
|
|
69
|
-
(0,
|
|
71
|
+
(0, _internals2.validateProps)(props, dataGridPremiumPropValidators);
|
|
70
72
|
}
|
|
71
73
|
const sidebarOpen = (0, _xDataGridPro.useGridSelector)(privateApiRef, _sidebar2.gridSidebarOpenSelector);
|
|
72
74
|
const sidePanel = sidebarOpen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sidebar.Sidebar, {}) : null;
|
|
@@ -499,7 +501,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
499
501
|
* For each feature, if the flag is not explicitly set to `true`, then the feature is fully disabled, and neither property nor method calls will have any effect.
|
|
500
502
|
*/
|
|
501
503
|
experimentalFeatures: _propTypes.default.shape({
|
|
502
|
-
charts: _propTypes.default.bool,
|
|
503
504
|
warnIfFocusStateIsNotSynced: _propTypes.default.bool
|
|
504
505
|
}),
|
|
505
506
|
/**
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { useLicenseVerifier } from '@mui/x-license/
|
|
7
|
-
import { Watermark } from '@mui/x-license/Watermark';
|
|
6
|
+
import { useLicenseVerifier, Watermark } from '@mui/x-license/internals';
|
|
8
7
|
import { GridRoot, GridContextProvider, useGridSelector } from '@mui/x-data-grid-pro';
|
|
9
8
|
import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps, useGridApiInitialization, getRowValue } from '@mui/x-data-grid-pro/internals';
|
|
10
9
|
import { useMaterialCSSVariables } from '@mui/x-data-grid/material';
|
|
@@ -44,10 +43,13 @@ const configuration = {
|
|
|
44
43
|
useGridParamsOverridableMethods
|
|
45
44
|
}
|
|
46
45
|
};
|
|
47
|
-
const
|
|
46
|
+
const packageInfo = {
|
|
47
|
+
releaseDate: "MTc3Mzk2NDgwMDAwMA==",
|
|
48
|
+
version: "9.0.0-alpha.4",
|
|
49
|
+
name: 'x-data-grid-premium'
|
|
50
|
+
};
|
|
48
51
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
49
|
-
|
|
50
|
-
releaseInfo: releaseInfo
|
|
52
|
+
packageInfo: packageInfo
|
|
51
53
|
});
|
|
52
54
|
let dataGridPremiumPropValidators;
|
|
53
55
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -57,7 +59,7 @@ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
|
|
|
57
59
|
const initialProps = useDataGridPremiumProps(inProps);
|
|
58
60
|
const privateApiRef = useGridApiInitialization(initialProps.apiRef, initialProps);
|
|
59
61
|
const props = useDataGridPremiumComponent(privateApiRef, initialProps, configuration);
|
|
60
|
-
useLicenseVerifier(
|
|
62
|
+
useLicenseVerifier(packageInfo);
|
|
61
63
|
if (process.env.NODE_ENV !== 'production') {
|
|
62
64
|
validateProps(props, dataGridPremiumPropValidators);
|
|
63
65
|
}
|
|
@@ -492,7 +494,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
492
494
|
* For each feature, if the flag is not explicitly set to `true`, then the feature is fully disabled, and neither property nor method calls will have any effect.
|
|
493
495
|
*/
|
|
494
496
|
experimentalFeatures: PropTypes.shape({
|
|
495
|
-
charts: PropTypes.bool,
|
|
496
497
|
warnIfFocusStateIsNotSynced: PropTypes.bool
|
|
497
498
|
}),
|
|
498
499
|
/**
|
|
@@ -8,6 +8,7 @@ exports.GridAggregationHeader = GridAggregationHeader;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
10
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
11
|
+
var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
|
|
11
12
|
var _styles = require("@mui/material/styles");
|
|
12
13
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
13
14
|
var _internals = require("@mui/x-data-grid/internals");
|
|
@@ -23,7 +24,7 @@ const GridAggregationHeaderRoot = (0, _styles.styled)('div', {
|
|
|
23
24
|
const {
|
|
24
25
|
ownerState
|
|
25
26
|
} = props;
|
|
26
|
-
return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign
|
|
27
|
+
return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign && styles[`aggregationColumnHeader--align${(0, _capitalize.default)(ownerState.colDef.headerAlign)}`]];
|
|
27
28
|
}
|
|
28
29
|
})({
|
|
29
30
|
display: 'flex',
|
|
@@ -50,7 +51,7 @@ const useUtilityClasses = ownerState => {
|
|
|
50
51
|
colDef
|
|
51
52
|
} = ownerState;
|
|
52
53
|
const slots = {
|
|
53
|
-
root: ['aggregationColumnHeader', colDef.headerAlign
|
|
54
|
+
root: ['aggregationColumnHeader', colDef.headerAlign && `aggregationColumnHeader--align${(0, _capitalize.default)(colDef.headerAlign)}`],
|
|
54
55
|
aggregationLabel: ['aggregationColumnHeaderLabel']
|
|
55
56
|
};
|
|
56
57
|
return (0, _composeClasses.default)(slots, _xDataGrid.getDataGridUtilityClass, classes);
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["renderHeader"];
|
|
4
4
|
import composeClasses from '@mui/utils/composeClasses';
|
|
5
|
+
import capitalize from '@mui/utils/capitalize';
|
|
5
6
|
import { styled } from '@mui/material/styles';
|
|
6
7
|
import { getDataGridUtilityClass, gridClasses, GridColumnHeaderTitle } from '@mui/x-data-grid';
|
|
7
8
|
import { vars } from '@mui/x-data-grid/internals';
|
|
@@ -16,7 +17,7 @@ const GridAggregationHeaderRoot = styled('div', {
|
|
|
16
17
|
const {
|
|
17
18
|
ownerState
|
|
18
19
|
} = props;
|
|
19
|
-
return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign
|
|
20
|
+
return [styles.aggregationColumnHeader, ownerState.colDef.headerAlign && styles[`aggregationColumnHeader--align${capitalize(ownerState.colDef.headerAlign)}`]];
|
|
20
21
|
}
|
|
21
22
|
})({
|
|
22
23
|
display: 'flex',
|
|
@@ -43,7 +44,7 @@ const useUtilityClasses = ownerState => {
|
|
|
43
44
|
colDef
|
|
44
45
|
} = ownerState;
|
|
45
46
|
const slots = {
|
|
46
|
-
root: ['aggregationColumnHeader', colDef.headerAlign
|
|
47
|
+
root: ['aggregationColumnHeader', colDef.headerAlign && `aggregationColumnHeader--align${capitalize(colDef.headerAlign)}`],
|
|
47
48
|
aggregationLabel: ['aggregationColumnHeaderLabel']
|
|
48
49
|
};
|
|
49
50
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
@@ -86,7 +86,7 @@ function GridPremiumToolbar(props) {
|
|
|
86
86
|
})
|
|
87
87
|
}))
|
|
88
88
|
})
|
|
89
|
-
}), rootProps.
|
|
89
|
+
}), rootProps.chartsIntegration && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsPanelTrigger.ChartsPanelTrigger, {
|
|
90
90
|
render: triggerProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseTooltip, {
|
|
91
91
|
title: apiRef.current.getLocaleText('toolbarCharts'),
|
|
92
92
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.ToolbarButton, (0, _extends2.default)({}, triggerProps, {
|
|
@@ -78,7 +78,7 @@ export function GridPremiumToolbar(props) {
|
|
|
78
78
|
})
|
|
79
79
|
}))
|
|
80
80
|
})
|
|
81
|
-
}), rootProps.
|
|
81
|
+
}), rootProps.chartsIntegration && /*#__PURE__*/_jsx(ChartsPanelTrigger, {
|
|
82
82
|
render: triggerProps => /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {
|
|
83
83
|
title: apiRef.current.getLocaleText('toolbarCharts'),
|
|
84
84
|
children: /*#__PURE__*/_jsx(ToolbarButton, _extends({}, triggerProps, {
|
|
@@ -22,7 +22,7 @@ function GridColumnMenuChartsItem(props) {
|
|
|
22
22
|
onClick(event);
|
|
23
23
|
apiRef.current.setChartsPanelOpen(true);
|
|
24
24
|
};
|
|
25
|
-
if (!rootProps.
|
|
25
|
+
if (!rootProps.chartsIntegration) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
@@ -15,7 +15,7 @@ export function GridColumnMenuChartsItem(props) {
|
|
|
15
15
|
onClick(event);
|
|
16
16
|
apiRef.current.setChartsPanelOpen(true);
|
|
17
17
|
};
|
|
18
|
-
if (!rootProps.
|
|
18
|
+
if (!rootProps.chartsIntegration) {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
return /*#__PURE__*/_jsx(rootProps.slots.baseMenuItem, {
|
|
@@ -3,4 +3,4 @@ import { type GridStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
|
3
3
|
import type { GridPrivateApiPremium } from "../../../models/gridApiPremium.mjs";
|
|
4
4
|
import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.mjs";
|
|
5
5
|
export declare const aiAssistantStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'initialState' | 'aiAssistantConversations' | 'aiAssistant'>>;
|
|
6
|
-
export declare const useGridAiAssistant: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aiAssistant" | "aiAssistantConversations" | "aiAssistantActiveConversationIndex" | "allowAiAssistantDataSampling" | "onAiAssistantConversationsChange" | "onAiAssistantActiveConversationIndexChange" | "onPrompt" | "slots" | "rowSelection" | "disableColumnFilter" | "disableRowGrouping" | "disableAggregation" | "disableColumnSorting" | "disablePivoting" | "chartsIntegration" | "
|
|
6
|
+
export declare const useGridAiAssistant: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aiAssistant" | "aiAssistantConversations" | "aiAssistantActiveConversationIndex" | "allowAiAssistantDataSampling" | "onAiAssistantConversationsChange" | "onAiAssistantActiveConversationIndexChange" | "onPrompt" | "slots" | "rowSelection" | "disableColumnFilter" | "disableRowGrouping" | "disableAggregation" | "disableColumnSorting" | "disablePivoting" | "chartsIntegration" | "getPivotDerivedColumns">) => void;
|
|
@@ -3,4 +3,4 @@ import { type GridStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
|
3
3
|
import type { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
4
4
|
import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
|
|
5
5
|
export declare const aiAssistantStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'initialState' | 'aiAssistantConversations' | 'aiAssistant'>>;
|
|
6
|
-
export declare const useGridAiAssistant: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aiAssistant" | "aiAssistantConversations" | "aiAssistantActiveConversationIndex" | "allowAiAssistantDataSampling" | "onAiAssistantConversationsChange" | "onAiAssistantActiveConversationIndexChange" | "onPrompt" | "slots" | "rowSelection" | "disableColumnFilter" | "disableRowGrouping" | "disableAggregation" | "disableColumnSorting" | "disablePivoting" | "chartsIntegration" | "
|
|
6
|
+
export declare const useGridAiAssistant: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "aiAssistant" | "aiAssistantConversations" | "aiAssistantActiveConversationIndex" | "allowAiAssistantDataSampling" | "onAiAssistantConversationsChange" | "onAiAssistantActiveConversationIndexChange" | "onPrompt" | "slots" | "rowSelection" | "disableColumnFilter" | "disableRowGrouping" | "disableAggregation" | "disableColumnSorting" | "disablePivoting" | "chartsIntegration" | "getPivotDerivedColumns">) => void;
|
|
@@ -47,7 +47,6 @@ const useGridAiAssistant = (apiRef, props) => {
|
|
|
47
47
|
disableColumnSorting,
|
|
48
48
|
disablePivoting,
|
|
49
49
|
chartsIntegration,
|
|
50
|
-
experimentalFeatures,
|
|
51
50
|
getPivotDerivedColumns
|
|
52
51
|
} = props;
|
|
53
52
|
const previousUnwrappedGroupingModel = React.useRef([]);
|
|
@@ -217,7 +216,7 @@ const useGridAiAssistant = (apiRef, props) => {
|
|
|
217
216
|
} else {
|
|
218
217
|
result.sorting = [];
|
|
219
218
|
}
|
|
220
|
-
if (
|
|
219
|
+
if (chartsIntegration && activeChartId && result.chart) {
|
|
221
220
|
if (appliedPivoting) {
|
|
222
221
|
const unsubscribe = apiRef.current.subscribeEvent('rowsSet', () => {
|
|
223
222
|
const unwrappedGroupingModel = Object.keys((0, _xDataGridPro.gridColumnGroupsUnwrappedModelSelector)(apiRef));
|
|
@@ -256,7 +255,7 @@ const useGridAiAssistant = (apiRef, props) => {
|
|
|
256
255
|
apiRef.current.setRowSelectionModel(rowSelectionModel);
|
|
257
256
|
const targetIndex = Number(columnsLookup[_xDataGridPro.GRID_CHECKBOX_SELECTION_FIELD] !== undefined) + Number(result.grouping.length);
|
|
258
257
|
interestColumns.reverse().forEach(c => apiRef.current.setColumnIndex(c, targetIndex));
|
|
259
|
-
}, [apiRef, updateChart, rowSelection, disableColumnFilter, disableRowGrouping, disableAggregation, disableColumnSorting, disablePivoting, columnsLookup, isAiAssistantAvailable, activeChartId, chartsIntegration
|
|
258
|
+
}, [apiRef, updateChart, rowSelection, disableColumnFilter, disableRowGrouping, disableAggregation, disableColumnSorting, disablePivoting, columnsLookup, isAiAssistantAvailable, activeChartId, chartsIntegration]);
|
|
260
259
|
const setActiveConversationId = React.useCallback(id => {
|
|
261
260
|
if (!isAiAssistantAvailable) {
|
|
262
261
|
return;
|
|
@@ -39,7 +39,6 @@ export const useGridAiAssistant = (apiRef, props) => {
|
|
|
39
39
|
disableColumnSorting,
|
|
40
40
|
disablePivoting,
|
|
41
41
|
chartsIntegration,
|
|
42
|
-
experimentalFeatures,
|
|
43
42
|
getPivotDerivedColumns
|
|
44
43
|
} = props;
|
|
45
44
|
const previousUnwrappedGroupingModel = React.useRef([]);
|
|
@@ -209,7 +208,7 @@ export const useGridAiAssistant = (apiRef, props) => {
|
|
|
209
208
|
} else {
|
|
210
209
|
result.sorting = [];
|
|
211
210
|
}
|
|
212
|
-
if (
|
|
211
|
+
if (chartsIntegration && activeChartId && result.chart) {
|
|
213
212
|
if (appliedPivoting) {
|
|
214
213
|
const unsubscribe = apiRef.current.subscribeEvent('rowsSet', () => {
|
|
215
214
|
const unwrappedGroupingModel = Object.keys(gridColumnGroupsUnwrappedModelSelector(apiRef));
|
|
@@ -248,7 +247,7 @@ export const useGridAiAssistant = (apiRef, props) => {
|
|
|
248
247
|
apiRef.current.setRowSelectionModel(rowSelectionModel);
|
|
249
248
|
const targetIndex = Number(columnsLookup[GRID_CHECKBOX_SELECTION_FIELD] !== undefined) + Number(result.grouping.length);
|
|
250
249
|
interestColumns.reverse().forEach(c => apiRef.current.setColumnIndex(c, targetIndex));
|
|
251
|
-
}, [apiRef, updateChart, rowSelection, disableColumnFilter, disableRowGrouping, disableAggregation, disableColumnSorting, disablePivoting, columnsLookup, isAiAssistantAvailable, activeChartId, chartsIntegration
|
|
250
|
+
}, [apiRef, updateChart, rowSelection, disableColumnFilter, disableRowGrouping, disableAggregation, disableColumnSorting, disablePivoting, columnsLookup, isAiAssistantAvailable, activeChartId, chartsIntegration]);
|
|
252
251
|
const setActiveConversationId = React.useCallback(id => {
|
|
253
252
|
if (!isAiAssistantAvailable) {
|
|
254
253
|
return;
|
|
@@ -4,5 +4,5 @@ import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPrem
|
|
|
4
4
|
import type { GridPrivateApiPremium } from "../../../models/gridApiPremium.mjs";
|
|
5
5
|
import type { ChartState } from "../../../models/gridChartsIntegration.mjs";
|
|
6
6
|
export declare const EMPTY_CHART_INTEGRATION_CONTEXT_STATE: ChartState;
|
|
7
|
-
export declare const chartsIntegrationStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'chartsIntegration' | 'initialState' | 'activeChartId' | 'rowGroupingModel' | 'pivotModel'
|
|
8
|
-
export declare const useGridChartsIntegration: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "chartsIntegration" | "activeChartId" | "onActiveChartIdChange" | "initialState" | "slots" | "slotProps" | "aggregationFunctions" | "dataSource"
|
|
7
|
+
export declare const chartsIntegrationStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'chartsIntegration' | 'initialState' | 'activeChartId' | 'rowGroupingModel' | 'pivotModel'>, GridPrivateApiPremium>;
|
|
8
|
+
export declare const useGridChartsIntegration: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "chartsIntegration" | "activeChartId" | "onActiveChartIdChange" | "initialState" | "slots" | "slotProps" | "aggregationFunctions" | "dataSource">) => void;
|
|
@@ -4,5 +4,5 @@ import type { DataGridPremiumProcessedProps } from "../../../models/dataGridPrem
|
|
|
4
4
|
import type { GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
|
|
5
5
|
import type { ChartState } from "../../../models/gridChartsIntegration.js";
|
|
6
6
|
export declare const EMPTY_CHART_INTEGRATION_CONTEXT_STATE: ChartState;
|
|
7
|
-
export declare const chartsIntegrationStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'chartsIntegration' | 'initialState' | 'activeChartId' | 'rowGroupingModel' | 'pivotModel'
|
|
8
|
-
export declare const useGridChartsIntegration: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "chartsIntegration" | "activeChartId" | "onActiveChartIdChange" | "initialState" | "slots" | "slotProps" | "aggregationFunctions" | "dataSource"
|
|
7
|
+
export declare const chartsIntegrationStateInitializer: GridStateInitializer<Pick<DataGridPremiumProcessedProps, 'chartsIntegration' | 'initialState' | 'activeChartId' | 'rowGroupingModel' | 'pivotModel'>, GridPrivateApiPremium>;
|
|
8
|
+
export declare const useGridChartsIntegration: (apiRef: RefObject<GridPrivateApiPremium>, props: Pick<DataGridPremiumProcessedProps, "chartsIntegration" | "activeChartId" | "onActiveChartIdChange" | "initialState" | "slots" | "slotProps" | "aggregationFunctions" | "dataSource">) => void;
|
|
@@ -34,7 +34,7 @@ const EMPTY_CHART_INTEGRATION_CONTEXT_STATE = exports.EMPTY_CHART_INTEGRATION_CO
|
|
|
34
34
|
configuration: {}
|
|
35
35
|
};
|
|
36
36
|
const chartsIntegrationStateInitializer = (state, props) => {
|
|
37
|
-
if (!props.chartsIntegration
|
|
37
|
+
if (!props.chartsIntegration) {
|
|
38
38
|
return (0, _extends2.default)({}, state, {
|
|
39
39
|
chartsIntegration: {
|
|
40
40
|
activeChartId: '',
|
|
@@ -68,7 +68,7 @@ const useGridChartsIntegration = (apiRef, props) => {
|
|
|
68
68
|
const visibleValues = React.useRef({});
|
|
69
69
|
const schema = React.useMemo(() => props.slotProps?.chartsPanel?.schema || {}, [props.slotProps?.chartsPanel?.schema]);
|
|
70
70
|
const context = (0, _useGridChartIntegration.useGridChartsIntegrationContext)(true);
|
|
71
|
-
const isChartsIntegrationAvailable = !!props.chartsIntegration && !!
|
|
71
|
+
const isChartsIntegrationAvailable = !!props.chartsIntegration && !!context;
|
|
72
72
|
const activeChartId = (0, _gridChartsIntegrationSelectors.gridChartsIntegrationActiveChartIdSelector)(apiRef);
|
|
73
73
|
const aggregationModel = (0, _gridAggregationSelectors.gridAggregationModelSelector)(apiRef);
|
|
74
74
|
const pivotActive = (0, _internals.gridPivotActiveSelector)(apiRef);
|
|
@@ -494,7 +494,7 @@ const useGridChartsIntegration = (apiRef, props) => {
|
|
|
494
494
|
getColumnName
|
|
495
495
|
}
|
|
496
496
|
}, 'private');
|
|
497
|
-
(0, _internals.useGridApiMethod)(apiRef, props.
|
|
497
|
+
(0, _internals.useGridApiMethod)(apiRef, props.chartsIntegration ? {
|
|
498
498
|
setChartsPanelOpen,
|
|
499
499
|
setActiveChartId,
|
|
500
500
|
setChartType,
|
|
@@ -508,7 +508,7 @@ const useGridChartsIntegration = (apiRef, props) => {
|
|
|
508
508
|
(0, _internals.useGridEvent)(apiRef, 'sortedRowsSet', (0, _internals.runIf)(isChartsIntegrationAvailable, () => debouncedHandleRowDataUpdate(syncedChartIds)));
|
|
509
509
|
(0, _internals.useGridEvent)(apiRef, 'aggregationLookupSet', (0, _internals.runIf)(isChartsIntegrationAvailable, () => debouncedHandleRowDataUpdate(syncedChartIds)));
|
|
510
510
|
const stateExportPreProcessing = React.useCallback((prevState, exportContext) => {
|
|
511
|
-
if (!props.chartsIntegration
|
|
511
|
+
if (!props.chartsIntegration) {
|
|
512
512
|
return prevState;
|
|
513
513
|
}
|
|
514
514
|
const currentActiveChartId = (0, _gridChartsIntegrationSelectors.gridChartsIntegrationActiveChartIdSelector)(apiRef);
|
|
@@ -539,7 +539,7 @@ const useGridChartsIntegration = (apiRef, props) => {
|
|
|
539
539
|
return (0, _extends2.default)({}, prevState, {
|
|
540
540
|
chartsIntegration: chartStateToExport
|
|
541
541
|
});
|
|
542
|
-
}, [apiRef, chartStateLookup, props.chartsIntegration, props.
|
|
542
|
+
}, [apiRef, chartStateLookup, props.chartsIntegration, props.initialState?.chartsIntegration]);
|
|
543
543
|
const stateRestorePreProcessing = React.useCallback((params, restoreContext) => {
|
|
544
544
|
const chartsRestoreState = restoreContext.stateToRestore.chartsIntegration;
|
|
545
545
|
if (!chartsRestoreState) {
|
|
@@ -27,7 +27,7 @@ export const EMPTY_CHART_INTEGRATION_CONTEXT_STATE = {
|
|
|
27
27
|
configuration: {}
|
|
28
28
|
};
|
|
29
29
|
export const chartsIntegrationStateInitializer = (state, props) => {
|
|
30
|
-
if (!props.chartsIntegration
|
|
30
|
+
if (!props.chartsIntegration) {
|
|
31
31
|
return _extends({}, state, {
|
|
32
32
|
chartsIntegration: {
|
|
33
33
|
activeChartId: '',
|
|
@@ -60,7 +60,7 @@ export const useGridChartsIntegration = (apiRef, props) => {
|
|
|
60
60
|
const visibleValues = React.useRef({});
|
|
61
61
|
const schema = React.useMemo(() => props.slotProps?.chartsPanel?.schema || {}, [props.slotProps?.chartsPanel?.schema]);
|
|
62
62
|
const context = useGridChartsIntegrationContext(true);
|
|
63
|
-
const isChartsIntegrationAvailable = !!props.chartsIntegration && !!
|
|
63
|
+
const isChartsIntegrationAvailable = !!props.chartsIntegration && !!context;
|
|
64
64
|
const activeChartId = gridChartsIntegrationActiveChartIdSelector(apiRef);
|
|
65
65
|
const aggregationModel = gridAggregationModelSelector(apiRef);
|
|
66
66
|
const pivotActive = gridPivotActiveSelector(apiRef);
|
|
@@ -486,7 +486,7 @@ export const useGridChartsIntegration = (apiRef, props) => {
|
|
|
486
486
|
getColumnName
|
|
487
487
|
}
|
|
488
488
|
}, 'private');
|
|
489
|
-
useGridApiMethod(apiRef, props.
|
|
489
|
+
useGridApiMethod(apiRef, props.chartsIntegration ? {
|
|
490
490
|
setChartsPanelOpen,
|
|
491
491
|
setActiveChartId,
|
|
492
492
|
setChartType,
|
|
@@ -500,7 +500,7 @@ export const useGridChartsIntegration = (apiRef, props) => {
|
|
|
500
500
|
useGridEvent(apiRef, 'sortedRowsSet', runIf(isChartsIntegrationAvailable, () => debouncedHandleRowDataUpdate(syncedChartIds)));
|
|
501
501
|
useGridEvent(apiRef, 'aggregationLookupSet', runIf(isChartsIntegrationAvailable, () => debouncedHandleRowDataUpdate(syncedChartIds)));
|
|
502
502
|
const stateExportPreProcessing = React.useCallback((prevState, exportContext) => {
|
|
503
|
-
if (!props.chartsIntegration
|
|
503
|
+
if (!props.chartsIntegration) {
|
|
504
504
|
return prevState;
|
|
505
505
|
}
|
|
506
506
|
const currentActiveChartId = gridChartsIntegrationActiveChartIdSelector(apiRef);
|
|
@@ -531,7 +531,7 @@ export const useGridChartsIntegration = (apiRef, props) => {
|
|
|
531
531
|
return _extends({}, prevState, {
|
|
532
532
|
chartsIntegration: chartStateToExport
|
|
533
533
|
});
|
|
534
|
-
}, [apiRef, chartStateLookup, props.chartsIntegration, props.
|
|
534
|
+
}, [apiRef, chartStateLookup, props.chartsIntegration, props.initialState?.chartsIntegration]);
|
|
535
535
|
const stateRestorePreProcessing = React.useCallback((params, restoreContext) => {
|
|
536
536
|
const chartsRestoreState = restoreContext.stateToRestore.chartsIntegration;
|
|
537
537
|
if (!chartsRestoreState) {
|
package/index.js
CHANGED
package/index.mjs
CHANGED
|
@@ -12,9 +12,7 @@ import type { GridPivotingColDefOverrides, PivotingColDefCallback, GridPivotMode
|
|
|
12
12
|
import type { GridDataSourcePremium as GridDataSource, GridGetRowsParamsPremium as GridGetRowsParams } from "../hooks/features/dataSource/models.mjs";
|
|
13
13
|
import type { Conversation, PromptResponse, PromptSuggestion } from "../hooks/features/aiAssistant/gridAiAssistantInterfaces.mjs";
|
|
14
14
|
import type { GridHistoryEventHandler } from "../hooks/features/history/gridHistoryInterfaces.mjs";
|
|
15
|
-
export interface GridExperimentalPremiumFeatures extends GridExperimentalProFeatures {
|
|
16
|
-
charts?: boolean;
|
|
17
|
-
}
|
|
15
|
+
export interface GridExperimentalPremiumFeatures extends GridExperimentalProFeatures {}
|
|
18
16
|
export interface DataGridPremiumPropsWithComplexDefaultValueBeforeProcessing extends Pick<DataGridPropsWithComplexDefaultValueBeforeProcessing, 'localeText'> {
|
|
19
17
|
/**
|
|
20
18
|
* Overridable components.
|
|
@@ -12,9 +12,7 @@ import type { GridPivotingColDefOverrides, PivotingColDefCallback, GridPivotMode
|
|
|
12
12
|
import type { GridDataSourcePremium as GridDataSource, GridGetRowsParamsPremium as GridGetRowsParams } from "../hooks/features/dataSource/models.js";
|
|
13
13
|
import type { Conversation, PromptResponse, PromptSuggestion } from "../hooks/features/aiAssistant/gridAiAssistantInterfaces.js";
|
|
14
14
|
import type { GridHistoryEventHandler } from "../hooks/features/history/gridHistoryInterfaces.js";
|
|
15
|
-
export interface GridExperimentalPremiumFeatures extends GridExperimentalProFeatures {
|
|
16
|
-
charts?: boolean;
|
|
17
|
-
}
|
|
15
|
+
export interface GridExperimentalPremiumFeatures extends GridExperimentalProFeatures {}
|
|
18
16
|
export interface DataGridPremiumPropsWithComplexDefaultValueBeforeProcessing extends Pick<DataGridPropsWithComplexDefaultValueBeforeProcessing, 'localeText'> {
|
|
19
17
|
/**
|
|
20
18
|
* Overridable components.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.4",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Premium plan edition of the MUI X Data Grid Components.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@mui/x-internal-exceljs-fork": "4.4.4",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"prop-types": "^15.8.1",
|
|
41
|
-
"@mui/x-data-grid": "9.0.0-alpha.
|
|
42
|
-
"@mui/x-data-grid-pro": "9.0.0-alpha.
|
|
43
|
-
"@mui/x-internals": "9.0.0-alpha.
|
|
44
|
-
"@mui/x-license": "9.0.0-alpha.
|
|
41
|
+
"@mui/x-data-grid": "9.0.0-alpha.4",
|
|
42
|
+
"@mui/x-data-grid-pro": "9.0.0-alpha.4",
|
|
43
|
+
"@mui/x-internals": "9.0.0-alpha.4",
|
|
44
|
+
"@mui/x-license": "9.0.0-alpha.4"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@emotion/react": "^11.9.0",
|