@mui/x-data-grid 8.0.0-alpha.2 → 8.0.0-alpha.4

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 (138) hide show
  1. package/CHANGELOG.md +376 -0
  2. package/DataGrid/DataGrid.js +5 -13
  3. package/README.md +1 -1
  4. package/components/GridRow.js +1 -1
  5. package/components/cell/GridActionsCell.js +8 -1
  6. package/components/cell/GridCell.js +1 -1
  7. package/components/columnSelection/GridHeaderCheckbox.js +4 -1
  8. package/components/panel/GridColumnsPanel.js +1 -2
  9. package/components/panel/GridPanelContent.js +7 -3
  10. package/components/panel/GridPanelFooter.d.ts +1 -1
  11. package/components/panel/GridPanelFooter.js +4 -3
  12. package/components/panel/filterPanel/GridFilterForm.js +15 -15
  13. package/constants/dataGridPropsDefaultValues.js +1 -2
  14. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
  15. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
  16. package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +3 -6
  17. package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  18. package/hooks/core/useGridStateInitialization.js +3 -3
  19. package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
  20. package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
  21. package/hooks/features/columnResize/useGridColumnResize.js +2 -1
  22. package/hooks/features/columns/gridColumnsSelector.d.ts +12 -12
  23. package/hooks/features/density/densitySelector.d.ts +1 -1
  24. package/hooks/features/editing/useGridCellEditing.js +3 -3
  25. package/hooks/features/editing/useGridRowEditing.js +3 -3
  26. package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
  27. package/hooks/features/filter/useGridFilter.js +1 -1
  28. package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
  29. package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
  30. package/hooks/features/overlays/useGridOverlays.js +3 -1
  31. package/hooks/features/pagination/gridPaginationSelector.d.ts +15 -9
  32. package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
  33. package/hooks/features/rowSelection/useGridRowSelection.js +5 -4
  34. package/hooks/features/rowSelection/utils.d.ts +1 -1
  35. package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
  36. package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -8
  37. package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
  38. package/hooks/features/rows/gridRowsSelector.js +0 -1
  39. package/hooks/features/rows/gridRowsUtils.js +0 -9
  40. package/hooks/features/rows/index.d.ts +1 -1
  41. package/hooks/features/rows/index.js +1 -1
  42. package/hooks/features/rows/useGridRowSpanning.d.ts +1 -1
  43. package/hooks/features/rows/useGridRowSpanning.js +16 -8
  44. package/hooks/features/rows/useGridRows.js +16 -18
  45. package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
  46. package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
  47. package/hooks/features/sorting/gridSortingSelector.js +11 -0
  48. package/hooks/features/sorting/index.d.ts +2 -1
  49. package/hooks/features/sorting/index.js +1 -1
  50. package/hooks/features/sorting/useGridSorting.js +1 -1
  51. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
  52. package/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
  53. package/hooks/utils/useGridSelector.d.ts +4 -6
  54. package/hooks/utils/useGridSelector.js +6 -44
  55. package/index.js +1 -1
  56. package/internals/index.d.ts +3 -3
  57. package/internals/index.js +3 -3
  58. package/locales/heIL.js +14 -16
  59. package/locales/roRO.js +18 -20
  60. package/locales/trTR.js +12 -14
  61. package/models/api/gridStateApi.d.ts +1 -1
  62. package/models/controlStateItem.d.ts +2 -2
  63. package/models/events/gridEventLookup.d.ts +1 -0
  64. package/models/gridDataSource.d.ts +1 -1
  65. package/models/props/DataGridProps.d.ts +1 -9
  66. package/modern/DataGrid/DataGrid.js +5 -13
  67. package/modern/components/GridRow.js +1 -1
  68. package/modern/components/cell/GridActionsCell.js +8 -1
  69. package/modern/components/cell/GridCell.js +1 -1
  70. package/modern/components/columnSelection/GridHeaderCheckbox.js +4 -1
  71. package/modern/components/panel/GridColumnsPanel.js +1 -2
  72. package/modern/components/panel/GridPanelContent.js +7 -3
  73. package/modern/components/panel/GridPanelFooter.js +4 -3
  74. package/modern/components/panel/filterPanel/GridFilterForm.js +15 -15
  75. package/modern/constants/dataGridPropsDefaultValues.js +1 -2
  76. package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
  77. package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  78. package/modern/hooks/core/useGridStateInitialization.js +3 -3
  79. package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
  80. package/modern/hooks/features/editing/useGridCellEditing.js +3 -3
  81. package/modern/hooks/features/editing/useGridRowEditing.js +3 -3
  82. package/modern/hooks/features/filter/useGridFilter.js +1 -1
  83. package/modern/hooks/features/overlays/useGridOverlays.js +3 -1
  84. package/modern/hooks/features/rowSelection/useGridRowSelection.js +5 -4
  85. package/modern/hooks/features/rows/gridRowsSelector.js +0 -1
  86. package/modern/hooks/features/rows/gridRowsUtils.js +0 -9
  87. package/modern/hooks/features/rows/index.js +1 -1
  88. package/modern/hooks/features/rows/useGridRowSpanning.js +16 -8
  89. package/modern/hooks/features/rows/useGridRows.js +16 -18
  90. package/modern/hooks/features/sorting/gridSortingSelector.js +11 -0
  91. package/modern/hooks/features/sorting/index.js +1 -1
  92. package/modern/hooks/features/sorting/useGridSorting.js +1 -1
  93. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
  94. package/modern/hooks/utils/useGridSelector.js +6 -44
  95. package/modern/index.js +1 -1
  96. package/modern/internals/index.js +3 -3
  97. package/modern/locales/heIL.js +14 -16
  98. package/modern/locales/roRO.js +18 -20
  99. package/modern/locales/trTR.js +12 -14
  100. package/modern/utils/createSelector.js +1 -120
  101. package/node/DataGrid/DataGrid.js +5 -13
  102. package/node/components/GridRow.js +1 -1
  103. package/node/components/cell/GridActionsCell.js +8 -1
  104. package/node/components/cell/GridCell.js +1 -1
  105. package/node/components/columnSelection/GridHeaderCheckbox.js +4 -1
  106. package/node/components/panel/GridColumnsPanel.js +1 -2
  107. package/node/components/panel/GridPanelContent.js +7 -3
  108. package/node/components/panel/GridPanelFooter.js +5 -4
  109. package/node/components/panel/filterPanel/GridFilterForm.js +15 -15
  110. package/node/constants/dataGridPropsDefaultValues.js +1 -2
  111. package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
  112. package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
  113. package/node/hooks/core/useGridStateInitialization.js +3 -3
  114. package/node/hooks/features/columnResize/useGridColumnResize.js +2 -1
  115. package/node/hooks/features/editing/useGridCellEditing.js +2 -2
  116. package/node/hooks/features/editing/useGridRowEditing.js +2 -2
  117. package/node/hooks/features/filter/useGridFilter.js +1 -1
  118. package/node/hooks/features/overlays/useGridOverlays.js +3 -1
  119. package/node/hooks/features/rowSelection/useGridRowSelection.js +5 -4
  120. package/node/hooks/features/rows/gridRowsSelector.js +1 -2
  121. package/node/hooks/features/rows/gridRowsUtils.js +0 -9
  122. package/node/hooks/features/rows/index.js +0 -7
  123. package/node/hooks/features/rows/useGridRowSpanning.js +16 -8
  124. package/node/hooks/features/rows/useGridRows.js +15 -17
  125. package/node/hooks/features/sorting/gridSortingSelector.js +12 -1
  126. package/node/hooks/features/sorting/index.js +24 -16
  127. package/node/hooks/features/sorting/useGridSorting.js +1 -1
  128. package/node/hooks/features/virtualization/useGridVirtualScroller.js +11 -8
  129. package/node/hooks/utils/useGridSelector.js +8 -47
  130. package/node/index.js +1 -1
  131. package/node/internals/index.js +15 -22
  132. package/node/locales/heIL.js +14 -16
  133. package/node/locales/roRO.js +18 -20
  134. package/node/locales/trTR.js +12 -14
  135. package/node/utils/createSelector.js +4 -125
  136. package/package.json +1 -1
  137. package/utils/createSelector.d.ts +4 -16
  138. package/utils/createSelector.js +1 -120
