@mui/x-data-grid 5.12.2 → 5.13.1

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 (177) hide show
  1. package/CHANGELOG.md +160 -6
  2. package/DataGrid/DataGrid.js +4 -4
  3. package/colDef/gridDateOperators.js +4 -2
  4. package/colDef/gridNumericOperators.js +4 -2
  5. package/colDef/gridStringOperators.d.ts +1 -1
  6. package/colDef/gridStringOperators.js +15 -8
  7. package/components/GridRow.js +1 -1
  8. package/components/cell/GridActionsCellItem.d.ts +2 -2
  9. package/components/cell/GridBooleanCell.js +4 -3
  10. package/components/cell/GridEditBooleanCell.js +4 -3
  11. package/components/cell/GridEditDateCell.js +4 -3
  12. package/components/cell/GridEditInputCell.js +4 -3
  13. package/components/cell/GridEditSingleSelectCell.js +9 -7
  14. package/components/panel/GridColumnsPanel.js +1 -1
  15. package/components/panel/GridPanel.d.ts +1 -1
  16. package/components/panel/filterPanel/GridFilterForm.js +11 -4
  17. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  18. package/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  19. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +5 -9
  20. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +42 -19
  21. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -7
  22. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +32 -14
  23. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  24. package/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  25. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +6 -3
  26. package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
  27. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  28. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  29. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  30. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  31. package/hooks/features/dimensions/useGridDimensions.js +28 -15
  32. package/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  33. package/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  34. package/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  35. package/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  36. package/hooks/features/filter/gridFilterUtils.js +8 -5
  37. package/hooks/features/filter/useGridFilter.js +19 -1
  38. package/hooks/features/rows/useGridRows.js +16 -3
  39. package/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  40. package/hooks/features/virtualization/useGridVirtualScroller.js +14 -3
  41. package/hooks/utils/useGridApiContext.js +1 -1
  42. package/hooks/utils/useGridRootProps.js +1 -1
  43. package/index.js +1 -1
  44. package/legacy/DataGrid/DataGrid.js +4 -4
  45. package/legacy/colDef/gridDateOperators.js +4 -2
  46. package/legacy/colDef/gridNumericOperators.js +4 -2
  47. package/legacy/colDef/gridStringOperators.js +17 -7
  48. package/legacy/components/GridRow.js +1 -1
  49. package/legacy/components/cell/GridBooleanCell.js +3 -1
  50. package/legacy/components/cell/GridEditBooleanCell.js +4 -2
  51. package/legacy/components/cell/GridEditDateCell.js +4 -2
  52. package/legacy/components/cell/GridEditInputCell.js +4 -2
  53. package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
  54. package/legacy/components/panel/GridColumnsPanel.js +3 -1
  55. package/legacy/components/panel/filterPanel/GridFilterForm.js +9 -4
  56. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  57. package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  58. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +34 -12
  59. package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +24 -7
  60. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  61. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  62. package/legacy/hooks/features/dimensions/useGridDimensions.js +27 -15
  63. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  64. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +16 -8
  65. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  66. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +22 -14
  67. package/legacy/hooks/features/filter/gridFilterUtils.js +8 -5
  68. package/legacy/hooks/features/filter/useGridFilter.js +19 -1
  69. package/legacy/hooks/features/rows/useGridRows.js +18 -3
  70. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  71. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +19 -8
  72. package/legacy/hooks/utils/useGridApiContext.js +1 -1
  73. package/legacy/hooks/utils/useGridRootProps.js +1 -1
  74. package/legacy/index.js +1 -1
  75. package/legacy/locales/deDE.js +4 -4
  76. package/legacy/locales/frFR.js +11 -11
  77. package/legacy/locales/index.js +3 -0
  78. package/legacy/locales/nlNL.js +15 -15
  79. package/legacy/locales/ptBR.js +11 -11
  80. package/legacy/locales/roRO.js +128 -0
  81. package/legacy/locales/skSK.js +16 -16
  82. package/legacy/locales/svSE.js +128 -0
  83. package/legacy/utils/keyboardUtils.js +4 -3
  84. package/locales/deDE.js +4 -4
  85. package/locales/frFR.js +11 -11
  86. package/locales/index.d.ts +3 -0
  87. package/locales/index.js +3 -0
  88. package/locales/nlNL.js +15 -15
  89. package/locales/ptBR.js +11 -11
  90. package/locales/roRO.d.ts +2 -0
  91. package/locales/roRO.js +116 -0
  92. package/locales/skSK.js +16 -16
  93. package/locales/svSE.d.ts +2 -0
  94. package/locales/svSE.js +116 -0
  95. package/models/gridFilterOperator.d.ts +6 -0
  96. package/modern/DataGrid/DataGrid.js +4 -4
  97. package/modern/colDef/gridDateOperators.js +4 -2
  98. package/modern/colDef/gridNumericOperators.js +4 -2
  99. package/modern/colDef/gridStringOperators.js +15 -8
  100. package/modern/components/GridRow.js +1 -1
  101. package/modern/components/cell/GridBooleanCell.js +4 -3
  102. package/modern/components/cell/GridEditBooleanCell.js +4 -3
  103. package/modern/components/cell/GridEditDateCell.js +4 -3
  104. package/modern/components/cell/GridEditInputCell.js +4 -3
  105. package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
  106. package/modern/components/panel/GridColumnsPanel.js +1 -1
  107. package/modern/components/panel/filterPanel/GridFilterForm.js +11 -4
  108. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  109. package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  110. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +32 -13
  111. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +22 -8
  112. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  113. package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  114. package/modern/hooks/features/dimensions/useGridDimensions.js +28 -15
  115. package/modern/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  116. package/modern/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  117. package/modern/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  118. package/modern/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  119. package/modern/hooks/features/filter/gridFilterUtils.js +8 -5
  120. package/modern/hooks/features/filter/useGridFilter.js +17 -1
  121. package/modern/hooks/features/rows/useGridRows.js +16 -3
  122. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  123. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +10 -3
  124. package/modern/hooks/utils/useGridApiContext.js +1 -1
  125. package/modern/hooks/utils/useGridRootProps.js +1 -1
  126. package/modern/index.js +1 -1
  127. package/modern/locales/deDE.js +4 -4
  128. package/modern/locales/frFR.js +11 -11
  129. package/modern/locales/index.js +3 -0
  130. package/modern/locales/nlNL.js +15 -15
  131. package/modern/locales/ptBR.js +11 -11
  132. package/modern/locales/roRO.js +116 -0
  133. package/modern/locales/skSK.js +16 -16
  134. package/modern/locales/svSE.js +116 -0
  135. package/modern/utils/keyboardUtils.js +4 -3
  136. package/node/DataGrid/DataGrid.js +4 -4
  137. package/node/colDef/gridDateOperators.js +4 -2
  138. package/node/colDef/gridNumericOperators.js +4 -2
  139. package/node/colDef/gridStringOperators.js +15 -8
  140. package/node/components/GridRow.js +1 -1
  141. package/node/components/cell/GridBooleanCell.js +5 -3
  142. package/node/components/cell/GridEditBooleanCell.js +5 -3
  143. package/node/components/cell/GridEditDateCell.js +5 -3
  144. package/node/components/cell/GridEditInputCell.js +5 -3
  145. package/node/components/cell/GridEditSingleSelectCell.js +10 -7
  146. package/node/components/panel/GridColumnsPanel.js +1 -1
  147. package/node/components/panel/filterPanel/GridFilterForm.js +9 -4
  148. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  149. package/node/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  150. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +43 -20
  151. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +33 -15
  152. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  153. package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  154. package/node/hooks/features/dimensions/useGridDimensions.js +28 -15
  155. package/node/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  156. package/node/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  157. package/node/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  158. package/node/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  159. package/node/hooks/features/filter/gridFilterUtils.js +7 -4
  160. package/node/hooks/features/filter/useGridFilter.js +19 -1
  161. package/node/hooks/features/rows/useGridRows.js +16 -3
  162. package/node/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  163. package/node/hooks/features/virtualization/useGridVirtualScroller.js +14 -3
  164. package/node/hooks/utils/useGridApiContext.js +1 -1
  165. package/node/hooks/utils/useGridRootProps.js +1 -1
  166. package/node/index.js +1 -1
  167. package/node/locales/deDE.js +4 -4
  168. package/node/locales/frFR.js +11 -11
  169. package/node/locales/index.js +39 -0
  170. package/node/locales/nlNL.js +15 -15
  171. package/node/locales/ptBR.js +11 -11
  172. package/node/locales/roRO.js +126 -0
  173. package/node/locales/skSK.js +16 -16
  174. package/node/locales/svSE.js +126 -0
  175. package/node/utils/keyboardUtils.js +4 -3
  176. package/package.json +4 -4
  177. package/utils/keyboardUtils.js +4 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,160 @@
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
+ ## 5.13.1
7
+
8
+ _Jul 15, 2022_
9
+
10
+ We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - ✏️ Enter edit mode when pasting in a cell with Ctrl+V (Cmd+V on macOS) (#5405) @alexfauquette
13
+ - 🌍 Many improvements to the locales
14
+ - 📚 Documentation improvements
15
+ - 🐞 Bugfixes
16
+
17
+ ### `@mui/x-data-grid@v5.13.1` / `@mui/x-data-grid-pro@v5.13.1` / `@mui/x-data-grid-premium@v5.13.1`
18
+
19
+ #### Changes
20
+
21
+ - [DataGrid] Fix blank space when using dynamic row height with pagination (#5315) @m4theushw
22
+ - [DataGrid] Start editing with uppercase letter and Ctrl+V (#5405) @alexfauquette
23
+ - [DataGrid] Fix some filters being removed from filter model on filter panel open (#5403) @cherniavskii
24
+ - [DataGridPro] Improve pinned column headers accessibility (#5370) @cherniavskii
25
+ - [l10n] Improve Dutch (nl-NL) locale (#5464) @developenguin
26
+ - [l10n] Improve French (fr-FR) locale (#3211) (#5420) @Zenoo
27
+ - [l10n] Improve German (de-DE) locale (#5448) @sebastianfrey
28
+ - [l10n] Improve Brazilian Portuguese (pt-BR) locale (#5394) @andrepxa
29
+ - [l10n] Improve Romanian (ro-RO) locale (#5449) @rolule
30
+
31
+ ### `@mui/x-date-pickers@v5.0.0-beta.1` / `@mui/x-date-picker-pro@5.0.0-beta.1`
32
+
33
+ #### Changes
34
+
35
+ - [pickers] Add Italian (it-IT) locale (#5467) @felixh10r
36
+ - [pickers] Add Spanish (es-ES) locale (#5468) @felixh10r
37
+ - [pickers] Improve French (fr-FR) locale (#5446) @Zenoo
38
+ - [pickers] Improve German (de-DE) locale (#5447) @sebastianfrey
39
+
40
+ ### Docs
41
+
42
+ - [docs] Fix typo in the sorting page (#5431) @JosephMarinier
43
+ - [docs] Fix description for "Striped rows" example (#5432) @lindapaiste
44
+ - [docs] Make a clear difference between the license and license key (#5316) @oliviertassinari
45
+ - [docs] Update pickers README files (#5456) @cherniavskii
46
+ - [docs] Clarify the scope of support for MUI X (#5423) @joserodolfofreitas
47
+
48
+ ### Core
49
+
50
+ - [core] Add technical support link to \_redirects (#5428) @joserodolfofreitas
51
+ - [core] Improve GitHub bug reproduction template (#5067) @joserodolfofreitas
52
+ - [core] Include playground pages in tsconfig (#5367) @cherniavskii
53
+ - [core] Sort keys like in material-ui @oliviertassinari
54
+ - [test] Wait for flags to load on regression tests (#5473) @m4theushw
55
+
56
+ ## 5.13.0
57
+
58
+ _Jul 7, 2022_
59
+
60
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
61
+
62
+ - 🎁 `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` are now in beta!
63
+
64
+ - ✨ Allow detail panel's height to match its content (#5163) @m4theushw
65
+
66
+ ```tsx
67
+ <DataGridPro getDetailPanelHeight={() => 'auto'} />
68
+ ```
69
+
70
+ - 🌍 Add Romanian (ro-RO) locale on the data grid (#5345) @rolule
71
+ - 📚 Documentation improvements
72
+ - 🐞 Bugfixes
73
+
74
+ ### `@mui/x-data-grid@v5.13.0` / `@mui/x-data-grid-pro@v5.13.0` / `@mui/x-data-grid-premium@v5.13.0`
75
+
76
+ #### Changes
77
+
78
+ - [DataGrid] Allows to customize variant of value input in filter panel (#4826) @alexfauquette
79
+ - [DataGrid] Add Romanian (ro-RO) locale (#5345) @rolule
80
+ - [DataGrid] Export Norwegian (nb-NO) locale (#5407) @cherniavskii
81
+ - [DataGrid] Fix broken "start editing" integration with Japanese (#5414) @mnajdova
82
+ - [DataGrid] Fix "stop editing" integration with IME e.g. Japanese (#5257) @Gumichocopengin8
83
+ - [DataGrid] Fix dimensions computation with `autoHeight` and scroll x (#5401) @flaviendelangle
84
+ - [DataGrid] Improve Slovak (sk-SK) locale (#5332) @msidlo
85
+ - [DataGrid] Mention Premium plan in error messages and docs warnings (#5328) @cherniavskii
86
+ - [DataGrid] Remove trailing spaces in filter input (#5279) @alexfauquette
87
+ - [DataGridPro] Allow to infer detail panel height from content (#5163) @m4theushw
88
+ - [DataGridPro] Fix the depth of nodes when switching from a non-flat tree to a flat tree (#5362) @flaviendelangle
89
+
90
+ ### `@mui/x-date-pickers@v5.0.0-beta.0` / `@mui/x-date-picker-pro@5.0.0-beta.0`
91
+
92
+ #### Changes
93
+
94
+ - [DateRangePicker] Fix keyboard selection (#5265) @alexfauquette
95
+ - [DayPicker] Remove empty space at the bottom of the day view (#5073) @flaviendelangle
96
+ - [pickers] Add missing type dependencies (#5331) @Methuselah96
97
+ - [pickers] Pass the generics to the components in the theme augmentation (#5199) @toruticas
98
+
99
+ ### Docs
100
+
101
+ - [docs] Explain how to use hooks inside a cell renderer (#5158) @flaviendelangle
102
+ - [docs] Fix server-side pagination demo (#5361) @cherniavskii
103
+ - [docs] Fix typo in the quick filter docs (#5313) @alexfauquette
104
+ - [docs] Improve the "Getting started" page (#5293) @alexfauquette
105
+ - [docs] New page for the pickers action bar customization (#5267) @flaviendelangle
106
+ - [docs] Revise and split up "Overview" page into "Introduction" (#4692) @samuelsycamore
107
+ - [docs] Use `useKeepGroupedColumnsHiddren` from the grid package on remaining demo (#5382) @flaviendelangle
108
+
109
+ ## v5.12.3
110
+
111
+ _Jun 23, 2022_
112
+
113
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
114
+
115
+ - 🌍 Add Swedish (sv-SE) locale on the data grid and the pickers (#5210) @mrxdst
116
+ - 🌍 Add Dutch (nl-NL) locale on the pickers (#5237) @DDukers
117
+ - 📚 Documentation improvements
118
+ - 🐞 Bugfixes
119
+
120
+ ### `@mui/x-data-grid@v5.12.3` / `@mui/x-data-grid-pro@v5.12.3` / `@mui/x-data-grid-premium@v5.12.3`
121
+
122
+ #### Changes
123
+
124
+ - [DataGrid] Do not hide non-hideable column when pressing Hide All button (#5298) @flaviendelangle
125
+ - [DataGrid] Do not regenerate the row tree when the `loading` prop changes (#5213) @flaviendelangle
126
+ - [DataGrid] Fix the default filter operator fallback on state initialization (#5266) @flaviendelangle
127
+ - [DataGrid] Stop using the deprecated `api` prop in the grid components (#5205) @flaviendelangle
128
+ - [DataGrid] Add Swedish (sv-SE) locale (#5210) @mrxdst
129
+ - [DataGridPremium] Fix detail panel on `DataGridPremium` (#5264) @flaviendelangle
130
+ - [DataGridPremium] Fix Excel import with Remix / Vite (#5207) @alexfauquette
131
+ - [DataGridPremium] Fix error with quick filter and grouping rows (#5238) @alexfauquette
132
+
133
+ ### `@mui/x-date-pickers@v5.0.0-alpha.7` / `@mui/x-date-pickers-pro@v5.0.0-alpha.7`
134
+
135
+ #### Changes
136
+
137
+ - [pickers] Export adapters from both `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` (#5204) @flaviendelangle
138
+ - [pickers] Add Dutch (nl-NL) locale (#5237) @DDukers
139
+
140
+ ### Docs
141
+
142
+ - [docs] Add `DataGridPremium` to all API sections (#5196) @flaviendelangle
143
+ - [docs] Add plan badge next to event name in the Events page (#5200) @flaviendelangle
144
+ - [docs] Add section for theme augmentation in the picker docs (#5276) @flaviendelangle
145
+ - [docs] Add waiting for upvote section for row group panel (#5271) @flaviendelangle
146
+ - [docs] Disable ad on main demo page (#5301) @joserodolfofreitas
147
+ - [docs] Fix typo in the `DateRangePicker` documentation (#5259) @flaviendelangle
148
+
149
+ ### Core
150
+
151
+ - [core] Allow having multiple playgrounds (#5288) @alexfauquette
152
+ - [core] Improve typing of `GridFilterInputMultipleSingleSelect` (#5206) @flaviendelangle
153
+ - [core] Remove arbitrary new lines (#5245) @oliviertassinari
154
+ - [core] Remove dead logic (#5282) @oliviertassinari
155
+ - [test] Fix `inputFormat` when testing with different date adapters (#5291) @cherniavskii
156
+ - [test] Fix date assertion in Safari 13 (#5221) @m4theushw
157
+ - [test] Throw if date adapter is not found (#5289) @cherniavskii
158
+ - [test] Use mock for `ResizeObserver` (#5215) @m4theushw
159
+
6
160
  ## v5.12.2
7
161
 
8
162
  _Jun 16, 2022_
@@ -71,7 +225,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
71
225
  - [l10n] Update Japanese (ja-JP) locale (#5122) @hikotq
72
226
  - [l10n] Update Russian (ru-RU) locale (#5069) @Artboomy
73
227
 
74
- ### `@mui/x-date-pickers@5.0.0-alpha.6` / `@mui/x-date-pickers-pro@5.0.0-alpha.6`
228
+ ### `@mui/x-date-pickers@v5.0.0-alpha.6` / `@mui/x-date-pickers-pro@v5.0.0-alpha.6`
75
229
 
76
230
  #### Changes
77
231
 
@@ -138,7 +292,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
138
292
  - [l10n] Add Norwegian (Bokmål) (nb-NO) locale (#5001) @spiftire
139
293
  - [l10n] Add Turkish (tr-TR) locale (#5026) @Rassilion
140
294
 
141
- ### `@mui/x-date-pickers@5.0.0-alpha.5` / `@mui/x-date-pickers-pro@5.0.0-alpha.5`
295
+ ### `@mui/x-date-pickers@v5.0.0-alpha.5` / `@mui/x-date-pickers-pro@v5.0.0-alpha.5`
142
296
 
143
297
  #### Breaking changes
144
298
 
@@ -211,7 +365,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
211
365
  - [DataGridPremium] Support column spanning in the Excel export (#4830) @cherniavskii
212
366
  - [l10n] Improve Russian (ru-RU) locale (#4864) @arvkonstantin
213
367
 
214
- ### `@mui/x-date-pickers@5.0.0-alpha.4` / `@mui/x-date-pickers-pro@5.0.0-alpha.4`
368
+ ### `@mui/x-date-pickers@v5.0.0-alpha.4` / `@mui/x-date-pickers-pro@v5.0.0-alpha.4`
215
369
 
216
370
  #### Breaking changes
217
371
 
@@ -336,7 +490,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
336
490
  - [l10n] Improve German (de-DE) locale (#4748) @sebastianfrey
337
491
  - [l10n] Improve German (de-DE) locale (#4668) @izu-co
338
492
 
339
- ### `@mui/x-date-pickers@5.0.0-alpha.3` / `@mui/x-date-pickers-pro@5.0.0-alpha.3`
493
+ ### `@mui/x-date-pickers@v5.0.0-alpha.3` / `@mui/x-date-pickers-pro@v5.0.0-alpha.3`
340
494
 
341
495
  #### Breaking changes
342
496
 
@@ -437,7 +591,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
437
591
  - [DataGrid] Don't close column menu when updating rows (#4498) @m4theushw
438
592
  - [DataGridPro] Introduce row reorder (#4034) @DanailH
439
593
 
440
- ### `@mui/x-date-pickers@5.0.0-alpha.2` / `@mui/x-date-pickers-pro@5.0.0-alpha.2`
594
+ ### `@mui/x-date-pickers@v5.0.0-alpha.2` / `@mui/x-date-pickers-pro@v5.0.0-alpha.2`
441
595
 
442
596
  - [pickers] Pass `PaperProps` to `DesktopWrapper` component (#4584) @alexfauquette
443
597
  - [TimePicker] Fix bug when time picker clear value (#4582) @alexfauquette
@@ -498,7 +652,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
498
652
  - [DataGridPro] Fix toggling detail panel using keyboard (#4409) @cherniavskii
499
653
  - [l10n] Add Hungarian (hu-HU) locale (#4458) @x22tri
500
654
 
501
- ### `@mui/x-date-pickers@5.0.0-alpha.1` / `@mui/x-date-pickers-pro@5.0.0-alpha.1`
655
+ ### `@mui/x-date-pickers@v5.0.0-alpha.1` / `@mui/x-date-pickers-pro@v5.0.0-alpha.1`
502
656
 
503
657
  - [ClockPicker] Should call `shouldDisableTime` with the hours with meridiem (#4404) @flaviendelangle
504
658
  - [MonthPicker] Clicking on a `PickersMonth` button should not trigger the form submit (#4402) @flaviendelangle
@@ -86,7 +86,7 @@ DataGridRaw.propTypes = {
86
86
  columns: chainPropTypes(PropTypes.array.isRequired, props => {
87
87
  // @ts-ignore because otherwise `build:api` doesn't work
88
88
  if (props.columns && props.columns.some(column => column.resizable)) {
89
- return new Error([`MUI: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to the DataGridPro component to unlock this feature.'].join('\n'));
89
+ return new Error([`MUI: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
90
90
  }
91
91
 
92
92
  return null;
@@ -656,14 +656,14 @@ DataGridRaw.propTypes = {
656
656
  */
657
657
  pageSize: chainPropTypes(PropTypes.number, props => {
658
658
  if (props.pageSize && props.pageSize > MAX_PAGE_SIZE) {
659
- return new Error([`MUI: \`<DataGrid pageSize={${props.pageSize}} />\` is not a valid prop.`, `Only page size below ${MAX_PAGE_SIZE} is available in the MIT version.`, '', 'You need to upgrade to the DataGridPro component to unlock this feature.'].join('\n'));
659
+ return new Error([`MUI: \`<DataGrid pageSize={${props.pageSize}} />\` is not a valid prop.`, `Only page size below ${MAX_PAGE_SIZE} is available in the MIT version.`, '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
660
660
  }
661
661
 
662
662
  return null;
663
663
  }),
664
664
  pagination: props => {
665
665
  if (props.pagination === false) {
666
- return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to the DataGridPro component to disable the pagination.'].join('\n'));
666
+ return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination.'].join('\n'));
667
667
  }
668
668
 
669
669
  return null;
@@ -743,7 +743,7 @@ DataGridRaw.propTypes = {
743
743
  */
744
744
  selectionModel: chainPropTypes(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array]), props => {
745
745
  if (!props.checkboxSelection && Array.isArray(props.selectionModel) && props.selectionModel.length > 1) {
746
- return new Error([`MUI: \`<DataGrid selectionModel={${JSON.stringify(props.selectionModel)}} />\` is not a valid prop.`, 'selectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to the DataGridPro component to unlock multiple selection.'].join('\n'));
746
+ return new Error([`MUI: \`<DataGrid selectionModel={${JSON.stringify(props.selectionModel)}} />\` is not a valid prop.`, 'selectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
747
747
  }
748
748
 
749
749
  return null;
@@ -91,7 +91,8 @@ export const getGridDateOperators = showTime => [{
91
91
  }) => {
92
92
  return value == null;
93
93
  };
94
- }
94
+ },
95
+ requiresFilterValue: false
95
96
  }, {
96
97
  value: 'isNotEmpty',
97
98
  getApplyFilterFn: () => {
@@ -100,5 +101,6 @@ export const getGridDateOperators = showTime => [{
100
101
  }) => {
101
102
  return value != null;
102
103
  };
103
- }
104
+ },
105
+ requiresFilterValue: false
104
106
  }];
@@ -153,7 +153,8 @@ export const getGridNumericOperators = () => [{
153
153
  }) => {
154
154
  return value == null;
155
155
  };
156
- }
156
+ },
157
+ requiresFilterValue: false
157
158
  }, {
158
159
  value: 'isNotEmpty',
159
160
  getApplyFilterFn: () => {
@@ -162,7 +163,8 @@ export const getGridNumericOperators = () => [{
162
163
  }) => {
163
164
  return value != null;
164
165
  };
165
- }
166
+ },
167
+ requiresFilterValue: false
166
168
  }, {
167
169
  value: 'isAnyOf',
168
170
  getApplyFilterFn: filterItem => {
@@ -1,4 +1,4 @@
1
1
  import { GridFilterOperator } from '../models/gridFilterOperator';
2
2
  import { GridCellParams } from '../models';
3
3
  export declare const getGridStringQuickFilterFn: (value: any) => (({ value: columnValue }: GridCellParams) => boolean) | null;
4
- export declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
4
+ export declare const getGridStringOperators: (disableTrim?: boolean) => GridFilterOperator<any, number | string | null, any>[];
@@ -13,14 +13,15 @@ export const getGridStringQuickFilterFn = value => {
13
13
  return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
14
14
  };
15
15
  };
16
- export const getGridStringOperators = () => [{
16
+ export const getGridStringOperators = (disableTrim = false) => [{
17
17
  value: 'contains',
18
18
  getApplyFilterFn: filterItem => {
19
19
  if (!filterItem.value) {
20
20
  return null;
21
21
  }
22
22
 
23
- const filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
23
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
24
+ const filterRegex = new RegExp(escapeRegExp(filterItemValue), 'i');
24
25
  return ({
25
26
  value
26
27
  }) => {
@@ -35,6 +36,7 @@ export const getGridStringOperators = () => [{
35
36
  return null;
36
37
  }
37
38
 
39
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
38
40
  const collator = new Intl.Collator(undefined, {
39
41
  sensitivity: 'base',
40
42
  usage: 'search'
@@ -42,7 +44,7 @@ export const getGridStringOperators = () => [{
42
44
  return ({
43
45
  value
44
46
  }) => {
45
- return value != null ? collator.compare(filterItem.value, value.toString()) === 0 : false;
47
+ return value != null ? collator.compare(filterItemValue, value.toString()) === 0 : false;
46
48
  };
47
49
  },
48
50
  InputComponent: GridFilterInputValue
@@ -53,7 +55,8 @@ export const getGridStringOperators = () => [{
53
55
  return null;
54
56
  }
55
57
 
56
- const filterRegex = new RegExp(`^${escapeRegExp(filterItem.value)}.*$`, 'i');
58
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
59
+ const filterRegex = new RegExp(`^${escapeRegExp(filterItemValue)}.*$`, 'i');
57
60
  return ({
58
61
  value
59
62
  }) => {
@@ -68,7 +71,8 @@ export const getGridStringOperators = () => [{
68
71
  return null;
69
72
  }
70
73
 
71
- const filterRegex = new RegExp(`.*${escapeRegExp(filterItem.value)}$`, 'i');
74
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
75
+ const filterRegex = new RegExp(`.*${escapeRegExp(filterItemValue)}$`, 'i');
72
76
  return ({
73
77
  value
74
78
  }) => {
@@ -84,7 +88,8 @@ export const getGridStringOperators = () => [{
84
88
  }) => {
85
89
  return value === '' || value == null;
86
90
  };
87
- }
91
+ },
92
+ requiresFilterValue: false
88
93
  }, {
89
94
  value: 'isNotEmpty',
90
95
  getApplyFilterFn: () => {
@@ -93,7 +98,8 @@ export const getGridStringOperators = () => [{
93
98
  }) => {
94
99
  return value !== '' && value != null;
95
100
  };
96
- }
101
+ },
102
+ requiresFilterValue: false
97
103
  }, {
98
104
  value: 'isAnyOf',
99
105
  getApplyFilterFn: filterItem => {
@@ -101,13 +107,14 @@ export const getGridStringOperators = () => [{
101
107
  return null;
102
108
  }
103
109
 
110
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.map(val => val.trim());
104
111
  const collator = new Intl.Collator(undefined, {
105
112
  sensitivity: 'base',
106
113
  usage: 'search'
107
114
  });
108
115
  return ({
109
116
  value
110
- }) => value != null ? filterItem.value.some(filterValue => {
117
+ }) => value != null ? filterItemValue.some(filterValue => {
111
118
  return collator.compare(filterValue, value.toString() || '') === 0;
112
119
  }) : false;
113
120
  },
@@ -112,7 +112,7 @@ function GridRow(props) {
112
112
  // Fallback for IE
113
113
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, ref.current.clientHeight);
114
114
  }
115
- });
115
+ }, [apiRef, rowHeight, rowId]);
116
116
  React.useLayoutEffect(() => {
117
117
  if (currentPage.range) {
118
118
  // The index prop is relative to the rows from all pages. As example, the index prop of the
@@ -43,7 +43,7 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Pick<{
43
43
  touchRippleRef?: React.Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
44
44
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & {
45
45
  ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
46
- }, "color" | "size" | "disabled" | "children" | "action" | "tabIndex" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "hidden" | "color" | "size" | "icon" | "translate" | "disabled" | "form" | "label" | "slot" | "title" | "children" | "key" | "action" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "type" | "value" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "showInMenu"> | Pick<{
46
+ }, "color" | "size" | "disabled" | "children" | "action" | "tabIndex" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "hidden" | "color" | "size" | "icon" | "translate" | "disabled" | "form" | "label" | "slot" | "title" | "children" | "key" | "action" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "type" | "value" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "showInMenu"> | Pick<{
47
47
  label: string;
48
48
  icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
49
49
  } & {
@@ -75,5 +75,5 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Pick<{
75
75
  touchRippleRef?: React.Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
76
76
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof React.LiHTMLAttributes<HTMLLIElement>> & {
77
77
  ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
78
- }, "dense" | "disabled" | "children" | "action" | "autoFocus" | "tabIndex" | "selected" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef">, "hidden" | "color" | "dense" | "icon" | "translate" | "disabled" | "label" | "slot" | "title" | "children" | "key" | "action" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "selected" | "value" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "showInMenu">) & React.RefAttributes<HTMLButtonElement>>;
78
+ }, "dense" | "disabled" | "children" | "action" | "autoFocus" | "tabIndex" | "selected" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef">, "hidden" | "color" | "dense" | "icon" | "translate" | "disabled" | "label" | "slot" | "title" | "children" | "key" | "action" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "selected" | "value" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "showInMenu">) & React.RefAttributes<HTMLButtonElement>>;
79
79
  export { GridActionsCellItem };
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  import { unstable_composeClasses as composeClasses } from '@mui/material';
6
6
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
7
7
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
8
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
 
10
11
  const useUtilityClasses = ownerState => {
@@ -19,11 +20,11 @@ const useUtilityClasses = ownerState => {
19
20
 
20
21
  export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
21
22
  const {
22
- value,
23
- api
23
+ value
24
24
  } = props,
25
25
  other = _objectWithoutPropertiesLoose(props, _excluded);
26
26
 
27
+ const apiRef = useGridApiContext();
27
28
  const rootProps = useGridRootProps();
28
29
  const ownerState = {
29
30
  classes: rootProps.classes
@@ -33,7 +34,7 @@ export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
33
34
  return /*#__PURE__*/_jsx(Icon, _extends({
34
35
  fontSize: "small",
35
36
  className: classes.root,
36
- titleAccess: api.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
37
+ titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
37
38
  "data-value": Boolean(value)
38
39
  }, other));
39
40
  });
@@ -8,6 +8,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/material';
8
8
  import { unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
9
9
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
10
10
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
11
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
 
13
14
  const useUtilityClasses = ownerState => {
@@ -26,7 +27,6 @@ function GridEditBooleanCell(props) {
26
27
  const {
27
28
  id: idProp,
28
29
  value,
29
- api,
30
30
  field,
31
31
  className,
32
32
  hasFocus,
@@ -34,6 +34,7 @@ function GridEditBooleanCell(props) {
34
34
  } = props,
35
35
  other = _objectWithoutPropertiesLoose(props, _excluded);
36
36
 
37
+ const apiRef = useGridApiContext();
37
38
  const inputRef = React.useRef(null);
38
39
  const id = useId();
39
40
  const [valueState, setValueState] = React.useState(value);
@@ -50,12 +51,12 @@ function GridEditBooleanCell(props) {
50
51
  }
51
52
 
52
53
  setValueState(newValue);
53
- await api.setEditCellValue({
54
+ await apiRef.current.setEditCellValue({
54
55
  id: idProp,
55
56
  field,
56
57
  value: newValue
57
58
  }, event);
58
- }, [api, field, idProp, onValueChange]);
59
+ }, [apiRef, field, idProp, onValueChange]);
59
60
  React.useEffect(() => {
60
61
  setValueState(value);
61
62
  }, [value]);
@@ -8,6 +8,7 @@ import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/u
8
8
  import InputBase from '@mui/material/InputBase';
9
9
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
10
10
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
11
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
 
13
14
  const useUtilityClasses = ownerState => {
@@ -24,7 +25,6 @@ function GridEditDateCell(props) {
24
25
  const {
25
26
  id,
26
27
  value: valueProp,
27
- api,
28
28
  field,
29
29
  colDef,
30
30
  hasFocus,
@@ -34,6 +34,7 @@ function GridEditDateCell(props) {
34
34
  other = _objectWithoutPropertiesLoose(props, _excluded);
35
35
 
36
36
  const isDateTime = colDef.type === 'dateTime';
37
+ const apiRef = useGridApiContext();
37
38
  const inputRef = React.useRef();
38
39
  const valueTransformed = React.useMemo(() => {
39
40
  let parsedDate;
@@ -93,12 +94,12 @@ function GridEditDateCell(props) {
93
94
  parsed: newParsedDate,
94
95
  formatted: newFormattedDate
95
96
  });
96
- api.setEditCellValue({
97
+ apiRef.current.setEditCellValue({
97
98
  id,
98
99
  field,
99
100
  value: newParsedDate
100
101
  }, event);
101
- }, [api, field, id, onValueChange]);
102
+ }, [apiRef, field, id, onValueChange]);
102
103
  React.useEffect(() => {
103
104
  setValueState(state => {
104
105
  var _valueTransformed$par, _state$parsed;
@@ -11,6 +11,7 @@ import { getDataGridUtilityClass } from '../../constants/gridClasses';
11
11
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
12
12
  import { GridLoadIcon } from '../icons/index';
13
13
  import { SUBMIT_FILTER_STROKE_TIME } from '../panel/filterPanel/GridFilterInputValue';
14
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
 
16
17
  const useUtilityClasses = ownerState => {
@@ -45,7 +46,6 @@ function GridEditInputCell(props) {
45
46
  const {
46
47
  id,
47
48
  value,
48
- api,
49
49
  field,
50
50
  colDef,
51
51
  hasFocus,
@@ -55,6 +55,7 @@ function GridEditInputCell(props) {
55
55
  } = props,
56
56
  other = _objectWithoutPropertiesLoose(props, _excluded);
57
57
 
58
+ const apiRef = useGridApiContext();
58
59
  const inputRef = React.useRef();
59
60
  const [valueState, setValueState] = React.useState(value);
60
61
  const ownerState = {
@@ -69,13 +70,13 @@ function GridEditInputCell(props) {
69
70
  }
70
71
 
71
72
  setValueState(newValue);
72
- api.setEditCellValue({
73
+ apiRef.current.setEditCellValue({
73
74
  id,
74
75
  field,
75
76
  value: newValue,
76
77
  debounceMs
77
78
  }, event);
78
- }, [api, debounceMs, field, id, onValueChange]);
79
+ }, [apiRef, debounceMs, field, id, onValueChange]);
79
80
  React.useEffect(() => {
80
81
  setValueState(value);
81
82
  }, [value]);