@mui/x-data-grid 8.0.0-alpha.12 → 8.0.0-alpha.13
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 +299 -0
- package/DataGrid/DataGrid.js +31 -22
- package/DataGrid/useDataGridProps.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/components/GridFooter.js +1 -1
- package/components/GridHeader.js +1 -1
- package/components/GridPagination.js +5 -6
- package/components/GridRowCount.js +4 -5
- package/components/GridScrollArea.js +4 -3
- package/components/GridSelectedRowCount.js +5 -6
- package/components/GridShadowScrollArea.d.ts +8 -0
- package/components/GridShadowScrollArea.js +82 -0
- package/components/cell/GridEditInputCell.js +2 -3
- package/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/components/columnsManagement/GridColumnsManagement.js +59 -61
- package/components/containers/GridOverlay.js +6 -8
- package/components/containers/GridRoot.js +4 -2
- package/components/containers/GridRootStyles.d.ts +1 -2
- package/components/containers/GridRootStyles.js +77 -100
- package/components/containers/GridToolbarContainer.js +5 -6
- package/components/menu/GridMenu.js +7 -6
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
- package/components/panel/GridPanel.js +18 -20
- package/components/panel/GridPanelContent.js +6 -8
- package/components/panel/GridPanelFooter.js +5 -6
- package/components/panel/GridPanelHeader.js +4 -5
- package/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
- package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/components/virtualization/GridVirtualScrollbar.js +8 -5
- package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/constants/cssVariables.d.ts +294 -0
- package/constants/cssVariables.js +168 -0
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/constants/defaultGridSlotsComponents.js +1 -1
- package/constants/gridClasses.d.ts +13 -0
- package/constants/gridClasses.js +1 -1
- package/context/GridContextProvider.js +4 -1
- package/esm/DataGrid/DataGrid.js +31 -22
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/esm/components/GridFooter.js +2 -2
- package/esm/components/GridHeader.js +1 -1
- package/esm/components/GridPagination.js +5 -6
- package/esm/components/GridRowCount.js +4 -5
- package/esm/components/GridScrollArea.js +2 -1
- package/esm/components/GridSelectedRowCount.js +5 -6
- package/esm/components/GridShadowScrollArea.d.ts +8 -0
- package/esm/components/GridShadowScrollArea.js +74 -0
- package/esm/components/cell/GridEditInputCell.js +2 -3
- package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/esm/components/columnsManagement/GridColumnsManagement.js +60 -62
- package/esm/components/containers/GridOverlay.js +6 -8
- package/esm/components/containers/GridRoot.js +4 -2
- package/esm/components/containers/GridRootStyles.d.ts +1 -2
- package/esm/components/containers/GridRootStyles.js +78 -101
- package/esm/components/containers/GridToolbarContainer.js +5 -6
- package/esm/components/menu/GridMenu.js +7 -6
- package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/esm/components/panel/GridPanel.js +18 -20
- package/esm/components/panel/GridPanelContent.js +6 -8
- package/esm/components/panel/GridPanelFooter.js +5 -6
- package/esm/components/panel/GridPanelHeader.js +4 -5
- package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/esm/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/esm/components/virtualization/GridVirtualScrollbar.js +3 -1
- package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/esm/constants/cssVariables.d.ts +294 -0
- package/esm/constants/cssVariables.js +161 -0
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/constants/defaultGridSlotsComponents.js +2 -2
- package/esm/constants/gridClasses.d.ts +13 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/context/GridContextProvider.js +4 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/esm/hooks/features/columns/index.d.ts +1 -1
- package/esm/hooks/features/columns/index.js +1 -1
- package/esm/hooks/features/columns/useGridColumns.js +4 -2
- package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/esm/hooks/features/dataSource/index.d.ts +2 -0
- package/esm/hooks/features/dataSource/index.js +2 -0
- package/esm/hooks/features/dataSource/models.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
- package/esm/hooks/features/export/utils.js +4 -2
- package/esm/hooks/features/focus/useGridFocus.js +3 -2
- package/esm/hooks/features/index.d.ts +1 -1
- package/esm/hooks/features/index.js +1 -1
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
- package/esm/hooks/features/rowSelection/utils.js +11 -11
- package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
- package/esm/hooks/features/rows/useGridRows.js +7 -7
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
- package/esm/hooks/utils/useGridSelector.js +4 -1
- package/esm/hooks/utils/useIsSSR.js +4 -1
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -1
- package/esm/internals/index.js +2 -1
- package/esm/internals/utils/propValidation.js +1 -1
- package/esm/locales/bnBD.d.ts +2 -0
- package/esm/locales/bnBD.js +167 -0
- package/esm/locales/deDE.js +3 -5
- package/esm/locales/huHU.js +10 -13
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/locales/ruRU.js +17 -21
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +164 -49
- package/esm/material/variables.d.ts +5 -0
- package/esm/material/variables.js +89 -0
- package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
- package/esm/models/api/gridSortApi.d.ts +1 -1
- package/esm/models/configuration/gridConfiguration.d.ts +7 -1
- package/esm/models/gridBaseSlots.d.ts +56 -6
- package/esm/models/gridDataSource.d.ts +9 -4
- package/esm/models/gridRowSelectionManager.d.ts +9 -0
- package/esm/models/gridRowSelectionManager.js +36 -0
- package/esm/models/gridRowSelectionModel.d.ts +4 -2
- package/esm/models/gridSlotsComponent.d.ts +7 -27
- package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
- package/esm/models/gridSortModel.d.ts +1 -1
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.js +2 -3
- package/esm/models/props/DataGridProps.d.ts +22 -17
- package/esm/utils/css/context.d.ts +14 -0
- package/esm/utils/css/context.js +54 -0
- package/esm/utils/index.d.ts +2 -1
- package/esm/utils/index.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +28 -27
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/hooks/features/columns/gridColumnsSelector.js +9 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/hooks/features/columns/index.d.ts +1 -1
- package/hooks/features/columns/index.js +94 -10
- package/hooks/features/columns/useGridColumns.js +4 -2
- package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/hooks/features/dataSource/gridDataSourceError.js +40 -0
- package/hooks/features/dataSource/index.d.ts +2 -0
- package/hooks/features/dataSource/index.js +25 -0
- package/hooks/features/dataSource/models.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/hooks/features/dimensions/useGridDimensions.js +19 -18
- package/hooks/features/editing/useGridCellEditing.js +10 -9
- package/hooks/features/editing/useGridRowEditing.js +11 -10
- package/hooks/features/export/utils.js +4 -2
- package/hooks/features/focus/useGridFocus.js +8 -7
- package/hooks/features/index.d.ts +1 -1
- package/hooks/features/index.js +11 -28
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
- package/hooks/features/rowSelection/utils.d.ts +2 -2
- package/hooks/features/rowSelection/utils.js +10 -10
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +10 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -8
- package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +7 -7
- package/hooks/features/virtualization/useGridVirtualScroller.js +21 -25
- package/hooks/utils/useGridSelector.js +6 -2
- package/hooks/utils/useIsSSR.js +6 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +15 -0
- package/internals/utils/propValidation.js +1 -1
- package/locales/bnBD.d.ts +2 -0
- package/locales/bnBD.js +173 -0
- package/locales/deDE.js +3 -5
- package/locales/huHU.js +10 -13
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/locales/ruRU.js +17 -21
- package/material/index.d.ts +1 -0
- package/material/index.js +170 -49
- package/material/variables.d.ts +5 -0
- package/material/variables.js +95 -0
- package/models/api/gridRowSelectionApi.d.ts +4 -2
- package/models/api/gridSortApi.d.ts +1 -1
- package/models/configuration/gridConfiguration.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +56 -6
- package/models/gridDataSource.d.ts +9 -4
- package/models/gridRowSelectionManager.d.ts +9 -0
- package/models/gridRowSelectionManager.js +43 -0
- package/models/gridRowSelectionModel.d.ts +4 -2
- package/models/gridSlotsComponent.d.ts +7 -27
- package/models/gridSlotsComponentsProps.d.ts +3 -11
- package/models/gridSortModel.d.ts +1 -1
- package/models/index.d.ts +2 -1
- package/models/index.js +34 -11
- package/models/props/DataGridProps.d.ts +22 -17
- package/modern/DataGrid/DataGrid.js +31 -22
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/modern/components/GridFooter.js +2 -2
- package/modern/components/GridHeader.js +1 -1
- package/modern/components/GridPagination.js +5 -6
- package/modern/components/GridRowCount.js +4 -5
- package/modern/components/GridScrollArea.js +2 -1
- package/modern/components/GridSelectedRowCount.js +5 -6
- package/modern/components/GridShadowScrollArea.d.ts +8 -0
- package/modern/components/GridShadowScrollArea.js +74 -0
- package/modern/components/cell/GridEditInputCell.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/modern/components/columnsManagement/GridColumnsManagement.js +60 -62
- package/modern/components/containers/GridOverlay.js +6 -8
- package/modern/components/containers/GridRoot.js +4 -2
- package/modern/components/containers/GridRootStyles.d.ts +1 -2
- package/modern/components/containers/GridRootStyles.js +78 -101
- package/modern/components/containers/GridToolbarContainer.js +5 -6
- package/modern/components/menu/GridMenu.js +7 -6
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/modern/components/panel/GridPanel.js +18 -20
- package/modern/components/panel/GridPanelContent.js +6 -8
- package/modern/components/panel/GridPanelFooter.js +5 -6
- package/modern/components/panel/GridPanelHeader.js +4 -5
- package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/modern/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/modern/components/virtualization/GridVirtualScrollbar.js +3 -1
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/modern/constants/cssVariables.d.ts +294 -0
- package/modern/constants/cssVariables.js +161 -0
- package/modern/constants/dataGridPropsDefaultValues.js +1 -0
- package/modern/constants/defaultGridSlotsComponents.js +2 -2
- package/modern/constants/gridClasses.d.ts +13 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/context/GridContextProvider.js +4 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/modern/hooks/features/columns/index.d.ts +1 -1
- package/modern/hooks/features/columns/index.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +4 -2
- package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/modern/hooks/features/dataSource/index.d.ts +2 -0
- package/modern/hooks/features/dataSource/index.js +2 -0
- package/modern/hooks/features/dataSource/models.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
- package/modern/hooks/features/export/utils.js +4 -2
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.d.ts +1 -1
- package/modern/hooks/features/index.js +1 -1
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
- package/modern/hooks/features/rowSelection/utils.js +11 -11
- package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
- package/modern/hooks/features/rows/useGridRows.js +7 -7
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
- package/modern/hooks/utils/useGridSelector.js +4 -1
- package/modern/hooks/utils/useIsSSR.js +4 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.d.ts +2 -1
- package/modern/internals/index.js +2 -1
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/bnBD.d.ts +2 -0
- package/modern/locales/bnBD.js +167 -0
- package/modern/locales/deDE.js +3 -5
- package/modern/locales/huHU.js +10 -13
- package/modern/locales/index.d.ts +1 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/ruRU.js +17 -21
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +164 -49
- package/modern/material/variables.d.ts +5 -0
- package/modern/material/variables.js +89 -0
- package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
- package/modern/models/api/gridSortApi.d.ts +1 -1
- package/modern/models/configuration/gridConfiguration.d.ts +7 -1
- package/modern/models/gridBaseSlots.d.ts +56 -6
- package/modern/models/gridDataSource.d.ts +9 -4
- package/modern/models/gridRowSelectionManager.d.ts +9 -0
- package/modern/models/gridRowSelectionManager.js +36 -0
- package/modern/models/gridRowSelectionModel.d.ts +4 -2
- package/modern/models/gridSlotsComponent.d.ts +7 -27
- package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
- package/modern/models/gridSortModel.d.ts +1 -1
- package/modern/models/index.d.ts +2 -1
- package/modern/models/index.js +2 -3
- package/modern/models/props/DataGridProps.d.ts +22 -17
- package/modern/utils/css/context.d.ts +14 -0
- package/modern/utils/css/context.js +54 -0
- package/modern/utils/index.d.ts +2 -1
- package/modern/utils/index.js +1 -1
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/css/context.d.ts +14 -0
- package/utils/css/context.js +64 -0
- package/utils/index.d.ts +2 -1
- package/utils/index.js +8 -1
|
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _system = require("@mui/system");
|
|
15
15
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
16
|
+
var _cssVariables = require("../../constants/cssVariables");
|
|
16
17
|
var _gridClasses = require("../../constants/gridClasses");
|
|
17
18
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
18
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -30,11 +31,9 @@ const GridPanelHeaderRoot = (0, _system.styled)('div', {
|
|
|
30
31
|
name: 'MuiDataGrid',
|
|
31
32
|
slot: 'PanelHeader',
|
|
32
33
|
overridesResolver: (props, styles) => styles.panelHeader
|
|
33
|
-
})(
|
|
34
|
-
|
|
35
|
-
})
|
|
36
|
-
padding: theme.spacing(1)
|
|
37
|
-
}));
|
|
34
|
+
})({
|
|
35
|
+
padding: _cssVariables.vars.spacing(1)
|
|
36
|
+
});
|
|
38
37
|
function GridPanelHeader(props) {
|
|
39
38
|
const {
|
|
40
39
|
className
|
|
@@ -11,10 +11,11 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
15
|
var _utils = require("@mui/utils");
|
|
15
16
|
var _styles = require("@mui/material/styles");
|
|
16
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
17
17
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
18
|
+
var _cssVariables = require("../../../constants/cssVariables");
|
|
18
19
|
var _gridColumnsSelector = require("../../../hooks/features/columns/gridColumnsSelector");
|
|
19
20
|
var _gridFilterSelector = require("../../../hooks/features/filter/gridFilterSelector");
|
|
20
21
|
var _useGridSelector = require("../../../hooks/utils/useGridSelector");
|
|
@@ -44,19 +45,19 @@ const GridFilterFormRoot = (0, _styles.styled)('div', {
|
|
|
44
45
|
name: 'MuiDataGrid',
|
|
45
46
|
slot: 'FilterForm',
|
|
46
47
|
overridesResolver: (props, styles) => styles.filterForm
|
|
47
|
-
})(
|
|
48
|
-
theme
|
|
49
|
-
}) => ({
|
|
48
|
+
})({
|
|
50
49
|
display: 'flex',
|
|
51
|
-
gap:
|
|
52
|
-
})
|
|
50
|
+
gap: _cssVariables.vars.spacing(1.5)
|
|
51
|
+
});
|
|
53
52
|
const FilterFormDeleteIcon = (0, _styles.styled)('div', {
|
|
54
53
|
name: 'MuiDataGrid',
|
|
55
54
|
slot: 'FilterFormDeleteIcon',
|
|
56
55
|
overridesResolver: (_, styles) => styles.filterFormDeleteIcon
|
|
57
56
|
})({
|
|
58
57
|
flexShrink: 0,
|
|
59
|
-
|
|
58
|
+
display: 'flex',
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
alignItems: 'center'
|
|
60
61
|
});
|
|
61
62
|
const FilterFormLogicOperatorInput = (0, _styles.styled)('div', {
|
|
62
63
|
name: 'MuiDataGrid',
|
|
@@ -134,7 +135,6 @@ const GridFilterForm = exports.GridFilterForm = (0, _forwardRef.forwardRef)(func
|
|
|
134
135
|
const filterSelectorRef = React.useRef(null);
|
|
135
136
|
const multiFilterOperator = filterModel.logicOperator ?? _gridFilterItem.GridLogicOperator.And;
|
|
136
137
|
const hasLogicOperatorColumn = hasMultipleFilters && logicOperators.length > 0;
|
|
137
|
-
const baseFormControlProps = rootProps.slotProps?.baseFormControl || {};
|
|
138
138
|
const baseSelectProps = rootProps.slotProps?.baseSelect || {};
|
|
139
139
|
const isBaseSelectNative = baseSelectProps.native ?? false;
|
|
140
140
|
const baseSelectOptionProps = rootProps.slotProps?.baseSelectOption || {};
|
|
@@ -263,10 +263,8 @@ const GridFilterForm = exports.GridFilterForm = (0, _forwardRef.forwardRef)(func
|
|
|
263
263
|
ownerState: rootProps
|
|
264
264
|
}, other, {
|
|
265
265
|
ref: ref,
|
|
266
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormDeleteIcon, (0, _extends2.default)({
|
|
267
|
-
|
|
268
|
-
}, baseFormControlProps, deleteIconProps, {
|
|
269
|
-
className: (0, _clsx.default)(classes.deleteIcon, baseFormControlProps.className, deleteIconProps.className),
|
|
266
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormDeleteIcon, (0, _extends2.default)({}, deleteIconProps, {
|
|
267
|
+
className: (0, _clsx.default)(classes.deleteIcon, deleteIconProps.className),
|
|
270
268
|
ownerState: rootProps,
|
|
271
269
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
|
|
272
270
|
"aria-label": apiRef.current.getLocaleText('filterPanelDeleteIconLabel'),
|
|
@@ -329,9 +327,8 @@ const GridFilterForm = exports.GridFilterForm = (0, _forwardRef.forwardRef)(func
|
|
|
329
327
|
value: col.field
|
|
330
328
|
}), getColumnLabel(col)))
|
|
331
329
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormOperatorInput, (0, _extends2.default)({
|
|
332
|
-
|
|
333
|
-
size: "small"
|
|
334
|
-
as: rootProps.slots.baseSelect
|
|
330
|
+
as: rootProps.slots.baseSelect,
|
|
331
|
+
size: "small"
|
|
335
332
|
}, operatorInputProps, {
|
|
336
333
|
className: (0, _clsx.default)(classes.operatorInput, operatorInputProps.className),
|
|
337
334
|
ownerState: rootProps,
|
|
@@ -349,11 +346,7 @@ const GridFilterForm = exports.GridFilterForm = (0, _forwardRef.forwardRef)(func
|
|
|
349
346
|
key: operator.value,
|
|
350
347
|
value: operator.value
|
|
351
348
|
}), operator.label || apiRef.current.getLocaleText(`filterOperator${(0, _utils.unstable_capitalize)(operator.value)}`)))
|
|
352
|
-
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormValueInput, (0, _extends2.default)({
|
|
353
|
-
variant: "outlined",
|
|
354
|
-
size: "small",
|
|
355
|
-
as: rootProps.slots.baseFormControl
|
|
356
|
-
}, valueInputPropsOther, {
|
|
349
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(FilterFormValueInput, (0, _extends2.default)({}, valueInputPropsOther, {
|
|
357
350
|
className: (0, _clsx.default)(classes.valueInput, valueInputPropsOther.className),
|
|
358
351
|
ownerState: rootProps,
|
|
359
352
|
children: currentOperator?.InputComponent ? /*#__PURE__*/(0, _jsxRuntime.jsx)(currentOperator.InputComponent, (0, _extends2.default)({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AutocompleteProps } from
|
|
2
|
+
import { AutocompleteProps } from "../../../models/gridBaseSlots.js";
|
|
3
3
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
4
4
|
import type { ValueOptions } from '../../../models/colDef/gridColDef';
|
|
5
|
-
export type GridFilterInputMultipleSingleSelectProps = GridFilterInputValueProps<Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options'
|
|
5
|
+
export type GridFilterInputMultipleSingleSelectProps = GridFilterInputValueProps<Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options'>> & {
|
|
6
6
|
type?: 'singleSelect';
|
|
7
7
|
};
|
|
8
8
|
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): React.JSX.Element;
|
|
@@ -10,15 +10,11 @@ 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 _Autocomplete = _interopRequireWildcard(require("@mui/material/Autocomplete"));
|
|
14
13
|
var _utils = require("@mui/utils");
|
|
15
|
-
var _filterPanelUtils = require("./filterPanelUtils");
|
|
16
14
|
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
15
|
+
var _filterPanelUtils = require("./filterPanelUtils");
|
|
17
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "slotProps"]
|
|
19
|
-
_excluded2 = ["key"],
|
|
20
|
-
_excluded3 = ["inputProps", "InputProps", "InputLabelProps"];
|
|
21
|
-
const filter = (0, _Autocomplete.createFilterOptions)();
|
|
17
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "slotProps"];
|
|
22
18
|
function GridFilterInputMultipleSingleSelect(props) {
|
|
23
19
|
const {
|
|
24
20
|
item,
|
|
@@ -64,47 +60,22 @@ function GridFilterInputMultipleSingleSelect(props) {
|
|
|
64
60
|
value: value.map(getOptionValue)
|
|
65
61
|
}));
|
|
66
62
|
}, [applyValue, item, getOptionValue]);
|
|
67
|
-
|
|
63
|
+
const BaseAutocomplete = rootProps.slots.baseAutocomplete;
|
|
64
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BaseAutocomplete, (0, _extends2.default)({
|
|
68
65
|
multiple: true,
|
|
69
66
|
options: resolvedValueOptions,
|
|
70
67
|
isOptionEqualToValue: isOptionEqualToValue,
|
|
71
|
-
filterOptions: filter,
|
|
72
68
|
id: id,
|
|
73
69
|
value: filteredValues,
|
|
74
70
|
onChange: handleChange,
|
|
75
71
|
getOptionLabel: getOptionLabel,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
key
|
|
82
|
-
} = _getTagProps,
|
|
83
|
-
tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded2);
|
|
84
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseChip, (0, _extends2.default)({
|
|
85
|
-
variant: "outlined",
|
|
86
|
-
size: "small",
|
|
87
|
-
label: getOptionLabel(option)
|
|
88
|
-
}, tagProps), key);
|
|
89
|
-
}),
|
|
90
|
-
renderInput: params => {
|
|
91
|
-
const {
|
|
92
|
-
inputProps,
|
|
93
|
-
InputProps,
|
|
94
|
-
InputLabelProps
|
|
95
|
-
} = params,
|
|
96
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded3);
|
|
97
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseTextField, (0, _extends2.default)({}, rest, {
|
|
98
|
-
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
99
|
-
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
100
|
-
inputRef: focusElementRef,
|
|
72
|
+
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
73
|
+
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
74
|
+
slotProps: {
|
|
75
|
+
textField: {
|
|
101
76
|
type: type || 'text',
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
inputLabel: InputLabelProps,
|
|
105
|
-
htmlInput: inputProps
|
|
106
|
-
}
|
|
107
|
-
}, rootProps.slotProps?.baseTextField));
|
|
77
|
+
inputRef: focusElementRef
|
|
78
|
+
}
|
|
108
79
|
}
|
|
109
80
|
}, other, slotProps?.root));
|
|
110
81
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AutocompleteProps } from
|
|
2
|
+
import { AutocompleteProps } from "../../../models/gridBaseSlots.js";
|
|
3
3
|
import { GridFilterInputValueProps } from "../../../models/gridFilterInputComponent.js";
|
|
4
|
-
export type GridFilterInputMultipleValueProps = GridFilterInputValueProps<Omit<AutocompleteProps<string, true, false, true>, 'options'
|
|
4
|
+
export type GridFilterInputMultipleValueProps = GridFilterInputValueProps<Omit<AutocompleteProps<string, true, false, true>, 'options'>> & {
|
|
5
5
|
type?: 'text' | 'number' | 'date' | 'datetime-local';
|
|
6
6
|
};
|
|
7
7
|
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): React.JSX.Element;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.GridFilterInputMultipleValue = GridFilterInputMultipleValue;
|
|
9
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
10
|
var React = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
|
|
14
12
|
var _utils = require("@mui/utils");
|
|
15
13
|
var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
|
|
16
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
const _excluded = ["key"],
|
|
18
|
-
_excluded2 = ["inputProps", "InputProps", "InputLabelProps"];
|
|
19
15
|
function GridFilterInputMultipleValue(props) {
|
|
20
16
|
const {
|
|
21
17
|
item,
|
|
@@ -25,8 +21,9 @@ function GridFilterInputMultipleValue(props) {
|
|
|
25
21
|
focusElementRef,
|
|
26
22
|
slotProps
|
|
27
23
|
} = props;
|
|
28
|
-
const [filterValueState, setFilterValueState] = React.useState(item.value || []);
|
|
29
24
|
const id = (0, _utils.unstable_useId)();
|
|
25
|
+
const [options, setOptions] = React.useState([]);
|
|
26
|
+
const [filterValueState, setFilterValueState] = React.useState(item.value || []);
|
|
30
27
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
31
28
|
React.useEffect(() => {
|
|
32
29
|
const itemValue = item.value ?? [];
|
|
@@ -38,51 +35,29 @@ function GridFilterInputMultipleValue(props) {
|
|
|
38
35
|
value: [...value.map(filterItemValue => type === 'number' ? Number(filterItemValue) : filterItemValue)]
|
|
39
36
|
}));
|
|
40
37
|
}, [applyValue, item, type]);
|
|
41
|
-
|
|
38
|
+
const handleInputChange = React.useCallback((event, value) => {
|
|
39
|
+
if (value === '') {
|
|
40
|
+
setOptions([]);
|
|
41
|
+
} else {
|
|
42
|
+
setOptions([value]);
|
|
43
|
+
}
|
|
44
|
+
}, [setOptions]);
|
|
45
|
+
const BaseAutocomplete = rootProps.slots.baseAutocomplete;
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BaseAutocomplete, (0, _extends2.default)({
|
|
42
47
|
multiple: true,
|
|
43
48
|
freeSolo: true,
|
|
44
|
-
options:
|
|
45
|
-
filterOptions: (options, params) => {
|
|
46
|
-
const {
|
|
47
|
-
inputValue
|
|
48
|
-
} = params;
|
|
49
|
-
return inputValue == null || inputValue === '' ? [] : [inputValue];
|
|
50
|
-
},
|
|
49
|
+
options: options,
|
|
51
50
|
id: id,
|
|
52
51
|
value: filterValueState,
|
|
53
52
|
onChange: handleChange,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
key
|
|
60
|
-
} = _getTagProps,
|
|
61
|
-
tagProps = (0, _objectWithoutPropertiesLoose2.default)(_getTagProps, _excluded);
|
|
62
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseChip, (0, _extends2.default)({
|
|
63
|
-
variant: "outlined",
|
|
64
|
-
size: "small",
|
|
65
|
-
label: option
|
|
66
|
-
}, tagProps), key);
|
|
67
|
-
}),
|
|
68
|
-
renderInput: params => {
|
|
69
|
-
const {
|
|
70
|
-
inputProps,
|
|
71
|
-
InputProps,
|
|
72
|
-
InputLabelProps
|
|
73
|
-
} = params,
|
|
74
|
-
rest = (0, _objectWithoutPropertiesLoose2.default)(params, _excluded2);
|
|
75
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseTextField, (0, _extends2.default)({}, rest, {
|
|
76
|
-
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
77
|
-
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
78
|
-
inputRef: focusElementRef,
|
|
53
|
+
onInputChange: handleInputChange,
|
|
54
|
+
label: apiRef.current.getLocaleText('filterPanelInputLabel'),
|
|
55
|
+
placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
|
|
56
|
+
slotProps: {
|
|
57
|
+
textField: {
|
|
79
58
|
type: type || 'text',
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
inputLabel: InputLabelProps,
|
|
83
|
-
htmlInput: inputProps
|
|
84
|
-
}
|
|
85
|
-
}, rootProps.slotProps?.baseTextField));
|
|
59
|
+
inputRef: focusElementRef
|
|
60
|
+
}
|
|
86
61
|
}
|
|
87
62
|
}, slotProps?.root));
|
|
88
63
|
}
|
|
@@ -65,12 +65,9 @@ function GridFilterInputValue(props) {
|
|
|
65
65
|
disabled: disabled,
|
|
66
66
|
slotProps: (0, _extends2.default)({}, textFieldProps?.slotProps, {
|
|
67
67
|
input: (0, _extends2.default)({
|
|
68
|
-
endAdornment: applying ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
fontSize: "small",
|
|
72
|
-
color: "action"
|
|
73
|
-
})
|
|
68
|
+
endAdornment: applying ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.loadIcon, {
|
|
69
|
+
fontSize: "small",
|
|
70
|
+
color: "action"
|
|
74
71
|
}) : null
|
|
75
72
|
}, textFieldProps?.slotProps?.input),
|
|
76
73
|
htmlInput: (0, _extends2.default)({
|
|
@@ -12,6 +12,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _styles = require("@mui/material/styles");
|
|
13
13
|
var _utils = require("@mui/utils");
|
|
14
14
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
15
|
+
var _cssVariables = require("../../constants/cssVariables");
|
|
15
16
|
var _gridColumnsSelector = require("../../hooks/features/columns/gridColumnsSelector");
|
|
16
17
|
var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
17
18
|
var _gridFilterSelector = require("../../hooks/features/filter/gridFilterSelector");
|
|
@@ -34,12 +35,10 @@ const GridToolbarFilterListRoot = (0, _styles.styled)('ul', {
|
|
|
34
35
|
name: 'MuiDataGrid',
|
|
35
36
|
slot: 'ToolbarFilterList',
|
|
36
37
|
overridesResolver: (_props, styles) => styles.toolbarFilterList
|
|
37
|
-
})(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
padding: theme.spacing(0, 1)
|
|
42
|
-
}));
|
|
38
|
+
})({
|
|
39
|
+
margin: _cssVariables.vars.spacing(1, 1, 0.5),
|
|
40
|
+
padding: _cssVariables.vars.spacing(0, 1)
|
|
41
|
+
});
|
|
43
42
|
|
|
44
43
|
// FIXME(v8:romgrk): override slotProps
|
|
45
44
|
|
|
@@ -15,6 +15,7 @@ var _styles = require("@mui/material/styles");
|
|
|
15
15
|
var _utils = require("@mui/utils");
|
|
16
16
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
17
17
|
var _OutlinedInput = require("@mui/material/OutlinedInput");
|
|
18
|
+
var _cssVariables = require("../../constants/cssVariables");
|
|
18
19
|
var _constants = require("../../constants");
|
|
19
20
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
20
21
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -36,20 +37,18 @@ const GridToolbarQuickFilterRoot = (0, _styles.styled)('div', {
|
|
|
36
37
|
name: 'MuiDataGrid',
|
|
37
38
|
slot: 'ToolbarQuickFilter',
|
|
38
39
|
overridesResolver: (props, styles) => styles.toolbarQuickFilter
|
|
39
|
-
})(
|
|
40
|
-
theme
|
|
41
|
-
}) => ({
|
|
40
|
+
})({
|
|
42
41
|
[`.${_OutlinedInput.outlinedInputClasses.root}`]: {
|
|
43
|
-
fontSize:
|
|
42
|
+
fontSize: _cssVariables.vars.typography.body.fontSize
|
|
44
43
|
},
|
|
45
44
|
[`& input[type="search"]::-webkit-search-decoration,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
& input[type="search"]::-webkit-search-cancel-button,
|
|
46
|
+
& input[type="search"]::-webkit-search-results-button,
|
|
47
|
+
& input[type="search"]::-webkit-search-results-decoration`]: {
|
|
49
48
|
/* clears the 'X' icon from Chrome */
|
|
50
49
|
display: 'none'
|
|
51
50
|
}
|
|
52
|
-
})
|
|
51
|
+
});
|
|
53
52
|
const defaultSearchValueParser = searchText => searchText.split(' ').filter(word => word !== '');
|
|
54
53
|
const defaultSearchValueFormatter = values => values.join(' ');
|
|
55
54
|
function GridToolbarQuickFilter(props) {
|
|
@@ -105,30 +104,24 @@ function GridToolbarQuickFilter(props) {
|
|
|
105
104
|
}, other, {
|
|
106
105
|
slotProps: (0, _extends2.default)({}, slotProps?.root.slotProps, {
|
|
107
106
|
input: (0, _extends2.default)({
|
|
108
|
-
startAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
startAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.quickFilterIcon, {
|
|
108
|
+
fontSize: "small"
|
|
109
|
+
}),
|
|
110
|
+
endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
|
|
111
|
+
"aria-label": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),
|
|
112
|
+
size: "small",
|
|
113
|
+
edge: "end",
|
|
114
|
+
style: searchValue ? {
|
|
115
|
+
visibility: 'visible'
|
|
116
|
+
} : {
|
|
117
|
+
visibility: 'hidden'
|
|
118
|
+
},
|
|
119
|
+
onClick: handleSearchReset
|
|
120
|
+
}, rootProps.slotProps?.baseIconButton, {
|
|
121
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.quickFilterClearIcon, {
|
|
111
122
|
fontSize: "small"
|
|
112
123
|
})
|
|
113
|
-
})
|
|
114
|
-
endAdornment: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseInputAdornment, {
|
|
115
|
-
position: "end",
|
|
116
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
|
|
117
|
-
"aria-label": apiRef.current.getLocaleText('toolbarQuickFilterDeleteIconLabel'),
|
|
118
|
-
size: "small",
|
|
119
|
-
edge: "end",
|
|
120
|
-
style: searchValue ? {
|
|
121
|
-
visibility: 'visible'
|
|
122
|
-
} : {
|
|
123
|
-
visibility: 'hidden'
|
|
124
|
-
},
|
|
125
|
-
onClick: handleSearchReset
|
|
126
|
-
}, rootProps.slotProps?.baseIconButton, {
|
|
127
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.quickFilterClearIcon, {
|
|
128
|
-
fontSize: "small"
|
|
129
|
-
})
|
|
130
|
-
}))
|
|
131
|
-
})
|
|
124
|
+
}))
|
|
132
125
|
}, slotProps?.root.slotProps?.input)
|
|
133
126
|
})
|
|
134
127
|
}, rootProps.slotProps?.baseTextField));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
3
4
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
@@ -7,7 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
8
|
exports.GridVirtualScrollbar = void 0;
|
|
8
9
|
var React = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _system = require("@mui/system");
|
|
10
|
-
var
|
|
11
|
+
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
12
|
+
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
13
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
11
14
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
12
15
|
var _useOnMount = require("../../hooks/utils/useOnMount");
|
|
13
16
|
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
@@ -23,7 +26,7 @@ const useUtilityClasses = (ownerState, position) => {
|
|
|
23
26
|
root: ['scrollbar', `scrollbar--${position}`],
|
|
24
27
|
content: ['scrollbarContent']
|
|
25
28
|
};
|
|
26
|
-
return (0,
|
|
29
|
+
return (0, _composeClasses.default)(slots, _gridClasses.getDataGridUtilityClass, classes);
|
|
27
30
|
};
|
|
28
31
|
const Scrollbar = (0, _system.styled)('div')({
|
|
29
32
|
position: 'absolute',
|
|
@@ -79,7 +82,7 @@ const GridVirtualScrollbar = exports.GridVirtualScrollbar = (0, _forwardRef.forw
|
|
|
79
82
|
const contentSize = dimensions.minimumSize[propertyDimension] + (hasScroll ? dimensions.scrollbarSize : 0);
|
|
80
83
|
const scrollbarSize = props.position === 'vertical' ? dimensions.viewportInnerSize.height : dimensions.viewportOuterSize.width;
|
|
81
84
|
const scrollbarInnerSize = scrollbarSize * (contentSize / dimensions.viewportOuterSize[propertyDimension]);
|
|
82
|
-
const onScrollerScroll = (0,
|
|
85
|
+
const onScrollerScroll = (0, _useEventCallback.default)(() => {
|
|
83
86
|
const scrollbar = scrollbarRef.current;
|
|
84
87
|
const scrollPosition = props.scrollPosition.current;
|
|
85
88
|
if (!scrollbar) {
|
|
@@ -97,7 +100,7 @@ const GridVirtualScrollbar = exports.GridVirtualScrollbar = (0, _forwardRef.forw
|
|
|
97
100
|
const value = scrollPosition[propertyScrollPosition] / contentSize;
|
|
98
101
|
scrollbar[propertyScroll] = value * scrollbarInnerSize;
|
|
99
102
|
});
|
|
100
|
-
const onScrollbarScroll = (0,
|
|
103
|
+
const onScrollbarScroll = (0, _useEventCallback.default)(() => {
|
|
101
104
|
const scroller = apiRef.current.virtualScrollerRef.current;
|
|
102
105
|
const scrollbar = scrollbarRef.current;
|
|
103
106
|
if (!scrollbar) {
|
|
@@ -130,7 +133,7 @@ const GridVirtualScrollbar = exports.GridVirtualScrollbar = (0, _forwardRef.forw
|
|
|
130
133
|
}, [scrollbarInnerSize, propertyDimension]);
|
|
131
134
|
const Container = props.position === 'vertical' ? ScrollbarVertical : ScrollbarHorizontal;
|
|
132
135
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Container, {
|
|
133
|
-
ref: (0,
|
|
136
|
+
ref: (0, _useForkRef.default)(ref, scrollbarRef),
|
|
134
137
|
className: classes.root,
|
|
135
138
|
style: props.position === 'vertical' && rootProps.unstable_listView ? {
|
|
136
139
|
height: '100%',
|
|
@@ -8,6 +8,7 @@ exports.GridVirtualScrollerFiller = void 0;
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _system = require("@mui/system");
|
|
10
10
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
11
|
+
var _cssVariables = require("../../constants/cssVariables");
|
|
11
12
|
var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
12
13
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
13
14
|
var _dimensions = require("../../hooks/features/dimensions");
|
|
@@ -24,7 +25,7 @@ const Pinned = (0, _system.styled)('div')({
|
|
|
24
25
|
height: '100%',
|
|
25
26
|
boxSizing: 'border-box',
|
|
26
27
|
borderTop: '1px solid var(--rowBorderColor)',
|
|
27
|
-
backgroundColor:
|
|
28
|
+
backgroundColor: _cssVariables.vars.cell.background.pinned
|
|
28
29
|
});
|
|
29
30
|
const PinnedLeft = (0, _system.styled)(Pinned)({
|
|
30
31
|
left: 0,
|