@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
@@ -26,14 +26,15 @@ const getGridStringQuickFilterFn = value => {
26
26
 
27
27
  exports.getGridStringQuickFilterFn = getGridStringQuickFilterFn;
28
28
 
29
- const getGridStringOperators = () => [{
29
+ const getGridStringOperators = (disableTrim = false) => [{
30
30
  value: 'contains',
31
31
  getApplyFilterFn: filterItem => {
32
32
  if (!filterItem.value) {
33
33
  return null;
34
34
  }
35
35
 
36
- const filterRegex = new RegExp((0, _utils.escapeRegExp)(filterItem.value), 'i');
36
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
37
+ const filterRegex = new RegExp((0, _utils.escapeRegExp)(filterItemValue), 'i');
37
38
  return ({
38
39
  value
39
40
  }) => {
@@ -48,6 +49,7 @@ const getGridStringOperators = () => [{
48
49
  return null;
49
50
  }
50
51
 
52
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
51
53
  const collator = new Intl.Collator(undefined, {
52
54
  sensitivity: 'base',
53
55
  usage: 'search'
@@ -55,7 +57,7 @@ const getGridStringOperators = () => [{
55
57
  return ({
56
58
  value
57
59
  }) => {
58
- return value != null ? collator.compare(filterItem.value, value.toString()) === 0 : false;
60
+ return value != null ? collator.compare(filterItemValue, value.toString()) === 0 : false;
59
61
  };
60
62
  },
61
63
  InputComponent: _GridFilterInputValue.GridFilterInputValue
@@ -66,7 +68,8 @@ const getGridStringOperators = () => [{
66
68
  return null;
67
69
  }
68
70
 
69
- const filterRegex = new RegExp(`^${(0, _utils.escapeRegExp)(filterItem.value)}.*$`, 'i');
71
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
72
+ const filterRegex = new RegExp(`^${(0, _utils.escapeRegExp)(filterItemValue)}.*$`, 'i');
70
73
  return ({
71
74
  value
72
75
  }) => {
@@ -81,7 +84,8 @@ const getGridStringOperators = () => [{
81
84
  return null;
82
85
  }
83
86
 
84
- const filterRegex = new RegExp(`.*${(0, _utils.escapeRegExp)(filterItem.value)}$`, 'i');
87
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
88
+ const filterRegex = new RegExp(`.*${(0, _utils.escapeRegExp)(filterItemValue)}$`, 'i');
85
89
  return ({
86
90
  value
87
91
  }) => {
@@ -97,7 +101,8 @@ const getGridStringOperators = () => [{
97
101
  }) => {
98
102
  return value === '' || value == null;
99
103
  };
100
- }
104
+ },
105
+ requiresFilterValue: false
101
106
  }, {
102
107
  value: 'isNotEmpty',
103
108
  getApplyFilterFn: () => {
@@ -106,7 +111,8 @@ const getGridStringOperators = () => [{
106
111
  }) => {
107
112
  return value !== '' && value != null;
108
113
  };
109
- }
114
+ },
115
+ requiresFilterValue: false
110
116
  }, {
111
117
  value: 'isAnyOf',
112
118
  getApplyFilterFn: filterItem => {
@@ -114,13 +120,14 @@ const getGridStringOperators = () => [{
114
120
  return null;
115
121
  }
116
122
 
123
+ const filterItemValue = disableTrim ? filterItem.value : filterItem.value.map(val => val.trim());
117
124
  const collator = new Intl.Collator(undefined, {
118
125
  sensitivity: 'base',
119
126
  usage: 'search'
120
127
  });
121
128
  return ({
122
129
  value
123
- }) => value != null ? filterItem.value.some(filterValue => {
130
+ }) => value != null ? filterItemValue.some(filterValue => {
124
131
  return collator.compare(filterValue, value.toString() || '') === 0;
125
132
  }) : false;
126
133
  },
@@ -139,7 +139,7 @@ function GridRow(props) {
139
139
  // Fallback for IE
140
140
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, ref.current.clientHeight);
141
141
  }
142
- });
142
+ }, [apiRef, rowHeight, rowId]);
143
143
  React.useLayoutEffect(() => {
144
144
  if (currentPage.range) {
145
145
  // The index prop is relative to the rows from all pages. As example, the index prop of the
@@ -66,7 +66,10 @@ function GridOverlayWrapper(props) {
66
66
  width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0,
67
67
  position: 'absolute',
68
68
  top: headerHeight,
69
- bottom: height === 'auto' ? 0 : undefined
69
+ bottom: height === 'auto' ? 0 : undefined,
70
+ zIndex: 3,
71
+ // should be above pinned columns and detail panel
72
+ pointerEvents: 'none'
70
73
  }
71
74
  }, props));
72
75
  }
@@ -13,6 +13,8 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
13
13
 
14
14
  var React = _interopRequireWildcard(require("react"));
15
15
 
16
+ var _propTypes = _interopRequireDefault(require("prop-types"));
17
+
16
18
  var _material = require("@mui/material");
17
19
 
18
20
  var _gridClasses = require("../../constants/gridClasses");
@@ -39,7 +41,7 @@ const useUtilityClasses = ownerState => {
39
41
  return (0, _material.unstable_composeClasses)(slots, _gridClasses.getDataGridUtilityClass, classes);
40
42
  };
41
43
 
42
- const GridBooleanCell = /*#__PURE__*/React.memo(props => {
44
+ const GridBooleanCellRaw = props => {
43
45
  const {
44
46
  value
45
47
  } = props,
@@ -57,7 +59,96 @@ const GridBooleanCell = /*#__PURE__*/React.memo(props => {
57
59
  titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
58
60
  "data-value": Boolean(value)
59
61
  }, other));
60
- });
62
+ };
63
+
64
+ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
65
+ // ----------------------------- Warning --------------------------------
66
+ // | These PropTypes are generated from the TypeScript type definitions |
67
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
68
+ // ----------------------------------------------------------------------
69
+
70
+ /**
71
+ * GridApi that let you manipulate the grid.
72
+ * @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
73
+ */
74
+ api: _propTypes.default.any.isRequired,
75
+
76
+ /**
77
+ * The mode of the cell.
78
+ */
79
+ cellMode: _propTypes.default.oneOf(['edit', 'view']).isRequired,
80
+
81
+ /**
82
+ * The column of the row that the current cell belongs to.
83
+ */
84
+ colDef: _propTypes.default.object.isRequired,
85
+
86
+ /**
87
+ * The column field of the cell that triggered the event.
88
+ */
89
+ field: _propTypes.default.string.isRequired,
90
+
91
+ /**
92
+ * A ref allowing to set imperative focus.
93
+ * It can be passed to the element that should receive focus.
94
+ * @ignore - do not document.
95
+ */
96
+ focusElementRef: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.shape({
97
+ current: _propTypes.default.shape({
98
+ focus: _propTypes.default.func.isRequired
99
+ })
100
+ })]),
101
+
102
+ /**
103
+ * The cell value formatted with the column valueFormatter.
104
+ */
105
+ formattedValue: _propTypes.default.any,
106
+
107
+ /**
108
+ * Get the cell value of a row and field.
109
+ * @param {GridRowId} id The row id.
110
+ * @param {string} field The field.
111
+ * @returns {any} The cell value.
112
+ * @deprecated Use `params.row` to directly access the fields you want instead.
113
+ */
114
+ getValue: _propTypes.default.func.isRequired,
115
+
116
+ /**
117
+ * If true, the cell is the active element.
118
+ */
119
+ hasFocus: _propTypes.default.bool.isRequired,
120
+
121
+ /**
122
+ * The grid row id.
123
+ */
124
+ id: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
125
+
126
+ /**
127
+ * If true, the cell is editable.
128
+ */
129
+ isEditable: _propTypes.default.bool,
130
+
131
+ /**
132
+ * The row model of the row that the current cell belongs to.
133
+ */
134
+ row: _propTypes.default.object.isRequired,
135
+
136
+ /**
137
+ * The node of the row that the current cell belongs to.
138
+ */
139
+ rowNode: _propTypes.default.object.isRequired,
140
+
141
+ /**
142
+ * the tabIndex value.
143
+ */
144
+ tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
145
+
146
+ /**
147
+ * The cell value, but if the column has valueGetter, use getValue.
148
+ */
149
+ value: _propTypes.default.any
150
+ } : void 0;
151
+ const GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
61
152
  exports.GridBooleanCell = GridBooleanCell;
62
153
 
63
154
  const renderBooleanCell = params => {
@@ -22,6 +22,8 @@ var _utils = require("@mui/material/utils");
22
22
 
23
23
  var _InputBase = _interopRequireDefault(require("@mui/material/InputBase"));
24
24
 
25
+ var _styles = require("@mui/material/styles");
26
+
25
27
  var _gridClasses = require("../../constants/gridClasses");
26
28
 
27
29
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
@@ -36,6 +38,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
36
38
 
37
39
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
38
40
 
41
+ const StyledInputBase = (0, _styles.styled)(_InputBase.default)({
42
+ fontSize: 'inherit'
43
+ });
44
+
39
45
  const useUtilityClasses = ownerState => {
40
46
  const {
41
47
  classes
@@ -140,7 +146,7 @@ function GridEditDateCell(props) {
140
146
  inputRef.current.focus();
141
147
  }
142
148
  }, [hasFocus]);
143
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, (0, _extends2.default)({
149
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledInputBase, (0, _extends2.default)({
144
150
  inputRef: inputRef,
145
151
  fullWidth: true,
146
152
  className: classes.root,
@@ -17,6 +17,19 @@ Object.keys(_GridCell).forEach(function (key) {
17
17
  });
18
18
  });
19
19
 
20
+ var _GridBooleanCell = require("./GridBooleanCell");
21
+
22
+ Object.keys(_GridBooleanCell).forEach(function (key) {
23
+ if (key === "default" || key === "__esModule") return;
24
+ if (key in exports && exports[key] === _GridBooleanCell[key]) return;
25
+ Object.defineProperty(exports, key, {
26
+ enumerable: true,
27
+ get: function () {
28
+ return _GridBooleanCell[key];
29
+ }
30
+ });
31
+ });
32
+
20
33
  var _GridEditBooleanCell = require("./GridEditBooleanCell");
21
34
 
22
35
  Object.keys(_GridEditBooleanCell).forEach(function (key) {
@@ -52,6 +52,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
52
52
  field,
53
53
  id,
54
54
  value: isChecked,
55
+ rowNode,
55
56
  hasFocus,
56
57
  tabIndex
57
58
  } = props,
@@ -100,7 +101,12 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
100
101
  apiRef.current.publishEvent('cellNavigationKeyDown', props, event);
101
102
  }
102
103
  }, [apiRef, props]);
103
- const isSelectable = !rootProps.isRowSelectable || rootProps.isRowSelectable(apiRef.current.getRowParams(id));
104
+
105
+ if (rowNode.position === 'footer') {
106
+ return null;
107
+ }
108
+
109
+ const isSelectable = apiRef.current.isRowSelectable(id);
104
110
  const label = apiRef.current.getLocaleText(isChecked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
105
111
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseCheckbox, (0, _extends2.default)({
106
112
  ref: handleRef,
@@ -18,6 +18,16 @@ const GridRootStyles = (0, _styles.styled)('div', {
18
18
  slot: 'Root',
19
19
  overridesResolver: (props, styles) => [{
20
20
  [`&.${_gridClasses.gridClasses.autoHeight}`]: styles.autoHeight
21
+ }, {
22
+ [`&.${_gridClasses.gridClasses.aggregationColumnHeader}`]: styles.aggregationColumnHeader
23
+ }, {
24
+ [`&.${_gridClasses.gridClasses['aggregationColumnHeader--alignLeft']}`]: styles['aggregationColumnHeader--alignLeft']
25
+ }, {
26
+ [`&.${_gridClasses.gridClasses['aggregationColumnHeader--alignCenter']}`]: styles['aggregationColumnHeader--alignCenter']
27
+ }, {
28
+ [`&.${_gridClasses.gridClasses['aggregationColumnHeader--alignRight']}`]: styles['aggregationColumnHeader--alignRight']
29
+ }, {
30
+ [`&.${_gridClasses.gridClasses.aggregationColumnHeaderLabel}`]: styles.aggregationColumnHeaderLabel
21
31
  }, {
22
32
  [`& .${_gridClasses.gridClasses.editBooleanCell}`]: styles.editBooleanCell
23
33
  }, {
@@ -45,7 +45,8 @@ var _gridClasses = require("../../../constants/gridClasses");
45
45
 
46
46
  var _jsxRuntime = require("react/jsx-runtime");
47
47
 
48
- const _excluded = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterChanges", "multiFilterOperator", "showMultiFilterOperators", "disableMultiFilterOperator", "applyMultiFilterOperatorChanges", "focusElementRef", "linkOperators", "columnsSort", "deleteIconProps", "linkOperatorInputProps", "operatorInputProps", "columnInputProps", "valueInputProps", "children"];
48
+ const _excluded = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterChanges", "multiFilterOperator", "showMultiFilterOperators", "disableMultiFilterOperator", "applyMultiFilterOperatorChanges", "focusElementRef", "linkOperators", "columnsSort", "deleteIconProps", "linkOperatorInputProps", "operatorInputProps", "columnInputProps", "valueInputProps", "children"],
49
+ _excluded2 = ["InputComponentProps"];
49
50
 
50
51
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
51
52
 
@@ -175,6 +176,10 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
175
176
  const baseSelectProps = ((_rootProps$components2 = rootProps.componentsProps) == null ? void 0 : _rootProps$components2.baseSelect) || {};
176
177
  const isBaseSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : true;
177
178
  const OptionComponent = isBaseSelectNative ? 'option' : _MenuItem.default;
179
+ const {
180
+ InputComponentProps
181
+ } = valueInputProps,
182
+ valueInputPropsOther = (0, _objectWithoutPropertiesLoose2.default)(valueInputProps, _excluded2);
178
183
  const sortedFilterableColumns = React.useMemo(() => {
179
184
  switch (columnsSort) {
180
185
  case 'asc':
@@ -345,14 +350,14 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
345
350
  })), /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormValueInput, (0, _extends2.default)({
346
351
  variant: "standard",
347
352
  as: rootProps.components.BaseFormControl
348
- }, baseFormControlProps, valueInputProps, {
349
- className: (0, _clsx.default)(classes.valueInput, baseFormControlProps.className, valueInputProps.className),
353
+ }, baseFormControlProps, valueInputPropsOther, {
354
+ className: (0, _clsx.default)(classes.valueInput, baseFormControlProps.className, valueInputPropsOther.className),
350
355
  children: currentOperator != null && currentOperator.InputComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(currentOperator.InputComponent, (0, _extends2.default)({
351
356
  apiRef: apiRef,
352
357
  item: item,
353
358
  applyValue: applyFilterChanges,
354
359
  focusElementRef: valueRef
355
- }, currentOperator.InputComponentProps)) : null
360
+ }, currentOperator.InputComponentProps, InputComponentProps)) : null
356
361
  }))]
357
362
  }));
358
363
  });
@@ -54,8 +54,8 @@ function GridFilterInputBoolean(props) {
54
54
  label: apiRef.current.getLocaleText('filterPanelInputLabel'),
55
55
  value: filterValueState,
56
56
  onChange: onFilterChange,
57
- variant: "standard",
58
57
  select: true,
58
+ variant: "standard",
59
59
  SelectProps: (0, _extends2.default)({
60
60
  native: isSelectNative,
61
61
  displayEmpty: true
@@ -79,8 +79,8 @@ function GridFilterInputDate(props) {
79
79
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
80
80
  value: filterValueState,
81
81
  onChange: onFilterChange,
82
- type: type || 'text',
83
82
  variant: "standard",
83
+ type: type || 'text',
84
84
  InputLabelProps: {
85
85
  shrink: true
86
86
  },
@@ -100,7 +100,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
100
100
  // | These PropTypes are generated from the TypeScript type definitions |
101
101
  // | To update them edit the TypeScript types and run "yarn proptypes" |
102
102
  // ----------------------------------------------------------------------
103
- apiRef: _propTypes.default.any.isRequired,
103
+ apiRef: _propTypes.default.shape({
104
+ current: _propTypes.default.object.isRequired
105
+ }).isRequired,
104
106
  applyValue: _propTypes.default.func.isRequired,
105
107
  focusElementRef: _propTypes.default
106
108
  /* @typescript-to-proptypes-ignore */
@@ -19,15 +19,15 @@ var _Autocomplete = _interopRequireWildcard(require("@mui/material/Autocomplete"
19
19
 
20
20
  var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
21
21
 
22
- var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
23
-
24
22
  var _utils = require("@mui/material/utils");
25
23
 
26
24
  var _filterPanelUtils = require("./filterPanelUtils");
27
25
 
26
+ var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
27
+
28
28
  var _jsxRuntime = require("react/jsx-runtime");
29
29
 
30
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef"];
30
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant"];
31
31
 
32
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
33
 
@@ -42,10 +42,23 @@ function GridFilterInputMultipleSingleSelect(props) {
42
42
  item,
43
43
  applyValue,
44
44
  apiRef,
45
- focusElementRef
45
+ focusElementRef,
46
+ color,
47
+ error,
48
+ helperText,
49
+ size,
50
+ variant = 'standard'
46
51
  } = props,
47
52
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
53
+ const TextFieldProps = {
54
+ color,
55
+ error,
56
+ helperText,
57
+ size,
58
+ variant
59
+ };
48
60
  const id = (0, _utils.unstable_useId)();
61
+ const rootProps = (0, _useGridRootProps.useGridRootProps)();
49
62
  const resolvedColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
50
63
  const resolvedValueOptions = React.useMemo(() => {
51
64
  if (!(resolvedColumn != null && resolvedColumn.valueOptions)) {
@@ -89,7 +102,7 @@ function GridFilterInputMultipleSingleSelect(props) {
89
102
 
90
103
  if (resolvedValueOptions !== undefined) {
91
104
  const itemValueIndexes = item.value.map(element => {
92
- // get the index matching between values and valueoptions
105
+ // get the index matching between values and valueOptions
93
106
  const formattedElement = (0, _filterPanelUtils.getValueFromOption)(element);
94
107
  const index = (resolvedFormattedValueOptions == null ? void 0 : resolvedFormattedValueOptions.findIndex(formatedOption => formatedOption === formattedElement)) || 0;
95
108
  return index;
@@ -128,16 +141,19 @@ function GridFilterInputMultipleSingleSelect(props) {
128
141
  }, getTagProps({
129
142
  index
130
143
  })))),
131
- renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, params, {
132
- label: apiRef.current.getLocaleText('filterPanelInputLabel'),
133
- placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
134
- InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
135
- shrink: true
136
- }),
137
- inputRef: focusElementRef,
138
- type: 'singleSelect',
139
- variant: "standard"
140
- }))
144
+ renderInput: params => {
145
+ var _rootProps$components;
146
+
147
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseTextField, (0, _extends2.default)({}, params, {
148
+ label: apiRef.current.getLocaleText('filterPanelInputLabel'),
149
+ placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
150
+ InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
151
+ shrink: true
152
+ }),
153
+ inputRef: focusElementRef,
154
+ type: "singleSelect"
155
+ }, TextFieldProps, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseTextField));
156
+ }
141
157
  }, other));
142
158
  }
