@mui/x-data-grid 5.10.0 → 5.11.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 (490) hide show
  1. package/CHANGELOG.md +163 -10
  2. package/DataGrid/DataGrid.js +35 -1
  3. package/DataGrid/useDataGridProps.js +2 -1
  4. package/README.md +1 -1
  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.js +4 -5
  21. package/components/GridRowCount.d.ts +4 -1
  22. package/components/GridRowCount.js +1 -0
  23. package/components/GridScrollArea.js +3 -4
  24. package/components/GridSelectedRowCount.d.ts +4 -1
  25. package/components/GridSelectedRowCount.js +2 -1
  26. package/components/base/GridBody.js +1 -2
  27. package/components/base/GridOverlays.js +1 -2
  28. package/components/cell/GridActionsCell.js +13 -4
  29. package/components/cell/GridCell.js +8 -8
  30. package/components/cell/GridEditBooleanCell.d.ts +15 -3
  31. package/components/cell/GridEditBooleanCell.js +101 -6
  32. package/components/cell/GridEditDateCell.d.ts +16 -4
  33. package/components/cell/GridEditDateCell.js +99 -5
  34. package/components/cell/GridEditInputCell.d.ts +11 -5
  35. package/components/cell/GridEditInputCell.js +29 -5
  36. package/components/cell/GridEditSingleSelectCell.d.ts +12 -4
  37. package/components/cell/GridEditSingleSelectCell.js +28 -5
  38. package/components/cell/index.d.ts +2 -0
  39. package/components/cell/index.js +2 -0
  40. package/components/columnHeaders/GridColumnHeaderItem.js +15 -16
  41. package/components/columnHeaders/GridColumnHeaders.d.ts +2 -0
  42. package/components/columnHeaders/GridColumnHeadersInner.d.ts +2 -0
  43. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  44. package/components/columnSelection/GridHeaderCheckbox.js +4 -5
  45. package/components/containers/GridFooterContainer.d.ts +8 -2
  46. package/components/containers/GridFooterContainer.js +11 -2
  47. package/components/containers/GridToolbarContainer.d.ts +8 -2
  48. package/components/containers/GridToolbarContainer.js +12 -2
  49. package/components/panel/GridPanelContent.d.ts +8 -1
  50. package/components/panel/GridPanelContent.js +13 -2
  51. package/components/panel/GridPanelFooter.d.ts +8 -1
  52. package/components/panel/GridPanelFooter.js +13 -2
  53. package/components/panel/GridPanelHeader.d.ts +8 -1
  54. package/components/panel/GridPanelHeader.js +13 -2
  55. package/components/toolbar/GridToolbar.d.ts +12 -2
  56. package/components/toolbar/GridToolbar.js +30 -7
  57. package/components/toolbar/GridToolbarExport.d.ts +5 -4
  58. package/components/toolbar/GridToolbarExport.js +15 -20
  59. package/components/toolbar/GridToolbarQuickFilter.d.ts +20 -0
  60. package/components/toolbar/GridToolbarQuickFilter.js +88 -0
  61. package/components/toolbar/index.d.ts +3 -1
  62. package/components/toolbar/index.js +3 -2
  63. package/components/virtualization/GridVirtualScroller.d.ts +4 -1
  64. package/components/virtualization/GridVirtualScrollerContent.d.ts +4 -1
  65. package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +4 -1
  66. package/constants/localeTextConstants.js +5 -0
  67. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +7 -0
  68. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +4 -4
  69. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
  70. package/hooks/core/useGridApiInitialization.js +3 -3
  71. package/hooks/core/useGridErrorHandler.js +1 -2
  72. package/hooks/core/useGridStateInitialization.js +1 -2
  73. package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
  74. package/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
  75. package/hooks/features/columns/useGridColumnSpanning.js +1 -2
  76. package/hooks/features/columns/useGridColumns.js +8 -9
  77. package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
  78. package/hooks/features/dimensions/useGridDimensions.js +8 -9
  79. package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
  80. package/hooks/features/editRows/useGridCellEditing.new.js +133 -32
  81. package/hooks/features/editRows/useGridCellEditing.old.js +20 -21
  82. package/hooks/features/editRows/useGridEditing.old.js +4 -5
  83. package/hooks/features/editRows/useGridRowEditing.new.d.ts +1 -1
  84. package/hooks/features/editRows/useGridRowEditing.new.js +122 -42
  85. package/hooks/features/editRows/useGridRowEditing.old.js +21 -22
  86. package/hooks/features/events/useGridEvents.js +17 -18
  87. package/hooks/features/export/serializers/csvSerializer.js +5 -5
  88. package/hooks/features/export/useGridCsvExport.js +23 -16
  89. package/hooks/features/export/useGridPrintExport.js +22 -0
  90. package/hooks/features/export/utils.d.ts +3 -1
  91. package/hooks/features/export/utils.js +13 -0
  92. package/hooks/features/filter/gridFilterState.d.ts +1 -2
  93. package/hooks/features/filter/gridFilterState.js +3 -1
  94. package/hooks/features/filter/gridFilterUtils.d.ts +8 -0
  95. package/hooks/features/filter/gridFilterUtils.js +84 -2
  96. package/hooks/features/filter/useGridFilter.js +20 -8
  97. package/hooks/features/focus/useGridFocus.d.ts +1 -1
  98. package/hooks/features/focus/useGridFocus.js +29 -33
  99. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
  100. package/hooks/features/pagination/useGridPage.js +3 -4
  101. package/hooks/features/pagination/useGridPageSize.js +2 -3
  102. package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
  103. package/hooks/features/rows/gridRowsSelector.d.ts +1 -0
  104. package/hooks/features/rows/gridRowsSelector.js +1 -0
  105. package/hooks/features/rows/gridRowsState.d.ts +3 -7
  106. package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
  107. package/hooks/features/rows/gridRowsUtils.js +25 -1
  108. package/hooks/features/rows/useGridRows.js +100 -60
  109. package/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  110. package/hooks/features/scroll/useGridScroll.js +6 -1
  111. package/hooks/features/selection/useGridSelection.d.ts +1 -1
  112. package/hooks/features/selection/useGridSelection.js +13 -10
  113. package/hooks/features/sorting/useGridSorting.js +8 -9
  114. package/hooks/features/virtualization/useGridVirtualScroller.js +6 -7
  115. package/hooks/utils/useGridApiEventHandler.d.ts +4 -1
  116. package/hooks/utils/useGridApiEventHandler.js +22 -9
  117. package/hooks/utils/useGridNativeEventListener.js +1 -2
  118. package/hooks/utils/useGridSelector.js +1 -1
  119. package/index.d.ts +2 -0
  120. package/index.js +1 -1
  121. package/internals/index.d.ts +4 -1
  122. package/internals/index.js +5 -2
  123. package/legacy/DataGrid/DataGrid.js +35 -1
  124. package/legacy/DataGrid/useDataGridProps.js +2 -1
  125. package/legacy/colDef/gridActionsColDef.js +2 -1
  126. package/legacy/colDef/gridBooleanColDef.js +2 -1
  127. package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -0
  128. package/legacy/colDef/gridDateColDef.js +4 -2
  129. package/legacy/colDef/gridNumericColDef.js +3 -2
  130. package/legacy/colDef/gridNumericOperators.js +28 -18
  131. package/legacy/colDef/gridSingleSelectColDef.js +3 -2
  132. package/legacy/colDef/gridSingleSelectOperators.js +55 -6
  133. package/legacy/colDef/gridStringColDef.js +3 -2
  134. package/legacy/colDef/gridStringOperators.js +25 -14
  135. package/legacy/components/GridFooter.js +11 -2
  136. package/legacy/components/GridRow.js +4 -5
  137. package/legacy/components/GridRowCount.js +1 -0
  138. package/legacy/components/GridScrollArea.js +3 -4
  139. package/legacy/components/GridSelectedRowCount.js +2 -1
  140. package/legacy/components/base/GridBody.js +1 -2
  141. package/legacy/components/base/GridOverlays.js +1 -2
  142. package/legacy/components/cell/GridActionsCell.js +13 -4
  143. package/legacy/components/cell/GridCell.js +8 -8
  144. package/legacy/components/cell/GridEditBooleanCell.js +132 -11
  145. package/legacy/components/cell/GridEditDateCell.js +148 -42
  146. package/legacy/components/cell/GridEditInputCell.js +61 -12
  147. package/legacy/components/cell/GridEditSingleSelectCell.js +41 -13
  148. package/legacy/components/cell/index.js +2 -0
  149. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +15 -16
  150. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  151. package/legacy/components/columnSelection/GridHeaderCheckbox.js +4 -5
  152. package/legacy/components/containers/GridFooterContainer.js +11 -2
  153. package/legacy/components/containers/GridToolbarContainer.js +12 -2
  154. package/legacy/components/panel/GridPanelContent.js +13 -2
  155. package/legacy/components/panel/GridPanelFooter.js +13 -2
  156. package/legacy/components/panel/GridPanelHeader.js +13 -2
  157. package/legacy/components/toolbar/GridToolbar.js +31 -6
  158. package/legacy/components/toolbar/GridToolbarExport.js +18 -19
  159. package/legacy/components/toolbar/GridToolbarQuickFilter.js +103 -0
  160. package/legacy/components/toolbar/index.js +3 -2
  161. package/legacy/constants/localeTextConstants.js +5 -0
  162. package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
  163. package/legacy/hooks/core/useGridApiInitialization.js +3 -3
  164. package/legacy/hooks/core/useGridErrorHandler.js +1 -2
  165. package/legacy/hooks/core/useGridStateInitialization.js +1 -2
  166. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
  167. package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
  168. package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -2
  169. package/legacy/hooks/features/columns/useGridColumns.js +8 -9
  170. package/legacy/hooks/features/dimensions/useGridDimensions.js +8 -9
  171. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +213 -83
  172. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +20 -21
  173. package/legacy/hooks/features/editRows/useGridEditing.old.js +4 -5
  174. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +126 -42
  175. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +20 -21
  176. package/legacy/hooks/features/events/useGridEvents.js +17 -18
  177. package/legacy/hooks/features/export/serializers/csvSerializer.js +5 -5
  178. package/legacy/hooks/features/export/useGridCsvExport.js +24 -17
  179. package/legacy/hooks/features/export/useGridPrintExport.js +22 -0
  180. package/legacy/hooks/features/export/utils.js +14 -0
  181. package/legacy/hooks/features/filter/gridFilterState.js +3 -1
  182. package/legacy/hooks/features/filter/gridFilterUtils.js +96 -2
  183. package/legacy/hooks/features/filter/useGridFilter.js +20 -8
  184. package/legacy/hooks/features/focus/useGridFocus.js +31 -35
  185. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
  186. package/legacy/hooks/features/pagination/useGridPage.js +3 -4
  187. package/legacy/hooks/features/pagination/useGridPageSize.js +2 -3
  188. package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
  189. package/legacy/hooks/features/rows/gridRowsSelector.js +3 -0
  190. package/legacy/hooks/features/rows/gridRowsUtils.js +27 -1
  191. package/legacy/hooks/features/rows/useGridRows.js +104 -60
  192. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  193. package/legacy/hooks/features/scroll/useGridScroll.js +6 -1
  194. package/legacy/hooks/features/selection/useGridSelection.js +13 -10
  195. package/legacy/hooks/features/sorting/useGridSorting.js +8 -9
  196. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +6 -7
  197. package/legacy/hooks/utils/useGridApiEventHandler.js +20 -9
  198. package/legacy/hooks/utils/useGridNativeEventListener.js +1 -2
  199. package/legacy/hooks/utils/useGridSelector.js +1 -1
  200. package/legacy/index.js +1 -1
  201. package/legacy/internals/index.js +5 -2
  202. package/legacy/locales/arSD.js +5 -0
  203. package/legacy/locales/bgBG.js +5 -0
  204. package/legacy/locales/csCZ.js +5 -0
  205. package/legacy/locales/daDK.js +5 -0
  206. package/legacy/locales/deDE.js +10 -5
  207. package/legacy/locales/elGR.js +5 -0
  208. package/legacy/locales/esES.js +5 -0
  209. package/legacy/locales/faIR.js +5 -0
  210. package/legacy/locales/fiFI.js +5 -0
  211. package/legacy/locales/frFR.js +5 -0
  212. package/legacy/locales/heIL.js +5 -0
  213. package/legacy/locales/huHU.js +5 -0
  214. package/legacy/locales/itIT.js +5 -0
  215. package/legacy/locales/jaJP.js +5 -0
  216. package/legacy/locales/koKR.js +5 -0
  217. package/legacy/locales/nlNL.js +5 -0
  218. package/legacy/locales/plPL.js +5 -0
  219. package/legacy/locales/ptBR.js +5 -0
  220. package/legacy/locales/ruRU.js +5 -0
  221. package/legacy/locales/skSK.js +5 -0
  222. package/legacy/locales/trTR.js +5 -0
  223. package/legacy/locales/ukUA.js +5 -0
  224. package/legacy/locales/viVN.js +5 -0
  225. package/legacy/locales/zhCN.js +5 -0
  226. package/legacy/models/events/gridEvents.js +2 -0
  227. package/legacy/models/index.js +4 -3
  228. package/legacy/utils/createSelector.js +18 -2
  229. package/legacy/utils/exportAs.js +1 -1
  230. package/locales/arSD.js +5 -0
  231. package/locales/bgBG.js +5 -0
  232. package/locales/csCZ.js +5 -0
  233. package/locales/daDK.js +5 -0
  234. package/locales/deDE.js +10 -5
  235. package/locales/elGR.js +5 -0
  236. package/locales/esES.js +5 -0
  237. package/locales/faIR.js +5 -0
  238. package/locales/fiFI.js +5 -0
  239. package/locales/frFR.js +5 -0
  240. package/locales/heIL.js +5 -0
  241. package/locales/huHU.js +5 -0
  242. package/locales/itIT.js +5 -0
  243. package/locales/jaJP.js +5 -0
  244. package/locales/koKR.js +5 -0
  245. package/locales/nlNL.js +5 -0
  246. package/locales/plPL.js +5 -0
  247. package/locales/ptBR.js +5 -0
  248. package/locales/ruRU.js +5 -0
  249. package/locales/skSK.js +5 -0
  250. package/locales/trTR.js +5 -0
  251. package/locales/ukUA.js +5 -0
  252. package/locales/viVN.js +5 -0
  253. package/locales/zhCN.js +5 -0
  254. package/models/api/gridCoreApi.d.ts +10 -0
  255. package/models/api/gridEditingApi.d.ts +23 -4
  256. package/models/api/gridFilterApi.d.ts +5 -0
  257. package/models/api/gridFocusApi.d.ts +1 -0
  258. package/models/api/gridLocaleTextApi.d.ts +4 -0
  259. package/models/api/gridRowApi.d.ts +28 -0
  260. package/models/api/index.d.ts +1 -1
  261. package/models/colDef/gridColDef.d.ts +13 -0
  262. package/models/events/gridEventLookup.d.ts +273 -3
  263. package/models/events/gridEvents.d.ts +2 -277
  264. package/models/events/gridEvents.js +2 -0
  265. package/models/gridExport.d.ts +29 -2
  266. package/models/gridFilterModel.d.ts +11 -0
  267. package/models/gridFilterOperator.d.ts +1 -1
  268. package/models/gridStateCommunity.d.ts +0 -2
  269. package/models/index.d.ts +1 -1
  270. package/models/index.js +4 -3
  271. package/models/props/DataGridProps.d.ts +56 -28
  272. package/modern/DataGrid/DataGrid.js +35 -1
  273. package/modern/DataGrid/useDataGridProps.js +2 -1
  274. package/modern/colDef/gridActionsColDef.js +2 -1
  275. package/modern/colDef/gridBooleanColDef.js +2 -1
  276. package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
  277. package/modern/colDef/gridDateColDef.js +4 -2
  278. package/modern/colDef/gridNumericColDef.js +3 -2
  279. package/modern/colDef/gridNumericOperators.js +11 -0
  280. package/modern/colDef/gridSingleSelectColDef.js +3 -2
  281. package/modern/colDef/gridSingleSelectOperators.js +52 -0
  282. package/modern/colDef/gridStringColDef.js +3 -2
  283. package/modern/colDef/gridStringOperators.js +12 -0
  284. package/modern/components/GridFooter.js +11 -2
  285. package/modern/components/GridRow.js +4 -5
  286. package/modern/components/GridRowCount.js +1 -0
  287. package/modern/components/GridScrollArea.js +3 -4
  288. package/modern/components/GridSelectedRowCount.js +2 -1
  289. package/modern/components/base/GridBody.js +1 -2
  290. package/modern/components/base/GridOverlays.js +1 -2
  291. package/modern/components/cell/GridActionsCell.js +14 -3
  292. package/modern/components/cell/GridCell.js +8 -8
  293. package/modern/components/cell/GridEditBooleanCell.js +101 -6
  294. package/modern/components/cell/GridEditDateCell.js +99 -5
  295. package/modern/components/cell/GridEditInputCell.js +29 -5
  296. package/modern/components/cell/GridEditSingleSelectCell.js +28 -5
  297. package/modern/components/cell/index.js +2 -0
  298. package/modern/components/columnHeaders/GridColumnHeaderItem.js +15 -16
  299. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
  300. package/modern/components/columnSelection/GridHeaderCheckbox.js +4 -5
  301. package/modern/components/containers/GridFooterContainer.js +11 -2
  302. package/modern/components/containers/GridToolbarContainer.js +12 -2
  303. package/modern/components/panel/GridPanelContent.js +13 -2
  304. package/modern/components/panel/GridPanelFooter.js +13 -2
  305. package/modern/components/panel/GridPanelHeader.js +13 -2
  306. package/modern/components/toolbar/GridToolbar.js +30 -7
  307. package/modern/components/toolbar/GridToolbarExport.js +15 -20
  308. package/modern/components/toolbar/GridToolbarQuickFilter.js +86 -0
  309. package/modern/components/toolbar/index.js +3 -2
  310. package/modern/constants/localeTextConstants.js +5 -0
  311. package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
  312. package/modern/hooks/core/useGridApiInitialization.js +3 -3
  313. package/modern/hooks/core/useGridErrorHandler.js +1 -2
  314. package/modern/hooks/core/useGridStateInitialization.js +1 -2
  315. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
  316. package/modern/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
  317. package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -2
  318. package/modern/hooks/features/columns/useGridColumns.js +8 -9
  319. package/modern/hooks/features/dimensions/useGridDimensions.js +8 -9
  320. package/modern/hooks/features/editRows/useGridCellEditing.new.js +131 -32
  321. package/modern/hooks/features/editRows/useGridCellEditing.old.js +20 -21
  322. package/modern/hooks/features/editRows/useGridEditing.old.js +4 -5
  323. package/modern/hooks/features/editRows/useGridRowEditing.new.js +120 -42
  324. package/modern/hooks/features/editRows/useGridRowEditing.old.js +21 -22
  325. package/modern/hooks/features/events/useGridEvents.js +17 -18
  326. package/modern/hooks/features/export/serializers/csvSerializer.js +5 -5
  327. package/modern/hooks/features/export/useGridCsvExport.js +21 -16
  328. package/modern/hooks/features/export/useGridPrintExport.js +20 -0
  329. package/modern/hooks/features/export/utils.js +13 -0
  330. package/modern/hooks/features/filter/gridFilterState.js +3 -1
  331. package/modern/hooks/features/filter/gridFilterUtils.js +80 -2
  332. package/modern/hooks/features/filter/useGridFilter.js +20 -8
  333. package/modern/hooks/features/focus/useGridFocus.js +29 -33
  334. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
  335. package/modern/hooks/features/pagination/useGridPage.js +3 -4
  336. package/modern/hooks/features/pagination/useGridPageSize.js +2 -3
  337. package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
  338. package/modern/hooks/features/rows/gridRowsSelector.js +1 -0
  339. package/modern/hooks/features/rows/gridRowsUtils.js +23 -1
  340. package/modern/hooks/features/rows/useGridRows.js +100 -60
  341. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  342. package/modern/hooks/features/scroll/useGridScroll.js +6 -1
  343. package/modern/hooks/features/selection/useGridSelection.js +13 -10
  344. package/modern/hooks/features/sorting/useGridSorting.js +8 -9
  345. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +6 -7
  346. package/modern/hooks/utils/useGridApiEventHandler.js +20 -9
  347. package/modern/hooks/utils/useGridNativeEventListener.js +1 -2
  348. package/modern/hooks/utils/useGridSelector.js +1 -1
  349. package/modern/index.js +1 -1
  350. package/modern/internals/index.js +5 -2
  351. package/modern/locales/arSD.js +5 -0
  352. package/modern/locales/bgBG.js +5 -0
  353. package/modern/locales/csCZ.js +5 -0
  354. package/modern/locales/daDK.js +5 -0
  355. package/modern/locales/deDE.js +10 -5
  356. package/modern/locales/elGR.js +5 -0
  357. package/modern/locales/esES.js +5 -0
  358. package/modern/locales/faIR.js +5 -0
  359. package/modern/locales/fiFI.js +5 -0
  360. package/modern/locales/frFR.js +5 -0
  361. package/modern/locales/heIL.js +5 -0
  362. package/modern/locales/huHU.js +5 -0
  363. package/modern/locales/itIT.js +5 -0
  364. package/modern/locales/jaJP.js +5 -0
  365. package/modern/locales/koKR.js +5 -0
  366. package/modern/locales/nlNL.js +5 -0
  367. package/modern/locales/plPL.js +5 -0
  368. package/modern/locales/ptBR.js +5 -0
  369. package/modern/locales/ruRU.js +5 -0
  370. package/modern/locales/skSK.js +5 -0
  371. package/modern/locales/trTR.js +5 -0
  372. package/modern/locales/ukUA.js +5 -0
  373. package/modern/locales/viVN.js +5 -0
  374. package/modern/locales/zhCN.js +5 -0
  375. package/modern/models/events/gridEvents.js +2 -0
  376. package/modern/models/index.js +4 -3
  377. package/modern/utils/createSelector.js +20 -2
  378. package/modern/utils/exportAs.js +1 -1
  379. package/node/DataGrid/DataGrid.js +35 -1
  380. package/node/DataGrid/useDataGridProps.js +2 -1
  381. package/node/colDef/gridActionsColDef.js +2 -1
  382. package/node/colDef/gridBooleanColDef.js +2 -1
  383. package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
  384. package/node/colDef/gridDateColDef.js +4 -2
  385. package/node/colDef/gridNumericColDef.js +2 -1
  386. package/node/colDef/gridNumericOperators.js +15 -1
  387. package/node/colDef/gridSingleSelectColDef.js +2 -1
  388. package/node/colDef/gridSingleSelectOperators.js +56 -1
  389. package/node/colDef/gridStringColDef.js +2 -1
  390. package/node/colDef/gridStringOperators.js +16 -1
  391. package/node/components/GridFooter.js +10 -1
  392. package/node/components/GridRow.js +4 -6
  393. package/node/components/GridRowCount.js +1 -0
  394. package/node/components/GridScrollArea.js +3 -5
  395. package/node/components/GridSelectedRowCount.js +2 -1
  396. package/node/components/base/GridBody.js +1 -3
  397. package/node/components/base/GridOverlays.js +1 -3
  398. package/node/components/cell/GridActionsCell.js +13 -4
  399. package/node/components/cell/GridCell.js +7 -7
  400. package/node/components/cell/GridEditBooleanCell.js +100 -5
  401. package/node/components/cell/GridEditDateCell.js +98 -4
  402. package/node/components/cell/GridEditInputCell.js +29 -5
  403. package/node/components/cell/GridEditSingleSelectCell.js +28 -6
  404. package/node/components/cell/index.js +26 -0
  405. package/node/components/columnHeaders/GridColumnHeaderItem.js +15 -17
  406. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -4
  407. package/node/components/columnSelection/GridHeaderCheckbox.js +4 -6
  408. package/node/components/containers/GridFooterContainer.js +10 -1
  409. package/node/components/containers/GridToolbarContainer.js +11 -1
  410. package/node/components/panel/GridPanelContent.js +11 -1
  411. package/node/components/panel/GridPanelFooter.js +11 -1
  412. package/node/components/panel/GridPanelHeader.js +11 -1
  413. package/node/components/toolbar/GridToolbar.js +32 -7
  414. package/node/components/toolbar/GridToolbarExport.js +14 -19
  415. package/node/components/toolbar/GridToolbarQuickFilter.js +111 -0
  416. package/node/components/toolbar/index.js +42 -11
  417. package/node/constants/localeTextConstants.js +5 -0
  418. package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -8
  419. package/node/hooks/core/useGridApiInitialization.js +3 -4
  420. package/node/hooks/core/useGridErrorHandler.js +1 -3
  421. package/node/hooks/core/useGridStateInitialization.js +1 -3
  422. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -7
  423. package/node/hooks/features/columnMenu/useGridColumnMenu.js +3 -5
  424. package/node/hooks/features/columns/useGridColumnSpanning.js +1 -3
  425. package/node/hooks/features/columns/useGridColumns.js +8 -10
  426. package/node/hooks/features/dimensions/useGridDimensions.js +8 -10
  427. package/node/hooks/features/editRows/useGridCellEditing.new.js +133 -32
  428. package/node/hooks/features/editRows/useGridCellEditing.old.js +20 -22
  429. package/node/hooks/features/editRows/useGridEditing.old.js +4 -6
  430. package/node/hooks/features/editRows/useGridRowEditing.new.js +122 -43
  431. package/node/hooks/features/editRows/useGridRowEditing.old.js +21 -23
  432. package/node/hooks/features/events/useGridEvents.js +17 -19
  433. package/node/hooks/features/export/serializers/csvSerializer.js +5 -5
  434. package/node/hooks/features/export/useGridCsvExport.js +26 -17
  435. package/node/hooks/features/export/useGridPrintExport.js +25 -0
  436. package/node/hooks/features/export/utils.js +19 -2
  437. package/node/hooks/features/filter/gridFilterState.js +3 -1
  438. package/node/hooks/features/filter/gridFilterUtils.js +92 -3
  439. package/node/hooks/features/filter/useGridFilter.js +21 -9
  440. package/node/hooks/features/focus/useGridFocus.js +29 -34
  441. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -6
  442. package/node/hooks/features/pagination/useGridPage.js +3 -5
  443. package/node/hooks/features/pagination/useGridPageSize.js +2 -4
  444. package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -8
  445. package/node/hooks/features/rows/gridRowsSelector.js +3 -1
  446. package/node/hooks/features/rows/gridRowsUtils.js +29 -1
  447. package/node/hooks/features/rows/useGridRows.js +101 -60
  448. package/node/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
  449. package/node/hooks/features/scroll/useGridScroll.js +6 -1
  450. package/node/hooks/features/selection/useGridSelection.js +13 -11
  451. package/node/hooks/features/sorting/useGridSorting.js +8 -10
  452. package/node/hooks/features/virtualization/useGridVirtualScroller.js +6 -8
  453. package/node/hooks/utils/useGridApiEventHandler.js +22 -10
  454. package/node/hooks/utils/useGridNativeEventListener.js +1 -3
  455. package/node/hooks/utils/useGridSelector.js +1 -1
  456. package/node/index.js +1 -1
  457. package/node/internals/index.js +39 -3
  458. package/node/locales/arSD.js +5 -0
  459. package/node/locales/bgBG.js +5 -0
  460. package/node/locales/csCZ.js +5 -0
  461. package/node/locales/daDK.js +5 -0
  462. package/node/locales/deDE.js +10 -5
  463. package/node/locales/elGR.js +5 -0
  464. package/node/locales/esES.js +5 -0
  465. package/node/locales/faIR.js +5 -0
  466. package/node/locales/fiFI.js +5 -0
  467. package/node/locales/frFR.js +5 -0
  468. package/node/locales/heIL.js +5 -0
  469. package/node/locales/huHU.js +5 -0
  470. package/node/locales/itIT.js +5 -0
  471. package/node/locales/jaJP.js +5 -0
  472. package/node/locales/koKR.js +5 -0
  473. package/node/locales/nlNL.js +5 -0
  474. package/node/locales/plPL.js +5 -0
  475. package/node/locales/ptBR.js +5 -0
  476. package/node/locales/ruRU.js +5 -0
  477. package/node/locales/skSK.js +5 -0
  478. package/node/locales/trTR.js +5 -0
  479. package/node/locales/ukUA.js +5 -0
  480. package/node/locales/viVN.js +5 -0
  481. package/node/locales/zhCN.js +5 -0
  482. package/node/models/events/gridEvents.js +2 -0
  483. package/node/models/index.js +0 -13
  484. package/node/utils/createSelector.js +25 -4
  485. package/node/utils/exportAs.js +1 -1
  486. package/package.json +1 -1
  487. package/utils/createSelector.d.ts +2 -1
  488. package/utils/createSelector.js +20 -2
  489. package/utils/exportAs.d.ts +2 -2
  490. package/utils/exportAs.js +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,159 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## v5.11.0
