@mui/x-data-grid-premium 8.0.0-beta.3 → 8.0.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 (486) hide show
  1. package/CHANGELOG.md +282 -96
  2. package/DataGridPremium/DataGridPremium.js +165 -9
  3. package/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
  4. package/DataGridPremium/useDataGridPremiumComponent.js +22 -3
  5. package/DataGridPremium/useDataGridPremiumProps.js +5 -1
  6. package/components/GridColumnMenuPivotItem.d.ts +3 -0
  7. package/components/GridColumnMenuPivotItem.js +33 -0
  8. package/components/GridEmptyPivotOverlay.d.ts +6 -0
  9. package/components/GridEmptyPivotOverlay.js +29 -0
  10. package/components/GridGroupingCriteriaCell.js +8 -3
  11. package/components/GridPremiumColumnMenu.d.ts +5 -0
  12. package/components/GridPremiumColumnMenu.js +6 -1
  13. package/components/GridPremiumToolbar.d.ts +1 -1
  14. package/components/GridPremiumToolbar.js +29 -1
  15. package/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +33 -0
  16. package/components/aiAssistantPanel/AiAssistantPanelTrigger.js +107 -0
  17. package/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +3 -0
  18. package/components/aiAssistantPanel/GridAiAssistantPanel.js +195 -0
  19. package/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +7 -0
  20. package/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +71 -0
  21. package/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +3 -0
  22. package/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.js +92 -0
  23. package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +7 -0
  24. package/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +86 -0
  25. package/components/aiAssistantPanel/index.d.ts +2 -0
  26. package/components/aiAssistantPanel/index.js +27 -0
  27. package/components/collapsible/Collapsible.d.ts +4 -0
  28. package/components/collapsible/Collapsible.js +70 -0
  29. package/components/collapsible/CollapsibleContext.d.ts +8 -0
  30. package/components/collapsible/CollapsibleContext.js +17 -0
  31. package/components/collapsible/CollapsiblePanel.d.ts +4 -0
  32. package/components/collapsible/CollapsiblePanel.js +64 -0
  33. package/components/collapsible/CollapsibleTrigger.d.ts +4 -0
  34. package/components/collapsible/CollapsibleTrigger.js +106 -0
  35. package/components/collapsible/index.d.ts +4 -0
  36. package/components/collapsible/index.js +49 -0
  37. package/components/index.d.ts +5 -2
  38. package/components/index.js +40 -4
  39. package/components/pivotPanel/GridPivotPanel.d.ts +3 -0
  40. package/components/pivotPanel/GridPivotPanel.js +22 -0
  41. package/components/pivotPanel/GridPivotPanelBody.d.ts +11 -0
  42. package/components/pivotPanel/GridPivotPanelBody.js +368 -0
  43. package/components/pivotPanel/GridPivotPanelField.d.ts +22 -0
  44. package/components/pivotPanel/GridPivotPanelField.js +338 -0
  45. package/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +8 -0
  46. package/components/pivotPanel/GridPivotPanelFieldMenu.js +177 -0
  47. package/components/pivotPanel/GridPivotPanelHeader.d.ts +7 -0
  48. package/components/pivotPanel/GridPivotPanelHeader.js +101 -0
  49. package/components/pivotPanel/GridPivotPanelSearch.d.ts +7 -0
  50. package/components/pivotPanel/GridPivotPanelSearch.js +77 -0
  51. package/components/pivotPanel/PivotPanelTrigger.d.ts +37 -0
  52. package/components/pivotPanel/PivotPanelTrigger.js +93 -0
  53. package/components/pivotPanel/index.d.ts +2 -0
  54. package/components/pivotPanel/index.js +27 -0
  55. package/components/prompt/GridPrompt.d.ts +7 -0
  56. package/components/prompt/GridPrompt.js +364 -0
  57. package/components/prompt/index.d.ts +1 -0
  58. package/components/prompt/index.js +12 -0
  59. package/components/promptField/GridPromptField.d.ts +4 -0
  60. package/components/promptField/GridPromptField.js +86 -0
  61. package/components/promptField/PromptField.d.ts +66 -0
  62. package/components/promptField/PromptField.js +95 -0
  63. package/components/promptField/PromptFieldContext.d.ts +16 -0
  64. package/components/promptField/PromptFieldContext.js +17 -0
  65. package/components/promptField/PromptFieldControl.d.ts +27 -0
  66. package/components/promptField/PromptFieldControl.js +102 -0
  67. package/components/promptField/PromptFieldRecord.d.ts +27 -0
  68. package/components/promptField/PromptFieldRecord.js +158 -0
  69. package/components/promptField/PromptFieldSend.d.ts +27 -0
  70. package/components/promptField/PromptFieldSend.js +83 -0
  71. package/components/promptField/index.d.ts +4 -0
  72. package/components/promptField/index.js +49 -0
  73. package/components/resizablePanel/ResizablePanel.d.ts +10 -0
  74. package/components/resizablePanel/ResizablePanel.js +59 -0
  75. package/components/resizablePanel/ResizablePanelContext.d.ts +7 -0
  76. package/components/resizablePanel/ResizablePanelContext.js +17 -0
  77. package/components/resizablePanel/ResizablePanelHandle.d.ts +4 -0
  78. package/components/resizablePanel/ResizablePanelHandle.js +115 -0
  79. package/components/resizablePanel/index.d.ts +3 -0
  80. package/components/resizablePanel/index.js +38 -0
  81. package/components/sidebar/Sidebar.d.ts +4 -0
  82. package/components/sidebar/Sidebar.js +54 -0
  83. package/components/sidebar/SidebarHeader.d.ts +4 -0
  84. package/components/sidebar/SidebarHeader.js +51 -0
  85. package/components/sidebar/index.d.ts +2 -0
  86. package/components/sidebar/index.js +27 -0
  87. package/constants/dataGridPremiumDefaultSlotsComponents.js +3 -0
  88. package/esm/DataGridPremium/DataGridPremium.js +167 -11
  89. package/esm/DataGridPremium/useDataGridPremiumComponent.d.ts +2 -2
  90. package/esm/DataGridPremium/useDataGridPremiumComponent.js +20 -3
  91. package/esm/DataGridPremium/useDataGridPremiumProps.js +5 -1
  92. package/esm/components/GridColumnMenuPivotItem.d.ts +3 -0
  93. package/esm/components/GridColumnMenuPivotItem.js +26 -0
  94. package/esm/components/GridEmptyPivotOverlay.d.ts +6 -0
  95. package/esm/components/GridEmptyPivotOverlay.js +22 -0
  96. package/esm/components/GridGroupingCriteriaCell.js +9 -4
  97. package/esm/components/GridPremiumColumnMenu.d.ts +5 -0
  98. package/esm/components/GridPremiumColumnMenu.js +6 -1
  99. package/esm/components/GridPremiumToolbar.d.ts +1 -1
  100. package/esm/components/GridPremiumToolbar.js +30 -2
  101. package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.d.ts +33 -0
  102. package/esm/components/aiAssistantPanel/AiAssistantPanelTrigger.js +100 -0
  103. package/esm/components/aiAssistantPanel/GridAiAssistantPanel.d.ts +3 -0
  104. package/esm/components/aiAssistantPanel/GridAiAssistantPanel.js +188 -0
  105. package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.d.ts +7 -0
  106. package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversation.js +64 -0
  107. package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.d.ts +3 -0
  108. package/esm/components/aiAssistantPanel/GridAiAssistantPanelConversationsMenu.js +85 -0
  109. package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.d.ts +7 -0
  110. package/esm/components/aiAssistantPanel/GridAiAssistantPanelSuggestions.js +80 -0
  111. package/esm/components/aiAssistantPanel/index.d.ts +2 -0
  112. package/esm/components/aiAssistantPanel/index.js +2 -0
  113. package/esm/components/collapsible/Collapsible.d.ts +4 -0
  114. package/esm/components/collapsible/Collapsible.js +63 -0
  115. package/esm/components/collapsible/CollapsibleContext.d.ts +8 -0
  116. package/esm/components/collapsible/CollapsibleContext.js +9 -0
  117. package/esm/components/collapsible/CollapsiblePanel.d.ts +4 -0
  118. package/esm/components/collapsible/CollapsiblePanel.js +57 -0
  119. package/esm/components/collapsible/CollapsibleTrigger.d.ts +4 -0
  120. package/esm/components/collapsible/CollapsibleTrigger.js +99 -0
  121. package/esm/components/collapsible/index.d.ts +4 -0
  122. package/esm/components/collapsible/index.js +4 -0
  123. package/esm/components/index.d.ts +5 -2
  124. package/esm/components/index.js +5 -2
  125. package/esm/components/pivotPanel/GridPivotPanel.d.ts +3 -0
  126. package/esm/components/pivotPanel/GridPivotPanel.js +16 -0
  127. package/esm/components/pivotPanel/GridPivotPanelBody.d.ts +11 -0
  128. package/esm/components/pivotPanel/GridPivotPanelBody.js +361 -0
  129. package/esm/components/pivotPanel/GridPivotPanelField.d.ts +22 -0
  130. package/esm/components/pivotPanel/GridPivotPanelField.js +331 -0
  131. package/esm/components/pivotPanel/GridPivotPanelFieldMenu.d.ts +8 -0
  132. package/esm/components/pivotPanel/GridPivotPanelFieldMenu.js +170 -0
  133. package/esm/components/pivotPanel/GridPivotPanelHeader.d.ts +7 -0
  134. package/esm/components/pivotPanel/GridPivotPanelHeader.js +94 -0
  135. package/esm/components/pivotPanel/GridPivotPanelSearch.d.ts +7 -0
  136. package/esm/components/pivotPanel/GridPivotPanelSearch.js +70 -0
  137. package/esm/components/pivotPanel/PivotPanelTrigger.d.ts +37 -0
  138. package/esm/components/pivotPanel/PivotPanelTrigger.js +86 -0
  139. package/esm/components/pivotPanel/index.d.ts +2 -0
  140. package/esm/components/pivotPanel/index.js +2 -0
  141. package/esm/components/prompt/GridPrompt.d.ts +7 -0
  142. package/esm/components/prompt/GridPrompt.js +357 -0
  143. package/esm/components/prompt/index.d.ts +1 -0
  144. package/esm/components/prompt/index.js +1 -0
  145. package/esm/components/promptField/GridPromptField.d.ts +4 -0
  146. package/esm/components/promptField/GridPromptField.js +79 -0
  147. package/esm/components/promptField/PromptField.d.ts +66 -0
  148. package/esm/components/promptField/PromptField.js +88 -0
  149. package/esm/components/promptField/PromptFieldContext.d.ts +16 -0
  150. package/esm/components/promptField/PromptFieldContext.js +9 -0
  151. package/esm/components/promptField/PromptFieldControl.d.ts +27 -0
  152. package/esm/components/promptField/PromptFieldControl.js +95 -0
  153. package/esm/components/promptField/PromptFieldRecord.d.ts +27 -0
  154. package/esm/components/promptField/PromptFieldRecord.js +151 -0
  155. package/esm/components/promptField/PromptFieldSend.d.ts +27 -0
  156. package/{modern/components/export/ExportExcel.js → esm/components/promptField/PromptFieldSend.js} +30 -38
  157. package/esm/components/promptField/index.d.ts +4 -0
  158. package/esm/components/promptField/index.js +4 -0
  159. package/esm/components/resizablePanel/ResizablePanel.d.ts +10 -0
  160. package/esm/components/resizablePanel/ResizablePanel.js +52 -0
  161. package/esm/components/resizablePanel/ResizablePanelContext.d.ts +7 -0
  162. package/esm/components/resizablePanel/ResizablePanelContext.js +9 -0
  163. package/esm/components/resizablePanel/ResizablePanelHandle.d.ts +4 -0
  164. package/esm/components/resizablePanel/ResizablePanelHandle.js +108 -0
  165. package/esm/components/resizablePanel/index.d.ts +3 -0
  166. package/esm/components/resizablePanel/index.js +3 -0
  167. package/esm/components/sidebar/Sidebar.d.ts +4 -0
  168. package/esm/components/sidebar/Sidebar.js +47 -0
  169. package/esm/components/sidebar/SidebarHeader.d.ts +4 -0
  170. package/esm/components/sidebar/SidebarHeader.js +44 -0
  171. package/esm/components/sidebar/index.d.ts +2 -0
  172. package/esm/components/sidebar/index.js +2 -0
  173. package/esm/constants/dataGridPremiumDefaultSlotsComponents.js +3 -0
  174. package/esm/hooks/features/aggregation/gridAggregationFunctions.js +13 -0
  175. package/esm/hooks/features/aggregation/gridAggregationSelectors.d.ts +10 -1
  176. package/esm/hooks/features/aggregation/gridAggregationSelectors.js +28 -1
  177. package/esm/hooks/features/aggregation/gridAggregationUtils.d.ts +1 -1
  178. package/esm/hooks/features/aggregation/index.d.ts +1 -1
  179. package/esm/hooks/features/aggregation/index.js +1 -1
  180. package/esm/hooks/features/aggregation/useGridAggregation.js +3 -7
  181. package/esm/hooks/features/aggregation/useGridAggregationPreProcessors.js +2 -8
  182. package/esm/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +5 -25
  183. package/esm/hooks/features/aggregation/wrapColumnWithAggregation.js +23 -10
  184. package/esm/hooks/features/aiAssistant/api.d.ts +12 -0
  185. package/esm/hooks/features/aiAssistant/api.js +31 -0
  186. package/esm/hooks/features/aiAssistant/gridAiAssistantInterfaces.d.ts +82 -0
  187. package/esm/hooks/features/aiAssistant/gridAiAssistantSelectors.d.ts +5 -0
  188. package/esm/hooks/features/aiAssistant/gridAiAssistantSelectors.js +5 -0
  189. package/esm/hooks/features/aiAssistant/index.d.ts +2 -0
  190. package/esm/hooks/features/aiAssistant/useGridAiAssistant.d.ts +6 -0
  191. package/esm/hooks/features/aiAssistant/useGridAiAssistant.js +293 -0
  192. package/esm/hooks/features/dataSource/useGridDataSourcePremium.js +4 -1
  193. package/esm/hooks/features/index.d.ts +1 -1
  194. package/esm/hooks/features/index.js +1 -1
  195. package/esm/hooks/features/pivoting/gridPivotingInterfaces.d.ts +69 -0
  196. package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +4 -0
  197. package/esm/hooks/features/pivoting/gridPivotingSelectors.js +5 -0
  198. package/esm/hooks/features/pivoting/useGridPivoting.d.ts +7 -0
  199. package/esm/hooks/features/pivoting/useGridPivoting.js +339 -0
  200. package/esm/hooks/features/pivoting/utils.d.ts +21 -0
  201. package/esm/hooks/features/pivoting/utils.js +259 -0
  202. package/esm/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +1 -4
  203. package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +0 -1
  204. package/esm/hooks/utils/useResize.d.ts +9 -0
  205. package/esm/hooks/utils/useResize.js +52 -0
  206. package/esm/index.d.ts +4 -1
  207. package/esm/index.js +4 -2
  208. package/esm/material/icons.d.ts +15 -15
  209. package/esm/material/icons.js +32 -5
  210. package/esm/material/index.d.ts +31 -5
  211. package/esm/material/index.js +31 -3
  212. package/esm/models/dataGridPremiumProps.d.ts +96 -2
  213. package/esm/models/gridApiPremium.d.ts +4 -2
  214. package/esm/models/gridPremiumIconSlotsComponent.d.ts +141 -8
  215. package/esm/models/gridPremiumSlotsComponent.d.ts +13 -1
  216. package/esm/models/gridStatePremium.d.ts +6 -0
  217. package/esm/package.json +1 -1
  218. package/esm/setupExcelExportWebWorker/index.d.ts +1 -0
  219. package/esm/setupExcelExportWebWorker/index.js +1 -0
  220. package/esm/typeOverloads/modules.d.ts +32 -1
  221. package/esm/utils/speechRecognition.d.ts +2 -0
  222. package/esm/utils/speechRecognition.js +2 -0
  223. package/hooks/features/aggregation/gridAggregationFunctions.js +13 -0
  224. package/hooks/features/aggregation/gridAggregationSelectors.d.ts +10 -1
  225. package/hooks/features/aggregation/gridAggregationSelectors.js +29 -2
  226. package/hooks/features/aggregation/gridAggregationUtils.d.ts +1 -1
  227. package/hooks/features/aggregation/index.d.ts +1 -1
  228. package/hooks/features/aggregation/index.js +21 -11
  229. package/hooks/features/aggregation/useGridAggregation.js +3 -7
  230. package/hooks/features/aggregation/useGridAggregationPreProcessors.js +2 -8
  231. package/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +5 -25
  232. package/hooks/features/aggregation/wrapColumnWithAggregation.js +24 -11
  233. package/hooks/features/aiAssistant/api.d.ts +12 -0
  234. package/hooks/features/aiAssistant/api.js +37 -0
  235. package/hooks/features/aiAssistant/gridAiAssistantInterfaces.d.ts +82 -0
  236. package/hooks/features/aiAssistant/gridAiAssistantSelectors.d.ts +5 -0
  237. package/hooks/features/aiAssistant/gridAiAssistantSelectors.js +11 -0
  238. package/hooks/features/aiAssistant/index.d.ts +2 -0
  239. package/hooks/features/aiAssistant/useGridAiAssistant.d.ts +6 -0
  240. package/hooks/features/aiAssistant/useGridAiAssistant.js +303 -0
  241. package/hooks/features/dataSource/useGridDataSourcePremium.js +3 -0
  242. package/hooks/features/index.d.ts +1 -1
  243. package/hooks/features/index.js +4 -4
  244. package/hooks/features/pivoting/gridPivotingInterfaces.d.ts +69 -0
  245. package/hooks/features/pivoting/gridPivotingInterfaces.js +5 -0
  246. package/hooks/features/pivoting/gridPivotingSelectors.d.ts +4 -0
  247. package/hooks/features/pivoting/gridPivotingSelectors.js +30 -0
  248. package/hooks/features/pivoting/useGridPivoting.d.ts +7 -0
  249. package/hooks/features/pivoting/useGridPivoting.js +349 -0
  250. package/hooks/features/pivoting/utils.d.ts +21 -0
  251. package/hooks/features/pivoting/utils.js +270 -0
  252. package/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +1 -4
  253. package/hooks/features/rowGrouping/useGridRowGrouping.js +0 -1
  254. package/hooks/utils/useResize.d.ts +9 -0
  255. package/hooks/utils/useResize.js +60 -0
  256. package/index.d.ts +4 -1
  257. package/index.js +19 -3
  258. package/material/icons.d.ts +15 -15
  259. package/material/icons.js +36 -9
  260. package/material/index.d.ts +31 -5
  261. package/material/index.js +30 -2
  262. package/models/dataGridPremiumProps.d.ts +96 -2
  263. package/models/gridApiPremium.d.ts +4 -2
  264. package/models/gridPremiumIconSlotsComponent.d.ts +141 -8
  265. package/models/gridPremiumSlotsComponent.d.ts +13 -1
  266. package/models/gridStatePremium.d.ts +6 -0
  267. package/package.json +9 -15
  268. package/setupExcelExportWebWorker/index.d.ts +1 -0
  269. package/{setupExcelExportWebWorker.js → setupExcelExportWebWorker/index.js} +1 -1
  270. package/typeOverloads/modules.d.ts +32 -1
  271. package/utils/speechRecognition.d.ts +2 -0
  272. package/utils/speechRecognition.js +8 -0
  273. package/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
  274. package/components/promptControl/GridToolbarPromptControl.js +0 -222
  275. package/components/promptControl/RecordButton.d.ts +0 -16
  276. package/components/promptControl/RecordButton.js +0 -119
  277. package/components/promptControl/index.d.ts +0 -1
  278. package/components/promptControl/index.js +0 -12
  279. package/esm/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
  280. package/esm/components/promptControl/GridToolbarPromptControl.js +0 -215
  281. package/esm/components/promptControl/RecordButton.d.ts +0 -16
  282. package/esm/components/promptControl/RecordButton.js +0 -111
  283. package/esm/components/promptControl/index.d.ts +0 -1
  284. package/esm/components/promptControl/index.js +0 -1
  285. package/esm/hooks/features/promptControl/api.d.ts +0 -2
  286. package/esm/hooks/features/promptControl/api.js +0 -22
  287. package/esm/hooks/features/promptControl/index.d.ts +0 -2
  288. package/esm/hooks/features/promptControl/types.d.ts +0 -25
  289. package/esm/setupExcelExportWebWorker.d.ts +0 -1
  290. package/esm/setupExcelExportWebWorker.js +0 -1
  291. package/esm/utils/releaseInfo.d.ts +0 -1
  292. package/esm/utils/releaseInfo.js +0 -13
  293. package/hooks/features/promptControl/api.d.ts +0 -2
  294. package/hooks/features/promptControl/api.js +0 -28
  295. package/hooks/features/promptControl/index.d.ts +0 -2
  296. package/hooks/features/promptControl/types.d.ts +0 -25
  297. package/modern/DataGridPremium/DataGrid.d.ts +0 -8
  298. package/modern/DataGridPremium/DataGrid.js +0 -19
  299. package/modern/DataGridPremium/DataGridPremium.d.ts +0 -16
  300. package/modern/DataGridPremium/DataGridPremium.js +0 -1127
  301. package/modern/DataGridPremium/index.d.ts +0 -3
  302. package/modern/DataGridPremium/index.js +0 -3
  303. package/modern/DataGridPremium/useDataGridPremiumComponent.d.ts +0 -4
  304. package/modern/DataGridPremium/useDataGridPremiumComponent.js +0 -108
  305. package/modern/DataGridPremium/useDataGridPremiumProps.d.ts +0 -6
  306. package/modern/DataGridPremium/useDataGridPremiumProps.js +0 -54
  307. package/modern/components/GridAggregationHeader.d.ts +0 -7
  308. package/modern/components/GridAggregationHeader.js +0 -89
  309. package/modern/components/GridAggregationRowOverlay.d.ts +0 -3
  310. package/modern/components/GridAggregationRowOverlay.js +0 -37
  311. package/modern/components/GridBottomContainer.d.ts +0 -3
  312. package/modern/components/GridBottomContainer.js +0 -43
  313. package/modern/components/GridColumnMenuAggregationItem.d.ts +0 -7
  314. package/modern/components/GridColumnMenuAggregationItem.js +0 -124
  315. package/modern/components/GridColumnMenuRowGroupItem.d.ts +0 -3
  316. package/modern/components/GridColumnMenuRowGroupItem.js +0 -42
  317. package/modern/components/GridColumnMenuRowUngroupItem.d.ts +0 -3
  318. package/modern/components/GridColumnMenuRowUngroupItem.js +0 -44
  319. package/modern/components/GridDataSourceGroupingCriteriaCell.d.ts +0 -7
  320. package/modern/components/GridDataSourceGroupingCriteriaCell.js +0 -121
  321. package/modern/components/GridExcelExportMenuItem.d.ts +0 -9
  322. package/modern/components/GridExcelExportMenuItem.js +0 -48
  323. package/modern/components/GridFooterCell.d.ts +0 -9
  324. package/modern/components/GridFooterCell.js +0 -43
  325. package/modern/components/GridGroupingColumnFooterCell.d.ts +0 -4
  326. package/modern/components/GridGroupingColumnFooterCell.js +0 -23
  327. package/modern/components/GridGroupingColumnLeafCell.d.ts +0 -4
  328. package/modern/components/GridGroupingColumnLeafCell.js +0 -17
  329. package/modern/components/GridGroupingCriteriaCell.d.ts +0 -7
  330. package/modern/components/GridGroupingCriteriaCell.js +0 -87
  331. package/modern/components/GridPremiumColumnMenu.d.ts +0 -33
  332. package/modern/components/GridPremiumColumnMenu.js +0 -37
  333. package/modern/components/GridPremiumToolbar.d.ts +0 -3
  334. package/modern/components/GridPremiumToolbar.js +0 -23
  335. package/modern/components/export/ExportExcel.d.ts +0 -29
  336. package/modern/components/export/index.d.ts +0 -1
  337. package/modern/components/export/index.js +0 -1
  338. package/modern/components/index.d.ts +0 -6
  339. package/modern/components/index.js +0 -6
  340. package/modern/components/promptControl/GridToolbarPromptControl.d.ts +0 -26
  341. package/modern/components/promptControl/GridToolbarPromptControl.js +0 -215
  342. package/modern/components/promptControl/RecordButton.d.ts +0 -16
  343. package/modern/components/promptControl/RecordButton.js +0 -111
  344. package/modern/components/promptControl/index.d.ts +0 -1
  345. package/modern/components/promptControl/index.js +0 -1
  346. package/modern/components/reexports.d.ts +0 -1
  347. package/modern/components/reexports.js +0 -1
  348. package/modern/constants/dataGridPremiumDefaultSlotsComponents.d.ts +0 -2
  349. package/modern/constants/dataGridPremiumDefaultSlotsComponents.js +0 -11
  350. package/modern/hooks/features/aggregation/createAggregationLookup.d.ts +0 -17
  351. package/modern/hooks/features/aggregation/createAggregationLookup.js +0 -111
  352. package/modern/hooks/features/aggregation/gridAggregationFunctions.d.ts +0 -8
  353. package/modern/hooks/features/aggregation/gridAggregationFunctions.js +0 -93
  354. package/modern/hooks/features/aggregation/gridAggregationInterfaces.d.ts +0 -129
  355. package/modern/hooks/features/aggregation/gridAggregationSelectors.d.ts +0 -13
  356. package/modern/hooks/features/aggregation/gridAggregationSelectors.js +0 -15
  357. package/modern/hooks/features/aggregation/gridAggregationUtils.d.ts +0 -62
  358. package/modern/hooks/features/aggregation/gridAggregationUtils.js +0 -180
  359. package/modern/hooks/features/aggregation/index.d.ts +0 -4
  360. package/modern/hooks/features/aggregation/index.js +0 -3
  361. package/modern/hooks/features/aggregation/useGridAggregation.d.ts +0 -6
  362. package/modern/hooks/features/aggregation/useGridAggregation.js +0 -103
  363. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.d.ts +0 -4
  364. package/modern/hooks/features/aggregation/useGridAggregationPreProcessors.js +0 -96
  365. package/modern/hooks/features/aggregation/wrapColumnWithAggregation.d.ts +0 -81
  366. package/modern/hooks/features/aggregation/wrapColumnWithAggregation.js +0 -215
  367. package/modern/hooks/features/cellSelection/gridCellSelectionInterfaces.d.ts +0 -40
  368. package/modern/hooks/features/cellSelection/gridCellSelectionInterfaces.js +0 -1
  369. package/modern/hooks/features/cellSelection/gridCellSelectionSelector.d.ts +0 -2
  370. package/modern/hooks/features/cellSelection/gridCellSelectionSelector.js +0 -2
  371. package/modern/hooks/features/cellSelection/index.d.ts +0 -1
  372. package/modern/hooks/features/cellSelection/index.js +0 -1
  373. package/modern/hooks/features/cellSelection/useGridCellSelection.d.ts +0 -6
  374. package/modern/hooks/features/cellSelection/useGridCellSelection.js +0 -486
  375. package/modern/hooks/features/clipboard/useGridClipboardImport.d.ts +0 -4
  376. package/modern/hooks/features/clipboard/useGridClipboardImport.js +0 -335
  377. package/modern/hooks/features/dataSource/models.d.ts +0 -54
  378. package/modern/hooks/features/dataSource/models.js +0 -1
  379. package/modern/hooks/features/dataSource/useGridDataSourcePremium.d.ts +0 -4
  380. package/modern/hooks/features/dataSource/useGridDataSourcePremium.js +0 -59
  381. package/modern/hooks/features/export/gridExcelExportInterface.d.ts +0 -71
  382. package/modern/hooks/features/export/gridExcelExportInterface.js +0 -1
  383. package/modern/hooks/features/export/index.d.ts +0 -2
  384. package/modern/hooks/features/export/index.js +0 -2
  385. package/modern/hooks/features/export/serializer/excelSerializer.d.ts +0 -40
  386. package/modern/hooks/features/export/serializer/excelSerializer.js +0 -269
  387. package/modern/hooks/features/export/serializer/setupExcelExportWebWorker.d.ts +0 -2
  388. package/modern/hooks/features/export/serializer/setupExcelExportWebWorker.js +0 -53
  389. package/modern/hooks/features/export/serializer/utils.d.ts +0 -36
  390. package/modern/hooks/features/export/serializer/utils.js +0 -93
  391. package/modern/hooks/features/export/useGridExcelExport.d.ts +0 -11
  392. package/modern/hooks/features/export/useGridExcelExport.js +0 -139
  393. package/modern/hooks/features/index.d.ts +0 -5
  394. package/modern/hooks/features/index.js +0 -6
  395. package/modern/hooks/features/promptControl/api.d.ts +0 -2
  396. package/modern/hooks/features/promptControl/api.js +0 -22
  397. package/modern/hooks/features/promptControl/index.d.ts +0 -2
  398. package/modern/hooks/features/promptControl/index.js +0 -1
  399. package/modern/hooks/features/promptControl/types.d.ts +0 -25
  400. package/modern/hooks/features/promptControl/types.js +0 -1
  401. package/modern/hooks/features/rowGrouping/createGroupingColDef.d.ts +0 -57
  402. package/modern/hooks/features/rowGrouping/createGroupingColDef.js +0 -272
  403. package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.d.ts +0 -44
  404. package/modern/hooks/features/rowGrouping/gridRowGroupingInterfaces.js +0 -1
  405. package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.d.ts +0 -3
  406. package/modern/hooks/features/rowGrouping/gridRowGroupingSelector.js +0 -5
  407. package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.d.ts +0 -54
  408. package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +0 -173
  409. package/modern/hooks/features/rowGrouping/index.d.ts +0 -3
  410. package/modern/hooks/features/rowGrouping/index.js +0 -3
  411. package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.d.ts +0 -4
  412. package/modern/hooks/features/rowGrouping/useGridDataSourceRowGroupingPreProcessors.js +0 -73
  413. package/modern/hooks/features/rowGrouping/useGridRowGrouping.d.ts +0 -11
  414. package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +0 -182
  415. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.d.ts +0 -4
  416. package/modern/hooks/features/rowGrouping/useGridRowGroupingPreProcessors.js +0 -157
  417. package/modern/hooks/features/rows/index.d.ts +0 -1
  418. package/modern/hooks/features/rows/index.js +0 -1
  419. package/modern/hooks/features/rows/useGridRowAriaAttributes.d.ts +0 -1
  420. package/modern/hooks/features/rows/useGridRowAriaAttributes.js +0 -8
  421. package/modern/hooks/index.d.ts +0 -2
  422. package/modern/hooks/index.js +0 -3
  423. package/modern/hooks/utils/index.d.ts +0 -1
  424. package/modern/hooks/utils/index.js +0 -1
  425. package/modern/hooks/utils/useGridApiContext.d.ts +0 -4
  426. package/modern/hooks/utils/useGridApiContext.js +0 -2
  427. package/modern/hooks/utils/useGridApiRef.d.ts +0 -4
  428. package/modern/hooks/utils/useGridApiRef.js +0 -2
  429. package/modern/hooks/utils/useGridAriaAttributes.d.ts +0 -2
  430. package/modern/hooks/utils/useGridAriaAttributes.js +0 -13
  431. package/modern/hooks/utils/useGridPrivateApiContext.d.ts +0 -2
  432. package/modern/hooks/utils/useGridPrivateApiContext.js +0 -2
  433. package/modern/hooks/utils/useGridRootProps.d.ts +0 -2
  434. package/modern/hooks/utils/useGridRootProps.js +0 -2
  435. package/modern/hooks/utils/useKeepGroupedColumnsHidden.d.ts +0 -12
  436. package/modern/hooks/utils/useKeepGroupedColumnsHidden.js +0 -43
  437. package/modern/index.d.ts +0 -23
  438. package/modern/index.js +0 -26
  439. package/modern/locales.d.ts +0 -1
  440. package/modern/locales.js +0 -1
  441. package/modern/material/icons.d.ts +0 -15
  442. package/modern/material/icons.js +0 -20
  443. package/modern/material/index.d.ts +0 -8
  444. package/modern/material/index.js +0 -11
  445. package/modern/models/dataGridPremiumProps.d.ts +0 -162
  446. package/modern/models/dataGridPremiumProps.js +0 -1
  447. package/modern/models/gridApiPremium.d.ts +0 -14
  448. package/modern/models/gridApiPremium.js +0 -1
  449. package/modern/models/gridGroupingValueGetter.d.ts +0 -4
  450. package/modern/models/gridGroupingValueGetter.js +0 -1
  451. package/modern/models/gridPastedValueParser.d.ts +0 -4
  452. package/modern/models/gridPastedValueParser.js +0 -1
  453. package/modern/models/gridPremiumIconSlotsComponent.d.ts +0 -28
  454. package/modern/models/gridPremiumIconSlotsComponent.js +0 -1
  455. package/modern/models/gridPremiumSlotsComponent.d.ts +0 -7
  456. package/modern/models/gridPremiumSlotsComponent.js +0 -1
  457. package/modern/models/gridStatePremium.d.ts +0 -18
  458. package/modern/models/gridStatePremium.js +0 -1
  459. package/modern/models/index.d.ts +0 -4
  460. package/modern/models/index.js +0 -4
  461. package/modern/package.json +0 -1
  462. package/modern/setupExcelExportWebWorker.d.ts +0 -1
  463. package/modern/setupExcelExportWebWorker.js +0 -1
  464. package/modern/themeAugmentation/index.d.ts +0 -2
  465. package/modern/themeAugmentation/index.js +0 -4
  466. package/modern/themeAugmentation/overrides.d.ts +0 -7
  467. package/modern/themeAugmentation/overrides.js +0 -1
  468. package/modern/themeAugmentation/props.d.ts +0 -15
  469. package/modern/themeAugmentation/props.js +0 -1
  470. package/modern/typeOverloads/index.d.ts +0 -2
  471. package/modern/typeOverloads/index.js +0 -2
  472. package/modern/typeOverloads/modules.d.ts +0 -97
  473. package/modern/typeOverloads/modules.js +0 -1
  474. package/modern/typeOverloads/reexports.d.ts +0 -17
  475. package/modern/typeOverloads/reexports.js +0 -15
  476. package/modern/utils/releaseInfo.d.ts +0 -1
  477. package/modern/utils/releaseInfo.js +0 -13
  478. package/setupExcelExportWebWorker.d.ts +0 -1
  479. package/tsconfig.build.tsbuildinfo +0 -1
  480. package/utils/releaseInfo.d.ts +0 -1
  481. package/utils/releaseInfo.js +0 -20
  482. /package/esm/hooks/features/{promptControl/types.js → aiAssistant/gridAiAssistantInterfaces.js} +0 -0
  483. /package/esm/hooks/features/{promptControl → aiAssistant}/index.js +0 -0
  484. /package/{modern/hooks/features/aggregation/gridAggregationInterfaces.js → esm/hooks/features/pivoting/gridPivotingInterfaces.js} +0 -0
  485. /package/hooks/features/{promptControl/types.js → aiAssistant/gridAiAssistantInterfaces.js} +0 -0
  486. /package/hooks/features/{promptControl → aiAssistant}/index.js +0 -0