143
159
 
@@ -19,13 +19,13 @@ var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete")
19
19
 
20
20
  var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
21
21
 
22
- var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
23
-
24
22
  var _utils = require("@mui/material/utils");
25
23
 
24
+ var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
25
+
26
26
  var _jsxRuntime = require("react/jsx-runtime");
27
27
 
28
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef"];
28
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant"];
29
29
 
30
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
31
 
@@ -37,11 +37,24 @@ function GridFilterInputMultipleValue(props) {
37
37
  applyValue,
38
38
  type,
39
39
  apiRef,
40
- focusElementRef
40
+ focusElementRef,
41
+ color,
42
+ error,
43
+ helperText,
44
+ size,
45
+ variant
41
46
  } = props,
42
47
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
48
+ const TextFieldProps = {
49
+ color,
50
+ error,
51
+ helperText,
52
+ size,
53
+ variant
54
+ };
43
55
  const [filterValueState, setFilterValueState] = React.useState(item.value || []);
44
56
  const id = (0, _utils.unstable_useId)();
57
+ const rootProps = (0, _useGridRootProps.useGridRootProps)();
45
58
  React.useEffect(() => {
46
59
  var _item$value;
47
60
 
@@ -75,16 +88,19 @@ function GridFilterInputMultipleValue(props) {
75
88
  }, getTagProps({
76
89
  index
77
90
  })))),
