@mui/x-data-grid 7.23.3 → 7.23.4
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 +38 -0
- package/DataGrid/DataGrid.js +4 -3
- package/README.md +1 -1
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +4 -4
- package/components/GridFooter.d.ts +2 -1
- package/components/GridFooter.js +4 -4
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridLoadingOverlay.js +3 -2
- package/components/GridNoResultsOverlay.d.ts +2 -1
- package/components/GridNoResultsOverlay.js +4 -4
- package/components/GridNoRowsOverlay.d.ts +2 -1
- package/components/GridNoRowsOverlay.js +4 -4
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +5 -3
- package/components/GridRow.d.ts +1 -1
- package/components/GridRow.js +3 -2
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +4 -3
- package/components/cell/GridActionsCellItem.d.ts +1 -1
- package/components/cell/GridActionsCellItem.js +3 -2
- package/components/cell/GridCell.d.ts +1 -1
- package/components/cell/GridCell.js +3 -2
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +72 -3
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.js +5 -3
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +5 -3
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +5 -3
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +5 -3
- package/components/containers/GridRoot.d.ts +1 -1
- package/components/containers/GridRoot.js +5 -3
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +3 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
- package/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +3 -2
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPanelWrapper.js +5 -3
- package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +3 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +17 -10
- package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +4 -4
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +3 -2
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +3 -2
- package/components/toolbar/GridToolbarExport.d.ts +1 -1
- package/components/toolbar/GridToolbarExport.js +2 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +3 -2
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/toolbar/GridToolbarFilterButton.js +3 -2
- package/components/virtualization/GridMainContainer.d.ts +3 -1
- package/components/virtualization/GridMainContainer.js +3 -2
- package/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +5 -5
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/index.js +1 -1
- package/locales/nlNL.js +5 -6
- package/modern/DataGrid/DataGrid.js +4 -3
- package/modern/components/GridColumnHeaders.js +4 -4
- package/modern/components/GridFooter.js +4 -4
- package/modern/components/GridLoadingOverlay.js +3 -2
- package/modern/components/GridNoResultsOverlay.js +4 -4
- package/modern/components/GridNoRowsOverlay.js +4 -4
- package/modern/components/GridPagination.js +5 -3
- package/modern/components/GridRow.js +3 -2
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +4 -3
- package/modern/components/cell/GridActionsCellItem.js +3 -2
- package/modern/components/cell/GridCell.js +3 -2
- package/modern/components/cell/GridEditInputCell.js +72 -3
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +5 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +5 -3
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +5 -3
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/modern/components/panel/GridPanel.js +3 -2
- package/modern/components/panel/GridPanelWrapper.js +5 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +3 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +17 -10
- package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/modern/components/toolbar/GridToolbar.js +4 -4
- package/modern/components/toolbar/GridToolbarColumnsButton.js +3 -2
- package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -2
- package/modern/components/toolbar/GridToolbarExport.js +2 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +3 -2
- package/modern/components/toolbar/GridToolbarFilterButton.js +3 -2
- package/modern/components/virtualization/GridMainContainer.js +3 -2
- package/modern/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/modern/components/virtualization/GridVirtualScrollerContent.js +5 -5
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/modern/index.js +1 -1
- package/modern/locales/nlNL.js +5 -6
- package/node/DataGrid/DataGrid.js +4 -3
- package/node/components/GridColumnHeaders.js +4 -4
- package/node/components/GridFooter.js +4 -4
- package/node/components/GridLoadingOverlay.js +3 -2
- package/node/components/GridNoResultsOverlay.js +4 -4
- package/node/components/GridNoRowsOverlay.js +4 -4
- package/node/components/GridPagination.js +5 -3
- package/node/components/GridRow.js +3 -2
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +4 -3
- package/node/components/cell/GridActionsCellItem.js +3 -2
- package/node/components/cell/GridCell.js +3 -2
- package/node/components/cell/GridEditInputCell.js +72 -3
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +5 -3
- package/node/components/columnSelection/GridHeaderCheckbox.js +5 -3
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +5 -3
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/node/components/panel/GridPanel.js +3 -2
- package/node/components/panel/GridPanelWrapper.js +5 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +3 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +17 -10
- package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/node/components/toolbar/GridToolbar.js +4 -4
- package/node/components/toolbar/GridToolbarColumnsButton.js +3 -2
- package/node/components/toolbar/GridToolbarDensitySelector.js +3 -2
- package/node/components/toolbar/GridToolbarExport.js +2 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +3 -2
- package/node/components/toolbar/GridToolbarFilterButton.js +3 -2
- package/node/components/virtualization/GridMainContainer.js +3 -2
- package/node/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/node/components/virtualization/GridVirtualScrollerContent.js +5 -5
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/node/index.js +1 -1
- package/node/locales/nlNL.js +5 -6
- package/package.json +1 -1
|
@@ -2,9 +2,11 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "hasFocus", "isValidating", "debounceMs", "isProcessingProps", "onValueChange"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
5
6
|
import { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
6
7
|
import { styled } from '@mui/material/styles';
|
|
7
8
|
import InputBase from '@mui/material/InputBase';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
9
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
12
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
@@ -31,7 +33,7 @@ const GridEditInputCellRoot = styled(InputBase, {
|
|
|
31
33
|
height: '100%'
|
|
32
34
|
}
|
|
33
35
|
}));
|
|
34
|
-
const GridEditInputCell =
|
|
36
|
+
const GridEditInputCell = forwardRef((props, ref) => {
|
|
35
37
|
const rootProps = useGridRootProps();
|
|
36
38
|
const {
|
|
37
39
|
id,
|
|
@@ -79,7 +81,6 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
79
81
|
}
|
|
80
82
|
}, [hasFocus]);
|
|
81
83
|
return /*#__PURE__*/_jsx(GridEditInputCellRoot, _extends({
|
|
82
|
-
ref: ref,
|
|
83
84
|
inputRef: inputRef,
|
|
84
85
|
className: classes.root,
|
|
85
86
|
ownerState: rootProps,
|
|
@@ -91,7 +92,75 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
91
92
|
fontSize: "small",
|
|
92
93
|
color: "action"
|
|
93
94
|
}) : undefined
|
|
94
|
-
}, other
|
|
95
|
+
}, other, {
|
|
96
|
+
ref: ref
|
|
97
|
+
}));
|
|
95
98
|
});
|
|
99
|
+
process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
100
|
+
// ----------------------------- Warning --------------------------------
|
|
101
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
102
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
103
|
+
// ----------------------------------------------------------------------
|
|
104
|
+
/**
|
|
105
|
+
* GridApi that let you manipulate the grid.
|
|
106
|
+
*/
|
|
107
|
+
api: PropTypes.object.isRequired,
|
|
108
|
+
/**
|
|
109
|
+
* The mode of the cell.
|
|
110
|
+
*/
|
|
111
|
+
cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
|
|
112
|
+
changeReason: PropTypes.oneOf(['debouncedSetEditCellValue', 'setEditCellValue']),
|
|
113
|
+
/**
|
|
114
|
+
* The column of the row that the current cell belongs to.
|
|
115
|
+
*/
|
|
116
|
+
colDef: PropTypes.object.isRequired,
|
|
117
|
+
debounceMs: PropTypes.number,
|
|
118
|
+
/**
|
|
119
|
+
* The column field of the cell that triggered the event.
|
|
120
|
+
*/
|
|
121
|
+
field: PropTypes.string.isRequired,
|
|
122
|
+
/**
|
|
123
|
+
* The cell value formatted with the column valueFormatter.
|
|
124
|
+
*/
|
|
125
|
+
formattedValue: PropTypes.any,
|
|
126
|
+
/**
|
|
127
|
+
* If true, the cell is the active element.
|
|
128
|
+
*/
|
|
129
|
+
hasFocus: PropTypes.bool.isRequired,
|
|
130
|
+
/**
|
|
131
|
+
* The grid row id.
|
|
132
|
+
*/
|
|
133
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
134
|
+
/**
|
|
135
|
+
* If true, the cell is editable.
|
|
136
|
+
*/
|
|
137
|
+
isEditable: PropTypes.bool,
|
|
138
|
+
isProcessingProps: PropTypes.bool,
|
|
139
|
+
isValidating: PropTypes.bool,
|
|
140
|
+
/**
|
|
141
|
+
* Callback called when the value is changed by the user.
|
|
142
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
143
|
+
* @param {Date | null} newValue The value that is going to be passed to `apiRef.current.setEditCellValue`.
|
|
144
|
+
* @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
|
|
145
|
+
*/
|
|
146
|
+
onValueChange: PropTypes.func,
|
|
147
|
+
/**
|
|
148
|
+
* The row model of the row that the current cell belongs to.
|
|
149
|
+
*/
|
|
150
|
+
row: PropTypes.any.isRequired,
|
|
151
|
+
/**
|
|
152
|
+
* The node of the row that the current cell belongs to.
|
|
153
|
+
*/
|
|
154
|
+
rowNode: PropTypes.object.isRequired,
|
|
155
|
+
/**
|
|
156
|
+
* the tabIndex value.
|
|
157
|
+
*/
|
|
158
|
+
tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
|
|
159
|
+
/**
|
|
160
|
+
* The cell value.
|
|
161
|
+
* If the column has `valueGetter`, use `params.row` to directly access the fields.
|
|
162
|
+
*/
|
|
163
|
+
value: PropTypes.any
|
|
164
|
+
} : void 0;
|
|
96
165
|
export { GridEditInputCell };
|
|
97
166
|
export const renderEditInputCell = params => /*#__PURE__*/_jsx(GridEditInputCell, _extends({}, params));
|
|
@@ -3,5 +3,5 @@ import { SxProps, Theme } from '@mui/system';
|
|
|
3
3
|
interface GridBaseColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
}
|
|
6
|
-
export declare const GridBaseColumnHeaders: React.ForwardRefExoticComponent<GridBaseColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const GridBaseColumnHeaders: React.ForwardRefExoticComponent<GridBaseColumnHeadersProps> | React.ForwardRefExoticComponent<GridBaseColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export {};
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
9
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -27,7 +28,7 @@ const GridColumnHeadersRoot = styled('div', {
|
|
|
27
28
|
borderTopLeftRadius: 'var(--unstable_DataGrid-radius)',
|
|
28
29
|
borderTopRightRadius: 'var(--unstable_DataGrid-radius)'
|
|
29
30
|
});
|
|
30
|
-
export const GridBaseColumnHeaders =
|
|
31
|
+
export const GridBaseColumnHeaders = forwardRef(function GridColumnHeaders(props, ref) {
|
|
31
32
|
const {
|
|
32
33
|
className
|
|
33
34
|
} = props,
|
|
@@ -35,10 +36,10 @@ export const GridBaseColumnHeaders = /*#__PURE__*/React.forwardRef(function Grid
|
|
|
35
36
|
const rootProps = useGridRootProps();
|
|
36
37
|
const classes = useUtilityClasses(rootProps);
|
|
37
38
|
return /*#__PURE__*/_jsx(GridColumnHeadersRoot, _extends({
|
|
38
|
-
ref: ref,
|
|
39
39
|
className: clsx(classes.root, className),
|
|
40
40
|
ownerState: rootProps
|
|
41
41
|
}, other, {
|
|
42
|
-
role: "presentation"
|
|
42
|
+
role: "presentation",
|
|
43
|
+
ref: ref
|
|
43
44
|
}));
|
|
44
45
|
});
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { isOverflown } from "../../utils/domUtils.js";
|
|
10
11
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
11
12
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -30,7 +31,7 @@ const GridColumnHeaderTitleRoot = styled('div', {
|
|
|
30
31
|
fontWeight: 'var(--unstable_DataGrid-headWeight)',
|
|
31
32
|
lineHeight: 'normal'
|
|
32
33
|
});
|
|
33
|
-
const ColumnHeaderInnerTitle =
|
|
34
|
+
const ColumnHeaderInnerTitle = forwardRef(function ColumnHeaderInnerTitle(props, ref) {
|
|
34
35
|
// Tooltip adds aria-label to the props, which is not needed since the children prop is a string
|
|
35
36
|
// See https://github.com/mui/mui-x/pull/14482
|
|
36
37
|
const {
|
|
@@ -40,10 +41,11 @@ const ColumnHeaderInnerTitle = /*#__PURE__*/React.forwardRef(function ColumnHead
|
|
|
40
41
|
const rootProps = useGridRootProps();
|
|
41
42
|
const classes = useUtilityClasses(rootProps);
|
|
42
43
|
return /*#__PURE__*/_jsx(GridColumnHeaderTitleRoot, _extends({
|
|
43
|
-
ref: ref,
|
|
44
44
|
className: clsx(classes.root, className),
|
|
45
45
|
ownerState: rootProps
|
|
46
|
-
}, other
|
|
46
|
+
}, other, {
|
|
47
|
+
ref: ref
|
|
48
|
+
}));
|
|
47
49
|
});
|
|
48
50
|
// No React.memo here as if we display the sort icon, we need to recalculate the isOver
|
|
49
51
|
function GridColumnHeaderTitle(props) {
|
|
@@ -28,5 +28,5 @@ interface GridGenericColumnHeaderItemProps extends Pick<GridStateColDef, 'header
|
|
|
28
28
|
columnHeaderSeparatorProps?: Partial<GridColumnHeaderSeparatorProps>;
|
|
29
29
|
style?: React.CSSProperties;
|
|
30
30
|
}
|
|
31
|
-
declare const GridGenericColumnHeaderItem: React.ForwardRefExoticComponent<GridGenericColumnHeaderItemProps & React.RefAttributes<
|
|
31
|
+
declare const GridGenericColumnHeaderItem: React.ForwardRefExoticComponent<GridGenericColumnHeaderItemProps> | React.ForwardRefExoticComponent<GridGenericColumnHeaderItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
32
32
|
export { GridGenericColumnHeaderItem };
|
|
@@ -4,12 +4,13 @@ const _excluded = ["classes", "columnMenuOpen", "colIndex", "height", "isResizin
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.js";
|
|
8
9
|
import { GridColumnHeaderTitle } from "./GridColumnHeaderTitle.js";
|
|
9
10
|
import { GridColumnHeaderSeparator } from "./GridColumnHeaderSeparator.js";
|
|
10
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const GridGenericColumnHeaderItem =
|
|
13
|
+
const GridGenericColumnHeaderItem = forwardRef(function GridGenericColumnHeaderItem(props, ref) {
|
|
13
14
|
const {
|
|
14
15
|
classes,
|
|
15
16
|
colIndex,
|
|
@@ -54,7 +55,6 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
|
|
|
54
55
|
}
|
|
55
56
|
}, [apiRef, hasFocus]);
|
|
56
57
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
57
|
-
ref: handleRef,
|
|
58
58
|
className: clsx(classes.root, headerClassName),
|
|
59
59
|
style: _extends({}, style, {
|
|
60
60
|
height,
|
|
@@ -65,6 +65,7 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
|
|
|
65
65
|
"aria-colindex": colIndex + 1,
|
|
66
66
|
"aria-sort": ariaSort
|
|
67
67
|
}, other, {
|
|
68
|
+
ref: handleRef,
|
|
68
69
|
children: [/*#__PURE__*/_jsxs("div", _extends({
|
|
69
70
|
className: classes.draggableContainer,
|
|
70
71
|
draggable: isDraggable,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type GridIconButtonContainerProps = React.HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export declare const GridIconButtonContainer: React.ForwardRefExoticComponent<GridIconButtonContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export declare const GridIconButtonContainer: React.ForwardRefExoticComponent<GridIconButtonContainerProps> | React.ForwardRefExoticComponent<GridIconButtonContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
9
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -26,7 +27,7 @@ const GridIconButtonContainerRoot = styled('div', {
|
|
|
26
27
|
visibility: 'hidden',
|
|
27
28
|
width: 0
|
|
28
29
|
}));
|
|
29
|
-
export const GridIconButtonContainer =
|
|
30
|
+
export const GridIconButtonContainer = forwardRef(function GridIconButtonContainer(props, ref) {
|
|
30
31
|
const {
|
|
31
32
|
className
|
|
32
33
|
} = props,
|
|
@@ -34,8 +35,9 @@ export const GridIconButtonContainer = /*#__PURE__*/React.forwardRef(function Gr
|
|
|
34
35
|
const rootProps = useGridRootProps();
|
|
35
36
|
const classes = useUtilityClasses(rootProps);
|
|
36
37
|
return /*#__PURE__*/_jsx(GridIconButtonContainerRoot, _extends({
|
|
37
|
-
ref: ref,
|
|
38
38
|
className: clsx(classes.root, className),
|
|
39
39
|
ownerState: rootProps
|
|
40
|
-
}, other
|
|
40
|
+
}, other, {
|
|
41
|
+
ref: ref
|
|
42
|
+
}));
|
|
41
43
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { GridRenderCellParams } from '../../models/params/gridCellParams';
|
|
3
|
-
declare const GridCellCheckboxForwardRef: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
3
|
+
declare const GridCellCheckboxForwardRef: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender>> | React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export { GridCellCheckboxForwardRef };
|
|
5
|
-
export declare const GridCellCheckboxRenderer: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export declare const GridCellCheckboxRenderer: React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender>> | React.ForwardRefExoticComponent<GridRenderCellParams<any, any, any, import("../..").GridTreeNodeWithRender> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -4,6 +4,7 @@ const _excluded = ["field", "id", "formattedValue", "row", "rowNode", "colDef",
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
8
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
9
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
@@ -19,7 +20,7 @@ const useUtilityClasses = ownerState => {
|
|
|
19
20
|
};
|
|
20
21
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
21
22
|
};
|
|
22
|
-
const GridCellCheckboxForwardRef =
|
|
23
|
+
const GridCellCheckboxForwardRef = forwardRef(function GridCellCheckboxRenderer(props, ref) {
|
|
23
24
|
const {
|
|
24
25
|
field,
|
|
25
26
|
id,
|
|
@@ -82,7 +83,6 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
82
83
|
const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
|
|
83
84
|
const label = apiRef.current.getLocaleText(checked ? 'checkboxSelectionUnselectRow' : 'checkboxSelectionSelectRow');
|
|
84
85
|
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
85
|
-
ref: handleRef,
|
|
86
86
|
tabIndex: tabIndex,
|
|
87
87
|
checked: checked,
|
|
88
88
|
onChange: handleChange,
|
|
@@ -94,7 +94,9 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
94
94
|
indeterminate: isIndeterminate,
|
|
95
95
|
disabled: !isSelectable,
|
|
96
96
|
touchRippleRef: rippleRef /* FIXME: typing error */
|
|
97
|
-
}, rootProps.slotProps?.baseCheckbox, other
|
|
97
|
+
}, rootProps.slotProps?.baseCheckbox, other, {
|
|
98
|
+
ref: handleRef
|
|
99
|
+
}));
|
|
98
100
|
});
|
|
99
101
|
process.env.NODE_ENV !== "production" ? GridCellCheckboxForwardRef.propTypes = {
|
|
100
102
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { GridColumnHeaderParams } from '../../models/params/gridColumnHeaderParams';
|
|
3
|
-
declare const GridHeaderCheckbox: React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../..").GridValidRowModel, any, any> & React.RefAttributes<HTMLButtonElement>>;
|
|
3
|
+
declare const GridHeaderCheckbox: React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../..").GridValidRowModel, any, any>> | React.ForwardRefExoticComponent<GridColumnHeaderParams<import("../..").GridValidRowModel, any, any> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export { GridHeaderCheckbox };
|
|
@@ -4,6 +4,7 @@ const _excluded = ["field", "colDef"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { isMultipleRowSelectionEnabled } from "../../hooks/features/rowSelection/utils.js";
|
|
8
9
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
9
10
|
import { gridTabIndexColumnHeaderSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
|
|
@@ -23,7 +24,7 @@ const useUtilityClasses = ownerState => {
|
|
|
23
24
|
};
|
|
24
25
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
25
26
|
};
|
|
26
|
-
const GridHeaderCheckbox =
|
|
27
|
+
const GridHeaderCheckbox = forwardRef(function GridHeaderCheckbox(props, ref) {
|
|
27
28
|
const other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
28
29
|
const [, forceUpdate] = React.useState(false);
|
|
29
30
|
const apiRef = useGridApiContext();
|
|
@@ -95,7 +96,6 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
95
96
|
const checked = rootProps.indeterminateCheckboxAction === 'select' ? isChecked && !isIndeterminate : isChecked;
|
|
96
97
|
const label = apiRef.current.getLocaleText(checked ? 'checkboxSelectionUnselectAllRows' : 'checkboxSelectionSelectAllRows');
|
|
97
98
|
return /*#__PURE__*/_jsx(rootProps.slots.baseCheckbox, _extends({
|
|
98
|
-
ref: ref,
|
|
99
99
|
indeterminate: isIndeterminate,
|
|
100
100
|
checked: checked,
|
|
101
101
|
onChange: handleChange,
|
|
@@ -106,7 +106,9 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
|
|
|
106
106
|
tabIndex: tabIndex,
|
|
107
107
|
onKeyDown: handleKeyDown,
|
|
108
108
|
disabled: !isMultipleRowSelectionEnabled(rootProps)
|
|
109
|
-
}, rootProps.slotProps?.baseCheckbox, other
|
|
109
|
+
}, rootProps.slotProps?.baseCheckbox, other, {
|
|
110
|
+
ref: ref
|
|
111
|
+
}));
|
|
110
112
|
});
|
|
111
113
|
process.env.NODE_ENV !== "production" ? GridHeaderCheckbox.propTypes = {
|
|
112
114
|
// ----------------------------- Warning --------------------------------
|
|
@@ -3,7 +3,7 @@ import { SxProps, Theme } from '@mui/system';
|
|
|
3
3
|
export type GridFooterContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
};
|
|
6
|
-
declare const GridFooterContainer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
declare const GridFooterContainer: React.ForwardRefExoticComponent<GridFooterContainerProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
sx?: SxProps<Theme>;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { GridFooterContainer };
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
10
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -29,7 +30,7 @@ const GridFooterContainerRoot = styled('div', {
|
|
|
29
30
|
minHeight: 52,
|
|
30
31
|
borderTop: '1px solid'
|
|
31
32
|
});
|
|
32
|
-
const GridFooterContainer =
|
|
33
|
+
const GridFooterContainer = forwardRef(function GridFooterContainer(props, ref) {
|
|
33
34
|
const {
|
|
34
35
|
className
|
|
35
36
|
} = props,
|
|
@@ -37,10 +38,11 @@ const GridFooterContainer = /*#__PURE__*/React.forwardRef(function GridFooterCon
|
|
|
37
38
|
const rootProps = useGridRootProps();
|
|
38
39
|
const classes = useUtilityClasses(rootProps);
|
|
39
40
|
return /*#__PURE__*/_jsx(GridFooterContainerRoot, _extends({
|
|
40
|
-
ref: ref,
|
|
41
41
|
className: clsx(classes.root, className),
|
|
42
42
|
ownerState: rootProps
|
|
43
|
-
}, other
|
|
43
|
+
}, other, {
|
|
44
|
+
ref: ref
|
|
45
|
+
}));
|
|
44
46
|
});
|
|
45
47
|
process.env.NODE_ENV !== "production" ? GridFooterContainer.propTypes = {
|
|
46
48
|
// ----------------------------- Warning --------------------------------
|
|
@@ -3,7 +3,7 @@ import { Theme, SxProps } from '@mui/system';
|
|
|
3
3
|
export type GridOverlayProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
};
|
|
6
|
-
declare const GridOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
declare const GridOverlay: React.ForwardRefExoticComponent<GridOverlayProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
sx?: SxProps<Theme>;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { GridOverlay };
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
10
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -31,7 +32,7 @@ const GridOverlayRoot = styled('div', {
|
|
|
31
32
|
justifyContent: 'center',
|
|
32
33
|
backgroundColor: 'var(--unstable_DataGrid-overlayBackground)'
|
|
33
34
|
});
|
|
34
|
-
const GridOverlay =
|
|
35
|
+
const GridOverlay = forwardRef(function GridOverlay(props, ref) {
|
|
35
36
|
const {
|
|
36
37
|
className
|
|
37
38
|
} = props,
|
|
@@ -39,10 +40,11 @@ const GridOverlay = /*#__PURE__*/React.forwardRef(function GridOverlay(props, re
|
|
|
39
40
|
const rootProps = useGridRootProps();
|
|
40
41
|
const classes = useUtilityClasses(rootProps);
|
|
41
42
|
return /*#__PURE__*/_jsx(GridOverlayRoot, _extends({
|
|
42
|
-
ref: ref,
|
|
43
43
|
className: clsx(classes.root, className),
|
|
44
44
|
ownerState: rootProps
|
|
45
|
-
}, other
|
|
45
|
+
}, other, {
|
|
46
|
+
ref: ref
|
|
47
|
+
}));
|
|
46
48
|
});
|
|
47
49
|
process.env.NODE_ENV !== "production" ? GridOverlay.propTypes = {
|
|
48
50
|
// ----------------------------- Warning --------------------------------
|
|
@@ -7,5 +7,5 @@ export interface GridRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
*/
|
|
8
8
|
sx?: SxProps<Theme>;
|
|
9
9
|
}
|
|
10
|
-
declare const GridRoot: React.ForwardRefExoticComponent<GridRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const GridRoot: React.ForwardRefExoticComponent<GridRootProps> | React.ForwardRefExoticComponent<GridRootProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export { GridRoot };
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_capitalize as capitalize, unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { GridRootStyles } from "./GridRootStyles.js";
|
|
9
10
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
10
11
|
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.js";
|
|
@@ -23,7 +24,7 @@ const useUtilityClasses = (ownerState, density) => {
|
|
|
23
24
|
};
|
|
24
25
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
25
26
|
};
|
|
26
|
-
const GridRoot =
|
|
27
|
+
const GridRoot = forwardRef(function GridRoot(props, ref) {
|
|
27
28
|
const rootProps = useGridRootProps();
|
|
28
29
|
const {
|
|
29
30
|
className
|
|
@@ -45,10 +46,11 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
|
|
|
45
46
|
return null;
|
|
46
47
|
}
|
|
47
48
|
return /*#__PURE__*/_jsx(GridRootStyles, _extends({
|
|
48
|
-
ref: handleRef,
|
|
49
49
|
className: clsx(classes.root, className),
|
|
50
50
|
ownerState: ownerState
|
|
51
|
-
}, other
|
|
51
|
+
}, other, {
|
|
52
|
+
ref: handleRef
|
|
53
|
+
}));
|
|
52
54
|
});
|
|
53
55
|
process.env.NODE_ENV !== "production" ? GridRoot.propTypes = {
|
|
54
56
|
// ----------------------------- Warning --------------------------------
|
|
@@ -3,7 +3,7 @@ import { SxProps, Theme } from '@mui/system';
|
|
|
3
3
|
export type GridToolbarContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
5
|
};
|
|
6
|
-
declare const GridToolbarContainer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
6
|
+
declare const GridToolbarContainer: React.ForwardRefExoticComponent<GridToolbarContainerProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
7
7
|
sx?: SxProps<Theme>;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { GridToolbarContainer };
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { styled } from '@mui/system';
|
|
8
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
10
11
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -31,7 +32,7 @@ const GridToolbarContainerRoot = styled('div', {
|
|
|
31
32
|
gap: theme.spacing(1),
|
|
32
33
|
padding: theme.spacing(0.5, 0.5, 0)
|
|
33
34
|
}));
|
|
34
|
-
const GridToolbarContainer =
|
|
35
|
+
const GridToolbarContainer = forwardRef(function GridToolbarContainer(props, ref) {
|
|
35
36
|
const {
|
|
36
37
|
className,
|
|
37
38
|
children
|
|
@@ -43,10 +44,10 @@ const GridToolbarContainer = /*#__PURE__*/React.forwardRef(function GridToolbarC
|
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
45
46
|
return /*#__PURE__*/_jsx(GridToolbarContainerRoot, _extends({
|
|
46
|
-
ref: ref,
|
|
47
47
|
className: clsx(classes.root, className),
|
|
48
48
|
ownerState: rootProps
|
|
49
49
|
}, other, {
|
|
50
|
+
ref: ref,
|
|
50
51
|
children: children
|
|
51
52
|
}));
|
|
52
53
|
});
|
|
@@ -19,6 +19,6 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS: {
|
|
|
19
19
|
displayOrder: number;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
declare const GridGenericColumnMenu: React.ForwardRefExoticComponent<GridGenericColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
23
|
-
declare const GridColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
22
|
+
declare const GridGenericColumnMenu: React.ForwardRefExoticComponent<GridGenericColumnMenuProps> | React.ForwardRefExoticComponent<GridGenericColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
23
|
+
declare const GridColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps> | React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
24
24
|
export { GridColumnMenu, GridGenericColumnMenu };
|
|
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["defaultSlots", "defaultSlotProps", "slots", "slotProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
6
7
|
import { useGridColumnMenuSlots } from "../../../hooks/features/columnMenu/useGridColumnMenuSlots.js";
|
|
7
8
|
import { GridColumnMenuContainer } from "./GridColumnMenuContainer.js";
|
|
8
9
|
import { GridColumnMenuColumnsItem } from "./menuItems/GridColumnMenuColumnsItem.js";
|
|
@@ -25,7 +26,7 @@ export const GRID_COLUMN_MENU_SLOT_PROPS = {
|
|
|
25
26
|
displayOrder: 30
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
|
-
const GridGenericColumnMenu =
|
|
29
|
+
const GridGenericColumnMenu = forwardRef(function GridGenericColumnMenu(props, ref) {
|
|
29
30
|
const {
|
|
30
31
|
defaultSlots,
|
|
31
32
|
defaultSlotProps,
|
|
@@ -39,9 +40,8 @@ const GridGenericColumnMenu = /*#__PURE__*/React.forwardRef(function GridGeneric
|
|
|
39
40
|
slots,
|
|
40
41
|
slotProps
|
|
41
42
|
}));
|
|
42
|
-
return /*#__PURE__*/_jsx(GridColumnMenuContainer, _extends({
|
|
43
|
-
ref: ref
|
|
44
|
-
}, other, {
|
|
43
|
+
return /*#__PURE__*/_jsx(GridColumnMenuContainer, _extends({}, other, {
|
|
44
|
+
ref: ref,
|
|
45
45
|
children: orderedSlots.map(([Component, otherProps], index) => /*#__PURE__*/_jsx(Component, _extends({}, otherProps), index))
|
|
46
46
|
}));
|
|
47
47
|
});
|
|
@@ -77,7 +77,7 @@ process.env.NODE_ENV !== "production" ? GridGenericColumnMenu.propTypes = {
|
|
|
77
77
|
*/
|
|
78
78
|
slots: PropTypes.object
|
|
79
79
|
} : void 0;
|
|
80
|
-
const GridColumnMenu =
|
|
80
|
+
const GridColumnMenu = forwardRef(function GridColumnMenu(props, ref) {
|
|
81
81
|
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
|
|
82
82
|
ref: ref,
|
|
83
83
|
defaultSlots: GRID_COLUMN_MENU_SLOTS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuContainerProps } from './GridColumnMenuProps';
|
|
3
|
-
declare const GridColumnMenuContainer: React.ForwardRefExoticComponent<GridColumnMenuContainerProps & React.RefAttributes<HTMLUListElement>>;
|
|
3
|
+
declare const GridColumnMenuContainer: React.ForwardRefExoticComponent<GridColumnMenuContainerProps> | React.ForwardRefExoticComponent<GridColumnMenuContainerProps & React.RefAttributes<HTMLUListElement>>;
|
|
4
4
|
export { GridColumnMenuContainer };
|
|
@@ -6,13 +6,14 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import MenuList from '@mui/material/MenuList';
|
|
8
8
|
import { styled } from '@mui/material/styles';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { isHideMenuKey } from "../../../utils/keyboardUtils.js";
|
|
10
11
|
import { gridClasses } from "../../../constants/gridClasses.js";
|
|
11
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
const StyledMenuList = styled(MenuList)(() => ({
|
|
13
14
|
minWidth: 248
|
|
14
15
|
}));
|
|
15
|
-
const GridColumnMenuContainer =
|
|
16
|
+
const GridColumnMenuContainer = forwardRef(function GridColumnMenuContainer(props, ref) {
|
|
16
17
|
const {
|
|
17
18
|
hideMenu,
|
|
18
19
|
id,
|
|
@@ -32,12 +33,12 @@ const GridColumnMenuContainer = /*#__PURE__*/React.forwardRef(function GridColum
|
|
|
32
33
|
}, [hideMenu]);
|
|
33
34
|
return /*#__PURE__*/_jsx(StyledMenuList, _extends({
|
|
34
35
|
id: id,
|
|
35
|
-
ref: ref,
|
|
36
36
|
className: clsx(gridClasses.menuList, className),
|
|
37
37
|
"aria-labelledby": labelledby,
|
|
38
38
|
onKeyDown: handleListKeyDown,
|
|
39
39
|
autoFocus: open
|
|
40
40
|
}, other, {
|
|
41
|
+
ref: ref,
|
|
41
42
|
children: children
|
|
42
43
|
}));
|
|
43
44
|
});
|
|
@@ -19,5 +19,5 @@ export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
|
|
|
19
19
|
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").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" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "nonce" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "component" | "sx" | "components" | "componentsProps" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
20
20
|
ownerState: OwnerState;
|
|
21
21
|
}, {}, {}>;
|
|
22
|
-
declare const GridPanel: React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const GridPanel: React.ForwardRefExoticComponent<GridPanelProps> | React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
23
|
export { GridPanel };
|