@mui/x-data-grid-pro 8.0.0-beta.2 → 8.0.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 +423 -96
- package/DataGridPro/DataGridPro.js +31 -24
- package/DataGridPro/useDataGridProComponent.d.ts +2 -2
- package/DataGridPro/useDataGridProComponent.js +2 -3
- package/DataGridPro/useDataGridProProps.js +1 -1
- package/esm/DataGridPro/DataGridPro.js +32 -25
- package/esm/DataGridPro/useDataGridProComponent.d.ts +2 -2
- package/esm/DataGridPro/useDataGridProComponent.js +2 -3
- package/esm/DataGridPro/useDataGridProProps.js +1 -1
- package/esm/hooks/features/columnPinning/useGridColumnPinning.js +2 -2
- package/esm/hooks/features/columnReorder/useGridColumnReorder.js +8 -8
- package/esm/hooks/features/dataSource/useGridDataSourceBasePro.d.ts +3 -6
- package/esm/hooks/features/dataSource/useGridDataSourceBasePro.js +36 -8
- package/esm/hooks/features/dataSource/useGridDataSourcePro.js +1 -1
- package/esm/hooks/features/dataSource/utils.d.ts +3 -2
- package/esm/hooks/features/dataSource/utils.js +13 -1
- package/esm/hooks/features/detailPanel/useGridDetailPanel.js +4 -4
- package/esm/hooks/features/infiniteLoader/useGridInfiniteLoader.js +2 -2
- package/esm/hooks/features/lazyLoader/useGridLazyLoader.d.ts +1 -1
- package/esm/hooks/features/lazyLoader/useGridLazyLoader.js +5 -5
- package/esm/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.ts +1 -1
- package/esm/hooks/features/rowPinning/useGridRowPinning.d.ts +1 -1
- package/esm/hooks/features/rowReorder/useGridRowReorder.js +6 -6
- package/esm/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.js +90 -18
- package/esm/hooks/features/treeData/useGridTreeData.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +1 -0
- package/esm/internals/index.js +1 -0
- package/esm/material/icons.d.ts +3 -6
- package/esm/material/icons.js +1 -1
- package/esm/material/index.d.ts +2 -2
- package/esm/models/dataGridProProps.d.ts +8 -8
- package/esm/models/gridProIconSlotsComponent.d.ts +6 -3
- package/esm/package.json +1 -1
- package/hooks/features/columnPinning/useGridColumnPinning.js +1 -1
- package/hooks/features/columnReorder/useGridColumnReorder.js +7 -7
- package/hooks/features/dataSource/useGridDataSourceBasePro.d.ts +3 -6
- package/hooks/features/dataSource/useGridDataSourceBasePro.js +34 -6
- package/hooks/features/dataSource/useGridDataSourcePro.js +1 -1
- package/hooks/features/dataSource/utils.d.ts +3 -2
- package/hooks/features/dataSource/utils.js +15 -2
- package/hooks/features/detailPanel/useGridDetailPanel.js +3 -3
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +1 -1
- package/hooks/features/lazyLoader/useGridLazyLoader.d.ts +1 -1
- package/hooks/features/lazyLoader/useGridLazyLoader.js +4 -4
- package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.ts +1 -1
- package/hooks/features/rowPinning/useGridRowPinning.d.ts +1 -1
- package/hooks/features/rowReorder/useGridRowReorder.js +5 -5
- package/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.js +89 -17
- package/hooks/features/treeData/useGridTreeData.js +1 -1
- package/index.js +1 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +15 -7
- package/material/icons.d.ts +3 -6
- package/material/icons.js +3 -3
- package/material/index.d.ts +2 -2
- package/models/dataGridProProps.d.ts +8 -8
- package/models/gridProIconSlotsComponent.d.ts +6 -3
- package/package.json +11 -17
- package/esm/utils/releaseInfo.d.ts +0 -1
- package/esm/utils/releaseInfo.js +0 -13
- package/modern/DataGridPro/DataGrid.d.ts +0 -8
- package/modern/DataGridPro/DataGrid.js +0 -19
- package/modern/DataGridPro/DataGridPro.d.ts +0 -16
- package/modern/DataGridPro/DataGridPro.js +0 -1014
- package/modern/DataGridPro/index.d.ts +0 -3
- package/modern/DataGridPro/index.js +0 -3
- package/modern/DataGridPro/useDataGridProComponent.d.ts +0 -4
- package/modern/DataGridPro/useDataGridProComponent.js +0 -105
- package/modern/DataGridPro/useDataGridProProps.d.ts +0 -7
- package/modern/DataGridPro/useDataGridProProps.js +0 -54
- package/modern/components/GridColumnHeaders.d.ts +0 -5
- package/modern/components/GridColumnHeaders.js +0 -92
- package/modern/components/GridColumnMenuPinningItem.d.ts +0 -7
- package/modern/components/GridColumnMenuPinningItem.js +0 -77
- package/modern/components/GridDataSourceTreeDataGroupingCell.d.ts +0 -12
- package/modern/components/GridDataSourceTreeDataGroupingCell.js +0 -107
- package/modern/components/GridDetailPanel.d.ts +0 -14
- package/modern/components/GridDetailPanel.js +0 -53
- package/modern/components/GridDetailPanelToggleCell.d.ts +0 -7
- package/modern/components/GridDetailPanelToggleCell.js +0 -121
- package/modern/components/GridDetailPanels.d.ts +0 -3
- package/modern/components/GridDetailPanels.js +0 -67
- package/modern/components/GridPinnedRows.d.ts +0 -6
- package/modern/components/GridPinnedRows.js +0 -40
- package/modern/components/GridProColumnMenu.d.ts +0 -24
- package/modern/components/GridProColumnMenu.js +0 -21
- package/modern/components/GridRowReorderCell.d.ts +0 -8
- package/modern/components/GridRowReorderCell.js +0 -140
- package/modern/components/GridTreeDataGroupingCell.d.ts +0 -15
- package/modern/components/GridTreeDataGroupingCell.js +0 -133
- package/modern/components/headerFiltering/GridHeaderFilterCell.d.ts +0 -26
- package/modern/components/headerFiltering/GridHeaderFilterCell.js +0 -362
- package/modern/components/headerFiltering/GridHeaderFilterClearButton.d.ts +0 -6
- package/modern/components/headerFiltering/GridHeaderFilterClearButton.js +0 -17
- package/modern/components/headerFiltering/GridHeaderFilterMenu.d.ts +0 -30
- package/modern/components/headerFiltering/GridHeaderFilterMenu.js +0 -137
- package/modern/components/headerFiltering/GridHeaderFilterMenuContainer.d.ts +0 -17
- package/modern/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -138
- package/modern/components/headerFiltering/index.d.ts +0 -3
- package/modern/components/headerFiltering/index.js +0 -3
- package/modern/components/index.d.ts +0 -6
- package/modern/components/index.js +0 -7
- package/modern/components/reexports.d.ts +0 -1
- package/modern/components/reexports.js +0 -1
- package/modern/constants/dataGridProDefaultSlotsComponents.d.ts +0 -2
- package/modern/constants/dataGridProDefaultSlotsComponents.js +0 -17
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +0 -12
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +0 -143
- package/modern/hooks/features/columnPinning/gridColumnPinningInterface.d.ts +0 -40
- package/modern/hooks/features/columnPinning/gridColumnPinningInterface.js +0 -1
- package/modern/hooks/features/columnPinning/index.d.ts +0 -1
- package/modern/hooks/features/columnPinning/index.js +0 -1
- package/modern/hooks/features/columnPinning/useGridColumnPinning.d.ts +0 -6
- package/modern/hooks/features/columnPinning/useGridColumnPinning.js +0 -228
- package/modern/hooks/features/columnPinning/useGridColumnPinningPreProcessors.d.ts +0 -4
- package/modern/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +0 -105
- package/modern/hooks/features/columnReorder/columnReorderInterfaces.d.ts +0 -6
- package/modern/hooks/features/columnReorder/columnReorderInterfaces.js +0 -1
- package/modern/hooks/features/columnReorder/columnReorderSelector.d.ts +0 -3
- package/modern/hooks/features/columnReorder/columnReorderSelector.js +0 -3
- package/modern/hooks/features/columnReorder/index.d.ts +0 -2
- package/modern/hooks/features/columnReorder/index.js +0 -2
- package/modern/hooks/features/columnReorder/useGridColumnReorder.d.ts +0 -9
- package/modern/hooks/features/columnReorder/useGridColumnReorder.js +0 -242
- package/modern/hooks/features/dataSource/gridDataSourceSelector.d.ts +0 -7
- package/modern/hooks/features/dataSource/gridDataSourceSelector.js +0 -6
- package/modern/hooks/features/dataSource/models.d.ts +0 -75
- package/modern/hooks/features/dataSource/models.js +0 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBasePro.d.ts +0 -33
- package/modern/hooks/features/dataSource/useGridDataSourceBasePro.js +0 -179
- package/modern/hooks/features/dataSource/useGridDataSourcePro.d.ts +0 -6
- package/modern/hooks/features/dataSource/useGridDataSourcePro.js +0 -35
- package/modern/hooks/features/dataSource/utils.d.ts +0 -29
- package/modern/hooks/features/dataSource/utils.js +0 -82
- package/modern/hooks/features/detailPanel/gridDetailPanelInterface.d.ts +0 -41
- package/modern/hooks/features/detailPanel/gridDetailPanelInterface.js +0 -1
- package/modern/hooks/features/detailPanel/gridDetailPanelSelector.d.ts +0 -14
- package/modern/hooks/features/detailPanel/gridDetailPanelSelector.js +0 -5
- package/modern/hooks/features/detailPanel/gridDetailPanelToggleColDef.d.ts +0 -4
- package/modern/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +0 -34
- package/modern/hooks/features/detailPanel/index.d.ts +0 -3
- package/modern/hooks/features/detailPanel/index.js +0 -3
- package/modern/hooks/features/detailPanel/useGridDetailPanel.d.ts +0 -6
- package/modern/hooks/features/detailPanel/useGridDetailPanel.js +0 -191
- package/modern/hooks/features/detailPanel/useGridDetailPanelPreProcessors.d.ts +0 -4
- package/modern/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +0 -43
- package/modern/hooks/features/index.d.ts +0 -7
- package/modern/hooks/features/index.js +0 -8
- package/modern/hooks/features/infiniteLoader/useGridInfiniteLoader.d.ts +0 -9
- package/modern/hooks/features/infiniteLoader/useGridInfiniteLoader.js +0 -104
- package/modern/hooks/features/lazyLoader/useGridLazyLoader.d.ts +0 -10
- package/modern/hooks/features/lazyLoader/useGridLazyLoader.js +0 -90
- package/modern/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.ts +0 -5
- package/modern/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +0 -34
- package/modern/hooks/features/lazyLoader/utils.d.ts +0 -18
- package/modern/hooks/features/lazyLoader/utils.js +0 -34
- package/modern/hooks/features/rowPinning/gridRowPinningInterface.d.ts +0 -17
- package/modern/hooks/features/rowPinning/gridRowPinningInterface.js +0 -1
- package/modern/hooks/features/rowPinning/gridRowPinningSelector.d.ts +0 -1
- package/modern/hooks/features/rowPinning/gridRowPinningSelector.js +0 -1
- package/modern/hooks/features/rowPinning/index.d.ts +0 -1
- package/modern/hooks/features/rowPinning/index.js +0 -1
- package/modern/hooks/features/rowPinning/useGridRowPinning.d.ts +0 -6
- package/modern/hooks/features/rowPinning/useGridRowPinning.js +0 -52
- package/modern/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +0 -38
- package/modern/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +0 -119
- package/modern/hooks/features/rowReorder/gridRowReorderColDef.d.ts +0 -2
- package/modern/hooks/features/rowReorder/gridRowReorderColDef.js +0 -20
- package/modern/hooks/features/rowReorder/index.d.ts +0 -1
- package/modern/hooks/features/rowReorder/index.js +0 -1
- package/modern/hooks/features/rowReorder/useGridRowReorder.d.ts +0 -8
- package/modern/hooks/features/rowReorder/useGridRowReorder.js +0 -141
- package/modern/hooks/features/rowReorder/useGridRowReorderPreProcessors.d.ts +0 -4
- package/modern/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +0 -46
- package/modern/hooks/features/rows/index.d.ts +0 -1
- package/modern/hooks/features/rows/index.js +0 -1
- package/modern/hooks/features/rows/useGridRowAriaAttributes.d.ts +0 -3
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +0 -37
- package/modern/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.d.ts +0 -10
- package/modern/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.js +0 -290
- package/modern/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.d.ts +0 -4
- package/modern/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +0 -148
- package/modern/hooks/features/serverSideTreeData/utils.d.ts +0 -7
- package/modern/hooks/features/serverSideTreeData/utils.js +0 -18
- package/modern/hooks/features/treeData/gridTreeDataGroupColDef.d.ts +0 -8
- package/modern/hooks/features/treeData/gridTreeDataGroupColDef.js +0 -27
- package/modern/hooks/features/treeData/gridTreeDataUtils.d.ts +0 -22
- package/modern/hooks/features/treeData/gridTreeDataUtils.js +0 -95
- package/modern/hooks/features/treeData/index.d.ts +0 -1
- package/modern/hooks/features/treeData/index.js +0 -1
- package/modern/hooks/features/treeData/useGridTreeData.d.ts +0 -4
- package/modern/hooks/features/treeData/useGridTreeData.js +0 -22
- package/modern/hooks/features/treeData/useGridTreeDataPreProcessors.d.ts +0 -4
- package/modern/hooks/features/treeData/useGridTreeDataPreProcessors.js +0 -148
- package/modern/hooks/index.d.ts +0 -1
- package/modern/hooks/index.js +0 -1
- package/modern/hooks/utils/useGridApiContext.d.ts +0 -4
- package/modern/hooks/utils/useGridApiContext.js +0 -2
- package/modern/hooks/utils/useGridApiRef.d.ts +0 -4
- package/modern/hooks/utils/useGridApiRef.js +0 -2
- package/modern/hooks/utils/useGridAriaAttributes.d.ts +0 -2
- package/modern/hooks/utils/useGridAriaAttributes.js +0 -11
- package/modern/hooks/utils/useGridPrivateApiContext.d.ts +0 -2
- package/modern/hooks/utils/useGridPrivateApiContext.js +0 -2
- package/modern/hooks/utils/useGridRootProps.d.ts +0 -2
- package/modern/hooks/utils/useGridRootProps.js +0 -2
- package/modern/index.d.ts +0 -22
- package/modern/index.js +0 -25
- package/modern/internals/index.d.ts +0 -33
- package/modern/internals/index.js +0 -38
- package/modern/internals/propValidation.d.ts +0 -3
- package/modern/internals/propValidation.js +0 -2
- package/modern/locales.d.ts +0 -1
- package/modern/locales.js +0 -1
- package/modern/material/icons.d.ts +0 -6
- package/modern/material/icons.js +0 -17
- package/modern/material/index.d.ts +0 -5
- package/modern/material/index.js +0 -8
- package/modern/models/dataGridProProps.d.ts +0 -222
- package/modern/models/dataGridProProps.js +0 -1
- package/modern/models/gridApiPro.d.ts +0 -11
- package/modern/models/gridApiPro.js +0 -1
- package/modern/models/gridFetchRowsParams.d.ts +0 -22
- package/modern/models/gridFetchRowsParams.js +0 -1
- package/modern/models/gridGroupingColDefOverride.d.ts +0 -30
- package/modern/models/gridGroupingColDefOverride.js +0 -1
- package/modern/models/gridProIconSlotsComponent.d.ts +0 -13
- package/modern/models/gridProIconSlotsComponent.js +0 -1
- package/modern/models/gridProSlotProps.d.ts +0 -8
- package/modern/models/gridProSlotProps.js +0 -1
- package/modern/models/gridProSlotsComponent.d.ts +0 -18
- package/modern/models/gridProSlotsComponent.js +0 -1
- package/modern/models/gridRowOrderChangeParams.d.ts +0 -18
- package/modern/models/gridRowOrderChangeParams.js +0 -1
- package/modern/models/gridRowScrollEndParams.d.ts +0 -18
- package/modern/models/gridRowScrollEndParams.js +0 -1
- package/modern/models/gridStatePro.d.ts +0 -19
- package/modern/models/gridStatePro.js +0 -1
- package/modern/models/index.d.ts +0 -7
- package/modern/models/index.js +0 -7
- package/modern/package.json +0 -1
- package/modern/themeAugmentation/index.d.ts +0 -2
- package/modern/themeAugmentation/index.js +0 -4
- package/modern/themeAugmentation/overrides.d.ts +0 -7
- package/modern/themeAugmentation/overrides.js +0 -1
- package/modern/themeAugmentation/props.d.ts +0 -15
- package/modern/themeAugmentation/props.js +0 -1
- package/modern/typeOverloads/index.d.ts +0 -1
- package/modern/typeOverloads/index.js +0 -1
- package/modern/typeOverloads/modules.d.ts +0 -70
- package/modern/typeOverloads/modules.js +0 -1
- package/modern/typeOverloads/reexports.d.ts +0 -17
- package/modern/typeOverloads/reexports.js +0 -15
- package/modern/utils/index.d.ts +0 -1
- package/modern/utils/index.js +0 -1
- package/modern/utils/releaseInfo.d.ts +0 -1
- package/modern/utils/releaseInfo.js +0 -13
- package/modern/utils/tree/createRowTree.d.ts +0 -17
- package/modern/utils/tree/createRowTree.js +0 -37
- package/modern/utils/tree/index.d.ts +0 -1
- package/modern/utils/tree/index.js +0 -1
- package/modern/utils/tree/insertDataRowInTree.d.ts +0 -69
- package/modern/utils/tree/insertDataRowInTree.js +0 -141
- package/modern/utils/tree/models.d.ts +0 -14
- package/modern/utils/tree/models.js +0 -1
- package/modern/utils/tree/removeDataRowFromTree.d.ts +0 -45
- package/modern/utils/tree/removeDataRowFromTree.js +0 -94
- package/modern/utils/tree/sortRowTree.d.ts +0 -15
- package/modern/utils/tree/sortRowTree.js +0 -114
- package/modern/utils/tree/updateRowTree.d.ts +0 -20
- package/modern/utils/tree/updateRowTree.js +0 -88
- package/modern/utils/tree/utils.d.ts +0 -54
- package/modern/utils/tree/utils.js +0 -197
- package/tsconfig.build.tsbuildinfo +0 -1
- package/utils/releaseInfo.d.ts +0 -1
- package/utils/releaseInfo.js +0 -20
|
@@ -141,10 +141,10 @@ const useGridRowReorder = (apiRef, props) => {
|
|
|
141
141
|
}
|
|
142
142
|
setDragRowId('');
|
|
143
143
|
}, [apiRef, dragRowId, isRowReorderDisabled, logger, sortedRowIndexLookup]);
|
|
144
|
-
(0, _xDataGrid.
|
|
145
|
-
(0, _xDataGrid.
|
|
146
|
-
(0, _xDataGrid.
|
|
147
|
-
(0, _xDataGrid.
|
|
148
|
-
(0, _xDataGrid.
|
|
144
|
+
(0, _xDataGrid.useGridEvent)(apiRef, 'rowDragStart', handleDragStart);
|
|
145
|
+
(0, _xDataGrid.useGridEvent)(apiRef, 'rowDragOver', handleDragOver);
|
|
146
|
+
(0, _xDataGrid.useGridEvent)(apiRef, 'rowDragEnd', handleDragEnd);
|
|
147
|
+
(0, _xDataGrid.useGridEvent)(apiRef, 'cellDragOver', handleDragOver);
|
|
148
|
+
(0, _xDataGrid.useGridEventPriority)(apiRef, 'rowOrderChange', props.onRowOrderChange);
|
|
149
149
|
};
|
|
150
150
|
exports.useGridRowReorder = useGridRowReorder;
|
|
@@ -95,6 +95,7 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
|
|
|
95
95
|
}, [privateApiRef, resetGrid]);
|
|
96
96
|
const addSkeletonRows = React.useCallback(() => {
|
|
97
97
|
const tree = privateApiRef.current.state.rows.tree;
|
|
98
|
+
const dataRowIdToModelLookup = privateApiRef.current.state.rows.dataRowIdToModelLookup;
|
|
98
99
|
const rootGroup = tree[_xDataGrid.GRID_ROOT_GROUP_ID];
|
|
99
100
|
const rootGroupChildren = [...rootGroup.children];
|
|
100
101
|
const pageRowCount = privateApiRef.current.state.pagination.rowCount;
|
|
@@ -102,18 +103,28 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
|
|
|
102
103
|
|
|
103
104
|
/**
|
|
104
105
|
* Do nothing if
|
|
105
|
-
* - rowCount is unknown
|
|
106
106
|
* - children count is 0
|
|
107
|
-
* - children count is equal to rowCount
|
|
108
107
|
*/
|
|
109
|
-
if (
|
|
108
|
+
if (rootChildrenCount === 0) {
|
|
110
109
|
return;
|
|
111
110
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
const pageToSkip = adjustRowParams({
|
|
112
|
+
start: renderedRowsIntervalCache.current.firstRowToRender,
|
|
113
|
+
end: renderedRowsIntervalCache.current.lastRowToRender
|
|
114
|
+
});
|
|
115
|
+
let hasChanged = false;
|
|
116
|
+
const isInitialPage = renderedRowsIntervalCache.current.firstRowToRender === 0 && renderedRowsIntervalCache.current.lastRowToRender === 0;
|
|
117
|
+
for (let i = 0; i < rootChildrenCount; i += 1) {
|
|
118
|
+
if (isInitialPage) {
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
// replace the rows not in the viewport with skeleton rows
|
|
122
|
+
if (pageToSkip.start <= i && i <= pageToSkip.end || tree[rootGroupChildren[i]]?.type === 'skeletonRow') {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
const skeletonId = getSkeletonRowId(i); // to avoid duplicate keys on rebuild
|
|
126
|
+
const removedRow = rootGroupChildren[i];
|
|
127
|
+
rootGroupChildren[i] = skeletonId;
|
|
117
128
|
const skeletonRowNode = {
|
|
118
129
|
type: 'skeletonRow',
|
|
119
130
|
id: skeletonId,
|
|
@@ -121,16 +132,40 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
|
|
|
121
132
|
depth: 0
|
|
122
133
|
};
|
|
123
134
|
tree[skeletonId] = skeletonRowNode;
|
|
135
|
+
delete tree[removedRow];
|
|
136
|
+
delete dataRowIdToModelLookup[removedRow];
|
|
137
|
+
hasChanged = true;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Should only happen with VIEWPORT loading trigger
|
|
141
|
+
if (loadingTrigger.current === LoadingTrigger.VIEWPORT) {
|
|
142
|
+
// fill the grid with skeleton rows
|
|
143
|
+
for (let i = 0; i < pageRowCount - rootChildrenCount; i += 1) {
|
|
144
|
+
const skeletonId = getSkeletonRowId(i + rootChildrenCount); // to avoid duplicate keys on rebuild
|
|
145
|
+
rootGroupChildren.push(skeletonId);
|
|
146
|
+
const skeletonRowNode = {
|
|
147
|
+
type: 'skeletonRow',
|
|
148
|
+
id: skeletonId,
|
|
149
|
+
parent: _xDataGrid.GRID_ROOT_GROUP_ID,
|
|
150
|
+
depth: 0
|
|
151
|
+
};
|
|
152
|
+
tree[skeletonId] = skeletonRowNode;
|
|
153
|
+
hasChanged = true;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (!hasChanged) {
|
|
157
|
+
return;
|
|
124
158
|
}
|
|
125
159
|
tree[_xDataGrid.GRID_ROOT_GROUP_ID] = (0, _extends2.default)({}, rootGroup, {
|
|
126
160
|
children: rootGroupChildren
|
|
127
161
|
});
|
|
128
162
|
privateApiRef.current.setState(state => (0, _extends2.default)({}, state, {
|
|
129
163
|
rows: (0, _extends2.default)({}, state.rows, {
|
|
130
|
-
tree
|
|
164
|
+
tree,
|
|
165
|
+
dataRowIdToModelLookup
|
|
131
166
|
})
|
|
132
167
|
}), 'addSkeletonRows');
|
|
133
|
-
}, [privateApiRef]);
|
|
168
|
+
}, [privateApiRef, adjustRowParams]);
|
|
134
169
|
const updateLoadingTrigger = React.useCallback(rowCount => {
|
|
135
170
|
const newLoadingTrigger = rowCount === -1 ? LoadingTrigger.SCROLL_END : LoadingTrigger.VIEWPORT;
|
|
136
171
|
if (loadingTrigger.current !== null) {
|
|
@@ -149,6 +184,8 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
|
|
|
149
184
|
fetchParams
|
|
150
185
|
} = params;
|
|
151
186
|
const pageRowCount = privateApiRef.current.state.pagination.rowCount;
|
|
187
|
+
const tree = privateApiRef.current.state.rows.tree;
|
|
188
|
+
const dataRowIdToModelLookup = privateApiRef.current.state.rows.dataRowIdToModelLookup;
|
|
152
189
|
if (response.rowCount !== undefined || pageRowCount === undefined) {
|
|
153
190
|
privateApiRef.current.setRowCount(response.rowCount === undefined ? -1 : response.rowCount);
|
|
154
191
|
}
|
|
@@ -161,8 +198,43 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
|
|
|
161
198
|
// the rows can safely be replaced. skeleton rows will be added later
|
|
162
199
|
privateApiRef.current.setRows(response.rows);
|
|
163
200
|
} else {
|
|
201
|
+
const rootGroup = tree[_xDataGrid.GRID_ROOT_GROUP_ID];
|
|
202
|
+
const rootGroupChildren = [...rootGroup.children];
|
|
164
203
|
const filteredSortedRowIds = (0, _xDataGrid.gridFilteredSortedRowIdsSelector)(privateApiRef);
|
|
165
204
|
const startingIndex = typeof fetchParams.start === 'string' ? Math.max(filteredSortedRowIds.indexOf(fetchParams.start), 0) : fetchParams.start;
|
|
205
|
+
|
|
206
|
+
// Check for duplicate rows
|
|
207
|
+
let duplicateRowCount = 0;
|
|
208
|
+
response.rows.forEach(row => {
|
|
209
|
+
const rowId = (0, _xDataGrid.gridRowIdSelector)(privateApiRef, row);
|
|
210
|
+
if (tree[rowId] || dataRowIdToModelLookup[rowId]) {
|
|
211
|
+
const index = rootGroupChildren.indexOf(rowId);
|
|
212
|
+
if (index !== -1) {
|
|
213
|
+
const skeletonId = getSkeletonRowId(index);
|
|
214
|
+
rootGroupChildren[index] = skeletonId;
|
|
215
|
+
tree[skeletonId] = {
|
|
216
|
+
type: 'skeletonRow',
|
|
217
|
+
id: skeletonId,
|
|
218
|
+
parent: _xDataGrid.GRID_ROOT_GROUP_ID,
|
|
219
|
+
depth: 0
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
delete tree[rowId];
|
|
223
|
+
delete dataRowIdToModelLookup[rowId];
|
|
224
|
+
duplicateRowCount += 1;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
if (duplicateRowCount > 0) {
|
|
228
|
+
tree[_xDataGrid.GRID_ROOT_GROUP_ID] = (0, _extends2.default)({}, rootGroup, {
|
|
229
|
+
children: rootGroupChildren
|
|
230
|
+
});
|
|
231
|
+
privateApiRef.current.setState(state => (0, _extends2.default)({}, state, {
|
|
232
|
+
rows: (0, _extends2.default)({}, state.rows, {
|
|
233
|
+
tree,
|
|
234
|
+
dataRowIdToModelLookup
|
|
235
|
+
})
|
|
236
|
+
}));
|
|
237
|
+
}
|
|
166
238
|
privateApiRef.current.unstable_replaceRows(startingIndex, response.rows);
|
|
167
239
|
}
|
|
168
240
|
rowsStale.current = false;
|
|
@@ -212,7 +284,7 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
|
|
|
212
284
|
}
|
|
213
285
|
}, [privateApiRef, props.scrollEndThreshold, adjustRowParams, fetchRows]);
|
|
214
286
|
const handleRenderedRowsIntervalChange = React.useCallback(params => {
|
|
215
|
-
if (rowsStale.current
|
|
287
|
+
if (rowsStale.current) {
|
|
216
288
|
return;
|
|
217
289
|
}
|
|
218
290
|
const sortModel = (0, _xDataGrid.gridSortModelSelector)(privateApiRef);
|
|
@@ -286,12 +358,12 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
|
|
|
286
358
|
setLazyLoadingRowsUpdateStrategyActive(privateApiRef.current.getActiveStrategy(_internals.GridStrategyGroup.DataSource) === _internals.DataSourceRowsUpdateStrategy.LazyLoading);
|
|
287
359
|
}, [privateApiRef]);
|
|
288
360
|
(0, _internals.useGridRegisterStrategyProcessor)(privateApiRef, _internals.DataSourceRowsUpdateStrategy.LazyLoading, 'dataSourceRowsUpdate', handleDataUpdate);
|
|
289
|
-
(0, _xDataGrid.
|
|
290
|
-
(0, _xDataGrid.
|
|
291
|
-
(0, _xDataGrid.
|
|
292
|
-
(0, _xDataGrid.
|
|
293
|
-
(0, _xDataGrid.
|
|
294
|
-
(0, _xDataGrid.
|
|
361
|
+
(0, _xDataGrid.useGridEvent)(privateApiRef, 'strategyAvailabilityChange', handleStrategyActivityChange);
|
|
362
|
+
(0, _xDataGrid.useGridEvent)(privateApiRef, 'rowCountChange', (0, _internals.runIf)(lazyLoadingRowsUpdateStrategyActive, handleRowCountChange));
|
|
363
|
+
(0, _xDataGrid.useGridEvent)(privateApiRef, 'scrollPositionChange', (0, _internals.runIf)(lazyLoadingRowsUpdateStrategyActive, handleScrolling));
|
|
364
|
+
(0, _xDataGrid.useGridEvent)(privateApiRef, 'renderedRowsIntervalChange', (0, _internals.runIf)(lazyLoadingRowsUpdateStrategyActive, throttledHandleRenderedRowsIntervalChange));
|
|
365
|
+
(0, _xDataGrid.useGridEvent)(privateApiRef, 'sortModelChange', (0, _internals.runIf)(lazyLoadingRowsUpdateStrategyActive, handleGridSortModelChange));
|
|
366
|
+
(0, _xDataGrid.useGridEvent)(privateApiRef, 'filterModelChange', (0, _internals.runIf)(lazyLoadingRowsUpdateStrategyActive, handleGridFilterModelChange));
|
|
295
367
|
React.useEffect(() => {
|
|
296
368
|
setStrategyAvailability();
|
|
297
369
|
}, [setStrategyAvailability]);
|
|
@@ -25,6 +25,6 @@ const useGridTreeData = (apiRef, props) => {
|
|
|
25
25
|
apiRef.current.setRowChildrenExpansion(params.id, !params.rowNode.childrenExpanded);
|
|
26
26
|
}
|
|
27
27
|
}, [apiRef, props.dataSource]);
|
|
28
|
-
(0, _xDataGrid.
|
|
28
|
+
(0, _xDataGrid.useGridEvent)(apiRef, 'cellKeyDown', handleCellKeyDown);
|
|
29
29
|
};
|
|
30
30
|
exports.useGridTreeData = useGridTreeData;
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { useGridDataSourceLazyLoader } from "../hooks/features/serverSideLazyLoa
|
|
|
23
23
|
export { dataSourceStateInitializer } from "../hooks/features/dataSource/useGridDataSourcePro.js";
|
|
24
24
|
export { useGridDataSourceBasePro } from "../hooks/features/dataSource/useGridDataSourceBasePro.js";
|
|
25
25
|
export { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from "../hooks/features/dataSource/gridDataSourceSelector.js";
|
|
26
|
+
export { getGroupKeys } from "../hooks/features/dataSource/utils.js";
|
|
26
27
|
export type { GridExperimentalProFeatures, DataGridProPropsWithoutDefaultValue, DataGridProPropsWithDefaultValue } from '../models/dataGridProProps';
|
|
27
28
|
export { createRowTree } from "../utils/tree/createRowTree.js";
|
|
28
29
|
export { updateRowTree } from "../utils/tree/updateRowTree.js";
|
package/internals/index.js
CHANGED
|
@@ -34,6 +34,7 @@ var _exportNames = {
|
|
|
34
34
|
useGridDataSourceBasePro: true,
|
|
35
35
|
gridDataSourceErrorSelector: true,
|
|
36
36
|
gridDataSourceLoadingIdSelector: true,
|
|
37
|
+
getGroupKeys: true,
|
|
37
38
|
createRowTree: true,
|
|
38
39
|
updateRowTree: true,
|
|
39
40
|
sortRowTree: true,
|
|
@@ -91,10 +92,16 @@ Object.defineProperty(exports, "detailPanelStateInitializer", {
|
|
|
91
92
|
return _useGridDetailPanel.detailPanelStateInitializer;
|
|
92
93
|
}
|
|
93
94
|
});
|
|
95
|
+
Object.defineProperty(exports, "getGroupKeys", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () {
|
|
98
|
+
return _utils.getGroupKeys;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
94
101
|
Object.defineProperty(exports, "getVisibleRowsLookup", {
|
|
95
102
|
enumerable: true,
|
|
96
103
|
get: function () {
|
|
97
|
-
return
|
|
104
|
+
return _utils2.getVisibleRowsLookup;
|
|
98
105
|
}
|
|
99
106
|
});
|
|
100
107
|
Object.defineProperty(exports, "gridDataSourceErrorSelector", {
|
|
@@ -112,13 +119,13 @@ Object.defineProperty(exports, "gridDataSourceLoadingIdSelector", {
|
|
|
112
119
|
Object.defineProperty(exports, "insertNodeInTree", {
|
|
113
120
|
enumerable: true,
|
|
114
121
|
get: function () {
|
|
115
|
-
return
|
|
122
|
+
return _utils2.insertNodeInTree;
|
|
116
123
|
}
|
|
117
124
|
});
|
|
118
125
|
Object.defineProperty(exports, "removeNodeFromTree", {
|
|
119
126
|
enumerable: true,
|
|
120
127
|
get: function () {
|
|
121
|
-
return
|
|
128
|
+
return _utils2.removeNodeFromTree;
|
|
122
129
|
}
|
|
123
130
|
});
|
|
124
131
|
Object.defineProperty(exports, "rowPinningStateInitializer", {
|
|
@@ -130,13 +137,13 @@ Object.defineProperty(exports, "rowPinningStateInitializer", {
|
|
|
130
137
|
Object.defineProperty(exports, "skipFiltering", {
|
|
131
138
|
enumerable: true,
|
|
132
139
|
get: function () {
|
|
133
|
-
return
|
|
140
|
+
return _utils3.skipFiltering;
|
|
134
141
|
}
|
|
135
142
|
});
|
|
136
143
|
Object.defineProperty(exports, "skipSorting", {
|
|
137
144
|
enumerable: true,
|
|
138
145
|
get: function () {
|
|
139
|
-
return
|
|
146
|
+
return _utils3.skipSorting;
|
|
140
147
|
}
|
|
141
148
|
});
|
|
142
149
|
Object.defineProperty(exports, "sortRowTree", {
|
|
@@ -307,11 +314,12 @@ var _useGridDataSourceLazyLoader = require("../hooks/features/serverSideLazyLoad
|
|
|
307
314
|
var _useGridDataSourcePro = require("../hooks/features/dataSource/useGridDataSourcePro");
|
|
308
315
|
var _useGridDataSourceBasePro = require("../hooks/features/dataSource/useGridDataSourceBasePro");
|
|
309
316
|
var _gridDataSourceSelector = require("../hooks/features/dataSource/gridDataSourceSelector");
|
|
317
|
+
var _utils = require("../hooks/features/dataSource/utils");
|
|
310
318
|
var _createRowTree = require("../utils/tree/createRowTree");
|
|
311
319
|
var _updateRowTree = require("../utils/tree/updateRowTree");
|
|
312
320
|
var _sortRowTree = require("../utils/tree/sortRowTree");
|
|
313
|
-
var
|
|
314
|
-
var
|
|
321
|
+
var _utils2 = require("../utils/tree/utils");
|
|
322
|
+
var _utils3 = require("../hooks/features/serverSideTreeData/utils");
|
|
315
323
|
var _propValidation = require("./propValidation");
|
|
316
324
|
Object.keys(_propValidation).forEach(function (key) {
|
|
317
325
|
if (key === "default" || key === "__esModule") return;
|
package/material/icons.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const GridPushPinLeftIcon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
5
|
-
muiName: string;
|
|
6
|
-
};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const GridPushPinRightIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
|
3
|
+
export declare const GridPushPinLeftIcon: (props: import("@mui/x-data-grid").GridBaseIconProps) => React.ReactNode;
|
package/material/icons.js
CHANGED
|
@@ -6,16 +6,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.GridPushPinRightIcon = exports.GridPushPinLeftIcon = void 0;
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
10
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
const GridPushPinRightIcon = exports.GridPushPinRightIcon = (0,
|
|
11
|
+
const GridPushPinRightIcon = exports.GridPushPinRightIcon = (0, _internals.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
12
12
|
transform: "rotate(-30 15 10)",
|
|
13
13
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
14
14
|
d: "M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",
|
|
15
15
|
fillRule: "evenodd"
|
|
16
16
|
})
|
|
17
17
|
}), 'PushPinRight');
|
|
18
|
-
const GridPushPinLeftIcon = exports.GridPushPinLeftIcon = (0,
|
|
18
|
+
const GridPushPinLeftIcon = exports.GridPushPinLeftIcon = (0, _internals.createSvgIcon)(/*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
|
|
19
19
|
transform: "rotate(30 8 12)",
|
|
20
20
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
|
21
21
|
d: "M16,9V4l1,0c0.55,0,1-0.45,1-1v0c0-0.55-0.45-1-1-1H7C6.45,2,6,2.45,6,3v0 c0,0.55,0.45,1,1,1l1,0v5c0,1.66-1.34,3-3,3h0v2h5.97v7l1,1l1-1v-7H19v-2h0C17.34,12,16,10.66,16,9z",
|
package/material/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const materialSlots: {
|
|
2
|
-
columnMenuPinLeftIcon: React.JSXElementConstructor<
|
|
3
|
-
columnMenuPinRightIcon: React.JSXElementConstructor<
|
|
2
|
+
columnMenuPinLeftIcon: React.JSXElementConstructor<import("@mui/x-data-grid/models/gridBaseSlots").IconProps>;
|
|
3
|
+
columnMenuPinRightIcon: React.JSXElementConstructor<import("@mui/x-data-grid/models/gridBaseSlots").IconProps>;
|
|
4
4
|
};
|
|
5
5
|
export default materialSlots;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { RefObject } from '@mui/x-internals/types';
|
|
3
|
-
import { GridEventListener, GridCallbackDetails, GridRowParams, GridRowId, GridValidRowModel, GridGroupNode, GridFeatureMode,
|
|
3
|
+
import { GridEventListener, GridCallbackDetails, GridRowParams, GridRowId, GridValidRowModel, GridGroupNode, GridFeatureMode, GridListViewColDef, GridGetRowsError, GridUpdateRowError } from '@mui/x-data-grid';
|
|
4
4
|
import type { GridExperimentalFeatures, DataGridPropsWithoutDefaultValue, DataGridPropsWithDefaultValues, DataGridPropsWithComplexDefaultValueAfterProcessing, DataGridPropsWithComplexDefaultValueBeforeProcessing, GridPinnedColumnFields, DataGridProSharedPropsWithDefaultValue, DataGridProSharedPropsWithoutDefaultValue } from '@mui/x-data-grid/internals';
|
|
5
5
|
import type { GridPinnedRowsProp } from '../hooks/features/rowPinning';
|
|
6
6
|
import { GridApiPro } from "./gridApiPro.js";
|
|
@@ -90,7 +90,7 @@ export interface DataGridProPropsWithDefaultValue<R extends GridValidRowModel =
|
|
|
90
90
|
* Set it to 'client' if you would like enable infnite loading.
|
|
91
91
|
* Set it to 'server' if you would like to enable lazy loading.
|
|
92
92
|
* @default "client"
|
|
93
|
-
* @deprecated Use the {@link https://
|
|
93
|
+
* @deprecated Use the {@link https://mui.com/x/react-data-grid/server-side-data/lazy-loading/#viewport-loading Server-side data-Viewport loading} instead.
|
|
94
94
|
*/
|
|
95
95
|
rowsLoadingMode: GridFeatureMode;
|
|
96
96
|
/**
|
|
@@ -113,9 +113,9 @@ export interface DataGridProPropsWithDefaultValue<R extends GridValidRowModel =
|
|
|
113
113
|
lazyLoadingRequestThrottleMs: number;
|
|
114
114
|
/**
|
|
115
115
|
* If `true`, displays the data in a list view.
|
|
116
|
-
* Use in combination with `
|
|
116
|
+
* Use in combination with `listViewColumn`.
|
|
117
117
|
*/
|
|
118
|
-
|
|
118
|
+
listView: boolean;
|
|
119
119
|
}
|
|
120
120
|
interface DataGridProRegularProps<R extends GridValidRowModel> {
|
|
121
121
|
/**
|
|
@@ -149,7 +149,7 @@ export interface DataGridProPropsWithoutDefaultValue<R extends GridValidRowModel
|
|
|
149
149
|
* @param {GridRowScrollEndParams} params With all properties from [[GridRowScrollEndParams]].
|
|
150
150
|
* @param {MuiEvent<{}>} event The event object.
|
|
151
151
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
152
|
-
* @deprecated Use the {@link https://
|
|
152
|
+
* @deprecated Use the {@link https://mui.com/x/react-data-grid/server-side-data/lazy-loading/#infinite-loading Server-side data-Infinite loading} instead.
|
|
153
153
|
*/
|
|
154
154
|
onRowsScrollEnd?: GridEventListener<'rowsScrollEnd'>;
|
|
155
155
|
/**
|
|
@@ -194,7 +194,7 @@ export interface DataGridProPropsWithoutDefaultValue<R extends GridValidRowModel
|
|
|
194
194
|
* @param {GridFetchRowsParams} params With all properties from [[GridFetchRowsParams]].
|
|
195
195
|
* @param {MuiEvent<{}>} event The event object.
|
|
196
196
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
197
|
-
* @deprecated Use the {@link https://
|
|
197
|
+
* @deprecated Use the {@link https://mui.com/x/react-data-grid/server-side-data/lazy-loading/#viewport-loading Server-side data-Viewport loading} instead.
|
|
198
198
|
*/
|
|
199
199
|
onFetchRows?: GridEventListener<'fetchRows'>;
|
|
200
200
|
/**
|
|
@@ -206,9 +206,9 @@ export interface DataGridProPropsWithoutDefaultValue<R extends GridValidRowModel
|
|
|
206
206
|
*/
|
|
207
207
|
slotProps?: GridProSlotProps;
|
|
208
208
|
/**
|
|
209
|
-
* Definition of the column rendered when the `
|
|
209
|
+
* Definition of the column rendered when the `listView` prop is enabled.
|
|
210
210
|
*/
|
|
211
|
-
|
|
211
|
+
listViewColumn?: GridListViewColDef<R>;
|
|
212
212
|
/**
|
|
213
213
|
* The data source of the Data Grid Pro.
|
|
214
214
|
*/
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { BaseSlots } from '@mui/x-data-grid/internals';
|
|
3
|
+
type IconProps = BaseSlots.IconProps;
|
|
2
4
|
export interface GridProIconSlotsComponent {
|
|
3
5
|
/**
|
|
4
6
|
* Icon displayed in column menu for left pinning
|
|
5
7
|
* @default GridPushPinLeftIcon
|
|
6
8
|
*/
|
|
7
|
-
columnMenuPinLeftIcon: React.JSXElementConstructor<
|
|
9
|
+
columnMenuPinLeftIcon: React.JSXElementConstructor<IconProps>;
|
|
8
10
|
/**
|
|
9
11
|
* Icon displayed in column menu for right pinning
|
|
10
12
|
* @default GridPushPinRightIcon
|
|
11
13
|
*/
|
|
12
|
-
columnMenuPinRightIcon: React.JSXElementConstructor<
|
|
13
|
-
}
|
|
14
|
+
columnMenuPinRightIcon: React.JSXElementConstructor<IconProps>;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "8.0.0
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "The Pro plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"url": "https://github.com/mui/mui-x/issues"
|
|
10
10
|
},
|
|
11
11
|
"homepage": "https://mui.com/x/react-data-grid/",
|
|
12
|
-
"sideEffects":
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"**/*.css"
|
|
14
|
+
],
|
|
13
15
|
"publishConfig": {
|
|
14
16
|
"access": "public",
|
|
15
17
|
"directory": "build"
|
|
@@ -33,21 +35,21 @@
|
|
|
33
35
|
"directory": "packages/x-data-grid-pro"
|
|
34
36
|
},
|
|
35
37
|
"dependencies": {
|
|
36
|
-
"@babel/runtime": "^7.
|
|
37
|
-
"@mui/utils": "^7.0.
|
|
38
|
+
"@babel/runtime": "^7.27.0",
|
|
39
|
+
"@mui/utils": "^7.0.2",
|
|
38
40
|
"@types/format-util": "^1.0.4",
|
|
39
41
|
"clsx": "^2.1.1",
|
|
40
42
|
"prop-types": "^15.8.1",
|
|
41
43
|
"reselect": "^5.1.1",
|
|
42
|
-
"@mui/x-
|
|
43
|
-
"@mui/x-
|
|
44
|
-
"@mui/x-data-grid": "8.0.0
|
|
44
|
+
"@mui/x-internals": "8.0.0",
|
|
45
|
+
"@mui/x-license": "8.0.0",
|
|
46
|
+
"@mui/x-data-grid": "8.0.0"
|
|
45
47
|
},
|
|
46
48
|
"peerDependencies": {
|
|
47
49
|
"@emotion/react": "^11.9.0",
|
|
48
50
|
"@emotion/styled": "^11.8.1",
|
|
49
|
-
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0
|
|
50
|
-
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0
|
|
51
|
+
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
52
|
+
"@mui/system": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
51
53
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
52
54
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
53
55
|
},
|
|
@@ -74,10 +76,6 @@
|
|
|
74
76
|
"import": {
|
|
75
77
|
"types": "./esm/index.d.ts",
|
|
76
78
|
"default": "./esm/index.js"
|
|
77
|
-
},
|
|
78
|
-
"mui-modern": {
|
|
79
|
-
"types": "./modern/index.d.ts",
|
|
80
|
-
"default": "./modern/index.js"
|
|
81
79
|
}
|
|
82
80
|
},
|
|
83
81
|
"./*": {
|
|
@@ -88,10 +86,6 @@
|
|
|
88
86
|
"import": {
|
|
89
87
|
"types": "./esm/*/index.d.ts",
|
|
90
88
|
"default": "./esm/*/index.js"
|
|
91
|
-
},
|
|
92
|
-
"mui-modern": {
|
|
93
|
-
"types": "./modern/*/index.d.ts",
|
|
94
|
-
"default": "./modern/*/index.js"
|
|
95
89
|
}
|
|
96
90
|
},
|
|
97
91
|
"./esm": null,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getReleaseInfo: () => any;
|
package/esm/utils/releaseInfo.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ponyfillGlobal } from '@mui/utils';
|
|
2
|
-
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "MTc0MzExMjgwMDAwMA==";
|
|
4
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
5
|
-
// A simple hack to set the value in the test environment (has no build step).
|
|
6
|
-
// eslint-disable-next-line no-useless-concat
|
|
7
|
-
if (releaseInfo === '__RELEASE' + '_INFO__') {
|
|
8
|
-
// eslint-disable-next-line no-underscore-dangle
|
|
9
|
-
return ponyfillGlobal.__MUI_RELEASE_INFO__;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return releaseInfo;
|
|
13
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Import DataGridPro instead.
|
|
3
|
-
*/
|
|
4
|
-
export function DataGrid() {
|
|
5
|
-
if (process.env.NODE_ENV === 'production') {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
throw new Error(["You try to import Data Grid from @mui/x-data-grid-pro but this module isn't exported from this npm package.", '', "Instead, you can do `import { DataGridPro } from '@mui/x-data-grid-pro'`.", ''].join('\n'));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Import DataGridPro instead.
|
|
13
|
-
*/
|
|
14
|
-
export function DataGridPremium() {
|
|
15
|
-
if (process.env.NODE_ENV === 'production') {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
throw new Error(["You try to import Data Grid Premium from @mui/x-data-grid-pro but this module isn't exported from this npm package.", '', 'Instead, if you have a Premium plan license or want to try Premium, you can do this:', `import { DataGridPremium } from '@mui/x-data-grid-premium'`, '', "Otherwise, you can stay on the Pro plan: `import { DataGridPro } from '@mui/x-data-grid-pro'`.", ''].join('\n'));
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { GridValidRowModel } from '@mui/x-data-grid';
|
|
3
|
-
import { DataGridProProps } from "../models/dataGridProProps.js";
|
|
4
|
-
export type { GridProSlotsComponent as GridSlots } from '../models';
|
|
5
|
-
interface DataGridProComponent {
|
|
6
|
-
<R extends GridValidRowModel = any>(props: DataGridProProps<R> & React.RefAttributes<HTMLDivElement>): React.JSX.Element;
|
|
7
|
-
propTypes?: any;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Features:
|
|
11
|
-
* - [DataGridPro](https://mui.com/x/react-data-grid/features/)
|
|
12
|
-
*
|
|
13
|
-
* API:
|
|
14
|
-
* - [DataGridPro API](https://mui.com/x/api/data-grid/data-grid-pro/)
|
|
15
|
-
*/
|
|
16
|
-
export declare const DataGridPro: DataGridProComponent;
|