@mui/x-data-grid-premium 8.0.0-beta.2 → 8.0.0-beta.3
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 +141 -0
- package/DataGridPremium/DataGridPremium.js +23 -17
- package/components/export/ExportExcel.js +4 -129
- package/esm/DataGridPremium/DataGridPremium.js +23 -17
- package/esm/components/export/ExportExcel.js +4 -129
- package/esm/hooks/features/aggregation/useGridAggregation.js +4 -4
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +6 -6
- package/esm/hooks/features/clipboard/useGridClipboardImport.js +4 -4
- package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +1 -1
- package/esm/hooks/features/export/useGridExcelExport.js +2 -2
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +5 -5
- package/esm/index.js +1 -1
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/aggregation/useGridAggregation.js +3 -3
- package/hooks/features/cellSelection/useGridCellSelection.js +5 -5
- package/hooks/features/clipboard/useGridClipboardImport.js +3 -3
- package/hooks/features/dataSource/useGridDataSourcePremium.js +1 -1
- package/hooks/features/export/useGridExcelExport.js +1 -1
- package/hooks/features/rowGrouping/useGridRowGrouping.js +4 -4
- package/index.js +1 -1
- package/modern/DataGridPremium/DataGridPremium.js +23 -17
- package/modern/components/export/ExportExcel.js +4 -129
- package/modern/hooks/features/aggregation/useGridAggregation.js +4 -4
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +6 -6
- package/modern/hooks/features/clipboard/useGridClipboardImport.js +4 -4
- package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +1 -1
- package/modern/hooks/features/export/useGridExcelExport.js +2 -2
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +5 -5
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +9 -9
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,147 @@
|
|
|
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.0.0-beta.3
|
|
9
|
+
|
|
10
|
+
_Apr 3, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🚫 Removed `react-spring` as a dependency of `@mui/x-charts`
|
|
15
|
+
- 📦 Data Grid list view feature is now stable
|
|
16
|
+
- 💫 Support title in Data Grid
|
|
17
|
+
- 📚 Documentation improvements
|
|
18
|
+
- 🐞 Bugfixes
|
|
19
|
+
|
|
20
|
+
Team members who have contributed to this release:
|
|
21
|
+
@bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The list view feature and its related props are now stable.
|
|
30
|
+
|
|
31
|
+
The `unstable_listColumn` prop has been renamed to `listViewColumn`.
|
|
32
|
+
|
|
33
|
+
The `GridListColDef` type has been renamed to `GridListViewColDef`.
|
|
34
|
+
|
|
35
|
+
```diff
|
|
36
|
+
-const listViewColDef: GridListColDef = {
|
|
37
|
+
+const listViewColDef: GridListViewColDef = {
|
|
38
|
+
field: 'listColumn',
|
|
39
|
+
renderCell: ListViewCell,
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
<DataGridPro
|
|
43
|
+
- unstable_listView
|
|
44
|
+
- unstable_listColumn={listViewColDef}
|
|
45
|
+
+ listView
|
|
46
|
+
+ listViewColumn={listViewColDef}
|
|
47
|
+
/>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The `useGridApiEventHandler()` hook has been renamed to `useGridEvent()`.
|
|
51
|
+
- The `useGridApiOptionHandler()` hook has been renamed to `useGridEventPriority()`.
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-data-grid@8.0.0-beta.3`
|
|
54
|
+
|
|
55
|
+
- [DataGrid] Fix "is any of" autocomplete rendering (#17226) @KenanYusuf
|
|
56
|
+
- [DataGrid] Rename `useGridApiEventHandler()` to `useGridEvent()` (#17159) @romgrk
|
|
57
|
+
- [DataGrid] Support adding a label to the grid (#17147) @KenanYusuf
|
|
58
|
+
- [DataGrid] Refactor: remove material typings (#17119) @romgrk
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-data-grid-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
61
|
+
|
|
62
|
+
Same changes as in `@mui/x-data-grid@8.0.0-beta.3`, plus:
|
|
63
|
+
|
|
64
|
+
- [DataGridPro] Make list view feature stable (#17217) @KenanYusuf
|
|
65
|
+
- [DataGridPro] Always refetch lazy-loading rows (#16827) @MBilalShafi
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-data-grid-premium@8.0.0-beta.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
68
|
+
|
|
69
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.3`.
|
|
70
|
+
|
|
71
|
+
### Date and Time Pickers
|
|
72
|
+
|
|
73
|
+
#### `@mui/x-date-pickers@8.0.0-beta.3`
|
|
74
|
+
|
|
75
|
+
- [pickers] Add new `nextOrAccept` action bar action (#17037) @flaviendelangle
|
|
76
|
+
- [pickers] Improve the Multi Section Digital Clock scrollbar thickness (#16774) @oliviertassinari
|
|
77
|
+
- [TimePicker] Align the Digital Clock scrollbar thickness (#17203) @LukasTy
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-date-pickers-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-beta.3`.
|
|
82
|
+
|
|
83
|
+
### Charts
|
|
84
|
+
|
|
85
|
+
#### Breaking changes
|
|
86
|
+
|
|
87
|
+
- Removed `react-spring` as a dependency of `@mui/x-charts`.
|
|
88
|
+
A consequence of this change is that the props of some slots have been changed because the `SpringValue` wrapper has been removed. The affected slots and props are:
|
|
89
|
+
|
|
90
|
+
- the type of the `x`, `y`, `width` and `height` props of the `bar` slot are now `number`;
|
|
91
|
+
- the type of `startAngle`, `endAngle`, `innerRadius`, `outerRadius`, `arcLabelRadius`, `cornerRadius` and `paddingAngle` props of `pieArc` and `pieArcLabel` slot are now `number`.
|
|
92
|
+
|
|
93
|
+
Additionally, the `pieArc` slot now receives a `skipAnimation` prop to configure whether animations should be enabled or disabled.
|
|
94
|
+
|
|
95
|
+
- Tick labels in the y-axis of cartesian charts will now have an ellipsis applied to prevent overflow.
|
|
96
|
+
If your tick labels are being clipped sooner than you would like, you can increase the y-axis size by increasing its width property.
|
|
97
|
+
|
|
98
|
+
- The tooltip DOM structure is modified to improve accessibility. If you relied on it to apply some style or run tests, you might be impacted by this modification.
|
|
99
|
+
- The axis tooltip displays a table per axis with the axis value in a caption.
|
|
100
|
+
- Cells containing the series label and the color mark got merged in a th cell.
|
|
101
|
+
|
|
102
|
+
#### `@mui/x-charts@8.0.0-beta.3`
|
|
103
|
+
|
|
104
|
+
- [charts] Adjust color palettes (#17209) @noraleonte
|
|
105
|
+
- [charts] Allow multiple axes in the tooltip (#17058) @alexfauquette
|
|
106
|
+
- [charts] Improve custom legend docs (#17231) @JCQuintas
|
|
107
|
+
- [charts] Fix crash when item shown in tooltip is unmounted (#17169) @bernardobelchior
|
|
108
|
+
- [charts] Migrate some animations from `react-spring` (#16961) @bernardobelchior
|
|
109
|
+
- [charts] Remove `react-spring` (#17123) @bernardobelchior
|
|
110
|
+
- [charts] Fix y-axis tick label overflow (#16846) @bernardobelchior
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-charts-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-charts@8.0.0-beta.3`.
|
|
115
|
+
|
|
116
|
+
### Tree View
|
|
117
|
+
|
|
118
|
+
#### `@mui/x-tree-view@8.0.0-beta.3`
|
|
119
|
+
|
|
120
|
+
Internal changes.
|
|
121
|
+
|
|
122
|
+
#### `@mui/x-tree-view-pro@8.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
123
|
+
|
|
124
|
+
Same changes as in `@mui/x-tree-view@8.0.0-beta.3`.
|
|
125
|
+
|
|
126
|
+
### `@mui/x-codemod@8.0.0-beta.3`
|
|
127
|
+
|
|
128
|
+
- [codemod] Add `listView` prop rename codemod (#17220) @MBilalShafi
|
|
129
|
+
|
|
130
|
+
### Docs
|
|
131
|
+
|
|
132
|
+
- [docs] Add "Usage with Material UI v5/v6" guide (#17164) @cherniavskii
|
|
133
|
+
- [docs] Fix 301 link @oliviertassinari
|
|
134
|
+
- [docs] Fix redirection getting-started (#17200) @oliviertassinari
|
|
135
|
+
- [docs] Sync Stack Overflow docs with reality (#17198) @oliviertassinari
|
|
136
|
+
- [docs] Update Localization Provider JSDoc link (#17207) @LukasTy
|
|
137
|
+
|
|
138
|
+
### Core
|
|
139
|
+
|
|
140
|
+
- [core] Cleanup `@mui` dependency versions (#17160) @LukasTy
|
|
141
|
+
- [core] Sync scorecards.yml across codebase @oliviertassinari
|
|
142
|
+
- [core] Revert upgrade to React 19.1 (#17206) @bernardobelchior
|
|
143
|
+
- [code-infra] Fix `test:unit` warning (#17224) @JCQuintas
|
|
144
|
+
- [code-infra] Fix pickers failing test after clock=fake removal (#17202) @JCQuintas
|
|
145
|
+
- [code-infra] Remove clock=fake from `describeValidation` (#17150) @JCQuintas
|
|
146
|
+
- [code-infra] Remove clock=fake from `describeValue` (#17199) @JCQuintas
|
|
147
|
+
- [infra] Add write permission for actions in issue status label handler (#17161) @michelengelen
|
|
148
|
+
|
|
8
149
|
## 8.0.0-beta.2
|
|
9
150
|
|
|
10
151
|
_Mar 27, 2025_
|
|
@@ -86,11 +86,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
86
86
|
current: _propTypes.default.object
|
|
87
87
|
}),
|
|
88
88
|
/**
|
|
89
|
-
* The label of the Data Grid.
|
|
89
|
+
* The `aria-label` of the Data Grid.
|
|
90
90
|
*/
|
|
91
91
|
'aria-label': _propTypes.default.string,
|
|
92
92
|
/**
|
|
93
|
-
* The id of the element containing a label for the Data Grid.
|
|
93
|
+
* The `id` of the element containing a label for the Data Grid.
|
|
94
94
|
*/
|
|
95
95
|
'aria-labelledby': _propTypes.default.string,
|
|
96
96
|
/**
|
|
@@ -515,6 +515,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
515
515
|
* @default false
|
|
516
516
|
*/
|
|
517
517
|
keepNonExistentRowsSelected: _propTypes.default.bool,
|
|
518
|
+
/**
|
|
519
|
+
* The label of the Data Grid.
|
|
520
|
+
* If the `showToolbar` prop is `true`, the label will be displayed in the toolbar and applied to the `aria-label` attribute of the grid.
|
|
521
|
+
* If the `showToolbar` prop is `false`, the label will not be visible but will be applied to the `aria-label` attribute of the grid.
|
|
522
|
+
*/
|
|
523
|
+
label: _propTypes.default.string,
|
|
518
524
|
/**
|
|
519
525
|
* Used together with `dataSource` to enable lazy loading.
|
|
520
526
|
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
@@ -527,6 +533,21 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
527
533
|
* @default 500
|
|
528
534
|
*/
|
|
529
535
|
lazyLoadingRequestThrottleMs: _propTypes.default.number,
|
|
536
|
+
/**
|
|
537
|
+
* If `true`, displays the data in a list view.
|
|
538
|
+
* Use in combination with `listViewColumn`.
|
|
539
|
+
*/
|
|
540
|
+
listView: _propTypes.default.bool,
|
|
541
|
+
/**
|
|
542
|
+
* Definition of the column rendered when the `listView` prop is enabled.
|
|
543
|
+
*/
|
|
544
|
+
listViewColumn: _propTypes.default.shape({
|
|
545
|
+
align: _propTypes.default.oneOf(['center', 'left', 'right']),
|
|
546
|
+
cellClassName: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]),
|
|
547
|
+
display: _propTypes.default.oneOf(['flex', 'text']),
|
|
548
|
+
field: _propTypes.default.string.isRequired,
|
|
549
|
+
renderCell: _propTypes.default.func
|
|
550
|
+
}),
|
|
530
551
|
/**
|
|
531
552
|
* If `true`, a loading overlay is displayed.
|
|
532
553
|
* @default false
|
|
@@ -1094,21 +1115,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1094
1115
|
* @default false
|
|
1095
1116
|
*/
|
|
1096
1117
|
treeData: _propTypes.default.bool,
|
|
1097
|
-
/**
|
|
1098
|
-
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
1099
|
-
*/
|
|
1100
|
-
unstable_listColumn: _propTypes.default.shape({
|
|
1101
|
-
align: _propTypes.default.oneOf(['center', 'left', 'right']),
|
|
1102
|
-
cellClassName: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string]),
|
|
1103
|
-
display: _propTypes.default.oneOf(['flex', 'text']),
|
|
1104
|
-
field: _propTypes.default.string.isRequired,
|
|
1105
|
-
renderCell: _propTypes.default.func
|
|
1106
|
-
}),
|
|
1107
|
-
/**
|
|
1108
|
-
* If `true`, displays the data in a list view.
|
|
1109
|
-
* Use in combination with `unstable_listColumn`.
|
|
1110
|
-
*/
|
|
1111
|
-
unstable_listView: _propTypes.default.bool,
|
|
1112
1118
|
/**
|
|
1113
1119
|
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
1114
1120
|
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
@@ -55,113 +55,9 @@ process.env.NODE_ENV !== "production" ? ExportExcel.propTypes = {
|
|
|
55
55
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
56
56
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
57
57
|
// ----------------------------------------------------------------------
|
|
58
|
-
/**
|
|
59
|
-
* A ref for imperative actions.
|
|
60
|
-
* It currently only supports `focusVisible()` action.
|
|
61
|
-
*/
|
|
62
|
-
action: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
|
|
63
|
-
current: _propTypes.default.shape({
|
|
64
|
-
focusVisible: _propTypes.default.func.isRequired
|
|
65
|
-
})
|
|
66
|
-
})]),
|
|
67
|
-
/**
|
|
68
|
-
* If `true`, the ripples are centered.
|
|
69
|
-
* They won't start at the cursor interaction position.
|
|
70
|
-
* @default false
|
|
71
|
-
*/
|
|
72
|
-
centerRipple: _propTypes.default.bool,
|
|
73
58
|
className: _propTypes.default.string,
|
|
74
|
-
/**
|
|
75
|
-
* The color of the component.
|
|
76
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
77
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
78
|
-
* @default 'primary'
|
|
79
|
-
*/
|
|
80
|
-
color: _propTypes.default.oneOf(['error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
|
|
81
|
-
component: _propTypes.default.elementType,
|
|
82
|
-
/**
|
|
83
|
-
* If `true`, the component is disabled.
|
|
84
|
-
*/
|
|
85
59
|
disabled: _propTypes.default.bool,
|
|
86
|
-
|
|
87
|
-
* If `true`, no elevation is used.
|
|
88
|
-
* @default false
|
|
89
|
-
*/
|
|
90
|
-
disableElevation: _propTypes.default.bool,
|
|
91
|
-
/**
|
|
92
|
-
* If `true`, the keyboard focus ripple is disabled.
|
|
93
|
-
* @default false
|
|
94
|
-
*/
|
|
95
|
-
disableFocusRipple: _propTypes.default.bool,
|
|
96
|
-
/**
|
|
97
|
-
* If `true`, the ripple effect is disabled.
|
|
98
|
-
*
|
|
99
|
-
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
100
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
101
|
-
* @default false
|
|
102
|
-
*/
|
|
103
|
-
disableRipple: _propTypes.default.bool,
|
|
104
|
-
/**
|
|
105
|
-
* If `true`, the touch ripple effect is disabled.
|
|
106
|
-
* @default false
|
|
107
|
-
*/
|
|
108
|
-
disableTouchRipple: _propTypes.default.bool,
|
|
109
|
-
/**
|
|
110
|
-
* Element placed after the children.
|
|
111
|
-
*/
|
|
112
|
-
endIcon: _propTypes.default.node,
|
|
113
|
-
/**
|
|
114
|
-
* If `true`, the base button will have a keyboard focus ripple.
|
|
115
|
-
* @default false
|
|
116
|
-
*/
|
|
117
|
-
focusRipple: _propTypes.default.bool,
|
|
118
|
-
/**
|
|
119
|
-
* This prop can help identify which element has keyboard focus.
|
|
120
|
-
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
121
|
-
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
122
|
-
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
123
|
-
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
124
|
-
* if needed.
|
|
125
|
-
*/
|
|
126
|
-
focusVisibleClassName: _propTypes.default.string,
|
|
127
|
-
/**
|
|
128
|
-
* If `true`, the button will take up the full width of its container.
|
|
129
|
-
* @default false
|
|
130
|
-
*/
|
|
131
|
-
fullWidth: _propTypes.default.bool,
|
|
132
|
-
/**
|
|
133
|
-
* The URL to link to when the button is clicked.
|
|
134
|
-
* If defined, an `a` element will be used as the root node.
|
|
135
|
-
*/
|
|
136
|
-
href: _propTypes.default.string,
|
|
137
|
-
/**
|
|
138
|
-
* The component used to render a link when the `href` prop is provided.
|
|
139
|
-
* @default 'a'
|
|
140
|
-
*/
|
|
141
|
-
LinkComponent: _propTypes.default.elementType,
|
|
142
|
-
/**
|
|
143
|
-
* If `true`, the loading indicator is visible and the button is disabled.
|
|
144
|
-
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
145
|
-
* @default null
|
|
146
|
-
*/
|
|
147
|
-
loading: _propTypes.default.bool,
|
|
148
|
-
/**
|
|
149
|
-
* Element placed before the children if the button is in loading state.
|
|
150
|
-
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
151
|
-
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
152
|
-
* @default <CircularProgress color="inherit" size={16} />
|
|
153
|
-
*/
|
|
154
|
-
loadingIndicator: _propTypes.default.node,
|
|
155
|
-
/**
|
|
156
|
-
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
157
|
-
* @default 'center'
|
|
158
|
-
*/
|
|
159
|
-
loadingPosition: _propTypes.default.oneOf(['center', 'end', 'start']),
|
|
160
|
-
/**
|
|
161
|
-
* Callback fired when the component is focused with a keyboard.
|
|
162
|
-
* We trigger a `onFocus` callback too.
|
|
163
|
-
*/
|
|
164
|
-
onFocusVisible: _propTypes.default.func,
|
|
60
|
+
id: _propTypes.default.string,
|
|
165
61
|
/**
|
|
166
62
|
* The options to apply on the Excel export.
|
|
167
63
|
* @demos
|
|
@@ -185,32 +81,11 @@ process.env.NODE_ENV !== "production" ? ExportExcel.propTypes = {
|
|
|
185
81
|
* A function to customize rendering of the component.
|
|
186
82
|
*/
|
|
187
83
|
render: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]),
|
|
188
|
-
|
|
189
|
-
* The size of the component.
|
|
190
|
-
* `small` is equivalent to the dense button styling.
|
|
191
|
-
*/
|
|
84
|
+
role: _propTypes.default.string,
|
|
192
85
|
size: _propTypes.default.oneOf(['large', 'medium', 'small']),
|
|
193
|
-
/**
|
|
194
|
-
* Element placed before the children.
|
|
195
|
-
*/
|
|
196
86
|
startIcon: _propTypes.default.node,
|
|
197
87
|
style: _propTypes.default.object,
|
|
198
|
-
/**
|
|
199
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
200
|
-
*/
|
|
201
|
-
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
202
88
|
tabIndex: _propTypes.default.number,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
*/
|
|
206
|
-
TouchRippleProps: _propTypes.default.object,
|
|
207
|
-
/**
|
|
208
|
-
* A ref that points to the `TouchRipple` element.
|
|
209
|
-
*/
|
|
210
|
-
touchRippleRef: _propTypes.default.any,
|
|
211
|
-
/**
|
|
212
|
-
* The variant to use.
|
|
213
|
-
* @default 'text'
|
|
214
|
-
*/
|
|
215
|
-
variant: _propTypes.default.oneOf(['contained', 'outlined', 'text'])
|
|
89
|
+
title: _propTypes.default.string,
|
|
90
|
+
touchRippleRef: _propTypes.default.any
|
|
216
91
|
} : void 0;
|
|
@@ -79,11 +79,11 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
79
79
|
current: PropTypes.object
|
|
80
80
|
}),
|
|
81
81
|
/**
|
|
82
|
-
* The label of the Data Grid.
|
|
82
|
+
* The `aria-label` of the Data Grid.
|
|
83
83
|
*/
|
|
84
84
|
'aria-label': PropTypes.string,
|
|
85
85
|
/**
|
|
86
|
-
* The id of the element containing a label for the Data Grid.
|
|
86
|
+
* The `id` of the element containing a label for the Data Grid.
|
|
87
87
|
*/
|
|
88
88
|
'aria-labelledby': PropTypes.string,
|
|
89
89
|
/**
|
|
@@ -508,6 +508,12 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
508
508
|
* @default false
|
|
509
509
|
*/
|
|
510
510
|
keepNonExistentRowsSelected: PropTypes.bool,
|
|
511
|
+
/**
|
|
512
|
+
* The label of the Data Grid.
|
|
513
|
+
* If the `showToolbar` prop is `true`, the label will be displayed in the toolbar and applied to the `aria-label` attribute of the grid.
|
|
514
|
+
* If the `showToolbar` prop is `false`, the label will not be visible but will be applied to the `aria-label` attribute of the grid.
|
|
515
|
+
*/
|
|
516
|
+
label: PropTypes.string,
|
|
511
517
|
/**
|
|
512
518
|
* Used together with `dataSource` to enable lazy loading.
|
|
513
519
|
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
@@ -520,6 +526,21 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
520
526
|
* @default 500
|
|
521
527
|
*/
|
|
522
528
|
lazyLoadingRequestThrottleMs: PropTypes.number,
|
|
529
|
+
/**
|
|
530
|
+
* If `true`, displays the data in a list view.
|
|
531
|
+
* Use in combination with `listViewColumn`.
|
|
532
|
+
*/
|
|
533
|
+
listView: PropTypes.bool,
|
|
534
|
+
/**
|
|
535
|
+
* Definition of the column rendered when the `listView` prop is enabled.
|
|
536
|
+
*/
|
|
537
|
+
listViewColumn: PropTypes.shape({
|
|
538
|
+
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
539
|
+
cellClassName: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
540
|
+
display: PropTypes.oneOf(['flex', 'text']),
|
|
541
|
+
field: PropTypes.string.isRequired,
|
|
542
|
+
renderCell: PropTypes.func
|
|
543
|
+
}),
|
|
523
544
|
/**
|
|
524
545
|
* If `true`, a loading overlay is displayed.
|
|
525
546
|
* @default false
|
|
@@ -1087,21 +1108,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1087
1108
|
* @default false
|
|
1088
1109
|
*/
|
|
1089
1110
|
treeData: PropTypes.bool,
|
|
1090
|
-
/**
|
|
1091
|
-
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
1092
|
-
*/
|
|
1093
|
-
unstable_listColumn: PropTypes.shape({
|
|
1094
|
-
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
1095
|
-
cellClassName: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
1096
|
-
display: PropTypes.oneOf(['flex', 'text']),
|
|
1097
|
-
field: PropTypes.string.isRequired,
|
|
1098
|
-
renderCell: PropTypes.func
|
|
1099
|
-
}),
|
|
1100
|
-
/**
|
|
1101
|
-
* If `true`, displays the data in a list view.
|
|
1102
|
-
* Use in combination with `unstable_listColumn`.
|
|
1103
|
-
*/
|
|
1104
|
-
unstable_listView: PropTypes.bool,
|
|
1105
1111
|
/**
|
|
1106
1112
|
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
1107
1113
|
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
@@ -47,113 +47,9 @@ process.env.NODE_ENV !== "production" ? ExportExcel.propTypes = {
|
|
|
47
47
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
48
48
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
49
49
|
// ----------------------------------------------------------------------
|
|
50
|
-
/**
|
|
51
|
-
* A ref for imperative actions.
|
|
52
|
-
* It currently only supports `focusVisible()` action.
|
|
53
|
-
*/
|
|
54
|
-
action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
55
|
-
current: PropTypes.shape({
|
|
56
|
-
focusVisible: PropTypes.func.isRequired
|
|
57
|
-
})
|
|
58
|
-
})]),
|
|
59
|
-
/**
|
|
60
|
-
* If `true`, the ripples are centered.
|
|
61
|
-
* They won't start at the cursor interaction position.
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
centerRipple: PropTypes.bool,
|
|
65
50
|
className: PropTypes.string,
|
|
66
|
-
/**
|
|
67
|
-
* The color of the component.
|
|
68
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
69
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
70
|
-
* @default 'primary'
|
|
71
|
-
*/
|
|
72
|
-
color: PropTypes.oneOf(['error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
|
|
73
|
-
component: PropTypes.elementType,
|
|
74
|
-
/**
|
|
75
|
-
* If `true`, the component is disabled.
|
|
76
|
-
*/
|
|
77
51
|
disabled: PropTypes.bool,
|
|
78
|
-
|
|
79
|
-
* If `true`, no elevation is used.
|
|
80
|
-
* @default false
|
|
81
|
-
*/
|
|
82
|
-
disableElevation: PropTypes.bool,
|
|
83
|
-
/**
|
|
84
|
-
* If `true`, the keyboard focus ripple is disabled.
|
|
85
|
-
* @default false
|
|
86
|
-
*/
|
|
87
|
-
disableFocusRipple: PropTypes.bool,
|
|
88
|
-
/**
|
|
89
|
-
* If `true`, the ripple effect is disabled.
|
|
90
|
-
*
|
|
91
|
-
* ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
|
|
92
|
-
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
93
|
-
* @default false
|
|
94
|
-
*/
|
|
95
|
-
disableRipple: PropTypes.bool,
|
|
96
|
-
/**
|
|
97
|
-
* If `true`, the touch ripple effect is disabled.
|
|
98
|
-
* @default false
|
|
99
|
-
*/
|
|
100
|
-
disableTouchRipple: PropTypes.bool,
|
|
101
|
-
/**
|
|
102
|
-
* Element placed after the children.
|
|
103
|
-
*/
|
|
104
|
-
endIcon: PropTypes.node,
|
|
105
|
-
/**
|
|
106
|
-
* If `true`, the base button will have a keyboard focus ripple.
|
|
107
|
-
* @default false
|
|
108
|
-
*/
|
|
109
|
-
focusRipple: PropTypes.bool,
|
|
110
|
-
/**
|
|
111
|
-
* This prop can help identify which element has keyboard focus.
|
|
112
|
-
* The class name will be applied when the element gains the focus through keyboard interaction.
|
|
113
|
-
* It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
|
|
114
|
-
* The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
|
|
115
|
-
* A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
|
|
116
|
-
* if needed.
|
|
117
|
-
*/
|
|
118
|
-
focusVisibleClassName: PropTypes.string,
|
|
119
|
-
/**
|
|
120
|
-
* If `true`, the button will take up the full width of its container.
|
|
121
|
-
* @default false
|
|
122
|
-
*/
|
|
123
|
-
fullWidth: PropTypes.bool,
|
|
124
|
-
/**
|
|
125
|
-
* The URL to link to when the button is clicked.
|
|
126
|
-
* If defined, an `a` element will be used as the root node.
|
|
127
|
-
*/
|
|
128
|
-
href: PropTypes.string,
|
|
129
|
-
/**
|
|
130
|
-
* The component used to render a link when the `href` prop is provided.
|
|
131
|
-
* @default 'a'
|
|
132
|
-
*/
|
|
133
|
-
LinkComponent: PropTypes.elementType,
|
|
134
|
-
/**
|
|
135
|
-
* If `true`, the loading indicator is visible and the button is disabled.
|
|
136
|
-
* If `true | false`, the loading wrapper is always rendered before the children to prevent [Google Translation Crash](https://github.com/mui/material-ui/issues/27853).
|
|
137
|
-
* @default null
|
|
138
|
-
*/
|
|
139
|
-
loading: PropTypes.bool,
|
|
140
|
-
/**
|
|
141
|
-
* Element placed before the children if the button is in loading state.
|
|
142
|
-
* The node should contain an element with `role="progressbar"` with an accessible name.
|
|
143
|
-
* By default, it renders a `CircularProgress` that is labeled by the button itself.
|
|
144
|
-
* @default <CircularProgress color="inherit" size={16} />
|
|
145
|
-
*/
|
|
146
|
-
loadingIndicator: PropTypes.node,
|
|
147
|
-
/**
|
|
148
|
-
* The loading indicator can be positioned on the start, end, or the center of the button.
|
|
149
|
-
* @default 'center'
|
|
150
|
-
*/
|
|
151
|
-
loadingPosition: PropTypes.oneOf(['center', 'end', 'start']),
|
|
152
|
-
/**
|
|
153
|
-
* Callback fired when the component is focused with a keyboard.
|
|
154
|
-
* We trigger a `onFocus` callback too.
|
|
155
|
-
*/
|
|
156
|
-
onFocusVisible: PropTypes.func,
|
|
52
|
+
id: PropTypes.string,
|
|
157
53
|
/**
|
|
158
54
|
* The options to apply on the Excel export.
|
|
159
55
|
* @demos
|
|
@@ -177,33 +73,12 @@ process.env.NODE_ENV !== "production" ? ExportExcel.propTypes = {
|
|
|
177
73
|
* A function to customize rendering of the component.
|
|
178
74
|
*/
|
|
179
75
|
render: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
180
|
-
|
|
181
|
-
* The size of the component.
|
|
182
|
-
* `small` is equivalent to the dense button styling.
|
|
183
|
-
*/
|
|
76
|
+
role: PropTypes.string,
|
|
184
77
|
size: PropTypes.oneOf(['large', 'medium', 'small']),
|
|
185
|
-
/**
|
|
186
|
-
* Element placed before the children.
|
|
187
|
-
*/
|
|
188
78
|
startIcon: PropTypes.node,
|
|
189
79
|
style: PropTypes.object,
|
|
190
|
-
/**
|
|
191
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
192
|
-
*/
|
|
193
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
194
80
|
tabIndex: PropTypes.number,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
*/
|
|
198
|
-
TouchRippleProps: PropTypes.object,
|
|
199
|
-
/**
|
|
200
|
-
* A ref that points to the `TouchRipple` element.
|
|
201
|
-
*/
|
|
202
|
-
touchRippleRef: PropTypes.any,
|
|
203
|
-
/**
|
|
204
|
-
* The variant to use.
|
|
205
|
-
* @default 'text'
|
|
206
|
-
*/
|
|
207
|
-
variant: PropTypes.oneOf(['contained', 'outlined', 'text'])
|
|
81
|
+
title: PropTypes.string,
|
|
82
|
+
touchRippleRef: PropTypes.any
|
|
208
83
|
} : void 0;
|
|
209
84
|
export { ExportExcel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { gridColumnLookupSelector,
|
|
3
|
+
import { gridColumnLookupSelector, useGridEvent, useGridApiMethod } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridAggregationModelSelector } from "./gridAggregationSelectors.js";
|
|
6
6
|
import { getAggregationRules, mergeStateWithAggregationModel, areAggregationRulesEqual } from "./gridAggregationUtils.js";
|
|
@@ -88,9 +88,9 @@ export const useGridAggregation = (apiRef, props) => {
|
|
|
88
88
|
apiRef.current.requestPipeProcessorsApplication('hydrateColumns');
|
|
89
89
|
}
|
|
90
90
|
}, [apiRef, applyAggregation, props.aggregationFunctions, props.disableAggregation, props.dataSource]);
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
useGridEvent(apiRef, 'aggregationModelChange', checkAggregationRulesDiff);
|
|
92
|
+
useGridEvent(apiRef, 'columnsChange', checkAggregationRulesDiff);
|
|
93
|
+
useGridEvent(apiRef, 'filteredRowsSet', applyAggregation);
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* EFFECTS
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
4
4
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
5
5
|
import { getTotalHeaderHeight, getVisibleRows, isNavigationKey, serializeCellValue, useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
6
|
-
import {
|
|
6
|
+
import { useGridEvent, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, gridClasses, gridFocusCellSelector, GRID_REORDER_COL_DEF, gridSortedRowIdsSelector, gridDimensionsSelector } from '@mui/x-data-grid-pro';
|
|
7
7
|
import { gridCellSelectionStateSelector } from "./gridCellSelectionSelector.js";
|
|
8
8
|
export const cellSelectionStateInitializer = (state, props) => _extends({}, state, {
|
|
9
9
|
cellSelection: _extends({}, props.cellSelectionModel ?? props.initialState?.cellSelection)
|
|
@@ -354,11 +354,11 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
354
354
|
field
|
|
355
355
|
}, cellWithVirtualFocus.current);
|
|
356
356
|
});
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
useGridEvent(apiRef, 'cellClick', runIfCellSelectionIsEnabled(handleCellClick));
|
|
358
|
+
useGridEvent(apiRef, 'cellFocusIn', runIfCellSelectionIsEnabled(handleCellFocusIn));
|
|
359
|
+
useGridEvent(apiRef, 'cellKeyDown', runIfCellSelectionIsEnabled(handleCellKeyDown));
|
|
360
|
+
useGridEvent(apiRef, 'cellMouseDown', runIfCellSelectionIsEnabled(handleCellMouseDown));
|
|
361
|
+
useGridEvent(apiRef, 'cellMouseOver', runIfCellSelectionIsEnabled(handleCellMouseOver));
|
|
362
362
|
React.useEffect(() => {
|
|
363
363
|
if (props.cellSelectionModel) {
|
|
364
364
|
apiRef.current.setCellSelectionModel(props.cellSelectionModel);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector,
|
|
3
|
+
import { GRID_CHECKBOX_SELECTION_FIELD, gridFocusCellSelector, gridVisibleColumnFieldsSelector, useGridEventPriority, useGridEvent, gridPaginatedVisibleSortedGridRowIdsSelector, gridExpandedSortedRowIdsSelector, gridRowSelectionIdsSelector, gridRowSelectionCountSelector } from '@mui/x-data-grid';
|
|
4
4
|
import { getRowIdFromRowModel, getActiveElement, useGridRegisterPipeProcessor, getPublicApiRef, isPasteShortcut, useGridLogger } from '@mui/x-data-grid/internals';
|
|
5
5
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
6
|
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, GRID_REORDER_COL_DEF } from '@mui/x-data-grid-pro';
|
|
@@ -328,8 +328,8 @@ export const useGridClipboardImport = (apiRef, props) => {
|
|
|
328
328
|
}
|
|
329
329
|
return initialValue;
|
|
330
330
|
}, [enableClipboardPaste]);
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
useGridEvent(apiRef, 'cellKeyDown', handlePaste);
|
|
332
|
+
useGridEventPriority(apiRef, 'clipboardPasteStart', props.onClipboardPasteStart);
|
|
333
|
+
useGridEventPriority(apiRef, 'clipboardPasteEnd', props.onClipboardPasteEnd);
|
|
334
334
|
useGridRegisterPipeProcessor(apiRef, 'canStartEditing', checkIfCanStartEditing);
|
|
335
335
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { useGridEvent as addEventHandler, useGridApiMethod, GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
|
|
4
4
|
import { useGridDataSourceBasePro, useGridRegisterStrategyProcessor, useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
function getKeyPremium(params) {
|
|
6
6
|
return JSON.stringify([params.filterModel, params.sortModel, params.groupKeys, params.groupFields, params.start, params.end, params.aggregationModel]);
|