@@ -0,0 +1,108 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["className", "children"];
4
+ import * as React from 'react';
5
+ import { styled } from '@mui/system';
6
+ import { vars } from '@mui/x-data-grid-pro/internals';
7
+ import { unstable_composeClasses as composeClasses } from '@mui/utils';
8
+ import { getDataGridUtilityClass, gridClasses } from '@mui/x-data-grid-pro';
9
+ import clsx from 'clsx';
10
+ import { useResize } from "../../hooks/utils/useResize.js";
11
+ import { useResizablePanelContext } from "./ResizablePanelContext.js";
12
+ import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ const useUtilityClasses = ownerState => {
15
+ const {
16
+ classes,
17
+ direction
18
+ } = ownerState;
19
+ const slots = {
20
+ root: ['resizablePanelHandle', `resizablePanelHandle--${direction}`]
21
+ };
22
+ return composeClasses(slots, getDataGridUtilityClass, classes);
23
+ };
24
+ const ResizablePanelHandleRoot = styled('div', {
25
+ name: 'MuiDataGrid',
26
+ slot: 'ResizablePanelHandle',
27
+ overridesResolver: (props, styles) => [{
28
+ [`&.${gridClasses['resizablePanelHandle--horizontal']}`]: styles['resizablePanelHandle--horizontal']
29
+ }, {
30
+ [`&.${gridClasses['resizablePanelHandle--vertical']}`]: styles['resizablePanelHandle--vertical']
31
+ }, styles.resizablePanelHandle]
32
+ })({
33
+ position: 'absolute',
34
+ zIndex: 3,
35
+ top: 0,
36
+ left: 0,
37
+ userSelect: 'none',
38
+ transition: vars.transition(['border-color'], {
39
+ duration: vars.transitions.duration.short,
40
+ easing: vars.transitions.easing.easeInOut
41
+ }),
42
+ '&:hover': {
43
+ borderWidth: 2,
44
+ borderColor: vars.colors.interactive.selected
45
+ },
46
+ variants: [{
47
+ props: {
48
+ direction: 'horizontal'
49
+ },
50
+ style: {
51
+ height: '100%',
52
+ width: 8,
53
+ cursor: 'ew-resize',
54
+ borderLeft: `1px solid ${vars.colors.border.base}`,
55
+ touchAction: 'pan-x'
56
+ }
57
+ }, {
58
+ props: {
59
+ direction: 'vertical'
60
+ },
61
+ style: {
62
+ width: '100%',
63
+ height: 8,
64
+ cursor: 'ns-resize',
65
+ borderTop: `1px solid ${vars.colors.border.base}`,
66
+ touchAction: 'pan-y'
67
+ }
68
+ }]
69
+ });
70
+ function ResizablePanelHandle(props) {
71
+ const {
72
+ className
73
+ } = props,
74
+ other = _objectWithoutPropertiesLoose(props, _excluded);
75
+ const {
76
+ rootRef,
77
+ direction
78
+ } = useResizablePanelContext();
79
+ const rootProps = useGridRootProps();
80
+ const ownerState = {
81
+ classes: rootProps.classes,
82
+ direction
83
+ };
84
+ const classes = useUtilityClasses(ownerState);
85
+ const {
86
+ ref
87
+ } = useResize({
88
+ direction,
89
+ getInitialSize: () => {
90
+ return direction === 'horizontal' ? rootRef.current.offsetWidth : rootRef.current.offsetHeight;
91
+ },
92
+ onSizeChange: newSize => {
93
+ if (direction === 'horizontal') {
94
+ rootRef.current.style.width = `${newSize}px`;
95
+ } else {
96
+ rootRef.current.style.height = `${newSize}px`;
97
+ }
98
+ }
99
+ });
100
+ return /*#__PURE__*/_jsx(ResizablePanelHandleRoot, _extends({
101
+ className: clsx(classes.root, className),
102
+ ownerState: ownerState,
103
+ direction: direction
104
+ }, other, {
105
+ ref: ref
106
+ }));
107
+ }
108
+ export { ResizablePanelHandle };
@@ -0,0 +1,3 @@
1
+ export * from "./ResizablePanel.js";
2
+ export * from "./ResizablePanelContext.js";
3
+ export * from "./ResizablePanelHandle.js";
@@ -0,0 +1,3 @@
1
+ export * from "./ResizablePanel.js";
2
+ export * from "./ResizablePanelContext.js";
3
+ export * from "./ResizablePanelHandle.js";
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export type SidebarProps = React.HTMLAttributes<HTMLDivElement>;
3
+ declare function Sidebar(props: SidebarProps): React.JSX.Element;
4
+ export { Sidebar };
@@ -0,0 +1,47 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["className", "children"];
4
+ import * as React from 'react';
5
+ import clsx from 'clsx';
6
+ import { styled } from '@mui/system';
7
+ import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
8
+ import { unstable_composeClasses as composeClasses } from '@mui/utils';
9
+ import { ResizablePanel, ResizablePanelHandle } from "../resizablePanel/index.js";
10
+ import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
11
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
+ const useUtilityClasses = ownerState => {
13
+ const {
14
+ classes
15
+ } = ownerState;
16
+ const slots = {
17
+ root: ['sidebar']
18
+ };
19
+ return composeClasses(slots, getDataGridUtilityClass, classes);
20
+ };
21
+ const SidebarRoot = styled(ResizablePanel, {
22
+ name: 'MuiDataGrid',
23
+ slot: 'Sidebar'
24
+ })({
25
+ display: 'flex',
26
+ flexDirection: 'column',
27
+ width: 300,
28
+ minWidth: 260,
29
+ maxWidth: 400,
30
+ overflow: 'hidden'
31
+ });
32
+ function Sidebar(props) {
33
+ const {
34
+ className,
35
+ children
36
+ } = props,
37
+ other = _objectWithoutPropertiesLoose(props, _excluded);
38
+ const rootProps = useGridRootProps();
39
+ const classes = useUtilityClasses(rootProps);
40
+ return /*#__PURE__*/_jsxs(SidebarRoot, _extends({
41
+ className: clsx(className, classes.root),
42
+ ownerState: rootProps
43
+ }, other, {
44
+ children: [/*#__PURE__*/_jsx(ResizablePanelHandle, {}), children]
45
+ }));
46
+ }
47
+ export { Sidebar };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export type SidebarHeaderProps = React.HTMLAttributes<HTMLDivElement>;
3
+ declare function SidebarHeader(props: SidebarHeaderProps): React.JSX.Element;
4
+ export { SidebarHeader };
@@ -0,0 +1,44 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["className", "children"];
4
+ import * as React from 'react';
5
+ import { styled } from '@mui/system';
6
+ import { getDataGridUtilityClass } from '@mui/x-data-grid-pro';
7
+ import { vars } from '@mui/x-data-grid-pro/internals';
8
+ import { unstable_composeClasses as composeClasses } from '@mui/utils';
9
+ import clsx from 'clsx';
10
+ import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
11
+ import { jsx as _jsx } from "react/jsx-runtime";
12
+ const useUtilityClasses = ownerState => {
13
+ const {
14
+ classes
15
+ } = ownerState;
16
+ const slots = {
17
+ root: ['sidebarHeader']
18
+ };
19
+ return composeClasses(slots, getDataGridUtilityClass, classes);
20
+ };
21
+ const SidebarHeaderRoot = styled('div', {
22
+ name: 'MuiDataGrid',
23
+ slot: 'SidebarHeader'
24
+ })({
25
+ position: 'sticky',
26
+ top: 0,
27
+ borderBottom: `1px solid ${vars.colors.border.base}`
28
+ });
29
+ function SidebarHeader(props) {
30
+ const {
31
+ className,
32
+ children
33
+ } = props,
34
+ other = _objectWithoutPropertiesLoose(props, _excluded);
35
+ const rootProps = useGridRootProps();
36
+ const classes = useUtilityClasses(rootProps);
37
+ return /*#__PURE__*/_jsx(SidebarHeaderRoot, _extends({
38
+ className: clsx(className, classes.root),
39
+ ownerState: rootProps
40
+ }, other, {
41
+ children: children
42
+ }));
43
+ }
44
+ export { SidebarHeader };
@@ -0,0 +1,2 @@
1
+ export * from "./Sidebar.js";
2
+ export * from "./SidebarHeader.js";
@@ -0,0 +1,2 @@
1
+ export * from "./Sidebar.js";
2
+ export * from "./SidebarHeader.js";
@@ -3,9 +3,12 @@ import { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from '@mui/x-data-grid-pro/int
3
3
  import { GridPremiumColumnMenu } from "../components/GridPremiumColumnMenu.js";
4
4
  import materialSlots from "../material/index.js";
5
5
  import { GridBottomContainer } from "../components/GridBottomContainer.js";
6
+ import { GridEmptyPivotOverlay } from "../components/GridEmptyPivotOverlay.js";
6
7
  import { GridPremiumToolbar } from "../components/GridPremiumToolbar.js";
7
8
  export const DATA_GRID_PREMIUM_DEFAULT_SLOTS_COMPONENTS = _extends({}, DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS, materialSlots, {
9
+ aiAssistantPanel: null,
8
10
  columnMenu: GridPremiumColumnMenu,
9
11
  bottomContainer: GridBottomContainer,
12
+ emptyPivotOverlay: GridEmptyPivotOverlay,
10
13
  toolbar: GridPremiumToolbar
11
14
  });
@@ -30,6 +30,9 @@ const avgAgg = {
30
30
  sum += value;
31
31
  }
32
32
  }