@@ -3,11 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- gridDateComparator: true,
8
- gridNumberComparator: true,
9
- gridStringOrNumberComparator: true
10
- };
11
6
  Object.defineProperty(exports, "gridDateComparator", {
12
7
  enumerable: true,
13
8
  get: function () {
@@ -20,6 +15,30 @@ Object.defineProperty(exports, "gridNumberComparator", {
20
15
  return _gridSortingUtils.gridNumberComparator;
21
16
  }
22
17
  });
18
+ Object.defineProperty(exports, "gridSortColumnLookupSelector", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _gridSortingSelector.gridSortColumnLookupSelector;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "gridSortModelSelector", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _gridSortingSelector.gridSortModelSelector;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "gridSortedRowEntriesSelector", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _gridSortingSelector.gridSortedRowEntriesSelector;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "gridSortedRowIdsSelector", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _gridSortingSelector.gridSortedRowIdsSelector;
40
+ }
41
+ });
23
42
  Object.defineProperty(exports, "gridStringOrNumberComparator", {
24
43
  enumerable: true,
25
44
  get: function () {
@@ -27,15 +46,4 @@ Object.defineProperty(exports, "gridStringOrNumberComparator", {
27
46
  }
28
47
  });
29
48
  var _gridSortingSelector = require("./gridSortingSelector");
30
- Object.keys(_gridSortingSelector).forEach(function (key) {
31
- if (key === "default" || key === "__esModule") return;
32
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
33
- if (key in exports && exports[key] === _gridSortingSelector[key]) return;
34
- Object.defineProperty(exports, key, {
35
- enumerable: true,
36
- get: function () {
37
- return _gridSortingSelector[key];
38
- }
39
- });
40
- });
41
49
  var _gridSortingUtils = require("./gridSortingUtils");
@@ -97,7 +97,7 @@ const useGridSorting = (apiRef, props) => {
97
97
  })
98
98
  });
