@mui/x-data-grid-pro 5.5.1 → 5.7.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 (356) hide show
  1. package/CHANGELOG.md +229 -0
  2. package/DataGridPro/DataGridPro.d.ts +3 -0
  3. package/DataGridPro/DataGridPro.js +915 -0
  4. package/DataGridPro/index.d.ts +2 -0
  5. package/DataGridPro/index.js +2 -0
  6. package/DataGridPro/package.json +6 -0
  7. package/DataGridPro/useDataGridProComponent.d.ts +4 -0
  8. package/DataGridPro/useDataGridProComponent.js +84 -0
  9. package/DataGridPro/useDataGridProProps.d.ts +6 -0
  10. package/DataGridPro/useDataGridProProps.js +49 -0
  11. package/components/DataGridProColumnHeaders.d.ts +6 -0
  12. package/components/DataGridProColumnHeaders.js +165 -0
  13. package/components/DataGridProVirtualScroller.d.ts +8 -0
  14. package/components/DataGridProVirtualScroller.js +270 -0
  15. package/components/GridColumnPinningMenuItems.d.ts +11 -0
  16. package/components/GridColumnPinningMenuItems.js +71 -0
  17. package/components/GridDetailPanelToggleCell.d.ts +7 -0
  18. package/components/GridDetailPanelToggleCell.js +125 -0
  19. package/components/GridGroupingColumnLeafCell.d.ts +4 -0
  20. package/components/GridGroupingColumnLeafCell.js +22 -0
  21. package/components/GridGroupingCriteriaCell.d.ts +10 -0
  22. package/components/GridGroupingCriteriaCell.js +150 -0
  23. package/components/GridRowGroupableColumnMenuItems.d.ts +11 -0
  24. package/components/GridRowGroupableColumnMenuItems.js +63 -0
  25. package/components/GridRowGroupingColumnMenuItems.d.ts +11 -0
  26. package/components/GridRowGroupingColumnMenuItems.js +58 -0
  27. package/components/GridTreeDataGroupingCell.d.ts +10 -0
  28. package/components/GridTreeDataGroupingCell.js +160 -0
  29. package/components/index.d.ts +3 -0
  30. package/components/index.js +4 -0
  31. package/components/package.json +6 -0
  32. package/hooks/features/columnPinning/gridColumnPinningInterface.d.ts +42 -0
  33. package/hooks/features/columnPinning/gridColumnPinningInterface.js +11 -0
  34. package/hooks/features/columnPinning/gridColumnPinningSelector.d.ts +2 -0
  35. package/hooks/features/columnPinning/gridColumnPinningSelector.js +1 -0
  36. package/hooks/features/columnPinning/index.d.ts +2 -0
  37. package/hooks/features/columnPinning/index.js +2 -0
  38. package/hooks/features/columnPinning/useGridColumnPinning.d.ts +6 -0
  39. package/hooks/features/columnPinning/useGridColumnPinning.js +274 -0
  40. package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.d.ts +4 -0
  41. package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +45 -0
  42. package/hooks/features/columnReorder/columnReorderInterfaces.d.ts +6 -0
  43. package/hooks/features/columnReorder/columnReorderInterfaces.js +1 -0
  44. package/hooks/features/columnReorder/columnReorderSelector.d.ts +3 -0
  45. package/hooks/features/columnReorder/columnReorderSelector.js +3 -0
  46. package/hooks/features/columnReorder/index.d.ts +2 -0
  47. package/hooks/features/columnReorder/index.js +2 -0
  48. package/hooks/features/columnReorder/useGridColumnReorder.d.ts +10 -0
  49. package/hooks/features/columnReorder/useGridColumnReorder.js +165 -0
  50. package/hooks/features/columnResize/columnResizeSelector.d.ts +3 -0
  51. package/hooks/features/columnResize/columnResizeSelector.js +3 -0
  52. package/hooks/features/columnResize/columnResizeState.d.ts +3 -0
  53. package/hooks/features/columnResize/columnResizeState.js +1 -0
  54. package/hooks/features/columnResize/index.d.ts +2 -0
  55. package/hooks/features/columnResize/index.js +2 -0
  56. package/hooks/features/columnResize/useGridColumnResize.d.ts +11 -0
  57. package/hooks/features/columnResize/useGridColumnResize.js +305 -0
  58. package/hooks/features/detailPanel/gridDetailPanelInterface.d.ts +28 -0
  59. package/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -0
  60. package/hooks/features/detailPanel/gridDetailPanelSelector.d.ts +5 -0
  61. package/hooks/features/detailPanel/gridDetailPanelSelector.js +3 -0
  62. package/hooks/features/detailPanel/gridDetailPanelToggleColDef.d.ts +3 -0
  63. package/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +26 -0
  64. package/hooks/features/detailPanel/index.d.ts +3 -0
  65. package/hooks/features/detailPanel/index.js +3 -0
  66. package/hooks/features/detailPanel/useGridDetailPanel.d.ts +6 -0
  67. package/hooks/features/detailPanel/useGridDetailPanel.js +109 -0
  68. package/hooks/features/detailPanel/useGridDetailPanelCache.d.ts +4 -0
  69. package/hooks/features/detailPanel/useGridDetailPanelCache.js +57 -0
  70. package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.d.ts +4 -0
  71. package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +28 -0
  72. package/hooks/features/index.d.ts +6 -0
  73. package/hooks/features/index.js +7 -0
  74. package/hooks/features/infiniteLoader/useGridInfiniteLoader.d.ts +10 -0
  75. package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +52 -0
  76. package/hooks/features/rowGrouping/createGroupingColDef.d.ts +43 -0
  77. package/hooks/features/rowGrouping/createGroupingColDef.js +318 -0
  78. package/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +37 -0
  79. package/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
  80. package/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +4 -0
  81. package/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
  82. package/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +27 -0
  83. package/hooks/features/rowGrouping/gridRowGroupingUtils.js +139 -0
  84. package/hooks/features/rowGrouping/index.d.ts +3 -0
  85. package/hooks/features/rowGrouping/index.js +3 -0
  86. package/hooks/features/rowGrouping/useGridRowGrouping.d.ts +13 -0
  87. package/hooks/features/rowGrouping/useGridRowGrouping.js +204 -0
  88. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +4 -0
  89. package/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +203 -0
  90. package/hooks/features/treeData/gridTreeDataGroupColDef.d.ts +7 -0
  91. package/hooks/features/treeData/gridTreeDataGroupColDef.js +22 -0
  92. package/hooks/features/treeData/gridTreeDataUtils.d.ts +15 -0
  93. package/hooks/features/treeData/gridTreeDataUtils.js +88 -0
  94. package/hooks/features/treeData/index.d.ts +1 -0
  95. package/hooks/features/treeData/index.js +1 -0
  96. package/hooks/features/treeData/useGridTreeData.d.ts +6 -0
  97. package/hooks/features/treeData/useGridTreeData.js +29 -0
  98. package/hooks/features/treeData/useGridTreeDataPreProcessors.d.ts +4 -0
  99. package/hooks/features/treeData/useGridTreeDataPreProcessors.js +138 -0
  100. package/hooks/index.d.ts +1 -0
  101. package/hooks/index.js +1 -0
  102. package/hooks/package.json +6 -0
  103. package/hooks/utils/useGridApiContext.d.ts +4 -0
  104. package/hooks/utils/useGridApiContext.js +2 -0
  105. package/hooks/utils/useGridApiRef.d.ts +4 -0
  106. package/hooks/utils/useGridApiRef.js +2 -0
  107. package/hooks/utils/useGridRootProps.d.ts +2 -0
  108. package/hooks/utils/useGridRootProps.js +2 -0
  109. package/index.d.ts +16 -0
  110. package/index.js +20 -0
  111. package/legacy/DataGridPro/DataGridPro.js +915 -0
  112. package/legacy/DataGridPro/index.js +2 -0
  113. package/legacy/DataGridPro/useDataGridProComponent.js +84 -0
  114. package/legacy/DataGridPro/useDataGridProProps.js +58 -0
  115. package/legacy/components/DataGridProColumnHeaders.js +173 -0
  116. package/legacy/components/DataGridProVirtualScroller.js +287 -0
  117. package/legacy/components/GridColumnPinningMenuItems.js +71 -0
  118. package/legacy/components/GridDetailPanelToggleCell.js +121 -0
  119. package/legacy/components/GridGroupingColumnLeafCell.js +20 -0
  120. package/legacy/components/GridGroupingCriteriaCell.js +146 -0
  121. package/legacy/components/GridRowGroupableColumnMenuItems.js +61 -0
  122. package/legacy/components/GridRowGroupingColumnMenuItems.js +56 -0
  123. package/legacy/components/GridTreeDataGroupingCell.js +156 -0
  124. package/legacy/components/index.js +4 -0
  125. package/legacy/hooks/features/columnPinning/gridColumnPinningInterface.js +11 -0
  126. package/legacy/hooks/features/columnPinning/gridColumnPinningSelector.js +3 -0
  127. package/legacy/hooks/features/columnPinning/index.js +2 -0
  128. package/legacy/hooks/features/columnPinning/useGridColumnPinning.js +298 -0
  129. package/legacy/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +48 -0
  130. package/legacy/hooks/features/columnReorder/columnReorderInterfaces.js +1 -0
  131. package/legacy/hooks/features/columnReorder/columnReorderSelector.js +7 -0
  132. package/legacy/hooks/features/columnReorder/index.js +2 -0
  133. package/legacy/hooks/features/columnReorder/useGridColumnReorder.js +171 -0
  134. package/legacy/hooks/features/columnResize/columnResizeSelector.js +7 -0
  135. package/legacy/hooks/features/columnResize/columnResizeState.js +1 -0
  136. package/legacy/hooks/features/columnResize/index.js +2 -0
  137. package/legacy/hooks/features/columnResize/useGridColumnResize.js +310 -0
  138. package/legacy/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -0
  139. package/legacy/hooks/features/detailPanel/gridDetailPanelSelector.js +9 -0
  140. package/legacy/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +28 -0
  141. package/legacy/hooks/features/detailPanel/index.js +3 -0
  142. package/legacy/hooks/features/detailPanel/useGridDetailPanel.js +114 -0
  143. package/legacy/hooks/features/detailPanel/useGridDetailPanelCache.js +57 -0
  144. package/legacy/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +31 -0
  145. package/legacy/hooks/features/index.js +7 -0
  146. package/legacy/hooks/features/infiniteLoader/useGridInfiniteLoader.js +51 -0
  147. package/legacy/hooks/features/rowGrouping/createGroupingColDef.js +319 -0
  148. package/legacy/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
  149. package/legacy/hooks/features/rowGrouping/gridRowGroupingSelector.js +13 -0
  150. package/legacy/hooks/features/rowGrouping/gridRowGroupingUtils.js +147 -0
  151. package/legacy/hooks/features/rowGrouping/index.js +3 -0
  152. package/legacy/hooks/features/rowGrouping/useGridRowGrouping.js +210 -0
  153. package/legacy/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +217 -0
  154. package/legacy/hooks/features/treeData/gridTreeDataGroupColDef.js +24 -0
  155. package/legacy/hooks/features/treeData/gridTreeDataUtils.js +86 -0
  156. package/legacy/hooks/features/treeData/index.js +1 -0
  157. package/legacy/hooks/features/treeData/useGridTreeData.js +29 -0
  158. package/legacy/hooks/features/treeData/useGridTreeDataPreProcessors.js +153 -0
  159. package/legacy/hooks/index.js +1 -0
  160. package/legacy/hooks/utils/useGridApiContext.js +2 -0
  161. package/legacy/hooks/utils/useGridApiRef.js +2 -0
  162. package/legacy/hooks/utils/useGridRootProps.js +2 -0
  163. package/legacy/index.js +20 -0
  164. package/legacy/models/dataGridProProps.js +1 -0
  165. package/legacy/models/gridApiPro.js +1 -0
  166. package/legacy/models/gridGroupingColDefOverride.js +1 -0
  167. package/legacy/models/gridGroupingValueGetterParams.js +1 -0
  168. package/legacy/models/gridRowScrollEndParams.js +1 -0
  169. package/legacy/models/gridStatePro.js +1 -0
  170. package/legacy/models/index.js +4 -0
  171. package/legacy/themeAugmentation/index.js +3 -0
  172. package/legacy/themeAugmentation/overrides.js +1 -0
  173. package/legacy/themeAugmentation/props.js +1 -0
  174. package/legacy/typeOverloads/modules.js +1 -0
  175. package/legacy/typeOverloads/reexports.js +6 -0
  176. package/legacy/utils/domUtils.js +19 -0
  177. package/legacy/utils/releaseInfo.js +15 -0
  178. package/legacy/utils/tree/buildRowTree.js +188 -0
  179. package/legacy/utils/tree/sortRowTree.js +63 -0
  180. package/models/dataGridProProps.d.ts +174 -0
  181. package/models/dataGridProProps.js +1 -0
  182. package/models/gridApiPro.d.ts +12 -0
  183. package/models/gridApiPro.js +1 -0
  184. package/models/gridGroupingColDefOverride.d.ts +30 -0
  185. package/models/gridGroupingColDefOverride.js +1 -0
  186. package/models/gridGroupingValueGetterParams.d.ts +31 -0
  187. package/models/gridGroupingValueGetterParams.js +1 -0
  188. package/models/gridRowScrollEndParams.d.ts +18 -0
  189. package/models/gridRowScrollEndParams.js +1 -0
  190. package/models/gridStatePro.d.ts +20 -0
  191. package/models/gridStatePro.js +1 -0
  192. package/models/index.d.ts +4 -0
  193. package/models/index.js +4 -0
  194. package/models/package.json +6 -0
  195. package/modern/DataGridPro/DataGridPro.js +915 -0
  196. package/modern/DataGridPro/index.js +2 -0
  197. package/modern/DataGridPro/useDataGridProComponent.js +82 -0
  198. package/modern/DataGridPro/useDataGridProProps.js +45 -0
  199. package/modern/components/DataGridProColumnHeaders.js +163 -0
  200. package/modern/components/DataGridProVirtualScroller.js +268 -0
  201. package/modern/components/GridColumnPinningMenuItems.js +71 -0
  202. package/modern/components/GridDetailPanelToggleCell.js +125 -0
  203. package/modern/components/GridGroupingColumnLeafCell.js +20 -0
  204. package/modern/components/GridGroupingCriteriaCell.js +148 -0
  205. package/modern/components/GridRowGroupableColumnMenuItems.js +61 -0
  206. package/modern/components/GridRowGroupingColumnMenuItems.js +56 -0
  207. package/modern/components/GridTreeDataGroupingCell.js +158 -0
  208. package/modern/components/index.js +4 -0
  209. package/modern/hooks/features/columnPinning/gridColumnPinningInterface.js +11 -0
  210. package/modern/hooks/features/columnPinning/gridColumnPinningSelector.js +1 -0
  211. package/modern/hooks/features/columnPinning/index.js +2 -0
  212. package/modern/hooks/features/columnPinning/useGridColumnPinning.js +268 -0
  213. package/modern/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +45 -0
  214. package/modern/hooks/features/columnReorder/columnReorderInterfaces.js +1 -0
  215. package/modern/hooks/features/columnReorder/columnReorderSelector.js +3 -0
  216. package/modern/hooks/features/columnReorder/index.js +2 -0
  217. package/modern/hooks/features/columnReorder/useGridColumnReorder.js +165 -0
  218. package/modern/hooks/features/columnResize/columnResizeSelector.js +3 -0
  219. package/modern/hooks/features/columnResize/columnResizeState.js +1 -0
  220. package/modern/hooks/features/columnResize/index.js +2 -0
  221. package/modern/hooks/features/columnResize/useGridColumnResize.js +295 -0
  222. package/modern/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -0
  223. package/modern/hooks/features/detailPanel/gridDetailPanelSelector.js +3 -0
  224. package/modern/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +26 -0
  225. package/modern/hooks/features/detailPanel/index.js +3 -0
  226. package/modern/hooks/features/detailPanel/useGridDetailPanel.js +105 -0
  227. package/modern/hooks/features/detailPanel/useGridDetailPanelCache.js +57 -0
  228. package/modern/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +28 -0
  229. package/modern/hooks/features/index.js +7 -0
  230. package/modern/hooks/features/infiniteLoader/useGridInfiniteLoader.js +52 -0
  231. package/modern/hooks/features/rowGrouping/createGroupingColDef.js +302 -0
  232. package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +1 -0
  233. package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +5 -0
  234. package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +137 -0
  235. package/modern/hooks/features/rowGrouping/index.js +3 -0
  236. package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +196 -0
  237. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +203 -0
  238. package/modern/hooks/features/treeData/gridTreeDataGroupColDef.js +22 -0
  239. package/modern/hooks/features/treeData/gridTreeDataUtils.js +84 -0
  240. package/modern/hooks/features/treeData/index.js +1 -0
  241. package/modern/hooks/features/treeData/useGridTreeData.js +27 -0
  242. package/modern/hooks/features/treeData/useGridTreeDataPreProcessors.js +136 -0
  243. package/modern/hooks/index.js +1 -0
  244. package/modern/hooks/utils/useGridApiContext.js +2 -0
  245. package/modern/hooks/utils/useGridApiRef.js +2 -0
  246. package/modern/hooks/utils/useGridRootProps.js +2 -0
  247. package/modern/index.js +20 -0
  248. package/modern/models/dataGridProProps.js +1 -0
  249. package/modern/models/gridApiPro.js +1 -0
  250. package/modern/models/gridGroupingColDefOverride.js +1 -0
  251. package/modern/models/gridGroupingValueGetterParams.js +1 -0
  252. package/modern/models/gridRowScrollEndParams.js +1 -0
  253. package/modern/models/gridStatePro.js +1 -0
  254. package/modern/models/index.js +4 -0
  255. package/modern/themeAugmentation/index.js +3 -0
  256. package/modern/themeAugmentation/overrides.js +1 -0
  257. package/modern/themeAugmentation/props.js +1 -0
  258. package/modern/typeOverloads/modules.js +1 -0
  259. package/modern/typeOverloads/reexports.js +6 -0
  260. package/modern/utils/domUtils.js +19 -0
  261. package/modern/utils/releaseInfo.js +15 -0
  262. package/modern/utils/tree/buildRowTree.js +167 -0
  263. package/modern/utils/tree/sortRowTree.js +60 -0
  264. package/node/DataGridPro/DataGridPro.js +939 -0
  265. package/node/DataGridPro/index.js +30 -0
  266. package/node/DataGridPro/useDataGridProComponent.js +106 -0
  267. package/node/DataGridPro/useDataGridProProps.js +69 -0
  268. package/node/components/DataGridProColumnHeaders.js +189 -0
  269. package/node/components/DataGridProVirtualScroller.js +297 -0
  270. package/node/components/GridColumnPinningMenuItems.js +88 -0
  271. package/node/components/GridDetailPanelToggleCell.js +146 -0
  272. package/node/components/GridGroupingColumnLeafCell.js +38 -0
  273. package/node/components/GridGroupingCriteriaCell.js +170 -0
  274. package/node/components/GridRowGroupableColumnMenuItems.js +82 -0
  275. package/node/components/GridRowGroupingColumnMenuItems.js +78 -0
  276. package/node/components/GridTreeDataGroupingCell.js +181 -0
  277. package/node/components/index.js +44 -0
  278. package/node/hooks/features/columnPinning/gridColumnPinningInterface.js +17 -0
  279. package/node/hooks/features/columnPinning/gridColumnPinningSelector.js +10 -0
  280. package/node/hooks/features/columnPinning/index.js +31 -0
  281. package/node/hooks/features/columnPinning/useGridColumnPinning.js +297 -0
  282. package/node/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +66 -0
  283. package/node/hooks/features/columnReorder/columnReorderInterfaces.js +5 -0
  284. package/node/hooks/features/columnReorder/columnReorderSelector.js +14 -0
  285. package/node/hooks/features/columnReorder/index.js +18 -0
  286. package/node/hooks/features/columnReorder/useGridColumnReorder.js +188 -0
  287. package/node/hooks/features/columnResize/columnResizeSelector.js +14 -0
  288. package/node/hooks/features/columnResize/columnResizeState.js +5 -0
  289. package/node/hooks/features/columnResize/index.js +31 -0
  290. package/node/hooks/features/columnResize/useGridColumnResize.js +329 -0
  291. package/node/hooks/features/detailPanel/gridDetailPanelInterface.js +5 -0
  292. package/node/hooks/features/detailPanel/gridDetailPanelSelector.js +18 -0
  293. package/node/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +47 -0
  294. package/node/hooks/features/detailPanel/index.js +44 -0
  295. package/node/hooks/features/detailPanel/useGridDetailPanel.js +133 -0
  296. package/node/hooks/features/detailPanel/useGridDetailPanelCache.js +74 -0
  297. package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +44 -0
  298. package/node/hooks/features/index.js +83 -0
  299. package/node/hooks/features/infiniteLoader/useGridInfiniteLoader.js +67 -0
  300. package/node/hooks/features/rowGrouping/createGroupingColDef.js +341 -0
  301. package/node/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +5 -0
  302. package/node/hooks/features/rowGrouping/gridRowGroupingSelector.js +18 -0
  303. package/node/hooks/features/rowGrouping/gridRowGroupingUtils.js +172 -0
  304. package/node/hooks/features/rowGrouping/index.js +51 -0
  305. package/node/hooks/features/rowGrouping/useGridRowGrouping.js +232 -0
  306. package/node/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +227 -0
  307. package/node/hooks/features/treeData/gridTreeDataGroupColDef.js +35 -0
  308. package/node/hooks/features/treeData/gridTreeDataUtils.js +98 -0
  309. package/node/hooks/features/treeData/index.js +13 -0
  310. package/node/hooks/features/treeData/useGridTreeData.js +43 -0
  311. package/node/hooks/features/treeData/useGridTreeDataPreProcessors.js +164 -0
  312. package/node/hooks/index.js +18 -0
  313. package/node/hooks/utils/useGridApiContext.js +11 -0
  314. package/node/hooks/utils/useGridApiRef.js +11 -0
  315. package/node/hooks/utils/useGridRootProps.js +11 -0
  316. package/node/index.js +214 -0
  317. package/node/models/dataGridProProps.js +5 -0
  318. package/node/models/gridApiPro.js +5 -0
  319. package/node/models/gridGroupingColDefOverride.js +5 -0
  320. package/node/models/gridGroupingValueGetterParams.js +5 -0
  321. package/node/models/gridRowScrollEndParams.js +5 -0
  322. package/node/models/gridStatePro.js +5 -0
  323. package/node/models/index.js +44 -0
  324. package/node/themeAugmentation/index.js +31 -0
  325. package/node/themeAugmentation/overrides.js +5 -0
  326. package/node/themeAugmentation/props.js +5 -0
  327. package/node/typeOverloads/modules.js +5 -0
  328. package/node/typeOverloads/reexports.js +29 -0
  329. package/node/utils/domUtils.js +32 -0
  330. package/node/utils/releaseInfo.js +25 -0
  331. package/node/utils/tree/buildRowTree.js +185 -0
  332. package/node/utils/tree/sortRowTree.js +69 -0
  333. package/package.json +11 -12
  334. package/themeAugmentation/index.d.ts +2 -2
  335. package/themeAugmentation/index.js +3 -0
  336. package/themeAugmentation/overrides.d.ts +8 -8
  337. package/themeAugmentation/overrides.js +1 -0
  338. package/themeAugmentation/package.json +6 -0
  339. package/themeAugmentation/props.d.ts +19 -19
  340. package/themeAugmentation/props.js +1 -0
  341. package/typeOverloads/modules.d.ts +41 -0
  342. package/typeOverloads/modules.js +1 -0
  343. package/typeOverloads/reexports.d.ts +22 -0
  344. package/typeOverloads/reexports.js +6 -0
  345. package/utils/domUtils.d.ts +3 -0
  346. package/utils/domUtils.js +19 -0
  347. package/utils/releaseInfo.d.ts +1 -0
  348. package/utils/releaseInfo.js +15 -0
  349. package/utils/tree/buildRowTree.d.ts +47 -0
  350. package/utils/tree/buildRowTree.js +179 -0
  351. package/utils/tree/sortRowTree.d.ts +10 -0
  352. package/utils/tree/sortRowTree.js +60 -0
  353. package/LICENSE +0 -12
  354. package/index-cjs.js +0 -15
  355. package/index-esm.js +0 -15
  356. package/x-data-grid-pro.d.ts +0 -5495
