@mui/x-data-grid-pro 6.0.0-beta.4 → 6.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 (83) hide show
  1. package/CHANGELOG.md +204 -29
  2. package/DataGridPro/DataGridPro.js +16 -4
  3. package/DataGridPro/useDataGridProProps.js +26 -19
  4. package/components/DataGridProVirtualScroller.js +29 -22
  5. package/components/GridColumnHeaders.d.ts +9 -0
  6. package/components/{DataGridProColumnHeaders.js → GridColumnHeaders.js} +99 -16
  7. package/components/GridColumnMenuPinningItem.js +3 -3
  8. package/components/GridDetailPanel.js +4 -0
  9. package/components/GridDetailPanelToggleCell.js +4 -4
  10. package/components/GridRowReorderCell.js +1 -1
  11. package/components/GridTreeDataGroupingCell.js +4 -4
  12. package/components/index.d.ts +1 -1
  13. package/components/index.js +1 -1
  14. package/constants/dataGridProDefaultSlotsComponents.d.ts +1 -2
  15. package/constants/dataGridProDefaultSlotsComponents.js +5 -7
  16. package/hooks/features/columnPinning/useGridColumnPinning.d.ts +1 -1
  17. package/hooks/features/rowPinning/useGridRowPinning.d.ts +1 -1
  18. package/hooks/features/rowPinning/useGridRowPinning.js +2 -10
  19. package/index.d.ts +1 -0
  20. package/index.js +3 -2
  21. package/internals/index.d.ts +1 -1
  22. package/internals/index.js +1 -1
  23. package/legacy/DataGridPro/DataGridPro.js +16 -4
  24. package/legacy/DataGridPro/useDataGridProProps.js +21 -20
  25. package/legacy/components/DataGridProVirtualScroller.js +29 -22
  26. package/legacy/components/{DataGridProColumnHeaders.js → GridColumnHeaders.js} +101 -15
  27. package/legacy/components/GridColumnMenuPinningItem.js +3 -3
  28. package/legacy/components/GridDetailPanel.js +4 -0
  29. package/legacy/components/GridDetailPanelToggleCell.js +4 -4
  30. package/legacy/components/GridRowReorderCell.js +1 -1
  31. package/legacy/components/GridTreeDataGroupingCell.js +4 -4
  32. package/legacy/components/index.js +1 -1
  33. package/legacy/constants/dataGridProDefaultSlotsComponents.js +5 -7
  34. package/legacy/hooks/features/rowPinning/useGridRowPinning.js +2 -10
  35. package/legacy/index.js +3 -2
  36. package/legacy/internals/index.js +1 -1
  37. package/legacy/material/index.js +8 -0
  38. package/legacy/utils/releaseInfo.js +1 -1
  39. package/material/index.d.ts +6 -0
  40. package/material/index.js +8 -0
  41. package/material/package.json +6 -0
  42. package/models/dataGridProProps.d.ts +9 -8
  43. package/models/gridProSlotsComponent.d.ts +4 -1
  44. package/modern/DataGridPro/DataGridPro.js +16 -4
  45. package/modern/DataGridPro/useDataGridProProps.js +21 -17
  46. package/modern/components/DataGridProVirtualScroller.js +29 -22
  47. package/modern/components/{DataGridProColumnHeaders.js → GridColumnHeaders.js} +99 -16
  48. package/modern/components/GridColumnMenuPinningItem.js +3 -3
  49. package/modern/components/GridDetailPanel.js +4 -0
  50. package/modern/components/GridDetailPanelToggleCell.js +3 -3
  51. package/modern/components/GridRowReorderCell.js +1 -1
  52. package/modern/components/GridTreeDataGroupingCell.js +3 -3
  53. package/modern/components/index.js +1 -1
  54. package/modern/constants/dataGridProDefaultSlotsComponents.js +5 -7
  55. package/modern/hooks/features/rowPinning/useGridRowPinning.js +1 -7
  56. package/modern/index.js +3 -2
  57. package/modern/internals/index.js +1 -1
  58. package/modern/material/index.js +8 -0
  59. package/modern/utils/releaseInfo.js +1 -1
  60. package/node/DataGridPro/DataGridPro.js +15 -3
  61. package/node/DataGridPro/useDataGridProProps.js +21 -17
  62. package/node/components/DataGridProVirtualScroller.js +29 -22
  63. package/node/components/{DataGridProColumnHeaders.js → GridColumnHeaders.js} +96 -14
  64. package/node/components/GridColumnMenuPinningItem.js +3 -3
  65. package/node/components/GridDetailPanel.js +4 -0
  66. package/node/components/GridDetailPanelToggleCell.js +3 -3
  67. package/node/components/GridRowReorderCell.js +1 -1
  68. package/node/components/GridTreeDataGroupingCell.js +3 -3
  69. package/node/components/index.js +1 -1
  70. package/node/constants/dataGridProDefaultSlotsComponents.js +6 -9
  71. package/node/hooks/features/rowPinning/useGridRowPinning.js +1 -7
  72. package/node/index.js +11 -3
  73. package/node/internals/index.js +6 -6
  74. package/node/material/index.js +16 -0
  75. package/node/utils/releaseInfo.js +1 -1
  76. package/package.json +3 -3
  77. package/utils/releaseInfo.js +1 -1
  78. package/components/DataGridProColumnHeaders.d.ts +0 -6
  79. /package/legacy/{components → material}/icons.js +0 -0
  80. /package/{components → material}/icons.d.ts +0 -0
  81. /package/{components → material}/icons.js +0 -0
  82. /package/modern/{components → material}/icons.js +0 -0
  83. /package/node/{components → material}/icons.js +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,161 @@
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.0.0
7
+
8
+ _Mar 3, 2023_
9
+
10
+ We're happy to announce the first v6 stable release! 🎉🚀
11
+
12
+ This is now the officially supported major version, where we'll keep rolling out new features, bug fixes, and improvements.
13
+ Head over to the [what's new](https://mui.com/x/whats-new/) page to check the highlighted new features.
14
+
15
+ Migration guides are available with a complete list of the breaking changes:
16
+
17
+ - [Data Grid](https://mui.com/x/migration/migration-data-grid-v5/)
18
+ - [Date Pickers](https://mui.com/x/migration/migration-pickers-v5/)
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
+ - 🎁 The row pinning is no longer experimental (#8055) @MBilalShafi
23
+
24
+ You can now use the row pinning without the `experimentalFeatures.rowPinning` flag enabled.
25
+
26
+ ```diff
27
+ <DataGridPro
28
+ - experimentalFeatures={{ rowPinning: true }}
29
+ />
30
+ ```
31
+ - ⚡️ Improved grid performance by rows and cells memoization (#7846) @m4theushw
32
+ - ✨ Fields have a distinct visual state when empty (#8069) @LukasTy
33
+ - 🌍 Improve Czech (cs-CZ) locale (#8113) @BlastyCZ
34
+ - 🌍 Improve Arabic (ar-SD) locale (#8100) @atf98
35
+ - 📚 Documentation improvements
36
+ - 🐞 Bugfixes
37
+
38
+ ### `@mui/x-data-grid@v6.0.0` / `@mui/x-data-grid-pro@v6.0.0` / `@mui/x-data-grid-premium@v6.0.0`
39
+
40
+ #### Breaking changes
41
+
42
+ - The `componentsProps` and `slotProps` props are now typed for better DX
43
+ - The `cellFocus`, `cellTabIndex` and `editRowsState` props are not passed to the component used in the row slot. You can use the new `focusedCell` and `tabbableCell` props instead. For the editing state, use the API methods.
44
+ The flag `experimentalFeatures.rowPinning` is no longer needed.
45
+
46
+ #### Changes
47
+
48
+ - [DataGrid] Add typing for `componentsProps` (#7968) @MBilalShafi
49
+ - [DataGrid] Allow multiple modules' augmentation (#8098) @MBilalShafi
50
+ - [DataGrid] Extract `BaseInputLabel` slot (#8068) @cherniavskii
51
+ - [DataGrid] Extract `BaseSelectOption` slot (#8072) @cherniavskii
52
+ - [DataGrid] Make possible to memoize rows and cells (#7846) @m4theushw
53
+ - [DataGrid] Register `getLocaleText` synchronously (#8029) @m4theushw
54
+ - [DataGrid] Start extracting material slots to a separate directory (#8004) @cherniavskii
55
+ - [DataGrid] Use `styled` from system (#8032) @siriwatknp
56
+ - [DataGridPro] Improve typing for `getColumnForNewFilter` method (#8043) @MBilalShafi
57
+ - [DataGridPro] Remove row pinning from experimental features (#8055) @MBilalShafi
58
+ - [l10n] Improve Czech (cs-CZ) locale (#8113) @BlastyCZ
59
+ - [l10n] Improve Arabic (ar-SD) locale (#8100) @atf98
60
+
61
+ ### `@mui/x-date-pickers@v6.0.0` / `@mui/x-date-pickers-pro@v6.0.0`
62
+
63
+ #### Breaking changes
64
+
65
+ On desktop, `DateTimePicker` shows the am/pm controls in the toolbar instead of the clock by default.
66
+ It can be overridden by specifying `ampmInClock` prop.
67
+
68
+ #### Changes
69
+
70
+ - [DateRangePicker] Generalize the highlight between months (#8079) @alexfauquette
71
+ - [fields] Clean the order of the tokens in the `formatTokenMap` of each adapter (#8112) @flaviendelangle
72
+ - [fields] Implement empty visual state (#8069) @LukasTy
73
+ - [fields] Replace `sectionOrder` state with a memoized variable (#8090) @flaviendelangle
74
+ - [pickers] Add support for UTC on `moment` adapter (#8031) @flaviendelangle
75
+ - [pickers] Document and deprecate `onClose` callback on static pickers (#8021) @LukasTy
76
+ - [pickers] Fix am/pm buttons position and responsiveness (#5149) @alexfauquette
77
+ - [pickers] Fix layout `sx` propagation (#8064) @alexfauquette
78
+ - [pickers] Increase `moment` peer dependency minimum version (#8046) @oliviertassinari
79
+ - [pickers] Remove `WrapperVariantContext` (#8088) @LukasTy
80
+ - [pickers] Stop using `WrapperVariantContext` in `Clock` (#8083) @LukasTy
81
+
82
+ ### Docs
83
+
84
+ - [docs] Add `aggregation` experimental flag removal to the migration guide (#8056) @MBilalShafi
85
+ - [docs] Add expansion state behavioral change to v6 migration guide (#8108) @MBilalShafi
86
+ - [docs] Change default date from 4th of April to 17th of April for readability (#8089) @flaviendelangle
87
+ - [docs] Clarify the MIT license restriction for grid pagination (#8045) @arunkp
88
+ - [docs] Fix typo replacing "bellow" by "below" (#8080) @TheBox193
89
+ - [docs] Link `API object` in the `apiRef` sections (#8106) @MBilalShafi
90
+ - [docs] Link to demonstrations in the interfaces API docs (#8028) @cherniavskii
91
+ - [docs] Remove the `@next` tag from installation instructions (#8102) @cherniavskii
92
+ - [docs] Start enforcing consistency in documentation vocabulary (#6871) @alexfauquette
93
+ - [docs] Update accessibility guidelines (#7970) @oliviertassinari
94
+ - [docs] Update the DataGrid demo to leverage the latest features (#7863) @joserodolfofreitas
95
+ - [docs] Update migration guide for stable release (#8092) @joserodolfofreitas
96
+
97
+ ### Core
98
+
99
+ - [core] Add modified docs page links in the PR (#7848) @alexfauquette
100
+ - [core] Add test on value timezone (#7867) @alexfauquette
101
+ - [core] Bump monorepo (#8006) @LukasTy
102
+ - [core] Change default branch back to `master` (#8081) @m4theushw
103
+ - [core] Upgrade monorepo (#8115) @MBilalShafi
104
+ - [core] Mention the use of Support key as an alternative to the OrderID (#6968) @joserodolfofreitas
105
+ - [test] Fix flaky tests (#8097) @cherniavskii
106
+
107
+ ## 6.0.0-beta.5
108
+
109
+ _Feb 23, 2023_
110
+
111
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
112
+
113
+ - ⚡️ Add web worker support for Excel export (#7770) @m4theushw
114
+ - 🎁 Add a button to remove all filters on the data grid filter panel (#7326) @MBilalShafi
115
+ - ⚙️ Allow to customize options label and value in the data grid `singleSelect` column (#7684) @m4theushw
116
+ - 📚 Documentation improvements
117
+ - 🐞 Bugfixes
118
+
119
+ ### `@mui/x-data-grid@v6.0.0-beta.5` / `@mui/x-data-grid-pro@v6.0.0-beta.5` / `@mui/x-data-grid-premium@v6.0.0-beta.5`
120
+
121
+ #### Changes
122
+
123
+ - [DataGrid] Allow to customize label and value for `singleSelect` (#7684) @m4theushw
124
+ - [DataGrid] Fix `ownerState` being `undefined` in theme style overrides (#7964) @lolaignatova
125
+ - [DataGrid] Introduce `slots` and deprecate `components` (#7882) @MBilalShafi
126
+ - [DataGridPro] Add `Remove All` option in filter panel (#7326) @MBilalShafi
127
+ - [DataGridPremium] Add web worker support for Excel export (#7770) @m4theushw
128
+
129
+ ### `@mui/x-date-pickers@v6.0.0-beta.5` / `@mui/x-date-pickers-pro@v6.0.0-beta.5`
130
+
131
+ #### Breaking changes
132
+
133
+ - The `MuiDateSectionName` type was renamed to `FieldSectionType`
134
+
135
+ #### Changes
136
+
137
+ - [fields] Fix multi input range fields validation when uncontrolled (#8002) @LukasTy
138
+ - [fields] Fix single input time range fields slot props (#7988) @LukasTy
139
+ - [fields] Make the `ArrowUp` / `ArrowDown` edition only impact the active section (#7993) @flaviendelangle
140
+ - [fields] Fix single input range fields clearing (#7995) @flaviendelangle
141
+ - [fields] Clean the section object (#8009) @flaviendelangle
142
+ - [pickers] Fix `textField` slot `error` prop propagation (#7987) @LukasTy
143
+
144
+ ### `@mui/x-codemod@v6.0.0-beta.5`
145
+
146
+ #### Changes
147
+
148
+ - [codemod] Add `apiRef.current.getRowIndex` to `DataGrid` renaming codemod (#8001) @MBilalShafi
149
+
150
+ ### Docs
151
+
152
+ - [docs] Fine tune range fields demos (#7992) @LukasTy
153
+ - [docs] Fix a few scroll issues on mobile (#7900) @oliviertassinari
154
+ - [docs] Fix inconsistency in the data grid migration guide (#7963) @MBilalShafi
155
+
156
+ ### Core
157
+
158
+ - [core] Fix `moment` locale on adapter tests (#8020) @flaviendelangle
159
+ - [test] Support all adapters on the field tests about the formats (#7996) @flaviendelangle
160
+
6
161
  ## 6.0.0-beta.4
7
162
 
8
163
  _Feb 16, 2023_
@@ -236,17 +391,17 @@ We encourage you to try out this version, packed with improvements, bug fixes, a
236
391
 
237
392
  **Data Grid**
238
393
 
239
- - [Access to the API Object in the community version](https://next.mui.com/x/react-data-grid/api-object/)
240
- - [Improved column menu](https://next.mui.com/x/react-data-grid/column-menu/)
241
- - [Cell selection range](https://next.mui.com/x/react-data-grid/cell-selection/) (Premium)
394
+ - [Access to the API Object in the community version](https://mui.com/x/react-data-grid/api-object/)
395
+ - [Improved column menu](https://mui.com/x/react-data-grid/column-menu/)
396
+ - [Cell selection range](https://mui.com/x/react-data-grid/cell-selection/) (Premium)
242
397
 
243
398
  **Date and Time pickers**
244
399
 
245
- - [Fields: the new default input for pickers](https://next.mui.com/x/react-date-pickers/fields/).
246
- - [Improved layout customization](https://next.mui.com/x/react-date-pickers/custom-layout/)
247
- - [Edit date ranges with drag and drop](https://next.mui.com/x/react-date-pickers/date-range-calendar/) (Pro)
400
+ - [Fields: the new default input for pickers](https://mui.com/x/react-date-pickers/fields/).
401
+ - [Improved layout customization](https://mui.com/x/react-date-pickers/custom-layout/)
402
+ - [Edit date ranges with drag and drop](https://mui.com/x/react-date-pickers/date-range-calendar/) (Pro)
248
403
 
249
- You can check the migration guides for the [Data Grid](https://next.mui.com/x/migration/migration-data-grid-v5/) and [Date Pickers](https://next.mui.com/x/migration/migration-pickers-v5/) in the documentation.
404
+ You can check the migration guides for the [Data Grid](https://mui.com/x/migration/migration-data-grid-v5/) and [Date Pickers](https://mui.com/x/migration/migration-pickers-v5/) in the documentation.
250
405
 
251
406
  We'd like to offer a big thanks to the 10 contributors who made this release possible.
252
407
 
@@ -393,7 +548,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
393
548
  // Same for all the other pickers with an `Unstable_` prefix
394
549
  ```
395
550
 
396
- If you were still using the legacy picker (`DatePicker`, `DesktopDatePicker`, ...), please take a look at our [migration guide](https://next.mui.com/x/migration/migration-pickers-v5/#picker-components) for detailed explanations on how to start using the new ones.
551
+ If you were still using the legacy picker (`DatePicker`, `DesktopDatePicker`, ...), please take a look at our [migration guide](https://mui.com/x/migration/migration-pickers-v5/#picker-components) for detailed explanations on how to start using the new ones.
397
552
 
398
553
  - The fields components are no longer unstable
399
554
 
@@ -824,7 +979,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
824
979
  return <DataGrid apiRef={apiRef} {...other} />;
825
980
  ```
826
981
 
827
- See [the documentation](https://next.mui.com/x/react-data-grid/api-object/) for more information.
982
+ See [the documentation](https://mui.com/x/react-data-grid/api-object/) for more information.
828
983
 
829
984
  - 🎁 The `DataGridPremium` now supports cell selection:
830
985
 
@@ -832,7 +987,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
832
987
  <DataGridPremium unstable_cellSelection />
833
988
  ```
834
989
 
835
- See [the documentation](https://next.mui.com/x/react-data-grid/selection/#cell-selection) for more information
990
+ See [the documentation](https://mui.com/x/react-data-grid/selection/#cell-selection) for more information
836
991
 
837
992
  - 🌍 Support the Right To Left orientation on the fields components
838
993
  - 📚 Documentation improvements
@@ -1093,7 +1248,7 @@ _Nov 24, 2022_
1093
1248
 
1094
1249
  We'd like to offer a big thanks to the 14 contributors who made this release possible. Here are some highlights ✨:
1095
1250
 
1096
- - 🎁 Introduce the v6 pickers, built on top of the field components [DatePicker](https://next.mui.com/x/react-date-pickers/date-picker/), [TimePicker](https://next.mui.com/x/react-date-pickers/time-picker/), [DateTimePicker](https://next.mui.com/x/react-date-pickers/date-time-picker/), [DateRangePicker](https://next.mui.com/x/react-date-pickers/date-range-picker/).
1251
+ - 🎁 Introduce the v6 pickers, built on top of the field components [DatePicker](https://mui.com/x/react-date-pickers/date-picker/), [TimePicker](https://mui.com/x/react-date-pickers/time-picker/), [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/), [DateRangePicker](https://mui.com/x/react-date-pickers/date-range-picker/).
1097
1252
 
1098
1253
  The old (legacy) components will be removed at the end of the v6 beta.
1099
1254
 
@@ -1464,7 +1619,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
1464
1619
  The renamed props are the following:
1465
1620
 
1466
1621
  | Old name | New name |
1467
- | -------------------------- | ----------------------------- |
1622
+ | :------------------------- | :---------------------------- |
1468
1623
  | `selectionModel` | `rowSelectionModel` |
1469
1624
  | `onSelectionModelChange` | `onRowSelectionModelChange` |
1470
1625
  | `disableSelectionOnClick` | `disableRowSelectionOnClick` |
@@ -1583,20 +1738,20 @@ _Oct 13, 2022_
1583
1738
  We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
1584
1739
 
1585
1740
  - ⌚️ New components to edit date and time with <kbd>keyboard</kbd>—without using any modal or dropdown UI.
1586
- Please check out our [documentation](https://next.mui.com/x/react-date-pickers/fields/) to discover those new components.
1741
+ Please check out our [documentation](https://mui.com/x/react-date-pickers/fields/) to discover those new components.
1587
1742
 
1588
- - [`DateField`](https://next.mui.com/x/react-date-pickers/date-field/) to edit date
1589
- - [`TimeField`](https://next.mui.com/x/react-date-pickers/time-field/) to edit time
1590
- - [`DateTimeField`](https://next.mui.com/x/react-date-pickers/date-time-field/) to edit date and time
1591
- - [`MultiInputDateRangeField` / `SingleInputDateRangeField`](https://next.mui.com/x/react-date-pickers/date-range-field/) to edit date range
1592
- - [`MultiInputTimeRangeField`](https://next.mui.com/x/react-date-pickers/time-range-field/) to edit time range with two inputs
1593
- - [`MultiInputDateTimeRangeField`](https://next.mui.com/x/react-date-pickers/date-time-range-field/) to edit date and time range with two inputs
1743
+ - [`DateField`](https://mui.com/x/react-date-pickers/date-field/) to edit date
1744
+ - [`TimeField`](https://mui.com/x/react-date-pickers/time-field/) to edit time
1745
+ - [`DateTimeField`](https://mui.com/x/react-date-pickers/date-time-field/) to edit date and time
1746
+ - [`MultiInputDateRangeField` / `SingleInputDateRangeField`](https://mui.com/x/react-date-pickers/date-range-field/) to edit date range
1747
+ - [`MultiInputTimeRangeField`](https://mui.com/x/react-date-pickers/time-range-field/) to edit time range with two inputs
1748
+ - [`MultiInputDateTimeRangeField`](https://mui.com/x/react-date-pickers/date-time-range-field/) to edit date and time range with two inputs
1594
1749
 
1595
1750
  ⚠️ These components are unstable.
1596
1751
  They might receive breaking changes on their props to have the best components possible by the time of the stable release.
1597
1752
 
1598
1753
  - 📝 Allow to limit to one filter per column for `DataGridPro` and `DataGridPremium` (#6333) @MBilalShafi
1599
- - 📚 New [page describing the validation props on each picker](https://next.mui.com/x/react-date-pickers/validation/) (#6064) @flaviendelangle
1754
+ - 📚 New [page describing the validation props on each picker](https://mui.com/x/react-date-pickers/validation/) (#6064) @flaviendelangle
1600
1755
  - 📚 Documentation improvements
1601
1756
  - 🐞 Bugfixes
1602
1757
 
@@ -1617,14 +1772,14 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
1617
1772
  For users that didn't migrate to the new editing API in v5, additional work may be needed because the new API is not equivalent to the legacy API. Although, some migration steps are available to help in this task.
1618
1773
 
1619
1774
  - The `editCellPropsChange` event was removed. If you still need it please file a new issue so we can propose an alternative.
1620
- - The `cellEditCommit` event was removed and the `processRowUpdate` prop can be used in place. More information, check the [docs](https://next.mui.com/x/react-data-grid/editing/#persistence) section about the topic.
1621
- - The `editRowsModel` and `onEditRowsModelChange` props were removed. The [`cellModesModel`](https://next.mui.com/x/react-data-grid/editing/#controlled-mode) or [`rowModesModel`](https://next.mui.com/x/react-data-grid/editing/#controlled-mode) props can be used to achieve the same goal.
1775
+ - The `cellEditCommit` event was removed and the `processRowUpdate` prop can be used in place. More information, check the [docs](https://mui.com/x/react-data-grid/editing/#persistence) section about the topic.
1776
+ - The `editRowsModel` and `onEditRowsModelChange` props were removed. The [`cellModesModel`](https://mui.com/x/react-data-grid/editing/#controlled-mode) or [`rowModesModel`](https://mui.com/x/react-data-grid/editing/#controlled-mode) props can be used to achieve the same goal.
1622
1777
  - The following API methods were removed:
1623
1778
  - Use `apiRef.current.stopCellEditMode` to replace `apiRef.current.commitCellChange`
1624
1779
  - Use `apiRef.current.startCellEditMode` to replace `apiRef.current.setCellMode(id, field, 'edit')`
1625
1780
  - Use `apiRef.current.stopRowEditMode` to replace `apiRef.current.commitRowChange`
1626
1781
  - Use `apiRef.current.startRowMode` to replace `apiRef.current.setRowMode(id, 'edit')`
1627
- - Use the [`cellModesModel`](https://next.mui.com/x/react-data-grid/editing/#controlled-mode) or [`rowModesModel`](https://next.mui.com/x/react-data-grid/editing/#controlled-mode) props to replace `apiRef.current.setEditRowsModel`
1782
+ - Use the [`cellModesModel`](https://mui.com/x/react-data-grid/editing/#controlled-mode) or [`rowModesModel`](https://mui.com/x/react-data-grid/editing/#controlled-mode) props to replace `apiRef.current.setEditRowsModel`
1628
1783
 
1629
1784
  #### Changes
1630
1785
 
@@ -2025,7 +2180,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
2025
2180
  />
2026
2181
  ```
2027
2182
 
2028
- You can find more information about this new API on our [documentation](https://next.mui.com/x/react-data-grid/column-visibility/).
2183
+ You can find more information about this new API on our [documentation](https://mui.com/x/react-data-grid/column-visibility/).
2029
2184
 
2030
2185
  - The `GridEvents` enum is now a TypeScript type.
2031
2186
 
@@ -2051,7 +2206,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
2051
2206
  You can now use the `localText` prop available on all picker components:
2052
2207
 
2053
2208
  | Removed prop | Property in the new `localText` prop |
2054
- | ---------------------------- | --------------------------------------------------------------------------------- |
2209
+ | :--------------------------- | :-------------------------------------------------------------------------------- |
2055
2210
  | `endText` | `end` |
2056
2211
  | `getClockLabelText` | `clockLabelText` |
2057
2212
  | `getHoursClockNumberText` | `hoursClockNumberText` |
@@ -2075,7 +2230,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
2075
2230
  />
2076
2231
  ```
2077
2232
 
2078
- You can find more information about the new api, including how to set those translations on all your components at once in the [documentation](https://next.mui.com/x/react-date-pickers/localization/)
2233
+ You can find more information about the new api, including how to set those translations on all your components at once in the [documentation](https://mui.com/x/react-date-pickers/localization/)
2079
2234
 
2080
2235
  - The deprecated `locale` prop of the `LocalizationProvider` component have been renamed `adapterLocale`:
2081
2236
 
@@ -2179,6 +2334,26 @@ You can find more information about the new api, including how to set those tran
2179
2334
  - [test] Skip tests for column pinning and dynamic row height (#5997) @m4theushw
2180
2335
  - [website] Improve security header @oliviertassinari
2181
2336
 
2337
+ ## 5.17.25
2338
+
2339
+ _Feb 23, 2023_
2340
+
2341
+ We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights ✨:
2342
+
2343
+ - 🐞 Bugfixes
2344
+
2345
+ ### `@mui/x-data-grid@v5.17.25` / `@mui/x-data-grid-pro@v5.17.25` / `@mui/x-data-grid-premium@v5.17.25`
2346
+
2347
+ #### Changes
2348
+
2349
+ - [DataGrid] Fix `ownerState` being `undefined` in theme style overrides (#7757) @lolaignatova
2350
+
2351
+ ### `@mui/x-date-pickers@v5.0.20` / `@mui/x-date-pickers-pro@v5.0.20`
2352
+
2353
+ #### Changes
2354
+
2355
+ - [DateTimePicker] Ensure toolbar `viewType` is correctly updated (#7942) @LukasTy
2356
+
2182
2357
  ## 5.17.24
2183
2358
 
2184
2359
  _Feb 16, 2023_
@@ -2654,7 +2829,7 @@ We'd like to offer a big thanks to the 5 contributors who made this release poss
2654
2829
 
2655
2830
  - [CalendarPicker] Don't move to closest enabled date when `props.date` contains a disabled date (#6537) @flaviendelangle
2656
2831
  - [DateRangePicker] Fix calendar day outside of month layout shifting on hover (pick #6448) (#6538) @alexfauquette
2657
- - [pickers] Fix typescript issues (#6510) @flaviendelangle
2832
+ - [pickers] Fix Typescript issues (#6510) @flaviendelangle
2658
2833
 
2659
2834
  ### Docs
2660
2835
 
@@ -2800,7 +2975,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
2800
2975
 
2801
2976
  ### Core
2802
2977
 
2803
- - [core] Update to typescript 4.8.3 (#6136) @flaviendelangle
2978
+ - [core] Update to Typescript 4.8.3 (#6136) @flaviendelangle
2804
2979
  - [core] Update RFC template (#6100) @bytasv
2805
2980
 
2806
2981
  ## 5.17.2
@@ -4116,7 +4291,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
4116
4291
  Here are the new names and the modifications needed to get the same information with the new selectors.
4117
4292
 
4118
4293
  | Old name | New name |
4119
- | ------------------------------- | ----------------------------------------- |
4294
+ | :------------------------------ | :---------------------------------------- |
4120
4295
  | `allGridColumnsFieldsSelector` | `gridColumnFieldsSelector` |
4121
4296
  | `allGridColumnsSelector` | `gridColumnDefinitionsSelector` |
4122
4297
  | `visibleGridColumnsSelector` | `gridVisibleColumnDefinitionsSelector` |
@@ -2,12 +2,12 @@ import * as React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { useLicenseVerifier, Watermark } from '@mui/x-license-pro';
4
4
  import { chainPropTypes } from '@mui/utils';
5
- import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot, GridContextProvider } from '@mui/x-data-grid';
5
+ import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot, GridContextProvider, useGridSelector } from '@mui/x-data-grid';
6
6
  import { useDataGridProComponent } from './useDataGridProComponent';
7
7
  import { useDataGridProProps } from './useDataGridProProps';
8
8
  import { DataGridProVirtualScroller } from '../components/DataGridProVirtualScroller';
9
- import { DataGridProColumnHeaders } from '../components/DataGridProColumnHeaders';
10
9
  import { getReleaseInfo } from '../utils/releaseInfo';
10
+ import { gridPinnedColumnsSelector } from '../hooks/features/columnPinning/gridColumnPinningSelector';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
13
  const releaseInfo = getReleaseInfo();
@@ -15,6 +15,7 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
15
15
  const props = useDataGridProProps(inProps);
16
16
  const privateApiRef = useDataGridProComponent(props.apiRef, props);
17
17
  useLicenseVerifier('x-data-grid-pro', releaseInfo);
18
+ const pinnedColumns = useGridSelector(privateApiRef, gridPinnedColumnsSelector);
18
19
  return /*#__PURE__*/_jsx(GridContextProvider, {
19
20
  privateApiRef: privateApiRef,
20
21
  props: props,
@@ -24,8 +25,10 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
24
25
  sx: props.sx,
25
26
  ref: ref,
26
27
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
27
- ColumnHeadersComponent: DataGridProColumnHeaders,
28
28
  VirtualScrollerComponent: DataGridProVirtualScroller,
29
+ ColumnHeadersProps: {
30
+ pinnedColumns
31
+ },
29
32
  children: /*#__PURE__*/_jsx(Watermark, {
30
33
  packageName: "x-data-grid-pro",
31
34
  releaseInfo: releaseInfo
@@ -115,10 +118,12 @@ DataGridProRaw.propTypes = {
115
118
  columnVisibilityModel: PropTypes.object,
116
119
  /**
117
120
  * Overrideable components.
121
+ * @deprecated Use the `slots` prop instead.
118
122
  */
119
123
  components: PropTypes.object,
120
124
  /**
121
125
  * Overrideable components props dynamically passed to the component at rendering.
126
+ * @deprecated Use the `slotProps` prop instead.
122
127
  */
123
128
  componentsProps: PropTypes.object,
124
129
  /**
@@ -218,7 +223,6 @@ DataGridProRaw.propTypes = {
218
223
  experimentalFeatures: PropTypes.shape({
219
224
  columnGrouping: PropTypes.bool,
220
225
  lazyLoading: PropTypes.bool,
221
- rowPinning: PropTypes.bool,
222
226
  warnIfFocusStateIsNotSynced: PropTypes.bool
223
227
  }),
224
228
  /**
@@ -771,6 +775,14 @@ DataGridProRaw.propTypes = {
771
775
  * @default false
772
776
  */
773
777
  showColumnVerticalBorder: PropTypes.bool,
778
+ /**
779
+ * Overrideable components props dynamically passed to the component at rendering.
780
+ */
781
+ slotProps: PropTypes.object,
782
+ /**
783
+ * Overrideable components.
784
+ */
785
+ slots: PropTypes.object,
774
786
  /**
775
787
  * Sorting can be processed on the server or client-side.
776
788
  * Set it to 'client' if you would like to handle sorting on the client-side.
@@ -1,7 +1,10 @@
1
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
1
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+ const _excluded = ["components", "componentsProps"];
2
4
  import * as React from 'react';
3
5
  import { useThemeProps } from '@mui/material/styles';
4
6
  import { GRID_DEFAULT_LOCALE_TEXT, DATA_GRID_PROPS_DEFAULT_VALUES } from '@mui/x-data-grid';
7
+ import { computeSlots, uncapitalizeObjectKeys } from '@mui/x-data-grid/internals';
5
8
  import { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from '../constants/dataGridProDefaultSlotsComponents';
6
9
 
7
10
  /**
@@ -19,26 +22,30 @@ export const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_D
19
22
  rowsLoadingMode: 'client',
20
23
  getDetailPanelHeight: () => 500
21
24
  });
25
+ const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS);
22
26
  export const useDataGridProProps = inProps => {
23
- const themedProps = useThemeProps({
24
- props: inProps,
25
- name: 'MuiDataGrid'
26
- });
27
+ const _useThemeProps = useThemeProps({
28
+ props: inProps,
29
+ name: 'MuiDataGrid'
30
+ }),
31
+ {
32
+ components,
33
+ componentsProps
34
+ } = _useThemeProps,
35
+ themedProps = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);
27
36
  const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
28
- const components = React.useMemo(() => {
29
- const overrides = themedProps.components;
30
- if (!overrides) {
31
- return _extends({}, DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS);
32
- }
33
- const mergedComponents = {};
34
- Object.entries(DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS).forEach(([key, defaultComponent]) => {
35
- mergedComponents[key] = overrides[key] === undefined ? defaultComponent : overrides[key];
37
+ const slots = React.useMemo(() => computeSlots({
38
+ defaultSlots,
39
+ slots: themedProps.slots,
40
+ components
41
+ }), [components, themedProps.slots]);
42
+ return React.useMemo(() => {
43
+ var _themedProps$slotProp;
44
+ return _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, themedProps, {
45
+ localeText,
46
+ slots,
47
+ slotProps: (_themedProps$slotProp = themedProps.slotProps) != null ? _themedProps$slotProp : componentsProps,
48
+ signature: 'DataGridPro'
36
49
  });
37
- return mergedComponents;
38
- }, [themedProps.components]);
39
- return React.useMemo(() => _extends({}, DATA_GRID_PRO_PROPS_DEFAULT_VALUES, themedProps, {
40
- localeText,
41
- components,
42
- signature: 'DataGridPro'
43
- }), [themedProps, localeText, components]);
50
+ }, [themedProps, localeText, slots, componentsProps]);
44
51
  };
@@ -110,6 +110,11 @@ const VirtualScrollerPinnedColumns = styled('div', {
110
110
  borderLeftStyle: 'solid'
111
111
  });
112
112
  });
113
+ var PinnedRowsPosition;
114
+ (function (PinnedRowsPosition) {
115
+ PinnedRowsPosition["top"] = "top";
116
+ PinnedRowsPosition["bottom"] = "bottom";
117
+ })(PinnedRowsPosition || (PinnedRowsPosition = {}));
113
118
  const VirtualScrollerPinnedRows = styled('div', {
114
119
  name: 'MuiDataGrid',
115
120
  slot: 'PinnedRows',
@@ -136,7 +141,7 @@ const VirtualScrollerPinnedRows = styled('div', {
136
141
  }), ownerState.position === 'top' && {
137
142
  top: 0,
138
143
  boxShadow: `0px 3px 4px -2px ${boxShadowColor}`
139
- }, ownerState.position === 'bottom' && {
144
+ }, ownerState.position === PinnedRowsPosition.bottom && {
140
145
  boxShadow: `0px -3px 4px -2px ${boxShadowColor}`,
141
146
  bottom: 0
142
147
  });
@@ -174,7 +179,7 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
174
179
  bottomPinnedRowsRenderZoneRef.current.style.transform = `translate3d(${left}px, 0px, 0px)`;
175
180
  }
176
181
  }, []);
177
- const getRowProps = id => {
182
+ const getRowProps = React.useCallback(id => {
178
183
  if (!expandedRowIds.includes(id)) {
179
184
  return null;
180
185
  }
@@ -184,15 +189,16 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
184
189
  marginBottom: height
185
190
  }
186
191
  };
187
- };
192
+ }, [detailPanelsHeights, expandedRowIds]);
188
193
  const pinnedColumns = useGridSelector(apiRef, gridPinnedColumnsSelector);
189
194
  const [leftPinnedColumns, rightPinnedColumns] = filterColumns(pinnedColumns, visibleColumnFields, theme.direction === 'rtl');
190
195
  const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);
191
196
  const topPinnedRowsData = React.useMemo(() => (pinnedRows == null ? void 0 : pinnedRows.top) || [], [pinnedRows == null ? void 0 : pinnedRows.top]);
192
197
  const bottomPinnedRowsData = React.useMemo(() => (pinnedRows == null ? void 0 : pinnedRows.bottom) || [], [pinnedRows == null ? void 0 : pinnedRows.bottom]);
193
- const classes = useUtilityClasses({
198
+ const ownerState = _extends({}, rootProps, {
194
199
  classes: rootProps.classes
195
200
  });
201
+ const classes = useUtilityClasses(ownerState);
196
202
  const {
197
203
  renderContext,
198
204
  getRows,
@@ -284,9 +290,9 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
284
290
  return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({}, getRootProps(other), {
285
291
  children: [/*#__PURE__*/_jsx(GridOverlays, {}), topPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
286
292
  className: classes.topPinnedRows,
287
- ownerState: {
288
- position: 'top'
289
- },
293
+ ownerState: _extends({}, ownerState, {
294
+ position: PinnedRowsPosition.top
295
+ }),
290
296
  style: {
291
297
  width: contentProps.style.width,
292
298
  height: pinnedRowsHeight.top
@@ -294,10 +300,10 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
294
300
  role: "rowgroup",
295
301
  children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
296
302
  className: classes.leftPinnedColumns,
297
- ownerState: {
303
+ ownerState: _extends({}, ownerState, {
298
304
  side: GridPinnedPosition.left,
299
305
  showCellVerticalBorder: rootProps.showCellVerticalBorder
300
- },
306
+ }),
301
307
  children: getRows({
302
308
  renderContext: leftRenderContext,
303
309
  minFirstColumn: leftRenderContext.firstColumnIndex,
@@ -313,10 +319,10 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
313
319
  children: topPinnedRows
314
320
  }), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
315
321
  className: classes.rightPinnedColumns,
316
- ownerState: {
322
+ ownerState: _extends({}, ownerState, {
317
323
  side: GridPinnedPosition.right,
318
324
  showCellVerticalBorder: rootProps.showCellVerticalBorder
319
- },
325
+ }),
320
326
  children: getRows({
321
327
  renderContext: rightRenderContext,
322
328
  minFirstColumn: rightRenderContext.firstColumnIndex,
@@ -330,10 +336,10 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
330
336
  children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
331
337
  ref: leftColumns,
332
338
  className: classes.leftPinnedColumns,
333
- ownerState: {
339
+ ownerState: _extends({}, ownerState, {
334
340
  side: GridPinnedPosition.left,
335
341
  showCellVerticalBorder: rootProps.showCellVerticalBorder
336
- },
342
+ }),
337
343
  style: pinnedColumnsStyle,
338
344
  children: getRows({
339
345
  renderContext: leftRenderContext,
@@ -347,10 +353,10 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
347
353
  children: mainRows
348
354
  })), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
349
355
  ref: rightColumns,
350
- ownerState: {
356
+ ownerState: _extends({}, ownerState, {
351
357
  side: GridPinnedPosition.right,
352
358
  showCellVerticalBorder: rootProps.showCellVerticalBorder
353
- },
359
+ }),
354
360
  className: classes.rightPinnedColumns,
355
361
  style: pinnedColumnsStyle,
356
362
  children: getRows({
@@ -363,13 +369,14 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
363
369
  })
364
370
  }), detailPanels.length > 0 && /*#__PURE__*/_jsx(VirtualScrollerDetailPanels, {
365
371
  className: classes.detailPanels,
372
+ ownerState: ownerState,
366
373
  children: detailPanels
367
374
  })]
368
375
  })), bottomPinnedRowsData.length > 0 ? /*#__PURE__*/_jsxs(VirtualScrollerPinnedRows, {
369
376
  className: classes.bottomPinnedRows,
370
- ownerState: {
371
- position: 'bottom'
372
- },
377
+ ownerState: _extends({}, ownerState, {
378
+ position: PinnedRowsPosition.bottom
379
+ }),
373
380
  style: {
374
381
  width: contentProps.style.width,
375
382
  height: pinnedRowsHeight.bottom
@@ -377,10 +384,10 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
377
384
  role: "rowgroup",
378
385
  children: [leftRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
379
386
  className: classes.leftPinnedColumns,
380
- ownerState: {
387
+ ownerState: _extends({}, ownerState, {
381
388
  side: GridPinnedPosition.left,
382
389
  showCellVerticalBorder: rootProps.showCellVerticalBorder
383
- },
390
+ }),
384
391
  children: getRows({
385
392
  renderContext: leftRenderContext,
386
393
  minFirstColumn: leftRenderContext.firstColumnIndex,
@@ -397,10 +404,10 @@ const DataGridProVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGr
397
404
  children: bottomPinnedRows
398
405
  }), rightRenderContext && /*#__PURE__*/_jsx(VirtualScrollerPinnedColumns, {
399
406
  className: classes.rightPinnedColumns,
400
- ownerState: {
407
+ ownerState: _extends({}, ownerState, {
401
408
  side: GridPinnedPosition.right,
402
409
  showCellVerticalBorder: rootProps.showCellVerticalBorder
403
- },
410
+ }),
404
411
  children: getRows({
405
412
  renderContext: rightRenderContext,
406
413
  minFirstColumn: rightRenderContext.firstColumnIndex,
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { UseGridColumnHeadersProps } from '@mui/x-data-grid/internals';
3
+ import { GridPinnedColumns } from '../hooks/features/columnPinning';
4
+ interface DataGridProColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement>, Omit<UseGridColumnHeadersProps, 'innerRef'> {
5
+ innerRef?: React.Ref<HTMLDivElement>;
6
+ pinnedColumns: GridPinnedColumns;
7
+ }
8
+ declare const GridColumnHeaders: React.ForwardRefExoticComponent<DataGridProColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
9
+ export { GridColumnHeaders };