33
+ if (sum === 0) {
34
+ return null;
35
+ }
33
36
  return sum / valuesCount;
34
37
  },
35
38
  columnTypes: ['number']
@@ -41,13 +44,18 @@ const minAgg = {
41
44
  if (values.length === 0) {
42
45
  return null;
43
46
  }
47
+ let hasValidValue = false;
44
48
  let min = +Infinity;
45
49
  for (let i = 0; i < values.length; i += 1) {
46
50
  const value = values[i];
47
51
  if (value != null && value < min) {
48
52
  min = value;
53
+ hasValidValue = true;
49
54
  }
50
55
  }
56
+ if (!hasValidValue) {
57
+ return null;
58
+ }
51
59
  return min;
52
60
  },
53
61
  columnTypes: ['number', 'date', 'dateTime']
@@ -59,13 +67,18 @@ const maxAgg = {
59
67
  if (values.length === 0) {
60
68
  return null;
61
69
  }
70
+ let hasValidValue = false;
62
71
  let max = -Infinity;
63
72
  for (let i = 0; i < values.length; i += 1) {
64
73
  const value = values[i];
65
74
  if (value != null && value > max) {
66
75
  max = value;
76
+ hasValidValue = true;
67
77
  }
68
78
  }
79
+ if (!hasValidValue) {
80
+ return null;
81
+ }
69
82
  return max;
70
83
  },