7
+
8
+ _May 13, 2022_
9
+
10
+ We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Premium plan release
13
+
14
+ We’re happy to announce that the Premium plan is [finally out](https://mui.com/blog/premium-plan-release/)!
15
+ With it, MUI X officially steps up to the next level, supporting the most advanced use cases for UI components.
16
+
17
+ This plan is available through the new `@mui/x-data-grid-premium` package, which contains the row grouping and the Excel export features.
18
+
19
+ If you were already using the row grouping feature, you can upgrade by [installing](https://mui.com/x/react-data-grid/getting-started/#installation) `@mui/x-data-grid-premium` and replace `DataGridPro` with `DataGridPremium`, as follows.
20
+ Note that the experimental flag is not required anymore to use the row grouping.
21
+
22
+ ```diff
23
+ -import { DataGridPro } from '@mui/x-data-grid-pro';
24
+ +import { DataGridPremium } from '@mui/x-data-grid-premium';
25
+
26
+ -<DataGridPro experimentalFeatures={{ rowGrouping: true }} />
27
+ +<DataGridPremium />
28
+ ```
29
+
30
+ For more information about the revised pricing model please have a look at the [blog post](https://mui.com/blog/premium-plan-release/#the-new-licensing-model).
31
+
32
+ - 👔 Add Excel export
33
+
34
+ - 🔎 Quick filtering
35
+
36
+ You can now add a quick filtering search bar to your grid.
37
+ To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar.
38
+
39
+ More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering/#quick-filter)
40
+
41
+ ![image](https://user-images.githubusercontent.com/13808724/167700105-5a5acc7c-5463-4871-8514-3d09e2f365ae.png)
42
+
43
+ - 🐞 Bugs fixes
44
+
45
+ ### `@mui/x-data-grid@v5.11.0` / `@mui/x-data-grid-pro@v5.11.0` / `@mui/x-data-grid-premium@v5.11.0`
46
+
47
+ #### Breaking changes
48
+
49
+ - Moving row grouping to premium package
50
+
51
+ The use of `rowGrouping` in the `@mui/x-data-grid-pro` package is deprecated. The experimental flag will be removed in an upcoming release.
52
+
53
+ #### Changes
54
+
55
+ - [DataGrid] Add TypeScript support to the `sx` prop in inner components (#4743) @lindapaiste
56
+ - [DataGrid] Add props to control cell mode (#4210) @m4theushw
57
+ - [DataGrid] Add quick filtering engine (#4317) @alexfauquette
58
+ - [DataGrid] Check focus validity whenever the rows in state changes (#4683) @flaviendelangle
59
+ - [DataGrid] Fix infinite scroll when dragging column header cell over row cell (#4735) @DjoSmer
60
+ - [DataGrid] Fix scroll jump when using keyboard navigation (#4515) @cherniavskii
61
+ - [DataGrid] Improve sorting accessibility (#4379) @cherniavskii
62
+ - [DataGrid] New `getRowGroupChildren` API method (#4304) @flaviendelangle
63
+ - [DataGrid] Publish `preferencePanelClose` event only once when clicking on another panel button (#4810) @flaviendelangle
64
+ - [DataGrid] Update focused action if the currently focused one is removed (#4694) @m4theushw
65
+ - [DataGrid] Add `onChange` callback to edit components (#4621) @m4theushw
66
+ - [DataGrid] Add `keepNonExistentRowsSelected` prop (#4786) @willsoto
67
+ - [DataGrid] Prevent crash if row is removed with click (#4831) @m4theushw
68
+ - [DataGridPro] Fix detail panel not taking full width (#4610) @cherniavskii
69
+ - [DataGridPremium] Add Excel export (#3981) @alexfauquette
70
+ - [DataGridPremium] Bootstrap `@mui/x-data-grid-premium` (#4223) @flaviendelangle
71
+ - [DataGridPremium] Fix Excel date serialization when row grouping is enabled (#4774) @cherniavskii
72
+ - [l10n] Improve German (de-DE) locale (#4748) @sebastianfrey
73
+ - [l10n] Improve German (de-DE) locale (#4668) @izu-co
74
+
75
+ ### `@mui/x-date-pickers@5.0.0-alpha.3` / `@mui/x-date-pickers-pro@5.0.0-alpha.3`
76
+
77
+ #### Breaking changes
78
+
79
+ - Rework the auto-closing behavior of the pickers.
80
+
81
+ The `disableCloseOnSelect` prop has been replaced by a new `closeOnSelect` prop which has the opposite behavior.
82
+ The default behavior remains the same (close after the last step on desktop but not on mobile).
83
+
84
+ ```diff
85
+ // If you don't want to close after the last step
86
+ -<DatePicker disableCloseOnSelect={false} />
87
+ +<DatePicker closeOnSelect />
88
+
89
+ // If you want to close after the last step
90
+ -<DatePicker disableCloseOnSelect />
91
+ +<DatePicker closeOnSelect={false} />
92
+ ```
93
+
94
+ #### Changes
95
+
96
+ - [DatePicker] Ignore <kbd>Escape</kbd> when the picker is already closed (#4770) @mikewolfd
97
+ - [DatePicker] Make month year order changeable in header (#4695) @gky360
98
+ - [DateRangePicker] Open view on click, <kbd>Enter</kbd> or <kbd>Space</kbd> instead of focus (#4747) @alexfauquette
99
+ - [DateRangePicker] Refactor tests (#4745) @flaviendelangle
100
+ - [DateRangePicker] Remove `orientation` prop (#4665) @m4theushw
101
+ - [DateTimePicker] `Toolbar` should be visible by default on mobile (#4833) @flaviendelangle
102
+ - [MonthPicker] New prop `shouldDisableMonth` (#4708) @someone635
103
+ - [TimePicker] Disable and invalidate date with minutes not matching `minutesStep` (#4726) @flaviendelangle
104
+ - [TimePicker] Don't merge with previous value when new value is not valid (#4847) @flaviendelangle
105
+ - [TimePicker] Refactor `isTimeDisabled` method (#4688) @flaviendelangle
106
+ - [pickers] Add details in invalid mask error (#4501) @alexfauquette
107
+ - [pickers] Add explicit interfaces for components slots and components slots props (#4589) @flaviendelangle
108
+ - [pickers] Add missing `peerDependencies` for `yarn pnp` users (#4763) @nate-summercook
109
+ - [pickers] Add overrides to `PickersArrowSwitcher` (#4672) @m4theushw
110
+ - [pickers] Clean component interfaces and remove non-implemented props (#4758) @flaviendelangle
111
+ - [pickers] Do not apply the current time when no date provided in `DayPicker` (#4649) @flaviendelangle
112
+ - [pickers] Document and refacto the value manager (#4701) @flaviendelangle
113
+ - [pickers] Drop `allowSameDateSelection` prop (#4808) @flaviendelangle
114
+ - [pickers] Enable mask by default when using `ampm=true` (#4731) @alexfauquette
115
+ - [pickers] Fix `disabled` and `readOnly` behavior on calendar and clock (#4645) @alexfauquette
116
+ - [pickers] Invalid character does not delete last digit (#4839) @alexfauquette
117
+ - [pickers] Rename prop `date` into `parsedValue` when it can contain a range (#4736) @flaviendelangle
118
+ - [pickers] Rework `TDate`, `TInputDate`, `TValue` and `TInputValue` generics (#4617) @flaviendelangle
119
+ - [pickers] Rework the date lifecycle in `usePickerState` (#4408) @flaviendelangle
120
+
121
+ ### Docs
122
+
123
+ - [docs] Add `scopePathNames` property to column page (#4811) @flaviendelangle
124
+ - [docs] Add label to each demo (#4667) @m4theushw
125
+ - [docs] Correctly capitalize <kbd>Ctrl</kbd> (#4707) @oliviertassinari
126
+ - [docs] Fix documentation on `ampm` prop (#4846) @alexfauquette
127
+ - [docs] Generate the event documentation from `GridEventLookup` (#4725) @flaviendelangle
128
+ - [docs] Keep columns section expanded when switching between pages (#4816) @cherniavskii
129
+ - [docs] Move `useKeepGroupingColumnsHidden` on `@mui/x-data-grid-premium` (#4319) @flaviendelangle
130
+ - [docs] Remove legacy pages for old URLs (#4575) @m4theushw
131
+ - [docs] Remove remaining pages in `docs/pages/api-docs` folder (#4709) @m4theushw
132
+ - [docs] SEO fixes (#4711) @oliviertassinari
133
+ - [docs] Set type number to movie column year (#4753) @flaviendelangle
134
+ - [docs] Simplify server examples (#4186) @alexfauquette
135
+ - [docs] Small typo (#4670) @flaviendelangle
136
+ - [docs] Split the 'Columns' page (#4600) @flaviendelangle
137
+ - [docs] Stop using `GridEvents` enum in documentation (#4699) @flaviendelangle
138
+ - [docs] Update mono repo to get copy code block (#4691) @siriwatknp
139
+ - [docs] Update the feature table in the Getting Started page of the data grid (#4619) @flaviendelangle
140
+ - [docs] Add demo for Premium (#4750) @m4theushw
141
+
142
+ ### Core
143
+
144
+ - [core] Check if `process` is available (#4193) @m4theushw
145
+ - [core] Fix naming collision (#4853) @alexfauquette
146
+ - [core] Prevent out-of-memory when type-checking in CI (#4697) @flaviendelangle
147
+ - [core] Remove `rowsCache` from state (#4480) @m4theushw
148
+ - [core] Rework `DayPicker` api (#4783) @flaviendelangle
149
+ - [core] Update `x-license-pro` license to handle premium package (#4315) @DanailH
150
+ - [core] Update monorepo & version (#4789) @oliviertassinari
151
+ - [core] Update monorepo (#4772) @flaviendelangle
152
+ - [core] Stop using `GridEvents` enum (#4698, #4696, #4685) @flaviendelangle
153
+ - [core] Update monorepo (#4854) @cherniavskii
154
+ - [license] Allow to limit some packages to a specific license plan (#4651) @flaviendelangle
155
+ - [test] Fix path to detect `DataGrid` tests (#4752) @m4theushw
156
+ - [test] Reset cleanup tracking on Karma tests (#4679) @m4theushw
157
+ - [test] Restore `sinon` sandbox after each `karma` test (#4689) @m4theushw
158
+
6
159
  ## v5.10.0
7
160
 
8
161
  _Apr 25, 2022_
@@ -49,7 +202,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
49
202
 
50
203
  Now the data grid and pickers components support the concurrent mode.
51
204
 
52
- - 🎁 Add support for [Column spanning](https://mui.com/x/react-data-grid/columns/#column-spanning) (#4020) @cherniavskii
205
+ - 🎁 Add support for [Column spanning](https://mui.com/x/react-data-grid/column-spanning/) (#4020) @cherniavskii
53
206
 
54
207
  <img src="https://user-images.githubusercontent.com/13808724/162926746-93bcb180-3c9d-4eb9-afc7-c3908a5c6406.png" width="788">
55
208
 
@@ -672,7 +825,7 @@ A big thanks to the 9 contributors who made this release possible. Here are some
672
825
  />
673
826
  ```
674
827
 
675
- See the [documentation](https://mui.com/x/react-data-grid/columns/#column-visibility) for more details.
828
+ See the [documentation](https://mui.com/x/react-data-grid/column-visibility/) for more details.
676
829
 
677
830
  The `hide` property from `GridColDef` still works but has been deprecated.
678
831
 
@@ -828,7 +981,7 @@ A big thanks to the 5 contributors who made this release possible. Here are some
828
981
 
829
982
  ### `@mui/x-data-grid@v5.2.0` / `@mui/x-data-grid-pro@v5.2.0`
830
983
 
831
- - 🚀 Introduce the [column pinning](https://mui.com/x/react-data-grid/columns/#column-pinning) feature (#2946) @m4theushw
984
+ - 🚀 Introduce the [column pinning](https://mui.com/x/react-data-grid/column-pinning/) feature (#2946) @m4theushw
832
985
 
833
986
  <img src="https://user-images.githubusercontent.com/42154031/145425635-b6314fbe-2f1e-4b73-908f-33ee1fda20c7.gif" width="964" height="657">
834
987
 
@@ -1782,7 +1935,7 @@ A big thanks to the 9 contributors who made this release possible. Here are some
1782
1935
  - 📚 Migrate to the new documentation infrastructure and design (#2441) (@DanailH, @m4theushw)
1783
1936
  - 🎁 Add `actions` column type (#2385) @m4theushw
1784
1937
 
1785
- See the documentation for [more details](https://mui.com/x/react-data-grid/columns/#column-types).
1938
+ See the documentation for [more details](https://mui.com/x/react-data-grid/column-definition/#column-types).
1786
1939
 
1787
1940
  - 👁 Allow to disable virtualization with the `disableVirtualization` prop (#2326) @m4theushw
1788
1941
  - 🚀 Introduce the new `isRowSelected` api method (#2523) @flaviendelangle
@@ -2404,11 +2557,11 @@ _July 1, 2021_
2404
2557
  Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
2405
2558
 
2406
2559
  - 🐞 As a focus of Q2, we have kept fixing bugs
2407
- - 💅 End users are now allowed to copy the selected rows to the clipboard with <kbd>CTRL</kbd> + <kbd>c</kbd> (#1929) @m4theushw
2560
+ - 💅 End users are now allowed to copy the selected rows to the clipboard with <kbd>Ctrl</kbd> + <kbd>c</kbd> (#1929) @m4theushw
2408
2561
  - 🐛 We have fixed the `Select all` checkbox. When triggered, it should only select the filtered rows (#1879) @ZeeshanTamboli
2409
2562
  - ⚡️ We have added a new `singleSelect` column type (#1956) @DanailH
2410
2563
 
2411
- Using the column `type: 'singleSelect'` defaults to `Select` component when the cell is in `edit` mode. You can find the documentation [following this link](https://mui.com/x/react-data-grid/columns/#column-types).
2564
+ Using the column `type: 'singleSelect'` defaults to `Select` component when the cell is in `edit` mode. You can find the documentation [following this link](https://mui.com/x/react-data-grid/column-definition/#column-types).
2412
2565
 
2413
2566
  ```jsx
2414
2567
  <DataGrid
@@ -2604,7 +2757,7 @@ _June 9, 2021_
2604
2757
  Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
2605
2758
 
2606
2759
  - 💅 Allow to customize GridToolbarExport's CSV export (#1695) @michallukowski
2607
- - 🐛 Allow to deselect rows with <kbd>CTRL</kbd> + click (#1813) @ZeeshanTamboli
2760
+ - 🐛 Allow to deselect rows with <kbd>Ctrl</kbd> + click (#1813) @ZeeshanTamboli
2608
2761
  - ⚡️ Refactor scroll size detector (#1703) @dtassone
2609
2762
  - 📖 Add [documentation](https://mui.com/x/api/data-grid/) for interfaces and events (#1529) @m4theushw
2610
2763
  - 🐞 Bugfixes
@@ -2631,7 +2784,7 @@ Big thanks to the 6 contributors who made this release possible. Here are some h
2631
2784
 
2632
2785
  - [DataGrid] Add `valueParser` to parse values entered by the user (#1785) @m4theushw
2633
2786
  - [DataGrid] Allow to customize GridToolbarExport's CSV export (#1695) @michallukowski
2634
- - [DataGrid] Allow to deselect rows with <kbd>CTRL</kbd> + click (#1813) @ZeeshanTamboli
2787
+ - [DataGrid] Allow to deselect rows with <kbd>Ctrl</kbd> + click (#1813) @ZeeshanTamboli
2635
2788
  - [DataGrid] Improve general architecture to better isolate hooks (#1720) @dtassone
2636
2789
  - [DataGrid] Fix cell height after changing grid density (#1819) @DanailH
2637
2790
  - [DataGrid] Fix fluid columns width when available `viewportWidth` < 0 (#1816) @DanailH
@@ -3153,7 +3306,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
3153
3306
  - [DataGrid] Rename `useGridBaseComponentProps` hook to `useGridSlotComponentProps` (#1252) @DanailH
3154
3307
  - [DataGrid] Rename modules (#1292) @DanailH
3155
3308
  - [DataGrid] Rename all events related to column reordering, e.g. `GRID_COL_REORDER_START` -> `GRID_COLUMN_REORDER_START` (#1299) @m4theushw
3156
- - [DataGrid] Methods `onColItemDragStart`, `onColHeaderDragOver`, `onColItemDragOver`, `onColItemDragEnter` removed from the grid API. Prefer listening to [column reordering events](https://mui.com/x/react-data-grid/columns/#column-reorder) (#1299) @m4theushw
3309
+ - [DataGrid] Methods `onColItemDragStart`, `onColHeaderDragOver`, `onColItemDragOver`, `onColItemDragEnter` removed from the grid API. Prefer listening to [column reordering events](https://mui.com/x/react-data-grid/column-ordering/) (#1299) @m4theushw
3157
3310
  - [DataGrid] Calling `apiRef.current.getColumnHeaderParams` returns a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
3158
3311
  - [DataGrid] Events that follow the pattern `GRID_COLUMN_HEADER_xxx` will be called with a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
3159
3312
  - [DataGrid] The `renderHeader` will be called with a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
@@ -3521,7 +3674,7 @@ _Jan 14, 2021_
3521
3674
  Big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
3522
3675
 
3523
3676
  - 🎛 Add support for Column selector (#837) @DanailH @dtassone.
3524
- The feature can be triggered from the toolbar or the column menu. Check [the documentation](https://mui.com/x/react-data-grid/columns/#column-selector).
3677
+ The feature can be triggered from the toolbar or the column menu. Check [the documentation](https://mui.com/x/react-data-grid/column-definition/#column-selector).
3525
3678
 
3526
3679
  ![column selector](https://user-images.githubusercontent.com/3165635/104791267-6ff77300-579a-11eb-9338-11a8fde83258.gif)
3527
3680
 
@@ -58,6 +58,11 @@ DataGridRaw.propTypes = {
58
58
  */
59
59
  autoPageSize: PropTypes.bool,
60
60
 
61
+ /**
62
+ * Controls the modes of the cells.
63
+ */
64
+ cellModesModel: PropTypes.object,
65
+
61
66
  /**
62
67
  * If `true`, the grid get a first column with a checkbox that allows to select rows.
63
68
  * @default false
@@ -205,7 +210,9 @@ DataGridRaw.propTypes = {
205
210
  operatorValue: PropTypes.string,
206
211
  value: PropTypes.any
207
212
  })).isRequired,
208
- linkOperator: PropTypes.oneOf(['and', 'or'])
213
+ linkOperator: PropTypes.oneOf(['and', 'or']),
214
+ quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
215
+ quickFilterValues: PropTypes.array
209
216
  }),
210
217
 
211
218
  /**
@@ -293,6 +300,14 @@ DataGridRaw.propTypes = {
293
300
  */
294
301
  isRowSelectable: PropTypes.func,
295
302
 
303
+ /**
304
+ * If `true`, the selection model will retain selected rows that do not exist.
305
+ * Useful when using server side pagination and row selections need to be retained
306
+ * when changing pages.
307
+ * @default false
308
+ */
309
+ keepNonExistentRowsSelected: PropTypes.bool,
310
+
296
311
  /**
297
312
  * If `true`, a loading overlay is displayed.
298
313
  */
@@ -380,6 +395,13 @@ DataGridRaw.propTypes = {
380
395
  */
381
396
  onCellKeyDown: PropTypes.func,
382
397
 
398
+ /**
399
+ * Callback fired when the `cellModesModel` prop changes.
400
+ * @param {GridCellModesModel} cellModesModel Object containig which cells are in "edit" mode.
401
+ * @param {GridCallbackDetails} details Additional details for this callback.
402
+ */
403
+ onCellModesModelChange: PropTypes.func,
404
+
383
405
  /**
384
406
  * Callback fired when a click event comes from a column header element.
385
407
  * @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
@@ -566,6 +588,13 @@ DataGridRaw.propTypes = {
566
588
  */
567
589
  onRowEditStop: PropTypes.func,
568
590
 
591
+ /**
592
+ * Callback fired when the `rowModesModel` prop changes.
593
+ * @param {GridRowModesModel} rowModesModel Object containig which rows are in "edit" mode.
594
+ * @param {GridCallbackDetails} details Additional details for this callback.
595
+ */
596
+ onRowModesModelChange: PropTypes.func,
597
+
569
598
  /**
570
599
  * Callback fired when the selection state of one or multiple rows changes.
571
600
  * @param {GridSelectionModel} selectionModel With all the row ids [[GridSelectionModel]].
@@ -651,6 +680,11 @@ DataGridRaw.propTypes = {
651
680
  */
652
681
  rowHeight: PropTypes.number,
653
682
 
683
+ /**
684
+ * Controls the modes of the rows.
685
+ */
686
+ rowModesModel: PropTypes.object,
687
+
654
688
  /**
655
689
  * Set of rows of type [[GridRowsProp]].
656
690
  */
@@ -61,7 +61,8 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
61
61
  sortingMode: GridFeatureModeConstant.client,
62
62
  throttleRowsMs: 0,
63
63
  disableColumnReorder: false,
64
- disableColumnResize: false
64
+ disableColumnResize: false,
65
+ keepNonExistentRowsSelected: false
65
66
  };
66
67
  export const useDataGridProps = inProps => {
67
68
  if (inProps.pageSize > MAX_PAGE_SIZE) {
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mui/x-data-grid
2
2
 
3
- This package is the community edition of the data grid component.
3
+ This package is the Community Plan edition of the data grid component.
4
4
  It's part of MUI X, an open core extension of MUI, with advanced components.
5
5
 
6
6
  ## Installation
@@ -11,5 +11,6 @@ export const GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
11
11
  headerName: '',
12
12
  disableColumnMenu: true,
13
13
  disableExport: true,
14
- renderCell: renderActionsCell
14
+ renderCell: renderActionsCell,
15
+ getApplyQuickFilterFn: undefined
15
16
  });
@@ -20,5 +20,6 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
20
20
  renderEditCell: renderEditBooleanCell,
21
21
  sortComparator: gridNumberComparator,
22
22
  valueFormatter: gridBooleanFormatter,
23
- filterOperators: getGridBooleanOperators()
23
+ filterOperators: getGridBooleanOperators(),
24
+ getApplyQuickFilterFn: undefined
24
25
  });
@@ -15,6 +15,7 @@ export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF
15
15
  disableColumnMenu: true,
16
16
  disableReorder: true,
17
17
  disableExport: true,
18
+ getApplyQuickFilterFn: undefined,
18
19
  valueGetter: params => {
19
20
  const selectionLookup = selectedIdsLookupSelector(params.api.state, params.api.instanceId);
20
21
  return selectionLookup[params.id] !== undefined;
@@ -26,12 +26,14 @@ export const GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
26
26
  sortComparator: gridDateComparator,
27
27
  valueFormatter: gridDateFormatter,
28
28
  filterOperators: getGridDateOperators(),
29
- renderEditCell: renderEditDateCell
29
+ renderEditCell: renderEditDateCell,
30
+ getApplyQuickFilterFn: undefined
30
31
  });
31
32
  export const GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
32
33
  type: 'dateTime',
33
34
  sortComparator: gridDateComparator,
34
35
  valueFormatter: gridDateTimeFormatter,
35
36
  filterOperators: getGridDateOperators(true),
36
- renderEditCell: renderEditDateCell
37
+ renderEditCell: renderEditDateCell,
38
+ getApplyQuickFilterFn: undefined
37
39
  });
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { gridNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
3
3
  import { isNumber } from '../utils/utils';
4
- import { getGridNumericOperators } from './gridNumericOperators';
4
+ import { getGridNumericOperators, getGridNumericQuickFilterFn } from './gridNumericOperators';
5
5
  import { GRID_STRING_COL_DEF } from './gridStringColDef';
6
6
  export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
7
7
  type: 'number',
@@ -12,5 +12,6 @@ export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
12
12
  valueFormatter: ({
13
13
  value
14
14
  }) => value && isNumber(value) && value.toLocaleString() || value,
15
- filterOperators: getGridNumericOperators()
15
+ filterOperators: getGridNumericOperators(),
16
+ getApplyQuickFilterFn: getGridNumericQuickFilterFn
16
17
  });
@@ -1,4 +1,6 @@
1
1
  import { GridFilterOperator } from '../models/gridFilterOperator';
2
+ import { GridCellParams } from '../models';
3
+ export declare const getGridNumericQuickFilterFn: (value: any) => (({ value: columnValue }: GridCellParams) => boolean) | null;
2
4
  export declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
3
5
  /**
4
6
  * @deprecated Use `getGridNumericOperators` instead.
@@ -10,6 +10,17 @@ const parseNumericValue = value => {
10
10
  return Number(value);
11
11
  };
12
12
 
13
+ export const getGridNumericQuickFilterFn = value => {
14
+ if (value == null || Number.isNaN(value) || value === '') {
15
+ return null;
16
+ }
17
+
18
+ return ({
19
+ value: columnValue
20
+ }) => {
21
+ return parseNumericValue(columnValue) === parseNumericValue(value);
22
+ };
23
+ };
13
24
  export const getGridNumericOperators = () => [{
14
25
  label: '=',
15
26
  value: '=',
@@ -1,9 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { GRID_STRING_COL_DEF } from './gridStringColDef';
3
3
  import { renderEditSingleSelectCell } from '../components/cell/GridEditSingleSelectCell';
4
- import { getGridSingleSelectOperators } from './gridSingleSelectOperators';
4
+ import { getGridSingleSelectOperators, getGridSingleSelectQuickFilterFn } from './gridSingleSelectOperators';
5
5
  export const GRID_SINGLE_SELECT_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
6
6
  type: 'singleSelect',
7
7
  renderEditCell: renderEditSingleSelectCell,
8
- filterOperators: getGridSingleSelectOperators()
8
+ filterOperators: getGridSingleSelectOperators(),
9
+ getApplyQuickFilterFn: getGridSingleSelectQuickFilterFn
9
10
  });
@@ -1,2 +1,5 @@
1
1
  import { GridFilterOperator } from '../models/gridFilterOperator';
2
+ import { GridCellParams, GridColDef } from '../models';
3
+ import { GridApiCommunity } from '../models/api/gridApiCommunity';
4
+ export declare const getGridSingleSelectQuickFilterFn: (value: any, column: GridColDef, apiRef: React.MutableRefObject<GridApiCommunity>) => (({ value: columnValue }: GridCellParams) => boolean) | null;
2
5
  export declare const getGridSingleSelectOperators: () => GridFilterOperator[];
@@ -9,6 +9,58 @@ const parseObjectValue = value => {
9
9
  return value.value;
10
10
  };
11
11
 
12
+ export const getGridSingleSelectQuickFilterFn = (value, column, apiRef) => {
13
+ if (!value) {
14
+ return null;
15
+ }
16
+
17
+ const {
18
+ valueOptions,
19
+ valueFormatter,
20
+ field
21
+ } = column;
22
+ const potentialValues = [parseObjectValue(value).toString()];
23
+ const iterableColumnValues = typeof valueOptions === 'function' ? valueOptions({
24
+ field
25
+ }) : valueOptions || [];
26
+
27
+ if (iterableColumnValues) {
28
+ iterableColumnValues.forEach(option => {
29
+ // for each valueOption, check if the formatted value
30
+ let optionValue;
31
+ let optionLabel;
32
+
33
+ if (typeof option === 'object') {
34
+ optionValue = option.value;
35
+ optionLabel = option.label;
36
+ } else {
37
+ optionValue = option;
38
+
39
+ if (valueFormatter) {
40
+ optionLabel = valueFormatter({
41
+ value: option,
42
+ field,
43
+ api: apiRef.current
44
+ });
45
+ } else {
46
+ optionLabel = option;
47
+ }
48
+ }
49
+
50
+ if (optionLabel.slice(0, value.length).toLowerCase() === value.toLowerCase()) {
51
+ if (!potentialValues.includes(optionValue)) {
52
+ potentialValues.push(optionValue.toString());
53
+ }
54
+ }
55
+ });
56
+ }
57
+
58
+ return ({
59
+ value: columnValue
60
+ }) => {
61
+ return columnValue != null ? potentialValues.includes(parseObjectValue(columnValue).toString()) : false;
62
+ };
63
+ };
12
64
  export const getGridSingleSelectOperators = () => [{
13
65
  value: 'is',
14
66
  getApplyFilterFn: filterItem => {
@@ -1,6 +1,6 @@
1
1
  import { renderEditInputCell } from '../components/cell/GridEditInputCell';
2
2
  import { gridStringOrNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
3
- import { getGridStringOperators } from './gridStringOperators';
3
+ import { getGridStringOperators, getGridStringQuickFilterFn } from './gridStringOperators';
4
4
  export const GRID_STRING_COL_DEF = {
5
5
  width: 100,
6
6
  minWidth: 50,
@@ -17,5 +17,6 @@ export const GRID_STRING_COL_DEF = {
17
17
  type: 'string',
18
18
  align: 'left',
19
19
  filterOperators: getGridStringOperators(),
20
- renderEditCell: renderEditInputCell
20
+ renderEditCell: renderEditInputCell,
21
+ getApplyQuickFilterFn: getGridStringQuickFilterFn
21
22
  };
@@ -1,2 +1,4 @@
1
1
  import { GridFilterOperator } from '../models/gridFilterOperator';
2
+ import { GridCellParams } from '../models';
3
+ export declare const getGridStringQuickFilterFn: (value: any) => (({ value: columnValue }: GridCellParams) => boolean) | null;
2
4
  export declare const getGridStringOperators: () => GridFilterOperator<any, number | string | null, any>[];
@@ -1,6 +1,18 @@
1
1
  import { GridFilterInputValue } from '../components/panel/filterPanel/GridFilterInputValue';
2
2
  import { escapeRegExp } from '../utils/utils';
3
3
  import { GridFilterInputMultipleValue } from '../components/panel/filterPanel/GridFilterInputMultipleValue';
4
+ export const getGridStringQuickFilterFn = value => {
5
+ if (!value) {
6
+ return null;
7
+ }
8
+
9
+ const filterRegex = new RegExp(escapeRegExp(value), 'i');
10
+ return ({
11
+ value: columnValue
12
+ }) => {
13
+ return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
14
+ };
15
+ };
4
16
  export const getGridStringOperators = () => [{
5
17
  value: 'contains',
6
18
  getApplyFilterFn: filterItem => {
@@ -1,3 +1,5 @@
1
1
  import * as React from 'react';
2
- import { GridFooterContainerProps } from './containers/GridFooterContainer';
3
- export declare const GridFooter: React.ForwardRefExoticComponent<GridFooterContainerProps & React.RefAttributes<HTMLDivElement>>;
2
+ declare const GridFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
3
+ sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
4
+ } & React.RefAttributes<HTMLDivElement>>;
5
+ export { GridFooter };
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
+ import PropTypes from 'prop-types';
3
4
  import { useGridSelector } from '../hooks/utils/useGridSelector';
4
5
  import { gridTopLevelRowCountSelector } from '../hooks/features/rows/gridRowsSelector';
5
6
  import { selectedGridRowsCountSelector } from '../hooks/features/selection/gridSelectionSelector';
@@ -11,7 +12,7 @@ import { GridFooterContainer } from './containers/GridFooterContainer';
11
12
  import { useGridRootProps } from '../hooks/utils/useGridRootProps';
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- export const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref) {
15
+ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref) {
15
16
  var _rootProps$components;
16
17
 
17
18
  const apiRef = useGridApiContext();
@@ -34,4 +35,12 @@ export const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(prop
34
35
  }, props, {
35
36
  children: [selectedRowCountElement, rowCountElement, paginationElement]
36
37
  }));
37
- });
38
+ });
39
+ process.env.NODE_ENV !== "production" ? GridFooter.propTypes = {
40
+ // ----------------------------- Warning --------------------------------
41
+ // | These PropTypes are generated from the TypeScript type definitions |
42
+ // | To update them edit the TypeScript types and run "yarn proptypes" |
43
+ // ----------------------------------------------------------------------
44
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
45
+ } : void 0;
46
+ export { GridFooter };
@@ -9,7 +9,6 @@ import * as React from 'react';
9
9
  import PropTypes from 'prop-types';
10
10
  import clsx from 'clsx';
11
11
  import { unstable_composeClasses as composeClasses } from '@mui/material';
12
- import { GridEvents } from '../models/events';
13
12
  import { GridEditModes, GridRowModes, GridCellModes } from '../models/gridEditRowModel';
14
13
  import { useGridApiContext } from '../hooks/utils/useGridApiContext';
15
14
  import { getDataGridUtilityClass, gridClasses } from '../constants/gridClasses';
@@ -156,7 +155,7 @@ function GridRow(props) {
156
155
  }
157
156
  }
158
157
 
159
- publish(GridEvents.rowClick, onClick)(event);
158
+ publish('rowClick', onClick)(event);
160
159
  }, [apiRef, onClick, publish, rowId]);
161
160
 
162
161
  const style = _extends({}, styleProp, {
@@ -287,9 +286,9 @@ function GridRow(props) {
287
286
  "aria-selected": selected,
288
287
  style: style,
289
288
  onClick: publishClick,
290
- onDoubleClick: publish(GridEvents.rowDoubleClick, onDoubleClick),
291
- onMouseEnter: publish(GridEvents.rowMouseEnter, onMouseEnter),
292
- onMouseLeave: publish(GridEvents.rowMouseLeave, onMouseLeave)
289
+ onDoubleClick: publish('rowDoubleClick', onDoubleClick),
290
+ onMouseEnter: publish('rowMouseEnter', onMouseEnter),
291
+ onMouseLeave: publish('rowMouseLeave', onMouseLeave)
293
292
  }, other, {
294
293
  children: [cells, emptyCellWidth > 0 && /*#__PURE__*/_jsx(EmptyCell, {
295
294
  width: emptyCellWidth,
@@ -1,7 +1,10 @@
1
1
  import * as React from 'react';
2
+ import { SxProps, Theme } from '@mui/material/styles';
2
3
  interface RowCountProps {
3
4
  rowCount: number;
4
5
  visibleRowCount: number;
5
6
  }
6
- declare const GridRowCount: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & React.RefAttributes<HTMLDivElement>>;
7
+ declare const GridRowCount: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
8
+ sx?: SxProps<Theme> | undefined;
9
+ } & React.RefAttributes<HTMLDivElement>>;
7
10
  export { GridRowCount };
@@ -65,6 +65,7 @@ process.env.NODE_ENV !== "production" ? GridRowCount.propTypes = {
65
65
  // | To update them edit the TypeScript types and run "yarn proptypes" |
66
66
  // ----------------------------------------------------------------------
67
67
  rowCount: PropTypes.number.isRequired,
68
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
68
69
  visibleRowCount: PropTypes.number.isRequired
69
70
  } : void 0;
70
71
  export { GridRowCount };