@mui/x-data-grid-premium 8.0.0-alpha.2 → 8.0.0-alpha.3
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 +102 -0
- package/DataGridPremium/DataGridPremium.js +14 -10
- package/DataGridPremium/useDataGridPremiumComponent.js +1 -0
- package/esm/DataGridPremium/DataGridPremium.js +14 -10
- package/esm/DataGridPremium/useDataGridPremiumComponent.js +2 -1
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +2 -3
- package/esm/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
- package/esm/hooks/features/rowGrouping/useGridRowGrouping.js +2 -2
- package/esm/hooks/utils/useGridAriaAttributes.js +1 -3
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/cellSelection/useGridCellSelection.js +1 -2
- package/hooks/features/rowGrouping/gridRowGroupingUtils.js +1 -1
- package/hooks/features/rowGrouping/useGridRowGrouping.js +1 -1
- package/hooks/utils/useGridAriaAttributes.js +1 -3
- package/index.js +1 -1
- package/models/dataGridPremiumProps.d.ts +0 -6
- package/modern/DataGridPremium/DataGridPremium.js +14 -10
- package/modern/DataGridPremium/useDataGridPremiumComponent.js +2 -1
- package/modern/hooks/features/cellSelection/useGridCellSelection.js +2 -3
- package/modern/hooks/features/rowGrouping/gridRowGroupingUtils.js +2 -2
- package/modern/hooks/features/rowGrouping/useGridRowGrouping.js +2 -2
- package/modern/hooks/utils/useGridAriaAttributes.js +1 -3
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,108 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.3
|
|
9
|
+
|
|
10
|
+
_Dec 5, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 💫 Support [Server-side lazy loading](https://mui.com/x/react-data-grid/server-side-data/lazy-loading/) on the Data Grid. Use [data source](https://mui.com/x/react-data-grid/server-side-data/#data-source) to fetch a range of rows on demand and update the rows in the same way as described in [Infinite loading](https://mui.com/x/react-data-grid/row-updates/#infinite-loading) and [Lazy loading](https://mui.com/x/react-data-grid/row-updates/#lazy-loading) without the need to use any additional event listeners and callbacks.
|
|
15
|
+
- 🎯 Improved [data caching](https://mui.com/x/react-data-grid/server-side-data/#data-caching). Check out our [recommendations](https://mui.com/x/react-data-grid/server-side-data/#improving-the-cache-hit-rate) for improving the cache hit rate.
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
18
|
+
@ihsanberkozcan, @k-rajat19, @perezShaked.
|
|
19
|
+
Following are all team members who have contributed to this release:
|
|
20
|
+
@arminmeh, @cherniavskii, @flaviendelangle, @JCQuintas, @MBilalShafi, @noraleonte.
|
|
21
|
+
|
|
22
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### Breaking changes
|
|
27
|
+
|
|
28
|
+
- The "Select all" checkbox is now checked when all the selectable rows are selected, ignoring rows that are not selectable because of the `isRowSelectable` prop.
|
|
29
|
+
- The `rowPositionsDebounceMs` prop was removed.
|
|
30
|
+
- The `gridRowsDataRowIdToIdLookupSelector` selector was removed. Use the `gridRowsLookupSelector` selector in combination with the `getRowId()` API method instead.
|
|
31
|
+
```diff
|
|
32
|
+
-const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
|
|
33
|
+
-const rowId = idToIdLookup[id]
|
|
34
|
+
+const rowsLookup = gridRowsLookupSelector(apiRef);
|
|
35
|
+
+const rowId = apiRef.current.getRowId(rowsLookup[id])
|
|
36
|
+
```
|
|
37
|
+
- The Grid is now more aligned with the WAI-ARIA authoring practices and sets the `role` attribute to `treegrid` if the Data Grid is used with row grouping feature.
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid@8.0.0-alpha.3`
|
|
40
|
+
|
|
41
|
+
- [DataGrid] Fix deselection not working with `isRowSelectable` (#15692) @MBilalShafi
|
|
42
|
+
- [DataGrid] Make column autosizing work with flex columns (#15465) @cherniavskii
|
|
43
|
+
- [DataGrid] Remove `gridRowsDataRowIdToIdLookupSelector` selector (#15698) @arminmeh
|
|
44
|
+
- [DataGrid] Remove `rowPositionsDebounceMs` prop (#15482) @k-rajat19
|
|
45
|
+
- [l10n] Improve Hebrew (he-IL) locale (#15699) @perezShaked
|
|
46
|
+
- [l10n] Improve Turkish (tr-TR) locale (#15734) @ihsanberkozcan
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.3`, plus:
|
|
51
|
+
|
|
52
|
+
- [DataGridPro] Cleanup pinned rows on removal (#15697) @cherniavskii
|
|
53
|
+
- [DataGridPro] Server-side lazy loading (#13878) @arminmeh
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.3`, plus:
|
|
58
|
+
|
|
59
|
+
- [DataGridPremium] Remove the `ariaV8` experimental flag (#15694) @arminmeh
|
|
60
|
+
|
|
61
|
+
### Date and Time Pickers
|
|
62
|
+
|
|
63
|
+
#### Breaking changes
|
|
64
|
+
|
|
65
|
+
- The `onOpen()` and `onClose()` methods of the `usePickerContext()` hook have been replaced with a single `setOpen` method — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#usepickercontext).
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.3`
|
|
68
|
+
|
|
69
|
+
- [pickers] Replace the `onOpen()` and `onClose()` methods of `usePickerContext()` with a single `setOpen()` method. (#15701) @flaviendelangle
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.3`.
|
|
74
|
+
|
|
75
|
+
### Charts
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-charts@8.0.0-alpha.3`
|
|
78
|
+
|
|
79
|
+
- [charts] Improve SVG `pattern` and `gradient` support (#15720) @JCQuintas
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.3`.
|
|
84
|
+
|
|
85
|
+
### Tree View
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view@8.0.0-alpha.3`
|
|
88
|
+
|
|
89
|
+
No changes since `@mui/x-tree-view-pro@v8.0.0-alpha.2`.
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.3`.
|
|
94
|
+
|
|
95
|
+
### Docs
|
|
96
|
+
|
|
97
|
+
- [docs] Add a customization demo for the Date and Time Pickers overview page (#15118) @noraleonte
|
|
98
|
+
- [docs] Fix typo in charts axis documentation (#15743) @JCQuintas
|
|
99
|
+
- [docs] Improve SEO titles for the Data Grid (#15695) @MBilalShafi
|
|
100
|
+
|
|
101
|
+
### Core
|
|
102
|
+
|
|
103
|
+
- [core] Add `@mui/x-tree-view-pro` to `releaseChangelog` (#15316) @flaviendelangle
|
|
104
|
+
- [code-infra] Lock file maintenance (#11894)
|
|
105
|
+
- [code-infra] Check if `preset-safe` folder exists in codemod test (#15703) @JCQuintas
|
|
106
|
+
- [code-infra] Import Pickers `preset-safe` into global codemod config (#15659) @JCQuintas
|
|
107
|
+
- [code-infra] Playwright 1.49 (#15493) @JCQuintas
|
|
108
|
+
- [test] Force hover in headless Chrome (#15710) @cherniavskii
|
|
109
|
+
|
|
8
110
|
## v8.0.0-alpha.2
|
|
9
111
|
|
|
10
112
|
_Nov 29, 2024_
|
|
@@ -311,7 +311,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
311
311
|
* For each feature, if the flag is not explicitly set to `true`, then the feature is fully disabled, and neither property nor method calls will have any effect.
|
|
312
312
|
*/
|
|
313
313
|
experimentalFeatures: _propTypes.default.shape({
|
|
314
|
-
ariaV8: _propTypes.default.bool,
|
|
315
314
|
warnIfFocusStateIsNotSynced: _propTypes.default.bool
|
|
316
315
|
}),
|
|
317
316
|
/**
|
|
@@ -926,14 +925,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
926
925
|
* Controls the modes of the rows.
|
|
927
926
|
*/
|
|
928
927
|
rowModesModel: _propTypes.default.object,
|
|
929
|
-
/**
|
|
930
|
-
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
931
|
-
* Setting it to a lower value could be useful when using dynamic row height,
|
|
932
|
-
* but might reduce performance when displaying a large number of rows.
|
|
933
|
-
* @default 166
|
|
934
|
-
* @deprecated
|
|
935
|
-
*/
|
|
936
|
-
rowPositionsDebounceMs: _propTypes.default.number,
|
|
937
928
|
/**
|
|
938
929
|
* If `true`, the reordering of rows is enabled.
|
|
939
930
|
* @default false
|
|
@@ -973,7 +964,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
973
964
|
* Loading rows can be processed on the server or client-side.
|
|
974
965
|
* Set it to 'client' if you would like enable infnite loading.
|
|
975
966
|
* Set it to 'server' if you would like to enable lazy loading.
|
|
976
|
-
*
|
|
967
|
+
* @default "client"
|
|
977
968
|
*/
|
|
978
969
|
rowsLoadingMode: _propTypes.default.oneOf(['client', 'server']),
|
|
979
970
|
/**
|
|
@@ -987,6 +978,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
987
978
|
scrollbarSize: _propTypes.default.number,
|
|
988
979
|
/**
|
|
989
980
|
* Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
|
|
981
|
+
* If combined with `unstable_lazyLoading`, it defines the area where the next data request is triggered.
|
|
990
982
|
* @default 80
|
|
991
983
|
*/
|
|
992
984
|
scrollEndThreshold: _propTypes.default.number,
|
|
@@ -1060,6 +1052,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1060
1052
|
get: _propTypes.default.func.isRequired,
|
|
1061
1053
|
set: _propTypes.default.func.isRequired
|
|
1062
1054
|
}),
|
|
1055
|
+
/**
|
|
1056
|
+
* Used together with `unstable_dataSource` to enable lazy loading.
|
|
1057
|
+
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
1058
|
+
* and starts sending `start` and `end` values depending on the loading mode and the scroll position.
|
|
1059
|
+
* @default false
|
|
1060
|
+
*/
|
|
1061
|
+
unstable_lazyLoading: _propTypes.default.bool,
|
|
1062
|
+
/**
|
|
1063
|
+
* If positive, the Data Grid will throttle data source requests on rendered rows interval change.
|
|
1064
|
+
* @default 500
|
|
1065
|
+
*/
|
|
1066
|
+
unstable_lazyLoadingRequestThrottleMs: _propTypes.default.number,
|
|
1063
1067
|
/**
|
|
1064
1068
|
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
1065
1069
|
*/
|
|
@@ -97,6 +97,7 @@ const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
97
97
|
(0, _internals.useGridScroll)(apiRef, props);
|
|
98
98
|
(0, _internals.useGridInfiniteLoader)(apiRef, props);
|
|
99
99
|
(0, _internals.useGridLazyLoader)(apiRef, props);
|
|
100
|
+
(0, _internals.useGridDataSourceLazyLoader)(apiRef, props);
|
|
100
101
|
(0, _internals.useGridColumnMenu)(apiRef);
|
|
101
102
|
(0, _internals.useGridCsvExport)(apiRef, props);
|
|
102
103
|
(0, _internals.useGridPrintExport)(apiRef, props);
|
|
@@ -304,7 +304,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
304
304
|
* For each feature, if the flag is not explicitly set to `true`, then the feature is fully disabled, and neither property nor method calls will have any effect.
|
|
305
305
|
*/
|
|
306
306
|
experimentalFeatures: PropTypes.shape({
|
|
307
|
-
ariaV8: PropTypes.bool,
|
|
308
307
|
warnIfFocusStateIsNotSynced: PropTypes.bool
|
|
309
308
|
}),
|
|
310
309
|
/**
|
|
@@ -919,14 +918,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
919
918
|
* Controls the modes of the rows.
|
|
920
919
|
*/
|
|
921
920
|
rowModesModel: PropTypes.object,
|
|
922
|
-
/**
|
|
923
|
-
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
924
|
-
* Setting it to a lower value could be useful when using dynamic row height,
|
|
925
|
-
* but might reduce performance when displaying a large number of rows.
|
|
926
|
-
* @default 166
|
|
927
|
-
* @deprecated
|
|
928
|
-
*/
|
|
929
|
-
rowPositionsDebounceMs: PropTypes.number,
|
|
930
921
|
/**
|
|
931
922
|
* If `true`, the reordering of rows is enabled.
|
|
932
923
|
* @default false
|
|
@@ -966,7 +957,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
966
957
|
* Loading rows can be processed on the server or client-side.
|
|
967
958
|
* Set it to 'client' if you would like enable infnite loading.
|
|
968
959
|
* Set it to 'server' if you would like to enable lazy loading.
|
|
969
|
-
*
|
|
960
|
+
* @default "client"
|
|
970
961
|
*/
|
|
971
962
|
rowsLoadingMode: PropTypes.oneOf(['client', 'server']),
|
|
972
963
|
/**
|
|
@@ -980,6 +971,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
980
971
|
scrollbarSize: PropTypes.number,
|
|
981
972
|
/**
|
|
982
973
|
* Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
|
|
974
|
+
* If combined with `unstable_lazyLoading`, it defines the area where the next data request is triggered.
|
|
983
975
|
* @default 80
|
|
984
976
|
*/
|
|
985
977
|
scrollEndThreshold: PropTypes.number,
|
|
@@ -1053,6 +1045,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1053
1045
|
get: PropTypes.func.isRequired,
|
|
1054
1046
|
set: PropTypes.func.isRequired
|
|
1055
1047
|
}),
|
|
1048
|
+
/**
|
|
1049
|
+
* Used together with `unstable_dataSource` to enable lazy loading.
|
|
1050
|
+
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
1051
|
+
* and starts sending `start` and `end` values depending on the loading mode and the scroll position.
|
|
1052
|
+
* @default false
|
|
1053
|
+
*/
|
|
1054
|
+
unstable_lazyLoading: PropTypes.bool,
|
|
1055
|
+
/**
|
|
1056
|
+
* If positive, the Data Grid will throttle data source requests on rendered rows interval change.
|
|
1057
|
+
* @default 500
|
|
1058
|
+
*/
|
|
1059
|
+
unstable_lazyLoadingRequestThrottleMs: PropTypes.number,
|
|
1056
1060
|
/**
|
|
1057
1061
|
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
1058
1062
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, dimensionsStateInitializer, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization, useGridDataSourceTreeDataPreProcessors, useGridDataSource, dataSourceStateInitializer, useGridRowSpanning, rowSpanningStateInitializer, useGridListView, listViewStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
1
|
+
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, dimensionsStateInitializer, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, useGridDataSourceLazyLoader, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization, useGridDataSourceTreeDataPreProcessors, useGridDataSource, dataSourceStateInitializer, useGridRowSpanning, rowSpanningStateInitializer, useGridListView, listViewStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
2
2
|
// Premium-only features
|
|
3
3
|
import { useGridAggregation, aggregationStateInitializer } from "../hooks/features/aggregation/useGridAggregation.js";
|
|
4
4
|
import { useGridAggregationPreProcessors } from "../hooks/features/aggregation/useGridAggregationPreProcessors.js";
|
|
@@ -90,6 +90,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
90
90
|
useGridScroll(apiRef, props);
|
|
91
91
|
useGridInfiniteLoader(apiRef, props);
|
|
92
92
|
useGridLazyLoader(apiRef, props);
|
|
93
|
+
useGridDataSourceLazyLoader(apiRef, props);
|
|
93
94
|
useGridColumnMenu(apiRef);
|
|
94
95
|
useGridCsvExport(apiRef, props);
|
|
95
96
|
useGridPrintExport(apiRef, props);
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
4
4
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
5
5
|
import { getTotalHeaderHeight, getVisibleRows, isNavigationKey, serializeCellValue, useGridRegisterPipeProcessor, useGridVisibleRows } from '@mui/x-data-grid-pro/internals';
|
|
6
|
-
import { useGridApiEventHandler, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD,
|
|
6
|
+
import { useGridApiEventHandler, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, gridClasses, gridFocusCellSelector, GRID_REORDER_COL_DEF, useGridSelector, gridSortedRowIdsSelector, gridDimensionsSelector } from '@mui/x-data-grid-pro';
|
|
7
7
|
import { gridCellSelectionStateSelector } from "./gridCellSelectionSelector.js";
|
|
8
8
|
export const cellSelectionStateInitializer = (state, props) => _extends({}, state, {
|
|
9
9
|
cellSelection: _extends({}, props.cellSelectionModel ?? props.initialState?.cellSelection)
|
|
@@ -91,7 +91,6 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
91
91
|
}, [apiRef, visibleRows.rows]);
|
|
92
92
|
const getSelectedCellsAsArray = React.useCallback(() => {
|
|
93
93
|
const selectionModel = apiRef.current.getCellSelectionModel();
|
|
94
|
-
const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
|
|
95
94
|
const currentVisibleRows = getVisibleRows(apiRef, props);
|
|
96
95
|
const sortedEntries = currentVisibleRows.rows.reduce((result, row) => {
|
|
97
96
|
if (row.id in selectionModel) {
|
|
@@ -103,7 +102,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
103
102
|
selectedCells.push(...Object.entries(fields).reduce((selectedFields, [field, isSelected]) => {
|
|
104
103
|
if (isSelected) {
|
|
105
104
|
selectedFields.push({
|
|
106
|
-
id
|
|
105
|
+
id,
|
|
107
106
|
field
|
|
108
107
|
});
|
|
109
108
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { passFilterLogic, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
import { passFilterLogic, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn, GridStrategyGroup } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import { gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
4
4
|
export { GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn };
|
|
5
5
|
export let RowGroupingStrategy = /*#__PURE__*/function (RowGroupingStrategy) {
|
|
@@ -124,7 +124,7 @@ export const setStrategyAvailability = (privateApiRef, disableRowGrouping, dataS
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
const strategy = dataSource ? RowGroupingStrategy.DataSource : RowGroupingStrategy.Default;
|
|
127
|
-
privateApiRef.current.setStrategyAvailability(
|
|
127
|
+
privateApiRef.current.setStrategyAvailability(GridStrategyGroup.RowTree, strategy, isAvailable);
|
|
128
128
|
};
|
|
129
129
|
export const getCellGroupingCriteria = ({
|
|
130
130
|
row,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridApiEventHandler, useGridApiMethod, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
4
|
-
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
4
|
+
import { useGridRegisterPipeProcessor, GridStrategyGroup } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
6
6
|
import { getRowGroupingFieldFromGroupingCriteria, RowGroupingStrategy, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from "./gridRowGroupingUtils.js";
|
|
7
7
|
export const rowGroupingStateInitializer = (state, props, apiRef) => {
|
|
@@ -162,7 +162,7 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
162
162
|
|
|
163
163
|
// Refresh the row tree creation strategy processing
|
|
164
164
|
// TODO: Add a clean way to re-run a strategy processing without publishing a private event
|
|
165
|
-
if (apiRef.current.getActiveStrategy(
|
|
165
|
+
if (apiRef.current.getActiveStrategy(GridStrategyGroup.RowTree) === RowGroupingStrategy.Default) {
|
|
166
166
|
apiRef.current.publishEvent('activeStrategyProcessorChange', 'rowTreeCreation');
|
|
167
167
|
}
|
|
168
168
|
}
|
|
@@ -2,13 +2,11 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import { useGridAriaAttributes as useGridAriaAttributesPro, useGridSelector } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import { gridRowGroupingSanitizedModelSelector } from "../features/rowGrouping/gridRowGroupingSelector.js";
|
|
4
4
|
import { useGridPrivateApiContext } from "./useGridPrivateApiContext.js";
|
|
5
|
-
import { useGridRootProps } from "./useGridRootProps.js";
|
|
6
5
|
export const useGridAriaAttributes = () => {
|
|
7
|
-
const rootProps = useGridRootProps();
|
|
8
6
|
const ariaAttributesPro = useGridAriaAttributesPro();
|
|
9
7
|
const apiRef = useGridPrivateApiContext();
|
|
10
8
|
const gridRowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
11
|
-
const ariaAttributesPremium =
|
|
9
|
+
const ariaAttributesPremium = gridRowGroupingModel.length > 0 ? {
|
|
12
10
|
role: 'treegrid'
|
|
13
11
|
} : {};
|
|
14
12
|
return _extends({}, ariaAttributesPro, ariaAttributesPremium);
|
package/esm/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczMzM1MzIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
|
@@ -100,7 +100,6 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
100
100
|
}, [apiRef, visibleRows.rows]);
|
|
101
101
|
const getSelectedCellsAsArray = React.useCallback(() => {
|
|
102
102
|
const selectionModel = apiRef.current.getCellSelectionModel();
|
|
103
|
-
const idToIdLookup = (0, _xDataGridPro.gridRowsDataRowIdToIdLookupSelector)(apiRef);
|
|
104
103
|
const currentVisibleRows = (0, _internals.getVisibleRows)(apiRef, props);
|
|
105
104
|
const sortedEntries = currentVisibleRows.rows.reduce((result, row) => {
|
|
106
105
|
if (row.id in selectionModel) {
|
|
@@ -112,7 +111,7 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
112
111
|
selectedCells.push(...Object.entries(fields).reduce((selectedFields, [field, isSelected]) => {
|
|
113
112
|
if (isSelected) {
|
|
114
113
|
selectedFields.push({
|
|
115
|
-
id
|
|
114
|
+
id,
|
|
116
115
|
field
|
|
117
116
|
});
|
|
118
117
|
}
|
|
@@ -154,7 +154,7 @@ const setStrategyAvailability = (privateApiRef, disableRowGrouping, dataSource)
|
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
156
|
const strategy = dataSource ? RowGroupingStrategy.DataSource : RowGroupingStrategy.Default;
|
|
157
|
-
privateApiRef.current.setStrategyAvailability(
|
|
157
|
+
privateApiRef.current.setStrategyAvailability(_internals.GridStrategyGroup.RowTree, strategy, isAvailable);
|
|
158
158
|
};
|
|
159
159
|
exports.setStrategyAvailability = setStrategyAvailability;
|
|
160
160
|
const getCellGroupingCriteria = ({
|
|
@@ -171,7 +171,7 @@ const useGridRowGrouping = (apiRef, props) => {
|
|
|
171
171
|
|
|
172
172
|
// Refresh the row tree creation strategy processing
|
|
173
173
|
// TODO: Add a clean way to re-run a strategy processing without publishing a private event
|
|
174
|
-
if (apiRef.current.getActiveStrategy(
|
|
174
|
+
if (apiRef.current.getActiveStrategy(_internals.GridStrategyGroup.RowTree) === _gridRowGroupingUtils.RowGroupingStrategy.Default) {
|
|
175
175
|
apiRef.current.publishEvent('activeStrategyProcessorChange', 'rowTreeCreation');
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -9,13 +9,11 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _internals = require("@mui/x-data-grid-pro/internals");
|
|
10
10
|
var _gridRowGroupingSelector = require("../features/rowGrouping/gridRowGroupingSelector");
|
|
11
11
|
var _useGridPrivateApiContext = require("./useGridPrivateApiContext");
|
|
12
|
-
var _useGridRootProps = require("./useGridRootProps");
|
|
13
12
|
const useGridAriaAttributes = () => {
|
|
14
|
-
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
15
13
|
const ariaAttributesPro = (0, _internals.useGridAriaAttributes)();
|
|
16
14
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
17
15
|
const gridRowGroupingModel = (0, _internals.useGridSelector)(apiRef, _gridRowGroupingSelector.gridRowGroupingSanitizedModelSelector);
|
|
18
|
-
const ariaAttributesPremium =
|
|
16
|
+
const ariaAttributesPremium = gridRowGroupingModel.length > 0 ? {
|
|
19
17
|
role: 'treegrid'
|
|
20
18
|
} : {};
|
|
21
19
|
return (0, _extends2.default)({}, ariaAttributesPro, ariaAttributesPremium);
|
package/index.js
CHANGED
|
@@ -8,12 +8,6 @@ import { GridInitialStatePremium } from './gridStatePremium';
|
|
|
8
8
|
import { GridApiPremium } from './gridApiPremium';
|
|
9
9
|
import { GridCellSelectionModel } from '../hooks/features/cellSelection';
|
|
10
10
|
export interface GridExperimentalPremiumFeatures extends GridExperimentalProFeatures {
|
|
11
|
-
/**
|
|
12
|
-
* Enables accessibility improvements that will be enabled by default in V8.
|
|
13
|
-
* If you rely on the v7 ARIA attributes (e.g. for CSS selectors), this might be a breaking change.
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
ariaV8: boolean;
|
|
17
11
|
}
|
|
18
12
|
export interface DataGridPremiumPropsWithComplexDefaultValueBeforeProcessing extends Pick<DataGridPropsWithComplexDefaultValueBeforeProcessing, 'localeText'> {
|
|
19
13
|
/**
|
|
@@ -304,7 +304,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
304
304
|
* For each feature, if the flag is not explicitly set to `true`, then the feature is fully disabled, and neither property nor method calls will have any effect.
|
|
305
305
|
*/
|
|
306
306
|
experimentalFeatures: PropTypes.shape({
|
|
307
|
-
ariaV8: PropTypes.bool,
|
|
308
307
|
warnIfFocusStateIsNotSynced: PropTypes.bool
|
|
309
308
|
}),
|
|
310
309
|
/**
|
|
@@ -919,14 +918,6 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
919
918
|
* Controls the modes of the rows.
|
|
920
919
|
*/
|
|
921
920
|
rowModesModel: PropTypes.object,
|
|
922
|
-
/**
|
|
923
|
-
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
924
|
-
* Setting it to a lower value could be useful when using dynamic row height,
|
|
925
|
-
* but might reduce performance when displaying a large number of rows.
|
|
926
|
-
* @default 166
|
|
927
|
-
* @deprecated
|
|
928
|
-
*/
|
|
929
|
-
rowPositionsDebounceMs: PropTypes.number,
|
|
930
921
|
/**
|
|
931
922
|
* If `true`, the reordering of rows is enabled.
|
|
932
923
|
* @default false
|
|
@@ -966,7 +957,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
966
957
|
* Loading rows can be processed on the server or client-side.
|
|
967
958
|
* Set it to 'client' if you would like enable infnite loading.
|
|
968
959
|
* Set it to 'server' if you would like to enable lazy loading.
|
|
969
|
-
*
|
|
960
|
+
* @default "client"
|
|
970
961
|
*/
|
|
971
962
|
rowsLoadingMode: PropTypes.oneOf(['client', 'server']),
|
|
972
963
|
/**
|
|
@@ -980,6 +971,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
980
971
|
scrollbarSize: PropTypes.number,
|
|
981
972
|
/**
|
|
982
973
|
* Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
|
|
974
|
+
* If combined with `unstable_lazyLoading`, it defines the area where the next data request is triggered.
|
|
983
975
|
* @default 80
|
|
984
976
|
*/
|
|
985
977
|
scrollEndThreshold: PropTypes.number,
|
|
@@ -1053,6 +1045,18 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
|
|
|
1053
1045
|
get: PropTypes.func.isRequired,
|
|
1054
1046
|
set: PropTypes.func.isRequired
|
|
1055
1047
|
}),
|
|
1048
|
+
/**
|
|
1049
|
+
* Used together with `unstable_dataSource` to enable lazy loading.
|
|
1050
|
+
* If enabled, the grid stops adding `paginationModel` to the data requests (`getRows`)
|
|
1051
|
+
* and starts sending `start` and `end` values depending on the loading mode and the scroll position.
|
|
1052
|
+
* @default false
|
|
1053
|
+
*/
|
|
1054
|
+
unstable_lazyLoading: PropTypes.bool,
|
|
1055
|
+
/**
|
|
1056
|
+
* If positive, the Data Grid will throttle data source requests on rendered rows interval change.
|
|
1057
|
+
* @default 500
|
|
1058
|
+
*/
|
|
1059
|
+
unstable_lazyLoadingRequestThrottleMs: PropTypes.number,
|
|
1056
1060
|
/**
|
|
1057
1061
|
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
1058
1062
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, dimensionsStateInitializer, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization, useGridDataSourceTreeDataPreProcessors, useGridDataSource, dataSourceStateInitializer, useGridRowSpanning, rowSpanningStateInitializer, useGridListView, listViewStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
1
|
+
import { useGridInitialization, useGridInitializeState, useGridClipboard, useGridColumnMenu, useGridColumns, columnsStateInitializer, useGridDensity, useGridCsvExport, useGridPrintExport, useGridFilter, filterStateInitializer, useGridFocus, useGridKeyboardNavigation, useGridPagination, paginationStateInitializer, useGridPreferencesPanel, useGridEditing, editingStateInitializer, useGridRows, useGridRowsPreProcessors, rowsStateInitializer, useGridRowsMeta, useGridParamsApi, useGridRowSelection, useGridSorting, sortingStateInitializer, useGridScroll, useGridEvents, dimensionsStateInitializer, useGridDimensions, useGridStatePersistence, useGridRowSelectionPreProcessors, columnMenuStateInitializer, densityStateInitializer, focusStateInitializer, preferencePanelStateInitializer, rowsMetaStateInitializer, rowSelectionStateInitializer, useGridColumnReorder, columnReorderStateInitializer, useGridColumnResize, columnResizeStateInitializer, useGridTreeData, useGridTreeDataPreProcessors, useGridColumnPinning, columnPinningStateInitializer, useGridColumnPinningPreProcessors, useGridDetailPanel, detailPanelStateInitializer, useGridDetailPanelPreProcessors, useGridInfiniteLoader, useGridColumnSpanning, useGridRowReorder, useGridRowReorderPreProcessors, useGridRowPinning, useGridRowPinningPreProcessors, rowPinningStateInitializer, useGridColumnGrouping, columnGroupsStateInitializer, useGridLazyLoader, useGridLazyLoaderPreProcessors, useGridDataSourceLazyLoader, headerFilteringStateInitializer, useGridHeaderFiltering, virtualizationStateInitializer, useGridVirtualization, useGridDataSourceTreeDataPreProcessors, useGridDataSource, dataSourceStateInitializer, useGridRowSpanning, rowSpanningStateInitializer, useGridListView, listViewStateInitializer } from '@mui/x-data-grid-pro/internals';
|
|
2
2
|
// Premium-only features
|
|
3
3
|
import { useGridAggregation, aggregationStateInitializer } from "../hooks/features/aggregation/useGridAggregation.js";
|
|
4
4
|
import { useGridAggregationPreProcessors } from "../hooks/features/aggregation/useGridAggregationPreProcessors.js";
|
|
@@ -90,6 +90,7 @@ export const useDataGridPremiumComponent = (inputApiRef, props) => {
|
|
|
90
90
|
useGridScroll(apiRef, props);
|
|
91
91
|
useGridInfiniteLoader(apiRef, props);
|
|
92
92
|
useGridLazyLoader(apiRef, props);
|
|
93
|
+
useGridDataSourceLazyLoader(apiRef, props);
|
|
93
94
|
useGridColumnMenu(apiRef);
|
|
94
95
|
useGridCsvExport(apiRef, props);
|
|
95
96
|
useGridPrintExport(apiRef, props);
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
4
4
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
5
5
|
import { getTotalHeaderHeight, getVisibleRows, isNavigationKey, serializeCellValue, useGridRegisterPipeProcessor, useGridVisibleRows } from '@mui/x-data-grid-pro/internals';
|
|
6
|
-
import { useGridApiEventHandler, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD,
|
|
6
|
+
import { useGridApiEventHandler, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, gridClasses, gridFocusCellSelector, GRID_REORDER_COL_DEF, useGridSelector, gridSortedRowIdsSelector, gridDimensionsSelector } from '@mui/x-data-grid-pro';
|
|
7
7
|
import { gridCellSelectionStateSelector } from "./gridCellSelectionSelector.js";
|
|
8
8
|
export const cellSelectionStateInitializer = (state, props) => _extends({}, state, {
|
|
9
9
|
cellSelection: _extends({}, props.cellSelectionModel ?? props.initialState?.cellSelection)
|
|
@@ -91,7 +91,6 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
91
91
|
}, [apiRef, visibleRows.rows]);
|
|
92
92
|
const getSelectedCellsAsArray = React.useCallback(() => {
|
|
93
93
|
const selectionModel = apiRef.current.getCellSelectionModel();
|
|
94
|
-
const idToIdLookup = gridRowsDataRowIdToIdLookupSelector(apiRef);
|
|
95
94
|
const currentVisibleRows = getVisibleRows(apiRef, props);
|
|
96
95
|
const sortedEntries = currentVisibleRows.rows.reduce((result, row) => {
|
|
97
96
|
if (row.id in selectionModel) {
|
|
@@ -103,7 +102,7 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
103
102
|
selectedCells.push(...Object.entries(fields).reduce((selectedFields, [field, isSelected]) => {
|
|
104
103
|
if (isSelected) {
|
|
105
104
|
selectedFields.push({
|
|
106
|
-
id
|
|
105
|
+
id,
|
|
107
106
|
field
|
|
108
107
|
});
|
|
109
108
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import { passFilterLogic, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn } from '@mui/x-data-grid-pro/internals';
|
|
2
|
+
import { passFilterLogic, GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn, GridStrategyGroup } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import { gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
4
4
|
export { GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD, getRowGroupingCriteriaFromGroupingField, isGroupingColumn };
|
|
5
5
|
export let RowGroupingStrategy = /*#__PURE__*/function (RowGroupingStrategy) {
|
|
@@ -124,7 +124,7 @@ export const setStrategyAvailability = (privateApiRef, disableRowGrouping, dataS
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
const strategy = dataSource ? RowGroupingStrategy.DataSource : RowGroupingStrategy.Default;
|
|
127
|
-
privateApiRef.current.setStrategyAvailability(
|
|
127
|
+
privateApiRef.current.setStrategyAvailability(GridStrategyGroup.RowTree, strategy, isAvailable);
|
|
128
128
|
};
|
|
129
129
|
export const getCellGroupingCriteria = ({
|
|
130
130
|
row,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridApiEventHandler, useGridApiMethod, gridColumnLookupSelector } from '@mui/x-data-grid-pro';
|
|
4
|
-
import { useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
4
|
+
import { useGridRegisterPipeProcessor, GridStrategyGroup } from '@mui/x-data-grid-pro/internals';
|
|
5
5
|
import { gridRowGroupingModelSelector, gridRowGroupingSanitizedModelSelector } from "./gridRowGroupingSelector.js";
|
|
6
6
|
import { getRowGroupingFieldFromGroupingCriteria, RowGroupingStrategy, isGroupingColumn, mergeStateWithRowGroupingModel, setStrategyAvailability, getGroupingRules, areGroupingRulesEqual } from "./gridRowGroupingUtils.js";
|
|
7
7
|
export const rowGroupingStateInitializer = (state, props, apiRef) => {
|
|
@@ -162,7 +162,7 @@ export const useGridRowGrouping = (apiRef, props) => {
|
|
|
162
162
|
|
|
163
163
|
// Refresh the row tree creation strategy processing
|
|
164
164
|
// TODO: Add a clean way to re-run a strategy processing without publishing a private event
|
|
165
|
-
if (apiRef.current.getActiveStrategy(
|
|
165
|
+
if (apiRef.current.getActiveStrategy(GridStrategyGroup.RowTree) === RowGroupingStrategy.Default) {
|
|
166
166
|
apiRef.current.publishEvent('activeStrategyProcessorChange', 'rowTreeCreation');
|
|
167
167
|
}
|
|
168
168
|
}
|
|
@@ -2,13 +2,11 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import { useGridAriaAttributes as useGridAriaAttributesPro, useGridSelector } from '@mui/x-data-grid-pro/internals';
|
|
3
3
|
import { gridRowGroupingSanitizedModelSelector } from "../features/rowGrouping/gridRowGroupingSelector.js";
|
|
4
4
|
import { useGridPrivateApiContext } from "./useGridPrivateApiContext.js";
|
|
5
|
-
import { useGridRootProps } from "./useGridRootProps.js";
|
|
6
5
|
export const useGridAriaAttributes = () => {
|
|
7
|
-
const rootProps = useGridRootProps();
|
|
8
6
|
const ariaAttributesPro = useGridAriaAttributesPro();
|
|
9
7
|
const apiRef = useGridPrivateApiContext();
|
|
10
8
|
const gridRowGroupingModel = useGridSelector(apiRef, gridRowGroupingSanitizedModelSelector);
|
|
11
|
-
const ariaAttributesPremium =
|
|
9
|
+
const ariaAttributesPremium = gridRowGroupingModel.length > 0 ? {
|
|
12
10
|
role: 'treegrid'
|
|
13
11
|
} : {};
|
|
14
12
|
return _extends({}, ariaAttributesPro, ariaAttributesPremium);
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczMzM1MzIwMDAwMA==";
|
|
4
4
|
if (process.env.NODE_ENV !== 'production') {
|
|
5
5
|
// A simple hack to set the value in the test environment (has no build step).
|
|
6
6
|
// eslint-disable-next-line no-useless-concat
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.3",
|
|
4
4
|
"description": "The Premium plan edition of the Data Grid Components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"exceljs": "^4.4.0",
|
|
41
41
|
"prop-types": "^15.8.1",
|
|
42
42
|
"reselect": "^5.1.1",
|
|
43
|
-
"@mui/x-data-grid": "8.0.0-alpha.
|
|
43
|
+
"@mui/x-data-grid": "8.0.0-alpha.3",
|
|
44
44
|
"@mui/x-internals": "8.0.0-alpha.2",
|
|
45
|
-
"@mui/x-
|
|
46
|
-
"@mui/x-
|
|
45
|
+
"@mui/x-license": "8.0.0-alpha.2",
|
|
46
|
+
"@mui/x-data-grid-pro": "8.0.0-alpha.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|
package/utils/releaseInfo.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getReleaseInfo = void 0;
|
|
7
7
|
var _utils = require("@mui/utils");
|
|
8
8
|
const getReleaseInfo = () => {
|
|
9
|
-
const releaseInfo = "
|
|
9
|
+
const releaseInfo = "MTczMzM1MzIwMDAwMA==";
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
// A simple hack to set the value in the test environment (has no build step).
|
|
12
12
|
// eslint-disable-next-line no-useless-concat
|