71
84
  columnTypes: ['number', 'date', 'dateTime']
@@ -1,4 +1,6 @@
1
+ import { GridRowId } from '@mui/x-data-grid';
1
2
  import { GridStatePremium } from "../../../models/gridStatePremium.js";
3
+ import { GridAggregationPosition } from "./gridAggregationInterfaces.js";
2
4
  export declare const gridAggregationStateSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, unknown, import("./gridAggregationInterfaces").GridAggregationState>;
3
5
  /**
4
6
  * Get the aggregation model, containing the aggregation function of each column.
@@ -10,4 +12,11 @@ export declare const gridAggregationModelSelector: import("@mui/x-data-grid").Ou
10
12
  * Get the aggregation results as a lookup.
11
13
  * @category Aggregation
12
14
  */
13
- export declare const gridAggregationLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridAggregationInterfaces").GridAggregationState, import("./gridAggregationInterfaces").GridAggregationLookup>;
15
+ export declare const gridAggregationLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, import("./gridAggregationInterfaces").GridAggregationState, import("./gridAggregationInterfaces").GridAggregationLookup>;
16
+ export declare const gridCellAggregationResultSelector: import("@mui/x-data-grid").OutputSelector<GridStatePremium, {
17
+ id: GridRowId;
18
+ field: string;
19
+ }, {
20
+ position: GridAggregationPosition;
21
+ value: any;
22
+ } | null>;
@@ -1,4 +1,5 @@
1
1
  import { createSelector, createRootSelector } from '@mui/x-data-grid-pro/internals';
