@mui/x-data-grid-pro 7.29.0 → 7.29.2

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 (308) hide show
  1. package/CHANGELOG.md +131 -0
  2. package/DataGridPro/DataGrid.js +2 -9
  3. package/DataGridPro/DataGridPro.js +231 -238
  4. package/DataGridPro/index.js +3 -39
  5. package/DataGridPro/package.json +2 -2
  6. package/DataGridPro/useDataGridProComponent.js +91 -99
  7. package/DataGridPro/useDataGridProProps.js +20 -28
  8. package/components/GridColumnHeaderCollapseIcon.js +0 -1
  9. package/components/GridColumnHeaders.js +39 -46
  10. package/components/GridColumnMenuPinningItem.js +39 -46
  11. package/components/GridDataSourceTreeDataGroupingCell.js +30 -38
  12. package/components/GridDetailPanel.js +14 -18
  13. package/components/GridDetailPanelToggleCell.js +35 -42
  14. package/components/GridDetailPanels.js +19 -25
  15. package/components/GridPinnedRows.js +12 -20
  16. package/components/GridProColumnMenu.js +11 -19
  17. package/components/GridRowReorderCell.js +36 -45
  18. package/components/GridTreeDataGroupingCell.js +37 -44
  19. package/components/headerFiltering/GridHeaderFilterCell.js +71 -78
  20. package/components/headerFiltering/GridHeaderFilterClearButton.js +9 -16
  21. package/components/headerFiltering/GridHeaderFilterMenu.js +36 -43
  22. package/components/headerFiltering/GridHeaderFilterMenuContainer.js +41 -48
  23. package/components/headerFiltering/index.js +3 -38
  24. package/components/index.js +7 -71
  25. package/components/package.json +2 -2
  26. package/components/reexports.js +1 -24
  27. package/constants/dataGridProDefaultSlotsComponents.js +16 -23
  28. package/hooks/features/columnHeaders/useGridColumnHeaders.js +30 -39
  29. package/hooks/features/columnPinning/gridColumnPinningInterface.js +1 -5
  30. package/hooks/features/columnPinning/index.js +1 -16
  31. package/hooks/features/columnPinning/useGridColumnPinning.js +32 -42
  32. package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +10 -19
  33. package/hooks/features/columnReorder/columnReorderInterfaces.js +1 -5
  34. package/hooks/features/columnReorder/columnReorderSelector.js +3 -10
  35. package/hooks/features/columnReorder/index.js +2 -16
  36. package/hooks/features/columnReorder/useGridColumnReorder.js +25 -35
  37. package/hooks/features/dataSource/cache.js +3 -11
  38. package/hooks/features/dataSource/gridDataSourceSelector.js +10 -18
  39. package/hooks/features/dataSource/interfaces.js +1 -5
  40. package/hooks/features/dataSource/useGridDataSource.js +34 -44
  41. package/hooks/features/dataSource/utils.js +9 -17
  42. package/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -5
  43. package/hooks/features/detailPanel/gridDetailPanelSelector.js +5 -14
  44. package/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +14 -27
  45. package/hooks/features/detailPanel/index.js +3 -53
  46. package/hooks/features/detailPanel/useGridDetailPanel.js +39 -48
  47. package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +18 -27
  48. package/hooks/features/index.js +9 -99
  49. package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +18 -27
  50. package/hooks/features/lazyLoader/useGridLazyLoader.js +14 -22
  51. package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +13 -22
  52. package/hooks/features/rowPinning/gridRowPinningInterface.js +1 -5
  53. package/hooks/features/rowPinning/gridRowPinningSelector.js +1 -18
  54. package/hooks/features/rowPinning/index.js +1 -16
  55. package/hooks/features/rowPinning/useGridRowPinning.js +13 -23
  56. package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +1 -1
  57. package/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +24 -34
  58. package/hooks/features/rowReorder/gridRowReorderColDef.js +5 -12
  59. package/hooks/features/rowReorder/index.js +1 -16
  60. package/hooks/features/rowReorder/useGridRowReorder.js +20 -29
  61. package/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +12 -21
  62. package/hooks/features/rows/index.js +1 -16
  63. package/hooks/features/rows/useGridRowAriaAttributes.js +14 -22
  64. package/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +37 -46
  65. package/hooks/features/serverSideTreeData/utils.js +6 -13
  66. package/hooks/features/treeData/gridTreeDataGroupColDef.js +9 -20
  67. package/hooks/features/treeData/gridTreeDataUtils.js +6 -12
  68. package/hooks/features/treeData/index.js +1 -12
  69. package/hooks/features/treeData/useGridTreeData.js +7 -15
  70. package/hooks/features/treeData/useGridTreeDataPreProcessors.js +37 -46
  71. package/hooks/index.js +1 -16
  72. package/hooks/package.json +2 -2
  73. package/hooks/utils/useGridApiContext.js +2 -8
  74. package/hooks/utils/useGridApiRef.js +2 -8
  75. package/hooks/utils/useGridAriaAttributes.js +8 -16
  76. package/hooks/utils/useGridPrivateApiContext.js +2 -8
  77. package/hooks/utils/useGridRootProps.js +2 -8
  78. package/index.js +19 -210
  79. package/internals/index.js +34 -301
  80. package/internals/package.json +2 -2
  81. package/internals/propValidation.js +2 -8
  82. package/locales/package.json +6 -0
  83. package/material/icons.js +7 -14
  84. package/material/index.js +6 -13
  85. package/material/package.json +2 -2
  86. package/models/dataGridProProps.js +1 -5
  87. package/models/gridApiPro.js +1 -5
  88. package/models/gridFetchRowsParams.js +1 -5
  89. package/models/gridGroupingColDefOverride.js +1 -5
  90. package/models/gridProIconSlotsComponent.js +1 -5
  91. package/models/gridProSlotProps.js +1 -5
  92. package/models/gridProSlotsComponent.js +1 -5
  93. package/models/gridRowOrderChangeParams.js +1 -5
  94. package/models/gridRowScrollEndParams.js +1 -5
  95. package/models/gridStatePro.js +1 -5
  96. package/models/index.js +8 -82
  97. package/models/package.json +2 -2
  98. package/modern/DataGridPro/useDataGridProProps.js +6 -5
  99. package/modern/components/GridDetailPanel.js +2 -0
  100. package/modern/components/GridDetailPanels.js +2 -0
  101. package/modern/components/headerFiltering/GridHeaderFilterMenu.js +2 -2
  102. package/modern/hooks/features/detailPanel/useGridDetailPanel.js +3 -2
  103. package/modern/index.js +1 -1
  104. package/modern/utils/releaseInfo.js +1 -1
  105. package/{esm → node}/DataGridPro/DataGrid.js +9 -2
  106. package/{esm → node}/DataGridPro/DataGridPro.js +238 -231
  107. package/node/DataGridPro/index.js +39 -0
  108. package/node/DataGridPro/useDataGridProComponent.js +111 -0
  109. package/node/DataGridPro/useDataGridProProps.js +62 -0
  110. package/node/components/GridColumnHeaderCollapseIcon.js +1 -0
  111. package/node/components/GridColumnHeaders.js +99 -0
  112. package/node/components/GridColumnMenuPinningItem.js +97 -0
  113. package/node/components/GridDataSourceTreeDataGroupingCell.js +118 -0
  114. package/{esm → node}/components/GridDetailPanel.js +20 -13
  115. package/node/components/GridDetailPanelToggleCell.js +128 -0
  116. package/node/components/GridDetailPanels.js +69 -0
  117. package/node/components/GridPinnedRows.js +48 -0
  118. package/node/components/GridProColumnMenu.js +29 -0
  119. package/{esm → node}/components/GridRowReorderCell.js +45 -36
  120. package/{esm → node}/components/GridTreeDataGroupingCell.js +44 -37
  121. package/{esm → node}/components/headerFiltering/GridHeaderFilterCell.js +78 -71
  122. package/node/components/headerFiltering/GridHeaderFilterClearButton.js +28 -0
  123. package/node/components/headerFiltering/GridHeaderFilterMenu.js +95 -0
  124. package/node/components/headerFiltering/GridHeaderFilterMenuContainer.js +106 -0
  125. package/node/components/headerFiltering/index.js +38 -0
  126. package/node/components/index.js +71 -0
  127. package/node/components/reexports.js +24 -0
  128. package/node/constants/dataGridProDefaultSlotsComponents.js +24 -0
  129. package/{esm → node}/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -30
  130. package/node/hooks/features/columnPinning/gridColumnPinningInterface.js +5 -0
  131. package/node/hooks/features/columnPinning/index.js +16 -0
  132. package/{esm → node}/hooks/features/columnPinning/useGridColumnPinning.js +42 -32
  133. package/{esm → node}/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +19 -10
  134. package/node/hooks/features/columnReorder/columnReorderInterfaces.js +5 -0
  135. package/node/hooks/features/columnReorder/columnReorderSelector.js +10 -0
  136. package/node/hooks/features/columnReorder/index.js +16 -0
  137. package/{esm → node}/hooks/features/columnReorder/useGridColumnReorder.js +35 -25
  138. package/{esm → node}/hooks/features/dataSource/cache.js +11 -3
  139. package/node/hooks/features/dataSource/gridDataSourceSelector.js +32 -0
  140. package/node/hooks/features/dataSource/interfaces.js +5 -0
  141. package/{esm → node}/hooks/features/dataSource/useGridDataSource.js +44 -34
  142. package/{esm → node}/hooks/features/dataSource/utils.js +17 -9
  143. package/node/hooks/features/detailPanel/gridDetailPanelInterface.js +5 -0
  144. package/node/hooks/features/detailPanel/gridDetailPanelSelector.js +21 -0
  145. package/node/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +47 -0
  146. package/node/hooks/features/detailPanel/index.js +53 -0
  147. package/{esm → node}/hooks/features/detailPanel/useGridDetailPanel.js +49 -38
  148. package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +52 -0
  149. package/node/hooks/features/index.js +99 -0
  150. package/{esm → node}/hooks/features/infiniteLoader/useGridInfiniteLoader.js +27 -18
  151. package/{esm → node}/hooks/features/lazyLoader/useGridLazyLoader.js +22 -14
  152. package/node/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +43 -0
  153. package/node/hooks/features/rowPinning/gridRowPinningInterface.js +5 -0
  154. package/node/hooks/features/rowPinning/gridRowPinningSelector.js +18 -0
  155. package/node/hooks/features/rowPinning/index.js +16 -0
  156. package/node/hooks/features/rowPinning/useGridRowPinning.js +62 -0
  157. package/{esm → node}/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +34 -24
  158. package/node/hooks/features/rowReorder/gridRowReorderColDef.js +27 -0
  159. package/node/hooks/features/rowReorder/index.js +16 -0
  160. package/{esm → node}/hooks/features/rowReorder/useGridRowReorder.js +29 -20
  161. package/{esm → node}/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +21 -12
  162. package/node/hooks/features/rows/index.js +16 -0
  163. package/node/hooks/features/rows/useGridRowAriaAttributes.js +45 -0
  164. package/{esm → node}/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +46 -37
  165. package/node/hooks/features/serverSideTreeData/utils.js +27 -0
  166. package/node/hooks/features/treeData/gridTreeDataGroupColDef.js +38 -0
  167. package/{esm → node}/hooks/features/treeData/gridTreeDataUtils.js +12 -6
  168. package/node/hooks/features/treeData/index.js +12 -0
  169. package/node/hooks/features/treeData/useGridTreeData.js +30 -0
  170. package/{esm → node}/hooks/features/treeData/useGridTreeDataPreProcessors.js +46 -37
  171. package/node/hooks/index.js +16 -0
  172. package/node/hooks/utils/useGridApiContext.js +8 -0
  173. package/node/hooks/utils/useGridApiRef.js +8 -0
  174. package/node/hooks/utils/useGridAriaAttributes.js +19 -0
  175. package/node/hooks/utils/useGridPrivateApiContext.js +8 -0
  176. package/node/hooks/utils/useGridRootProps.js +8 -0
  177. package/node/index.js +220 -0
  178. package/node/internals/index.js +302 -0
  179. package/node/internals/propValidation.js +8 -0
  180. package/node/material/icons.js +24 -0
  181. package/node/material/index.js +15 -0
  182. package/node/models/dataGridProProps.js +5 -0
  183. package/node/models/gridApiPro.js +5 -0
  184. package/node/models/gridFetchRowsParams.js +5 -0
  185. package/node/models/gridGroupingColDefOverride.js +5 -0
  186. package/node/models/gridProIconSlotsComponent.js +5 -0
  187. package/node/models/gridProSlotProps.js +5 -0
  188. package/node/models/gridProSlotsComponent.js +5 -0
  189. package/node/models/gridRowOrderChangeParams.js +5 -0
  190. package/node/models/gridRowScrollEndParams.js +5 -0
  191. package/node/models/gridStatePro.js +5 -0
  192. package/node/models/index.js +82 -0
  193. package/node/themeAugmentation/index.js +27 -0
  194. package/node/themeAugmentation/overrides.js +5 -0
  195. package/node/themeAugmentation/props.js +5 -0
  196. package/node/typeOverloads/index.js +16 -0
  197. package/node/typeOverloads/modules.js +5 -0
  198. package/node/typeOverloads/reexports.js +26 -0
  199. package/node/utils/index.js +16 -0
  200. package/node/utils/releaseInfo.js +20 -0
  201. package/{esm → node}/utils/tree/createRowTree.js +14 -7
  202. package/node/utils/tree/index.js +12 -0
  203. package/{esm → node}/utils/tree/insertDataRowInTree.js +18 -11
  204. package/node/utils/tree/models.js +5 -0
  205. package/{esm → node}/utils/tree/removeDataRowFromTree.js +16 -9
  206. package/{esm → node}/utils/tree/sortRowTree.js +12 -5
  207. package/{esm → node}/utils/tree/updateRowTree.js +26 -18
  208. package/{esm → node}/utils/tree/utils.js +34 -18
  209. package/package.json +6 -6
  210. package/themeAugmentation/index.js +4 -27
  211. package/themeAugmentation/overrides.js +1 -5
  212. package/themeAugmentation/package.json +2 -2
  213. package/themeAugmentation/props.js +1 -5
  214. package/typeOverloads/index.js +1 -16
  215. package/typeOverloads/modules.js +1 -5
  216. package/typeOverloads/package.json +2 -2
  217. package/typeOverloads/reexports.js +14 -25
  218. package/utils/index.js +1 -16
  219. package/utils/package.json +2 -2
  220. package/utils/releaseInfo.js +5 -12
  221. package/utils/tree/createRowTree.js +7 -14
  222. package/utils/tree/index.js +1 -12
  223. package/utils/tree/insertDataRowInTree.js +11 -18
  224. package/utils/tree/models.js +1 -5
  225. package/utils/tree/removeDataRowFromTree.js +9 -16
  226. package/utils/tree/sortRowTree.js +5 -12
  227. package/utils/tree/updateRowTree.js +18 -26
  228. package/utils/tree/utils.js +18 -34
  229. package/esm/DataGridPro/index.js +0 -3
  230. package/esm/DataGridPro/useDataGridProComponent.js +0 -103
  231. package/esm/DataGridPro/useDataGridProProps.js +0 -52
  232. package/esm/components/GridColumnHeaderCollapseIcon.js +0 -0
  233. package/esm/components/GridColumnHeaders.js +0 -92
  234. package/esm/components/GridColumnMenuPinningItem.js +0 -90
  235. package/esm/components/GridDataSourceTreeDataGroupingCell.js +0 -110
  236. package/esm/components/GridDetailPanelToggleCell.js +0 -121
  237. package/esm/components/GridDetailPanels.js +0 -60
  238. package/esm/components/GridPinnedRows.js +0 -40
  239. package/esm/components/GridProColumnMenu.js +0 -21
  240. package/esm/components/headerFiltering/GridHeaderFilterClearButton.js +0 -21
  241. package/esm/components/headerFiltering/GridHeaderFilterMenu.js +0 -88
  242. package/esm/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -99
  243. package/esm/components/headerFiltering/index.js +0 -3
  244. package/esm/components/index.js +0 -7
  245. package/esm/components/reexports.js +0 -1
  246. package/esm/constants/dataGridProDefaultSlotsComponents.js +0 -17
  247. package/esm/hooks/features/columnPinning/gridColumnPinningInterface.js +0 -1
  248. package/esm/hooks/features/columnPinning/index.js +0 -1
  249. package/esm/hooks/features/columnReorder/columnReorderInterfaces.js +0 -1
  250. package/esm/hooks/features/columnReorder/columnReorderSelector.js +0 -3
  251. package/esm/hooks/features/columnReorder/index.js +0 -2
  252. package/esm/hooks/features/dataSource/gridDataSourceSelector.js +0 -24
  253. package/esm/hooks/features/dataSource/interfaces.js +0 -1
  254. package/esm/hooks/features/detailPanel/gridDetailPanelInterface.js +0 -1
  255. package/esm/hooks/features/detailPanel/gridDetailPanelSelector.js +0 -12
  256. package/esm/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +0 -34
  257. package/esm/hooks/features/detailPanel/index.js +0 -3
  258. package/esm/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +0 -43
  259. package/esm/hooks/features/index.js +0 -9
  260. package/esm/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +0 -34
  261. package/esm/hooks/features/rowPinning/gridRowPinningInterface.js +0 -1
  262. package/esm/hooks/features/rowPinning/gridRowPinningSelector.js +0 -1
  263. package/esm/hooks/features/rowPinning/index.js +0 -1
  264. package/esm/hooks/features/rowPinning/useGridRowPinning.js +0 -52
  265. package/esm/hooks/features/rowReorder/gridRowReorderColDef.js +0 -20
  266. package/esm/hooks/features/rowReorder/index.js +0 -1
  267. package/esm/hooks/features/rows/index.js +0 -1
  268. package/esm/hooks/features/rows/useGridRowAriaAttributes.js +0 -37
  269. package/esm/hooks/features/serverSideTreeData/utils.js +0 -20
  270. package/esm/hooks/features/treeData/gridTreeDataGroupColDef.js +0 -27
  271. package/esm/hooks/features/treeData/index.js +0 -1
  272. package/esm/hooks/features/treeData/useGridTreeData.js +0 -22
  273. package/esm/hooks/index.js +0 -1
  274. package/esm/hooks/utils/useGridApiContext.js +0 -2
  275. package/esm/hooks/utils/useGridApiRef.js +0 -2
  276. package/esm/hooks/utils/useGridAriaAttributes.js +0 -11
  277. package/esm/hooks/utils/useGridPrivateApiContext.js +0 -2
  278. package/esm/hooks/utils/useGridRootProps.js +0 -2
  279. package/esm/index.js +0 -22
  280. package/esm/internals/index.js +0 -35
  281. package/esm/internals/propValidation.js +0 -2
  282. package/esm/material/icons.js +0 -17
  283. package/esm/material/index.js +0 -8
  284. package/esm/models/dataGridProProps.js +0 -1
  285. package/esm/models/gridApiPro.js +0 -1
  286. package/esm/models/gridFetchRowsParams.js +0 -1
  287. package/esm/models/gridGroupingColDefOverride.js +0 -1
  288. package/esm/models/gridProIconSlotsComponent.js +0 -1
  289. package/esm/models/gridProSlotProps.js +0 -1
  290. package/esm/models/gridProSlotsComponent.js +0 -1
  291. package/esm/models/gridRowOrderChangeParams.js +0 -1
  292. package/esm/models/gridRowScrollEndParams.js +0 -1
  293. package/esm/models/gridStatePro.js +0 -1
  294. package/esm/models/index.js +0 -8
  295. package/esm/themeAugmentation/index.js +0 -4
  296. package/esm/themeAugmentation/overrides.js +0 -1
  297. package/esm/themeAugmentation/props.js +0 -1
  298. package/esm/typeOverloads/index.js +0 -1
  299. package/esm/typeOverloads/modules.js +0 -1
  300. package/esm/typeOverloads/reexports.js +0 -15
  301. package/esm/utils/index.js +0 -1
  302. package/esm/utils/releaseInfo.js +0 -13
  303. package/esm/utils/tree/index.js +0 -1
  304. package/esm/utils/tree/models.js +0 -1
  305. /package/{locales.d.ts → locales/index.d.ts} +0 -0
  306. /package/{esm/locales.js → locales/index.js} +0 -0
  307. /package/modern/{locales.js → locales/index.js} +0 -0
  308. /package/{locales.js → node/locales/index.js} +0 -0
