@mui/x-data-grid-pro 8.0.0-alpha.7 → 8.0.0-alpha.8
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 +115 -0
- package/DataGridPro/DataGridPro.js +5 -7
- package/DataGridPro/useDataGridProComponent.js +1 -1
- package/components/headerFiltering/GridHeaderFilterCell.d.ts +7 -7
- package/components/headerFiltering/GridHeaderFilterCell.js +86 -39
- package/components/headerFiltering/GridHeaderFilterClearButton.js +2 -8
- package/components/headerFiltering/GridHeaderFilterMenu.d.ts +3 -1
- package/components/headerFiltering/GridHeaderFilterMenu.js +22 -6
- package/components/headerFiltering/GridHeaderFilterMenuContainer.d.ts +3 -1
- package/components/headerFiltering/GridHeaderFilterMenuContainer.js +17 -12
- package/esm/DataGridPro/DataGridPro.js +7 -9
- package/esm/DataGridPro/useDataGridProComponent.js +1 -1
- package/esm/components/headerFiltering/GridHeaderFilterCell.js +88 -41
- package/esm/components/headerFiltering/GridHeaderFilterClearButton.js +2 -8
- package/esm/components/headerFiltering/GridHeaderFilterMenu.js +23 -7
- package/esm/components/headerFiltering/GridHeaderFilterMenuContainer.js +17 -12
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +16 -15
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +14 -13
- package/hooks/features/columnPinning/useGridColumnPinning.d.ts +1 -1
- package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.d.ts +1 -1
- package/hooks/features/columnReorder/useGridColumnReorder.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourcePro.d.ts +1 -1
- package/hooks/features/dataSource/utils.d.ts +1 -1
- package/hooks/features/detailPanel/useGridDetailPanel.d.ts +1 -1
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.d.ts +1 -1
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.d.ts +1 -1
- package/hooks/features/lazyLoader/useGridLazyLoader.d.ts +1 -1
- package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.ts +1 -1
- package/hooks/features/lazyLoader/utils.d.ts +1 -1
- package/hooks/features/rowPinning/useGridRowPinning.d.ts +1 -1
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +2 -2
- package/hooks/features/rowReorder/useGridRowReorder.d.ts +1 -1
- package/hooks/features/rowReorder/useGridRowReorderPreProcessors.d.ts +1 -1
- package/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.d.ts +1 -1
- package/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.d.ts +1 -1
- package/hooks/features/treeData/gridTreeDataUtils.d.ts +1 -1
- package/hooks/features/treeData/useGridTreeData.d.ts +1 -1
- package/hooks/features/treeData/useGridTreeDataPreProcessors.d.ts +1 -1
- package/hooks/utils/useGridApiContext.d.ts +1 -1
- package/hooks/utils/useGridPrivateApiContext.d.ts +1 -1
- package/index.js +1 -1
- package/models/dataGridProProps.d.ts +1 -1
- package/modern/DataGridPro/DataGridPro.js +7 -9
- package/modern/DataGridPro/useDataGridProComponent.js +1 -1
- package/modern/components/headerFiltering/GridHeaderFilterCell.js +88 -41
- package/modern/components/headerFiltering/GridHeaderFilterClearButton.js +2 -8
- package/modern/components/headerFiltering/GridHeaderFilterMenu.js +23 -7
- package/modern/components/headerFiltering/GridHeaderFilterMenuContainer.js +17 -12
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +16 -15
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,121 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.8
|
|
9
|
+
|
|
10
|
+
_Jan 16, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🍬 Improved design for Data Grid [Header filters](https://next.mui.com/x/react-data-grid/filtering/header-filters/)
|
|
15
|
+
|
|
16
|
+
<img width="100%" alt="Data Grid Header filters" src="https://github.com/user-attachments/assets/74a50cd9-7a55-41fc-a2b8-f8a0d5b9120e" />
|
|
17
|
+
|
|
18
|
+
- 🔄 Data Grid [Scroll restoration](https://next.mui.com/x/react-data-grid/scrolling/#scroll-restoration)
|
|
19
|
+
- 📊 Charts support server-side rendering under [some conditions](https://next.mui.com/x/react-charts/getting-started/#server-side-rendering)
|
|
20
|
+
- 🐞 Bugfixes
|
|
21
|
+
|
|
22
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
23
|
+
@lauri865.
|
|
24
|
+
Following are all team members who have contributed to this release:
|
|
25
|
+
@arminmeh, @romgrk, @samuelsycamore, @alexfauquette, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen.
|
|
26
|
+
|
|
27
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
28
|
+
|
|
29
|
+
### Data Grid
|
|
30
|
+
|
|
31
|
+
#### Breaking changes
|
|
32
|
+
|
|
33
|
+
- The clear button in header filter cells has been moved to the header filter menu. Use `slotProps={{ headerFilterCell: { showClearIcon: true } }}` to restore the clear button in the cell.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid@8.0.0-alpha.8`
|
|
36
|
+
|
|
37
|
+
- [DataGrid] Improve scrollbar deadzone with overlay scrollbars (#15961) @lauri865
|
|
38
|
+
- [DataGrid] Header filter design improvements (#15991) @KenanYusuf
|
|
39
|
+
- [DataGrid] Scroll restoration (#15623) @lauri865
|
|
40
|
+
- [DataGrid] Fix row, cell and header memoizations (#15666) @lauri865
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.8`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPro] Add test for column pinning with disabled column virtualization (#16176) @cherniavskii
|
|
47
|
+
- [DataGridPro] Fix width of right-pinned column group during resize (#16199) @cherniavskii
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.8` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.8`.
|
|
52
|
+
|
|
53
|
+
### Date and Time Pickers
|
|
54
|
+
|
|
55
|
+
#### Breaking changes
|
|
56
|
+
|
|
57
|
+
- The field is now editable if rendered inside a mobile Picker — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#field-editing-on-mobile-pickers)
|
|
58
|
+
- The `useMultiInputDateRangeField`, `useMultiInputTimeRangeField`, and `useMultiInputDateTimeRangeField` hooks have been removed in favor of the new `useMultiInputRangeField` hook — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#usemultiinputdaterangefield)
|
|
59
|
+
- The component passed to the `field` slot no longer receives the `value`, `onChange`, `timezone`, `format`, `disabled`, `formatDensity`, `enableAccessibleFieldDOMStructure`, `selectedSections` and `onSelectedSectionsChange` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slot-field)
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.8`
|
|
62
|
+
|
|
63
|
+
- [pickers] Let the field components handle their opening UI, and allow field editing on mobile pickers (#15671) @flaviendelangle
|
|
64
|
+
- [pickers] Remove code duplication for the multi input range fields (#15505) @flaviendelangle
|
|
65
|
+
- [pickers] Rename `onRangePositionChange` into `setRangePosition` in `usePickerRangePositionContext` (#16189) @flaviendelangle
|
|
66
|
+
- [pickers] Use context to pass props from the picker to the field (#16042) @flaviendelangle
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
69
|
+
|
|
70
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.8`.
|
|
71
|
+
|
|
72
|
+
### Charts
|
|
73
|
+
|
|
74
|
+
#### Breaking changes
|
|
75
|
+
|
|
76
|
+
- Charts tooltip markers now have different styles for each chart type. The tooltip and legend marks are now the same.
|
|
77
|
+
- Duplicate axis id's across `x` and `y` axis now log a warning in dev mode. Axis ids should be unique to prevent internal issues.
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-charts@8.0.0-alpha.8`
|
|
80
|
+
|
|
81
|
+
- [charts] Fix flaky charts tests (#16180) @JCQuintas
|
|
82
|
+
- [charts] Handle case where gradient stop `offset` could be `Infinite` (#16131) @JCQuintas
|
|
83
|
+
- [charts] Make `useChartGradientId` public (#16106) @JCQuintas
|
|
84
|
+
- [charts] Move z-axis to plugin (#16130) @alexfauquette
|
|
85
|
+
- [charts] Plot data at first render if `skipAnimation` is set to `true` (#16166) @alexfauquette
|
|
86
|
+
- [charts] Replace tooltip mark with style (#16117) @JCQuintas
|
|
87
|
+
- [charts] Support `rtl` for gradient legend (#16115) @JCQuintas
|
|
88
|
+
- [charts] Use plugin system for series and axes (#15865) @alexfauquette
|
|
89
|
+
|
|
90
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
91
|
+
|
|
92
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.8`.
|
|
93
|
+
|
|
94
|
+
### Tree View
|
|
95
|
+
|
|
96
|
+
#### `@mui/x-tree-view@8.0.0-alpha.8`
|
|
97
|
+
|
|
98
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.7`.
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.8` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.8`.
|
|
103
|
+
|
|
104
|
+
### Docs
|
|
105
|
+
|
|
106
|
+
- [docs] Add example for custom legend (#16169) @alexfauquette
|
|
107
|
+
- [docs] Add full custom field creation example (#15194) @flaviendelangle
|
|
108
|
+
- [docs] Copyedit the Data Grid cell selection page (#16099) @samuelsycamore
|
|
109
|
+
- [docs] Fix demo rendering issue on Codesandbox (#16118) @arminmeh
|
|
110
|
+
- [docs] Remove broken links (#16167) @alexfauquette
|
|
111
|
+
- [docs] Split the Data Grid editing page (#14931) @MBilalShafi
|
|
112
|
+
- [docs] Fix wrong props warnings (#16119) @JCQuintas
|
|
113
|
+
|
|
114
|
+
### Core
|
|
115
|
+
|
|
116
|
+
- [core] Type all references as `RefObject` (#16124) @arminmeh
|
|
117
|
+
- [code-infra] Refactor `react` and `react-dom` definitions to simplify dep resolving (#16160) @LukasTy
|
|
118
|
+
- [code-infra] Stop renovate from updating `date-fns-v2` (#16158) @LukasTy
|
|
119
|
+
- [infra] Improve cherry-pick action target list (#16184) @michelengelen
|
|
120
|
+
- [test] Fix flaky column pinning unit test (#16202) @cherniavskii
|
|
121
|
+
- [test] Fix flaky screenshot (#16182) @cherniavskii
|
|
122
|
+
|
|
8
123
|
## 8.0.0-alpha.7
|
|
9
124
|
|
|
10
125
|
_Jan 9, 2025_
|
|
@@ -39,18 +39,16 @@ const DataGridProRaw = (0, _forwardRef.forwardRef)(function DataGridPro(inProps,
|
|
|
39
39
|
privateApiRef: privateApiRef,
|
|
40
40
|
configuration: configuration,
|
|
41
41
|
props: props,
|
|
42
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridRoot, (0, _extends2.default)({
|
|
43
43
|
className: props.className,
|
|
44
44
|
style: props.style,
|
|
45
45
|
sx: props.sx
|
|
46
46
|
}, props.slotProps?.root, {
|
|
47
47
|
ref: ref,
|
|
48
|
-
children:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
})
|
|
53
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridFooterPlaceholder, {})]
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
49
|
+
packageName: "x-data-grid-pro",
|
|
50
|
+
releaseInfo: releaseInfo
|
|
51
|
+
})
|
|
54
52
|
}))
|
|
55
53
|
});
|
|
56
54
|
});
|
|
@@ -53,6 +53,7 @@ const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
53
53
|
(0, _internals.useGridInitializeState)(_useGridColumnPinning.columnPinningStateInitializer, apiRef, props);
|
|
54
54
|
(0, _internals.useGridInitializeState)(_internals.columnsStateInitializer, apiRef, props);
|
|
55
55
|
(0, _internals.useGridInitializeState)(_useGridRowPinning.rowPinningStateInitializer, apiRef, props);
|
|
56
|
+
(0, _internals.useGridInitializeState)(_internals.paginationStateInitializer, apiRef, props);
|
|
56
57
|
(0, _internals.useGridInitializeState)(_internals.rowsStateInitializer, apiRef, props);
|
|
57
58
|
(0, _internals.useGridInitializeState)(_internals.editingStateInitializer, apiRef, props);
|
|
58
59
|
(0, _internals.useGridInitializeState)(_internals.focusStateInitializer, apiRef, props);
|
|
@@ -63,7 +64,6 @@ const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
63
64
|
(0, _internals.useGridInitializeState)(_internals.densityStateInitializer, apiRef, props);
|
|
64
65
|
(0, _internals.useGridInitializeState)(_useGridColumnReorder.columnReorderStateInitializer, apiRef, props);
|
|
65
66
|
(0, _internals.useGridInitializeState)(_internals.columnResizeStateInitializer, apiRef, props);
|
|
66
|
-
(0, _internals.useGridInitializeState)(_internals.paginationStateInitializer, apiRef, props);
|
|
67
67
|
(0, _internals.useGridInitializeState)(_internals.rowsMetaStateInitializer, apiRef, props);
|
|
68
68
|
(0, _internals.useGridInitializeState)(_internals.columnMenuStateInitializer, apiRef, props);
|
|
69
69
|
(0, _internals.useGridInitializeState)(_internals.columnGroupsStateInitializer, apiRef, props);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { GridFilterItem, GridFilterOperator, GridColDef
|
|
3
|
-
import { GridStateColDef } from '@mui/x-data-grid/internals';
|
|
2
|
+
import { GridFilterItem, GridFilterOperator, GridColDef } from '@mui/x-data-grid';
|
|
3
|
+
import { PinnedColumnPosition, GridStateColDef } from '@mui/x-data-grid/internals';
|
|
4
4
|
export interface GridRenderHeaderFilterProps extends GridHeaderFilterCellProps {
|
|
5
5
|
inputRef: React.RefObject<unknown>;
|
|
6
6
|
}
|
|
@@ -12,15 +12,15 @@ export interface GridHeaderFilterCellProps extends Pick<GridStateColDef, 'header
|
|
|
12
12
|
tabIndex: 0 | -1;
|
|
13
13
|
width: number;
|
|
14
14
|
colDef: GridColDef;
|
|
15
|
-
headerFilterMenuRef: React.
|
|
15
|
+
headerFilterMenuRef: React.RefObject<HTMLButtonElement | null>;
|
|
16
16
|
item: GridFilterItem;
|
|
17
17
|
showClearIcon?: boolean;
|
|
18
18
|
InputComponentProps: GridFilterOperator['InputComponentProps'];
|
|
19
|
-
pinnedPosition?:
|
|
19
|
+
pinnedPosition?: PinnedColumnPosition;
|
|
20
|
+
pinnedOffset?: number;
|
|
20
21
|
style?: React.CSSProperties;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
gridHasFiller: boolean;
|
|
22
|
+
showLeftBorder: boolean;
|
|
23
|
+
showRightBorder: boolean;
|
|
24
24
|
}
|
|
25
25
|
declare const Memoized: React.ForwardRefExoticComponent<GridHeaderFilterCellProps> | React.ForwardRefExoticComponent<GridHeaderFilterCellProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
26
|
export { Memoized as GridHeaderFilterCell };
|
|
@@ -11,16 +11,55 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
+
var _styles = require("@mui/material/styles");
|
|
14
15
|
var _utils = require("@mui/utils");
|
|
15
16
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
16
17
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
17
18
|
var _internals = require("@mui/x-data-grid/internals");
|
|
19
|
+
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
18
20
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
21
|
+
var _InputBase = require("@mui/material/InputBase");
|
|
19
22
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
20
23
|
var _GridHeaderFilterMenuContainer = require("./GridHeaderFilterMenuContainer");
|
|
21
24
|
var _GridHeaderFilterClearButton = require("./GridHeaderFilterClearButton");
|
|
22
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "
|
|
26
|
+
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "pinnedOffset", "style", "showLeftBorder", "showRightBorder"];
|
|
27
|
+
const StyledInputComponent = (0, _styles.styled)(_xDataGrid.GridFilterInputValue, {
|
|
28
|
+
name: 'MuiDataGrid',
|
|
29
|
+
slot: 'ColumnHeaderFilterInput'
|
|
30
|
+
})(({
|
|
31
|
+
theme
|
|
32
|
+
}) => ({
|
|
33
|
+
flex: 1,
|
|
34
|
+
marginRight: theme.spacing(0.5),
|
|
35
|
+
marginBottom: theme.spacing(-0.25),
|
|
36
|
+
'& input[type="number"], & input[type="date"], & input[type="datetime-local"]': {
|
|
37
|
+
'&[value=""]:not(:focus)': {
|
|
38
|
+
color: 'transparent'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
[`& .${_InputBase.inputBaseClasses.input}`]: {
|
|
42
|
+
fontSize: '14px'
|
|
43
|
+
},
|
|
44
|
+
[`.${_xDataGrid.gridClasses['root--densityCompact']} & .${_InputBase.inputBaseClasses.input}`]: {
|
|
45
|
+
paddingTop: theme.spacing(0.5),
|
|
46
|
+
paddingBottom: theme.spacing(0.5),
|
|
47
|
+
height: 23
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
const OperatorLabel = (0, _styles.styled)('span', {
|
|
51
|
+
name: 'MuiDataGrid',
|
|
52
|
+
slot: 'ColumnHeaderFilterOperatorLabel'
|
|
53
|
+
})(({
|
|
54
|
+
theme
|
|
55
|
+
}) => ({
|
|
56
|
+
flex: 1,
|
|
57
|
+
marginRight: theme.spacing(0.5),
|
|
58
|
+
color: theme.palette.text.secondary,
|
|
59
|
+
whiteSpace: 'nowrap',
|
|
60
|
+
textOverflow: 'ellipsis',
|
|
61
|
+
overflow: 'hidden'
|
|
62
|
+
}));
|
|
24
63
|
const useUtilityClasses = ownerState => {
|
|
25
64
|
const {
|
|
26
65
|
colDef,
|
|
@@ -30,16 +69,13 @@ const useUtilityClasses = ownerState => {
|
|
|
30
69
|
pinnedPosition
|
|
31
70
|
} = ownerState;
|
|
32
71
|
const slots = {
|
|
33
|
-
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition ===
|
|
72
|
+
root: ['columnHeader', 'columnHeader--filter', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === _internals.PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === _internals.PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight'],
|
|
73
|
+
input: ['columnHeaderFilterInput'],
|
|
74
|
+
operatorLabel: ['columnHeaderFilterOperatorLabel']
|
|
34
75
|
};
|
|
35
76
|
return (0, _utils.unstable_composeClasses)(slots, _xDataGrid.getDataGridUtilityClass, classes);
|
|
36
77
|
};
|
|
37
|
-
const
|
|
38
|
-
[`& input[value=""]:not(:focus)`]: {
|
|
39
|
-
color: 'transparent'
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const defaultInputComponents = {
|
|
78
|
+
const DEFAULT_INPUT_COMPONENTS = {
|
|
43
79
|
string: _xDataGrid.GridFilterInputValue,
|
|
44
80
|
number: _xDataGrid.GridFilterInputValue,
|
|
45
81
|
date: _xDataGrid.GridFilterInputDate,
|
|
@@ -60,15 +96,16 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
60
96
|
item,
|
|
61
97
|
headerFilterMenuRef,
|
|
62
98
|
InputComponentProps,
|
|
63
|
-
showClearIcon =
|
|
99
|
+
showClearIcon = false,
|
|
64
100
|
pinnedPosition,
|
|
101
|
+
pinnedOffset,
|
|
65
102
|
style: styleProp,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
gridHasFiller
|
|
103
|
+
showLeftBorder,
|
|
104
|
+
showRightBorder
|
|
69
105
|
} = props,
|
|
70
106
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
71
107
|
const apiRef = (0, _internals.useGridPrivateApiContext)();
|
|
108
|
+
const isRtl = (0, _RtlProvider.useRtl)();
|
|
72
109
|
const columnFields = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridVisibleColumnFieldsSelector);
|
|
73
110
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
74
111
|
const cellRef = React.useRef(null);
|
|
@@ -97,7 +134,7 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
97
134
|
return filterModelItem ? !filterableColumnsLookup[filterModelItem.field] : false;
|
|
98
135
|
}, [colDef.field, filterModel, filterableColumnsLookup]);
|
|
99
136
|
const currentOperator = React.useMemo(() => filterOperators.find(operator => operator.value === item.operator) ?? filterOperators[0], [item.operator, filterOperators]);
|
|
100
|
-
const InputComponent = colDef.filterable || isFilterReadOnly ? currentOperator.InputComponent ??
|
|
137
|
+
const InputComponent = colDef.filterable || isFilterReadOnly ? currentOperator.InputComponent ?? DEFAULT_INPUT_COMPONENTS[colDef.type] : null;
|
|
101
138
|
const clearFilterItem = React.useCallback(() => {
|
|
102
139
|
apiRef.current.deleteFilterItem(item);
|
|
103
140
|
}, [apiRef, item]);
|
|
@@ -183,8 +220,6 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
183
220
|
onMouseDown: publish('headerFilterMouseDown', onMouseDown),
|
|
184
221
|
onBlur: publish('headerFilterBlur')
|
|
185
222
|
}), [onMouseDown, onKeyDown, publish]);
|
|
186
|
-
const showLeftBorder = (0, _internals.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
|
|
187
|
-
const showRightBorder = (0, _internals.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
188
223
|
const ownerState = (0, _extends2.default)({}, rootProps, {
|
|
189
224
|
pinnedPosition,
|
|
190
225
|
colDef,
|
|
@@ -192,23 +227,45 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
192
227
|
showRightBorder
|
|
193
228
|
});
|
|
194
229
|
const classes = useUtilityClasses(ownerState);
|
|
230
|
+
const label = currentOperator.headerLabel ?? apiRef.current.getLocaleText(`headerFilterOperator${(0, _utils.unstable_capitalize)(item.operator)}`);
|
|
195
231
|
const isNoInputOperator = currentOperator.requiresFilterValue === false;
|
|
196
232
|
const isApplied = item?.value !== undefined || isNoInputOperator;
|
|
197
|
-
const label = currentOperator.headerLabel ?? apiRef.current.getLocaleText(`headerFilterOperator${(0, _utils.unstable_capitalize)(item.operator)}`);
|
|
198
233
|
const isFilterActive = isApplied || hasFocus;
|
|
234
|
+
const headerFilterMenu = /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderFilterMenuContainer.GridHeaderFilterMenuContainer, {
|
|
235
|
+
operators: filterOperators,
|
|
236
|
+
item: item,
|
|
237
|
+
field: colDef.field,
|
|
238
|
+
disabled: isFilterReadOnly,
|
|
239
|
+
applyFilterChanges: apiRef.current.upsertFilterItem,
|
|
240
|
+
headerFilterMenuRef: headerFilterMenuRef,
|
|
241
|
+
buttonRef: buttonRef,
|
|
242
|
+
showClearItem: !showClearIcon && isApplied,
|
|
243
|
+
clearFilterItem: clearFilterItem
|
|
244
|
+
});
|
|
245
|
+
const clearButton = showClearIcon && isApplied ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderFilterClearButton.GridHeaderFilterClearButton, {
|
|
246
|
+
onClick: clearFilterItem,
|
|
247
|
+
disabled: isFilterReadOnly
|
|
248
|
+
}) : null;
|
|
199
249
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
200
250
|
className: (0, _clsx.default)(classes.root, headerClassName),
|
|
201
|
-
style: (0, _extends2.default)({
|
|
251
|
+
style: (0, _internals.attachPinnedStyle)((0, _extends2.default)({
|
|
202
252
|
height,
|
|
203
253
|
width
|
|
204
|
-
}, styleProp),
|
|
254
|
+
}, styleProp), isRtl, pinnedPosition, pinnedOffset),
|
|
205
255
|
role: "columnheader",
|
|
206
256
|
"aria-colindex": colIndex + 1,
|
|
207
257
|
"aria-label": headerFilterComponent == null ? colDef.headerName ?? colDef.field : undefined
|
|
208
258
|
}, other, mouseEventsHandlers, {
|
|
209
259
|
ref: handleRef,
|
|
210
|
-
children: [headerFilterComponent,
|
|
211
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
260
|
+
children: [headerFilterComponent, headerFilterComponent === undefined ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
261
|
+
children: [isNoInputOperator ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
262
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(OperatorLabel, {
|
|
263
|
+
className: classes.operatorLabel,
|
|
264
|
+
children: label
|
|
265
|
+
}), clearButton, headerFilterMenu]
|
|
266
|
+
}) : null, InputComponent && !isNoInputOperator ? /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledInputComponent, (0, _extends2.default)({
|
|
267
|
+
as: InputComponent,
|
|
268
|
+
className: classes.input,
|
|
212
269
|
apiRef: apiRef,
|
|
213
270
|
item: item,
|
|
214
271
|
inputRef: inputRef,
|
|
@@ -231,25 +288,15 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
231
288
|
label: (0, _utils.unstable_capitalize)(label),
|
|
232
289
|
placeholder: "",
|
|
233
290
|
isFilterActive: isFilterActive,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
disabled: isFilterReadOnly
|
|
237
|
-
}) : null,
|
|
291
|
+
variant: "outlined",
|
|
292
|
+
size: "small",
|
|
238
293
|
disabled: isFilterReadOnly || isNoInputOperator,
|
|
239
294
|
tabIndex: -1,
|
|
240
|
-
|
|
241
|
-
|
|
295
|
+
headerFilterMenu: headerFilterMenu,
|
|
296
|
+
clearButton: clearButton
|
|
242
297
|
}, isNoInputOperator ? {
|
|
243
298
|
value: ''
|
|
244
|
-
} : {}, currentOperator?.InputComponentProps, InputComponentProps))
|
|
245
|
-
operators: filterOperators,
|
|
246
|
-
item: item,
|
|
247
|
-
field: colDef.field,
|
|
248
|
-
disabled: isFilterReadOnly,
|
|
249
|
-
applyFilterChanges: apiRef.current.upsertFilterItem,
|
|
250
|
-
headerFilterMenuRef: headerFilterMenuRef,
|
|
251
|
-
buttonRef: buttonRef
|
|
252
|
-
})]
|
|
299
|
+
} : {}, currentOperator?.InputComponentProps, InputComponentProps)) : null]
|
|
253
300
|
}) : null]
|
|
254
301
|
}));
|
|
255
302
|
});
|
|
@@ -260,7 +307,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
260
307
|
// ----------------------------------------------------------------------
|
|
261
308
|
colDef: _propTypes.default.object.isRequired,
|
|
262
309
|
colIndex: _propTypes.default.number.isRequired,
|
|
263
|
-
gridHasFiller: _propTypes.default.bool.isRequired,
|
|
264
310
|
hasFocus: _propTypes.default.bool,
|
|
265
311
|
/**
|
|
266
312
|
* Class name added to the column header cell.
|
|
@@ -270,7 +316,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
270
316
|
current: _propTypes.default.object
|
|
271
317
|
}).isRequired,
|
|
272
318
|
height: _propTypes.default.number.isRequired,
|
|
273
|
-
indexInSection: _propTypes.default.number.isRequired,
|
|
274
319
|
InputComponentProps: _propTypes.default.object,
|
|
275
320
|
item: _propTypes.default.shape({
|
|
276
321
|
field: _propTypes.default.string.isRequired,
|
|
@@ -278,9 +323,11 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
278
323
|
operator: _propTypes.default.string.isRequired,
|
|
279
324
|
value: _propTypes.default.any
|
|
280
325
|
}).isRequired,
|
|
281
|
-
|
|
282
|
-
|
|
326
|
+
pinnedOffset: _propTypes.default.number,
|
|
327
|
+
pinnedPosition: _propTypes.default.oneOf([0, 1, 2, 3]),
|
|
283
328
|
showClearIcon: _propTypes.default.bool,
|
|
329
|
+
showLeftBorder: _propTypes.default.bool.isRequired,
|
|
330
|
+
showRightBorder: _propTypes.default.bool.isRequired,
|
|
284
331
|
sortIndex: _propTypes.default.number,
|
|
285
332
|
style: _propTypes.default.object,
|
|
286
333
|
tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
|
|
@@ -10,19 +10,13 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
// FIXME(v8:romgrk): Make parametric
|
|
14
|
-
|
|
15
|
-
const style = {
|
|
16
|
-
padding: '2px'
|
|
17
|
-
};
|
|
18
13
|
function GridHeaderFilterClearButton(props) {
|
|
19
14
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
20
15
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
|
|
21
16
|
tabIndex: -1,
|
|
22
17
|
"aria-label": "Clear filter",
|
|
23
|
-
size: "small"
|
|
24
|
-
|
|
25
|
-
}, props, rootProps.slotProps?.baseIconButton, {
|
|
18
|
+
size: "small"
|
|
19
|
+
}, rootProps.slotProps?.baseIconButton, props, {
|
|
26
20
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuClearIcon, {
|
|
27
21
|
fontSize: "inherit"
|
|
28
22
|
})
|
|
@@ -9,8 +9,10 @@ interface GridHeaderFilterMenuProps {
|
|
|
9
9
|
id: string;
|
|
10
10
|
labelledBy: string;
|
|
11
11
|
target: HTMLElement | null;
|
|
12
|
+
showClearItem: boolean;
|
|
13
|
+
clearFilterItem: () => void;
|
|
12
14
|
}
|
|
13
|
-
declare function GridHeaderFilterMenu({ open, field, target, applyFilterChanges, operators, item, id, labelledBy, }: GridHeaderFilterMenuProps): React.JSX.Element | null;
|
|
15
|
+
declare function GridHeaderFilterMenu({ open, field, target, applyFilterChanges, operators, item, id, labelledBy, showClearItem, clearFilterItem, }: GridHeaderFilterMenuProps): React.JSX.Element | null;
|
|
14
16
|
declare namespace GridHeaderFilterMenu {
|
|
15
17
|
var propTypes: any;
|
|
16
18
|
}
|
|
@@ -20,7 +20,9 @@ function GridHeaderFilterMenu({
|
|
|
20
20
|
operators,
|
|
21
21
|
item,
|
|
22
22
|
id,
|
|
23
|
-
labelledBy
|
|
23
|
+
labelledBy,
|
|
24
|
+
showClearItem,
|
|
25
|
+
clearFilterItem
|
|
24
26
|
}) {
|
|
25
27
|
const apiRef = (0, _xDataGrid.useGridApiContext)();
|
|
26
28
|
const rootProps = (0, _xDataGrid.useGridRootProps)();
|
|
@@ -43,24 +45,36 @@ function GridHeaderFilterMenu({
|
|
|
43
45
|
open: open,
|
|
44
46
|
target: target,
|
|
45
47
|
onClose: hideMenu,
|
|
46
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(rootProps.slots.baseMenuList, {
|
|
47
49
|
"aria-labelledby": labelledBy,
|
|
48
50
|
id: id,
|
|
49
51
|
onKeyDown: handleListKeyDown,
|
|
50
|
-
children:
|
|
52
|
+
children: [showClearItem && [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
53
|
+
iconStart: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnMenuClearIcon, {
|
|
54
|
+
fontSize: "small"
|
|
55
|
+
}),
|
|
56
|
+
onClick: () => {
|
|
57
|
+
clearFilterItem();
|
|
58
|
+
hideMenu();
|
|
59
|
+
},
|
|
60
|
+
children: apiRef.current.getLocaleText('headerFilterClear')
|
|
61
|
+
}, "filter-menu-clear-filter"), /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseDivider, {}, "filter-menu-divider")], operators.map(op => {
|
|
62
|
+
const selected = op.value === item.operator;
|
|
51
63
|
const label = op?.headerLabel ?? apiRef.current.getLocaleText(`headerFilterOperator${(0, _utils.unstable_capitalize)(op.value)}`);
|
|
52
64
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseMenuItem, {
|
|
65
|
+
iconStart: selected ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.menuItemCheckIcon, {
|
|
66
|
+
fontSize: "small"
|
|
67
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {}),
|
|
53
68
|
onClick: () => {
|
|
54
69
|
applyFilterChanges((0, _extends2.default)({}, item, {
|
|
55
70
|
operator: op.value
|
|
56
71
|
}));
|
|
57
72
|
hideMenu();
|
|
58
73
|
},
|
|
59
|
-
autoFocus:
|
|
60
|
-
selected: op.value === item.operator,
|
|
74
|
+
autoFocus: selected ? open : false,
|
|
61
75
|
children: label
|
|
62
76
|
}, `${field}-${op.value}`);
|
|
63
|
-
})
|
|
77
|
+
})]
|
|
64
78
|
})
|
|
65
79
|
});
|
|
66
80
|
}
|
|
@@ -70,6 +84,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
70
84
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
71
85
|
// ----------------------------------------------------------------------
|
|
72
86
|
applyFilterChanges: _propTypes.default.func.isRequired,
|
|
87
|
+
clearFilterItem: _propTypes.default.func.isRequired,
|
|
73
88
|
field: _propTypes.default.string.isRequired,
|
|
74
89
|
id: _propTypes.default.string.isRequired,
|
|
75
90
|
item: _propTypes.default.shape({
|
|
@@ -90,5 +105,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenu.propTypes = {
|
|
|
90
105
|
requiresFilterValue: _propTypes.default.bool,
|
|
91
106
|
value: _propTypes.default.string.isRequired
|
|
92
107
|
})).isRequired,
|
|
108
|
+
showClearItem: _propTypes.default.bool.isRequired,
|
|
93
109
|
target: _utils.HTMLElementType
|
|
94
110
|
} : void 0;
|
|
@@ -5,9 +5,11 @@ declare function GridHeaderFilterMenuContainer(props: {
|
|
|
5
5
|
field: GridColDef['field'];
|
|
6
6
|
item: GridFilterItem;
|
|
7
7
|
applyFilterChanges: (item: GridFilterItem) => void;
|
|
8
|
-
headerFilterMenuRef: React.
|
|
8
|
+
headerFilterMenuRef: React.RefObject<HTMLButtonElement | null>;
|
|
9
9
|
buttonRef: React.Ref<HTMLButtonElement>;
|
|
10
10
|
disabled?: boolean;
|
|
11
|
+
showClearItem?: boolean;
|
|
12
|
+
clearFilterItem?: () => void;
|
|
11
13
|
}): React.JSX.Element | null;
|
|
12
14
|
declare namespace GridHeaderFilterMenuContainer {
|
|
13
15
|
var propTypes: any;
|
|
@@ -15,12 +15,7 @@ var _utils = require("@mui/utils");
|
|
|
15
15
|
var _internals = require("@mui/x-data-grid/internals");
|
|
16
16
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const _excluded = ["operators", "item", "field", "buttonRef", "headerFilterMenuRef", "disabled"];
|
|
19
|
-
const style = {
|
|
20
|
-
width: 22,
|
|
21
|
-
height: 22,
|
|
22
|
-
margin: 'auto 0 10px 5px'
|
|
23
|
-
};
|
|
18
|
+
const _excluded = ["operators", "item", "field", "buttonRef", "headerFilterMenuRef", "disabled", "showClearItem", "clearFilterItem"];
|
|
24
19
|
function GridHeaderFilterMenuContainer(props) {
|
|
25
20
|
const {
|
|
26
21
|
operators,
|
|
@@ -28,7 +23,9 @@ function GridHeaderFilterMenuContainer(props) {
|
|
|
28
23
|
field,
|
|
29
24
|
buttonRef,
|
|
30
25
|
headerFilterMenuRef,
|
|
31
|
-
disabled = false
|
|
26
|
+
disabled = false,
|
|
27
|
+
showClearItem,
|
|
28
|
+
clearFilterItem
|
|
32
29
|
} = props,
|
|
33
30
|
others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
34
31
|
const buttonId = (0, _utils.unstable_useId)();
|
|
@@ -58,11 +55,15 @@ function GridHeaderFilterMenuContainer(props) {
|
|
|
58
55
|
tabIndex: -1,
|
|
59
56
|
size: "small",
|
|
60
57
|
onClick: handleClick,
|
|
61
|
-
style: style,
|
|
62
58
|
disabled: disabled
|
|
63
59
|
}, rootProps.slotProps?.baseIconButton, {
|
|
64
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.
|
|
65
|
-
|
|
60
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseBadge, {
|
|
61
|
+
color: "primary",
|
|
62
|
+
variant: "dot",
|
|
63
|
+
badgeContent: showClearItem ? 1 : 0,
|
|
64
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.openFilterButtonIcon, {
|
|
65
|
+
fontSize: "inherit"
|
|
66
|
+
})
|
|
66
67
|
})
|
|
67
68
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.headerFilterMenu, (0, _extends2.default)({
|
|
68
69
|
field: field,
|
|
@@ -71,7 +72,9 @@ function GridHeaderFilterMenuContainer(props) {
|
|
|
71
72
|
target: headerFilterMenuRef.current,
|
|
72
73
|
operators: operators,
|
|
73
74
|
labelledBy: buttonId,
|
|
74
|
-
id: menuId
|
|
75
|
+
id: menuId,
|
|
76
|
+
clearFilterItem: clearFilterItem,
|
|
77
|
+
showClearItem: showClearItem
|
|
75
78
|
}, others))]
|
|
76
79
|
});
|
|
77
80
|
}
|
|
@@ -82,6 +85,7 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
82
85
|
// ----------------------------------------------------------------------
|
|
83
86
|
applyFilterChanges: _propTypes.default.func.isRequired,
|
|
84
87
|
buttonRef: _utils.refType,
|
|
88
|
+
clearFilterItem: _propTypes.default.func,
|
|
85
89
|
disabled: _propTypes.default.bool,
|
|
86
90
|
field: _propTypes.default.string.isRequired,
|
|
87
91
|
headerFilterMenuRef: _propTypes.default.shape({
|
|
@@ -102,5 +106,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterMenuContainer.propTypes
|
|
|
102
106
|
label: _propTypes.default.string,
|
|
103
107
|
requiresFilterValue: _propTypes.default.bool,
|
|
104
108
|
value: _propTypes.default.string.isRequired
|
|
105
|
-
})).isRequired
|
|
109
|
+
})).isRequired,
|
|
110
|
+
showClearItem: _propTypes.default.bool
|
|
106
111
|
} : void 0;
|
|
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useLicenseVerifier, Watermark } from '@mui/x-license';
|
|
7
|
-
import {
|
|
7
|
+
import { GridRoot, GridContextProvider } from '@mui/x-data-grid';
|
|
8
8
|
import { validateProps } from '@mui/x-data-grid/internals';
|
|
9
9
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
10
10
|
import { useDataGridProComponent } from "./useDataGridProComponent.js";
|
|
@@ -13,7 +13,7 @@ import { getReleaseInfo } from "../utils/releaseInfo.js";
|
|
|
13
13
|
import { propValidatorsDataGridPro } from "../internals/propValidation.js";
|
|
14
14
|
import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
15
15
|
import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
16
|
-
import { jsx as _jsx
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
const configuration = {
|
|
18
18
|
hooks: {
|
|
19
19
|
useGridAriaAttributes,
|
|
@@ -32,18 +32,16 @@ const DataGridProRaw = forwardRef(function DataGridPro(inProps, ref) {
|
|
|
32
32
|
privateApiRef: privateApiRef,
|
|
33
33
|
configuration: configuration,
|
|
34
34
|
props: props,
|
|
35
|
-
children: /*#__PURE__*/
|
|
35
|
+
children: /*#__PURE__*/_jsx(GridRoot, _extends({
|
|
36
36
|
className: props.className,
|
|
37
37
|
style: props.style,
|
|
38
38
|
sx: props.sx
|
|
39
39
|
}, props.slotProps?.root, {
|
|
40
40
|
ref: ref,
|
|
41
|
-
children:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
41
|
+
children: /*#__PURE__*/_jsx(Watermark, {
|
|
42
|
+
packageName: "x-data-grid-pro",
|
|
43
|
+
releaseInfo: releaseInfo
|
|
44
|
+
})
|
|
47
45
|
}))
|
|
48
46
|
});
|
|
49
47
|
});
|