2
+ import { gridRowTreeSelector } from '@mui/x-data-grid';
2
3
  export const gridAggregationStateSelector = createRootSelector(state => state.aggregation);
3
4
 
4
5
  /**
@@ -12,4 +13,30 @@ export const gridAggregationModelSelector = createSelector(gridAggregationStateS
12
13
  * Get the aggregation results as a lookup.
13
14
  * @category Aggregation
14
15
  */
15
- export const gridAggregationLookupSelector = createSelector(gridAggregationStateSelector, aggregationState => aggregationState.lookup);
16
+ export const gridAggregationLookupSelector = createSelector(gridAggregationStateSelector, aggregationState => aggregationState.lookup);
17
+ export const gridCellAggregationResultSelector = createSelector(gridRowTreeSelector, gridAggregationLookupSelector, (rowTree, aggregationLookup, {
18
+ id,
19
+ field
20
+ }) => {
21
+ let cellAggregationPosition = null;
22
+ const rowNode = rowTree[id];
23
+ if (!rowNode) {
24
+ return null;
25
+ }
26
+ if (rowNode.type === 'group') {
27
+ cellAggregationPosition = 'inline';
28
+ } else if (id.toString().startsWith('auto-generated-group-footer-')) {
29
+ cellAggregationPosition = 'footer';
30
+ }
31
+ if (cellAggregationPosition == null) {
32
+ return null;
33
+ }
34
+
35
+ // TODO: Add custom root id
36
+ const groupId = cellAggregationPosition === 'inline' ? id : rowNode.parent ?? '';
37
+ const aggregationResult = aggregationLookup?.[groupId]?.[field];
38
+ if (!aggregationResult || aggregationResult.position !== cellAggregationPosition) {
39
+ return null;
40
+ }
41
+ return aggregationResult;
42
+ });
@@ -3,7 +3,7 @@ import { GridColDef, GridRowId } from '@mui/x-data-grid-pro';
3
3
  import { GridColumnRawLookup, GridHydrateRowsValue } from '@mui/x-data-grid-pro/internals';
