@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.
- package/CHANGELOG.md +131 -0
- package/DataGridPro/DataGrid.js +2 -9
- package/DataGridPro/DataGridPro.js +231 -238
- package/DataGridPro/index.js +3 -39
- package/DataGridPro/package.json +2 -2
- package/DataGridPro/useDataGridProComponent.js +91 -99
- package/DataGridPro/useDataGridProProps.js +20 -28
- package/components/GridColumnHeaderCollapseIcon.js +0 -1
- package/components/GridColumnHeaders.js +39 -46
- package/components/GridColumnMenuPinningItem.js +39 -46
- package/components/GridDataSourceTreeDataGroupingCell.js +30 -38
- package/components/GridDetailPanel.js +14 -18
- package/components/GridDetailPanelToggleCell.js +35 -42
- package/components/GridDetailPanels.js +19 -25
- package/components/GridPinnedRows.js +12 -20
- package/components/GridProColumnMenu.js +11 -19
- package/components/GridRowReorderCell.js +36 -45
- package/components/GridTreeDataGroupingCell.js +37 -44
- package/components/headerFiltering/GridHeaderFilterCell.js +71 -78
- package/components/headerFiltering/GridHeaderFilterClearButton.js +9 -16
- package/components/headerFiltering/GridHeaderFilterMenu.js +36 -43
- package/components/headerFiltering/GridHeaderFilterMenuContainer.js +41 -48
- package/components/headerFiltering/index.js +3 -38
- package/components/index.js +7 -71
- package/components/package.json +2 -2
- package/components/reexports.js +1 -24
- package/constants/dataGridProDefaultSlotsComponents.js +16 -23
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +30 -39
- package/hooks/features/columnPinning/gridColumnPinningInterface.js +1 -5
- package/hooks/features/columnPinning/index.js +1 -16
- package/hooks/features/columnPinning/useGridColumnPinning.js +32 -42
- package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +10 -19
- package/hooks/features/columnReorder/columnReorderInterfaces.js +1 -5
- package/hooks/features/columnReorder/columnReorderSelector.js +3 -10
- package/hooks/features/columnReorder/index.js +2 -16
- package/hooks/features/columnReorder/useGridColumnReorder.js +25 -35
- package/hooks/features/dataSource/cache.js +3 -11
- package/hooks/features/dataSource/gridDataSourceSelector.js +10 -18
- package/hooks/features/dataSource/interfaces.js +1 -5
- package/hooks/features/dataSource/useGridDataSource.js +34 -44
- package/hooks/features/dataSource/utils.js +9 -17
- package/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -5
- package/hooks/features/detailPanel/gridDetailPanelSelector.js +5 -14
- package/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +14 -27
- package/hooks/features/detailPanel/index.js +3 -53
- package/hooks/features/detailPanel/useGridDetailPanel.js +39 -48
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +18 -27
- package/hooks/features/index.js +9 -99
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +18 -27
- package/hooks/features/lazyLoader/useGridLazyLoader.js +14 -22
- package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +13 -22
- package/hooks/features/rowPinning/gridRowPinningInterface.js +1 -5
- package/hooks/features/rowPinning/gridRowPinningSelector.js +1 -18
- package/hooks/features/rowPinning/index.js +1 -16
- package/hooks/features/rowPinning/useGridRowPinning.js +13 -23
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +1 -1
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +24 -34
- package/hooks/features/rowReorder/gridRowReorderColDef.js +5 -12
- package/hooks/features/rowReorder/index.js +1 -16
- package/hooks/features/rowReorder/useGridRowReorder.js +20 -29
- package/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +12 -21
- package/hooks/features/rows/index.js +1 -16
- package/hooks/features/rows/useGridRowAriaAttributes.js +14 -22
- package/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +37 -46
- package/hooks/features/serverSideTreeData/utils.js +6 -13
- package/hooks/features/treeData/gridTreeDataGroupColDef.js +9 -20
- package/hooks/features/treeData/gridTreeDataUtils.js +6 -12
- package/hooks/features/treeData/index.js +1 -12
- package/hooks/features/treeData/useGridTreeData.js +7 -15
- package/hooks/features/treeData/useGridTreeDataPreProcessors.js +37 -46
- package/hooks/index.js +1 -16
- package/hooks/package.json +2 -2
- package/hooks/utils/useGridApiContext.js +2 -8
- package/hooks/utils/useGridApiRef.js +2 -8
- package/hooks/utils/useGridAriaAttributes.js +8 -16
- package/hooks/utils/useGridPrivateApiContext.js +2 -8
- package/hooks/utils/useGridRootProps.js +2 -8
- package/index.js +19 -210
- package/internals/index.js +34 -301
- package/internals/package.json +2 -2
- package/internals/propValidation.js +2 -8
- package/locales/package.json +6 -0
- package/material/icons.js +7 -14
- package/material/index.js +6 -13
- package/material/package.json +2 -2
- package/models/dataGridProProps.js +1 -5
- package/models/gridApiPro.js +1 -5
- package/models/gridFetchRowsParams.js +1 -5
- package/models/gridGroupingColDefOverride.js +1 -5
- package/models/gridProIconSlotsComponent.js +1 -5
- package/models/gridProSlotProps.js +1 -5
- package/models/gridProSlotsComponent.js +1 -5
- package/models/gridRowOrderChangeParams.js +1 -5
- package/models/gridRowScrollEndParams.js +1 -5
- package/models/gridStatePro.js +1 -5
- package/models/index.js +8 -82
- package/models/package.json +2 -2
- package/modern/DataGridPro/useDataGridProProps.js +6 -5
- package/modern/components/GridDetailPanel.js +2 -0
- package/modern/components/GridDetailPanels.js +2 -0
- package/modern/components/headerFiltering/GridHeaderFilterMenu.js +2 -2
- package/modern/hooks/features/detailPanel/useGridDetailPanel.js +3 -2
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/{esm → node}/DataGridPro/DataGrid.js +9 -2
- package/{esm → node}/DataGridPro/DataGridPro.js +238 -231
- package/node/DataGridPro/index.js +39 -0
- package/node/DataGridPro/useDataGridProComponent.js +111 -0
- package/node/DataGridPro/useDataGridProProps.js +62 -0
- package/node/components/GridColumnHeaderCollapseIcon.js +1 -0
- package/node/components/GridColumnHeaders.js +99 -0
- package/node/components/GridColumnMenuPinningItem.js +97 -0
- package/node/components/GridDataSourceTreeDataGroupingCell.js +118 -0
- package/{esm → node}/components/GridDetailPanel.js +20 -13
- package/node/components/GridDetailPanelToggleCell.js +128 -0
- package/node/components/GridDetailPanels.js +69 -0
- package/node/components/GridPinnedRows.js +48 -0
- package/node/components/GridProColumnMenu.js +29 -0
- package/{esm → node}/components/GridRowReorderCell.js +45 -36
- package/{esm → node}/components/GridTreeDataGroupingCell.js +44 -37
- package/{esm → node}/components/headerFiltering/GridHeaderFilterCell.js +78 -71
- package/node/components/headerFiltering/GridHeaderFilterClearButton.js +28 -0
- package/node/components/headerFiltering/GridHeaderFilterMenu.js +95 -0
- package/node/components/headerFiltering/GridHeaderFilterMenuContainer.js +106 -0
- package/node/components/headerFiltering/index.js +38 -0
- package/node/components/index.js +71 -0
- package/node/components/reexports.js +24 -0
- package/node/constants/dataGridProDefaultSlotsComponents.js +24 -0
- package/{esm → node}/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -30
- package/node/hooks/features/columnPinning/gridColumnPinningInterface.js +5 -0
- package/node/hooks/features/columnPinning/index.js +16 -0
- package/{esm → node}/hooks/features/columnPinning/useGridColumnPinning.js +42 -32
- package/{esm → node}/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +19 -10
- package/node/hooks/features/columnReorder/columnReorderInterfaces.js +5 -0
- package/node/hooks/features/columnReorder/columnReorderSelector.js +10 -0
- package/node/hooks/features/columnReorder/index.js +16 -0
- package/{esm → node}/hooks/features/columnReorder/useGridColumnReorder.js +35 -25
- package/{esm → node}/hooks/features/dataSource/cache.js +11 -3
- package/node/hooks/features/dataSource/gridDataSourceSelector.js +32 -0
- package/node/hooks/features/dataSource/interfaces.js +5 -0
- package/{esm → node}/hooks/features/dataSource/useGridDataSource.js +44 -34
- package/{esm → node}/hooks/features/dataSource/utils.js +17 -9
- package/node/hooks/features/detailPanel/gridDetailPanelInterface.js +5 -0
- package/node/hooks/features/detailPanel/gridDetailPanelSelector.js +21 -0
- package/node/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +47 -0
- package/node/hooks/features/detailPanel/index.js +53 -0
- package/{esm → node}/hooks/features/detailPanel/useGridDetailPanel.js +49 -38
- package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +52 -0
- package/node/hooks/features/index.js +99 -0
- package/{esm → node}/hooks/features/infiniteLoader/useGridInfiniteLoader.js +27 -18
- package/{esm → node}/hooks/features/lazyLoader/useGridLazyLoader.js +22 -14
- package/node/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +43 -0
- package/node/hooks/features/rowPinning/gridRowPinningInterface.js +5 -0
- package/node/hooks/features/rowPinning/gridRowPinningSelector.js +18 -0
- package/node/hooks/features/rowPinning/index.js +16 -0
- package/node/hooks/features/rowPinning/useGridRowPinning.js +62 -0
- package/{esm → node}/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +34 -24
- package/node/hooks/features/rowReorder/gridRowReorderColDef.js +27 -0
- package/node/hooks/features/rowReorder/index.js +16 -0
- package/{esm → node}/hooks/features/rowReorder/useGridRowReorder.js +29 -20
- package/{esm → node}/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +21 -12
- package/node/hooks/features/rows/index.js +16 -0
- package/node/hooks/features/rows/useGridRowAriaAttributes.js +45 -0
- package/{esm → node}/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +46 -37
- package/node/hooks/features/serverSideTreeData/utils.js +27 -0
- package/node/hooks/features/treeData/gridTreeDataGroupColDef.js +38 -0
- package/{esm → node}/hooks/features/treeData/gridTreeDataUtils.js +12 -6
- package/node/hooks/features/treeData/index.js +12 -0
- package/node/hooks/features/treeData/useGridTreeData.js +30 -0
- package/{esm → node}/hooks/features/treeData/useGridTreeDataPreProcessors.js +46 -37
- package/node/hooks/index.js +16 -0
- package/node/hooks/utils/useGridApiContext.js +8 -0
- package/node/hooks/utils/useGridApiRef.js +8 -0
- package/node/hooks/utils/useGridAriaAttributes.js +19 -0
- package/node/hooks/utils/useGridPrivateApiContext.js +8 -0
- package/node/hooks/utils/useGridRootProps.js +8 -0
- package/node/index.js +220 -0
- package/node/internals/index.js +302 -0
- package/node/internals/propValidation.js +8 -0
- package/node/material/icons.js +24 -0
- package/node/material/index.js +15 -0
- package/node/models/dataGridProProps.js +5 -0
- package/node/models/gridApiPro.js +5 -0
- package/node/models/gridFetchRowsParams.js +5 -0
- package/node/models/gridGroupingColDefOverride.js +5 -0
- package/node/models/gridProIconSlotsComponent.js +5 -0
- package/node/models/gridProSlotProps.js +5 -0
- package/node/models/gridProSlotsComponent.js +5 -0
- package/node/models/gridRowOrderChangeParams.js +5 -0
- package/node/models/gridRowScrollEndParams.js +5 -0
- package/node/models/gridStatePro.js +5 -0
- package/node/models/index.js +82 -0
- package/node/themeAugmentation/index.js +27 -0
- package/node/themeAugmentation/overrides.js +5 -0
- package/node/themeAugmentation/props.js +5 -0
- package/node/typeOverloads/index.js +16 -0
- package/node/typeOverloads/modules.js +5 -0
- package/node/typeOverloads/reexports.js +26 -0
- package/node/utils/index.js +16 -0
- package/node/utils/releaseInfo.js +20 -0
- package/{esm → node}/utils/tree/createRowTree.js +14 -7
- package/node/utils/tree/index.js +12 -0
- package/{esm → node}/utils/tree/insertDataRowInTree.js +18 -11
- package/node/utils/tree/models.js +5 -0
- package/{esm → node}/utils/tree/removeDataRowFromTree.js +16 -9
- package/{esm → node}/utils/tree/sortRowTree.js +12 -5
- package/{esm → node}/utils/tree/updateRowTree.js +26 -18
- package/{esm → node}/utils/tree/utils.js +34 -18
- package/package.json +6 -6
- package/themeAugmentation/index.js +4 -27
- package/themeAugmentation/overrides.js +1 -5
- package/themeAugmentation/package.json +2 -2
- package/themeAugmentation/props.js +1 -5
- package/typeOverloads/index.js +1 -16
- package/typeOverloads/modules.js +1 -5
- package/typeOverloads/package.json +2 -2
- package/typeOverloads/reexports.js +14 -25
- package/utils/index.js +1 -16
- package/utils/package.json +2 -2
- package/utils/releaseInfo.js +5 -12
- package/utils/tree/createRowTree.js +7 -14
- package/utils/tree/index.js +1 -12
- package/utils/tree/insertDataRowInTree.js +11 -18
- package/utils/tree/models.js +1 -5
- package/utils/tree/removeDataRowFromTree.js +9 -16
- package/utils/tree/sortRowTree.js +5 -12
- package/utils/tree/updateRowTree.js +18 -26
- package/utils/tree/utils.js +18 -34
- package/esm/DataGridPro/index.js +0 -3
- package/esm/DataGridPro/useDataGridProComponent.js +0 -103
- package/esm/DataGridPro/useDataGridProProps.js +0 -52
- package/esm/components/GridColumnHeaderCollapseIcon.js +0 -0
- package/esm/components/GridColumnHeaders.js +0 -92
- package/esm/components/GridColumnMenuPinningItem.js +0 -90
- package/esm/components/GridDataSourceTreeDataGroupingCell.js +0 -110
- package/esm/components/GridDetailPanelToggleCell.js +0 -121
- package/esm/components/GridDetailPanels.js +0 -60
- package/esm/components/GridPinnedRows.js +0 -40
- package/esm/components/GridProColumnMenu.js +0 -21
- package/esm/components/headerFiltering/GridHeaderFilterClearButton.js +0 -21
- package/esm/components/headerFiltering/GridHeaderFilterMenu.js +0 -88
- package/esm/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -99
- package/esm/components/headerFiltering/index.js +0 -3
- package/esm/components/index.js +0 -7
- package/esm/components/reexports.js +0 -1
- package/esm/constants/dataGridProDefaultSlotsComponents.js +0 -17
- package/esm/hooks/features/columnPinning/gridColumnPinningInterface.js +0 -1
- package/esm/hooks/features/columnPinning/index.js +0 -1
- package/esm/hooks/features/columnReorder/columnReorderInterfaces.js +0 -1
- package/esm/hooks/features/columnReorder/columnReorderSelector.js +0 -3
- package/esm/hooks/features/columnReorder/index.js +0 -2
- package/esm/hooks/features/dataSource/gridDataSourceSelector.js +0 -24
- package/esm/hooks/features/dataSource/interfaces.js +0 -1
- package/esm/hooks/features/detailPanel/gridDetailPanelInterface.js +0 -1
- package/esm/hooks/features/detailPanel/gridDetailPanelSelector.js +0 -12
- package/esm/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +0 -34
- package/esm/hooks/features/detailPanel/index.js +0 -3
- package/esm/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +0 -43
- package/esm/hooks/features/index.js +0 -9
- package/esm/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +0 -34
- package/esm/hooks/features/rowPinning/gridRowPinningInterface.js +0 -1
- package/esm/hooks/features/rowPinning/gridRowPinningSelector.js +0 -1
- package/esm/hooks/features/rowPinning/index.js +0 -1
- package/esm/hooks/features/rowPinning/useGridRowPinning.js +0 -52
- package/esm/hooks/features/rowReorder/gridRowReorderColDef.js +0 -20
- package/esm/hooks/features/rowReorder/index.js +0 -1
- package/esm/hooks/features/rows/index.js +0 -1
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +0 -37
- package/esm/hooks/features/serverSideTreeData/utils.js +0 -20
- package/esm/hooks/features/treeData/gridTreeDataGroupColDef.js +0 -27
- package/esm/hooks/features/treeData/index.js +0 -1
- package/esm/hooks/features/treeData/useGridTreeData.js +0 -22
- package/esm/hooks/index.js +0 -1
- package/esm/hooks/utils/useGridApiContext.js +0 -2
- package/esm/hooks/utils/useGridApiRef.js +0 -2
- package/esm/hooks/utils/useGridAriaAttributes.js +0 -11
- package/esm/hooks/utils/useGridPrivateApiContext.js +0 -2
- package/esm/hooks/utils/useGridRootProps.js +0 -2
- package/esm/index.js +0 -22
- package/esm/internals/index.js +0 -35
- package/esm/internals/propValidation.js +0 -2
- package/esm/material/icons.js +0 -17
- package/esm/material/index.js +0 -8
- package/esm/models/dataGridProProps.js +0 -1
- package/esm/models/gridApiPro.js +0 -1
- package/esm/models/gridFetchRowsParams.js +0 -1
- package/esm/models/gridGroupingColDefOverride.js +0 -1
- package/esm/models/gridProIconSlotsComponent.js +0 -1
- package/esm/models/gridProSlotProps.js +0 -1
- package/esm/models/gridProSlotsComponent.js +0 -1
- package/esm/models/gridRowOrderChangeParams.js +0 -1
- package/esm/models/gridRowScrollEndParams.js +0 -1
- package/esm/models/gridStatePro.js +0 -1
- package/esm/models/index.js +0 -8
- package/esm/themeAugmentation/index.js +0 -4
- package/esm/themeAugmentation/overrides.js +0 -1
- package/esm/themeAugmentation/props.js +0 -1
- package/esm/typeOverloads/index.js +0 -1
- package/esm/typeOverloads/modules.js +0 -1
- package/esm/typeOverloads/reexports.js +0 -15
- package/esm/utils/index.js +0 -1
- package/esm/utils/releaseInfo.js +0 -13
- package/esm/utils/tree/index.js +0 -1
- package/esm/utils/tree/models.js +0 -1
- /package/{locales.d.ts → locales/index.d.ts} +0 -0
- /package/{esm/locales.js → locales/index.js} +0 -0
- /package/modern/{locales.js → locales/index.js} +0 -0
- /package/{locales.js → node/locales/index.js} +0 -0
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
13
|
-
var _xDataGrid = require("@mui/x-data-grid");
|
|
14
|
-
var _internals = require("@mui/x-data-grid/internals");
|
|
15
|
-
var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
|
|
16
|
-
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
17
|
-
var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
|
|
18
|
-
var _gridDataSourceSelector = require("../hooks/features/dataSource/gridDataSourceSelector");
|
|
19
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
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";
|
|
20
12
|
const useUtilityClasses = ownerState => {
|
|
21
13
|
const {
|
|
22
14
|
classes
|
|
@@ -26,11 +18,11 @@ const useUtilityClasses = ownerState => {
|
|
|
26
18
|
toggle: ['treeDataGroupingCellToggle'],
|
|
27
19
|
loadingContainer: ['treeDataGroupingCellLoadingContainer']
|
|
28
20
|
};
|
|
29
|
-
return (
|
|
21
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
30
22
|
};
|
|
31
23
|
function GridTreeDataGroupingCellIcon(props) {
|
|
32
|
-
const apiRef =
|
|
33
|
-
const rootProps =
|
|
24
|
+
const apiRef = useGridPrivateApiContext();
|
|
25
|
+
const rootProps = useGridRootProps();
|
|
34
26
|
const classes = useUtilityClasses(rootProps);
|
|
35
27
|
const {
|
|
36
28
|
rowNode,
|
|
@@ -38,8 +30,8 @@ function GridTreeDataGroupingCellIcon(props) {
|
|
|
38
30
|
field,
|
|
39
31
|
descendantCount
|
|
40
32
|
} = props;
|
|
41
|
-
const isDataLoading =
|
|
42
|
-
const error =
|
|
33
|
+
const isDataLoading = useGridSelectorV8(apiRef, gridDataSourceLoadingIdSelector, id);
|
|
34
|
+
const error = useGridSelectorV8(apiRef, gridDataSourceErrorSelector, id);
|
|
43
35
|
const handleClick = event => {
|
|
44
36
|
if (!rowNode.childrenExpanded) {
|
|
45
37
|
// always fetch/get from cache the children when the node is expanded
|
|
@@ -52,34 +44,34 @@ function GridTreeDataGroupingCellIcon(props) {
|
|
|
52
44
|
};
|
|
53
45
|
const Icon = rowNode.childrenExpanded ? rootProps.slots.treeDataCollapseIcon : rootProps.slots.treeDataExpandIcon;
|
|
54
46
|
if (isDataLoading) {
|
|
55
|
-
return /*#__PURE__*/(
|
|
47
|
+
return /*#__PURE__*/_jsx("div", {
|
|
56
48
|
className: classes.loadingContainer,
|
|
57
|
-
children: /*#__PURE__*/(
|
|
49
|
+
children: /*#__PURE__*/_jsx(CircularProgress, {
|
|
58
50
|
size: "1rem",
|
|
59
51
|
color: "inherit"
|
|
60
52
|
})
|
|
61
53
|
});
|
|
62
54
|
}
|
|
63
|
-
return descendantCount === -1 || descendantCount > 0 ? /*#__PURE__*/(
|
|
55
|
+
return descendantCount === -1 || descendantCount > 0 ? /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
64
56
|
size: "small",
|
|
65
57
|
onClick: handleClick,
|
|
66
58
|
tabIndex: -1,
|
|
67
59
|
"aria-label": rowNode.childrenExpanded ? apiRef.current.getLocaleText('treeDataCollapse') : apiRef.current.getLocaleText('treeDataExpand')
|
|
68
60
|
}, rootProps?.slotProps?.baseIconButton, {
|
|
69
|
-
children: /*#__PURE__*/(
|
|
61
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, {
|
|
70
62
|
title: error?.message ?? null,
|
|
71
|
-
children: /*#__PURE__*/(
|
|
63
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.baseBadge, {
|
|
72
64
|
variant: "dot",
|
|
73
65
|
color: "error",
|
|
74
66
|
invisible: !error,
|
|
75
|
-
children: /*#__PURE__*/(
|
|
67
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
76
68
|
fontSize: "inherit"
|
|
77
69
|
})
|
|
78
70
|
})
|
|
79
71
|
})
|
|
80
72
|
})) : null;
|
|
81
73
|
}
|
|
82
|
-
function GridDataSourceTreeDataGroupingCell(props) {
|
|
74
|
+
export function GridDataSourceTreeDataGroupingCell(props) {
|
|
83
75
|
const {
|
|
84
76
|
id,
|
|
85
77
|
field,
|
|
@@ -88,30 +80,30 @@ function GridDataSourceTreeDataGroupingCell(props) {
|
|
|
88
80
|
hideDescendantCount,
|
|
89
81
|
offsetMultiplier = 2
|
|
90
82
|
} = props;
|
|
91
|
-
const rootProps =
|
|
92
|
-
const apiRef =
|
|
83
|
+
const rootProps = useGridRootProps();
|
|
84
|
+
const apiRef = useGridPrivateApiContext();
|
|
93
85
|
const rowSelector = state => state.rows.dataRowIdToModelLookup[id];
|
|
94
|
-
const row =
|
|
86
|
+
const row = useGridSelector(apiRef, rowSelector);
|
|
95
87
|
const classes = useUtilityClasses(rootProps);
|
|
96
88
|
let descendantCount = 0;
|
|
97
89
|
if (row) {
|
|
98
90
|
descendantCount = rootProps.unstable_dataSource?.getChildrenCount?.(row) ?? 0;
|
|
99
91
|
}
|
|
100
|
-
return /*#__PURE__*/(
|
|
92
|
+
return /*#__PURE__*/_jsxs(Box, {
|
|
101
93
|
className: classes.root,
|
|
102
94
|
sx: {
|
|
103
95
|
ml: rowNode.depth * offsetMultiplier
|
|
104
96
|
},
|
|
105
|
-
children: [/*#__PURE__*/(
|
|
97
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
106
98
|
className: classes.toggle,
|
|
107
|
-
children: /*#__PURE__*/(
|
|
99
|
+
children: /*#__PURE__*/_jsx(GridTreeDataGroupingCellIcon, {
|
|
108
100
|
id: id,
|
|
109
101
|
field: field,
|
|
110
102
|
rowNode: rowNode,
|
|
111
103
|
row: row,
|
|
112
104
|
descendantCount: descendantCount
|
|
113
105
|
})
|
|
114
|
-
}), /*#__PURE__*/(
|
|
106
|
+
}), /*#__PURE__*/_jsxs("span", {
|
|
115
107
|
children: [formattedValue === undefined ? rowNode.groupingKey : formattedValue, !hideDescendantCount && descendantCount > 0 ? ` (${descendantCount})` : '']
|
|
116
108
|
})]
|
|
117
109
|
});
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _useResizeObserver = require("@mui/x-internals/useResizeObserver");
|
|
11
|
-
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
12
|
-
var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
const DetailPanel = (0, _styles.styled)('div', {
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { useResizeObserver } from '@mui/x-internals/useResizeObserver';
|
|
6
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
7
|
+
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const DetailPanel = styled('div', {
|
|
15
10
|
name: 'MuiDataGrid',
|
|
16
11
|
slot: 'DetailPanel',
|
|
17
12
|
overridesResolver: (props, styles) => styles.detailPanel
|
|
@@ -29,9 +24,9 @@ function GridDetailPanel(props) {
|
|
|
29
24
|
className,
|
|
30
25
|
children
|
|
31
26
|
} = props;
|
|
32
|
-
const apiRef =
|
|
27
|
+
const apiRef = useGridPrivateApiContext();
|
|
33
28
|
const ref = React.useRef(null);
|
|
34
|
-
const rootProps =
|
|
29
|
+
const rootProps = useGridRootProps();
|
|
35
30
|
const ownerState = rootProps;
|
|
36
31
|
const hasAutoHeight = height === 'auto';
|
|
37
32
|
React.useLayoutEffect(() => {
|
|
@@ -40,12 +35,12 @@ function GridDetailPanel(props) {
|
|
|
40
35
|
apiRef.current.storeDetailPanelHeight(rowId, ref.current.clientHeight);
|
|
41
36
|
}
|
|
42
37
|
}, [apiRef, hasAutoHeight, rowId]);
|
|
43
|
-
|
|
38
|
+
useResizeObserver(ref, entries => {
|
|
44
39
|
const [entry] = entries;
|
|
45
40
|
const observedHeight = entry.borderBoxSize && entry.borderBoxSize.length > 0 ? entry.borderBoxSize[0].blockSize : entry.contentRect.height;
|
|
46
41
|
apiRef.current.storeDetailPanelHeight(rowId, observedHeight);
|
|
47
42
|
}, hasAutoHeight);
|
|
48
|
-
return /*#__PURE__*/(
|
|
43
|
+
return /*#__PURE__*/_jsx(DetailPanel, {
|
|
49
44
|
ref: ref,
|
|
50
45
|
ownerState: ownerState,
|
|
51
46
|
role: "presentation",
|
|
@@ -55,4 +50,5 @@ function GridDetailPanel(props) {
|
|
|
55
50
|
className: className,
|
|
56
51
|
children: children
|
|
57
52
|
});
|
|
58
|
-
}
|
|
53
|
+
}
|
|
54
|
+
export { GridDetailPanel };
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
|
-
var _xDataGrid = require("@mui/x-data-grid");
|
|
14
|
-
var _internals = require("@mui/x-data-grid/internals");
|
|
15
|
-
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
16
|
-
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
17
|
-
var _gridDetailPanelSelector = require("../hooks/features/detailPanel/gridDetailPanelSelector");
|
|
18
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
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";
|
|
19
11
|
const useUtilityClasses = ownerState => {
|
|
20
12
|
const {
|
|
21
13
|
classes,
|
|
@@ -24,9 +16,9 @@ const useUtilityClasses = ownerState => {
|
|
|
24
16
|
const slots = {
|
|
25
17
|
root: ['detailPanelToggleCell', isExpanded && 'detailPanelToggleCell--expanded']
|
|
26
18
|
};
|
|
27
|
-
return (
|
|
19
|
+
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
28
20
|
};
|
|
29
|
-
const isExpandedSelector =
|
|
21
|
+
const isExpandedSelector = createSelectorV8(gridDetailPanelExpandedRowIdsSelector, (expandedRowIds, rowId) => {
|
|
30
22
|
return expandedRowIds.includes(rowId);
|
|
31
23
|
});
|
|
32
24
|
function GridDetailPanelToggleCell(props) {
|
|
@@ -36,27 +28,27 @@ function GridDetailPanelToggleCell(props) {
|
|
|
36
28
|
api
|
|
37
29
|
} = props;
|
|
38
30
|
const rowId = api.getRowId(row);
|
|
39
|
-
const isExpanded =
|
|
31
|
+
const isExpanded = useGridSelectorV8({
|
|
40
32
|
current: api
|
|
41
33
|
}, isExpandedSelector, rowId);
|
|
42
|
-
const rootProps =
|
|
43
|
-
const apiRef =
|
|
34
|
+
const rootProps = useGridRootProps();
|
|
35
|
+
const apiRef = useGridApiContext();
|
|
44
36
|
const ownerState = {
|
|
45
37
|
classes: rootProps.classes,
|
|
46
38
|
isExpanded
|
|
47
39
|
};
|
|
48
40
|
const classes = useUtilityClasses(ownerState);
|
|
49
|
-
const contentCache =
|
|
41
|
+
const contentCache = useGridSelector(apiRef, gridDetailPanelExpandedRowsContentCacheSelector);
|
|
50
42
|
const hasContent = /*#__PURE__*/React.isValidElement(contentCache[id]);
|
|
51
43
|
const Icon = isExpanded ? rootProps.slots.detailPanelCollapseIcon : rootProps.slots.detailPanelExpandIcon;
|
|
52
|
-
return /*#__PURE__*/(
|
|
44
|
+
return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
53
45
|
size: "small",
|
|
54
46
|
tabIndex: -1,
|
|
55
47
|
disabled: !hasContent,
|
|
56
48
|
className: classes.root,
|
|
57
49
|
"aria-label": isExpanded ? apiRef.current.getLocaleText('collapseDetailPanel') : apiRef.current.getLocaleText('expandDetailPanel')
|
|
58
50
|
}, rootProps.slotProps?.baseIconButton, {
|
|
59
|
-
children: /*#__PURE__*/(
|
|
51
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
60
52
|
fontSize: "inherit"
|
|
61
53
|
})
|
|
62
54
|
}));
|
|
@@ -69,60 +61,61 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
69
61
|
/**
|
|
70
62
|
* GridApi that let you manipulate the grid.
|
|
71
63
|
*/
|
|
72
|
-
api:
|
|
64
|
+
api: PropTypes.object.isRequired,
|
|
73
65
|
/**
|
|
74
66
|
* The mode of the cell.
|
|
75
67
|
*/
|
|
76
|
-
cellMode:
|
|
68
|
+
cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
|
|
77
69
|
/**
|
|
78
70
|
* The column of the row that the current cell belongs to.
|
|
79
71
|
*/
|
|
80
|
-
colDef:
|
|
72
|
+
colDef: PropTypes.object.isRequired,
|
|
81
73
|
/**
|
|
82
74
|
* The column field of the cell that triggered the event.
|
|
83
75
|
*/
|
|
84
|
-
field:
|
|
76
|
+
field: PropTypes.string.isRequired,
|
|
85
77
|
/**
|
|
86
78
|
* A ref allowing to set imperative focus.
|
|
87
79
|
* It can be passed to the element that should receive focus.
|
|
88
80
|
* @ignore - do not document.
|
|
89
81
|
*/
|
|
90
|
-
focusElementRef:
|
|
91
|
-
current:
|
|
92
|
-
focus:
|
|
82
|
+
focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
83
|
+
current: PropTypes.shape({
|
|
84
|
+
focus: PropTypes.func.isRequired
|
|
93
85
|
})
|
|
94
86
|
})]),
|
|
95
87
|
/**
|
|
96
88
|
* The cell value formatted with the column valueFormatter.
|
|
97
89
|
*/
|
|
98
|
-
formattedValue:
|
|
90
|
+
formattedValue: PropTypes.any,
|
|
99
91
|
/**
|
|
100
92
|
* If true, the cell is the active element.
|
|
101
93
|
*/
|
|
102
|
-
hasFocus:
|
|
94
|
+
hasFocus: PropTypes.bool.isRequired,
|
|
103
95
|
/**
|
|
104
96
|
* The grid row id.
|
|
105
97
|
*/
|
|
106
|
-
id:
|
|
98
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
107
99
|
/**
|
|
108
100
|
* If true, the cell is editable.
|
|
109
101
|
*/
|
|
110
|
-
isEditable:
|
|
102
|
+
isEditable: PropTypes.bool,
|
|
111
103
|
/**
|
|
112
104
|
* The row model of the row that the current cell belongs to.
|
|
113
105
|
*/
|
|
114
|
-
row:
|
|
106
|
+
row: PropTypes.any.isRequired,
|
|
115
107
|
/**
|
|
116
108
|
* The node of the row that the current cell belongs to.
|
|
117
109
|
*/
|
|
118
|
-
rowNode:
|
|
110
|
+
rowNode: PropTypes.object.isRequired,
|
|
119
111
|
/**
|
|
120
112
|
* the tabIndex value.
|
|
121
113
|
*/
|
|
122
|
-
tabIndex:
|
|
114
|
+
tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
|
|
123
115
|
/**
|
|
124
116
|
* The cell value.
|
|
125
117
|
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
|
126
118
|
*/
|
|
127
|
-
value:
|
|
128
|
-
} : void 0;
|
|
119
|
+
value: PropTypes.any
|
|
120
|
+
} : void 0;
|
|
121
|
+
export { GridDetailPanelToggleCell };
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _internals = require("@mui/x-data-grid/internals");
|
|
13
|
-
var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
|
|
14
|
-
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
15
|
-
var _detailPanel = require("../hooks/features/detailPanel");
|
|
16
|
-
var _GridDetailPanel = require("./GridDetailPanel");
|
|
17
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
5
|
+
import { getDataGridUtilityClass, useGridSelector } from '@mui/x-data-grid';
|
|
6
|
+
import { EMPTY_DETAIL_PANELS } from '@mui/x-data-grid/internals';
|
|
7
|
+
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
|
|
8
|
+
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
9
|
+
import { gridDetailPanelExpandedRowsContentCacheSelector, gridDetailPanelExpandedRowsHeightCacheSelector, gridDetailPanelExpandedRowIdsSelector } from "../hooks/features/detailPanel/index.js";
|
|
10
|
+
import { GridDetailPanel } from "./GridDetailPanel.js";
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
12
|
const useUtilityClasses = () => {
|
|
19
13
|
const slots = {
|
|
20
14
|
detailPanel: ['detailPanel']
|
|
21
15
|
};
|
|
22
|
-
return (
|
|
16
|
+
return composeClasses(slots, getDataGridUtilityClass, {});
|
|
23
17
|
};
|
|
24
|
-
function GridDetailPanels(props) {
|
|
25
|
-
const rootProps =
|
|
18
|
+
export function GridDetailPanels(props) {
|
|
19
|
+
const rootProps = useGridRootProps();
|
|
26
20
|
if (!rootProps.getDetailPanelContent) {
|
|
27
21
|
return null;
|
|
28
22
|
}
|
|
@@ -31,14 +25,14 @@ function GridDetailPanels(props) {
|
|
|
31
25
|
function GridDetailPanelsImpl({
|
|
32
26
|
virtualScroller
|
|
33
27
|
}) {
|
|
34
|
-
const apiRef =
|
|
28
|
+
const apiRef = useGridPrivateApiContext();
|
|
35
29
|
const classes = useUtilityClasses();
|
|
36
30
|
const {
|
|
37
31
|
setPanels
|
|
38
32
|
} = virtualScroller;
|
|
39
|
-
const expandedRowIds =
|
|
40
|
-
const detailPanelsContent =
|
|
41
|
-
const detailPanelsHeights =
|
|
33
|
+
const expandedRowIds = useGridSelector(apiRef, gridDetailPanelExpandedRowIdsSelector);
|
|
34
|
+
const detailPanelsContent = useGridSelector(apiRef, gridDetailPanelExpandedRowsContentCacheSelector);
|
|
35
|
+
const detailPanelsHeights = useGridSelector(apiRef, gridDetailPanelExpandedRowsHeightCacheSelector);
|
|
42
36
|
const getDetailPanel = React.useCallback(rowId => {
|
|
43
37
|
const content = detailPanelsContent[rowId];
|
|
44
38
|
|
|
@@ -50,7 +44,7 @@ function GridDetailPanelsImpl({
|
|
|
50
44
|
}
|
|
51
45
|
const hasAutoHeight = apiRef.current.detailPanelHasAutoHeight(rowId);
|
|
52
46
|
const height = hasAutoHeight ? 'auto' : detailPanelsHeights[rowId];
|
|
53
|
-
return /*#__PURE__*/(
|
|
47
|
+
return /*#__PURE__*/_jsx(GridDetailPanel, {
|
|
54
48
|
rowId: rowId,
|
|
55
49
|
height: height,
|
|
56
50
|
className: classes.detailPanel,
|
|
@@ -59,7 +53,7 @@ function GridDetailPanelsImpl({
|
|
|
59
53
|
}, [apiRef, classes.detailPanel, detailPanelsHeights, detailPanelsContent]);
|
|
60
54
|
React.useEffect(() => {
|
|
61
55
|
if (expandedRowIds.length === 0) {
|
|
62
|
-
setPanels(
|
|
56
|
+
setPanels(EMPTY_DETAIL_PANELS);
|
|
63
57
|
} else {
|
|
64
58
|
setPanels(new Map(expandedRowIds.map(rowId => [rowId, getDetailPanel(rowId)])));
|
|
65
59
|
}
|
|
@@ -1,30 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.GridPinnedRows = GridPinnedRows;
|
|
9
|
-
var React = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
11
|
-
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
12
|
-
var _xDataGrid = require("@mui/x-data-grid");
|
|
13
|
-
var _internals = require("@mui/x-data-grid/internals");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
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";
|
|
15
7
|
const useUtilityClasses = () => {
|
|
16
8
|
const slots = {
|
|
17
9
|
root: ['pinnedRows']
|
|
18
10
|
};
|
|
19
|
-
return (
|
|
11
|
+
return composeClasses(slots, getDataGridUtilityClass, {});
|
|
20
12
|
};
|
|
21
|
-
function GridPinnedRows({
|
|
13
|
+
export function GridPinnedRows({
|
|
22
14
|
position,
|
|
23
15
|
virtualScroller
|
|
24
16
|
}) {
|
|
25
17
|
const classes = useUtilityClasses();
|
|
26
|
-
const apiRef =
|
|
27
|
-
const pinnedRowsData =
|
|
18
|
+
const apiRef = useGridPrivateApiContext();
|
|
19
|
+
const pinnedRowsData = useGridSelector(apiRef, gridPinnedRowsSelector);
|
|
28
20
|
const rows = pinnedRowsData[position];
|
|
29
21
|
const pinnedRenderContext = React.useMemo(() => ({
|
|
30
22
|
firstRowIndex: 0,
|
|
@@ -40,8 +32,8 @@ function GridPinnedRows({
|
|
|
40
32
|
rows,
|
|
41
33
|
renderContext: pinnedRenderContext
|
|
42
34
|
});
|
|
43
|
-
return /*#__PURE__*/(
|
|
44
|
-
className: (
|
|
35
|
+
return /*#__PURE__*/_jsx("div", {
|
|
36
|
+
className: clsx(classes.root, gridClasses[`pinnedRows--${position}`]),
|
|
45
37
|
role: "presentation",
|
|
46
38
|
children: pinnedRows
|
|
47
39
|
});
|
|
@@ -1,27 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
7
9
|
});
|
|
8
|
-
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _xDataGrid = require("@mui/x-data-grid");
|
|
12
|
-
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
13
|
-
var _GridColumnMenuPinningItem = require("./GridColumnMenuPinningItem");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const GRID_COLUMN_MENU_SLOTS_PRO = exports.GRID_COLUMN_MENU_SLOTS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOTS, {
|
|
16
|
-
columnMenuPinningItem: _GridColumnMenuPinningItem.GridColumnMenuPinningItem
|
|
17
|
-
});
|
|
18
|
-
const GRID_COLUMN_MENU_SLOT_PROPS_PRO = exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
10
|
+
export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLOT_PROPS, {
|
|
19
11
|
columnMenuPinningItem: {
|
|
20
12
|
displayOrder: 15
|
|
21
13
|
}
|
|
22
14
|
});
|
|
23
|
-
const GridProColumnMenu =
|
|
24
|
-
return /*#__PURE__*/(
|
|
15
|
+
export const GridProColumnMenu = forwardRef(function GridProColumnMenu(props, ref) {
|
|
16
|
+
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
|
|
25
17
|
defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
|
|
26
18
|
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO,
|
|
27
19
|
ref: ref
|