@mui/x-data-grid 7.7.1 → 7.9.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.
- package/CHANGELOG.md +166 -1
- package/DataGrid/useDataGridComponent.d.ts +0 -1
- package/DataGrid/useDataGridProps.js +9 -2
- package/components/GridFooter.d.ts +1 -1
- package/components/GridLoadingOverlay.d.ts +15 -3
- package/components/GridLoadingOverlay.js +48 -4
- package/components/GridNoResultsOverlay.d.ts +1 -1
- package/components/GridNoRowsOverlay.d.ts +1 -1
- package/components/GridRow.js +2 -1
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridSelectedRowCount.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.d.ts +3 -0
- package/components/GridSkeletonLoadingOverlay.js +181 -0
- package/components/base/GridOverlays.d.ts +11 -1
- package/components/base/GridOverlays.js +25 -39
- package/components/cell/GridActionsCellItem.d.ts +3 -3
- package/components/cell/GridSkeletonCell.d.ts +13 -6
- package/components/cell/GridSkeletonCell.js +61 -19
- package/components/columnHeaders/GridColumnHeaderItem.js +3 -3
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -0
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +11 -6
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridRootStyles.d.ts +0 -1
- package/components/containers/GridRootStyles.js +19 -2
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/virtualization/GridMainContainer.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +7 -5
- package/components/virtualization/GridVirtualScrollerContent.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +1 -1
- package/constants/defaultGridSlotsComponents.js +2 -1
- package/constants/gridClasses.d.ts +14 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
- package/hooks/core/useGridInitialization.d.ts +1 -1
- package/hooks/core/useGridLocaleText.d.ts +1 -1
- package/hooks/core/useGridLoggerFactory.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.d.ts +1 -1
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +1 -1
- package/hooks/features/columnResize/useGridColumnResize.d.ts +1 -1
- package/hooks/features/density/useGridDensity.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +15 -15
- package/hooks/features/editing/useGridCellEditing.d.ts +1 -1
- package/hooks/features/editing/useGridEditing.d.ts +1 -1
- package/hooks/features/editing/useGridRowEditing.d.ts +1 -1
- package/hooks/features/export/serializers/csvSerializer.d.ts +0 -1
- package/hooks/features/export/useGridCsvExport.d.ts +1 -1
- package/hooks/features/export/useGridPrintExport.d.ts +1 -1
- package/hooks/features/export/useGridPrintExport.js +9 -8
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/focus/useGridFocus.d.ts +1 -1
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/overlays/useGridOverlays.d.ts +11 -0
- package/hooks/features/overlays/useGridOverlays.js +35 -0
- package/hooks/features/pagination/gridPaginationUtils.d.ts +1 -1
- package/hooks/features/pagination/index.d.ts +1 -1
- package/hooks/features/pagination/useGridPaginationMeta.d.ts +1 -1
- package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
- package/hooks/features/pagination/useGridRowCount.d.ts +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
- package/hooks/features/rows/gridRowsInterfaces.d.ts +10 -2
- package/hooks/features/rows/gridRowsSelector.d.ts +2 -1
- package/hooks/features/rows/gridRowsSelector.js +1 -0
- package/hooks/features/rows/gridRowsUtils.d.ts +8 -6
- package/hooks/features/rows/gridRowsUtils.js +30 -6
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +39 -21
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/hooks/utils/index.d.ts +0 -1
- package/hooks/utils/index.js +0 -1
- package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
- package/hooks/utils/useGridApiRef.d.ts +1 -1
- package/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/hooks/utils/useGridRootProps.d.ts +1 -1
- package/hooks/utils/useGridSelector.d.ts +1 -1
- package/hooks/utils/useGridVisibleRows.d.ts +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +1 -0
- package/internals/utils/propValidation.js +1 -1
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridInfiniteLoaderApi.d.ts +0 -1
- package/models/api/gridRowApi.d.ts +14 -0
- package/models/gridColumnGrouping.d.ts +0 -1
- package/models/gridDataSource.d.ts +87 -0
- package/models/gridDataSource.js +1 -0
- package/models/gridRows.d.ts +10 -0
- package/models/gridSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponentsProps.d.ts +7 -2
- package/models/props/DataGridProps.d.ts +2 -0
- package/modern/DataGrid/useDataGridProps.js +9 -2
- package/modern/components/GridLoadingOverlay.js +48 -4
- package/modern/components/GridRow.js +2 -1
- package/modern/components/GridSkeletonLoadingOverlay.js +181 -0
- package/modern/components/base/GridOverlays.js +25 -39
- package/modern/components/cell/GridSkeletonCell.js +61 -19
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +3 -3
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +11 -6
- package/modern/components/containers/GridRootStyles.js +19 -2
- package/modern/components/virtualization/GridVirtualScroller.js +7 -5
- package/modern/constants/defaultGridSlotsComponents.js +2 -1
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +15 -15
- package/modern/hooks/features/export/useGridPrintExport.js +9 -8
- package/modern/hooks/features/overlays/useGridOverlays.js +35 -0
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +30 -6
- package/modern/hooks/features/rows/useGridRows.js +39 -21
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/modern/hooks/utils/index.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/models/gridDataSource.js +1 -0
- package/modern/utils/utils.js +10 -2
- package/node/DataGrid/useDataGridProps.js +9 -2
- package/node/components/GridLoadingOverlay.js +48 -4
- package/node/components/GridRow.js +2 -1
- package/node/components/GridSkeletonLoadingOverlay.js +189 -0
- package/node/components/base/GridOverlays.js +25 -39
- package/node/components/cell/GridSkeletonCell.js +60 -18
- package/node/components/columnHeaders/GridColumnHeaderItem.js +3 -3
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +11 -6
- package/node/components/containers/GridRootStyles.js +19 -2
- package/node/components/virtualization/GridVirtualScroller.js +6 -4
- package/node/constants/defaultGridSlotsComponents.js +1 -0
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +15 -15
- package/node/hooks/features/export/useGridPrintExport.js +9 -8
- package/node/hooks/features/overlays/useGridOverlays.js +42 -0
- package/node/hooks/features/rows/gridRowsSelector.js +2 -1
- package/node/hooks/features/rows/gridRowsUtils.js +31 -6
- package/node/hooks/features/rows/useGridRows.js +37 -19
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/node/hooks/utils/index.js +0 -12
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- package/node/internals/utils/propValidation.js +1 -1
- package/node/models/gridDataSource.js +5 -0
- package/node/utils/utils.js +11 -3
- package/package.json +5 -4
- package/utils/cleanupTracking/TimerBasedCleanupTracking.d.ts +0 -1
- package/utils/domUtils.d.ts +0 -1
- package/utils/getPublicApiRef.d.ts +1 -2
- package/utils/keyboardUtils.d.ts +1 -1
- package/utils/utils.d.ts +8 -1
- package/utils/utils.js +10 -2
- package/utils/warning.d.ts +1 -1
- package/hooks/utils/useResizeObserver.d.ts +0 -2
- package/hooks/utils/useResizeObserver.js +0 -36
- package/modern/hooks/utils/useResizeObserver.js +0 -36
- package/node/hooks/utils/useResizeObserver.js +0 -44
|
@@ -20,7 +20,7 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
|
|
|
20
20
|
closeMenu?: () => void;
|
|
21
21
|
} & Omit<MenuItemProps, 'component'>));
|
|
22
22
|
declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
|
|
23
|
-
showInMenu?: false
|
|
23
|
+
showInMenu?: false;
|
|
24
24
|
icon: React.ReactElement;
|
|
25
25
|
} & Omit<IconButtonProps, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
|
|
26
26
|
showInMenu: true;
|
|
@@ -28,7 +28,7 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridAct
|
|
|
28
28
|
* If false, the menu will not close when this item is clicked.
|
|
29
29
|
* @default true
|
|
30
30
|
*/
|
|
31
|
-
closeMenuOnClick?: boolean
|
|
32
|
-
closeMenu?: (
|
|
31
|
+
closeMenuOnClick?: boolean;
|
|
32
|
+
closeMenu?: () => void;
|
|
33
33
|
} & Omit<MenuItemProps, "component">, "ref">) & React.RefAttributes<HTMLElement>>;
|
|
34
34
|
export { GridActionsCellItem };
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { GridColType } from '../../models';
|
|
3
|
+
export interface GridSkeletonCellProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
type?: GridColType;
|
|
5
|
+
width?: number | string;
|
|
6
|
+
height?: number | 'auto';
|
|
7
|
+
field?: string;
|
|
8
|
+
align?: string;
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, the cell will not display the skeleton but still reserve the cell space.
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
empty?: boolean;
|
|
7
14
|
}
|
|
8
|
-
declare function GridSkeletonCell(props:
|
|
15
|
+
declare function GridSkeletonCell(props: GridSkeletonCellProps): React.JSX.Element;
|
|
9
16
|
declare namespace GridSkeletonCell {
|
|
10
17
|
var propTypes: any;
|
|
11
18
|
}
|
|
@@ -1,52 +1,88 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["field", "align", "width", "height"];
|
|
3
|
+
const _excluded = ["field", "type", "align", "width", "height", "empty", "style", "className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import Skeleton from '@mui/material/Skeleton';
|
|
7
7
|
import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import { fastMemo } from '../../utils/fastMemo';
|
|
9
|
-
import {
|
|
10
|
+
import { createRandomNumberGenerator } from '../../utils/utils';
|
|
10
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
12
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const
|
|
14
|
+
const CIRCULAR_CONTENT_SIZE = '1.3em';
|
|
15
|
+
const CONTENT_HEIGHT = '1.2em';
|
|
16
|
+
const DEFAULT_CONTENT_WIDTH_RANGE = [40, 80];
|
|
17
|
+
const CONTENT_WIDTH_RANGE_BY_TYPE = {
|
|
18
|
+
number: [40, 60],
|
|
19
|
+
string: [40, 80],
|
|
20
|
+
date: [40, 60],
|
|
21
|
+
dateTime: [60, 80],
|
|
22
|
+
singleSelect: [40, 80]
|
|
23
|
+
};
|
|
14
24
|
const useUtilityClasses = ownerState => {
|
|
15
25
|
const {
|
|
16
26
|
align,
|
|
17
|
-
classes
|
|
27
|
+
classes,
|
|
28
|
+
empty
|
|
18
29
|
} = ownerState;
|
|
19
30
|
const slots = {
|
|
20
|
-
root: ['cell', 'cellSkeleton', `cell--text${capitalize(align)}`, '
|
|
31
|
+
root: ['cell', 'cellSkeleton', `cell--text${align ? capitalize(align) : 'Left'}`, empty && 'cellEmpty']
|
|
21
32
|
};
|
|
22
33
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
23
34
|
};
|
|
35
|
+
const randomNumberGenerator = createRandomNumberGenerator(12345);
|
|
24
36
|
function GridSkeletonCell(props) {
|
|
25
37
|
const {
|
|
38
|
+
field,
|
|
39
|
+
type,
|
|
26
40
|
align,
|
|
27
41
|
width,
|
|
28
|
-
height
|
|
42
|
+
height,
|
|
43
|
+
empty = false,
|
|
44
|
+
style,
|
|
45
|
+
className
|
|
29
46
|
} = props,
|
|
30
47
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
31
48
|
const rootProps = useGridRootProps();
|
|
32
49
|
const ownerState = {
|
|
33
50
|
classes: rootProps.classes,
|
|
34
|
-
align
|
|
51
|
+
align,
|
|
52
|
+
empty
|
|
35
53
|
};
|
|
36
54
|
const classes = useUtilityClasses(ownerState);
|
|
37
|
-
|
|
55
|
+
|
|
56
|
+
// Memo prevents the non-circular skeleton widths changing to random widths on every render
|
|
57
|
+
const skeletonProps = React.useMemo(() => {
|
|
58
|
+
const isCircularContent = type === 'boolean' || type === 'actions';
|
|
59
|
+
if (isCircularContent) {
|
|
60
|
+
return {
|
|
61
|
+
variant: 'circular',
|
|
62
|
+
width: CIRCULAR_CONTENT_SIZE,
|
|
63
|
+
height: CIRCULAR_CONTENT_SIZE
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// The width of the skeleton is a random number between the min and max values
|
|
68
|
+
// The min and max values are determined by the type of the column
|
|
69
|
+
const [min, max] = type ? CONTENT_WIDTH_RANGE_BY_TYPE[type] ?? DEFAULT_CONTENT_WIDTH_RANGE : DEFAULT_CONTENT_WIDTH_RANGE;
|
|
70
|
+
return {
|
|
71
|
+
variant: 'text',
|
|
72
|
+
width: `${Math.round(randomNumberGenerator(min, max))}%`,
|
|
73
|
+
height: CONTENT_HEIGHT
|
|
74
|
+
};
|
|
75
|
+
}, [type]);
|
|
38
76
|
return /*#__PURE__*/_jsx("div", _extends({
|
|
39
|
-
|
|
40
|
-
|
|
77
|
+
"data-field": field,
|
|
78
|
+
className: clsx(classes.root, className),
|
|
79
|
+
style: _extends({
|
|
41
80
|
height,
|
|
42
81
|
maxWidth: width,
|
|
43
82
|
minWidth: width
|
|
44
|
-
}
|
|
83
|
+
}, style)
|
|
45
84
|
}, other, {
|
|
46
|
-
children: /*#__PURE__*/_jsx(Skeleton, {
|
|
47
|
-
width: `${contentWidth}%`,
|
|
48
|
-
height: 25
|
|
49
|
-
})
|
|
85
|
+
children: !empty && /*#__PURE__*/_jsx(Skeleton, _extends({}, skeletonProps))
|
|
50
86
|
}));
|
|
51
87
|
}
|
|
52
88
|
process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
|
|
@@ -54,10 +90,16 @@ process.env.NODE_ENV !== "production" ? GridSkeletonCell.propTypes = {
|
|
|
54
90
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
55
91
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
56
92
|
// ----------------------------------------------------------------------
|
|
57
|
-
align: PropTypes.string
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
93
|
+
align: PropTypes.string,
|
|
94
|
+
/**
|
|
95
|
+
* If `true`, the cell will not display the skeleton but still reserve the cell space.
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
empty: PropTypes.bool,
|
|
99
|
+
field: PropTypes.string,
|
|
100
|
+
height: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
|
|
101
|
+
type: PropTypes.oneOf(['actions', 'boolean', 'custom', 'date', 'dateTime', 'number', 'singleSelect', 'string']),
|
|
102
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
61
103
|
} : void 0;
|
|
62
104
|
const Memoized = fastMemo(GridSkeletonCell);
|
|
63
105
|
export { Memoized as GridSkeletonCell };
|
|
@@ -5,7 +5,6 @@ import clsx from 'clsx';
|
|
|
5
5
|
import { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
|
|
6
6
|
import { fastMemo } from '../../utils/fastMemo';
|
|
7
7
|
import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
|
|
8
|
-
import { GridColumnHeaderSortIcon } from './GridColumnHeaderSortIcon';
|
|
9
8
|
import { ColumnHeaderMenuIcon } from './ColumnHeaderMenuIcon';
|
|
10
9
|
import { GridColumnHeaderMenu } from '../menu/columnMenu/GridColumnHeaderMenu';
|
|
11
10
|
import { gridClasses, getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
@@ -142,12 +141,13 @@ function GridColumnHeaderItem(props) {
|
|
|
142
141
|
children: [!rootProps.disableColumnFilter && /*#__PURE__*/_jsx(rootProps.slots.columnHeaderFilterIconButton, _extends({
|
|
143
142
|
field: colDef.field,
|
|
144
143
|
counter: filterItemsCounter
|
|
145
|
-
}, rootProps.slotProps?.columnHeaderFilterIconButton)), showSortIcon && /*#__PURE__*/_jsx(
|
|
144
|
+
}, rootProps.slotProps?.columnHeaderFilterIconButton)), showSortIcon && /*#__PURE__*/_jsx(rootProps.slots.columnHeaderSortIcon, _extends({
|
|
145
|
+
field: colDef.field,
|
|
146
146
|
direction: sortDirection,
|
|
147
147
|
index: sortIndex,
|
|
148
148
|
sortingOrder: sortingOrder,
|
|
149
149
|
disabled: !colDef.sortable
|
|
150
|
-
})]
|
|
150
|
+
}, rootProps.slotProps?.columnHeaderSortIcon))]
|
|
151
151
|
});
|
|
152
152
|
React.useLayoutEffect(() => {
|
|
153
153
|
const columnMenuState = apiRef.current.state.columnMenu;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridSortDirection } from '../../models/gridSortModel';
|
|
3
3
|
export interface GridColumnHeaderSortIconProps {
|
|
4
|
+
field: string;
|
|
4
5
|
direction: GridSortDirection;
|
|
5
6
|
index: number | undefined;
|
|
6
7
|
sortingOrder: readonly GridSortDirection[];
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["direction", "index", "sortingOrder", "disabled"];
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import { unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
@@ -35,11 +37,12 @@ function getIcon(icons, direction, className, sortingOrder) {
|
|
|
35
37
|
}
|
|
36
38
|
function GridColumnHeaderSortIconRaw(props) {
|
|
37
39
|
const {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
direction,
|
|
41
|
+
index,
|
|
42
|
+
sortingOrder,
|
|
43
|
+
disabled
|
|
44
|
+
} = props,
|
|
45
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
43
46
|
const apiRef = useGridApiContext();
|
|
44
47
|
const rootProps = useGridRootProps();
|
|
45
48
|
const ownerState = _extends({}, props, {
|
|
@@ -56,13 +59,14 @@ function GridColumnHeaderSortIconRaw(props) {
|
|
|
56
59
|
title: apiRef.current.getLocaleText('columnHeaderSortIconLabel'),
|
|
57
60
|
size: "small",
|
|
58
61
|
disabled: disabled
|
|
59
|
-
}, rootProps.slotProps?.baseIconButton, {
|
|
62
|
+
}, rootProps.slotProps?.baseIconButton, other, {
|
|
60
63
|
children: iconElement
|
|
61
64
|
}));
|
|
62
65
|
return /*#__PURE__*/_jsxs(GridIconButtonContainer, {
|
|
63
66
|
children: [index != null && /*#__PURE__*/_jsx(Badge, {
|
|
64
67
|
badgeContent: index,
|
|
65
68
|
color: "default",
|
|
69
|
+
overlap: "circular",
|
|
66
70
|
children: iconButton
|
|
67
71
|
}), index == null && iconButton]
|
|
68
72
|
});
|
|
@@ -75,6 +79,7 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderSortIconRaw.propTypes =
|
|
|
75
79
|
// ----------------------------------------------------------------------
|
|
76
80
|
direction: PropTypes.oneOf(['asc', 'desc']),
|
|
77
81
|
disabled: PropTypes.bool,
|
|
82
|
+
field: PropTypes.string.isRequired,
|
|
78
83
|
index: PropTypes.number,
|
|
79
84
|
sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])).isRequired
|
|
80
85
|
} : void 0;
|
|
@@ -4,6 +4,6 @@ export type GridFooterContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
};
|
|
6
6
|
declare const GridFooterContainer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
7
|
-
sx?: SxProps<Theme
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { GridFooterContainer };
|
|
@@ -4,6 +4,6 @@ export type GridOverlayProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
};
|
|
6
6
|
declare const GridOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
7
|
-
sx?: SxProps<Theme
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { GridOverlay };
|
|
@@ -141,6 +141,8 @@ export const GridRootStyles = styled('div', {
|
|
|
141
141
|
[`& .${c.treeDataGroupingCell}`]: styles.treeDataGroupingCell
|
|
142
142
|
}, {
|
|
143
143
|
[`& .${c.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
|
|
144
|
+
}, {
|
|
145
|
+
[`& .${c.treeDataGroupingCellLoadingContainer}`]: styles.treeDataGroupingCellLoadingContainer
|
|
144
146
|
}, {
|
|
145
147
|
[`& .${c.detailPanelToggleCell}`]: styles.detailPanelToggleCell
|
|
146
148
|
}, {
|
|
@@ -159,7 +161,7 @@ export const GridRootStyles = styled('div', {
|
|
|
159
161
|
const selectedOpacity = (t.vars || t).palette.action.selectedOpacity;
|
|
160
162
|
const selectedBackground = t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${selectedOpacity})` : alpha(t.palette.primary.main, selectedOpacity);
|
|
161
163
|
const selectedHoverBackground = t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(
|
|
162
|
-
${t.vars.palette.action.selectedOpacity} +
|
|
164
|
+
${t.vars.palette.action.selectedOpacity} +
|
|
163
165
|
${t.vars.palette.action.hoverOpacity}
|
|
164
166
|
))` : alpha(t.palette.primary.main, t.palette.action.selectedOpacity + t.palette.action.hoverOpacity);
|
|
165
167
|
const pinnedHoverBackground = t.vars ? hoverColor : blend(pinnedBackground, hoverColor, hoverOpacity);
|
|
@@ -423,6 +425,9 @@ export const GridRootStyles = styled('div', {
|
|
|
423
425
|
backgroundColor: 'transparent'
|
|
424
426
|
}
|
|
425
427
|
},
|
|
428
|
+
[`&.${c.rowSkeleton}:hover`]: {
|
|
429
|
+
backgroundColor: 'transparent'
|
|
430
|
+
},
|
|
426
431
|
'&.Mui-selected': selectedStyles
|
|
427
432
|
},
|
|
428
433
|
[`& .${c['container--top']}, & .${c['container--bottom']}`]: {
|
|
@@ -608,6 +613,12 @@ export const GridRootStyles = styled('div', {
|
|
|
608
613
|
alignSelf: 'stretch',
|
|
609
614
|
marginRight: t.spacing(2)
|
|
610
615
|
},
|
|
616
|
+
[`& .${c.treeDataGroupingCellLoadingContainer}`]: {
|
|
617
|
+
display: 'flex',
|
|
618
|
+
alignItems: 'center',
|
|
619
|
+
justifyContent: 'center',
|
|
620
|
+
height: '100%'
|
|
621
|
+
},
|
|
611
622
|
[`& .${c.groupingCriteriaCell}`]: {
|
|
612
623
|
display: 'flex',
|
|
613
624
|
alignItems: 'center',
|
|
@@ -623,7 +634,7 @@ export const GridRootStyles = styled('div', {
|
|
|
623
634
|
minWidth: 'calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))',
|
|
624
635
|
alignSelf: 'stretch',
|
|
625
636
|
[`&.${c['scrollbarFiller--borderTop']}`]: {
|
|
626
|
-
borderTop: '1px solid var(--
|
|
637
|
+
borderTop: '1px solid var(--rowBorderColor)'
|
|
627
638
|
},
|
|
628
639
|
[`&.${c['scrollbarFiller--pinnedRight']}`]: {
|
|
629
640
|
backgroundColor: 'var(--DataGrid-pinnedBackground)',
|
|
@@ -636,6 +647,12 @@ export const GridRootStyles = styled('div', {
|
|
|
636
647
|
},
|
|
637
648
|
[`& .${c['filler--borderTop']}`]: {
|
|
638
649
|
borderTop: '1px solid var(--DataGrid-rowBorderColor)'
|
|
650
|
+
},
|
|
651
|
+
/* Hide grid rows and vertical scrollbar when skeleton overlay is visible */
|
|
652
|
+
[`& .${c['main--hasSkeletonLoadingOverlay']}`]: {
|
|
653
|
+
[`& .${c.virtualScrollerContent}, & .${c['scrollbar--vertical']}, & .${c.pinnedRows}`]: {
|
|
654
|
+
display: 'none'
|
|
655
|
+
}
|
|
639
656
|
}
|
|
640
657
|
});
|
|
641
658
|
return gridStyle;
|
|
@@ -4,6 +4,6 @@ export type GridToolbarContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
};
|
|
6
6
|
declare const GridToolbarContainer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
7
|
-
sx?: SxProps<Theme
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { GridToolbarContainer };
|
|
@@ -16,7 +16,7 @@ export interface GridPanelProps extends Partial<React.ComponentProps<typeof Grid
|
|
|
16
16
|
open: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
|
|
19
|
-
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/Popper").PopperProps & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "
|
|
19
|
+
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/Popper").PopperProps & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "nonce" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "component" | "sx" | "components" | "slotProps" | "slots" | "placement" | "disablePortal" | "keepMounted" | "modifiers" | "anchorEl" | "popperOptions" | "popperRef" | "componentsProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
20
20
|
ownerState: OwnerState;
|
|
21
21
|
}, {}, {}>;
|
|
22
22
|
declare const GridPanel: React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -12,6 +12,6 @@ interface GridToolbarExportContainerProps {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
declare const GridToolbarExportContainer: React.ForwardRefExoticComponent<GridToolbarExportContainerProps & {
|
|
15
|
-
children?: React.ReactNode;
|
|
15
|
+
children?: React.ReactNode | undefined;
|
|
16
16
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
export { GridToolbarExportContainer };
|
|
@@ -9,7 +9,8 @@ import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
|
9
9
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
10
10
|
import { gridDimensionsSelector } from '../../hooks/features/dimensions';
|
|
11
11
|
import { useGridVirtualScroller } from '../../hooks/features/virtualization/useGridVirtualScroller';
|
|
12
|
-
import {
|
|
12
|
+
import { useGridOverlays } from '../../hooks/features/overlays/useGridOverlays';
|
|
13
|
+
import { GridOverlays as Overlays } from '../base/GridOverlays';
|
|
13
14
|
import { GridHeaders } from '../GridHeaders';
|
|
14
15
|
import { GridMainContainer as Container } from './GridMainContainer';
|
|
15
16
|
import { GridTopContainer as TopContainer } from './GridTopContainer';
|
|
@@ -19,12 +20,12 @@ import { GridVirtualScrollerFiller as SpaceFiller } from './GridVirtualScrollerF
|
|
|
19
20
|
import { GridVirtualScrollerRenderZone as RenderZone } from './GridVirtualScrollerRenderZone';
|
|
20
21
|
import { GridVirtualScrollbar as Scrollbar } from './GridVirtualScrollbar';
|
|
21
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
-
const useUtilityClasses = (ownerState, dimensions) => {
|
|
23
|
+
const useUtilityClasses = (ownerState, dimensions, loadingOverlayVariant) => {
|
|
23
24
|
const {
|
|
24
25
|
classes
|
|
25
26
|
} = ownerState;
|
|
26
27
|
const slots = {
|
|
27
|
-
root: ['main', dimensions.rightPinnedWidth > 0 && 'main--hasPinnedRight'],
|
|
28
|
+
root: ['main', dimensions.rightPinnedWidth > 0 && 'main--hasPinnedRight', loadingOverlayVariant === 'skeleton' && 'main--hasSkeletonLoadingOverlay'],
|
|
28
29
|
scroller: ['virtualScroller']
|
|
29
30
|
};
|
|
30
31
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
@@ -51,7 +52,8 @@ function GridVirtualScroller(props) {
|
|
|
51
52
|
const apiRef = useGridApiContext();
|
|
52
53
|
const rootProps = useGridRootProps();
|
|
53
54
|
const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
|
|
54
|
-
const
|
|
55
|
+
const overlaysProps = useGridOverlays();
|
|
56
|
+
const classes = useUtilityClasses(rootProps, dimensions, overlaysProps.loadingOverlayVariant);
|
|
55
57
|
const virtualScroller = useGridVirtualScroller();
|
|
56
58
|
const {
|
|
57
59
|
getContainerProps,
|
|
@@ -79,7 +81,7 @@ function GridVirtualScroller(props) {
|
|
|
79
81
|
position: "top",
|
|
80
82
|
virtualScroller: virtualScroller
|
|
81
83
|
})]
|
|
82
|
-
}), /*#__PURE__*/_jsx(
|
|
84
|
+
}), /*#__PURE__*/_jsx(Overlays, _extends({}, overlaysProps)), /*#__PURE__*/_jsx(Content, _extends({}, getContentProps(), {
|
|
83
85
|
children: /*#__PURE__*/_jsxs(RenderZone, _extends({}, getRenderZoneProps(), {
|
|
84
86
|
children: [rows, /*#__PURE__*/_jsx(rootProps.slots.detailPanels, {
|
|
85
87
|
virtualScroller: virtualScroller
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare const GridVirtualScrollerContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
-
sx?: SxProps<Theme
|
|
4
|
+
sx?: SxProps<Theme>;
|
|
5
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export { GridVirtualScrollerContent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare const GridVirtualScrollerRenderZone: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
-
sx?: SxProps<Theme
|
|
4
|
+
sx?: SxProps<Theme>;
|
|
5
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export { GridVirtualScrollerRenderZone };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount, GridColumnsManagement } from '../components';
|
|
2
|
+
import { GridSkeletonCell, GridColumnsPanel, GridFilterPanel, GridFooter, GridLoadingOverlay, GridNoRowsOverlay, GridPagination, GridPanel, GridRow, GridColumnHeaderFilterIconButton, GridRowCount, GridColumnsManagement, GridColumnHeaderSortIcon } from '../components';
|
|
3
3
|
import { GridCell } from '../components/cell/GridCell';
|
|
4
4
|
import { GridColumnHeaders } from '../components/GridColumnHeaders';
|
|
5
5
|
import { GridColumnMenu } from '../components/menu/columnMenu/GridColumnMenu';
|
|
@@ -14,6 +14,7 @@ export const DATA_GRID_DEFAULT_SLOTS_COMPONENTS = _extends({}, materialSlots, {
|
|
|
14
14
|
cell: GridCell,
|
|
15
15
|
skeletonCell: GridSkeletonCell,
|
|
16
16
|
columnHeaderFilterIconButton: GridColumnHeaderFilterIconButton,
|
|
17
|
+
columnHeaderSortIcon: GridColumnHeaderSortIcon,
|
|
17
18
|
columnMenu: GridColumnMenu,
|
|
18
19
|
columnHeaders: GridColumnHeaders,
|
|
19
20
|
detailPanels: GridDetailPanels,
|
|
@@ -362,6 +362,11 @@ export interface GridClasses {
|
|
|
362
362
|
* Styles applied to the main container element when it has right pinned columns.
|
|
363
363
|
*/
|
|
364
364
|
'main--hasPinnedRight': string;
|
|
365
|
+
/**
|
|
366
|
+
* Styles applied to the main container element when it has an active skeleton loading overlay.
|
|
367
|
+
* @ignore - do not document.
|
|
368
|
+
*/
|
|
369
|
+
'main--hasSkeletonLoadingOverlay': string;
|
|
365
370
|
/**
|
|
366
371
|
* Styles applied to the menu element.
|
|
367
372
|
*/
|
|
@@ -483,6 +488,10 @@ export interface GridClasses {
|
|
|
483
488
|
* Styles applied to the root element of the row reorder cell when dragging is allowed
|
|
484
489
|
*/
|
|
485
490
|
'rowReorderCell--draggable': string;
|
|
491
|
+
/**
|
|
492
|
+
* Styles applied to the skeleton row element.
|
|
493
|
+
*/
|
|
494
|
+
rowSkeleton: string;
|
|
486
495
|
/**
|
|
487
496
|
* Styles applied to both scroll area elements.
|
|
488
497
|
*/
|
|
@@ -573,6 +582,11 @@ export interface GridClasses {
|
|
|
573
582
|
* Styles applied to the toggle of the grouping cell of the tree data.
|
|
574
583
|
*/
|
|
575
584
|
treeDataGroupingCellToggle: string;
|
|
585
|
+
/**
|
|
586
|
+
* Styles applied to the loading container of the grouping cell of the tree data.
|
|
587
|
+
* @ignore - do not document.
|
|
588
|
+
*/
|
|
589
|
+
treeDataGroupingCellLoadingContainer: string;
|
|
576
590
|
/**
|
|
577
591
|
* Styles applied to the root element of the grouping criteria cell
|
|
578
592
|
*/
|
package/constants/gridClasses.js
CHANGED
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClasses as generateUtilityClasses, unstable_gen
|
|
|
2
2
|
export function getDataGridUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
4
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderTop', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
5
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'autoHeight', 'autosizing', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementFooter', 'container--top', 'container--bottom', 'detailPanel', 'detailPanels', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderTop', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hasSkeletonLoadingOverlay', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortIcon', 'toolbarContainer', 'toolbarFilterList', 'virtualScroller', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'pinnedColumns', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pinnedRowsRenderZone']);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridPrivateApiCommon } from '../../../models/api/gridApiCommon';
|
|
3
|
-
|
|
3
|
+
import { GridPipeProcessorGroup } from './gridPipeProcessingApi';
|
|
4
|
+
export declare const useGridRegisterPipeApplier: <PrivateApi extends GridPrivateApiCommon, G extends GridPipeProcessorGroup>(apiRef: React.MutableRefObject<PrivateApi>, group: G, callback: () => void) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridPrivateApiCommon } from '../../../models/api/gridApiCommon';
|
|
3
|
-
import { GridPipeProcessor } from './gridPipeProcessingApi';
|
|
4
|
-
export declare const useGridRegisterPipeProcessor: <PrivateApi extends GridPrivateApiCommon, G extends
|
|
3
|
+
import { GridPipeProcessorGroup, GridPipeProcessor } from './gridPipeProcessingApi';
|
|
4
|
+
export declare const useGridRegisterPipeProcessor: <PrivateApi extends GridPrivateApiCommon, G extends GridPipeProcessorGroup>(apiRef: React.MutableRefObject<PrivateApi>, group: G, callback: GridPipeProcessor<G>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridPrivateApiCommon } from '../../../models/api/gridApiCommon';
|
|
3
|
-
import { GridStrategyProcessor } from './gridStrategyProcessingApi';
|
|
4
|
-
export declare const useGridRegisterStrategyProcessor: <Api extends GridPrivateApiCommon, G extends
|
|
3
|
+
import { GridStrategyProcessorName, GridStrategyProcessor } from './gridStrategyProcessingApi';
|
|
4
|
+
export declare const useGridRegisterStrategyProcessor: <Api extends GridPrivateApiCommon, G extends GridStrategyProcessorName>(apiRef: React.MutableRefObject<Api>, strategyName: string, group: G, processor: GridStrategyProcessor<G>) => void;
|
|
@@ -4,4 +4,4 @@ import { DataGridProcessedProps } from '../../models/props/DataGridProps';
|
|
|
4
4
|
/**
|
|
5
5
|
* Initialize the technical pieces of the DataGrid (logger, state, ...) that any DataGrid implementation needs
|
|
6
6
|
*/
|
|
7
|
-
export declare const useGridInitialization: <PrivateApi extends GridPrivateApiCommon, Api extends GridApiCommon
|
|
7
|
+
export declare const useGridInitialization: <PrivateApi extends GridPrivateApiCommon, Api extends GridApiCommon>(inputApiRef: React.MutableRefObject<Api> | undefined, props: DataGridProcessedProps) => React.MutableRefObject<PrivateApi>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
|
|
3
3
|
import { DataGridProcessedProps } from '../../models/props/DataGridProps';
|
|
4
|
-
export declare const useGridLocaleText: (apiRef: React.MutableRefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps,
|
|
4
|
+
export declare const useGridLocaleText: (apiRef: React.MutableRefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps, "localeText">) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridPrivateApiCommon } from '../../models/api/gridApiCommon';
|
|
3
3
|
import { DataGridProcessedProps } from '../../models/props/DataGridProps';
|
|
4
|
-
export declare const useGridLoggerFactory: (apiRef: React.MutableRefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps,
|
|
4
|
+
export declare const useGridLoggerFactory: (apiRef: React.MutableRefObject<GridPrivateApiCommon>, props: Pick<DataGridProcessedProps, "logger" | "logLevel">) => void;
|
|
@@ -5,4 +5,4 @@ import type { DataGridProcessedProps } from '../../../models/props/DataGridProps
|
|
|
5
5
|
* @requires useGridCsvExport (method)
|
|
6
6
|
* @requires useGridSelection (method)
|
|
7
7
|
*/
|
|
8
|
-
export declare const useGridClipboard: (apiRef: React.MutableRefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps,
|
|
8
|
+
export declare const useGridClipboard: (apiRef: React.MutableRefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "ignoreValueFormatterDuringExport" | "onClipboardCopy" | "clipboardCopyCellDelimiter">) => void;
|
|
@@ -7,4 +7,4 @@ export declare const columnGroupsStateInitializer: GridStateInitializer<Pick<Dat
|
|
|
7
7
|
* @requires useGridColumns (method, event)
|
|
8
8
|
* @requires useGridParamsApi (method)
|
|
9
9
|
*/
|
|
10
|
-
export declare const useGridColumnGrouping: (apiRef: React.MutableRefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps,
|
|
10
|
+
export declare const useGridColumnGrouping: (apiRef: React.MutableRefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "columnGroupingModel">) => void;
|
|
@@ -7,4 +7,4 @@ export declare const columnResizeStateInitializer: GridStateInitializer;
|
|
|
7
7
|
* @requires useGridColumns (method, event)
|
|
8
8
|
* TODO: improve experience for last column
|
|
9
9
|
*/
|
|
10
|
-
export declare const useGridColumnResize: (apiRef: React.MutableRefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps,
|
|
10
|
+
export declare const useGridColumnResize: (apiRef: React.MutableRefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "autosizeOptions" | "autosizeOnMount" | "disableAutosize" | "onColumnResize" | "onColumnWidthChange">) => void;
|