@mui/x-data-grid 5.12.3 → 5.14.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 (370) hide show
  1. package/CHANGELOG.md +147 -1
  2. package/DataGrid/DataGrid.js +4 -4
  3. package/DataGrid/useDataGridComponent.js +1 -1
  4. package/colDef/gridActionsColDef.js +2 -0
  5. package/colDef/gridBooleanColDef.js +3 -1
  6. package/colDef/gridCheckboxSelectionColDef.js +2 -0
  7. package/colDef/gridDateOperators.d.ts +1 -1
  8. package/colDef/gridDateOperators.js +4 -2
  9. package/colDef/gridNumericOperators.js +4 -2
  10. package/colDef/gridStringColDef.d.ts +3 -0
  11. package/colDef/gridStringColDef.js +6 -0
  12. package/colDef/gridStringOperators.d.ts +1 -1
  13. package/colDef/gridStringOperators.js +15 -8
  14. package/components/GridRow.js +1 -1
  15. package/components/base/GridOverlays.js +4 -1
  16. package/components/cell/GridActionsCellItem.d.ts +2 -2
  17. package/components/cell/GridBooleanCell.d.ts +5 -2
  18. package/components/cell/GridBooleanCell.js +93 -2
  19. package/components/cell/GridEditDateCell.js +5 -1
  20. package/components/cell/index.d.ts +1 -0
  21. package/components/cell/index.js +1 -0
  22. package/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
  23. package/components/containers/GridRootStyles.js +10 -0
  24. package/components/panel/GridPanel.d.ts +1 -1
  25. package/components/panel/filterPanel/GridFilterForm.js +11 -4
  26. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  27. package/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  28. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -8
  29. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +30 -14
  30. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -7
  31. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +32 -14
  32. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  33. package/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  34. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +6 -3
  35. package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
  36. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  37. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  38. package/components/toolbar/GridToolbarExport.js +20 -10
  39. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  40. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  41. package/constants/gridClasses.d.ts +25 -1
  42. package/constants/gridClasses.js +1 -1
  43. package/constants/localeTextConstants.js +8 -1
  44. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +2 -1
  45. package/hooks/features/columns/useGridColumnSpanning.js +9 -7
  46. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  47. package/hooks/features/columns/useGridColumns.js +13 -6
  48. package/hooks/features/dimensions/useGridDimensions.js +28 -15
  49. package/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  50. package/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  51. package/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  52. package/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  53. package/hooks/features/export/utils.d.ts +1 -1
  54. package/hooks/features/export/utils.js +9 -2
  55. package/hooks/features/filter/gridFilterUtils.js +6 -0
  56. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  57. package/hooks/features/filter/useGridFilter.js +30 -5
  58. package/hooks/features/pagination/useGridPage.js +4 -3
  59. package/hooks/features/pagination/useGridPageSize.js +4 -3
  60. package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
  61. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
  62. package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
  63. package/hooks/features/rows/useGridRows.js +1 -1
  64. package/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  65. package/hooks/features/selection/useGridSelection.js +24 -10
  66. package/hooks/features/sorting/gridSortingUtils.d.ts +1 -0
  67. package/hooks/features/sorting/gridSortingUtils.js +10 -11
  68. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  69. package/hooks/features/sorting/useGridSorting.js +34 -6
  70. package/hooks/features/statePersistence/gridStatePersistenceInterface.d.ts +12 -1
  71. package/hooks/features/statePersistence/index.d.ts +1 -1
  72. package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  73. package/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
  74. package/hooks/utils/useGridApiContext.js +1 -1
  75. package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
  76. package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
  77. package/hooks/utils/useGridNativeEventListener.js +1 -1
  78. package/hooks/utils/useGridRootProps.js +1 -1
  79. package/index.js +1 -1
  80. package/internals/index.d.ts +2 -2
  81. package/internals/index.js +2 -2
  82. package/legacy/DataGrid/DataGrid.js +4 -4
  83. package/legacy/DataGrid/useDataGridComponent.js +1 -1
  84. package/legacy/colDef/gridActionsColDef.js +2 -0
  85. package/legacy/colDef/gridBooleanColDef.js +3 -1
  86. package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -0
  87. package/legacy/colDef/gridDateOperators.js +4 -2
  88. package/legacy/colDef/gridNumericOperators.js +4 -2
  89. package/legacy/colDef/gridStringColDef.js +6 -0
  90. package/legacy/colDef/gridStringOperators.js +17 -7
  91. package/legacy/components/GridRow.js +1 -1
  92. package/legacy/components/base/GridOverlays.js +4 -1
  93. package/legacy/components/cell/GridBooleanCell.js +93 -2
  94. package/legacy/components/cell/GridEditDateCell.js +5 -1
  95. package/legacy/components/cell/index.js +1 -0
  96. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +6 -1
  97. package/legacy/components/containers/GridRootStyles.js +3 -3
  98. package/legacy/components/panel/filterPanel/GridFilterForm.js +9 -4
  99. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  100. package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  101. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +22 -7
  102. package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +24 -7
  103. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  104. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  105. package/legacy/components/toolbar/GridToolbarExport.js +20 -10
  106. package/legacy/constants/gridClasses.js +1 -1
  107. package/legacy/constants/localeTextConstants.js +8 -1
  108. package/legacy/hooks/features/columns/useGridColumnSpanning.js +9 -7
  109. package/legacy/hooks/features/columns/useGridColumns.js +13 -8
  110. package/legacy/hooks/features/dimensions/useGridDimensions.js +27 -15
  111. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  112. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +16 -8
  113. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  114. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +22 -14
  115. package/legacy/hooks/features/export/utils.js +9 -2
  116. package/legacy/hooks/features/filter/gridFilterUtils.js +6 -0
  117. package/legacy/hooks/features/filter/useGridFilter.js +30 -5
  118. package/legacy/hooks/features/pagination/useGridPage.js +4 -3
  119. package/legacy/hooks/features/pagination/useGridPageSize.js +4 -3
  120. package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
  121. package/legacy/hooks/features/rows/useGridRows.js +1 -1
  122. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  123. package/legacy/hooks/features/selection/useGridSelection.js +26 -12
  124. package/legacy/hooks/features/sorting/gridSortingUtils.js +11 -12
  125. package/legacy/hooks/features/sorting/useGridSorting.js +34 -6
  126. package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -1
  127. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +22 -12
  128. package/legacy/hooks/utils/useGridApiContext.js +1 -1
  129. package/legacy/hooks/utils/useGridNativeEventListener.js +1 -1
  130. package/legacy/hooks/utils/useGridRootProps.js +1 -1
  131. package/legacy/index.js +1 -1
  132. package/legacy/internals/index.js +2 -2
  133. package/legacy/locales/arSD.js +7 -0
  134. package/legacy/locales/bgBG.js +7 -0
  135. package/legacy/locales/csCZ.js +7 -0
  136. package/legacy/locales/daDK.js +7 -0
  137. package/legacy/locales/deDE.js +12 -5
  138. package/legacy/locales/elGR.js +7 -0
  139. package/legacy/locales/esES.js +7 -0
  140. package/legacy/locales/faIR.js +7 -0
  141. package/legacy/locales/fiFI.js +7 -0
  142. package/legacy/locales/frFR.js +17 -10
  143. package/legacy/locales/heIL.js +8 -1
  144. package/legacy/locales/huHU.js +7 -0
  145. package/legacy/locales/index.js +4 -1
  146. package/legacy/locales/itIT.js +7 -0
  147. package/legacy/locales/jaJP.js +8 -1
  148. package/legacy/locales/koKR.js +7 -0
  149. package/legacy/locales/nbNO.js +8 -1
  150. package/legacy/locales/nlNL.js +21 -14
  151. package/legacy/locales/plPL.js +7 -0
  152. package/legacy/locales/ptBR.js +17 -10
  153. package/legacy/locales/roRO.js +135 -0
  154. package/legacy/locales/ruRU.js +7 -0
  155. package/legacy/locales/skSK.js +22 -15
  156. package/legacy/locales/svSE.js +8 -1
  157. package/legacy/locales/trTR.js +7 -0
  158. package/legacy/locales/ukUA.js +7 -0
  159. package/legacy/locales/viVN.js +7 -0
  160. package/legacy/locales/zhCN.js +7 -0
  161. package/legacy/locales/zhTW.js +135 -0
  162. package/legacy/models/events/gridEvents.js +1 -0
  163. package/legacy/utils/keyboardUtils.js +4 -3
  164. package/locales/arSD.js +7 -0
  165. package/locales/bgBG.js +7 -0
  166. package/locales/csCZ.js +7 -0
  167. package/locales/daDK.js +7 -0
  168. package/locales/deDE.js +12 -5
  169. package/locales/elGR.js +7 -0
  170. package/locales/esES.js +7 -0
  171. package/locales/faIR.js +7 -0
  172. package/locales/fiFI.js +7 -0
  173. package/locales/frFR.js +17 -10
  174. package/locales/heIL.js +8 -1
  175. package/locales/huHU.js +7 -0
  176. package/locales/index.d.ts +3 -0
  177. package/locales/index.js +4 -1
  178. package/locales/itIT.js +7 -0
  179. package/locales/jaJP.js +8 -1
  180. package/locales/koKR.js +7 -0
  181. package/locales/nbNO.js +8 -1
  182. package/locales/nlNL.js +21 -14
  183. package/locales/plPL.js +7 -0
  184. package/locales/ptBR.js +17 -10
  185. package/locales/roRO.d.ts +2 -0
  186. package/locales/roRO.js +123 -0
  187. package/locales/ruRU.js +7 -0
  188. package/locales/skSK.js +22 -15
  189. package/locales/svSE.js +8 -1
  190. package/locales/trTR.js +7 -0
  191. package/locales/ukUA.js +7 -0
  192. package/locales/viVN.js +7 -0
  193. package/locales/zhCN.js +7 -0
  194. package/locales/zhTW.d.ts +2 -0
  195. package/locales/zhTW.js +123 -0
  196. package/models/api/gridColumnSpanning.d.ts +2 -0
  197. package/models/api/gridLocaleTextApi.d.ts +8 -2
  198. package/models/api/gridSelectionApi.d.ts +6 -0
  199. package/models/events/gridEvents.d.ts +1 -0
  200. package/models/events/gridEvents.js +1 -0
  201. package/models/gridFilterOperator.d.ts +6 -0
  202. package/models/gridRows.d.ts +10 -1
  203. package/models/params/gridCellParams.d.ts +4 -4
  204. package/modern/DataGrid/DataGrid.js +4 -4
  205. package/modern/DataGrid/useDataGridComponent.js +1 -1
  206. package/modern/colDef/gridActionsColDef.js +2 -0
  207. package/modern/colDef/gridBooleanColDef.js +3 -1
  208. package/modern/colDef/gridCheckboxSelectionColDef.js +2 -0
  209. package/modern/colDef/gridDateOperators.js +4 -2
  210. package/modern/colDef/gridNumericOperators.js +4 -2
  211. package/modern/colDef/gridStringColDef.js +6 -0
  212. package/modern/colDef/gridStringOperators.js +15 -8
  213. package/modern/components/GridRow.js +1 -1
  214. package/modern/components/base/GridOverlays.js +4 -1
  215. package/modern/components/cell/GridBooleanCell.js +93 -2
  216. package/modern/components/cell/GridEditDateCell.js +5 -1
  217. package/modern/components/cell/index.js +1 -0
  218. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
  219. package/modern/components/containers/GridRootStyles.js +10 -0
  220. package/modern/components/panel/filterPanel/GridFilterForm.js +11 -4
  221. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  222. package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  223. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +20 -8
  224. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +22 -8
  225. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  226. package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  227. package/modern/components/toolbar/GridToolbarExport.js +20 -10
  228. package/modern/constants/gridClasses.js +1 -1
  229. package/modern/constants/localeTextConstants.js +8 -1
  230. package/modern/hooks/features/columns/useGridColumnSpanning.js +9 -7
  231. package/modern/hooks/features/columns/useGridColumns.js +10 -5
  232. package/modern/hooks/features/dimensions/useGridDimensions.js +28 -15
  233. package/modern/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  234. package/modern/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  235. package/modern/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  236. package/modern/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  237. package/modern/hooks/features/export/utils.js +5 -2
  238. package/modern/hooks/features/filter/gridFilterUtils.js +6 -0
  239. package/modern/hooks/features/filter/useGridFilter.js +25 -4
  240. package/modern/hooks/features/pagination/useGridPage.js +4 -3
  241. package/modern/hooks/features/pagination/useGridPageSize.js +4 -3
  242. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +8 -4
  243. package/modern/hooks/features/rows/useGridRows.js +1 -1
  244. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  245. package/modern/hooks/features/selection/useGridSelection.js +22 -10
  246. package/modern/hooks/features/sorting/gridSortingUtils.js +10 -11
  247. package/modern/hooks/features/sorting/useGridSorting.js +30 -6
  248. package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  249. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +13 -7
  250. package/modern/hooks/utils/useGridApiContext.js +1 -1
  251. package/modern/hooks/utils/useGridNativeEventListener.js +1 -1
  252. package/modern/hooks/utils/useGridRootProps.js +1 -1
  253. package/modern/index.js +1 -1
  254. package/modern/internals/index.js +2 -2
  255. package/modern/locales/arSD.js +7 -0
  256. package/modern/locales/bgBG.js +7 -0
  257. package/modern/locales/csCZ.js +7 -0
  258. package/modern/locales/daDK.js +7 -0
  259. package/modern/locales/deDE.js +12 -5
  260. package/modern/locales/elGR.js +7 -0
  261. package/modern/locales/esES.js +7 -0
  262. package/modern/locales/faIR.js +7 -0
  263. package/modern/locales/fiFI.js +7 -0
  264. package/modern/locales/frFR.js +17 -10
  265. package/modern/locales/heIL.js +8 -1
  266. package/modern/locales/huHU.js +7 -0
  267. package/modern/locales/index.js +4 -1
  268. package/modern/locales/itIT.js +7 -0
  269. package/modern/locales/jaJP.js +8 -1
  270. package/modern/locales/koKR.js +7 -0
  271. package/modern/locales/nbNO.js +8 -1
  272. package/modern/locales/nlNL.js +21 -14
  273. package/modern/locales/plPL.js +7 -0
  274. package/modern/locales/ptBR.js +17 -10
  275. package/modern/locales/roRO.js +123 -0
  276. package/modern/locales/ruRU.js +7 -0
  277. package/modern/locales/skSK.js +22 -15
  278. package/modern/locales/svSE.js +8 -1
  279. package/modern/locales/trTR.js +7 -0
  280. package/modern/locales/ukUA.js +7 -0
  281. package/modern/locales/viVN.js +7 -0
  282. package/modern/locales/zhCN.js +7 -0
  283. package/modern/locales/zhTW.js +123 -0
  284. package/modern/models/events/gridEvents.js +1 -0
  285. package/modern/utils/keyboardUtils.js +4 -3
  286. package/node/DataGrid/DataGrid.js +4 -4
  287. package/node/DataGrid/useDataGridComponent.js +1 -1
  288. package/node/colDef/gridActionsColDef.js +2 -0
  289. package/node/colDef/gridBooleanColDef.js +3 -1
  290. package/node/colDef/gridCheckboxSelectionColDef.js +2 -0
  291. package/node/colDef/gridDateOperators.js +4 -2
  292. package/node/colDef/gridNumericOperators.js +4 -2
  293. package/node/colDef/gridStringColDef.js +5 -0
  294. package/node/colDef/gridStringOperators.js +15 -8
  295. package/node/components/GridRow.js +1 -1
  296. package/node/components/base/GridOverlays.js +4 -1
  297. package/node/components/cell/GridBooleanCell.js +93 -2
  298. package/node/components/cell/GridEditDateCell.js +7 -1
  299. package/node/components/cell/index.js +13 -0
  300. package/node/components/columnSelection/GridCellCheckboxRenderer.js +7 -1
  301. package/node/components/containers/GridRootStyles.js +10 -0
  302. package/node/components/panel/filterPanel/GridFilterForm.js +9 -4
  303. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  304. package/node/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  305. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +31 -15
  306. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +33 -15
  307. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  308. package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  309. package/node/components/toolbar/GridToolbarExport.js +16 -10
  310. package/node/constants/gridClasses.js +1 -1
  311. package/node/constants/localeTextConstants.js +8 -1
  312. package/node/hooks/features/columns/useGridColumnSpanning.js +9 -7
  313. package/node/hooks/features/columns/useGridColumns.js +13 -6
  314. package/node/hooks/features/dimensions/useGridDimensions.js +28 -15
  315. package/node/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  316. package/node/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  317. package/node/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  318. package/node/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  319. package/node/hooks/features/export/utils.js +10 -2
  320. package/node/hooks/features/filter/gridFilterUtils.js +7 -0
  321. package/node/hooks/features/filter/useGridFilter.js +30 -5
  322. package/node/hooks/features/pagination/useGridPage.js +4 -3
  323. package/node/hooks/features/pagination/useGridPageSize.js +4 -3
  324. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +12 -4
  325. package/node/hooks/features/rows/useGridRows.js +1 -1
  326. package/node/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  327. package/node/hooks/features/selection/useGridSelection.js +24 -10
  328. package/node/hooks/features/sorting/gridSortingUtils.js +10 -11
  329. package/node/hooks/features/sorting/useGridSorting.js +34 -6
  330. package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
  331. package/node/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
  332. package/node/hooks/utils/useGridApiContext.js +1 -1
  333. package/node/hooks/utils/useGridNativeEventListener.js +1 -1
  334. package/node/hooks/utils/useGridRootProps.js +1 -1
  335. package/node/index.js +1 -1
  336. package/node/internals/index.js +18 -0
  337. package/node/locales/arSD.js +7 -0
  338. package/node/locales/bgBG.js +7 -0
  339. package/node/locales/csCZ.js +7 -0
  340. package/node/locales/daDK.js +7 -0
  341. package/node/locales/deDE.js +12 -5
  342. package/node/locales/elGR.js +7 -0
  343. package/node/locales/esES.js +7 -0
  344. package/node/locales/faIR.js +7 -0
  345. package/node/locales/fiFI.js +7 -0
  346. package/node/locales/frFR.js +17 -10
  347. package/node/locales/heIL.js +8 -1
  348. package/node/locales/huHU.js +7 -0
  349. package/node/locales/index.js +39 -0
  350. package/node/locales/itIT.js +7 -0
  351. package/node/locales/jaJP.js +8 -1
  352. package/node/locales/koKR.js +7 -0
  353. package/node/locales/nbNO.js +8 -1
  354. package/node/locales/nlNL.js +21 -14
  355. package/node/locales/plPL.js +7 -0
  356. package/node/locales/ptBR.js +17 -10
  357. package/node/locales/roRO.js +133 -0
  358. package/node/locales/ruRU.js +7 -0
  359. package/node/locales/skSK.js +22 -15
  360. package/node/locales/svSE.js +8 -1
  361. package/node/locales/trTR.js +7 -0
  362. package/node/locales/ukUA.js +7 -0
  363. package/node/locales/viVN.js +7 -0
  364. package/node/locales/zhCN.js +7 -0
  365. package/node/locales/zhTW.js +133 -0
  366. package/node/models/events/gridEvents.js +1 -0
  367. package/node/utils/keyboardUtils.js +4 -3
  368. package/package.json +3 -3
  369. package/utils/getGridLocalization.d.ts +1 -1
  370. package/utils/keyboardUtils.js +4 -3
