@mui/x-data-grid 7.0.0-beta.7 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/CHANGELOG.md +195 -12
  2. package/DataGrid/DataGrid.js +13 -17
  3. package/DataGrid/useDataGridProps.js +3 -5
  4. package/README.md +1 -1
  5. package/components/GridFooter.js +2 -3
  6. package/components/GridHeader.js +1 -2
  7. package/components/GridPagination.d.ts +6 -5
  8. package/components/GridPagination.js +12 -4
  9. package/components/GridRow.js +13 -17
  10. package/components/base/GridFooterPlaceholder.js +1 -2
  11. package/components/base/GridOverlays.js +3 -6
  12. package/components/cell/GridActionsCell.js +4 -6
  13. package/components/cell/GridActionsCellItem.d.ts +8 -25
  14. package/components/cell/GridActionsCellItem.js +8 -5
  15. package/components/cell/GridBooleanCell.d.ts +1 -0
  16. package/components/cell/GridBooleanCell.js +3 -2
  17. package/components/cell/GridCell.js +7 -8
  18. package/components/cell/GridEditBooleanCell.js +1 -2
  19. package/components/cell/GridEditDateCell.js +2 -3
  20. package/components/cell/GridEditInputCell.js +2 -2
  21. package/components/cell/GridEditSingleSelectCell.js +5 -8
  22. package/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -3
  23. package/components/columnHeaders/GridColumnGroupHeader.js +4 -5
  24. package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +2 -3
  25. package/components/columnHeaders/GridColumnHeaderItem.js +5 -6
  26. package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
  27. package/components/columnHeaders/GridColumnHeaderTitle.js +2 -3
  28. package/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -1
  29. package/components/columnSelection/GridCellCheckboxRenderer.js +3 -5
  30. package/components/columnSelection/GridHeaderCheckbox.js +1 -2
  31. package/components/columnsManagement/GridColumnsManagement.js +17 -21
  32. package/components/containers/GridRoot.js +3 -3
  33. package/components/menu/GridMenu.js +4 -6
  34. package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  35. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +2 -3
  36. package/components/panel/GridColumnsPanel.js +1 -2
  37. package/components/panel/GridPanel.d.ts +1 -10
  38. package/components/panel/GridPanel.js +1 -2
  39. package/components/panel/GridPreferencesPanel.js +2 -3
  40. package/components/panel/filterPanel/GridFilterForm.js +24 -27
  41. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -1
  42. package/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
  43. package/components/panel/filterPanel/GridFilterInputDate.d.ts +1 -1
  44. package/components/panel/filterPanel/GridFilterInputDate.js +3 -4
  45. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +11 -15
  46. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +10 -14
  47. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -1
  48. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +10 -11
  49. package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -1
  50. package/components/panel/filterPanel/GridFilterInputValue.js +5 -7
  51. package/components/panel/filterPanel/GridFilterPanel.js +5 -9
  52. package/components/panel/filterPanel/filterPanelUtils.js +1 -1
  53. package/components/toolbar/GridToolbarColumnsButton.js +3 -5
  54. package/components/toolbar/GridToolbarDensitySelector.js +8 -10
  55. package/components/toolbar/GridToolbarExport.js +2 -2
  56. package/components/toolbar/GridToolbarExportContainer.js +3 -5
  57. package/components/toolbar/GridToolbarFilterButton.js +3 -5
  58. package/components/toolbar/GridToolbarQuickFilter.js +4 -5
  59. package/components/virtualization/GridVirtualScrollerContent.js +1 -2
  60. package/components/virtualization/GridVirtualScrollerRenderZone.js +1 -2
  61. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +1 -2
  62. package/hooks/core/useGridApiInitialization.js +4 -6
  63. package/hooks/features/clipboard/useGridClipboard.js +6 -5
  64. package/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -16
  65. package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +4 -8
  66. package/hooks/features/columnGrouping/useGridColumnGrouping.js +12 -23
  67. package/hooks/features/columnHeaders/useGridColumnHeaders.js +6 -8
  68. package/hooks/features/columnMenu/useGridColumnMenuSlots.js +2 -2
  69. package/hooks/features/columnResize/useGridColumnResize.js +9 -19
  70. package/hooks/features/columns/gridColumnsSelector.js +1 -2
  71. package/hooks/features/columns/gridColumnsUtils.d.ts +0 -9
  72. package/hooks/features/columns/gridColumnsUtils.js +2 -22
  73. package/hooks/features/columns/useGridColumnSpanning.js +1 -2
  74. package/hooks/features/columns/useGridColumns.js +11 -19
  75. package/hooks/features/density/densitySelector.d.ts +4 -2
  76. package/hooks/features/density/densitySelector.js +8 -2
  77. package/hooks/features/density/densityState.d.ts +1 -4
  78. package/hooks/features/density/useGridDensity.d.ts +2 -4
  79. package/hooks/features/density/useGridDensity.js +21 -29
  80. package/hooks/features/dimensions/useGridDimensions.js +3 -5
  81. package/hooks/features/editing/useGridCellEditing.js +4 -6
  82. package/hooks/features/editing/useGridEditing.js +1 -2
  83. package/hooks/features/editing/useGridRowEditing.js +4 -6
  84. package/hooks/features/export/serializers/csvSerializer.d.ts +2 -0
  85. package/hooks/features/export/serializers/csvSerializer.js +25 -16
  86. package/hooks/features/export/useGridCsvExport.js +9 -10
  87. package/hooks/features/export/useGridPrintExport.js +9 -15
  88. package/hooks/features/export/utils.js +2 -3
  89. package/hooks/features/filter/gridFilterSelector.js +15 -22
  90. package/hooks/features/filter/gridFilterUtils.js +10 -16
  91. package/hooks/features/filter/useGridFilter.js +9 -15
  92. package/hooks/features/focus/useGridFocus.js +5 -6
  93. package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +1 -4
  94. package/hooks/features/headerFiltering/useGridHeaderFiltering.js +12 -17
  95. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -2
  96. package/hooks/features/pagination/gridPaginationSelector.js +1 -2
  97. package/hooks/features/pagination/useGridPagination.js +2 -3
  98. package/hooks/features/pagination/useGridPaginationModel.js +6 -11
  99. package/hooks/features/pagination/useGridRowCount.js +3 -6
  100. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +7 -12
  101. package/hooks/features/rowSelection/useGridRowSelection.js +11 -16
  102. package/hooks/features/rows/gridRowsSelector.js +11 -19
  103. package/hooks/features/rows/gridRowsUtils.js +7 -9
  104. package/hooks/features/rows/useGridParamsApi.js +1 -1
  105. package/hooks/features/rows/useGridRows.js +4 -13
  106. package/hooks/features/rows/useGridRowsMeta.js +7 -13
  107. package/hooks/features/scroll/useGridScroll.js +2 -3
  108. package/hooks/features/sorting/gridSortingSelector.js +4 -7
  109. package/hooks/features/sorting/useGridSorting.js +8 -14
  110. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
  111. package/hooks/features/virtualization/useGridVirtualScroller.js +220 -71
  112. package/hooks/utils/useGridApiEventHandler.js +5 -10
  113. package/hooks/utils/useGridNativeEventListener.js +1 -2
  114. package/index.js +1 -1
  115. package/internals/index.d.ts +2 -0
  116. package/internals/index.js +1 -0
  117. package/internals/utils/useProps.js +1 -2
  118. package/joy/joySlots.js +7 -13
  119. package/models/api/gridRowsMetaApi.d.ts +1 -1
  120. package/models/api/index.d.ts +1 -1
  121. package/models/api/index.js +0 -1
  122. package/models/events/gridEventLookup.d.ts +7 -0
  123. package/models/gridExport.d.ts +6 -0
  124. package/models/gridStateCommunity.d.ts +1 -0
  125. package/models/props/DataGridProps.d.ts +23 -27
  126. package/modern/DataGrid/DataGrid.js +13 -17
  127. package/modern/DataGrid/useDataGridProps.js +3 -5
  128. package/modern/components/GridPagination.js +11 -2
  129. package/modern/components/cell/GridActionsCell.js +1 -1
  130. package/modern/components/cell/GridActionsCellItem.js +4 -0
  131. package/modern/components/cell/GridBooleanCell.js +3 -2
  132. package/modern/components/containers/GridRoot.js +3 -3
  133. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  134. package/modern/components/panel/filterPanel/GridFilterInputDate.js +1 -1
  135. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  136. package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  137. package/modern/components/toolbar/GridToolbarDensitySelector.js +5 -5
  138. package/modern/hooks/features/clipboard/useGridClipboard.js +4 -2
  139. package/modern/hooks/features/columnResize/useGridColumnResize.js +1 -1
  140. package/modern/hooks/features/columns/gridColumnsUtils.js +0 -19
  141. package/modern/hooks/features/density/densitySelector.js +8 -2
  142. package/modern/hooks/features/density/useGridDensity.js +21 -29
  143. package/modern/hooks/features/editing/useGridCellEditing.js +1 -1
  144. package/modern/hooks/features/editing/useGridRowEditing.js +1 -1
  145. package/modern/hooks/features/export/serializers/csvSerializer.js +23 -12
  146. package/modern/hooks/features/export/useGridCsvExport.js +2 -1
  147. package/modern/hooks/features/filter/gridFilterUtils.js +1 -1
  148. package/modern/hooks/features/rowSelection/useGridRowSelection.js +3 -2
  149. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +211 -57
  150. package/modern/index.js +1 -1
  151. package/modern/internals/index.js +1 -0
  152. package/modern/models/api/index.js +0 -1
  153. package/modern/utils/createSelector.js +1 -1
  154. package/modern/utils/domUtils.js +1 -1
  155. package/modern/utils/keyboardUtils.js +1 -1
  156. package/node/DataGrid/DataGrid.js +13 -17
  157. package/node/DataGrid/useDataGridProps.js +3 -5
  158. package/node/components/GridPagination.js +9 -1
  159. package/node/components/cell/GridActionsCell.js +1 -1
  160. package/node/components/cell/GridActionsCellItem.js +4 -0
  161. package/node/components/cell/GridBooleanCell.js +3 -2
  162. package/node/components/containers/GridRoot.js +2 -2
  163. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  164. package/node/components/panel/filterPanel/GridFilterInputDate.js +1 -1
  165. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  166. package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -1
  167. package/node/components/toolbar/GridToolbarDensitySelector.js +4 -4
  168. package/node/hooks/features/clipboard/useGridClipboard.js +4 -2
  169. package/node/hooks/features/columnResize/useGridColumnResize.js +1 -1
  170. package/node/hooks/features/columns/gridColumnsUtils.js +0 -20
  171. package/node/hooks/features/density/densitySelector.js +9 -3
  172. package/node/hooks/features/density/useGridDensity.js +22 -30
  173. package/node/hooks/features/editing/useGridCellEditing.js +1 -1
  174. package/node/hooks/features/editing/useGridRowEditing.js +1 -1
  175. package/node/hooks/features/export/serializers/csvSerializer.js +23 -12
  176. package/node/hooks/features/export/useGridCsvExport.js +2 -1
  177. package/node/hooks/features/filter/gridFilterUtils.js +1 -1
  178. package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -1
  179. package/node/hooks/features/virtualization/useGridVirtualScroller.js +211 -57
  180. package/node/index.js +1 -1
  181. package/node/internals/index.js +12 -0
  182. package/node/models/api/index.js +0 -11
  183. package/node/utils/createSelector.js +1 -1
  184. package/node/utils/domUtils.js +1 -1
  185. package/node/utils/keyboardUtils.js +1 -1
  186. package/package.json +4 -4
  187. package/utils/createSelector.js +9 -9
  188. package/utils/domUtils.js +4 -7
  189. package/utils/getGridLocalization.js +9 -12
  190. package/utils/keyboardUtils.js +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,189 @@
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
7
+
8
+ _Mar 22, 2024_
9
+
10
+ We're excited to [announce the first v7 stable release](https://mui.com/blog/mui-x-v7/)! 🎉🚀
11
+
12
+ This is now the officially supported major version, where we'll keep rolling out new features, bug fixes, and improvements.
13
+ Migration guides are available with a complete list of the breaking changes:
14
+
15
+ - [Data Grid](https://mui.com/x/migration/migration-data-grid-v6/)
16
+ - [Date and Time Pickers](https://mui.com/x/migration/migration-pickers-v6/)
17
+ - [Tree View](https://mui.com/x/migration/migration-tree-view-v6/)
18
+ - [Charts](https://mui.com/x/migration/migration-charts-v6/)
19
+
20
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
21
+
22
+ - 🚀 Improve the usage of custom `viewRenderers` on `DateTimePicker` (#12441) @LukasTy
23
+ - ✨ Set focus on the focused Tree Item instead of the Tree View (#12226) @flaviendelangle
24
+ - 🕹️ Support controlled `density` for the Data Grid (#12332) @MBilalShafi
25
+ - 🎁 Dynamic virtualization range for the Data Grid (#12353) @romgrk
26
+ - 🐞 Bugfixes
27
+ - 📚 Documentation improvements
28
+
29
+ ### Data Grid
30
+
31
+ #### Breaking changes
32
+
33
+ - The `density` is a [controlled prop](https://mui.com/x/react-data-grid/accessibility/#set-the-density-programmatically) now, if you were previously passing the `density` prop to the Data Grid, you will need to do one of the following:
34
+
35
+ 1. Move it to the `initialState.density` to initialize it.
36
+
37
+ ```diff
38
+ <DataGrid
39
+ - density="compact"
40
+ + initialState={{ density: "compact" }}
41
+ />
42
+ ```
43
+
44
+ 2. Move it to the state and use `onDensityChange` callback to update the `density` prop accordingly for it to work as expected.
45
+
46
+ ```diff
47
+ + const [density, setDensity] = React.useState<GridDensity>('compact');
48
+ <DataGrid
49
+ - density="compact"
50
+ + density={density}
51
+ + onDensityChange={(newDensity) => setDensity(newDensity)}
52
+ />
53
+ ```
54
+
55
+ - The selector `gridDensityValueSelector` was removed, use the `gridDensitySelector` instead.
56
+
57
+ - The props `rowBuffer` and `columnBuffer` were renamed to `rowBufferPx` and `columnBufferPx`.
58
+ Their value is now a pixel value rather than a number of items. Their default value is now `150`.
59
+
60
+ - The props `rowThreshold` and `columnThreshold` have been removed.
61
+ If you had the `rowThreshold` prop set to `0` to force new rows to be rendered more often – this is no longer necessary.
62
+
63
+ #### `@mui/x-data-grid@7.0.0`
64
+
65
+ - [DataGrid] Allow to control the grid density (#12332) @MBilalShafi
66
+ - [DataGrid] Dynamic virtualization range (#12353) @romgrk
67
+ - [DataGrid] Fix `ElementType` usage (#12479) @cherniavskii
68
+ - [DataGrid] Fix cell value formatting on copy (#12357) @sai6855
69
+ - [DataGrid] Fix checkbox selection is keeping selection when filtering (#11751) @g1mishra
70
+ - [DataGrid] Make `rows` an optional prop (#12478) @MBilalShafi
71
+
72
+ #### `@mui/x-data-grid-pro@7.0.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
73
+
74
+ Same changes as in `@mui/x-data-grid@7.0.0`.
75
+
76
+ #### `@mui/x-data-grid-premium@7.0.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
77
+
78
+ Same changes as in `@mui/x-data-grid-pro@7.0.0`, plus:
79
+
80
+ - [DataGridPremium] Add support for confirmation before clipboard paste (#12225) @cherniavskii
81
+ - [DataGridPremium] Fix single grouping column sorting (#9679) @cherniavskii
82
+ - [DataGridPremium] Fix boolean cell not rendered in group rows (#12492) @sai6855
83
+
84
+ ### Date and Time Pickers
85
+
86
+ #### Breaking changes
87
+
88
+ - The `DesktopDateTimePicker` view rendering has been optimized by using the same technique as for `DesktopDateTimeRangePicker`.
89
+ - The `dateTimeViewRenderers` have been removed in favor of reusing existing time view renderers (`renderTimeViewClock`, `renderDigitalClockTimeView` and `renderMultiSectionDigitalClockTimeView`) and date view renderer (`renderDateViewCalendar`).
90
+ - Passing `renderTimeViewClock` to time view renderers will no longer revert to the old behavior of rendering only date or time view.
91
+
92
+ #### `@mui/x-date-pickers@7.0.0`
93
+
94
+ - [fields] Allow to override the separator between the start and the end date in all range fields (#12174) @flaviendelangle
95
+ - [fields] Support format without separator (#12489) @flaviendelangle
96
+ - [pickers] Use renderer interceptor on `DesktopDateTimePicker` (#12441) @LukasTy
97
+
98
+ #### `@mui/x-date-pickers-pro@7.0.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
99
+
100
+ Same changes as in `@mui/x-date-pickers@7.0.0`, plus:
101
+
102
+ - [DateTimeRangePicker] Add component `JSDoc` (#12518) @LukasTy
103
+ - [DateTimeRangePicker] Fix views behavior regression (#12529) @LukasTy
104
+
105
+ ### Charts
106
+
107
+ #### `@mui/x-charts@7.0.0`
108
+
109
+ - [charts] Fix small typo in `CartesianContextProvider` (#12461) @Janpot
110
+
111
+ ### Tree View
112
+
113
+ #### Breaking changes
114
+
115
+ - The required `nodeId` prop used by the `TreeItem` has been renamed to `itemId` for consistency:
116
+
117
+ ```diff
118
+ <TreeView>
119
+ - <TreeItem label="Item 1" nodeId="one">
120
+ + <TreeItem label="Item 1" itemId="one">
121
+ </TreeView>
122
+ ```
123
+
124
+ - The focus is now applied to the Tree Item root element instead of the Tree View root element.
125
+
126
+ This change will allow new features that require the focus to be on the Tree Item,
127
+ like the drag and drop reordering of items.
128
+ It also solves several issues with focus management,
129
+ like the inability to scroll to the focused item when a lot of items are rendered.
130
+
131
+ This will mostly impact how you write tests to interact with the Tree View:
132
+
133
+ For example, if you were writing a test with `react-testing-library`, here is what the changes could look like:
134
+
135
+ ```diff
136
+ it('test example on first item', () => {
137
+ - const { getByRole } = render(
138
+ + const { getAllByRole } = render(
139
+ <SimpleTreeView>
140
+ <TreeItem nodeId="one" />
141
+ <TreeItem nodeId="two" />
142
+ </SimpleTreeView>
143
+ );
144
+
145
+ - const tree = getByRole('tree');
146
+ + const firstTreeItem = getAllByRole('treeitem')[0];
147
+ act(() => {
148
+ - tree.focus();
149
+ + firstTreeItem.focus();
150
+ });
151
+ - fireEvent.keyDown(tree, { key: 'ArrowDown' });
152
+ + fireEvent.keyDown(firstTreeItem, { key: 'ArrowDown' });
153
+ })
154
+ ```
155
+
156
+ #### `@mui/x-tree-view@7.0.0`
157
+
158
+ - [TreeView] Rename `nodeId` to `itemId` (#12418) @noraleonte
159
+ - [TreeView] Set focus on the focused Tree Item instead of the Tree View (#12226) @flaviendelangle
160
+ - [TreeView] Update JSDoc of the `ContentComponent` prop to avoid using the word "node" (#12476) @flaviendelangle
161
+
162
+ ### `@mui/x-codemod@7.0.0`
163
+
164
+ - [codemod] Add a codemod and update the grid migration guide (#12488) @MBilalShafi
165
+
166
+ ### Docs
167
+
168
+ - [docs] Finalize migration guide (#12501) @noraleonte
169
+ - [docs] Fix nested cells alignment in the popular features demo (#12450) @cherniavskii
170
+ - [docs] Fix some Vale errors (#12469) @oliviertassinari
171
+ - [docs] Remove mentions of pre release (#12513) @noraleonte
172
+ - [docs] Update branch name and tags (#12498) @cherniavskii
173
+ - [docs] Update links to v6 (#12496) @cherniavskii
174
+ - [docs] Update links to v7 docs (#12500) @noraleonte
175
+ - [docs] Update supported versions (#12508) @joserodolfofreitas
176
+ - [docs] Update "What's new in MUI X" page #12527 @cherniavskii
177
+
178
+ ### Core
179
+
180
+ - [core] Bump `@mui/material` peer dependency for all packages (#12516) @LukasTy
181
+ - [core] Fix `no-restricted-imports` ESLint rule not working for Data Grid packages (#12477) @cherniavskii
182
+ - [core] Lower the frequency of `no-response` action runs (#12491) @michaldudak
183
+ - [core] Remove leftover `legacy` `browserlistrc` entry (#12415) @LukasTy
184
+ - [core] Update NPM tag (#12511) @cherniavskii
185
+ - [core] Update supported browsers (browserlistrc) (#12521) @LukasTy
186
+ - [core] Use Circle CI context @oliviertassinari
187
+ - [license] Fix grammar on expired license error message (#12460) @joserodolfofreitas
188
+
6
189
  ## 7.0.0-beta.7
7
190
 
8
191
  _Mar 14, 2024_
@@ -90,7 +273,7 @@ The `onNodeFocus` callback has been renamed to `onItemFocus` for consistency:
90
273
  - [docs] Add `legacy` bundle drop mention in migration pages (#12424) @LukasTy
91
274
  - [docs] Add missing luxon `Info` import (#12427) @LukasTy
92
275
  - [docs] Improve slots definitions for charts (#12408) @alexfauquette
93
- - [docs] Polish What's new in MUI X blog titles (#12309) @oliviertassinari
276
+ - [docs] Polish What's new in MUI X blog titles (#12309) @oliviertassinari
94
277
  - [docs] Replace `rel="noreferrer"` by `rel="noopener"` @oliviertassinari
95
278
  - [docs] Update `date-fns` `weekStarsOn` overriding example (#12416) @LukasTy
96
279
 
@@ -252,7 +435,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-beta.5`.
252
435
  ### Docs
253
436
 
254
437
  - [docs] Fix image layout shift when loading @oliviertassinari
255
- - [docs] Match Material UI repo comment for redirections @oliviertassinari
438
+ - [docs] Match Material UI repo comment for redirections @oliviertassinari
256
439
  - [docs] Non breaking spaces @oliviertassinari
257
440
  - [docs] Polish the Date Picker playground (#11869) @zanivan
258
441
  - [docs] Standardize WAI-ARIA references @oliviertassinari
@@ -263,9 +446,9 @@ Same changes as in `@mui/x-date-pickers@7.0.0-beta.5`.
263
446
  - [core] Remove grid folder from `getComponentInfo` RegExp (#12241) @flaviendelangle
264
447
  - [core] Remove `window.` reference for common globals @oliviertassinari
265
448
  - [core] Use runtime agnostic setTimeout type @oliviertassinari
266
- - [docs-infra] Fix Stack Overflow breaking space @oliviertassinari
449
+ - [docs-infra] Fix Stack Overflow breaking space @oliviertassinari
267
450
  - [docs-infra] Fix missing non breaking spaces @oliviertassinari
268
- - [github] Update `no-response` workflow (#12193) @MBilalShafi
451
+ - [infra] Update `no-response` workflow (#12193) @MBilalShafi
269
452
  - [infra] Fix missing permission reset @oliviertassinari
270
453
 
271
454
  ## 7.0.0-beta.4
@@ -282,7 +465,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
282
465
 
283
466
  ### Breaking changes
284
467
 
285
- - The support for IE11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE11 is no longer included.
468
+ - The support for IE11 has been removed from all MUI X packages. The `legacy` bundle that used to support old browsers like IE11 is no longer included.
286
469
 
287
470
  ### Data Grid
288
471
 
@@ -324,7 +507,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.4`.
324
507
  - The headless field hooks (e.g.: `useDateField`) now returns a new prop called `enableAccessibleFieldDOMStructure`.
325
508
  This property is utilized to determine whether the anticipated UI is constructed using an accessible DOM structure. Learn more about this new [accessible DOM structure](/x/react-date-pickers/fields/#accessible-dom-structure).
326
509
 
327
- When building a custom UI, you are most-likely only supporting one DOM structure, so you can remove `enableAccessibleFieldDOMStructure` before it is passed to the DOM:
510
+ When building a custom UI, you are most-likely only supporting one DOM structure, so you can remove `enableAccessibleFieldDOMStructure` before it is passed to the DOM:
328
511
 
329
512
  ```diff
330
513
  function MyCustomTextField(props) {
@@ -392,7 +575,7 @@ These components are no longer exported from `@mui/x-charts`:
392
575
  ### Docs
393
576
 
394
577
  - [docs] Add recipe for hiding separator on non-resizable columns (#12134) @michelengelen
395
- - [docs] Add small improvements to the Gauge Chart page (#12076) @danilo-leal
578
+ - [docs] Add small improvements to the Gauge page (#12076) @danilo-leal
396
579
  - [docs] Add the 'point' scaleType to the axis documentation (#12179) @alexfauquette
397
580
  - [docs] Clarify Pickers 'Component composition' section (#12097) @LukasTy
398
581
  - [docs] Fix "Licensing" page link (#12156) @LukasTy
@@ -975,7 +1158,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.9`.
975
1158
 
976
1159
  - [charts] Do not propagate `innerRadius` and `outerRadius` to the DOM (#11689) @alexfauquette
977
1160
  - [charts] Fix default `stackOffset` for `LineChart` (#11647) @alexfauquette
978
- - [charts] Remove a TS ignore (#11688) @alexfauquette
1161
+ - [charts] Remove a TypeScript ignore (#11688) @alexfauquette
979
1162
 
980
1163
  ### Tree View
981
1164
 
@@ -1404,7 +1587,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.7`.
1404
1587
  - [core] Fix release changelog (#11496) @romgrk
1405
1588
  - [core] Fix use of ::before & ::after (#11515) @oliviertassinari
1406
1589
  - [core] Localize the issue template to MUI X (#11511) @oliviertassinari
1407
- - [core] Regen api files (#11542) @flaviendelangle
1590
+ - [core] Regenerate API files (#11542) @flaviendelangle
1408
1591
  - [core] Remove issue emoji @oliviertassinari
1409
1592
  - [core] Sync the release instructions with MUI Core @oliviertassinari
1410
1593
  - [core] Yaml format match most common convention @oliviertassinari
@@ -1447,7 +1630,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
1447
1630
 
1448
1631
  - The `filterModel` now supports `Date` objects as values for `date` and `dateTime` column types.
1449
1632
  The `filterModel` still accepts strings as values for `date` and `dateTime` column types,
1450
- but all updates to the `filterModel` coming from the UI (e.g. filter panel) will set the value as a `Date` object.
1633
+ but all updates to the `filterModel` coming from the UI (for example filter panel) will set the value as a `Date` object.
1451
1634
 
1452
1635
  #### `@mui/x-data-grid@7.0.0-alpha.6`
1453
1636
 
@@ -1658,7 +1841,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.5`, plus:
1658
1841
  ### Core
1659
1842
 
1660
1843
  - [core] Automate cherry-pick of PRs from `next` -> `master` (#11382) @MBilalShafi
1661
- - [github] Update `no-response` workflow (#11369) @MBilalShafi
1844
+ - [infra] Update `no-response` workflow (#11369) @MBilalShafi
1662
1845
  - [test] Fix flaky screenshots (#11388) @cherniavskii
1663
1846
 
1664
1847
  ## 7.0.0-alpha.4
@@ -1896,7 +2079,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.3`.
1896
2079
 
1897
2080
  - [charts] Adjusted `defaultizeValueFormatter` util to accept an optional `series.valueFormatter` value (#11144) @michelengelen
1898
2081
  - [charts] Apply `labelStyle` and `tickLabelStyle` props on `<ChartsYAxis />` (#11180) @akamfoad
1899
- - [charts] Fix TS config (#11259) @alexfauquette
2082
+ - [charts] Fix TypeScript config (#11259) @alexfauquette
1900
2083
  - [charts] Fix error with empty dataset (#11063) @alexfauquette
1901
2084
  - [charts] Fix export strategy (#11235) @alexfauquette
1902
2085
  - [charts] Remove outdated prop-types (#11045) @alexfauquette
@@ -101,10 +101,10 @@ DataGridRaw.propTypes = {
101
101
  */
102
102
  clipboardCopyCellDelimiter: PropTypes.string,
103
103
  /**
104
- * Number of extra columns to be rendered before/after the visible slice.
105
- * @default 3
104
+ * Column region in pixels to render before/after the viewport
105
+ * @default 150
106
106
  */
107
- columnBuffer: PropTypes.number,
107
+ columnBufferPx: PropTypes.number,
108
108
  columnGroupingModel: PropTypes.arrayOf(PropTypes.object),
109
109
  /**
110
110
  * Sets the height in pixel of the column headers in the Data Grid.
@@ -115,11 +115,6 @@ DataGridRaw.propTypes = {
115
115
  * Set of columns of type [[GridColDef]][].
116
116
  */
117
117
  columns: PropTypes.arrayOf(PropTypes.object).isRequired,
118
- /**
119
- * Number of rows from the `columnBuffer` that can be visible before a new slice is rendered.
120
- * @default 3
121
- */
122
- columnThreshold: PropTypes.number,
123
118
  /**
124
119
  * Set the column visibility model of the Data Grid.
125
120
  * If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].
@@ -467,6 +462,11 @@ DataGridRaw.propTypes = {
467
462
  * @param {GridCallbackDetails} details Additional details for this callback.
468
463
  */
469
464
  onColumnWidthChange: PropTypes.func,
465
+ /**
466
+ * Callback fired when the density changes.
467
+ * @param {GridDensity} density New density value.
468
+ */
469
+ onDensityChange: PropTypes.func,
470
470
  /**
471
471
  * Callback fired when the Filter model changes before the filters are applied.
472
472
  * @param {GridFilterModel} model With all properties from [[GridFilterModel]].
@@ -609,10 +609,10 @@ DataGridRaw.propTypes = {
609
609
  */
610
610
  processRowUpdate: PropTypes.func,
611
611
  /**
612
- * Number of extra rows to be rendered before/after the visible slice.
613
- * @default 3
612
+ * Row region in pixels to render before/after the viewport
613
+ * @default 150
614
614
  */
615
- rowBuffer: PropTypes.number,
615
+ rowBufferPx: PropTypes.number,
616
616
  /**
617
617
  * Set the total number of rows, if it is different from the length of the value `rows` prop.
618
618
  * If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
@@ -636,8 +636,9 @@ DataGridRaw.propTypes = {
636
636
  rowPositionsDebounceMs: PropTypes.number,
637
637
  /**
638
638
  * Set of rows of type [[GridRowsProp]].
639
+ * @default []
639
640
  */
640
- rows: PropTypes.arrayOf(PropTypes.object).isRequired,
641
+ rows: PropTypes.arrayOf(PropTypes.object),
641
642
  /**
642
643
  * If `false`, the row selection mode is disabled.
643
644
  * @default true
@@ -652,11 +653,6 @@ DataGridRaw.propTypes = {
652
653
  * @default "margin"
653
654
  */
654
655
  rowSpacingType: PropTypes.oneOf(['border', 'margin']),
655
- /**
656
- * Number of rows from the `rowBuffer` that can be visible before a new slice is rendered.
657
- * @default 3
658
- */
659
- rowThreshold: PropTypes.number,
660
656
  /**
661
657
  * Override the height/width of the Data Grid inner scrollbar.
662
658
  */
@@ -25,12 +25,10 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
25
25
  autoPageSize: false,
26
26
  checkboxSelection: false,
27
27
  checkboxSelectionVisibleOnly: false,
28
- columnBuffer: 3,
29
- rowBuffer: 3,
30
- columnThreshold: 3,
31
- rowThreshold: 3,
28
+ columnBufferPx: 150,
29
+ rowBufferPx: 150,
30
+ rows: [],
32
31
  rowSelection: true,
33
- density: 'standard',
34
32
  disableColumnFilter: false,
35
33
  disableColumnMenu: false,
36
34
  disableColumnSelector: false,
package/README.md CHANGED
@@ -15,7 +15,7 @@ This component has the following peer dependencies that you will need to install
15
15
 
16
16
  ```json
17
17
  "peerDependencies": {
18
- "@mui/material": "^5.15.0",
18
+ "@mui/material": "^5.15.14",
19
19
  "react": "^17.0.0 || ^18.0.0",
20
20
  "react-dom": "^17.0.0 || ^18.0.0"
21
21
  },
@@ -12,7 +12,6 @@ import { useGridRootProps } from '../hooks/utils/useGridRootProps';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
14
  const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref) {
15
- var _rootProps$slotProps, _rootProps$slotProps2;
16
15
  const apiRef = useGridApiContext();
17
16
  const rootProps = useGridRootProps();
18
17
  const totalTopLevelRowCount = useGridSelector(apiRef, gridTopLevelRowCountSelector);
@@ -21,11 +20,11 @@ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref)
21
20
  const selectedRowCountElement = !rootProps.hideFooterSelectedRowCount && selectedRowCount > 0 ? /*#__PURE__*/_jsx(GridSelectedRowCount, {
22
21
  selectedRowCount: selectedRowCount
23
22
  }) : /*#__PURE__*/_jsx("div", {});
24
- const rowCountElement = !rootProps.hideFooterRowCount && !rootProps.pagination ? /*#__PURE__*/_jsx(rootProps.slots.footerRowCount, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.footerRowCount, {
23
+ const rowCountElement = !rootProps.hideFooterRowCount && !rootProps.pagination ? /*#__PURE__*/_jsx(rootProps.slots.footerRowCount, _extends({}, rootProps.slotProps?.footerRowCount, {
25
24
  rowCount: totalTopLevelRowCount,
26
25
  visibleRowCount: visibleTopLevelRowCount
27
26
  })) : null;
28
- const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.pagination));
27
+ const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, _extends({}, rootProps.slotProps?.pagination));
29
28
  return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({
30
29
  ref: ref
31
30
  }, props, {
@@ -5,9 +5,8 @@ import { GridPreferencesPanel } from './panel/GridPreferencesPanel';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  export function GridHeader() {
8
- var _rootProps$slotProps;
9
8
  const rootProps = useGridRootProps();
10
9
  return /*#__PURE__*/_jsxs(React.Fragment, {
11
- children: [/*#__PURE__*/_jsx(GridPreferencesPanel, {}), rootProps.slots.toolbar && /*#__PURE__*/_jsx(rootProps.slots.toolbar, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.toolbar))]
10
+ children: [/*#__PURE__*/_jsx(GridPreferencesPanel, {}), rootProps.slots.toolbar && /*#__PURE__*/_jsx(rootProps.slots.toolbar, _extends({}, rootProps.slotProps?.toolbar))]
12
11
  });
13
12
  }
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "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"> & {
3
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
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
- component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
6
- }>, "ref">) & React.RefAttributes<unknown>>;
2
+ import { TablePaginationProps } from '@mui/material/TablePagination';
3
+ interface GridPaginationOwnProps {
4
+ component?: React.ElementType;
5
+ }
6
+ declare const GridPagination: React.ForwardRefExoticComponent<Omit<Partial<Omit<TablePaginationProps, "component">> & GridPaginationOwnProps, "ref"> & React.RefAttributes<unknown>>;
7
+ export { GridPagination };
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import PropTypes from 'prop-types';
3
4
  import TablePagination, { tablePaginationClasses } from '@mui/material/TablePagination';
4
5
  import { styled } from '@mui/material/styles';
5
6
  import { useGridSelector } from '../hooks/utils/useGridSelector';
@@ -26,7 +27,7 @@ const GridPaginationRoot = styled(TablePagination)(({
26
27
 
27
28
  // A mutable version of a readonly array.
28
29
 
29
- export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(props, ref) {
30
+ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(props, ref) {
30
31
  const apiRef = useGridApiContext();
31
32
  const rootProps = useGridRootProps();
32
33
  const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);
@@ -56,10 +57,9 @@ export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginat
56
57
  return false;
57
58
  };
58
59
  if (process.env.NODE_ENV !== 'production') {
59
- var _rootProps$pagination, _rootProps$pagination2;
60
60
  // eslint-disable-next-line react-hooks/rules-of-hooks
61
61
  const warnedOnceMissingInPageSizeOptions = React.useRef(false);
62
- const pageSize = (_rootProps$pagination = (_rootProps$pagination2 = rootProps.paginationModel) == null ? void 0 : _rootProps$pagination2.pageSize) != null ? _rootProps$pagination : paginationModel.pageSize;
62
+ const pageSize = rootProps.paginationModel?.pageSize ?? paginationModel.pageSize;
63
63
  if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !isPageSizeIncludedInPageSizeOptions(pageSize)) {
64
64
  console.warn([`MUI X: The page size \`${paginationModel.pageSize}\` is not preset in the \`pageSizeOptions\`.`, `Add it to show the pagination select.`].join('\n'));
65
65
  warnedOnceMissingInPageSizeOptions.current = true;
@@ -80,4 +80,12 @@ export const GridPagination = /*#__PURE__*/React.forwardRef(function GridPaginat
80
80
  onPageChange: handlePageChange,
81
81
  onRowsPerPageChange: handlePageSizeChange
82
82
  }, apiRef.current.getLocaleText('MuiTablePagination'), props));
83
- });
83
+ });
84
+ process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
85
+ // ----------------------------- Warning --------------------------------
86
+ // | These PropTypes are generated from the TypeScript type definitions |
87
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
88
+ // ----------------------------------------------------------------------
89
+ component: PropTypes.elementType
90
+ } : void 0;
91
+ export { GridPagination };
@@ -157,7 +157,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
157
157
  }, [apiRef, rowId]);
158
158
  const publishClick = React.useCallback(event => {
159
159
  const cell = findParentElementFromClassName(event.target, gridClasses.cell);
160
- const field = cell == null ? void 0 : cell.getAttribute('data-field');
160
+ const field = cell?.getAttribute('data-field');
161
161
 
162
162
  // Check if the field is available because the cell that fills the empty
163
163
  // space of the row has no field.
@@ -184,7 +184,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
184
184
 
185
185
  // User clicked a button from the "actions" column type
186
186
  const column = apiRef.current.getColumn(field);
187
- if ((column == null ? void 0 : column.type) === GRID_ACTIONS_COLUMN_TYPE) {
187
+ if (column?.type === GRID_ACTIONS_COLUMN_TYPE) {
188
188
  return;
189
189
  }
190
190
  }
@@ -199,9 +199,8 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
199
199
  const sizes = useGridSelector(apiRef, () => _extends({}, apiRef.current.unstable_getRowInternalSizes(rowId)), objectShallowCompare);
200
200
  let minHeight = rowHeight;
201
201
  if (minHeight === 'auto' && sizes) {
202
- var _sizes$baseCenter;
203
202
  const numberOfBaseSizes = 1;
204
- const maximumSize = (_sizes$baseCenter = sizes.baseCenter) != null ? _sizes$baseCenter : 0;
203
+ const maximumSize = sizes.baseCenter ?? 0;
205
204
  if (maximumSize > 0 && numberOfBaseSizes > 1) {
206
205
  minHeight = maximumSize;
207
206
  }
@@ -220,11 +219,11 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
220
219
  minHeight,
221
220
  '--height': typeof rowHeight === 'number' ? `${rowHeight}px` : rowHeight
222
221
  });
223
- if (sizes != null && sizes.spacingTop) {
222
+ if (sizes?.spacingTop) {
224
223
  const property = rootProps.rowSpacingType === 'border' ? 'borderTopWidth' : 'marginTop';
225
224
  rowStyle[property] = sizes.spacingTop;
226
225
  }
227
- if (sizes != null && sizes.spacingBottom) {
226
+ if (sizes?.spacingBottom) {
228
227
  const property = rootProps.rowSpacingType === 'border' ? 'borderBottomWidth' : 'marginBottom';
229
228
  let propertyValue = rowStyle[property];
230
229
  // avoid overriding existing value
@@ -238,8 +237,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
238
237
  }, [isNotVisible, rowHeight, styleProp, minHeight, sizes, rootProps.rowSpacingType]);
239
238
  const rowClassNames = apiRef.current.unstable_applyPipeProcessors('rowClassName', [], rowId);
240
239
  if (typeof rootProps.getRowClassName === 'function') {
241
- var _currentPage$range;
242
- const indexRelativeToCurrentPage = index - (((_currentPage$range = currentPage.range) == null ? void 0 : _currentPage$range.firstRowIndex) || 0);
240
+ const indexRelativeToCurrentPage = index - (currentPage.range?.firstRowIndex || 0);
243
241
  const rowParams = _extends({}, apiRef.current.getRowParams(rowId), {
244
242
  isFirstVisible: indexRelativeToCurrentPage === 0,
245
243
  isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
@@ -248,24 +246,22 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
248
246
  rowClassNames.push(rootProps.getRowClassName(rowParams));
249
247
  }
250
248
  const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = PinnedPosition.NONE) => {
251
- var _cellColSpanInfo$cell, _cellColSpanInfo$cell2, _editRowsState$rowId$, _editRowsState$rowId;
252
249
  const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
253
- if (cellColSpanInfo != null && cellColSpanInfo.spannedByColSpan) {
250
+ if (cellColSpanInfo?.spannedByColSpan) {
254
251
  return null;
255
252
  }
256
- const width = (_cellColSpanInfo$cell = cellColSpanInfo == null ? void 0 : cellColSpanInfo.cellProps.width) != null ? _cellColSpanInfo$cell : column.computedWidth;
257
- const colSpan = (_cellColSpanInfo$cell2 = cellColSpanInfo == null ? void 0 : cellColSpanInfo.cellProps.colSpan) != null ? _cellColSpanInfo$cell2 : 1;
253
+ const width = cellColSpanInfo?.cellProps.width ?? column.computedWidth;
254
+ const colSpan = cellColSpanInfo?.cellProps.colSpan ?? 1;
258
255
  const pinnedOffset = getPinnedCellOffset(gridPinnedColumnPositionLookup[pinnedPosition], column.computedWidth, indexRelativeToAllColumns, columnPositions, dimensions);
259
- if ((rowNode == null ? void 0 : rowNode.type) === 'skeletonRow') {
260
- var _column$align;
256
+ if (rowNode?.type === 'skeletonRow') {
261
257
  return /*#__PURE__*/_jsx(slots.skeletonCell, {
262
258
  width: width,
263
259
  height: rowHeight,
264
260
  field: column.field,
265
- align: (_column$align = column.align) != null ? _column$align : 'left'
261
+ align: column.align ?? 'left'
266
262
  }, column.field);
267
263
  }
268
- const editCellState = (_editRowsState$rowId$ = (_editRowsState$rowId = editRowsState[rowId]) == null ? void 0 : _editRowsState$rowId[column.field]) != null ? _editRowsState$rowId$ : null;
264
+ const editCellState = editRowsState[rowId]?.[column.field] ?? null;
269
265
 
270
266
  // when the cell is a reorder cell we are not allowing to reorder the col
271
267
  // fixes https://github.com/mui/mui-x/issues/11126
@@ -289,7 +285,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
289
285
  pinnedPosition: pinnedPosition,
290
286
  sectionIndex: indexInSection,
291
287
  sectionLength: sectionLength
292
- }, slotProps == null ? void 0 : slotProps.cell), column.field);
288
+ }, slotProps?.cell), column.field);
293
289
  };
294
290
 
295
291
  /* Start of rendering */
@@ -3,10 +3,9 @@ import * as React from 'react';
3
3
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  export function GridFooterPlaceholder() {
6
- var _rootProps$slotProps;
7
6
  const rootProps = useGridRootProps();
8
7
  if (rootProps.hideFooter) {
9
8
  return null;
10
9
  }
11
- return /*#__PURE__*/_jsx(rootProps.slots.footer, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.footer /* FIXME: typing error */));
10
+ return /*#__PURE__*/_jsx(rootProps.slots.footer, _extends({}, rootProps.slotProps?.footer /* FIXME: typing error */));
12
11
  }
@@ -91,18 +91,15 @@ export function GridOverlays() {
91
91
  let overlay = null;
92
92
  let overlayType = '';
93
93
  if (showNoRowsOverlay) {
94
- var _rootProps$slotProps;
95
- overlay = /*#__PURE__*/_jsx(rootProps.slots.noRowsOverlay, _extends({}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.noRowsOverlay));
94
+ overlay = /*#__PURE__*/_jsx(rootProps.slots.noRowsOverlay, _extends({}, rootProps.slotProps?.noRowsOverlay));
96
95
  overlayType = 'noRowsOverlay';
97
96
  }
98
97
  if (showNoResultsOverlay) {
99
- var _rootProps$slotProps2;
100
- overlay = /*#__PURE__*/_jsx(rootProps.slots.noResultsOverlay, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.noResultsOverlay));
98
+ overlay = /*#__PURE__*/_jsx(rootProps.slots.noResultsOverlay, _extends({}, rootProps.slotProps?.noResultsOverlay));
101
99
  overlayType = 'noResultsOverlay';
102
100
  }
103
101
  if (loading) {
104
- var _rootProps$slotProps3;
105
- overlay = /*#__PURE__*/_jsx(rootProps.slots.loadingOverlay, _extends({}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.loadingOverlay));
102
+ overlay = /*#__PURE__*/_jsx(rootProps.slots.loadingOverlay, _extends({}, rootProps.slotProps?.loadingOverlay));
106
103
  overlayType = 'loadingOverlay';
107
104
  }
108
105
  if (overlay === null) {