@mui/x-data-grid 5.10.0 → 5.12.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 (573) hide show
  1. package/CHANGELOG.md +325 -10
  2. package/DataGrid/DataGrid.js +61 -2
  3. package/DataGrid/useDataGridProps.js +2 -1
  4. package/README.md +4 -5
  5. package/colDef/gridActionsColDef.js +2 -1
  6. package/colDef/gridBooleanColDef.js +2 -1
  7. package/colDef/gridCheckboxSelectionColDef.js +1 -0
  8. package/colDef/gridDateColDef.js +4 -2
  9. package/colDef/gridNumericColDef.js +3 -2
  10. package/colDef/gridNumericOperators.d.ts +2 -0
  11. package/colDef/gridNumericOperators.js +11 -0
  12. package/colDef/gridSingleSelectColDef.js +3 -2
  13. package/colDef/gridSingleSelectOperators.d.ts +3 -0
  14. package/colDef/gridSingleSelectOperators.js +52 -0
  15. package/colDef/gridStringColDef.js +3 -2
  16. package/colDef/gridStringOperators.d.ts +2 -0
  17. package/colDef/gridStringOperators.js +12 -0
  18. package/components/GridFooter.d.ts +4 -2
  19. package/components/GridFooter.js +11 -2
  20. package/components/GridRow.d.ts +1 -1
  21. package/components/GridRow.js +55 -17
  22. package/components/GridRowCount.d.ts +4 -1
  23. package/components/GridRowCount.js +1 -0
  24. package/components/GridScrollArea.js +3 -4
  25. package/components/GridSelectedRowCount.d.ts +4 -1
  26. package/components/GridSelectedRowCount.js +2 -1
  27. package/components/base/GridBody.js +1 -2
  28. package/components/base/GridOverlays.js +2 -3
  29. package/components/cell/GridActionsCell.js +13 -4
  30. package/components/cell/GridActionsCellItem.d.ts +1 -1
  31. package/components/cell/GridCell.d.ts +2 -1
  32. package/components/cell/GridCell.js +17 -12
  33. package/components/cell/GridEditBooleanCell.d.ts +15 -3
  34. package/components/cell/GridEditBooleanCell.js +101 -6
  35. package/components/cell/GridEditDateCell.d.ts +16 -4
  36. package/components/cell/GridEditDateCell.js +99 -5
  37. package/components/cell/GridEditInputCell.d.ts +11 -5
  38. package/components/cell/GridEditInputCell.js +29 -5
  39. package/components/cell/GridEditSingleSelectCell.d.ts +12 -4
  40. package/components/cell/GridEditSingleSelectCell.js +28 -5
  41. package/components/cell/index.d.ts +2 -0
  42. package/components/cell/index.js +2 -0
  43. package/components/columnHeaders/GridColumnHeaderItem.js +19 -19
  44. package/components/columnHeaders/GridColumnHeaders.d.ts +2 -0
  45. package/components/columnHeaders/GridColumnHeadersInner.d.ts +2 -0
  46. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  47. package/components/columnSelection/GridHeaderCheckbox.js +4 -5
  48. package/components/containers/GridFooterContainer.d.ts +8 -2
  49. package/components/containers/GridFooterContainer.js +11 -2
  50. package/components/containers/GridRoot.js +25 -5
  51. package/components/containers/GridRootStyles.js +4 -2
  52. package/components/containers/GridToolbarContainer.d.ts +8 -2
  53. package/components/containers/GridToolbarContainer.js +12 -2
  54. package/components/menu/GridMenu.js +9 -2
  55. package/components/panel/GridColumnsPanel.js +10 -2
  56. package/components/panel/GridPanelContent.d.ts +8 -1
  57. package/components/panel/GridPanelContent.js +13 -2
  58. package/components/panel/GridPanelFooter.d.ts +8 -1
  59. package/components/panel/GridPanelFooter.js +13 -2
  60. package/components/panel/GridPanelHeader.d.ts +8 -1
  61. package/components/panel/GridPanelHeader.js +13 -2
  62. package/components/panel/GridPanelWrapper.d.ts +1 -1
  63. package/components/panel/GridPanelWrapper.js +3 -3
  64. package/components/panel/filterPanel/GridFilterForm.d.ts +61 -4
  65. package/components/panel/filterPanel/GridFilterForm.js +88 -8
  66. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  67. package/components/panel/filterPanel/GridFilterPanel.d.ts +8 -5
  68. package/components/panel/filterPanel/GridFilterPanel.js +24 -6
  69. package/components/toolbar/GridToolbar.d.ts +12 -2
  70. package/components/toolbar/GridToolbar.js +30 -7
  71. package/components/toolbar/GridToolbarExport.d.ts +5 -4
  72. package/components/toolbar/GridToolbarExport.js +15 -20
  73. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  74. package/components/toolbar/GridToolbarQuickFilter.d.ts +20 -0
  75. package/components/toolbar/GridToolbarQuickFilter.js +87 -0
  76. package/components/toolbar/index.d.ts +3 -1
  77. package/components/toolbar/index.js +3 -2
  78. package/components/virtualization/GridVirtualScroller.d.ts +4 -1
  79. package/components/virtualization/GridVirtualScrollerContent.d.ts +4 -1
  80. package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +4 -1
  81. package/constants/defaultGridSlotsComponents.js +3 -2
  82. package/constants/gridClasses.d.ts +16 -0
  83. package/constants/gridClasses.js +1 -1
  84. package/constants/localeTextConstants.js +5 -0
  85. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +11 -0
  86. package/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -9
  87. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +4 -4
  88. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
  89. package/hooks/core/useGridApiInitialization.js +3 -3
  90. package/hooks/core/useGridErrorHandler.js +1 -2
  91. package/hooks/core/useGridStateInitialization.js +1 -2
  92. package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
  93. package/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
  94. package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -0
  95. package/hooks/features/columns/useGridColumnSpanning.js +1 -2
  96. package/hooks/features/columns/useGridColumns.js +20 -23
  97. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  98. package/hooks/features/dimensions/useGridDimensions.js +8 -9
  99. package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
  100. package/hooks/features/editRows/useGridCellEditing.new.js +140 -32
  101. package/hooks/features/editRows/useGridCellEditing.old.js +20 -21
  102. package/hooks/features/editRows/useGridEditing.old.js +4 -5
  103. package/hooks/features/editRows/useGridRowEditing.new.d.ts +1 -1
  104. package/hooks/features/editRows/useGridRowEditing.new.js +128 -42
  105. package/hooks/features/editRows/useGridRowEditing.old.js +21 -22
  106. package/hooks/features/events/useGridEvents.d.ts +1 -1
  107. package/hooks/features/events/useGridEvents.js +19 -18
  108. package/hooks/features/export/serializers/csvSerializer.js +5 -5
  109. package/hooks/features/export/useGridCsvExport.js +23 -16
  110. package/hooks/features/export/useGridPrintExport.js +22 -0
  111. package/hooks/features/export/utils.d.ts +3 -1
  112. package/hooks/features/export/utils.js +13 -0
  113. package/hooks/features/filter/gridFilterState.d.ts +1 -2
  114. package/hooks/features/filter/gridFilterState.js +3 -1
  115. package/hooks/features/filter/gridFilterUtils.d.ts +17 -1
  116. package/hooks/features/filter/gridFilterUtils.js +85 -4
  117. package/hooks/features/filter/useGridFilter.js +25 -13
  118. package/hooks/features/focus/useGridFocus.d.ts +1 -1
  119. package/hooks/features/focus/useGridFocus.js +29 -33
  120. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
  121. package/hooks/features/pagination/useGridPage.js +3 -4
  122. package/hooks/features/pagination/useGridPageSize.js +2 -3
  123. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
  124. package/hooks/features/rows/gridRowsSelector.d.ts +1 -0
  125. package/hooks/features/rows/gridRowsSelector.js +1 -0
  126. package/hooks/features/rows/gridRowsState.d.ts +16 -11
  127. package/hooks/features/rows/gridRowsUtils.d.ts +14 -1
  128. package/hooks/features/rows/gridRowsUtils.js +79 -1
  129. package/hooks/features/rows/useGridRows.js +130 -129
  130. package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
  131. package/hooks/features/rows/useGridRowsMeta.js +107 -43
  132. package/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  133. package/hooks/features/scroll/useGridScroll.js +6 -1
  134. package/hooks/features/selection/useGridSelection.d.ts +1 -1
  135. package/hooks/features/selection/useGridSelection.js +13 -10
  136. package/hooks/features/sorting/useGridSorting.js +8 -9
  137. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -0
  138. package/hooks/features/virtualization/useGridVirtualScroller.js +33 -14
  139. package/hooks/utils/useGridApiEventHandler.d.ts +4 -1
  140. package/hooks/utils/useGridApiEventHandler.js +22 -9
  141. package/hooks/utils/useGridNativeEventListener.js +1 -2
  142. package/hooks/utils/useGridSelector.js +1 -1
  143. package/index.d.ts +2 -0
  144. package/index.js +1 -1
  145. package/internals/index.d.ts +5 -1
  146. package/internals/index.js +5 -2
  147. package/legacy/DataGrid/DataGrid.js +61 -2
  148. package/legacy/DataGrid/useDataGridProps.js +2 -1
  149. package/legacy/colDef/gridActionsColDef.js +2 -1
  150. package/legacy/colDef/gridBooleanColDef.js +2 -1
  151. package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -0
  152. package/legacy/colDef/gridDateColDef.js +4 -2
  153. package/legacy/colDef/gridNumericColDef.js +3 -2
  154. package/legacy/colDef/gridNumericOperators.js +28 -18
  155. package/legacy/colDef/gridSingleSelectColDef.js +3 -2
  156. package/legacy/colDef/gridSingleSelectOperators.js +55 -6
  157. package/legacy/colDef/gridStringColDef.js +3 -2
  158. package/legacy/colDef/gridStringOperators.js +25 -14
  159. package/legacy/components/GridFooter.js +11 -2
  160. package/legacy/components/GridRow.js +60 -17
  161. package/legacy/components/GridRowCount.js +1 -0
  162. package/legacy/components/GridScrollArea.js +3 -4
  163. package/legacy/components/GridSelectedRowCount.js +2 -1
  164. package/legacy/components/base/GridBody.js +1 -2
  165. package/legacy/components/base/GridOverlays.js +2 -3
  166. package/legacy/components/cell/GridActionsCell.js +13 -4
  167. package/legacy/components/cell/GridCell.js +17 -12
  168. package/legacy/components/cell/GridEditBooleanCell.js +132 -11
  169. package/legacy/components/cell/GridEditDateCell.js +148 -42
  170. package/legacy/components/cell/GridEditInputCell.js +61 -12
  171. package/legacy/components/cell/GridEditSingleSelectCell.js +41 -13
  172. package/legacy/components/cell/index.js +2 -0
  173. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +21 -19
  174. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  175. package/legacy/components/columnSelection/GridHeaderCheckbox.js +4 -5
  176. package/legacy/components/containers/GridFooterContainer.js +11 -2
  177. package/legacy/components/containers/GridRoot.js +23 -5
  178. package/legacy/components/containers/GridRootStyles.js +3 -2
  179. package/legacy/components/containers/GridToolbarContainer.js +12 -2
  180. package/legacy/components/menu/GridMenu.js +9 -2
  181. package/legacy/components/panel/GridColumnsPanel.js +12 -2
  182. package/legacy/components/panel/GridPanelContent.js +13 -2
  183. package/legacy/components/panel/GridPanelFooter.js +13 -2
  184. package/legacy/components/panel/GridPanelHeader.js +13 -2
  185. package/legacy/components/panel/GridPanelWrapper.js +3 -3
  186. package/legacy/components/panel/filterPanel/GridFilterForm.js +89 -8
  187. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  188. package/legacy/components/panel/filterPanel/GridFilterPanel.js +25 -6
  189. package/legacy/components/toolbar/GridToolbar.js +31 -6
  190. package/legacy/components/toolbar/GridToolbarExport.js +18 -19
  191. package/legacy/components/toolbar/GridToolbarQuickFilter.js +102 -0
  192. package/legacy/components/toolbar/index.js +3 -2
  193. package/legacy/constants/defaultGridSlotsComponents.js +3 -2
  194. package/legacy/constants/gridClasses.js +1 -1
  195. package/legacy/constants/localeTextConstants.js +5 -0
  196. package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -10
  197. package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
  198. package/legacy/hooks/core/useGridApiInitialization.js +3 -3
  199. package/legacy/hooks/core/useGridErrorHandler.js +1 -2
  200. package/legacy/hooks/core/useGridStateInitialization.js +1 -2
  201. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
  202. package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
  203. package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -2
  204. package/legacy/hooks/features/columns/useGridColumns.js +20 -23
  205. package/legacy/hooks/features/dimensions/useGridDimensions.js +8 -9
  206. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +220 -83
  207. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +20 -21
  208. package/legacy/hooks/features/editRows/useGridEditing.old.js +4 -5
  209. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +132 -42
  210. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +20 -21
  211. package/legacy/hooks/features/events/useGridEvents.js +19 -18
  212. package/legacy/hooks/features/export/serializers/csvSerializer.js +5 -5
  213. package/legacy/hooks/features/export/useGridCsvExport.js +24 -17
  214. package/legacy/hooks/features/export/useGridPrintExport.js +22 -0
  215. package/legacy/hooks/features/export/utils.js +14 -0
  216. package/legacy/hooks/features/filter/gridFilterState.js +3 -1
  217. package/legacy/hooks/features/filter/gridFilterUtils.js +97 -4
  218. package/legacy/hooks/features/filter/useGridFilter.js +25 -13
  219. package/legacy/hooks/features/focus/useGridFocus.js +31 -35
  220. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
  221. package/legacy/hooks/features/pagination/useGridPage.js +3 -4
  222. package/legacy/hooks/features/pagination/useGridPageSize.js +2 -3
  223. package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
  224. package/legacy/hooks/features/rows/gridRowsSelector.js +3 -0
  225. package/legacy/hooks/features/rows/gridRowsUtils.js +82 -1
  226. package/legacy/hooks/features/rows/useGridRows.js +140 -132
  227. package/legacy/hooks/features/rows/useGridRowsMeta.js +104 -41
  228. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  229. package/legacy/hooks/features/scroll/useGridScroll.js +6 -1
  230. package/legacy/hooks/features/selection/useGridSelection.js +13 -10
  231. package/legacy/hooks/features/sorting/useGridSorting.js +8 -9
  232. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +52 -29
  233. package/legacy/hooks/utils/useGridApiEventHandler.js +20 -9
  234. package/legacy/hooks/utils/useGridNativeEventListener.js +1 -2
  235. package/legacy/hooks/utils/useGridSelector.js +1 -1
  236. package/legacy/index.js +1 -1
  237. package/legacy/internals/index.js +5 -2
  238. package/legacy/locales/arSD.js +5 -0
  239. package/legacy/locales/bgBG.js +5 -0
  240. package/legacy/locales/csCZ.js +5 -0
  241. package/legacy/locales/daDK.js +5 -0
  242. package/legacy/locales/deDE.js +10 -5
  243. package/legacy/locales/elGR.js +5 -0
  244. package/legacy/locales/esES.js +5 -0
  245. package/legacy/locales/faIR.js +5 -0
  246. package/legacy/locales/fiFI.js +5 -0
  247. package/legacy/locales/frFR.js +5 -0
  248. package/legacy/locales/heIL.js +10 -5
  249. package/legacy/locales/huHU.js +5 -0
  250. package/legacy/locales/itIT.js +5 -0
  251. package/legacy/locales/jaJP.js +5 -0
  252. package/legacy/locales/koKR.js +5 -0
  253. package/legacy/locales/nbNO.js +127 -0
  254. package/legacy/locales/nlNL.js +5 -0
  255. package/legacy/locales/plPL.js +5 -0
  256. package/legacy/locales/ptBR.js +5 -0
  257. package/legacy/locales/ruRU.js +5 -0
  258. package/legacy/locales/skSK.js +5 -0
  259. package/legacy/locales/trTR.js +8 -3
  260. package/legacy/locales/ukUA.js +5 -0
  261. package/legacy/locales/viVN.js +5 -0
  262. package/legacy/locales/zhCN.js +5 -0
  263. package/legacy/models/events/gridEvents.js +4 -0
  264. package/legacy/models/gridApiCaches.js +1 -0
  265. package/legacy/models/index.js +4 -3
  266. package/legacy/models/params/gridMenuParams.js +1 -0
  267. package/legacy/models/params/index.js +2 -1
  268. package/legacy/utils/createSelector.js +18 -2
  269. package/legacy/utils/exportAs.js +1 -1
  270. package/locales/arSD.js +5 -0
  271. package/locales/bgBG.js +5 -0
  272. package/locales/csCZ.js +5 -0
  273. package/locales/daDK.js +5 -0
  274. package/locales/deDE.js +10 -5
  275. package/locales/elGR.js +5 -0
  276. package/locales/esES.js +5 -0
  277. package/locales/faIR.js +5 -0
  278. package/locales/fiFI.js +5 -0
  279. package/locales/frFR.js +5 -0
  280. package/locales/heIL.js +10 -5
  281. package/locales/huHU.js +5 -0
  282. package/locales/itIT.js +5 -0
  283. package/locales/jaJP.js +5 -0
  284. package/locales/koKR.js +5 -0
  285. package/locales/nbNO.d.ts +2 -0
  286. package/locales/nbNO.js +115 -0
  287. package/locales/nlNL.js +5 -0
  288. package/locales/plPL.js +5 -0
  289. package/locales/ptBR.js +5 -0
  290. package/locales/ruRU.js +5 -0
  291. package/locales/skSK.js +5 -0
  292. package/locales/trTR.js +8 -3
  293. package/locales/ukUA.js +5 -0
  294. package/locales/viVN.js +5 -0
  295. package/locales/zhCN.js +5 -0
  296. package/models/api/gridCoreApi.d.ts +6 -0
  297. package/models/api/gridEditingApi.d.ts +23 -4
  298. package/models/api/gridFilterApi.d.ts +5 -0
  299. package/models/api/gridFocusApi.d.ts +1 -0
  300. package/models/api/gridLocaleTextApi.d.ts +4 -0
  301. package/models/api/gridRowApi.d.ts +28 -0
  302. package/models/api/gridRowsMetaApi.d.ts +24 -0
  303. package/models/api/index.d.ts +1 -1
  304. package/models/colDef/gridColDef.d.ts +16 -3
  305. package/models/events/gridEventLookup.d.ts +286 -4
  306. package/models/events/gridEvents.d.ts +5 -278
  307. package/models/events/gridEvents.js +4 -0
  308. package/models/gridApiCaches.d.ts +6 -0
  309. package/models/gridApiCaches.js +1 -0
  310. package/models/gridExport.d.ts +29 -2
  311. package/models/gridFilterModel.d.ts +11 -0
  312. package/models/gridFilterOperator.d.ts +1 -1
  313. package/models/gridIconSlotsComponent.d.ts +5 -0
  314. package/models/gridStateCommunity.d.ts +0 -2
  315. package/models/index.d.ts +1 -1
  316. package/models/index.js +4 -3
  317. package/models/params/gridMenuParams.d.ts +7 -0
  318. package/models/params/gridMenuParams.js +1 -0
  319. package/models/params/gridRowParams.d.ts +1 -1
  320. package/models/params/index.d.ts +1 -0
  321. package/models/params/index.js +2 -1
  322. package/models/props/DataGridProps.d.ts +79 -29
  323. package/modern/DataGrid/DataGrid.js +61 -2
  324. package/modern/DataGrid/useDataGridProps.js +2 -1
  325. package/modern/colDef/gridActionsColDef.js +2 -1
  326. package/modern/colDef/gridBooleanColDef.js +2 -1
  327. package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
  328. package/modern/colDef/gridDateColDef.js +4 -2
  329. package/modern/colDef/gridNumericColDef.js +3 -2
  330. package/modern/colDef/gridNumericOperators.js +11 -0
  331. package/modern/colDef/gridSingleSelectColDef.js +3 -2
  332. package/modern/colDef/gridSingleSelectOperators.js +52 -0
  333. package/modern/colDef/gridStringColDef.js +3 -2
  334. package/modern/colDef/gridStringOperators.js +12 -0
  335. package/modern/components/GridFooter.js +11 -2
  336. package/modern/components/GridRow.js +55 -17
  337. package/modern/components/GridRowCount.js +1 -0
  338. package/modern/components/GridScrollArea.js +3 -4
  339. package/modern/components/GridSelectedRowCount.js +2 -1
  340. package/modern/components/base/GridBody.js +1 -2
  341. package/modern/components/base/GridOverlays.js +2 -3
  342. package/modern/components/cell/GridActionsCell.js +14 -3
  343. package/modern/components/cell/GridCell.js +17 -12
  344. package/modern/components/cell/GridEditBooleanCell.js +101 -6
  345. package/modern/components/cell/GridEditDateCell.js +99 -5
  346. package/modern/components/cell/GridEditInputCell.js +29 -5
  347. package/modern/components/cell/GridEditSingleSelectCell.js +28 -5
  348. package/modern/components/cell/index.js +2 -0
  349. package/modern/components/columnHeaders/GridColumnHeaderItem.js +19 -19
  350. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  351. package/modern/components/columnSelection/GridHeaderCheckbox.js +4 -5
  352. package/modern/components/containers/GridFooterContainer.js +11 -2
  353. package/modern/components/containers/GridRoot.js +25 -3
  354. package/modern/components/containers/GridRootStyles.js +4 -2
  355. package/modern/components/containers/GridToolbarContainer.js +12 -2
  356. package/modern/components/menu/GridMenu.js +9 -2
  357. package/modern/components/panel/GridColumnsPanel.js +10 -2
  358. package/modern/components/panel/GridPanelContent.js +13 -2
  359. package/modern/components/panel/GridPanelFooter.js +13 -2
  360. package/modern/components/panel/GridPanelHeader.js +13 -2
  361. package/modern/components/panel/GridPanelWrapper.js +3 -3
  362. package/modern/components/panel/filterPanel/GridFilterForm.js +88 -8
  363. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  364. package/modern/components/panel/filterPanel/GridFilterPanel.js +24 -6
  365. package/modern/components/toolbar/GridToolbar.js +30 -7
  366. package/modern/components/toolbar/GridToolbarExport.js +15 -20
  367. package/modern/components/toolbar/GridToolbarQuickFilter.js +85 -0
  368. package/modern/components/toolbar/index.js +3 -2
  369. package/modern/constants/defaultGridSlotsComponents.js +3 -2
  370. package/modern/constants/gridClasses.js +1 -1
  371. package/modern/constants/localeTextConstants.js +5 -0
  372. package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -9
  373. package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
  374. package/modern/hooks/core/useGridApiInitialization.js +3 -3
  375. package/modern/hooks/core/useGridErrorHandler.js +1 -2
  376. package/modern/hooks/core/useGridStateInitialization.js +1 -2
  377. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
  378. package/modern/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
  379. package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -2
  380. package/modern/hooks/features/columns/useGridColumns.js +19 -22
  381. package/modern/hooks/features/dimensions/useGridDimensions.js +8 -9
  382. package/modern/hooks/features/editRows/useGridCellEditing.new.js +138 -32
  383. package/modern/hooks/features/editRows/useGridCellEditing.old.js +20 -21
  384. package/modern/hooks/features/editRows/useGridEditing.old.js +4 -5
  385. package/modern/hooks/features/editRows/useGridRowEditing.new.js +126 -42
  386. package/modern/hooks/features/editRows/useGridRowEditing.old.js +21 -22
  387. package/modern/hooks/features/events/useGridEvents.js +19 -18
  388. package/modern/hooks/features/export/serializers/csvSerializer.js +5 -5
  389. package/modern/hooks/features/export/useGridCsvExport.js +21 -16
  390. package/modern/hooks/features/export/useGridPrintExport.js +20 -0
  391. package/modern/hooks/features/export/utils.js +13 -0
  392. package/modern/hooks/features/filter/gridFilterState.js +3 -1
  393. package/modern/hooks/features/filter/gridFilterUtils.js +81 -4
  394. package/modern/hooks/features/filter/useGridFilter.js +25 -13
  395. package/modern/hooks/features/focus/useGridFocus.js +29 -33
  396. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
  397. package/modern/hooks/features/pagination/useGridPage.js +3 -4
  398. package/modern/hooks/features/pagination/useGridPageSize.js +2 -3
  399. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
  400. package/modern/hooks/features/rows/gridRowsSelector.js +1 -0
  401. package/modern/hooks/features/rows/gridRowsUtils.js +77 -1
  402. package/modern/hooks/features/rows/useGridRows.js +130 -129
  403. package/modern/hooks/features/rows/useGridRowsMeta.js +105 -37
  404. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  405. package/modern/hooks/features/scroll/useGridScroll.js +6 -1
  406. package/modern/hooks/features/selection/useGridSelection.js +13 -10
  407. package/modern/hooks/features/sorting/useGridSorting.js +8 -9
  408. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +33 -14
  409. package/modern/hooks/utils/useGridApiEventHandler.js +20 -9
  410. package/modern/hooks/utils/useGridNativeEventListener.js +1 -2
  411. package/modern/hooks/utils/useGridSelector.js +1 -1
  412. package/modern/index.js +1 -1
  413. package/modern/internals/index.js +5 -2
  414. package/modern/locales/arSD.js +5 -0
  415. package/modern/locales/bgBG.js +5 -0
  416. package/modern/locales/csCZ.js +5 -0
  417. package/modern/locales/daDK.js +5 -0
  418. package/modern/locales/deDE.js +10 -5
  419. package/modern/locales/elGR.js +5 -0
  420. package/modern/locales/esES.js +5 -0
  421. package/modern/locales/faIR.js +5 -0
  422. package/modern/locales/fiFI.js +5 -0
  423. package/modern/locales/frFR.js +5 -0
  424. package/modern/locales/heIL.js +10 -5
  425. package/modern/locales/huHU.js +5 -0
  426. package/modern/locales/itIT.js +5 -0
  427. package/modern/locales/jaJP.js +5 -0
  428. package/modern/locales/koKR.js +5 -0
  429. package/modern/locales/nbNO.js +115 -0
  430. package/modern/locales/nlNL.js +5 -0
  431. package/modern/locales/plPL.js +5 -0
  432. package/modern/locales/ptBR.js +5 -0
  433. package/modern/locales/ruRU.js +5 -0
  434. package/modern/locales/skSK.js +5 -0
  435. package/modern/locales/trTR.js +8 -3
  436. package/modern/locales/ukUA.js +5 -0
  437. package/modern/locales/viVN.js +5 -0
  438. package/modern/locales/zhCN.js +5 -0
  439. package/modern/models/events/gridEvents.js +4 -0
  440. package/modern/models/gridApiCaches.js +1 -0
  441. package/modern/models/index.js +4 -3
  442. package/modern/models/params/gridMenuParams.js +1 -0
  443. package/modern/models/params/index.js +2 -1
  444. package/modern/utils/createSelector.js +20 -2
  445. package/modern/utils/exportAs.js +1 -1
  446. package/node/DataGrid/DataGrid.js +61 -2
  447. package/node/DataGrid/useDataGridProps.js +2 -1
  448. package/node/colDef/gridActionsColDef.js +2 -1
  449. package/node/colDef/gridBooleanColDef.js +2 -1
  450. package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
  451. package/node/colDef/gridDateColDef.js +4 -2
  452. package/node/colDef/gridNumericColDef.js +2 -1
  453. package/node/colDef/gridNumericOperators.js +15 -1
  454. package/node/colDef/gridSingleSelectColDef.js +2 -1
  455. package/node/colDef/gridSingleSelectOperators.js +56 -1
  456. package/node/colDef/gridStringColDef.js +2 -1
  457. package/node/colDef/gridStringOperators.js +16 -1
  458. package/node/components/GridFooter.js +10 -1
  459. package/node/components/GridRow.js +57 -18
  460. package/node/components/GridRowCount.js +1 -0
  461. package/node/components/GridScrollArea.js +3 -5
  462. package/node/components/GridSelectedRowCount.js +2 -1
  463. package/node/components/base/GridBody.js +1 -3
  464. package/node/components/base/GridOverlays.js +2 -4
  465. package/node/components/cell/GridActionsCell.js +13 -4
  466. package/node/components/cell/GridCell.js +16 -11
  467. package/node/components/cell/GridEditBooleanCell.js +100 -5
  468. package/node/components/cell/GridEditDateCell.js +98 -4
  469. package/node/components/cell/GridEditInputCell.js +29 -5
  470. package/node/components/cell/GridEditSingleSelectCell.js +28 -6
  471. package/node/components/cell/index.js +26 -0
  472. package/node/components/columnHeaders/GridColumnHeaderItem.js +19 -20
  473. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -4
  474. package/node/components/columnSelection/GridHeaderCheckbox.js +4 -6
  475. package/node/components/containers/GridFooterContainer.js +10 -1
  476. package/node/components/containers/GridRoot.js +24 -3
  477. package/node/components/containers/GridRootStyles.js +4 -2
  478. package/node/components/containers/GridToolbarContainer.js +11 -1
  479. package/node/components/menu/GridMenu.js +10 -2
  480. package/node/components/panel/GridColumnsPanel.js +10 -2
  481. package/node/components/panel/GridPanelContent.js +11 -1
  482. package/node/components/panel/GridPanelFooter.js +11 -1
  483. package/node/components/panel/GridPanelHeader.js +11 -1
  484. package/node/components/panel/GridPanelWrapper.js +5 -3
  485. package/node/components/panel/filterPanel/GridFilterForm.js +91 -9
  486. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  487. package/node/components/panel/filterPanel/GridFilterPanel.js +26 -6
  488. package/node/components/toolbar/GridToolbar.js +32 -7
  489. package/node/components/toolbar/GridToolbarExport.js +14 -19
  490. package/node/components/toolbar/GridToolbarQuickFilter.js +109 -0
  491. package/node/components/toolbar/index.js +42 -11
  492. package/node/constants/defaultGridSlotsComponents.js +2 -1
  493. package/node/constants/gridClasses.js +1 -1
  494. package/node/constants/localeTextConstants.js +5 -0
  495. package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -8
  496. package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -8
  497. package/node/hooks/core/useGridApiInitialization.js +3 -4
  498. package/node/hooks/core/useGridErrorHandler.js +1 -3
  499. package/node/hooks/core/useGridStateInitialization.js +1 -3
  500. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -7
  501. package/node/hooks/features/columnMenu/useGridColumnMenu.js +3 -5
  502. package/node/hooks/features/columns/useGridColumnSpanning.js +1 -3
  503. package/node/hooks/features/columns/useGridColumns.js +20 -24
  504. package/node/hooks/features/dimensions/useGridDimensions.js +8 -10
  505. package/node/hooks/features/editRows/useGridCellEditing.new.js +140 -32
  506. package/node/hooks/features/editRows/useGridCellEditing.old.js +20 -22
  507. package/node/hooks/features/editRows/useGridEditing.old.js +4 -6
  508. package/node/hooks/features/editRows/useGridRowEditing.new.js +128 -43
  509. package/node/hooks/features/editRows/useGridRowEditing.old.js +21 -23
  510. package/node/hooks/features/events/useGridEvents.js +19 -19
  511. package/node/hooks/features/export/serializers/csvSerializer.js +5 -5
  512. package/node/hooks/features/export/useGridCsvExport.js +26 -17
  513. package/node/hooks/features/export/useGridPrintExport.js +25 -0
  514. package/node/hooks/features/export/utils.js +19 -2
  515. package/node/hooks/features/filter/gridFilterState.js +3 -1
  516. package/node/hooks/features/filter/gridFilterUtils.js +93 -3
  517. package/node/hooks/features/filter/useGridFilter.js +25 -13
  518. package/node/hooks/features/focus/useGridFocus.js +29 -34
  519. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -6
  520. package/node/hooks/features/pagination/useGridPage.js +3 -5
  521. package/node/hooks/features/pagination/useGridPageSize.js +2 -4
  522. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -8
  523. package/node/hooks/features/rows/gridRowsSelector.js +3 -1
  524. package/node/hooks/features/rows/gridRowsUtils.js +95 -1
  525. package/node/hooks/features/rows/useGridRows.js +132 -127
  526. package/node/hooks/features/rows/useGridRowsMeta.js +107 -43
  527. package/node/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  528. package/node/hooks/features/scroll/useGridScroll.js +6 -1
  529. package/node/hooks/features/selection/useGridSelection.js +13 -11
  530. package/node/hooks/features/sorting/useGridSorting.js +8 -10
  531. package/node/hooks/features/virtualization/useGridVirtualScroller.js +33 -15
  532. package/node/hooks/utils/useGridApiEventHandler.js +22 -10
  533. package/node/hooks/utils/useGridNativeEventListener.js +1 -3
  534. package/node/hooks/utils/useGridSelector.js +1 -1
  535. package/node/index.js +1 -1
  536. package/node/internals/index.js +39 -3
  537. package/node/locales/arSD.js +5 -0
  538. package/node/locales/bgBG.js +5 -0
  539. package/node/locales/csCZ.js +5 -0
  540. package/node/locales/daDK.js +5 -0
  541. package/node/locales/deDE.js +10 -5
  542. package/node/locales/elGR.js +5 -0
  543. package/node/locales/esES.js +5 -0
  544. package/node/locales/faIR.js +5 -0
  545. package/node/locales/fiFI.js +5 -0
  546. package/node/locales/frFR.js +5 -0
  547. package/node/locales/heIL.js +10 -5
  548. package/node/locales/huHU.js +5 -0
  549. package/node/locales/itIT.js +5 -0
  550. package/node/locales/jaJP.js +5 -0
  551. package/node/locales/koKR.js +5 -0
  552. package/node/locales/nbNO.js +125 -0
  553. package/node/locales/nlNL.js +5 -0
  554. package/node/locales/plPL.js +5 -0
  555. package/node/locales/ptBR.js +5 -0
  556. package/node/locales/ruRU.js +5 -0
  557. package/node/locales/skSK.js +5 -0
  558. package/node/locales/trTR.js +8 -3
  559. package/node/locales/ukUA.js +5 -0
  560. package/node/locales/viVN.js +5 -0
  561. package/node/locales/zhCN.js +5 -0
  562. package/node/models/events/gridEvents.js +4 -0
  563. package/node/models/gridApiCaches.js +5 -0
  564. package/node/models/index.js +0 -13
  565. package/node/models/params/gridMenuParams.js +5 -0
  566. package/node/models/params/index.js +13 -0
  567. package/node/utils/createSelector.js +25 -4
  568. package/node/utils/exportAs.js +1 -1
  569. package/package.json +5 -4
  570. package/utils/createSelector.d.ts +2 -1
  571. package/utils/createSelector.js +20 -2
  572. package/utils/exportAs.d.ts +2 -2
  573. package/utils/exportAs.js +1 -1