@@ -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,6 +1,10 @@
1
1
  import { renderEditInputCell } from '../components/cell/GridEditInputCell';
2
2
  import { gridStringOrNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
3
3
  import { getGridStringOperators, getGridStringQuickFilterFn } from './gridStringOperators';
4
+ /**
5
+ * TODO: Move pro and premium properties outside of this Community file
6
+ */
7
+
4
8
  export const GRID_STRING_COL_DEF = {
5
9
  width: 100,
6
10
  minWidth: 50,
@@ -12,6 +16,8 @@ export const GRID_STRING_COL_DEF = {
12
16
  filterable: true,
13
17
  groupable: true,
14
18
  pinnable: true,
19
+ // @ts-ignore
20
+ private_aggregable: true,
15
21
  editable: false,
16
22
  sortComparator: gridStringOrNumberComparator,
17
23
  type: 'string',
@@ -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
  },
@@ -110,7 +110,7 @@ function GridRow(props) {
110
110
  // Fallback for IE
111
111
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, ref.current.clientHeight);
112
112
  }
113
- });
113
+ }, [apiRef, rowHeight, rowId]);
114
114
  React.useLayoutEffect(() => {
115
115
  if (currentPage.range) {
116
116
  // The index prop is relative to the rows from all pages. As example, the index prop of the
@@ -36,7 +36,10 @@ function GridOverlayWrapper(props) {
36
36
  width: viewportInnerSize?.width ?? 0,
37
37
  position: 'absolute',
38
38
  top: headerHeight,
39
- bottom: height === 'auto' ? 0 : undefined
39
+ bottom: height === 'auto' ? 0 : undefined,
40
+ zIndex: 3,
41
+ // should be above pinned columns and detail panel
42
+ pointerEvents: 'none'
40
43
  }
41
44
  }, props));
