@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
@@ -6,20 +6,11 @@ import { useOnMount } from "./useOnMount.js";
6
6
  function isOutputSelector(selector) {
7
7
  return selector.acceptsApiRef;
8
8
  }
9
- // TODO v8: Remove this function
10
- function applySelector(apiRef, selector) {
11
- if (isOutputSelector(selector)) {
12
- return selector(apiRef);
13
- }
14
- return selector(apiRef.current.state);
15
- }
16
-
17
- // TODO v8: Rename this function to `applySelector`
18
- function applySelectorV8(apiRef, selector, args, instanceId) {
9
+ function applySelector(apiRef, selector, args, instanceId) {
19
10
  if (isOutputSelector(selector)) {
20
11
  return selector(apiRef, args);
21
12
  }
22
- return selector(apiRef.current.state, instanceId);
13
+ return selector(apiRef.current.state, args, instanceId);
23
14
  }
24
15
  const defaultCompare = Object.is;
25
16
  export const objectShallowCompare = fastObjectShallowCompare;
@@ -44,36 +35,7 @@ const createRefs = () => ({
44
35
  selector: null,
45
36
  args: null
46
37
  });
47
-
48
- // TODO v8: Remove this function
49
- export const useGridSelector = (apiRef, selector, equals = defaultCompare) => {
50
- if (process.env.NODE_ENV !== 'production') {
51
- if (!apiRef.current.state) {
52
- 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.']);
53
- }
54
- }
55
- const refs = useLazyRef(createRefs);
56
- const didInit = refs.current.selector !== null;
57
- const [state, setState] = React.useState(
58
- // We don't use an initialization function to avoid allocations
59
- didInit ? null : applySelector(apiRef, selector));
60
- refs.current.state = state;
61
- refs.current.equals = equals;
62
- refs.current.selector = selector;
63
- useOnMount(() => {
64
- return apiRef.current.store.subscribe(() => {
65
- const newState = applySelector(apiRef, refs.current.selector);
66
- if (!refs.current.equals(refs.current.state, newState)) {
67
- refs.current.state = newState;
68
- setState(newState);
69
- }
70
- });
71
- });
72
- return state;
73
- };
74
-
75
- // TODO v8: Rename this function to `useGridSelector`
76
- export const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = defaultCompare) => {
38
+ export const useGridSelector = (apiRef, selector, args = undefined, equals = defaultCompare) => {
77
39
  if (process.env.NODE_ENV !== 'production') {
78
40
  if (!apiRef.current.state) {
79
41
  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.']);
@@ -83,14 +45,14 @@ export const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = d
83
45
  const didInit = refs.current.selector !== null;
84
46
  const [state, setState] = React.useState(
85
47
  // We don't use an initialization function to avoid allocations
86
- didInit ? null : applySelectorV8(apiRef, selector, args, apiRef.current.instanceId));
48
+ didInit ? null : applySelector(apiRef, selector, args, apiRef.current.instanceId));
87
49
  refs.current.state = state;
88
50
  refs.current.equals = equals;
89
51
  refs.current.selector = selector;
90
52
  const prevArgs = refs.current.args;
91
53
  refs.current.args = args;
92
54
  if (didInit && !argsEqual(prevArgs, args)) {
93
- const newState = applySelectorV8(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
55
+ const newState = applySelector(apiRef, refs.current.selector, refs.current.args, apiRef.current.instanceId);
94
56
  if (!refs.current.equals(refs.current.state, newState)) {
95
57
  refs.current.state = newState;
96
58
  setState(newState);
@@ -98,7 +60,7 @@ export const useGridSelectorV8 = (apiRef, selector, args = undefined, equals = d
98
60
  }
99
61
  useOnMount(() => {
100
62
  return apiRef.current.store.subscribe(() => {
101
- 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);
102
64
  if (!refs.current.equals(refs.current.state, newState)) {
103
65
  refs.current.state = newState;
104
66
  setState(newState);
package/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
@@ -11,7 +11,7 @@ export { getGridFilter } from '../components/panel/filterPanel/GridFilterPanel';
11
11
  export { getValueOptions } from '../components/panel/filterPanel/filterPanelUtils';
12
12
  export { useGridRegisterPipeProcessor } from '../hooks/core/pipeProcessing';
13
13
  export type { GridPipeProcessor } from '../hooks/core/pipeProcessing';
14
- export { useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY, } from '../hooks/core/strategyProcessing';
14
+ export { GridStrategyGroup, useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY, } from '../hooks/core/strategyProcessing';
15
15
  export type { GridStrategyProcessor } from '../hooks/core/strategyProcessing';
16
16
  export { useGridInitialization } from '../hooks/core/useGridInitialization';
17
17
  export { unwrapPrivateAPI } from '../hooks/core/useGridApiInitialization';
@@ -58,6 +58,7 @@ export { useGridRowSelection, rowSelectionStateInitializer, } from '../hooks/fea
58
58
  export { useGridRowSelectionPreProcessors } from '../hooks/features/rowSelection/useGridRowSelectionPreProcessors';
59
59
  export { useGridSorting, sortingStateInitializer } from '../hooks/features/sorting/useGridSorting';
60
60
  export type { GridSortingModelApplier } from '../hooks/features/sorting/gridSortingState';
61
+ export { gridSortedRowIndexLookupSelector } from '../hooks/features/sorting/gridSortingSelector';
61
62
  export { useGridScroll } from '../hooks/features/scroll/useGridScroll';
62
63
  export { useGridEvents } from '../hooks/features/events/useGridEvents';
63
64
  export { dimensionsStateInitializer, useGridDimensions, } from '../hooks/features/dimensions/useGridDimensions';
@@ -76,8 +77,7 @@ export type * from '../models/props/DataGridProps';
76
77
  export type * from '../models/gridDataSource';
77
78
  export { getColumnsToExport, defaultGetRowsToExport } from '../hooks/features/export/utils';
78
79
  export * from '../utils/createControllablePromise';
79
- export { createSelector, createSelectorV8, createSelectorMemoized, createSelectorMemoizedV8, } from '../utils/createSelector';
80
- export { useGridSelectorV8 } from '../hooks/utils/useGridSelector';
80
+ export { createSelector, createSelectorMemoized } from '../utils/createSelector';
81
81
  export { gridRowGroupsToFetchSelector } from '../hooks/features/rows/gridRowsSelector';
82
82
  export { findParentElementFromClassName, getActiveElement, isEventTargetInPortal, } from '../utils/domUtils';
83
83
  export { isNavigationKey, isPasteShortcut, isCopyShortcut } from '../utils/keyboardUtils';
@@ -7,7 +7,7 @@ export { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from "../constants/defaultGridSlot
7
7
  export { getGridFilter } from "../components/panel/filterPanel/GridFilterPanel.js";
8
8
  export { getValueOptions } from "../components/panel/filterPanel/filterPanelUtils.js";
9
9
  export { useGridRegisterPipeProcessor } from "../hooks/core/pipeProcessing/index.js";
10
- export { useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY } from "../hooks/core/strategyProcessing/index.js";
10
+ export { GridStrategyGroup, useGridRegisterStrategyProcessor, GRID_DEFAULT_STRATEGY } from "../hooks/core/strategyProcessing/index.js";
11
11
  export { useGridInitialization } from "../hooks/core/useGridInitialization.js";
12
12
  export { unwrapPrivateAPI } from "../hooks/core/useGridApiInitialization.js";
13
13
  export { useGridClipboard } from "../hooks/features/clipboard/useGridClipboard.js";
@@ -47,6 +47,7 @@ export { calculatePinnedRowsHeight } from "../hooks/features/rows/gridRowsUtils.
47
47
  export { useGridRowSelection, rowSelectionStateInitializer } from "../hooks/features/rowSelection/useGridRowSelection.js";
48
48
  export { useGridRowSelectionPreProcessors } from "../hooks/features/rowSelection/useGridRowSelectionPreProcessors.js";
49
49
  export { useGridSorting, sortingStateInitializer } from "../hooks/features/sorting/useGridSorting.js";
50
+ export { gridSortedRowIndexLookupSelector } from "../hooks/features/sorting/gridSortingSelector.js";
50
51
  export { useGridScroll } from "../hooks/features/scroll/useGridScroll.js";
51
52
  export { useGridEvents } from "../hooks/features/events/useGridEvents.js";
52
53
  export { dimensionsStateInitializer, useGridDimensions } from "../hooks/features/dimensions/useGridDimensions.js";
@@ -61,8 +62,7 @@ export { useGridVisibleRows, getVisibleRows } from "../hooks/utils/useGridVisibl
61
62
  export { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js";
62
63
  export { getColumnsToExport, defaultGetRowsToExport } from "../hooks/features/export/utils.js";
63
64
  export * from "../utils/createControllablePromise.js";
64
- export { createSelector, createSelectorV8, createSelectorMemoized, createSelectorMemoizedV8 } from "../utils/createSelector.js";
65
- export { useGridSelectorV8 } from "../hooks/utils/useGridSelector.js";
65
+ export { createSelector, createSelectorMemoized } from "../utils/createSelector.js";
66
66
  export { gridRowGroupsToFetchSelector } from "../hooks/features/rows/gridRowsSelector.js";
67
67
  export { findParentElementFromClassName, getActiveElement, isEventTargetInPortal } from "../utils/domUtils.js";
68
68
  export { isNavigationKey, isPasteShortcut, isCopyShortcut } from "../utils/keyboardUtils.js";
package/locales/heIL.js CHANGED
@@ -24,16 +24,15 @@ const heILGrid = {
24
24
  toolbarQuickFilterLabel: 'חיפוש',
25
25
  toolbarQuickFilterDeleteIconLabel: 'ניקוי',
26
26
  // Prompt toolbar field
27
- // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
- // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
- // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
- // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
- // toolbarPromptControlSendActionLabel: 'Send',
34
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
-
27
+ toolbarPromptControlPlaceholder: 'הקלד ערך…',
28
+ toolbarPromptControlWithRecordingPlaceholder: 'הקלד או הקלט ערך…',
29
+ toolbarPromptControlRecordingPlaceholder: 'ממתין להנחיה…',
30
+ toolbarPromptControlLabel: 'הזן ערך',
31
+ toolbarPromptControlRecordButtonDefaultLabel: 'הקלטה',
32
+ toolbarPromptControlRecordButtonActiveLabel: 'הפסק הקלטה',
33
+ toolbarPromptControlSendActionLabel: 'שלח',
34
+ toolbarPromptControlSendActionAriaLabel: 'שלח ערך',
35
+ toolbarPromptControlErrorMessage: 'התרחשה שגיאה בזמן העיבוד של הבקשה. נסה שוב עם ערך אחר בבקשה.',
37
36
  // Export selector toolbar button text
38
37
  toolbarExport: 'ייצוא',
39
38
  toolbarExportLabel: 'ייצוא',
@@ -45,8 +44,7 @@ const heILGrid = {
45
44
  columnsManagementNoColumns: 'אין עמודות',
46
45
  columnsManagementShowHideAllText: 'הצג/הסתר הכל',
47
46
  columnsManagementReset: 'אתחול',
48
- // columnsManagementDeleteIconLabel: 'Clear',
49
-
47
+ columnsManagementDeleteIconLabel: 'נקה',
50
48
  // Filter panel text
51
49
  filterPanelAddFilter: 'הוסף מסנן',
52
50
  filterPanelRemoveAll: 'מחק הכל',
@@ -60,9 +58,9 @@ const heILGrid = {
60
58
  filterPanelInputPlaceholder: 'ערך מסנן',
61
59
  // Filter operators text
62
60
  filterOperatorContains: 'מכיל',
63
- // filterOperatorDoesNotContain: 'does not contain',
61
+ filterOperatorDoesNotContain: 'לא מכיל',
64
62
  filterOperatorEquals: 'שווה',
65
- // filterOperatorDoesNotEqual: 'does not equal',
63
+ filterOperatorDoesNotEqual: 'לא שווה',
66
64
  filterOperatorStartsWith: 'מתחיל ב-',
67
65
  filterOperatorEndsWith: 'נגמר ב-',
68
66
  filterOperatorIs: 'הינו',
@@ -82,9 +80,9 @@ const heILGrid = {
82
80
  'filterOperator<=': '<=',
83
81
  // Header filter operators text
84
82
  headerFilterOperatorContains: 'מכיל',
85
- // headerFilterOperatorDoesNotContain: 'Does not contain',
83
+ headerFilterOperatorDoesNotContain: 'לא מכיל',
86
84
  headerFilterOperatorEquals: 'שווה',
87
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
85
+ headerFilterOperatorDoesNotEqual: 'לא שווה',
88
86
  headerFilterOperatorStartsWith: 'מתחיל ב-',
89
87
  headerFilterOperatorEndsWith: 'נגמר ב-',
90
88
  headerFilterOperatorIs: 'הינו',
package/locales/roRO.js CHANGED
@@ -24,16 +24,15 @@ const roROGrid = {
24
24
  toolbarQuickFilterLabel: 'Căutare',
25
25
  toolbarQuickFilterDeleteIconLabel: 'Ștergere',
26
26
  // Prompt toolbar field
27
- // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
- // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
- // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
- // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
- // toolbarPromptControlSendActionLabel: 'Send',
34
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
-
27
+ toolbarPromptControlPlaceholder: 'Scrie un prompt…',
28
+ toolbarPromptControlWithRecordingPlaceholder: 'Scrie sau înregistrează un prompt…',
29
+ toolbarPromptControlRecordingPlaceholder: 'Ascultare prompt…',
30
+ toolbarPromptControlLabel: 'Introducere prompt',
31
+ toolbarPromptControlRecordButtonDefaultLabel: 'Înregistrează',
32
+ toolbarPromptControlRecordButtonActiveLabel: 'Oprește înregistrare',
33
+ toolbarPromptControlSendActionLabel: 'Trimite',
34
+ toolbarPromptControlSendActionAriaLabel: 'Trimite prompt',
35
+ toolbarPromptControlErrorMessage: 'A apărut o eroare la procesare. Încercați din nou cu un alt prompt.',
37
36
  // Export selector toolbar button text
38
37
  toolbarExport: 'Export',
39
38
  toolbarExportLabel: 'Export',
@@ -41,12 +40,11 @@ const roROGrid = {
41
40
  toolbarExportPrint: 'Printare',
42
41
  toolbarExportExcel: 'Download în format Excel',
43
42
  // Columns management text
44
- // columnsManagementSearchTitle: 'Search',
45
- // columnsManagementNoColumns: 'No columns',
46
- // columnsManagementShowHideAllText: 'Show/Hide All',
47
- // columnsManagementReset: 'Reset',
48
- // columnsManagementDeleteIconLabel: 'Clear',
49
-
43
+ columnsManagementSearchTitle: 'Caută',
44
+ columnsManagementNoColumns: 'Nicio coloană',
45
+ columnsManagementShowHideAllText: 'Arată/Ascunde tot',
46
+ columnsManagementReset: 'Resetează',
47
+ columnsManagementDeleteIconLabel: 'Șterge',
50
48
  // Filter panel text
51
49
  filterPanelAddFilter: 'Adăugare filtru',
52
50
  filterPanelRemoveAll: 'Șterge tot',
@@ -60,9 +58,9 @@ const roROGrid = {
60
58
  filterPanelInputPlaceholder: 'Filtrare valoare',
61
59
  // Filter operators text
62
60
  filterOperatorContains: 'conține',
63
- // filterOperatorDoesNotContain: 'does not contain',
61
+ filterOperatorDoesNotContain: 'nu conține',
64
62
  filterOperatorEquals: 'este egal cu',
65
- // filterOperatorDoesNotEqual: 'does not equal',
63
+ filterOperatorDoesNotEqual: 'nu este egal cu',
66
64
  filterOperatorStartsWith: 'începe cu',
67
65
  filterOperatorEndsWith: 'se termină cu',
68
66
  filterOperatorIs: 'este',
@@ -82,9 +80,9 @@ const roROGrid = {
82
80
  'filterOperator<=': '<=',
83
81
  // Header filter operators text
84
82
  headerFilterOperatorContains: 'Conține',
85
- // headerFilterOperatorDoesNotContain: 'Does not contain',
83
+ headerFilterOperatorDoesNotContain: 'Nu conține',
86
84
  headerFilterOperatorEquals: 'Egal cu',
87
- // headerFilterOperatorDoesNotEqual: 'Does not equal',
85
+ headerFilterOperatorDoesNotEqual: 'Nu este egal cu',
88
86
  headerFilterOperatorStartsWith: 'Începe cu',
89
87
  headerFilterOperatorEndsWith: 'Se termină cu',
90
88
  headerFilterOperatorIs: 'Este',
package/locales/trTR.js CHANGED
@@ -24,16 +24,15 @@ const trTRGrid = {
24
24
  toolbarQuickFilterLabel: 'Ara',
25
25
  toolbarQuickFilterDeleteIconLabel: 'Temizle',
26
26
  // Prompt toolbar field
27
- // toolbarPromptControlPlaceholder: 'Type a prompt…',
28
- // toolbarPromptControlWithRecordingPlaceholder: 'Type or record a prompt…',
29
- // toolbarPromptControlRecordingPlaceholder: 'Listening for prompt…',
30
- // toolbarPromptControlLabel: 'Prompt input',
31
- // toolbarPromptControlRecordButtonDefaultLabel: 'Record',
32
- // toolbarPromptControlRecordButtonActiveLabel: 'Stop recording',
33
- // toolbarPromptControlSendActionLabel: 'Send',
34
- // toolbarPromptControlSendActionAriaLabel: 'Send prompt',
35
- // toolbarPromptControlErrorMessage: 'An error occurred while processing the request. Please try again with a different prompt.',
36
-
27
+ toolbarPromptControlPlaceholder: 'Bir istem yazın…',
28
+ toolbarPromptControlWithRecordingPlaceholder: 'Bir istem yazın veya kaydedin…',
29
+ toolbarPromptControlRecordingPlaceholder: 'İstem dinleniyor…',
30
+ toolbarPromptControlLabel: 'İstem girişi',
31
+ toolbarPromptControlRecordButtonDefaultLabel: 'Kaydet',
32
+ toolbarPromptControlRecordButtonActiveLabel: 'Kaydı durdur',
33
+ toolbarPromptControlSendActionLabel: 'Gönder',
34
+ toolbarPromptControlSendActionAriaLabel: 'İstemi gönder',
35
+ toolbarPromptControlErrorMessage: 'İstek işlenirken bir hata oluştu. Lütfen farklı bir istemle tekrar deneyin.',
37
36
  // Export selector toolbar button text
38
37
  toolbarExport: 'Dışa aktar',
39
38
  toolbarExportLabel: 'Dışa aktar',
@@ -45,8 +44,7 @@ const trTRGrid = {
45
44
  columnsManagementNoColumns: 'Kolon yok',
46
45
  columnsManagementShowHideAllText: 'Hepsini Göster/Gizle',
47
46
  columnsManagementReset: 'Sıfırla',
48
- // columnsManagementDeleteIconLabel: 'Clear',
49
-
47
+ columnsManagementDeleteIconLabel: 'Temizle',
50
48
  // Filter panel text
51
49
  filterPanelAddFilter: 'Filtre Ekle',
52
50
  filterPanelRemoveAll: 'Hepsini kaldır',
@@ -60,9 +58,9 @@ const trTRGrid = {
60
58
  filterPanelInputPlaceholder: 'Filtre değeri',
61
59
  // Filter operators text
62
60
  filterOperatorContains: 'içerir',
63
- // filterOperatorDoesNotContain: 'does not contain',
61
+ filterOperatorDoesNotContain: 'içermiyor',
64
62
  filterOperatorEquals: 'eşittir',
65
- // filterOperatorDoesNotEqual: 'does not equal',
63
+ filterOperatorDoesNotEqual: 'eşit değil',
66
64
  filterOperatorStartsWith: 'ile başlar',
67
65
  filterOperatorEndsWith: 'ile biter',
68
66
  filterOperatorIs: 'eşittir',
@@ -33,5 +33,5 @@ export interface GridStatePrivateApi<State extends GridStateCommunity> {
33
33
  * Updates a control state that binds the model, the onChange prop, and the grid state together.
34
34
  * @param {GridControlStateItem>} controlState The [[GridControlStateItem]] to be registered.
35
35
  */
36
- registerControlState: <E extends keyof GridControlledStateEventLookup>(controlState: GridControlStateItem<State, E>) => void;
36
+ registerControlState: <E extends keyof GridControlledStateEventLookup, Args>(controlState: GridControlStateItem<State, Args, E>) => void;
37
37
  }
@@ -2,10 +2,10 @@ import { GridCallbackDetails } from './api/gridCallbackDetails';
2
2
  import type { GridEventLookup, GridControlledStateEventLookup } from './events';
3
3
  import type { OutputSelector } from '../utils/createSelector';
4
4
  import { GridStateCommunity } from './gridStateCommunity';
5
- export interface GridControlStateItem<State extends GridStateCommunity, E extends keyof GridControlledStateEventLookup> {
5
+ export interface GridControlStateItem<State extends GridStateCommunity, Args, E extends keyof GridControlledStateEventLookup> {
6
6
  stateId: string;
7
7
  propModel?: GridEventLookup[E]['params'];
8
- stateSelector: OutputSelector<State, GridControlledStateEventLookup[E]['params']> | ((state: State) => GridControlledStateEventLookup[E]['params']);
8
+ stateSelector: OutputSelector<State, Args, GridControlledStateEventLookup[E]['params']> | ((state: State) => GridControlledStateEventLookup[E]['params']);
9
9
  propOnChange?: (model: GridControlledStateEventLookup[E]['params'], details: GridCallbackDetails) => void;
10
10
  changeEvent: E;
11
11
  }
@@ -399,6 +399,7 @@ export interface GridControlledStateEventLookup {
399
399
  export interface GridControlledStateReasonLookup {
400
400
  filter: 'upsertFilterItem' | 'upsertFilterItems' | 'deleteFilterItem' | 'changeLogicOperator' | 'restoreState' | 'removeAllFilterItems';
401
401
  pagination: 'setPaginationModel' | 'stateRestorePreProcessing';
402
+ rows: 'addSkeletonRows';
402
403
  }
403
404
  export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEventLookup, GridHeaderFilterEventLookup, GridColumnGroupHeaderEventLookup, GridCellEventLookup, GridControlledStateEventLookup {
404
405
  /**
@@ -5,7 +5,7 @@ export interface GridGetRowsParams {
5
5
  /**
6
6
  * Alternate to `start` and `end`, maps to `GridPaginationModel` interface.
7
7
  */
8
- paginationModel: GridPaginationModel;
8
+ paginationModel?: GridPaginationModel;
9
9
  /**
10
10
  * First row index to fetch (number) or cursor information (number | string).
11
11
  */
@@ -338,14 +338,6 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
338
338
  * @default '\t'
339
339
  */
340
340
  clipboardCopyCellDelimiter: string;
341
- /**
342
- * The milliseconds delay to wait after measuring the row height before recalculating row positions.
343
- * Setting it to a lower value could be useful when using dynamic row height,
344
- * but might reduce performance when displaying a large number of rows.
345
- * @default 166
346
- * @deprecated
347
- */
348
- rowPositionsDebounceMs: number;
349
341
  /**
350
342
  * If `true`, columns are autosized after the datagrid is mounted.
351
343
  * @default false
@@ -360,7 +352,7 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
360
352
  * If `true`, the Data Grid will auto span the cells over the rows having the same value.
361
353
  * @default false
362
354
  */
363
- unstable_rowSpanning: boolean;
355
+ rowSpanning: boolean;
364
356
  /**
365
357
  * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
366
358
  * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
@@ -682,14 +682,6 @@ DataGridRaw.propTypes = {
682
682
  * Controls the modes of the rows.
683
683
  */
684
684
  rowModesModel: PropTypes.object,
685
- /**
686
- * The milliseconds delay to wait after measuring the row height before recalculating row positions.
687
- * Setting it to a lower value could be useful when using dynamic row height,
688
- * but might reduce performance when displaying a large number of rows.
689
- * @default 166
690
- * @deprecated
691
- */
692
- rowPositionsDebounceMs: PropTypes.number,
693
685
  /**
694
686
  * Set of rows of type [[GridRowsProp]].
695
687
  * @default []
@@ -709,6 +701,11 @@ DataGridRaw.propTypes = {
709
701
  * @default "margin"
710
702
  */
711
703
  rowSpacingType: PropTypes.oneOf(['border', 'margin']),
704
+ /**
705
+ * If `true`, the Data Grid will auto span the cells over the rows having the same value.
706
+ * @default false
707
+ */
708
+ rowSpanning: PropTypes.bool,
712
709
  /**
713
710
  * Override the height/width of the Data Grid inner scrollbar.
714
711
  */
@@ -754,11 +751,6 @@ DataGridRaw.propTypes = {
754
751
  * The system prop that allows defining system overrides as well as additional CSS styles.
755
752
  */
756
753
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
757
- /**
758
- * If `true`, the Data Grid will auto span the cells over the rows having the same value.
759
- * @default false
760
- */
761
- unstable_rowSpanning: PropTypes.bool,
762
754
  /**
763
755
  * If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
764
756
  * By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
@@ -144,7 +144,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
144
144
  disableColumnReorder
145
145
  } = rootProps;
146
146
  const rowReordering = rootProps.rowReordering;
147
- const heightEntry = useGridSelector(apiRef, () => _extends({}, apiRef.current.getRowHeightEntry(rowId)), objectShallowCompare);
147
+ const heightEntry = useGridSelector(apiRef, () => _extends({}, apiRef.current.getRowHeightEntry(rowId)), undefined, objectShallowCompare);
148
148
  const style = React.useMemo(() => {
149
149
  if (isNotVisible) {
150
150
  return {
@@ -89,6 +89,13 @@ function GridActionsCell(props) {
89
89
  const hideMenu = () => {
90
90
  setOpen(false);
91
91
  };
92
+ const toggleMenu = () => {
93
+ if (open) {
94
+ hideMenu();
95
+ } else {
96
+ showMenu();
97
+ }
98
+ };
92
99
  const handleTouchRippleRef = index => instance => {
93
100
  touchRippleRefs.current[index] = instance;
94
101
  };
@@ -159,7 +166,7 @@ function GridActionsCell(props) {
159
166
  "aria-controls": open ? menuId : undefined,
160
167
  role: "menuitem",
161
168
  size: "small",
162
- onClick: showMenu,
169
+ onClick: toggleMenu,
163
170
  touchRippleRef: handleTouchRippleRef(buttonId),
164
171
  tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1
165
172
  }, rootProps.slotProps?.baseIconButton, {
@@ -120,7 +120,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
120
120
  const result = apiRef.current.getCellParams(rowId, field);
121
121
  result.api = apiRef.current;
122
122
  return result;
123
- }, objectShallowCompare);
123
+ }, undefined, objectShallowCompare);
124
124
  const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
125
125
  id: rowId,
126
126
  field
@@ -56,10 +56,13 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
56
56
  // Convert to an object to make O(1) checking if a row exists or not
57
57
  // TODO create selector that returns visibleRowIds/paginatedVisibleRowIds as an object
58
58
  return rowIds.reduce((acc, id) => {
59
+ if (!apiRef.current.isRowSelectable(id)) {
60
+ return acc;
61
+ }
59
62
  acc[id] = true;
60
63
  return acc;
61
64
  }, {});
62
- }, [rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);
65
+ }, [apiRef, rootProps.pagination, rootProps.checkboxSelectionVisibleOnly, paginatedVisibleRowIds, visibleRowIds]);
63
66
 
64
67
  // Amount of rows selected and that are visible in the current page
65
68
  const currentSelectionSize = React.useMemo(() => filteredSelection.filter(id => selectionCandidates[id]).length, [filteredSelection, selectionCandidates]);
@@ -2,13 +2,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import { GridPanelWrapper } from "./GridPanelWrapper.js";
5
- import { GridColumnsManagement } from "../columnsManagement/index.js";
6
5
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
8
7
  function GridColumnsPanel(props) {
9
8
  const rootProps = useGridRootProps();
10
9
  return /*#__PURE__*/_jsx(GridPanelWrapper, _extends({}, props, {
11
- children: /*#__PURE__*/_jsx(GridColumnsManagement, _extends({}, rootProps.slotProps?.columnsManagement))
10
+ children: /*#__PURE__*/_jsx(rootProps.slots.columnsManagement, _extends({}, rootProps.slotProps?.columnsManagement))
12
11
  }));
13
12
  }
14
13
  process.env.NODE_ENV !== "production" ? GridColumnsPanel.propTypes = {
@@ -22,13 +22,17 @@ const GridPanelContentRoot = styled('div', {
22
22
  name: 'MuiDataGrid',
23
23
  slot: 'PanelContent',
24
24
  overridesResolver: (props, styles) => styles.panelContent
25
- })({
25
+ })(({
26
+ theme
27
+ }) => ({
26
28
  display: 'flex',
27
29
  flexDirection: 'column',
28
30
  overflow: 'auto',
29
31
  flex: '1 1',
30
- maxHeight: 400
31
- });
32
+ maxHeight: 400,
33
+ padding: theme.spacing(2.5, 1.5, 2, 1),
34
+ gap: theme.spacing(2.5)
35
+ }));
32
36
  function GridPanelContent(props) {
33
37
  const {
34
38
  className
@@ -4,7 +4,7 @@ const _excluded = ["className"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
- import { styled } from '@mui/system';
7
+ import { styled } from '@mui/material/styles';
8
8
  import composeClasses from '@mui/utils/composeClasses';
9
9
  import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
10
10
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
@@ -25,9 +25,10 @@ const GridPanelFooterRoot = styled('div', {
25
25
  })(({
26
26
  theme
27
27
  }) => ({
28
- padding: theme.spacing(0.5),
28
+ padding: theme.spacing(1),
29
29
  display: 'flex',
30
- justifyContent: 'space-between'
30
+ justifyContent: 'space-between',
31
+ borderTop: `1px solid ${theme.palette.divider}`
31
32
  }));
32
33
  function GridPanelFooter(props) {
33
34
  const {