@mui/x-data-grid 8.8.0 → 8.9.2
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 +225 -24
- package/DataGrid/DataGrid.js +5 -0
- package/DataGrid/index.d.ts +0 -1
- package/DataGrid/useDataGridComponent.js +10 -0
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/components/GridDetailPanels.d.ts +2 -2
- package/components/GridPinnedRows.d.ts +2 -2
- package/components/GridRow.js +5 -0
- package/components/GridScrollArea.js +1 -1
- package/components/cell/GridCell.js +7 -5
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/components/containers/GridRootStyles.d.ts +1 -1
- package/components/containers/GridRootStyles.js +39 -0
- package/components/toolbarV8/Toolbar.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +5 -5
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +3 -1
- package/esm/DataGrid/DataGrid.js +5 -0
- package/esm/DataGrid/index.d.ts +0 -1
- package/esm/DataGrid/useDataGridComponent.js +10 -0
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/esm/components/GridDetailPanels.d.ts +2 -2
- package/esm/components/GridPinnedRows.d.ts +2 -2
- package/esm/components/GridRow.js +5 -0
- package/esm/components/GridScrollArea.js +1 -1
- package/esm/components/cell/GridCell.js +7 -5
- package/esm/components/cell/GridEditSingleSelectCell.js +1 -1
- package/esm/components/columnsManagement/GridColumnsManagement.d.ts +6 -0
- package/esm/components/columnsManagement/GridColumnsManagement.js +17 -5
- package/esm/components/containers/GridRootStyles.d.ts +1 -1
- package/esm/components/containers/GridRootStyles.js +39 -0
- package/esm/components/toolbarV8/Toolbar.d.ts +1 -1
- package/esm/components/virtualization/GridVirtualScroller.js +5 -5
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/constants/gridClasses.d.ts +12 -0
- package/esm/constants/gridClasses.js +3 -1
- package/esm/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +5 -0
- package/esm/hooks/core/pipeProcessing/useGridPipeProcessing.js +20 -5
- package/esm/hooks/core/useGridProps.d.ts +2 -2
- package/esm/hooks/core/useGridProps.js +3 -1
- package/esm/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/esm/hooks/core/useGridVirtualizer.js +223 -0
- package/esm/hooks/features/columnGrouping/gridColumnGroupsInterfaces.d.ts +4 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.js +35 -32
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +18 -13
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -2
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -3
- package/esm/hooks/features/columns/gridColumnsSelector.js +6 -2
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -4
- package/esm/hooks/features/columns/useGridColumnSpanning.js +5 -90
- package/esm/hooks/features/columns/useGridColumns.js +8 -10
- package/esm/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/esm/hooks/features/export/utils.js +1 -1
- package/esm/hooks/features/filter/useGridFilter.js +3 -3
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -10
- package/esm/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/esm/hooks/features/keyboardNavigation/utils.js +5 -5
- package/esm/hooks/features/listView/gridListViewSelectors.d.ts +8 -1
- package/esm/hooks/features/listView/gridListViewSelectors.js +7 -0
- package/esm/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/esm/hooks/features/pivoting/gridPivotingSelectors.js +1 -2
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/esm/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/esm/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +5 -2
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/esm/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/esm/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/esm/hooks/features/rows/useGridRows.js +4 -3
- package/esm/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/esm/hooks/features/rows/useGridRowsMeta.js +17 -187
- package/esm/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/esm/hooks/features/scroll/useGridScroll.js +2 -3
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/esm/hooks/features/virtualization/index.d.ts +1 -0
- package/esm/hooks/features/virtualization/index.js +1 -0
- package/esm/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/esm/hooks/features/virtualization/useGridVirtualization.js +41 -22
- package/esm/hooks/utils/index.d.ts +2 -1
- package/esm/hooks/utils/index.js +2 -1
- package/esm/hooks/utils/useFirstRender.d.ts +1 -1
- package/esm/hooks/utils/useFirstRender.js +1 -8
- package/esm/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/esm/hooks/utils/useGridInitializeState.js +6 -1
- package/esm/hooks/utils/useRunOncePerLoop.d.ts +1 -0
- package/esm/hooks/utils/useRunOncePerLoop.js +26 -0
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/internals/utils/getPinnedCellOffset.js +5 -0
- package/esm/locales/frFR.js +18 -21
- package/esm/locales/heIL.js +12 -12
- package/esm/locales/plPL.js +22 -24
- package/esm/models/api/gridApiCommon.d.ts +4 -1
- package/esm/models/api/gridColumnSpanning.d.ts +5 -11
- package/esm/models/api/gridRowApi.d.ts +5 -0
- package/esm/models/events/gridEventLookup.d.ts +2 -1
- package/esm/models/gridApiCaches.d.ts +8 -2
- package/esm/models/gridStateCommunity.d.ts +2 -2
- package/esm/models/props/DataGridProps.d.ts +5 -0
- package/esm/utils/roundToDecimalPlaces.d.ts +1 -1
- package/esm/utils/roundToDecimalPlaces.js +1 -3
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +5 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +20 -5
- package/hooks/core/useGridProps.d.ts +2 -2
- package/hooks/core/useGridProps.js +3 -1
- package/hooks/core/useGridVirtualizer.d.ts +9 -0
- package/hooks/core/useGridVirtualizer.js +231 -0
- package/hooks/features/columnGrouping/gridColumnGroupsInterfaces.d.ts +4 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +35 -32
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +18 -13
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +4 -3
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -3
- package/hooks/features/columns/gridColumnsSelector.js +6 -2
- package/hooks/features/columns/gridColumnsUtils.js +6 -4
- package/hooks/features/columns/useGridColumnSpanning.js +5 -91
- package/hooks/features/columns/useGridColumns.js +8 -10
- package/hooks/features/dimensions/useGridDimensions.js +18 -188
- package/hooks/features/export/utils.js +1 -1
- package/hooks/features/filter/useGridFilter.js +3 -3
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +6 -10
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/hooks/features/keyboardNavigation/utils.js +5 -5
- package/hooks/features/listView/gridListViewSelectors.d.ts +8 -1
- package/hooks/features/listView/gridListViewSelectors.js +8 -1
- package/hooks/features/pivoting/gridPivotingInterfaces.d.ts +0 -1
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +1 -4
- package/hooks/features/pivoting/gridPivotingSelectors.js +2 -3
- package/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/hooks/features/rows/gridRowsMetaInterfaces.d.ts +2 -8
- package/hooks/features/rows/gridRowsMetaState.d.ts +2 -18
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.js +5 -2
- package/hooks/features/rows/useGridRowAriaAttributes.js +3 -1
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -12
- package/hooks/features/rows/useGridRowSpanning.js +54 -85
- package/hooks/features/rows/useGridRows.js +4 -3
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/rows/useGridRowsMeta.js +15 -186
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +2 -3
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/hooks/features/virtualization/index.d.ts +1 -0
- package/hooks/features/virtualization/index.js +12 -0
- package/hooks/features/virtualization/useGridVirtualization.d.ts +5 -16
- package/hooks/features/virtualization/useGridVirtualization.js +42 -24
- package/hooks/utils/index.d.ts +2 -1
- package/hooks/utils/index.js +16 -4
- package/hooks/utils/useFirstRender.d.ts +1 -1
- package/hooks/utils/useFirstRender.js +11 -11
- package/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/hooks/utils/useGridInitializeState.js +6 -1
- package/hooks/utils/useRunOncePerLoop.d.ts +1 -0
- package/hooks/utils/useRunOncePerLoop.js +33 -0
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +4 -11
- package/internals/utils/getPinnedCellOffset.js +5 -0
- package/locales/frFR.js +18 -21
- package/locales/heIL.js +12 -12
- package/locales/plPL.js +22 -24
- package/models/api/gridApiCommon.d.ts +4 -1
- package/models/api/gridColumnSpanning.d.ts +5 -11
- package/models/api/gridRowApi.d.ts +5 -0
- package/models/events/gridEventLookup.d.ts +2 -1
- package/models/gridApiCaches.d.ts +8 -2
- package/models/gridStateCommunity.d.ts +2 -2
- package/models/props/DataGridProps.d.ts +5 -0
- package/package.json +5 -5
- package/utils/roundToDecimalPlaces.d.ts +1 -1
- package/utils/roundToDecimalPlaces.js +7 -4
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/esm/hooks/features/rows/gridRowSpanningSelectors.js +0 -5
- package/esm/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +0 -846
- package/esm/hooks/utils/useRunOnce.d.ts +0 -5
- package/esm/hooks/utils/useRunOnce.js +0 -18
- package/esm/utils/platform.d.ts +0 -1
- package/esm/utils/platform.js +0 -2
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +0 -10
- package/hooks/features/rows/gridRowSpanningSelectors.js +0 -11
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -56
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -857
- package/hooks/utils/useRunOnce.d.ts +0 -5
- package/hooks/utils/useRunOnce.js +0 -27
- package/utils/platform.d.ts +0 -1
- package/utils/platform.js +0 -8
package/locales/plPL.js
CHANGED
|
@@ -9,8 +9,8 @@ const plPLGrid = {
|
|
|
9
9
|
// Root
|
|
10
10
|
noRowsLabel: 'Brak danych',
|
|
11
11
|
noResultsOverlayLabel: 'Nie znaleziono wyników.',
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
noColumnsOverlayLabel: 'Brak kolumn',
|
|
13
|
+
noColumnsOverlayManageColumns: 'Zarządzaj kolumnami',
|
|
14
14
|
// emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
|
|
15
15
|
|
|
16
16
|
// Density selector toolbar button text
|
|
@@ -42,8 +42,7 @@ const plPLGrid = {
|
|
|
42
42
|
// toolbarPivot: 'Pivot',
|
|
43
43
|
|
|
44
44
|
// Toolbar AI Assistant button
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
toolbarAssistant: 'Asystent AI',
|
|
47
46
|
// Columns management text
|
|
48
47
|
columnsManagementSearchTitle: 'Szukaj',
|
|
49
48
|
columnsManagementNoColumns: 'Brak kolumn',
|
|
@@ -161,18 +160,18 @@ const plPLGrid = {
|
|
|
161
160
|
collapseDetailPanel: 'Zwiń',
|
|
162
161
|
// Pagination
|
|
163
162
|
paginationRowsPerPage: 'Wierszy na stronę:',
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
163
|
+
paginationDisplayedRows: ({
|
|
164
|
+
from,
|
|
165
|
+
to,
|
|
166
|
+
count,
|
|
167
|
+
estimated
|
|
168
|
+
}) => {
|
|
169
|
+
if (!estimated) {
|
|
170
|
+
return `${from}–${to} z ${count !== -1 ? count : `więcej niż ${to}`}`;
|
|
171
|
+
}
|
|
172
|
+
const estimatedLabel = estimated && estimated > to ? `około ${estimated}` : `więcej niż ${to}`;
|
|
173
|
+
return `${from}–${to} z ${count !== -1 ? count : estimatedLabel}`;
|
|
174
|
+
},
|
|
176
175
|
paginationItemAriaLabel: type => {
|
|
177
176
|
if (type === 'first') {
|
|
178
177
|
return 'Przejdź do pierwszej strony';
|
|
@@ -225,19 +224,18 @@ const plPLGrid = {
|
|
|
225
224
|
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
226
225
|
|
|
227
226
|
// AI Assistant panel
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
227
|
+
aiAssistantPanelTitle: 'Asystent AI',
|
|
228
|
+
aiAssistantPanelClose: 'Zamknij asystenta AI',
|
|
229
|
+
aiAssistantPanelNewConversation: 'Nowa konwersacja',
|
|
230
|
+
aiAssistantPanelConversationHistory: 'Historia konwersacji',
|
|
231
|
+
aiAssistantPanelEmptyConversation: 'Brak historii poleceń',
|
|
232
|
+
aiAssistantSuggestions: 'Sugestie',
|
|
235
233
|
// Prompt field
|
|
236
234
|
promptFieldLabel: 'Wprowadź polecenie',
|
|
237
235
|
promptFieldPlaceholder: 'Wpisz polecenie…',
|
|
238
236
|
promptFieldPlaceholderWithRecording: 'Wpisz lub nagraj polecenie…',
|
|
239
237
|
promptFieldPlaceholderListening: 'Nasłuchiwanie polecenia…',
|
|
240
|
-
|
|
238
|
+
promptFieldSpeechRecognitionNotSupported: 'Rozpoznawanie głosu nie jest obsługiwane przez Twoją przeglądarkę.',
|
|
241
239
|
promptFieldSend: 'Wyślij',
|
|
242
240
|
promptFieldRecord: 'Nagrywaj',
|
|
243
241
|
promptFieldStopRecording: 'Zatrzymaj nagrywanie'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Virtualizer } from '@mui/x-virtualizer';
|
|
1
2
|
import type { GridColumnApi } from "./gridColumnApi.js";
|
|
2
3
|
import type { GridColumnMenuApi } from "./gridColumnMenuApi.js";
|
|
3
4
|
import type { GridCoreApi, GridCorePrivateApi } from "./gridCoreApi.js";
|
|
@@ -31,5 +32,7 @@ import type { DataGridProcessedProps } from "../props/DataGridProps.js";
|
|
|
31
32
|
import type { GridColumnResizeApi } from "../../hooks/features/columnResize/index.js";
|
|
32
33
|
import type { GridPivotingPrivateApiCommunity } from "../../hooks/features/pivoting/gridPivotingInterfaces.js";
|
|
33
34
|
export interface GridApiCommon<GridState extends GridStateCommunity = any, GridInitialState extends GridInitialStateCommunity = any> extends GridCoreApi, GridPipeProcessingApi, GridDensityApi, GridDimensionsApi, GridRowApi, GridRowsMetaApi, GridEditingApi, GridParamsApi, GridColumnApi, GridRowSelectionApi, GridSortApi, GridPaginationApi, GridCsvExportApi, GridFocusApi, GridFilterApi, GridColumnMenuApi, GridPreferencesPanelApi, GridPrintExportApi, GridVirtualizationApi, GridLocaleTextApi, GridScrollApi, GridColumnSpanningApi, GridStateApi<GridState>, GridStatePersistenceApi<GridInitialState>, GridColumnGroupingApi, GridHeaderFilteringApi, GridColumnResizeApi {}
|
|
34
|
-
export interface GridPrivateOnlyApiCommon<Api extends GridApiCommon, PrivateApi extends GridPrivateApiCommon, Props extends DataGridProcessedProps> extends GridCorePrivateApi<Api, PrivateApi, Props>, GridStatePrivateApi<PrivateApi['state']>, GridPipeProcessingPrivateApi, GridStrategyProcessingApi, GridColumnSpanningPrivateApi, GridRowsMetaPrivateApi, GridDimensionsPrivateApi, GridEditingPrivateApi, GridLoggerApi, GridFocusPrivateApi, GridHeaderFilteringPrivateApi, GridVirtualizationPrivateApi, GridRowProPrivateApi, GridParamsPrivateApi, GridPivotingPrivateApiCommunity {
|
|
35
|
+
export interface GridPrivateOnlyApiCommon<Api extends GridApiCommon, PrivateApi extends GridPrivateApiCommon, Props extends DataGridProcessedProps> extends GridCorePrivateApi<Api, PrivateApi, Props>, GridStatePrivateApi<PrivateApi['state']>, GridPipeProcessingPrivateApi, GridStrategyProcessingApi, GridColumnSpanningPrivateApi, GridRowsMetaPrivateApi, GridDimensionsPrivateApi, GridEditingPrivateApi, GridLoggerApi, GridFocusPrivateApi, GridHeaderFilteringPrivateApi, GridVirtualizationPrivateApi, GridRowProPrivateApi, GridParamsPrivateApi, GridPivotingPrivateApiCommunity {
|
|
36
|
+
virtualizer: Virtualizer;
|
|
37
|
+
}
|
|
35
38
|
export interface GridPrivateApiCommon extends GridApiCommon, GridPrivateOnlyApiCommon<GridApiCommon, GridPrivateApiCommon, DataGridProcessedProps> {}
|
|
@@ -19,16 +19,10 @@ export interface GridColumnSpanningPrivateApi {
|
|
|
19
19
|
resetColSpan: () => void;
|
|
20
20
|
/**
|
|
21
21
|
* Calculate column spanning for each cell in the row
|
|
22
|
-
* @param {
|
|
23
|
-
* @param {
|
|
24
|
-
* @param {number}
|
|
25
|
-
* @param {
|
|
26
|
-
* @param {GridStateColDef[]} options.columns List of columns to calculate colSpan for
|
|
22
|
+
* @param {GridRowId} rowId The row id
|
|
23
|
+
* @param {number} minFirstColumn First visible column index
|
|
24
|
+
* @param {number} maxLastColumn Last visible column index
|
|
25
|
+
* @param {GridStateColDef[]} columns List of columns to calculate colSpan for
|
|
27
26
|
*/
|
|
28
|
-
calculateColSpan: (
|
|
29
|
-
rowId: GridRowId;
|
|
30
|
-
minFirstColumn: number;
|
|
31
|
-
maxLastColumn: number;
|
|
32
|
-
columns: GridStateColDef[];
|
|
33
|
-
}) => void;
|
|
27
|
+
calculateColSpan: (rowId: GridRowId, minFirstColumn: number, maxLastColumn: number, columns: GridStateColDef[]) => void;
|
|
34
28
|
}
|
|
@@ -19,6 +19,11 @@ export interface GridRowGroupChildrenGetterParams {
|
|
|
19
19
|
* @default false
|
|
20
20
|
*/
|
|
21
21
|
applySorting?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* If `true`, the method will only return the direct leaf children of the group
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
directChildrenOnly?: boolean;
|
|
22
27
|
}
|
|
23
28
|
/**
|
|
24
29
|
* The Row API interface that is available in the grid `apiRef`.
|
|
@@ -77,11 +77,12 @@ export interface GridRowEventLookup {
|
|
|
77
77
|
};
|
|
78
78
|
/**
|
|
79
79
|
* Fired when the dragging of a row ends.
|
|
80
|
+
* It's mapped to the `dragend` DOM event.
|
|
80
81
|
* @ignore - do not document.
|
|
81
82
|
*/
|
|
82
83
|
rowDragEnd: {
|
|
83
84
|
params: GridRowParams;
|
|
84
|
-
event:
|
|
85
|
+
event: DragEvent;
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
88
|
export interface GridColumnHeaderEventLookup {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import { GridRowsInternalCache } from "../hooks/features/rows/gridRowsInterfaces.js";
|
|
2
|
-
import { GridRowsMetaInternalCache } from "../hooks/features/rows/gridRowsMetaInterfaces.js";
|
|
1
|
+
import type { GridRowsInternalCache } from "../hooks/features/rows/gridRowsInterfaces.js";
|
|
2
|
+
import type { GridRowsMetaInternalCache } from "../hooks/features/rows/gridRowsMetaInterfaces.js";
|
|
3
|
+
import type { GridColumnGroupingInternalCache } from "../hooks/features/columnGrouping/gridColumnGroupsInterfaces.js";
|
|
4
|
+
import type { GridColDef } from "./colDef/index.js";
|
|
3
5
|
export interface GridApiCaches {
|
|
6
|
+
columns: {
|
|
7
|
+
lastColumnsProp: readonly GridColDef[];
|
|
8
|
+
};
|
|
9
|
+
columnGrouping: GridColumnGroupingInternalCache;
|
|
4
10
|
rows: GridRowsInternalCache;
|
|
5
11
|
rowsMeta: GridRowsMetaInternalCache;
|
|
6
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GridColumnMenuState, GridColumnsInitialState, GridColumnsState, GridColumnsGroupingState, GridColumnPinningState, GridDensityState, GridDimensionsState, GridFilterInitialState, GridFilterState, GridFocusState, GridPaginationInitialState, GridPaginationState, GridPreferencePanelInitialState, GridPreferencePanelState, GridRowsState, GridSortingInitialState, GridSortingState, GridTabIndexState, GridVirtualizationState } from "../hooks/index.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataGridProcessedProps } from "./props/DataGridProps.js";
|
|
3
3
|
import type { GridRowsMetaState } from "../hooks/features/rows/gridRowsMetaState.js";
|
|
4
4
|
import type { GridEditingState } from "./gridEditRowModel.js";
|
|
5
5
|
import { GridHeaderFilteringState } from "./gridHeaderFilteringModel.js";
|
|
@@ -12,7 +12,7 @@ import type { GridListViewState } from "../hooks/features/listView/useGridListVi
|
|
|
12
12
|
* Some props are passed on the state to enable grid selectors to select
|
|
13
13
|
* and react to them.
|
|
14
14
|
*/
|
|
15
|
-
type GridStateProps = Pick<
|
|
15
|
+
type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView'>;
|
|
16
16
|
/**
|
|
17
17
|
* The state of Data Grid.
|
|
18
18
|
*/
|
|
@@ -196,6 +196,11 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
|
|
|
196
196
|
* @default 150
|
|
197
197
|
*/
|
|
198
198
|
filterDebounceMs: number;
|
|
199
|
+
/**
|
|
200
|
+
* The milliseconds delay to wait after a keystroke before triggering filtering in the columns menu.
|
|
201
|
+
* @default 150
|
|
202
|
+
*/
|
|
203
|
+
columnFilterDebounceMs: number;
|
|
199
204
|
/**
|
|
200
205
|
* Sets the height in pixel of the column headers in the Data Grid.
|
|
201
206
|
* @default 56
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.9.2",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"url": "https://opencollective.com/mui-org"
|
|
18
18
|
},
|
|
19
19
|
"publishConfig": {
|
|
20
|
-
"access": "public"
|
|
21
|
-
"directory": "build"
|
|
20
|
+
"access": "public"
|
|
22
21
|
},
|
|
23
22
|
"keywords": [
|
|
24
23
|
"react",
|
|
@@ -39,12 +38,13 @@
|
|
|
39
38
|
"directory": "packages/x-data-grid"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"@babel/runtime": "^7.
|
|
41
|
+
"@babel/runtime": "^7.28.2",
|
|
43
42
|
"@mui/utils": "^7.2.0",
|
|
44
43
|
"clsx": "^2.1.1",
|
|
45
44
|
"prop-types": "^15.8.1",
|
|
46
45
|
"use-sync-external-store": "^1.5.0",
|
|
47
|
-
"@mui/x-internals": "8.
|
|
46
|
+
"@mui/x-internals": "8.9.2",
|
|
47
|
+
"@mui/x-virtualizer": "0.1.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@emotion/react": "^11.9.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { roundToDecimalPlaces } from '@mui/x-internals/math';
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Object.defineProperty(exports, "roundToDecimalPlaces", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _math.roundToDecimalPlaces;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _math = require("@mui/x-internals/math");
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
|
-
export declare const gridRowSpanningHiddenCellsSelector: (args_0: import("react").RefObject<{
|
|
3
|
-
state: GridStateCommunity;
|
|
4
|
-
} | null>) => Record<import("@mui/x-data-grid").GridRowId, Record<string, boolean>>;
|
|
5
|
-
export declare const gridRowSpanningSpannedCellsSelector: (args_0: import("react").RefObject<{
|
|
6
|
-
state: GridStateCommunity;
|
|
7
|
-
} | null>) => Record<import("@mui/x-data-grid").GridRowId, Record<string, number>>;
|
|
8
|
-
export declare const gridRowSpanningHiddenCellsOriginMapSelector: (args_0: import("react").RefObject<{
|
|
9
|
-
state: GridStateCommunity;
|
|
10
|
-
} | null>) => Record<number, Record<string, number>>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { createSelector, createRootSelector } from "../../../utils/createSelector.js";
|
|
2
|
-
const gridRowSpanningStateSelector = createRootSelector(state => state.rowSpanning);
|
|
3
|
-
export const gridRowSpanningHiddenCellsSelector = createSelector(gridRowSpanningStateSelector, rowSpanning => rowSpanning.hiddenCells);
|
|
4
|
-
export const gridRowSpanningSpannedCellsSelector = createSelector(gridRowSpanningStateSelector, rowSpanning => rowSpanning.spannedCells);
|
|
5
|
-
export const gridRowSpanningHiddenCellsOriginMapSelector = createSelector(gridRowSpanningStateSelector, rowSpanning => rowSpanning.hiddenCellOriginMap);
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { GridPinnedRowsPosition } from "../rows/gridRowsInterfaces.js";
|
|
3
|
-
import { type GridRenderContext, type GridColumnsRenderContext, type GridRowEntry, type GridRowId } from "../../../models/index.js";
|
|
4
|
-
export type VirtualScroller = ReturnType<typeof useGridVirtualScroller>;
|
|
5
|
-
export declare const EMPTY_DETAIL_PANELS: Readonly<Map<GridRowId, React.ReactNode>>;
|
|
6
|
-
export declare const useGridVirtualScroller: () => {
|
|
7
|
-
renderContext: GridRenderContext;
|
|
8
|
-
setPanels: React.Dispatch<React.SetStateAction<Readonly<Map<GridRowId, React.ReactNode>>>>;
|
|
9
|
-
getRows: (params?: {
|
|
10
|
-
rows?: GridRowEntry[];
|
|
11
|
-
position?: GridPinnedRowsPosition;
|
|
12
|
-
renderContext?: GridRenderContext;
|
|
13
|
-
}) => React.ReactNode[];
|
|
14
|
-
getContainerProps: () => {
|
|
15
|
-
ref: (node: HTMLDivElement | null) => (() => void) | undefined;
|
|
16
|
-
};
|
|
17
|
-
getScrollerProps: () => {
|
|
18
|
-
ref: React.RefObject<HTMLDivElement | null>;
|
|
19
|
-
onScroll: () => void;
|
|
20
|
-
onWheel: (event: React.WheelEvent) => void;
|
|
21
|
-
onTouchMove: (event: React.TouchEvent) => void;
|
|
22
|
-
style: React.CSSProperties;
|
|
23
|
-
role: string;
|
|
24
|
-
tabIndex: number | undefined;
|
|
25
|
-
};
|
|
26
|
-
getContentProps: () => {
|
|
27
|
-
style: React.CSSProperties;
|
|
28
|
-
role: string;
|
|
29
|
-
ref: (node: HTMLDivElement | null) => void;
|
|
30
|
-
};
|
|
31
|
-
getRenderZoneProps: () => {
|
|
32
|
-
role: string;
|
|
33
|
-
};
|
|
34
|
-
getScrollbarVerticalProps: () => {
|
|
35
|
-
ref: React.RefObject<HTMLDivElement | null>;
|
|
36
|
-
scrollPosition: React.RefObject<{
|
|
37
|
-
top: number;
|
|
38
|
-
left: number;
|
|
39
|
-
}>;
|
|
40
|
-
};
|
|
41
|
-
getScrollbarHorizontalProps: () => {
|
|
42
|
-
ref: React.RefObject<HTMLDivElement | null>;
|
|
43
|
-
scrollPosition: React.RefObject<{
|
|
44
|
-
top: number;
|
|
45
|
-
left: number;
|
|
46
|
-
}>;
|
|
47
|
-
};
|
|
48
|
-
getScrollAreaProps: () => {
|
|
49
|
-
scrollPosition: React.RefObject<{
|
|
50
|
-
top: number;
|
|
51
|
-
left: number;
|
|
52
|
-
}>;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export declare function areRenderContextsEqual(context1: GridRenderContext, context2: GridRenderContext): boolean;
|
|
56
|
-
export declare function computeOffsetLeft(columnPositions: number[], renderContext: GridColumnsRenderContext, pinnedLeftLength: number): number;
|