42
45
  }
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "hasFocus", "tabIndex", "getValue"];
4
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
5
6
  import { unstable_composeClasses as composeClasses } from '@mui/material';
6
7
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
7
8
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
@@ -18,7 +19,7 @@ const useUtilityClasses = ownerState => {
18
19
  return composeClasses(slots, getDataGridUtilityClass, classes);
19
20
  };
20
21
 
21
- export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
22
+ const GridBooleanCellRaw = props => {
22
23
  const {
23
24
  value
24
25
  } = props,
@@ -37,7 +38,97 @@ export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
37
38
  titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
38
39
  "data-value": Boolean(value)
39
40
  }, other));
40
- });
41
+ };
42
+
43
+ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
44
+ // ----------------------------- Warning --------------------------------
45
+ // | These PropTypes are generated from the TypeScript type definitions |
46
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
47
+ // ----------------------------------------------------------------------
48
+
49
+ /**
50
+ * GridApi that let you manipulate the grid.
51
+ * @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
52
+ */
53
+ api: PropTypes.any.isRequired,
54
+
55
+ /**
56
+ * The mode of the cell.
57
+ */
58
+ cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
59
+
60
+ /**
61
+ * The column of the row that the current cell belongs to.
62
+ */
63
+ colDef: PropTypes.object.isRequired,
64
+
65
+ /**
66
+ * The column field of the cell that triggered the event.
67
+ */
68
+ field: PropTypes.string.isRequired,
69
+
70
+ /**
71
+ * A ref allowing to set imperative focus.
72
+ * It can be passed to the element that should receive focus.
73
+ * @ignore - do not document.
74
+ */
75
+ focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
76
+ current: PropTypes.shape({
77
+ focus: PropTypes.func.isRequired
78
+ })
79
+ })]),
80
+
81
+ /**
82
+ * The cell value formatted with the column valueFormatter.
83
+ */
84
+ formattedValue: PropTypes.any,
85
+
86
+ /**
87
+ * Get the cell value of a row and field.
88
+ * @param {GridRowId} id The row id.
89
+ * @param {string} field The field.
90
+ * @returns {any} The cell value.
91
+ * @deprecated Use `params.row` to directly access the fields you want instead.
92
+ */
93
+ getValue: PropTypes.func.isRequired,
94
+
95
+ /**
96
+ * If true, the cell is the active element.
97
+ */
98
+ hasFocus: PropTypes.bool.isRequired,
99
+
100
+ /**
101
+ * The grid row id.
102
+ */
103
+ id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
104
+
105
+ /**
106
+ * If true, the cell is editable.
107
+ */
108
+ isEditable: PropTypes.bool,
109
+
110
+ /**
111
+ * The row model of the row that the current cell belongs to.
112
+ */
113
+ row: PropTypes.object.isRequired,
114
+
115
+ /**
116
+ * The node of the row that the current cell belongs to.
117
+ */
118
+ rowNode: PropTypes.object.isRequired,
119
+
120
+ /**
121
+ * the tabIndex value.
122
+ */
123
+ tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
124
+
125
+ /**
126
+ * The cell value, but if the column has valueGetter, use getValue.
127
+ */
128
+ value: PropTypes.any
129
+ } : void 0;
130
+ const GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
131
+ export { GridBooleanCell };
41
132
  export const renderBooleanCell = params => {
42
133
  if (params.rowNode.isAutoGenerated) {
43
134
  return '';
@@ -6,10 +6,14 @@ import PropTypes from 'prop-types';
6
6
  import { unstable_composeClasses as composeClasses } from '@mui/material';
7
7
  import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
8
8
  import InputBase from '@mui/material/InputBase';
9
+ import { styled } from '@mui/material/styles';
9
10
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
10
11
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
11
12
  import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ const StyledInputBase = styled(InputBase)({
15
+ fontSize: 'inherit'
16
+ });
13
17
 
14
18
  const useUtilityClasses = ownerState => {
15
19
  const {
@@ -114,7 +118,7 @@ function GridEditDateCell(props) {
114
118
  inputRef.current.focus();
115
119
  }
116
120
  }, [hasFocus]);
117
- return /*#__PURE__*/_jsx(InputBase, _extends({
121
+ return /*#__PURE__*/_jsx(StyledInputBase, _extends({
118
122
  inputRef: inputRef,
119
123
  fullWidth: true,
120
124
  className: classes.root,
@@ -1,4 +1,5 @@
1
1
  export * from './GridCell';
2
+ export * from './GridBooleanCell';
2
3
  export * from './GridEditBooleanCell';
3
4
  export * from './GridEditDateCell';
4
5
  export * from './GridEditInputCell';
@@ -26,6 +26,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
26
26
  field,
27
27
  id,
28
28
  value: isChecked,
29
+ rowNode,
29
30
  hasFocus,
30
31
  tabIndex
31
32
  } = props,
@@ -73,7 +74,12 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
73
74
  apiRef.current.publishEvent('cellNavigationKeyDown', props, event);
74
75
  }
75
76
  }, [apiRef, props]);
76
- const isSelectable = !rootProps.isRowSelectable || rootProps.isRowSelectable(apiRef.current.getRowParams(id));
77
+
78
+ if (rowNode.position === 'footer') {
79
+ return null;
80
+ }
81
+
82
+ const isSelectable = apiRef.current.isRowSelectable(id);
77
83
  const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
78
84
  return /*#__PURE__*/_jsx(rootProps.components.BaseCheckbox, _extends({
79
85
  ref: handleRef,
@@ -6,6 +6,16 @@ export const GridRootStyles = styled('div', {
6
6
  slot: 'Root',
7
7
  overridesResolver: (props, styles) => [{
8
8
  [`&.${gridClasses.autoHeight}`]: styles.autoHeight
9
+ }, {
10
+ [`&.${gridClasses.aggregationColumnHeader}`]: styles.aggregationColumnHeader
11
+ }, {
12
+ [`&.${gridClasses['aggregationColumnHeader--alignLeft']}`]: styles['aggregationColumnHeader--alignLeft']
13
+ }, {
14
+ [`&.${gridClasses['aggregationColumnHeader--alignCenter']}`]: styles['aggregationColumnHeader--alignCenter']
15
+ }, {
16
+ [`&.${gridClasses['aggregationColumnHeader--alignRight']}`]: styles['aggregationColumnHeader--alignRight']
17
+ }, {
18
+ [`&.${gridClasses.aggregationColumnHeaderLabel}`]: styles.aggregationColumnHeaderLabel
9
19
  }, {
10
20
  [`& .${gridClasses.editBooleanCell}`]: styles.editBooleanCell
11
21
  }, {
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterChanges", "multiFilterOperator", "showMultiFilterOperators", "disableMultiFilterOperator", "applyMultiFilterOperatorChanges", "focusElementRef", "linkOperators", "columnsSort", "deleteIconProps", "linkOperatorInputProps", "operatorInputProps", "columnInputProps", "valueInputProps", "children"];
3
+ const _excluded = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterChanges", "multiFilterOperator", "showMultiFilterOperators", "disableMultiFilterOperator", "applyMultiFilterOperatorChanges", "focusElementRef", "linkOperators", "columnsSort", "deleteIconProps", "linkOperatorInputProps", "operatorInputProps", "columnInputProps", "valueInputProps", "children"],
4
+ _excluded2 = ["InputComponentProps"];
4
5
  import * as React from 'react';
5
6
  import PropTypes from 'prop-types';
6
7
  import { unstable_composeClasses as composeClasses } from '@mui/material';
@@ -143,6 +144,12 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
143
144
  const baseSelectProps = rootProps.componentsProps?.baseSelect || {};
144
145
  const isBaseSelectNative = baseSelectProps.native ?? true;
145
146
  const OptionComponent = isBaseSelectNative ? 'option' : MenuItem;
147
+
148
+ const {
149
+ InputComponentProps
150
+ } = valueInputProps,
151
+ valueInputPropsOther = _objectWithoutPropertiesLoose(valueInputProps, _excluded2);
152
+
146
153
  const sortedFilterableColumns = React.useMemo(() => {
147
154
  switch (columnsSort) {
148
155
  case 'asc':
@@ -309,14 +316,14 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
309
316
  })), /*#__PURE__*/_jsx(FilterFormValueInput, _extends({
310
317
  variant: "standard",
311
318
  as: rootProps.components.BaseFormControl
312
- }, baseFormControlProps, valueInputProps, {
313
- className: clsx(classes.valueInput, baseFormControlProps.className, valueInputProps.className),
319
+ }, baseFormControlProps, valueInputPropsOther, {
320
+ className: clsx(classes.valueInput, baseFormControlProps.className, valueInputPropsOther.className),
314
321
  children: currentOperator?.InputComponent ? /*#__PURE__*/_jsx(currentOperator.InputComponent, _extends({
315
322
  apiRef: apiRef,
316
323
  item: item,
317
324
  applyValue: applyFilterChanges,
318
325
  focusElementRef: valueRef
319
- }, currentOperator.InputComponentProps)) : null
326
+ }, currentOperator.InputComponentProps, InputComponentProps)) : null
320
327
  }))]
321
328
  }));
322
329
  });
@@ -34,8 +34,8 @@ export function GridFilterInputBoolean(props) {
34
34
  label: apiRef.current.getLocaleText('filterPanelInputLabel'),
35
35
  value: filterValueState,
36
36
  onChange: onFilterChange,
37
- variant: "standard",
38
37
  select: true,
38
+ variant: "standard",
39
39
  SelectProps: _extends({
40
40
  native: isSelectNative,
41
41
  displayEmpty: true
@@ -52,8 +52,8 @@ function GridFilterInputDate(props) {
52
52
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
53
53
  value: filterValueState,
54
54
  onChange: onFilterChange,
55
- type: type || 'text',
56
55
  variant: "standard",
56
+ type: type || 'text',
57
57
  InputLabelProps: {
58
58
  shrink: true
59
59
  },
@@ -73,7 +73,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
73
73
  // | These PropTypes are generated from the TypeScript type definitions |
74
74
  // | To update them edit the TypeScript types and run "yarn proptypes" |
75
75
  // ----------------------------------------------------------------------
76
- apiRef: PropTypes.any.isRequired,
76
+ apiRef: PropTypes.shape({
77
+ current: PropTypes.object.isRequired
78
+ }).isRequired,
77
79
  applyValue: PropTypes.func.isRequired,
78
80
  focusElementRef: PropTypes
79
81
  /* @typescript-to-proptypes-ignore */
@@ -1,13 +1,13 @@
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"];
3
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import Autocomplete, { createFilterOptions } from '@mui/material/Autocomplete';
7
7
  import Chip from '@mui/material/Chip';
8
- import TextField from '@mui/material/TextField';
9
8
  import { unstable_useId as useId } from '@mui/material/utils';
10
9
  import { getValueFromOption } from './filterPanelUtils';
10
+ import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
 
13
13
  const isOptionEqualToValue = (option, value) => getValueFromOption(option) === getValueFromOption(value);
@@ -19,11 +19,24 @@ function GridFilterInputMultipleSingleSelect(props) {
19
19
  item,
20
20
  applyValue,
21
21
  apiRef,
22
- focusElementRef
22
+ focusElementRef,
23
+ color,
24
+ error,
25
+ helperText,
26
+ size,
27
+ variant = 'standard'
23
28
  } = props,
24
29
  other = _objectWithoutPropertiesLoose(props, _excluded);
25
30
 
31
+ const TextFieldProps = {
32
+ color,
33
+ error,
34
+ helperText,
35
+ size,
36
+ variant
37
+ };
26
38
  const id = useId();
39
+ const rootProps = useGridRootProps();
27
40
  const resolvedColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
28
41
  const resolvedValueOptions = React.useMemo(() => {
29
42
  if (!resolvedColumn?.valueOptions) {
@@ -67,7 +80,7 @@ function GridFilterInputMultipleSingleSelect(props) {
67
80
 
68
81
  if (resolvedValueOptions !== undefined) {
69
82
  const itemValueIndexes = item.value.map(element => {
70
- // get the index matching between values and valueoptions
83
+ // get the index matching between values and valueOptions
71
84
  const formattedElement = getValueFromOption(element);
72
85
  const index = resolvedFormattedValueOptions?.findIndex(formatedOption => formatedOption === formattedElement) || 0;
73
86
  return index;
@@ -106,16 +119,15 @@ function GridFilterInputMultipleSingleSelect(props) {
106
119
  }, getTagProps({
107
120
  index
108
121
  })))),
109
- renderInput: params => /*#__PURE__*/_jsx(TextField, _extends({}, params, {
122
+ renderInput: params => /*#__PURE__*/_jsx(rootProps.components.BaseTextField, _extends({}, params, {
110
123
  label: apiRef.current.getLocaleText('filterPanelInputLabel'),
111
124
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
112
125
  InputLabelProps: _extends({}, params.InputLabelProps, {
113
126
  shrink: true
114
127
  }),
115
128
  inputRef: focusElementRef,
116
- type: 'singleSelect',
117
- variant: "standard"
118
- }))
129
+ type: "singleSelect"
130
+ }, TextFieldProps, rootProps.componentsProps?.baseTextField))
119
131
  }, other));
120
132
  }
121
133
 
@@ -1,12 +1,12 @@
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"];
3
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import Autocomplete from '@mui/material/Autocomplete';
7
7
  import Chip from '@mui/material/Chip';
8
- import TextField from '@mui/material/TextField';
9
8
  import { unstable_useId as useId } from '@mui/material/utils';
9
+ import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
 
12
12
  function GridFilterInputMultipleValue(props) {
@@ -15,12 +15,25 @@ function GridFilterInputMultipleValue(props) {
15
15
  applyValue,
16
16
  type,
17
17
  apiRef,
18
- focusElementRef
18
+ focusElementRef,
19
+ color,
20
+ error,
21
+ helperText,
22
+ size,
23
+ variant
19
24
  } = props,
20
25
  other = _objectWithoutPropertiesLoose(props, _excluded);
21
26
 
27
+ const TextFieldProps = {
28
+ color,
29
+ error,
30
+ helperText,
31
+ size,
32
+ variant
33
+ };
22
34
  const [filterValueState, setFilterValueState] = React.useState(item.value || []);
23
35
  const id = useId();
36
+ const rootProps = useGridRootProps();
24
37
  React.useEffect(() => {
25
38
  const itemValue = item.value ?? [];
26
39
  setFilterValueState(itemValue.map(String));
@@ -52,16 +65,15 @@ function GridFilterInputMultipleValue(props) {
52
65
  }, getTagProps({
53
66
  index
54
67
  })))),
55
- renderInput: params => /*#__PURE__*/_jsx(TextField, _extends({}, params, {
68
+ renderInput: params => /*#__PURE__*/_jsx(rootProps.components.BaseTextField, _extends({}, params, {
56
69
  label: apiRef.current.getLocaleText('filterPanelInputLabel'),
57
70
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
58
71
  InputLabelProps: _extends({}, params.InputLabelProps, {
59
72
  shrink: true
60
73
  }),
61
74
  inputRef: focusElementRef,
62
- type: type || 'text',
63
- variant: "standard"
64
- }))
75
+ type: type || 'text'
76
+ }, TextFieldProps, rootProps.componentsProps?.baseTextField))
65
77
  }, other));
66
78
  }
67
79
 
@@ -70,7 +82,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputMultipleValue.propTypes =
70
82
  // | These PropTypes are generated from the TypeScript type definitions |
71
83
  // | To update them edit the TypeScript types and run "yarn proptypes" |
72
84
  // ----------------------------------------------------------------------
73
- apiRef: PropTypes.any.isRequired,
85
+ apiRef: PropTypes.shape({
86
+ current: PropTypes.object.isRequired
87
+ }).isRequired,
74
88
  applyValue: PropTypes.func.isRequired,
75
89
  focusElementRef: PropTypes
76
90
  /* @typescript-to-proptypes-ignore */
@@ -51,6 +51,10 @@ function GridFilterInputSingleSelect(props) {
51
51
  const isSelectNative = baseSelectProps.native ?? true;
52
52
  const currentColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
53
53
  const currentValueOptions = React.useMemo(() => {
54
+ if (currentColumn === null) {
55
+ return undefined;
56
+ }
57
+
54
58
  return typeof currentColumn.valueOptions === 'function' ? currentColumn.valueOptions({
55
59
  field: currentColumn.field
56
60
  }) : currentColumn.valueOptions;
@@ -90,8 +94,8 @@ function GridFilterInputSingleSelect(props) {
90
94
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
91
95
  value: filterValueState,
92
96
  onChange: onFilterChange,
93
- type: type || 'text',
94
97
  variant: "standard",
98
+ type: type || 'text',
95
99
  InputLabelProps: {
96
100
  shrink: true
97
101
  },
@@ -110,7 +114,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
110
114
  // | These PropTypes are generated from the TypeScript type definitions |
111
115
  // | To update them edit the TypeScript types and run "yarn proptypes" |
112
116
  // ----------------------------------------------------------------------
113
- apiRef: PropTypes.any.isRequired,
117
+ apiRef: PropTypes.shape({
118
+ current: PropTypes.object.isRequired
119
+ }).isRequired,
114
120
  applyValue: PropTypes.func.isRequired,
115
121
  focusElementRef: PropTypes
116
122
  /* @typescript-to-proptypes-ignore */
@@ -111,8 +111,8 @@ function GridFilterInputValue(props) {
111
111
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
112
112
  value: filterValueState,
113
113
  onChange: onFilterChange,
114
- type: type || 'text',
115
114
  variant: "standard",
115
+ type: type || 'text',
116
116
  InputProps: InputProps,
117
117
  InputLabelProps: {
118
118
  shrink: true
@@ -126,7 +126,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
126
126
  // | These PropTypes are generated from the TypeScript type definitions |
127
127
  // | To update them edit the TypeScript types and run "yarn proptypes" |
128
128
  // ----------------------------------------------------------------------
129
- apiRef: PropTypes.any.isRequired,
129
+ apiRef: PropTypes.shape({
130
+ current: PropTypes.object.isRequired
131
+ }).isRequired,
130
132
  applyValue: PropTypes.func.isRequired,
131
133
  focusElementRef: PropTypes
132
134
  /* @typescript-to-proptypes-ignore */