@mui/x-data-grid 8.11.3 → 8.12.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 +151 -6
- package/DataGrid/DataGrid.js +3 -1
- package/DataGrid/useDataGridComponent.js +2 -2
- package/colDef/gridActionsColDef.js +1 -0
- package/colDef/gridBooleanColDef.js +1 -0
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/colDef/gridStringColDef.js +1 -0
- package/components/cell/GridCell.js +7 -5
- package/constants/localeTextConstants.js +29 -0
- package/esm/DataGrid/DataGrid.js +3 -1
- package/esm/DataGrid/useDataGridComponent.js +2 -2
- package/esm/colDef/gridActionsColDef.js +1 -0
- package/esm/colDef/gridBooleanColDef.js +1 -0
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/esm/colDef/gridStringColDef.js +1 -0
- package/esm/components/cell/GridCell.js +7 -5
- package/esm/constants/localeTextConstants.js +29 -0
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/esm/hooks/features/columns/useGridColumns.js +21 -4
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +12 -4
- package/esm/hooks/features/filter/gridFilterSelector.js +21 -4
- package/esm/hooks/features/filter/gridFilterState.d.ts +3 -1
- package/esm/hooks/features/filter/gridFilterUtils.d.ts +3 -3
- package/esm/hooks/features/filter/gridFilterUtils.js +23 -13
- package/esm/hooks/features/filter/useGridFilter.d.ts +2 -1
- package/esm/hooks/features/filter/useGridFilter.js +7 -5
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +3 -0
- package/esm/hooks/features/rows/gridRowsSelector.js +4 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +16 -7
- package/esm/hooks/features/sorting/gridSortingUtils.d.ts +3 -1
- package/esm/hooks/features/sorting/gridSortingUtils.js +10 -4
- package/esm/hooks/features/sorting/useGridSorting.d.ts +2 -1
- package/esm/hooks/features/sorting/useGridSorting.js +4 -3
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +1 -1
- package/esm/internals/index.js +1 -1
- package/esm/locales/arSD.js +31 -0
- package/esm/locales/beBY.js +31 -0
- package/esm/locales/bgBG.js +31 -0
- package/esm/locales/bnBD.js +31 -0
- package/esm/locales/csCZ.js +31 -0
- package/esm/locales/daDK.js +31 -0
- package/esm/locales/deDE.js +32 -0
- package/esm/locales/elGR.js +31 -0
- package/esm/locales/esES.js +31 -0
- package/esm/locales/faIR.js +31 -0
- package/esm/locales/fiFI.js +31 -0
- package/esm/locales/frFR.js +32 -2
- package/esm/locales/heIL.js +31 -0
- package/esm/locales/hrHR.js +31 -0
- package/esm/locales/huHU.js +31 -0
- package/esm/locales/hyAM.js +31 -0
- package/esm/locales/idID.d.ts +1 -1
- package/esm/locales/idID.js +32 -0
- package/esm/locales/isIS.js +31 -0
- package/esm/locales/itIT.js +31 -0
- package/esm/locales/jaJP.js +31 -0
- package/esm/locales/koKR.js +31 -0
- package/esm/locales/nbNO.js +31 -0
- package/esm/locales/nlNL.js +31 -0
- package/esm/locales/nnNO.js +32 -0
- package/esm/locales/plPL.js +31 -0
- package/esm/locales/ptBR.js +31 -0
- package/esm/locales/ptPT.js +31 -0
- package/esm/locales/roRO.js +31 -0
- package/esm/locales/ruRU.js +31 -0
- package/esm/locales/skSK.js +31 -0
- package/esm/locales/svSE.js +31 -0
- package/esm/locales/trTR.js +31 -0
- package/esm/locales/ukUA.js +31 -0
- package/esm/locales/urPK.js +31 -0
- package/esm/locales/viVN.js +31 -0
- package/esm/locales/zhCN.js +31 -0
- package/esm/locales/zhHK.js +31 -0
- package/esm/locales/zhTW.js +31 -0
- package/esm/material/augmentation.d.ts +8 -0
- package/esm/material/index.js +122 -24
- package/esm/models/api/gridLocaleTextApi.d.ts +27 -0
- package/esm/models/api/gridParamsApi.d.ts +5 -1
- package/esm/models/configuration/gridAggregationConfiguration.d.ts +25 -0
- package/esm/models/configuration/gridAggregationConfiguration.js +1 -0
- package/esm/models/configuration/gridConfiguration.d.ts +6 -9
- package/esm/models/gridBaseSlots.d.ts +15 -0
- package/esm/models/gridSlotsComponent.d.ts +10 -0
- package/esm/models/gridSlotsComponentsProps.d.ts +5 -1
- package/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/hooks/features/columns/useGridColumns.js +23 -6
- package/hooks/features/filter/gridFilterSelector.d.ts +12 -4
- package/hooks/features/filter/gridFilterSelector.js +22 -5
- package/hooks/features/filter/gridFilterState.d.ts +3 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +3 -3
- package/hooks/features/filter/gridFilterUtils.js +23 -13
- package/hooks/features/filter/useGridFilter.d.ts +2 -1
- package/hooks/features/filter/useGridFilter.js +7 -5
- package/hooks/features/rows/gridRowsSelector.d.ts +3 -0
- package/hooks/features/rows/gridRowsSelector.js +4 -0
- package/hooks/features/rows/useGridParamsApi.js +16 -7
- package/hooks/features/sorting/gridSortingUtils.d.ts +3 -1
- package/hooks/features/sorting/gridSortingUtils.js +10 -4
- package/hooks/features/sorting/useGridSorting.d.ts +2 -1
- package/hooks/features/sorting/useGridSorting.js +4 -3
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +7 -0
- package/locales/arSD.js +31 -0
- package/locales/beBY.js +31 -0
- package/locales/bgBG.js +31 -0
- package/locales/bnBD.js +31 -0
- package/locales/csCZ.js +31 -0
- package/locales/daDK.js +31 -0
- package/locales/deDE.js +32 -0
- package/locales/elGR.js +31 -0
- package/locales/esES.js +31 -0
- package/locales/faIR.js +31 -0
- package/locales/fiFI.js +31 -0
- package/locales/frFR.js +32 -2
- package/locales/heIL.js +31 -0
- package/locales/hrHR.js +31 -0
- package/locales/huHU.js +31 -0
- package/locales/hyAM.js +31 -0
- package/locales/idID.d.ts +1 -1
- package/locales/idID.js +32 -0
- package/locales/isIS.js +31 -0
- package/locales/itIT.js +31 -0
- package/locales/jaJP.js +31 -0
- package/locales/koKR.js +31 -0
- package/locales/nbNO.js +31 -0
- package/locales/nlNL.js +31 -0
- package/locales/nnNO.js +32 -0
- package/locales/plPL.js +31 -0
- package/locales/ptBR.js +31 -0
- package/locales/ptPT.js +31 -0
- package/locales/roRO.js +31 -0
- package/locales/ruRU.js +31 -0
- package/locales/skSK.js +31 -0
- package/locales/svSE.js +31 -0
- package/locales/trTR.js +31 -0
- package/locales/ukUA.js +31 -0
- package/locales/urPK.js +31 -0
- package/locales/viVN.js +31 -0
- package/locales/zhCN.js +31 -0
- package/locales/zhHK.js +31 -0
- package/locales/zhTW.js +31 -0
- package/material/augmentation.d.ts +8 -0
- package/material/index.js +122 -24
- package/models/api/gridLocaleTextApi.d.ts +27 -0
- package/models/api/gridParamsApi.d.ts +5 -1
- package/models/configuration/gridAggregationConfiguration.d.ts +25 -0
- package/models/configuration/gridAggregationConfiguration.js +5 -0
- package/models/configuration/gridConfiguration.d.ts +6 -9
- package/models/gridBaseSlots.d.ts +15 -0
- package/models/gridSlotsComponent.d.ts +10 -0
- package/models/gridSlotsComponentsProps.d.ts +5 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridFilterItem, GridFilterModel } from "../../../models/index.js";
|
|
2
|
+
import { GridColDef, GridFilterItem, GridFilterModel, GridRowModel } from "../../../models/index.js";
|
|
3
3
|
import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
4
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
5
5
|
import { GridAggregatedFilterItemApplier, GridFilterItemResult, GridQuickFilterValueResult } from "./gridFilterState.js";
|
|
@@ -15,9 +15,9 @@ export declare const sanitizeFilterModel: (model: GridFilterModel, disableMultip
|
|
|
15
15
|
export declare const mergeStateWithFilterModel: (filterModel: GridFilterModel, disableMultipleColumnsFiltering: boolean, apiRef: RefObject<GridPrivateApiCommunity>) => (filteringState: GridStateCommunity["filter"]) => GridStateCommunity["filter"];
|
|
16
16
|
export declare const removeDiacritics: (value: unknown) => unknown;
|
|
17
17
|
export declare const shouldQuickFilterExcludeHiddenColumns: (filterModel: GridFilterModel) => boolean;
|
|
18
|
-
export declare const buildAggregatedFilterApplier: (filterModel: GridFilterModel, apiRef: RefObject<GridPrivateApiCommunity>, disableEval: boolean) => GridAggregatedFilterItemApplier;
|
|
18
|
+
export declare const buildAggregatedFilterApplier: (filterModel: GridFilterModel, filterValueGetter: (row: GridRowModel, column: GridColDef) => any, apiRef: RefObject<GridPrivateApiCommunity>, disableEval: boolean) => GridAggregatedFilterItemApplier;
|
|
19
19
|
type FilterCache = {
|
|
20
20
|
cleanedFilterItems?: GridFilterItem[];
|
|
21
21
|
};
|
|
22
|
-
export declare const passFilterLogic: (allFilterItemResults: (null | GridFilterItemResult)[], allQuickFilterResults: (null | GridQuickFilterValueResult)[], filterModel: GridFilterModel, apiRef: RefObject<GridPrivateApiCommunity>, cache: FilterCache) => boolean;
|
|
22
|
+
export declare const passFilterLogic: (allFilterItemResults: (null | GridFilterItemResult)[], allQuickFilterResults: (null | GridQuickFilterValueResult)[], filterModel: GridFilterModel, filterValueGetter: (row: GridRowModel, column: GridColDef) => any, apiRef: RefObject<GridPrivateApiCommunity>, cache: FilterCache) => boolean;
|
|
23
23
|
export {};
|
|
@@ -81,7 +81,7 @@ export const removeDiacritics = value => {
|
|
|
81
81
|
}
|
|
82
82
|
return value;
|
|
83
83
|
};
|
|
84
|
-
const getFilterCallbackFromItem = (filterItem, apiRef) => {
|
|
84
|
+
const getFilterCallbackFromItem = (filterItem, filterValueGetter, apiRef) => {
|
|
85
85
|
if (!filterItem.field || !filterItem.operator) {
|
|
86
86
|
return null;
|
|
87
87
|
}
|
|
@@ -121,7 +121,7 @@ const getFilterCallbackFromItem = (filterItem, apiRef) => {
|
|
|
121
121
|
return {
|
|
122
122
|
item: newFilterItem,
|
|
123
123
|
fn: row => {
|
|
124
|
-
let value =
|
|
124
|
+
let value = filterValueGetter(row, column);
|
|
125
125
|
if (ignoreDiacritics) {
|
|
126
126
|
value = removeDiacritics(value);
|
|
127
127
|
}
|
|
@@ -132,16 +132,21 @@ const getFilterCallbackFromItem = (filterItem, apiRef) => {
|
|
|
132
132
|
let filterItemsApplierId = 1;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
+
* @name filterValueGetter
|
|
136
|
+
* @param {GridRowModel} row The row to get the value from.
|
|
137
|
+
* @param {GridColDef} column The column that the filter is applied on.
|
|
138
|
+
*
|
|
135
139
|
* Generates a method to easily check if a row is matching the current filter model.
|
|
136
140
|
* @param {GridFilterModel} filterModel The model with which we want to filter the rows.
|
|
141
|
+
* @param {FilterValueGetterFn} filterValueGetter The function to get the value to filter by.
|
|
137
142
|
* @param {RefObject<GridPrivateApiCommunity>} apiRef The API of the grid.
|
|
138
143
|
* @returns {GridAggregatedFilterItemApplier | null} A method that checks if a row is matching the current filter model. If `null`, we consider that all the rows are matching the filters.
|
|
139
144
|
*/
|
|
140
|
-
const buildAggregatedFilterItemsApplier = (filterModel, apiRef, disableEval) => {
|
|
145
|
+
const buildAggregatedFilterItemsApplier = (filterModel, filterValueGetter, apiRef, disableEval) => {
|
|
141
146
|
const {
|
|
142
147
|
items
|
|
143
148
|
} = filterModel;
|
|
144
|
-
const appliers = items.map(item => getFilterCallbackFromItem(item, apiRef)).filter(callback => !!callback);
|
|
149
|
+
const appliers = items.map(item => getFilterCallbackFromItem(item, filterValueGetter, apiRef)).filter(callback => !!callback);
|
|
145
150
|
if (appliers.length === 0) {
|
|
146
151
|
return null;
|
|
147
152
|
}
|
|
@@ -181,12 +186,17 @@ export const shouldQuickFilterExcludeHiddenColumns = filterModel => {
|
|
|
181
186
|
};
|
|
182
187
|
|
|
183
188
|
/**
|
|
189
|
+
* @name filterValueGetter
|
|
190
|
+
* @param {GridRowModel} row The row to get the value from.
|
|
191
|
+
* @param {GridColDef} column The column that the filter is applied on.
|
|
192
|
+
*
|
|
184
193
|
* Generates a method to easily check if a row is matching the current quick filter.
|
|
185
194
|
* @param {any[]} filterModel The model with which we want to filter the rows.
|
|
195
|
+
* @param {FilterValueGetterFn} filterValueGetter The function to get the value to filter by.
|
|
186
196
|
* @param {RefObject<GridPrivateApiCommunity>} apiRef The API of the grid.
|
|
187
197
|
* @returns {GridAggregatedFilterItemApplier | null} A method that checks if a row is matching the current filter model. If `null`, we consider that all the rows are matching the filters.
|
|
188
198
|
*/
|
|
189
|
-
const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
|
|
199
|
+
const buildAggregatedQuickFilterApplier = (filterModel, filterValueGetter, apiRef) => {
|
|
190
200
|
const quickFilterValues = filterModel.quickFilterValues?.filter(Boolean) ?? [];
|
|
191
201
|
if (quickFilterValues.length === 0) {
|
|
192
202
|
return null;
|
|
@@ -239,7 +249,7 @@ const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
|
|
|
239
249
|
continue;
|
|
240
250
|
}
|
|
241
251
|
const applier = appliers[v];
|
|
242
|
-
let value =
|
|
252
|
+
let value = filterValueGetter(row, column);
|
|
243
253
|
if (applier.fn === null) {
|
|
244
254
|
continue;
|
|
245
255
|
}
|
|
@@ -257,23 +267,23 @@ const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
|
|
|
257
267
|
return result;
|
|
258
268
|
};
|
|
259
269
|
};
|
|
260
|
-
export const buildAggregatedFilterApplier = (filterModel, apiRef, disableEval) => {
|
|
261
|
-
const isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(filterModel, apiRef, disableEval);
|
|
262
|
-
const isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(filterModel, apiRef);
|
|
270
|
+
export const buildAggregatedFilterApplier = (filterModel, filterValueGetter, apiRef, disableEval) => {
|
|
271
|
+
const isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(filterModel, filterValueGetter, apiRef, disableEval);
|
|
272
|
+
const isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(filterModel, filterValueGetter, apiRef);
|
|
263
273
|
return function isRowMatchingFilters(row, shouldApplyFilter, result) {
|
|
264
274
|
result.passingFilterItems = isRowMatchingFilterItems?.(row, shouldApplyFilter) ?? null;
|
|
265
275
|
result.passingQuickFilterValues = isRowMatchingQuickFilter?.(row, shouldApplyFilter) ?? null;
|
|
266
276
|
};
|
|
267
277
|
};
|
|
268
278
|
const isNotNull = result => result != null;
|
|
269
|
-
const filterModelItems = (cache, apiRef, items) => {
|
|
279
|
+
const filterModelItems = (cache, filterValueGetter, apiRef, items) => {
|
|
270
280
|
if (!cache.cleanedFilterItems) {
|
|
271
|
-
cache.cleanedFilterItems = items.filter(item => getFilterCallbackFromItem(item, apiRef) !== null);
|
|
281
|
+
cache.cleanedFilterItems = items.filter(item => getFilterCallbackFromItem(item, filterValueGetter, apiRef) !== null);
|
|
272
282
|
}
|
|
273
283
|
return cache.cleanedFilterItems;
|
|
274
284
|
};
|
|
275
|
-
export const passFilterLogic = (allFilterItemResults, allQuickFilterResults, filterModel, apiRef, cache) => {
|
|
276
|
-
const cleanedFilterItems = filterModelItems(cache, apiRef, filterModel.items);
|
|
285
|
+
export const passFilterLogic = (allFilterItemResults, allQuickFilterResults, filterModel, filterValueGetter, apiRef, cache) => {
|
|
286
|
+
const cleanedFilterItems = filterModelItems(cache, filterValueGetter, apiRef, filterModel.items);
|
|
277
287
|
const cleanedFilterItemResults = allFilterItemResults.filter(isNotNull);
|
|
278
288
|
const cleanedQuickFilterResults = allQuickFilterResults.filter(isNotNull);
|
|
279
289
|
|
|
@@ -2,10 +2,11 @@ import { RefObject } from '@mui/x-internals/types';
|
|
|
2
2
|
import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
3
3
|
import { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
4
|
import { GridStateInitializer } from "../../utils/useGridInitializeState.js";
|
|
5
|
+
import type { GridConfiguration } from "../../../models/configuration/gridConfiguration.js";
|
|
5
6
|
export declare const filterStateInitializer: GridStateInitializer<Pick<DataGridProcessedProps, 'filterModel' | 'initialState' | 'disableMultipleColumnsFiltering'>>;
|
|
6
7
|
/**
|
|
7
8
|
* @requires useGridColumns (method, event)
|
|
8
9
|
* @requires useGridParamsApi (method)
|
|
9
10
|
* @requires useGridRows (event)
|
|
10
11
|
*/
|
|
11
|
-
export declare const useGridFilter: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "rows" | "initialState" | "filterModel" | "getRowId" | "onFilterModelChange" | "filterMode" | "disableMultipleColumnsFiltering" | "slots" | "slotProps" | "disableColumnFilter" | "disableEval" | "ignoreDiacritics"
|
|
12
|
+
export declare const useGridFilter: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "rows" | "initialState" | "filterModel" | "getRowId" | "onFilterModelChange" | "filterMode" | "disableMultipleColumnsFiltering" | "slots" | "slotProps" | "disableColumnFilter" | "disableEval" | "ignoreDiacritics">, configuration: GridConfiguration) => void;
|
|
@@ -45,7 +45,7 @@ function createMemoizedValues() {
|
|
|
45
45
|
* @requires useGridParamsApi (method)
|
|
46
46
|
* @requires useGridRows (event)
|
|
47
47
|
*/
|
|
48
|
-
export const useGridFilter = (apiRef, props) => {
|
|
48
|
+
export const useGridFilter = (apiRef, props, configuration) => {
|
|
49
49
|
const logger = useGridLogger(apiRef, 'useGridFilter');
|
|
50
50
|
apiRef.current.registerControlState({
|
|
51
51
|
stateId: 'filter',
|
|
@@ -195,15 +195,17 @@ export const useGridFilter = (apiRef, props) => {
|
|
|
195
195
|
}, [apiRef, logger, props.disableMultipleColumnsFiltering]);
|
|
196
196
|
const getFilterState = React.useCallback(inputFilterModel => {
|
|
197
197
|
const filterModel = sanitizeFilterModel(inputFilterModel, props.disableMultipleColumnsFiltering, apiRef);
|
|
198
|
-
const
|
|
198
|
+
const filterValueGetter = configuration.hooks.useFilterValueGetter(apiRef, props);
|
|
199
|
+
const isRowMatchingFilters = props.filterMode === 'client' ? buildAggregatedFilterApplier(filterModel, filterValueGetter, apiRef, props.disableEval) : null;
|
|
199
200
|
const filterResult = apiRef.current.applyStrategyProcessor('filtering', {
|
|
200
201
|
isRowMatchingFilters,
|
|
201
|
-
filterModel: filterModel ?? getDefaultGridFilterModel()
|
|
202
|
+
filterModel: filterModel ?? getDefaultGridFilterModel(),
|
|
203
|
+
filterValueGetter
|
|
202
204
|
});
|
|
203
205
|
return _extends({}, filterResult, {
|
|
204
206
|
filterModel
|
|
205
207
|
});
|
|
206
|
-
}, [
|
|
208
|
+
}, [apiRef, configuration.hooks, props]);
|
|
207
209
|
const filterApi = {
|
|
208
210
|
setFilterLogicOperator,
|
|
209
211
|
unstable_applyFilters: updateFilteredRows,
|
|
@@ -287,7 +289,7 @@ export const useGridFilter = (apiRef, props) => {
|
|
|
287
289
|
const row = rows[i];
|
|
288
290
|
const id = getRowId ? getRowId(row) : row.id;
|
|
289
291
|
isRowMatchingFilters(row, undefined, result);
|
|
290
|
-
const isRowPassing = passFilterLogic([result.passingFilterItems], [result.passingQuickFilterValues], params.filterModel, apiRef, filterCache);
|
|
292
|
+
const isRowPassing = passFilterLogic([result.passingFilterItems], [result.passingQuickFilterValues], params.filterModel, params.filterValueGetter, apiRef, filterCache);
|
|
291
293
|
if (!isRowPassing) {
|
|
292
294
|
filteredRowsLookup[id] = isRowPassing;
|
|
293
295
|
}
|
|
@@ -40,6 +40,9 @@ export declare const gridRowTreeDepthsSelector: (args_0: import("react").RefObje
|
|
|
40
40
|
export declare const gridRowMaximumTreeDepthSelector: (args_0: import("react").RefObject<{
|
|
41
41
|
state: GridStateCommunity;
|
|
42
42
|
} | null>) => number;
|
|
43
|
+
/**
|
|
44
|
+
* @category Rows
|
|
45
|
+
*/
|
|
43
46
|
export declare const gridDataRowIdsSelector: (args_0: import("react").RefObject<{
|
|
44
47
|
state: GridStateCommunity;
|
|
45
48
|
} | null>) => GridRowId[];
|
|
@@ -27,6 +27,10 @@ export const gridRowMaximumTreeDepthSelector = createSelectorMemoized(gridRowsSt
|
|
|
27
27
|
}
|
|
28
28
|
return (entries.filter(([, nodeCount]) => nodeCount > 0).map(([depth]) => Number(depth)).sort((a, b) => b - a)[0] ?? 0) + 1;
|
|
29
29
|
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @category Rows
|
|
33
|
+
*/
|
|
30
34
|
export const gridDataRowIdsSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIds);
|
|
31
35
|
export const gridDataRowsSelector = createSelectorMemoized(gridDataRowIdsSelector, gridRowsLookupSelector, (dataRowIds, rowsLookup) => dataRowIds.reduce((acc, id) => {
|
|
32
36
|
if (!rowsLookup[id]) {
|
|
@@ -37,10 +37,22 @@ export function useGridParamsApi(apiRef, props) {
|
|
|
37
37
|
colDef,
|
|
38
38
|
hasFocus,
|
|
39
39
|
rowNode,
|
|
40
|
-
tabIndex
|
|
40
|
+
tabIndex,
|
|
41
|
+
value: forcedValue,
|
|
42
|
+
formattedValue: forcedFormattedValue
|
|
41
43
|
}) => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
let value = row[field];
|
|
45
|
+
if (forcedValue !== undefined) {
|
|
46
|
+
value = forcedValue;
|
|
47
|
+
} else if (colDef?.valueGetter) {
|
|
48
|
+
value = colDef.valueGetter(value, row, colDef, apiRef);
|
|
49
|
+
}
|
|
50
|
+
let formattedValue = value;
|
|
51
|
+
if (forcedFormattedValue !== undefined) {
|
|
52
|
+
formattedValue = forcedFormattedValue;
|
|
53
|
+
} else if (colDef?.valueFormatter) {
|
|
54
|
+
formattedValue = colDef.valueFormatter(value, row, colDef, apiRef);
|
|
55
|
+
}
|
|
44
56
|
const params = {
|
|
45
57
|
id,
|
|
46
58
|
field,
|
|
@@ -51,13 +63,10 @@ export function useGridParamsApi(apiRef, props) {
|
|
|
51
63
|
hasFocus,
|
|
52
64
|
tabIndex,
|
|
53
65
|
value,
|
|
54
|
-
formattedValue
|
|
66
|
+
formattedValue,
|
|
55
67
|
isEditable: false,
|
|
56
68
|
api: apiRef.current
|
|
57
69
|
};
|
|
58
|
-
if (colDef && colDef.valueFormatter) {
|
|
59
|
-
params.formattedValue = colDef.valueFormatter(value, row, colDef, apiRef);
|
|
60
|
-
}
|
|
61
70
|
params.isEditable = colDef && apiRef.current.isCellEditable(params);
|
|
62
71
|
return params;
|
|
63
72
|
}, [apiRef]);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { GridSortingModelApplier } from "./gridSortingState.js";
|
|
3
|
+
import type { GridRowId } from "../../../models/index.js";
|
|
3
4
|
import { GridApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
5
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
5
6
|
import { GridComparatorFn, GridSortDirection, GridSortModel } from "../../../models/gridSortModel.js";
|
|
@@ -8,10 +9,11 @@ export declare const mergeStateWithSortModel: (sortModel: GridSortModel, disable
|
|
|
8
9
|
/**
|
|
9
10
|
* Generates a method to easily sort a list of rows according to the current sort model.
|
|
10
11
|
* @param {GridSortModel} sortModel The model with which we want to sort the rows.
|
|
12
|
+
* @param {Function} sortValueGetter A function to get the value to sort by.
|
|
11
13
|
* @param {RefObject<GridApiCommunity>} apiRef The API of the grid.
|
|
12
14
|
* @returns {GridSortingModelApplier | null} A method that generates a list of sorted row ids from a list of rows according to the current sort model. If `null`, we consider that the rows should remain in the order there were provided.
|
|
13
15
|
*/
|
|
14
|
-
export declare const buildAggregatedSortingApplier: (sortModel: GridSortModel, apiRef: RefObject<GridApiCommunity>) => GridSortingModelApplier | null;
|
|
16
|
+
export declare const buildAggregatedSortingApplier: (sortModel: GridSortModel, sortValueGetter: (id: GridRowId, field: string) => any, apiRef: RefObject<GridApiCommunity>) => GridSortingModelApplier | null;
|
|
15
17
|
export declare const getNextGridSortDirection: (sortingOrder: readonly GridSortDirection[], current?: GridSortDirection) => GridSortDirection;
|
|
16
18
|
export declare const gridStringOrNumberComparator: GridComparatorFn;
|
|
17
19
|
export declare const gridNumberComparator: GridComparatorFn;
|
|
@@ -18,12 +18,17 @@ export const mergeStateWithSortModel = (sortModel, disableMultipleColumnsSorting
|
|
|
18
18
|
const isDesc = direction => direction === 'desc';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
+
* @name sortValueGetter
|
|
22
|
+
* @param {GridRowId} id The id of the row.
|
|
23
|
+
* @param {string} field The field to sort by.
|
|
24
|
+
*
|
|
21
25
|
* Transform an item of the sorting model into a method comparing two rows.
|
|
22
26
|
* @param {GridSortItem} sortItem The sort item we want to apply.
|
|
27
|
+
* @param {Function} sortValueGetter A function to get the value to sort by.
|
|
23
28
|
* @param {RefObject<GridApiCommunity>} apiRef The API of the grid.
|
|
24
29
|
* @returns {GridParsedSortItem | null} The parsed sort item. Returns `null` is the sort item is not valid.
|
|
25
30
|
*/
|
|
26
|
-
const parseSortItem = (sortItem, apiRef) => {
|
|
31
|
+
const parseSortItem = (sortItem, sortValueGetter, apiRef) => {
|
|
27
32
|
const column = apiRef.current.getColumn(sortItem.field);
|
|
28
33
|
if (!column || sortItem.sort === null) {
|
|
29
34
|
return null;
|
|
@@ -41,7 +46,7 @@ const parseSortItem = (sortItem, apiRef) => {
|
|
|
41
46
|
id,
|
|
42
47
|
field: column.field,
|
|
43
48
|
rowNode: gridRowNodeSelector(apiRef, id),
|
|
44
|
-
value:
|
|
49
|
+
value: sortValueGetter(id, column.field),
|
|
45
50
|
api: apiRef.current
|
|
46
51
|
});
|
|
47
52
|
return {
|
|
@@ -73,11 +78,12 @@ const compareRows = (parsedSortItems, row1, row2) => {
|
|
|
73
78
|
/**
|
|
74
79
|
* Generates a method to easily sort a list of rows according to the current sort model.
|
|
75
80
|
* @param {GridSortModel} sortModel The model with which we want to sort the rows.
|
|
81
|
+
* @param {Function} sortValueGetter A function to get the value to sort by.
|
|
76
82
|
* @param {RefObject<GridApiCommunity>} apiRef The API of the grid.
|
|
77
83
|
* @returns {GridSortingModelApplier | null} A method that generates a list of sorted row ids from a list of rows according to the current sort model. If `null`, we consider that the rows should remain in the order there were provided.
|
|
78
84
|
*/
|
|
79
|
-
export const buildAggregatedSortingApplier = (sortModel, apiRef) => {
|
|
80
|
-
const comparatorList = sortModel.map(item => parseSortItem(item, apiRef)).filter(comparator => !!comparator);
|
|
85
|
+
export const buildAggregatedSortingApplier = (sortModel, sortValueGetter, apiRef) => {
|
|
86
|
+
const comparatorList = sortModel.map(item => parseSortItem(item, sortValueGetter, apiRef)).filter(comparator => !!comparator);
|
|
81
87
|
if (comparatorList.length === 0) {
|
|
82
88
|
return null;
|
|
83
89
|
}
|
|
@@ -2,9 +2,10 @@ import { RefObject } from '@mui/x-internals/types';
|
|
|
2
2
|
import { DataGridProcessedProps } from "../../../models/props/DataGridProps.js";
|
|
3
3
|
import { GridPrivateApiCommunity } from "../../../models/api/gridApiCommunity.js";
|
|
4
4
|
import { GridStateInitializer } from "../../utils/useGridInitializeState.js";
|
|
5
|
+
import type { GridConfiguration } from "../../../models/configuration/gridConfiguration.js";
|
|
5
6
|
export declare const sortingStateInitializer: GridStateInitializer<Pick<DataGridProcessedProps, 'sortModel' | 'initialState' | 'disableMultipleColumnsSorting'>>;
|
|
6
7
|
/**
|
|
7
8
|
* @requires useGridRows (event)
|
|
8
9
|
* @requires useGridColumns (event)
|
|
9
10
|
*/
|
|
10
|
-
export declare const useGridSorting: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "initialState" | "sortModel" | "onSortModelChange" | "sortingOrder" | "sortingMode" | "disableColumnSorting" | "disableMultipleColumnsSorting" | "multipleColumnsSortingMode"
|
|
11
|
+
export declare const useGridSorting: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "initialState" | "sortModel" | "onSortModelChange" | "sortingOrder" | "sortingMode" | "disableColumnSorting" | "disableMultipleColumnsSorting" | "multipleColumnsSortingMode">, configuration: GridConfiguration) => void;
|
|
@@ -26,7 +26,7 @@ export const sortingStateInitializer = (state, props) => {
|
|
|
26
26
|
* @requires useGridRows (event)
|
|
27
27
|
* @requires useGridColumns (event)
|
|
28
28
|
*/
|
|
29
|
-
export const useGridSorting = (apiRef, props) => {
|
|
29
|
+
export const useGridSorting = (apiRef, props, configuration) => {
|
|
30
30
|
const logger = useGridLogger(apiRef, 'useGridSorting');
|
|
31
31
|
apiRef.current.registerControlState({
|
|
32
32
|
stateId: 'sortModel',
|
|
@@ -79,6 +79,7 @@ export const useGridSorting = (apiRef, props) => {
|
|
|
79
79
|
* API METHODS
|
|
80
80
|
*/
|
|
81
81
|
const applySorting = React.useCallback(() => {
|
|
82
|
+
const sortValueGetter = configuration.hooks.useSortValueGetter(apiRef);
|
|
82
83
|
apiRef.current.setState(state => {
|
|
83
84
|
if (props.sortingMode === 'server') {
|
|
84
85
|
logger.debug('Skipping sorting rows as sortingMode = server');
|
|
@@ -89,7 +90,7 @@ export const useGridSorting = (apiRef, props) => {
|
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
const sortModel = gridSortModelSelector(apiRef);
|
|
92
|
-
const sortRowList = buildAggregatedSortingApplier(sortModel, apiRef);
|
|
93
|
+
const sortRowList = buildAggregatedSortingApplier(sortModel, sortValueGetter, apiRef);
|
|
93
94
|
const sortedRows = apiRef.current.applyStrategyProcessor('sorting', {
|
|
94
95
|
sortRowList
|
|
95
96
|
});
|
|
@@ -100,7 +101,7 @@ export const useGridSorting = (apiRef, props) => {
|
|
|
100
101
|
});
|
|
101
102
|
});
|
|
102
103
|
apiRef.current.publishEvent('sortedRowsSet');
|
|
103
|
-
}, [apiRef, logger, props.sortingMode]);
|
|
104
|
+
}, [apiRef, logger, configuration, props.sortingMode]);
|
|
104
105
|
const setSortModel = React.useCallback(model => {
|
|
105
106
|
const currentModel = gridSortModelSelector(apiRef);
|
|
106
107
|
if (currentModel !== model) {
|
package/esm/index.js
CHANGED
package/esm/internals/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export { useGridPrintExport } from "../hooks/features/export/useGridPrintExport.
|
|
|
41
41
|
export { useGridFilter, filterStateInitializer } from "../hooks/features/filter/useGridFilter.js";
|
|
42
42
|
export { defaultGridFilterLookup } from "../hooks/features/filter/gridFilterState.js";
|
|
43
43
|
export { passFilterLogic } from "../hooks/features/filter/gridFilterUtils.js";
|
|
44
|
-
export { gridFilteredChildrenCountLookupSelector, gridExpandedSortedRowTreeLevelPositionLookupSelector, gridExpandedSortedRowIndexLookupSelector } from "../hooks/features/filter/gridFilterSelector.js";
|
|
44
|
+
export { gridFilteredChildrenCountLookupSelector, gridExpandedSortedRowTreeLevelPositionLookupSelector, gridExpandedSortedRowIndexLookupSelector, gridFilteredSortedDepthRowEntriesSelector } from "../hooks/features/filter/gridFilterSelector.js";
|
|
45
45
|
export { isSingleSelectColDef } from "../components/panel/filterPanel/filterPanelUtils.js";
|
|
46
46
|
export type { GridAggregatedFilterItemApplier, GridAggregatedFilterItemApplierResult } from "../hooks/features/filter/gridFilterState.js";
|
|
47
47
|
export { useGridFocus, focusStateInitializer } from "../hooks/features/focus/useGridFocus.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export { useGridPrintExport } from "../hooks/features/export/useGridPrintExport.
|
|
|
31
31
|
export { useGridFilter, filterStateInitializer } from "../hooks/features/filter/useGridFilter.js";
|
|
32
32
|
export { defaultGridFilterLookup } from "../hooks/features/filter/gridFilterState.js";
|
|
33
33
|
export { passFilterLogic } from "../hooks/features/filter/gridFilterUtils.js";
|
|
34
|
-
export { gridFilteredChildrenCountLookupSelector, gridExpandedSortedRowTreeLevelPositionLookupSelector, gridExpandedSortedRowIndexLookupSelector } from "../hooks/features/filter/gridFilterSelector.js";
|
|
34
|
+
export { gridFilteredChildrenCountLookupSelector, gridExpandedSortedRowTreeLevelPositionLookupSelector, gridExpandedSortedRowIndexLookupSelector, gridFilteredSortedDepthRowEntriesSelector } from "../hooks/features/filter/gridFilterSelector.js";
|
|
35
35
|
export { isSingleSelectColDef } from "../components/panel/filterPanel/filterPanelUtils.js";
|
|
36
36
|
export { useGridFocus, focusStateInitializer } from "../hooks/features/focus/useGridFocus.js";
|
|
37
37
|
export { useGridKeyboardNavigation } from "../hooks/features/keyboardNavigation/useGridKeyboardNavigation.js";
|
package/esm/locales/arSD.js
CHANGED
|
@@ -35,6 +35,9 @@ const arSDGrid = {
|
|
|
35
35
|
// Toolbar pivot button
|
|
36
36
|
// toolbarPivot: 'Pivot',
|
|
37
37
|
|
|
38
|
+
// Toolbar charts button
|
|
39
|
+
// toolbarCharts: 'Charts',
|
|
40
|
+
|
|
38
41
|
// Toolbar AI Assistant button
|
|
39
42
|
// toolbarAssistant: 'AI Assistant',
|
|
40
43
|
|
|
@@ -116,6 +119,7 @@ const arSDGrid = {
|
|
|
116
119
|
columnMenuSortAsc: 'الفرز تصاعدياً',
|
|
117
120
|
columnMenuSortDesc: 'الفرز تنازلياً',
|
|
118
121
|
// columnMenuManagePivot: 'Manage pivot',
|
|
122
|
+
// columnMenuManageCharts: 'Manage charts',
|
|
119
123
|
|
|
120
124
|
// Column header text
|
|
121
125
|
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} من المرشِحات النشطة` : `مرشِح نشط`,
|
|
@@ -185,6 +189,7 @@ const arSDGrid = {
|
|
|
185
189
|
rowReorderingHeaderName: 'أعادة ترتيب الصفوف',
|
|
186
190
|
// Aggregation
|
|
187
191
|
aggregationMenuItemHeader: 'الدلالات الحسابية',
|
|
192
|
+
// aggregationFunctionLabelNone: 'none',
|
|
188
193
|
aggregationFunctionLabelSum: 'مجموع',
|
|
189
194
|
aggregationFunctionLabelAvg: 'معدل',
|
|
190
195
|
aggregationFunctionLabelMin: 'الحد الادنى',
|
|
@@ -220,6 +225,32 @@ const arSDGrid = {
|
|
|
220
225
|
// pivotYearColumnHeaderName: '(Year)',
|
|
221
226
|
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
222
227
|
|
|
228
|
+
// Charts configuration panel
|
|
229
|
+
// chartsNoCharts: 'There are no charts available',
|
|
230
|
+
// chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
231
|
+
// chartsTabChart: 'Chart',
|
|
232
|
+
// chartsTabFields: 'Fields',
|
|
233
|
+
// chartsTabCustomize: 'Customize',
|
|
234
|
+
// chartsCloseButton: 'Close charts configuration',
|
|
235
|
+
// chartsSyncButtonLabel: 'Sync chart',
|
|
236
|
+
// chartsSearchPlaceholder: 'Search fields',
|
|
237
|
+
// chartsSearchLabel: 'Search fields',
|
|
238
|
+
// chartsSearchClear: 'Clear search',
|
|
239
|
+
// chartsNoFields: 'No fields',
|
|
240
|
+
// chartsFieldBlocked: 'This field cannot be added to any section',
|
|
241
|
+
// chartsCategories: 'Categories',
|
|
242
|
+
// chartsSeries: 'Series',
|
|
243
|
+
// chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
|
|
244
|
+
// chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
|
|
245
|
+
// chartsMenuMoveUp: 'Move up',
|
|
246
|
+
// chartsMenuMoveDown: 'Move down',
|
|
247
|
+
// chartsMenuMoveToTop: 'Move to top',
|
|
248
|
+
// chartsMenuMoveToBottom: 'Move to bottom',
|
|
249
|
+
// chartsMenuOptions: 'Field options',
|
|
250
|
+
// chartsMenuRemove: 'Remove',
|
|
251
|
+
// chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
|
|
252
|
+
// chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
|
|
253
|
+
|
|
223
254
|
// AI Assistant panel
|
|
224
255
|
// aiAssistantPanelTitle: 'AI Assistant',
|
|
225
256
|
// aiAssistantPanelClose: 'Close AI Assistant',
|
package/esm/locales/beBY.js
CHANGED
|
@@ -49,6 +49,9 @@ const beBYGrid = {
|
|
|
49
49
|
// Toolbar pivot button
|
|
50
50
|
// toolbarPivot: 'Pivot',
|
|
51
51
|
|
|
52
|
+
// Toolbar charts button
|
|
53
|
+
// toolbarCharts: 'Charts',
|
|
54
|
+
|
|
52
55
|
// Toolbar AI Assistant button
|
|
53
56
|
// toolbarAssistant: 'AI Assistant',
|
|
54
57
|
|
|
@@ -132,6 +135,7 @@ const beBYGrid = {
|
|
|
132
135
|
columnMenuSortAsc: 'Сартыраваць па нарастанню',
|
|
133
136
|
columnMenuSortDesc: 'Сартыраваць па спаданню',
|
|
134
137
|
// columnMenuManagePivot: 'Manage pivot',
|
|
138
|
+
// columnMenuManageCharts: 'Manage charts',
|
|
135
139
|
|
|
136
140
|
// Column header text
|
|
137
141
|
columnHeaderFiltersTooltipActive: count => getPluralForm(count, {
|
|
@@ -209,6 +213,7 @@ const beBYGrid = {
|
|
|
209
213
|
rowReorderingHeaderName: 'Змяненне чарговасці радкоў',
|
|
210
214
|
// Aggregation
|
|
211
215
|
aggregationMenuItemHeader: "Аб'яднанне дадзеных",
|
|
216
|
+
// aggregationFunctionLabelNone: 'none',
|
|
212
217
|
aggregationFunctionLabelSum: 'сума',
|
|
213
218
|
aggregationFunctionLabelAvg: 'сярэдняе',
|
|
214
219
|
aggregationFunctionLabelMin: 'мінімум',
|
|
@@ -244,6 +249,32 @@ const beBYGrid = {
|
|
|
244
249
|
// pivotYearColumnHeaderName: '(Year)',
|
|
245
250
|
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
246
251
|
|
|
252
|
+
// Charts configuration panel
|
|
253
|
+
// chartsNoCharts: 'There are no charts available',
|
|
254
|
+
// chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
255
|
+
// chartsTabChart: 'Chart',
|
|
256
|
+
// chartsTabFields: 'Fields',
|
|
257
|
+
// chartsTabCustomize: 'Customize',
|
|
258
|
+
// chartsCloseButton: 'Close charts configuration',
|
|
259
|
+
// chartsSyncButtonLabel: 'Sync chart',
|
|
260
|
+
// chartsSearchPlaceholder: 'Search fields',
|
|
261
|
+
// chartsSearchLabel: 'Search fields',
|
|
262
|
+
// chartsSearchClear: 'Clear search',
|
|
263
|
+
// chartsNoFields: 'No fields',
|
|
264
|
+
// chartsFieldBlocked: 'This field cannot be added to any section',
|
|
265
|
+
// chartsCategories: 'Categories',
|
|
266
|
+
// chartsSeries: 'Series',
|
|
267
|
+
// chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
|
|
268
|
+
// chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
|
|
269
|
+
// chartsMenuMoveUp: 'Move up',
|
|
270
|
+
// chartsMenuMoveDown: 'Move down',
|
|
271
|
+
// chartsMenuMoveToTop: 'Move to top',
|
|
272
|
+
// chartsMenuMoveToBottom: 'Move to bottom',
|
|
273
|
+
// chartsMenuOptions: 'Field options',
|
|
274
|
+
// chartsMenuRemove: 'Remove',
|
|
275
|
+
// chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
|
|
276
|
+
// chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
|
|
277
|
+
|
|
247
278
|
// AI Assistant panel
|
|
248
279
|
// aiAssistantPanelTitle: 'AI Assistant',
|
|
249
280
|
// aiAssistantPanelClose: 'Close AI Assistant',
|
package/esm/locales/bgBG.js
CHANGED
|
@@ -35,6 +35,9 @@ const bgBGGrid = {
|
|
|
35
35
|
// Toolbar pivot button
|
|
36
36
|
// toolbarPivot: 'Pivot',
|
|
37
37
|
|
|
38
|
+
// Toolbar charts button
|
|
39
|
+
// toolbarCharts: 'Charts',
|
|
40
|
+
|
|
38
41
|
// Toolbar AI Assistant button
|
|
39
42
|
// toolbarAssistant: 'AI Assistant',
|
|
40
43
|
|
|
@@ -117,6 +120,7 @@ const bgBGGrid = {
|
|
|
117
120
|
columnMenuSortAsc: 'Сортирай по възходящ ред',
|
|
118
121
|
columnMenuSortDesc: 'Сортирай по низходящ ред',
|
|
119
122
|
// columnMenuManagePivot: 'Manage pivot',
|
|
123
|
+
// columnMenuManageCharts: 'Manage charts',
|
|
120
124
|
|
|
121
125
|
// Column header text
|
|
122
126
|
columnHeaderFiltersTooltipActive: count => `${count} активни филтри`,
|
|
@@ -186,6 +190,7 @@ const bgBGGrid = {
|
|
|
186
190
|
rowReorderingHeaderName: 'Подредба на редове',
|
|
187
191
|
// Aggregation
|
|
188
192
|
aggregationMenuItemHeader: 'Агрегиране',
|
|
193
|
+
// aggregationFunctionLabelNone: 'none',
|
|
189
194
|
aggregationFunctionLabelSum: 'сума',
|
|
190
195
|
aggregationFunctionLabelAvg: 'срст',
|
|
191
196
|
aggregationFunctionLabelMin: 'мин',
|
|
@@ -221,6 +226,32 @@ const bgBGGrid = {
|
|
|
221
226
|
// pivotYearColumnHeaderName: '(Year)',
|
|
222
227
|
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
223
228
|
|
|
229
|
+
// Charts configuration panel
|
|
230
|
+
// chartsNoCharts: 'There are no charts available',
|
|
231
|
+
// chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
232
|
+
// chartsTabChart: 'Chart',
|
|
233
|
+
// chartsTabFields: 'Fields',
|
|
234
|
+
// chartsTabCustomize: 'Customize',
|
|
235
|
+
// chartsCloseButton: 'Close charts configuration',
|
|
236
|
+
// chartsSyncButtonLabel: 'Sync chart',
|
|
237
|
+
// chartsSearchPlaceholder: 'Search fields',
|
|
238
|
+
// chartsSearchLabel: 'Search fields',
|
|
239
|
+
// chartsSearchClear: 'Clear search',
|
|
240
|
+
// chartsNoFields: 'No fields',
|
|
241
|
+
// chartsFieldBlocked: 'This field cannot be added to any section',
|
|
242
|
+
// chartsCategories: 'Categories',
|
|
243
|
+
// chartsSeries: 'Series',
|
|
244
|
+
// chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
|
|
245
|
+
// chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
|
|
246
|
+
// chartsMenuMoveUp: 'Move up',
|
|
247
|
+
// chartsMenuMoveDown: 'Move down',
|
|
248
|
+
// chartsMenuMoveToTop: 'Move to top',
|
|
249
|
+
// chartsMenuMoveToBottom: 'Move to bottom',
|
|
250
|
+
// chartsMenuOptions: 'Field options',
|
|
251
|
+
// chartsMenuRemove: 'Remove',
|
|
252
|
+
// chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
|
|
253
|
+
// chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
|
|
254
|
+
|
|
224
255
|
// AI Assistant panel
|
|
225
256
|
// aiAssistantPanelTitle: 'AI Assistant',
|
|
226
257
|
// aiAssistantPanelClose: 'Close AI Assistant',
|
package/esm/locales/bnBD.js
CHANGED
|
@@ -35,6 +35,9 @@ const bnBDGrid = {
|
|
|
35
35
|
// Toolbar pivot button
|
|
36
36
|
// toolbarPivot: 'Pivot',
|
|
37
37
|
|
|
38
|
+
// Toolbar charts button
|
|
39
|
+
// toolbarCharts: 'Charts',
|
|
40
|
+
|
|
38
41
|
// Toolbar AI Assistant button
|
|
39
42
|
// toolbarAssistant: 'AI Assistant',
|
|
40
43
|
|
|
@@ -115,6 +118,7 @@ const bnBDGrid = {
|
|
|
115
118
|
columnMenuSortAsc: 'ASC অনুযায়ী সাজান',
|
|
116
119
|
columnMenuSortDesc: 'DESC অনুযায়ী সাজান',
|
|
117
120
|
// columnMenuManagePivot: 'Manage pivot',
|
|
121
|
+
// columnMenuManageCharts: 'Manage charts',
|
|
118
122
|
|
|
119
123
|
// Column header text
|
|
120
124
|
columnHeaderFiltersTooltipActive: count => count !== 1 ? `${count} টি সক্রিয় ফিল্টার` : `${count} টি সক্রিয় ফিল্টার`,
|
|
@@ -185,6 +189,7 @@ const bnBDGrid = {
|
|
|
185
189
|
rowReorderingHeaderName: 'সারি পুনর্বিন্যাস',
|
|
186
190
|
// Aggregation
|
|
187
191
|
aggregationMenuItemHeader: 'সংকলন',
|
|
192
|
+
// aggregationFunctionLabelNone: 'none',
|
|
188
193
|
aggregationFunctionLabelSum: 'যোগফল',
|
|
189
194
|
aggregationFunctionLabelAvg: 'গড়',
|
|
190
195
|
aggregationFunctionLabelMin: 'সর্বনিম্ন',
|
|
@@ -219,6 +224,32 @@ const bnBDGrid = {
|
|
|
219
224
|
// pivotYearColumnHeaderName: '(Year)',
|
|
220
225
|
// pivotQuarterColumnHeaderName: '(Quarter)',
|
|
221
226
|
|
|
227
|
+
// Charts configuration panel
|
|
228
|
+
// chartsNoCharts: 'There are no charts available',
|
|
229
|
+
// chartsChartNotSelected: 'Select a chart type to configure its options',
|
|
230
|
+
// chartsTabChart: 'Chart',
|
|
231
|
+
// chartsTabFields: 'Fields',
|
|
232
|
+
// chartsTabCustomize: 'Customize',
|
|
233
|
+
// chartsCloseButton: 'Close charts configuration',
|
|
234
|
+
// chartsSyncButtonLabel: 'Sync chart',
|
|
235
|
+
// chartsSearchPlaceholder: 'Search fields',
|
|
236
|
+
// chartsSearchLabel: 'Search fields',
|
|
237
|
+
// chartsSearchClear: 'Clear search',
|
|
238
|
+
// chartsNoFields: 'No fields',
|
|
239
|
+
// chartsFieldBlocked: 'This field cannot be added to any section',
|
|
240
|
+
// chartsCategories: 'Categories',
|
|
241
|
+
// chartsSeries: 'Series',
|
|
242
|
+
// chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
|
|
243
|
+
// chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
|
|
244
|
+
// chartsMenuMoveUp: 'Move up',
|
|
245
|
+
// chartsMenuMoveDown: 'Move down',
|
|
246
|
+
// chartsMenuMoveToTop: 'Move to top',
|
|
247
|
+
// chartsMenuMoveToBottom: 'Move to bottom',
|
|
248
|
+
// chartsMenuOptions: 'Field options',
|
|
249
|
+
// chartsMenuRemove: 'Remove',
|
|
250
|
+
// chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
|
|
251
|
+
// chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
|
|
252
|
+
|
|
222
253
|
// AI Assistant panel
|
|
223
254
|
// aiAssistantPanelTitle: 'AI Assistant',
|
|
224
255
|
// aiAssistantPanelClose: 'Close AI Assistant',
|