@mui/x-data-grid 8.14.1 → 8.16.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 +207 -0
- package/DataGrid/DataGrid.js +2 -0
- package/DataGrid/useDataGridComponent.js +1 -1
- package/components/GridScrollShadows.js +23 -3
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +2 -1
- package/esm/DataGrid/DataGrid.js +2 -0
- package/esm/DataGrid/useDataGridComponent.js +1 -1
- package/esm/components/GridScrollShadows.js +22 -3
- package/esm/constants/gridClasses.d.ts +12 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/constants/localeTextConstants.js +2 -1
- package/esm/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +6 -4
- package/esm/hooks/features/dataSource/models.d.ts +28 -28
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -14
- package/esm/hooks/features/dataSource/utils.d.ts +2 -1
- package/esm/hooks/features/dataSource/utils.js +2 -1
- package/esm/hooks/features/editing/useGridCellEditable.d.ts +5 -0
- package/esm/hooks/features/editing/useGridCellEditable.js +9 -0
- package/esm/hooks/features/editing/useGridEditing.d.ts +2 -1
- package/esm/hooks/features/editing/useGridEditing.js +4 -4
- package/esm/hooks/features/focus/useGridFocus.js +4 -2
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +3 -1
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +3 -1
- package/esm/internals/index.js +1 -0
- package/esm/locales/arSD.js +1 -0
- package/esm/locales/beBY.js +1 -0
- package/esm/locales/bgBG.js +1 -0
- package/esm/locales/bnBD.js +1 -0
- package/esm/locales/csCZ.js +1 -0
- package/esm/locales/daDK.js +1 -0
- package/esm/locales/deDE.js +1 -0
- package/esm/locales/elGR.js +1 -0
- package/esm/locales/esES.js +109 -119
- package/esm/locales/faIR.js +1 -0
- package/esm/locales/fiFI.js +1 -0
- package/esm/locales/frFR.js +1 -0
- package/esm/locales/heIL.js +1 -0
- package/esm/locales/hrHR.js +1 -0
- package/esm/locales/huHU.js +1 -0
- package/esm/locales/hyAM.js +1 -0
- package/esm/locales/idID.js +1 -0
- package/esm/locales/isIS.js +1 -0
- package/esm/locales/itIT.js +1 -0
- package/esm/locales/jaJP.js +1 -0
- package/esm/locales/koKR.js +1 -0
- package/esm/locales/nbNO.js +1 -0
- package/esm/locales/nlNL.js +1 -0
- package/esm/locales/nnNO.js +1 -0
- package/esm/locales/plPL.js +1 -0
- package/esm/locales/ptBR.js +1 -0
- package/esm/locales/ptPT.js +1 -0
- package/esm/locales/roRO.js +1 -0
- package/esm/locales/ruRU.js +1 -0
- package/esm/locales/skSK.js +1 -0
- package/esm/locales/svSE.js +1 -0
- package/esm/locales/trTR.js +1 -0
- package/esm/locales/ukUA.js +1 -0
- package/esm/locales/urPK.js +1 -0
- package/esm/locales/viVN.js +1 -0
- package/esm/locales/zhCN.js +1 -0
- package/esm/locales/zhHK.js +1 -0
- package/esm/locales/zhTW.js +1 -0
- package/esm/models/api/gridLocaleTextApi.d.ts +1 -0
- package/esm/models/configuration/gridCellEditableConfiguration.d.ts +19 -0
- package/esm/models/configuration/gridCellEditableConfiguration.js +1 -0
- package/esm/models/configuration/gridConfiguration.d.ts +2 -1
- package/esm/models/gridDataSource.d.ts +13 -0
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +6 -4
- package/hooks/features/dataSource/models.d.ts +28 -28
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +27 -14
- package/hooks/features/dataSource/utils.d.ts +2 -1
- package/hooks/features/dataSource/utils.js +2 -1
- package/hooks/features/editing/useGridCellEditable.d.ts +5 -0
- package/hooks/features/editing/useGridCellEditable.js +15 -0
- package/hooks/features/editing/useGridEditing.d.ts +2 -1
- package/hooks/features/editing/useGridEditing.js +4 -4
- package/hooks/features/focus/useGridFocus.js +4 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +3 -1
- package/index.js +1 -1
- package/internals/index.d.ts +3 -1
- package/internals/index.js +8 -0
- package/locales/arSD.js +1 -0
- package/locales/beBY.js +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/bnBD.js +1 -0
- package/locales/csCZ.js +1 -0
- package/locales/daDK.js +1 -0
- package/locales/deDE.js +1 -0
- package/locales/elGR.js +1 -0
- package/locales/esES.js +109 -119
- package/locales/faIR.js +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.js +1 -0
- package/locales/hrHR.js +1 -0
- package/locales/huHU.js +1 -0
- package/locales/hyAM.js +1 -0
- package/locales/idID.js +1 -0
- package/locales/isIS.js +1 -0
- package/locales/itIT.js +1 -0
- package/locales/jaJP.js +1 -0
- package/locales/koKR.js +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/nnNO.js +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/ptPT.js +1 -0
- package/locales/roRO.js +1 -0
- package/locales/ruRU.js +1 -0
- package/locales/skSK.js +1 -0
- package/locales/svSE.js +1 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/urPK.js +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.js +1 -0
- package/locales/zhHK.js +1 -0
- package/locales/zhTW.js +1 -0
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/configuration/gridCellEditableConfiguration.d.ts +19 -0
- package/models/configuration/gridCellEditableConfiguration.js +5 -0
- package/models/configuration/gridConfiguration.d.ts +2 -1
- package/models/gridDataSource.d.ts +13 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,213 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.16.0
|
|
9
|
+
|
|
10
|
+
_Oct 29, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🖌️ Add `brush` zoom interaction to charts
|
|
15
|
+
- 🔁 [Server-side update](https://mui.com/x/react-data-grid/server-side-data/#updating-server-side-data) in a grid with tree data/row grouping and aggregation will trigger re-fetch for all parent levels of that row to update aggregated values. See the [demo](https://mui.com/x/react-data-grid/server-side-data/aggregation/#usage-with-tree-data).
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@felix-wg, @frncesc, @sai6855
|
|
19
|
+
|
|
20
|
+
The following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @brijeshb42, @flaviendelangle, @JCQuintas, @MBilalShafi, @mbrookes, @michelengelen, @noraleonte, @rita-codes
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.16.0`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Ignore `Ctrl+A` key combination for the row selection in the community version (#20110) @felix-wg
|
|
28
|
+
- [DataGrid][l10n] Improve Spanish (es-ES) locale (#20134) @frncesc
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-pro@8.16.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid@8.16.0`, plus:
|
|
33
|
+
|
|
34
|
+
- [DataGridPro] Add explicit return type to `getVisibleRowsLookup()` to fix the build with `tsc` (#20116) @arminmeh
|
|
35
|
+
- [DataGridPro] Retain the expansion state with expansion configuration props (#20126) @MBilalShafi
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-data-grid-premium@8.16.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
38
|
+
|
|
39
|
+
Same changes as in `@mui/x-data-grid-pro@8.16.0`, plus:
|
|
40
|
+
|
|
41
|
+
- [DataGridPremium] Export and restore chart integration state (#20079) @arminmeh
|
|
42
|
+
- [DataGridPremium] Fix grouping column `valueFormatter()` crash (#20070) @sai6855
|
|
43
|
+
- [DataGridPremium] Refetch aggregation data after row update with server-side aggregation (#20039) @arminmeh
|
|
44
|
+
|
|
45
|
+
### Date and Time Pickers
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-date-pickers@8.16.0`
|
|
48
|
+
|
|
49
|
+
- [pickers] Prevent blur event propagation on individual sections (#19825) @michelengelen
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-date-pickers-pro@8.16.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
52
|
+
|
|
53
|
+
Same changes as in `@mui/x-date-pickers@8.16.0`.
|
|
54
|
+
|
|
55
|
+
### Charts
|
|
56
|
+
|
|
57
|
+
#### `@mui/x-charts@8.16.0`
|
|
58
|
+
|
|
59
|
+
- [charts] Allow tooltip to anchor items (#19954) @alexfauquette
|
|
60
|
+
- [charts] Fix behavior of grouped axis (#20118) @JCQuintas
|
|
61
|
+
- [charts] Move scale symlog inside scales (#20137) @JCQuintas
|
|
62
|
+
- [charts] Fix AreaChartConnectNulls demo height not correctly resizing (#20078) @sai6855
|
|
63
|
+
- [charts] Fix charts resizing overflow (#20080) @alexfauquette
|
|
64
|
+
- [charts] Fix tooltip not showing on first render (#20115) @bernardobelchior
|
|
65
|
+
- [charts] Handle `undefined` id and color in series (#20087) @bernardobelchior
|
|
66
|
+
- [charts] Remove `useMemo` from isZoomOn*Enabled and isPanOn*Enabled hooks (#20132) @Copilot
|
|
67
|
+
- [charts] Use static data for perf (#20072) @JCQuintas
|
|
68
|
+
- [charts] Move scale symlog inside scales (#20137) @JCQuintas
|
|
69
|
+
|
|
70
|
+
#### `@mui/x-charts-pro@8.16.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
71
|
+
|
|
72
|
+
Same changes as in `@mui/x-charts@8.16.0`, plus:
|
|
73
|
+
|
|
74
|
+
- [charts-pro] Add `brush` zoom interaction (#19899) @JCQuintas
|
|
75
|
+
- [charts-pro] Add sankey performance check (#20069) @JCQuintas
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-charts-premium@8.16.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
78
|
+
|
|
79
|
+
Same changes as in `@mui/x-charts-pro@8.16.0`.
|
|
80
|
+
|
|
81
|
+
### Tree View
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-tree-view@8.16.0`
|
|
84
|
+
|
|
85
|
+
Internal changes.
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view-pro@8.16.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
88
|
+
|
|
89
|
+
Same changes as in `@mui/x-tree-view@8.16.0`.
|
|
90
|
+
|
|
91
|
+
### Codemod
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-codemod@8.16.0`
|
|
94
|
+
|
|
95
|
+
Internal changes.
|
|
96
|
+
|
|
97
|
+
### Core
|
|
98
|
+
|
|
99
|
+
- [code-infra] Setup eslint compat plugin (#20105) @brijeshb42
|
|
100
|
+
- [code-infra] Improve store types (#20129) @JCQuintas
|
|
101
|
+
- [docs] Update the callout in `rows` prop documentation (#20127) @MBilalShafi
|
|
102
|
+
- [docs-infra] Refine changelog contributor acknowledgment messages (#20123) @mbrookes
|
|
103
|
+
|
|
104
|
+
### Miscellaneous
|
|
105
|
+
|
|
106
|
+
- [x-telemetry] Skip telemetry tests on browser mode (#20122) @bernardobelchior
|
|
107
|
+
|
|
108
|
+
## 8.15.0
|
|
109
|
+
|
|
110
|
+
_Oct 23, 2025_
|
|
111
|
+
|
|
112
|
+
We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
113
|
+
|
|
114
|
+
- 🖌️ Add new [`brush` charts interaction](https://mui.com/x/react-charts/brush/) for building custom behavior.
|
|
115
|
+

|
|
116
|
+
- ⚡️ Performance improvements for large bar charts
|
|
117
|
+
- 🤖 Data Grid AI assistant can now [visualize the query results](https://mui.com/x/react-data-grid/ai-assistant/#data-visualization) by controlling the chart integration settings
|
|
118
|
+
- 📦 DataGrid uses an internal MUI fork of ExcelJS that does not depend on vulnerable versions of NPM packages
|
|
119
|
+
- 🐞 Bugfixes
|
|
120
|
+
- 📚 Documentation improvements
|
|
121
|
+
|
|
122
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
123
|
+
@ZagrebaAlex
|
|
124
|
+
|
|
125
|
+
The following are all team members who have contributed to this release:
|
|
126
|
+
@alexfauquette, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @prakhargupta1, @rita-codes, @siriwatknp, @arminmeh, @brijeshb42, @noraleonte
|
|
127
|
+
|
|
128
|
+
### Data Grid
|
|
129
|
+
|
|
130
|
+
#### `@mui/x-data-grid@8.15.0`
|
|
131
|
+
|
|
132
|
+
- [DataGrid] Fix `dataSource.fetchRows` API's return type (#20068) @arminmeh
|
|
133
|
+
|
|
134
|
+
#### `@mui/x-data-grid-pro@8.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
135
|
+
|
|
136
|
+
Same changes as in `@mui/x-data-grid@8.15.0`, plus:
|
|
137
|
+
|
|
138
|
+
- [DataGridPro] Keep children in the tree after parent row is re-fetched with the data source (#19934) @arminmeh
|
|
139
|
+
- [DataGridPro] Support scroll shadows customization (#19982) @KenanYusuf
|
|
140
|
+
|
|
141
|
+
#### `@mui/x-data-grid-premium@8.15.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
142
|
+
|
|
143
|
+
Same changes as in `@mui/x-data-grid-pro@8.15.0`, plus:
|
|
144
|
+
|
|
145
|
+
- [DataGridPremium] Use ExcelJS fork (#19796) @cherniavskii
|
|
146
|
+
- [DataGridPremium] Support data visualization in AI Assistant (#19831) @arminmeh
|
|
147
|
+
|
|
148
|
+
### Date and Time Pickers
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-date-pickers@8.15.0`
|
|
151
|
+
|
|
152
|
+
Internal changes.
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-date-pickers-pro@8.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
155
|
+
|
|
156
|
+
Same changes as in `@mui/x-date-pickers@8.15.0`.
|
|
157
|
+
|
|
158
|
+
### Charts
|
|
159
|
+
|
|
160
|
+
#### `@mui/x-charts@8.15.0`
|
|
161
|
+
|
|
162
|
+
- [charts] Add `ChartsBrushOverlay` and allow brush configuration (#19956) @JCQuintas
|
|
163
|
+
- [charts] Add `getStringSize` benchmark. Remove benchmarks from built package. (#19995) @bernardobelchior
|
|
164
|
+
- [charts] Batch string size measurement (#19994) @bernardobelchior
|
|
165
|
+
- [charts] Fix console issue (#20025) @JCQuintas
|
|
166
|
+
- [charts] Fix is[ZoomFeature]Enabled type (#20058) @alexfauquette
|
|
167
|
+
- [charts] Fix reference line middle spacing (#20004) @JCQuintas
|
|
168
|
+
- [charts] Improve `getStringSize` and `batchMeasureStrings` performance (#19996) @bernardobelchior
|
|
169
|
+
- [charts] Improve deep export script (#20007) @JCQuintas
|
|
170
|
+
- [charts] Improve string measurement benchmarks (#19999) @bernardobelchior
|
|
171
|
+
- [charts] Measure string sizes using SVG elements (#19981) @bernardobelchior
|
|
172
|
+
- [l10n] Improve Greek (gr-GR) locale (#20060) @ZagrebaAlex
|
|
173
|
+
|
|
174
|
+
#### `@mui/x-charts-pro@8.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
175
|
+
|
|
176
|
+
Same changes as in `@mui/x-charts@8.15.0`, plus:
|
|
177
|
+
|
|
178
|
+
- [charts-pro] Fix pan with `axis.reverse` (#20031) @JCQuintas
|
|
179
|
+
|
|
180
|
+
#### `@mui/x-charts-premium@8.15.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
181
|
+
|
|
182
|
+
Same changes as in `@mui/x-charts-pro@8.15.0`.
|
|
183
|
+
|
|
184
|
+
### Tree View
|
|
185
|
+
|
|
186
|
+
#### `@mui/x-tree-view@8.15.0`
|
|
187
|
+
|
|
188
|
+
- [tree view] Multi character type-ahead (#19942) @noraleonte
|
|
189
|
+
|
|
190
|
+
#### `@mui/x-tree-view-pro@8.15.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
191
|
+
|
|
192
|
+
Same changes as in `@mui/x-tree-view@8.15.0`.
|
|
193
|
+
|
|
194
|
+
### Codemod
|
|
195
|
+
|
|
196
|
+
#### `@mui/x-codemod@8.14.0`
|
|
197
|
+
|
|
198
|
+
Internal changes.
|
|
199
|
+
|
|
200
|
+
### Docs
|
|
201
|
+
|
|
202
|
+
- [docs] Add overview section for scatter chart and heatmap (#19888) @prakhargupta1
|
|
203
|
+
- [docs] Add charts bell curve example (#20003) @JCQuintas
|
|
204
|
+
- [docs] Add grouped multiple fields for Data Grid row grouping recipe (#19964) @siriwatknp
|
|
205
|
+
- [docs] Add Data Grid loading state recipe (#19958) @siriwatknp
|
|
206
|
+
|
|
207
|
+
### Core
|
|
208
|
+
|
|
209
|
+
- [code-infra] Remove @mui/monorepo usage for react versioning (#19894) @Janpot
|
|
210
|
+
- [code-infra] Remove invalid `environment: 'browser'` from vitest browser config (#19993) @bernardobelchior
|
|
211
|
+
- [code-infra] Remove unused babel aliases (#19987) @Janpot
|
|
212
|
+
- [code-infra] Turn on all testing-library eslint rules (#19946) @brijeshb42
|
|
213
|
+
- [docs-infra] Fix broken hash link (#20062) @Janpot
|
|
214
|
+
|
|
8
215
|
## 8.14.1
|
|
9
216
|
|
|
10
217
|
_Oct 16, 2025_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -16,6 +16,7 @@ var _useGridAriaAttributes = require("../hooks/utils/useGridAriaAttributes");
|
|
|
16
16
|
var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAttributes");
|
|
17
17
|
var _useGridRowsOverridableMethods = require("../hooks/features/rows/useGridRowsOverridableMethods");
|
|
18
18
|
var _useGridParamsOverridableMethods = require("../hooks/features/rows/useGridParamsOverridableMethods");
|
|
19
|
+
var _useGridCellEditable = require("../hooks/features/editing/useGridCellEditable");
|
|
19
20
|
var _GridContextProvider = require("../context/GridContextProvider");
|
|
20
21
|
var _useDataGridComponent = require("./useDataGridComponent");
|
|
21
22
|
var _useDataGridProps = require("./useDataGridProps");
|
|
@@ -30,6 +31,7 @@ const configuration = {
|
|
|
30
31
|
useGridRowAriaAttributes: _useGridRowAriaAttributes.useGridRowAriaAttributes,
|
|
31
32
|
useGridRowsOverridableMethods: _useGridRowsOverridableMethods.useGridRowsOverridableMethods,
|
|
32
33
|
useGridParamsOverridableMethods: _useGridParamsOverridableMethods.useGridParamsOverridableMethods,
|
|
34
|
+
useIsCellEditable: _useGridCellEditable.useIsCellEditable,
|
|
33
35
|
useCellAggregationResult: () => null,
|
|
34
36
|
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
35
37
|
}
|
|
@@ -81,7 +81,7 @@ const useDataGridComponent = (apiRef, props, configuration) => {
|
|
|
81
81
|
(0, _useGridParamsApi.useGridParamsApi)(apiRef, props, configuration);
|
|
82
82
|
(0, _useGridColumnSpanning.useGridColumnSpanning)(apiRef);
|
|
83
83
|
(0, _useGridColumnGrouping.useGridColumnGrouping)(apiRef, props);
|
|
84
|
-
(0, _useGridEditing.useGridEditing)(apiRef, props);
|
|
84
|
+
(0, _useGridEditing.useGridEditing)(apiRef, props, configuration);
|
|
85
85
|
(0, _useGridFocus.useGridFocus)(apiRef, props);
|
|
86
86
|
(0, _useGridPreferencesPanel.useGridPreferencesPanel)(apiRef, props);
|
|
87
87
|
(0, _useGridFilter.useGridFilter)(apiRef, props, configuration);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
5
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
@@ -9,14 +10,30 @@ exports.GridScrollShadows = GridScrollShadows;
|
|
|
9
10
|
var React = _interopRequireWildcard(require("react"));
|
|
10
11
|
var _system = require("@mui/system");
|
|
11
12
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
13
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
12
14
|
var _hooks = require("../hooks");
|
|
13
15
|
var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
|
|
14
16
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
15
17
|
var _cssVariables = require("../constants/cssVariables");
|
|
16
18
|
var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
|
|
17
19
|
var _gridDimensionsSelectors = require("../hooks/features/dimensions/gridDimensionsSelectors");
|
|
20
|
+
var _constants = require("../constants");
|
|
18
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const
|
|
22
|
+
const useUtilityClasses = ownerState => {
|
|
23
|
+
const {
|
|
24
|
+
classes,
|
|
25
|
+
position
|
|
26
|
+
} = ownerState;
|
|
27
|
+
const slots = {
|
|
28
|
+
root: ['scrollShadow', `scrollShadow--${position}`]
|
|
29
|
+
};
|
|
30
|
+
return (0, _composeClasses.default)(slots, _constants.getDataGridUtilityClass, classes);
|
|
31
|
+
};
|
|
32
|
+
const ScrollShadow = (0, _system.styled)('div', {
|
|
33
|
+
name: 'MuiDataGrid',
|
|
34
|
+
slot: 'ScrollShadow',
|
|
35
|
+
overridesResolver: (props, styles) => [styles.root, styles[props.position]]
|
|
36
|
+
})(({
|
|
20
37
|
theme
|
|
21
38
|
}) => ({
|
|
22
39
|
position: 'absolute',
|
|
@@ -30,8 +47,9 @@ const ScrollShadow = (0, _system.styled)('div')(({
|
|
|
30
47
|
'--opacity': theme.palette.mode === 'dark' ? '0.7' : '0.18',
|
|
31
48
|
'--blur': 'var(--length)',
|
|
32
49
|
'--spread': 'calc(var(--length) * -1)',
|
|
33
|
-
'--color
|
|
34
|
-
'--color-
|
|
50
|
+
'--color': '0, 0, 0',
|
|
51
|
+
'--color-start': 'rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))',
|
|
52
|
+
'--color-end': 'rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))',
|
|
35
53
|
variants: [{
|
|
36
54
|
props: {
|
|
37
55
|
position: 'vertical'
|
|
@@ -61,6 +79,7 @@ function GridScrollShadows(props) {
|
|
|
61
79
|
classes: rootProps.classes,
|
|
62
80
|
position
|
|
63
81
|
};
|
|
82
|
+
const classes = useUtilityClasses(ownerState);
|
|
64
83
|
const ref = React.useRef(null);
|
|
65
84
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
66
85
|
const hasScrollX = (0, _hooks.useGridSelector)(apiRef, _gridDimensionsSelectors.gridHasScrollXSelector);
|
|
@@ -98,6 +117,7 @@ function GridScrollShadows(props) {
|
|
|
98
117
|
updateScrollShadowVisibility((position === 'horizontal' ? apiRef.current.virtualScrollerRef?.current?.scrollLeft : apiRef.current.virtualScrollerRef?.current?.scrollTop) ?? 0);
|
|
99
118
|
}, [updateScrollShadowVisibility, apiRef, position]);
|
|
100
119
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ScrollShadow, {
|
|
120
|
+
className: classes.root,
|
|
101
121
|
ownerState: ownerState,
|
|
102
122
|
ref: ref,
|
|
103
123
|
style: {
|
|
@@ -676,6 +676,18 @@ export interface GridClasses {
|
|
|
676
676
|
* Styles applied to the scrollbar filler cell.
|
|
677
677
|
*/
|
|
678
678
|
'scrollbarFiller--pinnedRight': string;
|
|
679
|
+
/**
|
|
680
|
+
* Styles applied to the scroll shadow element.
|
|
681
|
+
*/
|
|
682
|
+
scrollShadow: string;
|
|
683
|
+
/**
|
|
684
|
+
* Styles applied to the horizontal scroll shadow element.
|
|
685
|
+
*/
|
|
686
|
+
'scrollShadow--horizontal': string;
|
|
687
|
+
/**
|
|
688
|
+
* Styles applied to the vertical scroll shadow element.
|
|
689
|
+
*/
|
|
690
|
+
'scrollShadow--vertical': string;
|
|
679
691
|
/**
|
|
680
692
|
* Styles applied to the footer selected row count element.
|
|
681
693
|
*/
|
package/constants/gridClasses.js
CHANGED
|
@@ -13,4 +13,4 @@ function getDataGridUtilityClass(slot) {
|
|
|
13
13
|
}
|
|
14
14
|
const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
|
|
15
15
|
// TODO v9: Rename to `cell--dragging`
|
|
16
|
-
'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
|
16
|
+
'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
|
@@ -290,5 +290,6 @@ const GRID_DEFAULT_LOCALE_TEXT = exports.GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
290
290
|
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
|
|
291
291
|
promptChangePivotRowsLabel: count => `Rows (${count})`,
|
|
292
292
|
promptChangePivotValuesLabel: count => `Values (${count})`,
|
|
293
|
-
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})
|
|
293
|
+
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
|
|
294
|
+
promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
|
|
294
295
|
};
|
package/esm/DataGrid/DataGrid.js
CHANGED
|
@@ -9,6 +9,7 @@ import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
|
9
9
|
import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
10
10
|
import { useGridRowsOverridableMethods } from "../hooks/features/rows/useGridRowsOverridableMethods.js";
|
|
11
11
|
import { useGridParamsOverridableMethods } from "../hooks/features/rows/useGridParamsOverridableMethods.js";
|
|
12
|
+
import { useIsCellEditable } from "../hooks/features/editing/useGridCellEditable.js";
|
|
12
13
|
import { GridContextProvider } from "../context/GridContextProvider.js";
|
|
13
14
|
import { useDataGridComponent } from "./useDataGridComponent.js";
|
|
14
15
|
import { useDataGridProps } from "./useDataGridProps.js";
|
|
@@ -23,6 +24,7 @@ const configuration = {
|
|
|
23
24
|
useGridRowAriaAttributes,
|
|
24
25
|
useGridRowsOverridableMethods,
|
|
25
26
|
useGridParamsOverridableMethods,
|
|
27
|
+
useIsCellEditable,
|
|
26
28
|
useCellAggregationResult: () => null,
|
|
27
29
|
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
28
30
|
}
|
|
@@ -75,7 +75,7 @@ export const useDataGridComponent = (apiRef, props, configuration) => {
|
|
|
75
75
|
useGridParamsApi(apiRef, props, configuration);
|
|
76
76
|
useGridColumnSpanning(apiRef);
|
|
77
77
|
useGridColumnGrouping(apiRef, props);
|
|
78
|
-
useGridEditing(apiRef, props);
|
|
78
|
+
useGridEditing(apiRef, props, configuration);
|
|
79
79
|
useGridFocus(apiRef, props);
|
|
80
80
|
useGridPreferencesPanel(apiRef, props);
|
|
81
81
|
useGridFilter(apiRef, props, configuration);
|
|
@@ -3,14 +3,30 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
5
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
6
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
6
7
|
import { gridDimensionsSelector, gridPinnedColumnsSelector, useGridEvent, useGridSelector } from "../hooks/index.js";
|
|
7
8
|
import { gridPinnedRowsSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
8
9
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
9
10
|
import { vars } from "../constants/cssVariables.js";
|
|
10
11
|
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
|
|
11
12
|
import { gridHasScrollXSelector, gridHasScrollYSelector } from "../hooks/features/dimensions/gridDimensionsSelectors.js";
|
|
13
|
+
import { getDataGridUtilityClass } from "../constants/index.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const
|
|
15
|
+
const useUtilityClasses = ownerState => {
|
|
16
|
+
const {
|
|
17
|
+
classes,
|
|
18
|
+
position
|
|
19
|
+
} = ownerState;
|
|
20
|
+
const slots = {
|
|
21
|
+
root: ['scrollShadow', `scrollShadow--${position}`]
|
|
22
|
+
};
|
|
23
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
24
|
+
};
|
|
25
|
+
const ScrollShadow = styled('div', {
|
|
26
|
+
name: 'MuiDataGrid',
|
|
27
|
+
slot: 'ScrollShadow',
|
|
28
|
+
overridesResolver: (props, styles) => [styles.root, styles[props.position]]
|
|
29
|
+
})(({
|
|
14
30
|
theme
|
|
15
31
|
}) => ({
|
|
16
32
|
position: 'absolute',
|
|
@@ -24,8 +40,9 @@ const ScrollShadow = styled('div')(({
|
|
|
24
40
|
'--opacity': theme.palette.mode === 'dark' ? '0.7' : '0.18',
|
|
25
41
|
'--blur': 'var(--length)',
|
|
26
42
|
'--spread': 'calc(var(--length) * -1)',
|
|
27
|
-
'--color
|
|
28
|
-
'--color-
|
|
43
|
+
'--color': '0, 0, 0',
|
|
44
|
+
'--color-start': 'rgba(var(--color), calc(var(--hasScrollStart) * var(--opacity)))',
|
|
45
|
+
'--color-end': 'rgba(var(--color), calc(var(--hasScrollEnd) * var(--opacity)))',
|
|
29
46
|
variants: [{
|
|
30
47
|
props: {
|
|
31
48
|
position: 'vertical'
|
|
@@ -55,6 +72,7 @@ function GridScrollShadows(props) {
|
|
|
55
72
|
classes: rootProps.classes,
|
|
56
73
|
position
|
|
57
74
|
};
|
|
75
|
+
const classes = useUtilityClasses(ownerState);
|
|
58
76
|
const ref = React.useRef(null);
|
|
59
77
|
const apiRef = useGridPrivateApiContext();
|
|
60
78
|
const hasScrollX = useGridSelector(apiRef, gridHasScrollXSelector);
|
|
@@ -92,6 +110,7 @@ function GridScrollShadows(props) {
|
|
|
92
110
|
updateScrollShadowVisibility((position === 'horizontal' ? apiRef.current.virtualScrollerRef?.current?.scrollLeft : apiRef.current.virtualScrollerRef?.current?.scrollTop) ?? 0);
|
|
93
111
|
}, [updateScrollShadowVisibility, apiRef, position]);
|
|
94
112
|
return /*#__PURE__*/_jsx(ScrollShadow, {
|
|
113
|
+
className: classes.root,
|
|
95
114
|
ownerState: ownerState,
|
|
96
115
|
ref: ref,
|
|
97
116
|
style: {
|
|
@@ -676,6 +676,18 @@ export interface GridClasses {
|
|
|
676
676
|
* Styles applied to the scrollbar filler cell.
|
|
677
677
|
*/
|
|
678
678
|
'scrollbarFiller--pinnedRight': string;
|
|
679
|
+
/**
|
|
680
|
+
* Styles applied to the scroll shadow element.
|
|
681
|
+
*/
|
|
682
|
+
scrollShadow: string;
|
|
683
|
+
/**
|
|
684
|
+
* Styles applied to the horizontal scroll shadow element.
|
|
685
|
+
*/
|
|
686
|
+
'scrollShadow--horizontal': string;
|
|
687
|
+
/**
|
|
688
|
+
* Styles applied to the vertical scroll shadow element.
|
|
689
|
+
*/
|
|
690
|
+
'scrollShadow--vertical': string;
|
|
679
691
|
/**
|
|
680
692
|
* Styles applied to the footer selected row count element.
|
|
681
693
|
*/
|
|
@@ -5,4 +5,4 @@ export function getDataGridUtilityClass(slot) {
|
|
|
5
5
|
}
|
|
6
6
|
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
|
|
7
7
|
// TODO v9: Rename to `cell--dragging`
|
|
8
|
-
'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
|
8
|
+
'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--pinnedRight', 'scrollShadow', 'scrollShadow--vertical', 'scrollShadow--horizontal', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
|
@@ -284,5 +284,6 @@ export const GRID_DEFAULT_LOCALE_TEXT = {
|
|
|
284
284
|
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
|
|
285
285
|
promptChangePivotRowsLabel: count => `Rows (${count})`,
|
|
286
286
|
promptChangePivotValuesLabel: count => `Values (${count})`,
|
|
287
|
-
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})
|
|
287
|
+
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
|
|
288
|
+
promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
|
|
288
289
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GridRowTreeCreationParams, GridRowTreeCreationValue, GridRowsState } from "../../features/rows/gridRowsInterfaces.js";
|
|
2
|
-
import { GridFilteringMethodParams, GridFilteringMethodValue, GridFilterState, GridVisibleRowsLookupState } from "../../features/filter/gridFilterState.js";
|
|
3
|
-
import { GridSortingMethodParams, GridSortingMethodValue } from "../../features/sorting/gridSortingState.js";
|
|
4
|
-
import { GridGetRowsParams, GridGetRowsResponse } from "../../../models/gridDataSource.js";
|
|
1
|
+
import type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridRowsState } from "../../features/rows/gridRowsInterfaces.js";
|
|
2
|
+
import type { GridFilteringMethodParams, GridFilteringMethodValue, GridFilterState, GridVisibleRowsLookupState } from "../../features/filter/gridFilterState.js";
|
|
3
|
+
import type { GridSortingMethodParams, GridSortingMethodValue } from "../../features/sorting/gridSortingState.js";
|
|
4
|
+
import type { GridGetRowsParams, GridGetRowsResponse, GridGetRowsOptions } from "../../../models/gridDataSource.js";
|
|
5
5
|
export type GridStrategyProcessorName = keyof GridStrategyProcessingLookup;
|
|
6
6
|
export declare enum GridStrategyGroup {
|
|
7
7
|
DataSource = "dataSource",
|
|
@@ -14,9 +14,11 @@ export interface GridStrategyProcessingLookup {
|
|
|
14
14
|
params: {
|
|
15
15
|
response: GridGetRowsResponse;
|
|
16
16
|
fetchParams: GridGetRowsParams;
|
|
17
|
+
options: GridGetRowsOptions;
|
|
17
18
|
} | {
|
|
18
19
|
error: Error;
|
|
19
20
|
fetchParams: GridGetRowsParams;
|
|
21
|
+
options: GridGetRowsOptions;
|
|
20
22
|
};
|
|
21
23
|
value: void;
|
|
22
24
|
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import type { GridDataSourceCache, GridGetRowsParams, GridUpdateRowParams } from "../../../models/gridDataSource.js";
|
|
1
|
+
import type { GridDataSourceCache, GridGetRowsParams, GridUpdateRowParams, GridGetRowsOptions } from "../../../models/gridDataSource.js";
|
|
2
2
|
import type { GridRowId, GridRowModel } from "../../../models/gridRows.js";
|
|
3
3
|
import type { GridDataSourceCacheDefaultConfig } from "./cache.js";
|
|
4
4
|
/**
|
|
5
5
|
* The parameters for the `fetchRows` method.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
/**
|
|
9
|
-
* If `true`, bypasses the cache and forces a refetch of the rows from the server.
|
|
10
|
-
*/
|
|
11
|
-
skipCache?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface GridDataSourceApiBase {
|
|
14
|
-
/**
|
|
15
|
-
* Fetches the rows from the server.
|
|
16
|
-
* If no `parentId` option is provided, it fetches the root rows.
|
|
17
|
-
* Any missing parameter from `params` will be filled from the state (sorting, filtering, etc.).
|
|
18
|
-
* @param {GridRowId} parentId The id of the parent node (default: `GRID_ROOT_GROUP_ID`).
|
|
19
|
-
* @param {GridDataSourceFetchRowsParams} params Request parameters override.
|
|
20
|
-
*/
|
|
21
|
-
fetchRows: (parentId?: GridRowId, params?: GridDataSourceFetchRowsParams) => void;
|
|
22
|
-
/**
|
|
23
|
-
* The data source cache object.
|
|
24
|
-
*/
|
|
25
|
-
cache: GridDataSourceCache;
|
|
26
|
-
/**
|
|
27
|
-
* Syncs the row with the server and updates in the grid.
|
|
28
|
-
* @param {GridUpdateRowParams} params The parameters for the edit operation.
|
|
29
|
-
* @returns {Promise<GridRowModel> | undefined} The updated row or `undefined` if `dataSource.updateRow` is not passed.
|
|
30
|
-
*/
|
|
31
|
-
editRow: (params: GridUpdateRowParams) => Promise<GridRowModel> | undefined;
|
|
32
|
-
}
|
|
7
|
+
export type GridDataSourceFetchRowsParams<T> = Partial<T> & GridGetRowsOptions;
|
|
33
8
|
export interface GridDataSourceApi {
|
|
34
9
|
/**
|
|
35
10
|
* The data source API.
|
|
36
11
|
*/
|
|
37
|
-
dataSource:
|
|
12
|
+
dataSource: {
|
|
13
|
+
/**
|
|
14
|
+
* Fetches the rows from the server.
|
|
15
|
+
* If no `parentId` option is provided, it fetches the root rows.
|
|
16
|
+
* Any missing parameter from `params` will be filled from the state (sorting, filtering, etc.).
|
|
17
|
+
* @param {GridRowId} parentId The id of the parent node (default: `GRID_ROOT_GROUP_ID`).
|
|
18
|
+
* @param {GridDataSourceFetchRowsParams<GridGetRowsParams>} params Request parameters override.
|
|
19
|
+
* @returns {Promise<void>} A promise that resolves when the rows are fetched.
|
|
20
|
+
*/
|
|
21
|
+
fetchRows: (parentId?: GridRowId, params?: GridDataSourceFetchRowsParams<GridGetRowsParams>) => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* The data source cache object.
|
|
24
|
+
*/
|
|
25
|
+
cache: GridDataSourceCache;
|
|
26
|
+
/**
|
|
27
|
+
* Syncs the row with the server and updates in the grid.
|
|
28
|
+
* @param {GridUpdateRowParams} params The parameters for the edit operation.
|
|
29
|
+
* @returns {Promise<GridRowModel> | undefined} The updated row or `undefined` if `dataSource.updateRow` is not passed.
|
|
30
|
+
*/
|
|
31
|
+
editRow: (params: GridUpdateRowParams) => Promise<GridRowModel> | undefined;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface GridDataSourceApiBase {
|
|
35
|
+
fetchRows: GridDataSourceApi['dataSource']['fetchRows'];
|
|
36
|
+
cache: GridDataSourceApi['dataSource']['cache'];
|
|
37
|
+
editRow: GridDataSourceApi['dataSource']['editRow'];
|
|
38
38
|
}
|
|
39
39
|
export interface GridDataSourceBaseOptions {
|
|
40
40
|
cacheOptions?: GridDataSourceCacheDefaultConfig;
|
|
@@ -10,7 +10,7 @@ export declare const useGridDataSourceBase: <Api extends GridPrivateApiCommunity
|
|
|
10
10
|
api: {
|
|
11
11
|
public: GridDataSourceApi;
|
|
12
12
|
};
|
|
13
|
-
debouncedFetchRows: ((parentId?: import("@mui/x-data-grid").GridRowId, params?: import("./models.js").GridDataSourceFetchRowsParams) => void) & import("@mui/utils/debounce").Cancelable;
|
|
13
|
+
debouncedFetchRows: ((parentId?: import("@mui/x-data-grid").GridRowId, params?: import("./models.js").GridDataSourceFetchRowsParams<import("@mui/x-data-grid").GridGetRowsParams>) => Promise<void>) & import("@mui/utils/debounce").Cancelable;
|
|
14
14
|
strategyProcessor: {
|
|
15
15
|
strategyName: DataSourceRowsUpdateStrategy;
|
|
16
16
|
group: "dataSourceRowsUpdate";
|