78
- renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, params, {
79
- label: apiRef.current.getLocaleText('filterPanelInputLabel'),
80
- placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
81
- InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
82
- shrink: true
83
- }),
84
- inputRef: focusElementRef,
85
- type: type || 'text',
86
- variant: "standard"
87
- }))
91
+ renderInput: params => {
92
+ var _rootProps$components;
93
+
94
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseTextField, (0, _extends2.default)({}, params, {
95
+ label: apiRef.current.getLocaleText('filterPanelInputLabel'),
96
+ placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
97
+ InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
98
+ shrink: true
99
+ }),
100
+ inputRef: focusElementRef,
101
+ type: type || 'text'
102
+ }, TextFieldProps, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseTextField));
103
+ }
88
104
  }, other));
89
105
  }
90
106
 
@@ -93,7 +109,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputMultipleValue.propTypes =
93
109
  // | These PropTypes are generated from the TypeScript type definitions |
94
110
  // | To update them edit the TypeScript types and run "yarn proptypes" |
95
111
  // ----------------------------------------------------------------------
96
- apiRef: _propTypes.default.any.isRequired,
112
+ apiRef: _propTypes.default.shape({
113
+ current: _propTypes.default.object.isRequired
114
+ }).isRequired,
97
115
  applyValue: _propTypes.default.func.isRequired,
