@mui/x-data-grid 6.7.0 → 6.9.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 +145 -5541
- package/components/GridColumnHeaders.d.ts +2 -2
- package/components/GridColumnHeaders.js +3 -1
- package/components/GridPagination.d.ts +2 -2
- package/components/GridRow.d.ts +2 -2
- package/components/GridRow.js +33 -79
- package/components/cell/GridCell.d.ts +24 -15
- package/components/cell/GridCell.js +422 -45
- package/components/cell/GridEditInputCell.js +9 -9
- package/components/cell/index.d.ts +2 -1
- package/components/cell/index.js +1 -1
- package/components/containers/GridRootStyles.js +30 -16
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +2 -2
- package/components/virtualization/GridVirtualScroller.js +4 -9
- package/components/virtualization/GridVirtualScrollerContent.js +11 -20
- package/constants/defaultGridSlotsComponents.js +6 -2
- package/hooks/core/useGridApiInitialization.js +4 -1
- package/hooks/core/useGridStateInitialization.js +2 -9
- package/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/hooks/features/columns/gridColumnsSelector.js +7 -7
- package/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/hooks/features/editing/useGridCellEditing.js +5 -3
- package/hooks/features/editing/useGridRowEditing.js +14 -6
- package/hooks/features/filter/gridFilterSelector.js +8 -8
- package/hooks/features/filter/gridFilterUtils.d.ts +4 -1
- package/hooks/features/filter/gridFilterUtils.js +19 -13
- package/hooks/features/filter/useGridFilter.js +2 -1
- package/hooks/features/focus/useGridFocus.js +9 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/hooks/features/pagination/gridPaginationSelector.js +4 -4
- package/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
- package/hooks/features/rows/gridRowsSelector.js +3 -3
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -0
- package/hooks/features/rows/useGridParamsApi.js +7 -15
- package/hooks/features/sorting/gridSortingSelector.js +3 -3
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +8 -816
- package/hooks/features/virtualization/useGridVirtualScroller.js +40 -38
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/useGridSelector.d.ts +3 -1
- package/hooks/utils/useGridSelector.js +37 -6
- package/hooks/utils/useLazyRef.d.ts +2 -0
- package/hooks/utils/useLazyRef.js +9 -0
- package/hooks/utils/useOnMount.d.ts +2 -0
- package/hooks/utils/useOnMount.js +7 -0
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/index.js +1 -1
- package/legacy/components/GridColumnHeaders.js +3 -1
- package/legacy/components/GridRow.js +35 -79
- package/legacy/components/cell/GridCell.js +425 -46
- package/legacy/components/cell/GridEditInputCell.js +9 -9
- package/legacy/components/cell/index.js +1 -1
- package/legacy/components/containers/GridRootStyles.js +20 -17
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/legacy/components/toolbar/GridToolbar.js +2 -2
- package/legacy/components/virtualization/GridVirtualScroller.js +4 -7
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +10 -17
- package/legacy/constants/defaultGridSlotsComponents.js +6 -2
- package/legacy/hooks/core/useGridApiInitialization.js +4 -1
- package/legacy/hooks/core/useGridStateInitialization.js +2 -7
- package/legacy/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/legacy/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/legacy/hooks/features/columns/gridColumnsSelector.js +7 -7
- package/legacy/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/legacy/hooks/features/editing/useGridCellEditing.js +5 -3
- package/legacy/hooks/features/editing/useGridRowEditing.js +15 -7
- package/legacy/hooks/features/filter/gridFilterSelector.js +8 -8
- package/legacy/hooks/features/filter/gridFilterUtils.js +23 -19
- package/legacy/hooks/features/filter/useGridFilter.js +2 -1
- package/legacy/hooks/features/focus/useGridFocus.js +9 -4
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/legacy/hooks/features/pagination/gridPaginationSelector.js +4 -4
- package/legacy/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
- package/legacy/hooks/features/rows/gridRowsSelector.js +3 -3
- package/legacy/hooks/features/rows/useGridParamsApi.js +23 -15
- package/legacy/hooks/features/sorting/gridSortingSelector.js +3 -3
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +38 -34
- package/legacy/hooks/utils/index.js +1 -1
- package/legacy/hooks/utils/useGridSelector.js +43 -5
- package/legacy/hooks/utils/useLazyRef.js +9 -0
- package/legacy/hooks/utils/useOnMount.js +7 -0
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -1
- package/legacy/locales/elGR.js +70 -79
- package/legacy/locales/ptBR.js +12 -13
- package/legacy/utils/Store.js +34 -0
- package/legacy/utils/createSelector.js +74 -6
- package/legacy/utils/doesSupportPreventScroll.js +13 -0
- package/legacy/utils/fastMemo.js +5 -0
- package/legacy/utils/fastObjectShallowCompare.js +32 -0
- package/legacy/utils/keyboardUtils.js +4 -2
- package/locales/elGR.js +66 -79
- package/locales/ptBR.js +12 -13
- package/models/api/gridCoreApi.d.ts +6 -0
- package/models/colDef/gridColDef.d.ts +4 -3
- package/models/colDef/gridColType.d.ts +3 -1
- package/models/events/gridEventLookup.d.ts +3 -3
- package/modern/components/GridColumnHeaders.js +3 -1
- package/modern/components/GridRow.js +32 -79
- package/modern/components/cell/GridCell.js +421 -45
- package/modern/components/cell/GridEditInputCell.js +9 -9
- package/modern/components/cell/index.js +1 -1
- package/modern/components/containers/GridRootStyles.js +30 -16
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/modern/components/toolbar/GridToolbar.js +2 -2
- package/modern/components/virtualization/GridVirtualScroller.js +4 -9
- package/modern/components/virtualization/GridVirtualScrollerContent.js +10 -20
- package/modern/constants/defaultGridSlotsComponents.js +6 -2
- package/modern/hooks/core/useGridApiInitialization.js +4 -1
- package/modern/hooks/core/useGridStateInitialization.js +2 -9
- package/modern/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
- package/modern/hooks/features/columns/gridColumnsSelector.js +7 -7
- package/modern/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/modern/hooks/features/editing/useGridCellEditing.js +5 -3
- package/modern/hooks/features/editing/useGridRowEditing.js +14 -6
- package/modern/hooks/features/filter/gridFilterSelector.js +8 -8
- package/modern/hooks/features/filter/gridFilterUtils.js +17 -12
- package/modern/hooks/features/filter/useGridFilter.js +2 -1
- package/modern/hooks/features/focus/useGridFocus.js +8 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/modern/hooks/features/pagination/gridPaginationSelector.js +4 -4
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
- package/modern/hooks/features/rows/gridRowsSelector.js +3 -3
- package/modern/hooks/features/rows/useGridParamsApi.js +7 -15
- package/modern/hooks/features/sorting/gridSortingSelector.js +3 -3
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +40 -38
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +37 -6
- package/modern/hooks/utils/useLazyRef.js +9 -0
- package/modern/hooks/utils/useOnMount.js +7 -0
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -1
- package/modern/locales/elGR.js +66 -79
- package/modern/locales/ptBR.js +12 -13
- package/modern/utils/Store.js +24 -0
- package/modern/utils/createSelector.js +74 -6
- package/modern/utils/doesSupportPreventScroll.js +13 -0
- package/modern/utils/fastMemo.js +5 -0
- package/modern/utils/fastObjectShallowCompare.js +32 -0
- package/modern/utils/keyboardUtils.js +4 -2
- package/node/components/GridColumnHeaders.js +4 -2
- package/node/components/GridRow.js +32 -79
- package/node/components/cell/GridCell.js +424 -47
- package/node/components/cell/GridEditInputCell.js +9 -9
- package/node/components/cell/index.js +17 -10
- package/node/components/containers/GridRootStyles.js +30 -16
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/node/components/toolbar/GridToolbar.js +2 -2
- package/node/components/virtualization/GridVirtualScroller.js +4 -9
- package/node/components/virtualization/GridVirtualScrollerContent.js +10 -20
- package/node/constants/defaultGridSlotsComponents.js +4 -1
- package/node/hooks/core/useGridApiInitialization.js +4 -1
- package/node/hooks/core/useGridStateInitialization.js +2 -9
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -4
- package/node/hooks/features/columnGrouping/gridColumnGroupsSelector.js +3 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +8 -2
- package/node/hooks/features/columns/gridColumnsSelector.js +6 -6
- package/node/hooks/features/dimensions/useGridDimensions.js +6 -12
- package/node/hooks/features/editing/useGridCellEditing.js +5 -3
- package/node/hooks/features/editing/useGridRowEditing.js +14 -6
- package/node/hooks/features/filter/gridFilterSelector.js +7 -7
- package/node/hooks/features/filter/gridFilterUtils.js +17 -12
- package/node/hooks/features/filter/useGridFilter.js +2 -1
- package/node/hooks/features/focus/useGridFocus.js +8 -4
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
- package/node/hooks/features/pagination/gridPaginationSelector.js +3 -3
- package/node/hooks/features/rowSelection/gridRowSelectionSelector.js +2 -2
- package/node/hooks/features/rows/gridRowsSelector.js +2 -2
- package/node/hooks/features/rows/useGridParamsApi.js +9 -15
- package/node/hooks/features/sorting/gridSortingSelector.js +2 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +40 -36
- package/node/hooks/utils/index.js +14 -10
- package/node/hooks/utils/useGridSelector.js +41 -7
- package/node/hooks/utils/useLazyRef.js +17 -0
- package/node/hooks/utils/useOnMount.js +15 -0
- package/node/index.js +1 -1
- package/node/internals/index.js +7 -0
- package/node/locales/elGR.js +66 -79
- package/node/locales/ptBR.js +12 -13
- package/node/utils/Store.js +31 -0
- package/node/utils/createSelector.js +77 -8
- package/node/utils/doesSupportPreventScroll.js +19 -0
- package/node/utils/fastMemo.js +13 -0
- package/node/utils/fastObjectShallowCompare.js +38 -0
- package/node/utils/keyboardUtils.js +4 -2
- package/package.json +2 -2
- package/utils/Store.d.ts +11 -0
- package/utils/Store.js +24 -0
- package/utils/createSelector.d.ts +1 -0
- package/utils/createSelector.js +74 -6
- package/utils/doesSupportPreventScroll.d.ts +1 -0
- package/utils/doesSupportPreventScroll.js +13 -0
- package/utils/fastMemo.d.ts +1 -0
- package/utils/fastMemo.js +5 -0
- package/utils/fastObjectShallowCompare.d.ts +1 -0
- package/utils/fastObjectShallowCompare.js +32 -0
- package/utils/keyboardUtils.js +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSelector } from '../../../utils/createSelector';
|
|
1
|
+
import { createSelector, createSelectorMemoized } from '../../../utils/createSelector';
|
|
2
2
|
import { gridFilteredTopLevelRowCountSelector, gridExpandedSortedRowEntriesSelector, gridExpandedSortedRowIdsSelector, gridFilteredSortedTopLevelRowEntriesSelector } from '../filter/gridFilterSelector';
|
|
3
3
|
import { gridRowMaximumTreeDepthSelector, gridRowTreeSelector } from '../rows/gridRowsSelector';
|
|
4
4
|
import { getPageCount } from './gridPaginationUtils';
|
|
@@ -37,7 +37,7 @@ export const gridPageCountSelector = createSelector(gridPaginationModelSelector,
|
|
|
37
37
|
* Get the index of the first and the last row to include in the current page if the pagination is enabled.
|
|
38
38
|
* @category Pagination
|
|
39
39
|
*/
|
|
40
|
-
export const gridPaginationRowRangeSelector =
|
|
40
|
+
export const gridPaginationRowRangeSelector = createSelectorMemoized(gridPaginationModelSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, gridExpandedSortedRowEntriesSelector, gridFilteredSortedTopLevelRowEntriesSelector, (paginationModel, rowTree, rowTreeDepth, visibleSortedRowEntries, visibleSortedTopLevelRowEntries) => {
|
|
41
41
|
const visibleTopLevelRowCount = visibleSortedTopLevelRowEntries.length;
|
|
42
42
|
const topLevelFirstRowIndex = Math.min(paginationModel.pageSize * paginationModel.page, visibleTopLevelRowCount - 1);
|
|
43
43
|
const topLevelLastRowIndex = Math.min(topLevelFirstRowIndex + paginationModel.pageSize - 1, visibleTopLevelRowCount - 1);
|
|
@@ -79,7 +79,7 @@ export const gridPaginationRowRangeSelector = createSelector(gridPaginationModel
|
|
|
79
79
|
* Get the id and the model of each row to include in the current page if the pagination is enabled.
|
|
80
80
|
* @category Pagination
|
|
81
81
|
*/
|
|
82
|
-
export const gridPaginatedVisibleSortedGridRowEntriesSelector =
|
|
82
|
+
export const gridPaginatedVisibleSortedGridRowEntriesSelector = createSelectorMemoized(gridExpandedSortedRowEntriesSelector, gridPaginationRowRangeSelector, (visibleSortedRowEntries, paginationRange) => {
|
|
83
83
|
if (!paginationRange) {
|
|
84
84
|
return [];
|
|
85
85
|
}
|
|
@@ -90,7 +90,7 @@ export const gridPaginatedVisibleSortedGridRowEntriesSelector = createSelector(g
|
|
|
90
90
|
* Get the id of each row to include in the current page if the pagination is enabled.
|
|
91
91
|
* @category Pagination
|
|
92
92
|
*/
|
|
93
|
-
export const gridPaginatedVisibleSortedGridRowIdsSelector =
|
|
93
|
+
export const gridPaginatedVisibleSortedGridRowIdsSelector = createSelectorMemoized(gridExpandedSortedRowIdsSelector, gridPaginationRowRangeSelector, (visibleSortedRowIds, paginationRange) => {
|
|
94
94
|
if (!paginationRange) {
|
|
95
95
|
return [];
|
|
96
96
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createSelector } from '../../../utils/createSelector';
|
|
1
|
+
import { createSelector, createSelectorMemoized } from '../../../utils/createSelector';
|
|
2
2
|
import { gridRowsLookupSelector } from '../rows/gridRowsSelector';
|
|
3
3
|
export const gridRowSelectionStateSelector = state => state.rowSelection;
|
|
4
4
|
export const selectedGridRowsCountSelector = createSelector(gridRowSelectionStateSelector, selection => selection.length);
|
|
5
|
-
export const selectedGridRowsSelector =
|
|
6
|
-
export const selectedIdsLookupSelector =
|
|
5
|
+
export const selectedGridRowsSelector = createSelectorMemoized(gridRowSelectionStateSelector, gridRowsLookupSelector, (selectedRows, rowsLookup) => new Map(selectedRows.map(id => [id, rowsLookup[id]])));
|
|
6
|
+
export const selectedIdsLookupSelector = createSelectorMemoized(gridRowSelectionStateSelector, selection => selection.reduce((lookup, rowId) => {
|
|
7
7
|
lookup[rowId] = rowId;
|
|
8
8
|
return lookup;
|
|
9
9
|
}, {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSelector } from '../../../utils/createSelector';
|
|
1
|
+
import { createSelector, createSelectorMemoized } from '../../../utils/createSelector';
|
|
2
2
|
const gridRowsStateSelector = state => state.rows;
|
|
3
3
|
export const gridRowCountSelector = createSelector(gridRowsStateSelector, rows => rows.totalRowCount);
|
|
4
4
|
export const gridRowsLoadingSelector = createSelector(gridRowsStateSelector, rows => rows.loading);
|
|
@@ -10,7 +10,7 @@ export const gridRowsDataRowIdToIdLookupSelector = createSelector(gridRowsStateS
|
|
|
10
10
|
export const gridRowTreeSelector = createSelector(gridRowsStateSelector, rows => rows.tree);
|
|
11
11
|
export const gridRowGroupingNameSelector = createSelector(gridRowsStateSelector, rows => rows.groupingName);
|
|
12
12
|
export const gridRowTreeDepthsSelector = createSelector(gridRowsStateSelector, rows => rows.treeDepths);
|
|
13
|
-
export const gridRowMaximumTreeDepthSelector =
|
|
13
|
+
export const gridRowMaximumTreeDepthSelector = createSelectorMemoized(gridRowsStateSelector, rows => {
|
|
14
14
|
const entries = Object.entries(rows.treeDepths);
|
|
15
15
|
if (entries.length === 0) {
|
|
16
16
|
return 1;
|
|
@@ -27,7 +27,7 @@ export const gridAdditionalRowGroupsSelector = createSelector(gridRowsStateSelec
|
|
|
27
27
|
/**
|
|
28
28
|
* @ignore - do not document.
|
|
29
29
|
*/
|
|
30
|
-
export const gridPinnedRowsSelector =
|
|
30
|
+
export const gridPinnedRowsSelector = createSelectorMemoized(gridAdditionalRowGroupsSelector, additionalRowGroups => {
|
|
31
31
|
const rawPinnedRows = additionalRowGroups?.pinnedRows;
|
|
32
32
|
return {
|
|
33
33
|
bottom: rawPinnedRows?.bottom?.map(rowEntry => ({
|
|
@@ -2,11 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { getGridCellElement, getGridColumnHeaderElement, getGridRowElement } from '../../../utils/domUtils';
|
|
3
3
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
4
4
|
import { gridFocusCellSelector, gridTabIndexCellSelector } from '../focus/gridFocusStateSelector';
|
|
5
|
-
|
|
6
|
-
function warnMissingColumn(field) {
|
|
7
|
-
console.warn([`MUI: You are calling getValue('${field}') but the column \`${field}\` is not defined.`, `Instead, you can access the data from \`params.row.${field}\`.`].join('\n'));
|
|
8
|
-
warnedOnceMissingColumn = true;
|
|
9
|
-
}
|
|
5
|
+
export class MissingRowIdError extends Error {}
|
|
10
6
|
|
|
11
7
|
/**
|
|
12
8
|
* @requires useGridColumns (method)
|
|
@@ -24,7 +20,7 @@ export function useGridParamsApi(apiRef) {
|
|
|
24
20
|
const getRowParams = React.useCallback(id => {
|
|
25
21
|
const row = apiRef.current.getRow(id);
|
|
26
22
|
if (!row) {
|
|
27
|
-
throw new
|
|
23
|
+
throw new MissingRowIdError(`No row with id #${id} found`);
|
|
28
24
|
}
|
|
29
25
|
const params = {
|
|
30
26
|
id,
|
|
@@ -37,7 +33,7 @@ export function useGridParamsApi(apiRef) {
|
|
|
37
33
|
const row = apiRef.current.getRow(id);
|
|
38
34
|
const rowNode = apiRef.current.getRowNode(id);
|
|
39
35
|
if (!row || !rowNode) {
|
|
40
|
-
throw new
|
|
36
|
+
throw new MissingRowIdError(`No row with id #${id} found`);
|
|
41
37
|
}
|
|
42
38
|
const cellFocus = gridFocusCellSelector(apiRef);
|
|
43
39
|
const cellTabIndex = gridTabIndexCellSelector(apiRef);
|
|
@@ -61,7 +57,7 @@ export function useGridParamsApi(apiRef) {
|
|
|
61
57
|
const row = apiRef.current.getRow(id);
|
|
62
58
|
const rowNode = apiRef.current.getRowNode(id);
|
|
63
59
|
if (!row || !rowNode) {
|
|
64
|
-
throw new
|
|
60
|
+
throw new MissingRowIdError(`No row with id #${id} found`);
|
|
65
61
|
}
|
|
66
62
|
const cellFocus = gridFocusCellSelector(apiRef);
|
|
67
63
|
const cellTabIndex = gridTabIndexCellSelector(apiRef);
|
|
@@ -75,7 +71,8 @@ export function useGridParamsApi(apiRef) {
|
|
|
75
71
|
hasFocus: cellFocus !== null && cellFocus.field === field && cellFocus.id === id,
|
|
76
72
|
tabIndex: cellTabIndex && cellTabIndex.field === field && cellTabIndex.id === id ? 0 : -1,
|
|
77
73
|
value,
|
|
78
|
-
formattedValue: value
|
|
74
|
+
formattedValue: value,
|
|
75
|
+
isEditable: false
|
|
79
76
|
};
|
|
80
77
|
if (colDef && colDef.valueFormatter) {
|
|
81
78
|
params.formattedValue = colDef.valueFormatter({
|
|
@@ -90,15 +87,10 @@ export function useGridParamsApi(apiRef) {
|
|
|
90
87
|
}, [apiRef]);
|
|
91
88
|
const getCellValue = React.useCallback((id, field) => {
|
|
92
89
|
const colDef = apiRef.current.getColumn(field);
|
|
93
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
94
|
-
if (!colDef && !warnedOnceMissingColumn) {
|
|
95
|
-
warnMissingColumn(field);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
90
|
if (!colDef || !colDef.valueGetter) {
|
|
99
91
|
const rowModel = apiRef.current.getRow(id);
|
|
100
92
|
if (!rowModel) {
|
|
101
|
-
throw new
|
|
93
|
+
throw new MissingRowIdError(`No row with id #${id} found`);
|
|
102
94
|
}
|
|
103
95
|
return rowModel[field];
|
|
104
96
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createSelector } from '../../../utils/createSelector';
|
|
1
|
+
import { createSelector, createSelectorMemoized } from '../../../utils/createSelector';
|
|
2
2
|
import { gridRowsLookupSelector } from '../rows/gridRowsSelector';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -17,7 +17,7 @@ export const gridSortedRowIdsSelector = createSelector(gridSortingStateSelector,
|
|
|
17
17
|
* Get the id and the model of the rows after the sorting process.
|
|
18
18
|
* @category Sorting
|
|
19
19
|
*/
|
|
20
|
-
export const gridSortedRowEntriesSelector =
|
|
20
|
+
export const gridSortedRowEntriesSelector = createSelectorMemoized(gridSortedRowIdsSelector, gridRowsLookupSelector,
|
|
21
21
|
// TODO rows v6: Is this the best approach ?
|
|
22
22
|
(sortedIds, idRowsLookup) => sortedIds.map(id => ({
|
|
23
23
|
id,
|
|
@@ -33,7 +33,7 @@ export const gridSortModelSelector = createSelector(gridSortingStateSelector, so
|
|
|
33
33
|
* @category Sorting
|
|
34
34
|
* @ignore - do not document.
|
|
35
35
|
*/
|
|
36
|
-
export const gridSortColumnLookupSelector =
|
|
36
|
+
export const gridSortColumnLookupSelector = createSelectorMemoized(gridSortModelSelector, sortModel => {
|
|
37
37
|
const result = sortModel.reduce((res, sortItem, index) => {
|
|
38
38
|
res[sortItem.field] = {
|
|
39
39
|
sortDirection: sortItem.sort,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
const _excluded = ["style"],
|
|
4
|
-
_excluded2 = ["style"]
|
|
5
|
-
_excluded3 = ["style"];
|
|
4
|
+
_excluded2 = ["style"];
|
|
6
5
|
import * as React from 'react';
|
|
7
6
|
import * as ReactDOM from 'react-dom';
|
|
8
|
-
import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';
|
|
7
|
+
import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback } from '@mui/utils';
|
|
9
8
|
import { useTheme } from '@mui/material/styles';
|
|
10
9
|
import { defaultMemoize } from 'reselect';
|
|
11
10
|
import { useGridPrivateApiContext } from '../../utils/useGridPrivateApiContext';
|
|
@@ -50,12 +49,17 @@ export const getRenderableIndexes = ({
|
|
|
50
49
|
}) => {
|
|
51
50
|
return [clamp(firstIndex - buffer, minFirstIndex, maxLastIndex), clamp(lastIndex + buffer, minFirstIndex, maxLastIndex)];
|
|
52
51
|
};
|
|
53
|
-
const areRenderContextsEqual = (context1, context2) => {
|
|
52
|
+
export const areRenderContextsEqual = (context1, context2) => {
|
|
54
53
|
if (context1 === context2) {
|
|
55
54
|
return true;
|
|
56
55
|
}
|
|
57
56
|
return context1.firstRowIndex === context2.firstRowIndex && context1.lastRowIndex === context2.lastRowIndex && context1.firstColumnIndex === context2.firstColumnIndex && context1.lastColumnIndex === context2.lastColumnIndex;
|
|
58
57
|
};
|
|
58
|
+
// The `maxSize` is 3 so that reselect caches the `renderedColumns` values for the pinned left,
|
|
59
|
+
// unpinned, and pinned right sections.
|
|
60
|
+
const MEMOIZE_OPTIONS = {
|
|
61
|
+
maxSize: 3
|
|
62
|
+
};
|
|
59
63
|
export const useGridVirtualScroller = props => {
|
|
60
64
|
const apiRef = useGridPrivateApiContext();
|
|
61
65
|
const rootProps = useGridRootProps();
|
|
@@ -95,7 +99,7 @@ export const useGridVirtualScroller = props => {
|
|
|
95
99
|
const prevRootRowStyle = React.useRef();
|
|
96
100
|
const getRenderedColumnsRef = React.useRef(defaultMemoize((columns, firstColumnToRender, lastColumnToRender) => {
|
|
97
101
|
return columns.slice(firstColumnToRender, lastColumnToRender);
|
|
98
|
-
}));
|
|
102
|
+
}, MEMOIZE_OPTIONS));
|
|
99
103
|
const getNearestIndexToRender = React.useCallback(offset => {
|
|
100
104
|
const lastMeasuredIndexRelativeToAllRows = apiRef.current.getLastMeasuredRowIndex();
|
|
101
105
|
let allRowsMeasured = lastMeasuredIndexRelativeToAllRows === Infinity;
|
|
@@ -253,7 +257,7 @@ export const useGridVirtualScroller = props => {
|
|
|
253
257
|
};
|
|
254
258
|
apiRef.current.publishEvent('scrollPositionChange', params);
|
|
255
259
|
}, [apiRef, computeRenderContext, containerDimensions.width, updateRenderContext]);
|
|
256
|
-
const handleScroll = event => {
|
|
260
|
+
const handleScroll = useEventCallback(event => {
|
|
257
261
|
const {
|
|
258
262
|
scrollTop,
|
|
259
263
|
scrollLeft
|
|
@@ -295,13 +299,13 @@ export const useGridVirtualScroller = props => {
|
|
|
295
299
|
});
|
|
296
300
|
prevTotalWidth.current = columnsTotalWidth;
|
|
297
301
|
}
|
|
298
|
-
};
|
|
299
|
-
const handleWheel = event => {
|
|
302
|
+
});
|
|
303
|
+
const handleWheel = useEventCallback(event => {
|
|
300
304
|
apiRef.current.publishEvent('virtualScrollerWheel', {}, event);
|
|
301
|
-
};
|
|
302
|
-
const handleTouchMove = event => {
|
|
305
|
+
});
|
|
306
|
+
const handleTouchMove = useEventCallback(event => {
|
|
303
307
|
apiRef.current.publishEvent('virtualScrollerTouchMove', {}, event);
|
|
304
|
-
};
|
|
308
|
+
});
|
|
305
309
|
const getRows = (params = {
|
|
306
310
|
renderContext
|
|
307
311
|
}) => {
|
|
@@ -446,22 +450,25 @@ export const useGridVirtualScroller = props => {
|
|
|
446
450
|
height,
|
|
447
451
|
minHeight: shouldExtendContent ? '100%' : 'auto'
|
|
448
452
|
};
|
|
453
|
+
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
454
|
+
size.height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
|
|
455
|
+
}
|
|
456
|
+
|
|
449
457
|
return size;
|
|
450
|
-
}, [rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar]);
|
|
458
|
+
}, [apiRef, rootRef, columnsTotalWidth, rowsMeta.currentPageTotalHeight, needsHorizontalScrollbar, rootProps.autoHeight, rootProps.rowHeight, currentPage.rows.length]);
|
|
451
459
|
React.useEffect(() => {
|
|
452
460
|
apiRef.current.publishEvent('virtualScrollerContentSizeChange');
|
|
453
461
|
}, [apiRef, contentSize]);
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
}
|
|
462
|
+
const rootStyle = React.useMemo(() => {
|
|
463
|
+
const style = {};
|
|
464
|
+
if (!needsHorizontalScrollbar) {
|
|
465
|
+
style.overflowX = 'hidden';
|
|
466
|
+
}
|
|
467
|
+
if (rootProps.autoHeight) {
|
|
468
|
+
style.overflowY = 'hidden';
|
|
469
|
+
}
|
|
470
|
+
return style;
|
|
471
|
+
}, [needsHorizontalScrollbar, rootProps.autoHeight]);
|
|
465
472
|
const getRenderContext = React.useCallback(() => {
|
|
466
473
|
return prevRenderContext.current;
|
|
467
474
|
}, []);
|
|
@@ -472,23 +479,18 @@ export const useGridVirtualScroller = props => {
|
|
|
472
479
|
renderContext,
|
|
473
480
|
updateRenderZonePosition,
|
|
474
481
|
getRows,
|
|
475
|
-
getRootProps: (
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
onWheel: handleWheel,
|
|
484
|
-
onTouchMove: handleTouchMove,
|
|
485
|
-
style: _extends({}, style, rootStyle)
|
|
486
|
-
}, other);
|
|
487
|
-
},
|
|
482
|
+
getRootProps: (inputProps = {}) => _extends({
|
|
483
|
+
ref: handleRef,
|
|
484
|
+
onScroll: handleScroll,
|
|
485
|
+
onWheel: handleWheel,
|
|
486
|
+
onTouchMove: handleTouchMove
|
|
487
|
+
}, inputProps, {
|
|
488
|
+
style: inputProps.style ? _extends({}, inputProps.style, rootStyle) : rootStyle
|
|
489
|
+
}),
|
|
488
490
|
getContentProps: ({
|
|
489
|
-
style
|
|
491
|
+
style
|
|
490
492
|
} = {}) => ({
|
|
491
|
-
style: _extends({}, style, contentSize)
|
|
493
|
+
style: style ? _extends({}, style, contentSize) : contentSize
|
|
492
494
|
}),
|
|
493
495
|
getRenderZoneProps: () => ({
|
|
494
496
|
ref: renderZoneRef
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './useGridApiEventHandler';
|
|
2
2
|
export * from './useGridApiMethod';
|
|
3
3
|
export * from './useGridLogger';
|
|
4
|
-
export
|
|
4
|
+
export { useGridSelector } from './useGridSelector';
|
|
5
5
|
export * from './useGridNativeEventListener';
|
|
6
6
|
export * from './useFirstRender';
|
|
@@ -1,16 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useLazyRef } from './useLazyRef';
|
|
3
|
+
import { useOnMount } from './useOnMount';
|
|
1
4
|
import { buildWarning } from '../../utils/warning';
|
|
5
|
+
import { fastObjectShallowCompare } from '../../utils/fastObjectShallowCompare';
|
|
6
|
+
const stateNotInitializedWarning = buildWarning(['MUI: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
|
|
2
7
|
function isOutputSelector(selector) {
|
|
3
8
|
return selector.acceptsApiRef;
|
|
4
9
|
}
|
|
5
|
-
|
|
6
|
-
|
|
10
|
+
function applySelector(apiRef, selector) {
|
|
11
|
+
if (isOutputSelector(selector)) {
|
|
12
|
+
return selector(apiRef);
|
|
13
|
+
}
|
|
14
|
+
return selector(apiRef.current.state);
|
|
15
|
+
}
|
|
16
|
+
const defaultCompare = Object.is;
|
|
17
|
+
export const objectShallowCompare = fastObjectShallowCompare;
|
|
18
|
+
const createRefs = () => ({
|
|
19
|
+
state: null,
|
|
20
|
+
equals: null,
|
|
21
|
+
selector: null
|
|
22
|
+
});
|
|
23
|
+
export const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
|
|
7
24
|
if (process.env.NODE_ENV !== 'production') {
|
|
8
25
|
if (!apiRef.current.state) {
|
|
9
26
|
stateNotInitializedWarning();
|
|
10
27
|
}
|
|
11
28
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
29
|
+
const refs = useLazyRef(createRefs);
|
|
30
|
+
const didInit = refs.current.selector !== null;
|
|
31
|
+
const [state, setState] = React.useState(
|
|
32
|
+
// We don't use an initialization function to avoid allocations
|
|
33
|
+
didInit ? null : applySelector(apiRef, selector));
|
|
34
|
+
refs.current.state = state;
|
|
35
|
+
refs.current.equals = equals;
|
|
36
|
+
refs.current.selector = selector;
|
|
37
|
+
useOnMount(() => {
|
|
38
|
+
return apiRef.current.store.subscribe(() => {
|
|
39
|
+
const newState = applySelector(apiRef, refs.current.selector);
|
|
40
|
+
if (!refs.current.equals(refs.current.state, newState)) {
|
|
41
|
+
refs.current.state = newState;
|
|
42
|
+
setState(newState);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
return state;
|
|
16
47
|
};
|
package/modern/index.js
CHANGED
|
@@ -48,7 +48,7 @@ export { useGridVirtualScroller, getRenderableIndexes } from '../hooks/features/
|
|
|
48
48
|
export { useGridVisibleRows, getVisibleRows } from '../hooks/utils/useGridVisibleRows';
|
|
49
49
|
export { useGridInitializeState } from '../hooks/utils/useGridInitializeState';
|
|
50
50
|
export { getColumnsToExport, defaultGetRowsToExport } from '../hooks/features/export/utils';
|
|
51
|
-
export { createSelector, unstable_resetCreateSelectorCache } from '../utils/createSelector';
|
|
51
|
+
export { createSelector, createSelectorMemoized, unstable_resetCreateSelectorCache } from '../utils/createSelector';
|
|
52
52
|
export { findParentElementFromClassName, getActiveElement } from '../utils/domUtils';
|
|
53
53
|
export { isNavigationKey } from '../utils/keyboardUtils';
|
|
54
54
|
export { clamp, isDeepEqual, isNumber, isFunction, isObject } from '../utils/utils';
|
package/modern/locales/elGR.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { elGR as elGRCore } from '@mui/material/locale';
|
|
1
2
|
import { getGridLocalization } from '../utils/getGridLocalization';
|
|
2
3
|
const elGRGrid = {
|
|
3
4
|
// Root
|
|
@@ -19,17 +20,15 @@ const elGRGrid = {
|
|
|
19
20
|
toolbarFiltersTooltipShow: 'Εμφάνιση φίλτρων',
|
|
20
21
|
toolbarFiltersTooltipActive: count => count !== 1 ? `${count} ενεργά φίλτρα` : `${count} ενεργό φίλτρο`,
|
|
21
22
|
// Quick filter toolbar field
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
toolbarQuickFilterPlaceholder: 'Αναζήτηση…',
|
|
24
|
+
toolbarQuickFilterLabel: 'Αναζήτηση',
|
|
25
|
+
toolbarQuickFilterDeleteIconLabel: 'Καθαρισμός',
|
|
26
26
|
// Export selector toolbar button text
|
|
27
27
|
toolbarExport: 'Εξαγωγή',
|
|
28
28
|
toolbarExportLabel: 'Εξαγωγή',
|
|
29
29
|
toolbarExportCSV: 'Λήψη ως CSV',
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
toolbarExportPrint: 'Εκτύπωση',
|
|
31
|
+
toolbarExportExcel: 'Λήψη ως Excel',
|
|
33
32
|
// Columns panel text
|
|
34
33
|
columnsPanelTextFieldLabel: 'Εύρεση στήλης',
|
|
35
34
|
columnsPanelTextFieldPlaceholder: 'Επικεφαλίδα στήλης',
|
|
@@ -38,9 +37,9 @@ const elGRGrid = {
|
|
|
38
37
|
columnsPanelHideAllButton: 'Απόκρυψη όλων',
|
|
39
38
|
// Filter panel text
|
|
40
39
|
filterPanelAddFilter: 'Προσθήκη φίλτρου',
|
|
41
|
-
|
|
40
|
+
filterPanelRemoveAll: 'Αφαίρεση όλων',
|
|
42
41
|
filterPanelDeleteIconLabel: 'Διαγραφή',
|
|
43
|
-
|
|
42
|
+
filterPanelLogicOperator: 'Λογικός τελεστής',
|
|
44
43
|
filterPanelOperator: 'Τελεστές',
|
|
45
44
|
filterPanelOperatorAnd: 'Καί',
|
|
46
45
|
filterPanelOperatorOr: 'Ή',
|
|
@@ -60,44 +59,41 @@ const elGRGrid = {
|
|
|
60
59
|
filterOperatorOnOrBefore: 'είναι ίσο ή πριν',
|
|
61
60
|
filterOperatorIsEmpty: 'είναι κενό',
|
|
62
61
|
filterOperatorIsNotEmpty: 'δεν είναι κενό',
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
filterOperatorIsAnyOf: 'είναι οποιοδήποτε από',
|
|
63
|
+
'filterOperator=': '=',
|
|
64
|
+
'filterOperator!=': '!=',
|
|
65
|
+
'filterOperator>': '>',
|
|
66
|
+
'filterOperator>=': '>=',
|
|
67
|
+
'filterOperator<': '<',
|
|
68
|
+
'filterOperator<=': '<=',
|
|
71
69
|
// Header filter operators text
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
70
|
+
headerFilterOperatorContains: 'Περιέχει',
|
|
71
|
+
headerFilterOperatorEquals: 'Ισούται',
|
|
72
|
+
headerFilterOperatorStartsWith: 'Ξεκινάει με',
|
|
73
|
+
headerFilterOperatorEndsWith: 'Τελειώνει με',
|
|
74
|
+
headerFilterOperatorIs: 'Είναι',
|
|
75
|
+
headerFilterOperatorNot: 'Δεν είναι',
|
|
76
|
+
headerFilterOperatorAfter: 'Είναι μετά',
|
|
77
|
+
headerFilterOperatorOnOrAfter: 'Είναι ίσο ή μετά',
|
|
78
|
+
headerFilterOperatorBefore: 'Είναι πριν',
|
|
79
|
+
headerFilterOperatorOnOrBefore: 'Είναι ίσο ή πριν',
|
|
80
|
+
headerFilterOperatorIsEmpty: 'Είναι κενό',
|
|
81
|
+
headerFilterOperatorIsNotEmpty: 'Δεν είναι κενό',
|
|
82
|
+
headerFilterOperatorIsAnyOf: 'Είναι οποιοδήποτε από',
|
|
83
|
+
'headerFilterOperator=': 'Ισούται',
|
|
84
|
+
'headerFilterOperator!=': 'Δεν ισούται',
|
|
85
|
+
'headerFilterOperator>': 'Μεγαλύτερο από',
|
|
86
|
+
'headerFilterOperator>=': 'Μεγαλύτερο ή ίσο με',
|
|
87
|
+
'headerFilterOperator<': 'Μικρότερο από',
|
|
88
|
+
'headerFilterOperator<=': 'Μικρότερο ή ίσο με',
|
|
92
89
|
// Filter values text
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
filterValueAny: 'οποιοδήποτε',
|
|
91
|
+
filterValueTrue: 'αληθές',
|
|
92
|
+
filterValueFalse: 'ψευδές',
|
|
97
93
|
// Column menu text
|
|
98
94
|
columnMenuLabel: 'Μενού',
|
|
99
95
|
columnMenuShowColumns: 'Εμφάνιση στηλών',
|
|
100
|
-
|
|
96
|
+
columnMenuManageColumns: 'Διαχείριση στηλών',
|
|
101
97
|
columnMenuFilter: 'Φίλτρο',
|
|
102
98
|
columnMenuHideColumn: 'Απόκρυψη',
|
|
103
99
|
columnMenuUnsort: 'Απενεργοποίηση ταξινόμησης',
|
|
@@ -114,49 +110,40 @@ const elGRGrid = {
|
|
|
114
110
|
// Total visible row amount footer text
|
|
115
111
|
footerTotalVisibleRows: (visibleCount, totalCount) => `${visibleCount.toLocaleString()} από ${totalCount.toLocaleString()}`,
|
|
116
112
|
// Checkbox selection text
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
113
|
+
checkboxSelectionHeaderName: 'Επιλογή πλαισίου ελέγχου',
|
|
114
|
+
checkboxSelectionSelectAllRows: 'Επιλέξτε όλες τις σειρές',
|
|
115
|
+
checkboxSelectionUnselectAllRows: 'Καταργήση επιλογής όλων των σειρών',
|
|
116
|
+
checkboxSelectionSelectRow: 'Επιλογή γραμμής',
|
|
117
|
+
checkboxSelectionUnselectRow: 'Καταργήση επιλογής γραμμής',
|
|
123
118
|
// Boolean cell text
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
booleanCellTrueLabel: 'ναί',
|
|
120
|
+
booleanCellFalseLabel: 'όχι',
|
|
127
121
|
// Actions cell more text
|
|
128
|
-
actionsCellMore: 'περισσότερα'
|
|
129
|
-
|
|
122
|
+
actionsCellMore: 'περισσότερα',
|
|
130
123
|
// Column pinning text
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
124
|
+
pinToLeft: 'Καρφιτσώμα στα αριστερά',
|
|
125
|
+
pinToRight: 'Καρφιτσώμα στα δεξιά',
|
|
126
|
+
unpin: 'Ξεκαρφίτσωμα',
|
|
135
127
|
// Tree Data
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
128
|
+
treeDataGroupingHeaderName: 'Ομαδοποίηση',
|
|
129
|
+
treeDataExpand: 'εμφάνιση περιεχομένων',
|
|
130
|
+
treeDataCollapse: 'απόκρυψη περιεχομένων',
|
|
140
131
|
// Grouping columns
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
132
|
+
groupingColumnHeaderName: 'Ομαδοποίηση',
|
|
133
|
+
groupColumn: name => `Ομαδοποίηση κατά ${name}`,
|
|
134
|
+
unGroupColumn: name => `Διακοπή ομαδοποίησης κατά ${name}`,
|
|
145
135
|
// Master/detail
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
136
|
+
detailPanelToggle: 'Εναλλαγή πίνακα λεπτομερειών',
|
|
137
|
+
expandDetailPanel: 'Ανάπτυξη',
|
|
138
|
+
collapseDetailPanel: 'Σύμπτυξη',
|
|
150
139
|
// Row reordering text
|
|
151
|
-
|
|
152
|
-
|
|
140
|
+
rowReorderingHeaderName: 'Αναδιάταξη γραμμών',
|
|
153
141
|
// Aggregation
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
142
|
+
aggregationMenuItemHeader: 'Συσσωμάτωση',
|
|
143
|
+
aggregationFunctionLabelSum: 'άθροισμα',
|
|
144
|
+
aggregationFunctionLabelAvg: 'μέση τιμή',
|
|
145
|
+
aggregationFunctionLabelMin: 'ελάχιστο',
|
|
146
|
+
aggregationFunctionLabelMax: 'μέγιστο',
|
|
147
|
+
aggregationFunctionLabelSize: 'μέγεθος'
|
|
160
148
|
};
|
|
161
|
-
|
|
162
|
-
export const elGR = getGridLocalization(elGRGrid);
|
|
149
|
+
export const elGR = getGridLocalization(elGRGrid, elGRCore);
|
package/modern/locales/ptBR.js
CHANGED
|
@@ -68,12 +68,12 @@ const ptBRGrid = {
|
|
|
68
68
|
// 'filterOperator<=': '<=',
|
|
69
69
|
|
|
70
70
|
// Header filter operators text
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
headerFilterOperatorContains: 'Contém',
|
|
72
|
+
headerFilterOperatorEquals: 'Igual',
|
|
73
|
+
headerFilterOperatorStartsWith: 'Começa com',
|
|
74
|
+
headerFilterOperatorEndsWith: 'Termina com',
|
|
75
|
+
headerFilterOperatorIs: 'É',
|
|
76
|
+
headerFilterOperatorNot: 'Não é',
|
|
77
77
|
// headerFilterOperatorAfter: 'Is after',
|
|
78
78
|
// headerFilterOperatorOnOrAfter: 'Is on or after',
|
|
79
79
|
// headerFilterOperatorBefore: 'Is before',
|
|
@@ -81,13 +81,12 @@ const ptBRGrid = {
|
|
|
81
81
|
// headerFilterOperatorIsEmpty: 'Is empty',
|
|
82
82
|
// headerFilterOperatorIsNotEmpty: 'Is not empty',
|
|
83
83
|
// headerFilterOperatorIsAnyOf: 'Is any of',
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
'headerFilterOperator=': 'Igual',
|
|
85
|
+
'headerFilterOperator!=': 'Não igual',
|
|
86
|
+
'headerFilterOperator>': 'Maior que',
|
|
87
|
+
'headerFilterOperator>=': 'Maior que ou igual a',
|
|
88
|
+
'headerFilterOperator<': 'Menor que',
|
|
89
|
+
'headerFilterOperator<=': 'Menor que ou igual a',
|
|
91
90
|
// Filter values text
|
|
92
91
|
filterValueAny: 'qualquer',
|
|
93
92
|
filterValueTrue: 'verdadeiro',
|