@mui/x-data-grid 8.0.0-beta.2 → 8.0.0-beta.3
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 +141 -0
- package/DataGrid/DataGrid.js +8 -2
- package/DataGrid/useDataGridProps.js +1 -1
- package/components/GridScrollArea.js +4 -4
- package/components/GridSkeletonLoadingOverlay.js +1 -1
- package/components/cell/GridActionsCellItem.d.ts +24 -13
- package/components/cell/GridActionsCellItem.js +5 -2
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/components/export/ExportCsv.js +4 -129
- package/components/export/ExportPrint.js +4 -129
- package/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +1 -1
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/components/quickFilter/QuickFilterClear.js +3 -100
- package/components/quickFilter/QuickFilterControl.js +0 -2
- package/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/components/toolbar/GridToolbar.js +4 -1
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/components/toolbarV8/GridToolbar.js +64 -9
- package/components/toolbarV8/Toolbar.js +2 -0
- package/components/toolbarV8/ToolbarButton.js +3 -100
- package/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -2
- package/constants/cssVariables.d.ts +3 -0
- package/constants/cssVariables.js +2 -1
- package/constants/gridClasses.d.ts +8 -0
- package/constants/gridClasses.js +1 -1
- package/esm/DataGrid/DataGrid.js +8 -2
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/components/GridScrollArea.js +4 -4
- package/esm/components/GridSkeletonLoadingOverlay.js +2 -2
- package/esm/components/cell/GridActionsCellItem.d.ts +24 -13
- package/esm/components/cell/GridActionsCellItem.js +4 -3
- package/esm/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/esm/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/esm/components/export/ExportCsv.js +4 -129
- package/esm/components/export/ExportPrint.js +4 -129
- package/esm/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/esm/components/panel/GridPanel.d.ts +2 -2
- package/esm/components/panel/GridPanel.js +1 -1
- package/esm/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/esm/components/quickFilter/QuickFilterClear.js +3 -100
- package/esm/components/quickFilter/QuickFilterControl.js +0 -2
- package/esm/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/esm/components/toolbar/GridToolbar.js +4 -1
- package/esm/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/esm/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/esm/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/esm/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/esm/components/toolbarV8/GridToolbar.js +62 -9
- package/esm/components/toolbarV8/Toolbar.js +2 -0
- package/esm/components/toolbarV8/ToolbarButton.js +3 -100
- package/esm/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +2 -2
- package/esm/constants/cssVariables.d.ts +3 -0
- package/esm/constants/cssVariables.js +2 -1
- package/esm/constants/gridClasses.d.ts +8 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/hooks/core/gridCoreSelector.d.ts +1 -1
- package/esm/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/esm/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/esm/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/esm/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/esm/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/esm/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/esm/hooks/features/columns/useGridColumns.js +2 -2
- package/esm/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/esm/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/esm/hooks/features/density/densitySelector.d.ts +2 -2
- package/esm/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/esm/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/esm/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/esm/hooks/features/editing/useGridCellEditing.js +8 -8
- package/esm/hooks/features/editing/useGridRowEditing.js +9 -9
- package/esm/hooks/features/events/useGridEvents.js +18 -18
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/esm/hooks/features/filter/useGridFilter.js +6 -6
- package/esm/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/esm/hooks/features/focus/useGridFocus.js +10 -10
- package/esm/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/esm/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/esm/hooks/features/listView/useGridListView.d.ts +4 -4
- package/esm/hooks/features/listView/useGridListView.js +9 -9
- package/esm/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/esm/hooks/features/pagination/useGridPaginationModel.js +6 -6
- package/esm/hooks/features/pagination/useGridRowCount.js +2 -2
- package/esm/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/esm/hooks/features/rowSelection/utils.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/esm/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/esm/hooks/features/rows/gridRowsSelector.js +7 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -2
- package/esm/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/esm/hooks/features/rows/useGridRows.js +5 -5
- package/esm/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/esm/hooks/features/scroll/useGridScroll.js +2 -2
- package/esm/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/esm/hooks/features/sorting/useGridSorting.js +6 -6
- package/esm/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +7 -7
- package/esm/hooks/utils/index.d.ts +1 -1
- package/esm/hooks/utils/index.js +1 -1
- package/esm/hooks/utils/useGridAriaAttributes.js +6 -0
- package/esm/hooks/utils/{useGridApiEventHandler.d.ts → useGridEvent.d.ts} +2 -2
- package/{modern/hooks/utils/useGridApiEventHandler.js → esm/hooks/utils/useGridEvent.js} +3 -3
- package/esm/hooks/utils/useGridNativeEventListener.js +2 -2
- package/esm/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/esm/index.js +1 -1
- package/esm/material/augmentation.d.ts +74 -0
- package/esm/material/augmentation.js +1 -0
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +262 -141
- package/esm/material/variables.js +2 -0
- package/esm/models/colDef/gridColDef.d.ts +1 -1
- package/esm/models/colDef/index.d.ts +1 -1
- package/esm/models/gridBaseSlots.d.ts +25 -36
- package/esm/models/gridSlotsComponentsProps.d.ts +1 -19
- package/esm/models/props/DataGridProps.d.ts +14 -8
- package/hooks/core/gridCoreSelector.d.ts +1 -1
- package/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/hooks/features/columnMenu/useGridColumnMenu.js +3 -3
- package/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/hooks/features/columns/useGridColumns.js +2 -2
- package/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/hooks/features/dataSource/useGridDataSource.js +2 -2
- package/hooks/features/density/densitySelector.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/hooks/features/editing/useGridCellEditing.js +8 -8
- package/hooks/features/editing/useGridRowEditing.js +9 -9
- package/hooks/features/events/useGridEvents.js +18 -18
- package/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/hooks/features/filter/useGridFilter.js +6 -6
- package/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/hooks/features/focus/useGridFocus.js +10 -10
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/hooks/features/listView/useGridListView.d.ts +4 -4
- package/hooks/features/listView/useGridListView.js +9 -9
- package/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/hooks/features/pagination/useGridPaginationModel.js +5 -5
- package/hooks/features/pagination/useGridRowCount.js +1 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/hooks/features/rowSelection/utils.d.ts +1 -1
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/hooks/features/rows/gridRowsSelector.js +8 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/hooks/features/rows/useGridRows.js +4 -4
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/hooks/features/sorting/useGridSorting.js +6 -6
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +6 -6
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +8 -8
- package/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{modern/hooks/utils/useGridApiEventHandler.d.ts → hooks/utils/useGridEvent.d.ts} +2 -2
- package/hooks/utils/{useGridApiEventHandler.js → useGridEvent.js} +5 -5
- package/hooks/utils/useGridNativeEventListener.js +2 -2
- package/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/index.js +1 -1
- package/material/augmentation.d.ts +74 -0
- package/material/augmentation.js +5 -0
- package/material/index.d.ts +1 -0
- package/material/index.js +261 -141
- package/material/variables.js +2 -0
- package/models/colDef/gridColDef.d.ts +1 -1
- package/models/colDef/index.d.ts +1 -1
- package/models/gridBaseSlots.d.ts +25 -36
- package/models/gridSlotsComponentsProps.d.ts +1 -19
- package/models/props/DataGridProps.d.ts +14 -8
- package/modern/DataGrid/DataGrid.js +8 -2
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/components/GridScrollArea.js +4 -4
- package/modern/components/GridSkeletonLoadingOverlay.js +2 -2
- package/modern/components/cell/GridActionsCellItem.d.ts +24 -13
- package/modern/components/cell/GridActionsCellItem.js +4 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/modern/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -24
- package/modern/components/columnsPanel/ColumnsPanelTrigger.js +4 -129
- package/modern/components/export/ExportCsv.js +4 -129
- package/modern/components/export/ExportPrint.js +4 -129
- package/modern/components/filterPanel/FilterPanelTrigger.js +4 -129
- package/modern/components/panel/GridPanel.d.ts +2 -2
- package/modern/components/panel/GridPanel.js +1 -1
- package/modern/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/modern/components/quickFilter/QuickFilterClear.js +3 -100
- package/modern/components/quickFilter/QuickFilterControl.js +0 -2
- package/modern/components/quickFilter/QuickFilterTrigger.js +4 -129
- package/modern/components/toolbar/GridToolbar.js +4 -1
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -2
- package/modern/components/toolbarV8/GridToolbar.d.ts +6 -1
- package/modern/components/toolbarV8/GridToolbar.js +62 -9
- package/modern/components/toolbarV8/Toolbar.js +2 -0
- package/modern/components/toolbarV8/ToolbarButton.js +3 -100
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -2
- package/modern/constants/cssVariables.d.ts +3 -0
- package/modern/constants/cssVariables.js +2 -1
- package/modern/constants/gridClasses.d.ts +8 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/core/gridCoreSelector.d.ts +1 -1
- package/modern/hooks/core/gridPropsSelectors.d.ts +1 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +2 -2
- package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +5 -5
- package/modern/hooks/features/columnGrouping/useGridColumnGrouping.js +4 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -5
- package/modern/hooks/features/columnMenu/columnMenuSelector.d.ts +1 -1
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +4 -4
- package/modern/hooks/features/columnResize/columnResizeSelector.d.ts +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +7 -7
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +14 -14
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/modern/hooks/features/columns/useGridColumnSpanning.js +2 -2
- package/modern/hooks/features/columns/useGridColumns.js +2 -2
- package/modern/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -4
- package/modern/hooks/features/dataSource/useGridDataSource.js +1 -1
- package/modern/hooks/features/density/densitySelector.d.ts +2 -2
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.d.ts +13 -13
- package/modern/hooks/features/dimensions/useGridDimensions.js +4 -4
- package/modern/hooks/features/editing/gridEditingSelectors.d.ts +4 -4
- package/modern/hooks/features/editing/useGridCellEditing.js +8 -8
- package/modern/hooks/features/editing/useGridRowEditing.js +9 -9
- package/modern/hooks/features/events/useGridEvents.js +18 -18
- package/modern/hooks/features/filter/gridFilterSelector.d.ts +18 -18
- package/modern/hooks/features/filter/useGridFilter.js +6 -6
- package/modern/hooks/features/focus/gridFocusStateSelector.d.ts +10 -10
- package/modern/hooks/features/focus/useGridFocus.js +10 -10
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +4 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -6
- package/modern/hooks/features/listView/gridListViewSelectors.d.ts +1 -1
- package/modern/hooks/features/listView/useGridListView.d.ts +4 -4
- package/modern/hooks/features/listView/useGridListView.js +9 -9
- package/modern/hooks/features/pagination/gridPaginationSelector.d.ts +14 -14
- package/modern/hooks/features/pagination/useGridPaginationModel.js +6 -6
- package/modern/hooks/features/pagination/useGridRowCount.js +2 -2
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +2 -2
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +4 -4
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +8 -8
- package/modern/hooks/features/rowSelection/utils.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/modern/hooks/features/rows/gridRowsMetaSelector.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsSelector.d.ts +21 -20
- package/modern/hooks/features/rows/gridRowsSelector.js +7 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -2
- package/modern/hooks/features/rows/useGridRowSpanning.js +6 -6
- package/modern/hooks/features/rows/useGridRows.js +5 -5
- package/modern/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/modern/hooks/features/scroll/useGridScroll.js +2 -2
- package/modern/hooks/features/sorting/gridSortingSelector.d.ts +5 -5
- package/modern/hooks/features/sorting/useGridSorting.js +6 -6
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +2 -2
- package/modern/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +6 -6
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +7 -7
- package/modern/hooks/utils/index.d.ts +1 -1
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridAriaAttributes.js +6 -0
- package/{hooks/utils/useGridApiEventHandler.d.ts → modern/hooks/utils/useGridEvent.d.ts} +2 -2
- package/{esm/hooks/utils/useGridApiEventHandler.js → modern/hooks/utils/useGridEvent.js} +3 -3
- package/modern/hooks/utils/useGridNativeEventListener.js +2 -2
- package/modern/hooks/utils/useGridVisibleRows.d.ts +4 -4
- package/modern/index.js +1 -1
- package/modern/material/augmentation.d.ts +74 -0
- package/modern/material/augmentation.js +1 -0
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +262 -141
- package/modern/material/variables.js +2 -0
- package/modern/models/colDef/gridColDef.d.ts +1 -1
- package/modern/models/colDef/index.d.ts +1 -1
- package/modern/models/gridBaseSlots.d.ts +25 -36
- package/modern/models/gridSlotsComponentsProps.d.ts +1 -19
- package/modern/models/props/DataGridProps.d.ts +14 -8
- package/package.json +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
type Ref<T = HTMLElement> = React.RefCallback<T | null> | React.RefObject<T | null> | null;
|
|
2
|
+
type CommonProps<T = HTMLElement> = React.DOMAttributes<T> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
[k: `aria-${string}`]: any;
|
|
6
|
+
[k: `data-${string}`]: any;
|
|
7
|
+
};
|
|
2
8
|
export interface AutocompleteFilterOptionsState<Value> {
|
|
3
9
|
inputValue: string;
|
|
4
10
|
getOptionLabel: (option: Value) => string;
|
|
@@ -54,7 +60,7 @@ export type AutocompleteProps<Value = string, Multiple extends boolean = false,
|
|
|
54
60
|
textField: TextFieldProps;
|
|
55
61
|
};
|
|
56
62
|
};
|
|
57
|
-
export type BadgeProps = {
|
|
63
|
+
export type BadgeProps = CommonProps & {
|
|
58
64
|
badgeContent?: React.ReactNode;
|
|
59
65
|
children: React.ReactNode;
|
|
60
66
|
color?: 'primary' | 'default' | 'error';
|
|
@@ -63,23 +69,19 @@ export type BadgeProps = {
|
|
|
63
69
|
variant?: 'dot';
|
|
64
70
|
style?: React.CSSProperties;
|
|
65
71
|
};
|
|
66
|
-
export type ButtonProps = {
|
|
67
|
-
ref?: Ref
|
|
72
|
+
export type ButtonProps = CommonProps & {
|
|
73
|
+
ref?: Ref<HTMLButtonElement>;
|
|
68
74
|
children?: React.ReactNode;
|
|
69
|
-
className?: string;
|
|
70
75
|
disabled?: boolean;
|
|
71
76
|
id?: string;
|
|
72
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
73
|
-
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
74
77
|
role?: string;
|
|
75
78
|
size?: 'small' | 'medium' | 'large';
|
|
76
79
|
startIcon?: React.ReactNode;
|
|
77
|
-
style?: React.CSSProperties;
|
|
78
80
|
tabIndex?: number;
|
|
79
81
|
title?: string;
|
|
80
82
|
touchRippleRef?: any;
|
|
81
83
|
};
|
|
82
|
-
export type CheckboxProps = {
|
|
84
|
+
export type CheckboxProps = CommonProps & {
|
|
83
85
|
ref?: Ref<HTMLButtonElement>;
|
|
84
86
|
id?: string;
|
|
85
87
|
autoFocus?: boolean;
|
|
@@ -91,9 +93,7 @@ export type CheckboxProps = {
|
|
|
91
93
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
92
94
|
name?: string;
|
|
93
95
|
label?: React.ReactNode;
|
|
94
|
-
onClick?: React.MouseEventHandler;
|
|
95
96
|
onChange?: React.ChangeEventHandler;
|
|
96
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
97
97
|
size?: 'small' | 'medium';
|
|
98
98
|
density?: 'standard' | 'compact';
|
|
99
99
|
slotProps?: {
|
|
@@ -109,24 +109,22 @@ export type IconButtonProps = Omit<ButtonProps, 'startIcon'> & {
|
|
|
109
109
|
edge?: 'start' | 'end' | false;
|
|
110
110
|
};
|
|
111
111
|
export type DividerProps = {
|
|
112
|
+
className?: string;
|
|
112
113
|
orientation?: 'horizontal' | 'vertical';
|
|
113
114
|
};
|
|
114
|
-
export type MenuListProps = {
|
|
115
|
+
export type MenuListProps = CommonProps & {
|
|
115
116
|
ref?: Ref<HTMLUListElement>;
|
|
116
117
|
id?: string;
|
|
117
|
-
className?: string;
|
|
118
118
|
children?: React.ReactNode;
|
|
119
119
|
autoFocus?: boolean;
|
|
120
120
|
autoFocusItem?: boolean;
|
|
121
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
122
121
|
};
|
|
123
|
-
export type MenuItemProps = {
|
|
122
|
+
export type MenuItemProps = CommonProps & {
|
|
124
123
|
autoFocus?: boolean;
|
|
125
124
|
children?: React.ReactNode;
|
|
126
125
|
/** For items that aren't interactive themselves (but may contain an interactive widget) */
|
|
127
126
|
inert?: boolean;
|
|
128
127
|
disabled?: boolean;
|
|
129
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
130
128
|
iconStart?: React.ReactNode;
|
|
131
129
|
iconEnd?: React.ReactNode;
|
|
132
130
|
selected?: boolean;
|
|
@@ -139,7 +137,7 @@ type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';
|
|
|
139
137
|
type Placement = AutoPlacement | BasePlacement | VariationPlacement;
|
|
140
138
|
type ClickAwayMouseEventHandler = 'onClick' | 'onMouseDown' | 'onMouseUp' | 'onPointerDown' | 'onPointerUp';
|
|
141
139
|
type ClickAwayTouchEventHandler = 'onTouchStart' | 'onTouchEnd';
|
|
142
|
-
export type PaginationProps = {
|
|
140
|
+
export type PaginationProps = CommonProps & {
|
|
143
141
|
count: number;
|
|
144
142
|
page: number;
|
|
145
143
|
rowsPerPage: number;
|
|
@@ -151,10 +149,10 @@ export type PaginationProps = {
|
|
|
151
149
|
onRowsPerPageChange?: (rowsPerPage: number) => void;
|
|
152
150
|
disabled?: boolean;
|
|
153
151
|
};
|
|
154
|
-
export type PopperProps = {
|
|
152
|
+
export type PopperProps = CommonProps & {
|
|
153
|
+
ref?: Ref<HTMLDivElement>;
|
|
155
154
|
open: boolean;
|
|
156
155
|
children?: React.ReactNode;
|
|
157
|
-
className?: string;
|
|
158
156
|
clickAwayTouchEvent?: false | ClickAwayTouchEventHandler;
|
|
159
157
|
clickAwayMouseEvent?: false | ClickAwayMouseEventHandler;
|
|
160
158
|
flip?: boolean;
|
|
@@ -164,13 +162,12 @@ export type PopperProps = {
|
|
|
164
162
|
onDidShow?: () => void;
|
|
165
163
|
onDidHide?: () => void;
|
|
166
164
|
id?: string;
|
|
167
|
-
ref?: Ref;
|
|
168
165
|
target?: Element | null;
|
|
169
166
|
transition?: boolean;
|
|
170
167
|
/** @default 'bottom' */
|
|
171
168
|
placement?: Placement;
|
|
172
169
|
};
|
|
173
|
-
export type CircularProgressProps = {
|
|
170
|
+
export type CircularProgressProps = CommonProps & {
|
|
174
171
|
/**
|
|
175
172
|
* Pixels or CSS value.
|
|
176
173
|
* @default 40
|
|
@@ -179,11 +176,10 @@ export type CircularProgressProps = {
|
|
|
179
176
|
/** @default 'primary' */
|
|
180
177
|
color?: 'inherit' | 'primary';
|
|
181
178
|
};
|
|
182
|
-
export type LinearProgressProps = {};
|
|
183
|
-
export type InputProps = {
|
|
179
|
+
export type LinearProgressProps = CommonProps & {};
|
|
180
|
+
export type InputProps = CommonProps & {
|
|
184
181
|
ref?: React.Ref<HTMLElement>;
|
|
185
182
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
186
|
-
className?: string;
|
|
187
183
|
fullWidth?: boolean;
|
|
188
184
|
type?: React.HTMLInputTypeAttribute;
|
|
189
185
|
value?: string;
|
|
@@ -195,7 +191,7 @@ export type InputProps = {
|
|
|
195
191
|
htmlInput?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
196
192
|
};
|
|
197
193
|
};
|
|
198
|
-
export type SelectProps = {
|
|
194
|
+
export type SelectProps = CommonProps & {
|
|
199
195
|
ref?: Ref;
|
|
200
196
|
id?: string;
|
|
201
197
|
value?: any;
|
|
@@ -203,9 +199,6 @@ export type SelectProps = {
|
|
|
203
199
|
error?: boolean;
|
|
204
200
|
disabled?: boolean;
|
|
205
201
|
onChange?: React.ChangeEventHandler;
|
|
206
|
-
onFocus?: React.FocusEventHandler;
|
|
207
|
-
onBlur?: React.FocusEventHandler;
|
|
208
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
209
202
|
onOpen?: (event: React.SyntheticEvent) => void;
|
|
210
203
|
onClose?: (event: React.KeyboardEvent, reason: 'backdropClick' | 'escapeKeyDown' | 'tabKeyDown') => void;
|
|
211
204
|
label?: React.ReactNode;
|
|
@@ -218,28 +211,26 @@ export type SelectProps = {
|
|
|
218
211
|
ref?: Ref;
|
|
219
212
|
} & React.InputHTMLAttributes<HTMLInputElement>;
|
|
220
213
|
};
|
|
221
|
-
style?: React.CSSProperties;
|
|
222
214
|
children?: React.ReactNode;
|
|
223
215
|
};
|
|
224
|
-
export type SelectOptionProps = {
|
|
216
|
+
export type SelectOptionProps = CommonProps & {
|
|
225
217
|
native: boolean;
|
|
226
218
|
value: any;
|
|
227
219
|
children?: React.ReactNode;
|
|
228
220
|
};
|
|
229
|
-
export type SkeletonProps = {
|
|
221
|
+
export type SkeletonProps = CommonProps & {
|
|
230
222
|
variant?: 'circular' | 'text';
|
|
231
223
|
width?: number | string;
|
|
232
224
|
height?: number | string;
|
|
233
225
|
};
|
|
234
|
-
export type SwitchProps = {
|
|
226
|
+
export type SwitchProps = CommonProps & {
|
|
235
227
|
checked?: boolean;
|
|
236
228
|
onChange?: React.ChangeEventHandler;
|
|
237
229
|
size?: 'small' | 'medium';
|
|
238
230
|
};
|
|
239
|
-
export type TextFieldProps = {
|
|
231
|
+
export type TextFieldProps = CommonProps & {
|
|
240
232
|
role?: string;
|
|
241
233
|
autoComplete?: string;
|
|
242
|
-
className?: string;
|
|
243
234
|
color?: 'primary' | 'error';
|
|
244
235
|
disabled?: boolean;
|
|
245
236
|
error?: boolean;
|
|
@@ -249,7 +240,6 @@ export type TextFieldProps = {
|
|
|
249
240
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
250
241
|
label?: React.ReactNode;
|
|
251
242
|
onChange?: React.ChangeEventHandler;
|
|
252
|
-
onKeyDown?: React.KeyboardEventHandler;
|
|
253
243
|
placeholder?: string;
|
|
254
244
|
size?: 'small' | 'medium';
|
|
255
245
|
slotProps?: {
|
|
@@ -257,13 +247,12 @@ export type TextFieldProps = {
|
|
|
257
247
|
inputLabel?: {};
|
|
258
248
|
htmlInput?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
259
249
|
};
|
|
260
|
-
style?: React.CSSProperties;
|
|
261
250
|
tabIndex?: number;
|
|
262
251
|
type?: React.HTMLInputTypeAttribute;
|
|
263
252
|
value?: string;
|
|
264
253
|
ref?: Ref<HTMLInputElement>;
|
|
265
254
|
};
|
|
266
|
-
export type TooltipProps = {
|
|
255
|
+
export type TooltipProps = CommonProps & {
|
|
267
256
|
children: React.ReactElement<any, any>;
|
|
268
257
|
enterDelay?: number;
|
|
269
258
|
title: React.ReactNode;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { BadgeProps as MUIBadgeProps } from '@mui/material/Badge';
|
|
3
|
-
import type { ButtonProps as MUIButtonProps } from '@mui/material/Button';
|
|
4
|
-
import type { CircularProgressProps as MUICircularProgressProps } from '@mui/material/CircularProgress';
|
|
5
|
-
import type { LinearProgressProps as MUILinearProgressProps } from '@mui/material/LinearProgress';
|
|
6
|
-
import type { MenuItemProps as MUIMenuItemProps } from '@mui/material/MenuItem';
|
|
7
|
-
import type { IconButtonProps as MUIIconButtonProps } from '@mui/material/IconButton';
|
|
8
|
-
import type { TooltipProps as MUITooltipProps } from '@mui/material/Tooltip';
|
|
9
2
|
import type { GridToolbarProps } from '../components/toolbar/GridToolbar';
|
|
10
3
|
import type { ColumnHeaderFilterIconButtonProps } from '../components/columnHeaders/GridColumnHeaderFilterIconButton';
|
|
11
4
|
import type { GridColumnMenuProps } from '../components/menu/columnMenu/GridColumnMenuProps';
|
|
@@ -91,15 +84,6 @@ interface BaseSlotProps {
|
|
|
91
84
|
baseSelectOption: SelectOptionProps & BaseSelectOptionPropsOverrides;
|
|
92
85
|
baseSkeleton: SkeletonProps & BaseSkeletonPropsOverrides;
|
|
93
86
|
}
|
|
94
|
-
interface MaterialSlotProps {
|
|
95
|
-
baseBadge: MUIBadgeProps;
|
|
96
|
-
baseButton: MUIButtonProps;
|
|
97
|
-
baseIconButton: MUIIconButtonProps;
|
|
98
|
-
baseLinearProgress: MUILinearProgressProps;
|
|
99
|
-
baseCircularProgress: MUICircularProgressProps;
|
|
100
|
-
baseMenuItem: MUIMenuItemProps;
|
|
101
|
-
baseTooltip: MUITooltipProps;
|
|
102
|
-
}
|
|
103
87
|
interface ElementSlotProps {
|
|
104
88
|
bottomContainer: GridBottomContainerProps & BottomContainerPropsOverrides;
|
|
105
89
|
cell: GridCellProps & CellPropsOverrides;
|
|
@@ -132,9 +116,7 @@ interface ElementSlotProps {
|
|
|
132
116
|
*/
|
|
133
117
|
root: RootProps;
|
|
134
118
|
}
|
|
135
|
-
type
|
|
136
|
-
type Merge<A, B> = { [K in keyof A | keyof B]: K extends 'ref' ? Select<A, B, 'ref'> : K extends keyof A & keyof B ? A[K] & B[K] : K extends keyof B ? B[K] : K extends keyof A ? A[K] : never };
|
|
137
|
-
export type GridSlotProps = Merge<BaseSlotProps, MaterialSlotProps> & ElementSlotProps;
|
|
119
|
+
export type GridSlotProps = BaseSlotProps & ElementSlotProps;
|
|
138
120
|
/**
|
|
139
121
|
* Overridable components props dynamically passed to the component at rendering.
|
|
140
122
|
*/
|
|
@@ -12,7 +12,7 @@ import { GridRowId, GridRowIdGetter, GridRowsProp, GridValidRowModel } from "../
|
|
|
12
12
|
import { GridEventListener } from "../events/index.js";
|
|
13
13
|
import { GridCallbackDetails, GridLocaleText } from "../api/index.js";
|
|
14
14
|
import { GridApiCommunity } from "../api/gridApiCommunity.js";
|
|
15
|
-
import type { GridColDef,
|
|
15
|
+
import type { GridColDef, GridListViewColDef } from '../colDef/gridColDef';
|
|
16
16
|
import { GridClasses } from "../../constants/gridClasses.js";
|
|
17
17
|
import { GridRowHeightParams, GridRowHeightReturnValue, GridRowParams, GridRowSpacing, GridRowSpacingParams, GridRowClassNameParams } from "../params/index.js";
|
|
18
18
|
import { GridCellParams } from "../params/gridCellParams.js";
|
|
@@ -49,7 +49,7 @@ export type DataGridProps<R extends GridValidRowModel = any> = Omit<Partial<Data
|
|
|
49
49
|
* The props of the Data Grid component after the pre-processing phase that the user should not be able to override.
|
|
50
50
|
* Those are usually used in feature-hook for which the pro-plan has more advanced features (eg: multi-sorting, multi-filtering, ...).
|
|
51
51
|
*/
|
|
52
|
-
export type DataGridForcedPropsKey = 'checkboxSelectionVisibleOnly' | 'disableMultipleColumnsFiltering' | 'disableMultipleColumnsSorting' | 'disableColumnReorder' | 'keepColumnPositionIfDraggedOutside' | 'throttleRowsMs' | 'hideFooterRowCount' | 'pagination' | 'signature' | '
|
|
52
|
+
export type DataGridForcedPropsKey = 'checkboxSelectionVisibleOnly' | 'disableMultipleColumnsFiltering' | 'disableMultipleColumnsSorting' | 'disableColumnReorder' | 'keepColumnPositionIfDraggedOutside' | 'throttleRowsMs' | 'hideFooterRowCount' | 'pagination' | 'signature' | 'listView';
|
|
53
53
|
/**
|
|
54
54
|
* The Data Grid options with a default value that must be merged with the value given through props.
|
|
55
55
|
*/
|
|
@@ -724,13 +724,19 @@ export interface DataGridPropsWithoutDefaultValue<R extends GridValidRowModel =
|
|
|
724
724
|
*/
|
|
725
725
|
onSortModelChange?: (model: GridSortModel, details: GridCallbackDetails) => void;
|
|
726
726
|
/**
|
|
727
|
-
* The label of the Data Grid.
|
|
727
|
+
* The `aria-label` of the Data Grid.
|
|
728
728
|
*/
|
|
729
729
|
'aria-label'?: string;
|
|
730
730
|
/**
|
|
731
|
-
* The id of the element containing a label for the Data Grid.
|
|
731
|
+
* The `id` of the element containing a label for the Data Grid.
|
|
732
732
|
*/
|
|
733
733
|
'aria-labelledby'?: string;
|
|
734
|
+
/**
|
|
735
|
+
* The label of the Data Grid.
|
|
736
|
+
* If the `showToolbar` prop is `true`, the label will be displayed in the toolbar and applied to the `aria-label` attribute of the grid.
|
|
737
|
+
* If the `showToolbar` prop is `false`, the label will not be visible but will be applied to the `aria-label` attribute of the grid.
|
|
738
|
+
*/
|
|
739
|
+
label?: string;
|
|
734
740
|
/**
|
|
735
741
|
* Set of columns of type [[GridColDef]][].
|
|
736
742
|
*/
|
|
@@ -831,10 +837,10 @@ export interface DataGridProSharedPropsWithDefaultValue {
|
|
|
831
837
|
rowSelectionPropagation: GridRowSelectionPropagation;
|
|
832
838
|
/**
|
|
833
839
|
* If `true`, displays the data in a list view.
|
|
834
|
-
* Use in combination with `
|
|
840
|
+
* Use in combination with `listViewColumn`.
|
|
835
841
|
* @default false
|
|
836
842
|
*/
|
|
837
|
-
|
|
843
|
+
listView: boolean;
|
|
838
844
|
}
|
|
839
845
|
export interface DataGridProSharedPropsWithoutDefaultValue<R extends GridValidRowModel = any> {
|
|
840
846
|
/**
|
|
@@ -842,9 +848,9 @@ export interface DataGridProSharedPropsWithoutDefaultValue<R extends GridValidRo
|
|
|
842
848
|
*/
|
|
843
849
|
headerFilterHeight?: number;
|
|
844
850
|
/**
|
|
845
|
-
* Definition of the column rendered when the `
|
|
851
|
+
* Definition of the column rendered when the `listView` prop is enabled.
|
|
846
852
|
*/
|
|
847
|
-
|
|
853
|
+
listViewColumn?: GridListViewColDef<R>;
|
|
848
854
|
}
|
|
849
855
|
export interface DataGridPremiumSharedPropsWithDefaultValue {
|
|
850
856
|
/**
|
|
@@ -3,4 +3,4 @@ import { GridStateCommunity } from "../../models/gridStateCommunity.js";
|
|
|
3
3
|
* Get the theme state
|
|
4
4
|
* @category Core
|
|
5
5
|
*/
|
|
6
|
-
export declare const gridIsRtlSelector: import("
|
|
6
|
+
export declare const gridIsRtlSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, boolean>;
|
|
@@ -6,4 +6,4 @@ import type { GridRowId } from '../../models/gridRows';
|
|
|
6
6
|
* @param {GridRowModel} row - The row to get the id for
|
|
7
7
|
* @returns {GridRowId} The row id
|
|
8
8
|
*/
|
|
9
|
-
export declare const gridRowIdSelector: import("
|
|
9
|
+
export declare const gridRowIdSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridValidRowModel, GridRowId>;
|
|
@@ -100,6 +100,6 @@ const useGridClipboard = (apiRef, props) => {
|
|
|
100
100
|
}
|
|
101
101
|
}, [apiRef, ignoreValueFormatter, clipboardCopyCellDelimiter]);
|
|
102
102
|
(0, _utils.useGridNativeEventListener)(apiRef, () => apiRef.current.rootElementRef.current, 'keydown', handleCopy);
|
|
103
|
-
(0, _utils.
|
|
103
|
+
(0, _utils.useGridEventPriority)(apiRef, 'clipboardCopy', props.onClipboardCopy);
|
|
104
104
|
};
|
|
105
105
|
exports.useGridClipboard = useGridClipboard;
|
|
@@ -3,10 +3,10 @@ import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
|
3
3
|
* @category ColumnGrouping
|
|
4
4
|
* @ignore - do not document.
|
|
5
5
|
*/
|
|
6
|
-
export declare const gridColumnGroupingSelector: import("
|
|
7
|
-
export declare const gridColumnGroupsUnwrappedModelSelector: import("
|
|
6
|
+
export declare const gridColumnGroupingSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridColumnsGroupingState>;
|
|
7
|
+
export declare const gridColumnGroupsUnwrappedModelSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsGroupingState, {
|
|
8
8
|
[columnField: string]: string[];
|
|
9
9
|
}>;
|
|
10
|
-
export declare const gridColumnGroupsLookupSelector: import("
|
|
11
|
-
export declare const gridColumnGroupsHeaderStructureSelector: import("
|
|
12
|
-
export declare const gridColumnGroupsHeaderMaxDepthSelector: import("
|
|
10
|
+
export declare const gridColumnGroupsLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsGroupingState, import("./gridColumnGroupsInterfaces").GridColumnGroupLookup>;
|
|
11
|
+
export declare const gridColumnGroupsHeaderStructureSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsGroupingState, import("./gridColumnGroupsInterfaces").GridGroupingStructure[][]>;
|
|
12
|
+
export declare const gridColumnGroupsHeaderMaxDepthSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsGroupingState, number>;
|
|
@@ -13,7 +13,7 @@ var _gridColumnGrouping = require("../../../models/gridColumnGrouping");
|
|
|
13
13
|
var _gridColumnGroupsSelector = require("./gridColumnGroupsSelector");
|
|
14
14
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
15
15
|
var _gridColumnGroupsUtils = require("./gridColumnGroupsUtils");
|
|
16
|
-
var
|
|
16
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
17
17
|
var _columns = require("../columns");
|
|
18
18
|
const _excluded = ["groupId", "children"];
|
|
19
19
|
const createGroupLookup = columnGroupingModel => {
|
|
@@ -123,11 +123,11 @@ const useGridColumnGrouping = (apiRef, props) => {
|
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
}, [apiRef]);
|
|
126
|
-
(0,
|
|
127
|
-
(0,
|
|
126
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnIndexChange', handleColumnIndexChange);
|
|
127
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnsChange', () => {
|
|
128
128
|
updateColumnGroupingState(props.columnGroupingModel);
|
|
129
129
|
});
|
|
130
|
-
(0,
|
|
130
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnVisibilityModelChange', () => {
|
|
131
131
|
updateColumnGroupingState(props.columnGroupingModel);
|
|
132
132
|
});
|
|
133
133
|
|
|
@@ -13,7 +13,7 @@ var _styles = require("@mui/material/styles");
|
|
|
13
13
|
var _utils = require("../../utils");
|
|
14
14
|
var _useGridRootProps = require("../../utils/useGridRootProps");
|
|
15
15
|
var _useGridPrivateApiContext = require("../../utils/useGridPrivateApiContext");
|
|
16
|
-
var
|
|
16
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
17
17
|
var _GridColumnHeaderItem = require("../../../components/columnHeaders/GridColumnHeaderItem");
|
|
18
18
|
var _gridDimensionsSelectors = require("../dimensions/gridDimensionsSelectors");
|
|
19
19
|
var _virtualization = require("../virtualization");
|
|
@@ -81,10 +81,10 @@ const useGridColumnHeaders = props => {
|
|
|
81
81
|
lastColumnIndex: visibleColumns.length
|
|
82
82
|
} : null;
|
|
83
83
|
}, [pinnedColumns.right.length, visibleColumns.length]);
|
|
84
|
-
(0,
|
|
85
|
-
(0,
|
|
86
|
-
(0,
|
|
87
|
-
(0,
|
|
84
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnResizeStart', handleColumnResizeStart);
|
|
85
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnResizeStop', handleColumnResizeStop);
|
|
86
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderDragStart', handleColumnReorderStart);
|
|
87
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderDragEnd', handleColumnReorderStop);
|
|
88
88
|
|
|
89
89
|
// Helper for computation common between getColumnHeaders and getColumnGroupHeaders
|
|
90
90
|
const getColumnsToRender = params => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridColumnMenuSelector: import("
|
|
2
|
+
export declare const gridColumnMenuSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridColumnMenuState>;
|
|
@@ -107,8 +107,8 @@ const useGridColumnMenu = apiRef => {
|
|
|
107
107
|
toggleColumnMenu
|
|
108
108
|
};
|
|
109
109
|
(0, _utils.useGridApiMethod)(apiRef, columnMenuApi, 'public');
|
|
110
|
-
(0, _utils.
|
|
111
|
-
(0, _utils.
|
|
112
|
-
(0, _utils.
|
|
110
|
+
(0, _utils.useGridEvent)(apiRef, 'columnResizeStart', hideColumnMenu);
|
|
111
|
+
(0, _utils.useGridEvent)(apiRef, 'virtualScrollerWheel', apiRef.current.hideColumnMenu);
|
|
112
|
+
(0, _utils.useGridEvent)(apiRef, 'virtualScrollerTouchMove', apiRef.current.hideColumnMenu);
|
|
113
113
|
};
|
|
114
114
|
exports.useGridColumnMenu = useGridColumnMenu;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridColumnResizeSelector: import("
|
|
3
|
-
export declare const gridResizingColumnFieldSelector: import("
|
|
2
|
+
export declare const gridColumnResizeSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridColumnResizeState>;
|
|
3
|
+
export declare const gridResizingColumnFieldSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnResizeState, string>;
|
|
@@ -556,12 +556,12 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
556
556
|
(0, _utils.useGridApiMethod)(apiRef, {
|
|
557
557
|
autosizeColumns
|
|
558
558
|
}, 'public');
|
|
559
|
-
(0, _utils.
|
|
560
|
-
(0, _utils.
|
|
561
|
-
(0, _utils.
|
|
562
|
-
(0, _utils.
|
|
563
|
-
(0, _utils.
|
|
564
|
-
(0, _utils.
|
|
559
|
+
(0, _utils.useGridEvent)(apiRef, 'columnResizeStop', handleResizeStop);
|
|
560
|
+
(0, _utils.useGridEvent)(apiRef, 'columnResizeStart', handleResizeStart);
|
|
561
|
+
(0, _utils.useGridEvent)(apiRef, 'columnSeparatorMouseDown', handleColumnResizeMouseDown);
|
|
562
|
+
(0, _utils.useGridEvent)(apiRef, 'columnSeparatorDoubleClick', handleColumnSeparatorDoubleClick);
|
|
563
|
+
(0, _utils.useGridEventPriority)(apiRef, 'columnResize', props.onColumnResize);
|
|
564
|
+
(0, _utils.useGridEventPriority)(apiRef, 'columnWidthChange', props.onColumnWidthChange);
|
|
565
565
|
};
|
|
566
566
|
exports.useGridColumnResize = useGridColumnResize;
|
|
567
567
|
function updateProperty(element, property, delta) {
|
|
@@ -4,55 +4,55 @@ import { GridColumnLookup, GridPinnedColumnFields } from "./gridColumnsInterface
|
|
|
4
4
|
* Get the columns state
|
|
5
5
|
* @category Columns
|
|
6
6
|
*/
|
|
7
|
-
export declare const gridColumnsStateSelector: import("
|
|
7
|
+
export declare const gridColumnsStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridColumnsState>;
|
|
8
8
|
/**
|
|
9
9
|
* Get an array of column fields in the order rendered on screen.
|
|
10
10
|
* @category Columns
|
|
11
11
|
*/
|
|
12
|
-
export declare const gridColumnFieldsSelector: import("
|
|
12
|
+
export declare const gridColumnFieldsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsState, string[]>;
|
|
13
13
|
/**
|
|
14
14
|
* Get the columns as a lookup (an object containing the field for keys and the definition for values).
|
|
15
15
|
* @category Columns
|
|
16
16
|
*/
|
|
17
|
-
export declare const gridColumnLookupSelector: import("
|
|
17
|
+
export declare const gridColumnLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsState, GridColumnLookup>;
|
|
18
18
|
/**
|
|
19
19
|
* Get an array of column definitions in the order rendered on screen..
|
|
20
20
|
* @category Columns
|
|
21
21
|
*/
|
|
22
|
-
export declare const gridColumnDefinitionsSelector: import("
|
|
22
|
+
export declare const gridColumnDefinitionsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, GridColumnLookup, import("../../../internals").GridStateColDef[]>;
|
|
23
23
|
/**
|
|
24
24
|
* Get the column visibility model, containing the visibility status of each column.
|
|
25
25
|
* If a column is not registered in the model, it is visible.
|
|
26
26
|
* @category Visible Columns
|
|
27
27
|
*/
|
|
28
|
-
export declare const gridColumnVisibilityModelSelector: import("
|
|
28
|
+
export declare const gridColumnVisibilityModelSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsState, import("@mui/x-data-grid").GridColumnVisibilityModel>;
|
|
29
29
|
/**
|
|
30
30
|
* Get the "initial" column visibility model, containing the visibility status of each column.
|
|
31
31
|
* It is updated when the `columns` prop is updated or when `updateColumns` API method is called.
|
|
32
32
|
* If a column is not registered in the model, it is visible.
|
|
33
33
|
* @category Visible Columns
|
|
34
34
|
*/
|
|
35
|
-
export declare const gridInitialColumnVisibilityModelSelector: import("
|
|
35
|
+
export declare const gridInitialColumnVisibilityModelSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnsState, import("@mui/x-data-grid").GridColumnVisibilityModel>;
|
|
36
36
|
/**
|
|
37
37
|
* Get the visible columns as a lookup (an object containing the field for keys and the definition for values).
|
|
38
38
|
* @category Visible Columns
|
|
39
39
|
*/
|
|
40
|
-
export declare const gridVisibleColumnDefinitionsSelector: import("
|
|
40
|
+
export declare const gridVisibleColumnDefinitionsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("@mui/x-data-grid").GridColumnVisibilityModel, import("../../../internals").GridStateColDef[]>;
|
|
41
41
|
/**
|
|
42
42
|
* Get the field of each visible column.
|
|
43
43
|
* @category Visible Columns
|
|
44
44
|
*/
|
|
45
|
-
export declare const gridVisibleColumnFieldsSelector: import("
|
|
45
|
+
export declare const gridVisibleColumnFieldsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../internals").GridStateColDef[], string[]>;
|
|
46
46
|
/**
|
|
47
47
|
* Get the visible pinned columns model.
|
|
48
48
|
* @category Visible Columns
|
|
49
49
|
*/
|
|
50
|
-
export declare const gridPinnedColumnsSelector: import("
|
|
50
|
+
export declare const gridPinnedColumnsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridPinnedColumnFields>;
|
|
51
51
|
/**
|
|
52
52
|
* Get the visible pinned columns.
|
|
53
53
|
* @category Visible Columns
|
|
54
54
|
*/
|
|
55
|
-
export declare const gridVisiblePinnedColumnDefinitionsSelector: import("
|
|
55
|
+
export declare const gridVisiblePinnedColumnDefinitionsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, boolean, {
|
|
56
56
|
left: import("../../../internals").GridStateColDef[];
|
|
57
57
|
right: import("../../../internals").GridStateColDef[];
|
|
58
58
|
}>;
|
|
@@ -60,20 +60,20 @@ export declare const gridVisiblePinnedColumnDefinitionsSelector: import("../../.
|
|
|
60
60
|
* Get the left position in pixel of each visible columns relative to the left of the first column.
|
|
61
61
|
* @category Visible Columns
|
|
62
62
|
*/
|
|
63
|
-
export declare const gridColumnPositionsSelector: import("
|
|
63
|
+
export declare const gridColumnPositionsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../internals").GridStateColDef[], number[]>;
|
|
64
64
|
/**
|
|
65
65
|
* Get the filterable columns as an array.
|
|
66
66
|
* @category Columns
|
|
67
67
|
*/
|
|
68
|
-
export declare const gridFilterableColumnDefinitionsSelector: import("
|
|
68
|
+
export declare const gridFilterableColumnDefinitionsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../internals").GridStateColDef[], import("../../../internals").GridStateColDef[]>;
|
|
69
69
|
/**
|
|
70
70
|
* Get the filterable columns as a lookup (an object containing the field for keys and the definition for values).
|
|
71
71
|
* @category Columns
|
|
72
72
|
*/
|
|
73
|
-
export declare const gridFilterableColumnLookupSelector: import("
|
|
73
|
+
export declare const gridFilterableColumnLookupSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../internals").GridStateColDef[], GridColumnLookup>;
|
|
74
74
|
/**
|
|
75
75
|
* Checks if some column has a colSpan field.
|
|
76
76
|
* @category Columns
|
|
77
77
|
* @ignore - Do not document
|
|
78
78
|
*/
|
|
79
|
-
export declare const gridHasColSpanSelector: import("
|
|
79
|
+
export declare const gridHasColSpanSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, import("../../../internals").GridStateColDef[], boolean>;
|
|
@@ -71,4 +71,4 @@ export declare function getFirstNonSpannedColumnToRender({
|
|
|
71
71
|
lastRowToRender: number;
|
|
72
72
|
visibleRows: GridRowEntry[];
|
|
73
73
|
}): number;
|
|
74
|
-
export declare function getTotalHeaderHeight(apiRef: RefObject<GridApiCommunity>, props: Pick<DataGridProcessedProps, 'columnHeaderHeight' | 'headerFilterHeight' | '
|
|
74
|
+
export declare function getTotalHeaderHeight(apiRef: RefObject<GridApiCommunity>, props: Pick<DataGridProcessedProps, 'columnHeaderHeight' | 'headerFilterHeight' | 'listView' | 'columnGroupHeaderHeight'>): number;
|
|
@@ -330,7 +330,7 @@ function getFirstNonSpannedColumnToRender({
|
|
|
330
330
|
return firstNonSpannedColumnToRender;
|
|
331
331
|
}
|
|
332
332
|
function getTotalHeaderHeight(apiRef, props) {
|
|
333
|
-
if (props.
|
|
333
|
+
if (props.listView) {
|
|
334
334
|
return 0;
|
|
335
335
|
}
|
|
336
336
|
const densityFactor = (0, _densitySelector.gridDensityFactorSelector)(apiRef);
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.useGridColumnSpanning = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
10
|
-
var
|
|
10
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
11
11
|
/**
|
|
12
12
|
* @requires useGridColumns (method, event)
|
|
13
13
|
* @requires useGridParamsApi (method)
|
|
@@ -52,7 +52,7 @@ const useGridColumnSpanning = apiRef => {
|
|
|
52
52
|
};
|
|
53
53
|
(0, _useGridApiMethod.useGridApiMethod)(apiRef, columnSpanningPublicApi, 'public');
|
|
54
54
|
(0, _useGridApiMethod.useGridApiMethod)(apiRef, columnSpanningPrivateApi, 'private');
|
|
55
|
-
(0,
|
|
55
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnOrderChange', resetColSpan);
|
|
56
56
|
};
|
|
57
57
|
exports.useGridColumnSpanning = useGridColumnSpanning;
|
|
58
58
|
function calculateCellColSpan(params) {
|
|
@@ -13,7 +13,7 @@ var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
|
13
13
|
var _useGridLogger = require("../../utils/useGridLogger");
|
|
14
14
|
var _gridColumnsSelector = require("./gridColumnsSelector");
|
|
15
15
|
var _signature = require("../../../constants/signature");
|
|
16
|
-
var
|
|
16
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
17
17
|
var _pipeProcessing = require("../../core/pipeProcessing");
|
|
18
18
|
var _gridColumnsInterfaces = require("./gridColumnsInterfaces");
|
|
19
19
|
var _gridColumnsUtils = require("./gridColumnsUtils");
|
|
@@ -261,7 +261,7 @@ function useGridColumns(apiRef, props) {
|
|
|
261
261
|
setGridColumnsState((0, _gridColumnsUtils.hydrateColumnsWidth)((0, _gridColumnsSelector.gridColumnsStateSelector)(apiRef), apiRef.current.getRootDimensions()));
|
|
262
262
|
}
|
|
263
263
|
};
|
|
264
|
-
(0,
|
|
264
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'viewportInnerSizeChange', handleGridSizeChange);
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* APPLIERS
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const gridGetRowsParamsSelector: import("
|
|
1
|
+
export declare const gridGetRowsParamsSelector: import("@mui/x-data-grid").OutputSelector<import("../../../models/gridStateCommunity").GridStateCommunity, import("@mui/x-data-grid").GridPaginationModel, {
|
|
2
2
|
groupKeys: never[];
|
|
3
|
-
paginationModel: import("
|
|
4
|
-
sortModel: import("
|
|
5
|
-
filterModel: import("
|
|
3
|
+
paginationModel: import("@mui/x-data-grid").GridPaginationModel;
|
|
4
|
+
sortModel: import("@mui/x-data-grid").GridSortModel;
|
|
5
|
+
filterModel: import("@mui/x-data-grid").GridFilterModel;
|
|
6
6
|
start: number;
|
|
7
7
|
end: number;
|
|
8
8
|
}>;
|
|
@@ -8,7 +8,7 @@ exports.useGridDataSource = void 0;
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
10
10
|
var _useGridRegisterStrategyProcessor = require("../../core/strategyProcessing/useGridRegisterStrategyProcessor");
|
|
11
|
-
var
|
|
11
|
+
var _useGridEvent = require("../../utils/useGridEvent");
|
|
12
12
|
var _useGridDataSourceBase = require("./useGridDataSourceBase");
|
|
13
13
|
/**
|
|
14
14
|
* Community version of the data source hook. Contains implementation of the `useGridDataSourceBase` hook.
|
|
@@ -23,7 +23,7 @@ const useGridDataSource = (apiRef, props) => {
|
|
|
23
23
|
(0, _useGridApiMethod.useGridApiMethod)(apiRef, api.public, 'public');
|
|
24
24
|
(0, _useGridRegisterStrategyProcessor.useGridRegisterStrategyProcessor)(apiRef, strategyProcessor.strategyName, strategyProcessor.group, strategyProcessor.processor);
|
|
25
25
|
Object.entries(events).forEach(([event, handler]) => {
|
|
26
|
-
(0,
|
|
26
|
+
(0, _useGridEvent.useGridEvent)(apiRef, event, handler);
|
|
27
27
|
});
|
|
28
28
|
React.useEffect(() => {
|
|
29
29
|
setStrategyAvailability();
|