4
4
  import { GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationModel, GridAggregationRule, GridAggregationRules } from "./gridAggregationInterfaces.js";
5
5
  import { GridStatePremium } from "../../../models/gridStatePremium.js";
6
- import { DataGridPremiumProcessedProps } from "../../../models/dataGridPremiumProps.js";
6
+ import type { DataGridPremiumProcessedProps } from '../../../models/dataGridPremiumProps';
7
7
  import { GridApiPremium, GridPrivateApiPremium } from "../../../models/gridApiPremium.js";
8
8
  export declare const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = "auto-generated-group-footer-root";
9
9
  export declare const getAggregationFooterRowIdFromGroupId: (groupId: GridRowId | null) => string;
@@ -1,4 +1,4 @@
1
1
  export type { GridAggregationState, GridAggregationInitialState, GridAggregationInternalCache, GridAggregationApi, GridAggregationGetCellValueParams, GridAggregationFunction, GridAggregationFunctionDataSource, GridAggregationParams, GridAggregationModel, GridAggregationLookup, GridAggregationPosition, GridAggregationCellMeta, GridAggregationHeaderMeta, GridAggregationRule, GridAggregationRules } from './gridAggregationInterfaces';
2
- export * from "./gridAggregationSelectors.js";
2
+ export { gridAggregationStateSelector, gridAggregationLookupSelector, gridAggregationModelSelector } from "./gridAggregationSelectors.js";
3
3
  export * from "./gridAggregationFunctions.js";
