@mui/x-data-grid 9.6.0 → 9.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 +241 -2
- package/DataGrid/DataGrid.js +2 -2
- package/DataGrid/DataGrid.mjs +2 -2
- package/colDef/gridDateOperators.d.mts +1 -1
- package/colDef/gridDateOperators.d.ts +1 -1
- package/components/GridColumnHeaders.d.mts +1 -1
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridFooter.d.mts +1 -1
- package/components/GridFooter.d.ts +1 -1
- package/components/GridLoadingOverlay.d.mts +1 -1
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridNoColumnsOverlay.d.mts +1 -1
- package/components/GridNoColumnsOverlay.d.ts +1 -1
- package/components/GridNoResultsOverlay.d.mts +1 -1
- package/components/GridNoResultsOverlay.d.ts +1 -1
- package/components/GridNoRowsOverlay.d.mts +1 -1
- package/components/GridNoRowsOverlay.d.ts +1 -1
- package/components/GridRowCount.d.mts +1 -1
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridSelectedRowCount.d.mts +1 -1
- package/components/GridSelectedRowCount.d.ts +1 -1
- package/components/cell/GridActionsCell.d.mts +1 -1
- package/components/cell/GridActionsCell.d.ts +1 -1
- package/components/cell/GridCell.d.mts +1 -1
- package/components/cell/GridCell.d.ts +1 -1
- package/components/cell/GridCell.js +2 -10
- package/components/cell/GridCell.mjs +2 -10
- package/components/cell/GridFooterCell.d.mts +1 -1
- package/components/cell/GridFooterCell.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.mts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridColumnGroupHeader.js +2 -10
- package/components/columnHeaders/GridColumnGroupHeader.mjs +2 -10
- package/components/columnHeaders/GridColumnHeaderItem.js +2 -10
- package/components/columnHeaders/GridColumnHeaderItem.mjs +2 -10
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.mts +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.mts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.d.mts +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.d.ts +1 -1
- package/components/columnsPanel/ColumnsPanelTrigger.js +2 -2
- package/components/columnsPanel/ColumnsPanelTrigger.mjs +2 -2
- package/components/containers/GridFooterContainer.d.mts +1 -1
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridOverlay.d.mts +1 -1
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridToolbarContainer.d.mts +1 -1
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/export/ExportCsv.d.mts +1 -1
- package/components/export/ExportCsv.d.ts +1 -1
- package/components/export/ExportPrint.d.mts +1 -1
- package/components/export/ExportPrint.d.ts +1 -1
- package/components/filterPanel/FilterPanelTrigger.d.mts +1 -1
- package/components/filterPanel/FilterPanelTrigger.d.ts +1 -1
- package/components/filterPanel/FilterPanelTrigger.js +2 -2
- package/components/filterPanel/FilterPanelTrigger.mjs +2 -2
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.mts +1 -1
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/components/panel/GridColumnsPanel.d.mts +1 -1
- package/components/panel/GridColumnsPanel.d.ts +1 -1
- package/components/panel/GridPanelContent.d.mts +1 -1
- package/components/panel/GridPanelContent.d.ts +1 -1
- package/components/panel/GridPanelContext.d.mts +9 -3
- package/components/panel/GridPanelContext.d.ts +9 -3
- package/components/panel/GridPanelContext.js +40 -7
- package/components/panel/GridPanelContext.mjs +40 -7
- package/components/panel/GridPanelFooter.d.mts +1 -1
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelHeader.d.mts +1 -1
- package/components/panel/GridPanelHeader.d.ts +1 -1
- package/components/panel/GridPanelWrapper.d.mts +1 -1
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPreferencesPanel.js +4 -6
- package/components/panel/GridPreferencesPanel.mjs +4 -6
- package/components/panel/filterPanel/GridFilterForm.d.mts +2 -1
- package/components/panel/filterPanel/GridFilterForm.d.ts +2 -1
- package/components/panel/filterPanel/GridFilterPanel.d.mts +2 -2
- package/components/panel/filterPanel/GridFilterPanel.d.ts +2 -2
- package/components/quickFilter/QuickFilter.d.mts +2 -2
- package/components/quickFilter/QuickFilter.d.ts +2 -2
- package/components/quickFilter/QuickFilterClear.d.mts +2 -2
- package/components/quickFilter/QuickFilterClear.d.ts +2 -2
- package/components/quickFilter/QuickFilterControl.d.mts +2 -2
- package/components/quickFilter/QuickFilterControl.d.ts +2 -2
- package/components/quickFilter/QuickFilterTrigger.d.mts +2 -2
- package/components/quickFilter/QuickFilterTrigger.d.ts +2 -2
- package/components/toolbar/GridToolbar.d.mts +3 -3
- package/components/toolbar/GridToolbar.d.ts +3 -3
- package/components/toolbar/GridToolbarColumnsButton.js +2 -2
- package/components/toolbar/GridToolbarColumnsButton.mjs +2 -2
- package/components/toolbar/GridToolbarFilterButton.js +2 -2
- package/components/toolbar/GridToolbarFilterButton.mjs +2 -2
- package/components/toolbarV8/Toolbar.d.mts +1 -1
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/toolbarV8/ToolbarButton.d.mts +1 -1
- package/components/toolbarV8/ToolbarButton.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerContent.d.mts +1 -1
- package/components/virtualization/GridVirtualScrollerContent.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.mts +1 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +1 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +7 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.mjs +7 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.mts +1 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.mts +2 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -1
- package/hooks/features/columnResize/useGridColumnResize.js +56 -2
- package/hooks/features/columnResize/useGridColumnResize.mjs +57 -3
- package/hooks/features/columns/gridColumnsSelector.d.mts +1 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +3 -3
- package/hooks/features/dimensions/useGridDimensions.mjs +3 -3
- package/hooks/features/editing/gridEditingSelectors.d.mts +1 -1
- package/hooks/features/editing/gridEditingSelectors.d.ts +1 -1
- package/hooks/features/editing/gridEditingSelectors.mjs +0 -1
- package/hooks/features/editing/useGridCellEditing.js +14 -7
- package/hooks/features/editing/useGridCellEditing.mjs +14 -7
- package/hooks/features/editing/utils.d.mts +1 -1
- package/hooks/features/editing/utils.d.ts +1 -1
- package/hooks/features/editing/utils.js +1 -1
- package/hooks/features/editing/utils.mjs +1 -1
- package/hooks/features/filter/gridFilterState.d.mts +1 -1
- package/hooks/features/filter/gridFilterState.d.ts +1 -1
- package/hooks/features/filter/gridFilterUtils.d.mts +2 -2
- package/hooks/features/filter/gridFilterUtils.d.ts +2 -2
- package/hooks/features/focus/useGridFocus.js +2 -10
- package/hooks/features/focus/useGridFocus.mjs +2 -10
- package/hooks/features/rowSelection/useGridRowSelection.js +0 -3
- package/hooks/features/rowSelection/useGridRowSelection.mjs +0 -3
- package/hooks/features/rows/gridRowSpanningUtils.d.mts +1 -1
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowSpanningUtils.js +1 -1
- package/hooks/features/rows/gridRowSpanningUtils.mjs +1 -1
- package/hooks/features/rows/gridRowsUtils.d.mts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.js +6 -4
- package/hooks/features/rows/gridRowsUtils.mjs +6 -4
- package/hooks/features/virtualization/useGridVirtualization.d.mts +1 -1
- package/hooks/features/virtualization/useGridVirtualization.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualization.js +2 -2
- package/hooks/features/virtualization/useGridVirtualization.mjs +2 -2
- package/hooks/utils/useGridEvent.js +1 -1
- package/hooks/utils/useGridEvent.mjs +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/locales/arSD.d.mts +1 -1
- package/locales/arSD.d.ts +1 -1
- package/locales/beBY.d.mts +1 -1
- package/locales/beBY.d.ts +1 -1
- package/locales/bgBG.d.mts +1 -1
- package/locales/bgBG.d.ts +1 -1
- package/locales/bnBD.d.mts +1 -1
- package/locales/bnBD.d.ts +1 -1
- package/locales/caES.d.mts +1 -1
- package/locales/caES.d.ts +1 -1
- package/locales/csCZ.d.mts +1 -1
- package/locales/csCZ.d.ts +1 -1
- package/locales/daDK.d.mts +1 -1
- package/locales/daDK.d.ts +1 -1
- package/locales/deDE.d.mts +1 -1
- package/locales/deDE.d.ts +1 -1
- package/locales/elGR.d.mts +1 -1
- package/locales/elGR.d.ts +1 -1
- package/locales/enUS.d.mts +1 -1
- package/locales/enUS.d.ts +1 -1
- package/locales/esES.d.mts +1 -1
- package/locales/esES.d.ts +1 -1
- package/locales/faIR.d.mts +1 -1
- package/locales/faIR.d.ts +1 -1
- package/locales/fiFI.d.mts +1 -1
- package/locales/fiFI.d.ts +1 -1
- package/locales/frFR.d.mts +1 -1
- package/locales/frFR.d.ts +1 -1
- package/locales/heIL.d.mts +1 -1
- package/locales/heIL.d.ts +1 -1
- package/locales/huHU.d.mts +1 -1
- package/locales/huHU.d.ts +1 -1
- package/locales/hyAM.d.mts +1 -1
- package/locales/hyAM.d.ts +1 -1
- package/locales/idID.d.mts +1 -1
- package/locales/idID.d.ts +1 -1
- package/locales/isIS.d.mts +1 -1
- package/locales/isIS.d.ts +1 -1
- package/locales/itIT.d.mts +1 -1
- package/locales/itIT.d.ts +1 -1
- package/locales/jaJP.d.mts +1 -1
- package/locales/jaJP.d.ts +1 -1
- package/locales/jaJP.js +4 -5
- package/locales/jaJP.mjs +4 -5
- package/locales/koKR.d.mts +1 -1
- package/locales/koKR.d.ts +1 -1
- package/locales/nbNO.d.mts +1 -1
- package/locales/nbNO.d.ts +1 -1
- package/locales/nlNL.d.mts +1 -1
- package/locales/nlNL.d.ts +1 -1
- package/locales/nnNO.d.mts +1 -1
- package/locales/nnNO.d.ts +1 -1
- package/locales/plPL.d.mts +1 -1
- package/locales/plPL.d.ts +1 -1
- package/locales/ptBR.d.mts +1 -1
- package/locales/ptBR.d.ts +1 -1
- package/locales/ptPT.d.mts +1 -1
- package/locales/ptPT.d.ts +1 -1
- package/locales/roRO.d.mts +1 -1
- package/locales/roRO.d.ts +1 -1
- package/locales/ruRU.d.mts +1 -1
- package/locales/ruRU.d.ts +1 -1
- package/locales/skSK.d.mts +1 -1
- package/locales/skSK.d.ts +1 -1
- package/locales/svSE.d.mts +1 -1
- package/locales/svSE.d.ts +1 -1
- package/locales/thTH.d.mts +1 -1
- package/locales/thTH.d.ts +1 -1
- package/locales/trTR.d.mts +1 -1
- package/locales/trTR.d.ts +1 -1
- package/locales/ukUA.d.mts +1 -1
- package/locales/ukUA.d.ts +1 -1
- package/locales/urPK.d.mts +1 -1
- package/locales/urPK.d.ts +1 -1
- package/locales/viVN.d.mts +1 -1
- package/locales/viVN.d.ts +1 -1
- package/locales/zhCN.d.mts +1 -1
- package/locales/zhCN.d.ts +1 -1
- package/locales/zhTW.d.mts +1 -1
- package/locales/zhTW.d.ts +1 -1
- package/material/variables.d.mts +1 -1
- package/material/variables.d.ts +1 -1
- package/package.json +5 -4
- package/utils/createSelector.d.mts +1 -1
- package/utils/createSelector.d.ts +1 -1
- package/utils/focusElement.d.mts +9 -0
- package/utils/focusElement.d.ts +9 -0
- package/utils/focusElement.js +24 -0
- package/utils/focusElement.mjs +19 -0
- package/utils/isJSDOM.d.mts +0 -1
- package/utils/isJSDOM.d.ts +0 -1
- package/utils/isJSDOM.js +0 -7
- package/utils/isJSDOM.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { GridColDef } from "../../../models/colDef/gridColDef.js";
|
|
2
|
-
export declare const getDefaultCellValue: (colDef: GridColDef) => false | "" |
|
|
2
|
+
export declare const getDefaultCellValue: (colDef: GridColDef) => false | "" | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridFilterItem } from "../../../models/gridFilterItem.mjs";
|
|
2
2
|
import type { GridFilterModel } from "../../../models/gridFilterModel.mjs";
|
|
3
3
|
import type { GridRowId, GridRowModel, GridValidRowModel } from "../../../models/gridRows.mjs";
|
|
4
4
|
import type { GridColDef } from "../../../models/colDef/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GridFilterItem } from "../../../models/gridFilterItem.js";
|
|
2
2
|
import type { GridFilterModel } from "../../../models/gridFilterModel.js";
|
|
3
3
|
import type { GridRowId, GridRowModel, GridValidRowModel } from "../../../models/gridRows.js";
|
|
4
4
|
import type { GridColDef } from "../../../models/colDef/index.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { GridColDef, GridFilterItem, GridFilterModel, GridRowModel } from "../../../models/index.mjs";
|
|
3
3
|
import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.mjs";
|
|
4
4
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import type { GridAggregatedFilterItemApplier, GridFilterItemResult, GridQuickFilterValueResult } from "./gridFilterState.mjs";
|
|
6
6
|
/**
|
|
7
7
|
* Adds default values to the optional fields of a filter items.
|
|
8
8
|
* @param {GridFilterItem} item The raw filter item.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { GridColDef, GridFilterItem, GridFilterModel, GridRowModel } from "../../../models/index.js";
|
|
3
3
|
import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
4
|
import type { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
5
|
-
import {
|
|
5
|
+
import type { GridAggregatedFilterItemApplier, GridFilterItemResult, GridQuickFilterValueResult } from "./gridFilterState.js";
|
|
6
6
|
/**
|
|
7
7
|
* Adds default values to the optional fields of a filter items.
|
|
8
8
|
* @param {GridFilterItem} item The raw filter item.
|
|
@@ -18,7 +18,7 @@ var _useGridLogger = require("../../utils/useGridLogger");
|
|
|
18
18
|
var _useGridEvent = require("../../utils/useGridEvent");
|
|
19
19
|
var _keyboardUtils = require("../../../utils/keyboardUtils");
|
|
20
20
|
var _gridFocusStateSelector = require("./gridFocusStateSelector");
|
|
21
|
-
var
|
|
21
|
+
var _focusElement = require("../../../utils/focusElement");
|
|
22
22
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
23
23
|
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
24
24
|
var _utils = require("../../../utils/utils");
|
|
@@ -87,15 +87,7 @@ const useGridFocus = (apiRef, props) => {
|
|
|
87
87
|
if (cellElement.contains(doc.activeElement)) {
|
|
88
88
|
return;
|
|
89
89
|
}
|
|
90
|
-
|
|
91
|
-
cellElement.focus({
|
|
92
|
-
preventScroll: true
|
|
93
|
-
});
|
|
94
|
-
} else {
|
|
95
|
-
const scrollPosition = apiRef.current.getScrollPosition();
|
|
96
|
-
cellElement.focus();
|
|
97
|
-
apiRef.current.scroll(scrollPosition);
|
|
98
|
-
}
|
|
90
|
+
(0, _focusElement.focusElement)(cellElement, apiRef);
|
|
99
91
|
return;
|
|
100
92
|
}
|
|
101
93
|
apiRef.current.setState(state => {
|
|
@@ -11,7 +11,7 @@ import { useGridLogger } from "../../utils/useGridLogger.mjs";
|
|
|
11
11
|
import { useGridEvent } from "../../utils/useGridEvent.mjs";
|
|
12
12
|
import { isNavigationKey, isPasteShortcut } from "../../../utils/keyboardUtils.mjs";
|
|
13
13
|
import { gridFocusCellSelector, gridFocusColumnGroupHeaderSelector } from "./gridFocusStateSelector.mjs";
|
|
14
|
-
import {
|
|
14
|
+
import { focusElement } from "../../../utils/focusElement.mjs";
|
|
15
15
|
import { gridVisibleColumnDefinitionsSelector } from "../columns/gridColumnsSelector.mjs";
|
|
16
16
|
import { getVisibleRows } from "../../utils/useGridVisibleRows.mjs";
|
|
17
17
|
import { clamp } from "../../../utils/utils.mjs";
|
|
@@ -79,15 +79,7 @@ export const useGridFocus = (apiRef, props) => {
|
|
|
79
79
|
if (cellElement.contains(doc.activeElement)) {
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
cellElement.focus({
|
|
84
|
-
preventScroll: true
|
|
85
|
-
});
|
|
86
|
-
} else {
|
|
87
|
-
const scrollPosition = apiRef.current.getScrollPosition();
|
|
88
|
-
cellElement.focus();
|
|
89
|
-
apiRef.current.scroll(scrollPosition);
|
|
90
|
-
}
|
|
82
|
+
focusElement(cellElement, apiRef);
|
|
91
83
|
return;
|
|
92
84
|
}
|
|
93
85
|
apiRef.current.setState(state => {
|
|
@@ -615,9 +615,6 @@ You need to upgrade to DataGridPro or DataGridPremium component to unlock multip
|
|
|
615
615
|
apiRef.current.setRowSelectionModel(emptyModel);
|
|
616
616
|
}
|
|
617
617
|
}, [apiRef, canHaveMultipleSelection, checkboxSelection, isStateControlled, props.rowSelection]);
|
|
618
|
-
React.useEffect(() => {
|
|
619
|
-
(0, _utils2.runIf)(props.rowSelection, removeOutdatedSelection);
|
|
620
|
-
}, [props.rowSelection, removeOutdatedSelection]);
|
|
621
618
|
React.useEffect(() => {
|
|
622
619
|
if (isFirstRender.current) {
|
|
623
620
|
isFirstRender.current = false;
|
|
@@ -607,9 +607,6 @@ You need to upgrade to DataGridPro or DataGridPremium component to unlock multip
|
|
|
607
607
|
apiRef.current.setRowSelectionModel(emptyModel);
|
|
608
608
|
}
|
|
609
609
|
}, [apiRef, canHaveMultipleSelection, checkboxSelection, isStateControlled, props.rowSelection]);
|
|
610
|
-
React.useEffect(() => {
|
|
611
|
-
runIf(props.rowSelection, removeOutdatedSelection);
|
|
612
|
-
}, [props.rowSelection, removeOutdatedSelection]);
|
|
613
610
|
React.useEffect(() => {
|
|
614
611
|
if (isFirstRender.current) {
|
|
615
612
|
isFirstRender.current = false;
|
|
@@ -6,4 +6,4 @@ import type { GridApiCommunity } from "../../../models/api/gridApiCommunity.mjs"
|
|
|
6
6
|
import type { RowRange } from "./useGridRowSpanning.mjs";
|
|
7
7
|
export declare function getUnprocessedRange(testRange: RowRange, processedRange: RowRange): RowRange | null;
|
|
8
8
|
export declare function isRowContextInitialized(renderContext: GridRenderContext): boolean;
|
|
9
|
-
export declare const getCellValue: (row: GridValidRowModel, colDef: GridColDef, apiRef: RefObject<GridApiCommunity>) => any;
|
|
9
|
+
export declare const getCellValue: (row: GridValidRowModel, colDef: GridColDef | undefined, apiRef: RefObject<GridApiCommunity>) => any;
|
|
@@ -6,4 +6,4 @@ import type { GridApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
|
6
6
|
import type { RowRange } from "./useGridRowSpanning.js";
|
|
7
7
|
export declare function getUnprocessedRange(testRange: RowRange, processedRange: RowRange): RowRange | null;
|
|
8
8
|
export declare function isRowContextInitialized(renderContext: GridRenderContext): boolean;
|
|
9
|
-
export declare const getCellValue: (row: GridValidRowModel, colDef: GridColDef, apiRef: RefObject<GridApiCommunity>) => any;
|
|
9
|
+
export declare const getCellValue: (row: GridValidRowModel, colDef: GridColDef | undefined, apiRef: RefObject<GridApiCommunity>) => any;
|
|
@@ -36,7 +36,7 @@ function isRowContextInitialized(renderContext) {
|
|
|
36
36
|
return renderContext.firstRowIndex !== 0 || renderContext.lastRowIndex !== 0;
|
|
37
37
|
}
|
|
38
38
|
const getCellValue = (row, colDef, apiRef) => {
|
|
39
|
-
if (!row) {
|
|
39
|
+
if (!row || !colDef) {
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
const cellValue = row[colDef.field];
|
|
@@ -28,7 +28,7 @@ export function isRowContextInitialized(renderContext) {
|
|
|
28
28
|
return renderContext.firstRowIndex !== 0 || renderContext.lastRowIndex !== 0;
|
|
29
29
|
}
|
|
30
30
|
export const getCellValue = (row, colDef, apiRef) => {
|
|
31
|
-
if (!row) {
|
|
31
|
+
if (!row || !colDef) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
const cellValue = row[colDef.field];
|
|
@@ -14,7 +14,7 @@ export declare const buildRootGroup: () => GridGroupNode;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function checkGridRowIdIsValid(id: GridRowId, row: GridRowModel | Partial<GridRowModel>, detailErrorMessage?: string): void;
|
|
16
16
|
export declare const getRowIdFromRowModel: (rowModel: GridRowModel, getRowId?: GridRowIdGetter, detailErrorMessage?: string) => GridRowId;
|
|
17
|
-
export declare const getRowValue: (row: GridValidRowModel, colDef: GridColDef, apiRef: RefObject<GridApiCommunity>) => any;
|
|
17
|
+
export declare const getRowValue: (row: GridValidRowModel, colDef: GridColDef | undefined, apiRef: RefObject<GridApiCommunity>) => any;
|
|
18
18
|
export declare const createRowsInternalCache: ({
|
|
19
19
|
rows,
|
|
20
20
|
getRowId,
|
|
@@ -14,7 +14,7 @@ export declare const buildRootGroup: () => GridGroupNode;
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function checkGridRowIdIsValid(id: GridRowId, row: GridRowModel | Partial<GridRowModel>, detailErrorMessage?: string): void;
|
|
16
16
|
export declare const getRowIdFromRowModel: (rowModel: GridRowModel, getRowId?: GridRowIdGetter, detailErrorMessage?: string) => GridRowId;
|
|
17
|
-
export declare const getRowValue: (row: GridValidRowModel, colDef: GridColDef, apiRef: RefObject<GridApiCommunity>) => any;
|
|
17
|
+
export declare const getRowValue: (row: GridValidRowModel, colDef: GridColDef | undefined, apiRef: RefObject<GridApiCommunity>) => any;
|
|
18
18
|
export declare const createRowsInternalCache: ({
|
|
19
19
|
rows,
|
|
20
20
|
getRowId,
|
|
@@ -50,9 +50,11 @@ const getRowIdFromRowModel = (rowModel, getRowId, detailErrorMessage) => {
|
|
|
50
50
|
};
|
|
51
51
|
exports.getRowIdFromRowModel = getRowIdFromRowModel;
|
|
52
52
|
const getRowValue = (row, colDef, apiRef) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
if (!colDef) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
if (!colDef.valueGetter) {
|
|
57
|
+
return row[colDef.field];
|
|
56
58
|
}
|
|
57
59
|
const value = row[colDef.field];
|
|
58
60
|
return colDef.valueGetter(value, row, colDef, apiRef);
|
|
@@ -153,7 +155,7 @@ const isAutogeneratedRowNode = rowNode => rowNode.type === 'skeletonRow' || rowN
|
|
|
153
155
|
exports.isAutogeneratedRowNode = isAutogeneratedRowNode;
|
|
154
156
|
const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows, directChildrenOnly) => {
|
|
155
157
|
const node = tree[parentId];
|
|
156
|
-
if (node
|
|
158
|
+
if (node?.type !== 'group') {
|
|
157
159
|
return [];
|
|
158
160
|
}
|
|
159
161
|
const validDescendants = [];
|
|
@@ -38,9 +38,11 @@ export const getRowIdFromRowModel = (rowModel, getRowId, detailErrorMessage) =>
|
|
|
38
38
|
return id;
|
|
39
39
|
};
|
|
40
40
|
export const getRowValue = (row, colDef, apiRef) => {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
if (!colDef) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
if (!colDef.valueGetter) {
|
|
45
|
+
return row[colDef.field];
|
|
44
46
|
}
|
|
45
47
|
const value = row[colDef.field];
|
|
46
48
|
return colDef.valueGetter(value, row, colDef, apiRef);
|
|
@@ -135,7 +137,7 @@ export const isAutogeneratedRow = row => GRID_ID_AUTOGENERATED in row;
|
|
|
135
137
|
export const isAutogeneratedRowNode = rowNode => rowNode.type === 'skeletonRow' || rowNode.type === 'footer' || rowNode.type === 'group' && rowNode.isAutoGenerated || rowNode.type === 'pinnedRow' && rowNode.isAutoGenerated;
|
|
136
138
|
export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows, directChildrenOnly) => {
|
|
137
139
|
const node = tree[parentId];
|
|
138
|
-
if (node
|
|
140
|
+
if (node?.type !== 'group') {
|
|
139
141
|
return [];
|
|
140
142
|
}
|
|
141
143
|
const validDescendants = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { Virtualization, LayoutDataGrid } from '@mui/x-virtualizer';
|
|
3
3
|
import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.mjs";
|
|
4
4
|
import type { GridStateInitializer } from "../../utils/useGridInitializeState.mjs";
|
|
5
5
|
import type { DataGridProcessedProps } from "../../../models/props/DataGridProps.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { Virtualization, LayoutDataGrid } from '@mui/x-virtualizer';
|
|
3
3
|
import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
4
|
import type { GridStateInitializer } from "../../utils/useGridInitializeState.js";
|
|
5
5
|
import type { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
@@ -11,10 +11,10 @@ exports.virtualizationStateInitializer = void 0;
|
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _xVirtualizer = require("@mui/x-virtualizer");
|
|
14
|
-
var
|
|
14
|
+
var _platform = require("@base-ui/utils/platform");
|
|
15
15
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
16
16
|
var _utils = require("../../utils");
|
|
17
|
-
const HAS_LAYOUT = !
|
|
17
|
+
const HAS_LAYOUT = !_platform.platform.env.jsdom;
|
|
18
18
|
|
|
19
19
|
// HACK: Typescript doesn't use the alias name ("GridVirtualizationState") and changes
|
|
20
20
|
// the autogenerated docs result, but this would otherwise be just:
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { EMPTY_RENDER_CONTEXT } from '@mui/x-virtualizer';
|
|
6
|
-
import {
|
|
6
|
+
import { platform } from '@base-ui/utils/platform';
|
|
7
7
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.mjs";
|
|
8
8
|
import { useGridEventPriority } from "../../utils/index.mjs";
|
|
9
|
-
const HAS_LAYOUT = !
|
|
9
|
+
const HAS_LAYOUT = !platform.env.jsdom;
|
|
10
10
|
|
|
11
11
|
// HACK: Typescript doesn't use the alias name ("GridVirtualizationState") and changes
|
|
12
12
|
// the autogenerated docs result, but this would otherwise be just:
|
|
@@ -13,7 +13,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _TimerBasedCleanupTracking = require("../../utils/cleanupTracking/TimerBasedCleanupTracking");
|
|
14
14
|
var _FinalizationRegistryBasedCleanupTracking = require("../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking");
|
|
15
15
|
// Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts
|
|
16
|
-
// Check https://github.com/
|
|
16
|
+
// Check https://github.com/react/react/issues/15317 to get more information
|
|
17
17
|
|
|
18
18
|
// We use class to make it easier to detect in heap snapshots by name
|
|
19
19
|
class ObjectToBeRetainedByReact {
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { TimerBasedCleanupTracking } from "../../utils/cleanupTracking/TimerBasedCleanupTracking.mjs";
|
|
5
5
|
import { FinalizationRegistryBasedCleanupTracking } from "../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.mjs";
|
|
6
6
|
// Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts
|
|
7
|
-
// Check https://github.com/
|
|
7
|
+
// Check https://github.com/react/react/issues/15317 to get more information
|
|
8
8
|
|
|
9
9
|
// We use class to make it easier to detect in heap snapshots by name
|
|
10
10
|
class ObjectToBeRetainedByReact {
|
package/index.js
CHANGED
package/index.mjs
CHANGED
package/locales/arSD.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const arSD: Localization;
|
package/locales/arSD.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const arSD: Localization;
|
package/locales/beBY.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const beBY: Localization;
|
package/locales/beBY.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const beBY: Localization;
|
package/locales/bgBG.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const bgBG: Localization;
|
package/locales/bgBG.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const bgBG: Localization;
|
package/locales/bnBD.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const bnBD: Localization;
|
package/locales/bnBD.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const bnBD: Localization;
|
package/locales/caES.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const caES: Localization;
|
package/locales/caES.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const caES: Localization;
|
package/locales/csCZ.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const csCZ: Localization;
|
package/locales/csCZ.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const csCZ: Localization;
|
package/locales/daDK.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const daDK: Localization;
|
package/locales/daDK.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const daDK: Localization;
|
package/locales/deDE.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const deDE: Localization;
|
package/locales/deDE.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const deDE: Localization;
|
package/locales/elGR.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const elGR: Localization;
|
package/locales/elGR.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const elGR: Localization;
|
package/locales/enUS.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const enUS: Localization;
|
package/locales/enUS.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const enUS: Localization;
|
package/locales/esES.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const esES: Localization;
|
package/locales/esES.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const esES: Localization;
|
package/locales/faIR.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const faIR: Localization;
|
package/locales/faIR.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const faIR: Localization;
|
package/locales/fiFI.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const fiFI: Localization;
|
package/locales/fiFI.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const fiFI: Localization;
|
package/locales/frFR.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const frFR: Localization;
|
package/locales/frFR.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const frFR: Localization;
|
package/locales/heIL.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const heIL: Localization;
|
package/locales/heIL.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const heIL: Localization;
|
package/locales/huHU.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const huHU: Localization;
|
package/locales/huHU.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const huHU: Localization;
|
package/locales/hyAM.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const hyAM: Localization;
|
package/locales/hyAM.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const hyAM: Localization;
|
package/locales/idID.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GridLocaleText } from "../models/api/gridLocaleTextApi.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
3
3
|
export declare const idIDGrid: Partial<GridLocaleText>;
|
|
4
4
|
export declare const idID: Localization;
|
package/locales/idID.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { GridLocaleText } from "../models/api/gridLocaleTextApi.js";
|
|
2
|
-
import {
|
|
2
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
3
3
|
export declare const idIDGrid: Partial<GridLocaleText>;
|
|
4
4
|
export declare const idID: Localization;
|
package/locales/isIS.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const isIS: Localization;
|
package/locales/isIS.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const isIS: Localization;
|
package/locales/itIT.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const itIT: Localization;
|
package/locales/itIT.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const itIT: Localization;
|
package/locales/jaJP.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.mjs";
|
|
2
2
|
export declare const jaJP: Localization;
|
package/locales/jaJP.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Localization } from "../utils/getGridLocalization.js";
|
|
2
2
|
export declare const jaJP: Localization;
|
package/locales/jaJP.js
CHANGED
|
@@ -10,8 +10,8 @@ const jaJPGrid = {
|
|
|
10
10
|
// Root
|
|
11
11
|
noRowsLabel: '行がありません。',
|
|
12
12
|
noResultsOverlayLabel: '結果がありません。',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
noColumnsOverlayLabel: '列がありません。',
|
|
14
|
+
noColumnsOverlayManageColumns: '列管理',
|
|
15
15
|
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
16
16
|
|
|
17
17
|
// Density selector toolbar button text
|
|
@@ -56,8 +56,7 @@ const jaJPGrid = {
|
|
|
56
56
|
columnsManagementNoColumns: 'カラムなし',
|
|
57
57
|
columnsManagementShowHideAllText: 'すべて表示/非表示',
|
|
58
58
|
columnsManagementReset: 'リセット',
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
columnsManagementDeleteIconLabel: 'クリア',
|
|
61
60
|
// Filter panel text
|
|
62
61
|
filterPanelAddFilter: 'フィルター追加',
|
|
63
62
|
filterPanelRemoveAll: 'すべて削除',
|
|
@@ -120,7 +119,7 @@ const jaJPGrid = {
|
|
|
120
119
|
filterValueFalse: '偽',
|
|
121
120
|
// Column menu text
|
|
122
121
|
columnMenuLabel: 'メニュー',
|
|
123
|
-
|
|
122
|
+
columnMenuAriaLabel: columnName => `${columnName} 列メニュー`,
|
|
124
123
|
columnMenuShowColumns: '列表示',
|
|
125
124
|
columnMenuManageColumns: '列管理',
|
|
126
125
|
columnMenuFilter: 'フィルター',
|