@mui/x-data-grid 6.3.1 → 6.5.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 (349) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/DataGrid/DataGrid.js +20 -1
  3. package/DataGrid/useDataGridComponent.js +2 -2
  4. package/DataGrid/useDataGridProps.js +8 -13
  5. package/colDef/gridBooleanColDef.js +19 -1
  6. package/colDef/gridDateColDef.js +6 -2
  7. package/colDef/gridNumericOperators.js +0 -6
  8. package/colDef/gridSingleSelectColDef.js +21 -1
  9. package/components/base/GridBody.js +2 -1
  10. package/components/cell/GridEditInputCell.js +4 -1
  11. package/components/containers/GridRootStyles.js +1 -0
  12. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +15 -2
  13. package/components/panel/filterPanel/GridFilterInputBoolean.js +80 -36
  14. package/components/panel/filterPanel/GridFilterInputDate.d.ts +8 -1
  15. package/components/panel/filterPanel/GridFilterInputDate.js +27 -6
  16. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
  17. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
  18. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +8 -1
  19. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +55 -32
  20. package/components/panel/filterPanel/GridFilterInputValue.d.ts +11 -4
  21. package/components/panel/filterPanel/GridFilterInputValue.js +29 -6
  22. package/components/panel/filterPanel/GridFilterPanel.d.ts +2 -1
  23. package/components/panel/filterPanel/GridFilterPanel.js +1 -1
  24. package/components/panel/filterPanel/index.d.ts +3 -1
  25. package/components/panel/filterPanel/index.js +2 -1
  26. package/constants/localeTextConstants.js +26 -0
  27. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +12 -1
  28. package/hooks/features/clipboard/useGridClipboard.d.ts +2 -1
  29. package/hooks/features/clipboard/useGridClipboard.js +43 -26
  30. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +9 -2
  31. package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
  32. package/hooks/features/dimensions/useGridDimensions.js +4 -6
  33. package/hooks/features/editing/useGridCellEditing.js +7 -3
  34. package/hooks/features/editing/useGridEditing.js +0 -3
  35. package/hooks/features/editing/useGridRowEditing.js +7 -3
  36. package/hooks/features/export/serializers/csvSerializer.d.ts +5 -0
  37. package/hooks/features/export/serializers/csvSerializer.js +46 -6
  38. package/hooks/features/export/useGridCsvExport.d.ts +2 -1
  39. package/hooks/features/export/useGridCsvExport.js +7 -5
  40. package/hooks/features/focus/gridFocusState.d.ts +2 -0
  41. package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -0
  42. package/hooks/features/focus/gridFocusStateSelector.js +6 -0
  43. package/hooks/features/focus/useGridFocus.js +55 -9
  44. package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -0
  45. package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -0
  46. package/hooks/features/headerFiltering/index.d.ts +1 -0
  47. package/hooks/features/headerFiltering/index.js +1 -0
  48. package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +6 -0
  49. package/hooks/features/headerFiltering/useGridHeaderFiltering.js +91 -0
  50. package/hooks/features/index.d.ts +1 -0
  51. package/hooks/features/index.js +2 -1
  52. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
  53. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +124 -4
  54. package/hooks/features/rows/useGridRows.js +16 -1
  55. package/index.js +1 -1
  56. package/internals/index.d.ts +9 -3
  57. package/internals/index.js +7 -2
  58. package/internals/utils/index.d.ts +1 -0
  59. package/internals/utils/index.js +2 -1
  60. package/internals/utils/useProps.d.ts +8 -0
  61. package/internals/utils/useProps.js +13 -0
  62. package/joy/icons.d.ts +33 -0
  63. package/joy/icons.js +433 -0
  64. package/joy/joySlots.js +114 -4
  65. package/legacy/DataGrid/DataGrid.js +20 -1
  66. package/legacy/DataGrid/useDataGridComponent.js +2 -2
  67. package/legacy/DataGrid/useDataGridProps.js +11 -9
  68. package/legacy/colDef/gridBooleanColDef.js +21 -1
  69. package/legacy/colDef/gridDateColDef.js +10 -2
  70. package/legacy/colDef/gridNumericOperators.js +0 -6
  71. package/legacy/colDef/gridSingleSelectColDef.js +21 -1
  72. package/legacy/components/base/GridBody.js +2 -1
  73. package/legacy/components/cell/GridEditInputCell.js +4 -1
  74. package/legacy/components/containers/GridRootStyles.js +1 -0
  75. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +79 -35
  76. package/legacy/components/panel/filterPanel/GridFilterInputDate.js +26 -5
  77. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
  78. package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
  79. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +54 -31
  80. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +28 -5
  81. package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
  82. package/legacy/components/panel/filterPanel/index.js +2 -1
  83. package/legacy/constants/localeTextConstants.js +26 -0
  84. package/legacy/hooks/features/clipboard/useGridClipboard.js +44 -26
  85. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
  86. package/legacy/hooks/features/dimensions/useGridDimensions.js +4 -6
  87. package/legacy/hooks/features/editing/useGridCellEditing.js +7 -3
  88. package/legacy/hooks/features/editing/useGridEditing.js +0 -3
  89. package/legacy/hooks/features/editing/useGridRowEditing.js +7 -3
  90. package/legacy/hooks/features/export/serializers/csvSerializer.js +43 -6
  91. package/legacy/hooks/features/export/useGridCsvExport.js +8 -5
  92. package/legacy/hooks/features/focus/gridFocusStateSelector.js +10 -0
  93. package/legacy/hooks/features/focus/useGridFocus.js +58 -9
  94. package/legacy/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +11 -0
  95. package/legacy/hooks/features/headerFiltering/index.js +1 -0
  96. package/legacy/hooks/features/headerFiltering/useGridHeaderFiltering.js +93 -0
  97. package/legacy/hooks/features/index.js +2 -1
  98. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +123 -4
  99. package/legacy/hooks/features/rows/useGridRows.js +16 -1
  100. package/legacy/index.js +1 -1
  101. package/legacy/internals/index.js +7 -2
  102. package/legacy/internals/utils/index.js +2 -1
  103. package/legacy/internals/utils/useProps.js +11 -0
  104. package/legacy/joy/icons.js +432 -0
  105. package/legacy/joy/joySlots.js +118 -4
  106. package/legacy/locales/arSD.js +28 -0
  107. package/legacy/locales/beBY.js +28 -0
  108. package/legacy/locales/bgBG.js +28 -0
  109. package/legacy/locales/csCZ.js +36 -8
  110. package/legacy/locales/daDK.js +28 -0
  111. package/legacy/locales/deDE.js +30 -2
  112. package/legacy/locales/elGR.js +27 -0
  113. package/legacy/locales/esES.js +28 -0
  114. package/legacy/locales/faIR.js +28 -0
  115. package/legacy/locales/fiFI.js +28 -0
  116. package/legacy/locales/frFR.js +34 -6
  117. package/legacy/locales/heIL.js +30 -2
  118. package/legacy/locales/huHU.js +28 -0
  119. package/legacy/locales/itIT.js +28 -0
  120. package/legacy/locales/jaJP.js +28 -0
  121. package/legacy/locales/koKR.js +28 -0
  122. package/legacy/locales/nbNO.js +28 -0
  123. package/legacy/locales/nlNL.js +28 -0
  124. package/legacy/locales/plPL.js +28 -0
  125. package/legacy/locales/ptBR.js +29 -1
  126. package/legacy/locales/roRO.js +28 -0
  127. package/legacy/locales/ruRU.js +28 -0
  128. package/legacy/locales/skSK.js +28 -0
  129. package/legacy/locales/svSE.js +28 -0
  130. package/legacy/locales/trTR.js +28 -0
  131. package/legacy/locales/ukUA.js +36 -9
  132. package/legacy/locales/urPK.js +28 -0
  133. package/legacy/locales/viVN.js +27 -0
  134. package/legacy/locales/zhCN.js +28 -0
  135. package/legacy/locales/zhTW.js +28 -0
  136. package/legacy/material/index.js +5 -1
  137. package/legacy/models/api/index.js +0 -1
  138. package/legacy/models/index.js +0 -1
  139. package/legacy/utils/domUtils.js +14 -1
  140. package/locales/arSD.js +28 -0
  141. package/locales/beBY.js +28 -0
  142. package/locales/bgBG.js +28 -0
  143. package/locales/csCZ.js +36 -8
  144. package/locales/daDK.js +28 -0
  145. package/locales/deDE.js +30 -2
  146. package/locales/elGR.js +27 -0
  147. package/locales/esES.js +28 -0
  148. package/locales/faIR.js +28 -0
  149. package/locales/fiFI.js +28 -0
  150. package/locales/frFR.js +34 -6
  151. package/locales/heIL.js +30 -2
  152. package/locales/huHU.js +28 -0
  153. package/locales/itIT.js +28 -0
  154. package/locales/jaJP.js +28 -0
  155. package/locales/koKR.js +28 -0
  156. package/locales/nbNO.js +28 -0
  157. package/locales/nlNL.js +28 -0
  158. package/locales/plPL.js +28 -0
  159. package/locales/ptBR.js +29 -1
  160. package/locales/roRO.js +28 -0
  161. package/locales/ruRU.js +28 -0
  162. package/locales/skSK.js +28 -0
  163. package/locales/svSE.js +28 -0
  164. package/locales/trTR.js +28 -0
  165. package/locales/ukUA.js +36 -9
  166. package/locales/urPK.js +28 -0
  167. package/locales/viVN.js +27 -0
  168. package/locales/zhCN.js +28 -0
  169. package/locales/zhTW.js +28 -0
  170. package/material/index.d.ts +3 -65
  171. package/material/index.js +5 -1
  172. package/models/api/gridApiCommon.d.ts +3 -3
  173. package/models/api/gridCoreApi.d.ts +8 -0
  174. package/models/api/gridFocusApi.d.ts +6 -0
  175. package/models/api/gridHeaderFilteringApi.d.ts +30 -0
  176. package/models/api/gridLocaleTextApi.d.ts +25 -0
  177. package/models/api/index.d.ts +0 -1
  178. package/models/api/index.js +0 -1
  179. package/models/events/gridEventLookup.d.ts +33 -1
  180. package/models/gridFilterOperator.d.ts +4 -0
  181. package/models/gridHeaderFilteringModel.d.ts +5 -0
  182. package/models/gridHeaderFilteringModel.js +1 -0
  183. package/models/gridSlotsComponent.d.ts +21 -4
  184. package/models/gridSlotsComponentsProps.d.ts +4 -0
  185. package/models/gridStateCommunity.d.ts +2 -0
  186. package/models/index.d.ts +1 -1
  187. package/models/index.js +0 -1
  188. package/models/props/DataGridProps.d.ts +19 -0
  189. package/modern/DataGrid/DataGrid.js +20 -1
  190. package/modern/DataGrid/useDataGridComponent.js +2 -2
  191. package/modern/DataGrid/useDataGridProps.js +8 -13
  192. package/modern/colDef/gridBooleanColDef.js +19 -1
  193. package/modern/colDef/gridDateColDef.js +6 -2
  194. package/modern/colDef/gridNumericOperators.js +0 -6
  195. package/modern/colDef/gridSingleSelectColDef.js +21 -1
  196. package/modern/components/base/GridBody.js +2 -1
  197. package/modern/components/cell/GridEditInputCell.js +4 -1
  198. package/modern/components/containers/GridRootStyles.js +1 -0
  199. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +80 -36
  200. package/modern/components/panel/filterPanel/GridFilterInputDate.js +27 -6
  201. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
  202. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
  203. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +55 -32
  204. package/modern/components/panel/filterPanel/GridFilterInputValue.js +29 -6
  205. package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
  206. package/modern/components/panel/filterPanel/index.js +2 -1
  207. package/modern/constants/localeTextConstants.js +26 -0
  208. package/modern/hooks/features/clipboard/useGridClipboard.js +43 -26
  209. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
  210. package/modern/hooks/features/dimensions/useGridDimensions.js +3 -5
  211. package/modern/hooks/features/editing/useGridCellEditing.js +7 -3
  212. package/modern/hooks/features/editing/useGridEditing.js +0 -3
  213. package/modern/hooks/features/editing/useGridRowEditing.js +7 -3
  214. package/modern/hooks/features/export/serializers/csvSerializer.js +44 -6
  215. package/modern/hooks/features/export/useGridCsvExport.js +7 -5
  216. package/modern/hooks/features/focus/gridFocusStateSelector.js +6 -0
  217. package/modern/hooks/features/focus/useGridFocus.js +55 -9
  218. package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -0
  219. package/modern/hooks/features/headerFiltering/index.js +1 -0
  220. package/modern/hooks/features/headerFiltering/useGridHeaderFiltering.js +90 -0
  221. package/modern/hooks/features/index.js +2 -1
  222. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +124 -4
  223. package/modern/hooks/features/rows/useGridRows.js +16 -1
  224. package/modern/index.js +1 -1
  225. package/modern/internals/index.js +7 -2
  226. package/modern/internals/utils/index.js +2 -1
  227. package/modern/internals/utils/useProps.js +13 -0
  228. package/modern/joy/icons.js +433 -0
  229. package/modern/joy/joySlots.js +110 -4
  230. package/modern/locales/arSD.js +28 -0
  231. package/modern/locales/beBY.js +28 -0
  232. package/modern/locales/bgBG.js +28 -0
  233. package/modern/locales/csCZ.js +36 -8
  234. package/modern/locales/daDK.js +28 -0
  235. package/modern/locales/deDE.js +30 -2
  236. package/modern/locales/elGR.js +27 -0
  237. package/modern/locales/esES.js +28 -0
  238. package/modern/locales/faIR.js +28 -0
  239. package/modern/locales/fiFI.js +28 -0
  240. package/modern/locales/frFR.js +34 -6
  241. package/modern/locales/heIL.js +30 -2
  242. package/modern/locales/huHU.js +28 -0
  243. package/modern/locales/itIT.js +28 -0
  244. package/modern/locales/jaJP.js +28 -0
  245. package/modern/locales/koKR.js +28 -0
  246. package/modern/locales/nbNO.js +28 -0
  247. package/modern/locales/nlNL.js +28 -0
  248. package/modern/locales/plPL.js +28 -0
  249. package/modern/locales/ptBR.js +29 -1
  250. package/modern/locales/roRO.js +28 -0
  251. package/modern/locales/ruRU.js +28 -0
  252. package/modern/locales/skSK.js +28 -0
  253. package/modern/locales/svSE.js +28 -0
  254. package/modern/locales/trTR.js +28 -0
  255. package/modern/locales/ukUA.js +36 -9
  256. package/modern/locales/urPK.js +28 -0
  257. package/modern/locales/viVN.js +27 -0
  258. package/modern/locales/zhCN.js +28 -0
  259. package/modern/locales/zhTW.js +28 -0
  260. package/modern/material/index.js +5 -1
  261. package/modern/models/api/gridHeaderFilteringApi.js +1 -0
  262. package/modern/models/api/index.js +0 -1
  263. package/modern/models/gridHeaderFilteringModel.js +1 -0
  264. package/modern/models/index.js +0 -1
  265. package/modern/utils/domUtils.js +13 -1
  266. package/node/DataGrid/DataGrid.js +20 -1
  267. package/node/DataGrid/useDataGridComponent.js +2 -2
  268. package/node/DataGrid/useDataGridProps.js +7 -12
  269. package/node/colDef/gridBooleanColDef.js +19 -1
  270. package/node/colDef/gridDateColDef.js +6 -2
  271. package/node/colDef/gridNumericOperators.js +0 -6
  272. package/node/colDef/gridSingleSelectColDef.js +21 -1
  273. package/node/components/base/GridBody.js +2 -1
  274. package/node/components/cell/GridEditInputCell.js +4 -1
  275. package/node/components/containers/GridRootStyles.js +1 -0
  276. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +78 -35
  277. package/node/components/panel/filterPanel/GridFilterInputDate.js +27 -6
  278. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -2
  279. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -2
  280. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +55 -32
  281. package/node/components/panel/filterPanel/GridFilterInputValue.js +29 -6
  282. package/node/components/panel/filterPanel/GridFilterPanel.js +2 -1
  283. package/node/components/panel/filterPanel/index.js +26 -8
  284. package/node/constants/localeTextConstants.js +26 -0
  285. package/node/hooks/features/clipboard/useGridClipboard.js +42 -25
  286. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
  287. package/node/hooks/features/dimensions/useGridDimensions.js +3 -5
  288. package/node/hooks/features/editing/useGridCellEditing.js +7 -3
  289. package/node/hooks/features/editing/useGridEditing.js +0 -3
  290. package/node/hooks/features/editing/useGridRowEditing.js +7 -3
  291. package/node/hooks/features/export/serializers/csvSerializer.js +46 -6
  292. package/node/hooks/features/export/useGridCsvExport.js +6 -3
  293. package/node/hooks/features/focus/gridFocusStateSelector.js +9 -1
  294. package/node/hooks/features/focus/useGridFocus.js +55 -9
  295. package/node/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +15 -0
  296. package/node/hooks/features/headerFiltering/index.js +16 -0
  297. package/node/hooks/features/headerFiltering/useGridHeaderFiltering.js +101 -0
  298. package/node/hooks/features/index.js +11 -0
  299. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +124 -4
  300. package/node/hooks/features/rows/useGridRows.js +16 -1
  301. package/node/index.js +1 -1
  302. package/node/internals/index.js +69 -1
  303. package/node/internals/utils/index.js +11 -0
  304. package/node/internals/utils/useProps.js +22 -0
  305. package/node/joy/icons.js +471 -0
  306. package/node/joy/joySlots.js +110 -3
  307. package/node/locales/arSD.js +28 -0
  308. package/node/locales/beBY.js +28 -0
  309. package/node/locales/bgBG.js +28 -0
  310. package/node/locales/csCZ.js +36 -8
  311. package/node/locales/daDK.js +28 -0
  312. package/node/locales/deDE.js +30 -2
  313. package/node/locales/elGR.js +27 -0
  314. package/node/locales/esES.js +28 -0
  315. package/node/locales/faIR.js +28 -0
  316. package/node/locales/fiFI.js +28 -0
  317. package/node/locales/frFR.js +34 -6
  318. package/node/locales/heIL.js +30 -2
  319. package/node/locales/huHU.js +28 -0
  320. package/node/locales/itIT.js +28 -0
  321. package/node/locales/jaJP.js +28 -0
  322. package/node/locales/koKR.js +28 -0
  323. package/node/locales/nbNO.js +28 -0
  324. package/node/locales/nlNL.js +28 -0
  325. package/node/locales/plPL.js +28 -0
  326. package/node/locales/ptBR.js +29 -1
  327. package/node/locales/roRO.js +28 -0
  328. package/node/locales/ruRU.js +28 -0
  329. package/node/locales/skSK.js +28 -0
  330. package/node/locales/svSE.js +28 -0
  331. package/node/locales/trTR.js +28 -0
  332. package/node/locales/ukUA.js +36 -9
  333. package/node/locales/urPK.js +28 -0
  334. package/node/locales/viVN.js +27 -0
  335. package/node/locales/zhCN.js +28 -0
  336. package/node/locales/zhTW.js +28 -0
  337. package/node/material/index.js +5 -1
  338. package/node/models/api/index.js +0 -11
  339. package/node/models/gridHeaderFilteringModel.js +5 -0
  340. package/node/models/index.js +0 -11
  341. package/node/utils/domUtils.js +15 -1
  342. package/package.json +1 -1
  343. package/utils/domUtils.d.ts +1 -0
  344. package/utils/domUtils.js +13 -1
  345. package/models/api/gridClipboardApi.d.ts +0 -11
  346. /package/legacy/models/api/{gridClipboardApi.js → gridHeaderFilteringApi.js} +0 -0
  347. /package/{models/api/gridClipboardApi.js → legacy/models/gridHeaderFilteringModel.js} +0 -0
  348. /package/{modern/models/api/gridClipboardApi.js → models/api/gridHeaderFilteringApi.js} +0 -0
  349. /package/node/models/api/{gridClipboardApi.js → gridHeaderFilteringApi.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,119 @@
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
+ ## v6.5.0
7
+
8
+ _May 19, 2023_
9
+
10
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 💫 Introduce filtering on column headers for `DataGridPro` and `DataGridPremium`:
13
+
14
+ https://github.com/mui/mui-x/assets/12609561/c4c2bfec-59cf-4cab-932d-dc1983081de9
15
+
16
+ See [the documentation](https://mui.com/x/react-data-grid/filtering/#header-filters) for more information
17
+
18
+ - 🌍 Improve Hebrew (he-IL) and Czech (cs-CZ) locales
19
+ - 📝 Support for editing on pinned rows
20
+ - 🚀 Performance improvements
21
+ - 🐞 Bugfixes
22
+ - 📚 Documentation improvements
23
+
24
+ ### `@mui/x-data-grid@6.5.0` / `@mui/x-data-grid-pro@6.5.0` / `@mui/x-data-grid-premium@6.5.0`
25
+
26
+ #### Changes
27
+
28
+ - [DataGrid] Fix grid size calculation when `.MuiDataGrid-main` has border (#8882) @cherniavskii
29
+ - [DataGridPro] Filtering on Column Header (#7760) @MBilalShafi
30
+ - [DataGridPro] Improve `treeData` and `rowGrouping` performance (#8990) @MBilalShafi
31
+ - [DataGridPro] Support pinned rows editing (#8921) @cherniavskii
32
+ - [l10n] Improve Hebrew (he-IL) locale (#8943) @Itzik-Tech
33
+ - [l10n] Improve Czech (cs-CZ) locale (#8829) @harastaivan
34
+ - [l10n] Improve Czech (cs-CZ) locale (#8956) @davidzemancz
35
+
36
+ ### `@mui/x-date-pickers@6.5.0` / `@mui/x-date-pickers-pro@6.5.0`
37
+
38
+ #### Changes
39
+
40
+ - [fields] Select the first section instead of last when clicking right of content (#9005) @noraleonte
41
+ - [fields] Refactor prop drilling in fields (#8660) @flaviendelangle
42
+ - [pickers] Allow to render the months before `currentMonth` instead of the one after (#8592) @flaviendelangle
43
+ - [pickers] Fix view management when `openTo` or `views` is modified (#8997) @alexfauquette
44
+ - [l10n] Improve Czech (cs-CZ) locale (#8829) @harastaivan
45
+
46
+ ### Docs
47
+
48
+ - [docs] Clarify what Controlled / Uncontrolled means (#8926) @flaviendelangle
49
+ - [docs] Fix docs using wrong service worker (#9030) @cherniavskii
50
+ - [docs] Remove prop-types from JS demos (#9008) @flaviendelangle
51
+
52
+ ### Core
53
+
54
+ - [core] Add assertion about checkbox rerenders (#8974) @oliviertassinari
55
+ - [core] Allow selecting a section by type in field tests (#9009) @flaviendelangle
56
+ - [core] Fix `yarn.lock` (#8988) @flaviendelangle
57
+ - [core] Fix flacky adapter test (#8995) @flaviendelangle
58
+ - [charts] Clean the axis rendering (#8948) @alexfauquette
59
+ - [DataGrid] Memoize root props for better performance (#8942) @romgrk
60
+ - [test] Skip flaky unit tests in JSDOM (#8994) @cherniavskii
61
+
62
+ ## v6.4.0
63
+
64
+ _May 12, 2023_
65
+
66
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
67
+
68
+ - 🎁 Introduce clipboard paste support for `DataGridPremium`:
69
+
70
+ https://github.com/mui/mui-x/assets/13808724/abfcb5c6-9db6-4677-9ba7-ae97de441080
71
+
72
+ See [the documentation](https://mui.com/x/react-data-grid/clipboard/#clipboard-paste) for more information
73
+
74
+ - 🌍 Improve French (fr-FR), German (de-DE), Portuguese (pt-BR) and Ukrainian (uk-UA) locales on the data grid
75
+ - 🌍 Add Slovak (sk-SK) locale on the pickers
76
+ - 🐞 Bugfixes
77
+ - 📚 Documentation improvements
78
+
79
+ ### `@mui/x-data-grid@v6.4.0` / `@mui/x-data-grid-pro@v6.4.0` / `@mui/x-data-grid-premium@v6.4.0`
80
+
81
+ #### Changes
82
+
83
+ - [DataGrid] Fix DataGrid rendering in JSDOM (#8968) @cherniavskii
84
+ - [DataGrid] Fix layout when rendered inside a parent with `display: grid` (#8577) @cherniavskii
85
+ - [DataGrid] Add Joy UI icon slots (#8940) @siriwatknp
86
+ - [DataGrid] Add Joy UI pagination slot (#8871) @cherniavskii
87
+ - [DataGrid] Extract `baseChip` slot (#8748) @cherniavskii
88
+ - [DataGridPremium] Implement Clipboard import (#7389) @cherniavskii
89
+ - [l10n] Improve French (fr-FR) locale (#8825) @vallereaugabriel
90
+ - [l10n] Improve German (de-DE) locale (#8898) @marcauberer
91
+ - [l10n] Improve Portuguese (pt-BR) locale (#8960) @Sorriso337
92
+ - [l10n] Improve Ukrainian (uk-UA) locale (#8863) @Neonin
93
+
94
+ ### `@mui/x-date-pickers@v6.4.0` / `@mui/x-date-pickers-pro@v6.4.0`
95
+
96
+ #### Changes
97
+
98
+ - [pickers] Fix trailing zeros inconsistency in `LuxonAdapter` (#8955) @alexfauquette
99
+ - [pickers] Stop using deprecated adapter methods (#8735) @flaviendelangle
100
+ - [pickers] Strictly type the `adapterLocale` prop of `LocalizationProvider` (#8780) @flaviendelangle
101
+ - [l10n] Add Slovak (sk-SK) locale (#8875) @MatejFacko
102
+
103
+ ### Docs
104
+
105
+ - [docs] Fix date pickers typo in the docs (#8939) @richbustos
106
+ - [docs] Fix master detail demo (#8894) @m4theushw
107
+ - [docs] Fix typo in clipboard docs (#8971) @MBilalShafi
108
+ - [docs] Reduce list of dependencies in Codesandbox/Stackblitz demos (#8535) @cherniavskii
109
+
110
+ ### Core
111
+
112
+ - [core] Improve testing of the adapters (#8789) @flaviendelangle
113
+ - [core] Update license key for tests (#8917) @LukasTy
114
+ - [charts] Make introduction docs pages for each chart (#8869) @alexfauquette
115
+ - [charts] Document Tooltip and Highlighs (#8867) @alexfauquette
116
+ - [test] Cover row grouping regression with a unit test (#8870) @cherniavskii
117
+ - [test] Fix flaky regression tests (#8954) @cherniavskii
118
+
6
119
  ## 6.3.1
7
120
 
8
121
  _May 5, 2023_
@@ -68,6 +68,11 @@ DataGridRaw.propTypes = {
68
68
  * Override or extend the styles applied to the component.
69
69
  */
70
70
  classes: PropTypes.object,
71
+ /**
72
+ * The character used to separate cell values when copying to the clipboard.
73
+ * @default '\t'
74
+ */
75
+ clipboardCopyCellDelimiter: PropTypes.string,
71
76
  /**
72
77
  * Number of extra columns to be rendered before/after the visible slice.
73
78
  * @default 3
@@ -326,6 +331,11 @@ DataGridRaw.propTypes = {
326
331
  * @param {GridCallbackDetails} details Additional details for this callback.
327
332
  */
328
333
  onCellModesModelChange: PropTypes.func,
334
+ /**
335
+ * Callback called when the data is copied to the clipboard.
336
+ * @param {string} data The data copied to the clipboard.
337
+ */
338
+ onClipboardCopy: PropTypes.func,
329
339
  /**
330
340
  * Callback fired when a click event comes from a column header element.
331
341
  * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
@@ -611,5 +621,14 @@ DataGridRaw.propTypes = {
611
621
  /**
612
622
  * The system prop that allows defining system overrides as well as additional CSS styles.
613
623
  */
614
- sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
624
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
625
+ /**
626
+ * If `true`, the grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
627
+ * If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
628
+ * @default: false
629
+ */
630
+ unstable_ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
631
+ clipboardExport: PropTypes.bool,
632
+ csvExport: PropTypes.bool
633
+ }), PropTypes.bool])
615
634
  };
@@ -67,9 +67,9 @@ export const useDataGridComponent = (inputApiRef, props) => {
67
67
  useGridRowsMeta(privateApiRef, props);
68
68
  useGridScroll(privateApiRef, props);
69
69
  useGridColumnMenu(privateApiRef);
70
- useGridCsvExport(privateApiRef);
70
+ useGridCsvExport(privateApiRef, props);
71
71
  useGridPrintExport(privateApiRef, props);
72
- useGridClipboard(privateApiRef);
72
+ useGridClipboard(privateApiRef, props);
73
73
  useGridDimensions(privateApiRef, props);
74
74
  useGridEvents(privateApiRef, props);
75
75
  useGridStatePersistence(privateApiRef);
@@ -1,12 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["components", "componentsProps"];
4
2
  import * as React from 'react';
5
3
  import { useThemeProps } from '@mui/material/styles';
6
4
  import { GRID_DEFAULT_LOCALE_TEXT } from '../constants';
7
5
  import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '../constants/defaultGridSlotsComponents';
8
6
  import { GridEditModes } from '../models';
9
- import { computeSlots, uncapitalizeObjectKeys } from '../internals/utils';
7
+ import { computeSlots, useProps, uncapitalizeObjectKeys } from '../internals/utils';
10
8
  const DATA_GRID_FORCED_PROPS = {
11
9
  disableMultipleColumnsFiltering: true,
12
10
  disableMultipleColumnsSorting: true,
@@ -66,19 +64,16 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
66
64
  disableColumnReorder: false,
67
65
  disableColumnResize: false,
68
66
  keepNonExistentRowsSelected: false,
69
- keepColumnPositionIfDraggedOutside: false
67
+ keepColumnPositionIfDraggedOutside: false,
68
+ unstable_ignoreValueFormatterDuringExport: false,
69
+ clipboardCopyCellDelimiter: '\t'
70
70
  };
71
71
  const defaultSlots = uncapitalizeObjectKeys(DATA_GRID_DEFAULT_SLOTS_COMPONENTS);
72
72
  export const useDataGridProps = inProps => {
73
- const _useThemeProps = useThemeProps({
74
- props: inProps,
75
- name: 'MuiDataGrid'
76
- }),
77
- {
78
- components,
79
- componentsProps
80
- } = _useThemeProps,
81
- themedProps = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);
73
+ const [components, componentsProps, themedProps] = useProps(useThemeProps({
74
+ props: inProps,
75
+ name: 'MuiDataGrid'
76
+ }));
82
77
  const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
83
78
  const slots = React.useMemo(() => computeSlots({
84
79
  defaultSlots,
@@ -10,6 +10,22 @@ function gridBooleanFormatter({
10
10
  }) {
11
11
  return value ? api.getLocaleText('booleanCellTrueLabel') : api.getLocaleText('booleanCellFalseLabel');
12
12
  }
13
+ const stringToBoolean = value => {
14
+ switch (value.toLowerCase().trim()) {
15
+ case 'true':
16
+ case 'yes':
17
+ case '1':
18
+ return true;
19
+ case 'false':
20
+ case 'no':
21
+ case '0':
22
+ case 'null':
23
+ case 'undefined':
24
+ return false;
25
+ default:
26
+ return undefined;
27
+ }
28
+ };
13
29
  export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
14
30
  type: 'boolean',
15
31
  align: 'center',
@@ -21,5 +37,7 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
21
37
  filterOperators: getGridBooleanOperators(),
22
38
  getApplyQuickFilterFn: undefined,
23
39
  // @ts-ignore
24
- aggregable: false
40
+ aggregable: false,
41
+ // @ts-ignore
42
+ pastedValueParser: value => stringToBoolean(value)
25
43
  });
@@ -51,7 +51,9 @@ export const GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
51
51
  valueFormatter: gridDateFormatter,
52
52
  filterOperators: getGridDateOperators(),
53
53
  renderEditCell: renderEditDateCell,
54
- getApplyQuickFilterFn: undefined
54
+ getApplyQuickFilterFn: undefined,
55
+ // @ts-ignore
56
+ pastedValueParser: value => new Date(value)
55
57
  });
56
58
  export const GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
57
59
  type: 'dateTime',
@@ -59,5 +61,7 @@ export const GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
59
61
  valueFormatter: gridDateTimeFormatter,
60
62
  filterOperators: getGridDateOperators(true),
61
63
  renderEditCell: renderEditDateCell,
62
- getApplyQuickFilterFn: undefined
64
+ getApplyQuickFilterFn: undefined,
65
+ // @ts-ignore
66
+ pastedValueParser: value => new Date(value)
63
67
  });
@@ -17,7 +17,6 @@ export const getGridNumericQuickFilterFn = value => {
17
17
  };
18
18
  };
19
19
  export const getGridNumericOperators = () => [{
20
- label: '=',
21
20
  value: '=',
22
21
  getApplyFilterFn: filterItem => {
23
22
  if (filterItem.value == null || Number.isNaN(filterItem.value)) {
@@ -34,7 +33,6 @@ export const getGridNumericOperators = () => [{
34
33
  type: 'number'
35
34
  }
36
35
  }, {
37
- label: '!=',
38
36
  value: '!=',
39
37
  getApplyFilterFn: filterItem => {
40
38
  if (filterItem.value == null || Number.isNaN(filterItem.value)) {
@@ -51,7 +49,6 @@ export const getGridNumericOperators = () => [{
51
49
  type: 'number'
52
50
  }
53
51
  }, {
54
- label: '>',
55
52
  value: '>',
56
53
  getApplyFilterFn: filterItem => {
57
54
  if (filterItem.value == null || Number.isNaN(filterItem.value)) {
@@ -71,7 +68,6 @@ export const getGridNumericOperators = () => [{
71
68
  type: 'number'
72
69
  }
73
70
  }, {
74
- label: '>=',
75
71
  value: '>=',
76
72
  getApplyFilterFn: filterItem => {
77
73
  if (filterItem.value == null || Number.isNaN(filterItem.value)) {
@@ -91,7 +87,6 @@ export const getGridNumericOperators = () => [{
91
87
  type: 'number'
92
88
  }
93
89
  }, {
94
- label: '<',
95
90
  value: '<',
96
91
  getApplyFilterFn: filterItem => {
97
92
  if (filterItem.value == null || Number.isNaN(filterItem.value)) {
@@ -111,7 +106,6 @@ export const getGridNumericOperators = () => [{
111
106
  type: 'number'
112
107
  }
113
108
  }, {
114
- label: '<=',
115
109
  value: '<=',
116
110
  getApplyFilterFn: filterItem => {
117
111
  if (filterItem.value == null || Number.isNaN(filterItem.value)) {
@@ -51,5 +51,25 @@ export const GRID_SINGLE_SELECT_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
51
51
  return valueOption ? colDef.getOptionLabel(valueOption) : '';
52
52
  },
53
53
  renderEditCell: renderEditSingleSelectCell,
54
- filterOperators: getGridSingleSelectOperators()
54
+ filterOperators: getGridSingleSelectOperators(),
55
+ // @ts-ignore
56
+ pastedValueParser: (value, params) => {
57
+ const colDef = params.colDef;
58
+ const colDefValueOptions = colDef.valueOptions;
59
+ const valueOptions = typeof colDefValueOptions === 'function' ? colDefValueOptions({
60
+ field: colDef.field
61
+ }) : colDefValueOptions || [];
62
+ const getOptionValue = colDef.getOptionValue;
63
+ const valueOption = valueOptions.find(option => {
64
+ if (getOptionValue(option) === value) {
65
+ return true;
66
+ }
67
+ return false;
68
+ });
69
+ if (valueOption) {
70
+ return value;
71
+ }
72
+ // do not paste the value if it is not in the valueOptions
73
+ return undefined;
74
+ }
55
75
  });
@@ -89,7 +89,8 @@ function GridBody(props) {
89
89
  apiRef.current.register('private', {
90
90
  columnHeadersContainerElementRef: columnsContainerRef,
91
91
  columnHeadersElementRef: columnHeadersRef,
92
- virtualScrollerRef
92
+ virtualScrollerRef,
93
+ mainElementRef: rootRef
93
94
  });
94
95
  const hasDimensions = !!apiRef.current.getRootDimensions();
95
96
  return /*#__PURE__*/_jsxs(GridMainContainer, {
@@ -88,7 +88,10 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
88
88
  type: colDef.type === 'number' ? colDef.type : 'text',
89
89
  value: valueState != null ? valueState : '',
90
90
  onChange: handleChange,
91
- endAdornment: isProcessingProps ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {}) : undefined
91
+ endAdornment: isProcessingProps ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
92
+ fontSize: "small",
93
+ color: "action"
94
+ }) : undefined
92
95
  }, other));
93
96
  });
94
97
  process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
@@ -149,6 +149,7 @@ export const GridRootStyles = styled('div', {
149
149
  outline: 'none',
150
150
  height: '100%',
151
151
  display: 'flex',
152
+ overflow: 'hidden',
152
153
  flexDirection: 'column',
153
154
  overflowAnchor: 'none',
154
155
  // Keep the same scrolling position
@@ -1,4 +1,17 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { TextFieldProps } from '@mui/material/TextField';
3
3
  import { GridFilterInputValueProps } from './GridFilterInputValueProps';
4
- export declare function GridFilterInputBoolean(props: GridFilterInputValueProps & TextFieldProps): JSX.Element;
4
+ export type GridFilterInputBooleanProps = GridFilterInputValueProps & TextFieldProps & {
5
+ headerFilterMenu?: React.ReactNode | null;
6
+ clearButton?: React.ReactNode | null;
7
+ /**
8
+ * It is `true` if the filter either has a value or an operator with no value
9
+ * required is selected (e.g. `isEmpty`)
10
+ */
11
+ isFilterActive?: boolean;
12
+ };
13
+ declare function GridFilterInputBoolean(props: GridFilterInputBooleanProps): JSX.Element;
14
+ declare namespace GridFilterInputBoolean {
15
+ var propTypes: any;
16
+ }
17
+ export { GridFilterInputBoolean };
@@ -1,18 +1,30 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["item", "applyValue", "apiRef", "focusElementRef"];
3
+ const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "headerFilterMenu", "isFilterActive", "clearButton", "tabIndex", "label"];
4
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
5
6
  import { unstable_useId as useId } from '@mui/utils';
7
+ import { styled } from '@mui/material/styles';
6
8
  import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
7
9
  import { jsx as _jsx } from "react/jsx-runtime";
8
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
- export function GridFilterInputBoolean(props) {
11
+ const BooleanOperatorContainer = styled('div')({
12
+ display: 'flex',
13
+ alignItems: 'flex-end',
14
+ width: '100%'
15
+ });
16
+ function GridFilterInputBoolean(props) {
10
17
  var _rootProps$slotProps, _baseSelectProps$nati, _rootProps$slotProps2, _rootProps$slotProps3;
11
18
  const {
12
19
  item,
13
20
  applyValue,
14
21
  apiRef,
15
- focusElementRef
22
+ focusElementRef,
23
+ headerFilterMenu,
24
+ isFilterActive,
25
+ clearButton,
26
+ tabIndex,
27
+ label: labelProp
16
28
  } = props,
17
29
  others = _objectWithoutPropertiesLoose(props, _excluded);
18
30
  const [filterValueState, setFilterValueState] = React.useState(item.value || '');
@@ -32,39 +44,71 @@ export function GridFilterInputBoolean(props) {
32
44
  React.useEffect(() => {
33
45
  setFilterValueState(item.value || '');
34
46
  }, [item.value]);
35
- const label = apiRef.current.getLocaleText('filterPanelInputLabel');
36
- return /*#__PURE__*/_jsxs(React.Fragment, {
37
- children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseInputLabel, {
38
- id: labelId,
39
- shrink: true,
40
- variant: "standard",
41
- children: label
42
- })), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({
43
- labelId: labelId,
44
- id: selectId,
45
- label: label,
46
- value: filterValueState,
47
- onChange: onFilterChange,
48
- variant: "standard",
49
- native: isSelectNative,
50
- displayEmpty: true,
51
- inputProps: {
52
- ref: focusElementRef
53
- }
54
- }, others, baseSelectProps, {
55
- children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
47
+ const label = labelProp != null ? labelProp : apiRef.current.getLocaleText('filterPanelInputLabel');
48
+ return /*#__PURE__*/_jsxs(BooleanOperatorContainer, {
49
+ children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {
50
+ fullWidth: true,
51
+ children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, (_rootProps$slotProps3 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps3.baseInputLabel, {
52
+ id: labelId,
53
+ shrink: true,
54
+ variant: "standard",
55
+ children: label
56
+ })), /*#__PURE__*/_jsxs(rootProps.slots.baseSelect, _extends({
57
+ labelId: labelId,
58
+ id: selectId,
59
+ label: label,
60
+ value: filterValueState,
61
+ onChange: onFilterChange,
62
+ variant: "standard",
56
63
  native: isSelectNative,
57
- value: "",
58
- children: apiRef.current.getLocaleText('filterValueAny')
59
- })), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
60
- native: isSelectNative,
61
- value: "true",
62
- children: apiRef.current.getLocaleText('filterValueTrue')
63
- })), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
64
- native: isSelectNative,
65
- value: "false",
66
- children: apiRef.current.getLocaleText('filterValueFalse')
64
+ displayEmpty: true,
65
+ startAdornment: isFilterActive ? headerFilterMenu : null,
66
+ inputProps: {
67
+ ref: focusElementRef,
68
+ tabIndex
69
+ }
70
+ }, others, baseSelectProps, {
71
+ children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
72
+ native: isSelectNative,
73
+ value: "",
74
+ children: apiRef.current.getLocaleText('filterValueAny')
75
+ })), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
76
+ native: isSelectNative,
77
+ value: "true",
78
+ children: apiRef.current.getLocaleText('filterValueTrue')
79
+ })), /*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
80
+ native: isSelectNative,
81
+ value: "false",
82
+ children: apiRef.current.getLocaleText('filterValueFalse')
83
+ }))]
67
84
  }))]
68
- }))]
85
+ }), clearButton]
69
86
  });
70
- }
87
+ }
88
+ process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
89
+ // ----------------------------- Warning --------------------------------
90
+ // | These PropTypes are generated from the TypeScript type definitions |
91
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
92
+ // ----------------------------------------------------------------------
93
+ apiRef: PropTypes.shape({
94
+ current: PropTypes.object.isRequired
95
+ }).isRequired,
96
+ applyValue: PropTypes.func.isRequired,
97
+ clearButton: PropTypes.node,
98
+ focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
99
+ current: PropTypes.any.isRequired
100
+ })]),
101
+ headerFilterMenu: PropTypes.node,
102
+ /**
103
+ * It is `true` if the filter either has a value or an operator with no value
104
+ * required is selected (e.g. `isEmpty`)
105
+ */
106
+ isFilterActive: PropTypes.bool,
107
+ item: PropTypes.shape({
108
+ field: PropTypes.string.isRequired,
109
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
110
+ operator: PropTypes.string.isRequired,
111
+ value: PropTypes.any
112
+ }).isRequired
113
+ } : void 0;
114
+ export { GridFilterInputBoolean };
@@ -1,8 +1,15 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { TextFieldProps } from '@mui/material/TextField';
3
3
  import { GridFilterInputValueProps } from './GridFilterInputValueProps';
4
4
  export type GridFilterInputDateProps = GridFilterInputValueProps & TextFieldProps & {
5
5
  type?: 'date' | 'datetime-local';
6
+ headerFilterMenu?: React.ReactNode | null;
7
+ clearButton?: React.ReactNode | null;
8
+ /**
9
+ * It is `true` if the filter either has a value or an operator with no value
10
+ * required is selected (e.g. `isEmpty`)
11
+ */
12
+ isFilterActive?: boolean;
6
13
  };
7
14
  export declare const SUBMIT_FILTER_DATE_STROKE_TIME = 500;
8
15
  declare function GridFilterInputDate(props: GridFilterInputDateProps): JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "InputProps"];
3
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "InputProps", "headerFilterMenu", "isFilterActive", "clearButton", "tabIndex", "disabled"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { unstable_useId as useId } from '@mui/utils';
@@ -15,7 +15,12 @@ function GridFilterInputDate(props) {
15
15
  type,
16
16
  apiRef,
17
17
  focusElementRef,
18
- InputProps
18
+ InputProps,
19
+ headerFilterMenu,
20
+ isFilterActive,
21
+ clearButton,
22
+ tabIndex,
23
+ disabled
19
24
  } = props,
20
25
  other = _objectWithoutPropertiesLoose(props, _excluded);
21
26
  const filterTimeout = React.useRef();
@@ -46,6 +51,7 @@ function GridFilterInputDate(props) {
46
51
  setFilterValueState(String(itemValue));
47
52
  }, [item.value]);
48
53
  return /*#__PURE__*/_jsx(rootProps.slots.baseTextField, _extends({
54
+ fullWidth: true,
49
55
  id: id,
50
56
  label: apiRef.current.getLocaleText('filterPanelInputLabel'),
51
57
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
@@ -57,11 +63,19 @@ function GridFilterInputDate(props) {
57
63
  shrink: true
58
64
  },
59
65
  inputRef: focusElementRef,
60
- InputProps: _extends({}, applying ? {
61
- endAdornment: /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {})
62
- } : {}, InputProps, {
66
+ InputProps: _extends({}, applying || clearButton ? {
67
+ endAdornment: applying ? /*#__PURE__*/_jsx(rootProps.slots.loadIcon, {
68
+ fontSize: "small",
69
+ color: "action"
70
+ }) : clearButton
71
+ } : {}, headerFilterMenu && isFilterActive ? {
72
+ startAdornment: headerFilterMenu
73
+ } : {}, {
74
+ disabled
75
+ }, InputProps, {
63
76
  inputProps: _extends({
64
- max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31'
77
+ max: type === 'datetime-local' ? '9999-12-31T23:59' : '9999-12-31',
78
+ tabIndex
65
79
  }, InputProps == null ? void 0 : InputProps.inputProps)
66
80
  })
67
81
  }, other, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTextField));
@@ -75,7 +89,14 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
75
89
  current: PropTypes.object.isRequired
76
90
  }).isRequired,
77
91
  applyValue: PropTypes.func.isRequired,
92
+ clearButton: PropTypes.node,
78
93
  focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
94
+ headerFilterMenu: PropTypes.node,
95
+ /**
96
+ * It is `true` if the filter either has a value or an operator with no value
97
+ * required is selected (e.g. `isEmpty`)
98
+ */
99
+ isFilterActive: PropTypes.bool,
79
100
  item: PropTypes.shape({
80
101
  field: PropTypes.string.isRequired,
81
102
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
@@ -4,7 +4,6 @@ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "c
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import Autocomplete, { createFilterOptions } from '@mui/material/Autocomplete';
7
- import Chip from '@mui/material/Chip';
8
7
  import { unstable_useId as useId } from '@mui/utils';
9
8
  import { isSingleSelectColDef } from './filterPanelUtils';
10
9
  import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
@@ -98,7 +97,7 @@ function GridFilterInputMultipleSingleSelect(props) {
98
97
  value: filteredValues,
99
98
  onChange: handleChange,
100
99
  getOptionLabel: getOptionLabel,
101
- renderTags: (value, getTagProps) => value.map((option, index) => /*#__PURE__*/_jsx(Chip, _extends({
100
+ renderTags: (value, getTagProps) => value.map((option, index) => /*#__PURE__*/_jsx(rootProps.slots.baseChip, _extends({
102
101
  variant: "outlined",
103
102
  size: "small",
104
103
  label: getOptionLabel(option)
@@ -4,7 +4,6 @@ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "c
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import Autocomplete from '@mui/material/Autocomplete';
7
- import Chip from '@mui/material/Chip';
8
7
  import { unstable_useId as useId } from '@mui/utils';
9
8
  import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
10
9
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -56,7 +55,7 @@ function GridFilterInputMultipleValue(props) {
56
55
  id: id,
57
56
  value: filterValueState,
58
57
  onChange: handleChange,
59
- renderTags: (value, getTagProps) => value.map((option, index) => /*#__PURE__*/_jsx(Chip, _extends({
58
+ renderTags: (value, getTagProps) => value.map((option, index) => /*#__PURE__*/_jsx(rootProps.slots.baseChip, _extends({
60
59
  variant: "outlined",
61
60
  size: "small",
62
61
  label: option