@mui/x-data-grid-premium 8.5.0 → 8.5.1
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 +112 -0
- package/DataGridPremium/DataGridPremium.js +1 -1
- package/DataGridPremium/useDataGridPremiumComponent.js +9 -5
- package/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +1 -1
- package/components/aiAssistantPanel/AiAssistantPanelTrigger.js +2 -1
- package/components/export/ExportExcel.js +2 -2
- package/components/pivotPanel/PivotPanelTrigger.d.ts +1 -1
- package/components/pivotPanel/PivotPanelTrigger.js +2 -2
- package/components/promptField/PromptField.js +2 -2
- package/components/promptField/PromptFieldControl.js +2 -2
- package/components/promptField/PromptFieldRecord.js +2 -2
- package/components/promptField/PromptFieldSend.js +2 -2
- package/esm/DataGridPremium/DataGridPremium.js +1 -1
- package/esm/DataGridPremium/useDataGridPremiumComponent.js +9 -5
- package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +1 -1
- package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.js +3 -2
- package/esm/components/export/ExportExcel.js +2 -2
- package/esm/components/pivotPanel/PivotPanelTrigger.d.ts +1 -1
- package/esm/components/pivotPanel/PivotPanelTrigger.js +2 -2
- package/esm/components/promptField/PromptField.js +2 -2
- package/esm/components/promptField/PromptFieldControl.js +2 -2
- package/esm/components/promptField/PromptFieldRecord.js +2 -2
- package/esm/components/promptField/PromptFieldSend.js +2 -2
- package/esm/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +2 -4
- package/esm/index.js +1 -1
- package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +1 -3
- package/index.js +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,118 @@
|
|
|
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.5.1
|
|
9
|
+
|
|
10
|
+
<!-- generated comparing v8.5.0..master -->
|
|
11
|
+
|
|
12
|
+
_Jun 5, 2025_
|
|
13
|
+
|
|
14
|
+
We'd like to extend a big thank you to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
15
|
+
|
|
16
|
+
- 📊 Allow exporting pie charts
|
|
17
|
+
- 📚 Documentation improvements
|
|
18
|
+
- 🌎 Improve Portuguese (ptPT) translations on the Data Grid
|
|
19
|
+
- 🌎 Improve Portuguese (ptPT, ptBR) translations on Charts
|
|
20
|
+
- 🌎 Improve Arabic (ar-SD) locale
|
|
21
|
+
- 🐞 Bugfixes
|
|
22
|
+
|
|
23
|
+
Special thanks go out to the community members for their valuable contributions: @moosekebab, @TiagoPortfolio.
|
|
24
|
+
The following are all team members who have contributed to this release:
|
|
25
|
+
@alexfauquette, @bernardobelchior, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @arminmeh.
|
|
26
|
+
|
|
27
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
28
|
+
|
|
29
|
+
### Data Grid
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid@8.5.1`
|
|
32
|
+
|
|
33
|
+
- [DataGrid] Fix `registerPipeProcessor()` for Node v20 (#18241) @arminmeh
|
|
34
|
+
- [DataGrid] Fix background color in column header filler cells (#18188) @KenanYusuf
|
|
35
|
+
- [DataGrid] Keep pipe pre-processors execution order when callback reference changes (#17558) @arminmeh
|
|
36
|
+
- [DataGrid] Use `useComponentRenderer` from x-internals (#18203) @bernardobelchior
|
|
37
|
+
- [l10n] Improve Arabic (ar-SD) locale (#17959) @moosekebab
|
|
38
|
+
- [l10n] Improve Portuguese from Portugal (pt-PT) locale (#18064) @TiagoPortfolio
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid@8.5.1`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPro] Skip rendering detail panels of the rows turned into skeleton rows with lazy loading (#17958) @arminmeh
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-data-grid-premium@8.5.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
47
|
+
|
|
48
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.1`.
|
|
49
|
+
|
|
50
|
+
### Date and Time Pickers
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers@8.5.1`
|
|
53
|
+
|
|
54
|
+
- [pickers] Fix `transformOrigin` resolving based on popper `placement` (#18206) @LukasTy
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-date-pickers-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
57
|
+
|
|
58
|
+
Same changes as in `@mui/x-date-pickers@8.5.1`.
|
|
59
|
+
|
|
60
|
+
### Charts
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-charts@8.5.1`
|
|
63
|
+
|
|
64
|
+
- [charts] Allow skipping tooltip render (#18050) @alexfauquette
|
|
65
|
+
- [charts] Fix act warnings in toolbar tests (#18212) @JCQuintas
|
|
66
|
+
- [charts] Fix prop typo in `extendVertically` (#18211) @JCQuintas
|
|
67
|
+
- [charts] Fix responsive height for ChartsWrapper (#18183) @alexfauquette
|
|
68
|
+
- [charts] Improve charts toolbar accessibility (#18056) @bernardobelchior
|
|
69
|
+
- [charts] Let line series propagate null from the dataset (#18223) @alexfauquette
|
|
70
|
+
- [l10n] Add Portuguese locales for charts (pt-PT, pt-BR) (#18069) @bernardobelchior
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-charts-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
|
+
|
|
74
|
+
Same changes as in `@mui/x-charts@8.5.1`, plus:
|
|
75
|
+
|
|
76
|
+
- [charts-pro] Add `linear-sharp` curve as alternative to square edge (#17966) @JCQuintas
|
|
77
|
+
- [charts-pro] Add correct classes to `FunnelSectionLabel` (#18061) @JCQuintas
|
|
78
|
+
- [charts-pro] Allow exporting a pie chart (#18063) @bernardobelchior
|
|
79
|
+
- [charts-pro] Fix initial render for zoom slider selection (#18208) @bernardobelchior
|
|
80
|
+
- [charts-pro] Fix props being passed to DOM in FunnelChart (#18192) @JCQuintas
|
|
81
|
+
- [charts-pro] Show axis value in zoom slider tooltip (#18054) @bernardobelchior
|
|
82
|
+
- [charts-pro] Render the toolbar in the heatmap chart (#18247) @bernardobelchior
|
|
83
|
+
|
|
84
|
+
### Tree View
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-tree-view@8.5.1`
|
|
87
|
+
|
|
88
|
+
Internal changes.
|
|
89
|
+
|
|
90
|
+
#### `@mui/x-tree-view-pro@8.5.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
91
|
+
|
|
92
|
+
Same changes as in `@mui/x-tree-view@8.5.1`.
|
|
93
|
+
|
|
94
|
+
### Docs
|
|
95
|
+
|
|
96
|
+
- [docs] Update `valueFormatter` signature in migration guide (#18226) @michelengelen
|
|
97
|
+
|
|
98
|
+
### Core
|
|
99
|
+
|
|
100
|
+
- chore(deps): bump @next/eslint-plugin-next to 15.3.3 (#18155) @renovate[bot]
|
|
101
|
+
- chore(deps): bump @types/lodash to ^4.17.17 (#17990) @renovate[bot]
|
|
102
|
+
- chore(deps): bump babel (#18157) @renovate[bot]
|
|
103
|
+
- chore(deps): bump eslint to ^9.28.0 (#17352) @renovate[bot]
|
|
104
|
+
- chore(deps): bump material ui (#17802) @renovate[bot]
|
|
105
|
+
- chore(deps): bump next to ^15.3.3 (#18159) @renovate[bot]
|
|
106
|
+
- chore(deps): bump ossf/scorecard-action action to v2.4.2 (#18160) @renovate[bot]
|
|
107
|
+
- chore(deps): bump react-router to ^7.6.1 (#18162) @renovate[bot]
|
|
108
|
+
- chore(deps): bump yargs to ^18.0.0 (#18169) @renovate[bot]
|
|
109
|
+
- [code-infra] Different approach to console testing for `processRowUpdate` (#18213) @JCQuintas
|
|
110
|
+
- [code-infra] Fix act warnings in DataGrid/toolbar (#18207) @JCQuintas
|
|
111
|
+
- [code-infra] Remove `istanbul` references (#18194) @JCQuintas
|
|
112
|
+
- [code-infra] Remove codesandbox:ci (#18179) @JCQuintas
|
|
113
|
+
- [code-infra] Replace `mocha` with `vitest` on e2e and regression tests (#18071) @JCQuintas
|
|
114
|
+
- [code-infra] Upgrade @mui/internal-test-utils (#18191) @JCQuintas
|
|
115
|
+
- [code-infra] Use vitest for `no-direct-state-access` tests (#18209) @JCQuintas
|
|
116
|
+
- [infra] Improve test setup (#18228) @LukasTy
|
|
117
|
+
- [infra] Update bug and feature request templates to standardize label types (#18198) @michelengelen
|
|
118
|
+
- [infra] Use `playwright` docker image (#18186) @LukasTy
|
|
119
|
+
|
|
8
120
|
## 8.5.0
|
|
9
121
|
|
|
10
122
|
_May 29, 2025_
|
|
@@ -40,7 +40,7 @@ const configuration = {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
const releaseInfo = "
|
|
43
|
+
const releaseInfo = "MTc0OTA3MDgwMDAwMA==";
|
|
44
44
|
const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
45
45
|
packageName: "x-data-grid-premium",
|
|
46
46
|
releaseInfo: releaseInfo
|
|
@@ -36,19 +36,23 @@ const useDataGridPremiumComponent = (apiRef, inProps) => {
|
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Register all pre-processors called during state initialization here.
|
|
39
|
+
* Some pre-processors are changing the same part of the state (like the order of the columns).
|
|
40
|
+
* Order them in descending order of priority.
|
|
41
|
+
* For example, left pinned columns should always render first from the left, so the `hydrateColumns` pre-processor from `useGridColumnPinningPreProcessors` should be called last (after all other `hydrateColumns` pre-processors).
|
|
42
|
+
* Similarly, the `hydrateColumns` pre-processor from `useGridRowSelectionPreProcessors` should be called after `useGridRowGroupingPreProcessors` because the selection checkboxes should appear before the grouping columns.
|
|
43
|
+
* Desired autogenerated columns order is:
|
|
44
|
+
* left pinned columns -> row reordering column -> checkbox column -> tree data / row grouping column -> master detail column -> rest of the columns
|
|
39
45
|
*/
|
|
40
|
-
(0, _internals.
|
|
41
|
-
(0, _internals.useGridRowReorderPreProcessors)(apiRef, props);
|
|
46
|
+
(0, _internals.useGridDetailPanelPreProcessors)(apiRef, props);
|
|
42
47
|
(0, _useGridRowGroupingPreProcessors.useGridRowGroupingPreProcessors)(apiRef, props);
|
|
43
48
|
(0, _useGridDataSourceRowGroupingPreProcessors.useGridDataSourceRowGroupingPreProcessors)(apiRef, props);
|
|
44
49
|
(0, _internals.useGridTreeDataPreProcessors)(apiRef, props);
|
|
45
50
|
(0, _internals.useGridDataSourceTreeDataPreProcessors)(apiRef, props);
|
|
51
|
+
(0, _internals.useGridRowSelectionPreProcessors)(apiRef, props);
|
|
46
52
|
(0, _internals.useGridLazyLoaderPreProcessors)(apiRef, props);
|
|
47
53
|
(0, _internals.useGridRowPinningPreProcessors)(apiRef);
|
|
48
54
|
(0, _useGridAggregationPreProcessors.useGridAggregationPreProcessors)(apiRef, props);
|
|
49
|
-
(0, _internals.
|
|
50
|
-
// The column pinning `hydrateColumns` pre-processor must be after every other `hydrateColumns` pre-processors
|
|
51
|
-
// Because it changes the order of the columns.
|
|
55
|
+
(0, _internals.useGridRowReorderPreProcessors)(apiRef, props);
|
|
52
56
|
(0, _internals.useGridColumnPinningPreProcessors)(apiRef, props);
|
|
53
57
|
(0, _internals.useGridRowsPreProcessors)(apiRef);
|
|
54
58
|
|
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
14
14
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
15
|
+
var _useComponentRenderer = require("@mui/x-internals/useComponentRenderer");
|
|
15
16
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
16
17
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
17
18
|
var _utils = require("@mui/material/utils");
|
|
@@ -67,7 +68,7 @@ const AiAssistantPanelTrigger = exports.AiAssistantPanelTrigger = (0, _forwardRe
|
|
|
67
68
|
}
|
|
68
69
|
onPointerUp?.(event);
|
|
69
70
|
};
|
|
70
|
-
const element = (0,
|
|
71
|
+
const element = (0, _useComponentRenderer.useComponentRenderer)(rootProps.slots.baseButton, render, (0, _extends2.default)({}, rootProps.slotProps?.baseButton, {
|
|
71
72
|
id: buttonId,
|
|
72
73
|
'aria-haspopup': 'true',
|
|
73
74
|
'aria-expanded': open ? 'true' : undefined,
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var
|
|
13
|
+
var _useComponentRenderer = require("@mui/x-internals/useComponentRenderer");
|
|
14
14
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
15
15
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
16
16
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -41,7 +41,7 @@ const ExportExcel = exports.ExportExcel = (0, _forwardRef.forwardRef)(function E
|
|
|
41
41
|
apiRef.current.exportDataAsExcel(options);
|
|
42
42
|
onClick?.(event);
|
|
43
43
|
};
|
|
44
|
-
const element = (0,
|
|
44
|
+
const element = (0, _useComponentRenderer.useComponentRenderer)(rootProps.slots.baseButton, render, (0, _extends2.default)({
|
|
45
45
|
onClick: handleClick
|
|
46
46
|
}, rootProps.slotProps?.baseButton, other, {
|
|
47
47
|
ref
|
|
@@ -12,7 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
14
14
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
15
|
-
var
|
|
15
|
+
var _useComponentRenderer = require("@mui/x-internals/useComponentRenderer");
|
|
16
16
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
17
17
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
18
18
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -53,7 +53,7 @@ const PivotPanelTrigger = exports.PivotPanelTrigger = (0, _forwardRef.forwardRef
|
|
|
53
53
|
apiRef.current.setPivotPanelOpen(!open);
|
|
54
54
|
onClick?.(event);
|
|
55
55
|
};
|
|
56
|
-
const element = (0,
|
|
56
|
+
const element = (0, _useComponentRenderer.useComponentRenderer)(rootProps.slots.baseButton, render, (0, _extends2.default)({}, rootProps.slotProps?.baseButton, {
|
|
57
57
|
id: buttonId,
|
|
58
58
|
// TODO: Hook up the panel/trigger IDs to the pivot panel
|
|
59
59
|
'aria-haspopup': 'true',
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var
|
|
13
|
+
var _useComponentRenderer = require("@mui/x-internals/useComponentRenderer");
|
|
14
14
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
15
15
|
var _PromptFieldContext = require("./PromptFieldContext");
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -59,7 +59,7 @@ const PromptField = exports.PromptField = (0, _forwardRef.forwardRef)(function P
|
|
|
59
59
|
onSubmit: handleOnSubmit,
|
|
60
60
|
onError: onRecordError
|
|
61
61
|
}), [state, lang, onRecordError, handleOnSubmit]);
|
|
62
|
-
const element = (0,
|
|
62
|
+
const element = (0, _useComponentRenderer.useComponentRenderer)('div', render, (0, _extends2.default)({
|
|
63
63
|
className: resolvedClassName
|
|
64
64
|
}, other, {
|
|
65
65
|
ref
|
|
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
14
|
-
var
|
|
14
|
+
var _useComponentRenderer = require("@mui/x-internals/useComponentRenderer");
|
|
15
15
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
16
16
|
var _PromptFieldContext = require("./PromptFieldContext");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -53,7 +53,7 @@ const PromptFieldControl = exports.PromptFieldControl = (0, _forwardRef.forwardR
|
|
|
53
53
|
}
|
|
54
54
|
onKeyDown?.(event);
|
|
55
55
|
};
|
|
56
|
-
const element = (0,
|
|
56
|
+
const element = (0, _useComponentRenderer.useComponentRenderer)(rootProps.slots.baseTextField, render, (0, _extends2.default)({}, rootProps.slotProps?.baseTextField, {
|
|
57
57
|
value: state.value,
|
|
58
58
|
className: resolvedClassName
|
|
59
59
|
}, other, {
|
|
@@ -13,7 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _useTimeout = require("@mui/utils/useTimeout");
|
|
14
14
|
var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
|
|
15
15
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
16
|
-
var
|
|
16
|
+
var _useComponentRenderer = require("@mui/x-internals/useComponentRenderer");
|
|
17
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
18
|
var _PromptFieldContext = require("./PromptFieldContext");
|
|
19
19
|
var _speechRecognition = require("../../utils/speechRecognition");
|
|
@@ -120,7 +120,7 @@ const PromptFieldRecord = exports.PromptFieldRecord = (0, _forwardRef.forwardRef
|
|
|
120
120
|
recognition.abort();
|
|
121
121
|
onClick?.(event);
|
|
122
122
|
};
|
|
123
|
-
const element = (0,
|
|
123
|
+
const element = (0, _useComponentRenderer.useComponentRenderer)(rootProps.slots.baseIconButton, render, (0, _extends2.default)({}, rootProps.slotProps?.baseIconButton, {
|
|
124
124
|
className: resolvedClassName,
|
|
125
125
|
disabled: state.disabled
|
|
126
126
|
}, other, {
|
|
@@ -11,7 +11,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
14
|
-
var
|
|
14
|
+
var _useComponentRenderer = require("@mui/x-internals/useComponentRenderer");
|
|
15
15
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
16
16
|
var _PromptFieldContext = require("./PromptFieldContext");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -45,7 +45,7 @@ const PromptFieldSend = exports.PromptFieldSend = (0, _forwardRef.forwardRef)(fu
|
|
|
45
45
|
onSubmit(state.value);
|
|
46
46
|
onClick?.(event);
|
|
47
47
|
};
|
|
48
|
-
const element = (0,
|
|
48
|
+
const element = (0, _useComponentRenderer.useComponentRenderer)(rootProps.slots.baseIconButton, render, (0, _extends2.default)({}, rootProps.slotProps?.baseIconButton, {
|
|
49
49
|
className: resolvedClassName,
|
|
50
50
|
disabled: state.disabled || state.recording || !state.value.trim()
|
|
51
51
|
}, other, {
|
|
@@ -27,19 +27,23 @@ export const useDataGridPremiumComponent = (apiRef, inProps) => {
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Register all pre-processors called during state initialization here.
|
|
30
|
+
* Some pre-processors are changing the same part of the state (like the order of the columns).
|
|
31
|
+
* Order them in descending order of priority.
|
|
32
|
+
* For example, left pinned columns should always render first from the left, so the `hydrateColumns` pre-processor from `useGridColumnPinningPreProcessors` should be called last (after all other `hydrateColumns` pre-processors).
|
|
33
|
+
* Similarly, the `hydrateColumns` pre-processor from `useGridRowSelectionPreProcessors` should be called after `useGridRowGroupingPreProcessors` because the selection checkboxes should appear before the grouping columns.
|
|
34
|
+
* Desired autogenerated columns order is:
|
|
35
|
+
* left pinned columns -> row reordering column -> checkbox column -> tree data / row grouping column -> master detail column -> rest of the columns
|
|
30
36
|
*/
|
|
31
|
-
|
|
32
|
-
useGridRowReorderPreProcessors(apiRef, props);
|
|
37
|
+
useGridDetailPanelPreProcessors(apiRef, props);
|
|
33
38
|
useGridRowGroupingPreProcessors(apiRef, props);
|
|
34
39
|
useGridDataSourceRowGroupingPreProcessors(apiRef, props);
|
|
35
40
|
useGridTreeDataPreProcessors(apiRef, props);
|
|
36
41
|
useGridDataSourceTreeDataPreProcessors(apiRef, props);
|
|
42
|
+
useGridRowSelectionPreProcessors(apiRef, props);
|
|
37
43
|
useGridLazyLoaderPreProcessors(apiRef, props);
|
|
38
44
|
useGridRowPinningPreProcessors(apiRef);
|
|
39
45
|
useGridAggregationPreProcessors(apiRef, props);
|
|
40
|
-
|
|
41
|
-
// The column pinning `hydrateColumns` pre-processor must be after every other `hydrateColumns` pre-processors
|
|
42
|
-
// Because it changes the order of the columns.
|
|
46
|
+
useGridRowReorderPreProcessors(apiRef, props);
|
|
43
47
|
useGridColumnPinningPreProcessors(apiRef, props);
|
|
44
48
|
useGridRowsPreProcessors(apiRef);
|
|
45
49
|
|
|
@@ -5,7 +5,8 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import useId from '@mui/utils/useId';
|
|
7
7
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
9
|
+
import { useGridPanelContext } from '@mui/x-data-grid-pro/internals';
|
|
9
10
|
import { gridPreferencePanelStateSelector, GridPreferencePanelsValue, useGridSelector } from '@mui/x-data-grid-pro';
|
|
10
11
|
import { useForkRef } from '@mui/material/utils';
|
|
11
12
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
@@ -59,7 +60,7 @@ const AiAssistantPanelTrigger = forwardRef(function AiAssistantPanelTrigger(prop
|
|
|
59
60
|
}
|
|
60
61
|
onPointerUp?.(event);
|
|
61
62
|
};
|
|
62
|
-
const element =
|
|
63
|
+
const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {
|
|
63
64
|
id: buttonId,
|
|
64
65
|
'aria-haspopup': 'true',
|
|
65
66
|
'aria-expanded': open ? 'true' : undefined,
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["render", "options", "onClick"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
6
|
+
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
7
7
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
8
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
9
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -33,7 +33,7 @@ const ExportExcel = forwardRef(function ExportExcel(props, ref) {
|
|
|
33
33
|
apiRef.current.exportDataAsExcel(options);
|
|
34
34
|
onClick?.(event);
|
|
35
35
|
};
|
|
36
|
-
const element =
|
|
36
|
+
const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({
|
|
37
37
|
onClick: handleClick
|
|
38
38
|
}, rootProps.slotProps?.baseButton, other, {
|
|
39
39
|
ref
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import useId from '@mui/utils/useId';
|
|
7
7
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
|
-
import {
|
|
8
|
+
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
9
9
|
import { useGridSelector } from '@mui/x-data-grid-pro';
|
|
10
10
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
11
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -45,7 +45,7 @@ const PivotPanelTrigger = forwardRef(function PivotPanelTrigger(props, ref) {
|
|
|
45
45
|
apiRef.current.setPivotPanelOpen(!open);
|
|
46
46
|
onClick?.(event);
|
|
47
47
|
};
|
|
48
|
-
const element =
|
|
48
|
+
const element = useComponentRenderer(rootProps.slots.baseButton, render, _extends({}, rootProps.slotProps?.baseButton, {
|
|
49
49
|
id: buttonId,
|
|
50
50
|
// TODO: Hook up the panel/trigger IDs to the pivot panel
|
|
51
51
|
'aria-haspopup': 'true',
|
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["render", "className", "lang", "onRecordError", "onSubmit"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
6
|
+
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
7
7
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
8
|
import { PromptFieldContext } from "./PromptFieldContext.js";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -51,7 +51,7 @@ const PromptField = forwardRef(function PromptField(props, ref) {
|
|
|
51
51
|
onSubmit: handleOnSubmit,
|
|
52
52
|
onError: onRecordError
|
|
53
53
|
}), [state, lang, onRecordError, handleOnSubmit]);
|
|
54
|
-
const element =
|
|
54
|
+
const element = useComponentRenderer('div', render, _extends({
|
|
55
55
|
className: resolvedClassName
|
|
56
56
|
}, other, {
|
|
57
57
|
ref
|
|
@@ -4,7 +4,7 @@ const _excluded = ["render", "className", "onChange", "onKeyDown"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
|
-
import {
|
|
7
|
+
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
8
8
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
9
|
import { usePromptFieldContext } from "./PromptFieldContext.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -45,7 +45,7 @@ const PromptFieldControl = forwardRef(function PromptFieldControl(props, ref) {
|
|
|
45
45
|
}
|
|
46
46
|
onKeyDown?.(event);
|
|
47
47
|
};
|
|
48
|
-
const element =
|
|
48
|
+
const element = useComponentRenderer(rootProps.slots.baseTextField, render, _extends({}, rootProps.slotProps?.baseTextField, {
|
|
49
49
|
value: state.value,
|
|
50
50
|
className: resolvedClassName
|
|
51
51
|
}, other, {
|
|
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import { Timeout } from '@mui/utils/useTimeout';
|
|
7
7
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
8
8
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
|
-
import {
|
|
9
|
+
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
10
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
11
|
import { usePromptFieldContext } from "./PromptFieldContext.js";
|
|
12
12
|
import { BrowserSpeechRecognition } from "../../utils/speechRecognition.js";
|
|
@@ -112,7 +112,7 @@ const PromptFieldRecord = forwardRef(function PromptFieldRecord(props, ref) {
|
|
|
112
112
|
recognition.abort();
|
|
113
113
|
onClick?.(event);
|
|
114
114
|
};
|
|
115
|
-
const element =
|
|
115
|
+
const element = useComponentRenderer(rootProps.slots.baseIconButton, render, _extends({}, rootProps.slotProps?.baseIconButton, {
|
|
116
116
|
className: resolvedClassName,
|
|
117
117
|
disabled: state.disabled
|
|
118
118
|
}, other, {
|
|
@@ -4,7 +4,7 @@ const _excluded = ["render", "className", "onClick"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
|
-
import {
|
|
7
|
+
import { useComponentRenderer } from '@mui/x-internals/useComponentRenderer';
|
|
8
8
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
9
|
import { usePromptFieldContext } from "./PromptFieldContext.js";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -37,7 +37,7 @@ const PromptFieldSend = forwardRef(function PromptFieldSend(props, ref) {
|
|
|
37
37
|
onSubmit(state.value);
|
|
38
38
|
onClick?.(event);
|
|
39
39
|
};
|
|
40
|
-
const element =
|
|
40
|
+
const element = useComponentRenderer(rootProps.slots.baseIconButton, render, _extends({}, rootProps.slotProps?.baseIconButton, {
|
|
41
41
|
className: resolvedClassName,
|
|
42
42
|
disabled: state.disabled || state.recording || !state.value.trim()
|
|
43
43
|
}, other, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { gridColumnLookupSelector, gridRowTreeSelector, useFirstRender
|
|
2
|
+
import { gridColumnLookupSelector, gridRowTreeSelector, useFirstRender } from '@mui/x-data-grid-pro';
|
|
3
3
|
import { useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor, sortRowTree, createRowTree, updateRowTree, getVisibleRowsLookup } from '@mui/x-data-grid-pro/internals';
|
|
4
4
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
5
5
|
import { createGroupingColDefForAllGroupingCriteria, createGroupingColDefForOneGroupingCriteria } from "./createGroupingColDef.js";
|
|
@@ -66,9 +66,7 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
66
66
|
}
|
|
67
67
|
newColumnsLookup[groupingColDef.field] = groupingColDef;
|
|
68
68
|
});
|
|
69
|
-
|
|
70
|
-
const checkBoxColumn = checkBoxFieldIndex !== -1 ? newColumnFields.splice(checkBoxFieldIndex, 1) : [];
|
|
71
|
-
newColumnFields = [...checkBoxColumn, ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
|
|
69
|
+
newColumnFields = [...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
|
|
72
70
|
columnsState.orderedFields = newColumnFields;
|
|
73
71
|
columnsState.lookup = newColumnsLookup;
|
|
74
72
|
return columnsState;
|
package/esm/index.js
CHANGED
|
@@ -73,9 +73,7 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
|
|
|
73
73
|
}
|
|
74
74
|
newColumnsLookup[groupingColDef.field] = groupingColDef;
|
|
75
75
|
});
|
|
76
|
-
|
|
77
|
-
const checkBoxColumn = checkBoxFieldIndex !== -1 ? newColumnFields.splice(checkBoxFieldIndex, 1) : [];
|
|
78
|
-
newColumnFields = [...checkBoxColumn, ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
|
|
76
|
+
newColumnFields = [...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
|
|
79
77
|
columnsState.orderedFields = newColumnFields;
|
|
80
78
|
columnsState.lookup = newColumnsLookup;
|
|
81
79
|
return columnsState;
|
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.5.
|
|
3
|
+
"version": "8.5.1",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Premium plan edition of the MUI X Data Grid Components.",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"directory": "packages/x-data-grid-premium"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/runtime": "^7.27.
|
|
39
|
-
"@mui/utils": "^7.
|
|
38
|
+
"@babel/runtime": "^7.27.4",
|
|
39
|
+
"@mui/utils": "^7.1.1",
|
|
40
40
|
"@types/format-util": "^1.0.4",
|
|
41
41
|
"clsx": "^2.1.1",
|
|
42
42
|
"exceljs": "^4.4.0",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"reselect": "^5.1.1",
|
|
45
|
-
"@mui/x-data-grid": "8.5.
|
|
46
|
-
"@mui/x-
|
|
47
|
-
"@mui/x-license": "8.5.
|
|
48
|
-
"@mui/x-
|
|
45
|
+
"@mui/x-data-grid": "8.5.1",
|
|
46
|
+
"@mui/x-internals": "8.5.1",
|
|
47
|
+
"@mui/x-license": "8.5.1",
|
|
48
|
+
"@mui/x-data-grid-pro": "8.5.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@emotion/react": "^11.9.0",
|