@@ -1,110 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
- import composeClasses from '@mui/utils/composeClasses';
4
- import Box from '@mui/material/Box';
5
- import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
6
- import { useGridSelectorV8 } from '@mui/x-data-grid/internals';
7
- import CircularProgress from '@mui/material/CircularProgress';
8
- import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
9
- import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
10
- import { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from "../hooks/features/dataSource/gridDataSourceSelector.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: ['treeDataGroupingCell'],
18
- toggle: ['treeDataGroupingCellToggle'],
19
- loadingContainer: ['treeDataGroupingCellLoadingContainer']
20
- };
21
- return composeClasses(slots, getDataGridUtilityClass, classes);
22
- };
23
- function GridTreeDataGroupingCellIcon(props) {
24
- const apiRef = useGridPrivateApiContext();
25
- const rootProps = useGridRootProps();
26
- const classes = useUtilityClasses(rootProps);
27
- const {
28
- rowNode,
29
- id,
30
- field,
31
- descendantCount
32
- } = props;
33
- const isDataLoading = useGridSelectorV8(apiRef, gridDataSourceLoadingIdSelector, id);
34
- const error = useGridSelectorV8(apiRef, gridDataSourceErrorSelector, id);
35
- const handleClick = event => {
36
- if (!rowNode.childrenExpanded) {
37
- // always fetch/get from cache the children when the node is expanded
38
- apiRef.current.unstable_dataSource.fetchRows(id);
39
- } else {
40
- apiRef.current.setRowChildrenExpansion(id, !rowNode.childrenExpanded);
41
- }
42
- apiRef.current.setCellFocus(id, field);
43
- event.stopPropagation(); // TODO remove event.stopPropagation
44
- };
45
- const Icon = rowNode.childrenExpanded ? rootProps.slots.treeDataCollapseIcon : rootProps.slots.treeDataExpandIcon;
46
- if (isDataLoading) {
47
- return /*#__PURE__*/_jsx("div", {
48
- className: classes.loadingContainer,
49
- children: /*#__PURE__*/_jsx(CircularProgress, {
50
- size: "1rem",
51
- color: "inherit"
52
- })
53
- });
54
- }
55
- return descendantCount === -1 || descendantCount > 0 ? /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
56
- size: "small",
57
- onClick: handleClick,
58
- tabIndex: -1,
59
- "aria-label": rowNode.childrenExpanded ? apiRef.current.getLocaleText('treeDataCollapse') : apiRef.current.getLocaleText('treeDataExpand')
60
- }, rootProps?.slotProps?.baseIconButton, {
61
- children: /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {
62
- title: error?.message ?? null,
63
- children: /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {
64
- variant: "dot",
65
- color: "error",
66
- invisible: !error,
67
- children: /*#__PURE__*/_jsx(Icon, {
68
- fontSize: "inherit"
69
- })
70
- })
71
- })
72
- })) : null;
73
- }
74
- export function GridDataSourceTreeDataGroupingCell(props) {
75
- const {
76
- id,
77
- field,
78
- formattedValue,
79
- rowNode,
80
- hideDescendantCount,
81
- offsetMultiplier = 2
82
- } = props;
83
- const rootProps = useGridRootProps();
84
- const apiRef = useGridPrivateApiContext();
85
- const rowSelector = state => state.rows.dataRowIdToModelLookup[id];
86
- const row = useGridSelector(apiRef, rowSelector);
87
- const classes = useUtilityClasses(rootProps);
88
- let descendantCount = 0;
89
- if (row) {
90
- descendantCount = rootProps.unstable_dataSource?.getChildrenCount?.(row) ?? 0;
91
- }
92
- return /*#__PURE__*/_jsxs(Box, {
93
- className: classes.root,
94
- sx: {
95
- ml: rowNode.depth * offsetMultiplier
96
- },
97
- children: [/*#__PURE__*/_jsx("div", {
98
- className: classes.toggle,
99
- children: /*#__PURE__*/_jsx(GridTreeDataGroupingCellIcon, {
100
- id: id,
101
- field: field,
102
- rowNode: rowNode,
103
- row: row,
104
- descendantCount: descendantCount
105
- })
106
- }), /*#__PURE__*/_jsxs("span", {
107
- children: [formattedValue === undefined ? rowNode.groupingKey : formattedValue, !hideDescendantCount && descendantCount > 0 ? ` (${descendantCount})` : '']
108
- })]
109
- });
110
- }
@@ -1,121 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
- import PropTypes from 'prop-types';
4
- import composeClasses from '@mui/utils/composeClasses';
5
- import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
6
- import { createSelectorV8, useGridSelectorV8 } from '@mui/x-data-grid/internals';
7
- import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
8
- import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
9
- import { gridDetailPanelExpandedRowIdsSelector, gridDetailPanelExpandedRowsContentCacheSelector } from "../hooks/features/detailPanel/gridDetailPanelSelector.js";
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- const useUtilityClasses = ownerState => {
12
- const {
13
- classes,
14
- isExpanded
15
- } = ownerState;
16
- const slots = {
17
- root: ['detailPanelToggleCell', isExpanded && 'detailPanelToggleCell--expanded']
18
- };
19
- return composeClasses(slots, getDataGridUtilityClass, classes);
20
- };
21
- const isExpandedSelector = createSelectorV8(gridDetailPanelExpandedRowIdsSelector, (expandedRowIds, rowId) => {
22
- return expandedRowIds.includes(rowId);
23
- });
24
- function GridDetailPanelToggleCell(props) {
25
- const {
26
- id,
27
- row,
28
- api
29
- } = props;
30
- const rowId = api.getRowId(row);
31
- const isExpanded = useGridSelectorV8({
32
- current: api
33
- }, isExpandedSelector, rowId);
34
- const rootProps = useGridRootProps();
35
- const apiRef = useGridApiContext();
36
- const ownerState = {
37
- classes: rootProps.classes,
38
- isExpanded
39
- };
40
- const classes = useUtilityClasses(ownerState);
41
- const contentCache = useGridSelector(apiRef, gridDetailPanelExpandedRowsContentCacheSelector);
42
- const hasContent = /*#__PURE__*/React.isValidElement(contentCache[id]);
43
- const Icon = isExpanded ? rootProps.slots.detailPanelCollapseIcon : rootProps.slots.detailPanelExpandIcon;
44
- return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
45
- size: "small",
46
- tabIndex: -1,
47
- disabled: !hasContent,
48
- className: classes.root,
49
- "aria-label": isExpanded ? apiRef.current.getLocaleText('collapseDetailPanel') : apiRef.current.getLocaleText('expandDetailPanel')
50
- }, rootProps.slotProps?.baseIconButton, {
51
- children: /*#__PURE__*/_jsx(Icon, {
52
- fontSize: "inherit"
53
- })
54
- }));
55
- }
56
- process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
57
- // ----------------------------- Warning --------------------------------
58
- // | These PropTypes are generated from the TypeScript type definitions |
59
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
60
- // ----------------------------------------------------------------------
61
- /**
62
- * GridApi that let you manipulate the grid.
63
- */
64
- api: PropTypes.object.isRequired,
65
- /**
66
- * The mode of the cell.
67
- */
68
- cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
69
- /**
70
- * The column of the row that the current cell belongs to.
71
- */
72
- colDef: PropTypes.object.isRequired,
73
- /**
74
- * The column field of the cell that triggered the event.
75
- */
76
- field: PropTypes.string.isRequired,
77
- /**
78
- * A ref allowing to set imperative focus.
79
- * It can be passed to the element that should receive focus.
80
- * @ignore - do not document.
81
- */
82
- focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
83
- current: PropTypes.shape({
84
- focus: PropTypes.func.isRequired
85
- })
86
- })]),
87
- /**
88
- * The cell value formatted with the column valueFormatter.
89
- */
90
- formattedValue: PropTypes.any,
91
- /**
92
- * If true, the cell is the active element.
93
- */
94
- hasFocus: PropTypes.bool.isRequired,
95
- /**
96
- * The grid row id.
97
- */
98
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
99
- /**
100
- * If true, the cell is editable.
101
- */
102
- isEditable: PropTypes.bool,
103
- /**
104
- * The row model of the row that the current cell belongs to.
105
- */
106
- row: PropTypes.any.isRequired,
107
- /**
108
- * The node of the row that the current cell belongs to.
109
- */
110
- rowNode: PropTypes.object.isRequired,
111
- /**
112
- * the tabIndex value.
113
- */
114
- tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
115
- /**
116
- * The cell value.
117
- * If the column has `valueGetter`, use `params.row` to directly access the fields.
118
- */
119
- value: PropTypes.any
120
- } : void 0;
121
- export { GridDetailPanelToggleCell };
@@ -1,60 +0,0 @@
1
- import * as React from 'react';
2
- import composeClasses from '@mui/utils/composeClasses';
3
- import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
4
- import { EMPTY_DETAIL_PANELS } from '@mui/x-data-grid/internals';
5
- import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
6
- import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
7
- import { gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowsHeightCacheSelector, gridDetailPanelExpandedRowIdsSelector } from "../hooks/features/detailPanel/index.js";
8
- import { GridDetailPanel } from "./GridDetailPanel.js";
9
- import { jsx as _jsx } from "react/jsx-runtime";
10
- const useUtilityClasses = () => {
11
- const slots = {
12
- detailPanel: ['detailPanel']
13
- };
14
- return composeClasses(slots, getDataGridUtilityClass, {});
15
- };
16
- export function GridDetailPanels(props) {
17
- const rootProps = useGridRootProps();
18
- if (!rootProps.getDetailPanelContent) {
19
- return null;
20
- }
21
- return /*#__PURE__*/React.createElement(GridDetailPanelsImpl, props);
22
- }
23
- function GridDetailPanelsImpl({
24
- virtualScroller
25
- }) {
26
- const apiRef = useGridPrivateApiContext();
27
- const classes = useUtilityClasses();
28
- const {
29
- setPanels
30
- } = virtualScroller;
31
- const expandedRowIds = useGridSelector(apiRef, gridDetailPanelExpandedRowIdsSelector);
32
- const detailPanelsContent = useGridSelector(apiRef, gridDetailPanelExpandedRowsContentCacheSelector);
33
- const detailPanelsHeights = useGridSelector(apiRef, gridDetailPanelExpandedRowsHeightCacheSelector);
34
- const getDetailPanel = React.useCallback(rowId => {
35
- const content = detailPanelsContent[rowId];
36
-
37
- // Check if the id exists in the current page
38
- const rowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(rowId);
39
- const exists = rowIndex !== undefined;
40
- if (! /*#__PURE__*/React.isValidElement(content) || !exists) {
41
- return null;
42
- }
43
- const hasAutoHeight = apiRef.current.detailPanelHasAutoHeight(rowId);
44
- const height = hasAutoHeight ? 'auto' : detailPanelsHeights[rowId];
45
- return /*#__PURE__*/_jsx(GridDetailPanel, {
46
- rowId: rowId,
47
- height: height,
48
- className: classes.detailPanel,
49
- children: content
50
- }, `panel-${rowId}`);
51
- }, [apiRef, classes.detailPanel, detailPanelsHeights, detailPanelsContent]);
52
- React.useEffect(() => {
53
- if (expandedRowIds.length === 0) {
54
- setPanels(EMPTY_DETAIL_PANELS);
55
- } else {
56
- setPanels(new Map(expandedRowIds.map(rowId => [rowId, getDetailPanel(rowId)])));
57
- }
58
- }, [expandedRowIds, setPanels, getDetailPanel]);
59
- return null;
60
- }
@@ -1,40 +0,0 @@
1
- import * as React from 'react';
2
- import clsx from 'clsx';
3
- import composeClasses from '@mui/utils/composeClasses';
4
- import { getDataGridUtilityClass, gridClasses, useGridSelector } from '@mui/x-data-grid';
5
- import { gridPinnedRowsSelector, useGridPrivateApiContext } from '@mui/x-data-grid/internals';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- const useUtilityClasses = () => {
8
- const slots = {
9
- root: ['pinnedRows']
10
- };
11
- return composeClasses(slots, getDataGridUtilityClass, {});
12
- };
13
- export function GridPinnedRows({
14
- position,
15
- virtualScroller
16
- }) {
17
- const classes = useUtilityClasses();
18
- const apiRef = useGridPrivateApiContext();
19
- const pinnedRowsData = useGridSelector(apiRef, gridPinnedRowsSelector);
20
- const rows = pinnedRowsData[position];
21
- const pinnedRenderContext = React.useMemo(() => ({
22
- firstRowIndex: 0,
23
- lastRowIndex: rows.length,
24
- firstColumnIndex: -1,
25
- lastColumnIndex: -1
26
- }), [rows]);
27
- if (rows.length === 0) {
28
- return null;
29
- }
30
- const pinnedRows = virtualScroller.getRows({
31
- position,
32
- rows,
33
- renderContext: pinnedRenderContext
34
- });
35
- return /*#__PURE__*/_jsx("div", {
36
- className: clsx(classes.root, gridClasses[`pinnedRows--${position}`]),
37
- role: "presentation",
38
- children: pinnedRows
39
- });
40
- }
@@ -1,21 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
- import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
4
- import { forwardRef } from '@mui/x-internals/forwardRef';
5
- import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.js";
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
8
- columnMenuPinningItem: GridColumnMenuPinningItem
9
- });
10
- export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
11
- columnMenuPinningItem: {
12
- displayOrder: 15
13
- }
14
- });
15
- export const GridProColumnMenu = forwardRef(function GridProColumnMenu(props, ref) {
16
- return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
17
- defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
18
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO,
19
- ref: ref
20
- }));
21
- });
@@ -1,21 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
- import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- const sx = {
6
- padding: '2px'
7
- };
8
- function GridHeaderFilterClearButton(props) {
9
- const rootProps = useGridRootProps();
10
- return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
11
- tabIndex: -1,
12
- "aria-label": "Clear filter",
13
- size: "small",
14
- sx: sx
15
- }, props, rootProps.slotProps?.baseIconButton, {
16
- children: /*#__PURE__*/_jsx(rootProps.slots.columnMenuClearIcon, {
17
- fontSize: "inherit"
18
- })
19
- }));
20
- }
21
- export { GridHeaderFilterClearButton };
@@ -1,88 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import * as React from 'react';
3
- import PropTypes from 'prop-types';
4
- import MenuList from '@mui/material/MenuList';
5
- import MenuItem from '@mui/material/MenuItem';
6
- import { unstable_capitalize as capitalize, HTMLElementType } from '@mui/utils';
7
- import { useGridApiContext, GridMenu } from '@mui/x-data-grid';
8
- import { jsx as _jsx } from "react/jsx-runtime";
9
- function GridHeaderFilterMenu({
10
- open,
11
- field,
12
- target,
13
- applyFilterChanges,
14
- operators,
15
- item,
16
- id,
17
- labelledBy
18
- }) {
19
- const apiRef = useGridApiContext();
20
- const hideMenu = React.useCallback(() => {
21
- apiRef.current.hideHeaderFilterMenu();
22
- }, [apiRef]);
23
- const handleListKeyDown = React.useCallback(event => {
24
- if (event.key === 'Tab') {
25
- event.preventDefault();
26
- }
27
- if (event.key === 'Escape' || event.key === 'Tab') {
28
- hideMenu();
29
- }
30
- }, [hideMenu]);
31
- if (!target) {
32
- return null;
33
- }
34
- return /*#__PURE__*/_jsx(GridMenu, {
35
- placement: "bottom-end",
36
- open: open,
37
- target: target,
38
- onClose: hideMenu,
39
- children: /*#__PURE__*/_jsx(MenuList, {
40
- "aria-labelledby": labelledBy,
41
- id: id,
42
- onKeyDown: handleListKeyDown,
43
- children: operators.map((op, i) => {
44
- const label = op?.headerLabel ?? apiRef.current.getLocaleText(`headerFilterOperator${capitalize(op.value)}`);
45
- return /*#__PURE__*/_jsx(MenuItem, {
46
- onClick: () => {
47
- applyFilterChanges(_extends({}, item, {
48
- operator: op.value
49
- }));
50
- hideMenu();
51
- },
52
- autoFocus: i === 0 ? open : false,
53
- selected: op.value === item.operator,
54
- children: label
55
- }, `${field}-${op.value}`);
56
- })
57
- })
58
- });
59
- }
60
- process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
61
- // ----------------------------- Warning --------------------------------
62
- // | These PropTypes are generated from the TypeScript type definitions |
63
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
64
- // ----------------------------------------------------------------------
65
- applyFilterChanges: PropTypes.func.isRequired,
66
- field: PropTypes.string.isRequired,
67
- id: PropTypes.string.isRequired,
68
- item: PropTypes.shape({
69
- field: PropTypes.string.isRequired,
70
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
71
- operator: PropTypes.string.isRequired,
72
- value: PropTypes.any
73
- }).isRequired,
74
- labelledBy: PropTypes.string.isRequired,
75
- open: PropTypes.bool.isRequired,
76
- operators: PropTypes.arrayOf(PropTypes.shape({
77
- getApplyFilterFn: PropTypes.func.isRequired,
78
- getValueAsString: PropTypes.func,
79
- headerLabel: PropTypes.string,
80
- InputComponent: PropTypes.elementType,
81
- InputComponentProps: PropTypes.object,
82
- label: PropTypes.string,
83
- requiresFilterValue: PropTypes.bool,
84
- value: PropTypes.string.isRequired
85
- })).isRequired,
86
- target: HTMLElementType
87
- } : void 0;
88
- export { GridHeaderFilterMenu };
@@ -1,99 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["operators", "item", "field", "buttonRef", "headerFilterMenuRef", "disabled"];
4
- import * as React from 'react';
5
- import PropTypes from 'prop-types';
6
- import { useGridApiContext, useGridSelector } from '@mui/x-data-grid';
7
- import { refType, unstable_useId as useId } from '@mui/utils';
8
- import { gridHeaderFilteringMenuSelector } from '@mui/x-data-grid/internals';
9
- import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
10
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- const sx = {
12
- width: 22,
13
- height: 22,
14
- margin: 'auto 0 10px 5px'
15
- };
16
- function GridHeaderFilterMenuContainer(props) {
17
- const {
18
- operators,
19
- item,
20
- field,
21
- buttonRef,
22
- headerFilterMenuRef,
23
- disabled = false
24
- } = props,
25
- others = _objectWithoutPropertiesLoose(props, _excluded);
26
- const buttonId = useId();
27
- const menuId = useId();
28
- const rootProps = useGridRootProps();
29
- const apiRef = useGridApiContext();
30
- const menuOpenField = useGridSelector(apiRef, gridHeaderFilteringMenuSelector);
31
- const open = Boolean(menuOpenField === field && headerFilterMenuRef.current);
32
- const handleClick = event => {
33
- headerFilterMenuRef.current = event.currentTarget;
34
- apiRef.current.showHeaderFilterMenu(field);
35
- };
36
- if (!rootProps.slots.headerFilterMenu) {
37
- return null;
38
- }
39
- const label = apiRef.current.getLocaleText('filterPanelOperator');
40
- const labelString = label ? String(label) : undefined;
41
- return /*#__PURE__*/_jsxs(React.Fragment, {
42
- children: [/*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
43
- id: buttonId,
44
- ref: buttonRef,
45
- "aria-label": labelString,
46
- title: labelString,
47
- "aria-controls": menuId,
48
- "aria-expanded": open ? 'true' : undefined,
49
- "aria-haspopup": "true",
50
- tabIndex: -1,
51
- size: "small",
52
- onClick: handleClick,
53
- sx: sx,
54
- disabled: disabled
55
- }, rootProps.slotProps?.baseIconButton, {
56
- children: /*#__PURE__*/_jsx(rootProps.slots.openFilterButtonIcon, {
57
- fontSize: "small"
58
- })
59
- })), /*#__PURE__*/_jsx(rootProps.slots.headerFilterMenu, _extends({
60
- field: field,
61
- open: open,
62
- item: item,
63
- target: headerFilterMenuRef.current,
64
- operators: operators,
65
- labelledBy: buttonId,
66
- id: menuId
67
- }, others))]
68
- });
69
- }
70
- process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes = {
71
- // ----------------------------- Warning --------------------------------
72
- // | These PropTypes are generated from the TypeScript type definitions |
73
- // | To update them edit the TypeScript types and run "pnpm proptypes" |
74
- // ----------------------------------------------------------------------
75
- applyFilterChanges: PropTypes.func.isRequired,
76
- buttonRef: refType,
77
- disabled: PropTypes.bool,
78
- field: PropTypes.string.isRequired,
79
- headerFilterMenuRef: PropTypes.shape({
80
- current: PropTypes.object
81
- }).isRequired,
82
- item: PropTypes.shape({
83
- field: PropTypes.string.isRequired,
84
- id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
85
- operator: PropTypes.string.isRequired,
86
- value: PropTypes.any
87
- }).isRequired,
88
- operators: PropTypes.arrayOf(PropTypes.shape({
89
- getApplyFilterFn: PropTypes.func.isRequired,
90
- getValueAsString: PropTypes.func,
91
- headerLabel: PropTypes.string,
92
- InputComponent: PropTypes.elementType,
93
- InputComponentProps: PropTypes.object,
94
- label: PropTypes.string,
95
- requiresFilterValue: PropTypes.bool,
96
- value: PropTypes.string.isRequired
97
- })).isRequired
98
- } : void 0;
99
- export { GridHeaderFilterMenuContainer };
@@ -1,3 +0,0 @@
1
- export * from "./GridHeaderFilterMenuContainer.js";
2
- export * from "./GridHeaderFilterCell.js";
3
- export * from "./GridHeaderFilterMenu.js";
@@ -1,7 +0,0 @@
1
- // Only export the variable and types that should be publicly exposed and re-exported from `@mui/x-data-grid-pro`
2
- export * from "./GridTreeDataGroupingCell.js";
3
- export * from "./GridColumnMenuPinningItem.js";
4
- export * from "./GridDetailPanelToggleCell.js";
5
- export * from "./GridRowReorderCell.js";
6
- export * from "../material/icons.js";
7
- export * from "./headerFiltering/index.js";
@@ -1 +0,0 @@
1
- export { GridProColumnMenu as GridColumnMenu, GRID_COLUMN_MENU_SLOTS_PRO as GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS_PRO as GRID_COLUMN_MENU_SLOT_PROPS } from "./GridProColumnMenu.js";
@@ -1,17 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '@mui/x-data-grid/internals';
3
- import { GridProColumnMenu } from "../components/GridProColumnMenu.js";
4
- import { GridColumnHeaders } from "../components/GridColumnHeaders.js";
5
- import { GridHeaderFilterMenu } from "../components/headerFiltering/GridHeaderFilterMenu.js";
6
- import { GridHeaderFilterCell } from "../components/headerFiltering/GridHeaderFilterCell.js";
7
- import { GridDetailPanels } from "../components/GridDetailPanels.js";
8
- import { GridPinnedRows } from "../components/GridPinnedRows.js";
9
- import materialSlots from "../material/index.js";
10
- export const DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS = _extends({}, DATA_GRID_DEFAULT_SLOTS_COMPONENTS, materialSlots, {
11
- columnMenu: GridProColumnMenu,
12
- columnHeaders: GridColumnHeaders,
13
- detailPanels: GridDetailPanels,
14
- headerFilterCell: GridHeaderFilterCell,
15
- headerFilterMenu: GridHeaderFilterMenu,
16
- pinnedRows: GridPinnedRows
17
- });
@@ -1 +0,0 @@
1
- export * from "./gridColumnPinningInterface.js";
@@ -1,3 +0,0 @@
1
- import { createSelector } from '@mui/x-data-grid/internals';
2
- export const gridColumnReorderSelector = state => state.columnReorder;
3
- export const gridColumnReorderDragColSelector = createSelector(gridColumnReorderSelector, columnReorder => columnReorder.dragCol);
@@ -1,2 +0,0 @@
1
- export * from "./columnReorderSelector.js";
2
- export {};
@@ -1,24 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { gridFilterModelSelector, gridSortModelSelector, gridPaginationModelSelector } from '@mui/x-data-grid';
3
- import { createSelector, createSelectorV8 } from '@mui/x-data-grid/internals';
4
- const computeStartEnd = paginationModel => {
5
- const start = paginationModel.page * paginationModel.pageSize;
6
- const end = start + paginationModel.pageSize - 1;
7
- return {
8
- start,
9
- end
10
- };
11
- };
12
- export const gridGetRowsParamsSelector = createSelector(gridFilterModelSelector, gridSortModelSelector, gridPaginationModelSelector, (filterModel, sortModel, paginationModel) => {
13
- return _extends({
14
- groupKeys: [],
15
- paginationModel,
16
- sortModel,
17
- filterModel
18
- }, computeStartEnd(paginationModel));
19
- });
20
- export const gridDataSourceStateSelector = state => state.dataSource;
21
- export const gridDataSourceLoadingSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.loading);
22
- export const gridDataSourceLoadingIdSelector = createSelectorV8(gridDataSourceStateSelector, (dataSource, id) => dataSource.loading[id] ?? false);
23
- export const gridDataSourceErrorsSelector = createSelector(gridDataSourceStateSelector, dataSource => dataSource.errors);
24
- export const gridDataSourceErrorSelector = createSelectorV8(gridDataSourceStateSelector, (dataSource, id) => dataSource.errors[id]);
@@ -1 +0,0 @@
1
- export {};
@@ -1,12 +0,0 @@
1
- import { createSelectorMemoized } from '@mui/x-data-grid/internals';
2
- export const gridDetailPanelExpandedRowIdsSelector = state => state.detailPanel.expandedRowIds;
3
- export const gridDetailPanelExpandedRowsContentCacheSelector = state => state.detailPanel.contentCache;
4
- export const gridDetailPanelRawHeightCacheSelector = state => state.detailPanel.heightCache;
5
-
6
- // TODO v6: Make this selector return the full object, including the autoHeight flag
7
- export const gridDetailPanelExpandedRowsHeightCacheSelector = createSelectorMemoized(gridDetailPanelRawHeightCacheSelector, heightCache => Object.entries(heightCache).reduce((acc, [id, {
8
- height
9
- }]) => {
10
- acc[id] = height || 0;
11
- return acc;
12
- }, {}));