@mui/x-data-grid 8.14.0 → 8.15.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 +202 -0
- package/components/GridScrollShadows.js +23 -3
- package/components/cell/GridCell.js +1 -0
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +2 -1
- package/esm/components/GridScrollShadows.js +22 -3
- package/esm/components/cell/GridCell.js +1 -0
- package/esm/constants/gridClasses.d.ts +12 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/constants/localeTextConstants.js +2 -1
- package/esm/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +6 -4
- package/esm/hooks/core/useGridProps.d.ts +3 -5
- package/esm/hooks/core/useGridProps.js +5 -3
- package/esm/hooks/core/useGridVirtualizer.js +11 -9
- package/esm/hooks/features/dataSource/models.d.ts +28 -28
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +28 -15
- package/esm/hooks/features/dataSource/utils.d.ts +2 -1
- package/esm/hooks/features/dataSource/utils.js +2 -1
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -11
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -2
- package/esm/locales/arSD.js +1 -0
- package/esm/locales/beBY.js +1 -0
- package/esm/locales/bgBG.js +1 -0
- package/esm/locales/bnBD.js +1 -0
- package/esm/locales/csCZ.js +1 -0
- package/esm/locales/daDK.js +1 -0
- package/esm/locales/deDE.js +1 -0
- package/esm/locales/elGR.js +1 -0
- package/esm/locales/esES.js +1 -0
- package/esm/locales/faIR.js +1 -0
- package/esm/locales/fiFI.js +1 -0
- package/esm/locales/frFR.js +1 -0
- package/esm/locales/heIL.js +1 -0
- package/esm/locales/hrHR.js +1 -0
- package/esm/locales/huHU.js +1 -0
- package/esm/locales/hyAM.js +1 -0
- package/esm/locales/idID.js +1 -0
- package/esm/locales/isIS.js +1 -0
- package/esm/locales/itIT.js +104 -115
- package/esm/locales/jaJP.js +1 -0
- package/esm/locales/koKR.js +1 -0
- package/esm/locales/nbNO.js +1 -0
- package/esm/locales/nlNL.js +1 -0
- package/esm/locales/nnNO.js +1 -0
- package/esm/locales/plPL.js +1 -0
- package/esm/locales/ptBR.js +1 -0
- package/esm/locales/ptPT.js +1 -0
- package/esm/locales/roRO.js +1 -0
- package/esm/locales/ruRU.js +1 -0
- package/esm/locales/skSK.js +1 -0
- package/esm/locales/svSE.js +1 -0
- package/esm/locales/trTR.js +1 -0
- package/esm/locales/ukUA.js +1 -0
- package/esm/locales/urPK.js +1 -0
- package/esm/locales/viVN.js +1 -0
- package/esm/locales/zhCN.js +1 -0
- package/esm/locales/zhHK.js +1 -0
- package/esm/locales/zhTW.js +1 -0
- package/esm/models/api/gridLocaleTextApi.d.ts +1 -0
- package/esm/models/gridDataSource.d.ts +13 -0
- package/esm/models/gridStateCommunity.d.ts +2 -3
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +6 -4
- package/hooks/core/useGridProps.d.ts +3 -5
- package/hooks/core/useGridProps.js +5 -3
- package/hooks/core/useGridVirtualizer.js +11 -9
- package/hooks/features/dataSource/models.d.ts +28 -28
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +28 -15
- package/hooks/features/dataSource/utils.d.ts +2 -1
- package/hooks/features/dataSource/utils.js +2 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -11
- package/index.js +1 -1
- package/internals/index.d.ts +2 -2
- package/locales/arSD.js +1 -0
- package/locales/beBY.js +1 -0
- package/locales/bgBG.js +1 -0
- package/locales/bnBD.js +1 -0
- package/locales/csCZ.js +1 -0
- package/locales/daDK.js +1 -0
- package/locales/deDE.js +1 -0
- package/locales/elGR.js +1 -0
- package/locales/esES.js +1 -0
- package/locales/faIR.js +1 -0
- package/locales/fiFI.js +1 -0
- package/locales/frFR.js +1 -0
- package/locales/heIL.js +1 -0
- package/locales/hrHR.js +1 -0
- package/locales/huHU.js +1 -0
- package/locales/hyAM.js +1 -0
- package/locales/idID.js +1 -0
- package/locales/isIS.js +1 -0
- package/locales/itIT.js +104 -115
- package/locales/jaJP.js +1 -0
- package/locales/koKR.js +1 -0
- package/locales/nbNO.js +1 -0
- package/locales/nlNL.js +1 -0
- package/locales/nnNO.js +1 -0
- package/locales/plPL.js +1 -0
- package/locales/ptBR.js +1 -0
- package/locales/ptPT.js +1 -0
- package/locales/roRO.js +1 -0
- package/locales/ruRU.js +1 -0
- package/locales/skSK.js +1 -0
- package/locales/svSE.js +1 -0
- package/locales/trTR.js +1 -0
- package/locales/ukUA.js +1 -0
- package/locales/urPK.js +1 -0
- package/locales/viVN.js +1 -0
- package/locales/zhCN.js +1 -0
- package/locales/zhHK.js +1 -0
- package/locales/zhTW.js +1 -0
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/gridDataSource.d.ts +13 -0
- package/models/gridStateCommunity.d.ts +2 -3
- package/package.json +2 -2
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import type { GridDataSourceCache, GridGetRowsParams, GridUpdateRowParams } from "../../../models/gridDataSource.js";
|
|
1
|
+
import type { GridDataSourceCache, GridGetRowsParams, GridUpdateRowParams, GridGetRowsOptions } from "../../../models/gridDataSource.js";
|
|
2
2
|
import type { GridRowId, GridRowModel } from "../../../models/gridRows.js";
|
|
3
3
|
import type { GridDataSourceCacheDefaultConfig } from "./cache.js";
|
|
4
4
|
/**
|
|
5
5
|
* The parameters for the `fetchRows` method.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
/**
|
|
9
|
-
* If `true`, bypasses the cache and forces a refetch of the rows from the server.
|
|
10
|
-
*/
|
|
11
|
-
skipCache?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface GridDataSourceApiBase {
|
|
14
|
-
/**
|
|
15
|
-
* Fetches the rows from the server.
|
|
16
|
-
* If no `parentId` option is provided, it fetches the root rows.
|
|
17
|
-
* Any missing parameter from `params` will be filled from the state (sorting, filtering, etc.).
|
|
18
|
-
* @param {GridRowId} parentId The id of the parent node (default: `GRID_ROOT_GROUP_ID`).
|
|
19
|
-
* @param {GridDataSourceFetchRowsParams} params Request parameters override.
|
|
20
|
-
*/
|
|
21
|
-
fetchRows: (parentId?: GridRowId, params?: GridDataSourceFetchRowsParams) => void;
|
|
22
|
-
/**
|
|
23
|
-
* The data source cache object.
|
|
24
|
-
*/
|
|
25
|
-
cache: GridDataSourceCache;
|
|
26
|
-
/**
|
|
27
|
-
* Syncs the row with the server and updates in the grid.
|
|
28
|
-
* @param {GridUpdateRowParams} params The parameters for the edit operation.
|
|
29
|
-
* @returns {Promise<GridRowModel> | undefined} The updated row or `undefined` if `dataSource.updateRow` is not passed.
|
|
30
|
-
*/
|
|
31
|
-
editRow: (params: GridUpdateRowParams) => Promise<GridRowModel> | undefined;
|
|
32
|
-
}
|
|
7
|
+
export type GridDataSourceFetchRowsParams<T> = Partial<T> & GridGetRowsOptions;
|
|
33
8
|
export interface GridDataSourceApi {
|
|
34
9
|
/**
|
|
35
10
|
* The data source API.
|
|
36
11
|
*/
|
|
37
|
-
dataSource:
|
|
12
|
+
dataSource: {
|
|
13
|
+
/**
|
|
14
|
+
* Fetches the rows from the server.
|
|
15
|
+
* If no `parentId` option is provided, it fetches the root rows.
|
|
16
|
+
* Any missing parameter from `params` will be filled from the state (sorting, filtering, etc.).
|
|
17
|
+
* @param {GridRowId} parentId The id of the parent node (default: `GRID_ROOT_GROUP_ID`).
|
|
18
|
+
* @param {GridDataSourceFetchRowsParams<GridGetRowsParams>} params Request parameters override.
|
|
19
|
+
* @returns {Promise<void>} A promise that resolves when the rows are fetched.
|
|
20
|
+
*/
|
|
21
|
+
fetchRows: (parentId?: GridRowId, params?: GridDataSourceFetchRowsParams<GridGetRowsParams>) => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* The data source cache object.
|
|
24
|
+
*/
|
|
25
|
+
cache: GridDataSourceCache;
|
|
26
|
+
/**
|
|
27
|
+
* Syncs the row with the server and updates in the grid.
|
|
28
|
+
* @param {GridUpdateRowParams} params The parameters for the edit operation.
|
|
29
|
+
* @returns {Promise<GridRowModel> | undefined} The updated row or `undefined` if `dataSource.updateRow` is not passed.
|
|
30
|
+
*/
|
|
31
|
+
editRow: (params: GridUpdateRowParams) => Promise<GridRowModel> | undefined;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export interface GridDataSourceApiBase {
|
|
35
|
+
fetchRows: GridDataSourceApi['dataSource']['fetchRows'];
|
|
36
|
+
cache: GridDataSourceApi['dataSource']['cache'];
|
|
37
|
+
editRow: GridDataSourceApi['dataSource']['editRow'];
|
|
38
38
|
}
|
|
39
39
|
export interface GridDataSourceBaseOptions {
|
|
40
40
|
cacheOptions?: GridDataSourceCacheDefaultConfig;
|
|
@@ -10,7 +10,7 @@ export declare const useGridDataSourceBase: <Api extends GridPrivateApiCommunity
|
|
|
10
10
|
api: {
|
|
11
11
|
public: GridDataSourceApi;
|
|
12
12
|
};
|
|
13
|
-
debouncedFetchRows: ((parentId?: import("@mui/x-data-grid").GridRowId, params?: import("./models.js").GridDataSourceFetchRowsParams) => void) & import("@mui/utils/debounce").Cancelable;
|
|
13
|
+
debouncedFetchRows: ((parentId?: import("@mui/x-data-grid").GridRowId, params?: import("./models.js").GridDataSourceFetchRowsParams<import("@mui/x-data-grid").GridGetRowsParams>) => Promise<void>) & import("@mui/utils/debounce").Cancelable;
|
|
14
14
|
strategyProcessor: {
|
|
15
15
|
strategyName: DataSourceRowsUpdateStrategy;
|
|
16
16
|
group: "dataSourceRowsUpdate";
|
|
@@ -23,7 +23,7 @@ var _gridDataSourceSelector = require("./gridDataSourceSelector");
|
|
|
23
23
|
var _utils2 = require("./utils");
|
|
24
24
|
var _cache = require("./cache");
|
|
25
25
|
var _gridDataSourceError = require("./gridDataSourceError");
|
|
26
|
-
const _excluded = ["skipCache"];
|
|
26
|
+
const _excluded = ["skipCache", "keepChildrenExpanded"];
|
|
27
27
|
const noopCache = {
|
|
28
28
|
clear: () => {},
|
|
29
29
|
get: () => undefined,
|
|
@@ -40,8 +40,8 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
40
40
|
apiRef.current.setStrategyAvailability(_strategyProcessing.GridStrategyGroup.DataSource, _utils2.DataSourceRowsUpdateStrategy.Default, props.dataSource ? () => true : () => false);
|
|
41
41
|
}, [apiRef, props.dataSource]);
|
|
42
42
|
const [currentStrategy, setCurrentStrategy] = React.useState(apiRef.current.getActiveStrategy(_strategyProcessing.GridStrategyGroup.DataSource));
|
|
43
|
-
const
|
|
44
|
-
return currentStrategy === _utils2.DataSourceRowsUpdateStrategy.Default;
|
|
43
|
+
const standardRowsUpdateStrategyActive = React.useMemo(() => {
|
|
44
|
+
return currentStrategy === _utils2.DataSourceRowsUpdateStrategy.Default || currentStrategy === _utils2.DataSourceRowsUpdateStrategy.GroupedData;
|
|
45
45
|
}, [currentStrategy]);
|
|
46
46
|
const paginationModel = (0, _useGridSelector.useGridSelector)(apiRef, _gridPaginationSelector.gridPaginationModelSelector);
|
|
47
47
|
const lastRequestId = React.useRef(0);
|
|
@@ -67,7 +67,8 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
67
67
|
options.clearDataSourceState?.();
|
|
68
68
|
const _ref = params || {},
|
|
69
69
|
{
|
|
70
|
-
skipCache
|
|
70
|
+
skipCache,
|
|
71
|
+
keepChildrenExpanded
|
|
71
72
|
} = _ref,
|
|
72
73
|
getRowsParams = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
|
|
73
74
|
const fetchParams = (0, _extends2.default)({}, (0, _gridDataSourceSelector.gridGetRowsParamsSelector)(apiRef), apiRef.current.unstable_applyPipeProcessors('getRowsParams', {}), getRowsParams);
|
|
@@ -76,13 +77,17 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
76
77
|
if (!skipCache && responses.every(response => response !== undefined)) {
|
|
77
78
|
apiRef.current.applyStrategyProcessor('dataSourceRowsUpdate', {
|
|
78
79
|
response: _utils2.CacheChunkManager.mergeResponses(responses),
|
|
79
|
-
fetchParams
|
|
80
|
+
fetchParams,
|
|
81
|
+
options: {
|
|
82
|
+
skipCache,
|
|
83
|
+
keepChildrenExpanded
|
|
84
|
+
}
|
|
80
85
|
});
|
|
81
86
|
return;
|
|
82
87
|
}
|
|
83
88
|
|
|
84
89
|
// Manage loading state only for the default strategy
|
|
85
|
-
if (
|
|
90
|
+
if (standardRowsUpdateStrategyActive || apiRef.current.getRowsCount() === 0) {
|
|
86
91
|
apiRef.current.setLoading(true);
|
|
87
92
|
}
|
|
88
93
|
const requestId = lastRequestId.current + 1;
|
|
@@ -94,14 +99,22 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
94
99
|
if (lastRequestId.current === requestId) {
|
|
95
100
|
apiRef.current.applyStrategyProcessor('dataSourceRowsUpdate', {
|
|
96
101
|
response: getRowsResponse,
|
|
97
|
-
fetchParams
|
|
102
|
+
fetchParams,
|
|
103
|
+
options: {
|
|
104
|
+
skipCache,
|
|
105
|
+
keepChildrenExpanded
|
|
106
|
+
}
|
|
98
107
|
});
|
|
99
108
|
}
|
|
100
109
|
} catch (originalError) {
|
|
101
110
|
if (lastRequestId.current === requestId) {
|
|
102
111
|
apiRef.current.applyStrategyProcessor('dataSourceRowsUpdate', {
|
|
103
112
|
error: originalError,
|
|
104
|
-
fetchParams
|
|
113
|
+
fetchParams,
|
|
114
|
+
options: {
|
|
115
|
+
skipCache,
|
|
116
|
+
keepChildrenExpanded
|
|
117
|
+
}
|
|
105
118
|
});
|
|
106
119
|
if (typeof onDataSourceErrorProp === 'function') {
|
|
107
120
|
onDataSourceErrorProp(new _gridDataSourceError.GridGetRowsError({
|
|
@@ -114,11 +127,11 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
114
127
|
}
|
|
115
128
|
}
|
|
116
129
|
} finally {
|
|
117
|
-
if (
|
|
130
|
+
if (standardRowsUpdateStrategyActive && lastRequestId.current === requestId) {
|
|
118
131
|
apiRef.current.setLoading(false);
|
|
119
132
|
}
|
|
120
133
|
}
|
|
121
|
-
}, [cacheChunkManager, cache, apiRef,
|
|
134
|
+
}, [cacheChunkManager, cache, apiRef, standardRowsUpdateStrategyActive, props.dataSource?.getRows, onDataSourceErrorProp, options, props.signature]);
|
|
122
135
|
const handleStrategyActivityChange = React.useCallback(() => {
|
|
123
136
|
setCurrentStrategy(apiRef.current.getActiveStrategy(_strategyProcessing.GridStrategyGroup.DataSource));
|
|
124
137
|
}, [apiRef]);
|
|
@@ -151,11 +164,11 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
151
164
|
handleEditRowOption(params, finalRowUpdate);
|
|
152
165
|
return finalRowUpdate;
|
|
153
166
|
}
|
|
154
|
-
apiRef.current.updateNestedRows([finalRowUpdate], []);
|
|
155
167
|
if (finalRowUpdate && !(0, _isDeepEqual.isDeepEqual)(finalRowUpdate, params.previousRow)) {
|
|
156
168
|
// Reset the outdated cache, only if the row is _actually_ updated
|
|
157
169
|
apiRef.current.dataSource.cache.clear();
|
|
158
170
|
}
|
|
171
|
+
apiRef.current.updateNestedRows([finalRowUpdate], []);
|
|
159
172
|
return finalRowUpdate;
|
|
160
173
|
} catch (errorThrown) {
|
|
161
174
|
if (typeof onDataSourceErrorProp === 'function') {
|
|
@@ -193,7 +206,7 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
193
206
|
React.useEffect(() => {
|
|
194
207
|
// Return early if the proper strategy isn't set yet
|
|
195
208
|
// Context: https://github.com/mui/mui-x/issues/19650
|
|
196
|
-
if (currentStrategy !== _utils2.DataSourceRowsUpdateStrategy.Default && currentStrategy !== _utils2.DataSourceRowsUpdateStrategy.LazyLoading) {
|
|
209
|
+
if (currentStrategy !== _utils2.DataSourceRowsUpdateStrategy.Default && currentStrategy !== _utils2.DataSourceRowsUpdateStrategy.LazyLoading && currentStrategy !== _utils2.DataSourceRowsUpdateStrategy.GroupedData) {
|
|
197
210
|
return undefined;
|
|
198
211
|
}
|
|
199
212
|
if (props.dataSource) {
|
|
@@ -220,9 +233,9 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
220
233
|
cache,
|
|
221
234
|
events: {
|
|
222
235
|
strategyAvailabilityChange: handleStrategyActivityChange,
|
|
223
|
-
sortModelChange: (0, _utils.runIf)(
|
|
224
|
-
filterModelChange: (0, _utils.runIf)(
|
|
225
|
-
paginationModelChange: (0, _utils.runIf)(
|
|
236
|
+
sortModelChange: (0, _utils.runIf)(standardRowsUpdateStrategyActive, () => debouncedFetchRows()),
|
|
237
|
+
filterModelChange: (0, _utils.runIf)(standardRowsUpdateStrategyActive, () => debouncedFetchRows()),
|
|
238
|
+
paginationModelChange: (0, _utils.runIf)(standardRowsUpdateStrategyActive, () => debouncedFetchRows())
|
|
226
239
|
}
|
|
227
240
|
};
|
|
228
241
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { GridGetRowsParams, GridGetRowsResponse } from "../../../models/gridDataSource.js";
|
|
2
2
|
export declare enum DataSourceRowsUpdateStrategy {
|
|
3
|
-
Default = "set-
|
|
3
|
+
Default = "set-flat-rows",
|
|
4
4
|
LazyLoading = "replace-row-range",
|
|
5
|
+
GroupedData = "set-grouped-rows",
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Provides better cache hit rate by:
|
|
@@ -7,8 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.DataSourceRowsUpdateStrategy = exports.CacheChunkManager = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
let DataSourceRowsUpdateStrategy = exports.DataSourceRowsUpdateStrategy = /*#__PURE__*/function (DataSourceRowsUpdateStrategy) {
|
|
10
|
-
DataSourceRowsUpdateStrategy["Default"] = "set-
|
|
10
|
+
DataSourceRowsUpdateStrategy["Default"] = "set-flat-rows";
|
|
11
11
|
DataSourceRowsUpdateStrategy["LazyLoading"] = "replace-row-range";
|
|
12
|
+
DataSourceRowsUpdateStrategy["GroupedData"] = "set-grouped-rows";
|
|
12
13
|
return DataSourceRowsUpdateStrategy;
|
|
13
14
|
}({});
|
|
14
15
|
/**
|
|
@@ -249,7 +249,7 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
249
249
|
}
|
|
250
250
|
}, [logger, applyAutoSelection, canHaveMultipleSelection, apiRef, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, props.rowSelection]);
|
|
251
251
|
const getPropagatedRowSelectionModel = React.useCallback(inputSelectionModel => {
|
|
252
|
-
if (!isNestedData || !applyAutoSelection || inputSelectionModel.ids.size === 0 && inputSelectionModel.type === 'include') {
|
|
252
|
+
if (!isNestedData || !applyAutoSelection || inputSelectionModel.type === 'exclude' || inputSelectionModel.ids.size === 0 && inputSelectionModel.type === 'include') {
|
|
253
253
|
return inputSelectionModel;
|
|
254
254
|
}
|
|
255
255
|
const propagatedSelectionModel = {
|
|
@@ -72,17 +72,7 @@ export interface GridRowTreeCreationParams {
|
|
|
72
72
|
dataRowIdToModelLookup: GridRowIdToModelLookup;
|
|
73
73
|
previousGroupsToFetch?: GridRowId[];
|
|
74
74
|
}
|
|
75
|
-
export type
|
|
76
|
-
export type GridRowTreeUpdatedGroupsValue = {
|
|
77
|
-
[groupId: GridRowId]: { [action in GridRowTreeUpdateGroupAction]?: boolean };
|
|
78
|
-
};
|
|
79
|
-
export type GridRowTreeUpdatedGroupsManager = {
|
|
80
|
-
value: GridRowTreeUpdatedGroupsValue;
|
|
81
|
-
addAction: (groupId: GridRowId, action: GridRowTreeUpdateGroupAction) => void;
|
|
82
|
-
};
|
|
83
|
-
export type GridRowTreeCreationValue = Pick<GridRowsState, 'groupingName' | 'tree' | 'treeDepths' | 'dataRowIds' | 'groupsToFetch'> & {
|
|
84
|
-
updatedGroupsManager?: GridRowTreeUpdatedGroupsManager;
|
|
85
|
-
};
|
|
75
|
+
export type GridRowTreeCreationValue = Pick<GridRowsState, 'groupingName' | 'tree' | 'treeDepths' | 'dataRowIds' | 'groupsToFetch'>;
|
|
86
76
|
export type GridHydrateRowsValue = Pick<GridRowsState, 'tree' | 'treeDepths' | 'dataRowIds' | 'dataRowIdToModelLookup' | 'additionalRowGroups'>;
|
|
87
77
|
export type GridRowsPartialUpdateAction = 'insert' | 'modify' | 'remove';
|
|
88
78
|
export type GridRowIdToModelLookup<R extends GridValidRowModel = GridValidRowModel> = Record<string, R>;
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaA
|
|
|
57
57
|
export { useGridRowsOverridableMethods } from "../hooks/features/rows/useGridRowsOverridableMethods.js";
|
|
58
58
|
export { useGridParamsOverridableMethods } from "../hooks/features/rows/useGridParamsOverridableMethods.js";
|
|
59
59
|
export { useGridRowsPreProcessors } from "../hooks/features/rows/useGridRowsPreProcessors.js";
|
|
60
|
-
export type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridHydrateRowsValue, GridRowsPartialUpdates, GridRowsPartialUpdateAction, GridTreeDepths,
|
|
60
|
+
export type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridHydrateRowsValue, GridRowsPartialUpdates, GridRowsPartialUpdateAction, GridTreeDepths, GridPinnedRowsState } from "../hooks/features/rows/gridRowsInterfaces.js";
|
|
61
61
|
export { getTreeNodeDescendants, buildRootGroup } from "../hooks/features/rows/gridRowsUtils.js";
|
|
62
62
|
export { useGridRowsMeta, rowsMetaStateInitializer } from "../hooks/features/rows/useGridRowsMeta.js";
|
|
63
63
|
export { useGridParamsApi } from "../hooks/features/rows/useGridParamsApi.js";
|
|
@@ -87,7 +87,7 @@ export { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js
|
|
|
87
87
|
export type { GridStateInitializer } from "../hooks/utils/useGridInitializeState.js";
|
|
88
88
|
export type * as BaseSlots from "../models/gridBaseSlots.js";
|
|
89
89
|
export type * from "../models/props/DataGridProps.js";
|
|
90
|
-
export type { GridDataSourceApiBase, GridDataSourceApi, GridDataSourceBaseOptions } from "../hooks/features/dataSource/models.js";
|
|
90
|
+
export type { GridDataSourceApiBase, GridDataSourceApi, GridDataSourceBaseOptions, GridDataSourceFetchRowsParams } from "../hooks/features/dataSource/models.js";
|
|
91
91
|
export { DataSourceRowsUpdateStrategy } from "../hooks/features/dataSource/utils.js";
|
|
92
92
|
export { useGridDataSourceBase } from "../hooks/features/dataSource/useGridDataSourceBase.js";
|
|
93
93
|
export { CacheChunkManager } from "../hooks/features/dataSource/utils.js";
|
package/locales/arSD.js
CHANGED
|
@@ -304,5 +304,6 @@ const arSDGrid = {
|
|
|
304
304
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
305
305
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
306
306
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
307
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
307
308
|
};
|
|
308
309
|
const arSD = exports.arSD = (0, _getGridLocalization.getGridLocalization)(arSDGrid);
|
package/locales/beBY.js
CHANGED
|
@@ -328,5 +328,6 @@ const beBYGrid = {
|
|
|
328
328
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
329
329
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
330
330
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
331
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
331
332
|
};
|
|
332
333
|
const beBY = exports.beBY = (0, _getGridLocalization.getGridLocalization)(beBYGrid);
|
package/locales/bgBG.js
CHANGED
|
@@ -305,5 +305,6 @@ const bgBGGrid = {
|
|
|
305
305
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
306
306
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
307
307
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
308
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
308
309
|
};
|
|
309
310
|
const bgBG = exports.bgBG = (0, _getGridLocalization.getGridLocalization)(bgBGGrid);
|
package/locales/bnBD.js
CHANGED
|
@@ -303,5 +303,6 @@ const bnBDGrid = {
|
|
|
303
303
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
304
304
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
305
305
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
306
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
306
307
|
};
|
|
307
308
|
const bnBD = exports.bnBD = (0, _getGridLocalization.getGridLocalization)(bnBDGrid);
|
package/locales/csCZ.js
CHANGED
|
@@ -331,5 +331,6 @@ const csCZGrid = {
|
|
|
331
331
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
332
332
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
333
333
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
334
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
334
335
|
};
|
|
335
336
|
const csCZ = exports.csCZ = (0, _getGridLocalization.getGridLocalization)(csCZGrid);
|
package/locales/daDK.js
CHANGED
|
@@ -305,5 +305,6 @@ const daDKGrid = {
|
|
|
305
305
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
306
306
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
307
307
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
308
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
308
309
|
};
|
|
309
310
|
const daDK = exports.daDK = (0, _getGridLocalization.getGridLocalization)(daDKGrid);
|
package/locales/deDE.js
CHANGED
|
@@ -295,5 +295,6 @@ const deDEGrid = {
|
|
|
295
295
|
promptChangePivotRowsLabel: count => `Zeilen (${count})`,
|
|
296
296
|
promptChangePivotValuesLabel: count => `Werte (${count})`,
|
|
297
297
|
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
|
|
298
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
298
299
|
};
|
|
299
300
|
const deDE = exports.deDE = (0, _getGridLocalization.getGridLocalization)(deDEGrid);
|
package/locales/elGR.js
CHANGED
|
@@ -306,5 +306,6 @@ const elGRGrid = {
|
|
|
306
306
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
307
307
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
308
308
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
309
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
309
310
|
};
|
|
310
311
|
const elGR = exports.elGR = (0, _getGridLocalization.getGridLocalization)(elGRGrid);
|
package/locales/esES.js
CHANGED
|
@@ -303,5 +303,6 @@ const esESGrid = {
|
|
|
303
303
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
304
304
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
305
305
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
306
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
306
307
|
};
|
|
307
308
|
const esES = exports.esES = (0, _getGridLocalization.getGridLocalization)(esESGrid);
|
package/locales/faIR.js
CHANGED
|
@@ -304,5 +304,6 @@ const faIRGrid = {
|
|
|
304
304
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
305
305
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
306
306
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
307
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
307
308
|
};
|
|
308
309
|
const faIR = exports.faIR = (0, _getGridLocalization.getGridLocalization)(faIRGrid);
|
package/locales/fiFI.js
CHANGED
|
@@ -305,5 +305,6 @@ const fiFIGrid = {
|
|
|
305
305
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
306
306
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
307
307
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
308
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
308
309
|
};
|
|
309
310
|
const fiFI = exports.fiFI = (0, _getGridLocalization.getGridLocalization)(fiFIGrid);
|
package/locales/frFR.js
CHANGED
|
@@ -301,5 +301,6 @@ const frFRGrid = {
|
|
|
301
301
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
302
302
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
303
303
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
304
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
304
305
|
};
|
|
305
306
|
const frFR = exports.frFR = (0, _getGridLocalization.getGridLocalization)(frFRGrid);
|
package/locales/heIL.js
CHANGED
|
@@ -303,5 +303,6 @@ const heILGrid = {
|
|
|
303
303
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
304
304
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
305
305
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
306
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
306
307
|
};
|
|
307
308
|
const heIL = exports.heIL = (0, _getGridLocalization.getGridLocalization)(heILGrid);
|
package/locales/hrHR.js
CHANGED
|
@@ -323,5 +323,6 @@ const hrHRGrid = {
|
|
|
323
323
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
324
324
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
325
325
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
326
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
326
327
|
};
|
|
327
328
|
const hrHR = exports.hrHR = (0, _getGridLocalization.getGridLocalization)(hrHRGrid);
|
package/locales/huHU.js
CHANGED
|
@@ -303,5 +303,6 @@ const huHUGrid = {
|
|
|
303
303
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
304
304
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
305
305
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
306
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
306
307
|
};
|
|
307
308
|
const huHU = exports.huHU = (0, _getGridLocalization.getGridLocalization)(huHUGrid);
|
package/locales/hyAM.js
CHANGED
|
@@ -329,5 +329,6 @@ const hyAMGrid = {
|
|
|
329
329
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
330
330
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
331
331
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
332
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
332
333
|
};
|
|
333
334
|
const hyAM = exports.hyAM = (0, _getGridLocalization.getGridLocalization)(hyAMGrid);
|
package/locales/idID.js
CHANGED
|
@@ -295,5 +295,6 @@ const idIDGrid = exports.idIDGrid = {
|
|
|
295
295
|
promptChangePivotRowsLabel: count => `Baris (${count})`,
|
|
296
296
|
promptChangePivotValuesLabel: count => `Nilai (${count})`,
|
|
297
297
|
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
|
|
298
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
298
299
|
};
|
|
299
300
|
const idID = exports.idID = (0, _getGridLocalization.getGridLocalization)(idIDGrid);
|
package/locales/isIS.js
CHANGED
|
@@ -305,5 +305,6 @@ const isISGrid = {
|
|
|
305
305
|
// promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
|
|
306
306
|
// promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
|
|
307
307
|
// promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
|
|
308
|
+
// promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
|
|
308
309
|
};
|
|
309
310
|
const isIS = exports.isIS = (0, _getGridLocalization.getGridLocalization)(isISGrid);
|