@mui/x-data-grid 7.17.0 → 7.19.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 +208 -5
- package/DataGrid/DataGrid.js +16 -1
- package/DataGrid/useDataGridComponent.js +3 -0
- package/DataGrid/useDataGridProps.js +2 -1
- package/components/GridRow.js +1 -0
- package/components/cell/GridCell.js +33 -9
- package/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/components/columnSelection/GridCellCheckboxRenderer.js +12 -4
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/containers/GridRoot.js +1 -1
- package/components/containers/GridRootStyles.js +32 -23
- package/components/containers/GridToolbarContainer.js +1 -1
- package/components/menu/GridMenu.js +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +1 -1
- package/components/panel/GridPanelContent.js +1 -1
- package/components/panel/GridPanelFooter.js +1 -1
- package/components/panel/GridPanelHeader.js +1 -1
- package/components/panel/GridPanelWrapper.js +1 -1
- package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
- package/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/components/virtualization/GridBottomContainer.d.ts +1 -1
- package/components/virtualization/GridBottomContainer.js +18 -1
- package/components/virtualization/GridMainContainer.js +3 -1
- package/components/virtualization/GridTopContainer.d.ts +1 -1
- package/components/virtualization/GridTopContainer.js +1 -1
- package/components/virtualization/GridVirtualScrollbar.js +1 -7
- package/components/virtualization/GridVirtualScroller.js +1 -0
- package/components/virtualization/GridVirtualScrollerFiller.js +3 -4
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -11
- package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
- package/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/hooks/features/columns/gridColumnsSelector.d.ts +12 -12
- package/hooks/features/columns/gridColumnsUtils.js +3 -2
- package/hooks/features/density/densitySelector.d.ts +1 -1
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +4 -0
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/hooks/features/editing/useGridCellEditing.js +3 -19
- package/hooks/features/editing/useGridRowEditing.js +7 -2
- package/hooks/features/editing/utils.d.ts +2 -0
- package/hooks/features/editing/utils.js +15 -0
- package/hooks/features/export/useGridPrintExport.js +2 -1
- package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
- package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
- package/hooks/features/focus/useGridFocus.js +2 -1
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
- package/hooks/features/keyboardNavigation/utils.d.ts +17 -0
- package/hooks/features/keyboardNavigation/utils.js +58 -0
- package/hooks/features/pagination/gridPaginationSelector.d.ts +9 -9
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +105 -29
- package/hooks/features/rowSelection/utils.d.ts +10 -0
- package/hooks/features/rowSelection/utils.js +156 -1
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +4 -0
- package/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +10 -0
- package/hooks/features/rows/gridRowSpanningUtils.js +42 -0
- package/hooks/features/rows/gridRowsSelector.d.ts +14 -14
- package/hooks/features/rows/useGridRowSpanning.d.ts +27 -0
- package/hooks/features/rows/useGridRowSpanning.js +257 -0
- package/hooks/features/rows/useGridRows.d.ts +1 -1
- package/hooks/features/rows/useGridRows.js +7 -1
- package/hooks/features/scroll/useGridScroll.js +19 -19
- package/hooks/features/sorting/gridSortingSelector.d.ts +4 -4
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/hooks/utils/useGridApiEventHandler.js +0 -1
- package/hooks/utils/useGridVisibleRows.d.ts +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -0
- package/internals/index.js +2 -0
- package/locales/bgBG.js +8 -9
- package/locales/deDE.js +4 -4
- package/locales/frFR.js +4 -4
- package/locales/hrHR.d.ts +1 -1
- package/locales/hrHR.js +69 -46
- package/locales/jaJP.js +1 -2
- package/locales/ptPT.d.ts +1 -1
- package/locales/ptPT.js +4 -4
- package/locales/viVN.js +20 -20
- package/locales/zhHK.d.ts +1 -1
- package/models/colDef/gridColDef.d.ts +4 -0
- package/models/gridRowSelectionModel.d.ts +4 -0
- package/models/gridStateCommunity.d.ts +2 -0
- package/models/props/DataGridProps.d.ts +30 -1
- package/modern/DataGrid/DataGrid.js +16 -1
- package/modern/DataGrid/useDataGridComponent.js +3 -0
- package/modern/DataGrid/useDataGridProps.js +2 -1
- package/modern/components/GridRow.js +1 -0
- package/modern/components/cell/GridCell.js +33 -9
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +12 -4
- package/modern/components/containers/GridRoot.js +1 -1
- package/modern/components/containers/GridRootStyles.js +32 -23
- package/modern/components/containers/GridToolbarContainer.js +1 -1
- package/modern/components/menu/GridMenu.js +1 -1
- package/modern/components/panel/GridPanel.js +1 -1
- package/modern/components/panel/GridPanelContent.js +1 -1
- package/modern/components/panel/GridPanelFooter.js +1 -1
- package/modern/components/panel/GridPanelHeader.js +1 -1
- package/modern/components/panel/GridPanelWrapper.js +1 -1
- package/modern/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/modern/components/virtualization/GridBottomContainer.js +18 -1
- package/modern/components/virtualization/GridMainContainer.js +3 -1
- package/modern/components/virtualization/GridTopContainer.js +1 -1
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -7
- package/modern/components/virtualization/GridVirtualScroller.js +1 -0
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +3 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -11
- package/modern/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/modern/hooks/features/columns/gridColumnsUtils.js +3 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +3 -19
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -2
- package/modern/hooks/features/editing/utils.js +15 -0
- package/modern/hooks/features/export/useGridPrintExport.js +2 -1
- package/modern/hooks/features/focus/useGridFocus.js +2 -1
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +10 -46
- package/modern/hooks/features/keyboardNavigation/utils.js +58 -0
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +105 -29
- package/modern/hooks/features/rowSelection/utils.js +156 -1
- package/modern/hooks/features/rows/gridRowSpanningSelectors.js +5 -0
- package/modern/hooks/features/rows/gridRowSpanningUtils.js +42 -0
- package/modern/hooks/features/rows/useGridRowSpanning.js +257 -0
- package/modern/hooks/features/rows/useGridRows.js +7 -1
- package/modern/hooks/features/scroll/useGridScroll.js +19 -19
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/modern/hooks/utils/useGridApiEventHandler.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +2 -0
- package/modern/locales/bgBG.js +8 -9
- package/modern/locales/deDE.js +4 -4
- package/modern/locales/frFR.js +4 -4
- package/modern/locales/hrHR.js +69 -46
- package/modern/locales/jaJP.js +1 -2
- package/modern/locales/ptPT.js +4 -4
- package/modern/locales/viVN.js +20 -20
- package/modern/utils/createSelector.js +6 -0
- package/modern/utils/domUtils.js +12 -12
- package/node/DataGrid/DataGrid.js +16 -1
- package/node/DataGrid/useDataGridComponent.js +3 -0
- package/node/DataGrid/useDataGridProps.js +2 -1
- package/node/components/GridRow.js +1 -0
- package/node/components/cell/GridCell.js +33 -9
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +12 -4
- package/node/components/containers/GridRoot.js +1 -1
- package/node/components/containers/GridRootStyles.js +32 -23
- package/node/components/containers/GridToolbarContainer.js +1 -1
- package/node/components/menu/GridMenu.js +1 -1
- package/node/components/panel/GridPanel.js +1 -1
- package/node/components/panel/GridPanelContent.js +1 -1
- package/node/components/panel/GridPanelFooter.js +1 -1
- package/node/components/panel/GridPanelHeader.js +1 -1
- package/node/components/panel/GridPanelWrapper.js +1 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/node/components/virtualization/GridBottomContainer.js +18 -1
- package/node/components/virtualization/GridMainContainer.js +3 -1
- package/node/components/virtualization/GridTopContainer.js +1 -1
- package/node/components/virtualization/GridVirtualScrollbar.js +1 -7
- package/node/components/virtualization/GridVirtualScroller.js +1 -0
- package/node/components/virtualization/GridVirtualScrollerFiller.js +3 -4
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +11 -11
- package/node/hooks/features/columnResize/useGridColumnResize.js +6 -6
- package/node/hooks/features/columns/gridColumnsUtils.js +3 -2
- package/node/hooks/features/dimensions/useGridDimensions.js +4 -1
- package/node/hooks/features/editing/useGridCellEditing.js +3 -19
- package/node/hooks/features/editing/useGridRowEditing.js +7 -2
- package/node/hooks/features/editing/utils.js +22 -0
- package/node/hooks/features/export/useGridPrintExport.js +2 -1
- package/node/hooks/features/focus/useGridFocus.js +2 -1
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +16 -53
- package/node/hooks/features/keyboardNavigation/utils.js +68 -0
- package/node/hooks/features/rowSelection/useGridRowSelection.js +102 -26
- package/node/hooks/features/rowSelection/utils.js +160 -1
- package/node/hooks/features/rows/gridRowSpanningSelectors.js +11 -0
- package/node/hooks/features/rows/gridRowSpanningUtils.js +52 -0
- package/node/hooks/features/rows/useGridRowSpanning.js +267 -0
- package/node/hooks/features/rows/useGridRows.js +7 -1
- package/node/hooks/features/scroll/useGridScroll.js +19 -19
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +17 -7
- package/node/hooks/utils/useGridApiEventHandler.js +0 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +38 -15
- package/node/locales/bgBG.js +8 -9
- package/node/locales/deDE.js +4 -4
- package/node/locales/frFR.js +4 -4
- package/node/locales/hrHR.js +69 -46
- package/node/locales/jaJP.js +1 -2
- package/node/locales/ptPT.js +4 -4
- package/node/locales/viVN.js +20 -20
- package/node/utils/createSelector.js +6 -0
- package/node/utils/domUtils.js +12 -12
- package/package.json +3 -3
- package/utils/createSelector.js +6 -0
- package/utils/domUtils.d.ts +4 -4
- package/utils/domUtils.js +12 -12
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getCellValue = void 0;
|
|
7
|
+
exports.getUnprocessedRange = getUnprocessedRange;
|
|
8
|
+
exports.isRowContextInitialized = isRowContextInitialized;
|
|
9
|
+
exports.isRowRangeUpdated = isRowRangeUpdated;
|
|
10
|
+
function getUnprocessedRange(testRange, processedRange) {
|
|
11
|
+
if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
// Overflowing at the end
|
|
15
|
+
// Example: testRange={ firstRowIndex: 10, lastRowIndex: 20 }, processedRange={ firstRowIndex: 0, lastRowIndex: 15 }
|
|
16
|
+
// Unprocessed Range={ firstRowIndex: 16, lastRowIndex: 20 }
|
|
17
|
+
if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex > processedRange.lastRowIndex) {
|
|
18
|
+
return {
|
|
19
|
+
firstRowIndex: processedRange.lastRowIndex,
|
|
20
|
+
lastRowIndex: testRange.lastRowIndex
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
// Overflowing at the beginning
|
|
24
|
+
// Example: testRange={ firstRowIndex: 0, lastRowIndex: 20 }, processedRange={ firstRowIndex: 16, lastRowIndex: 30 }
|
|
25
|
+
// Unprocessed Range={ firstRowIndex: 0, lastRowIndex: 15 }
|
|
26
|
+
if (testRange.firstRowIndex < processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {
|
|
27
|
+
return {
|
|
28
|
+
firstRowIndex: testRange.firstRowIndex,
|
|
29
|
+
lastRowIndex: processedRange.firstRowIndex - 1
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
// TODO: Should return two ranges handle overflowing at both ends ?
|
|
33
|
+
return testRange;
|
|
34
|
+
}
|
|
35
|
+
function isRowContextInitialized(renderContext) {
|
|
36
|
+
return renderContext.firstRowIndex !== 0 || renderContext.lastRowIndex !== 0;
|
|
37
|
+
}
|
|
38
|
+
function isRowRangeUpdated(range1, range2) {
|
|
39
|
+
return range1.firstRowIndex !== range2.firstRowIndex || range1.lastRowIndex !== range2.lastRowIndex;
|
|
40
|
+
}
|
|
41
|
+
const getCellValue = (row, colDef, apiRef) => {
|
|
42
|
+
if (!row) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
let cellValue = row[colDef.field];
|
|
46
|
+
const valueGetter = colDef.rowSpanValueGetter ?? colDef.valueGetter;
|
|
47
|
+
if (valueGetter) {
|
|
48
|
+
cellValue = valueGetter(cellValue, row, colDef, apiRef);
|
|
49
|
+
}
|
|
50
|
+
return cellValue;
|
|
51
|
+
};
|
|
52
|
+
exports.getCellValue = getCellValue;
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.useGridRowSpanning = exports.rowSpanningStateInitializer = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
|
|
12
|
+
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
13
|
+
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
14
|
+
var _gridVirtualizationSelectors = require("../virtualization/gridVirtualizationSelectors");
|
|
15
|
+
var _useGridSelector = require("../../utils/useGridSelector");
|
|
16
|
+
var _gridRowSpanningUtils = require("./gridRowSpanningUtils");
|
|
17
|
+
const EMPTY_STATE = {
|
|
18
|
+
spannedCells: {},
|
|
19
|
+
hiddenCells: {},
|
|
20
|
+
hiddenCellOriginMap: {}
|
|
21
|
+
};
|
|
22
|
+
const EMPTY_RANGE = {
|
|
23
|
+
firstRowIndex: 0,
|
|
24
|
+
lastRowIndex: 0
|
|
25
|
+
};
|
|
26
|
+
const skippedFields = new Set(['__check__', '__reorder__', '__detail_panel_toggle__']);
|
|
27
|
+
/**
|
|
28
|
+
* Default number of rows to process during state initialization to avoid flickering.
|
|
29
|
+
* Number `20` is arbitrarily chosen to be large enough to cover most of the cases without
|
|
30
|
+
* compromising performance.
|
|
31
|
+
*/
|
|
32
|
+
const DEFAULT_ROWS_TO_PROCESS = 20;
|
|
33
|
+
const computeRowSpanningState = (apiRef, colDefs, visibleRows, range, rangeToProcess, resetState, processedRange) => {
|
|
34
|
+
const spannedCells = resetState ? {} : (0, _extends2.default)({}, apiRef.current.state.rowSpanning.spannedCells);
|
|
35
|
+
const hiddenCells = resetState ? {} : (0, _extends2.default)({}, apiRef.current.state.rowSpanning.hiddenCells);
|
|
36
|
+
const hiddenCellOriginMap = resetState ? {} : (0, _extends2.default)({}, apiRef.current.state.rowSpanning.hiddenCellOriginMap);
|
|
37
|
+
if (resetState) {
|
|
38
|
+
processedRange = EMPTY_RANGE;
|
|
39
|
+
}
|
|
40
|
+
colDefs.forEach(colDef => {
|
|
41
|
+
if (skippedFields.has(colDef.field)) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
for (let index = rangeToProcess.firstRowIndex; index <= rangeToProcess.lastRowIndex; index += 1) {
|
|
45
|
+
const row = visibleRows[index];
|
|
46
|
+
if (hiddenCells[row.id]?.[colDef.field]) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const cellValue = (0, _gridRowSpanningUtils.getCellValue)(row.model, colDef, apiRef);
|
|
50
|
+
if (cellValue == null) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
let spannedRowId = row.id;
|
|
54
|
+
let spannedRowIndex = index;
|
|
55
|
+
let rowSpan = 0;
|
|
56
|
+
|
|
57
|
+
// For first index, also scan in the previous rows to handle the reset state case e.g by sorting
|
|
58
|
+
const backwardsHiddenCells = [];
|
|
59
|
+
if (index === rangeToProcess.firstRowIndex) {
|
|
60
|
+
let prevIndex = index - 1;
|
|
61
|
+
const prevRowEntry = visibleRows[prevIndex];
|
|
62
|
+
while (prevIndex >= range.firstRowIndex && (0, _gridRowSpanningUtils.getCellValue)(prevRowEntry.model, colDef, apiRef) === cellValue) {
|
|
63
|
+
const currentRow = visibleRows[prevIndex + 1];
|
|
64
|
+
if (hiddenCells[currentRow.id]) {
|
|
65
|
+
hiddenCells[currentRow.id][colDef.field] = true;
|
|
66
|
+
} else {
|
|
67
|
+
hiddenCells[currentRow.id] = {
|
|
68
|
+
[colDef.field]: true
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
backwardsHiddenCells.push(index);
|
|
72
|
+
rowSpan += 1;
|
|
73
|
+
spannedRowId = prevRowEntry.id;
|
|
74
|
+
spannedRowIndex = prevIndex;
|
|
75
|
+
prevIndex -= 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
backwardsHiddenCells.forEach(hiddenCellIndex => {
|
|
79
|
+
if (hiddenCellOriginMap[hiddenCellIndex]) {
|
|
80
|
+
hiddenCellOriginMap[hiddenCellIndex][colDef.field] = spannedRowIndex;
|
|
81
|
+
} else {
|
|
82
|
+
hiddenCellOriginMap[hiddenCellIndex] = {
|
|
83
|
+
[colDef.field]: spannedRowIndex
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// Scan the next rows
|
|
89
|
+
let relativeIndex = index + 1;
|
|
90
|
+
while (relativeIndex <= range.lastRowIndex && visibleRows[relativeIndex] && (0, _gridRowSpanningUtils.getCellValue)(visibleRows[relativeIndex].model, colDef, apiRef) === cellValue) {
|
|
91
|
+
const currentRow = visibleRows[relativeIndex];
|
|
92
|
+
if (hiddenCells[currentRow.id]) {
|
|
93
|
+
hiddenCells[currentRow.id][colDef.field] = true;
|
|
94
|
+
} else {
|
|
95
|
+
hiddenCells[currentRow.id] = {
|
|
96
|
+
[colDef.field]: true
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (hiddenCellOriginMap[relativeIndex]) {
|
|
100
|
+
hiddenCellOriginMap[relativeIndex][colDef.field] = spannedRowIndex;
|
|
101
|
+
} else {
|
|
102
|
+
hiddenCellOriginMap[relativeIndex] = {
|
|
103
|
+
[colDef.field]: spannedRowIndex
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
relativeIndex += 1;
|
|
107
|
+
rowSpan += 1;
|
|
108
|
+
}
|
|
109
|
+
if (rowSpan > 0) {
|
|
110
|
+
if (spannedCells[spannedRowId]) {
|
|
111
|
+
spannedCells[spannedRowId][colDef.field] = rowSpan + 1;
|
|
112
|
+
} else {
|
|
113
|
+
spannedCells[spannedRowId] = {
|
|
114
|
+
[colDef.field]: rowSpan + 1
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
processedRange = {
|
|
120
|
+
firstRowIndex: Math.min(processedRange.firstRowIndex, rangeToProcess.firstRowIndex),
|
|
121
|
+
lastRowIndex: Math.max(processedRange.lastRowIndex, rangeToProcess.lastRowIndex)
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
return {
|
|
125
|
+
spannedCells,
|
|
126
|
+
hiddenCells,
|
|
127
|
+
hiddenCellOriginMap,
|
|
128
|
+
processedRange
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @requires columnsStateInitializer (method) - should be initialized before
|
|
134
|
+
* @requires rowsStateInitializer (method) - should be initialized before
|
|
135
|
+
* @requires filterStateInitializer (method) - should be initialized before
|
|
136
|
+
*/
|
|
137
|
+
const rowSpanningStateInitializer = (state, props, apiRef) => {
|
|
138
|
+
if (props.unstable_rowSpanning) {
|
|
139
|
+
const rowIds = state.rows.dataRowIds || [];
|
|
140
|
+
const orderedFields = state.columns.orderedFields || [];
|
|
141
|
+
const dataRowIdToModelLookup = state.rows.dataRowIdToModelLookup;
|
|
142
|
+
const columnsLookup = state.columns.lookup;
|
|
143
|
+
const isFilteringPending = Boolean(state.filter.filterModel.items.length) || Boolean(state.filter.filterModel.quickFilterValues?.length);
|
|
144
|
+
if (!rowIds.length || !orderedFields.length || !dataRowIdToModelLookup || !columnsLookup || isFilteringPending) {
|
|
145
|
+
return (0, _extends2.default)({}, state, {
|
|
146
|
+
rowSpanning: EMPTY_STATE
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const rangeToProcess = {
|
|
150
|
+
firstRowIndex: 0,
|
|
151
|
+
lastRowIndex: Math.min(DEFAULT_ROWS_TO_PROCESS - 1, Math.max(rowIds.length - 1, 0))
|
|
152
|
+
};
|
|
153
|
+
const rows = rowIds.map(id => ({
|
|
154
|
+
id,
|
|
155
|
+
model: dataRowIdToModelLookup[id]
|
|
156
|
+
}));
|
|
157
|
+
const colDefs = orderedFields.map(field => columnsLookup[field]);
|
|
158
|
+
const {
|
|
159
|
+
spannedCells,
|
|
160
|
+
hiddenCells,
|
|
161
|
+
hiddenCellOriginMap
|
|
162
|
+
} = computeRowSpanningState(apiRef, colDefs, rows, rangeToProcess, rangeToProcess, true, EMPTY_RANGE);
|
|
163
|
+
return (0, _extends2.default)({}, state, {
|
|
164
|
+
rowSpanning: {
|
|
165
|
+
spannedCells,
|
|
166
|
+
hiddenCells,
|
|
167
|
+
hiddenCellOriginMap
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return (0, _extends2.default)({}, state, {
|
|
172
|
+
rowSpanning: EMPTY_STATE
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
exports.rowSpanningStateInitializer = rowSpanningStateInitializer;
|
|
176
|
+
const useGridRowSpanning = (apiRef, props) => {
|
|
177
|
+
const {
|
|
178
|
+
range,
|
|
179
|
+
rows: visibleRows
|
|
180
|
+
} = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef, props);
|
|
181
|
+
const renderContext = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridRenderContextSelector);
|
|
182
|
+
const colDefs = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector);
|
|
183
|
+
const processedRange = (0, _useLazyRef.default)(() => {
|
|
184
|
+
return Object.keys(apiRef.current.state.rowSpanning.spannedCells).length > 0 ? {
|
|
185
|
+
firstRowIndex: 0,
|
|
186
|
+
lastRowIndex: Math.min(DEFAULT_ROWS_TO_PROCESS - 1, Math.max(apiRef.current.state.rows.dataRowIds.length - 1, 0))
|
|
187
|
+
} : EMPTY_RANGE;
|
|
188
|
+
});
|
|
189
|
+
const lastRange = React.useRef(EMPTY_RANGE);
|
|
190
|
+
const updateRowSpanningState = React.useCallback(
|
|
191
|
+
// A reset needs to occur when:
|
|
192
|
+
// - The `unstable_rowSpanning` prop is updated (feature flag)
|
|
193
|
+
// - The filtering is applied
|
|
194
|
+
// - The sorting is applied
|
|
195
|
+
// - The `paginationModel` is updated
|
|
196
|
+
// - The rows are updated
|
|
197
|
+
(resetState = true) => {
|
|
198
|
+
if (!props.unstable_rowSpanning) {
|
|
199
|
+
if (apiRef.current.state.rowSpanning !== EMPTY_STATE) {
|
|
200
|
+
apiRef.current.setState(state => (0, _extends2.default)({}, state, {
|
|
201
|
+
rowSpanning: EMPTY_STATE
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (range === null || !(0, _gridRowSpanningUtils.isRowContextInitialized)(renderContext)) {
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (resetState) {
|
|
210
|
+
processedRange.current = EMPTY_RANGE;
|
|
211
|
+
}
|
|
212
|
+
const rangeToProcess = (0, _gridRowSpanningUtils.getUnprocessedRange)({
|
|
213
|
+
firstRowIndex: renderContext.firstRowIndex,
|
|
214
|
+
lastRowIndex: renderContext.lastRowIndex - 1
|
|
215
|
+
}, processedRange.current);
|
|
216
|
+
if (rangeToProcess === null) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
const {
|
|
220
|
+
spannedCells,
|
|
221
|
+
hiddenCells,
|
|
222
|
+
hiddenCellOriginMap,
|
|
223
|
+
processedRange: newProcessedRange
|
|
224
|
+
} = computeRowSpanningState(apiRef, colDefs, visibleRows, range, rangeToProcess, resetState, processedRange.current);
|
|
225
|
+
processedRange.current = newProcessedRange;
|
|
226
|
+
const newSpannedCellsCount = Object.keys(spannedCells).length;
|
|
227
|
+
const newHiddenCellsCount = Object.keys(hiddenCells).length;
|
|
228
|
+
const currentSpannedCellsCount = Object.keys(apiRef.current.state.rowSpanning.spannedCells).length;
|
|
229
|
+
const currentHiddenCellsCount = Object.keys(apiRef.current.state.rowSpanning.hiddenCells).length;
|
|
230
|
+
const shouldUpdateState = resetState || newSpannedCellsCount !== currentSpannedCellsCount || newHiddenCellsCount !== currentHiddenCellsCount;
|
|
231
|
+
if (!shouldUpdateState) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
apiRef.current.setState(state => {
|
|
235
|
+
return (0, _extends2.default)({}, state, {
|
|
236
|
+
rowSpanning: {
|
|
237
|
+
spannedCells,
|
|
238
|
+
hiddenCells,
|
|
239
|
+
hiddenCellOriginMap
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}, [apiRef, props.unstable_rowSpanning, range, renderContext, visibleRows, colDefs, processedRange]);
|
|
244
|
+
const prevRenderContext = React.useRef(renderContext);
|
|
245
|
+
const isFirstRender = React.useRef(true);
|
|
246
|
+
const shouldResetState = React.useRef(false);
|
|
247
|
+
React.useEffect(() => {
|
|
248
|
+
const firstRender = isFirstRender.current;
|
|
249
|
+
if (isFirstRender.current) {
|
|
250
|
+
isFirstRender.current = false;
|
|
251
|
+
}
|
|
252
|
+
if (range && lastRange.current && (0, _gridRowSpanningUtils.isRowRangeUpdated)(range, lastRange.current)) {
|
|
253
|
+
lastRange.current = range;
|
|
254
|
+
shouldResetState.current = true;
|
|
255
|
+
}
|
|
256
|
+
if (!firstRender && prevRenderContext.current !== renderContext) {
|
|
257
|
+
if ((0, _gridRowSpanningUtils.isRowRangeUpdated)(prevRenderContext.current, renderContext)) {
|
|
258
|
+
updateRowSpanningState(shouldResetState.current);
|
|
259
|
+
shouldResetState.current = false;
|
|
260
|
+
}
|
|
261
|
+
prevRenderContext.current = renderContext;
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
updateRowSpanningState();
|
|
265
|
+
}, [updateRowSpanningState, renderContext, range, lastRange]);
|
|
266
|
+
};
|
|
267
|
+
exports.useGridRowSpanning = useGridRowSpanning;
|
|
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.useGridRows = exports.rowsStateInitializer = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
|
|
11
12
|
var _useGridApiMethod = require("../../utils/useGridApiMethod");
|
|
12
13
|
var _useGridLogger = require("../../utils/useGridLogger");
|
|
13
14
|
var _gridRowsSelector = require("./gridRowsSelector");
|
|
@@ -376,11 +377,16 @@ const useGridRows = (apiRef, props) => {
|
|
|
376
377
|
throttle: false
|
|
377
378
|
});
|
|
378
379
|
}, [logger, apiRef, props.rows, props.getRowId, props.loading, props.rowCount, throttledRowsChange]);
|
|
380
|
+
const previousDataSource = (0, _useLazyRef.default)(() => props.unstable_dataSource);
|
|
379
381
|
const handleStrategyProcessorChange = React.useCallback(methodName => {
|
|
382
|
+
if (props.unstable_dataSource && props.unstable_dataSource !== previousDataSource.current) {
|
|
383
|
+
previousDataSource.current = props.unstable_dataSource;
|
|
384
|
+
return;
|
|
385
|
+
}
|
|
380
386
|
if (methodName === 'rowTreeCreation') {
|
|
381
387
|
groupRows();
|
|
382
388
|
}
|
|
383
|
-
}, [groupRows]);
|
|
389
|
+
}, [groupRows, previousDataSource, props.unstable_dataSource]);
|
|
384
390
|
const handleStrategyActivityChange = React.useCallback(() => {
|
|
385
391
|
// `rowTreeCreation` is the only processor ran when `strategyAvailabilityChange` is fired.
|
|
386
392
|
// All the other processors listen to `rowsSet` which will be published by the `groupRows` method below.
|
|
@@ -20,22 +20,22 @@ var _dimensions = require("../dimensions");
|
|
|
20
20
|
// Similar to https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
|
|
21
21
|
function scrollIntoView(dimensions) {
|
|
22
22
|
const {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
containerSize,
|
|
24
|
+
scrollPosition,
|
|
25
|
+
elementSize,
|
|
26
|
+
elementOffset
|
|
27
27
|
} = dimensions;
|
|
28
|
-
const
|
|
28
|
+
const elementEnd = elementOffset + elementSize;
|
|
29
29
|
// Always scroll to top when cell is higher than viewport to avoid scroll jump
|
|
30
30
|
// See https://github.com/mui/mui-x/issues/4513 and https://github.com/mui/mui-x/issues/4514
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
31
|
+
if (elementSize > containerSize) {
|
|
32
|
+
return elementOffset;
|
|
33
33
|
}
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
34
|
+
if (elementEnd - containerSize > scrollPosition) {
|
|
35
|
+
return elementEnd - containerSize;
|
|
36
36
|
}
|
|
37
|
-
if (
|
|
38
|
-
return
|
|
37
|
+
if (elementOffset < scrollPosition) {
|
|
38
|
+
return elementOffset;
|
|
39
39
|
}
|
|
40
40
|
return undefined;
|
|
41
41
|
}
|
|
@@ -79,10 +79,10 @@ const useGridScroll = (apiRef, props) => {
|
|
|
79
79
|
}
|
|
80
80
|
// When using RTL, `scrollLeft` becomes negative, so we must ensure that we only compare values.
|
|
81
81
|
scrollCoordinates.left = scrollIntoView({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
containerSize: dimensions.viewportOuterSize.width,
|
|
83
|
+
scrollPosition: Math.abs(virtualScrollerRef.current.scrollLeft),
|
|
84
|
+
elementSize: cellWidth,
|
|
85
|
+
elementOffset: columnPositions[params.colIndex]
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
if (params.rowIndex !== undefined) {
|
|
@@ -92,10 +92,10 @@ const useGridScroll = (apiRef, props) => {
|
|
|
92
92
|
const elementIndex = !props.pagination ? params.rowIndex : params.rowIndex - page * pageSize;
|
|
93
93
|
const targetOffsetHeight = rowsMeta.positions[elementIndex + 1] ? rowsMeta.positions[elementIndex + 1] - rowsMeta.positions[elementIndex] : rowsMeta.currentPageTotalHeight - rowsMeta.positions[elementIndex];
|
|
94
94
|
scrollCoordinates.top = scrollIntoView({
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
containerSize: dimensions.viewportInnerSize.height,
|
|
96
|
+
scrollPosition: virtualScrollerRef.current.scrollTop,
|
|
97
|
+
elementSize: targetOffsetHeight,
|
|
98
|
+
elementOffset: rowsMeta.positions[elementIndex]
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
101
|
scrollCoordinates = apiRef.current.unstable_applyPipeProcessors('scrollToIndexes', scrollCoordinates, params);
|
|
@@ -35,6 +35,7 @@ var _gridColumnsUtils = require("../columns/gridColumnsUtils");
|
|
|
35
35
|
var _gridRowsUtils = require("../rows/gridRowsUtils");
|
|
36
36
|
var _gridVirtualizationSelectors = require("./gridVirtualizationSelectors");
|
|
37
37
|
var _useGridVirtualization = require("./useGridVirtualization");
|
|
38
|
+
var _gridRowSpanningSelectors = require("../rows/gridRowSpanningSelectors");
|
|
38
39
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
39
40
|
const MINIMUM_COLUMN_WIDTH = 50;
|
|
40
41
|
var ScrollDirection = /*#__PURE__*/function (ScrollDirection) {
|
|
@@ -336,7 +337,7 @@ const useGridVirtualScroller = () => {
|
|
|
336
337
|
if (!isPinnedSection && frozenContext.current && rowIndexInPage >= frozenContext.current.firstRowIndex && rowIndexInPage < frozenContext.current.lastRowIndex) {
|
|
337
338
|
currentRenderContext = frozenContext.current;
|
|
338
339
|
}
|
|
339
|
-
const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext,
|
|
340
|
+
const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext, pinnedColumns.left.length);
|
|
340
341
|
const showBottomBorder = isLastVisibleInSection && params.position === 'top';
|
|
341
342
|
rows.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.row, (0, _extends2.default)({
|
|
342
343
|
row: model,
|
|
@@ -364,7 +365,7 @@ const useGridVirtualScroller = () => {
|
|
|
364
365
|
if (panel) {
|
|
365
366
|
rows.push(panel);
|
|
366
367
|
}
|
|
367
|
-
if (
|
|
368
|
+
if (params.position === undefined && isLastVisibleInSection) {
|
|
368
369
|
rows.push(apiRef.current.getInfiniteLoadingTriggerElement?.({
|
|
369
370
|
lastRowId: id
|
|
370
371
|
}));
|
|
@@ -459,6 +460,7 @@ function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
|
|
|
459
460
|
const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state);
|
|
460
461
|
const currentPage = (0, _useGridVisibleRows.getVisibleRows)(apiRef, rootProps);
|
|
461
462
|
const visibleColumns = (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef);
|
|
463
|
+
const hiddenCellsOriginMap = (0, _gridRowSpanningSelectors.gridRowSpanningHiddenCellsOriginMapSelector)(apiRef);
|
|
462
464
|
const lastRowId = apiRef.current.state.rows.dataRowIds.at(-1);
|
|
463
465
|
const lastColumn = visibleColumns.at(-1);
|
|
464
466
|
return {
|
|
@@ -479,7 +481,8 @@ function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
|
|
|
479
481
|
rows: currentPage.rows,
|
|
480
482
|
range: currentPage.range,
|
|
481
483
|
pinnedColumns: (0, _gridColumnsSelector.gridVisiblePinnedColumnDefinitionsSelector)(apiRef),
|
|
482
|
-
visibleColumns
|
|
484
|
+
visibleColumns,
|
|
485
|
+
hiddenCellsOriginMap
|
|
483
486
|
};
|
|
484
487
|
}
|
|
485
488
|
function computeRenderContext(inputs, scrollPosition, scrollCache) {
|
|
@@ -497,10 +500,18 @@ function computeRenderContext(inputs, scrollPosition, scrollCache) {
|
|
|
497
500
|
if (inputs.enabledForRows) {
|
|
498
501
|
// Clamp the value because the search may return an index out of bounds.
|
|
499
502
|
// In the last index, this is not needed because Array.slice doesn't include it.
|
|
500
|
-
|
|
503
|
+
let firstRowIndex = Math.min(getNearestIndexToRender(inputs, top, {
|
|
501
504
|
atStart: true,
|
|
502
505
|
lastPosition: inputs.rowsMeta.positions[inputs.rowsMeta.positions.length - 1] + inputs.lastRowHeight
|
|
503
506
|
}), inputs.rowsMeta.positions.length - 1);
|
|
507
|
+
|
|
508
|
+
// If any of the cells in the `firstRowIndex` is hidden due to an extended row span,
|
|
509
|
+
// Make sure the row from where the rowSpan is originated is visible.
|
|
510
|
+
const rowSpanHiddenCellOrigin = inputs.hiddenCellsOriginMap[firstRowIndex];
|
|
511
|
+
if (rowSpanHiddenCellOrigin) {
|
|
512
|
+
const minSpannedRowIndex = Math.min(...Object.values(rowSpanHiddenCellOrigin));
|
|
513
|
+
firstRowIndex = Math.min(firstRowIndex, minSpannedRowIndex);
|
|
514
|
+
}
|
|
504
515
|
const lastRowIndex = inputs.autoHeight ? firstRowIndex + inputs.rows.length : getNearestIndexToRender(inputs, top + inputs.viewportInnerHeight);
|
|
505
516
|
renderContext.firstRowIndex = firstRowIndex;
|
|
506
517
|
renderContext.lastRowIndex = lastRowIndex;
|
|
@@ -654,9 +665,8 @@ function areRenderContextsEqual(context1, context2) {
|
|
|
654
665
|
}
|
|
655
666
|
return context1.firstRowIndex === context2.firstRowIndex && context1.lastRowIndex === context2.lastRowIndex && context1.firstColumnIndex === context2.firstColumnIndex && context1.lastColumnIndex === context2.lastColumnIndex;
|
|
656
667
|
}
|
|
657
|
-
function computeOffsetLeft(columnPositions, renderContext,
|
|
658
|
-
const
|
|
659
|
-
const left = factor * (columnPositions[renderContext.firstColumnIndex] ?? 0) - (columnPositions[pinnedLeftLength] ?? 0);
|
|
668
|
+
function computeOffsetLeft(columnPositions, renderContext, pinnedLeftLength) {
|
|
669
|
+
const left = (columnPositions[renderContext.firstColumnIndex] ?? 0) - (columnPositions[pinnedLeftLength] ?? 0);
|
|
660
670
|
return Math.abs(left);
|
|
661
671
|
}
|
|
662
672
|
function directionForDelta(dx, dy) {
|
|
@@ -101,6 +101,5 @@ const optionsSubscriberOptions = {
|
|
|
101
101
|
isFirst: true
|
|
102
102
|
};
|
|
103
103
|
function useGridApiOptionHandler(apiRef, eventName, handler) {
|
|
104
|
-
// Validate that only one per event name?
|
|
105
104
|
useGridApiEventHandler(apiRef, eventName, handler, optionsSubscriberOptions);
|
|
106
105
|
}
|
package/node/index.js
CHANGED
package/node/internals/index.js
CHANGED
|
@@ -48,6 +48,8 @@ var _exportNames = {
|
|
|
48
48
|
gridEditRowsStateSelector: true,
|
|
49
49
|
useGridRows: true,
|
|
50
50
|
rowsStateInitializer: true,
|
|
51
|
+
useGridRowSpanning: true,
|
|
52
|
+
rowSpanningStateInitializer: true,
|
|
51
53
|
useGridAriaAttributes: true,
|
|
52
54
|
useGridRowAriaAttributes: true,
|
|
53
55
|
useGridRowsPreProcessors: true,
|
|
@@ -78,6 +80,7 @@ var _exportNames = {
|
|
|
78
80
|
EMPTY_DETAIL_PANELS: true,
|
|
79
81
|
useGridColumnResize: true,
|
|
80
82
|
columnResizeStateInitializer: true,
|
|
83
|
+
ROW_SELECTION_PROPAGATION_DEFAULT: true,
|
|
81
84
|
useTimeout: true,
|
|
82
85
|
useGridVisibleRows: true,
|
|
83
86
|
getVisibleRows: true,
|
|
@@ -152,6 +155,12 @@ Object.defineProperty(exports, "GridVirtualScrollerRenderZone", {
|
|
|
152
155
|
return _GridVirtualScrollerRenderZone.GridVirtualScrollerRenderZone;
|
|
153
156
|
}
|
|
154
157
|
});
|
|
158
|
+
Object.defineProperty(exports, "ROW_SELECTION_PROPAGATION_DEFAULT", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function () {
|
|
161
|
+
return _utils.ROW_SELECTION_PROPAGATION_DEFAULT;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
155
164
|
Object.defineProperty(exports, "buildRootGroup", {
|
|
156
165
|
enumerable: true,
|
|
157
166
|
get: function () {
|
|
@@ -215,7 +224,7 @@ Object.defineProperty(exports, "createSelectorV8", {
|
|
|
215
224
|
Object.defineProperty(exports, "defaultGetRowsToExport", {
|
|
216
225
|
enumerable: true,
|
|
217
226
|
get: function () {
|
|
218
|
-
return
|
|
227
|
+
return _utils2.defaultGetRowsToExport;
|
|
219
228
|
}
|
|
220
229
|
});
|
|
221
230
|
Object.defineProperty(exports, "densityStateInitializer", {
|
|
@@ -269,7 +278,7 @@ Object.defineProperty(exports, "getActiveElement", {
|
|
|
269
278
|
Object.defineProperty(exports, "getColumnsToExport", {
|
|
270
279
|
enumerable: true,
|
|
271
280
|
get: function () {
|
|
272
|
-
return
|
|
281
|
+
return _utils2.getColumnsToExport;
|
|
273
282
|
}
|
|
274
283
|
});
|
|
275
284
|
Object.defineProperty(exports, "getGridFilter", {
|
|
@@ -398,6 +407,12 @@ Object.defineProperty(exports, "rowSelectionStateInitializer", {
|
|
|
398
407
|
return _useGridRowSelection.rowSelectionStateInitializer;
|
|
399
408
|
}
|
|
400
409
|
});
|
|
410
|
+
Object.defineProperty(exports, "rowSpanningStateInitializer", {
|
|
411
|
+
enumerable: true,
|
|
412
|
+
get: function () {
|
|
413
|
+
return _useGridRowSpanning.rowSpanningStateInitializer;
|
|
414
|
+
}
|
|
415
|
+
});
|
|
401
416
|
Object.defineProperty(exports, "rowsMetaStateInitializer", {
|
|
402
417
|
enumerable: true,
|
|
403
418
|
get: function () {
|
|
@@ -596,6 +611,12 @@ Object.defineProperty(exports, "useGridRowSelectionPreProcessors", {
|
|
|
596
611
|
return _useGridRowSelectionPreProcessors.useGridRowSelectionPreProcessors;
|
|
597
612
|
}
|
|
598
613
|
});
|
|
614
|
+
Object.defineProperty(exports, "useGridRowSpanning", {
|
|
615
|
+
enumerable: true,
|
|
616
|
+
get: function () {
|
|
617
|
+
return _useGridRowSpanning.useGridRowSpanning;
|
|
618
|
+
}
|
|
619
|
+
});
|
|
599
620
|
Object.defineProperty(exports, "useGridRows", {
|
|
600
621
|
enumerable: true,
|
|
601
622
|
get: function () {
|
|
@@ -723,6 +744,7 @@ var _useGridPreferencesPanel = require("../hooks/features/preferencesPanel/useGr
|
|
|
723
744
|
var _useGridEditing = require("../hooks/features/editing/useGridEditing");
|
|
724
745
|
var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
|
|
725
746
|
var _useGridRows = require("../hooks/features/rows/useGridRows");
|
|
747
|
+
var _useGridRowSpanning = require("../hooks/features/rows/useGridRowSpanning");
|
|
726
748
|
var _useGridAriaAttributes = require("../hooks/utils/useGridAriaAttributes");
|
|
727
749
|
var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAttributes");
|
|
728
750
|
var _useGridRowsPreProcessors = require("../hooks/features/rows/useGridRowsPreProcessors");
|
|
@@ -752,10 +774,11 @@ Object.keys(_virtualization).forEach(function (key) {
|
|
|
752
774
|
});
|
|
753
775
|
});
|
|
754
776
|
var _useGridColumnResize = require("../hooks/features/columnResize/useGridColumnResize");
|
|
777
|
+
var _utils = require("../hooks/features/rowSelection/utils");
|
|
755
778
|
var _useTimeout = require("../hooks/utils/useTimeout");
|
|
756
779
|
var _useGridVisibleRows = require("../hooks/utils/useGridVisibleRows");
|
|
757
780
|
var _useGridInitializeState = require("../hooks/utils/useGridInitializeState");
|
|
758
|
-
var
|
|
781
|
+
var _utils2 = require("../hooks/features/export/utils");
|
|
759
782
|
var _createControllablePromise = require("../utils/createControllablePromise");
|
|
760
783
|
Object.keys(_createControllablePromise).forEach(function (key) {
|
|
761
784
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -772,15 +795,15 @@ var _createSelector = require("../utils/createSelector");
|
|
|
772
795
|
var _useGridSelector = require("../hooks/utils/useGridSelector");
|
|
773
796
|
var _domUtils = require("../utils/domUtils");
|
|
774
797
|
var _keyboardUtils = require("../utils/keyboardUtils");
|
|
775
|
-
var
|
|
776
|
-
Object.keys(
|
|
798
|
+
var _utils3 = require("../utils/utils");
|
|
799
|
+
Object.keys(_utils3).forEach(function (key) {
|
|
777
800
|
if (key === "default" || key === "__esModule") return;
|
|
778
801
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
779
|
-
if (key in exports && exports[key] ===
|
|
802
|
+
if (key in exports && exports[key] === _utils3[key]) return;
|
|
780
803
|
Object.defineProperty(exports, key, {
|
|
781
804
|
enumerable: true,
|
|
782
805
|
get: function () {
|
|
783
|
-
return
|
|
806
|
+
return _utils3[key];
|
|
784
807
|
}
|
|
785
808
|
});
|
|
786
809
|
});
|
|
@@ -810,28 +833,28 @@ Object.keys(_cellBorderUtils).forEach(function (key) {
|
|
|
810
833
|
});
|
|
811
834
|
});
|
|
812
835
|
var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext");
|
|
813
|
-
var
|
|
814
|
-
Object.keys(
|
|
836
|
+
var _utils4 = require("../hooks/utils");
|
|
837
|
+
Object.keys(_utils4).forEach(function (key) {
|
|
815
838
|
if (key === "default" || key === "__esModule") return;
|
|
816
839
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
817
|
-
if (key in exports && exports[key] ===
|
|
840
|
+
if (key in exports && exports[key] === _utils4[key]) return;
|
|
818
841
|
Object.defineProperty(exports, key, {
|
|
819
842
|
enumerable: true,
|
|
820
843
|
get: function () {
|
|
821
|
-
return
|
|
844
|
+
return _utils4[key];
|
|
822
845
|
}
|
|
823
846
|
});
|
|
824
847
|
});
|
|
825
848
|
var _csvSerializer = require("../hooks/features/export/serializers/csvSerializer");
|
|
826
|
-
var
|
|
827
|
-
Object.keys(
|
|
849
|
+
var _utils5 = require("./utils");
|
|
850
|
+
Object.keys(_utils5).forEach(function (key) {
|
|
828
851
|
if (key === "default" || key === "__esModule") return;
|
|
829
852
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
830
|
-
if (key in exports && exports[key] ===
|
|
853
|
+
if (key in exports && exports[key] === _utils5[key]) return;
|
|
831
854
|
Object.defineProperty(exports, key, {
|
|
832
855
|
enumerable: true,
|
|
833
856
|
get: function () {
|
|
834
|
-
return
|
|
857
|
+
return _utils5[key];
|
|
835
858
|
}
|
|
836
859
|
});
|
|
837
860
|
});
|