@mui/x-data-grid 6.16.1 → 6.16.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.
Files changed (217) hide show
  1. package/CHANGELOG.md +169 -0
  2. package/DataGrid/DataGrid.d.ts +7 -0
  3. package/DataGrid/DataGrid.js +8 -1
  4. package/colDef/gridDateColDef.js +0 -4
  5. package/components/GridRow.js +7 -3
  6. package/components/cell/GridCell.js +7 -3
  7. package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
  8. package/components/containers/GridRootStyles.js +3 -0
  9. package/components/panel/filterPanel/GridFilterForm.d.ts +7 -0
  10. package/components/panel/filterPanel/GridFilterForm.js +8 -0
  11. package/components/panel/filterPanel/GridFilterPanel.d.ts +7 -0
  12. package/components/panel/filterPanel/GridFilterPanel.js +8 -0
  13. package/components/toolbar/GridToolbarQuickFilter.d.ts +8 -0
  14. package/components/toolbar/GridToolbarQuickFilter.js +9 -0
  15. package/components/virtualization/GridVirtualScroller.js +3 -1
  16. package/constants/gridClasses.d.ts +4 -0
  17. package/constants/gridClasses.js +1 -1
  18. package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +4 -1
  19. package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
  20. package/hooks/features/columnGrouping/useGridColumnGrouping.js +12 -6
  21. package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
  22. package/hooks/features/columns/gridColumnsUtils.js +0 -1
  23. package/hooks/features/filter/gridFilterUtils.js +4 -4
  24. package/hooks/features/sorting/gridSortingUtils.d.ts +1 -1
  25. package/hooks/features/virtualization/useGridVirtualScroller.js +8 -2
  26. package/index.js +1 -1
  27. package/legacy/DataGrid/DataGrid.js +8 -1
  28. package/legacy/colDef/gridDateColDef.js +0 -4
  29. package/legacy/components/GridRow.js +6 -2
  30. package/legacy/components/cell/GridCell.js +7 -3
  31. package/legacy/components/containers/GridRootStyles.js +2 -0
  32. package/legacy/components/panel/filterPanel/GridFilterForm.js +8 -0
  33. package/legacy/components/panel/filterPanel/GridFilterPanel.js +8 -0
  34. package/legacy/components/toolbar/GridToolbarQuickFilter.js +9 -0
  35. package/legacy/components/virtualization/GridVirtualScroller.js +3 -1
  36. package/legacy/constants/gridClasses.js +1 -1
  37. package/legacy/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
  38. package/legacy/hooks/features/columnGrouping/useGridColumnGrouping.js +12 -6
  39. package/legacy/hooks/features/columns/gridColumnsUtils.js +0 -1
  40. package/legacy/hooks/features/filter/gridFilterUtils.js +4 -4
  41. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +8 -2
  42. package/legacy/index.js +1 -1
  43. package/legacy/locales/arSD.js +26 -28
  44. package/legacy/locales/roRO.js +1 -1
  45. package/locales/arSD.js +26 -28
  46. package/locales/roRO.js +1 -1
  47. package/models/events/gridEventLookup.d.ts +14 -0
  48. package/models/props/DataGridProps.d.ts +3 -3
  49. package/modern/DataGrid/DataGrid.js +8 -1
  50. package/modern/colDef/gridDateColDef.js +0 -4
  51. package/modern/components/GridRow.js +7 -3
  52. package/modern/components/cell/GridCell.js +6 -2
  53. package/modern/components/containers/GridRootStyles.js +3 -0
  54. package/modern/components/panel/filterPanel/GridFilterForm.js +8 -0
  55. package/modern/components/panel/filterPanel/GridFilterPanel.js +8 -0
  56. package/modern/components/toolbar/GridToolbarQuickFilter.js +9 -0
  57. package/modern/components/virtualization/GridVirtualScroller.js +3 -1
  58. package/modern/constants/gridClasses.js +1 -1
  59. package/modern/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
  60. package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +10 -3
  61. package/modern/hooks/features/columns/gridColumnsUtils.js +0 -1
  62. package/modern/hooks/features/filter/gridFilterUtils.js +4 -4
  63. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +8 -2
  64. package/modern/index.js +1 -1
  65. package/modern/locales/arSD.js +26 -28
  66. package/modern/locales/roRO.js +1 -1
  67. package/node/DataGrid/DataGrid.js +10 -3
  68. package/node/DataGrid/useDataGridProps.js +2 -2
  69. package/node/colDef/gridCheckboxSelectionColDef.js +2 -2
  70. package/node/colDef/gridDateColDef.js +0 -4
  71. package/node/components/DataGridVirtualScroller.js +2 -2
  72. package/node/components/GridApiContext.js +2 -2
  73. package/node/components/GridColumnHeaders.js +2 -2
  74. package/node/components/GridFooter.js +2 -2
  75. package/node/components/GridHeader.js +2 -2
  76. package/node/components/GridLoadingOverlay.js +2 -2
  77. package/node/components/GridNoResultsOverlay.js +2 -2
  78. package/node/components/GridNoRowsOverlay.js +2 -2
  79. package/node/components/GridPagination.js +2 -2
  80. package/node/components/GridRow.js +9 -5
  81. package/node/components/GridRowCount.js +2 -2
  82. package/node/components/GridSelectedRowCount.js +2 -2
  83. package/node/components/base/GridBody.js +2 -2
  84. package/node/components/base/GridFooterPlaceholder.js +2 -2
  85. package/node/components/base/GridOverlays.js +2 -2
  86. package/node/components/cell/GridActionsCell.js +2 -2
  87. package/node/components/cell/GridActionsCellItem.js +2 -2
  88. package/node/components/cell/GridBooleanCell.js +2 -2
  89. package/node/components/cell/GridCell.js +8 -4
  90. package/node/components/cell/GridEditBooleanCell.js +2 -2
  91. package/node/components/cell/GridEditDateCell.js +2 -2
  92. package/node/components/cell/GridEditInputCell.js +2 -2
  93. package/node/components/cell/GridEditSingleSelectCell.js +2 -2
  94. package/node/components/cell/GridSkeletonCell.js +2 -2
  95. package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -2
  96. package/node/components/columnHeaders/GridBaseColumnHeaders.js +2 -2
  97. package/node/components/columnHeaders/GridColumnGroupHeader.js +2 -2
  98. package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +2 -2
  99. package/node/components/columnHeaders/GridColumnHeaderItem.js +2 -2
  100. package/node/components/columnHeaders/GridColumnHeaderSeparator.js +2 -2
  101. package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +2 -2
  102. package/node/components/columnHeaders/GridColumnHeaderTitle.js +2 -2
  103. package/node/components/columnHeaders/GridColumnHeadersInner.js +2 -2
  104. package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +2 -2
  105. package/node/components/columnHeaders/GridIconButtonContainer.js +2 -2
  106. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
  107. package/node/components/columnSelection/GridHeaderCheckbox.js +2 -2
  108. package/node/components/containers/GridFooterContainer.js +2 -2
  109. package/node/components/containers/GridMainContainer.js +2 -2
  110. package/node/components/containers/GridOverlay.js +2 -2
  111. package/node/components/containers/GridRoot.js +2 -2
  112. package/node/components/containers/GridRootStyles.js +3 -0
  113. package/node/components/containers/GridToolbarContainer.js +2 -2
  114. package/node/components/menu/GridMenu.js +2 -2
  115. package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -2
  116. package/node/components/menu/columnMenu/GridColumnMenu.js +2 -2
  117. package/node/components/menu/columnMenu/GridColumnMenuContainer.js +2 -2
  118. package/node/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +2 -2
  119. package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +2 -2
  120. package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +2 -2
  121. package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +2 -2
  122. package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +2 -2
  123. package/node/components/panel/GridColumnsPanel.js +2 -2
  124. package/node/components/panel/GridPanel.js +2 -2
  125. package/node/components/panel/GridPanelContent.js +2 -2
  126. package/node/components/panel/GridPanelFooter.js +2 -2
  127. package/node/components/panel/GridPanelHeader.js +2 -2
  128. package/node/components/panel/GridPanelWrapper.js +2 -2
  129. package/node/components/panel/GridPreferencesPanel.js +2 -2
  130. package/node/components/panel/filterPanel/GridFilterForm.js +11 -3
  131. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +2 -2
  132. package/node/components/panel/filterPanel/GridFilterInputDate.js +2 -2
  133. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +2 -2
  134. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
  135. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -2
  136. package/node/components/panel/filterPanel/GridFilterInputValue.js +2 -2
  137. package/node/components/panel/filterPanel/GridFilterPanel.js +11 -3
  138. package/node/components/toolbar/GridToolbar.js +2 -2
  139. package/node/components/toolbar/GridToolbarColumnsButton.js +2 -2
  140. package/node/components/toolbar/GridToolbarDensitySelector.js +2 -2
  141. package/node/components/toolbar/GridToolbarExport.js +2 -2
  142. package/node/components/toolbar/GridToolbarExportContainer.js +2 -2
  143. package/node/components/toolbar/GridToolbarFilterButton.js +2 -2
  144. package/node/components/toolbar/GridToolbarQuickFilter.js +12 -3
  145. package/node/components/virtualization/GridVirtualScroller.js +5 -3
  146. package/node/components/virtualization/GridVirtualScrollerContent.js +2 -2
  147. package/node/components/virtualization/GridVirtualScrollerRenderZone.js +2 -2
  148. package/node/constants/gridClasses.js +1 -1
  149. package/node/context/GridContextProvider.js +2 -2
  150. package/node/context/GridRootPropsContext.js +2 -2
  151. package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +2 -2
  152. package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +2 -2
  153. package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +2 -2
  154. package/node/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +2 -2
  155. package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -2
  156. package/node/hooks/core/useGridApiInitialization.js +2 -2
  157. package/node/hooks/core/useGridLocaleText.js +2 -2
  158. package/node/hooks/core/useGridLoggerFactory.js +2 -2
  159. package/node/hooks/core/useGridStateInitialization.js +2 -2
  160. package/node/hooks/features/clipboard/useGridClipboard.js +2 -2
  161. package/node/hooks/features/columnGrouping/gridColumnGroupsUtils.js +13 -2
  162. package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +12 -5
  163. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
  164. package/node/hooks/features/columnMenu/useGridColumnMenu.js +2 -2
  165. package/node/hooks/features/columnMenu/useGridColumnMenuSlots.js +2 -2
  166. package/node/hooks/features/columns/gridColumnsUtils.js +0 -1
  167. package/node/hooks/features/columns/useGridColumnSpanning.js +2 -2
  168. package/node/hooks/features/columns/useGridColumns.js +2 -2
  169. package/node/hooks/features/density/useGridDensity.js +2 -2
  170. package/node/hooks/features/dimensions/useGridDimensions.js +2 -2
  171. package/node/hooks/features/editing/useGridCellEditing.js +2 -2
  172. package/node/hooks/features/editing/useGridEditing.js +2 -2
  173. package/node/hooks/features/editing/useGridRowEditing.js +2 -2
  174. package/node/hooks/features/export/useGridCsvExport.js +2 -2
  175. package/node/hooks/features/export/useGridPrintExport.js +2 -2
  176. package/node/hooks/features/filter/gridFilterUtils.js +4 -4
  177. package/node/hooks/features/filter/useGridFilter.js +2 -2
  178. package/node/hooks/features/focus/useGridFocus.js +2 -2
  179. package/node/hooks/features/headerFiltering/useGridHeaderFiltering.js +2 -2
  180. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -2
  181. package/node/hooks/features/pagination/useGridPagination.js +2 -2
  182. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +2 -2
  183. package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -2
  184. package/node/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +2 -2
  185. package/node/hooks/features/rows/useGridParamsApi.js +2 -2
  186. package/node/hooks/features/rows/useGridRows.js +2 -2
  187. package/node/hooks/features/rows/useGridRowsMeta.js +2 -2
  188. package/node/hooks/features/scroll/useGridScroll.js +2 -2
  189. package/node/hooks/features/sorting/useGridSorting.js +2 -2
  190. package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  191. package/node/hooks/features/virtualization/useGridVirtualScroller.js +10 -4
  192. package/node/hooks/features/virtualization/useGridVirtualization.js +2 -2
  193. package/node/hooks/utils/useFirstRender.js +2 -2
  194. package/node/hooks/utils/useGridApiContext.js +2 -2
  195. package/node/hooks/utils/useGridApiEventHandler.js +2 -2
  196. package/node/hooks/utils/useGridApiMethod.js +2 -2
  197. package/node/hooks/utils/useGridApiRef.js +2 -2
  198. package/node/hooks/utils/useGridInitializeState.js +2 -2
  199. package/node/hooks/utils/useGridLogger.js +2 -2
  200. package/node/hooks/utils/useGridNativeEventListener.js +2 -2
  201. package/node/hooks/utils/useGridPrivateApiContext.js +2 -2
  202. package/node/hooks/utils/useGridRootProps.js +2 -2
  203. package/node/hooks/utils/useGridSelector.js +2 -2
  204. package/node/hooks/utils/useGridVisibleRows.js +2 -2
  205. package/node/hooks/utils/useLazyRef.js +2 -2
  206. package/node/hooks/utils/useOnMount.js +2 -2
  207. package/node/index.js +1 -1
  208. package/node/internals/utils/useProps.js +2 -2
  209. package/node/joy/icons.js +2 -2
  210. package/node/joy/joySlots.js +2 -2
  211. package/node/locales/arSD.js +26 -28
  212. package/node/locales/roRO.js +1 -1
  213. package/node/material/components/MUISelectOption.js +2 -2
  214. package/node/material/icons/GridColumnUnsortedIcon.js +2 -2
  215. package/node/material/icons/index.js +2 -2
  216. package/node/utils/fastMemo.js +2 -2
  217. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,175 @@
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
+ ## 6.16.3
7
+
8
+ _Oct 20, 2023_
9
+
10
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🎁 Add a Data Grid recipe for saving & restoring state
13
+ - 💫 Support animations on the bar chart
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ ### Data Grid
18
+
19
+ #### `@mui/x-data-grid@6.16.3`
20
+
21
+ - [DataGrid] Allow passing readonly arrays to `columns` and `sortingOrder` props (#10686) @pcorpet
22
+
23
+ #### `@mui/x-data-grid-pro@6.16.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
24
+
25
+ Same changes as in `@mui/x-data-grid@6.16.3`.
26
+
27
+ #### `@mui/x-data-grid-premium@6.16.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
28
+
29
+ Same changes as in `@mui/x-data-grid-pro@6.16.3`.
30
+
31
+ ### Date Pickers
32
+
33
+ #### `@mui/x-date-pickers@6.16.3`
34
+
35
+ - [fields] Correctly respect leading zeroes on seconds section (#10713) @flaviendelangle
36
+ - [fields] Use `onChange` instead of `onKeyPress` for Backspace editing (#10494) @flaviendelangle
37
+ - [pickers] Add reference links to DatePicker components (#10626) @michelengelen
38
+ - [pickers] Add reference links to clock components (#10645) @michelengelen
39
+ - [pickers] Add reference links to misc picker components (#10647) @michelengelen
40
+ - [pickers] Add reference links to toolbar components (#10646) @michelengelen
41
+ - [pickers] POC: Change the props received by the `FakeTextField` component (#10687) @flaviendelangle
42
+
43
+ #### `@mui/x-date-pickers-pro@6.16.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
44
+
45
+ Same changes as in `@mui/x-date-pickers@6.16.3`, plus:
46
+
47
+ - [DateRangePicker] Fix touch based range dragging (#10664) @michelengelen
48
+
49
+ ### Charts / `@mui/x-charts@6.0.0-alpha.16`
50
+
51
+ - [charts] Add reference links to area + bar chart components (#10652) @michelengelen
52
+ - [charts] Add reference links to line chart + sparkline components (#10650) @michelengelen
53
+ - [charts] Add reference links to pie + scatter chart components (#10653) @michelengelen
54
+ - [charts] Render only when `width` and `height` are resolved (#10714) @alexfauquette
55
+ - [charts] Support animation on `BarChart` (#9926) @alexfauquette
56
+ - [charts] Use new text component to avoid tick label overflow on x-axis (#10648) @alexfauquette
57
+
58
+ ### Docs
59
+
60
+ - [docs] Add a recipe for saving and restoring `state` externally (#10722) @michelengelen
61
+ - [docs] Add example about how to add an axis (#10709) @alexfauquette
62
+ - [docs] Customization Playground - fix DesktopDatePicker sx props and styled examples (#10665) @noraleonte
63
+ - [docs] Improve meta description @oliviertassinari
64
+ - [docs] Make overview demo work in codesandbox (#10661) @alexfauquette
65
+
66
+ ### Core
67
+
68
+ - [core] Update React renovate group with `@types` (#10723) @LukasTy
69
+ - [core] Update `styled-components` (#10733) @LukasTy
70
+
71
+ ## 6.16.2
72
+
73
+ _Oct 12, 2023_
74
+
75
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
76
+
77
+ - 📊 Chart's legend text management has been reworked and contains breaking changes (#10138) @alexfauquette
78
+ - 📝 Add [Bulk editing](https://mui.com/x/react-data-grid/recipes-editing/#bulk-editing) demo (#10333) @cherniavskii
79
+ - 🚀 Column grouping now works smoothly with column pinning (#10518) @MBilalShafi
80
+ - 🌍 Improve Arabic (ar-SD) and Spanish (es-ES) locales
81
+ - 🐞 Bugfixes
82
+ - 📚 Documentation improvements
83
+
84
+ ### Data Grid
85
+
86
+ #### `@mui/x-data-grid@6.16.2`
87
+
88
+ - [DataGrid] Fix `LazyLoading` demo crash (#10621) @MBilalShafi
89
+ - [DataGrid] Fix cells overlapping the scrollbar in iOS Safari (#10633) @cherniavskii
90
+ - [DataGrid] Fix `getRowId is not defined` error (#10613) @romgrk
91
+ - [DataGrid] Get quick filter to work OOTB with `date` and `dateTime` fields (#10636) @MBilalShafi
92
+ - [DataGrid] Make cursor for selectable cells to be `default` unless editable (#9997) @gitstart
93
+ - [DataGrid] Remove unnecessary syntax in JSDoc (#10567) @Lev-Shapiro
94
+ - [DataGrid] Update row hover behavior to match native hover (#10623) @cherniavskii
95
+ - [l10n] Improve Arabic (ar-SD) locale (#10625) @alabenyahia
96
+
97
+ #### `@mui/x-data-grid-pro@6.16.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
98
+
99
+ Same changes as in `@mui/x-data-grid@6.16.2`, plus:
100
+
101
+ - [DataGridPro] Improve column grouping and column pinning friendship (#10518) @MBilalShafi
102
+
103
+ #### `@mui/x-data-grid-premium@6.16.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
104
+
105
+ Same changes as in `@mui/x-data-grid-pro@6.16.2`.
106
+
107
+ ### Date Pickers
108
+
109
+ #### `@mui/x-date-pickers@6.16.2`
110
+
111
+ - [DateTimePicker] Add support for `DigitalClock` view renderer (#10624) @LukasTy
112
+ - [fields] Bootstrap the multi-HTML input component (#10638) @flaviendelangle
113
+ - [pickers] Fix timezone `UTC` false positive (#10586) @alexfauquette
114
+ - [l10n] Improve Spanish (es-ES) locale (#10588) @eduardodallmann
115
+
116
+ #### `@mui/x-date-pickers-pro@6.16.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
117
+
118
+ Same changes as in `@mui/x-date-pickers@6.16.2`.
119
+
120
+ ### Charts / `@mui/x-charts@6.0.0-alpha.15`
121
+
122
+ #### Breaking changes
123
+
124
+ The charts have a new text display mechanism.
125
+ It adds line break support and avoids overlapping text in the legend.
126
+ This comes with some breaking changes.
127
+
128
+ - The DOM structure is modified. An intermediary `<tspan />` element has been added. This can impact how your style is applied.
129
+ ```diff
130
+ - <text>The label</text>
131
+ + <text><tspan>The label</tspan></text>
132
+ ```
133
+
134
+ - The top margin has been reduced from 100 to 50 to benefit from the denser legend.
135
+
136
+ - To accurately compute the text size and then place it, styling should be provided as a JS object. For example, to set the legend font size, you should do:
137
+ ```jsx
138
+ <PieChart
139
+ {/** ... */}
140
+ slotProps={{
141
+ legend: {
142
+ labelStyle: {
143
+ fontSize: 16,
144
+ },
145
+ },
146
+ }}
147
+ />
148
+ ```
149
+ Support for other text elements (axis labels and tick labels) will be implemented in follow-up PR.
150
+
151
+ #### Changes
152
+
153
+ - [charts] Fix typo between internal/external variable (#10640) @alexfauquette
154
+ - [charts] Improve the management of the text (#10138) @alexfauquette
155
+
156
+ ### Docs
157
+
158
+ - [docs] Add bulk editing demo (#10333) @cherniavskii
159
+ - [docs] Add reference links to DateRangePicker components (#10629) @michelengelen
160
+ - [docs] Add reference links to DateTimePicker components (#10628) @michelengelen
161
+ - [docs] Add reference links to picker field components (#10631) @michelengelen
162
+ - [docs] Added reference links to TimePicker components (#10627) @michelengelen
163
+ - [docs] Avoid Pickers playground error due to empty views (#10654) @LukasTy
164
+ - [docs] Fix DataGrid[Pro/Premium] reference links (#10620) @michelengelen
165
+
166
+ ### Core
167
+
168
+ - [core] Bump monorepo (#10619) @alexfauquette
169
+ - [core] Update `no-response` workflow (#10491) @MBilalShafi
170
+ - [core] Update the issue templates to reflect the new support workflow (#10651) @MBilalShafi
171
+ - [test] Fix `testEval` not invoking test assertions (#10587) @cherniavskii
172
+ - [test] Fix dev mode warning (#10610) @oliviertassinari
173
+ - [test] Set UUID chance seed in visual tests (#10609) @oliviertassinari
174
+
6
175
  ## 6.16.1
7
176
 
8
177
  _Oct 6, 2023_
@@ -5,6 +5,13 @@ interface DataGridComponent {
5
5
  <R extends GridValidRowModel = any>(props: DataGridProps<R> & React.RefAttributes<HTMLDivElement>): React.JSX.Element;
6
6
  propTypes?: any;
7
7
  }
8
+ /**
9
+ * Demos:
10
+ * - [DataGrid](https://mui.com/x/react-data-grid/demo/)
11
+ *
12
+ * API:
13
+ * - [DataGrid API](https://mui.com/x/api/data-grid/data-grid/)
14
+ */
8
15
  export declare const DataGrid: DataGridComponent;
9
16
  /**
10
17
  * Remove at v7
@@ -27,6 +27,13 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
27
27
  }))
28
28
  });
29
29
  });
30
+ /**
31
+ * Demos:
32
+ * - [DataGrid](https://mui.com/x/react-data-grid/demo/)
33
+ *
34
+ * API:
35
+ * - [DataGrid API](https://mui.com/x/api/data-grid/data-grid/)
36
+ */
30
37
  export const DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
31
38
 
32
39
  /**
@@ -660,7 +667,7 @@ DataGridRaw.propTypes = {
660
667
  /**
661
668
  * If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
662
669
  * If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
663
- * @default: false
670
+ * @default false
664
671
  */
665
672
  unstable_ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
666
673
  clipboardExport: PropTypes.bool,
@@ -51,8 +51,6 @@ export const GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
51
51
  valueFormatter: gridDateFormatter,
52
52
  filterOperators: getGridDateOperators(),
53
53
  renderEditCell: renderEditDateCell,
54
- getApplyQuickFilterFn: undefined,
55
- getApplyQuickFilterFnV7: undefined,
56
54
  // @ts-ignore
57
55
  pastedValueParser: value => new Date(value)
58
56
  });
@@ -62,8 +60,6 @@ export const GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
62
60
  valueFormatter: gridDateTimeFormatter,
63
61
  filterOperators: getGridDateOperators(true),
64
62
  renderEditCell: renderEditDateCell,
65
- getApplyQuickFilterFn: undefined,
66
- getApplyQuickFilterFnV7: undefined,
67
63
  // @ts-ignore
68
64
  pastedValueParser: value => new Date(value)
69
65
  });
@@ -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", "hovered", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
3
+ const _excluded = ["selected", "hovered", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "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';
@@ -76,7 +76,9 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
76
76
  onClick,
77
77
  onDoubleClick,
78
78
  onMouseEnter,
79
- onMouseLeave
79
+ onMouseLeave,
80
+ onMouseOut,
81
+ onMouseOver
80
82
  } = props,
81
83
  other = _objectWithoutPropertiesLoose(props, _excluded);
82
84
  const apiRef = useGridApiContext();
@@ -323,7 +325,9 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
323
325
  onClick: publishClick,
324
326
  onDoubleClick: publish('rowDoubleClick', onDoubleClick),
325
327
  onMouseEnter: publish('rowMouseEnter', onMouseEnter),
326
- onMouseLeave: publish('rowMouseLeave', onMouseLeave)
328
+ onMouseLeave: publish('rowMouseLeave', onMouseLeave),
329
+ onMouseOut: publish('rowMouseOut', onMouseOut),
330
+ onMouseOver: publish('rowMouseOver', onMouseOver)
327
331
  } : null;
328
332
  return /*#__PURE__*/_jsxs("div", _extends({
329
333
  ref: handleRef,
@@ -48,10 +48,11 @@ const useUtilityClasses = ownerState => {
48
48
  showRightBorder,
49
49
  isEditable,
50
50
  isSelected,
51
+ isSelectionMode,
51
52
  classes
52
53
  } = ownerState;
53
54
  const slots = {
54
- root: ['cell', `cell--text${capitalize(align)}`, isEditable && 'cell--editable', isSelected && 'selected', showRightBorder && 'cell--withRightBorder', 'withBorderColor'],
55
+ root: ['cell', `cell--text${capitalize(align)}`, isEditable && 'cell--editable', isSelected && 'selected', showRightBorder && 'cell--withRightBorder', isSelectionMode && !isEditable && 'cell--selectionMode', 'withBorderColor'],
55
56
  content: ['cellContent']
56
57
  };
57
58
  return composeClasses(slots, getDataGridUtilityClass, classes);
@@ -385,7 +386,7 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
385
386
  } : void 0;
386
387
  export { MemoizedCellWrapper as GridCellWrapper, GridCell };
387
388
  const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
388
- var _rootProps$experiment3, _rootProps$experiment4;
389
+ var _rootProps$unstable_c, _rootProps$experiment3, _rootProps$experiment4;
389
390
  const {
390
391
  column,
391
392
  rowId,
@@ -460,12 +461,15 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
460
461
  const cellRef = React.useRef(null);
461
462
  const handleRef = useForkRef(ref, cellRef);
462
463
  const focusElementRef = React.useRef(null);
464
+ // @ts-expect-error To access `unstable_cellSelection` flag as it's a `premium` feature
465
+ const isSelectionMode = (_rootProps$unstable_c = rootProps.unstable_cellSelection) != null ? _rootProps$unstable_c : false;
463
466
  const ownerState = {
464
467
  align,
465
468
  showRightBorder,
466
469
  isEditable,
467
470
  classes: rootProps.classes,
468
- isSelected
471
+ isSelected,
472
+ isSelectionMode
469
473
  };
470
474
  const classes = useUtilityClasses(ownerState);
471
475
  const publishMouseUp = React.useCallback(eventName => event => {
@@ -3,7 +3,7 @@ import { GridSortDirection } from '../../models/gridSortModel';
3
3
  export interface GridColumnHeaderSortIconProps {
4
4
  direction: GridSortDirection;
5
5
  index: number | undefined;
6
- sortingOrder: GridSortDirection[];
6
+ sortingOrder: readonly GridSortDirection[];
7
7
  }
8
8
  declare function GridColumnHeaderSortIconRaw(props: GridColumnHeaderSortIconProps): React.JSX.Element | null;
9
9
  declare namespace GridColumnHeaderSortIconRaw {
@@ -395,6 +395,9 @@ export const GridRootStyles = styled('div', {
395
395
  overflow: 'hidden',
396
396
  textOverflow: 'ellipsis'
397
397
  },
398
+ [`& .${gridClasses.cell}.${gridClasses['cell--selectionMode']}`]: {
399
+ cursor: 'default'
400
+ },
398
401
  [`& .${gridClasses.cell}.${gridClasses['cell--editing']}`]: {
399
402
  padding: 1,
400
403
  display: 'flex',
@@ -95,4 +95,11 @@ export interface GridFilterFormProps {
95
95
  children?: React.ReactNode;
96
96
  }
97
97
  declare const GridFilterForm: React.ForwardRefExoticComponent<GridFilterFormProps & React.RefAttributes<HTMLDivElement>>;
98
+ /**
99
+ * Demos:
100
+ * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
101
+ *
102
+ * API:
103
+ * - [GridFilterForm API](https://mui.com/x/api/data-grid/grid-filter-form/)
104
+ */
98
105
  export { GridFilterForm };
@@ -431,4 +431,12 @@ process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
431
431
  */
432
432
  valueInputProps: PropTypes.any
433
433
  } : void 0;
434
+
435
+ /**
436
+ * Demos:
437
+ * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
438
+ *
439
+ * API:
440
+ * - [GridFilterForm API](https://mui.com/x/api/data-grid/grid-filter-form/)
441
+ */
434
442
  export { GridFilterForm };
@@ -39,4 +39,11 @@ export interface GridFilterPanelProps extends Pick<GridFilterFormProps, 'logicOp
39
39
  }
40
40
  declare const getGridFilter: (col: GridStateColDef) => GridFilterItem;
41
41
  declare const GridFilterPanel: React.ForwardRefExoticComponent<GridFilterPanelProps & React.RefAttributes<HTMLDivElement>>;
42
+ /**
43
+ * Demos:
44
+ * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
45
+ *
46
+ * API:
47
+ * - [GridFilterPanel API](https://mui.com/x/api/data-grid/grid-filter-panel/)
48
+ */
42
49
  export { GridFilterPanel, getGridFilter };
@@ -215,4 +215,12 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
215
215
  */
216
216
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
217
217
  } : void 0;
218
+
219
+ /**
220
+ * Demos:
221
+ * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
222
+ *
223
+ * API:
224
+ * - [GridFilterPanel API](https://mui.com/x/api/data-grid/grid-filter-panel/)
225
+ */
218
226
  export { GridFilterPanel, getGridFilter };
@@ -24,4 +24,12 @@ declare function GridToolbarQuickFilter(props: GridToolbarQuickFilterProps): Rea
24
24
  declare namespace GridToolbarQuickFilter {
25
25
  var propTypes: any;
26
26
  }
27
+ /**
28
+ * Demos:
29
+ * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
30
+ * - [Filtering - quick filter](https://mui.com/x/react-data-grid/filtering/quick-filter/)
31
+ *
32
+ * API:
33
+ * - [GridToolbarQuickFilter API](https://mui.com/x/api/data-grid/grid-toolbar-quick-filter/)
34
+ */
27
35
  export { GridToolbarQuickFilter };
@@ -133,4 +133,13 @@ process.env.NODE_ENV !== "production" ? GridToolbarQuickFilter.propTypes = {
133
133
  */
134
134
  quickFilterParser: PropTypes.func
135
135
  } : void 0;
136
+
137
+ /**
138
+ * Demos:
139
+ * - [Filtering - overview](https://mui.com/x/react-data-grid/filtering/)
140
+ * - [Filtering - quick filter](https://mui.com/x/react-data-grid/filtering/quick-filter/)
141
+ *
142
+ * API:
143
+ * - [GridToolbarQuickFilter API](https://mui.com/x/api/data-grid/grid-toolbar-quick-filter/)
144
+ */
136
145
  export { GridToolbarQuickFilter };
@@ -26,8 +26,10 @@ const VirtualScrollerRoot = styled('div', {
26
26
  position: 'relative',
27
27
  '@media print': {
28
28
  overflow: 'hidden'
29
- }
29
+ },
30
+ zIndex: 0 // See https://github.com/mui/mui-x/issues/10547
30
31
  });
32
+
31
33
  const GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualScroller(props, ref) {
32
34
  const rootProps = useGridRootProps();
33
35
  const classes = useUtilityClasses(rootProps);
@@ -75,6 +75,10 @@ export interface GridClasses {
75
75
  * Styles applied to the cell element if it is at the right edge of a cell selection range.
76
76
  */
77
77
  'cell--rangeRight': string;
78
+ /**
79
+ * Styles applied to the cell element if it is in a cell selection range.
80
+ */
81
+ 'cell--selectionMode': string;
78
82
  /**
79
83
  * Styles applied to the cell element.
80
84
  */
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
2
2
  export function getDataGridUtilityClass(slot) {
3
3
  return generateUtilityClass('MuiDataGrid', slot);
4
4
  }
5
- export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell', 'cellContent', 'cellCheckbox', 'cellSkeleton', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnGroupHeader', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeader--showColumnBorder', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorderColor', 'cell--withRightBorder', 'columnHeader--withRightBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
5
+ export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--withRenderer', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--selectionMode', 'cell', 'cellContent', 'cellCheckbox', 'cellSkeleton', 'checkboxInput', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderDropZone', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnGroupHeader', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeader--showColumnBorder', 'columnHeaders', 'columnHeadersInner', 'columnHeadersInner--scrollable', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsPanel', 'columnsPanelRow', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'pinnedColumns--left', 'pinnedColumns--right', 'pinnedColumnHeaders', 'pinnedColumnHeaders--left', 'pinnedColumnHeaders--right', 'withBorderColor', 'cell--withRightBorder', 'columnHeader--withRightBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
@@ -11,5 +11,8 @@ type UnwrappedGroupingModel = {
11
11
  * @returns An object `{[field]: groupIds}` where `groupIds` is the parents of the column `field`
12
12
  */
13
13
  export declare const unwrapGroupingColumnModel: (columnGroupingModel?: GridColumnGroupingModel) => UnwrappedGroupingModel;
14
- export declare const getColumnGroupsHeaderStructure: (orderedColumns: string[], unwrappedGroupingModel: UnwrappedGroupingModel) => GridGroupingStructure[][];
14
+ export declare const getColumnGroupsHeaderStructure: (orderedColumns: string[], unwrappedGroupingModel: UnwrappedGroupingModel, pinnedFields: {
15
+ right?: string[];
16
+ left?: string[];
17
+ }) => GridGroupingStructure[][];
15
18
  export {};
@@ -34,7 +34,7 @@ export const unwrapGroupingColumnModel = columnGroupingModel => {
34
34
  });
35
35
  return unwrappedSubTree;
36
36
  };
37
- export const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGroupingModel) => {
37
+ export const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGroupingModel, pinnedFields) => {
38
38
  const getParents = field => {
39
39
  var _unwrappedGroupingMod;
40
40
  return (_unwrappedGroupingMod = unwrappedGroupingModel[field]) != null ? _unwrappedGroupingMod : [];
@@ -42,6 +42,15 @@ export const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGrouping
42
42
  const groupingHeaderStructure = [];
43
43
  const maxDepth = Math.max(...orderedColumns.map(field => getParents(field).length));
44
44
  const haveSameParents = (field1, field2, depth) => isDeepEqual(getParents(field1).slice(0, depth + 1), getParents(field2).slice(0, depth + 1));
45
+ const haveDifferentContainers = (field1, field2) => {
46
+ if (pinnedFields != null && pinnedFields.left && pinnedFields.left.includes(field1) && !pinnedFields.left.includes(field2)) {
47
+ return true;
48
+ }
49
+ if (pinnedFields != null && pinnedFields.right && !pinnedFields.right.includes(field1) && pinnedFields.right.includes(field2)) {
50
+ return true;
51
+ }
52
+ return false;
53
+ };
45
54
  for (let depth = 0; depth < maxDepth; depth += 1) {
46
55
  const depthStructure = orderedColumns.reduce((structure, newField) => {
47
56
  var _getParents$depth;
@@ -55,7 +64,9 @@ export const getColumnGroupsHeaderStructure = (orderedColumns, unwrappedGrouping
55
64
  const lastGroup = structure[structure.length - 1];
56
65
  const prevField = lastGroup.columnFields[lastGroup.columnFields.length - 1];
57
66
  const prevGroupId = lastGroup.groupId;
58
- if (prevGroupId !== groupId || !haveSameParents(prevField, newField, depth)) {
67
+ if (prevGroupId !== groupId || !haveSameParents(prevField, newField, depth) ||
68
+ // Fix for https://github.com/mui/mui-x/issues/7041
69
+ haveDifferentContainers(prevField, newField)) {
59
70
  // It's a new group
60
71
  return [...structure, {
61
72
  columnFields: [newField],
@@ -39,7 +39,7 @@ const createGroupLookup = columnGroupingModel => {
39
39
  return _extends({}, groupLookup);
40
40
  };
41
41
  export const columnGroupsStateInitializer = (state, props, apiRef) => {
42
- var _props$experimentalFe, _props$columnGrouping, _props$columnGrouping2;
42
+ var _props$experimentalFe, _props$columnGrouping, _props$columnGrouping2, _apiRef$current$state;
43
43
  if (!((_props$experimentalFe = props.experimentalFeatures) != null && _props$experimentalFe.columnGrouping)) {
44
44
  return state;
45
45
  }
@@ -47,7 +47,8 @@ export const columnGroupsStateInitializer = (state, props, apiRef) => {
47
47
  const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);
48
48
  const groupLookup = createGroupLookup((_props$columnGrouping = props.columnGroupingModel) != null ? _props$columnGrouping : []);
49
49
  const unwrappedGroupingModel = unwrapGroupingColumnModel((_props$columnGrouping2 = props.columnGroupingModel) != null ? _props$columnGrouping2 : []);
50
- const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel);
50
+ const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel, // @ts-expect-error Move this part to `Pro` package
51
+ (_apiRef$current$state = apiRef.current.state.pinnedColumns) != null ? _apiRef$current$state : {});
51
52
  const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map(field => {
52
53
  var _unwrappedGroupingMod, _unwrappedGroupingMod2;
53
54
  return (_unwrappedGroupingMod = (_unwrappedGroupingMod2 = unwrappedGroupingModel[field]) == null ? void 0 : _unwrappedGroupingMod2.length) != null ? _unwrappedGroupingMod : 0;
@@ -89,9 +90,12 @@ export const useGridColumnGrouping = (apiRef, props) => {
89
90
  var _props$columnGrouping3;
90
91
  const unwrappedGroupingModel = unwrapGroupingColumnModel((_props$columnGrouping3 = props.columnGroupingModel) != null ? _props$columnGrouping3 : []);
91
92
  apiRef.current.setState(state => {
92
- var _state$columns$ordere, _state$columns;
93
+ var _state$columns$ordere, _state$columns, _state$pinnedColumns;
93
94
  const orderedFields = (_state$columns$ordere = (_state$columns = state.columns) == null ? void 0 : _state$columns.orderedFields) != null ? _state$columns$ordere : [];
94
- const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(orderedFields, unwrappedGroupingModel);
95
+
96
+ // @ts-expect-error Move this logic to `Pro` package
97
+ const pinnedColumns = (_state$pinnedColumns = state.pinnedColumns) != null ? _state$pinnedColumns : {};
98
+ const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(orderedFields, unwrappedGroupingModel, pinnedColumns);
95
99
  return _extends({}, state, {
96
100
  columnGrouping: _extends({}, state.columnGrouping, {
97
101
  headerStructure: columnGroupsHeaderStructure
@@ -100,15 +104,17 @@ export const useGridColumnGrouping = (apiRef, props) => {
100
104
  });
101
105
  }, [apiRef, props.columnGroupingModel]);
102
106
  const updateColumnGroupingState = React.useCallback(columnGroupingModel => {
103
- var _props$experimentalFe2;
107
+ var _props$experimentalFe2, _apiRef$current$getPi, _apiRef$current$getPi2, _apiRef$current;
104
108
  if (!((_props$experimentalFe2 = props.experimentalFeatures) != null && _props$experimentalFe2.columnGrouping)) {
105
109
  return;
106
110
  }
111
+ // @ts-expect-error Move this logic to `Pro` package
112
+ const pinnedColumns = (_apiRef$current$getPi = (_apiRef$current$getPi2 = (_apiRef$current = apiRef.current).getPinnedColumns) == null ? void 0 : _apiRef$current$getPi2.call(_apiRef$current)) != null ? _apiRef$current$getPi : {};
107
113
  const columnFields = gridColumnFieldsSelector(apiRef);
108
114
  const visibleColumnFields = gridVisibleColumnFieldsSelector(apiRef);
109
115
  const groupLookup = createGroupLookup(columnGroupingModel != null ? columnGroupingModel : []);
110
116
  const unwrappedGroupingModel = unwrapGroupingColumnModel(columnGroupingModel != null ? columnGroupingModel : []);
111
- const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel);
117
+ const columnGroupsHeaderStructure = getColumnGroupsHeaderStructure(columnFields, unwrappedGroupingModel, pinnedColumns);
112
118
  const maxDepth = visibleColumnFields.length === 0 ? 0 : Math.max(...visibleColumnFields.map(field => {
113
119
  var _unwrappedGroupingMod4, _unwrappedGroupingMod5;
114
120
  return (_unwrappedGroupingMod4 = (_unwrappedGroupingMod5 = unwrappedGroupingModel[field]) == null ? void 0 : _unwrappedGroupingMod5.length) != null ? _unwrappedGroupingMod4 : 0;
@@ -40,7 +40,7 @@ export declare const hydrateColumnsWidth: (rawState: GridColumnsRawState, viewpo
40
40
  */
41
41
  export declare const applyInitialState: (columnsState: GridColumnsRawState, initialState: GridColumnsInitialState | undefined) => GridColumnsRawState;
42
42
  export declare const createColumnsState: ({ apiRef, columnsToUpsert, initialState, columnTypes, columnVisibilityModel, keepOnlyColumnsToUpsert, }: {
43
- columnsToUpsert: GridColDef[];
43
+ columnsToUpsert: readonly GridColDef[];
44
44
  initialState: GridColumnsInitialState | undefined;
45
45
  columnTypes: GridColumnTypesRecord;
46
46
  columnVisibilityModel?: GridColumnVisibilityModel | undefined;
@@ -50,7 +50,6 @@ export function computeFlexColumnsWidth({
50
50
  for (let i = 0; i < flexColumns.length; i += 1) {
51
51
  const column = flexColumns[i];
52
52
  if (flexColumnsLookup.all[column.field] && flexColumnsLookup.all[column.field].frozen === true) {
53
- // eslint-disable-next-line no-continue
54
53
  continue;
55
54
  }
56
55
 
@@ -161,7 +161,7 @@ export const buildAggregatedFilterItemsApplier = (getRowId, filterModel, apiRef,
161
161
 
162
162
  // We generate a new function with `eval()` to avoid expensive patterns for JS engines
163
163
  // such as a dynamic object assignment, e.g. `{ [dynamicKey]: value }`.
164
- const filterItemTemplate = `(function filterItem$$(appliers, row, shouldApplyFilter) {
164
+ const filterItemTemplate = `(function filterItem$$(getRowId, appliers, row, shouldApplyFilter) {
165
165
  ${appliers.map((applier, i) => `const shouldApply${i} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(applier.item.field)});`).join('\n')}
166
166
 
167
167
  const result$$ = {
@@ -175,7 +175,7 @@ export const buildAggregatedFilterItemsApplier = (getRowId, filterModel, apiRef,
175
175
  })`;
176
176
  const filterItemCore = evalCode(filterItemTemplate.replaceAll('$$', String(filterItemsApplierId)));
177
177
  const filterItem = (row, shouldApplyItem) => {
178
- return filterItemCore(appliers, row, shouldApplyItem);
178
+ return filterItemCore(getRowId, appliers, row, shouldApplyItem);
179
179
  };
180
180
  filterItemsApplierId += 1;
181
181
  return filterItem;
@@ -225,7 +225,7 @@ export const buildAggregatedQuickFilterApplier = (getRowId, filterModel, apiRef)
225
225
  const result = {};
226
226
  const usedCellParams = {};
227
227
 
228
- /* eslint-disable no-restricted-syntax, no-labels, no-continue */
228
+ /* eslint-disable no-restricted-syntax, no-labels */
229
229
  outer: for (let v = 0; v < quickFilterValues.length; v += 1) {
230
230
  const filterValue = quickFilterValues[v];
231
231
  for (let i = 0; i < appliersPerField.length; i += 1) {
@@ -263,7 +263,7 @@ export const buildAggregatedQuickFilterApplier = (getRowId, filterModel, apiRef)
263
263
  }
264
264
  result[filterValue] = false;
265
265
  }
266
- /* eslint-enable no-restricted-syntax, no-labels, no-continue */
266
+ /* eslint-enable no-restricted-syntax, no-labels */
267
267
 
268
268
  return result;
269
269
  };
@@ -12,7 +12,7 @@ export declare const mergeStateWithSortModel: (sortModel: GridSortModel, disable
12
12
  * @returns {GridSortingModelApplier | null} A method that generates a list of sorted row ids from a list of rows according to the current sort model. If `null`, we consider that the rows should remain in the order there were provided.
13
13
  */
14
14
  export declare const buildAggregatedSortingApplier: (sortModel: GridSortModel, apiRef: React.MutableRefObject<GridApiCommunity>) => GridSortingModelApplier | null;
15
- export declare const getNextGridSortDirection: (sortingOrder: GridSortDirection[], current?: GridSortDirection) => GridSortDirection;
15
+ export declare const getNextGridSortDirection: (sortingOrder: readonly GridSortDirection[], current?: GridSortDirection) => GridSortDirection;
16
16
  export declare const gridStringOrNumberComparator: GridComparatorFn;
17
17
  export declare const gridNumberComparator: GridComparatorFn;
18
18
  export declare const gridDateComparator: GridComparatorFn;
@@ -350,11 +350,17 @@ export const useGridVirtualScroller = props => {
350
350
  }
351
351
  return -1;
352
352
  }, [cellFocus, currentPage.rows]);
353
- useGridApiEventHandler(apiRef, 'rowMouseEnter', params => {
353
+ useGridApiEventHandler(apiRef, 'rowMouseOver', (params, event) => {
354
354
  var _params$id;
355
+ if (event.currentTarget.contains(event.relatedTarget)) {
356
+ return;
357
+ }
355
358
  setHoveredRowId((_params$id = params.id) != null ? _params$id : null);
356
359
  });
357
- useGridApiEventHandler(apiRef, 'rowMouseLeave', () => {
360
+ useGridApiEventHandler(apiRef, 'rowMouseOut', (params, event) => {
361
+ if (event.currentTarget.contains(event.relatedTarget)) {
362
+ return;
363
+ }
358
364
  setHoveredRowId(null);
359
365
  });
360
366
  const getRows = (params = {