@@ -5,18 +5,29 @@ var _excluded = ["children", "className"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import clsx from 'clsx';
8
- import { useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
8
+ import { useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, capitalize } from '@mui/material/utils';
9
+ import { unstable_composeClasses as composeClasses } from '@mui/material';
9
10
  import { GridRootStyles } from './GridRootStyles';
10
11
  import { gridVisibleColumnDefinitionsSelector } from '../../hooks/features/columns/gridColumnsSelector';
11
12
  import { useGridSelector } from '../../hooks/utils/useGridSelector';
12
13
  import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
13
14
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
14
- import { gridClasses } from '../../constants/gridClasses';
15
+ import { getDataGridUtilityClass } from '../../constants/gridClasses';
15
16
  import { gridRowCountSelector } from '../../hooks/features/rows/gridRowsSelector';
17
+ import { gridDensityValueSelector } from '../../hooks/features/density/densitySelector';
16
18
  import { jsx as _jsx } from "react/jsx-runtime";
17
- var GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
18
- var _rootProps$classes;
19
19
 
20
+ var useUtilityClasses = function useUtilityClasses(ownerState) {
21
+ var autoHeight = ownerState.autoHeight,
22
+ density = ownerState.density,
23
+ classes = ownerState.classes;
24
+ var slots = {
25
+ root: ['root', autoHeight && 'autoHeight', "root--density".concat(capitalize(density))]
26
+ };
27
+ return composeClasses(slots, getDataGridUtilityClass, classes);
28
+ };
29
+
30
+ var GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
20
31
  var rootProps = useGridRootProps();
21
32
 
22
33
  var children = props.children,
@@ -26,8 +37,15 @@ var GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
26
37
  var apiRef = useGridApiContext();
27
38
  var visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
28
39
  var totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
40
+ var densityValue = useGridSelector(apiRef, gridDensityValueSelector);
29
41
  var rootContainerRef = React.useRef(null);
30
42
  var handleRef = useForkRef(rootContainerRef, ref);
43
+ var ownerState = {
44
+ density: densityValue,
45
+ classes: rootProps.classes,
46
+ autoHeight: rootProps.autoHeight
47
+ };
48
+ var classes = useUtilityClasses(ownerState);
31
49
  apiRef.current.rootElementRef = rootContainerRef; // Our implementation of <NoSsr />
32
50
 
33
51
  var _React$useState = React.useState(false),
@@ -50,7 +68,7 @@ var GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
50
68
 
51
69
  return /*#__PURE__*/_jsx(GridRootStyles, _extends({
52
70
  ref: handleRef,
53
- className: clsx(className, (_rootProps$classes = rootProps.classes) == null ? void 0 : _rootProps$classes.root, gridClasses.root, rootProps.autoHeight && gridClasses.autoHeight),
71
+ className: clsx(className, classes.root),
54
72
  role: "grid",
55
73
  "aria-colcount": visibleColumns.length,
56
74
  "aria-rowcount": totalRowCount,
@@ -155,9 +155,10 @@ export var GridRootStyles = styled('div', {
155
155
  }), _defineProperty(_extends2, "& .".concat(gridClasses.cell), {
156
156
  display: 'flex',
157
157
  alignItems: 'center',
158
- overflow: 'hidden',
159
- whiteSpace: 'nowrap',
160
158
  borderBottom: "1px solid ".concat(borderColor)
159
+ }), _defineProperty(_extends2, "& .".concat(gridClasses.row, ":not(.").concat(gridClasses['row--dynamicHeight'], ") > .").concat(gridClasses.cell), {
160
+ overflow: 'hidden',
161
+ whiteSpace: 'nowrap'
161
162
  }), _defineProperty(_extends2, "& .".concat(gridClasses.cellContent), {
162
163
  overflow: 'hidden',
163
164
  textOverflow: 'ellipsis'
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className", "children"];
4
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
5
6
  import clsx from 'clsx';
6
7
  import { styled } from '@mui/material/styles';
7
8
  import { unstable_composeClasses as composeClasses } from '@mui/material';
@@ -28,10 +29,11 @@ var GridToolbarContainerRoot = styled('div', {
28
29
  return {
29
30
  display: 'flex',
30
31
  alignItems: 'center',
32
+ flexWrap: 'wrap',
31
33
  padding: theme.spacing(0.5, 0.5, 0)
32
34
  };
33
35
  });
34
- export var GridToolbarContainer = /*#__PURE__*/React.forwardRef(function GridToolbarContainer(props, ref) {
36
+ var GridToolbarContainer = /*#__PURE__*/React.forwardRef(function GridToolbarContainer(props, ref) {
35
37
  var className = props.className,
36
38
  children = props.children,
37
39
  other = _objectWithoutProperties(props, _excluded);
@@ -52,4 +54,12 @@ export var GridToolbarContainer = /*#__PURE__*/React.forwardRef(function GridToo
52
54
  }, other, {
53
55
  children: children
54
56
  }));
55
- });
57
+ });
58
+ process.env.NODE_ENV !== "production" ? GridToolbarContainer.propTypes = {
59
+ // ----------------------------- Warning --------------------------------
60
+ // | These PropTypes are generated from the TypeScript type definitions |
61
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
62
+ // ----------------------------------------------------------------------
63
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
64
+ } : void 0;
65
+ export { GridToolbarContainer };
@@ -14,6 +14,7 @@ import { styled } from '@mui/material/styles';
14
14
  import { HTMLElementType } from '@mui/utils';
15
15
  import { getDataGridUtilityClass, gridClasses } from '../../constants/gridClasses';
16
16
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
17
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
 
19
20
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -55,6 +56,7 @@ var GridMenu = function GridMenu(props) {
55
56
  onExited = props.onExited,
56
57
  other = _objectWithoutProperties(props, _excluded);
57
58
 
59
+ var apiRef = useGridApiContext();
58
60
  var prevTarget = React.useRef(target);
59
61
  var prevOpen = React.useRef(open);
60
62
  var rootProps = useGridRootProps();
@@ -65,11 +67,16 @@ var GridMenu = function GridMenu(props) {
65
67
  React.useEffect(function () {
66
68
  if (prevOpen.current && prevTarget.current) {
67
69
  prevTarget.current.focus();
68
- }
70
+ } // Emit menuOpen or menuClose events
71
+
69
72
 
73
+ var eventName = open ? 'menuOpen' : 'menuClose';
74
+ apiRef.current.publishEvent(eventName, {
75
+ target: target
76
+ });
70
77
  prevOpen.current = open;
71
78
  prevTarget.current = target;
72
- }, [open, target]);
79
+ }, [apiRef, open, target]);
73
80
 
74
81
  var handleExited = function handleExited(popperOnExited) {
75
82
  return function (node) {
@@ -86,8 +86,18 @@ export function GridColumnsPanel(props) {
86
86
  };
87
87
 
88
88
  var toggleAllColumns = React.useCallback(function (isVisible) {
89
- // TODO v6: call `setColumnVisibilityModel` directly
90
- apiRef.current.updateColumns(columns.map(function (col) {
89
+ if (apiRef.current.unstable_caches.columns.isUsingColumnVisibilityModel) {
90
+ if (isVisible) {
91
+ return apiRef.current.setColumnVisibilityModel({});
92
+ }
93
+
94
+ return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.map(function (col) {
95
+ return [col.field, false];
96
+ })));
97
+ } // TODO v6: Remove
98
+
99
+
100
+ return apiRef.current.updateColumns(columns.map(function (col) {
91
101
  if (col.hideable !== false) {
92
102
  return {
93
103
  field: col.field,
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className"];
4
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
5
6
  import clsx from 'clsx';
6
7
  import { styled } from '@mui/material/styles';
7
8
  import { unstable_composeClasses as composeClasses } from '@mui/material';
@@ -30,7 +31,8 @@ var GridPanelContentRoot = styled('div', {
30
31
  flex: '1 1',
31
32
  maxHeight: 400
32
33
  });
33
- export function GridPanelContent(props) {
34
+
35
+ function GridPanelContent(props) {
34
36
  var className = props.className,
35
37
  other = _objectWithoutProperties(props, _excluded);
36
38
 
@@ -42,4 +44,13 @@ export function GridPanelContent(props) {
42
44
  return /*#__PURE__*/_jsx(GridPanelContentRoot, _extends({
43
45
  className: clsx(className, classes.root)
44
46
  }, other));
45
- }
47
+ }
48
+
49
+ process.env.NODE_ENV !== "production" ? GridPanelContent.propTypes = {
50
+ // ----------------------------- Warning --------------------------------
51
+ // | These PropTypes are generated from the TypeScript type definitions |
52
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
53
+ // ----------------------------------------------------------------------
54
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
55
+ } : void 0;
56
+ export { GridPanelContent };
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className"];
4
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
5
6
  import clsx from 'clsx';
6
7
  import { styled } from '@mui/material/styles';
7
8
  import { unstable_composeClasses as composeClasses } from '@mui/material';
@@ -31,7 +32,8 @@ var GridPanelFooterRoot = styled('div', {
31
32
  justifyContent: 'space-between'
32
33
  };
33
34
  });
34
- export function GridPanelFooter(props) {
35
+
36
+ function GridPanelFooter(props) {
35
37
  var className = props.className,
36
38
  other = _objectWithoutProperties(props, _excluded);
37
39
 
@@ -43,4 +45,13 @@ export function GridPanelFooter(props) {
43
45
  return /*#__PURE__*/_jsx(GridPanelFooterRoot, _extends({
44
46
  className: clsx(className, classes.root)
45
47
  }, other));
46
- }
48
+ }
49
+
50
+ process.env.NODE_ENV !== "production" ? GridPanelFooter.propTypes = {
51
+ // ----------------------------- Warning --------------------------------
52
+ // | These PropTypes are generated from the TypeScript type definitions |
53
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
54
+ // ----------------------------------------------------------------------
55
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
56
+ } : void 0;
57
+ export { GridPanelFooter };
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  var _excluded = ["className"];
4
4
  import * as React from 'react';
5
+ import PropTypes from 'prop-types';
5
6
  import clsx from 'clsx';
6
7
  import { styled } from '@mui/material/styles';
7
8
  import { unstable_composeClasses as composeClasses } from '@mui/material';
@@ -29,7 +30,8 @@ var GridPanelHeaderRoot = styled('div', {
29
30
  padding: theme.spacing(1)
30
31
  };
31
32
  });
32
- export function GridPanelHeader(props) {
33
+
34
+ function GridPanelHeader(props) {
33
35
  var className = props.className,
34
36
  other = _objectWithoutProperties(props, _excluded);
35
37
 
@@ -41,4 +43,13 @@ export function GridPanelHeader(props) {
41
43
  return /*#__PURE__*/_jsx(GridPanelHeaderRoot, _extends({
42
44
  className: clsx(className, classes.root)
43
45
  }, other));
44
- }
46
+ }
47
+
48
+ process.env.NODE_ENV !== "production" ? GridPanelHeader.propTypes = {
49
+ // ----------------------------- Warning --------------------------------
50
+ // | These PropTypes are generated from the TypeScript type definitions |
51
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
52
+ // ----------------------------------------------------------------------
53
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
54
+ } : void 0;
55
+ export { GridPanelHeader };
@@ -37,7 +37,7 @@ var isEnabled = function isEnabled() {
37
37
  return true;
38
38
  };
39
39
 
40
- function GridPanelWrapper(props) {
40
+ var GridPanelWrapper = /*#__PURE__*/React.forwardRef(function GridPanelWrapper(props, ref) {
41
41
  var className = props.className,
42
42
  other = _objectWithoutProperties(props, _excluded);
43
43
 
@@ -51,10 +51,10 @@ function GridPanelWrapper(props) {
51
51
  disableEnforceFocus: true,
52
52
  isEnabled: isEnabled,
53
53
  children: /*#__PURE__*/_jsx(GridPanelWrapperRoot, _extends({
54
+ ref: ref,
54
55
  tabIndex: -1,
55
56
  className: clsx(className, classes.root)
56
57
  }, other))
57
58
  });
58
- }
59
-
59
+ });
60
60
  export { GridPanelWrapper };
@@ -1,4 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterChanges", "multiFilterOperator", "showMultiFilterOperators", "disableMultiFilterOperator", "applyMultiFilterOperatorChanges", "focusElementRef", "linkOperators", "columnsSort", "deleteIconProps", "linkOperatorInputProps", "operatorInputProps", "columnInputProps", "valueInputProps", "children"];
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
4
6
  import { unstable_composeClasses as composeClasses } from '@mui/material';
@@ -116,8 +118,7 @@ var getColumnLabel = function getColumnLabel(col) {
116
118
  };
117
119
 
118
120
  var collator = new Intl.Collator();
119
-
120
- function GridFilterForm(props) {
121
+ var GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(props, ref) {
121
122
  var _rootProps$components, _rootProps$components2, _baseSelectProps$nati, _rootProps$components3, _rootProps$components4, _rootProps$components5, _currentColumn$filter2;
122
123
 
123
124
  var item = props.item,
@@ -141,7 +142,10 @@ function GridFilterForm(props) {
141
142
  _props$columnInputPro = props.columnInputProps,
142
143
  columnInputProps = _props$columnInputPro === void 0 ? {} : _props$columnInputPro,
143
144
  _props$valueInputProp = props.valueInputProps,
144
- valueInputProps = _props$valueInputProp === void 0 ? {} : _props$valueInputProp;
145
+ valueInputProps = _props$valueInputProp === void 0 ? {} : _props$valueInputProp,
146
+ children = props.children,
147
+ other = _objectWithoutProperties(props, _excluded);
148
+
145
149
  var apiRef = useGridApiContext();
146
150
  var filterableColumns = useGridSelector(apiRef, gridFilterableColumnDefinitionsSelector);
147
151
  var columnSelectId = useId();
@@ -253,8 +257,10 @@ function GridFilterForm(props) {
253
257
  }
254
258
  };
255
259
  }, [currentOperator]);
256
- return /*#__PURE__*/_jsxs(GridFilterFormRoot, {
257
- className: classes.root,
260
+ return /*#__PURE__*/_jsxs(GridFilterFormRoot, _extends({
261
+ ref: ref,
262
+ className: classes.root
263
+ }, other, {
258
264
  children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({
259
265
  variant: "standard",
260
266
  as: rootProps.components.BaseFormControl
@@ -355,36 +361,111 @@ function GridFilterForm(props) {
355
361
  focusElementRef: valueRef
356
362
  }, currentOperator.InputComponentProps)) : null
357
363
  }))]
358
- });
359
- }
360
-
364
+ }));
365
+ });
361
366
  process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
362
367
  // ----------------------------- Warning --------------------------------
363
368
  // | These PropTypes are generated from the TypeScript type definitions |
364
369
  // | To update them edit the TypeScript types and run "yarn proptypes" |
365
370
  // ----------------------------------------------------------------------
371
+
372
+ /**
373
+ * Callback called when the operator, column field or value is changed.
374
+ * @param {GridFilterItem} item The updated [[GridFilterItem]].
375
+ */
366
376
  applyFilterChanges: PropTypes.func.isRequired,
377
+
378
+ /**
379
+ * Callback called when the logic operator is changed.
380
+ * @param {GridLinkOperator} operator The new logic operator.
381
+ */
367
382
  applyMultiFilterOperatorChanges: PropTypes.func.isRequired,
383
+
384
+ /**
385
+ * Props passed to the column input component.
386
+ * @default {}
387
+ */
368
388
  columnInputProps: PropTypes.any,
389
+
390
+ /**
391
+ * Changes how the options in the columns selector should be ordered.
392
+ * If not specified, the order is derived from the `columns` prop.
393
+ */
369
394
  columnsSort: PropTypes.oneOf(['asc', 'desc']),
395
+
396
+ /**
397
+ * Callback called when the delete button is clicked.
398
+ * @param {GridFilterItem} item The deleted [[GridFilterItem]].
399
+ */
370
400
  deleteFilter: PropTypes.func.isRequired,
401
+
402
+ /**
403
+ * Props passed to the delete icon.
404
+ * @default {}
405
+ */
371
406
  deleteIconProps: PropTypes.any,
407
+
408
+ /**
409
+ * If `true`, disables the logic operator field but still renders it.
410
+ */
372
411
  disableMultiFilterOperator: PropTypes.bool,
412
+
413
+ /**
414
+ * A ref allowing to set imperative focus.
415
+ * It can be passed to the el
416
+ */
373
417
  focusElementRef: PropTypes
374
418
  /* @typescript-to-proptypes-ignore */
375
419
  .oneOfType([PropTypes.func, PropTypes.object]),
420
+
421
+ /**
422
+ * If `true`, the logic operator field is rendered.
423
+ * The field will be invisible if `showMultiFilterOperators` is also `true`.
424
+ */
376
425
  hasMultipleFilters: PropTypes.bool.isRequired,
426
+
427
+ /**
428
+ * The [[GridFilterItem]] representing this form.
429
+ */
377
430
  item: PropTypes.shape({
378
431
  columnField: PropTypes.string.isRequired,
379
432
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
380
433
  operatorValue: PropTypes.string,
381
434
  value: PropTypes.any
382
435
  }).isRequired,
436
+
437
+ /**
438
+ * Props passed to the logic operator input component.
439
+ * @default {}
440
+ */
383
441
  linkOperatorInputProps: PropTypes.any,
442
+
443
+ /**
444
+ * Sets the available logic operators.
445
+ * @default [GridLinkOperator.And, GridLinkOperator.Or]
446
+ */
384
447
  linkOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),
448
+
449
+ /**
450
+ * The current logic operator applied.
451
+ */
385
452
  multiFilterOperator: PropTypes.oneOf(['and', 'or']),
453
+
454
+ /**
455
+ * Props passed to the operator input component.
456
+ * @default {}
457
+ */
386
458
  operatorInputProps: PropTypes.any,
459
+
460
+ /**
461
+ * If `true`, the logic operator field is visible.
462
+ */
387
463
  showMultiFilterOperators: PropTypes.bool,
464
+
465
+ /**
466
+ * Props passed to the value input component.
467
+ * @default {}
468
+ */
388
469
  valueInputProps: PropTypes.any
389
470
  } : void 0;
390
471
  export { GridFilterForm };
@@ -93,7 +93,6 @@ function GridFilterInputMultipleSingleSelect(props) {
93
93
  }, [applyValue, item]);
94
94
  return /*#__PURE__*/_jsx(Autocomplete, _extends({
95
95
  multiple: true,
96
- freeSolo: false,
97
96
  limitTags: 1,
98
97
  options: resolvedValueOptions // TODO: avoid `any`?
99
98
  ,
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["linkOperators", "columnsSort", "filterFormProps"];
4
+ var _excluded = ["linkOperators", "columnsSort", "filterFormProps", "children"];
5
5
  import * as React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import { GridLinkOperator } from '../../../models/gridFilterItem';
@@ -17,8 +17,7 @@ import { gridFilterModelSelector } from '../../../hooks/features/filter/gridFilt
17
17
  import { gridFilterableColumnDefinitionsSelector } from '../../../hooks/features/columns/gridColumnsSelector';
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
-
21
- function GridFilterPanel(props) {
20
+ var GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(props, ref) {
22
21
  var _rootProps$components;
23
22
 
24
23
  var apiRef = useGridApiContext();
@@ -31,6 +30,7 @@ function GridFilterPanel(props) {
31
30
  linkOperators = _props$linkOperators === void 0 ? [GridLinkOperator.And, GridLinkOperator.Or] : _props$linkOperators,
32
31
  columnsSort = props.columnsSort,
33
32
  filterFormProps = props.filterFormProps,
33
+ children = props.children,
34
34
  other = _objectWithoutProperties(props, _excluded);
35
35
 
36
36
  var applyFilter = React.useCallback(function (item) {
@@ -96,7 +96,9 @@ function GridFilterPanel(props) {
96
96
  lastFilterRef.current.focus();
97
97
  }
98
98
  }, [items.length]);
99
- return /*#__PURE__*/_jsxs(GridPanelWrapper, _extends({}, other, {
99
+ return /*#__PURE__*/_jsxs(GridPanelWrapper, _extends({
100
+ ref: ref
101
+ }, other, {
100
102
  children: [/*#__PURE__*/_jsx(GridPanelContent, {
101
103
  children: items.map(function (item, index) {
102
104
  return /*#__PURE__*/_jsx(GridFilterForm, _extends({
@@ -123,14 +125,22 @@ function GridFilterPanel(props) {
123
125
  }))
124
126
  })]
125
127
  }));
126
- }
127
-
128
+ });
128
129
  process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
129
130
  // ----------------------------- Warning --------------------------------
130
131
  // | These PropTypes are generated from the TypeScript type definitions |
131
132
  // | To update them edit the TypeScript types and run "yarn proptypes" |
132
133
  // ----------------------------------------------------------------------
134
+
135
+ /**
136
+ * Changes how the options in the columns selector should be ordered.
137
+ * If not specified, the order is derived from the `columns` prop.
138
+ */
133
139
  columnsSort: PropTypes.oneOf(['asc', 'desc']),
140
+
141
+ /**
142
+ * Props passed to each filter form.
143
+ */
134
144
  filterFormProps: PropTypes.shape({
135
145
  columnInputProps: PropTypes.any,
136
146
  columnsSort: PropTypes.oneOf(['asc', 'desc']),
@@ -139,7 +149,16 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
139
149
  operatorInputProps: PropTypes.any,
140
150
  valueInputProps: PropTypes.any
141
151
  }),
152
+
153
+ /**
154
+ * Sets the available logic operators.
155
+ * @default [GridLinkOperator.And, GridLinkOperator.Or]
156
+ */
142
157
  linkOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),
158
+
159
+ /**
160
+ * The system prop that allows defining system overrides as well as additional CSS styles.
161
+ */
143
162
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
144
163
  } : void 0;
145
164
  export { GridFilterPanel };
@@ -1,25 +1,34 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["className", "csvOptions", "printOptions"];
3
+ var _excluded = ["className", "csvOptions", "printOptions", "excelOptions", "showQuickFilter", "quickFilterProps"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import Box from '@mui/material/Box';
6
7
  import { GridToolbarContainer } from '../containers/GridToolbarContainer';
7
8
  import { GridToolbarColumnsButton } from './GridToolbarColumnsButton';
8
9
  import { GridToolbarDensitySelector } from './GridToolbarDensitySelector';
9
10
  import { GridToolbarFilterButton } from './GridToolbarFilterButton';
10
11
  import { GridToolbarExport } from './GridToolbarExport';
11
12
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
13
+ import { GridToolbarQuickFilter } from './GridToolbarQuickFilter';
12
14
  import { jsx as _jsx } from "react/jsx-runtime";
13
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
16
  var GridToolbar = /*#__PURE__*/React.forwardRef(function GridToolbar(props, ref) {
17
+ // TODO v6: think about where export option should be passed.
18
+ // from componentProps={{ toolbarExport: { ...exportOption} }} seems to be more appropriate
15
19
  var className = props.className,
16
20
  csvOptions = props.csvOptions,
17
21
  printOptions = props.printOptions,
22
+ excelOptions = props.excelOptions,
23
+ _props$showQuickFilte = props.showQuickFilter,
24
+ showQuickFilter = _props$showQuickFilte === void 0 ? false : _props$showQuickFilte,
25
+ _props$quickFilterPro = props.quickFilterProps,
26
+ quickFilterProps = _props$quickFilterPro === void 0 ? {} : _props$quickFilterPro,
18
27
  other = _objectWithoutProperties(props, _excluded);
19
28
 
20
29
  var rootProps = useGridRootProps();
21
30
 
22
- if (rootProps.disableColumnFilter && rootProps.disableColumnSelector && rootProps.disableDensitySelector) {
31
+ if (rootProps.disableColumnFilter && rootProps.disableColumnSelector && rootProps.disableDensitySelector && !showQuickFilter) {
23
32
  return null;
24
33
  }
25
34
 
@@ -28,8 +37,14 @@ var GridToolbar = /*#__PURE__*/React.forwardRef(function GridToolbar(props, ref)
28
37
  }, other, {
29
38
  children: [/*#__PURE__*/_jsx(GridToolbarColumnsButton, {}), /*#__PURE__*/_jsx(GridToolbarFilterButton, {}), /*#__PURE__*/_jsx(GridToolbarDensitySelector, {}), /*#__PURE__*/_jsx(GridToolbarExport, {
30
39
  csvOptions: csvOptions,
31
- printOptions: printOptions
32
- })]
40
+ printOptions: printOptions // TODO: remove the reference to excelOptions in community package
41
+ ,
42
+ excelOptions: excelOptions
43
+ }), /*#__PURE__*/_jsx(Box, {
44
+ sx: {
45
+ flex: 1
46
+ }
47
+ }), showQuickFilter && /*#__PURE__*/_jsx(GridToolbarQuickFilter, _extends({}, quickFilterProps))]
33
48
  }));
34
49
  });
35
50
  process.env.NODE_ENV !== "production" ? GridToolbar.propTypes = {
@@ -37,7 +52,17 @@ process.env.NODE_ENV !== "production" ? GridToolbar.propTypes = {
37
52
  // | These PropTypes are generated from the TypeScript type definitions |
38
53
  // | To update them edit the TypeScript types and run "yarn proptypes" |
39
54
  // ----------------------------------------------------------------------
40
- csvOptions: PropTypes.object,
41
- printOptions: PropTypes.object
55
+
56
+ /**
57
+ * Props passed to the quick filter component.
58
+ */
59
+ quickFilterProps: PropTypes.object,
60
+
61
+ /**
62
+ * Show the quick filter component.
63
+ * @default false
64
+ */
65
+ showQuickFilter: PropTypes.bool,
66
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
42
67
  } : void 0;
43
68
  export { GridToolbar };