@mui/x-data-grid 6.5.0 → 6.7.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 +150 -2
- package/DataGrid/DataGrid.js +10 -3
- package/README.md +2 -2
- package/components/GridColumnHeaders.js +4 -9
- package/components/GridHeader.d.ts +2 -2
- package/components/base/GridBody.d.ts +1 -1
- package/components/base/GridFooterPlaceholder.d.ts +2 -2
- package/components/base/GridOverlays.d.ts +2 -2
- package/components/cell/GridActionsCell.d.ts +3 -3
- package/components/cell/GridActionsCell.js +3 -3
- package/components/cell/GridBooleanCell.d.ts +1 -1
- package/components/cell/GridEditBooleanCell.d.ts +2 -2
- package/components/cell/GridEditDateCell.d.ts +2 -2
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditSingleSelectCell.d.ts +3 -3
- package/components/cell/GridEditSingleSelectCell.js +5 -5
- package/components/cell/GridSkeletonCell.d.ts +1 -1
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +2 -2
- package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
- package/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
- package/components/containers/GridRoot.js +1 -3
- package/components/containers/GridRootStyles.js +8 -1
- package/components/index.d.ts +0 -1
- package/components/index.js +1 -2
- package/components/menu/GridMenu.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +2 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +2 -2
- package/components/panel/GridColumnsPanel.d.ts +16 -2
- package/components/panel/GridColumnsPanel.js +14 -0
- package/components/panel/GridPanelContent.d.ts +1 -1
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelHeader.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +3 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputDate.js +1 -6
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -6
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/components/panel/filterPanel/GridFilterPanel.d.ts +8 -0
- package/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/components/toolbar/GridToolbarExport.d.ts +2 -2
- package/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/components/toolbar/GridToolbarQuickFilter.d.ts +2 -2
- package/constants/gridClasses.d.ts +4 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +4 -4
- package/context/GridContextProvider.d.ts +1 -1
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +10 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/filter/gridFilterSelector.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.js +2 -2
- package/hooks/features/filter/gridFilterState.d.ts +6 -6
- package/hooks/features/filter/gridFilterState.js +6 -0
- package/hooks/features/filter/useGridFilter.js +31 -10
- package/hooks/features/focus/useGridFocus.js +1 -0
- package/hooks/features/preferencesPanel/gridPreferencePanelState.d.ts +2 -0
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/hooks/features/rows/useGridRowsMeta.js +12 -13
- package/hooks/features/sorting/useGridSorting.js +2 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/index.js +1 -1
- package/internals/utils/useProps.js +21 -1
- package/legacy/DataGrid/DataGrid.js +10 -3
- package/legacy/components/GridColumnHeaders.js +4 -9
- package/legacy/components/cell/GridActionsCell.js +3 -3
- package/legacy/components/cell/GridEditSingleSelectCell.js +5 -5
- package/legacy/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/legacy/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/legacy/components/containers/GridRoot.js +1 -3
- package/legacy/components/containers/GridRootStyles.js +8 -4
- package/legacy/components/index.js +1 -2
- package/legacy/components/panel/GridColumnsPanel.js +14 -0
- package/legacy/components/panel/GridPreferencesPanel.js +3 -1
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +7 -7
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +1 -5
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +7 -6
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -5
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +11 -5
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/legacy/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/legacy/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +4 -4
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/legacy/hooks/features/filter/gridFilterSelector.js +4 -4
- package/legacy/hooks/features/filter/gridFilterState.js +6 -0
- package/legacy/hooks/features/filter/useGridFilter.js +31 -10
- package/legacy/hooks/features/focus/useGridFocus.js +1 -0
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/legacy/hooks/features/rows/useGridRowsMeta.js +13 -21
- package/legacy/hooks/features/sorting/useGridSorting.js +2 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/internals/utils/useProps.js +23 -1
- package/legacy/locales/arSD.js +12 -12
- package/legacy/locales/beBY.js +12 -12
- package/legacy/locales/bgBG.js +12 -12
- package/legacy/locales/csCZ.js +25 -27
- package/legacy/locales/daDK.js +12 -12
- package/legacy/locales/deDE.js +25 -27
- package/legacy/locales/elGR.js +12 -12
- package/legacy/locales/esES.js +12 -12
- package/legacy/locales/faIR.js +12 -12
- package/legacy/locales/fiFI.js +12 -12
- package/legacy/locales/frFR.js +25 -27
- package/legacy/locales/heIL.js +12 -12
- package/legacy/locales/huHU.js +12 -12
- package/legacy/locales/itIT.js +12 -12
- package/legacy/locales/jaJP.js +12 -12
- package/legacy/locales/koKR.js +12 -12
- package/legacy/locales/nbNO.js +12 -12
- package/legacy/locales/nlNL.js +25 -27
- package/legacy/locales/plPL.js +12 -12
- package/legacy/locales/ptBR.js +12 -12
- package/legacy/locales/roRO.js +12 -12
- package/legacy/locales/ruRU.js +12 -12
- package/legacy/locales/skSK.js +12 -12
- package/legacy/locales/svSE.js +12 -12
- package/legacy/locales/trTR.js +18 -19
- package/legacy/locales/ukUA.js +12 -12
- package/legacy/locales/urPK.js +12 -12
- package/legacy/locales/viVN.js +12 -12
- package/legacy/locales/zhCN.js +12 -12
- package/legacy/locales/zhTW.js +12 -12
- package/legacy/models/gridFilterItem.js +1 -1
- package/legacy/utils/EventManager.js +2 -2
- package/locales/arSD.js +12 -12
- package/locales/beBY.js +12 -12
- package/locales/bgBG.js +12 -12
- package/locales/csCZ.js +25 -27
- package/locales/daDK.js +12 -12
- package/locales/deDE.js +25 -27
- package/locales/elGR.js +12 -12
- package/locales/esES.js +12 -12
- package/locales/faIR.js +12 -12
- package/locales/fiFI.js +12 -12
- package/locales/frFR.js +25 -27
- package/locales/heIL.js +12 -12
- package/locales/huHU.js +12 -12
- package/locales/itIT.js +12 -12
- package/locales/jaJP.js +12 -12
- package/locales/koKR.js +12 -12
- package/locales/nbNO.js +12 -12
- package/locales/nlNL.js +25 -27
- package/locales/plPL.js +12 -12
- package/locales/ptBR.js +12 -12
- package/locales/roRO.js +12 -12
- package/locales/ruRU.js +12 -12
- package/locales/skSK.js +12 -12
- package/locales/svSE.js +12 -12
- package/locales/trTR.js +18 -19
- package/locales/ukUA.js +12 -12
- package/locales/urPK.js +12 -12
- package/locales/viVN.js +12 -12
- package/locales/zhCN.js +12 -12
- package/locales/zhTW.js +12 -12
- package/material/components/MUISelectOption.d.ts +2 -2
- package/models/api/gridFilterApi.d.ts +3 -1
- package/models/api/gridPreferencesPanelApi.d.ts +3 -1
- package/models/events/gridEventLookup.d.ts +8 -0
- package/models/gridFilterItem.d.ts +1 -1
- package/models/gridFilterItem.js +1 -1
- package/models/gridFilterOperator.d.ts +1 -1
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +5 -0
- package/modern/DataGrid/DataGrid.js +10 -3
- package/modern/components/GridColumnHeaders.js +4 -9
- package/modern/components/cell/GridActionsCell.js +3 -3
- package/modern/components/cell/GridEditSingleSelectCell.js +5 -5
- package/modern/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +13 -4
- package/modern/components/containers/GridRoot.js +1 -3
- package/modern/components/containers/GridRootStyles.js +8 -1
- package/modern/components/index.js +1 -2
- package/modern/components/panel/GridColumnsPanel.js +14 -0
- package/modern/components/panel/GridPreferencesPanel.js +3 -1
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +1 -6
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -6
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/modern/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/modern/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/modern/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/modern/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/modern/components/toolbar/GridToolbarFilterButton.js +11 -4
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +4 -4
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +2 -2
- package/modern/hooks/features/filter/gridFilterState.js +6 -0
- package/modern/hooks/features/filter/useGridFilter.js +31 -10
- package/modern/hooks/features/focus/useGridFocus.js +1 -0
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/modern/hooks/features/rows/useGridRowsMeta.js +12 -13
- package/modern/hooks/features/sorting/useGridSorting.js +2 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internals/utils/useProps.js +20 -1
- package/modern/locales/arSD.js +12 -12
- package/modern/locales/beBY.js +12 -12
- package/modern/locales/bgBG.js +12 -12
- package/modern/locales/csCZ.js +25 -27
- package/modern/locales/daDK.js +12 -12
- package/modern/locales/deDE.js +25 -27
- package/modern/locales/elGR.js +12 -12
- package/modern/locales/esES.js +12 -12
- package/modern/locales/faIR.js +12 -12
- package/modern/locales/fiFI.js +12 -12
- package/modern/locales/frFR.js +25 -27
- package/modern/locales/heIL.js +12 -12
- package/modern/locales/huHU.js +12 -12
- package/modern/locales/itIT.js +12 -12
- package/modern/locales/jaJP.js +12 -12
- package/modern/locales/koKR.js +12 -12
- package/modern/locales/nbNO.js +12 -12
- package/modern/locales/nlNL.js +25 -27
- package/modern/locales/plPL.js +12 -12
- package/modern/locales/ptBR.js +12 -12
- package/modern/locales/roRO.js +12 -12
- package/modern/locales/ruRU.js +12 -12
- package/modern/locales/skSK.js +12 -12
- package/modern/locales/svSE.js +12 -12
- package/modern/locales/trTR.js +18 -19
- package/modern/locales/ukUA.js +12 -12
- package/modern/locales/urPK.js +12 -12
- package/modern/locales/viVN.js +12 -12
- package/modern/locales/zhCN.js +12 -12
- package/modern/locales/zhTW.js +12 -12
- package/modern/models/gridFilterItem.js +1 -1
- package/modern/utils/EventManager.js +2 -2
- package/node/DataGrid/DataGrid.js +10 -3
- package/node/components/GridColumnHeaders.js +3 -8
- package/node/components/cell/GridActionsCell.js +3 -3
- package/node/components/cell/GridEditSingleSelectCell.js +5 -5
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +3 -3
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +12 -3
- package/node/components/containers/GridRoot.js +1 -3
- package/node/components/containers/GridRootStyles.js +8 -1
- package/node/components/index.js +0 -11
- package/node/components/panel/GridColumnsPanel.js +14 -0
- package/node/components/panel/GridPreferencesPanel.js +3 -1
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
- package/node/components/panel/filterPanel/GridFilterInputDate.js +1 -6
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -6
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -6
- package/node/components/panel/filterPanel/GridFilterPanel.js +8 -0
- package/node/components/toolbar/GridToolbarColumnsButton.js +11 -6
- package/node/components/toolbar/GridToolbarDensitySelector.js +2 -2
- package/node/components/toolbar/GridToolbarExportContainer.js +7 -7
- package/node/components/toolbar/GridToolbarFilterButton.js +10 -3
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +4 -4
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +2 -1
- package/node/hooks/features/filter/gridFilterSelector.js +2 -2
- package/node/hooks/features/filter/gridFilterState.js +6 -0
- package/node/hooks/features/filter/useGridFilter.js +35 -14
- package/node/hooks/features/focus/useGridFocus.js +1 -0
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -2
- package/node/hooks/features/rows/useGridRowsMeta.js +12 -13
- package/node/hooks/features/sorting/useGridSorting.js +2 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/utils/useProps.js +20 -1
- package/node/locales/arSD.js +12 -12
- package/node/locales/beBY.js +12 -12
- package/node/locales/bgBG.js +12 -12
- package/node/locales/csCZ.js +25 -27
- package/node/locales/daDK.js +12 -12
- package/node/locales/deDE.js +25 -27
- package/node/locales/elGR.js +12 -12
- package/node/locales/esES.js +12 -12
- package/node/locales/faIR.js +12 -12
- package/node/locales/fiFI.js +12 -12
- package/node/locales/frFR.js +25 -27
- package/node/locales/heIL.js +12 -12
- package/node/locales/huHU.js +12 -12
- package/node/locales/itIT.js +12 -12
- package/node/locales/jaJP.js +12 -12
- package/node/locales/koKR.js +12 -12
- package/node/locales/nbNO.js +12 -12
- package/node/locales/nlNL.js +25 -27
- package/node/locales/plPL.js +12 -12
- package/node/locales/ptBR.js +12 -12
- package/node/locales/roRO.js +12 -12
- package/node/locales/ruRU.js +12 -12
- package/node/locales/skSK.js +12 -12
- package/node/locales/svSE.js +12 -12
- package/node/locales/trTR.js +18 -19
- package/node/locales/ukUA.js +12 -12
- package/node/locales/urPK.js +12 -12
- package/node/locales/viVN.js +12 -12
- package/node/locales/zhCN.js +12 -12
- package/node/locales/zhTW.js +12 -12
- package/node/models/gridFilterItem.js +1 -1
- package/node/utils/EventManager.js +2 -2
- package/package.json +4 -4
- package/themeAugmentation/overrides.d.ts +1 -1
- package/utils/EventManager.js +2 -2
- package/components/GridScrollArea.d.ts +0 -10
- package/components/GridScrollArea.js +0 -117
- package/legacy/components/GridScrollArea.js +0 -119
- package/legacy/lib/createDetectElementResize/index.js +0 -145
- package/lib/createDetectElementResize/index.d.ts +0 -18
- package/lib/createDetectElementResize/index.js +0 -145
- package/lib/createDetectElementResize/types.d.ts +0 -9
- package/modern/components/GridScrollArea.js +0 -117
- package/modern/lib/createDetectElementResize/index.js +0 -145
- package/node/components/GridScrollArea.js +0 -126
- package/node/lib/createDetectElementResize/index.js +0 -151
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuColumnsItem(props: GridColumnMenuItemProps): JSX.Element;
|
|
3
|
+
declare function GridColumnMenuColumnsItem(props: GridColumnMenuItemProps): React.JSX.Element;
|
|
4
4
|
declare namespace GridColumnMenuColumnsItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuFilterItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuFilterItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuFilterItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuHideItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuHideItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuHideItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuManageItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuManageItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuManageItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuItemProps } from '../GridColumnMenuItemProps';
|
|
3
|
-
declare function GridColumnMenuSortItem(props: GridColumnMenuItemProps): JSX.Element | null;
|
|
3
|
+
declare function GridColumnMenuSortItem(props: GridColumnMenuItemProps): React.JSX.Element | null;
|
|
4
4
|
declare namespace GridColumnMenuSortItem {
|
|
5
5
|
var propTypes: any;
|
|
6
6
|
}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { GridPanelWrapperProps } from './GridPanelWrapper';
|
|
3
3
|
import type { GridColDef } from '../../models/colDef/gridColDef';
|
|
4
4
|
export interface GridColumnsPanelProps extends GridPanelWrapperProps {
|
|
5
5
|
sort?: 'asc' | 'desc';
|
|
6
6
|
searchPredicate?: (column: GridColDef, searchValue: string) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* If `true`, the column search field will be focused automatically.
|
|
9
|
+
* If `false`, the first column switch input will be focused automatically.
|
|
10
|
+
* This helps to avoid input keyboard panel to popup automatically on touch devices.
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
7
13
|
autoFocusSearchField?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* If `true`, the `Hide all` button will not be displayed.
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
8
18
|
disableHideAllButton?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If `true`, the `Show all` button will be disabled
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
9
23
|
disableShowAllButton?: boolean;
|
|
10
24
|
/**
|
|
11
25
|
* Returns the list of togglable columns.
|
|
@@ -16,7 +30,7 @@ export interface GridColumnsPanelProps extends GridPanelWrapperProps {
|
|
|
16
30
|
*/
|
|
17
31
|
getTogglableColumns?: (columns: GridColDef[]) => GridColDef['field'][];
|
|
18
32
|
}
|
|
19
|
-
declare function GridColumnsPanel(props: GridColumnsPanelProps): JSX.Element;
|
|
33
|
+
declare function GridColumnsPanel(props: GridColumnsPanelProps): React.JSX.Element;
|
|
20
34
|
declare namespace GridColumnsPanel {
|
|
21
35
|
var propTypes: any;
|
|
22
36
|
}
|
|
@@ -198,8 +198,22 @@ process.env.NODE_ENV !== "production" ? GridColumnsPanel.propTypes = {
|
|
|
198
198
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
199
199
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
200
200
|
// ----------------------------------------------------------------------
|
|
201
|
+
/**
|
|
202
|
+
* If `true`, the column search field will be focused automatically.
|
|
203
|
+
* If `false`, the first column switch input will be focused automatically.
|
|
204
|
+
* This helps to avoid input keyboard panel to popup automatically on touch devices.
|
|
205
|
+
* @default true
|
|
206
|
+
*/
|
|
201
207
|
autoFocusSearchField: PropTypes.bool,
|
|
208
|
+
/**
|
|
209
|
+
* If `true`, the `Hide all` button will not be displayed.
|
|
210
|
+
* @default false
|
|
211
|
+
*/
|
|
202
212
|
disableHideAllButton: PropTypes.bool,
|
|
213
|
+
/**
|
|
214
|
+
* If `true`, the `Show all` button will be disabled
|
|
215
|
+
* @default false
|
|
216
|
+
*/
|
|
203
217
|
disableShowAllButton: PropTypes.bool,
|
|
204
218
|
/**
|
|
205
219
|
* Returns the list of togglable columns.
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelContent(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}): JSX.Element;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
6
|
declare namespace GridPanelContent {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelFooter(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}): JSX.Element;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
6
|
declare namespace GridPanelFooter {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { SxProps, Theme } from '@mui/system';
|
|
3
3
|
declare function GridPanelHeader(props: React.HTMLAttributes<HTMLDivElement> & {
|
|
4
4
|
sx?: SxProps<Theme>;
|
|
5
|
-
}): JSX.Element;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
6
|
declare namespace GridPanelHeader {
|
|
7
7
|
var propTypes: any;
|
|
8
8
|
}
|
|
@@ -17,7 +17,9 @@ export const GridPreferencesPanel = /*#__PURE__*/React.forwardRef(function GridP
|
|
|
17
17
|
return /*#__PURE__*/_jsx(rootProps.slots.panel, _extends({
|
|
18
18
|
ref: ref,
|
|
19
19
|
as: rootProps.slots.basePopper,
|
|
20
|
-
open: columns.length > 0 && preferencePanelState.open
|
|
20
|
+
open: columns.length > 0 && preferencePanelState.open,
|
|
21
|
+
id: preferencePanelState.panelId,
|
|
22
|
+
"aria-labelledby": preferencePanelState.labelId
|
|
21
23
|
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.panel, props, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.basePopper, {
|
|
22
24
|
children: panelContent
|
|
23
25
|
}));
|
|
@@ -2,7 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export type GridFilterInputBooleanProps = GridFilterInputValueProps & TextFieldProps & {
|
|
5
|
-
headerFilterMenu?: React.ReactNode | null;
|
|
6
5
|
clearButton?: React.ReactNode | null;
|
|
7
6
|
/**
|
|
8
7
|
* It is `true` if the filter either has a value or an operator with no value
|
|
@@ -10,7 +9,7 @@ export type GridFilterInputBooleanProps = GridFilterInputValueProps & TextFieldP
|
|
|
10
9
|
*/
|
|
11
10
|
isFilterActive?: boolean;
|
|
12
11
|
};
|
|
13
|
-
declare function GridFilterInputBoolean(props: GridFilterInputBooleanProps): JSX.Element;
|
|
12
|
+
declare function GridFilterInputBoolean(props: GridFilterInputBooleanProps): React.JSX.Element;
|
|
14
13
|
declare namespace GridFilterInputBoolean {
|
|
15
14
|
var propTypes: any;
|
|
16
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "apiRef", "focusElementRef", "isFilterActive", "clearButton", "tabIndex", "label"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
@@ -10,8 +10,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
11
|
const BooleanOperatorContainer = styled('div')({
|
|
12
12
|
display: 'flex',
|
|
13
|
-
alignItems: '
|
|
14
|
-
width: '100%'
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
width: '100%',
|
|
15
|
+
[`& button`]: {
|
|
16
|
+
margin: 'auto 0px 5px 5px'
|
|
17
|
+
}
|
|
15
18
|
});
|
|
16
19
|
function GridFilterInputBoolean(props) {
|
|
17
20
|
var _rootProps$slotProps, _baseSelectProps$nati, _rootProps$slotProps2, _rootProps$slotProps3;
|
|
@@ -20,8 +23,6 @@ function GridFilterInputBoolean(props) {
|
|
|
20
23
|
applyValue,
|
|
21
24
|
apiRef,
|
|
22
25
|
focusElementRef,
|
|
23
|
-
headerFilterMenu,
|
|
24
|
-
isFilterActive,
|
|
25
26
|
clearButton,
|
|
26
27
|
tabIndex,
|
|
27
28
|
label: labelProp
|
|
@@ -62,7 +63,6 @@ function GridFilterInputBoolean(props) {
|
|
|
62
63
|
variant: "standard",
|
|
63
64
|
native: isSelectNative,
|
|
64
65
|
displayEmpty: true,
|
|
65
|
-
startAdornment: isFilterActive ? headerFilterMenu : null,
|
|
66
66
|
inputProps: {
|
|
67
67
|
ref: focusElementRef,
|
|
68
68
|
tabIndex
|
|
@@ -98,7 +98,6 @@ process.env.NODE_ENV !== "production" ? GridFilterInputBoolean.propTypes = {
|
|
|
98
98
|
focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
99
99
|
current: PropTypes.any.isRequired
|
|
100
100
|
})]),
|
|
101
|
-
headerFilterMenu: PropTypes.node,
|
|
102
101
|
/**
|
|
103
102
|
* It is `true` if the filter either has a value or an operator with no value
|
|
104
103
|
* required is selected (e.g. `isEmpty`)
|
|
@@ -3,7 +3,6 @@ import { TextFieldProps } from '@mui/material/TextField';
|
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export type GridFilterInputDateProps = GridFilterInputValueProps & TextFieldProps & {
|
|
5
5
|
type?: 'date' | 'datetime-local';
|
|
6
|
-
headerFilterMenu?: React.ReactNode | null;
|
|
7
6
|
clearButton?: React.ReactNode | null;
|
|
8
7
|
/**
|
|
9
8
|
* It is `true` if the filter either has a value or an operator with no value
|
|
@@ -12,7 +11,7 @@ export type GridFilterInputDateProps = GridFilterInputValueProps & TextFieldProp
|
|
|
12
11
|
isFilterActive?: boolean;
|
|
13
12
|
};
|
|
14
13
|
export declare const SUBMIT_FILTER_DATE_STROKE_TIME = 500;
|
|
15
|
-
declare function GridFilterInputDate(props: GridFilterInputDateProps): JSX.Element;
|
|
14
|
+
declare function GridFilterInputDate(props: GridFilterInputDateProps): React.JSX.Element;
|
|
16
15
|
declare namespace GridFilterInputDate {
|
|
17
16
|
var propTypes: any;
|
|
18
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "InputProps", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "InputProps", "isFilterActive", "clearButton", "tabIndex", "disabled"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
@@ -16,8 +16,6 @@ function GridFilterInputDate(props) {
|
|
|
16
16
|
apiRef,
|
|
17
17
|
focusElementRef,
|
|
18
18
|
InputProps,
|
|
19
|
-
headerFilterMenu,
|
|
20
|
-
isFilterActive,
|
|
21
19
|
clearButton,
|
|
22
20
|
tabIndex,
|
|
23
21
|
disabled
|
|
@@ -68,8 +66,6 @@ function GridFilterInputDate(props) {
|
|
|
68
66
|
fontSize: "small",
|
|
69
67
|
color: "action"
|
|
70
68
|
}) : clearButton
|
|
71
|
-
} : {}, headerFilterMenu && isFilterActive ? {
|
|
72
|
-
startAdornment: headerFilterMenu
|
|
73
69
|
} : {}, {
|
|
74
70
|
disabled
|
|
75
71
|
}, InputProps, {
|
|
@@ -91,7 +87,6 @@ process.env.NODE_ENV !== "production" ? GridFilterInputDate.propTypes = {
|
|
|
91
87
|
applyValue: PropTypes.func.isRequired,
|
|
92
88
|
clearButton: PropTypes.node,
|
|
93
89
|
focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
|
|
94
|
-
headerFilterMenu: PropTypes.node,
|
|
95
90
|
/**
|
|
96
91
|
* It is `true` if the filter either has a value or an operator with no value
|
|
97
92
|
* required is selected (e.g. `isEmpty`)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
import type { GridSingleSelectColDef, ValueOptions } from '../../../models/colDef/gridColDef';
|
|
5
5
|
export interface GridFilterInputMultipleSingleSelectProps extends Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options' | 'renderInput' | 'onChange' | 'value' | 'id' | 'filterOptions' | 'isOptionEqualToValue' | 'multiple' | 'color' | 'getOptionLabel'>, Pick<GridSingleSelectColDef, 'getOptionLabel' | 'getOptionValue'>, GridFilterInputValueProps {
|
|
6
6
|
type?: 'singleSelect';
|
|
7
7
|
}
|
|
8
|
-
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): JSX.Element;
|
|
8
|
+
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): React.JSX.Element;
|
|
9
9
|
declare namespace GridFilterInputMultipleSingleSelect {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export type GridFilterInputMultipleValueProps = {
|
|
5
5
|
type?: 'text' | 'number';
|
|
6
6
|
} & GridFilterInputValueProps & Omit<AutocompleteProps<string, true, false, true>, 'options' | 'renderInput'>;
|
|
7
|
-
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): JSX.Element;
|
|
7
|
+
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): React.JSX.Element;
|
|
8
8
|
declare namespace GridFilterInputMultipleValue {
|
|
9
9
|
var propTypes: any;
|
|
10
10
|
}
|
|
@@ -3,7 +3,6 @@ import { TextFieldProps } from '@mui/material/TextField';
|
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
import { GridSingleSelectColDef } from '../../../models/colDef/gridColDef';
|
|
5
5
|
export type GridFilterInputSingleSelectProps = GridFilterInputValueProps & TextFieldProps & Pick<GridSingleSelectColDef, 'getOptionLabel' | 'getOptionValue'> & {
|
|
6
|
-
headerFilterMenu?: React.ReactNode | null;
|
|
7
6
|
clearButton?: React.ReactNode | null;
|
|
8
7
|
/**
|
|
9
8
|
* It is `true` if the filter either has a value or an operator with no value
|
|
@@ -12,7 +11,7 @@ export type GridFilterInputSingleSelectProps = GridFilterInputValueProps & TextF
|
|
|
12
11
|
isFilterActive?: boolean;
|
|
13
12
|
type?: 'singleSelect';
|
|
14
13
|
};
|
|
15
|
-
declare function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps): JSX.Element | null;
|
|
14
|
+
declare function GridFilterInputSingleSelect(props: GridFilterInputSingleSelectProps): React.JSX.Element | null;
|
|
16
15
|
declare namespace GridFilterInputSingleSelect {
|
|
17
16
|
var propTypes: any;
|
|
18
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "getOptionLabel", "getOptionValue", "placeholder", "tabIndex", "label", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "getOptionLabel", "getOptionValue", "placeholder", "tabIndex", "label", "isFilterActive", "clearButton"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
@@ -37,7 +37,10 @@ const renderSingleSelectOptions = ({
|
|
|
37
37
|
const SingleSelectOperatorContainer = styled('div')({
|
|
38
38
|
display: 'flex',
|
|
39
39
|
alignItems: 'flex-end',
|
|
40
|
-
width: '100%'
|
|
40
|
+
width: '100%',
|
|
41
|
+
[`& button`]: {
|
|
42
|
+
margin: 'auto 0px 5px 5px'
|
|
43
|
+
}
|
|
41
44
|
});
|
|
42
45
|
function GridFilterInputSingleSelect(props) {
|
|
43
46
|
var _item$value, _rootProps$slotProps$, _rootProps$slotProps, _rootProps$slotProps$2, _resolvedColumn, _resolvedColumn2, _rootProps$slotProps2, _rootProps$slotProps3, _rootProps$slotProps4;
|
|
@@ -52,8 +55,6 @@ function GridFilterInputSingleSelect(props) {
|
|
|
52
55
|
placeholder,
|
|
53
56
|
tabIndex,
|
|
54
57
|
label: labelProp,
|
|
55
|
-
headerFilterMenu,
|
|
56
|
-
isFilterActive,
|
|
57
58
|
clearButton
|
|
58
59
|
} = props,
|
|
59
60
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
|
@@ -118,6 +119,7 @@ function GridFilterInputSingleSelect(props) {
|
|
|
118
119
|
children: [/*#__PURE__*/_jsxs(rootProps.slots.baseFormControl, {
|
|
119
120
|
children: [/*#__PURE__*/_jsx(rootProps.slots.baseInputLabel, _extends({}, (_rootProps$slotProps2 = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps2.baseInputLabel, {
|
|
120
121
|
id: labelId,
|
|
122
|
+
htmlFor: id,
|
|
121
123
|
shrink: true,
|
|
122
124
|
variant: "standard",
|
|
123
125
|
children: label
|
|
@@ -127,7 +129,6 @@ function GridFilterInputSingleSelect(props) {
|
|
|
127
129
|
labelId: labelId,
|
|
128
130
|
value: filterValueState,
|
|
129
131
|
onChange: onFilterChange,
|
|
130
|
-
startAdornment: isFilterActive ? headerFilterMenu : null,
|
|
131
132
|
variant: "standard",
|
|
132
133
|
type: type || 'text',
|
|
133
134
|
inputProps: {
|
|
@@ -172,7 +173,6 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
|
|
|
172
173
|
* @returns {string} The value to be used.
|
|
173
174
|
*/
|
|
174
175
|
getOptionValue: PropTypes.func,
|
|
175
|
-
headerFilterMenu: PropTypes.node,
|
|
176
176
|
/**
|
|
177
177
|
* It is `true` if the filter either has a value or an operator with no value
|
|
178
178
|
* required is selected (e.g. `isEmpty`)
|
|
@@ -4,7 +4,6 @@ import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
|
4
4
|
export declare const SUBMIT_FILTER_STROKE_TIME = 500;
|
|
5
5
|
export type GridTypeFilterInputValueProps = GridFilterInputValueProps & TextFieldProps & {
|
|
6
6
|
type?: 'text' | 'number' | 'date' | 'datetime-local';
|
|
7
|
-
headerFilterMenu?: React.ReactNode | null;
|
|
8
7
|
clearButton?: React.ReactNode | null;
|
|
9
8
|
/**
|
|
10
9
|
* It is `true` if the filter either has a value or an operator with no value
|
|
@@ -12,7 +11,7 @@ export type GridTypeFilterInputValueProps = GridFilterInputValueProps & TextFiel
|
|
|
12
11
|
*/
|
|
13
12
|
isFilterActive?: boolean;
|
|
14
13
|
};
|
|
15
|
-
declare function GridFilterInputValue(props: GridTypeFilterInputValueProps): JSX.Element;
|
|
14
|
+
declare function GridFilterInputValue(props: GridTypeFilterInputValueProps): React.JSX.Element;
|
|
16
15
|
declare namespace GridFilterInputValue {
|
|
17
16
|
var propTypes: any;
|
|
18
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "disabled", "
|
|
3
|
+
const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "tabIndex", "disabled", "isFilterActive", "clearButton", "InputProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
@@ -17,8 +17,6 @@ function GridFilterInputValue(props) {
|
|
|
17
17
|
focusElementRef,
|
|
18
18
|
tabIndex,
|
|
19
19
|
disabled,
|
|
20
|
-
headerFilterMenu,
|
|
21
|
-
isFilterActive,
|
|
22
20
|
clearButton,
|
|
23
21
|
InputProps
|
|
24
22
|
} = props,
|
|
@@ -65,8 +63,6 @@ function GridFilterInputValue(props) {
|
|
|
65
63
|
fontSize: "small",
|
|
66
64
|
color: "action"
|
|
67
65
|
}) : clearButton
|
|
68
|
-
} : {}, headerFilterMenu && isFilterActive ? {
|
|
69
|
-
startAdornment: headerFilterMenu
|
|
70
66
|
} : {}, {
|
|
71
67
|
disabled
|
|
72
68
|
}, InputProps, {
|
|
@@ -91,7 +87,6 @@ process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
|
|
|
91
87
|
applyValue: PropTypes.func.isRequired,
|
|
92
88
|
clearButton: PropTypes.node,
|
|
93
89
|
focusElementRef: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.func, PropTypes.object]),
|
|
94
|
-
headerFilterMenu: PropTypes.node,
|
|
95
90
|
/**
|
|
96
91
|
* It is `true` if the filter either has a value or an operator with no value
|
|
97
92
|
* required is selected (e.g. `isEmpty`)
|
|
@@ -22,7 +22,15 @@ export interface GridFilterPanelProps extends Pick<GridFilterFormProps, 'logicOp
|
|
|
22
22
|
* Props passed to each filter form.
|
|
23
23
|
*/
|
|
24
24
|
filterFormProps?: Pick<GridFilterFormProps, 'columnsSort' | 'deleteIconProps' | 'logicOperatorInputProps' | 'operatorInputProps' | 'columnInputProps' | 'valueInputProps' | 'filterColumns'>;
|
|
25
|
+
/**
|
|
26
|
+
* If `true`, the `Add filter` button will not be displayed.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
25
29
|
disableAddFilterButton?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* If `true`, the `Remove all` button will be disabled
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
26
34
|
disableRemoveAllButton?: boolean;
|
|
27
35
|
/**
|
|
28
36
|
* @ignore - do not document.
|
|
@@ -179,7 +179,15 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
|
|
|
179
179
|
* If not specified, the order is derived from the `columns` prop.
|
|
180
180
|
*/
|
|
181
181
|
columnsSort: PropTypes.oneOf(['asc', 'desc']),
|
|
182
|
+
/**
|
|
183
|
+
* If `true`, the `Add filter` button will not be displayed.
|
|
184
|
+
* @default false
|
|
185
|
+
*/
|
|
182
186
|
disableAddFilterButton: PropTypes.bool,
|
|
187
|
+
/**
|
|
188
|
+
* If `true`, the `Remove all` button will be disabled
|
|
189
|
+
* @default false
|
|
190
|
+
*/
|
|
183
191
|
disableRemoveAllButton: PropTypes.bool,
|
|
184
192
|
/**
|
|
185
193
|
* Props passed to each filter form.
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["onClick"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import { unstable_useId as useId } from '@mui/material/utils';
|
|
5
6
|
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
6
7
|
import { gridPreferencePanelStateSelector } from '../../hooks/features/preferencesPanel/gridPreferencePanelSelector';
|
|
7
8
|
import { GridPreferencePanelsValue } from '../../hooks/features/preferencesPanel/gridPreferencePanelsValue';
|
|
@@ -14,17 +15,16 @@ export const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function G
|
|
|
14
15
|
onClick
|
|
15
16
|
} = props,
|
|
16
17
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
18
|
+
const columnButtonId = useId();
|
|
19
|
+
const columnPanelId = useId();
|
|
17
20
|
const apiRef = useGridApiContext();
|
|
18
21
|
const rootProps = useGridRootProps();
|
|
19
|
-
const
|
|
20
|
-
open,
|
|
21
|
-
openedPanelValue
|
|
22
|
-
} = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
22
|
+
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
23
23
|
const showColumns = event => {
|
|
24
|
-
if (open && openedPanelValue === GridPreferencePanelsValue.columns) {
|
|
24
|
+
if (preferencePanel.open && preferencePanel.openedPanelValue === GridPreferencePanelsValue.columns) {
|
|
25
25
|
apiRef.current.hidePreferences();
|
|
26
26
|
} else {
|
|
27
|
-
apiRef.current.showPreferences(GridPreferencePanelsValue.columns);
|
|
27
|
+
apiRef.current.showPreferences(GridPreferencePanelsValue.columns, columnPanelId, columnButtonId);
|
|
28
28
|
}
|
|
29
29
|
onClick == null ? void 0 : onClick(event);
|
|
30
30
|
};
|
|
@@ -33,10 +33,15 @@ export const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function G
|
|
|
33
33
|
if (rootProps.disableColumnSelector) {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
|
+
const isOpen = preferencePanel.open && preferencePanel.panelId === columnPanelId;
|
|
36
37
|
return /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
37
38
|
ref: ref,
|
|
39
|
+
id: columnButtonId,
|
|
38
40
|
size: "small",
|
|
39
41
|
"aria-label": apiRef.current.getLocaleText('toolbarColumnsLabel'),
|
|
42
|
+
"aria-haspopup": "menu",
|
|
43
|
+
"aria-expanded": isOpen,
|
|
44
|
+
"aria-controls": isOpen ? columnPanelId : undefined,
|
|
40
45
|
startIcon: /*#__PURE__*/_jsx(rootProps.slots.columnSelectorIcon, {})
|
|
41
46
|
}, other, {
|
|
42
47
|
onClick: showColumns
|
|
@@ -94,9 +94,9 @@ export const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function
|
|
|
94
94
|
size: "small",
|
|
95
95
|
startIcon: startIcon,
|
|
96
96
|
"aria-label": apiRef.current.getLocaleText('toolbarDensityLabel'),
|
|
97
|
-
"aria-expanded": open ? 'true' : undefined,
|
|
98
97
|
"aria-haspopup": "menu",
|
|
99
|
-
"aria-
|
|
98
|
+
"aria-expanded": open,
|
|
99
|
+
"aria-controls": open ? densityMenuId : undefined,
|
|
100
100
|
id: densityButtonId
|
|
101
101
|
}, other, {
|
|
102
102
|
onClick: handleDensitySelectorOpen
|
|
@@ -19,7 +19,7 @@ export interface GridToolbarExportProps extends ButtonProps {
|
|
|
19
19
|
printOptions?: GridPrintExportOptions & GridExportDisplayOptions;
|
|
20
20
|
[key: string]: any;
|
|
21
21
|
}
|
|
22
|
-
export declare function GridCsvExportMenuItem(props: GridCsvExportMenuItemProps): JSX.Element;
|
|
23
|
-
export declare function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps): JSX.Element;
|
|
22
|
+
export declare function GridCsvExportMenuItem(props: GridCsvExportMenuItemProps): React.JSX.Element;
|
|
23
|
+
export declare function GridPrintExportMenuItem(props: GridPrintExportMenuItemProps): React.JSX.Element;
|
|
24
24
|
declare const GridToolbarExport: React.ForwardRefExoticComponent<Omit<GridToolbarExportProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
25
25
|
export { GridToolbarExport };
|
|
@@ -20,8 +20,8 @@ export const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function
|
|
|
20
20
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
21
21
|
const apiRef = useGridApiContext();
|
|
22
22
|
const rootProps = useGridRootProps();
|
|
23
|
-
const
|
|
24
|
-
const
|
|
23
|
+
const exportButtonId = useId();
|
|
24
|
+
const exportMenuId = useId();
|
|
25
25
|
const [open, setOpen] = React.useState(false);
|
|
26
26
|
const buttonRef = React.useRef(null);
|
|
27
27
|
const handleRef = useForkRef(ref, buttonRef);
|
|
@@ -54,11 +54,11 @@ export const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function
|
|
|
54
54
|
ref: handleRef,
|
|
55
55
|
size: "small",
|
|
56
56
|
startIcon: /*#__PURE__*/_jsx(rootProps.slots.exportIcon, {}),
|
|
57
|
-
"aria-expanded": open
|
|
57
|
+
"aria-expanded": open,
|
|
58
58
|
"aria-label": apiRef.current.getLocaleText('toolbarExportLabel'),
|
|
59
59
|
"aria-haspopup": "menu",
|
|
60
|
-
"aria-
|
|
61
|
-
id:
|
|
60
|
+
"aria-controls": open ? exportMenuId : undefined,
|
|
61
|
+
id: exportButtonId
|
|
62
62
|
}, other, {
|
|
63
63
|
onClick: handleMenuOpen
|
|
64
64
|
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseButton, {
|
|
@@ -69,9 +69,9 @@ export const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function
|
|
|
69
69
|
onClickAway: handleMenuClickAway,
|
|
70
70
|
position: "bottom-start",
|
|
71
71
|
children: /*#__PURE__*/_jsx(MenuList, {
|
|
72
|
-
id:
|
|
72
|
+
id: exportMenuId,
|
|
73
73
|
className: gridClasses.menuList,
|
|
74
|
-
"aria-labelledby":
|
|
74
|
+
"aria-labelledby": exportButtonId,
|
|
75
75
|
onKeyDown: handleListKeyDown,
|
|
76
76
|
autoFocusItem: open,
|
|
77
77
|
children: React.Children.map(children, child => {
|
|
@@ -4,7 +4,7 @@ const _excluded = ["componentsProps"];
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { styled } from '@mui/material/styles';
|
|
7
|
-
import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';
|
|
7
|
+
import { unstable_composeClasses as composeClasses, unstable_capitalize as capitalize, unstable_useId as useId } from '@mui/utils';
|
|
8
8
|
import Badge from '@mui/material/Badge';
|
|
9
9
|
import { gridColumnLookupSelector } from '../../hooks/features/columns/gridColumnsSelector';
|
|
10
10
|
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
@@ -28,7 +28,7 @@ const useUtilityClasses = ownerState => {
|
|
|
28
28
|
const GridToolbarFilterListRoot = styled('ul', {
|
|
29
29
|
name: 'MuiDataGrid',
|
|
30
30
|
slot: 'ToolbarFilterList',
|
|
31
|
-
overridesResolver: (
|
|
31
|
+
overridesResolver: (_props, styles) => styles.toolbarFilterList
|
|
32
32
|
})(({
|
|
33
33
|
theme
|
|
34
34
|
}) => ({
|
|
@@ -48,6 +48,8 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
48
48
|
const lookup = useGridSelector(apiRef, gridColumnLookupSelector);
|
|
49
49
|
const preferencePanel = useGridSelector(apiRef, gridPreferencePanelStateSelector);
|
|
50
50
|
const classes = useUtilityClasses(rootProps);
|
|
51
|
+
const filterButtonId = useId();
|
|
52
|
+
const filterPanelId = useId();
|
|
51
53
|
const tooltipContentNode = React.useMemo(() => {
|
|
52
54
|
if (preferencePanel.open) {
|
|
53
55
|
return apiRef.current.getLocaleText('toolbarFiltersTooltipHide');
|
|
@@ -83,9 +85,9 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
83
85
|
openedPanelValue
|
|
84
86
|
} = preferencePanel;
|
|
85
87
|
if (open && openedPanelValue === GridPreferencePanelsValue.filters) {
|
|
86
|
-
apiRef.current.
|
|
88
|
+
apiRef.current.hidePreferences();
|
|
87
89
|
} else {
|
|
88
|
-
apiRef.current.
|
|
90
|
+
apiRef.current.showPreferences(GridPreferencePanelsValue.filters, filterPanelId, filterButtonId);
|
|
89
91
|
}
|
|
90
92
|
(_buttonProps$onClick = buttonProps.onClick) == null ? void 0 : _buttonProps$onClick.call(buttonProps, event);
|
|
91
93
|
};
|
|
@@ -94,14 +96,19 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
|
|
|
94
96
|
if (rootProps.disableColumnFilter) {
|
|
95
97
|
return null;
|
|
96
98
|
}
|
|
99
|
+
const isOpen = preferencePanel.open && preferencePanel.panelId === filterPanelId;
|
|
97
100
|
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
98
101
|
title: tooltipContentNode,
|
|
99
102
|
enterDelay: 1000
|
|
100
103
|
}, other, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTooltip, {
|
|
101
104
|
children: /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
102
105
|
ref: ref,
|
|
106
|
+
id: filterButtonId,
|
|
103
107
|
size: "small",
|
|
104
108
|
"aria-label": apiRef.current.getLocaleText('toolbarFiltersLabel'),
|
|
109
|
+
"aria-controls": isOpen ? filterPanelId : undefined,
|
|
110
|
+
"aria-expanded": isOpen,
|
|
111
|
+
"aria-haspopup": true,
|
|
105
112
|
startIcon: /*#__PURE__*/_jsx(Badge, {
|
|
106
113
|
badgeContent: activeFilters.length,
|
|
107
114
|
color: "primary",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { GridFilterModel } from '../../models/gridFilterModel';
|
|
4
4
|
export type GridToolbarQuickFilterProps = TextFieldProps & {
|
|
@@ -20,7 +20,7 @@ export type GridToolbarQuickFilterProps = TextFieldProps & {
|
|
|
20
20
|
*/
|
|
21
21
|
debounceMs?: number;
|
|
22
22
|
};
|
|
23
|
-
declare function GridToolbarQuickFilter(props: GridToolbarQuickFilterProps): JSX.Element;
|
|
23
|
+
declare function GridToolbarQuickFilter(props: GridToolbarQuickFilterProps): React.JSX.Element;
|
|
24
24
|
declare namespace GridToolbarQuickFilter {
|
|
25
25
|
var propTypes: any;
|
|
26
26
|
}
|