@@ -0,0 +1,174 @@
1
+ import * as React from 'react';
2
+ import { GridRowModel, GridRowTreeNodeConfig, GridEventListener, GridEvents, GridCallbackDetails, GridRowParams, GridRowId } from '@mui/x-data-grid';
3
+ import { GridExperimentalFeatures, DataGridPropsWithoutDefaultValue, DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithComplexDefaultValueBeforeProcessing } from '@mui/x-data-grid/internals';
4
+ import type { GridPinnedColumns } from '../hooks/features/columnPinning';
5
+ import { GridApiPro } from './gridApiPro';
6
+ import { GridGroupingColDefOverride, GridGroupingColDefOverrideParams } from './gridGroupingColDefOverride';
7
+ import type { GridRowGroupingModel } from '../hooks/features/rowGrouping';
8
+ import { GridInitialStatePro } from './gridStatePro';
9
+ export interface GridExperimentalProFeatures extends GridExperimentalFeatures {
10
+ /**
11
+ * Will be part of the premium-plan when fully ready.
12
+ */
13
+ rowGrouping: boolean;
14
+ }
15
+ /**
16
+ * The props users can give to the `DataGridProProps` component.
17
+ */
18
+ export interface DataGridProProps extends Omit<Partial<DataGridProPropsWithDefaultValue> & DataGridPropsWithComplexDefaultValueBeforeProcessing & DataGridProPropsWithoutDefaultValue, DataGridProForcedPropsKey> {
19
+ /**
20
+ * Features under development.
21
+ * For each feature, if the flag is not explicitly set to `true`, the feature will be fully disabled and any property / method call will not have any effect.
22
+ */
23
+ experimentalFeatures?: Partial<GridExperimentalProFeatures>;
24
+ }
25
+ /**
26
+ * The props of the `DataGridPro` component after the pre-processing phase.
27
+ */
28
+ export interface DataGridProProcessedProps extends DataGridProPropsWithDefaultValue, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridProPropsWithoutDefaultValue {
29
+ }
30
+ export declare type DataGridProForcedPropsKey = 'signature';
31
+ /**
32
+ * The `DataGridPro` options with a default value overridable through props
33
+ * None of the entry of this interface should be optional, they all have default values and `DataGridProps` already applies a `Partial<DataGridSimpleOptions>` for the public interface
34
+ * The controlled model do not have a default value at the prop processing level, so they must be defined in `DataGridOtherProps`
35
+ */
36
+ export interface DataGridProPropsWithDefaultValue extends DataGridPropsWithDefaultValues {
37
+ /**
38
+ * Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
39
+ * @default 80
40
+ */
41
+ scrollEndThreshold: number;
42
+ /**
43
+ * If `true`, the rows will be gathered in a tree structure according to the `getTreeDataPath` prop.
44
+ * @default false
45
+ */
46
+ treeData: boolean;
47
+ /**
48
+ * If above 0, the row children will be expanded up to this depth.
49
+ * If equal to -1, all the row children will be expanded.
50
+ * @default 0
51
+ */
52
+ defaultGroupingExpansionDepth: number;
53
+ /**
54
+ * Determines if a group should be expanded after its creation.
55
+ * This prop takes priority over the `defaultGroupingExpansionDepth` prop.
56
+ * @param {GridRowTreeNodeConfig} node The node of the group to test.
57
+ * @returns {boolean} A boolean indicating if the group is expanded.
58
+ */
59
+ isGroupExpandedByDefault?: (node: GridRowTreeNodeConfig) => boolean;
60
+ /**
61
+ * If `true`, the column pinning is disabled.
62
+ * @default false
63
+ */
64
+ disableColumnPinning: boolean;
65
+ /**
66
+ * If `true`, the filtering will only be applied to the top level rows when grouping rows with the `treeData` prop.
67
+ * @default false
68
+ */
69
+ disableChildrenFiltering: boolean;
70
+ /**
71
+ * If `true`, the sorting will only be applied to the top level rows when grouping rows with the `treeData` prop.
72
+ * @default false
73
+ */
74
+ disableChildrenSorting: boolean;
75
+ /**
76
+ * If `true`, the row grouping is disabled.
77
+ * @default false
78
+ */
79
+ disableRowGrouping: boolean;
80
+ /**
81
+ * If `single`, all column we are grouping by will be represented in the same grouping the same column.
82
+ * If `multiple`, each column we are grouping by will be represented in its own column.
83
+ * @default 'single'
84
+ */
85
+ rowGroupingColumnMode: 'single' | 'multiple';
86
+ /**
87
+ * Function that returns the height of the row detail panel.
88
+ * @param {GridRowParams} params With all properties from [[GridRowParams]].
89
+ * @returns {number} The height in pixels.
90
+ * @default "() => 500"
91
+ */
92
+ getDetailPanelHeight: (params: GridRowParams) => number;
93
+ }
94
+ export interface DataGridProPropsWithoutDefaultValue extends Omit<DataGridPropsWithoutDefaultValue, 'initialState'> {
95
+ /**
96
+ * The ref object that allows grid manipulation. Can be instantiated with [[useGridApiRef()]].
97
+ */
98
+ apiRef?: React.MutableRefObject<GridApiPro>;
99
+ /**
100
+ * The initial state of the DataGridPro.
101
+ * The data in it will be set in the state on initialization but will not be controlled.
102
+ * If one of the data in `initialState` is also being controlled, then the control state wins.
103
+ */
104
+ initialState?: GridInitialStatePro;
105
+ /**
106
+ * Determines the path of a row in the tree data.
107
+ * For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"].
108
+ * Note that all paths must contain at least one element.
109
+ * @param {GridRowModel} row The row from which we want the path.
110
+ * @returns {string[]} The path to the row.
111
+ */
112
+ getTreeDataPath?: (row: GridRowModel) => string[];
113
+ /**
114
+ * Callback fired while a column is being resized.
115
+ * @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].
116
+ * @param {MuiEvent<React.MouseEvent>} event The event object.
117
+ * @param {GridCallbackDetails} details Additional details for this callback.
118
+ */
119
+ onColumnResize?: GridEventListener<GridEvents.columnResize>;
120
+ /**
121
+ * Callback fired when the width of a column is changed.
122
+ * @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].
123
+ * @param {MuiEvent<React.MouseEvent>} event The event object.
124
+ * @param {GridCallbackDetails} details Additional details for this callback.
125
+ */
126
+ onColumnWidthChange?: GridEventListener<GridEvents.columnWidthChange>;
127
+ /**
128
+ * Callback fired when scrolling to the bottom of the grid viewport.
129
+ * @param {GridRowScrollEndParams} params With all properties from [[GridRowScrollEndParams]].
130
+ * @param {MuiEvent<{}>} event The event object.
131
+ * @param {GridCallbackDetails} details Additional details for this callback.
132
+ */
133
+ onRowsScrollEnd?: GridEventListener<GridEvents.rowsScrollEnd>;
134
+ /**
135
+ * The column fields to display pinned to left or right.
136
+ */
137
+ pinnedColumns?: GridPinnedColumns;
138
+ /**
139
+ * Callback fired when the pinned columns have changed.
140
+ * @param {GridPinnedColumns} pinnedColumns The changed pinned columns.
141
+ * @param {GridCallbackDetails} details Additional details for this callback.
142
+ */
143
+ onPinnedColumnsChange?: (pinnedColumns: GridPinnedColumns, details: GridCallbackDetails) => void;
144
+ /**
145
+ * Set the row grouping model of the grid.
146
+ */
147
+ rowGroupingModel?: GridRowGroupingModel;
148
+ /**
149
+ * Callback fired when the row grouping model changes.
150
+ * @param {GridRowGroupingModel} model Columns used as grouping criteria.
151
+ * @param {GridCallbackDetails} details Additional details for this callback.
152
+ */
153
+ onRowGroupingModelChange?: (model: GridRowGroupingModel, details: GridCallbackDetails) => void;
154
+ /**
155
+ * The grouping column used by the tree data.
156
+ */
157
+ groupingColDef?: GridGroupingColDefOverride | ((params: GridGroupingColDefOverrideParams) => GridGroupingColDefOverride | undefined | null);
158
+ /**
159
+ * The row ids to show the detail panel.
160
+ */
161
+ detailPanelExpandedRowIds?: GridRowId[];
162
+ /**
163
+ * Callback fired when the detail panel of a row is opened or closed.
164
+ * @param {GridRowId[]} ids The ids of the rows which have the detail panel open.
165
+ * @param {GridCallbackDetails} details Additional details for this callback.
166
+ */
167
+ onDetailPanelExpandedRowIdsChange?: (ids: GridRowId[], details: GridCallbackDetails) => void;
168
+ /**
169
+ * Function that returns the element to render in row detail.
170
+ * @param {GridRowParams} params With all properties from [[GridRowParams]].
171
+ * @returns {JSX.Element} The row detail element.
172
+ */
173
+ getDetailPanelContent?: (params: GridRowParams) => React.ReactNode;
174
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { GridApiCommon, GridStateApi, GridStatePersistenceApi } from '@mui/x-data-grid';
2
+ import { GridInitialStatePro, GridStatePro } from './gridStatePro';
3
+ import type { GridColumnPinningApi, GridRowGroupingApi, GridDetailPanelApi } from '../hooks';
4
+ declare type GridStateApiUntyped = {
5
+ [key in keyof (GridStateApi<any> & GridStatePersistenceApi<any>)]: any;
6
+ };
7
+ /**
8
+ * The api of `DataGridPro`.
9
+ */
10
+ export interface GridApiPro extends Omit<GridApiCommon, keyof GridStateApiUntyped>, GridStateApi<GridStatePro>, GridStatePersistenceApi<GridInitialStatePro>, GridRowGroupingApi, GridColumnPinningApi, GridDetailPanelApi {
11
+ }
12
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ import { GridColDef } from '@mui/x-data-grid';
2
+ export interface GridGroupingColDefOverride extends Omit<GridColDef, 'editable' | 'valueSetter' | 'field' | 'type' | 'preProcessEditCellProps' | 'renderEditCell' | 'groupable'> {
3
+ /**
4
+ * The field from which we want to apply the sorting and the filtering for the grouping column.
5
+ * It is only useful when `props.rowGroupingColumnMode === "multiple"` to decide which grouping criteria should be used for sorting and filtering.
6
+ * Do not have any effect when building the tree with the `props.treeData` feature.
7
+ * @default: The sorting and filtering is applied based on the leaf field in any, otherwise based on top level grouping criteria.
8
+ */
9
+ mainGroupingCriteria?: string;
10
+ /**
11
+ * The field from which we want to render the leaves of the tree.
12
+ * Do not have any effect when building the tree with the `props.treeData` feature.
13
+ */
14
+ leafField?: string;
15
+ /**
16
+ * If `true`, the grouping cells will not render the amount of descendants.
17
+ * @default: false
18
+ */
19
+ hideDescendantCount?: boolean;
20
+ }
21
+ export interface GridGroupingColDefOverrideParams {
22
+ /**
23
+ * The name of the grouping algorithm currently building the grouping column.
24
+ */
25
+ groupingName: string;
26
+ /**
27
+ * The fields of the columns from which we want to group the values on this new grouping column.
28
+ */
29
+ fields: string[];
30
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ import { GridRowId, GridRowModel, GridRowTreeNodeConfig, GridColDef, GridStateColDef } from '@mui/x-data-grid';
2
+ /**
3
+ * Parameters passed to `colDef.groupingValueGetter`.
4
+ */
5
+ export interface GridGroupingValueGetterParams<V = any, R = any> {
6
+ /**
7
+ * The grid row id.
8
+ */
9
+ id: GridRowId;
10
+ /**
11
+ * The column field of the cell that triggered the event.
12
+ */
13
+ field: string;
14
+ /**
15
+ * The cell value, does not take `valueGetter` into account.
16
+ */
17
+ value: V;
18
+ /**
19
+ * The row model of the row that the current cell belongs to.
20
+ */
21
+ row: GridRowModel<R>;
22
+ /**
23
+ * The column of the row that the current cell belongs to.
24
+ */
25
+ colDef: GridColDef | GridStateColDef;
26
+ /**
27
+ * The node of the row that the current cell belongs to.
28
+ * It only contains the information available before the actual grouping.
29
+ */
30
+ rowNode: Pick<GridRowTreeNodeConfig, 'id' | 'isAutoGenerated'>;
31
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { GridColumns } from '@mui/x-data-grid';
2
+ /**
3
+ * Object passed as parameter in the onRowsScrollEnd callback.
4
+ */
5
+ export interface GridRowScrollEndParams {
6
+ /**
7
+ * The number of rows that fit in the viewport.
8
+ */
9
+ viewportPageSize: number;
10
+ /**
11
+ * The number of rows allocated for the rendered zone.
12
+ */
13
+ virtualRowsCount: number;
14
+ /**
15
+ * The grid visible columns.
16
+ */
17
+ visibleColumns: GridColumns;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import { GridInitialState as GridInitialStateCommunity, GridState as GridStateCommunity } from '@mui/x-data-grid';
2
+ import type { GridRowGroupingState, GridDetailPanelState, GridDetailPanelInitialState, GridColumnReorderState, GridColumnResizeState, GridColumnPinningState, GridRowGroupingInitialState } from '../hooks';
3
+ /**
4
+ * The state of `DataGridPro`.
5
+ */
6
+ export interface GridStatePro extends GridStateCommunity {
7
+ columnReorder: GridColumnReorderState;
8
+ columnResize: GridColumnResizeState;
9
+ pinnedColumns: GridColumnPinningState;
10
+ rowGrouping: GridRowGroupingState;
11
+ detailPanel: GridDetailPanelState;
12
+ }
13
+ /**
14
+ * The initial state of `DataGridPro`.
15
+ */
16
+ export interface GridInitialStatePro extends GridInitialStateCommunity {
17
+ rowGrouping?: GridRowGroupingInitialState;
18
+ pinnedColumns?: GridColumnPinningState;
19
+ detailPanel?: GridDetailPanelInitialState;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './gridGroupingColDefOverride';
2
+ export type { DataGridProProps } from './dataGridProProps';
3
+ export * from './gridRowScrollEndParams';
4
+ export * from './gridGroupingValueGetterParams';
@@ -0,0 +1,4 @@
1
+ export * from './gridGroupingColDefOverride';
2
+ export * from './gridRowScrollEndParams';
3
+ export * from './gridGroupingValueGetterParams';
4
+ export {};
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/models/index.js",
5
+ "types": "./index.d.ts"
6
+ }