@mui/x-data-grid 8.3.1 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +213 -0
- package/DataGrid/DataGrid.js +5 -3
- package/components/GridApiContext.js +1 -3
- package/components/GridColumnHeaders.js +1 -0
- package/components/GridColumnUnsortedIcon.js +2 -1
- package/components/GridConfigurationContext.js +1 -3
- package/components/GridFooter.js +1 -0
- package/components/GridLoadingOverlay.js +1 -0
- package/components/GridNoColumnsOverlay.js +1 -0
- package/components/GridNoResultsOverlay.js +2 -1
- package/components/GridNoRowsOverlay.js +1 -0
- package/components/GridRow.js +4 -2
- package/components/GridRowCount.js +1 -0
- package/components/GridSelectedRowCount.js +1 -0
- package/components/GridShadowScrollArea.js +1 -0
- package/components/GridSkeletonLoadingOverlay.js +3 -1
- package/components/cell/GridActionsCell.js +5 -4
- package/components/cell/GridActionsCellItem.js +1 -0
- package/components/cell/GridBooleanCell.js +3 -1
- package/components/cell/GridCell.js +11 -7
- package/components/cell/GridEditBooleanCell.js +8 -5
- package/components/cell/GridEditDateCell.js +6 -4
- package/components/cell/GridEditInputCell.js +7 -4
- package/components/cell/GridEditSingleSelectCell.js +4 -3
- package/components/cell/GridSkeletonCell.js +6 -5
- package/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +2 -1
- package/components/columnHeaders/GridColumnGroupHeader.js +6 -5
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +5 -4
- package/components/columnHeaders/GridColumnHeaderItem.js +8 -7
- package/components/columnHeaders/GridColumnHeaderSeparator.js +5 -3
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -0
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +4 -3
- package/components/columnHeaders/GridIconButtonContainer.js +2 -1
- package/components/columnSelection/GridCellCheckboxRenderer.js +5 -4
- package/components/columnSelection/GridHeaderCheckbox.js +1 -0
- package/components/columnsManagement/GridColumnsManagement.js +2 -2
- package/components/columnsPanel/ColumnsPanelTrigger.js +1 -0
- package/components/containers/GridFooterContainer.js +1 -0
- package/components/containers/GridOverlay.js +1 -0
- package/components/containers/GridRoot.js +7 -4
- package/components/containers/GridRootStyles.js +2 -2
- package/components/containers/GridToolbarContainer.js +1 -0
- package/components/export/ExportCsv.js +1 -0
- package/components/export/ExportPrint.js +1 -0
- package/components/filterPanel/FilterPanelTrigger.js +1 -0
- package/components/menu/GridMenu.js +6 -4
- package/components/menu/columnMenu/GridColumnMenu.js +2 -0
- package/components/menu/columnMenu/GridColumnMenuContainer.js +1 -0
- package/components/panel/GridPanel.js +3 -2
- package/components/panel/GridPanelContext.js +1 -0
- package/components/panel/GridPanelWrapper.js +2 -1
- package/components/panel/filterPanel/GridFilterForm.js +10 -7
- package/components/panel/filterPanel/GridFilterInputBoolean.js +5 -4
- package/components/panel/filterPanel/GridFilterInputDate.js +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +3 -3
- package/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/components/panel/filterPanel/GridFilterPanel.js +1 -0
- package/components/quickFilter/QuickFilter.js +2 -2
- package/components/quickFilter/QuickFilterClear.js +1 -0
- package/components/quickFilter/QuickFilterContext.js +1 -0
- package/components/quickFilter/QuickFilterControl.js +3 -2
- package/components/quickFilter/QuickFilterTrigger.js +3 -2
- package/components/toolbar/GridToolbar.js +3 -2
- package/components/toolbar/GridToolbarColumnsButton.js +1 -0
- package/components/toolbar/GridToolbarDensitySelector.js +6 -4
- package/components/toolbar/GridToolbarExport.js +1 -0
- package/components/toolbar/GridToolbarExportContainer.js +6 -4
- package/components/toolbar/GridToolbarFilterButton.js +8 -5
- package/components/toolbarV8/Toolbar.js +59 -32
- package/components/toolbarV8/ToolbarButton.js +3 -2
- package/components/toolbarV8/ToolbarContext.js +1 -0
- package/components/toolbarV8/utils.d.ts +5 -0
- package/components/toolbarV8/utils.js +23 -0
- package/components/virtualization/GridMainContainer.js +2 -1
- package/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/components/virtualization/GridVirtualScrollerContent.js +2 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.js +2 -1
- package/constants/gridClasses.d.ts +4 -0
- package/constants/gridClasses.js +5 -3
- package/context/GridRootPropsContext.js +1 -3
- package/esm/DataGrid/DataGrid.js +5 -3
- package/esm/components/GridApiContext.js +1 -3
- package/esm/components/GridColumnHeaders.js +1 -0
- package/esm/components/GridColumnUnsortedIcon.js +2 -1
- package/esm/components/GridConfigurationContext.js +1 -3
- package/esm/components/GridFooter.js +1 -0
- package/esm/components/GridLoadingOverlay.js +1 -0
- package/esm/components/GridNoColumnsOverlay.js +1 -0
- package/esm/components/GridNoResultsOverlay.js +2 -1
- package/esm/components/GridNoRowsOverlay.js +1 -0
- package/esm/components/GridRow.js +3 -1
- package/esm/components/GridRowCount.js +1 -0
- package/esm/components/GridSelectedRowCount.js +1 -0
- package/esm/components/GridShadowScrollArea.js +1 -0
- package/esm/components/GridSkeletonLoadingOverlay.js +3 -1
- package/esm/components/cell/GridActionsCell.js +3 -2
- package/esm/components/cell/GridActionsCellItem.js +1 -0
- package/esm/components/cell/GridBooleanCell.js +3 -1
- package/esm/components/cell/GridCell.js +5 -1
- package/esm/components/cell/GridEditBooleanCell.js +5 -2
- package/esm/components/cell/GridEditDateCell.js +4 -2
- package/esm/components/cell/GridEditInputCell.js +5 -2
- package/esm/components/cell/GridEditSingleSelectCell.js +3 -2
- package/esm/components/cell/GridSkeletonCell.js +2 -1
- package/esm/components/columnHeaders/ColumnHeaderMenuIcon.js +2 -1
- package/esm/components/columnHeaders/GridBaseColumnHeaders.js +2 -1
- package/esm/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/esm/components/columnHeaders/GridColumnHeaderFilterIconButton.js +2 -1
- package/esm/components/columnHeaders/GridColumnHeaderItem.js +3 -2
- package/esm/components/columnHeaders/GridColumnHeaderSeparator.js +3 -1
- package/esm/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -0
- package/esm/components/columnHeaders/GridColumnHeaderTitle.js +1 -0
- package/esm/components/columnHeaders/GridGenericColumnHeaderItem.js +2 -1
- package/esm/components/columnHeaders/GridIconButtonContainer.js +2 -1
- package/esm/components/columnSelection/GridCellCheckboxRenderer.js +2 -1
- package/esm/components/columnSelection/GridHeaderCheckbox.js +1 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +2 -2
- package/esm/components/columnsPanel/ColumnsPanelTrigger.js +1 -0
- package/esm/components/containers/GridFooterContainer.js +1 -0
- package/esm/components/containers/GridOverlay.js +1 -0
- package/esm/components/containers/GridRoot.js +4 -1
- package/esm/components/containers/GridRootStyles.js +2 -2
- package/esm/components/containers/GridToolbarContainer.js +1 -0
- package/esm/components/export/ExportCsv.js +1 -0
- package/esm/components/export/ExportPrint.js +1 -0
- package/esm/components/filterPanel/FilterPanelTrigger.js +1 -0
- package/esm/components/menu/GridMenu.js +3 -1
- package/esm/components/menu/columnMenu/GridColumnMenu.js +2 -0
- package/esm/components/menu/columnMenu/GridColumnMenuContainer.js +1 -0
- package/esm/components/panel/GridPanel.js +2 -1
- package/esm/components/panel/GridPanelContext.js +1 -0
- package/esm/components/panel/GridPanelWrapper.js +1 -0
- package/esm/components/panel/filterPanel/GridFilterForm.js +4 -1
- package/esm/components/panel/filterPanel/GridFilterInputBoolean.js +2 -1
- package/esm/components/panel/filterPanel/GridFilterInputDate.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/esm/components/panel/filterPanel/GridFilterPanel.js +1 -0
- package/esm/components/quickFilter/QuickFilter.js +1 -1
- package/esm/components/quickFilter/QuickFilterClear.js +1 -0
- package/esm/components/quickFilter/QuickFilterContext.js +1 -0
- package/esm/components/quickFilter/QuickFilterControl.js +2 -1
- package/esm/components/quickFilter/QuickFilterTrigger.js +2 -1
- package/esm/components/toolbar/GridToolbar.js +1 -0
- package/esm/components/toolbar/GridToolbarColumnsButton.js +1 -0
- package/esm/components/toolbar/GridToolbarDensitySelector.js +3 -1
- package/esm/components/toolbar/GridToolbarExport.js +1 -0
- package/esm/components/toolbar/GridToolbarExportContainer.js +3 -1
- package/esm/components/toolbar/GridToolbarFilterButton.js +4 -1
- package/esm/components/toolbarV8/Toolbar.js +59 -32
- package/esm/components/toolbarV8/ToolbarButton.js +2 -1
- package/esm/components/toolbarV8/ToolbarContext.js +1 -0
- package/esm/components/toolbarV8/utils.d.ts +5 -0
- package/esm/components/toolbarV8/utils.js +17 -0
- package/esm/components/virtualization/GridMainContainer.js +2 -1
- package/esm/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/esm/components/virtualization/GridVirtualScrollerContent.js +1 -0
- package/esm/components/virtualization/GridVirtualScrollerRenderZone.js +1 -0
- package/esm/constants/gridClasses.d.ts +4 -0
- package/esm/constants/gridClasses.js +3 -2
- package/esm/context/GridRootPropsContext.js +1 -3
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -1
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +9 -0
- package/esm/hooks/features/columns/gridColumnsSelector.js +9 -2
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +1 -1
- package/esm/hooks/features/export/useGridPrintExport.js +1 -1
- package/esm/hooks/features/filter/useGridFilter.js +1 -1
- package/esm/hooks/features/overlays/useGridOverlays.js +1 -0
- package/esm/hooks/features/pagination/useGridPaginationModel.js +1 -1
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/esm/hooks/features/rows/useGridRowsMeta.js +5 -2
- package/esm/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/esm/hooks/features/sorting/useGridSorting.js +5 -5
- package/esm/hooks/utils/useGridPrivateApiContext.js +1 -3
- package/esm/hooks/utils/useRunOnce.js +1 -1
- package/esm/index.js +1 -1
- package/esm/locales/isIS.js +8 -8
- package/esm/material/index.js +14 -0
- package/esm/material/variables.js +5 -0
- package/esm/models/events/gridEventLookup.d.ts +9 -0
- package/esm/models/props/DataGridProps.d.ts +7 -0
- package/esm/utils/composeGridClasses.d.ts +1 -1
- package/esm/utils/composeGridClasses.js +1 -1
- package/esm/utils/css/context.js +2 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +9 -0
- package/hooks/features/columns/gridColumnsSelector.js +10 -3
- package/hooks/features/dataSource/useGridDataSourceBase.js +12 -12
- package/hooks/features/export/useGridPrintExport.js +5 -5
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/overlays/useGridOverlays.js +1 -0
- package/hooks/features/pagination/useGridPaginationModel.js +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/hooks/features/rows/useGridRowsMeta.js +8 -5
- package/hooks/features/sorting/useGridSorting.d.ts +1 -1
- package/hooks/features/sorting/useGridSorting.js +6 -6
- package/hooks/utils/useGridPrivateApiContext.js +1 -3
- package/hooks/utils/useRunOnce.js +3 -2
- package/index.js +1 -1
- package/locales/isIS.js +8 -8
- package/material/index.js +14 -0
- package/material/variables.js +5 -0
- package/models/events/gridEventLookup.d.ts +9 -0
- package/models/props/DataGridProps.d.ts +7 -0
- package/package.json +2 -2
- package/utils/composeGridClasses.d.ts +1 -1
- package/utils/composeGridClasses.js +3 -2
- package/utils/css/context.js +2 -1
|
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
const _excluded = ["render", "onKeyDown", "onFocus", "disabled", "aria-disabled"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import
|
|
6
|
+
import useForkRef from '@mui/utils/useForkRef';
|
|
7
7
|
import useId from '@mui/utils/useId';
|
|
8
8
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
@@ -83,6 +83,7 @@ const ToolbarButton = forwardRef(function ToolbarButton(props, ref) {
|
|
|
83
83
|
children: element
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
|
+
if (process.env.NODE_ENV !== "production") ToolbarButton.displayName = "ToolbarButton";
|
|
86
87
|
process.env.NODE_ENV !== "production" ? ToolbarButton.propTypes = {
|
|
87
88
|
// ----------------------------- Warning --------------------------------
|
|
88
89
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const ToolbarContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
+
if (process.env.NODE_ENV !== "production") ToolbarContext.displayName = "ToolbarContext";
|
|
3
4
|
export function useToolbarContext() {
|
|
4
5
|
const context = React.useContext(ToolbarContext);
|
|
5
6
|
if (context === undefined) {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* eslint-disable no-bitwise */
|
|
2
|
+
export function sortByDocumentPosition(a, b) {
|
|
3
|
+
if (!a.ref.current || !b.ref.current) {
|
|
4
|
+
return 0;
|
|
5
|
+
}
|
|
6
|
+
const position = a.ref.current.compareDocumentPosition(b.ref.current);
|
|
7
|
+
if (!position) {
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {
|
|
11
|
+
return -1;
|
|
12
|
+
}
|
|
13
|
+
if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {
|
|
14
|
+
return 1;
|
|
15
|
+
}
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
@@ -54,4 +54,5 @@ const GridVirtualScrollerRenderZone = forwardRef(function GridVirtualScrollerRen
|
|
|
54
54
|
ref: ref
|
|
55
55
|
}));
|
|
56
56
|
});
|
|
57
|
+
if (process.env.NODE_ENV !== "production") GridVirtualScrollerRenderZone.displayName = "GridVirtualScrollerRenderZone";
|
|
57
58
|
export { GridVirtualScrollerRenderZone };
|
|
@@ -619,6 +619,10 @@ export interface GridClasses {
|
|
|
619
619
|
* Styles applied to the root element of the row reorder cell when dragging is allowed
|
|
620
620
|
*/
|
|
621
621
|
'rowReorderCell--draggable': string;
|
|
622
|
+
/**
|
|
623
|
+
* Styles applied to the row reorder icon element.
|
|
624
|
+
*/
|
|
625
|
+
rowReorderIcon: string;
|
|
622
626
|
/**
|
|
623
627
|
* Styles applied to the skeleton row element.
|
|
624
628
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
3
|
export function getDataGridUtilityClass(slot) {
|
|
3
4
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
4
5
|
}
|
|
5
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
|
6
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible', 'row--dragging', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
const GridRootPropsContext = /*#__PURE__*/React.createContext(undefined);
|
|
5
|
-
if (process.env.NODE_ENV !==
|
|
6
|
-
GridRootPropsContext.displayName = 'GridRootPropsContext';
|
|
7
|
-
}
|
|
5
|
+
if (process.env.NODE_ENV !== "production") GridRootPropsContext.displayName = "GridRootPropsContext";
|
|
8
6
|
export { GridRootPropsContext };
|
|
@@ -75,7 +75,7 @@ export const useGridColumnHeaders = props => {
|
|
|
75
75
|
useGridEvent(apiRef, 'columnResizeStart', handleColumnResizeStart);
|
|
76
76
|
useGridEvent(apiRef, 'columnResizeStop', handleColumnResizeStop);
|
|
77
77
|
useGridEvent(apiRef, 'columnHeaderDragStart', handleColumnReorderStart);
|
|
78
|
-
useGridEvent(apiRef, '
|
|
78
|
+
useGridEvent(apiRef, 'columnHeaderDragEndNative', handleColumnReorderStop);
|
|
79
79
|
|
|
80
80
|
// Helper for computation common between getColumnHeaders and getColumnGroupHeaders
|
|
81
81
|
const getColumnsToRender = params => {
|
|
@@ -113,6 +113,7 @@ export const useGridColumnHeaders = props => {
|
|
|
113
113
|
})]
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
+
if (process.env.NODE_ENV !== "production") getFillers.displayName = "getFillers";
|
|
116
117
|
const getColumnHeaders = (params, other = {}) => {
|
|
117
118
|
const {
|
|
118
119
|
renderedColumns,
|
|
@@ -181,6 +182,7 @@ export const useGridColumnHeaders = props => {
|
|
|
181
182
|
})]
|
|
182
183
|
});
|
|
183
184
|
};
|
|
185
|
+
if (process.env.NODE_ENV !== "production") getColumnHeadersRow.displayName = "getColumnHeadersRow";
|
|
184
186
|
const getColumnGroupHeaders = ({
|
|
185
187
|
depth,
|
|
186
188
|
params
|
|
@@ -48,6 +48,15 @@ export declare const gridVisibleColumnFieldsSelector: import("@mui/x-data-grid")
|
|
|
48
48
|
* @category Visible Columns
|
|
49
49
|
*/
|
|
50
50
|
export declare const gridPinnedColumnsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridPinnedColumnFields>;
|
|
51
|
+
/**
|
|
52
|
+
* Get all existing pinned columns. Place the columns on the side that depends on the rtl state.
|
|
53
|
+
* @category Pinned Columns
|
|
54
|
+
* @ignore - Do not document
|
|
55
|
+
*/
|
|
56
|
+
export declare const gridExistingPinnedColumnSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, boolean, {
|
|
57
|
+
left: string[];
|
|
58
|
+
right: string[];
|
|
59
|
+
}>;
|
|
51
60
|
/**
|
|
52
61
|
* Get the visible pinned columns.
|
|
53
62
|
* @category Visible Columns
|
|
@@ -59,19 +59,26 @@ export const gridVisibleColumnFieldsSelector = createSelectorMemoized(gridVisibl
|
|
|
59
59
|
*/
|
|
60
60
|
export const gridPinnedColumnsSelector = createRootSelector(state => state.pinnedColumns);
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Get all existing pinned columns. Place the columns on the side that depends on the rtl state.
|
|
64
|
+
* @category Pinned Columns
|
|
65
|
+
* @ignore - Do not document
|
|
66
|
+
*/
|
|
67
|
+
export const gridExistingPinnedColumnSelector = createSelectorMemoized(gridPinnedColumnsSelector, gridColumnFieldsSelector, gridIsRtlSelector, (model, orderedFields, isRtl) => filterMissingColumns(model, orderedFields, isRtl));
|
|
68
|
+
|
|
62
69
|
/**
|
|
63
70
|
* Get the visible pinned columns.
|
|
64
71
|
* @category Visible Columns
|
|
65
72
|
*/
|
|
66
73
|
export const gridVisiblePinnedColumnDefinitionsSelector = createSelectorMemoized(gridColumnsStateSelector, gridPinnedColumnsSelector, gridVisibleColumnFieldsSelector, gridIsRtlSelector, (columnsState, model, visibleColumnFields, isRtl) => {
|
|
67
|
-
const visiblePinnedFields =
|
|
74
|
+
const visiblePinnedFields = filterMissingColumns(model, visibleColumnFields, isRtl);
|
|
68
75
|
const visiblePinnedColumns = {
|
|
69
76
|
left: visiblePinnedFields.left.map(field => columnsState.lookup[field]),
|
|
70
77
|
right: visiblePinnedFields.right.map(field => columnsState.lookup[field])
|
|
71
78
|
};
|
|
72
79
|
return visiblePinnedColumns;
|
|
73
80
|
});
|
|
74
|
-
function
|
|
81
|
+
function filterMissingColumns(pinnedColumns, columns, invert) {
|
|
75
82
|
if (!Array.isArray(pinnedColumns.left) && !Array.isArray(pinnedColumns.right)) {
|
|
76
83
|
return EMPTY_PINNED_COLUMN_FIELDS;
|
|
77
84
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
4
|
-
import
|
|
4
|
+
import debounce from '@mui/utils/debounce';
|
|
5
5
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
6
6
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
7
7
|
import { GRID_ROOT_GROUP_ID } from "../rows/gridRowsUtils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import ownerDocument from '@mui/utils/ownerDocument';
|
|
4
4
|
import { loadStyleSheets } from '@mui/x-internals/export';
|
|
5
5
|
import { useGridLogger } from "../../utils/useGridLogger.js";
|
|
6
6
|
import { gridExpandedRowCountSelector } from "../filter/gridFilterSelector.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { lruMemoize } from 'reselect';
|
|
4
|
-
import
|
|
4
|
+
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
5
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
6
6
|
import { useLazyRef } from "../../utils/useLazyRef.js";
|
|
7
7
|
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
@@ -138,7 +138,7 @@ export const useGridPaginationModel = (apiRef, props) => {
|
|
|
138
138
|
return;
|
|
139
139
|
}
|
|
140
140
|
const dimensions = apiRef.current.getRootDimensions();
|
|
141
|
-
const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);
|
|
141
|
+
const maximumPageSizeWithoutScrollBar = Math.max(1, Math.floor(dimensions.viewportInnerSize.height / rowHeight));
|
|
142
142
|
apiRef.current.setPageSize(maximumPageSizeWithoutScrollBar);
|
|
143
143
|
}, [apiRef, props.autoPageSize, rowHeight]);
|
|
144
144
|
const handleRowCountChange = React.useCallback(newRowCount => {
|
|
@@ -427,7 +427,7 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
427
427
|
const toggleAllRows = React.useCallback(value => {
|
|
428
428
|
const filterModel = gridFilterModelSelector(apiRef);
|
|
429
429
|
const quickFilterModel = gridQuickFilterValuesSelector(apiRef);
|
|
430
|
-
const hasFilters = filterModel.items.length > 0 ||
|
|
430
|
+
const hasFilters = filterModel.items.length > 0 || quickFilterModel?.some(val => val.length);
|
|
431
431
|
if (!props.isRowSelectable && !props.checkboxSelectionVisibleOnly && applyAutoSelection && !hasFilters) {
|
|
432
432
|
apiRef.current.setRowSelectionModel({
|
|
433
433
|
type: value ? 'exclude' : 'include',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
4
|
-
import
|
|
4
|
+
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
5
|
import { ResizeObserver } from "../../../utils/ResizeObserver.js";
|
|
6
6
|
import { useGridVisibleRows } from "../../utils/useGridVisibleRows.js";
|
|
7
7
|
import { eslintUseValue } from "../../../utils/utils.js";
|
|
@@ -194,7 +194,10 @@ export const useGridRowsMeta = (apiRef, props) => {
|
|
|
194
194
|
apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
|
|
195
195
|
}
|
|
196
196
|
if (!isHeightMetaValid.current) {
|
|
197
|
-
|
|
197
|
+
// Avoids "ResizeObserver loop completed with undelivered notifications" error
|
|
198
|
+
requestAnimationFrame(() => {
|
|
199
|
+
apiRef.current.requestPipeProcessorsApplication('rowHeight');
|
|
200
|
+
});
|
|
198
201
|
}
|
|
199
202
|
})).current;
|
|
200
203
|
const observeRowHeight = (element, rowId) => {
|
|
@@ -7,4 +7,4 @@ export declare const sortingStateInitializer: GridStateInitializer<Pick<DataGrid
|
|
|
7
7
|
* @requires useGridRows (event)
|
|
8
8
|
* @requires useGridColumns (event)
|
|
9
9
|
*/
|
|
10
|
-
export declare const useGridSorting: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "initialState" | "sortModel" | "onSortModelChange" | "sortingOrder" | "sortingMode" | "disableColumnSorting" | "disableMultipleColumnsSorting">) => void;
|
|
10
|
+
export declare const useGridSorting: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "initialState" | "sortModel" | "onSortModelChange" | "sortingOrder" | "sortingMode" | "disableColumnSorting" | "disableMultipleColumnsSorting" | "multipleColumnsSortingMode">) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import
|
|
3
|
+
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
4
4
|
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
5
5
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
6
6
|
import { useGridLogger } from "../../utils/useGridLogger.js";
|
|
@@ -194,9 +194,9 @@ export const useGridSorting = (apiRef, props) => {
|
|
|
194
194
|
if (!colDef.sortable || props.disableColumnSorting) {
|
|
195
195
|
return;
|
|
196
196
|
}
|
|
197
|
-
const allowMultipleSorting = event.shiftKey || event.metaKey || event.ctrlKey;
|
|
197
|
+
const allowMultipleSorting = props.multipleColumnsSortingMode === 'always' || event.shiftKey || event.metaKey || event.ctrlKey;
|
|
198
198
|
sortColumn(field, undefined, allowMultipleSorting);
|
|
199
|
-
}, [sortColumn, props.disableColumnSorting]);
|
|
199
|
+
}, [sortColumn, props.disableColumnSorting, props.multipleColumnsSortingMode]);
|
|
200
200
|
const handleColumnHeaderKeyDown = React.useCallback(({
|
|
201
201
|
field,
|
|
202
202
|
colDef
|
|
@@ -206,9 +206,9 @@ export const useGridSorting = (apiRef, props) => {
|
|
|
206
206
|
}
|
|
207
207
|
// Ctrl + Enter opens the column menu
|
|
208
208
|
if (event.key === 'Enter' && !event.ctrlKey && !event.metaKey) {
|
|
209
|
-
sortColumn(field, undefined, event.shiftKey);
|
|
209
|
+
sortColumn(field, undefined, props.multipleColumnsSortingMode === 'always' || event.shiftKey);
|
|
210
210
|
}
|
|
211
|
-
}, [sortColumn, props.disableColumnSorting]);
|
|
211
|
+
}, [sortColumn, props.disableColumnSorting, props.multipleColumnsSortingMode]);
|
|
212
212
|
const handleColumnsChange = React.useCallback(() => {
|
|
213
213
|
// When the columns change we check that the sorted columns are still part of the dataset
|
|
214
214
|
const sortModel = gridSortModelSelector(apiRef);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export const GridPrivateApiContext = /*#__PURE__*/React.createContext(undefined);
|
|
3
|
-
if (process.env.NODE_ENV !==
|
|
4
|
-
GridPrivateApiContext.displayName = 'GridPrivateApiContext';
|
|
5
|
-
}
|
|
3
|
+
if (process.env.NODE_ENV !== "production") GridPrivateApiContext.displayName = "GridPrivateApiContext";
|
|
6
4
|
export function useGridPrivateApiContext() {
|
|
7
5
|
const privateApiRef = React.useContext(GridPrivateApiContext);
|
|
8
6
|
if (privateApiRef === undefined) {
|
package/esm/index.js
CHANGED
package/esm/locales/isIS.js
CHANGED
|
@@ -58,11 +58,11 @@ const isISGrid = {
|
|
|
58
58
|
filterPanelInputPlaceholder: 'Síu gildi',
|
|
59
59
|
// Filter operators text
|
|
60
60
|
filterOperatorContains: 'inniheldur',
|
|
61
|
-
|
|
61
|
+
filterOperatorDoesNotContain: 'inniheldur ekki',
|
|
62
62
|
filterOperatorEquals: 'jafnt og',
|
|
63
|
-
|
|
64
|
-
filterOperatorStartsWith: 'byrjar
|
|
65
|
-
filterOperatorEndsWith: 'endar
|
|
63
|
+
filterOperatorDoesNotEqual: 'ekki jafnt og',
|
|
64
|
+
filterOperatorStartsWith: 'byrjar á',
|
|
65
|
+
filterOperatorEndsWith: 'endar á',
|
|
66
66
|
filterOperatorIs: 'er líka með',
|
|
67
67
|
filterOperatorNot: 'er ekki líka með',
|
|
68
68
|
filterOperatorAfter: 'eftir',
|
|
@@ -80,11 +80,11 @@ const isISGrid = {
|
|
|
80
80
|
'filterOperator<=': '<=',
|
|
81
81
|
// Header filter operators text
|
|
82
82
|
headerFilterOperatorContains: 'Inniheldur',
|
|
83
|
-
|
|
83
|
+
headerFilterOperatorDoesNotContain: 'Inniheldur ekki',
|
|
84
84
|
headerFilterOperatorEquals: 'Jafnt og',
|
|
85
|
-
|
|
86
|
-
headerFilterOperatorStartsWith: 'Byrjar
|
|
87
|
-
headerFilterOperatorEndsWith: 'Endar
|
|
85
|
+
headerFilterOperatorDoesNotEqual: 'Ekki jafnt og',
|
|
86
|
+
headerFilterOperatorStartsWith: 'Byrjar á',
|
|
87
|
+
headerFilterOperatorEndsWith: 'Endar á',
|
|
88
88
|
headerFilterOperatorIs: 'Er jafnt og',
|
|
89
89
|
headerFilterOperatorNot: 'Er ekki jafnt og',
|
|
90
90
|
headerFilterOperatorAfter: 'Eftir',
|
package/esm/material/index.js
CHANGED
|
@@ -170,6 +170,7 @@ const BaseSelect = forwardRef(function BaseSelect(props, ref) {
|
|
|
170
170
|
}, material))]
|
|
171
171
|
});
|
|
172
172
|
});
|
|
173
|
+
if (process.env.NODE_ENV !== "production") BaseSelect.displayName = "BaseSelect";
|
|
173
174
|
const StyledPagination = styled(MUIPagination)(({
|
|
174
175
|
theme
|
|
175
176
|
}) => ({
|
|
@@ -225,6 +226,7 @@ const BasePagination = forwardRef(function BasePagination(props, ref) {
|
|
|
225
226
|
ref: ref
|
|
226
227
|
}));
|
|
227
228
|
});
|
|
229
|
+
if (process.env.NODE_ENV !== "production") BasePagination.displayName = "BasePagination";
|
|
228
230
|
const BaseBadge = forwardRef(function BaseBadge(props, ref) {
|
|
229
231
|
const {
|
|
230
232
|
material
|
|
@@ -234,6 +236,7 @@ const BaseBadge = forwardRef(function BaseBadge(props, ref) {
|
|
|
234
236
|
ref: ref
|
|
235
237
|
}));
|
|
236
238
|
});
|
|
239
|
+
if (process.env.NODE_ENV !== "production") BaseBadge.displayName = "BaseBadge";
|
|
237
240
|
const BaseCheckbox = forwardRef(function BaseCheckbox(props, ref) {
|
|
238
241
|
const {
|
|
239
242
|
autoFocus,
|
|
@@ -278,6 +281,7 @@ const BaseCheckbox = forwardRef(function BaseCheckbox(props, ref) {
|
|
|
278
281
|
fullWidth: fullWidth
|
|
279
282
|
});
|
|
280
283
|
});
|
|
284
|
+
if (process.env.NODE_ENV !== "production") BaseCheckbox.displayName = "BaseCheckbox";
|
|
281
285
|
const BaseCircularProgress = forwardRef(function BaseCircularProgress(props, ref) {
|
|
282
286
|
const {
|
|
283
287
|
material
|
|
@@ -287,6 +291,7 @@ const BaseCircularProgress = forwardRef(function BaseCircularProgress(props, ref
|
|
|
287
291
|
ref: ref
|
|
288
292
|
}));
|
|
289
293
|
});
|
|
294
|
+
if (process.env.NODE_ENV !== "production") BaseCircularProgress.displayName = "BaseCircularProgress";
|
|
290
295
|
const BaseDivider = forwardRef(function BaseDivider(props, ref) {
|
|
291
296
|
const {
|
|
292
297
|
material
|
|
@@ -296,6 +301,7 @@ const BaseDivider = forwardRef(function BaseDivider(props, ref) {
|
|
|
296
301
|
ref: ref
|
|
297
302
|
}));
|
|
298
303
|
});
|
|
304
|
+
if (process.env.NODE_ENV !== "production") BaseDivider.displayName = "BaseDivider";
|
|
299
305
|
const BaseLinearProgress = forwardRef(function BaseLinearProgress(props, ref) {
|
|
300
306
|
const {
|
|
301
307
|
material
|
|
@@ -305,6 +311,7 @@ const BaseLinearProgress = forwardRef(function BaseLinearProgress(props, ref) {
|
|
|
305
311
|
ref: ref
|
|
306
312
|
}));
|
|
307
313
|
});
|
|
314
|
+
if (process.env.NODE_ENV !== "production") BaseLinearProgress.displayName = "BaseLinearProgress";
|
|
308
315
|
const BaseButton = forwardRef(function BaseButton(props, ref) {
|
|
309
316
|
const {
|
|
310
317
|
material
|
|
@@ -314,6 +321,7 @@ const BaseButton = forwardRef(function BaseButton(props, ref) {
|
|
|
314
321
|
ref: ref
|
|
315
322
|
}));
|
|
316
323
|
});
|
|
324
|
+
if (process.env.NODE_ENV !== "production") BaseButton.displayName = "BaseButton";
|
|
317
325
|
const BaseChip = forwardRef(function BaseChip(props, ref) {
|
|
318
326
|
const {
|
|
319
327
|
material
|
|
@@ -323,6 +331,7 @@ const BaseChip = forwardRef(function BaseChip(props, ref) {
|
|
|
323
331
|
ref: ref
|
|
324
332
|
}));
|
|
325
333
|
});
|
|
334
|
+
if (process.env.NODE_ENV !== "production") BaseChip.displayName = "BaseChip";
|
|
326
335
|
const BaseIconButton = forwardRef(function BaseIconButton(props, ref) {
|
|
327
336
|
const {
|
|
328
337
|
material
|
|
@@ -332,6 +341,7 @@ const BaseIconButton = forwardRef(function BaseIconButton(props, ref) {
|
|
|
332
341
|
ref: ref
|
|
333
342
|
}));
|
|
334
343
|
});
|
|
344
|
+
if (process.env.NODE_ENV !== "production") BaseIconButton.displayName = "BaseIconButton";
|
|
335
345
|
const BaseTooltip = forwardRef(function BaseTooltip(props, ref) {
|
|
336
346
|
const {
|
|
337
347
|
material
|
|
@@ -341,6 +351,7 @@ const BaseTooltip = forwardRef(function BaseTooltip(props, ref) {
|
|
|
341
351
|
ref: ref
|
|
342
352
|
}));
|
|
343
353
|
});
|
|
354
|
+
if (process.env.NODE_ENV !== "production") BaseTooltip.displayName = "BaseTooltip";
|
|
344
355
|
const BaseSkeleton = forwardRef(function BaseSkeleton(props, ref) {
|
|
345
356
|
const {
|
|
346
357
|
material
|
|
@@ -350,6 +361,7 @@ const BaseSkeleton = forwardRef(function BaseSkeleton(props, ref) {
|
|
|
350
361
|
ref: ref
|
|
351
362
|
}));
|
|
352
363
|
});
|
|
364
|
+
if (process.env.NODE_ENV !== "production") BaseSkeleton.displayName = "BaseSkeleton";
|
|
353
365
|
const BaseSwitch = forwardRef(function BaseSwitch(props, ref) {
|
|
354
366
|
const {
|
|
355
367
|
material,
|
|
@@ -371,6 +383,7 @@ const BaseSwitch = forwardRef(function BaseSwitch(props, ref) {
|
|
|
371
383
|
label: label
|
|
372
384
|
});
|
|
373
385
|
});
|
|
386
|
+
if (process.env.NODE_ENV !== "production") BaseSwitch.displayName = "BaseSwitch";
|
|
374
387
|
const BaseMenuList = forwardRef(function BaseMenuList(props, ref) {
|
|
375
388
|
const {
|
|
376
389
|
material
|
|
@@ -380,6 +393,7 @@ const BaseMenuList = forwardRef(function BaseMenuList(props, ref) {
|
|
|
380
393
|
ref: ref
|
|
381
394
|
}));
|
|
382
395
|
});
|
|
396
|
+
if (process.env.NODE_ENV !== "production") BaseMenuList.displayName = "BaseMenuList";
|
|
383
397
|
function BaseMenuItem(props) {
|
|
384
398
|
const {
|
|
385
399
|
inert,
|
|
@@ -93,5 +93,10 @@ function removeOpacity(color) {
|
|
|
93
93
|
return setOpacity(color, 1);
|
|
94
94
|
}
|
|
95
95
|
function formatFont(font) {
|
|
96
|
+
// Accounts for disabled typography variants
|
|
97
|
+
// See: https://github.com/mui/mui-x/issues/17812
|
|
98
|
+
if (!font) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
96
101
|
return `${font.fontWeight} ${font.fontSize} / ${font.lineHeight} ${font.fontFamily}`;
|
|
97
102
|
}
|
|
@@ -195,6 +195,15 @@ export interface GridColumnHeaderEventLookup {
|
|
|
195
195
|
params: GridColumnHeaderParams;
|
|
196
196
|
event: React.DragEvent<HTMLElement>;
|
|
197
197
|
};
|
|
198
|
+
/**
|
|
199
|
+
* Fired when the dragging of a column header ends.
|
|
200
|
+
* Same as `columnHeaderDragEnd`, but also fires when the DOM element is unmounted.
|
|
201
|
+
* @ignore - do not document.
|
|
202
|
+
*/
|
|
203
|
+
columnHeaderDragEndNative: {
|
|
204
|
+
params: GridColumnHeaderParams;
|
|
205
|
+
event: DragEvent;
|
|
206
|
+
};
|
|
198
207
|
/**
|
|
199
208
|
* Fired when a `dblclick` DOM event happens in the column header separator.
|
|
200
209
|
* @ignore - do not document.
|
|
@@ -841,6 +841,13 @@ export interface DataGridProSharedPropsWithDefaultValue {
|
|
|
841
841
|
* @default false
|
|
842
842
|
*/
|
|
843
843
|
listView: boolean;
|
|
844
|
+
/**
|
|
845
|
+
* If set to "always", the multi-sorting is applied without modifier key.
|
|
846
|
+
* Otherwise, the modifier key is required for multi-sorting to be applied.
|
|
847
|
+
* @see See https://mui.com/x/react-data-grid/sorting/#multi-sorting
|
|
848
|
+
* @default "withModifierKey"
|
|
849
|
+
*/
|
|
850
|
+
multipleColumnsSortingMode: 'withModifierKey' | 'always';
|
|
844
851
|
}
|
|
845
852
|
export interface DataGridProSharedPropsWithoutDefaultValue<R extends GridValidRowModel = any> {
|
|
846
853
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
2
2
|
import type { DataGridProcessedProps } from "../models/props/DataGridProps.js";
|
|
3
3
|
export declare function composeGridClasses(classes: DataGridProcessedProps['classes'], slots: Parameters<typeof composeClasses>[0]): Record<string, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
2
2
|
import { getDataGridUtilityClass } from "../constants/gridClasses.js";
|
|
3
3
|
export function composeGridClasses(classes, slots) {
|
|
4
4
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
package/esm/utils/css/context.js
CHANGED
|
@@ -9,6 +9,7 @@ const CSSVariablesContext = /*#__PURE__*/React.createContext({
|
|
|
9
9
|
href: "/unset"
|
|
10
10
|
})
|
|
11
11
|
});
|
|
12
|
+
if (process.env.NODE_ENV !== "production") CSSVariablesContext.displayName = "CSSVariablesContext";
|
|
12
13
|
export function useCSSVariablesClass() {
|
|
13
14
|
return React.useContext(CSSVariablesContext).className;
|
|
14
15
|
}
|
|
@@ -49,7 +50,7 @@ export function GridCSSVariablesContext(props) {
|
|
|
49
50
|
function variablesToString(variables) {
|
|
50
51
|
let output = '';
|
|
51
52
|
for (const key in variables) {
|
|
52
|
-
if (Object.hasOwn(variables, key)) {
|
|
53
|
+
if (Object.hasOwn(variables, key) && variables[key] !== undefined) {
|
|
53
54
|
output += `${key}:${variables[key]};`;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
@@ -83,7 +83,7 @@ const useGridColumnHeaders = props => {
|
|
|
83
83
|
(0, _useGridEvent.useGridEvent)(apiRef, 'columnResizeStart', handleColumnResizeStart);
|
|
84
84
|
(0, _useGridEvent.useGridEvent)(apiRef, 'columnResizeStop', handleColumnResizeStop);
|
|
85
85
|
(0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderDragStart', handleColumnReorderStart);
|
|
86
|
-
(0, _useGridEvent.useGridEvent)(apiRef, '
|
|
86
|
+
(0, _useGridEvent.useGridEvent)(apiRef, 'columnHeaderDragEndNative', handleColumnReorderStop);
|
|
87
87
|
|
|
88
88
|
// Helper for computation common between getColumnHeaders and getColumnGroupHeaders
|
|
89
89
|
const getColumnsToRender = params => {
|
|
@@ -121,6 +121,7 @@ const useGridColumnHeaders = props => {
|
|
|
121
121
|
})]
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
+
if (process.env.NODE_ENV !== "production") getFillers.displayName = "getFillers";
|
|
124
125
|
const getColumnHeaders = (params, other = {}) => {
|
|
125
126
|
const {
|
|
126
127
|
renderedColumns,
|
|
@@ -189,6 +190,7 @@ const useGridColumnHeaders = props => {
|
|
|
189
190
|
})]
|
|
190
191
|
});
|
|
191
192
|
};
|
|
193
|
+
if (process.env.NODE_ENV !== "production") getColumnHeadersRow.displayName = "getColumnHeadersRow";
|
|
192
194
|
const getColumnGroupHeaders = ({
|
|
193
195
|
depth,
|
|
194
196
|
params
|
|
@@ -48,6 +48,15 @@ export declare const gridVisibleColumnFieldsSelector: import("@mui/x-data-grid")
|
|
|
48
48
|
* @category Visible Columns
|
|
49
49
|
*/
|
|
50
50
|
export declare const gridPinnedColumnsSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridPinnedColumnFields>;
|
|
51
|
+
/**
|
|
52
|
+
* Get all existing pinned columns. Place the columns on the side that depends on the rtl state.
|
|
53
|
+
* @category Pinned Columns
|
|
54
|
+
* @ignore - Do not document
|
|
55
|
+
*/
|
|
56
|
+
export declare const gridExistingPinnedColumnSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, boolean, {
|
|
57
|
+
left: string[];
|
|
58
|
+
right: string[];
|
|
59
|
+
}>;
|
|
51
60
|
/**
|
|
52
61
|
* Get the visible pinned columns.
|
|
53
62
|
* @category Visible Columns
|