@mui/x-data-grid 5.17.24 → 5.17.26
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 +42 -0
- package/components/GridRowCount.js +3 -5
- package/components/GridScrollArea.js +3 -2
- package/components/GridSelectedRowCount.js +3 -5
- package/components/cell/GridEditInputCell.js +2 -4
- package/components/columnHeaders/GridColumnHeaderTitle.js +3 -5
- package/components/columnHeaders/GridColumnHeaders.js +3 -5
- package/components/columnHeaders/GridColumnHeadersInner.js +7 -5
- package/components/columnHeaders/GridIconButtonContainer.js +3 -5
- package/components/containers/GridFooterContainer.js +3 -5
- package/components/containers/GridMainContainer.js +2 -4
- package/components/containers/GridOverlay.js +3 -5
- package/components/containers/GridRoot.js +6 -5
- package/components/containers/GridRootStyles.d.ts +5 -1
- package/components/containers/GridToolbarContainer.js +3 -5
- package/components/menu/GridMenu.js +2 -4
- package/components/panel/GridColumnsPanel.js +5 -6
- package/components/panel/GridPanel.js +4 -0
- package/components/panel/GridPanelContent.js +3 -5
- package/components/panel/GridPanelFooter.js +3 -5
- package/components/panel/GridPanelHeader.js +3 -5
- package/components/panel/GridPanelWrapper.js +3 -5
- package/components/panel/filterPanel/GridFilterForm.js +8 -5
- package/components/toolbar/GridToolbarFilterButton.js +3 -5
- package/components/toolbar/GridToolbarQuickFilter.js +1 -0
- package/components/virtualization/GridVirtualScroller.js +3 -5
- package/components/virtualization/GridVirtualScrollerContent.js +5 -3
- package/components/virtualization/GridVirtualScrollerRenderZone.js +3 -5
- package/hooks/core/useGridLocaleText.js +1 -5
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/index.js +1 -1
- package/legacy/components/GridRowCount.js +3 -5
- package/legacy/components/GridScrollArea.js +3 -2
- package/legacy/components/GridSelectedRowCount.js +3 -5
- package/legacy/components/cell/GridEditInputCell.js +2 -4
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +3 -5
- package/legacy/components/columnHeaders/GridColumnHeaders.js +3 -5
- package/legacy/components/columnHeaders/GridColumnHeadersInner.js +7 -5
- package/legacy/components/columnHeaders/GridIconButtonContainer.js +3 -5
- package/legacy/components/containers/GridFooterContainer.js +3 -5
- package/legacy/components/containers/GridMainContainer.js +2 -4
- package/legacy/components/containers/GridOverlay.js +3 -5
- package/legacy/components/containers/GridRoot.js +7 -6
- package/legacy/components/containers/GridToolbarContainer.js +3 -5
- package/legacy/components/menu/GridMenu.js +2 -4
- package/legacy/components/panel/GridColumnsPanel.js +5 -8
- package/legacy/components/panel/GridPanel.js +4 -0
- package/legacy/components/panel/GridPanelContent.js +3 -5
- package/legacy/components/panel/GridPanelFooter.js +3 -5
- package/legacy/components/panel/GridPanelHeader.js +3 -5
- package/legacy/components/panel/GridPanelWrapper.js +3 -5
- package/legacy/components/panel/filterPanel/GridFilterForm.js +8 -5
- package/legacy/components/toolbar/GridToolbarFilterButton.js +3 -5
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +1 -0
- package/legacy/components/virtualization/GridVirtualScroller.js +3 -5
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +5 -3
- package/legacy/components/virtualization/GridVirtualScrollerRenderZone.js +3 -5
- package/legacy/hooks/core/useGridLocaleText.js +1 -5
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/legacy/index.js +1 -1
- package/legacy/locales/arSD.js +15 -15
- package/legacy/locales/csCZ.js +24 -24
- package/legacy/locales/esES.js +1 -1
- package/locales/arSD.js +15 -15
- package/locales/csCZ.js +23 -23
- package/locales/esES.js +1 -1
- package/modern/components/GridRowCount.js +3 -5
- package/modern/components/GridScrollArea.js +3 -2
- package/modern/components/GridSelectedRowCount.js +3 -5
- package/modern/components/cell/GridEditInputCell.js +2 -4
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +3 -5
- package/modern/components/columnHeaders/GridColumnHeaders.js +3 -5
- package/modern/components/columnHeaders/GridColumnHeadersInner.js +7 -5
- package/modern/components/columnHeaders/GridIconButtonContainer.js +3 -5
- package/modern/components/containers/GridFooterContainer.js +3 -5
- package/modern/components/containers/GridMainContainer.js +2 -4
- package/modern/components/containers/GridOverlay.js +3 -5
- package/modern/components/containers/GridRoot.js +6 -5
- package/modern/components/containers/GridToolbarContainer.js +3 -5
- package/modern/components/menu/GridMenu.js +2 -4
- package/modern/components/panel/GridColumnsPanel.js +5 -6
- package/modern/components/panel/GridPanel.js +4 -0
- package/modern/components/panel/GridPanelContent.js +3 -5
- package/modern/components/panel/GridPanelFooter.js +3 -5
- package/modern/components/panel/GridPanelHeader.js +3 -5
- package/modern/components/panel/GridPanelWrapper.js +3 -5
- package/modern/components/panel/filterPanel/GridFilterForm.js +8 -5
- package/modern/components/toolbar/GridToolbarFilterButton.js +3 -5
- package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -0
- package/modern/components/virtualization/GridVirtualScroller.js +3 -5
- package/modern/components/virtualization/GridVirtualScrollerContent.js +5 -3
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +3 -5
- package/modern/hooks/core/useGridLocaleText.js +1 -5
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -2
- package/modern/index.js +1 -1
- package/modern/locales/arSD.js +15 -15
- package/modern/locales/csCZ.js +23 -23
- package/modern/locales/esES.js +1 -1
- package/node/components/GridRowCount.js +3 -5
- package/node/components/GridScrollArea.js +3 -2
- package/node/components/GridSelectedRowCount.js +3 -5
- package/node/components/cell/GridEditInputCell.js +2 -4
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +3 -5
- package/node/components/columnHeaders/GridColumnHeaders.js +3 -5
- package/node/components/columnHeaders/GridColumnHeadersInner.js +5 -5
- package/node/components/columnHeaders/GridIconButtonContainer.js +3 -5
- package/node/components/containers/GridFooterContainer.js +3 -5
- package/node/components/containers/GridMainContainer.js +2 -4
- package/node/components/containers/GridOverlay.js +3 -5
- package/node/components/containers/GridRoot.js +4 -5
- package/node/components/containers/GridToolbarContainer.js +3 -5
- package/node/components/menu/GridMenu.js +2 -4
- package/node/components/panel/GridColumnsPanel.js +5 -6
- package/node/components/panel/GridPanel.js +5 -0
- package/node/components/panel/GridPanelContent.js +3 -5
- package/node/components/panel/GridPanelFooter.js +3 -5
- package/node/components/panel/GridPanelHeader.js +3 -5
- package/node/components/panel/GridPanelWrapper.js +3 -5
- package/node/components/panel/filterPanel/GridFilterForm.js +8 -5
- package/node/components/toolbar/GridToolbarFilterButton.js +3 -5
- package/node/components/toolbar/GridToolbarQuickFilter.js +1 -0
- package/node/components/virtualization/GridVirtualScroller.js +3 -5
- package/node/components/virtualization/GridVirtualScrollerContent.js +3 -3
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +3 -5
- package/node/hooks/core/useGridLocaleText.js +1 -6
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -0
- package/node/index.js +1 -1
- package/node/locales/arSD.js +15 -15
- package/node/locales/csCZ.js +23 -23
- package/node/locales/esES.js +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ import Paper from '@mui/material/Paper';
|
|
|
11
11
|
import Popper from '@mui/material/Popper';
|
|
12
12
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
13
13
|
import { isEscapeKey } from '../../utils/keyboardUtils';
|
|
14
|
+
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
export const gridPanelClasses = generateUtilityClasses('MuiDataGrid', ['panel', 'paper']);
|
|
16
17
|
const GridPanelRoot = styled(Popper, {
|
|
@@ -42,6 +43,7 @@ const GridPanel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
42
43
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
43
44
|
|
|
44
45
|
const apiRef = useGridApiContext();
|
|
46
|
+
const rootProps = useGridRootProps();
|
|
45
47
|
const classes = gridPanelClasses;
|
|
46
48
|
const [isPlaced, setIsPlaced] = React.useState(false);
|
|
47
49
|
const handleClickAway = React.useCallback(() => {
|
|
@@ -76,6 +78,7 @@ const GridPanel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
76
78
|
ref: ref,
|
|
77
79
|
placement: "bottom-start",
|
|
78
80
|
className: clsx(className, classes.panel),
|
|
81
|
+
ownerState: rootProps,
|
|
79
82
|
anchorEl: anchorEl,
|
|
80
83
|
modifiers: modifiers
|
|
81
84
|
}, other, {
|
|
@@ -84,6 +87,7 @@ const GridPanel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
84
87
|
onClickAway: handleClickAway,
|
|
85
88
|
children: /*#__PURE__*/_jsx(GridPaperRoot, {
|
|
86
89
|
className: classes.paper,
|
|
90
|
+
ownerState: rootProps,
|
|
87
91
|
elevation: 8,
|
|
88
92
|
onKeyDown: handleKeyDown,
|
|
89
93
|
children: isPlaced && children
|
|
@@ -39,12 +39,10 @@ function GridPanelContent(props) {
|
|
|
39
39
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
40
40
|
|
|
41
41
|
const rootProps = useGridRootProps();
|
|
42
|
-
const
|
|
43
|
-
classes: rootProps.classes
|
|
44
|
-
};
|
|
45
|
-
const classes = useUtilityClasses(ownerState);
|
|
42
|
+
const classes = useUtilityClasses(rootProps);
|
|
46
43
|
return /*#__PURE__*/_jsx(GridPanelContentRoot, _extends({
|
|
47
|
-
className: clsx(className, classes.root)
|
|
44
|
+
className: clsx(className, classes.root),
|
|
45
|
+
ownerState: rootProps
|
|
48
46
|
}, other));
|
|
49
47
|
}
|
|
50
48
|
|
|
@@ -39,12 +39,10 @@ function GridPanelFooter(props) {
|
|
|
39
39
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
40
40
|
|
|
41
41
|
const rootProps = useGridRootProps();
|
|
42
|
-
const
|
|
43
|
-
classes: rootProps.classes
|
|
44
|
-
};
|
|
45
|
-
const classes = useUtilityClasses(ownerState);
|
|
42
|
+
const classes = useUtilityClasses(rootProps);
|
|
46
43
|
return /*#__PURE__*/_jsx(GridPanelFooterRoot, _extends({
|
|
47
|
-
className: clsx(className, classes.root)
|
|
44
|
+
className: clsx(className, classes.root),
|
|
45
|
+
ownerState: rootProps
|
|
48
46
|
}, other));
|
|
49
47
|
}
|
|
50
48
|
|
|
@@ -37,12 +37,10 @@ function GridPanelHeader(props) {
|
|
|
37
37
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
38
38
|
|
|
39
39
|
const rootProps = useGridRootProps();
|
|
40
|
-
const
|
|
41
|
-
classes: rootProps.classes
|
|
42
|
-
};
|
|
43
|
-
const classes = useUtilityClasses(ownerState);
|
|
40
|
+
const classes = useUtilityClasses(rootProps);
|
|
44
41
|
return /*#__PURE__*/_jsx(GridPanelHeaderRoot, _extends({
|
|
45
|
-
className: clsx(className, classes.root)
|
|
42
|
+
className: clsx(className, classes.root),
|
|
43
|
+
ownerState: rootProps
|
|
46
44
|
}, other));
|
|
47
45
|
}
|
|
48
46
|
|
|
@@ -44,10 +44,7 @@ const GridPanelWrapper = /*#__PURE__*/React.forwardRef(function GridPanelWrapper
|
|
|
44
44
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
45
45
|
|
|
46
46
|
const rootProps = useGridRootProps();
|
|
47
|
-
const
|
|
48
|
-
classes: rootProps.classes
|
|
49
|
-
};
|
|
50
|
-
const classes = useUtilityClasses(ownerState);
|
|
47
|
+
const classes = useUtilityClasses(rootProps);
|
|
51
48
|
return /*#__PURE__*/_jsx(TrapFocus, _extends({
|
|
52
49
|
open: true,
|
|
53
50
|
disableEnforceFocus: true,
|
|
@@ -56,7 +53,8 @@ const GridPanelWrapper = /*#__PURE__*/React.forwardRef(function GridPanelWrapper
|
|
|
56
53
|
children: /*#__PURE__*/_jsx(GridPanelWrapperRoot, _extends({
|
|
57
54
|
ref: ref,
|
|
58
55
|
tabIndex: -1,
|
|
59
|
-
className: clsx(className, classes.root)
|
|
56
|
+
className: clsx(className, classes.root),
|
|
57
|
+
ownerState: rootProps
|
|
60
58
|
}, other))
|
|
61
59
|
}));
|
|
62
60
|
});
|
|
@@ -133,10 +133,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
133
133
|
const operatorSelectId = useId();
|
|
134
134
|
const operatorSelectLabelId = useId();
|
|
135
135
|
const rootProps = useGridRootProps();
|
|
136
|
-
const
|
|
137
|
-
classes: rootProps.classes
|
|
138
|
-
};
|
|
139
|
-
const classes = useUtilityClasses(ownerState);
|
|
136
|
+
const classes = useUtilityClasses(rootProps);
|
|
140
137
|
const valueRef = React.useRef(null);
|
|
141
138
|
const filterSelectorRef = React.useRef(null);
|
|
142
139
|
const hasLinkOperatorColumn = hasMultipleFilters && linkOperators.length > 0;
|
|
@@ -229,13 +226,15 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
229
226
|
}), [currentOperator]);
|
|
230
227
|
return /*#__PURE__*/_jsxs(GridFilterFormRoot, _extends({
|
|
231
228
|
ref: ref,
|
|
232
|
-
className: classes.root
|
|
229
|
+
className: classes.root,
|
|
230
|
+
ownerState: rootProps
|
|
233
231
|
}, other, {
|
|
234
232
|
children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({
|
|
235
233
|
variant: "standard",
|
|
236
234
|
as: rootProps.components.BaseFormControl
|
|
237
235
|
}, baseFormControlProps, deleteIconProps, {
|
|
238
236
|
className: clsx(classes.deleteIcon, baseFormControlProps.className, deleteIconProps.className),
|
|
237
|
+
ownerState: rootProps,
|
|
239
238
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
240
239
|
"aria-label": apiRef.current.getLocaleText('filterPanelDeleteIconLabel'),
|
|
241
240
|
title: apiRef.current.getLocaleText('filterPanelDeleteIconLabel'),
|
|
@@ -254,6 +253,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
254
253
|
visibility: showMultiFilterOperators ? 'visible' : 'hidden'
|
|
255
254
|
}, baseFormControlProps.sx || {}, linkOperatorInputProps.sx || {}),
|
|
256
255
|
className: clsx(classes.linkOperatorInput, baseFormControlProps.className, linkOperatorInputProps.className),
|
|
256
|
+
ownerState: rootProps,
|
|
257
257
|
children: /*#__PURE__*/_jsx(rootProps.components.BaseSelect, _extends({
|
|
258
258
|
inputProps: {
|
|
259
259
|
'aria-label': apiRef.current.getLocaleText('filterPanelLinkOperator')
|
|
@@ -273,6 +273,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
273
273
|
as: rootProps.components.BaseFormControl
|
|
274
274
|
}, baseFormControlProps, columnInputProps, {
|
|
275
275
|
className: clsx(classes.columnInput, baseFormControlProps.className, columnInputProps.className),
|
|
276
|
+
ownerState: rootProps,
|
|
276
277
|
children: [/*#__PURE__*/_jsx(InputLabel, {
|
|
277
278
|
htmlFor: columnSelectId,
|
|
278
279
|
id: columnSelectLabelId,
|
|
@@ -295,6 +296,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
295
296
|
as: rootProps.components.BaseFormControl
|
|
296
297
|
}, baseFormControlProps, operatorInputProps, {
|
|
297
298
|
className: clsx(classes.operatorInput, baseFormControlProps.className, operatorInputProps.className),
|
|
299
|
+
ownerState: rootProps,
|
|
298
300
|
children: [/*#__PURE__*/_jsx(InputLabel, {
|
|
299
301
|
htmlFor: operatorSelectId,
|
|
300
302
|
id: operatorSelectLabelId,
|
|
@@ -318,6 +320,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
318
320
|
as: rootProps.components.BaseFormControl
|
|
319
321
|
}, baseFormControlProps, valueInputPropsOther, {
|
|
320
322
|
className: clsx(classes.valueInput, baseFormControlProps.className, valueInputPropsOther.className),
|
|
323
|
+
ownerState: rootProps,
|
|
321
324
|
children: currentOperator?.InputComponent ? /*#__PURE__*/_jsx(currentOperator.InputComponent, _extends({
|
|
322
325
|
apiRef: apiRef,
|
|
323
326
|
item: item,
|
|
@@ -50,10 +50,7 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
50
50
|
const activeFilters = useGridSelector(apiRef, gridFilterActiveItemsSelector);
|
|
51
51
|
const lookup = useGridSelector(apiRef, gridColumnLookupSelector);
|
|
52
52
|
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
53
|
-
const
|
|
54
|
-
classes: rootProps.classes
|
|
55
|
-
};
|
|
56
|
-
const classes = useUtilityClasses(ownerState);
|
|
53
|
+
const classes = useUtilityClasses(rootProps);
|
|
57
54
|
const tooltipContentNode = React.useMemo(() => {
|
|
58
55
|
if (preferencePanel.open) {
|
|
59
56
|
return apiRef.current.getLocaleText('toolbarFiltersTooltipHide');
|
|
@@ -75,6 +72,7 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
75
72
|
return /*#__PURE__*/_jsxs("div", {
|
|
76
73
|
children: [apiRef.current.getLocaleText('toolbarFiltersTooltipActive')(activeFilters.length), /*#__PURE__*/_jsx(GridToolbarFilterListRoot, {
|
|
77
74
|
className: classes.root,
|
|
75
|
+
ownerState: rootProps,
|
|
78
76
|
children: activeFilters.map((item, index) => _extends({}, lookup[item.columnField] && /*#__PURE__*/_jsx("li", {
|
|
79
77
|
children: `${lookup[item.columnField].headerName || item.columnField}
|
|
80
78
|
${getOperatorLabel(item)}
|
|
@@ -82,7 +80,7 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
82
80
|
}, index)))
|
|
83
81
|
})]
|
|
84
82
|
});
|
|
85
|
-
}, [apiRef, preferencePanel.open, activeFilters, lookup, classes]);
|
|
83
|
+
}, [apiRef, rootProps, preferencePanel.open, activeFilters, lookup, classes]);
|
|
86
84
|
|
|
87
85
|
const toggleFilter = event => {
|
|
88
86
|
const {
|
|
@@ -84,6 +84,7 @@ function GridToolbarQuickFilter(props) {
|
|
|
84
84
|
}, [updateSearchValue]);
|
|
85
85
|
return /*#__PURE__*/_jsx(GridToolbarQuickFilterRoot, _extends({
|
|
86
86
|
as: rootProps.components.BaseTextField,
|
|
87
|
+
ownerState: rootProps,
|
|
87
88
|
variant: "standard",
|
|
88
89
|
value: searchValue,
|
|
89
90
|
onChange: handleSearchValueChange,
|
|
@@ -38,13 +38,11 @@ const GridVirtualScroller = /*#__PURE__*/React.forwardRef(function GridVirtualSc
|
|
|
38
38
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
39
39
|
|
|
40
40
|
const rootProps = useGridRootProps();
|
|
41
|
-
const
|
|
42
|
-
classes: rootProps.classes
|
|
43
|
-
};
|
|
44
|
-
const classes = useUtilityClasses(ownerState);
|
|
41
|
+
const classes = useUtilityClasses(rootProps);
|
|
45
42
|
return /*#__PURE__*/_jsx(VirtualScrollerRoot, _extends({
|
|
46
43
|
ref: ref,
|
|
47
|
-
className: clsx(classes.root, className)
|
|
44
|
+
className: clsx(classes.root, className),
|
|
45
|
+
ownerState: rootProps
|
|
48
46
|
}, other));
|
|
49
47
|
});
|
|
50
48
|
export { GridVirtualScroller };
|
|
@@ -33,14 +33,16 @@ const GridVirtualScrollerContent = /*#__PURE__*/React.forwardRef(function GridVi
|
|
|
33
33
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
34
34
|
|
|
35
35
|
const rootProps = useGridRootProps();
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
|
|
37
|
+
const ownerState = _extends({}, rootProps, {
|
|
38
38
|
overflowedContent: !rootProps.autoHeight && style?.minHeight === 'auto'
|
|
39
|
-
};
|
|
39
|
+
});
|
|
40
|
+
|
|
40
41
|
const classes = useUtilityClasses(ownerState);
|
|
41
42
|
return /*#__PURE__*/_jsx(VirtualScrollerContentRoot, _extends({
|
|
42
43
|
ref: ref,
|
|
43
44
|
className: clsx(classes.root, className),
|
|
45
|
+
ownerState: ownerState,
|
|
44
46
|
style: style
|
|
45
47
|
}, other));
|
|
46
48
|
});
|
|
@@ -36,13 +36,11 @@ const GridVirtualScrollerRenderZone = /*#__PURE__*/React.forwardRef(function Gri
|
|
|
36
36
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
37
37
|
|
|
38
38
|
const rootProps = useGridRootProps();
|
|
39
|
-
const
|
|
40
|
-
classes: rootProps.classes
|
|
41
|
-
};
|
|
42
|
-
const classes = useUtilityClasses(ownerState);
|
|
39
|
+
const classes = useUtilityClasses(rootProps);
|
|
43
40
|
return /*#__PURE__*/_jsx(VirtualScrollerRenderZoneRoot, _extends({
|
|
44
41
|
ref: ref,
|
|
45
|
-
className: clsx(classes.root, className)
|
|
42
|
+
className: clsx(classes.root, className),
|
|
43
|
+
ownerState: rootProps
|
|
46
44
|
}, other));
|
|
47
45
|
});
|
|
48
46
|
export { GridVirtualScrollerRenderZone };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useGridApiMethod } from '../utils/useGridApiMethod';
|
|
3
2
|
export const useGridLocaleText = (apiRef, props) => {
|
|
4
3
|
const getLocaleText = React.useCallback(key => {
|
|
5
4
|
if (props.localeText[key] == null) {
|
|
@@ -8,8 +7,5 @@ export const useGridLocaleText = (apiRef, props) => {
|
|
|
8
7
|
|
|
9
8
|
return props.localeText[key];
|
|
10
9
|
}, [props.localeText]);
|
|
11
|
-
|
|
12
|
-
getLocaleText
|
|
13
|
-
};
|
|
14
|
-
useGridApiMethod(apiRef, localeTextApi, 'LocaleTextApi');
|
|
10
|
+
apiRef.current.getLocaleText = getLocaleText;
|
|
15
11
|
};
|
|
@@ -19,9 +19,9 @@ import { getFirstColumnIndexToRender } from '../columns/gridColumnsUtils';
|
|
|
19
19
|
import { useGridVisibleRows } from '../../utils/useGridVisibleRows';
|
|
20
20
|
import { getRenderableIndexes } from '../virtualization/useGridVirtualScroller';
|
|
21
21
|
import { GridColumnGroupHeader } from '../../../components/columnHeaders/GridColumnGroupHeader';
|
|
22
|
-
import { isDeepEqual } from '../../../utils/utils';
|
|
23
|
-
|
|
22
|
+
import { isDeepEqual } from '../../../utils/utils';
|
|
24
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
// TODO: add the possibility to switch this value if needed for customization
|
|
25
25
|
const MERGE_EMPTY_CELLS = true;
|
|
26
26
|
const GridColumnHeaderRow = styled('div', {
|
|
27
27
|
name: 'MuiDataGrid',
|
|
@@ -223,6 +223,7 @@ export const useGridColumnHeaders = props => {
|
|
|
223
223
|
return /*#__PURE__*/_jsx(GridColumnHeaderRow, {
|
|
224
224
|
role: "row",
|
|
225
225
|
"aria-rowindex": headerGroupingMaxDepth + 1,
|
|
226
|
+
ownerState: rootProps,
|
|
226
227
|
children: columns
|
|
227
228
|
});
|
|
228
229
|
};
|
|
@@ -343,6 +344,7 @@ export const useGridColumnHeaders = props => {
|
|
|
343
344
|
},
|
|
344
345
|
role: "row",
|
|
345
346
|
"aria-rowindex": depthIndex + 1,
|
|
347
|
+
ownerState: rootProps,
|
|
346
348
|
children: depthInfo.elements.map(({
|
|
347
349
|
groupId,
|
|
348
350
|
width,
|
package/modern/index.js
CHANGED
package/modern/locales/arSD.js
CHANGED
|
@@ -21,15 +21,15 @@ const arSDGrid = {
|
|
|
21
21
|
toolbarFiltersTooltipShow: 'اظهر المرشِحات',
|
|
22
22
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} من المرشِحات النشطة` : `مرشِح نشط`,
|
|
23
23
|
// Quick filter toolbar field
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
toolbarQuickFilterPlaceholder: 'بحث...',
|
|
25
|
+
toolbarQuickFilterLabel: 'بحث',
|
|
26
|
+
toolbarQuickFilterDeleteIconLabel: 'أزال',
|
|
27
27
|
// Export selector toolbar button text
|
|
28
28
|
toolbarExport: 'تصدير',
|
|
29
29
|
toolbarExportLabel: 'تصدير',
|
|
30
30
|
toolbarExportCSV: 'تنزيل كملف CSV',
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
toolbarExportPrint: 'طباعة',
|
|
32
|
+
toolbarExportExcel: 'تحميل كملف الإكسل',
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'البحث عن العمود',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'عنوان العمود',
|
|
@@ -107,17 +107,17 @@ const arSDGrid = {
|
|
|
107
107
|
groupColumn: name => `تجميع حسب ${name}`,
|
|
108
108
|
unGroupColumn: name => `إيقاف التجميع حسب ${name}`,
|
|
109
109
|
// Master/detail
|
|
110
|
-
|
|
110
|
+
detailPanelToggle: 'اظهار/اخفاء لوحة التفاصيل',
|
|
111
111
|
expandDetailPanel: 'توسيع',
|
|
112
|
-
collapseDetailPanel: 'طوي'
|
|
113
|
-
//
|
|
112
|
+
collapseDetailPanel: 'طوي',
|
|
113
|
+
// Row reordering text
|
|
114
|
+
rowReorderingHeaderName: 'أعادة ترتيب الصفوف',
|
|
114
115
|
// Aggregation
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
aggregationMenuItemHeader: 'الدلالات الحسابية',
|
|
117
|
+
aggregationFunctionLabelSum: 'مجموع',
|
|
118
|
+
aggregationFunctionLabelAvg: 'معدل',
|
|
119
|
+
aggregationFunctionLabelMin: 'الحد الادنى',
|
|
120
|
+
aggregationFunctionLabelMax: 'الحد الاقصى',
|
|
121
|
+
aggregationFunctionLabelSize: 'الحجم'
|
|
122
122
|
};
|
|
123
123
|
export const arSD = getGridLocalization(arSDGrid, arSDCore);
|
package/modern/locales/csCZ.js
CHANGED
|
@@ -31,15 +31,15 @@ const csCZGrid = {
|
|
|
31
31
|
return `${count} ${pluralForm}`;
|
|
32
32
|
},
|
|
33
33
|
// Quick filter toolbar field
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
toolbarQuickFilterPlaceholder: 'Vyhledávat…',
|
|
35
|
+
toolbarQuickFilterLabel: 'Vyhledat',
|
|
36
|
+
toolbarQuickFilterDeleteIconLabel: 'Vymazat',
|
|
37
37
|
// Export selector toolbar button text
|
|
38
38
|
toolbarExport: 'Export',
|
|
39
39
|
toolbarExportLabel: 'Export',
|
|
40
40
|
toolbarExportCSV: 'Stáhnout jako CSV',
|
|
41
41
|
toolbarExportPrint: 'Vytisknout',
|
|
42
|
-
|
|
42
|
+
toolbarExportExcel: 'Stáhnout jako Excel',
|
|
43
43
|
// Columns panel text
|
|
44
44
|
columnsPanelTextFieldLabel: 'Najít sloupec',
|
|
45
45
|
columnsPanelTextFieldPlaceholder: 'Název sloupce',
|
|
@@ -49,7 +49,7 @@ const csCZGrid = {
|
|
|
49
49
|
// Filter panel text
|
|
50
50
|
filterPanelAddFilter: 'Přidat filtr',
|
|
51
51
|
filterPanelDeleteIconLabel: 'Odstranit',
|
|
52
|
-
|
|
52
|
+
filterPanelLinkOperator: 'Logický operátor',
|
|
53
53
|
filterPanelOperators: 'Operátory',
|
|
54
54
|
// TODO v6: rename to filterPanelOperator
|
|
55
55
|
filterPanelOperatorAnd: 'A',
|
|
@@ -70,7 +70,7 @@ const csCZGrid = {
|
|
|
70
70
|
filterOperatorOnOrBefore: 'je na nebo dříve',
|
|
71
71
|
filterOperatorIsEmpty: 'je prázdný',
|
|
72
72
|
filterOperatorIsNotEmpty: 'není prázdný',
|
|
73
|
-
|
|
73
|
+
filterOperatorIsAnyOf: 'je jeden z',
|
|
74
74
|
// Filter values text
|
|
75
75
|
filterValueAny: 'jakýkoliv',
|
|
76
76
|
filterValueTrue: 'ano',
|
|
@@ -120,10 +120,10 @@ const csCZGrid = {
|
|
|
120
120
|
},
|
|
121
121
|
// Checkbox selection text
|
|
122
122
|
checkboxSelectionHeaderName: 'Výběr řádku',
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
checkboxSelectionSelectAllRows: 'Označit všechny řádky',
|
|
124
|
+
checkboxSelectionUnselectAllRows: 'Odznačit všechny řádky',
|
|
125
|
+
checkboxSelectionSelectRow: 'Označit řádek',
|
|
126
|
+
checkboxSelectionUnselectRow: 'Odznačit řádek',
|
|
127
127
|
// Boolean cell text
|
|
128
128
|
booleanCellTrueLabel: 'ano',
|
|
129
129
|
booleanCellFalseLabel: 'ne',
|
|
@@ -139,20 +139,20 @@ const csCZGrid = {
|
|
|
139
139
|
treeDataCollapse: 'skrýt potomky',
|
|
140
140
|
// Grouping columns
|
|
141
141
|
groupingColumnHeaderName: 'Skupina',
|
|
142
|
-
groupColumn: name => `
|
|
143
|
-
unGroupColumn: name => `Přestat
|
|
144
|
-
//
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
groupColumn: name => `Zeskupit podle ${name}`,
|
|
143
|
+
unGroupColumn: name => `Přestat zeskupovat podle ${name}`,
|
|
144
|
+
// Master/detail
|
|
145
|
+
detailPanelToggle: 'Přepnout detail panelu',
|
|
146
|
+
expandDetailPanel: 'Rozbalit',
|
|
147
|
+
collapseDetailPanel: 'Sbalit',
|
|
147
148
|
// Row reordering text
|
|
148
|
-
|
|
149
|
+
rowReorderingHeaderName: 'Přeuspořádávání řádků',
|
|
149
150
|
// Aggregation
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
151
|
+
aggregationMenuItemHeader: 'Seskupování',
|
|
152
|
+
aggregationFunctionLabelSum: 'součet',
|
|
153
|
+
aggregationFunctionLabelAvg: 'průměr',
|
|
154
|
+
aggregationFunctionLabelMin: 'min',
|
|
155
|
+
aggregationFunctionLabelMax: 'max',
|
|
156
|
+
aggregationFunctionLabelSize: 'počet'
|
|
157
157
|
};
|
|
158
158
|
export const csCZ = getGridLocalization(csCZGrid, csCZCore);
|
package/modern/locales/esES.js
CHANGED
|
@@ -33,7 +33,7 @@ const esESGrid = {
|
|
|
33
33
|
// Columns panel text
|
|
34
34
|
columnsPanelTextFieldLabel: 'Columna de búsqueda',
|
|
35
35
|
columnsPanelTextFieldPlaceholder: 'Título de columna',
|
|
36
|
-
columnsPanelDragIconLabel: '
|
|
36
|
+
columnsPanelDragIconLabel: 'Reordenar columna',
|
|
37
37
|
columnsPanelShowAllButton: 'Mostrar todo',
|
|
38
38
|
columnsPanelHideAllButton: 'Ocultar todo',
|
|
39
39
|
// Filter panel text
|
|
@@ -64,10 +64,7 @@ const GridRowCount = /*#__PURE__*/React.forwardRef(function GridRowCount(props,
|
|
|
64
64
|
} = props,
|
|
65
65
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
66
66
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
67
|
-
const
|
|
68
|
-
const ownerState = {
|
|
69
|
-
classes: rootProps.classes
|
|
70
|
-
};
|
|
67
|
+
const ownerState = (0, _useGridRootProps.useGridRootProps)();
|
|
71
68
|
const classes = useUtilityClasses(ownerState);
|
|
72
69
|
|
|
73
70
|
if (rowCount === 0) {
|
|
@@ -77,7 +74,8 @@ const GridRowCount = /*#__PURE__*/React.forwardRef(function GridRowCount(props,
|
|
|
77
74
|
const text = visibleRowCount < rowCount ? apiRef.current.getLocaleText('footerTotalVisibleRows')(visibleRowCount, rowCount) : rowCount.toLocaleString();
|
|
78
75
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(GridRowCountRoot, (0, _extends2.default)({
|
|
79
76
|
ref: ref,
|
|
80
|
-
className: (0, _clsx.default)(classes.root, className)
|
|
77
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
78
|
+
ownerState: ownerState
|
|
81
79
|
}, other, {
|
|
82
80
|
children: [apiRef.current.getLocaleText('footerTotalRows'), " ", text]
|
|
83
81
|
}));
|
|
@@ -87,8 +87,8 @@ function GridScrollAreaRaw(props) {
|
|
|
87
87
|
top: 0
|
|
88
88
|
});
|
|
89
89
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
90
|
-
const ownerState = (0, _extends2.default)({},
|
|
91
|
-
|
|
90
|
+
const ownerState = (0, _extends2.default)({}, rootProps, {
|
|
91
|
+
scrollDirection
|
|
92
92
|
});
|
|
93
93
|
const classes = useUtilityClasses(ownerState);
|
|
94
94
|
const handleScrolling = React.useCallback(newScrollPosition => {
|
|
@@ -129,6 +129,7 @@ function GridScrollAreaRaw(props) {
|
|
|
129
129
|
return dragging ? /*#__PURE__*/(0, _jsxRuntime.jsx)(GridScrollAreaRawRoot, {
|
|
130
130
|
ref: rootRef,
|
|
131
131
|
className: (0, _clsx.default)(classes.root),
|
|
132
|
+
ownerState: ownerState,
|
|
132
133
|
onDragOver: handleDragOver,
|
|
133
134
|
style: {
|
|
134
135
|
height
|
|
@@ -71,15 +71,13 @@ const GridSelectedRowCount = /*#__PURE__*/React.forwardRef(function GridSelected
|
|
|
71
71
|
} = props,
|
|
72
72
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
73
73
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
74
|
-
const
|
|
75
|
-
const ownerState = {
|
|
76
|
-
classes: rootProps.classes
|
|
77
|
-
};
|
|
74
|
+
const ownerState = (0, _useGridRootProps.useGridRootProps)();
|
|
78
75
|
const classes = useUtilityClasses(ownerState);
|
|
79
76
|
const rowSelectedText = apiRef.current.getLocaleText('footerRowSelected')(selectedRowCount);
|
|
80
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridSelectedRowCountRoot, (0, _extends2.default)({
|
|
81
78
|
ref: ref,
|
|
82
|
-
className: (0, _clsx.default)(classes.root, className)
|
|
79
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
80
|
+
ownerState: ownerState
|
|
83
81
|
}, other, {
|
|
84
82
|
children: rowSelectedText
|
|
85
83
|
}));
|
|
@@ -82,10 +82,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
82
82
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
83
83
|
const inputRef = React.useRef();
|
|
84
84
|
const [valueState, setValueState] = React.useState(value);
|
|
85
|
-
const
|
|
86
|
-
classes: rootProps.classes
|
|
87
|
-
};
|
|
88
|
-
const classes = useUtilityClasses(ownerState);
|
|
85
|
+
const classes = useUtilityClasses(rootProps);
|
|
89
86
|
const handleChange = React.useCallback(async event => {
|
|
90
87
|
var _rootProps$experiment2;
|
|
91
88
|
|
|
@@ -126,6 +123,7 @@ const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
126
123
|
ref: ref,
|
|
127
124
|
inputRef: inputRef,
|
|
128
125
|
className: classes.root,
|
|
126
|
+
ownerState: rootProps,
|
|
129
127
|
fullWidth: true,
|
|
130
128
|
type: colDef.type === 'number' ? colDef.type : 'text',
|
|
131
129
|
value: valueState != null ? valueState : '',
|
|
@@ -63,13 +63,11 @@ const ColumnHeaderInnerTitle = /*#__PURE__*/React.forwardRef(function ColumnHead
|
|
|
63
63
|
} = props,
|
|
64
64
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
65
65
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
66
|
-
const
|
|
67
|
-
classes: rootProps.classes
|
|
68
|
-
};
|
|
69
|
-
const classes = useUtilityClasses(ownerState);
|
|
66
|
+
const classes = useUtilityClasses(rootProps);
|
|
70
67
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridColumnHeaderTitleRoot, (0, _extends2.default)({
|
|
71
68
|
ref: ref,
|
|
72
|
-
className: (0, _clsx.default)(classes.root, className)
|
|
69
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
70
|
+
ownerState: rootProps
|
|
73
71
|
}, other));
|
|
74
72
|
});
|
|
75
73
|
|
|
@@ -69,13 +69,11 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
|
|
|
69
69
|
} = props,
|
|
70
70
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
71
71
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
72
|
-
const
|
|
73
|
-
classes: rootProps.classes
|
|
74
|
-
};
|
|
75
|
-
const classes = useUtilityClasses(ownerState);
|
|
72
|
+
const classes = useUtilityClasses(rootProps);
|
|
76
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridColumnHeadersRoot, (0, _extends2.default)({
|
|
77
74
|
ref: ref,
|
|
78
|
-
className: (0, _clsx.default)(className, classes.root)
|
|
75
|
+
className: (0, _clsx.default)(className, classes.root),
|
|
76
|
+
ownerState: rootProps
|
|
79
77
|
}, other));
|
|
80
78
|
});
|
|
81
79
|
exports.GridColumnHeaders = GridColumnHeaders;
|
|
@@ -72,15 +72,15 @@ const GridColumnHeadersInner = /*#__PURE__*/React.forwardRef(function GridColumn
|
|
|
72
72
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
73
73
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
74
74
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
75
|
-
const ownerState = {
|
|
75
|
+
const ownerState = (0, _extends2.default)({}, rootProps, {
|
|
76
76
|
isDragging,
|
|
77
|
-
hasScrollX: (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.hasScrollX) != null ? _apiRef$current$getRo : false
|
|
78
|
-
|
|
79
|
-
};
|
|
77
|
+
hasScrollX: (_apiRef$current$getRo = (_apiRef$current$getRo2 = apiRef.current.getRootDimensions()) == null ? void 0 : _apiRef$current$getRo2.hasScrollX) != null ? _apiRef$current$getRo : false
|
|
78
|
+
});
|
|
80
79
|
const classes = useUtilityClasses(ownerState);
|
|
81
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridColumnHeadersInnerRoot, (0, _extends2.default)({
|
|
82
81
|
ref: ref,
|
|
83
|
-
className: (0, _clsx.default)(className, classes.root)
|
|
82
|
+
className: (0, _clsx.default)(className, classes.root),
|
|
83
|
+
ownerState: ownerState
|
|
84
84
|
}, other));
|
|
85
85
|
});
|
|
86
86
|
exports.GridColumnHeadersInner = GridColumnHeadersInner;
|
|
@@ -56,13 +56,11 @@ const GridIconButtonContainer = /*#__PURE__*/React.forwardRef(function GridIconB
|
|
|
56
56
|
} = props,
|
|
57
57
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
58
58
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
59
|
-
const
|
|
60
|
-
classes: rootProps.classes
|
|
61
|
-
};
|
|
62
|
-
const classes = useUtilityClasses(ownerState);
|
|
59
|
+
const classes = useUtilityClasses(rootProps);
|
|
63
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridIconButtonContainerRoot, (0, _extends2.default)({
|
|
64
61
|
ref: ref,
|
|
65
|
-
className: (0, _clsx.default)(classes.root, className)
|
|
62
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
63
|
+
ownerState: rootProps
|
|
66
64
|
}, other));
|
|
67
65
|
});
|
|
68
66
|
exports.GridIconButtonContainer = GridIconButtonContainer;
|
|
@@ -66,13 +66,11 @@ const GridFooterContainer = /*#__PURE__*/React.forwardRef(function GridFooterCon
|
|
|
66
66
|
} = props,
|
|
67
67
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
68
68
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
69
|
-
const
|
|
70
|
-
classes: rootProps.classes
|
|
71
|
-
};
|
|
72
|
-
const classes = useUtilityClasses(ownerState);
|
|
69
|
+
const classes = useUtilityClasses(rootProps);
|
|
73
70
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridFooterContainerRoot, (0, _extends2.default)({
|
|
74
71
|
ref: ref,
|
|
75
|
-
className: (0, _clsx.default)(classes.root, className)
|
|
72
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
73
|
+
ownerState: rootProps
|
|
76
74
|
}, other));
|
|
77
75
|
});
|
|
78
76
|
exports.GridFooterContainer = GridFooterContainer;
|