@mui/x-data-grid 8.4.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +103 -0
- package/DataGrid/DataGrid.js +4 -3
- package/components/GridColumnHeaders.js +1 -0
- package/components/GridFooter.js +1 -0
- package/components/GridLoadingOverlay.js +1 -0
- package/components/GridNoColumnsOverlay.js +1 -0
- package/components/GridNoResultsOverlay.js +2 -1
- package/components/GridNoRowsOverlay.js +1 -0
- package/components/GridRow.js +3 -2
- package/components/GridRowCount.js +1 -0
- package/components/GridSelectedRowCount.js +1 -0
- package/components/GridShadowScrollArea.js +1 -0
- package/components/GridSkeletonLoadingOverlay.js +3 -1
- package/components/cell/GridActionsCell.js +3 -3
- package/components/cell/GridActionsCellItem.js +1 -0
- package/components/cell/GridCell.js +11 -7
- package/components/cell/GridEditBooleanCell.js +6 -4
- package/components/cell/GridEditDateCell.js +4 -3
- package/components/cell/GridEditInputCell.js +5 -3
- package/components/cell/GridEditSingleSelectCell.js +2 -2
- package/components/cell/GridSkeletonCell.js +6 -5
- package/components/columnHeaders/GridBaseColumnHeaders.js +2 -1
- package/components/columnHeaders/GridColumnGroupHeader.js +6 -5
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +5 -4
- package/components/columnHeaders/GridColumnHeaderItem.js +7 -6
- package/components/columnHeaders/GridColumnHeaderSeparator.js +4 -3
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +4 -3
- package/components/columnHeaders/GridIconButtonContainer.js +2 -1
- package/components/columnSelection/GridCellCheckboxRenderer.js +5 -4
- package/components/columnSelection/GridHeaderCheckbox.js +1 -0
- package/components/columnsManagement/GridColumnsManagement.js +2 -2
- package/components/columnsPanel/ColumnsPanelTrigger.js +1 -0
- package/components/containers/GridFooterContainer.js +1 -0
- package/components/containers/GridOverlay.js +1 -0
- package/components/containers/GridRoot.js +7 -4
- package/components/containers/GridRootStyles.js +1 -1
- package/components/containers/GridToolbarContainer.js +1 -0
- package/components/export/ExportCsv.js +1 -0
- package/components/export/ExportPrint.js +1 -0
- package/components/filterPanel/FilterPanelTrigger.js +1 -0
- package/components/menu/GridMenu.js +6 -4
- package/components/menu/columnMenu/GridColumnMenu.js +2 -0
- package/components/menu/columnMenu/GridColumnMenuContainer.js +1 -0
- package/components/panel/GridPanel.js +3 -2
- package/components/panel/GridPanelWrapper.js +2 -1
- package/components/panel/filterPanel/GridFilterForm.js +10 -7
- package/components/panel/filterPanel/GridFilterInputBoolean.js +5 -4
- package/components/panel/filterPanel/GridFilterInputDate.js +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +3 -3
- package/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/components/panel/filterPanel/GridFilterPanel.js +1 -0
- package/components/quickFilter/QuickFilter.js +2 -2
- package/components/quickFilter/QuickFilterClear.js +1 -0
- package/components/quickFilter/QuickFilterControl.js +3 -2
- package/components/quickFilter/QuickFilterTrigger.js +3 -2
- package/components/toolbar/GridToolbar.js +3 -2
- package/components/toolbar/GridToolbarColumnsButton.js +1 -0
- package/components/toolbar/GridToolbarDensitySelector.js +6 -4
- package/components/toolbar/GridToolbarExport.js +1 -0
- package/components/toolbar/GridToolbarExportContainer.js +6 -4
- package/components/toolbar/GridToolbarFilterButton.js +8 -5
- package/components/toolbarV8/Toolbar.js +1 -0
- package/components/toolbarV8/ToolbarButton.js +3 -2
- package/components/virtualization/GridMainContainer.js +2 -1
- package/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/components/virtualization/GridVirtualScrollerContent.js +2 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
- package/constants/gridClasses.d.ts +4 -0
- package/constants/gridClasses.js +5 -3
- package/esm/DataGrid/DataGrid.js +4 -3
- package/esm/components/GridColumnHeaders.js +1 -0
- package/esm/components/GridFooter.js +1 -0
- package/esm/components/GridLoadingOverlay.js +1 -0
- package/esm/components/GridNoColumnsOverlay.js +1 -0
- package/esm/components/GridNoResultsOverlay.js +2 -1
- package/esm/components/GridNoRowsOverlay.js +1 -0
- package/esm/components/GridRow.js +2 -1
- package/esm/components/GridRowCount.js +1 -0
- package/esm/components/GridSelectedRowCount.js +1 -0
- package/esm/components/GridShadowScrollArea.js +1 -0
- package/esm/components/GridSkeletonLoadingOverlay.js +3 -1
- package/esm/components/cell/GridActionsCell.js +1 -1
- package/esm/components/cell/GridActionsCellItem.js +1 -0
- package/esm/components/cell/GridCell.js +5 -1
- package/esm/components/cell/GridEditBooleanCell.js +3 -1
- package/esm/components/cell/GridEditDateCell.js +2 -1
- package/esm/components/cell/GridEditInputCell.js +3 -1
- package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
- package/esm/components/cell/GridSkeletonCell.js +2 -1
- package/esm/components/columnHeaders/GridBaseColumnHeaders.js +2 -1
- package/esm/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/esm/components/columnHeaders/GridColumnHeaderFilterIconButton.js +2 -1
- package/esm/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/esm/components/columnHeaders/GridColumnHeaderSeparator.js +2 -1
- package/esm/components/columnHeaders/GridColumnHeaderTitle.js +1 -0
- package/esm/components/columnHeaders/GridGenericColumnHeaderItem.js +2 -1
- package/esm/components/columnHeaders/GridIconButtonContainer.js +2 -1
- package/esm/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
- package/esm/components/columnSelection/GridHeaderCheckbox.js +1 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +2 -2
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +1 -0
- package/esm/components/containers/GridFooterContainer.js +1 -0
- package/esm/components/containers/GridOverlay.js +1 -0
- package/esm/components/containers/GridRoot.js +4 -1
- package/esm/components/containers/GridRootStyles.js +1 -1
- package/esm/components/containers/GridToolbarContainer.js +1 -0
- package/esm/components/export/ExportCsv.js +1 -0
- package/esm/components/export/ExportPrint.js +1 -0
- package/esm/components/filterPanel/FilterPanelTrigger.js +1 -0
- package/esm/components/menu/GridMenu.js +3 -1
- package/esm/components/menu/columnMenu/GridColumnMenu.js +2 -0
- package/esm/components/menu/columnMenu/GridColumnMenuContainer.js +1 -0
- package/esm/components/panel/GridPanel.js +2 -1
- package/esm/components/panel/GridPanelWrapper.js +1 -0
- package/esm/components/panel/filterPanel/GridFilterForm.js +4 -1
- package/esm/components/panel/filterPanel/GridFilterInputBoolean.js +2 -1
- package/esm/components/panel/filterPanel/GridFilterInputDate.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterPanel.js +1 -0
- package/esm/components/quickFilter/QuickFilter.js +1 -1
- package/esm/components/quickFilter/QuickFilterClear.js +1 -0
- package/esm/components/quickFilter/QuickFilterControl.js +2 -1
- package/esm/components/quickFilter/QuickFilterTrigger.js +2 -1
- package/esm/components/toolbar/GridToolbar.js +1 -0
- package/esm/components/toolbar/GridToolbarColumnsButton.js +1 -0
- package/esm/components/toolbar/GridToolbarDensitySelector.js +3 -1
- package/esm/components/toolbar/GridToolbarExport.js +1 -0
- package/esm/components/toolbar/GridToolbarExportContainer.js +3 -1
- package/esm/components/toolbar/GridToolbarFilterButton.js +4 -1
- package/esm/components/toolbarV8/Toolbar.js +1 -0
- package/esm/components/toolbarV8/ToolbarButton.js +2 -1
- package/esm/components/virtualization/GridMainContainer.js +2 -1
- package/esm/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/esm/components/virtualization/GridVirtualScrollerContent.js +1 -0
- package/esm/components/virtualization/GridVirtualScrollerRenderZone.js +1 -0
- package/esm/constants/gridClasses.d.ts +4 -0
- package/esm/constants/gridClasses.js +3 -2
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +9 -0
- package/esm/hooks/features/columns/gridColumnsSelector.js +9 -2
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +1 -1
- package/esm/hooks/features/export/useGridPrintExport.js +1 -1
- package/esm/hooks/features/filter/useGridFilter.js +1 -1
- package/esm/hooks/features/rows/useGridRowsMeta.js +5 -2
- package/esm/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/esm/hooks/features/sorting/useGridSorting.js +5 -5
- package/esm/hooks/utils/useRunOnce.js +1 -1
- package/esm/index.js +1 -1
- package/esm/material/index.js +14 -0
- package/esm/models/props/DataGridProps.d.ts +7 -0
- package/esm/utils/composeGridClasses.d.ts +1 -1
- package/esm/utils/composeGridClasses.js +1 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +9 -0
- package/hooks/features/columns/gridColumnsSelector.js +10 -3
- package/hooks/features/dataSource/useGridDataSourceBase.js +12 -12
- package/hooks/features/export/useGridPrintExport.js +5 -5
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/rows/useGridRowsMeta.js +8 -5
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.js +6 -6
- package/hooks/utils/useRunOnce.js +3 -2
- package/index.js +1 -1
- package/material/index.js +14 -0
- package/models/props/DataGridProps.d.ts +7 -0
- package/package.json +2 -2
- package/utils/composeGridClasses.d.ts +1 -1
- package/utils/composeGridClasses.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,109 @@
|
|
|
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.5.0
|
|
9
|
+
|
|
10
|
+
_May 29, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Add support for exporting `RadarChartPro`, `FunnelChart` and `Heatmap` as image and PDF.
|
|
15
|
+
- 📊 `RadarChart` is now stable.
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@xBlizZer, @sai6855, @alisasanib.
|
|
19
|
+
Following are all team members who have contributed to this release:
|
|
20
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @oliviertassinari.
|
|
21
|
+
|
|
22
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid@8.5.0`
|
|
27
|
+
|
|
28
|
+
- [DataGrid] Avoid ResizeObserver loop error (#17984) @cherniavskii
|
|
29
|
+
- [DataGrid] Fix column management `toggleColumn` event type (#18023) @KenanYusuf
|
|
30
|
+
- [DataGrid] Remove unnecessary `any` type (#17979) @sai6855
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@8.5.0`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Allow multi sorting without modifier key (#17925) @cherniavskii
|
|
37
|
+
- [DataGridPro] Row reordering icon improvements (#17947) @KenanYusuf
|
|
38
|
+
- [DataGridPro] Fix pinned columns order in column management (#17950) @alisasanib
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@8.5.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.0`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPremium] Export `GridApiPremium` type (#18037) @arminmeh
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@8.5.0`
|
|
49
|
+
|
|
50
|
+
Internal changes.
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@8.5.0`, plus:
|
|
55
|
+
|
|
56
|
+
- [DateRangePicker] Allow to override the format in the field (#17972) @flaviendelangle
|
|
57
|
+
|
|
58
|
+
### Charts
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-charts@8.5.0`
|
|
61
|
+
|
|
62
|
+
- [charts] Add `render` prop to charts toolbar components (#17649) @bernardobelchior
|
|
63
|
+
- [charts] Add configurable slots to toolbar (#17712) @bernardobelchior
|
|
64
|
+
- [charts] Export `useFunnelSeries` and `useRadarSeries` (#18034) @JCQuintas
|
|
65
|
+
- [charts] Expose `ChartApi` through context (#18004) @bernardobelchior
|
|
66
|
+
- [charts] Mark Radar chart as stable (#17946) @alexfauquette
|
|
67
|
+
- [charts] Only update store if interaction item is different (#17851) @bernardobelchior
|
|
68
|
+
- [charts] Reuse shared date utils (#18014) @JCQuintas
|
|
69
|
+
- [charts] Use Map for string cache instead of object (#17982) @bernardobelchior
|
|
70
|
+
- [charts] Fix Population pyramid demo (#17987) @oliviertassinari
|
|
71
|
+
|
|
72
|
+
#### `@mui/x-charts-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
73
|
+
|
|
74
|
+
Same changes as in `@mui/x-charts@8.5.0`, plus:
|
|
75
|
+
|
|
76
|
+
- [charts-pro] Add range selection to zoom slider (#17949) @bernardobelchior
|
|
77
|
+
- [charts-pro] Allow configuring zoom slider tooltip (#18030) @bernardobelchior
|
|
78
|
+
- [charts-pro] Allow exporting a funnel chart (#17957) @bernardobelchior
|
|
79
|
+
- [charts-pro] Allow exporting a heatmap chart (#17916) @bernardobelchior
|
|
80
|
+
- [charts-pro] Allow exporting a radar chart (#17968) @bernardobelchior
|
|
81
|
+
- [charts-pro] Always show both zoom slider tooltips (#18027) @bernardobelchior
|
|
82
|
+
- [charts-pro] Show zoom slider tooltip when selecting range (#18028) @bernardobelchior
|
|
83
|
+
- [charts-pro] Split `ChartAxisZoomSlider` into smaller files (#18011) @bernardobelchior
|
|
84
|
+
- [charts-pro] Update zoom slider range selection cursor (#17977) @bernardobelchior
|
|
85
|
+
- [charts-pro] Add support for Heatmap legend (#17943) @alexfauquette
|
|
86
|
+
|
|
87
|
+
### Tree View
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-tree-view@8.5.0`
|
|
90
|
+
|
|
91
|
+
Internal changes.
|
|
92
|
+
|
|
93
|
+
#### `@mui/x-tree-view-pro@8.5.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
94
|
+
|
|
95
|
+
Same changes as in `@mui/x-tree-view@8.5.0`.
|
|
96
|
+
|
|
97
|
+
### Docs
|
|
98
|
+
|
|
99
|
+
- [docs] Fix derived column pivoting demo crash (#17944) @arminmeh
|
|
100
|
+
- [docs] Fix light/dark mode blink on pickers overview (#18002) @alexfauquette
|
|
101
|
+
- [docs] Fix scatter shape demo causing horizontal overflow (#17974) @bernardobelchior
|
|
102
|
+
|
|
103
|
+
### Core
|
|
104
|
+
|
|
105
|
+
- [code-infra] Add bundle size monitor (#17754) @Janpot
|
|
106
|
+
- [code-infra] Enable `babel-plugin-display-name` in vitest (#17903) @JCQuintas
|
|
107
|
+
- [infra] Remove last deprecated `ponyfillGlobal` usage (#18003) @LukasTy
|
|
108
|
+
- [infra] Use `babel-plugin-display-name` from npm (#18040) @LukasTy
|
|
109
|
+
- [x-telemetry] Remove deprecated `ponyfillGlobal` (#17986) @xBlizZer
|
|
110
|
+
|
|
8
111
|
## 8.4.0
|
|
9
112
|
|
|
10
113
|
_May 21, 2025_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -29,7 +29,7 @@ const configuration = {
|
|
|
29
29
|
useCellAggregationResult: () => null
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const DataGridRaw =
|
|
32
|
+
const DataGridRaw = function DataGrid(inProps, ref) {
|
|
33
33
|
const props = (0, _useDataGridProps.useDataGridProps)(inProps);
|
|
34
34
|
const privateApiRef = (0, _useGridApiInitialization.useGridApiInitialization)(props.apiRef, props);
|
|
35
35
|
(0, _useDataGridComponent.useDataGridComponent)(privateApiRef, props);
|
|
@@ -48,7 +48,8 @@ const DataGridRaw = (0, _forwardRef.forwardRef)(function DataGrid(inProps, ref)
|
|
|
48
48
|
ref: ref
|
|
49
49
|
}))
|
|
50
50
|
});
|
|
51
|
-
}
|
|
51
|
+
};
|
|
52
|
+
if (process.env.NODE_ENV !== "production") DataGridRaw.displayName = "DataGridRaw";
|
|
52
53
|
/**
|
|
53
54
|
* Features:
|
|
54
55
|
* - [DataGrid](https://mui.com/x/react-data-grid/features/)
|
|
@@ -56,7 +57,7 @@ const DataGridRaw = (0, _forwardRef.forwardRef)(function DataGrid(inProps, ref)
|
|
|
56
57
|
* API:
|
|
57
58
|
* - [DataGrid API](https://mui.com/x/api/data-grid/data-grid/)
|
|
58
59
|
*/
|
|
59
|
-
const DataGrid = exports.DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
|
|
60
|
+
const DataGrid = exports.DataGrid = /*#__PURE__*/React.memo((0, _forwardRef.forwardRef)(DataGridRaw));
|
|
60
61
|
if (process.env.NODE_ENV !== "production") DataGrid.displayName = "DataGrid";
|
|
61
62
|
DataGridRaw.propTypes = {
|
|
62
63
|
// ----------------------------- Warning --------------------------------
|
|
@@ -55,6 +55,7 @@ const GridColumnHeaders = (0, _forwardRef.forwardRef)(function GridColumnHeaders
|
|
|
55
55
|
children: [getColumnGroupHeadersRows(), getColumnHeadersRow()]
|
|
56
56
|
}));
|
|
57
57
|
});
|
|
58
|
+
if (process.env.NODE_ENV !== "production") GridColumnHeaders.displayName = "GridColumnHeaders";
|
|
58
59
|
process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
|
|
59
60
|
// ----------------------------- Warning --------------------------------
|
|
60
61
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/components/GridFooter.js
CHANGED
|
@@ -38,6 +38,7 @@ const GridFooter = exports.GridFooter = (0, _forwardRef.forwardRef)(function Gri
|
|
|
38
38
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
39
39
|
}));
|
|
40
40
|
});
|
|
41
|
+
if (process.env.NODE_ENV !== "production") GridFooter.displayName = "GridFooter";
|
|
41
42
|
process.env.NODE_ENV !== "production" ? GridFooter.propTypes = {
|
|
42
43
|
// ----------------------------- Warning --------------------------------
|
|
43
44
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -55,6 +55,7 @@ const GridLoadingOverlay = exports.GridLoadingOverlay = (0, _forwardRef.forwardR
|
|
|
55
55
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {})
|
|
56
56
|
}));
|
|
57
57
|
});
|
|
58
|
+
if (process.env.NODE_ENV !== "production") GridLoadingOverlay.displayName = "GridLoadingOverlay";
|
|
58
59
|
process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
|
|
59
60
|
// ----------------------------- Warning --------------------------------
|
|
60
61
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -34,6 +34,7 @@ const GridNoColumnsOverlay = exports.GridNoColumnsOverlay = (0, _forwardRef.forw
|
|
|
34
34
|
}))]
|
|
35
35
|
}));
|
|
36
36
|
});
|
|
37
|
+
if (process.env.NODE_ENV !== "production") GridNoColumnsOverlay.displayName = "GridNoColumnsOverlay";
|
|
37
38
|
process.env.NODE_ENV !== "production" ? GridNoColumnsOverlay.propTypes = {
|
|
38
39
|
// ----------------------------- Warning --------------------------------
|
|
39
40
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -21,6 +21,7 @@ const GridNoRowsOverlay = exports.GridNoRowsOverlay = (0, _forwardRef.forwardRef
|
|
|
21
21
|
children: noRowsLabel
|
|
22
22
|
}));
|
|
23
23
|
});
|
|
24
|
+
if (process.env.NODE_ENV !== "production") GridNoRowsOverlay.displayName = "GridNoRowsOverlay";
|
|
24
25
|
process.env.NODE_ENV !== "production" ? GridNoRowsOverlay.propTypes = {
|
|
25
26
|
// ----------------------------- Warning --------------------------------
|
|
26
27
|
// | These PropTypes are generated from the TypeScript type definitions |
|
package/components/GridRow.js
CHANGED
|
@@ -12,7 +12,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
|
-
var
|
|
15
|
+
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
16
16
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
17
17
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
18
18
|
var _isObjectEmpty = require("@mui/x-internals/isObjectEmpty");
|
|
@@ -85,7 +85,7 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
85
85
|
const columnPositions = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridColumnPositionsSelector);
|
|
86
86
|
const rowReordering = rootProps.rowReordering;
|
|
87
87
|
const isRowReorderingEnabled = (0, _useGridSelector.useGridSelector)(apiRef, isRowReorderingEnabledSelector, rowReordering);
|
|
88
|
-
const handleRef = (0,
|
|
88
|
+
const handleRef = (0, _useForkRef.default)(ref, refProp);
|
|
89
89
|
const rowNode = (0, _gridRowsSelector.gridRowNodeSelector)(apiRef, rowId);
|
|
90
90
|
const editing = (0, _useGridSelector.useGridSelector)(apiRef, _gridEditingSelectors.gridRowIsEditingSelector, {
|
|
91
91
|
rowId,
|
|
@@ -309,6 +309,7 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
309
309
|
})]
|
|
310
310
|
}));
|
|
311
311
|
});
|
|
312
|
+
if (process.env.NODE_ENV !== "production") GridRow.displayName = "GridRow";
|
|
312
313
|
process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
313
314
|
// ----------------------------- Warning --------------------------------
|
|
314
315
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -59,6 +59,7 @@ const GridRowCount = exports.GridRowCount = (0, _forwardRef.forwardRef)(function
|
|
|
59
59
|
children: [apiRef.current.getLocaleText('footerTotalRows'), " ", text]
|
|
60
60
|
}));
|
|
61
61
|
});
|
|
62
|
+
if (process.env.NODE_ENV !== "production") GridRowCount.displayName = "GridRowCount";
|
|
62
63
|
process.env.NODE_ENV !== "production" ? GridRowCount.propTypes = {
|
|
63
64
|
// ----------------------------- Warning --------------------------------
|
|
64
65
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -63,6 +63,7 @@ const GridSelectedRowCount = exports.GridSelectedRowCount = (0, _forwardRef.forw
|
|
|
63
63
|
children: rowSelectedText
|
|
64
64
|
}));
|
|
65
65
|
});
|
|
66
|
+
if (process.env.NODE_ENV !== "production") GridSelectedRowCount.displayName = "GridSelectedRowCount";
|
|
66
67
|
process.env.NODE_ENV !== "production" ? GridSelectedRowCount.propTypes = {
|
|
67
68
|
// ----------------------------- Warning --------------------------------
|
|
68
69
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -92,6 +92,7 @@ const GridShadowScrollArea = exports.GridShadowScrollArea = (0, _forwardRef.forw
|
|
|
92
92
|
children: children
|
|
93
93
|
}));
|
|
94
94
|
});
|
|
95
|
+
if (process.env.NODE_ENV !== "production") GridShadowScrollArea.displayName = "GridShadowScrollArea";
|
|
95
96
|
process.env.NODE_ENV !== "production" ? GridShadowScrollArea.propTypes = {
|
|
96
97
|
// ----------------------------- Warning --------------------------------
|
|
97
98
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -194,6 +194,7 @@ const GridSkeletonLoadingOverlayInner = exports.GridSkeletonLoadingOverlayInner
|
|
|
194
194
|
children: children
|
|
195
195
|
}));
|
|
196
196
|
});
|
|
197
|
+
if (process.env.NODE_ENV !== "production") GridSkeletonLoadingOverlayInner.displayName = "GridSkeletonLoadingOverlayInner";
|
|
197
198
|
const GridSkeletonLoadingOverlay = exports.GridSkeletonLoadingOverlay = (0, _forwardRef.forwardRef)(function GridSkeletonLoadingOverlay(props, forwardedRef) {
|
|
198
199
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
199
200
|
const dimensions = (0, _hooks.useGridSelector)(apiRef, _hooks.gridDimensionsSelector);
|
|
@@ -203,4 +204,5 @@ const GridSkeletonLoadingOverlay = exports.GridSkeletonLoadingOverlay = (0, _for
|
|
|
203
204
|
skeletonRowsCount: skeletonRowsCount,
|
|
204
205
|
ref: forwardedRef
|
|
205
206
|
}));
|
|
206
|
-
});
|
|
207
|
+
});
|
|
208
|
+
if (process.env.NODE_ENV !== "production") GridSkeletonLoadingOverlay.displayName = "GridSkeletonLoadingOverlay";
|
|
@@ -12,7 +12,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
15
|
-
var
|
|
15
|
+
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
16
16
|
var _gridClasses = require("../../constants/gridClasses");
|
|
17
17
|
var _GridMenu = require("../menu/GridMenu");
|
|
18
18
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -38,8 +38,8 @@ function GridActionsCell(props) {
|
|
|
38
38
|
const ignoreCallToFocus = React.useRef(false);
|
|
39
39
|
const touchRippleRefs = React.useRef({});
|
|
40
40
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
41
|
-
const menuId = (0,
|
|
42
|
-
const buttonId = (0,
|
|
41
|
+
const menuId = (0, _useId.default)();
|
|
42
|
+
const buttonId = (0, _useId.default)();
|
|
43
43
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
44
44
|
if (!hasActions(colDef)) {
|
|
45
45
|
throw new Error('MUI X: Missing the `getActions` property in the `GridColDef`.');
|
|
@@ -62,6 +62,7 @@ const GridActionsCellItem = exports.GridActionsCellItem = (0, _forwardRef.forwar
|
|
|
62
62
|
children: label
|
|
63
63
|
}));
|
|
64
64
|
});
|
|
65
|
+
if (process.env.NODE_ENV !== "production") GridActionsCellItem.displayName = "GridActionsCellItem";
|
|
65
66
|
process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes = {
|
|
66
67
|
// ----------------------------- Warning --------------------------------
|
|
67
68
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -11,7 +11,10 @@ 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
|
|
14
|
+
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
15
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
|
+
var _ownerDocument = _interopRequireDefault(require("@mui/utils/ownerDocument"));
|
|
17
|
+
var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
|
|
15
18
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
16
19
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
17
20
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
@@ -26,7 +29,7 @@ var _constants = require("../../internals/constants");
|
|
|
26
29
|
var _gridRowSpanningSelectors = require("../../hooks/features/rows/gridRowSpanningSelectors");
|
|
27
30
|
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
28
31
|
var _gridEditingSelectors = require("../../hooks/features/editing/gridEditingSelectors");
|
|
29
|
-
var
|
|
32
|
+
var _utils = require("../../internals/utils");
|
|
30
33
|
var _useGridConfiguration = require("../../hooks/utils/useGridConfiguration");
|
|
31
34
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
35
|
const _excluded = ["column", "row", "rowId", "rowNode", "align", "children", "colIndex", "width", "className", "style", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "showRightBorder", "showLeftBorder", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
|
|
@@ -49,9 +52,9 @@ const useUtilityClasses = ownerState => {
|
|
|
49
52
|
classes
|
|
50
53
|
} = ownerState;
|
|
51
54
|
const slots = {
|
|
52
|
-
root: ['cell', `cell--text${(0,
|
|
55
|
+
root: ['cell', `cell--text${(0, _capitalize.default)(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === _constants.PinnedColumnPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === _constants.PinnedColumnPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']
|
|
53
56
|
};
|
|
54
|
-
return (0,
|
|
57
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
55
58
|
};
|
|
56
59
|
let warnedOnce = false;
|
|
57
60
|
|
|
@@ -150,7 +153,7 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
150
153
|
}
|
|
151
154
|
const valueToRender = cellParams.formattedValue ?? value;
|
|
152
155
|
const cellRef = React.useRef(null);
|
|
153
|
-
const handleRef = (0,
|
|
156
|
+
const handleRef = (0, _useForkRef.default)(ref, cellRef);
|
|
154
157
|
const focusElementRef = React.useRef(null);
|
|
155
158
|
const isSelectionMode = rootProps.cellSelection ?? false;
|
|
156
159
|
const ownerState = {
|
|
@@ -201,7 +204,7 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
201
204
|
border: 0
|
|
202
205
|
};
|
|
203
206
|
}
|
|
204
|
-
const cellStyle = (0,
|
|
207
|
+
const cellStyle = (0, _utils.attachPinnedStyle)((0, _extends2.default)({
|
|
205
208
|
'--width': `${width}px`
|
|
206
209
|
}, styleProp), isRtl, pinnedPosition, pinnedOffset);
|
|
207
210
|
const isLeftPinned = pinnedPosition === _constants.PinnedColumnPosition.LEFT;
|
|
@@ -219,7 +222,7 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
219
222
|
if (!hasFocus || cellMode === _models.GridCellModes.Edit) {
|
|
220
223
|
return;
|
|
221
224
|
}
|
|
222
|
-
const doc = (0,
|
|
225
|
+
const doc = (0, _ownerDocument.default)(apiRef.current.rootElementRef.current);
|
|
223
226
|
if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {
|
|
224
227
|
const focusableElement = cellRef.current.querySelector('[tabindex="0"]');
|
|
225
228
|
const elementToFocus = focusElementRef.current || focusableElement || cellRef.current;
|
|
@@ -316,6 +319,7 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
316
319
|
children: children
|
|
317
320
|
}));
|
|
318
321
|
});
|
|
322
|
+
if (process.env.NODE_ENV !== "production") GridCell.displayName = "GridCell";
|
|
319
323
|
process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
320
324
|
// ----------------------------- Warning --------------------------------
|
|
321
325
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -12,7 +12,9 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
15
|
-
var
|
|
15
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
|
+
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
17
|
+
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
16
18
|
var _gridClasses = require("../../constants/gridClasses");
|
|
17
19
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
20
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
@@ -25,7 +27,7 @@ const useUtilityClasses = ownerState => {
|
|
|
25
27
|
const slots = {
|
|
26
28
|
root: ['editBooleanCell']
|
|
27
29
|
};
|
|
28
|
-
return (0,
|
|
30
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
29
31
|
};
|
|
30
32
|
function GridEditBooleanCell(props) {
|
|
31
33
|
const {
|
|
@@ -39,7 +41,7 @@ function GridEditBooleanCell(props) {
|
|
|
39
41
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
40
42
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
41
43
|
const inputRef = React.useRef(null);
|
|
42
|
-
const id = (0,
|
|
44
|
+
const id = (0, _useId.default)();
|
|
43
45
|
const [valueState, setValueState] = React.useState(value);
|
|
44
46
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
45
47
|
const ownerState = {
|
|
@@ -61,7 +63,7 @@ function GridEditBooleanCell(props) {
|
|
|
61
63
|
React.useEffect(() => {
|
|
62
64
|
setValueState(value);
|
|
63
65
|
}, [value]);
|
|
64
|
-
(0,
|
|
66
|
+
(0, _useEnhancedEffect.default)(() => {
|
|
65
67
|
if (hasFocus) {
|
|
66
68
|
inputRef.current.focus();
|
|
67
69
|
}
|
|
@@ -11,7 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
-
var
|
|
14
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
+
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
15
16
|
var _styles = require("@mui/material/styles");
|
|
16
17
|
var _assert = require("../../utils/assert");
|
|
17
18
|
var _gridClasses = require("../../constants/gridClasses");
|
|
@@ -29,7 +30,7 @@ const useUtilityClasses = ownerState => {
|
|
|
29
30
|
const slots = {
|
|
30
31
|
root: ['editInputCell']
|
|
31
32
|
};
|
|
32
|
-
return (0,
|
|
33
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
33
34
|
};
|
|
34
35
|
function GridEditDateCell(props) {
|
|
35
36
|
const {
|
|
@@ -111,7 +112,7 @@ function GridEditDateCell(props) {
|
|
|
111
112
|
return state;
|
|
112
113
|
});
|
|
113
114
|
}, [valueTransformed]);
|
|
114
|
-
(0,
|
|
115
|
+
(0, _useEnhancedEffect.default)(() => {
|
|
115
116
|
if (hasFocus) {
|
|
116
117
|
inputRef.current.focus();
|
|
117
118
|
}
|
|
@@ -10,7 +10,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var
|
|
13
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
|
+
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
14
15
|
var _styles = require("@mui/material/styles");
|
|
15
16
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
16
17
|
var _assert = require("../../utils/assert");
|
|
@@ -27,7 +28,7 @@ const useUtilityClasses = ownerState => {
|
|
|
27
28
|
const slots = {
|
|
28
29
|
root: ['editInputCell']
|
|
29
30
|
};
|
|
30
|
-
return (0,
|
|
31
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
31
32
|
};
|
|
32
33
|
const GridEditInputCellRoot = (0, _styles.styled)(_assert.NotRendered, {
|
|
33
34
|
name: 'MuiDataGrid',
|
|
@@ -83,7 +84,7 @@ const GridEditInputCell = exports.GridEditInputCell = (0, _forwardRef.forwardRef
|
|
|
83
84
|
setValueState(value);
|
|
84
85
|
}
|
|
85
86
|
}, [meta, value]);
|
|
86
|
-
(0,
|
|
87
|
+
(0, _useEnhancedEffect.default)(() => {
|
|
87
88
|
if (hasFocus) {
|
|
88
89
|
inputRef.current.focus();
|
|
89
90
|
}
|
|
@@ -105,6 +106,7 @@ const GridEditInputCell = exports.GridEditInputCell = (0, _forwardRef.forwardRef
|
|
|
105
106
|
ref: ref
|
|
106
107
|
}));
|
|
107
108
|
});
|
|
109
|
+
if (process.env.NODE_ENV !== "production") GridEditInputCell.displayName = "GridEditInputCell";
|
|
108
110
|
process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
109
111
|
// ----------------------------- Warning --------------------------------
|
|
110
112
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -12,7 +12,7 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var React = _react;
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var
|
|
15
|
+
var _useEnhancedEffect = _interopRequireDefault(require("@mui/utils/useEnhancedEffect"));
|
|
16
16
|
var _gridEditCellParams = require("../../models/params/gridEditCellParams");
|
|
17
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
18
|
var _gridEditRowModel = require("../../models/gridEditRowModel");
|
|
@@ -44,7 +44,7 @@ function GridEditSingleSelectCell(props) {
|
|
|
44
44
|
const [open, setOpen] = React.useState(initialOpen);
|
|
45
45
|
const baseSelectProps = rootProps.slotProps?.baseSelect || {};
|
|
46
46
|
const isSelectNative = baseSelectProps.native ?? false;
|
|
47
|
-
(0,
|
|
47
|
+
(0, _useEnhancedEffect.default)(() => {
|
|
48
48
|
if (hasFocus) {
|
|
49
49
|
inputRef.current?.focus();
|
|
50
50
|
}
|
|
@@ -11,9 +11,10 @@ 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
|
|
14
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
+
var _capitalize = _interopRequireDefault(require("@mui/utils/capitalize"));
|
|
15
16
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
16
|
-
var
|
|
17
|
+
var _utils = require("../../utils/utils");
|
|
17
18
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
19
|
var _gridClasses = require("../../constants/gridClasses");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -35,11 +36,11 @@ const useUtilityClasses = ownerState => {
|
|
|
35
36
|
empty
|
|
36
37
|
} = ownerState;
|
|
37
38
|
const slots = {
|
|
38
|
-
root: ['cell', 'cellSkeleton', `cell--text${align ? (0,
|
|
39
|
+
root: ['cell', 'cellSkeleton', `cell--text${align ? (0, _capitalize.default)(align) : 'Left'}`, empty && 'cellEmpty']
|
|
39
40
|
};
|
|
40
|
-
return (0,
|
|
41
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
41
42
|
};
|
|
42
|
-
const randomNumberGenerator = (0,
|
|
43
|
+
const randomNumberGenerator = (0, _utils.createRandomNumberGenerator)(12345);
|
|
43
44
|
function GridSkeletonCell(props) {
|
|
44
45
|
const {
|
|
45
46
|
field,
|
|
@@ -8,7 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.GridColumnGroupHeader = GridColumnGroupHeader;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var
|
|
11
|
+
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
12
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
12
13
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
13
14
|
var _gridClasses = require("../../constants/gridClasses");
|
|
14
15
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -18,7 +19,7 @@ var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
|
18
19
|
var _GridGenericColumnHeaderItem = require("./GridGenericColumnHeaderItem");
|
|
19
20
|
var _domUtils = require("../../utils/domUtils");
|
|
20
21
|
var _constants = require("../../internals/constants");
|
|
21
|
-
var
|
|
22
|
+
var _utils = require("../../internals/utils");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
24
25
|
const {
|
|
@@ -37,7 +38,7 @@ const useUtilityClasses = ownerState => {
|
|
|
37
38
|
titleContainer: ['columnHeaderTitleContainer', 'withBorderColor'],
|
|
38
39
|
titleContainerContent: ['columnHeaderTitleContainerContent']
|
|
39
40
|
};
|
|
40
|
-
return (0,
|
|
41
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
41
42
|
};
|
|
42
43
|
function GridColumnGroupHeader(props) {
|
|
43
44
|
const {
|
|
@@ -87,7 +88,7 @@ function GridColumnGroupHeader(props) {
|
|
|
87
88
|
isDragging: false
|
|
88
89
|
});
|
|
89
90
|
const label = headerName ?? groupId;
|
|
90
|
-
const id = (0,
|
|
91
|
+
const id = (0, _useId.default)();
|
|
91
92
|
const elementId = groupId === null ? `empty-group-cell-${id}` : groupId;
|
|
92
93
|
const classes = useUtilityClasses(ownerState);
|
|
93
94
|
React.useLayoutEffect(() => {
|
|
@@ -114,7 +115,7 @@ function GridColumnGroupHeader(props) {
|
|
|
114
115
|
onBlur: publish('columnGroupHeaderBlur')
|
|
115
116
|
}), [publish]);
|
|
116
117
|
const headerClassName = typeof group.headerClassName === 'function' ? group.headerClassName(renderParams) : group.headerClassName;
|
|
117
|
-
const style = React.useMemo(() => (0,
|
|
118
|
+
const style = React.useMemo(() => (0, _utils.attachPinnedStyle)((0, _extends2.default)({}, props.style), isRtl, pinnedPosition, pinnedOffset), [pinnedPosition, pinnedOffset, props.style, isRtl]);
|
|
118
119
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridGenericColumnHeaderItem.GridGenericColumnHeaderItem, (0, _extends2.default)({
|
|
119
120
|
ref: headerCellRef,
|
|
120
121
|
classes: classes,
|
|
@@ -9,7 +9,8 @@ exports.GridColumnHeaderFilterIconButton = GridColumnHeaderFilterIconButtonWrapp
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var
|
|
12
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
13
|
+
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
13
14
|
var _hooks = require("../../hooks");
|
|
14
15
|
var _gridPreferencePanelSelector = require("../../hooks/features/preferencesPanel/gridPreferencePanelSelector");
|
|
15
16
|
var _gridPreferencePanelsValue = require("../../hooks/features/preferencesPanel/gridPreferencePanelsValue");
|
|
@@ -25,7 +26,7 @@ const useUtilityClasses = ownerState => {
|
|
|
25
26
|
const slots = {
|
|
26
27
|
icon: ['filterIcon']
|
|
27
28
|
};
|
|
28
|
-
return (0,
|
|
29
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
29
30
|
};
|
|
30
31
|
function GridColumnHeaderFilterIconButtonWrapped(props) {
|
|
31
32
|
if (!props.counter) {
|
|
@@ -54,9 +55,9 @@ function GridColumnHeaderFilterIconButton(props) {
|
|
|
54
55
|
classes: rootProps.classes
|
|
55
56
|
});
|
|
56
57
|
const classes = useUtilityClasses(ownerState);
|
|
57
|
-
const labelId = (0,
|
|
58
|
+
const labelId = (0, _useId.default)();
|
|
58
59
|
const isOpen = (0, _hooks.useGridSelector)(apiRef, _gridPreferencePanelSelector.gridPreferencePanelSelectorWithLabel, labelId);
|
|
59
|
-
const panelId = (0,
|
|
60
|
+
const panelId = (0, _useId.default)();
|
|
60
61
|
const toggleFilter = React.useCallback(event => {
|
|
61
62
|
event.preventDefault();
|
|
62
63
|
event.stopPropagation();
|