4
4
  export { GRID_AGGREGATION_ROOT_FOOTER_ROW_ID, getAggregationFooterRowIdFromGroupId } from "./gridAggregationUtils.js";
@@ -1,3 +1,3 @@
1
- export * from "./gridAggregationSelectors.js";
1
+ export { gridAggregationStateSelector, gridAggregationLookupSelector, gridAggregationModelSelector } from "./gridAggregationSelectors.js";
2
2
  export * from "./gridAggregationFunctions.js";
3
3
  export { GRID_AGGREGATION_ROOT_FOOTER_ROW_ID, getAggregationFooterRowIdFromGroupId } from "./gridAggregationUtils.js";
@@ -74,13 +74,9 @@ export const useGridAggregation = (apiRef, props) => {
74
74
  const aggregationRules = props.disableAggregation ? {} : getAggregationRules(gridColumnLookupSelector(apiRef), gridAggregationModelSelector(apiRef), props.aggregationFunctions, !!props.dataSource);
75
75
 
76
76
  // Re-apply the row hydration to add / remove the aggregation footers
77
- if (!areAggregationRulesEqual(rulesOnLastRowHydration, aggregationRules)) {
78
- if (props.dataSource) {
79
- apiRef.current.dataSource.fetchRows();
80
- } else {
81
- apiRef.current.requestPipeProcessorsApplication('hydrateRows');
82
- applyAggregation();
83
- }
77
+ if (!props.dataSource && !areAggregationRulesEqual(rulesOnLastRowHydration, aggregationRules)) {
78
+ apiRef.current.requestPipeProcessorsApplication('hydrateRows');
79
+ applyAggregation();
84
80
  }
85
81
 
86
82
  // Re-apply the column hydration to wrap / unwrap the aggregated columns
@@ -16,16 +16,10 @@ export const useGridAggregationPreProcessors = (apiRef, props) => {
16
16
  const haveAggregationColumnValue = !!rulesOnLastColumnHydration.current[field];
17
17
  let column = columnsState.lookup[field];
18
18
  if (haveAggregationColumnValue) {
19
- column = unwrapColumnFromAggregation({
20
- column
21
- });
19
+ column = unwrapColumnFromAggregation(column);
22
20
  }
23
21
  if (shouldHaveAggregationValue) {
24
- column = wrapColumnWithAggregationValue({
25
- column,
26
- aggregationRule: aggregationRules[field],
27
- apiRef
28
- });
22
+ column = wrapColumnWithAggregationValue(column, aggregationRules[field], apiRef);
29
23
  }
30
24
  columnsState.lookup[field] = column;
31
25
  });
@@ -4,34 +4,14 @@ import { GridColDef, GridFilterOperator } from '@mui/x-data-grid-pro';
4
4
  import { type GridBaseColDef } from '@mui/x-data-grid-pro/internals';
5
5
  import { GridApiPremium } from "../../../models/gridApiPremium.js";
6
6
  import type { GridAggregationRule } from './gridAggregationInterfaces';
7
- type WrappableColumnProperty = 'valueGetter' | 'valueFormatter' | 'renderCell' | 'renderHeader' | 'filterOperators';
8
- interface GridColDefWithAggregationWrappers extends GridBaseColDef {
9
- aggregationWrappedProperties: {
10
- name: WrappableColumnProperty;
11
- originalValue: GridBaseColDef[WrappableColumnProperty];
12
- wrappedValue: GridBaseColDef[WrappableColumnProperty];
13
- }[];
14
- }
15
7
  /**
16
8
  * Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
17
9
  */
18
- export declare const wrapColumnWithAggregationValue: ({
19
- column,
20
- apiRef,
21
- aggregationRule
22
- }: {
23
- column: GridBaseColDef;
24
- apiRef: RefObject<GridApiPremium>;
25
- aggregationRule: GridAggregationRule;
26
- }) => GridBaseColDef;
10
+ export declare const wrapColumnWithAggregationValue: (column: GridBaseColDef, aggregationRule: GridAggregationRule, apiRef: RefObject<GridApiPremium>) => GridBaseColDef;
27
11
  /**
28
12
  * Remove the aggregation wrappers around the wrappable properties of the column.
29
13
  */
30
- export declare const unwrapColumnFromAggregation: ({
31
- column
32
- }: {
33
- column: GridColDef | GridColDefWithAggregationWrappers;
34
- }) => GridBaseColDef<any, any, any> | {
14
+ export declare const unwrapColumnFromAggregation: (column: GridColDef) => GridBaseColDef<any, any, any> | {
35
15
  field: string;
36
16
  headerName?: string;
37
17
  description?: string;
@@ -71,11 +51,11 @@ export declare const unwrapColumnFromAggregation: ({
71
51
  disableReorder?: boolean;
72
52
  disableExport?: boolean;
73
53
  colSpan?: number | import("@mui/x-data-grid").GridColSpanFn<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
74
- unstable_examples?: any[] | undefined;
54
+ examples?: any[] | undefined;
75
55
  renderHeaderFilter?: (params: import("@mui/x-data-grid-pro").GridRenderHeaderFilterProps) => React.ReactNode;
76
56
  aggregable?: boolean;
77
57
  availableAggregationFunctions?: string[];
78
58
  groupingValueGetter?: import("../../..").GridGroupingValueGetter<import("@mui/x-data-grid").GridValidRowModel> | undefined;
79
59
  pastedValueParser?: import("../../..").GridPastedValueParser<import("@mui/x-data-grid").GridValidRowModel, any, any> | undefined;
80
- };
81
- export {};
60
+ pivotable?: boolean;
61
+ };
@@ -6,6 +6,7 @@ import { gridRowIdSelector, gridRowNodeSelector } from '@mui/x-data-grid-pro';
6
6
  import { gridAggregationLookupSelector } from "./gridAggregationSelectors.js";
7
7
  import { GridFooterCell } from "../../../components/GridFooterCell.js";
8
8
  import { GridAggregationHeader } from "../../../components/GridAggregationHeader.js";
9
+ import { gridPivotActiveSelector } from "../pivoting/gridPivotingSelectors.js";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  const getAggregationValueWrappedValueGetter = ({
11
12
  value: valueGetter,
@@ -52,8 +53,10 @@ const getAggregationValueWrappedValueFormatter = ({
52
53
  const getAggregationValueWrappedRenderCell = ({
53
54
  value: renderCell,
54
55
  aggregationRule,
55
- getCellAggregationResult
56
+ getCellAggregationResult,
57
+ apiRef
56
58
  }) => {
59
+ const pivotActive = gridPivotActiveSelector(apiRef);
57
60
  const wrappedRenderCell = params => {
58
61
  const cellAggregationResult = getCellAggregationResult(params.id, params.field);
59
62
  if (cellAggregationResult != null) {
@@ -61,8 +64,14 @@ const getAggregationValueWrappedRenderCell = ({
61
64
  if (cellAggregationResult.position === 'footer') {
62
65
  return /*#__PURE__*/_jsx(GridFooterCell, _extends({}, params));
63
66
  }
67
+ if (pivotActive && cellAggregationResult.value === 0) {
68
+ return null;
69
+ }
64
70
  return params.formattedValue;
65
71
  }
72
+ if (pivotActive && cellAggregationResult.value === 0) {
73
+ return null;
74
+ }
66
75
  const aggregationMeta = {
67
76
  hasCellUnit: aggregationRule.aggregationFunction.hasCellUnit ?? true,
68
77
  aggregationFunctionName: aggregationRule.aggregationFunctionName
@@ -114,6 +123,10 @@ const getWrappedRenderHeader = ({
114
123
  aggregationRule
115
124
  }) => {
116
125
  const wrappedRenderHeader = params => {
126
+ // TODO: investigate why colDef is undefined
127
+ if (!params.colDef) {
128
+ return null;
129
+ }
117
130
  return /*#__PURE__*/_jsx(GridAggregationHeader, _extends({}, params, {
118
131
  aggregation: {
119
132
  aggregationRule
@@ -127,14 +140,13 @@ const getWrappedRenderHeader = ({
127
140
  /**
128
141
  * Add a wrapper around each wrappable property of the column to customize the behavior of the aggregation cells.
129
142
  */
130
- export const wrapColumnWithAggregationValue = ({
131
- column,
132
- apiRef,
133
- aggregationRule
134
- }) => {
143
+ export const wrapColumnWithAggregationValue = (column, aggregationRule, apiRef) => {
135
144
  const getCellAggregationResult = (id, field) => {
136
145
  let cellAggregationPosition = null;
137
146
  const rowNode = gridRowNodeSelector(apiRef, id);
147
+ if (!rowNode) {
148
+ return null;
149
+ }
138
150
  if (rowNode.type === 'group') {
139
151
  cellAggregationPosition = 'inline';
140
152
  } else if (id.toString().startsWith('auto-generated-group-footer-')) {
@@ -185,14 +197,15 @@ export const wrapColumnWithAggregationValue = ({
185
197
  }
186
198
  return wrappedColumn;
187
199
  };
200
+ const isColumnWrappedWithAggregation = column => {
201
+ return typeof column.aggregationWrappedProperties !== 'undefined';
202
+ };
188
203
 
189
204
  /**
190
205
  * Remove the aggregation wrappers around the wrappable properties of the column.
191
206
  */
192
- export const unwrapColumnFromAggregation = ({
193
- column
194
- }) => {
195
- if (!column.aggregationWrappedProperties) {
207
+ export const unwrapColumnFromAggregation = column => {
208
+ if (!isColumnWrappedWithAggregation(column)) {
196
209
  return column;
197
210
  }
198
211
  const _ref = column,
@@ -0,0 +1,12 @@
1
+ import { PromptResponse } from "./gridAiAssistantInterfaces.js";
2
+ /**
3
+ * Prompt resolver for the <DataGridPremium /> component.
4
+ * @param {string} url The URL to send the request to.
5
+ * @param {string} query The query to be processed.
6
+ * @param {string} context The prompt context containing necessary information about the current columns definition.
7
+ * Either use the `context` parameter of the `onPrompt` callback or the return value of the `unstable_getPromptContext()` API method.
8
+ * @param {string} conversationId The id of the conversation the prompt is part of. If not passed, prompt response will return a new conversation id that can be used to continue the newly started conversation.
9
+ * @param {string} additionalContext Optional, additional context to make the processing results more accurate.
10
+ * @returns {Promise<PromptResponse>} The grid state updates to be applied.
11
+ */
12
+ export declare function gridDefaultPromptResolver(url: string, query: string, context: string, conversationId?: string, additionalContext?: string): Promise<PromptResponse>;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Prompt resolver for the <DataGridPremium /> component.
3
+ * @param {string} url The URL to send the request to.
4
+ * @param {string} query The query to be processed.
5
+ * @param {string} context The prompt context containing necessary information about the current columns definition.
6
+ * Either use the `context` parameter of the `onPrompt` callback or the return value of the `unstable_getPromptContext()` API method.
7
+ * @param {string} conversationId The id of the conversation the prompt is part of. If not passed, prompt response will return a new conversation id that can be used to continue the newly started conversation.
8
+ * @param {string} additionalContext Optional, additional context to make the processing results more accurate.
9
+ * @returns {Promise<PromptResponse>} The grid state updates to be applied.
10
+ */
11
+ export function gridDefaultPromptResolver(url, query, context, conversationId, additionalContext = '') {
12
+ return fetch(url, {
13
+ mode: 'cors',
14
+ method: 'POST',
15
+ headers: {
16
+ 'content-type': 'application/json'
17
+ },
18
+ credentials: 'include',
19
+ body: JSON.stringify({
20
+ context,
21
+ query,
22
+ additionalContext,
23
+ conversationId
24
+ })
25
+ }).then(result => result.json()).then(result => {
26
+ if (result.ok === false) {
27
+ return Promise.reject(new Error(result.message));
28
+ }
29
+ return result.data;
30
+ });
31
+ }