@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.
Files changed (205) hide show
  1. package/CHANGELOG.md +145 -5541
  2. package/components/GridColumnHeaders.d.ts +2 -2
  3. package/components/GridColumnHeaders.js +3 -1
  4. package/components/GridPagination.d.ts +2 -2
  5. package/components/GridRow.d.ts +2 -2
  6. package/components/GridRow.js +33 -79
  7. package/components/cell/GridCell.d.ts +24 -15
  8. package/components/cell/GridCell.js +422 -45
  9. package/components/cell/GridEditInputCell.js +9 -9
  10. package/components/cell/index.d.ts +2 -1
  11. package/components/cell/index.js +1 -1
  12. package/components/containers/GridRootStyles.js +30 -16
  13. package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  14. package/components/panel/GridPanel.d.ts +1 -1
  15. package/components/toolbar/GridToolbar.js +2 -2
  16. package/components/virtualization/GridVirtualScroller.js +4 -9
  17. package/components/virtualization/GridVirtualScrollerContent.js +11 -20
  18. package/constants/defaultGridSlotsComponents.js +6 -2
  19. package/hooks/core/useGridApiInitialization.js +4 -1
  20. package/hooks/core/useGridStateInitialization.js +2 -9
  21. package/hooks/features/clipboard/useGridClipboard.js +1 -4
  22. package/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
  23. package/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
  24. package/hooks/features/columns/gridColumnsSelector.js +7 -7
  25. package/hooks/features/dimensions/useGridDimensions.js +6 -12
  26. package/hooks/features/editing/useGridCellEditing.js +5 -3
  27. package/hooks/features/editing/useGridRowEditing.js +14 -6
  28. package/hooks/features/filter/gridFilterSelector.js +8 -8
  29. package/hooks/features/filter/gridFilterUtils.d.ts +4 -1
  30. package/hooks/features/filter/gridFilterUtils.js +19 -13
  31. package/hooks/features/filter/useGridFilter.js +2 -1
  32. package/hooks/features/focus/useGridFocus.js +9 -4
  33. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  34. package/hooks/features/pagination/gridPaginationSelector.js +4 -4
  35. package/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
  36. package/hooks/features/rows/gridRowsSelector.js +3 -3
  37. package/hooks/features/rows/useGridParamsApi.d.ts +2 -0
  38. package/hooks/features/rows/useGridParamsApi.js +7 -15
  39. package/hooks/features/sorting/gridSortingSelector.js +3 -3
  40. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +8 -816
  41. package/hooks/features/virtualization/useGridVirtualScroller.js +40 -38
  42. package/hooks/utils/index.d.ts +1 -1
  43. package/hooks/utils/index.js +1 -1
  44. package/hooks/utils/useGridSelector.d.ts +3 -1
  45. package/hooks/utils/useGridSelector.js +37 -6
  46. package/hooks/utils/useLazyRef.d.ts +2 -0
  47. package/hooks/utils/useLazyRef.js +9 -0
  48. package/hooks/utils/useOnMount.d.ts +2 -0
  49. package/hooks/utils/useOnMount.js +7 -0
  50. package/index.js +1 -1
  51. package/internals/index.d.ts +1 -1
  52. package/internals/index.js +1 -1
  53. package/legacy/components/GridColumnHeaders.js +3 -1
  54. package/legacy/components/GridRow.js +35 -79
  55. package/legacy/components/cell/GridCell.js +425 -46
  56. package/legacy/components/cell/GridEditInputCell.js +9 -9
  57. package/legacy/components/cell/index.js +1 -1
  58. package/legacy/components/containers/GridRootStyles.js +20 -17
  59. package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  60. package/legacy/components/toolbar/GridToolbar.js +2 -2
  61. package/legacy/components/virtualization/GridVirtualScroller.js +4 -7
  62. package/legacy/components/virtualization/GridVirtualScrollerContent.js +10 -17
  63. package/legacy/constants/defaultGridSlotsComponents.js +6 -2
  64. package/legacy/hooks/core/useGridApiInitialization.js +4 -1
  65. package/legacy/hooks/core/useGridStateInitialization.js +2 -7
  66. package/legacy/hooks/features/clipboard/useGridClipboard.js +1 -4
  67. package/legacy/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
  68. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
  69. package/legacy/hooks/features/columns/gridColumnsSelector.js +7 -7
  70. package/legacy/hooks/features/dimensions/useGridDimensions.js +6 -12
  71. package/legacy/hooks/features/editing/useGridCellEditing.js +5 -3
  72. package/legacy/hooks/features/editing/useGridRowEditing.js +15 -7
  73. package/legacy/hooks/features/filter/gridFilterSelector.js +8 -8
  74. package/legacy/hooks/features/filter/gridFilterUtils.js +23 -19
  75. package/legacy/hooks/features/filter/useGridFilter.js +2 -1
  76. package/legacy/hooks/features/focus/useGridFocus.js +9 -4
  77. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  78. package/legacy/hooks/features/pagination/gridPaginationSelector.js +4 -4
  79. package/legacy/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
  80. package/legacy/hooks/features/rows/gridRowsSelector.js +3 -3
  81. package/legacy/hooks/features/rows/useGridParamsApi.js +23 -15
  82. package/legacy/hooks/features/sorting/gridSortingSelector.js +3 -3
  83. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +38 -34
  84. package/legacy/hooks/utils/index.js +1 -1
  85. package/legacy/hooks/utils/useGridSelector.js +43 -5
  86. package/legacy/hooks/utils/useLazyRef.js +9 -0
  87. package/legacy/hooks/utils/useOnMount.js +7 -0
  88. package/legacy/index.js +1 -1
  89. package/legacy/internals/index.js +1 -1
  90. package/legacy/locales/elGR.js +70 -79
  91. package/legacy/locales/ptBR.js +12 -13
  92. package/legacy/utils/Store.js +34 -0
  93. package/legacy/utils/createSelector.js +74 -6
  94. package/legacy/utils/doesSupportPreventScroll.js +13 -0
  95. package/legacy/utils/fastMemo.js +5 -0
  96. package/legacy/utils/fastObjectShallowCompare.js +32 -0
  97. package/legacy/utils/keyboardUtils.js +4 -2
  98. package/locales/elGR.js +66 -79
  99. package/locales/ptBR.js +12 -13
  100. package/models/api/gridCoreApi.d.ts +6 -0
  101. package/models/colDef/gridColDef.d.ts +4 -3
  102. package/models/colDef/gridColType.d.ts +3 -1
  103. package/models/events/gridEventLookup.d.ts +3 -3
  104. package/modern/components/GridColumnHeaders.js +3 -1
  105. package/modern/components/GridRow.js +32 -79
  106. package/modern/components/cell/GridCell.js +421 -45
  107. package/modern/components/cell/GridEditInputCell.js +9 -9
  108. package/modern/components/cell/index.js +1 -1
  109. package/modern/components/containers/GridRootStyles.js +30 -16
  110. package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  111. package/modern/components/toolbar/GridToolbar.js +2 -2
  112. package/modern/components/virtualization/GridVirtualScroller.js +4 -9
  113. package/modern/components/virtualization/GridVirtualScrollerContent.js +10 -20
  114. package/modern/constants/defaultGridSlotsComponents.js +6 -2
  115. package/modern/hooks/core/useGridApiInitialization.js +4 -1
  116. package/modern/hooks/core/useGridStateInitialization.js +2 -9
  117. package/modern/hooks/features/clipboard/useGridClipboard.js +1 -4
  118. package/modern/hooks/features/columnGrouping/gridColumnGroupsSelector.js +4 -4
  119. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
  120. package/modern/hooks/features/columns/gridColumnsSelector.js +7 -7
  121. package/modern/hooks/features/dimensions/useGridDimensions.js +6 -12
  122. package/modern/hooks/features/editing/useGridCellEditing.js +5 -3
  123. package/modern/hooks/features/editing/useGridRowEditing.js +14 -6
  124. package/modern/hooks/features/filter/gridFilterSelector.js +8 -8
  125. package/modern/hooks/features/filter/gridFilterUtils.js +17 -12
  126. package/modern/hooks/features/filter/useGridFilter.js +2 -1
  127. package/modern/hooks/features/focus/useGridFocus.js +8 -4
  128. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  129. package/modern/hooks/features/pagination/gridPaginationSelector.js +4 -4
  130. package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +3 -3
  131. package/modern/hooks/features/rows/gridRowsSelector.js +3 -3
  132. package/modern/hooks/features/rows/useGridParamsApi.js +7 -15
  133. package/modern/hooks/features/sorting/gridSortingSelector.js +3 -3
  134. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +40 -38
  135. package/modern/hooks/utils/index.js +1 -1
  136. package/modern/hooks/utils/useGridSelector.js +37 -6
  137. package/modern/hooks/utils/useLazyRef.js +9 -0
  138. package/modern/hooks/utils/useOnMount.js +7 -0
  139. package/modern/index.js +1 -1
  140. package/modern/internals/index.js +1 -1
  141. package/modern/locales/elGR.js +66 -79
  142. package/modern/locales/ptBR.js +12 -13
  143. package/modern/utils/Store.js +24 -0
  144. package/modern/utils/createSelector.js +74 -6
  145. package/modern/utils/doesSupportPreventScroll.js +13 -0
  146. package/modern/utils/fastMemo.js +5 -0
  147. package/modern/utils/fastObjectShallowCompare.js +32 -0
  148. package/modern/utils/keyboardUtils.js +4 -2
  149. package/node/components/GridColumnHeaders.js +4 -2
  150. package/node/components/GridRow.js +32 -79
  151. package/node/components/cell/GridCell.js +424 -47
  152. package/node/components/cell/GridEditInputCell.js +9 -9
  153. package/node/components/cell/index.js +17 -10
  154. package/node/components/containers/GridRootStyles.js +30 -16
  155. package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  156. package/node/components/toolbar/GridToolbar.js +2 -2
  157. package/node/components/virtualization/GridVirtualScroller.js +4 -9
  158. package/node/components/virtualization/GridVirtualScrollerContent.js +10 -20
  159. package/node/constants/defaultGridSlotsComponents.js +4 -1
  160. package/node/hooks/core/useGridApiInitialization.js +4 -1
  161. package/node/hooks/core/useGridStateInitialization.js +2 -9
  162. package/node/hooks/features/clipboard/useGridClipboard.js +1 -4
  163. package/node/hooks/features/columnGrouping/gridColumnGroupsSelector.js +3 -3
  164. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +8 -2
  165. package/node/hooks/features/columns/gridColumnsSelector.js +6 -6
  166. package/node/hooks/features/dimensions/useGridDimensions.js +6 -12
  167. package/node/hooks/features/editing/useGridCellEditing.js +5 -3
  168. package/node/hooks/features/editing/useGridRowEditing.js +14 -6
  169. package/node/hooks/features/filter/gridFilterSelector.js +7 -7
  170. package/node/hooks/features/filter/gridFilterUtils.js +17 -12
  171. package/node/hooks/features/filter/useGridFilter.js +2 -1
  172. package/node/hooks/features/focus/useGridFocus.js +8 -4
  173. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  174. package/node/hooks/features/pagination/gridPaginationSelector.js +3 -3
  175. package/node/hooks/features/rowSelection/gridRowSelectionSelector.js +2 -2
  176. package/node/hooks/features/rows/gridRowsSelector.js +2 -2
  177. package/node/hooks/features/rows/useGridParamsApi.js +9 -15
  178. package/node/hooks/features/sorting/gridSortingSelector.js +2 -2
  179. package/node/hooks/features/virtualization/useGridVirtualScroller.js +40 -36
  180. package/node/hooks/utils/index.js +14 -10
  181. package/node/hooks/utils/useGridSelector.js +41 -7
  182. package/node/hooks/utils/useLazyRef.js +17 -0
  183. package/node/hooks/utils/useOnMount.js +15 -0
  184. package/node/index.js +1 -1
  185. package/node/internals/index.js +7 -0
  186. package/node/locales/elGR.js +66 -79
  187. package/node/locales/ptBR.js +12 -13
  188. package/node/utils/Store.js +31 -0
  189. package/node/utils/createSelector.js +77 -8
  190. package/node/utils/doesSupportPreventScroll.js +19 -0
  191. package/node/utils/fastMemo.js +13 -0
  192. package/node/utils/fastObjectShallowCompare.js +38 -0
  193. package/node/utils/keyboardUtils.js +4 -2
  194. package/package.json +2 -2
  195. package/utils/Store.d.ts +11 -0
  196. package/utils/Store.js +24 -0
  197. package/utils/createSelector.d.ts +1 -0
  198. package/utils/createSelector.js +74 -6
  199. package/utils/doesSupportPreventScroll.d.ts +1 -0
  200. package/utils/doesSupportPreventScroll.js +13 -0
  201. package/utils/fastMemo.d.ts +1 -0
  202. package/utils/fastMemo.js +5 -0
  203. package/utils/fastObjectShallowCompare.d.ts +1 -0
  204. package/utils/fastObjectShallowCompare.js +32 -0
  205. 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 = createSelector(gridPaginationModelSelector, gridRowTreeSelector, gridRowMaximumTreeDepthSelector, gridExpandedSortedRowEntriesSelector, gridFilteredSortedTopLevelRowEntriesSelector, (paginationModel, rowTree, rowTreeDepth, visibleSortedRowEntries, visibleSortedTopLevelRowEntries) => {
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 = createSelector(gridExpandedSortedRowEntriesSelector, gridPaginationRowRangeSelector, (visibleSortedRowEntries, paginationRange) => {
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 = createSelector(gridExpandedSortedRowIdsSelector, gridPaginationRowRangeSelector, (visibleSortedRowIds, paginationRange) => {
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 = createSelector(gridRowSelectionStateSelector, gridRowsLookupSelector, (selectedRows, rowsLookup) => new Map(selectedRows.map(id => [id, rowsLookup[id]])));
6
- export const selectedIdsLookupSelector = createSelector(gridRowSelectionStateSelector, selection => selection.reduce((lookup, rowId) => {
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 = createSelector(gridRowsStateSelector, rows => {
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 = createSelector(gridAdditionalRowGroupsSelector, additionalRowGroups => {
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
- let warnedOnceMissingColumn = false;
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 Error(`No row with id #${id} found`);
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 Error(`No row with id #${id} found`);
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 Error(`No row with id #${id} found`);
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 Error(`No row with id #${id} found`);
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 = createSelector(gridSortedRowIdsSelector, gridRowsLookupSelector,
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 = createSelector(gridSortModelSelector, sortModel => {
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
- if (rootProps.autoHeight && currentPage.rows.length === 0) {
455
- contentSize.height = getMinimalContentHeight(apiRef, rootProps.rowHeight); // Give room to show the overlay when there no rows.
456
- }
457
-
458
- const rootStyle = {};
459
- if (!needsHorizontalScrollbar) {
460
- rootStyle.overflowX = 'hidden';
461
- }
462
- if (rootProps.autoHeight) {
463
- rootStyle.overflowY = 'hidden';
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: (_ref3 = {}) => {
476
- let {
477
- style = {}
478
- } = _ref3,
479
- other = _objectWithoutPropertiesLoose(_ref3, _excluded3);
480
- return _extends({
481
- ref: handleRef,
482
- onScroll: handleScroll,
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 * from './useGridSelector';
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
- 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.']);
6
- export const useGridSelector = (apiRef, selector) => {
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
- if (isOutputSelector(selector)) {
13
- return selector(apiRef);
14
- }
15
- return selector(apiRef.current.state);
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
  };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ const UNINITIALIZED = {};
3
+ export function useLazyRef(init, initArg) {
4
+ const ref = React.useRef(UNINITIALIZED);
5
+ if (ref.current === UNINITIALIZED) {
6
+ ref.current = init(initArg);
7
+ }
8
+ return ref;
9
+ }
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ const EMPTY = [];
3
+ export function useOnMount(fn) {
4
+ /* eslint-disable react-hooks/exhaustive-deps */
5
+ React.useEffect(fn, EMPTY);
6
+ /* eslint-enable react-hooks/exhaustive-deps */
7
+ }
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.7.0
2
+ * @mui/x-data-grid v6.9.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -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';
@@ -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
- // toolbarQuickFilterPlaceholder: 'Search…',
23
- // toolbarQuickFilterLabel: 'Search',
24
- // toolbarQuickFilterDeleteIconLabel: 'Clear',
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
- // toolbarExportPrint: 'Print',
31
- // toolbarExportExcel: 'Download as Excel',
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
- // filterPanelRemoveAll: 'Remove all',
40
+ filterPanelRemoveAll: 'Αφαίρεση όλων',
42
41
  filterPanelDeleteIconLabel: 'Διαγραφή',
43
- // filterPanelLogicOperator: 'Logic operator',
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
- // filterOperatorIsAnyOf: 'is any of',
64
- // 'filterOperator=': '=',
65
- // 'filterOperator!=': '!=',
66
- // 'filterOperator>': '>',
67
- // 'filterOperator>=': '>=',
68
- // 'filterOperator<': '<',
69
- // 'filterOperator<=': '<=',
70
-
62
+ filterOperatorIsAnyOf: 'είναι οποιοδήποτε από',
63
+ 'filterOperator=': '=',
64
+ 'filterOperator!=': '!=',
65
+ 'filterOperator>': '>',
66
+ 'filterOperator>=': '>=',
67
+ 'filterOperator<': '<',
68
+ 'filterOperator<=': '<=',
71
69
  // Header filter operators text
72
- // headerFilterOperatorContains: 'Contains',
73
- // headerFilterOperatorEquals: 'Equals',
74
- // headerFilterOperatorStartsWith: 'Starts with',
75
- // headerFilterOperatorEndsWith: 'Ends with',
76
- // headerFilterOperatorIs: 'Is',
77
- // headerFilterOperatorNot: 'Is not',
78
- // headerFilterOperatorAfter: 'Is after',
79
- // headerFilterOperatorOnOrAfter: 'Is on or after',
80
- // headerFilterOperatorBefore: 'Is before',
81
- // headerFilterOperatorOnOrBefore: 'Is on or before',
82
- // headerFilterOperatorIsEmpty: 'Is empty',
83
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
84
- // headerFilterOperatorIsAnyOf: 'Is any of',
85
- // 'headerFilterOperator=': 'Equals',
86
- // 'headerFilterOperator!=': 'Not equals',
87
- // 'headerFilterOperator>': 'Greater than',
88
- // 'headerFilterOperator>=': 'Greater than or equal to',
89
- // 'headerFilterOperator<': 'Less than',
90
- // 'headerFilterOperator<=': 'Less than or equal to',
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
- // filterValueAny: 'any',
94
- // filterValueTrue: 'true',
95
- // filterValueFalse: 'false',
96
-
90
+ filterValueAny: 'οποιοδήποτε',
91
+ filterValueTrue: 'αληθές',
92
+ filterValueFalse: 'ψευδές',
97
93
  // Column menu text
98
94
  columnMenuLabel: 'Μενού',
99
95
  columnMenuShowColumns: 'Εμφάνιση στηλών',
100
- // columnMenuManageColumns: 'Manage columns',
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
- // checkboxSelectionHeaderName: 'Checkbox selection',
118
- // checkboxSelectionSelectAllRows: 'Select all rows',
119
- // checkboxSelectionUnselectAllRows: 'Unselect all rows',
120
- // checkboxSelectionSelectRow: 'Select row',
121
- // checkboxSelectionUnselectRow: 'Unselect row',
122
-
113
+ checkboxSelectionHeaderName: 'Επιλογή πλαισίου ελέγχου',
114
+ checkboxSelectionSelectAllRows: 'Επιλέξτε όλες τις σειρές',
115
+ checkboxSelectionUnselectAllRows: 'Καταργήση επιλογής όλων των σειρών',
116
+ checkboxSelectionSelectRow: 'Επιλογή γραμμής',
117
+ checkboxSelectionUnselectRow: 'Καταργήση επιλογής γραμμής',
123
118
  // Boolean cell text
124
- // booleanCellTrueLabel: 'yes',
125
- // booleanCellFalseLabel: 'no',
126
-
119
+ booleanCellTrueLabel: 'ναί',
120
+ booleanCellFalseLabel: 'όχι',
127
121
  // Actions cell more text
128
- actionsCellMore: 'περισσότερα'
129
-
122
+ actionsCellMore: 'περισσότερα',
130
123
  // Column pinning text
131
- // pinToLeft: 'Pin to left',
132
- // pinToRight: 'Pin to right',
133
- // unpin: 'Unpin',
134
-
124
+ pinToLeft: 'Καρφιτσώμα στα αριστερά',
125
+ pinToRight: 'Καρφιτσώμα στα δεξιά',
126
+ unpin: 'Ξεκαρφίτσωμα',
135
127
  // Tree Data
136
- // treeDataGroupingHeaderName: 'Group',
137
- // treeDataExpand: 'see children',
138
- // treeDataCollapse: 'hide children',
139
-
128
+ treeDataGroupingHeaderName: 'Ομαδοποίηση',
129
+ treeDataExpand: 'εμφάνιση περιεχομένων',
130
+ treeDataCollapse: 'απόκρυψη περιεχομένων',
140
131
  // Grouping columns
141
- // groupingColumnHeaderName: 'Group',
142
- // groupColumn: name => `Group by ${name}`,
143
- // unGroupColumn: name => `Stop grouping by ${name}`,
144
-
132
+ groupingColumnHeaderName: 'Ομαδοποίηση',
133
+ groupColumn: name => `Ομαδοποίηση κατά ${name}`,
134
+ unGroupColumn: name => `Διακοπή ομαδοποίησης κατά ${name}`,
145
135
  // Master/detail
146
- // detailPanelToggle: 'Detail panel toggle',
147
- // expandDetailPanel: 'Expand',
148
- // collapseDetailPanel: 'Collapse',
149
-
136
+ detailPanelToggle: 'Εναλλαγή πίνακα λεπτομερειών',
137
+ expandDetailPanel: 'Ανάπτυξη',
138
+ collapseDetailPanel: 'Σύμπτυξη',
150
139
  // Row reordering text
151
- // rowReorderingHeaderName: 'Row reordering',
152
-
140
+ rowReorderingHeaderName: 'Αναδιάταξη γραμμών',
153
141
  // Aggregation
154
- // aggregationMenuItemHeader: 'Aggregation',
155
- // aggregationFunctionLabelSum: 'sum',
156
- // aggregationFunctionLabelAvg: 'avg',
157
- // aggregationFunctionLabelMin: 'min',
158
- // aggregationFunctionLabelMax: 'max',
159
- // aggregationFunctionLabelSize: 'size',
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);
@@ -68,12 +68,12 @@ const ptBRGrid = {
68
68
  // 'filterOperator<=': '<=',
69
69
 
70
70
  // Header filter operators text
71
- // headerFilterOperatorContains: 'Contains',
72
- // headerFilterOperatorEquals: 'Equals',
73
- // headerFilterOperatorStartsWith: 'Starts with',
74
- // headerFilterOperatorEndsWith: 'Ends with',
75
- // headerFilterOperatorIs: 'Is',
76
- // headerFilterOperatorNot: 'Is not',
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
- // 'headerFilterOperator=': 'Equals',
85
- // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Greater than',
87
- // 'headerFilterOperator>=': 'Greater than or equal to',
88
- // 'headerFilterOperator<': 'Less than',
89
- // 'headerFilterOperator<=': 'Less than or equal to',
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',