@mui/x-data-grid-premium 8.22.1 → 8.24.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 +211 -0
- package/DataGridPremium/DataGridPremium.js +2 -1
- package/components/GridBottomContainer.js +4 -1
- package/components/GridGroupingColumnFooterCell.js +2 -3
- package/esm/DataGridPremium/DataGridPremium.js +2 -1
- package/esm/components/GridBottomContainer.js +4 -1
- package/esm/components/GridGroupingColumnFooterCell.js +1 -2
- package/esm/hooks/features/aggregation/createAggregationLookup.js +1 -1
- package/esm/hooks/features/aggregation/gridAggregationFunctions.d.ts +2 -0
- package/esm/hooks/features/aggregation/gridAggregationFunctions.js +35 -1
- package/esm/hooks/features/aggregation/gridAggregationInterfaces.d.ts +3 -16
- package/esm/hooks/features/aggregation/gridAggregationSelectors.d.ts +2 -2
- package/esm/hooks/features/aggregation/gridAggregationSelectors.js +1 -1
- package/esm/hooks/features/aggregation/index.d.ts +2 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +1 -1
- package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +3 -2
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +4 -2
- package/esm/index.js +1 -1
- package/esm/typeOverloads/modules.d.ts +3 -2
- package/hooks/features/aggregation/createAggregationLookup.js +1 -1
- package/hooks/features/aggregation/gridAggregationFunctions.d.ts +2 -0
- package/hooks/features/aggregation/gridAggregationFunctions.js +35 -1
- package/hooks/features/aggregation/gridAggregationInterfaces.d.ts +3 -16
- package/hooks/features/aggregation/gridAggregationSelectors.d.ts +2 -2
- package/hooks/features/aggregation/gridAggregationSelectors.js +2 -2
- package/hooks/features/aggregation/index.d.ts +2 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +1 -1
- package/hooks/features/aggregation/wrapColumnWithAggregation.js +4 -3
- package/hooks/features/dataSource/useGridDataSourcePremium.js +4 -2
- package/index.js +1 -1
- package/package.json +5 -5
- package/typeOverloads/modules.d.ts +3 -2
- package/components/GridFooterCell.d.ts +0 -8
- package/components/GridFooterCell.js +0 -47
- package/esm/components/GridFooterCell.d.ts +0 -8
- package/esm/components/GridFooterCell.js +0 -41
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,217 @@
|
|
|
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.24.0
|
|
9
|
+
|
|
10
|
+
_Jan 8, 2026_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- ⚡️Add bar [batch renderer](https://mui.com/x/react-charts/bars/#performance), result in a significant performance improvement when rendering thousands of bars
|
|
15
|
+
- 📊 Add [range bar chart](https://mui.com/x/react-charts/range-bar/) to render
|
|
16
|
+

|
|
17
|
+
- 🌎 Improved Danish (da-DK) and Japanese (ja-JP) locales on the Data Grid
|
|
18
|
+
|
|
19
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
20
|
+
@anders-noerrelykke, @auloin, @sai6855, @yuito-it
|
|
21
|
+
|
|
22
|
+
The following team members contributed to this release:
|
|
23
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @JCQuintas, @mapache-salvaje, @siriwatknp
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### `@mui/x-data-grid@8.24.0`
|
|
28
|
+
|
|
29
|
+
- [l10n] Improve Danish (da-DK) locale (#20828) @anders-noerrelykke
|
|
30
|
+
- [l10n] Improve Japanese (ja-JP) locale (#20251) @yuito-it
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@8.24.0`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Fix header filter height for `density="compact"` (#20834) @arminmeh
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@8.24.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@8.24.0`.
|
|
41
|
+
|
|
42
|
+
### Date and Time Pickers
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers@8.24.0`
|
|
45
|
+
|
|
46
|
+
- [pickers] Fix Styles applied to PickersDay when MuiPickersDay-dayOutsideMonth is used (#20719) @sai6855
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-date-pickers@8.24.0`.
|
|
51
|
+
|
|
52
|
+
### Charts
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-charts@8.24.0`
|
|
55
|
+
|
|
56
|
+
- [charts] Add `VisibilityManager` logic to allow managing series/items (#20571) @JCQuintas
|
|
57
|
+
- [charts] Add `identifierSerializer` configuration (#20775) @JCQuintas
|
|
58
|
+
- [charts] Add `serializeIdentifier` instance function (#20791) @JCQuintas
|
|
59
|
+
- [charts] Add bar batch renderer (#20457) @bernardobelchior
|
|
60
|
+
- [charts] Allow animating bar, line, and pie elements to hidden state (#20798) @JCQuintas
|
|
61
|
+
- [charts] Fix failing lint step (#20813) @bernardobelchior
|
|
62
|
+
- [charts] Fix tooltip anchored to item (#20783) @alexfauquette
|
|
63
|
+
- [charts] Fix type casting in getCategoryAxisConfig and applySeriesLayout functions (#20797) @sai6855
|
|
64
|
+
- [charts] Let keyboard navigation avoid overflow and handle nullish values (#20757) @alexfauquette
|
|
65
|
+
- [charts] Refactor `PieChart` and `PieChartPro` to use `slots` and `slotProps` directly (#20795) @sai6855
|
|
66
|
+
- [charts] Refactor `useRegisterPointerEventHandlers` (#20824) @bernardobelchior
|
|
67
|
+
- [charts] Update legend types to allow hiding/showing items (#20784) @JCQuintas
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-charts-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
70
|
+
|
|
71
|
+
Same changes as in `@mui/x-charts@8.24.0`, plus:
|
|
72
|
+
|
|
73
|
+
- [charts-pro] Pass `slotProps.toolbar` to `Toolbar` in `PieChartPro` (#20796) @sai6855
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-charts-premium@8.24.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
76
|
+
|
|
77
|
+
Same changes as in `@mui/x-charts-pro@8.24.0`, plus:
|
|
78
|
+
|
|
79
|
+
- [charts-premium] Add range bar chart (#20275) @bernardobelchior
|
|
80
|
+
|
|
81
|
+
### Tree View
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-tree-view@8.24.0`
|
|
84
|
+
|
|
85
|
+
- [tree view] Introduce a Tree View Store to clean the internals (#20051) @flaviendelangle
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view-pro@8.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
88
|
+
|
|
89
|
+
Same changes as in `@mui/x-tree-view@8.24.0`.
|
|
90
|
+
|
|
91
|
+
### Codemod
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-codemod@8.24.0`
|
|
94
|
+
|
|
95
|
+
Internal changes.
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Fix axis size default values (#20799) @bernardobelchior
|
|
100
|
+
- [docs] Update What's New in MUI X page with post v8 features (DX-118) (#20787) @alelthomas
|
|
101
|
+
- [docs] Fix `onAccept`'s `context.source` documentation to use 'view' instead of 'picker' (#20465) @auloin
|
|
102
|
+
- [docs] Revise the Charts Brush doc (#20792) @mapache-salvaje
|
|
103
|
+
- [docs] Revise the Charts Highlighting doc (#20788) @mapache-salvaje
|
|
104
|
+
- [docs] Revise the Charts Label doc (#20794) @mapache-salvaje
|
|
105
|
+
- [docs] Revise the Charts Export doc (#20779) @mapache-salvaje
|
|
106
|
+
|
|
107
|
+
### Core
|
|
108
|
+
|
|
109
|
+
- [code-infra] Fix v8.23.0 release date (#20767) @bernardobelchior
|
|
110
|
+
- [code-infra] Remove `glob-gitignore` (#20801) @bernardobelchior
|
|
111
|
+
- [code-infra] Remove `nyc` (#20804) @bernardobelchior
|
|
112
|
+
- [code-infra] Remove `stream-browserify` and `null-loader` (#20805) @bernardobelchior
|
|
113
|
+
- [code-infra] Remove `stylelint-config-tailwindcss` (#20807) @bernardobelchior
|
|
114
|
+
- [code-infra] Remove unused `path` package (#20802) @bernardobelchior
|
|
115
|
+
- [code-infra] Retry flaky e2e test on webkit (#20806) @JCQuintas
|
|
116
|
+
- [internal] Add `internal` slot to properly generate components CSS layer (#20763) @siriwatknp
|
|
117
|
+
|
|
118
|
+
## 8.23.0
|
|
119
|
+
|
|
120
|
+
_Dec 24, 2025_
|
|
121
|
+
|
|
122
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
123
|
+
|
|
124
|
+
- 🧮 Support Data Grid `size`, `size(true)`, and `size(false)` [aggregations for `'boolean'` column type](https://mui.com/x/react-data-grid/aggregation/#usage-with-row-grouping)
|
|
125
|
+
- 🔎 Allow zooming a heatmap
|
|
126
|
+
|
|
127
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
128
|
+
@henkerik, @sai6855
|
|
129
|
+
|
|
130
|
+
The following team members contributed to this release:
|
|
131
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @brijeshb42, @flaviendelangle, @JCQuintas, @mapache-salvaje, @MBilalShafi, @siriwatknp
|
|
132
|
+
|
|
133
|
+
### Data Grid
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-data-grid@8.23.0`
|
|
136
|
+
|
|
137
|
+
- [DataGrid] Fix columns state and columns prop sync issue (#20703) @arminmeh
|
|
138
|
+
- [DataGrid] Fix filter datetime with seconds (#20557) @siriwatknp
|
|
139
|
+
- [DataGrid] Add new `includeHeaderFilters` flag to include header filters when autosizing columns (#20510) @siriwatknp
|
|
140
|
+
- [DataGrid] Prevent default on `Enter` key down when starting editing (#20751) @siriwatknp
|
|
141
|
+
- [l10n] Improve Portuguese from Portugal (pt-PT) locale (#20722) @Copilot
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-data-grid-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
144
|
+
|
|
145
|
+
Same changes as in `@mui/x-data-grid@8.23.0`, plus:
|
|
146
|
+
|
|
147
|
+
- [DataGridPro] Fix crash on rows change in tree data with pagination (#20215) @Copilot
|
|
148
|
+
|
|
149
|
+
#### `@mui/x-data-grid-premium@8.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
150
|
+
|
|
151
|
+
Same changes as in `@mui/x-data-grid-pro@8.23.0`, plus:
|
|
152
|
+
|
|
153
|
+
- [DataGridPremium] Add aggregation for `'boolean'` column type (#20683) @arminmeh
|
|
154
|
+
- [DataGridPremium] Fix strategy value computation with row grouping (#20725) @MBilalShafi
|
|
155
|
+
- [DataGridPremium] Handle `isRowSelectable()` checks for the rows missing due to `keepNonExistentRowsSelected` (#20668) @arminmeh
|
|
156
|
+
|
|
157
|
+
### Date and Time Pickers
|
|
158
|
+
|
|
159
|
+
#### `@mui/x-date-pickers@8.23.0`
|
|
160
|
+
|
|
161
|
+
Internal changes.
|
|
162
|
+
|
|
163
|
+
#### `@mui/x-date-pickers-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
164
|
+
|
|
165
|
+
Same changes as in `@mui/x-date-pickers@8.23.0`.
|
|
166
|
+
|
|
167
|
+
### Charts
|
|
168
|
+
|
|
169
|
+
#### `@mui/x-charts@8.23.0`
|
|
170
|
+
|
|
171
|
+
- [charts] Custom stack functions implementation (#20679) @JCQuintas
|
|
172
|
+
- [charts] Extract keyboard focus navigation to the series config (#20693) @alexfauquette
|
|
173
|
+
- [charts] Fix demo not wrapping in mobile (#20713) @JCQuintas
|
|
174
|
+
- [charts] Fix missing dependencies in `x-charts-vendor` (#20685) @henkerik
|
|
175
|
+
- [charts] Remove webkit test differences (#20707) @JCQuintas
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-charts-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-charts@8.23.0`, plus:
|
|
180
|
+
|
|
181
|
+
- [charts-pro] Allow registering preview plots from higher tier packages (#20716) @bernardobelchior
|
|
182
|
+
- [charts-pro] Fix erroneous behavior when adding/removing pointers from zoom&pan gestures (#20698) @JCQuintas
|
|
183
|
+
- [charts-pro] Move heatmap highlight handling to plot component (#20701) @bernardobelchior
|
|
184
|
+
- [charts-pro] Add zoom to heatmap (#20708) @bernardobelchior
|
|
185
|
+
|
|
186
|
+
#### `@mui/x-charts-premium@8.23.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
187
|
+
|
|
188
|
+
Same changes as in `@mui/x-charts-pro@8.23.0`.
|
|
189
|
+
|
|
190
|
+
### Tree View
|
|
191
|
+
|
|
192
|
+
#### `@mui/x-tree-view@8.23.0`
|
|
193
|
+
|
|
194
|
+
- [tree view] Add new APIs to disable selection feature for tree view item (#20666) @siriwatknp
|
|
195
|
+
|
|
196
|
+
#### `@mui/x-tree-view-pro@8.23.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
197
|
+
|
|
198
|
+
Same changes as in `@mui/x-tree-view@8.23.0`.
|
|
199
|
+
|
|
200
|
+
### Codemod
|
|
201
|
+
|
|
202
|
+
#### `@mui/x-codemod@8.23.0`
|
|
203
|
+
|
|
204
|
+
Internal changes.
|
|
205
|
+
|
|
206
|
+
### Docs
|
|
207
|
+
|
|
208
|
+
- [docs] Clarify feature availability and relationship between Community and Pro/Premium docs (#20714) @mapache-salvaje
|
|
209
|
+
- [docs] Copyedit Tree View docs and apply new component style rules (DX-19) (#20652) @mapache-salvaje
|
|
210
|
+
- [docs] Fix `ColumnPinningDynamicRowHeight` demo (#20750) @sai6855
|
|
211
|
+
- [docs] Clean up Charts docs sidebar (DX-97) (#20700) @alelthomas
|
|
212
|
+
- [docs] Fix tick labels not being shown on a demo (#20718) @sai6855
|
|
213
|
+
|
|
214
|
+
### Core
|
|
215
|
+
|
|
216
|
+
- [code-infra] Bump prettier to 3.7.4 (#20709) @JCQuintas
|
|
217
|
+
- [code-infra] Fix contributor generation logic in changelog script (#20705) @brijeshb42
|
|
218
|
+
|
|
8
219
|
## 8.22.1
|
|
9
220
|
|
|
10
221
|
_Dec 17, 2025_
|
|
@@ -50,7 +50,7 @@ const configuration = {
|
|
|
50
50
|
useGridParamsOverridableMethods: _useGridParamsOverridableMethods.useGridParamsOverridableMethods
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
const releaseInfo = "
|
|
53
|
+
const releaseInfo = "MTc2NzgzMDQwMDAwMA==";
|
|
54
54
|
const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
55
55
|
packageName: "x-data-grid-premium",
|
|
56
56
|
releaseInfo: releaseInfo
|
|
@@ -192,6 +192,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
192
192
|
columns: _propTypes.default.arrayOf(_propTypes.default.string),
|
|
193
193
|
disableColumnVirtualization: _propTypes.default.bool,
|
|
194
194
|
expand: _propTypes.default.bool,
|
|
195
|
+
includeHeaderFilters: _propTypes.default.bool,
|
|
195
196
|
includeHeaders: _propTypes.default.bool,
|
|
196
197
|
includeOutliers: _propTypes.default.bool,
|
|
197
198
|
outliersFactor: _propTypes.default.number
|
|
@@ -25,7 +25,10 @@ const useUtilityClasses = () => {
|
|
|
25
25
|
};
|
|
26
26
|
return (0, _composeClasses.default)(slots, _xDataGridPro.getDataGridUtilityClass, {});
|
|
27
27
|
};
|
|
28
|
-
const Element = (0, _system.styled)('div'
|
|
28
|
+
const Element = (0, _system.styled)('div', {
|
|
29
|
+
slot: 'internal',
|
|
30
|
+
shouldForwardProp: undefined
|
|
31
|
+
})({
|
|
29
32
|
position: 'sticky',
|
|
30
33
|
zIndex: 40,
|
|
31
34
|
bottom: 'calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))'
|
|
@@ -6,9 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.GridGroupingColumnFooterCell = GridGroupingColumnFooterCell;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _internals = require("@mui/x-data-grid/internals");
|
|
9
|
+
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
10
10
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
11
|
-
var _GridFooterCell = require("./GridFooterCell");
|
|
12
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
12
|
function GridGroupingColumnFooterCell(props) {
|
|
14
13
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
@@ -22,7 +21,7 @@ function GridGroupingColumnFooterCell(props) {
|
|
|
22
21
|
} else {
|
|
23
22
|
sx.ml = `calc(var(--DataGrid-cellOffsetMultiplier) * ${_internals.vars.spacing(props.rowNode.depth)})`;
|
|
24
23
|
}
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.GridFooterCell, (0, _extends2.default)({
|
|
26
25
|
sx: sx
|
|
27
26
|
}, props));
|
|
28
27
|
}
|
|
@@ -43,7 +43,7 @@ const configuration = {
|
|
|
43
43
|
useGridParamsOverridableMethods
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
const releaseInfo = "
|
|
46
|
+
const releaseInfo = "MTc2NzgzMDQwMDAwMA==";
|
|
47
47
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
48
48
|
packageName: "x-data-grid-premium",
|
|
49
49
|
releaseInfo: releaseInfo
|
|
@@ -185,6 +185,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
185
185
|
columns: PropTypes.arrayOf(PropTypes.string),
|
|
186
186
|
disableColumnVirtualization: PropTypes.bool,
|
|
187
187
|
expand: PropTypes.bool,
|
|
188
|
+
includeHeaderFilters: PropTypes.bool,
|
|
188
189
|
includeHeaders: PropTypes.bool,
|
|
189
190
|
includeOutliers: PropTypes.bool,
|
|
190
191
|
outliersFactor: PropTypes.number
|
|
@@ -17,7 +17,10 @@ const useUtilityClasses = () => {
|
|
|
17
17
|
};
|
|
18
18
|
return composeClasses(slots, getDataGridUtilityClass, {});
|
|
19
19
|
};
|
|
20
|
-
const Element = styled('div'
|
|
20
|
+
const Element = styled('div', {
|
|
21
|
+
slot: 'internal',
|
|
22
|
+
shouldForwardProp: undefined
|
|
23
|
+
})({
|
|
21
24
|
position: 'sticky',
|
|
22
25
|
zIndex: 40,
|
|
23
26
|
bottom: 'calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))'
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { vars } from '@mui/x-data-grid/internals';
|
|
2
|
+
import { vars, GridFooterCell } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
4
|
-
import { GridFooterCell } from "./GridFooterCell.js";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
function GridGroupingColumnFooterCell(props) {
|
|
7
6
|
const rootProps = useGridRootProps();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { gridColumnLookupSelector, gridRowTreeSelector, GRID_ROOT_GROUP_ID, gridRowsLookupSelector } from '@mui/x-data-grid-pro';
|
|
2
|
-
import { getVisibleRows } from '@mui/x-data-grid/internals';
|
|
2
|
+
import { getVisibleRows } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
export const shouldApplySorting = (aggregationRules, aggregatedFields) => {
|
|
4
4
|
return aggregatedFields.some(field => aggregationRules[field].aggregationFunction.applySorting);
|
|
5
5
|
};
|
|
@@ -5,4 +5,6 @@ export declare const GRID_AGGREGATION_FUNCTIONS: {
|
|
|
5
5
|
min: GridAggregationFunction<number | Date, number | Date>;
|
|
6
6
|
max: GridAggregationFunction<number | Date, number | Date>;
|
|
7
7
|
size: GridAggregationFunction<unknown, number>;
|
|
8
|
+
sizeTrue: GridAggregationFunction<unknown, number>;
|
|
9
|
+
sizeFalse: GridAggregationFunction<unknown, number>;
|
|
8
10
|
};
|
|
@@ -97,10 +97,44 @@ const sizeAgg = {
|
|
|
97
97
|
},
|
|
98
98
|
hasCellUnit: false
|
|
99
99
|
};
|
|
100
|
+
const sizeTrueAgg = {
|
|
101
|
+
apply: ({
|
|
102
|
+
values
|
|
103
|
+
}) => {
|
|
104
|
+
return values.filter(value => value === true).length;
|
|
105
|
+
},
|
|
106
|
+
columnTypes: ['boolean'],
|
|
107
|
+
label: 'size(true)',
|
|
108
|
+
valueFormatter: value => {
|
|
109
|
+
if (value == null || !isNumber(value)) {
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
return value.toLocaleString();
|
|
113
|
+
},
|
|
114
|
+
hasCellUnit: false
|
|
115
|
+
};
|
|
116
|
+
const sizeFalseAgg = {
|
|
117
|
+
apply: ({
|
|
118
|
+
values
|
|
119
|
+
}) => {
|
|
120
|
+
return values.filter(value => value === false).length;
|
|
121
|
+
},
|
|
122
|
+
columnTypes: ['boolean'],
|
|
123
|
+
label: 'size(false)',
|
|
124
|
+
valueFormatter: value => {
|
|
125
|
+
if (value == null || !isNumber(value)) {
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
return value.toLocaleString();
|
|
129
|
+
},
|
|
130
|
+
hasCellUnit: false
|
|
131
|
+
};
|
|
100
132
|
export const GRID_AGGREGATION_FUNCTIONS = {
|
|
101
133
|
sum: sumAgg,
|
|
102
134
|
avg: avgAgg,
|
|
103
135
|
min: minAgg,
|
|
104
136
|
max: maxAgg,
|
|
105
|
-
size: sizeAgg
|
|
137
|
+
size: sizeAgg,
|
|
138
|
+
sizeTrue: sizeTrueAgg,
|
|
139
|
+
sizeFalse: sizeFalseAgg
|
|
106
140
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { GridRowId, GridRowModel, GridColDef, GridValueFormatter } from '@mui/x-data-grid-pro';
|
|
2
|
-
import {
|
|
1
|
+
import type { GridRowId, GridRowModel, GridColDef, GridValueFormatter } from '@mui/x-data-grid-pro';
|
|
2
|
+
import type { GridAggregationPosition } from '@mui/x-data-grid-pro/internals';
|
|
3
|
+
import type { GridApiPremium } from "../../../models/gridApiPremium.js";
|
|
3
4
|
export interface GridAggregationState {
|
|
4
5
|
model: GridAggregationModel;
|
|
5
6
|
lookup: GridAggregationLookup;
|
|
@@ -108,20 +109,6 @@ export type GridAggregationLookup = {
|
|
|
108
109
|
};
|
|
109
110
|
};
|
|
110
111
|
};
|
|
111
|
-
export type GridAggregationPosition = 'inline' | 'footer';
|
|
112
|
-
export interface GridAggregationCellMeta {
|
|
113
|
-
/**
|
|
114
|
-
* If `true`, the current aggregated value has the same unit as the value of the other cells of this row.
|
|
115
|
-
* For instance, "min" / "max" aggregation have the same unit as the other cells.
|
|
116
|
-
* If `false`, the current aggregated value has another unit or not unit.
|
|
117
|
-
* For instance, "size" aggregation has no unit.
|
|
118
|
-
*/
|
|
119
|
-
hasCellUnit: boolean;
|
|
120
|
-
/**
|
|
121
|
-
* Name of the aggregation function currently applied on this cell.
|
|
122
|
-
*/
|
|
123
|
-
aggregationFunctionName: string;
|
|
124
|
-
}
|
|
125
112
|
export interface GridAggregationHeaderMeta {
|
|
126
113
|
aggregationRule: GridAggregationRule;
|
|
127
114
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GridAggregationPosition } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
import { GridRowId } from '@mui/x-data-grid-pro';
|
|
2
3
|
import { GridStatePremium } from "../../../models/gridStatePremium.js";
|
|
3
|
-
import { GridAggregationPosition } from "./gridAggregationInterfaces.js";
|
|
4
4
|
export declare const gridAggregationStateSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, unknown, import("./gridAggregationInterfaces.js").GridAggregationState>;
|
|
5
5
|
/**
|
|
6
6
|
* Get the aggregation model, containing the aggregation function of each column.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createSelector, createRootSelector } from '@mui/x-data-grid-pro/internals';
|
|
2
|
-
import { gridRowTreeSelector } from '@mui/x-data-grid';
|
|
2
|
+
import { gridRowTreeSelector } from '@mui/x-data-grid-pro';
|
|
3
3
|
export const gridAggregationStateSelector = createRootSelector(state => state.aggregation);
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { GridAggregationPosition, GridAggregationCellMeta } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
export type { GridAggregationState, GridAggregationInitialState, GridAggregationInternalCache, GridAggregationApi, GridAggregationGetCellValueParams, GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationParams, GridAggregationModel, GridAggregationLookup, GridAggregationHeaderMeta, GridAggregationRule, GridAggregationRules } from "./gridAggregationInterfaces.js";
|
|
2
3
|
export { gridAggregationStateSelector, gridAggregationLookupSelector, gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
3
4
|
export * from "./gridAggregationFunctions.js";
|
|
4
5
|
export { GRID_AGGREGATION_ROOT_FOOTER_ROW_ID, getAggregationFooterRowIdFromGroupId } from "./gridAggregationUtils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridColDef } from '@mui/x-data-grid-pro';
|
|
3
|
-
import
|
|
3
|
+
import { GridBaseColDef } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import { GridApiPremium } from "../../../models/gridApiPremium.js";
|
|
5
5
|
import type { GridAggregationRule } from "./gridAggregationInterfaces.js";
|
|
6
6
|
/**
|
|
@@ -2,8 +2,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["aggregationWrappedProperties"];
|
|
4
4
|
import { gridRowNodeSelector } from '@mui/x-data-grid-pro';
|
|
5
|
+
import { GridFooterCell } from '@mui/x-data-grid-pro/internals';
|
|
5
6
|
import { gridAggregationLookupSelector } from "./gridAggregationSelectors.js";
|
|
6
|
-
import { GridFooterCell } from "../../../components/GridFooterCell.js";
|
|
7
7
|
import { GridAggregationHeader } from "../../../components/GridAggregationHeader.js";
|
|
8
8
|
import { gridPivotActiveSelector } from "../pivoting/gridPivotingSelectors.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -31,7 +31,8 @@ const getAggregationValueWrappedRenderCell = ({
|
|
|
31
31
|
}
|
|
32
32
|
const aggregationMeta = {
|
|
33
33
|
hasCellUnit: aggregationRule.aggregationFunction.hasCellUnit ?? true,
|
|
34
|
-
aggregationFunctionName: aggregationRule.aggregationFunctionName
|
|
34
|
+
aggregationFunctionName: aggregationRule.aggregationFunctionName,
|
|
35
|
+
position: cellAggregationResult.position
|
|
35
36
|
};
|
|
36
37
|
return renderCell(_extends({}, params, {
|
|
37
38
|
aggregation: aggregationMeta
|
|
@@ -21,8 +21,10 @@ export const useGridDataSourcePremium = (apiRef, props) => {
|
|
|
21
21
|
const aggregationModel = gridAggregationModelSelector(apiRef);
|
|
22
22
|
const groupingModelSize = gridRowGroupingSanitizedModelSelector(apiRef).length;
|
|
23
23
|
const setStrategyAvailability = React.useCallback(() => {
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
const currentStrategy = props.treeData || !props.disableRowGrouping && groupingModelSize > 0 ? DataSourceRowsUpdateStrategy.GroupedData : DataSourceRowsUpdateStrategy.Default;
|
|
25
|
+
const prevStrategy = currentStrategy === DataSourceRowsUpdateStrategy.GroupedData ? DataSourceRowsUpdateStrategy.Default : DataSourceRowsUpdateStrategy.GroupedData;
|
|
26
|
+
apiRef.current.setStrategyAvailability(GridStrategyGroup.DataSource, prevStrategy, () => false);
|
|
27
|
+
apiRef.current.setStrategyAvailability(GridStrategyGroup.DataSource, currentStrategy, props.dataSource && !props.lazyLoading ? () => true : () => false);
|
|
26
28
|
}, [apiRef, props.dataSource, props.lazyLoading, props.treeData, props.disableRowGrouping, groupingModelSize]);
|
|
27
29
|
const handleEditRowWithAggregation = React.useCallback((params, updatedRow) => {
|
|
28
30
|
const rowTree = gridRowTreeSelector(apiRef);
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { GridExportDisplayOptions, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
1
|
+
import type { GridExportDisplayOptions, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
|
+
import type { GridAggregationCellMeta } from '@mui/x-data-grid-pro/internals';
|
|
2
3
|
import type { GridPipeProcessingLookupPro, GridControlledStateEventLookupPro, GridApiCachesPro, GridEventLookupPro } from '@mui/x-data-grid-pro/typeOverloads';
|
|
3
4
|
import type { GridGroupingValueGetter, GridGroupingValueSetter, GridPastedValueParser } from "../models/index.js";
|
|
4
|
-
import type { GridRowGroupingModel, GridAggregationModel,
|
|
5
|
+
import type { GridRowGroupingModel, GridAggregationModel, GridAggregationHeaderMeta, GridCellSelectionModel, Conversation } from "../hooks/index.js";
|
|
5
6
|
import { GridRowGroupingInternalCache } from "../hooks/features/rowGrouping/gridRowGroupingInterfaces.js";
|
|
6
7
|
import { GridAggregationInternalCache } from "../hooks/features/aggregation/gridAggregationInterfaces.js";
|
|
7
8
|
import type { GridExcelExportOptions } from "../hooks/features/export/gridExcelExportInterface.js";
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.shouldApplySorting = exports.createAggregationLookup = void 0;
|
|
7
7
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
8
|
-
var _internals = require("@mui/x-data-grid/internals");
|
|
8
|
+
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
9
9
|
const shouldApplySorting = (aggregationRules, aggregatedFields) => {
|
|
10
10
|
return aggregatedFields.some(field => aggregationRules[field].aggregationFunction.applySorting);
|
|
11
11
|
};
|
|
@@ -5,4 +5,6 @@ export declare const GRID_AGGREGATION_FUNCTIONS: {
|
|
|
5
5
|
min: GridAggregationFunction<number | Date, number | Date>;
|
|
6
6
|
max: GridAggregationFunction<number | Date, number | Date>;
|
|
7
7
|
size: GridAggregationFunction<unknown, number>;
|
|
8
|
+
sizeTrue: GridAggregationFunction<unknown, number>;
|
|
9
|
+
sizeFalse: GridAggregationFunction<unknown, number>;
|
|
8
10
|
};
|
|
@@ -103,10 +103,44 @@ const sizeAgg = {
|
|
|
103
103
|
},
|
|
104
104
|
hasCellUnit: false
|
|
105
105
|
};
|
|
106
|
+
const sizeTrueAgg = {
|
|
107
|
+
apply: ({
|
|
108
|
+
values
|
|
109
|
+
}) => {
|
|
110
|
+
return values.filter(value => value === true).length;
|
|
111
|
+
},
|
|
112
|
+
columnTypes: ['boolean'],
|
|
113
|
+
label: 'size(true)',
|
|
114
|
+
valueFormatter: value => {
|
|
115
|
+
if (value == null || !(0, _internals.isNumber)(value)) {
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
return value.toLocaleString();
|
|
119
|
+
},
|
|
120
|
+
hasCellUnit: false
|
|
121
|
+
};
|
|
122
|
+
const sizeFalseAgg = {
|
|
123
|
+
apply: ({
|
|
124
|
+
values
|
|
125
|
+
}) => {
|
|
126
|
+
return values.filter(value => value === false).length;
|
|
127
|
+
},
|
|
128
|
+
columnTypes: ['boolean'],
|
|
129
|
+
label: 'size(false)',
|
|
130
|
+
valueFormatter: value => {
|
|
131
|
+
if (value == null || !(0, _internals.isNumber)(value)) {
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
return value.toLocaleString();
|
|
135
|
+
},
|
|
136
|
+
hasCellUnit: false
|
|
137
|
+
};
|
|
106
138
|
const GRID_AGGREGATION_FUNCTIONS = exports.GRID_AGGREGATION_FUNCTIONS = {
|
|
107
139
|
sum: sumAgg,
|
|
108
140
|
avg: avgAgg,
|
|
109
141
|
min: minAgg,
|
|
110
142
|
max: maxAgg,
|
|
111
|
-
size: sizeAgg
|
|
143
|
+
size: sizeAgg,
|
|
144
|
+
sizeTrue: sizeTrueAgg,
|
|
145
|
+
sizeFalse: sizeFalseAgg
|
|
112
146
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { GridRowId, GridRowModel, GridColDef, GridValueFormatter } from '@mui/x-data-grid-pro';
|
|
2
|
-
import {
|
|
1
|
+
import type { GridRowId, GridRowModel, GridColDef, GridValueFormatter } from '@mui/x-data-grid-pro';
|
|
2
|
+
import type { GridAggregationPosition } from '@mui/x-data-grid-pro/internals';
|
|
3
|
+
import type { GridApiPremium } from "../../../models/gridApiPremium.js";
|
|
3
4
|
export interface GridAggregationState {
|
|
4
5
|
model: GridAggregationModel;
|
|
5
6
|
lookup: GridAggregationLookup;
|
|
@@ -108,20 +109,6 @@ export type GridAggregationLookup = {
|
|
|
108
109
|
};
|
|
109
110
|
};
|
|
110
111
|
};
|
|
111
|
-
export type GridAggregationPosition = 'inline' | 'footer';
|
|
112
|
-
export interface GridAggregationCellMeta {
|
|
113
|
-
/**
|
|
114
|
-
* If `true`, the current aggregated value has the same unit as the value of the other cells of this row.
|
|
115
|
-
* For instance, "min" / "max" aggregation have the same unit as the other cells.
|
|
116
|
-
* If `false`, the current aggregated value has another unit or not unit.
|
|
117
|
-
* For instance, "size" aggregation has no unit.
|
|
118
|
-
*/
|
|
119
|
-
hasCellUnit: boolean;
|
|
120
|
-
/**
|
|
121
|
-
* Name of the aggregation function currently applied on this cell.
|
|
122
|
-
*/
|
|
123
|
-
aggregationFunctionName: string;
|
|
124
|
-
}
|
|
125
112
|
export interface GridAggregationHeaderMeta {
|
|
126
113
|
aggregationRule: GridAggregationRule;
|
|
127
114
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GridAggregationPosition } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
import { GridRowId } from '@mui/x-data-grid-pro';
|
|
2
3
|
import { GridStatePremium } from "../../../models/gridStatePremium.js";
|
|
3
|
-
import { GridAggregationPosition } from "./gridAggregationInterfaces.js";
|
|
4
4
|
export declare const gridAggregationStateSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, unknown, import("./gridAggregationInterfaces.js").GridAggregationState>;
|
|
5
5
|
/**
|
|
6
6
|
* Get the aggregation model, containing the aggregation function of each column.
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.gridCellAggregationResultSelector = exports.gridAggregationStateSelector = exports.gridAggregationModelSelector = exports.gridAggregationLookupSelector = void 0;
|
|
7
7
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
8
|
-
var
|
|
8
|
+
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
9
9
|
const gridAggregationStateSelector = exports.gridAggregationStateSelector = (0, _internals.createRootSelector)(state => state.aggregation);
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -20,7 +20,7 @@ const gridAggregationModelSelector = exports.gridAggregationModelSelector = (0,
|
|
|
20
20
|
* @category Aggregation
|
|
21
21
|
*/
|
|
22
22
|
const gridAggregationLookupSelector = exports.gridAggregationLookupSelector = (0, _internals.createSelector)(gridAggregationStateSelector, aggregationState => aggregationState.lookup);
|
|
23
|
-
const gridCellAggregationResultSelector = exports.gridCellAggregationResultSelector = (0, _internals.createSelector)(
|
|
23
|
+
const gridCellAggregationResultSelector = exports.gridCellAggregationResultSelector = (0, _internals.createSelector)(_xDataGridPro.gridRowTreeSelector, gridAggregationLookupSelector, (rowTree, aggregationLookup, {
|
|
24
24
|
id,
|
|
25
25
|
field
|
|
26
26
|
}) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export type {
|
|
1
|
+
export type { GridAggregationPosition, GridAggregationCellMeta } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
export type { GridAggregationState, GridAggregationInitialState, GridAggregationInternalCache, GridAggregationApi, GridAggregationGetCellValueParams, GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationParams, GridAggregationModel, GridAggregationLookup, GridAggregationHeaderMeta, GridAggregationRule, GridAggregationRules } from "./gridAggregationInterfaces.js";
|
|
2
3
|
export { gridAggregationStateSelector, gridAggregationLookupSelector, gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
3
4
|
export * from "./gridAggregationFunctions.js";
|
|
4
5
|
export { GRID_AGGREGATION_ROOT_FOOTER_ROW_ID, getAggregationFooterRowIdFromGroupId } from "./gridAggregationUtils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridColDef } from '@mui/x-data-grid-pro';
|
|
3
|
-
import
|
|
3
|
+
import { GridBaseColDef } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import { GridApiPremium } from "../../../models/gridApiPremium.js";
|
|
5
5
|
import type { GridAggregationRule } from "./gridAggregationInterfaces.js";
|
|
6
6
|
/**
|
|
@@ -8,8 +8,8 @@ exports.wrapColumnWithAggregationValue = exports.unwrapColumnFromAggregation = v
|
|
|
8
8
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
11
|
+
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
11
12
|
var _gridAggregationSelectors = require("./gridAggregationSelectors");
|
|
12
|
-
var _GridFooterCell = require("../../../components/GridFooterCell");
|
|
13
13
|
var _GridAggregationHeader = require("../../../components/GridAggregationHeader");
|
|
14
14
|
var _gridPivotingSelectors = require("../pivoting/gridPivotingSelectors");
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -26,7 +26,7 @@ const getAggregationValueWrappedRenderCell = ({
|
|
|
26
26
|
if (cellAggregationResult != null) {
|
|
27
27
|
if (!renderCell) {
|
|
28
28
|
if (cellAggregationResult.position === 'footer') {
|
|
29
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.GridFooterCell, (0, _extends2.default)({}, params));
|
|
30
30
|
}
|
|
31
31
|
if (pivotActive && cellAggregationResult.value === 0) {
|
|
32
32
|
return null;
|
|
@@ -38,7 +38,8 @@ const getAggregationValueWrappedRenderCell = ({
|
|
|
38
38
|
}
|
|
39
39
|
const aggregationMeta = {
|
|
40
40
|
hasCellUnit: aggregationRule.aggregationFunction.hasCellUnit ?? true,
|
|
41
|
-
aggregationFunctionName: aggregationRule.aggregationFunctionName
|
|
41
|
+
aggregationFunctionName: aggregationRule.aggregationFunctionName,
|
|
42
|
+
position: cellAggregationResult.position
|
|
42
43
|
};
|
|
43
44
|
return renderCell((0, _extends2.default)({}, params, {
|
|
44
45
|
aggregation: aggregationMeta
|
|
@@ -28,8 +28,10 @@ const useGridDataSourcePremium = (apiRef, props) => {
|
|
|
28
28
|
const aggregationModel = (0, _gridAggregationSelectors.gridAggregationModelSelector)(apiRef);
|
|
29
29
|
const groupingModelSize = (0, _gridRowGroupingSelector.gridRowGroupingSanitizedModelSelector)(apiRef).length;
|
|
30
30
|
const setStrategyAvailability = React.useCallback(() => {
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const currentStrategy = props.treeData || !props.disableRowGrouping && groupingModelSize > 0 ? _internals.DataSourceRowsUpdateStrategy.GroupedData : _internals.DataSourceRowsUpdateStrategy.Default;
|
|
32
|
+
const prevStrategy = currentStrategy === _internals.DataSourceRowsUpdateStrategy.GroupedData ? _internals.DataSourceRowsUpdateStrategy.Default : _internals.DataSourceRowsUpdateStrategy.GroupedData;
|
|
33
|
+
apiRef.current.setStrategyAvailability(_internals.GridStrategyGroup.DataSource, prevStrategy, () => false);
|
|
34
|
+
apiRef.current.setStrategyAvailability(_internals.GridStrategyGroup.DataSource, currentStrategy, props.dataSource && !props.lazyLoading ? () => true : () => false);
|
|
33
35
|
}, [apiRef, props.dataSource, props.lazyLoading, props.treeData, props.disableRowGrouping, groupingModelSize]);
|
|
34
36
|
const handleEditRowWithAggregation = React.useCallback((params, updatedRow) => {
|
|
35
37
|
const rowTree = (0, _xDataGridPro.gridRowTreeSelector)(apiRef);
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.24.0",
|
|
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.3",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"prop-types": "^15.8.1",
|
|
41
|
-
"@mui/x-data-grid": "8.
|
|
42
|
-
"@mui/x-data-grid-pro": "8.
|
|
43
|
-
"@mui/x-
|
|
44
|
-
"@mui/x-
|
|
41
|
+
"@mui/x-data-grid": "8.24.0",
|
|
42
|
+
"@mui/x-data-grid-pro": "8.24.0",
|
|
43
|
+
"@mui/x-license": "8.24.0",
|
|
44
|
+
"@mui/x-internals": "8.24.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@emotion/react": "^11.9.0",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { GridExportDisplayOptions, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
1
|
+
import type { GridExportDisplayOptions, GridValidRowModel } from '@mui/x-data-grid-pro';
|
|
2
|
+
import type { GridAggregationCellMeta } from '@mui/x-data-grid-pro/internals';
|
|
2
3
|
import type { GridPipeProcessingLookupPro, GridControlledStateEventLookupPro, GridApiCachesPro, GridEventLookupPro } from '@mui/x-data-grid-pro/typeOverloads';
|
|
3
4
|
import type { GridGroupingValueGetter, GridGroupingValueSetter, GridPastedValueParser } from "../models/index.js";
|
|
4
|
-
import type { GridRowGroupingModel, GridAggregationModel,
|
|
5
|
+
import type { GridRowGroupingModel, GridAggregationModel, GridAggregationHeaderMeta, GridCellSelectionModel, Conversation } from "../hooks/index.js";
|
|
5
6
|
import { GridRowGroupingInternalCache } from "../hooks/features/rowGrouping/gridRowGroupingInterfaces.js";
|
|
6
7
|
import { GridAggregationInternalCache } from "../hooks/features/aggregation/gridAggregationInterfaces.js";
|
|
7
8
|
import type { GridExcelExportOptions } from "../hooks/features/export/gridExcelExportInterface.js";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GridRenderCellParams } from '@mui/x-data-grid';
|
|
2
|
-
import { Theme } from '@mui/material/styles';
|
|
3
|
-
import { SxProps } from '@mui/system';
|
|
4
|
-
interface GridFooterCellProps extends GridRenderCellParams {
|
|
5
|
-
sx?: SxProps<Theme>;
|
|
6
|
-
}
|
|
7
|
-
declare function GridFooterCell(props: GridFooterCellProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export { GridFooterCell };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.GridFooterCell = GridFooterCell;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
|
-
var _xDataGrid = require("@mui/x-data-grid");
|
|
11
|
-
var _internals = require("@mui/x-data-grid/internals");
|
|
12
|
-
var _styles = require("@mui/material/styles");
|
|
13
|
-
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
|
-
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
const _excluded = ["formattedValue", "colDef", "cellMode", "row", "api", "id", "value", "rowNode", "field", "hasFocus", "tabIndex", "isEditable"];
|
|
17
|
-
const GridFooterCellRoot = (0, _styles.styled)('div', {
|
|
18
|
-
name: 'MuiDataGrid',
|
|
19
|
-
slot: 'FooterCell'
|
|
20
|
-
})({
|
|
21
|
-
fontWeight: _internals.vars.typography.fontWeight.medium,
|
|
22
|
-
color: _internals.vars.colors.foreground.accent
|
|
23
|
-
});
|
|
24
|
-
const useUtilityClasses = ownerState => {
|
|
25
|
-
const {
|
|
26
|
-
classes
|
|
27
|
-
} = ownerState;
|
|
28
|
-
const slots = {
|
|
29
|
-
root: ['footerCell']
|
|
30
|
-
};
|
|
31
|
-
return (0, _composeClasses.default)(slots, _xDataGrid.getDataGridUtilityClass, classes);
|
|
32
|
-
};
|
|
33
|
-
function GridFooterCell(props) {
|
|
34
|
-
const {
|
|
35
|
-
formattedValue
|
|
36
|
-
} = props,
|
|
37
|
-
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
38
|
-
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
39
|
-
const ownerState = rootProps;
|
|
40
|
-
const classes = useUtilityClasses(ownerState);
|
|
41
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridFooterCellRoot, (0, _extends2.default)({
|
|
42
|
-
ownerState: ownerState,
|
|
43
|
-
className: classes.root
|
|
44
|
-
}, other, {
|
|
45
|
-
children: formattedValue
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GridRenderCellParams } from '@mui/x-data-grid';
|
|
2
|
-
import { Theme } from '@mui/material/styles';
|
|
3
|
-
import { SxProps } from '@mui/system';
|
|
4
|
-
interface GridFooterCellProps extends GridRenderCellParams {
|
|
5
|
-
sx?: SxProps<Theme>;
|
|
6
|
-
}
|
|
7
|
-
declare function GridFooterCell(props: GridFooterCellProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export { GridFooterCell };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["formattedValue", "colDef", "cellMode", "row", "api", "id", "value", "rowNode", "field", "hasFocus", "tabIndex", "isEditable"];
|
|
4
|
-
import { getDataGridUtilityClass } from '@mui/x-data-grid';
|
|
5
|
-
import { vars } from '@mui/x-data-grid/internals';
|
|
6
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
8
|
-
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
9
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
const GridFooterCellRoot = styled('div', {
|
|
11
|
-
name: 'MuiDataGrid',
|
|
12
|
-
slot: 'FooterCell'
|
|
13
|
-
})({
|
|
14
|
-
fontWeight: vars.typography.fontWeight.medium,
|
|
15
|
-
color: vars.colors.foreground.accent
|
|
16
|
-
});
|
|
17
|
-
const useUtilityClasses = ownerState => {
|
|
18
|
-
const {
|
|
19
|
-
classes
|
|
20
|
-
} = ownerState;
|
|
21
|
-
const slots = {
|
|
22
|
-
root: ['footerCell']
|
|
23
|
-
};
|
|
24
|
-
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
25
|
-
};
|
|
26
|
-
function GridFooterCell(props) {
|
|
27
|
-
const {
|
|
28
|
-
formattedValue
|
|
29
|
-
} = props,
|
|
30
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
31
|
-
const rootProps = useGridRootProps();
|
|
32
|
-
const ownerState = rootProps;
|
|
33
|
-
const classes = useUtilityClasses(ownerState);
|
|
34
|
-
return /*#__PURE__*/_jsx(GridFooterCellRoot, _extends({
|
|
35
|
-
ownerState: ownerState,
|
|
36
|
-
className: classes.root
|
|
37
|
-
}, other, {
|
|
38
|
-
children: formattedValue
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
export { GridFooterCell };
|