99
99
  }
100
- const sortModel = (0, _gridSortingSelector.gridSortModelSelector)(state, apiRef.current.instanceId);
100
+ const sortModel = (0, _gridSortingSelector.gridSortModelSelector)(state, undefined, apiRef.current.instanceId);
101
101
  const sortRowList = (0, _gridSortingUtils.buildAggregatedSortingApplier)(sortModel, apiRef);
102
102
  const sortedRows = apiRef.current.applyStrategyProcessor('sorting', {
103
103
  sortRowList
@@ -103,10 +103,7 @@ const useGridVirtualScroller = () => {
103
103
  return undefined;
104
104
  }
105
105
  const initialRect = node.getBoundingClientRect();
106
- let lastSize = {
107
- width: initialRect.width,
108
- height: initialRect.height
109
- };
106
+ let lastSize = roundDimensions(initialRect);
110
107
  apiRef.current.publishEvent('resize', lastSize);
111
108
  if (typeof ResizeObserver === 'undefined') {
112
109
  return undefined;
@@ -116,10 +113,7 @@ const useGridVirtualScroller = () => {
116
113
  if (!entry) {
117
114
  return;
118
115
  }
119
- const newSize = {
120
- width: entry.contentRect.width,
121
- height: entry.contentRect.height
122
- };
116
+ const newSize = roundDimensions(entry.contentRect);
123
117
  if (newSize.width === lastSize.width && newSize.height === lastSize.height) {
124
118
  return;
125
119
  }
@@ -796,4 +790,13 @@ function bufferForDirection(isRtl, direction, rowBufferPx, columnBufferPx, verti
796
790
  // eslint unable to figure out enum exhaustiveness
797
791
  throw new Error('unreachable');
798
792
  }
793
+ }
794
+
795
+ // Round to avoid issues with subpixel rendering
796
+ // https://github.com/mui/mui-x/issues/15721
797
+ function roundDimensions(dimensions) {
798
+ return {
799
+ width: Math.round(dimensions.width * 10) / 10,
800
+ height: Math.round(dimensions.height * 10) / 10
801
+ };
799
802
  }
@@ -4,7 +4,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.useGridSelectorV8 = exports.useGridSelector = exports.objectShallowCompare = exports.argsEqual = void 0;
7
+ exports.useGridSelector = exports.objectShallowCompare = exports.argsEqual = void 0;
8
8
  var React = _interopRequireWildcard(require("react"));
9
9
  var _fastObjectShallowCompare = require("@mui/x-internals/fastObjectShallowCompare");
10
10
  var _warning = require("@mui/x-internals/warning");
@@ -13,20 +13,11 @@ var _useOnMount = require("./useOnMount");
13
13
  function isOutputSelector(selector) {
14
14
  return selector.acceptsApiRef;
15
15
  }
16
- // TODO v8: Remove this function
17
- function applySelector(apiRef, selector) {
18
- if (isOutputSelector(selector)) {
19
- return selector(apiRef);
20
- }
21
- return selector(apiRef.current.state);
22
- }
23
-
24
- // TODO v8: Rename this function to `applySelector`
25
- function applySelectorV8(apiRef, selector, args, instanceId) {
16
+ function applySelector(apiRef, selector, args, instanceId) {
26
17
  if (isOutputSelector(selector)) {
27
18
  return selector(apiRef, args);
28
19
  }
29
- return selector(apiRef.current.state, instanceId);
20
+ return selector(apiRef.current.state, args, instanceId);
30
21
  }
31
22
  const defaultCompare = Object.is;
32
23
  const objectShallowCompare = exports.objectShallowCompare = _fastObjectShallowCompare.fastObjectShallowCompare;
@@ -52,37 +43,7 @@ const createRefs = () => ({
52
43
  selector: null,
53
44
  args: null
54
45
  });
55
-
56
- // TODO v8: Remove this function
57
- const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
58
- if (process.env.NODE_ENV !== 'production') {
59
- if (!apiRef.current.state) {
60
- (0, _warning.warnOnce)(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
61
- }
62
- }
63
- const refs = (0, _useLazyRef.useLazyRef)(createRefs);
64
- const didInit = refs.current.selector !== null;
65
- const [state, setState] = React.useState(
66
- // We don't use an initialization function to avoid allocations
67
- didInit ? null : applySelector(apiRef, selector));
68
- refs.current.state = state;
69
- refs.current.equals = equals;
70
- refs.current.selector = selector;
71
- (0, _useOnMount.useOnMount)(() => {
72
- return apiRef.current.store.subscribe(() => {
73
- const newState = applySelector(apiRef, refs.current.selector);
74
- if (!refs.current.equals(refs.current.state, newState)) {
75
- refs.current.state = newState;
76
- setState(newState);
77
- }
78
- });
79
- });
80
- return state;
81
- };
82
-
83
- // TODO v8: Rename this function to `useGridSelector`
84
- exports.useGridSelector = useGridSelector;
85
- const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultCompare) => {
46
+ const useGridSelector = (apiRef, selector, args = undefined, equals = defaultCompare) => {
86
47
  if (process.env.NODE_ENV !== 'production') {
87
48
  if (!apiRef.current.state) {
88
49
  (0, _warning.warnOnce)(['MUI X: `useGridSelector` has been called before the initialization of the state.', 'This hook can only be used inside the context of the grid.']);
@@ -92,14 +53,14 @@ const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultC
92
53
  const didInit = refs.current.selector !== null;
93
54
  const [state, setState] = React.useState(
94
55
  // We don't use an initialization function to avoid allocations
95
- didInit ? null : applySelectorV8(apiRef, selector, args, apiRef.current.instanceId));
56
+ didInit ? null : applySelector(apiRef, selector, args, apiRef.current.instanceId));
96
57
  refs.current.state = state;
97
58
  refs.current.equals = equals;
98
59
  refs.current.selector = selector;
99
60
  const prevArgs = refs.current.args;
100
61
  refs.current.args = args;
101
62
  if (didInit && !argsEqual(prevArgs, args)) {
102
- const newState = applySelectorV8(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
63
+ const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
103
64
  if (!refs.current.equals(refs.current.state, newState)) {
104
65
  refs.current.state = newState;
105
66
  setState(newState);
@@ -107,7 +68,7 @@ const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultC
107
68
  }
108
69
  (0, _useOnMount.useOnMount)(() => {
109
70
  return apiRef.current.store.subscribe(() => {
110
- const newState = applySelectorV8(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
71
+ const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
111
72
  if (!refs.current.equals(refs.current.state, newState)) {
112
73
  refs.current.state = newState;
113
74
  setState(newState);
@@ -116,4 +77,4 @@ const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultC
116
77
  });
117
78
  return state;
118
79
  };
119
- exports.useGridSelectorV8 = useGridSelectorV8;
80
+ exports.useGridSelector = useGridSelector;
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.0.0-alpha.2
2
+ * @mui/x-data-grid v8.0.0-alpha.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -14,6 +14,7 @@ var _exportNames = {
14
14
  getValueOptions: true,
15
15
  isSingleSelectColDef: true,
16
16
  useGridRegisterPipeProcessor: true,
17
+ GridStrategyGroup: true,
17
18
  useGridRegisterStrategyProcessor: true,
18
19
  GRID_DEFAULT_STRATEGY: true,
19
20
  useGridInitialization: true,
@@ -72,6 +73,7 @@ var _exportNames = {
72
73
  useGridRowSelectionPreProcessors: true,
73
74
  useGridSorting: true,
74
75
  sortingStateInitializer: true,
76
+ gridSortedRowIndexLookupSelector: true,
75
77
  useGridScroll: true,
76
78
  useGridEvents: true,
77
79
  dimensionsStateInitializer: true,
@@ -91,10 +93,7 @@ var _exportNames = {
91
93
  getColumnsToExport: true,
92
94
  defaultGetRowsToExport: true,
93
95
  createSelector: true,
94
- createSelectorV8: true,
95
96
  createSelectorMemoized: true,
96
- createSelectorMemoizedV8: true,
97
- useGridSelectorV8: true,
98
97
  findParentElementFromClassName: true,
99
98
  getActiveElement: true,
100
99
  isEventTargetInPortal: true,
@@ -141,6 +140,12 @@ Object.defineProperty(exports, "GridHeaders", {
141
140
  return _GridHeaders.GridHeaders;
142
141
  }
143
142
  });
143
+ Object.defineProperty(exports, "GridStrategyGroup", {
144
+ enumerable: true,
145
+ get: function () {
146
+ return _strategyProcessing.GridStrategyGroup;
147
+ }
148
+ });
144
149
  Object.defineProperty(exports, "GridVirtualScroller", {
145
150
  enumerable: true,
146
151
  get: function () {
@@ -213,18 +218,6 @@ Object.defineProperty(exports, "createSelectorMemoized", {
213
218
  return _createSelector.createSelectorMemoized;
214
219
  }
215
220
  });
216
- Object.defineProperty(exports, "createSelectorMemoizedV8", {
217
- enumerable: true,
218
- get: function () {
219
- return _createSelector.createSelectorMemoizedV8;
220
- }
221
- });
222
- Object.defineProperty(exports, "createSelectorV8", {
223
- enumerable: true,
224
- get: function () {
225
- return _createSelector.createSelectorV8;
226
- }
227
- });
228
221
  Object.defineProperty(exports, "defaultGetRowsToExport", {
229
222
  enumerable: true,
230
223
  get: function () {
@@ -363,6 +356,12 @@ Object.defineProperty(exports, "gridRowGroupsToFetchSelector", {
363
356
  return _gridRowsSelector.gridRowGroupsToFetchSelector;
364
357
  }
365
358
  });
359
+ Object.defineProperty(exports, "gridSortedRowIndexLookupSelector", {
360
+ enumerable: true,
361
+ get: function () {
362
+ return _gridSortingSelector.gridSortedRowIndexLookupSelector;
363
+ }
364
+ });
366
365
  Object.defineProperty(exports, "headerFilteringStateInitializer", {
367
366
  enumerable: true,
368
367
  get: function () {
@@ -669,12 +668,6 @@ Object.defineProperty(exports, "useGridScroll", {
669
668
  return _useGridScroll.useGridScroll;
670
669
  }
671
670
  });
672
- Object.defineProperty(exports, "useGridSelectorV8", {
673
- enumerable: true,
674
- get: function () {
675
- return _useGridSelector.useGridSelectorV8;
676
- }
677
- });
678
671
  Object.defineProperty(exports, "useGridSorting", {
679
672
  enumerable: true,
680
673
  get: function () {
@@ -784,6 +777,7 @@ var _useGridHeaderFiltering = require("../hooks/features/headerFiltering/useGrid
784
777
  var _useGridRowSelection = require("../hooks/features/rowSelection/useGridRowSelection");
785
778
  var _useGridRowSelectionPreProcessors = require("../hooks/features/rowSelection/useGridRowSelectionPreProcessors");
786
779
  var _useGridSorting = require("../hooks/features/sorting/useGridSorting");
780
+ var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
787
781
  var _useGridScroll = require("../hooks/features/scroll/useGridScroll");
788
782
  var _useGridEvents = require("../hooks/features/events/useGridEvents");
789
783
  var _useGridDimensions = require("../hooks/features/dimensions/useGridDimensions");
@@ -821,7 +815,6 @@ Object.keys(_createControllablePromise).forEach(function (key) {
821
815
  });
822
816
  });
823
817
  var _createSelector = require("../utils/createSelector");
824
- var _useGridSelector = require("../hooks/utils/useGridSelector");
825
818
  var _domUtils = require("../utils/domUtils");
826
819
  var _keyboardUtils = require("../utils/keyboardUtils");
827
820
  var _utils3 = require("../utils/utils");
@@ -30,16 +30,15 @@ const heILGrid = {
30
30
  toolbarQuickFilterLabel: 'חיפוש',
31
31
  toolbarQuickFilterDeleteIconLabel: 'ניקוי',
32
32
  // Prompt toolbar field
33
- // toolbarPromptControlPlaceholder: 'Type a prompt…',
34
- // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
35
- // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
36
- // toolbarPromptControlLabel: 'Prompt input',
37
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
38
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
39
- // toolbarPromptControlSendActionLabel: 'Send',
40
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
41
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
42
-
33
+ toolbarPromptControlPlaceholder: 'הקלד ערך…',
34
+ toolbarPromptControlWithRecordingPlaceholder: 'הקלד או הקלט ערך…',
35
+ toolbarPromptControlRecordingPlaceholder: 'ממתין להנחיה…',
36
+ toolbarPromptControlLabel: 'הזן ערך',
37
+ toolbarPromptControlRecordButtonDefaultLabel: 'הקלטה',
38
+ toolbarPromptControlRecordButtonActiveLabel: 'הפסק הקלטה',
39
+ toolbarPromptControlSendActionLabel: 'שלח',
40
+ toolbarPromptControlSendActionAriaLabel: 'שלח ערך',
41
+ toolbarPromptControlErrorMessage: 'התרחשה שגיאה בזמן העיבוד של הבקשה. נסה שוב עם ערך אחר בבקשה.',
43
42
  // Export selector toolbar button text
44
43
  toolbarExport: 'ייצוא',
45
44
  toolbarExportLabel: 'ייצוא',
@@ -51,8 +50,7 @@ const heILGrid = {
51
50
  columnsManagementNoColumns: 'אין עמודות',
52
51
  columnsManagementShowHideAllText: 'הצג/הסתר הכל',
53
52
  columnsManagementReset: 'אתחול',
54
- // columnsManagementDeleteIconLabel: 'Clear',
55
-
53
+ columnsManagementDeleteIconLabel: 'נקה',
56
54
  // Filter panel text
57
55
  filterPanelAddFilter: 'הוסף מסנן',
58
56
  filterPanelRemoveAll: 'מחק הכל',
@@ -66,9 +64,9 @@ const heILGrid = {
66
64
  filterPanelInputPlaceholder: 'ערך מסנן',
67
65
  // Filter operators text
68
66
  filterOperatorContains: 'מכיל',
69
- // filterOperatorDoesNotContain: 'does not contain',
67
+ filterOperatorDoesNotContain: 'לא מכיל',
70
68
  filterOperatorEquals: 'שווה',
71
- // filterOperatorDoesNotEqual: 'does not equal',
69
+ filterOperatorDoesNotEqual: 'לא שווה',
72
70
  filterOperatorStartsWith: 'מתחיל ב-',
73
71
  filterOperatorEndsWith: 'נגמר ב-',
74
72
  filterOperatorIs: 'הינו',
@@ -88,9 +86,9 @@ const heILGrid = {
88
86
  'filterOperator<=': '<=',
89
87
  // Header filter operators text
90
88
  headerFilterOperatorContains: 'מכיל',
91
- // headerFilterOperatorDoesNotContain: 'Does not contain',
89
+ headerFilterOperatorDoesNotContain: 'לא מכיל',
92
90
  headerFilterOperatorEquals: 'שווה',
93
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
91
+ headerFilterOperatorDoesNotEqual: 'לא שווה',
94
92
  headerFilterOperatorStartsWith: 'מתחיל ב-',
95
93
  headerFilterOperatorEndsWith: 'נגמר ב-',
96
94
  headerFilterOperatorIs: 'הינו',
@@ -30,16 +30,15 @@ const roROGrid = {
30
30
  toolbarQuickFilterLabel: 'Căutare',
31
31
  toolbarQuickFilterDeleteIconLabel: 'Ștergere',
32
32
  // Prompt toolbar field
33
- // toolbarPromptControlPlaceholder: 'Type a prompt…',
34
- // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
35
- // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
36
- // toolbarPromptControlLabel: 'Prompt input',
37
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
38
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
39
- // toolbarPromptControlSendActionLabel: 'Send',
40
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
41
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
42
-
33
+ toolbarPromptControlPlaceholder: 'Scrie un prompt…',
34
+ toolbarPromptControlWithRecordingPlaceholder: 'Scrie sau înregistrează un prompt…',
35
+ toolbarPromptControlRecordingPlaceholder: 'Ascultare prompt…',
36
+ toolbarPromptControlLabel: 'Introducere prompt',
37
+ toolbarPromptControlRecordButtonDefaultLabel: 'Înregistrează',
38
+ toolbarPromptControlRecordButtonActiveLabel: 'Oprește înregistrare',
39
+ toolbarPromptControlSendActionLabel: 'Trimite',
40
+ toolbarPromptControlSendActionAriaLabel: 'Trimite prompt',
41
+ toolbarPromptControlErrorMessage: 'A apărut o eroare la procesare. Încercați din nou cu un alt prompt.',
43
42
  // Export selector toolbar button text
44
43
  toolbarExport: 'Export',
45
44
  toolbarExportLabel: 'Export',
@@ -47,12 +46,11 @@ const roROGrid = {
47
46
  toolbarExportPrint: 'Printare',
48
47
  toolbarExportExcel: 'Download în format Excel',
49
48
  // Columns management text
50
- // columnsManagementSearchTitle: 'Search',
51
- // columnsManagementNoColumns: 'No columns',
52
- // columnsManagementShowHideAllText: 'Show/Hide All',
53
- // columnsManagementReset: 'Reset',
54
- // columnsManagementDeleteIconLabel: 'Clear',
55
-
49
+ columnsManagementSearchTitle: 'Caută',
50
+ columnsManagementNoColumns: 'Nicio coloană',
51
+ columnsManagementShowHideAllText: 'Arată/Ascunde tot',
52
+ columnsManagementReset: 'Resetează',
53
+ columnsManagementDeleteIconLabel: 'Șterge',
56
54
  // Filter panel text
57
55
  filterPanelAddFilter: 'Adăugare filtru',
58
56
  filterPanelRemoveAll: 'Șterge tot',
@@ -66,9 +64,9 @@ const roROGrid = {
66
64
  filterPanelInputPlaceholder: 'Filtrare valoare',
67
65
  // Filter operators text
68
66
  filterOperatorContains: 'conține',
69
- // filterOperatorDoesNotContain: 'does not contain',
67
+ filterOperatorDoesNotContain: 'nu conține',
70
68
  filterOperatorEquals: 'este egal cu',
71
- // filterOperatorDoesNotEqual: 'does not equal',
69
+ filterOperatorDoesNotEqual: 'nu este egal cu',
72
70
  filterOperatorStartsWith: 'începe cu',
73
71
  filterOperatorEndsWith: 'se termină cu',
74
72
  filterOperatorIs: 'este',
@@ -88,9 +86,9 @@ const roROGrid = {
88
86
  'filterOperator<=': '<=',
89
87
  // Header filter operators text
90
88
  headerFilterOperatorContains: 'Conține',
91
- // headerFilterOperatorDoesNotContain: 'Does not contain',
89
+ headerFilterOperatorDoesNotContain: 'Nu conține',
92
90
  headerFilterOperatorEquals: 'Egal cu',
93
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
91
+ headerFilterOperatorDoesNotEqual: 'Nu este egal cu',
94
92
  headerFilterOperatorStartsWith: 'Începe cu',
95
93
  headerFilterOperatorEndsWith: 'Se termină cu',
96
94
  headerFilterOperatorIs: 'Este',
@@ -30,16 +30,15 @@ const trTRGrid = {
30
30
  toolbarQuickFilterLabel: 'Ara',
31
31
  toolbarQuickFilterDeleteIconLabel: 'Temizle',
32
32
  // Prompt toolbar field
33
- // toolbarPromptControlPlaceholder: 'Type a prompt…',
34
- // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
35
- // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
36
- // toolbarPromptControlLabel: 'Prompt input',
37
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
38
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
39
- // toolbarPromptControlSendActionLabel: 'Send',
40
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
41
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
42
-
33
+ toolbarPromptControlPlaceholder: 'Bir istem yazın…',
34
+ toolbarPromptControlWithRecordingPlaceholder: 'Bir istem yazın veya kaydedin…',
35
+ toolbarPromptControlRecordingPlaceholder: 'İstem dinleniyor…',
36
+ toolbarPromptControlLabel: 'İstem girişi',
37
+ toolbarPromptControlRecordButtonDefaultLabel: 'Kaydet',
38
+ toolbarPromptControlRecordButtonActiveLabel: 'Kaydı durdur',
39
+ toolbarPromptControlSendActionLabel: 'Gönder',
40
+ toolbarPromptControlSendActionAriaLabel: 'İstemi gönder',
41
+ toolbarPromptControlErrorMessage: 'İstek işlenirken bir hata oluştu. Lütfen farklı bir istemle tekrar deneyin.',
43
42
  // Export selector toolbar button text
44
43
  toolbarExport: 'Dışa aktar',
45
44
  toolbarExportLabel: 'Dışa aktar',
@@ -51,8 +50,7 @@ const trTRGrid = {
51
50
  columnsManagementNoColumns: 'Kolon yok',
52
51
  columnsManagementShowHideAllText: 'Hepsini Göster/Gizle',
53
52
  columnsManagementReset: 'Sıfırla',
54
- // columnsManagementDeleteIconLabel: 'Clear',
55
-
53
+ columnsManagementDeleteIconLabel: 'Temizle',
56
54
  // Filter panel text
57
55
  filterPanelAddFilter: 'Filtre Ekle',
58
56
  filterPanelRemoveAll: 'Hepsini kaldır',
@@ -66,9 +64,9 @@ const trTRGrid = {
66
64
  filterPanelInputPlaceholder: 'Filtre değeri',
67
65
  // Filter operators text
68
66
  filterOperatorContains: 'içerir',
69
- // filterOperatorDoesNotContain: 'does not contain',
67
+ filterOperatorDoesNotContain: 'içermiyor',
70
68
  filterOperatorEquals: 'eşittir',
71
- // filterOperatorDoesNotEqual: 'does not equal',
69
+ filterOperatorDoesNotEqual: 'eşit değil',
72
70
  filterOperatorStartsWith: 'ile başlar',
73
71
  filterOperatorEndsWith: 'ile biter',
74
72
  filterOperatorIs: 'eşittir',
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.createSelectorV8 = exports.createSelectorMemoizedV8 = exports.createSelectorMemoized = exports.createSelector = void 0;
6
+ exports.createSelectorMemoized = exports.createSelector = void 0;
7
7
  var _reselect = require("reselect");
8
8
  var _warning = require("@mui/x-internals/warning");
9
9
  var _useGridSelector = require("../hooks/utils/useGridSelector");
@@ -14,19 +14,6 @@ const reselectCreateSelector = (0, _reselect.createSelectorCreator)({
14
14
  equalityCheck: Object.is
15
15
  }
16
16
  });
17
-
18
- // TODO v8: Remove this type
19
-
20
- // TODO v8: Rename this type to `OutputSelector`
21
-
22
- // TODO v8: Remove this type
23
-
24
- // TODO v8: Rename this type to `SelectorArgs`
25
-
26
- // TODO v8: Remove this type
27
-
28
- // TODO v8: Rename this type to `CreateSelectorFunction`
29
-
30
17
  const cache = new WeakMap();
31
18
  function checkIsAPIRef(value) {
32
19
  return 'current' in value && 'instanceId' in value.current;
@@ -34,84 +21,12 @@ function checkIsAPIRef(value) {
34
21
  const DEFAULT_INSTANCE_ID = {
35
22
  id: 'default'
36
23
  };
37
-
38
- // TODO v8: Remove this function
39
24
  const createSelector = (a, b, c, d, e, f, ...other) => {
40
25
  if (other.length > 0) {
41
26
  throw new Error('Unsupported number of selectors');
42
27
  }
43
28
  let selector;
44
29
 
45
- // eslint-disable-next-line id-denylist
46
- if (a && b && c && d && e && f) {
47
- selector = (stateOrApiRef, instanceIdParam) => {
48
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
49
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
50
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
51
- const va = a(state, instanceId);
52
- const vb = b(state, instanceId);
53
- const vc = c(state, instanceId);
54
- const vd = d(state, instanceId);
55
- const ve = e(state, instanceId);
56
- return f(va, vb, vc, vd, ve);
57
- };
58
- // eslint-disable-next-line id-denylist
59
- } else if (a && b && c && d && e) {
60
- selector = (stateOrApiRef, instanceIdParam) => {
61
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
62
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
63
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
64
- const va = a(state, instanceId);
65
- const vb = b(state, instanceId);
66
- const vc = c(state, instanceId);
67
- const vd = d(state, instanceId);
68
- return e(va, vb, vc, vd);
69
- };
70
- } else if (a && b && c && d) {
71
- selector = (stateOrApiRef, instanceIdParam) => {
72
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
73
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
74
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
75
- const va = a(state, instanceId);
76
- const vb = b(state, instanceId);
77
- const vc = c(state, instanceId);
78
- return d(va, vb, vc);
79
- };
80
- } else if (a && b && c) {
81
- selector = (stateOrApiRef, instanceIdParam) => {
82
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
83
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
84
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
85
- const va = a(state, instanceId);
86
- const vb = b(state, instanceId);
87
- return c(va, vb);
88
- };
89
- } else if (a && b) {
90
- selector = (stateOrApiRef, instanceIdParam) => {
91
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
92
- const instanceId = instanceIdParam ?? (isAPIRef ? stateOrApiRef.current.instanceId : DEFAULT_INSTANCE_ID);
93
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
94
- const va = a(state, instanceId);
95
- return b(va);
96
- };
97
- } else {
98
- throw new Error('Missing arguments');
99
- }
100
-
101
- // We use this property to detect if the selector was created with createSelector
102
- // or it's only a simple function the receives the state and returns part of it.
103
- selector.acceptsApiRef = true;
104
- return selector;
105
- };
106
-
107
- // TODO v8: Rename this function to `createSelector`
108
- exports.createSelector = createSelector;
109
- const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
110
- if (other.length > 0) {
111
- throw new Error('Unsupported number of selectors');
112
- }
113
- let selector;
114
-
115
30
  // eslint-disable-next-line id-denylist
116
31
  if (a && b && c && d && e && f) {
117
32
  selector = (stateOrApiRef, args, instanceIdParam) => {
@@ -173,51 +88,15 @@ const createSelectorV8 = (a, b, c, d, e, f, ...other) => {
173
88
  selector.acceptsApiRef = true;
174
89
  return selector;
175
90
  };
176
-
177
- // TODO v8: Remove this function
178
- exports.createSelectorV8 = createSelectorV8;
91
+ exports.createSelector = createSelector;
179
92
  const createSelectorMemoized = (...args) => {
180
- const selector = (stateOrApiRef, instanceId) => {
181
- const isAPIRef = checkIsAPIRef(stateOrApiRef);
182
- const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
183
- const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
184
- if (process.env.NODE_ENV !== 'production') {
185
- if (cacheKey.id === 'default') {
186
- (0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
187
- }
188
- }
189
- const cacheArgsInit = cache.get(cacheKey);
190
- const cacheArgs = cacheArgsInit ?? new Map();
191
- const cacheFn = cacheArgs?.get(args);
192
- if (cacheArgs && cacheFn) {
193
- // We pass the cache key because the called selector might have as
194
- // dependency another selector created with this `createSelector`.
195
- return cacheFn(state, cacheKey);
196
- }
197
- const fn = reselectCreateSelector(...args);
198
- if (!cacheArgsInit) {
199
- cache.set(cacheKey, cacheArgs);
200
- }
201
- cacheArgs.set(args, fn);
202
- return fn(state, cacheKey);
203
- };
204
-
205
- // We use this property to detect if the selector was created with createSelector
206
- // or it's only a simple function the receives the state and returns part of it.
207
- selector.acceptsApiRef = true;
208
- return selector;
209
- };
210
-
211
- // TODO v8: Rename this function to `createSelectorMemoized`
212
- exports.createSelectorMemoized = createSelectorMemoized;
213
- const createSelectorMemoizedV8 = (...args) => {
214
93
  const selector = (stateOrApiRef, selectorArgs, instanceId) => {
215
94
  const isAPIRef = checkIsAPIRef(stateOrApiRef);
216
95
  const cacheKey = isAPIRef ? stateOrApiRef.current.instanceId : instanceId ?? DEFAULT_INSTANCE_ID;
217
96
  const state = isAPIRef ? stateOrApiRef.current.state : stateOrApiRef;
218
97
  if (process.env.NODE_ENV !== 'production') {
219
98
  if (cacheKey.id === 'default') {
220
- (0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, apiRef.current.instanceId)`.']);
99
+ (0, _warning.warnOnce)(['MUI X: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, for example `mySelector(apiRef)`, or pass the instance ID explicitly, for example `mySelector(state, args, apiRef.current.instanceId)`.']);
221
100
  }
222
101
  }
223
102
  const cacheArgsInit = cache.get(cacheKey);
@@ -250,4 +129,4 @@ const createSelectorMemoizedV8 = (...args) => {
250
129
  selector.acceptsApiRef = true;
251
130
  return selector;
252
131
  };
253
- exports.createSelectorMemoizedV8 = createSelectorMemoizedV8;
132
+ exports.createSelectorMemoized = createSelectorMemoized;