98
116
  focusElementRef: _propTypes.default
99
117
  /* @typescript-to-proptypes-ignore */
@@ -74,6 +74,10 @@ function GridFilterInputSingleSelect(props) {
74
74
  const isSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : true;
75
75
  const currentColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
76
76
  const currentValueOptions = React.useMemo(() => {
77
+ if (currentColumn === null) {
78
+ return undefined;
79
+ }
80
+
77
81
  return typeof currentColumn.valueOptions === 'function' ? currentColumn.valueOptions({
78
82
  field: currentColumn.field
79
83
  }) : currentColumn.valueOptions;
@@ -115,8 +119,8 @@ function GridFilterInputSingleSelect(props) {
115
119
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
116
120
  value: filterValueState,
117
121
  onChange: onFilterChange,
118
- type: type || 'text',
119
122
  variant: "standard",
123
+ type: type || 'text',
120
124
  InputLabelProps: {
121
125
  shrink: true
122
126
  },
@@ -135,7 +139,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
135
139
  // | These PropTypes are generated from the TypeScript type definitions |
136
140
  // | To update them edit the TypeScript types and run "yarn proptypes" |
137
141
  // ----------------------------------------------------------------------
138
- apiRef: _propTypes.default.any.isRequired,
142
+ apiRef: _propTypes.default.shape({
143
+ current: _propTypes.default.object.isRequired
144
+ }).isRequired,
139
145
  applyValue: _propTypes.default.func.isRequired,
140
146
  focusElementRef: _propTypes.default
141
147
  /* @typescript-to-proptypes-ignore */
@@ -141,8 +141,8 @@ function GridFilterInputValue(props) {
141
141
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
142
142
  value: filterValueState,
143
143
  onChange: onFilterChange,
144
- type: type || 'text',
145
144
  variant: "standard",
145
+ type: type || 'text',
146
146
  InputProps: InputProps,
147
147
  InputLabelProps: {
148
148
  shrink: true
@@ -156,7 +156,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
156
156
  // | These PropTypes are generated from the TypeScript type definitions |
157
157
  // | To update them edit the TypeScript types and run "yarn proptypes" |
158
158
  // ----------------------------------------------------------------------
159
- apiRef: _propTypes.default.any.isRequired,
159
+ apiRef: _propTypes.default.shape({
160
+ current: _propTypes.default.object.isRequired
161
+ }).isRequired,
160
162
  applyValue: _propTypes.default.func.isRequired,
161
163
  focusElementRef: _propTypes.default
162
164
  /* @typescript-to-proptypes-ignore */