@mui/x-data-grid 8.6.0 → 8.8.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 +202 -1
- package/components/GridScrollArea.d.ts +1 -1
- package/components/GridScrollArea.js +134 -28
- package/components/cell/GridActionsCell.js +1 -0
- package/components/cell/GridCell.js +1 -0
- package/components/cell/GridEditBooleanCell.js +1 -0
- package/components/cell/GridEditDateCell.js +1 -0
- package/components/cell/GridEditInputCell.js +1 -0
- package/components/cell/GridEditSingleSelectCell.js +1 -0
- package/components/columnHeaders/GridColumnGroupHeader.js +1 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +1 -0
- package/components/columnHeaders/GridColumnHeaderTitle.js +1 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -0
- package/components/columnSelection/GridCellCheckboxRenderer.js +1 -0
- package/components/columnSelection/GridHeaderCheckbox.js +1 -0
- package/components/columnsManagement/GridColumnsManagement.js +2 -2
- package/components/containers/GridRootStyles.js +2 -5
- package/components/menu/GridMenu.js +1 -0
- package/components/panel/GridPanel.js +1 -0
- package/components/panel/GridPanelContext.js +1 -0
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -0
- package/components/panel/filterPanel/GridFilterInputDate.js +1 -0
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -0
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -0
- package/components/panel/filterPanel/GridFilterPanel.js +1 -0
- package/components/quickFilter/QuickFilter.js +1 -0
- package/components/quickFilter/QuickFilterContext.js +1 -0
- package/components/toolbar/GridToolbarDensitySelector.js +1 -0
- package/components/toolbar/GridToolbarExportContainer.js +1 -0
- package/components/toolbarV8/GridToolbar.js +1 -0
- package/components/toolbarV8/Toolbar.js +1 -0
- package/components/toolbarV8/ToolbarButton.js +1 -0
- package/components/toolbarV8/ToolbarContext.js +1 -0
- package/components/virtualization/GridVirtualScrollbar.js +1 -0
- package/components/virtualization/GridVirtualScroller.js +4 -0
- package/constants/gridClasses.d.ts +8 -0
- package/constants/gridClasses.js +1 -1
- package/esm/components/GridScrollArea.d.ts +1 -1
- package/esm/components/GridScrollArea.js +134 -28
- package/esm/components/cell/GridActionsCell.js +2 -0
- package/esm/components/cell/GridCell.js +2 -0
- package/esm/components/cell/GridEditBooleanCell.js +2 -0
- package/esm/components/cell/GridEditDateCell.js +2 -0
- package/esm/components/cell/GridEditInputCell.js +2 -0
- package/esm/components/cell/GridEditSingleSelectCell.js +2 -0
- package/esm/components/columnHeaders/GridColumnGroupHeader.js +2 -0
- package/esm/components/columnHeaders/GridColumnHeaderItem.js +2 -0
- package/esm/components/columnHeaders/GridColumnHeaderTitle.js +2 -0
- package/esm/components/columnHeaders/GridGenericColumnHeaderItem.js +2 -0
- package/esm/components/columnSelection/GridCellCheckboxRenderer.js +2 -0
- package/esm/components/columnSelection/GridHeaderCheckbox.js +2 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +3 -1
- package/esm/components/containers/GridRootStyles.js +2 -5
- package/esm/components/menu/GridMenu.js +2 -0
- package/esm/components/panel/GridPanel.js +2 -0
- package/esm/components/panel/GridPanelContext.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputBoolean.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputDate.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +2 -0
- package/esm/components/panel/filterPanel/GridFilterPanel.js +2 -0
- package/esm/components/quickFilter/QuickFilter.js +2 -0
- package/esm/components/quickFilter/QuickFilterContext.js +2 -0
- package/esm/components/toolbar/GridToolbarDensitySelector.js +2 -0
- package/esm/components/toolbar/GridToolbarExportContainer.js +2 -0
- package/esm/components/toolbarV8/GridToolbar.js +2 -0
- package/esm/components/toolbarV8/Toolbar.js +2 -0
- package/esm/components/toolbarV8/ToolbarButton.js +2 -0
- package/esm/components/toolbarV8/ToolbarContext.js +2 -0
- package/esm/components/virtualization/GridVirtualScrollbar.js +2 -0
- package/esm/components/virtualization/GridVirtualScroller.js +4 -0
- package/esm/constants/gridClasses.d.ts +8 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +2 -0
- package/esm/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +2 -0
- package/esm/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +2 -0
- package/esm/hooks/core/useGridApiInitialization.js +2 -0
- package/esm/hooks/core/useGridIsRtl.js +2 -0
- package/esm/hooks/core/useGridProps.js +2 -0
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +2 -0
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -0
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -0
- package/esm/hooks/features/columns/useGridColumns.js +23 -3
- package/esm/hooks/features/dataSource/useGridDataSource.js +2 -0
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +5 -0
- package/esm/hooks/features/dataSource/utils.js +3 -0
- package/esm/hooks/features/density/useGridDensity.js +2 -0
- package/esm/hooks/features/dimensions/useGridDimensions.js +2 -0
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -0
- package/esm/hooks/features/editing/useGridEditing.js +2 -0
- package/esm/hooks/features/editing/useGridRowEditing.js +2 -0
- package/esm/hooks/features/export/useGridPrintExport.js +2 -0
- package/esm/hooks/features/focus/useGridFocus.js +2 -0
- package/esm/hooks/features/headerFiltering/useGridHeaderFiltering.js +2 -0
- package/esm/hooks/features/listView/useGridListView.js +2 -0
- package/esm/hooks/features/pagination/useGridPaginationMeta.js +2 -0
- package/esm/hooks/features/pagination/useGridPaginationModel.js +2 -0
- package/esm/hooks/features/pagination/useGridRowCount.js +2 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +2 -0
- package/esm/hooks/features/rows/useGridRowSpanning.js +2 -0
- package/esm/hooks/features/rows/useGridRows.js +2 -0
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +2 -0
- package/esm/hooks/features/virtualization/useGridVirtualization.js +2 -0
- package/esm/hooks/utils/useGridEvent.js +2 -0
- package/esm/hooks/utils/useGridPrivateApiContext.js +2 -0
- package/esm/hooks/utils/useGridSelector.js +6 -0
- package/esm/index.js +1 -1
- package/esm/internals/demo/TailwindDemoContainer.js +2 -0
- package/esm/internals/utils/cache.d.ts +9 -0
- package/esm/internals/utils/cache.js +19 -0
- package/esm/internals/utils/index.d.ts +2 -1
- package/esm/internals/utils/index.js +2 -1
- package/esm/locales/daDK.js +1 -1
- package/esm/locales/idID.d.ts +4 -0
- package/esm/locales/idID.js +261 -0
- package/esm/locales/index.d.ts +2 -1
- package/esm/locales/index.js +2 -1
- package/esm/utils/css/context.js +2 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -0
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +1 -0
- package/hooks/core/useGridApiInitialization.js +1 -0
- package/hooks/core/useGridIsRtl.js +1 -0
- package/hooks/core/useGridProps.js +1 -0
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +1 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -0
- package/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/hooks/features/columns/useGridColumns.js +22 -3
- package/hooks/features/dataSource/useGridDataSource.js +1 -0
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +4 -0
- package/hooks/features/dataSource/utils.js +3 -0
- package/hooks/features/density/useGridDensity.js +1 -0
- package/hooks/features/dimensions/useGridDimensions.js +1 -0
- package/hooks/features/editing/useGridCellEditing.js +1 -0
- package/hooks/features/editing/useGridEditing.js +1 -0
- package/hooks/features/editing/useGridRowEditing.js +1 -0
- package/hooks/features/export/useGridPrintExport.js +1 -0
- package/hooks/features/focus/useGridFocus.js +1 -0
- package/hooks/features/headerFiltering/useGridHeaderFiltering.js +1 -0
- package/hooks/features/listView/useGridListView.js +1 -0
- package/hooks/features/pagination/useGridPaginationMeta.js +1 -0
- package/hooks/features/pagination/useGridPaginationModel.js +1 -0
- package/hooks/features/pagination/useGridRowCount.js +1 -0
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -0
- package/hooks/features/rows/useGridRowSpanning.js +1 -0
- package/hooks/features/rows/useGridRows.js +1 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +1 -0
- package/hooks/features/virtualization/useGridVirtualization.js +1 -0
- package/hooks/utils/useGridEvent.js +1 -0
- package/hooks/utils/useGridPrivateApiContext.js +1 -0
- package/hooks/utils/useGridSelector.js +5 -0
- package/index.js +1 -1
- package/internals/demo/TailwindDemoContainer.js +1 -0
- package/internals/utils/cache.d.ts +9 -0
- package/internals/utils/cache.js +26 -0
- package/internals/utils/index.d.ts +2 -1
- package/internals/utils/index.js +11 -0
- package/locales/daDK.js +1 -1
- package/locales/idID.d.ts +4 -0
- package/locales/idID.js +267 -0
- package/locales/index.d.ts +2 -1
- package/locales/index.js +11 -0
- package/package.json +3 -3
- package/utils/css/context.js +1 -0
|
@@ -639,6 +639,14 @@ export interface GridClasses {
|
|
|
639
639
|
* Styles applied to the right scroll area element.
|
|
640
640
|
*/
|
|
641
641
|
'scrollArea--right': string;
|
|
642
|
+
/**
|
|
643
|
+
* Styles applied to the top scroll area element.
|
|
644
|
+
*/
|
|
645
|
+
'scrollArea--up': string;
|
|
646
|
+
/**
|
|
647
|
+
* Styles applied to the bottom scroll area element.
|
|
648
|
+
*/
|
|
649
|
+
'scrollArea--down': string;
|
|
642
650
|
/**
|
|
643
651
|
* Styles applied to the scrollbars.
|
|
644
652
|
*/
|
|
@@ -3,4 +3,4 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
|
3
3
|
export function getDataGridUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
5
5
|
}
|
|
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']);
|
|
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--up', 'scrollArea--down', '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']);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
@@ -205,9 +207,9 @@ export function useGridColumns(apiRef, props) {
|
|
|
205
207
|
});
|
|
206
208
|
}, [apiRef, props.columnVisibilityModel, props.initialState?.columns]);
|
|
207
209
|
const stateRestorePreProcessing = React.useCallback((params, context) => {
|
|
208
|
-
const columnVisibilityModelToImport = context.stateToRestore.columns?.columnVisibilityModel;
|
|
209
210
|
const initialState = context.stateToRestore.columns;
|
|
210
|
-
|
|
211
|
+
const columnVisibilityModelToImport = initialState?.columnVisibilityModel;
|
|
212
|
+
if (initialState == null) {
|
|
211
213
|
return params;
|
|
212
214
|
}
|
|
213
215
|
const columnsState = createColumnsState({
|
|
@@ -217,7 +219,25 @@ export function useGridColumns(apiRef, props) {
|
|
|
217
219
|
columnVisibilityModel: columnVisibilityModelToImport,
|
|
218
220
|
keepOnlyColumnsToUpsert: false
|
|
219
221
|
});
|
|
220
|
-
|
|
222
|
+
if (initialState != null) {
|
|
223
|
+
apiRef.current.setState(prevState => _extends({}, prevState, {
|
|
224
|
+
columns: _extends({}, prevState.columns, {
|
|
225
|
+
lookup: columnsState.lookup,
|
|
226
|
+
orderedFields: columnsState.orderedFields,
|
|
227
|
+
initialColumnVisibilityModel: columnsState.initialColumnVisibilityModel
|
|
228
|
+
})
|
|
229
|
+
}));
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// separate column visibility model state update as it can be controlled
|
|
233
|
+
// https://github.com/mui/mui-x/issues/17681#issuecomment-3012528602
|
|
234
|
+
if (columnVisibilityModelToImport != null) {
|
|
235
|
+
apiRef.current.setState(prevState => _extends({}, prevState, {
|
|
236
|
+
columns: _extends({}, prevState.columns, {
|
|
237
|
+
columnVisibilityModel: columnVisibilityModelToImport
|
|
238
|
+
})
|
|
239
|
+
}));
|
|
240
|
+
}
|
|
221
241
|
if (initialState != null) {
|
|
222
242
|
apiRef.current.publishEvent('columnsChange', columnsState.orderedFields);
|
|
223
243
|
}
|
|
@@ -6,7 +6,7 @@ import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommuni
|
|
|
6
6
|
import type { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
7
7
|
import type { GridStrategyProcessor } from "../../core/strategyProcessing/index.js";
|
|
8
8
|
import type { GridEventListener } from "../../../models/events/index.js";
|
|
9
|
-
export declare const useGridDataSourceBase: <Api extends GridPrivateApiCommunity>(apiRef: RefObject<Api>, props: Pick<DataGridProcessedProps, "dataSource" | "dataSourceCache" | "onDataSourceError" | "pageSizeOptions" | "signature">, options?: GridDataSourceBaseOptions) => {
|
|
9
|
+
export declare const useGridDataSourceBase: <Api extends GridPrivateApiCommunity>(apiRef: RefObject<Api>, props: Pick<DataGridProcessedProps, "dataSource" | "dataSourceCache" | "onDataSourceError" | "pageSizeOptions" | "pagination" | "signature">, options?: GridDataSourceBaseOptions) => {
|
|
10
10
|
api: {
|
|
11
11
|
public: GridDataSourceApi;
|
|
12
12
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import useLazyRef from '@mui/utils/useLazyRef';
|
|
@@ -33,6 +35,9 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
33
35
|
const lastRequestId = React.useRef(0);
|
|
34
36
|
const onDataSourceErrorProp = props.onDataSourceError;
|
|
35
37
|
const cacheChunkManager = useLazyRef(() => {
|
|
38
|
+
if (!props.pagination) {
|
|
39
|
+
return new CacheChunkManager(paginationModel.pageSize);
|
|
40
|
+
}
|
|
36
41
|
const sortedPageSizeOptions = props.pageSizeOptions.map(option => typeof option === 'number' ? option : option.value).sort((a, b) => a - b);
|
|
37
42
|
const cacheChunkSize = Math.min(paginationModel.pageSize, sortedPageSizeOptions[0]);
|
|
38
43
|
return new CacheChunkManager(cacheChunkSize);
|
|
@@ -37,6 +37,9 @@ export class CacheChunkManager {
|
|
|
37
37
|
};
|
|
38
38
|
this.splitResponse = (key, response) => {
|
|
39
39
|
const cacheKeys = this.getCacheKeys(key);
|
|
40
|
+
if (cacheKeys.length === 1) {
|
|
41
|
+
return new Map([[key, response]]);
|
|
42
|
+
}
|
|
40
43
|
const responses = new Map();
|
|
41
44
|
cacheKeys.forEach(chunkKey => {
|
|
42
45
|
const isLastChunk = chunkKey.end === key.end;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { TimerBasedCleanupTracking } from "../../utils/cleanupTracking/TimerBasedCleanupTracking.js";
|
|
3
5
|
import { FinalizationRegistryBasedCleanupTracking } from "../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { fastObjectShallowCompare } from '@mui/x-internals/fastObjectShallowCompare';
|
|
3
5
|
import { warnOnce } from '@mui/x-internals/warning';
|
|
@@ -67,6 +69,10 @@ export function useGridSelector(apiRef, selector, args = undefined, equals = def
|
|
|
67
69
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
70
|
EMPTY);
|
|
69
71
|
const unsubscribe = React.useCallback(() => {
|
|
72
|
+
// Fixes issue in React Strict Mode, where getSnapshot is not called
|
|
73
|
+
if (!refs.current.subscription) {
|
|
74
|
+
subscribe();
|
|
75
|
+
}
|
|
70
76
|
return () => {
|
|
71
77
|
if (refs.current.subscription) {
|
|
72
78
|
refs.current.subscription();
|
package/esm/index.js
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GridGetRowsParams, GridGetRowsResponse } from "../../models/gridDataSource.js";
|
|
2
|
+
export declare class TestCache {
|
|
3
|
+
private cache;
|
|
4
|
+
constructor();
|
|
5
|
+
set(key: GridGetRowsParams, value: GridGetRowsResponse): void;
|
|
6
|
+
get(key: GridGetRowsParams): GridGetRowsResponse | undefined;
|
|
7
|
+
size(): number;
|
|
8
|
+
clear(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getKeyDefault } from "../../hooks/features/dataSource/cache.js";
|
|
2
|
+
export class TestCache {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.cache = void 0;
|
|
5
|
+
this.cache = new Map();
|
|
6
|
+
}
|
|
7
|
+
set(key, value) {
|
|
8
|
+
this.cache.set(getKeyDefault(key), value);
|
|
9
|
+
}
|
|
10
|
+
get(key) {
|
|
11
|
+
return this.cache.get(getKeyDefault(key));
|
|
12
|
+
}
|
|
13
|
+
size() {
|
|
14
|
+
return this.cache.size;
|
|
15
|
+
}
|
|
16
|
+
clear() {
|
|
17
|
+
this.cache.clear();
|
|
18
|
+
}
|
|
19
|
+
}
|
package/esm/locales/daDK.js
CHANGED
|
@@ -41,7 +41,7 @@ const daDKGrid = {
|
|
|
41
41
|
// Columns management text
|
|
42
42
|
columnsManagementSearchTitle: 'Søg',
|
|
43
43
|
columnsManagementNoColumns: 'Ingen søjler',
|
|
44
|
-
columnsManagementShowHideAllText: 'Vis/Skjul
|
|
44
|
+
columnsManagementShowHideAllText: 'Vis/Skjul alle',
|
|
45
45
|
columnsManagementReset: 'Nulstil',
|
|
46
46
|
// columnsManagementDeleteIconLabel: 'Clear',
|
|
47
47
|
|