@mui/x-data-grid 7.0.0-beta.1 → 7.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 +223 -1
- package/DataGrid/DataGrid.d.ts +1 -1
- package/DataGrid/DataGrid.js +1 -7
- package/DataGrid/useDataGridProps.js +3 -1
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +12 -2
- package/components/GridRow.d.ts +3 -1
- package/components/GridRow.js +16 -6
- package/components/GridScrollbarFillerCell.js +0 -3
- package/components/base/GridFooterPlaceholder.js +1 -1
- package/components/cell/GridActionsCell.js +3 -3
- package/components/cell/GridActionsCellItem.d.ts +13 -1
- package/components/cell/GridActionsCellItem.js +27 -15
- package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnsManagement/utils.d.ts +1 -1
- package/components/containers/GridRootStyles.js +9 -4
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.js +7 -5
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -5
- package/components/panel/filterPanel/GridFilterInputValue.js +4 -3
- package/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
- package/constants/gridClasses.d.ts +5 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -5
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +46 -48
- package/hooks/features/rows/gridRowsUtils.js +1 -1
- package/hooks/features/rows/useGridRows.js +2 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +9 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.js +7 -0
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +28 -26
- package/hooks/features/virtualization/useGridVirtualization.d.ts +8 -0
- package/hooks/features/virtualization/useGridVirtualization.js +6 -1
- package/index.js +1 -1
- package/internals/utils/propValidation.js +1 -1
- package/joy/joySlots.js +2 -2
- package/legacy/DataGrid/DataGrid.js +1 -7
- package/legacy/DataGrid/useDataGridProps.js +3 -1
- package/legacy/components/GridPagination.js +10 -2
- package/legacy/components/GridRow.js +16 -6
- package/legacy/components/GridScrollbarFillerCell.js +1 -3
- package/legacy/components/base/GridFooterPlaceholder.js +1 -1
- package/legacy/components/cell/GridActionsCell.js +3 -3
- package/legacy/components/cell/GridActionsCellItem.js +30 -17
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/legacy/components/containers/GridRootStyles.js +8 -5
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +7 -4
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -5
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +60 -63
- package/legacy/hooks/features/rows/gridRowsUtils.js +1 -1
- package/legacy/hooks/features/rows/useGridRows.js +2 -2
- package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +9 -0
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +28 -26
- package/legacy/hooks/features/virtualization/useGridVirtualization.js +6 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/utils/propValidation.js +1 -1
- package/legacy/joy/joySlots.js +2 -2
- package/legacy/locales/daDK.js +12 -12
- package/locales/daDK.js +12 -12
- package/models/api/gridApiCommon.d.ts +1 -1
- package/models/api/gridFilterApi.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +3 -3
- package/models/events/gridEventLookup.d.ts +2 -9
- package/models/gridSlotsComponent.d.ts +34 -36
- package/models/gridSlotsComponentsProps.d.ts +73 -54
- package/models/props/DataGridProps.d.ts +2 -8
- package/modern/DataGrid/DataGrid.js +1 -7
- package/modern/DataGrid/useDataGridProps.js +3 -1
- package/modern/components/GridPagination.js +12 -2
- package/modern/components/GridRow.js +15 -6
- package/modern/components/GridScrollbarFillerCell.js +0 -3
- package/modern/components/base/GridFooterPlaceholder.js +1 -1
- package/modern/components/cell/GridActionsCell.js +3 -3
- package/modern/components/cell/GridActionsCellItem.js +27 -15
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/modern/components/containers/GridRootStyles.js +9 -4
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +7 -5
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -5
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -3
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +46 -48
- package/modern/hooks/features/rows/gridRowsUtils.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +2 -2
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +7 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +27 -24
- package/modern/hooks/features/virtualization/useGridVirtualization.js +6 -1
- package/modern/index.js +1 -1
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/joy/joySlots.js +2 -2
- package/modern/locales/daDK.js +12 -12
- package/node/DataGrid/DataGrid.js +1 -7
- package/node/DataGrid/useDataGridProps.js +3 -1
- package/node/components/GridPagination.js +12 -2
- package/node/components/GridRow.js +15 -6
- package/node/components/GridScrollbarFillerCell.js +0 -3
- package/node/components/base/GridFooterPlaceholder.js +1 -1
- package/node/components/cell/GridActionsCell.js +3 -3
- package/node/components/cell/GridActionsCellItem.js +27 -15
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/node/components/containers/GridRootStyles.js +9 -4
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +7 -5
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -5
- package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -3
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +10 -3
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +45 -47
- package/node/hooks/features/rows/gridRowsUtils.js +2 -2
- package/node/hooks/features/rows/useGridRows.js +2 -2
- package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +8 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +26 -23
- package/node/hooks/features/virtualization/useGridVirtualization.js +7 -2
- package/node/index.js +1 -1
- package/node/internals/utils/propValidation.js +1 -1
- package/node/joy/joySlots.js +2 -2
- package/node/locales/daDK.js +12 -12
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,172 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## v7.0.0-beta.3
|
|
7
|
+
|
|
8
|
+
_Feb 16, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 Charts get a [built in grid](https://next.mui.com/x/react-charts/axis/#grid)
|
|
13
|
+
|
|
14
|
+
<img src="https://github.com/mui/mui-x/assets/45398769/74299f54-f020-4135-b38c-dc88a230db30" width="510" alt="Charts Grid" />
|
|
15
|
+
|
|
16
|
+
- 🎛️ Charts get a [Gauge component](https://next.mui.com/x/react-charts/gauge/).
|
|
17
|
+
|
|
18
|
+
<img src="https://github.com/mui/mui-x/assets/45398769/fb7a94b5-bef6-4fc2-a0cd-d6ff5b60fa8b" width="510" alt="Guage Chart" />
|
|
19
|
+
|
|
20
|
+
- 🐞 Bugfixes
|
|
21
|
+
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### Breaking changes
|
|
27
|
+
|
|
28
|
+
- The `rowEditCommit` event and the related prop `onRowEditCommit` was removed. The [`processRowUpdate`](https://next.mui.com/x/react-data-grid/editing/#the-processrowupdate-callback) prop can be used in place.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid@7.0.0-beta.3`
|
|
31
|
+
|
|
32
|
+
- [DataGrid] Performance: avoid style invalidation (#12019) @romgrk
|
|
33
|
+
- [DataGrid] Remove legacy editing API event: `rowEditCommit` (#12073) @MBilalShafi
|
|
34
|
+
- [DataGrid] Fix styling grid filter input single select (#11520) @FreakDroid
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-data-grid-pro@7.0.0-beta.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
37
|
+
|
|
38
|
+
Same changes as in `@mui/x-data-grid@7.0.0-beta.3`.
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@7.0.0-beta.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.3`.
|
|
43
|
+
|
|
44
|
+
### Charts / `@mui/x-charts@7.0.0-beta.3`
|
|
45
|
+
|
|
46
|
+
- [charts] Add Gauge component (#11996) @alexfauquette
|
|
47
|
+
- [charts] Add a `ChartsGrid` component (#11034) @alexfauquette
|
|
48
|
+
|
|
49
|
+
### Tree View / `@mui/x-tree-view@7.0.0-beta.3`
|
|
50
|
+
|
|
51
|
+
- [TreeView] Remove instance existence checks (#12066) @flaviendelangle
|
|
52
|
+
|
|
53
|
+
### Docs
|
|
54
|
+
|
|
55
|
+
- [docs] Complete charts API pages (#12038) @alexfauquette
|
|
56
|
+
- [docs] Add more illustrations to the charts overview page (#12041) @danilo-leal
|
|
57
|
+
- [docs] Fix 301 redirection to StackBlitz @oliviertassinari
|
|
58
|
+
- [docs] Fix Tree space to match the reset of the docs @oliviertassinari
|
|
59
|
+
- [docs] Fix `dayOfWeekFormatter` typo in the pickers v6 to v7 migration document (#12043) @StylesTrip
|
|
60
|
+
- [docs] Fix redirection @oliviertassinari
|
|
61
|
+
- [docs] Fix typo for `AdapterDateFnsV3` (#12036) @flaviendelangle
|
|
62
|
+
- [docs] Removed `focused` prop from demo (#12092) @michelengelen
|
|
63
|
+
|
|
64
|
+
### Core
|
|
65
|
+
|
|
66
|
+
- [core] Fix CodeSandbox CI template @oliviertassinari
|
|
67
|
+
- [core] Sort prop asc (#12033) @oliviertassinari
|
|
68
|
+
- [core] Bump monorepo (#12055) @alexfauquette
|
|
69
|
+
|
|
70
|
+
## v7.0.0-beta.2
|
|
71
|
+
|
|
72
|
+
_Feb 9, 2024_
|
|
73
|
+
|
|
74
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
75
|
+
|
|
76
|
+
- 🚀 Add slot typings on the Data Grid components (#11795) @romgrk
|
|
77
|
+
- 🎁 Support UTC date formatting in Charts tooltip (#11943) @shaharyar-shamshi
|
|
78
|
+
- 🌍 Improve Danish (da-DK) locale Data Grid (#11877) @ShahrazH
|
|
79
|
+
- 🐞 Bugfixes
|
|
80
|
+
- 📚 Documentation improvements
|
|
81
|
+
|
|
82
|
+
### Data Grid
|
|
83
|
+
|
|
84
|
+
#### `@mui/x-data-grid@7.0.0-beta.2`
|
|
85
|
+
|
|
86
|
+
- [DataGrid] Add `removeAllFilterItems` as a reason of `onFilterModelChange` callback (#11911) @shaharyar-shamshi
|
|
87
|
+
- [DataGrid] Add slot typings (#11795) @romgrk
|
|
88
|
+
- [DataGrid] Add support for dialogs in menu actions (#11909) @cherniavskii
|
|
89
|
+
- [DataGrid] Allow passing readonly arrays to `pageSizeOptions` prop (#11609) @pcorpet
|
|
90
|
+
- [DataGrid] Fix incorrect computation of `lastPage` in `GridPagination` (#11958) @MBilalShafi
|
|
91
|
+
- [DataGrid] Improve vertical scrolling performance (#11924) @romgrk
|
|
92
|
+
- [l10n] Improve Danish (da-DK) locale (#11877) @ShahrazH
|
|
93
|
+
|
|
94
|
+
#### `@mui/x-data-grid-pro@7.0.0-beta.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
95
|
+
|
|
96
|
+
Same changes as in `@mui/x-data-grid@v7.0.0-beta.2`.
|
|
97
|
+
|
|
98
|
+
#### `@mui/x-data-grid-premium@v7.0.0-beta.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
99
|
+
|
|
100
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.2`, plus:
|
|
101
|
+
|
|
102
|
+
- [DataGridPremium] Fix autosize grouping cell (#11870) @romgrk
|
|
103
|
+
- [DataGridPremium] Fix clipboard paste not working with Caps Lock enabled (#11965) @shaharyar-shamshi
|
|
104
|
+
|
|
105
|
+
### Date Pickers
|
|
106
|
+
|
|
107
|
+
#### `@mui/x-date-pickers@7.0.0-beta.2`
|
|
108
|
+
|
|
109
|
+
- [pickers] Avoid relying on locale in Luxon `isWithinRange` method (#11936) @LukasTy
|
|
110
|
+
- [pickers] Limit the valid values of `TDate` (#11791) @flaviendelangle
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-date-pickers-pro@7.0.0-beta.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-beta.2`.
|
|
115
|
+
|
|
116
|
+
### Charts / `@mui/x-charts@7.0.0-beta.2`
|
|
117
|
+
|
|
118
|
+
- [charts] Add `reverse` property to axes (#11899) @alexfauquette
|
|
119
|
+
- [charts] Allow series ids to be numbers (#11941) @alexfauquette
|
|
120
|
+
- [charts] Support UTC date formatting in tooltip (#11943) @shaharyar-shamshi
|
|
121
|
+
|
|
122
|
+
### Tree View / `@mui/x-tree-view@7.0.0-beta.2`
|
|
123
|
+
|
|
124
|
+
- [TreeView] Correctly detect if an item is expandable (#11963) @swalker326
|
|
125
|
+
- [TreeView] Polish the default design & revise the simple version pages (#11529) @danilo-leal
|
|
126
|
+
|
|
127
|
+
### License
|
|
128
|
+
|
|
129
|
+
#### Breaking changes
|
|
130
|
+
|
|
131
|
+
- If you're using the [commercial license](https://next.mui.com/x/introduction/licensing), you need to update the import path:
|
|
132
|
+
|
|
133
|
+
```diff
|
|
134
|
+
-import { LicenseInfo } from '@mui/x-license-pro';
|
|
135
|
+
+import { LicenseInfo } from '@mui/x-license';
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`@mui/x-license@7.0.0-beta.2`
|
|
139
|
+
|
|
140
|
+
- [license] Rename `@mui/x-license-pro` to `@mui/x-license` (#11938) @cherniavskii
|
|
141
|
+
|
|
142
|
+
### Docs
|
|
143
|
+
|
|
144
|
+
- [docs] Add a note about `AdapterDateFnsV3` on the Getting Started page (#11985) @flaviendelangle
|
|
145
|
+
- [docs] Add missing `Charts` breaking change steps (#11971) @alexfauquette
|
|
146
|
+
- [docs] Fix `ChartsTooltip` typo (#11961) @thisisharsh7
|
|
147
|
+
- [docs] Refactor `Localization` documentation sections (#11989) @LukasTy
|
|
148
|
+
- [docs] Use "cannot" instead of "can't" or "can not" (#11986) @flaviendelangle
|
|
149
|
+
- [docs] Add quick fixes to the migration guide (#11806) @danilo-leal
|
|
150
|
+
- [docs] Avoid use of shorthand (#12000) @oliviertassinari
|
|
151
|
+
- [docs] Avoid the use of MUI Core @oliviertassinari
|
|
152
|
+
- [docs] Fix image size and dark mode @oliviertassinari
|
|
153
|
+
- [docs] Follow blank line convention with use client @oliviertassinari
|
|
154
|
+
- [docs] Stable layout between light and dark mode @oliviertassinari
|
|
155
|
+
|
|
156
|
+
### Core
|
|
157
|
+
|
|
158
|
+
- [core] Add `docs:serve` script (#11935) @cherniavskii
|
|
159
|
+
- [core] Bump monorepo (#12001) @cherniavskii
|
|
160
|
+
- [core] Deprecate `LicenseInfo` re-exports (#11956) @cherniavskii
|
|
161
|
+
- [core] Fix `test_types` failing on the `next` branch (#11944) @cherniavskii
|
|
162
|
+
- [core] Fix failing `test_static` on the next branch (#11977) @cherniavskii
|
|
163
|
+
- [core] Flatten grid packages folder (#11946) @cherniavskii
|
|
164
|
+
- [core] Improve license info deprecation message (#11974) @cherniavskii
|
|
165
|
+
- [core] Integrate changes from Core #40842 PR (#11801) @michaldudak
|
|
166
|
+
- [core] Move next config to ESM (#11882) @Janpot
|
|
167
|
+
- [core] Add auto-message on closed issues (#11805) @michelengelen
|
|
168
|
+
- [core] Simplify bug reproduction (#11849) @oliviertassinari
|
|
169
|
+
- [core] Fix npm reference @oliviertassinari
|
|
170
|
+
- [core] Normalize issue template @oliviertassinari
|
|
171
|
+
|
|
6
172
|
## 7.0.0-beta.1
|
|
7
173
|
|
|
8
174
|
_Feb 1, 2024_
|
|
@@ -2036,6 +2202,62 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
2036
2202
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
2037
2203
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
2038
2204
|
|
|
2205
|
+
## v6.19.4
|
|
2206
|
+
|
|
2207
|
+
_Feb 9, 2024_
|
|
2208
|
+
|
|
2209
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
2210
|
+
|
|
2211
|
+
- 🌍 Improve Danish (da-DK) locale on the Data Grid (#11972) @ShahrazH
|
|
2212
|
+
- 🐞 Bugfixes
|
|
2213
|
+
- 📚 Documentation improvements
|
|
2214
|
+
|
|
2215
|
+
### Data Grid
|
|
2216
|
+
|
|
2217
|
+
#### `@mui/x-data-grid@v6.19.4`
|
|
2218
|
+
|
|
2219
|
+
- [DataGrid] Add support for dialogs in menu actions (#11937) @cherniavskii
|
|
2220
|
+
- [DataGrid] Allow passing readonly arrays to `pageSizeOptions` prop (#11992) @pcorpet
|
|
2221
|
+
- [DataGrid] Fix row reorder with cell selection (#11878) @PEsteves8
|
|
2222
|
+
- [DataGrid] Replace `eval` with `new Function` (#11962) @cherniavskii
|
|
2223
|
+
- [l10n] Improve Danish (da-DK) locale (#11972) @ShahrazH
|
|
2224
|
+
|
|
2225
|
+
#### `@mui/x-data-grid-pro@v6.19.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
2226
|
+
|
|
2227
|
+
Same changes as in `@mui/x-data-grid@v6.19.4`.
|
|
2228
|
+
|
|
2229
|
+
#### `@mui/x-data-grid-premium@v6.19.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
2230
|
+
|
|
2231
|
+
Same changes as in `@mui/x-data-grid-pro@v6.19.4`, plus:
|
|
2232
|
+
|
|
2233
|
+
- [DataGridPremium] Fix autosize grouping cell (#11990) @romgrk
|
|
2234
|
+
- [DataGridPremium] Fix error after closing print export (#11889) @cherniavskii
|
|
2235
|
+
|
|
2236
|
+
### Date Pickers
|
|
2237
|
+
|
|
2238
|
+
#### `@mui/x-date-pickers@v6.19.4`
|
|
2239
|
+
|
|
2240
|
+
- [pickers] Avoid relying on locale in Luxon `isWithinRange` method (#11940) @LukasTy
|
|
2241
|
+
|
|
2242
|
+
#### `@mui/x-date-pickers-pro@v6.19.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
2243
|
+
|
|
2244
|
+
Same changes as in `@mui/x-date-pickers@v6.19.4`.
|
|
2245
|
+
|
|
2246
|
+
### Charts / `@mui/x-charts@v6.19.4`
|
|
2247
|
+
|
|
2248
|
+
- [charts] Add `reverse` property to axes (#11959) @alexfauquette
|
|
2249
|
+
- [charts] Allow series ids to be numbers (#11960) @alexfauquette
|
|
2250
|
+
- [charts] Fix Proptypes error by supporting string values for axes (#11953) @alexfauquette
|
|
2251
|
+
|
|
2252
|
+
### Docs
|
|
2253
|
+
|
|
2254
|
+
- [docs] Add a note about `AdapterDateFnsV3` on the Getting Started page (#11987) @flaviendelangle
|
|
2255
|
+
- [docs] Avoid the use of MUI Core @oliviertassinari
|
|
2256
|
+
- [docs] Fix API links (#11930) @alexfauquette
|
|
2257
|
+
- [docs] Fix `ChartsTooltip` typo (#11967) @thisisharsh7
|
|
2258
|
+
- [docs] Refactor `Localization` documentation sections (#11997) @LukasTy
|
|
2259
|
+
- [code] Simplify bug reproduction (#11932) @alexfauquette
|
|
2260
|
+
|
|
2039
2261
|
## 6.19.3
|
|
2040
2262
|
|
|
2041
2263
|
_Feb 1, 2024_
|
|
@@ -7123,7 +7345,7 @@ You can find more information about the new api, including how to set those tran
|
|
|
7123
7345
|
- [core] Add link to the security page on the `README` (#6073) @oliviertassinari
|
|
7124
7346
|
- [core] Fix scroll restoration in the docs (#5938) @oliviertassinari
|
|
7125
7347
|
- [core] Remove the Storybook (#6099) @flaviendelangle
|
|
7126
|
-
- [core] Tag release as `next` in
|
|
7348
|
+
- [core] Tag release as `next` in npm (#6256) @m4theushw
|
|
7127
7349
|
- [core] Update monorepo (#6180) @flaviendelangle
|
|
7128
7350
|
- [core] Use the `next` branch for Prettier (#6097) @flaviendelangle
|
|
7129
7351
|
- [core] Use the official repository for `@mui/monorepo` instead of a fork (#6189) @oliviertassinari
|
package/DataGrid/DataGrid.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DataGridProps } from '../models/props/DataGridProps';
|
|
3
3
|
import { GridValidRowModel } from '../models/gridRows';
|
|
4
|
+
export type { GridSlotsComponent as GridSlots } from '../models';
|
|
4
5
|
interface DataGridComponent {
|
|
5
6
|
<R extends GridValidRowModel = any>(props: DataGridProps<R> & React.RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
6
7
|
propTypes?: any;
|
|
@@ -13,4 +14,3 @@ interface DataGridComponent {
|
|
|
13
14
|
* - [DataGrid API](https://mui.com/x/api/data-grid/data-grid/)
|
|
14
15
|
*/
|
|
15
16
|
export declare const DataGrid: DataGridComponent;
|
|
16
|
-
export {};
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -305,7 +305,7 @@ DataGridRaw.propTypes = {
|
|
|
305
305
|
loading: PropTypes.bool,
|
|
306
306
|
/**
|
|
307
307
|
* Set the locale text of the Data Grid.
|
|
308
|
-
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/
|
|
308
|
+
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.
|
|
309
309
|
*/
|
|
310
310
|
localeText: PropTypes.object,
|
|
311
311
|
/**
|
|
@@ -493,12 +493,6 @@ DataGridRaw.propTypes = {
|
|
|
493
493
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
494
494
|
*/
|
|
495
495
|
onRowDoubleClick: PropTypes.func,
|
|
496
|
-
/**
|
|
497
|
-
* Callback fired when the row changes are committed.
|
|
498
|
-
* @param {GridRowId} id The row id.
|
|
499
|
-
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
500
|
-
*/
|
|
501
|
-
onRowEditCommit: PropTypes.func,
|
|
502
496
|
/**
|
|
503
497
|
* Callback fired when the row turns to edit mode.
|
|
504
498
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
@@ -74,7 +74,9 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
74
74
|
};
|
|
75
75
|
const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
76
76
|
export const useDataGridProps = inProps => {
|
|
77
|
-
const themedProps = useProps(
|
|
77
|
+
const themedProps = useProps(
|
|
78
|
+
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
79
|
+
useThemeProps({
|
|
78
80
|
props: inProps,
|
|
79
81
|
name: 'MuiDataGrid'
|
|
80
82
|
}));
|
|
@@ -3,4 +3,4 @@ export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Parti
|
|
|
3
3
|
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
4
4
|
}>, "ref"> | Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "ref"> & React.RefAttributes<React.Component<any, any, any>>, "hidden" | "color" | "page" | "content" | "size" | "style" | "height" | "translate" | "width" | "padding" | "disabled" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "rowSpan" | "scope" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | "classes" | "variant" | "slotProps" | "slots" | "count" | "getItemAriaLabel" | "onPageChange" | "rowsPerPage" | "showFirstButton" | "showLastButton" | "labelDisplayedRows" | "labelRowsPerPage" | "onRowsPerPageChange" | "rowsPerPageOptions" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps"> & {
|
|
5
5
|
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
6
|
-
}>, "ref">) & React.RefAttributes<
|
|
6
|
+
}>, "ref">) & React.RefAttributes<unknown>>;
|
|
@@ -24,6 +24,9 @@ const GridPaginationRoot = styled(TablePagination)(({
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}));
|
|
27
|
+
|
|
28
|
+
// A mutable version of a readonly array.
|
|
29
|
+
|
|
27
30
|
export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(props, ref) {
|
|
28
31
|
const apiRef = useGridApiContext();
|
|
29
32
|
const rootProps = useGridRootProps();
|
|
@@ -33,7 +36,10 @@ export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginat
|
|
|
33
36
|
var _ref, _rootProps$rowCount;
|
|
34
37
|
return (_ref = (_rootProps$rowCount = rootProps.rowCount) != null ? _rootProps$rowCount : visibleTopLevelRowCount) != null ? _ref : 0;
|
|
35
38
|
}, [rootProps.rowCount, visibleTopLevelRowCount]);
|
|
36
|
-
const lastPage = React.useMemo(() =>
|
|
39
|
+
const lastPage = React.useMemo(() => {
|
|
40
|
+
const calculatedValue = Math.ceil(rowCount / (paginationModel.pageSize || 1)) - 1;
|
|
41
|
+
return Math.max(0, calculatedValue);
|
|
42
|
+
}, [rowCount, paginationModel.pageSize]);
|
|
37
43
|
const handlePageSizeChange = React.useCallback(event => {
|
|
38
44
|
const pageSize = Number(event.target.value);
|
|
39
45
|
apiRef.current.setPageSize(pageSize);
|
|
@@ -69,7 +75,11 @@ export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginat
|
|
|
69
75
|
ref: ref,
|
|
70
76
|
component: "div",
|
|
71
77
|
count: rowCount,
|
|
72
|
-
page: paginationModel.page <= lastPage ? paginationModel.page : lastPage
|
|
78
|
+
page: paginationModel.page <= lastPage ? paginationModel.page : lastPage
|
|
79
|
+
// TODO: Remove the cast once the type is fixed in Material UI and that the min Material UI version
|
|
80
|
+
// for x-data-grid is past the fix.
|
|
81
|
+
// Note that Material UI will not mutate the array, so this is safe.
|
|
82
|
+
,
|
|
73
83
|
rowsPerPageOptions: pageSizeOptions,
|
|
74
84
|
rowsPerPage: paginationModel.pageSize,
|
|
75
85
|
onPageChange: handlePageChange,
|
package/components/GridRow.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { GridRowId, GridRowModel } from '../models/gridRows';
|
|
3
3
|
import type { GridPinnedColumns } from '../hooks/features/columns';
|
|
4
4
|
import type { GridStateColDef } from '../models/colDef/gridColDef';
|
|
5
|
-
import {
|
|
5
|
+
import type { GridVirtualizationState } from '../hooks/features/virtualization';
|
|
6
|
+
import type { GridDimensions } from '../hooks/features/dimensions';
|
|
6
7
|
export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
8
|
rowId: GridRowId;
|
|
8
9
|
selected: boolean;
|
|
@@ -12,6 +13,7 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
13
|
*/
|
|
13
14
|
index: number;
|
|
14
15
|
rowHeight: number | 'auto';
|
|
16
|
+
offsets: GridVirtualizationState['offsets'];
|
|
15
17
|
dimensions: GridDimensions;
|
|
16
18
|
firstColumnToRender: number;
|
|
17
19
|
lastColumnToRender: number;
|
package/components/GridRow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "renderedColumns", "pinnedColumns", "dimensions", "firstColumnToRender", "lastColumnToRender", "isFirstVisible", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
3
|
+
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "renderedColumns", "pinnedColumns", "offsets", "dimensions", "firstColumnToRender", "lastColumnToRender", "isFirstVisible", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -37,9 +37,7 @@ const useUtilityClasses = ownerState => {
|
|
|
37
37
|
classes
|
|
38
38
|
} = ownerState;
|
|
39
39
|
const slots = {
|
|
40
|
-
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
41
|
-
pinnedLeft: ['pinnedLeft'],
|
|
42
|
-
pinnedRight: ['pinnedRight']
|
|
40
|
+
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
43
41
|
};
|
|
44
42
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
45
43
|
};
|
|
@@ -69,6 +67,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
69
67
|
visibleColumns,
|
|
70
68
|
renderedColumns,
|
|
71
69
|
pinnedColumns,
|
|
70
|
+
offsets,
|
|
72
71
|
dimensions,
|
|
73
72
|
firstColumnToRender,
|
|
74
73
|
isFirstVisible,
|
|
@@ -268,6 +267,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
268
267
|
break;
|
|
269
268
|
}
|
|
270
269
|
if ((rowNode == null ? void 0 : rowNode.type) === 'skeletonRow') {
|
|
270
|
+
var _column$align;
|
|
271
271
|
const {
|
|
272
272
|
width
|
|
273
273
|
} = cellColSpanInfo.cellProps;
|
|
@@ -276,7 +276,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
276
276
|
width: width,
|
|
277
277
|
contentWidth: contentWidth,
|
|
278
278
|
field: column.field,
|
|
279
|
-
align: column.align
|
|
279
|
+
align: (_column$align = column.align) != null ? _column$align : 'left'
|
|
280
280
|
}, column.field);
|
|
281
281
|
}
|
|
282
282
|
const {
|
|
@@ -364,7 +364,13 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
364
364
|
"aria-selected": selected,
|
|
365
365
|
style: style
|
|
366
366
|
}, eventHandlers, other, {
|
|
367
|
-
children: [leftCells,
|
|
367
|
+
children: [leftCells, /*#__PURE__*/_jsx("div", {
|
|
368
|
+
role: "presentation",
|
|
369
|
+
className: gridClasses.cellOffsetLeft,
|
|
370
|
+
style: {
|
|
371
|
+
width: offsets.left
|
|
372
|
+
}
|
|
373
|
+
}), cells, emptyCellWidth > 0 && /*#__PURE__*/_jsx(EmptyCell, {
|
|
368
374
|
width: emptyCellWidth
|
|
369
375
|
}), rightCells.length > 0 && /*#__PURE__*/_jsx("div", {
|
|
370
376
|
role: "presentation",
|
|
@@ -432,6 +438,10 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
432
438
|
isLastVisible: PropTypes.bool.isRequired,
|
|
433
439
|
isNotVisible: PropTypes.bool,
|
|
434
440
|
lastColumnToRender: PropTypes.number.isRequired,
|
|
441
|
+
offsets: PropTypes.shape({
|
|
442
|
+
left: PropTypes.number.isRequired,
|
|
443
|
+
top: PropTypes.number.isRequired
|
|
444
|
+
}).isRequired,
|
|
435
445
|
onClick: PropTypes.func,
|
|
436
446
|
onDoubleClick: PropTypes.func,
|
|
437
447
|
onMouseEnter: PropTypes.func,
|
|
@@ -21,9 +21,6 @@ const Style = styled('div')({
|
|
|
21
21
|
[`&.${classes.pinnedRight}:not(.${classes.header})`]: {
|
|
22
22
|
position: 'sticky',
|
|
23
23
|
right: 0
|
|
24
|
-
},
|
|
25
|
-
[`&:not(.${classes.header}):not(.${classes.pinnedRight})`]: {
|
|
26
|
-
transform: 'translate3d(var(--DataGrid-offsetLeft), 0, 0)'
|
|
27
24
|
}
|
|
28
25
|
});
|
|
29
26
|
function GridScrollbarFillerCell({
|
|
@@ -8,5 +8,5 @@ export function GridFooterPlaceholder() {
|
|
|
8
8
|
if (rootProps.hideFooter) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
|
-
return /*#__PURE__*/_jsx(rootProps.slots.footer, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.footer));
|
|
11
|
+
return /*#__PURE__*/_jsx(rootProps.slots.footer, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.footer /* FIXME: typing error */));
|
|
12
12
|
}
|
|
@@ -138,7 +138,7 @@ function GridActionsCell(props) {
|
|
|
138
138
|
if (event.key === 'Tab') {
|
|
139
139
|
event.preventDefault();
|
|
140
140
|
}
|
|
141
|
-
if (['Tab', '
|
|
141
|
+
if (['Tab', 'Escape'].includes(event.key)) {
|
|
142
142
|
hideMenu();
|
|
143
143
|
}
|
|
144
144
|
};
|
|
@@ -175,7 +175,6 @@ function GridActionsCell(props) {
|
|
|
175
175
|
target: buttonRef.current,
|
|
176
176
|
position: position,
|
|
177
177
|
onClose: hideMenu,
|
|
178
|
-
onClick: hideMenu,
|
|
179
178
|
children: /*#__PURE__*/_jsx(MenuList, {
|
|
180
179
|
id: menuId,
|
|
181
180
|
className: gridClasses.menuList,
|
|
@@ -184,7 +183,8 @@ function GridActionsCell(props) {
|
|
|
184
183
|
variant: "menu",
|
|
185
184
|
autoFocusItem: true,
|
|
186
185
|
children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
|
|
187
|
-
key: index
|
|
186
|
+
key: index,
|
|
187
|
+
closeMenu: hideMenu
|
|
188
188
|
}))
|
|
189
189
|
})
|
|
190
190
|
})]
|
|
@@ -11,6 +11,12 @@ export type GridActionsCellItemProps = {
|
|
|
11
11
|
icon: React.ReactElement;
|
|
12
12
|
} & IconButtonProps) | ({
|
|
13
13
|
showInMenu: true;
|
|
14
|
+
/**
|
|
15
|
+
* If false, the menu will not close when this item is clicked.
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
closeMenuOnClick?: boolean;
|
|
19
|
+
closeMenu?: () => void;
|
|
14
20
|
} & MenuItemProps));
|
|
15
21
|
declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<{
|
|
16
22
|
label: string;
|
|
@@ -31,9 +37,15 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<{
|
|
|
31
37
|
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
32
38
|
} & {
|
|
33
39
|
showInMenu: true;
|
|
40
|
+
/**
|
|
41
|
+
* If false, the menu will not close when this item is clicked.
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
closeMenuOnClick?: boolean | undefined;
|
|
45
|
+
closeMenu?: (() => void) | undefined;
|
|
34
46
|
} & import("@mui/material/MenuItem").MenuItemOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
35
47
|
ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
|
|
36
48
|
}, "style" | "dense" | "disabled" | "action" | "selected" | "autoFocus" | "className" | "tabIndex" | "children" | "sx" | "classes" | "disableGutters" | "divider" | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef"> & {
|
|
37
49
|
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
38
|
-
}, "ref">) & React.RefAttributes<
|
|
50
|
+
}, "ref">) & React.RefAttributes<HTMLElement>>;
|
|
39
51
|
export { GridActionsCellItem };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["label", "icon", "showInMenu", "onClick"]
|
|
3
|
+
const _excluded = ["label", "icon", "showInMenu", "onClick"],
|
|
4
|
+
_excluded2 = ["label", "icon", "showInMenu", "onClick", "closeMenuOnClick", "closeMenu"];
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
6
7
|
import MenuItem from '@mui/material/MenuItem';
|
|
@@ -9,21 +10,18 @@ import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
|
9
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
12
|
const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
12
|
-
const {
|
|
13
|
-
label,
|
|
14
|
-
icon,
|
|
15
|
-
showInMenu,
|
|
16
|
-
onClick
|
|
17
|
-
} = props,
|
|
18
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
19
13
|
const rootProps = useGridRootProps();
|
|
20
|
-
|
|
21
|
-
if (onClick) {
|
|
22
|
-
onClick(event);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
if (!showInMenu) {
|
|
14
|
+
if (!props.showInMenu) {
|
|
26
15
|
var _rootProps$slotProps;
|
|
16
|
+
const {
|
|
17
|
+
label,
|
|
18
|
+
icon,
|
|
19
|
+
onClick
|
|
20
|
+
} = props,
|
|
21
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
22
|
+
const handleClick = event => {
|
|
23
|
+
onClick == null || onClick(event);
|
|
24
|
+
};
|
|
27
25
|
return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
28
26
|
ref: ref,
|
|
29
27
|
size: "small",
|
|
@@ -37,10 +35,24 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
37
35
|
})
|
|
38
36
|
}));
|
|
39
37
|
}
|
|
38
|
+
const {
|
|
39
|
+
label,
|
|
40
|
+
icon,
|
|
41
|
+
onClick,
|
|
42
|
+
closeMenuOnClick = true,
|
|
43
|
+
closeMenu
|
|
44
|
+
} = props,
|
|
45
|
+
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
46
|
+
const handleClick = event => {
|
|
47
|
+
onClick == null || onClick(event);
|
|
48
|
+
if (closeMenuOnClick) {
|
|
49
|
+
closeMenu == null || closeMenu();
|
|
50
|
+
}
|
|
51
|
+
};
|
|
40
52
|
return /*#__PURE__*/_jsxs(MenuItem, _extends({
|
|
41
53
|
ref: ref
|
|
42
54
|
}, other, {
|
|
43
|
-
onClick:
|
|
55
|
+
onClick: handleClick,
|
|
44
56
|
children: [icon && /*#__PURE__*/_jsx(ListItemIcon, {
|
|
45
57
|
children: icon
|
|
46
58
|
}), label]
|
|
@@ -86,7 +86,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
86
86
|
},
|
|
87
87
|
onKeyDown: handleKeyDown,
|
|
88
88
|
disabled: !isSelectable,
|
|
89
|
-
touchRippleRef: rippleRef
|
|
89
|
+
touchRippleRef: rippleRef /* FIXME: typing error */
|
|
90
90
|
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseCheckbox, other));
|
|
91
91
|
});
|
|
92
92
|
process.env.NODE_ENV !== "production" ? GridCellCheckboxForwardRef.propTypes = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { GridColumnHeaderParams } from '../../models/params/gridColumnHeaderParams';
|
|
3
|
-
declare const GridHeaderCheckbox: React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../../models/gridRows").GridValidRowModel, any, any> & React.RefAttributes<
|
|
3
|
+
declare const GridHeaderCheckbox: React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../../models/gridRows").GridValidRowModel, any, any> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export { GridHeaderCheckbox };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { GridColumnVisibilityModel } from '../../hooks/features/columns/gridColumnsInterfaces';
|
|
2
|
-
import { GridColumnsManagementProps } from './GridColumnsManagement';
|
|
2
|
+
import type { GridColumnsManagementProps } from './GridColumnsManagement';
|
|
3
3
|
export declare const checkColumnVisibilityModelsSame: (a: GridColumnVisibilityModel, b: GridColumnVisibilityModel) => boolean;
|
|
4
4
|
export declare const defaultSearchPredicate: NonNullable<GridColumnsManagementProps['searchPredicate']>;
|
|
@@ -192,8 +192,6 @@ export const GridRootStyles = styled('div', {
|
|
|
192
192
|
'--DataGrid-width': '0px',
|
|
193
193
|
'--DataGrid-hasScrollX': '0',
|
|
194
194
|
'--DataGrid-hasScrollY': '0',
|
|
195
|
-
'--DataGrid-offsetTop': '0px',
|
|
196
|
-
'--DataGrid-offsetLeft': '0px',
|
|
197
195
|
'--DataGrid-scrollbarSize': '10px',
|
|
198
196
|
'--DataGrid-rowWidth': '0px',
|
|
199
197
|
'--DataGrid-columnsTotalWidth': '0px',
|
|
@@ -240,6 +238,12 @@ export const GridRootStyles = styled('div', {
|
|
|
240
238
|
[`& .${c.cell} > *`]: {
|
|
241
239
|
overflow: 'visible !important',
|
|
242
240
|
whiteSpace: 'nowrap'
|
|
241
|
+
},
|
|
242
|
+
[`& .${c.groupingCriteriaCell}`]: {
|
|
243
|
+
width: 'unset'
|
|
244
|
+
},
|
|
245
|
+
[`& .${c.treeDataGroupingCell}`]: {
|
|
246
|
+
width: 'unset'
|
|
243
247
|
}
|
|
244
248
|
},
|
|
245
249
|
[`& .${c.columnHeader}, & .${c.cell}`]: {
|
|
@@ -554,8 +558,9 @@ export const GridRootStyles = styled('div', {
|
|
|
554
558
|
}
|
|
555
559
|
}
|
|
556
560
|
},
|
|
557
|
-
[`& .${c.
|
|
558
|
-
|
|
561
|
+
[`& .${c.cellOffsetLeft}`]: {
|
|
562
|
+
flex: '0 0 auto',
|
|
563
|
+
display: 'inline-block'
|
|
559
564
|
},
|
|
560
565
|
[`& .${c.columnHeaderDraggableContainer}`]: {
|
|
561
566
|
display: 'flex',
|