@mui/x-data-grid 8.14.0 → 8.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,101 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.14.1
9
+
10
+ _Oct 16, 2025_
11
+
12
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🚀 Charts have optimized data structures for closest point calculations — initial render times reduced by ~25% for 1,000+ data points, with greater gains at larger scales (#19790) @bernardobelchior
15
+ - 🐞 Bugfixes
16
+ - 📚 Documentation improvements
17
+
18
+ Special thanks go out to the community members for their valuable contributions:
19
+ @djpremier, @jacknot, @justdoit1897, @mellis481, @sai6855
20
+
21
+ The following are all team members who have contributed to this release:
22
+ @arminmeh, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @noraleonte, @siriwatknp
23
+
24
+ ### Data Grid
25
+
26
+ #### `@mui/x-data-grid@8.14.1`
27
+
28
+ - [DataGrid] Fix cell not rerendering on `isCellEditable` prop change (#19898) @cherniavskii
29
+ - [DataGrid] Fix virtualizer memory leaks (#19886) @cherniavskii
30
+ - [DataGrid] Fix tree data unable to deselect row for exclude model (#19846) @siriwatknp
31
+ - [l10n] Improve Italian (it-IT) locale (#19322) @jacknot and (#19940) @justdoit1897
32
+
33
+ #### `@mui/x-data-grid-pro@8.14.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
34
+
35
+ Same changes as in `@mui/x-data-grid@8.14.1`, plus:
36
+
37
+ - [DataGridPro] Clear cache before new request to the nested request queue after a row has been edited (#19873) @arminmeh
38
+
39
+ #### `@mui/x-data-grid-premium@8.14.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
40
+
41
+ Same changes as in `@mui/x-data-grid-pro@8.14.1`.
42
+
43
+ ### Date and Time Pickers
44
+
45
+ #### `@mui/x-date-pickers@8.14.1`
46
+
47
+ Internal changes.
48
+
49
+ #### `@mui/x-date-pickers-pro@8.14.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
50
+
51
+ Same changes as in `@mui/x-date-pickers@8.14.1`.
52
+
53
+ ### Charts
54
+
55
+ #### `@mui/x-charts@8.14.1`
56
+
57
+ - [charts] Fix `minBarSize` when y-axis is reversed (#19932) @bernardobelchior
58
+ - [charts] Fix bar chart border radius when axis is reversed (#19895) @bernardobelchior
59
+ - [charts] Fix scatter chart `datasetKeys.id` not being optional (#19897) @bernardobelchior
60
+ - [charts] Use more performant data structure for closest point (#19790) @bernardobelchior
61
+ - [charts] Fix `GaugeValueArc` having wrong class (#19965) @bernardobelchior
62
+ - [charts] Fix `undefined` path when highlight empty line chart axis (#19969) @bernardobelchior
63
+
64
+ #### `@mui/x-charts-pro@8.14.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
65
+
66
+ Same changes as in `@mui/x-charts@8.14.1`, plus:
67
+
68
+ - [charts-pro] Add `highlighting` to Sankey chart (#19662) @JCQuintas
69
+
70
+ #### `@mui/x-charts-premium@8.14.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
71
+
72
+ Same changes as in `@mui/x-charts-pro@8.14.1`.
73
+
74
+ ### Tree View
75
+
76
+ #### `@mui/x-tree-view@8.14.1`
77
+
78
+ - [tree view] Do not forward the `ownerState` to the icon (#19772) @flaviendelangle
79
+
80
+ #### `@mui/x-tree-view-pro@8.14.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
81
+
82
+ Same changes as in `@mui/x-tree-view@8.14.1`.
83
+
84
+ ### Codemod
85
+
86
+ #### `@mui/x-codemod@8.14.0`
87
+
88
+ Internal changes.
89
+
90
+ ### Docs
91
+
92
+ - [docs] Add `'bumpX'` and `'bumpY'` curve types to the interpolation demo (#19676) @djpremier
93
+ - [docs] Add scatter chart with linear regression demo (#19900) @bernardobelchior
94
+ - [docs] Correctly describe Data Grid's row selection behavior (#19968) @arminmeh
95
+ - [docs] Fix `isExpanded` type in tree view docs (#19092) @mellis481
96
+
97
+ ### Core
98
+
99
+ - [code-infra] Disable Netlify cache plugin (#19950) @Janpot
100
+ - [code-infra] Lint json through eslint (#19890) @Janpot
101
+ - [docs-infra] Use published netlify cache plugin package (#19929) @brijeshb42
102
+
8
103
  ## 8.14.0
9
104
 
10
105
  _Oct 9, 2025_
@@ -122,6 +122,7 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
122
122
  formattedValue: forcedFormattedValue
123
123
  });
124
124
  cellParams.api = apiRef.current;
125
+ cellParams.isEditable = (0, _useGridSelector.useGridSelector)(apiRef, () => apiRef.current.isCellEditable(cellParams));
125
126
  const isSelected = (0, _useGridSelector.useGridSelector)(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
126
127
  id: rowId,
127
128
  field
@@ -115,6 +115,7 @@ const GridCell = forwardRef(function GridCell(props, ref) {
115
115
  formattedValue: forcedFormattedValue
116
116
  });
117
117
  cellParams.api = apiRef.current;
118
+ cellParams.isEditable = useGridSelector(apiRef, () => apiRef.current.isCellEditable(cellParams));
118
119
  const isSelected = useGridSelector(apiRef, () => apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
119
120
  id: rowId,
120
121
  field
@@ -1,8 +1,6 @@
1
1
  import type { RefObject } from '@mui/x-internals/types';
2
- import type { DataGridProcessedProps } from "../../models/props/DataGridProps.js";
3
2
  import type { GridPrivateApiCommon } from "../../models/api/gridApiCommon.js";
3
+ import type { GridStateProps } from "../../models/gridStateCommunity.js";
4
4
  import type { GridStateInitializer } from "../utils/useGridInitializeState.js";
5
- type Props = Pick<DataGridProcessedProps, 'getRowId' | 'listView'>;
6
- export declare const propsStateInitializer: GridStateInitializer<Props>;
7
- export declare const useGridProps: <PrivateApi extends GridPrivateApiCommon>(apiRef: RefObject<PrivateApi>, props: Props) => void;
8
- export {};
5
+ export declare const propsStateInitializer: GridStateInitializer<GridStateProps>;
6
+ export declare const useGridProps: <PrivateApi extends GridPrivateApiCommon>(apiRef: RefObject<PrivateApi>, props: GridStateProps) => void;
@@ -6,7 +6,8 @@ export const propsStateInitializer = (state, props) => {
6
6
  return _extends({}, state, {
7
7
  props: {
8
8
  listView: props.listView,
9
- getRowId: props.getRowId
9
+ getRowId: props.getRowId,
10
+ isCellEditable: props.isCellEditable
10
11
  }
11
12
  });
12
13
  };
@@ -15,8 +16,9 @@ export const useGridProps = (apiRef, props) => {
15
16
  apiRef.current.setState(state => _extends({}, state, {
16
17
  props: {
17
18
  listView: props.listView,
18
- getRowId: props.getRowId
19
+ getRowId: props.getRowId,
20
+ isCellEditable: props.isCellEditable
19
21
  }
20
22
  }));
21
- }, [apiRef, props.listView, props.getRowId]);
23
+ }, [apiRef, props.listView, props.getRowId, props.isCellEditable]);
22
24
  };
@@ -58,7 +58,7 @@ export function useGridVirtualizer(apiRef, rootProps) {
58
58
  const pinnedRows = useGridSelector(apiRef, gridPinnedRowsSelector);
59
59
  const pinnedColumns = gridVisiblePinnedColumnDefinitionsSelector(apiRef);
60
60
  const rowSelectionManager = useGridSelector(apiRef, gridRowSelectionManagerSelector);
61
- const isRowSelected = id => rowSelectionManager.has(id) && apiRef.current.isRowSelectable(id);
61
+ const isRowSelected = React.useCallback(id => rowSelectionManager.has(id) && apiRef.current.isRowSelectable(id), [rowSelectionManager, apiRef]);
62
62
  const currentPage = useGridVisibleRows(apiRef);
63
63
  const hasColSpan = useGridSelector(apiRef, gridHasColSpanSelector);
64
64
  const verticalScrollbarWidth = useGridSelector(apiRef, gridVerticalScrollbarWidthSelector);
@@ -106,6 +106,8 @@ export function useGridVirtualizer(apiRef, rootProps) {
106
106
  // </ROWS_META>
107
107
 
108
108
  const focusedVirtualCell = useGridSelector(apiRef, gridFocusedVirtualCellSelector);
109
+ const RowSlot = rootProps.slots.row;
110
+ const rowSlotProps = rootProps.slotProps?.row;
109
111
  const virtualizer = useVirtualizer({
110
112
  refs: {
111
113
  container: apiRef.current.mainElementRef,
@@ -121,14 +123,14 @@ export function useGridVirtualizer(apiRef, rootProps) {
121
123
  },
122
124
  colspan: {
123
125
  enabled: hasColSpan,
124
- getColspan: (rowId, column) => {
126
+ getColspan: React.useCallback((rowId, column) => {
125
127
  if (typeof column.colSpan === 'function') {
126
128
  const row = apiRef.current.getRow(rowId);
127
129
  const value = apiRef.current.getRowValue(row, column);
128
130
  return column.colSpan(value, row, column, apiRef) ?? 0;
129
131
  }
130
132
  return column.colSpan ?? 1;
131
- }
133
+ }, [apiRef])
132
134
  },
133
135
  initialState: {
134
136
  scroll: rootProps.initialState?.scroll,
@@ -181,15 +183,15 @@ export function useGridVirtualizer(apiRef, rootProps) {
181
183
  onRenderContextChange: useEventCallback(nextRenderContext => {
182
184
  apiRef.current.publishEvent('renderedRowsIntervalChange', nextRenderContext);
183
185
  }),
184
- onScrollChange: (scrollPosition, nextRenderContext) => {
186
+ onScrollChange: React.useCallback((scrollPosition, nextRenderContext) => {
185
187
  apiRef.current.publishEvent('scrollPositionChange', {
186
188
  top: scrollPosition.top,
187
189
  left: scrollPosition.left,
188
190
  renderContext: nextRenderContext
189
191
  });
190
- },
192
+ }, [apiRef]),
191
193
  scrollReset,
192
- renderRow: params => /*#__PURE__*/_jsx(rootProps.slots.row, _extends({
194
+ renderRow: React.useCallback(params => /*#__PURE__*/_jsx(RowSlot, _extends({
193
195
  row: params.model,
194
196
  rowId: params.id,
195
197
  index: params.rowIndex,
@@ -208,10 +210,10 @@ export function useGridVirtualizer(apiRef, rootProps) {
208
210
  showBottomBorder: params.showBottomBorder,
209
211
  scrollbarWidth: verticalScrollbarWidth,
210
212
  gridHasFiller: hasFiller
211
- }, rootProps.slotProps?.row), params.id),
212
- renderInfiniteLoadingTrigger: id => apiRef.current.getInfiniteLoadingTriggerElement?.({
213
+ }, rowSlotProps), params.id), [columnsTotalWidth, hasFiller, isRowSelected, pinnedColumns, RowSlot, rowSlotProps, verticalScrollbarWidth, visibleColumns]),
214
+ renderInfiniteLoadingTrigger: React.useCallback(id => apiRef.current.getInfiniteLoadingTriggerElement?.({
213
215
  lastRowId: id
214
- })
216
+ }), [apiRef])
215
217
  });
216
218
 
217
219
  // HACK: Keep the grid's store in sync with the virtualizer store. We set up the
@@ -144,11 +144,11 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
144
144
  handleEditRowOption(params, finalRowUpdate);
145
145
  return finalRowUpdate;
146
146
  }
147
- apiRef.current.updateNestedRows([finalRowUpdate], []);
148
147
  if (finalRowUpdate && !isDeepEqual(finalRowUpdate, params.previousRow)) {
149
148
  // Reset the outdated cache, only if the row is _actually_ updated
150
149
  apiRef.current.dataSource.cache.clear();
151
150
  }
151
+ apiRef.current.updateNestedRows([finalRowUpdate], []);
152
152
  return finalRowUpdate;
153
153
  } catch (errorThrown) {
154
154
  if (typeof onDataSourceErrorProp === 'function') {
@@ -241,7 +241,7 @@ export const useGridRowSelection = (apiRef, props) => {
241
241
  }
242
242
  }, [logger, applyAutoSelection, canHaveMultipleSelection, apiRef, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, props.rowSelection]);
243
243
  const getPropagatedRowSelectionModel = React.useCallback(inputSelectionModel => {
244
- if (!isNestedData || !applyAutoSelection || inputSelectionModel.ids.size === 0 && inputSelectionModel.type === 'include') {
244
+ if (!isNestedData || !applyAutoSelection || inputSelectionModel.type === 'exclude' || inputSelectionModel.ids.size === 0 && inputSelectionModel.type === 'include') {
245
245
  return inputSelectionModel;
246
246
  }
247
247
  const propagatedSelectionModel = {
@@ -72,17 +72,7 @@ export interface GridRowTreeCreationParams {
72
72
  dataRowIdToModelLookup: GridRowIdToModelLookup;
73
73
  previousGroupsToFetch?: GridRowId[];
74
74
  }
75
- export type GridRowTreeUpdateGroupAction = 'removeChildren' | 'insertChildren' | 'modifyChildren';
76
- export type GridRowTreeUpdatedGroupsValue = {
77
- [groupId: GridRowId]: { [action in GridRowTreeUpdateGroupAction]?: boolean };
78
- };
79
- export type GridRowTreeUpdatedGroupsManager = {
80
- value: GridRowTreeUpdatedGroupsValue;
81
- addAction: (groupId: GridRowId, action: GridRowTreeUpdateGroupAction) => void;
82
- };
83
- export type GridRowTreeCreationValue = Pick<GridRowsState, 'groupingName' | 'tree' | 'treeDepths' | 'dataRowIds' | 'groupsToFetch'> & {
84
- updatedGroupsManager?: GridRowTreeUpdatedGroupsManager;
85
- };
75
+ export type GridRowTreeCreationValue = Pick<GridRowsState, 'groupingName' | 'tree' | 'treeDepths' | 'dataRowIds' | 'groupsToFetch'>;
86
76
  export type GridHydrateRowsValue = Pick<GridRowsState, 'tree' | 'treeDepths' | 'dataRowIds' | 'dataRowIdToModelLookup' | 'additionalRowGroups'>;
87
77
  export type GridRowsPartialUpdateAction = 'insert' | 'modify' | 'remove';
88
78
  export type GridRowIdToModelLookup<R extends GridValidRowModel = GridValidRowModel> = Record<string, R>;
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.14.0
2
+ * @mui/x-data-grid v8.14.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -57,7 +57,7 @@ export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaA
57
57
  export { useGridRowsOverridableMethods } from "../hooks/features/rows/useGridRowsOverridableMethods.js";
58
58
  export { useGridParamsOverridableMethods } from "../hooks/features/rows/useGridParamsOverridableMethods.js";
59
59
  export { useGridRowsPreProcessors } from "../hooks/features/rows/useGridRowsPreProcessors.js";
60
- export type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridHydrateRowsValue, GridRowsPartialUpdates, GridRowsPartialUpdateAction, GridTreeDepths, GridRowTreeUpdatedGroupsManager, GridRowTreeUpdateGroupAction, GridPinnedRowsState } from "../hooks/features/rows/gridRowsInterfaces.js";
60
+ export type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridHydrateRowsValue, GridRowsPartialUpdates, GridRowsPartialUpdateAction, GridTreeDepths, GridPinnedRowsState } from "../hooks/features/rows/gridRowsInterfaces.js";
61
61
  export { getTreeNodeDescendants, buildRootGroup } from "../hooks/features/rows/gridRowsUtils.js";
62
62
  export { useGridRowsMeta, rowsMetaStateInitializer } from "../hooks/features/rows/useGridRowsMeta.js";
63
63
  export { useGridParamsApi } from "../hooks/features/rows/useGridParamsApi.js";
@@ -3,10 +3,9 @@ const itITGrid = {
3
3
  // Root
4
4
  noRowsLabel: 'Nessun record',
5
5
  noResultsOverlayLabel: 'Nessun record trovato.',
6
- // noColumnsOverlayLabel: 'No columns',
7
- // noColumnsOverlayManageColumns: 'Manage columns',
8
- // emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
9
-
6
+ noColumnsOverlayLabel: 'Nessuna colonna',
7
+ noColumnsOverlayManageColumns: 'Gestisci colonne',
8
+ emptyPivotOverlayLabel: 'Aggiungi campi a righe, colonne e valori per creare una tabella pivot',
10
9
  // Density selector toolbar button text
11
10
  toolbarDensity: 'Densità',
12
11
  toolbarDensityLabel: 'Densità',
@@ -33,14 +32,11 @@ const itITGrid = {
33
32
  toolbarExportPrint: 'Stampa',
34
33
  toolbarExportExcel: 'Scarica come Excel',
35
34
  // Toolbar pivot button
36
- // toolbarPivot: 'Pivot',
37
-
35
+ toolbarPivot: 'Pivota',
38
36
  // Toolbar charts button
39
- // toolbarCharts: 'Charts',
40
-
37
+ toolbarCharts: 'Grafici',
41
38
  // Toolbar AI Assistant button
42
- // toolbarAssistant: 'AI Assistant',
43
-
39
+ toolbarAssistant: 'Assistente AI',
44
40
  // Columns management text
45
41
  columnsManagementSearchTitle: 'Cerca',
46
42
  columnsManagementNoColumns: 'Nessuna colonna',
@@ -103,15 +99,14 @@ const itITGrid = {
103
99
  'headerFilterOperator>=': 'Maggiore o uguale a',
104
100
  'headerFilterOperator<': 'Minore di',
105
101
  'headerFilterOperator<=': 'Minore o uguale a',
106
- // headerFilterClear: 'Clear filter',
107
-
102
+ headerFilterClear: 'Rimuovi filtri',
108
103
  // Filter values text
109
104
  filterValueAny: 'qualunque',
110
105
  filterValueTrue: 'vero',
111
106
  filterValueFalse: 'falso',
112
107
  // Column menu text
113
108
  columnMenuLabel: 'Menu',
114
- // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
109
+ columnMenuAriaLabel: columnName => `Menù della colonna ${columnName}`,
115
110
  columnMenuShowColumns: 'Mostra le colonne',
116
111
  columnMenuManageColumns: 'Gestisci colonne',
117
112
  columnMenuFilter: 'Filtra',
@@ -119,9 +114,8 @@ const itITGrid = {
119
114
  columnMenuUnsort: "Annulla l'ordinamento",
120
115
  columnMenuSortAsc: 'Ordinamento crescente',
121
116
  columnMenuSortDesc: 'Ordinamento decrescente',
122
- // columnMenuManagePivot: 'Manage pivot',
123
- // columnMenuManageCharts: 'Manage charts',
124
-
117
+ columnMenuManagePivot: 'Gestisci pivoting',
118
+ columnMenuManageCharts: 'Gestisci grafici',
125
119
  // Column header text
126
120
  columnHeaderFiltersTooltipActive: count => count > 1 ? `${count} filtri attivi` : `${count} filtro attivo`,
127
121
  columnHeaderFiltersLabel: 'Mostra i filtri',
@@ -161,18 +155,18 @@ const itITGrid = {
161
155
  collapseDetailPanel: 'Comprimi',
162
156
  // Pagination
163
157
  paginationRowsPerPage: 'Righe per pagina:',
164
- // paginationDisplayedRows: ({
165
- // from,
166
- // to,
167
- // count,
168
- // estimated
169
- // }) => {
170
- // if (!estimated) {
171
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
172
- // }
173
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
174
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
175
- // },
158
+ paginationDisplayedRows: ({
159
+ from,
160
+ to,
161
+ count,
162
+ estimated
163
+ }) => {
164
+ if (!estimated) {
165
+ return `${from}–${to} di ${count !== -1 ? count : `più di ${to}`}`;
166
+ }
167
+ const estimatedLabel = estimated && estimated > to ? `circa ${estimated}` : `più di ${to}`;
168
+ return `${from}–${to} di ${count !== -1 ? count : estimatedLabel}`;
169
+ },
176
170
  paginationItemAriaLabel: type => {
177
171
  if (type === 'first') {
178
172
  return 'Vai alla prima pagina';
@@ -190,95 +184,89 @@ const itITGrid = {
190
184
  rowReorderingHeaderName: 'Riordinamento righe',
191
185
  // Aggregation
192
186
  aggregationMenuItemHeader: 'aggregazione',
193
- // aggregationFunctionLabelNone: 'none',
187
+ aggregationFunctionLabelNone: 'nessuna',
194
188
  aggregationFunctionLabelSum: 'somma',
195
189
  aggregationFunctionLabelAvg: 'media',
196
190
  aggregationFunctionLabelMin: 'minimo',
197
191
  aggregationFunctionLabelMax: 'massimo',
198
- aggregationFunctionLabelSize: 'numero di elementi'
199
-
192
+ aggregationFunctionLabelSize: 'numero di elementi',
200
193
  // Pivot panel
201
- // pivotToggleLabel: 'Pivot',
202
- // pivotRows: 'Rows',
203
- // pivotColumns: 'Columns',
204
- // pivotValues: 'Values',
205
- // pivotCloseButton: 'Close pivot settings',
206
- // pivotSearchButton: 'Search fields',
207
- // pivotSearchControlPlaceholder: 'Search fields',
208
- // pivotSearchControlLabel: 'Search fields',
209
- // pivotSearchControlClear: 'Clear search',
210
- // pivotNoFields: 'No fields',
211
- // pivotMenuMoveUp: 'Move up',
212
- // pivotMenuMoveDown: 'Move down',
213
- // pivotMenuMoveToTop: 'Move to top',
214
- // pivotMenuMoveToBottom: 'Move to bottom',
215
- // pivotMenuRows: 'Rows',
216
- // pivotMenuColumns: 'Columns',
217
- // pivotMenuValues: 'Values',
218
- // pivotMenuOptions: 'Field options',
219
- // pivotMenuAddToRows: 'Add to Rows',
220
- // pivotMenuAddToColumns: 'Add to Columns',
221
- // pivotMenuAddToValues: 'Add to Values',
222
- // pivotMenuRemove: 'Remove',
223
- // pivotDragToRows: 'Drag here to create rows',
224
- // pivotDragToColumns: 'Drag here to create columns',
225
- // pivotDragToValues: 'Drag here to create values',
226
- // pivotYearColumnHeaderName: '(Year)',
227
- // pivotQuarterColumnHeaderName: '(Quarter)',
228
-
194
+ pivotToggleLabel: 'Pivota la tabella',
195
+ pivotRows: 'Righe',
196
+ pivotColumns: 'Colonne',
197
+ pivotValues: 'Valori',
198
+ pivotCloseButton: 'Chiudi impostazioni di trasposizione',
199
+ pivotSearchButton: 'Cerca attrubuti',
200
+ pivotSearchControlPlaceholder: 'Cerca attrubuti',
201
+ pivotSearchControlLabel: 'Cerca attrubuti',
202
+ pivotSearchControlClear: 'Annulla ricerca',
203
+ pivotNoFields: 'Nessun attributo',
204
+ pivotMenuMoveUp: 'Sposta in alto',
205
+ pivotMenuMoveDown: 'Sposta in basso',
206
+ pivotMenuMoveToTop: 'Sposta in cima',
207
+ pivotMenuMoveToBottom: 'Sposta in fondo',
208
+ pivotMenuRows: 'Righe',
209
+ pivotMenuColumns: 'Colonne',
210
+ pivotMenuValues: 'Valori',
211
+ pivotMenuOptions: 'Opzioni',
212
+ pivotMenuAddToRows: 'Aggiungi alle Righe',
213
+ pivotMenuAddToColumns: 'Aggiungi alle Colonne',
214
+ pivotMenuAddToValues: 'Aggiungi ai Valori',
215
+ pivotMenuRemove: 'Rimuovi',
216
+ pivotDragToRows: 'Trascina qui per creare le righe',
217
+ pivotDragToColumns: 'Trascina qui per creare le colonne',
218
+ pivotDragToValues: 'Trascina qui per creare valori',
219
+ pivotYearColumnHeaderName: '(Anno)',
220
+ pivotQuarterColumnHeaderName: '(Quarto)',
229
221
  // Charts configuration panel
230
- // chartsNoCharts: 'There are no charts available',
231
- // chartsChartNotSelected: 'Select a chart type to configure its options',
232
- // chartsTabChart: 'Chart',
233
- // chartsTabFields: 'Fields',
234
- // chartsTabCustomize: 'Customize',
235
- // chartsCloseButton: 'Close charts configuration',
236
- // chartsSyncButtonLabel: 'Sync chart',
237
- // chartsSearchPlaceholder: 'Search fields',
238
- // chartsSearchLabel: 'Search fields',
239
- // chartsSearchClear: 'Clear search',
240
- // chartsNoFields: 'No fields',
241
- // chartsFieldBlocked: 'This field cannot be added to any section',
242
- // chartsCategories: 'Categories',
243
- // chartsSeries: 'Series',
244
- // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
245
- // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
246
- // chartsMenuMoveUp: 'Move up',
247
- // chartsMenuMoveDown: 'Move down',
248
- // chartsMenuMoveToTop: 'Move to top',
249
- // chartsMenuMoveToBottom: 'Move to bottom',
250
- // chartsMenuOptions: 'Field options',
251
- // chartsMenuRemove: 'Remove',
252
- // chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
253
- // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
254
-
222
+ chartsNoCharts: 'Non ci sono grafici disponibili',
223
+ chartsChartNotSelected: 'Seleziona un tipo di grafico per configurarne le opzioni',
224
+ chartsTabChart: 'Grafico',
225
+ chartsTabFields: 'Attributi',
226
+ chartsTabCustomize: 'Personalizza',
227
+ chartsCloseButton: 'Chiudi la configurazione dei grafici',
228
+ chartsSyncButtonLabel: 'Sincronizza grafico',
229
+ chartsSearchPlaceholder: 'Cerca attributi',
230
+ chartsSearchLabel: 'Cerca attributi',
231
+ chartsSearchClear: 'Annulla ricerca',
232
+ chartsNoFields: 'Nessun attributo',
233
+ chartsFieldBlocked: 'Questo attributo non può essere aggiunto ad alcuna sezione',
234
+ chartsCategories: 'Categorie',
235
+ chartsSeries: 'Serie',
236
+ chartsMenuAddToDimensions: dimensionLabel => `Aggiungi a ${dimensionLabel}`,
237
+ chartsMenuAddToValues: valuesLabel => `Aggiungi a ${valuesLabel}`,
238
+ chartsMenuMoveUp: 'Sposta in alto',
239
+ chartsMenuMoveDown: 'Sposta in basso',
240
+ chartsMenuMoveToTop: 'Sposta in cima',
241
+ chartsMenuMoveToBottom: 'Sposta in fondo',
242
+ chartsMenuOptions: "Opzioni per l'attributo",
243
+ chartsMenuRemove: 'Rimuovi',
244
+ chartsDragToDimensions: dimensionLabel => `Trascina qui per usare la colonna come ${dimensionLabel}`,
245
+ chartsDragToValues: valuesLabel => `Trascina qui per usare la colonna come ${valuesLabel}`,
255
246
  // AI Assistant panel
256
- // aiAssistantPanelTitle: 'AI Assistant',
257
- // aiAssistantPanelClose: 'Close AI Assistant',
258
- // aiAssistantPanelNewConversation: 'New conversation',
259
- // aiAssistantPanelConversationHistory: 'Conversation history',
260
- // aiAssistantPanelEmptyConversation: 'No prompt history',
261
- // aiAssistantSuggestions: 'Suggestions',
262
-
247
+ aiAssistantPanelTitle: 'Assistente AI',
248
+ aiAssistantPanelClose: 'Chiudi Assistente AI',
249
+ aiAssistantPanelNewConversation: 'Nuova Conversazione',
250
+ aiAssistantPanelConversationHistory: 'Conversazioni precedenti',
251
+ aiAssistantPanelEmptyConversation: 'Nessuna conversazione precedente',
252
+ aiAssistantSuggestions: 'Suggerimenti:',
263
253
  // Prompt field
264
- // promptFieldLabel: 'Prompt',
265
- // promptFieldPlaceholder: 'Type a prompt…',
266
- // promptFieldPlaceholderWithRecording: 'Type or record a prompt…',
267
- // promptFieldPlaceholderListening: 'Listening for prompt…',
268
- // promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
269
- // promptFieldSend: 'Send',
270
- // promptFieldRecord: 'Record',
271
- // promptFieldStopRecording: 'Stop recording',
272
-
254
+ promptFieldLabel: 'Prompt',
255
+ promptFieldPlaceholder: 'Scrivi un prompt…',
256
+ promptFieldPlaceholderWithRecording: 'Scrivi o registra un prompt…',
257
+ promptFieldPlaceholderListening: 'In attesa di un prompt…',
258
+ promptFieldSpeechRecognitionNotSupported: 'Il riconoscimento vocale non è supportato dal tuo browser.',
259
+ promptFieldSend: 'Invia',
260
+ promptFieldRecord: 'Registra',
261
+ promptFieldStopRecording: 'Interrompi registrazione',
273
262
  // Prompt
274
- // promptRerun: 'Run again',
275
- // promptProcessing: 'Processing…',
276
- // promptAppliedChanges: 'Applied changes',
277
-
263
+ promptRerun: 'Esegui nuovamente',
264
+ promptProcessing: 'In elaborazione…',
265
+ promptAppliedChanges: 'Cambiamenti applicati',
278
266
  // Prompt changes
279
- // promptChangeGroupDescription: (column: string) => `Group by ${column}`,
280
- // promptChangeAggregationLabel: (column: string, aggregation: string) => `${column} (${aggregation})`,
281
- // promptChangeAggregationDescription: (column: string, aggregation: string) => `Aggregate ${column} (${aggregation})`,
267
+ promptChangeGroupDescription: column => `Raggruppa per ${column}`,
268
+ promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
269
+ promptChangeAggregationDescription: (column, aggregation) => `Aggrega ${column} (${aggregation})`,
282
270
  // promptChangeFilterLabel: (column: string, operator: string, value: string) => {
283
271
  // if (operator === 'is any of') {
284
272
  // return `${column} is any of: ${value}`;
@@ -291,13 +279,13 @@ const itITGrid = {
291
279
  // }
292
280
  // return `Filter where ${column} ${operator} ${value}`;
293
281
  // },
294
- // promptChangeSortDescription: (column: string, direction: string) => `Sort by ${column} (${direction})`,
295
- // promptChangePivotEnableLabel: 'Pivot',
296
- // promptChangePivotEnableDescription: 'Enable pivot',
297
- // promptChangePivotColumnsLabel: (count: number) => `Columns (${count})`,
298
- // promptChangePivotColumnsDescription: (column: string, direction: string) => `${column}${direction ? ` (${direction})` : ''}`,
299
- // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
300
- // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
301
- // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
282
+ promptChangeSortDescription: (column, direction) => `Ordina per ${column} (${direction})`,
283
+ promptChangePivotEnableLabel: 'Pivota',
284
+ promptChangePivotEnableDescription: 'Abilita pivoting',
285
+ promptChangePivotColumnsLabel: count => `Colonne (${count})`,
286
+ promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
287
+ promptChangePivotRowsLabel: count => `Righe (${count})`,
288
+ promptChangePivotValuesLabel: count => `Valori (${count})`,
289
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
302
290
  };
303
291
  export const itIT = getGridLocalization(itITGrid);
@@ -13,7 +13,7 @@ import type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowRe
13
13
  * Some props are passed on the state to enable grid selectors to select
14
14
  * and react to them.
15
15
  */
16
- type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView'>;
16
+ export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable'>;
17
17
  /**
18
18
  * The state of Data Grid.
19
19
  */
@@ -58,5 +58,4 @@ export interface GridInitialStateCommunity {
58
58
  top: number;
59
59
  left: number;
60
60
  };
61
- }
62
- export {};
61
+ }
@@ -1,8 +1,6 @@
1
1
  import type { RefObject } from '@mui/x-internals/types';
2
- import type { DataGridProcessedProps } from "../../models/props/DataGridProps.js";
3
2
  import type { GridPrivateApiCommon } from "../../models/api/gridApiCommon.js";
3
+ import type { GridStateProps } from "../../models/gridStateCommunity.js";
4
4
  import type { GridStateInitializer } from "../utils/useGridInitializeState.js";
5
- type Props = Pick<DataGridProcessedProps, 'getRowId' | 'listView'>;
6
- export declare const propsStateInitializer: GridStateInitializer<Props>;
7
- export declare const useGridProps: <PrivateApi extends GridPrivateApiCommon>(apiRef: RefObject<PrivateApi>, props: Props) => void;
8
- export {};
5
+ export declare const propsStateInitializer: GridStateInitializer<GridStateProps>;
6
+ export declare const useGridProps: <PrivateApi extends GridPrivateApiCommon>(apiRef: RefObject<PrivateApi>, props: GridStateProps) => void;
@@ -13,7 +13,8 @@ const propsStateInitializer = (state, props) => {
13
13
  return (0, _extends2.default)({}, state, {
14
14
  props: {
15
15
  listView: props.listView,
16
- getRowId: props.getRowId
16
+ getRowId: props.getRowId,
17
+ isCellEditable: props.isCellEditable
17
18
  }
18
19
  });
19
20
  };
@@ -23,9 +24,10 @@ const useGridProps = (apiRef, props) => {
23
24
  apiRef.current.setState(state => (0, _extends2.default)({}, state, {
24
25
  props: {
25
26
  listView: props.listView,
26
- getRowId: props.getRowId
27
+ getRowId: props.getRowId,
28
+ isCellEditable: props.isCellEditable
27
29
  }
28
30
  }));
29
- }, [apiRef, props.listView, props.getRowId]);
31
+ }, [apiRef, props.listView, props.getRowId, props.isCellEditable]);
30
32
  };
31
33
  exports.useGridProps = useGridProps;
@@ -66,7 +66,7 @@ function useGridVirtualizer(apiRef, rootProps) {
66
66
  const pinnedRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridPinnedRowsSelector);
67
67
  const pinnedColumns = (0, _gridColumnsSelector.gridVisiblePinnedColumnDefinitionsSelector)(apiRef);
68
68
  const rowSelectionManager = (0, _useGridSelector.useGridSelector)(apiRef, _rowSelection.gridRowSelectionManagerSelector);
69
- const isRowSelected = id => rowSelectionManager.has(id) && apiRef.current.isRowSelectable(id);
69
+ const isRowSelected = React.useCallback(id => rowSelectionManager.has(id) && apiRef.current.isRowSelectable(id), [rowSelectionManager, apiRef]);
70
70
  const currentPage = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef);
71
71
  const hasColSpan = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridHasColSpanSelector);
72
72
  const verticalScrollbarWidth = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridVerticalScrollbarWidthSelector);
@@ -114,6 +114,8 @@ function useGridVirtualizer(apiRef, rootProps) {
114
114
  // </ROWS_META>
115
115
 
116
116
  const focusedVirtualCell = (0, _useGridSelector.useGridSelector)(apiRef, _gridFocusedVirtualCellSelector.gridFocusedVirtualCellSelector);
117
+ const RowSlot = rootProps.slots.row;
118
+ const rowSlotProps = rootProps.slotProps?.row;
117
119
  const virtualizer = (0, _xVirtualizer.useVirtualizer)({
118
120
  refs: {
119
121
  container: apiRef.current.mainElementRef,
@@ -129,14 +131,14 @@ function useGridVirtualizer(apiRef, rootProps) {
129
131
  },
130
132
  colspan: {
131
133
  enabled: hasColSpan,
132
- getColspan: (rowId, column) => {
134
+ getColspan: React.useCallback((rowId, column) => {
133
135
  if (typeof column.colSpan === 'function') {
134
136
  const row = apiRef.current.getRow(rowId);
135
137
  const value = apiRef.current.getRowValue(row, column);
136
138
  return column.colSpan(value, row, column, apiRef) ?? 0;
137
139
  }
138
140
  return column.colSpan ?? 1;
139
- }
141
+ }, [apiRef])
140
142
  },
141
143
  initialState: {
142
144
  scroll: rootProps.initialState?.scroll,
@@ -189,15 +191,15 @@ function useGridVirtualizer(apiRef, rootProps) {
189
191
  onRenderContextChange: (0, _useEventCallback.default)(nextRenderContext => {
190
192
  apiRef.current.publishEvent('renderedRowsIntervalChange', nextRenderContext);
191
193
  }),
192
- onScrollChange: (scrollPosition, nextRenderContext) => {
194
+ onScrollChange: React.useCallback((scrollPosition, nextRenderContext) => {
193
195
  apiRef.current.publishEvent('scrollPositionChange', {
194
196
  top: scrollPosition.top,
195
197
  left: scrollPosition.left,
196
198
  renderContext: nextRenderContext
197
199
  });
198
- },
200
+ }, [apiRef]),
199
201
  scrollReset,
200
- renderRow: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.row, (0, _extends2.default)({
202
+ renderRow: React.useCallback(params => /*#__PURE__*/(0, _jsxRuntime.jsx)(RowSlot, (0, _extends2.default)({
201
203
  row: params.model,
202
204
  rowId: params.id,
203
205
  index: params.rowIndex,
@@ -216,10 +218,10 @@ function useGridVirtualizer(apiRef, rootProps) {
216
218
  showBottomBorder: params.showBottomBorder,
217
219
  scrollbarWidth: verticalScrollbarWidth,
218
220
  gridHasFiller: hasFiller
219
- }, rootProps.slotProps?.row), params.id),
220
- renderInfiniteLoadingTrigger: id => apiRef.current.getInfiniteLoadingTriggerElement?.({
221
+ }, rowSlotProps), params.id), [columnsTotalWidth, hasFiller, isRowSelected, pinnedColumns, RowSlot, rowSlotProps, verticalScrollbarWidth, visibleColumns]),
222
+ renderInfiniteLoadingTrigger: React.useCallback(id => apiRef.current.getInfiniteLoadingTriggerElement?.({
221
223
  lastRowId: id
222
- })
224
+ }), [apiRef])
223
225
  });
224
226
 
225
227
  // HACK: Keep the grid's store in sync with the virtualizer store. We set up the
@@ -151,11 +151,11 @@ const useGridDataSourceBase = (apiRef, props, options = {}) => {
151
151
  handleEditRowOption(params, finalRowUpdate);
152
152
  return finalRowUpdate;
153
153
  }
154
- apiRef.current.updateNestedRows([finalRowUpdate], []);
155
154
  if (finalRowUpdate && !(0, _isDeepEqual.isDeepEqual)(finalRowUpdate, params.previousRow)) {
156
155
  // Reset the outdated cache, only if the row is _actually_ updated
157
156
  apiRef.current.dataSource.cache.clear();
158
157
  }
158
+ apiRef.current.updateNestedRows([finalRowUpdate], []);
159
159
  return finalRowUpdate;
160
160
  } catch (errorThrown) {
161
161
  if (typeof onDataSourceErrorProp === 'function') {
@@ -249,7 +249,7 @@ const useGridRowSelection = (apiRef, props) => {
249
249
  }
250
250
  }, [logger, applyAutoSelection, canHaveMultipleSelection, apiRef, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, props.rowSelection]);
251
251
  const getPropagatedRowSelectionModel = React.useCallback(inputSelectionModel => {
252
- if (!isNestedData || !applyAutoSelection || inputSelectionModel.ids.size === 0 && inputSelectionModel.type === 'include') {
252
+ if (!isNestedData || !applyAutoSelection || inputSelectionModel.type === 'exclude' || inputSelectionModel.ids.size === 0 && inputSelectionModel.type === 'include') {
253
253
  return inputSelectionModel;
254
254
  }
255
255
  const propagatedSelectionModel = {
@@ -72,17 +72,7 @@ export interface GridRowTreeCreationParams {
72
72
  dataRowIdToModelLookup: GridRowIdToModelLookup;
73
73
  previousGroupsToFetch?: GridRowId[];
74
74
  }
75
- export type GridRowTreeUpdateGroupAction = 'removeChildren' | 'insertChildren' | 'modifyChildren';
76
- export type GridRowTreeUpdatedGroupsValue = {
77
- [groupId: GridRowId]: { [action in GridRowTreeUpdateGroupAction]?: boolean };
78
- };
79
- export type GridRowTreeUpdatedGroupsManager = {
80
- value: GridRowTreeUpdatedGroupsValue;
81
- addAction: (groupId: GridRowId, action: GridRowTreeUpdateGroupAction) => void;
82
- };
83
- export type GridRowTreeCreationValue = Pick<GridRowsState, 'groupingName' | 'tree' | 'treeDepths' | 'dataRowIds' | 'groupsToFetch'> & {
84
- updatedGroupsManager?: GridRowTreeUpdatedGroupsManager;
85
- };
75
+ export type GridRowTreeCreationValue = Pick<GridRowsState, 'groupingName' | 'tree' | 'treeDepths' | 'dataRowIds' | 'groupsToFetch'>;
86
76
  export type GridHydrateRowsValue = Pick<GridRowsState, 'tree' | 'treeDepths' | 'dataRowIds' | 'dataRowIdToModelLookup' | 'additionalRowGroups'>;
87
77
  export type GridRowsPartialUpdateAction = 'insert' | 'modify' | 'remove';
88
78
  export type GridRowIdToModelLookup<R extends GridValidRowModel = GridValidRowModel> = Record<string, R>;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.14.0
2
+ * @mui/x-data-grid v8.14.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -57,7 +57,7 @@ export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaA
57
57
  export { useGridRowsOverridableMethods } from "../hooks/features/rows/useGridRowsOverridableMethods.js";
58
58
  export { useGridParamsOverridableMethods } from "../hooks/features/rows/useGridParamsOverridableMethods.js";
59
59
  export { useGridRowsPreProcessors } from "../hooks/features/rows/useGridRowsPreProcessors.js";
60
- export type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridHydrateRowsValue, GridRowsPartialUpdates, GridRowsPartialUpdateAction, GridTreeDepths, GridRowTreeUpdatedGroupsManager, GridRowTreeUpdateGroupAction, GridPinnedRowsState } from "../hooks/features/rows/gridRowsInterfaces.js";
60
+ export type { GridRowTreeCreationParams, GridRowTreeCreationValue, GridHydrateRowsValue, GridRowsPartialUpdates, GridRowsPartialUpdateAction, GridTreeDepths, GridPinnedRowsState } from "../hooks/features/rows/gridRowsInterfaces.js";
61
61
  export { getTreeNodeDescendants, buildRootGroup } from "../hooks/features/rows/gridRowsUtils.js";
62
62
  export { useGridRowsMeta, rowsMetaStateInitializer } from "../hooks/features/rows/useGridRowsMeta.js";
63
63
  export { useGridParamsApi } from "../hooks/features/rows/useGridParamsApi.js";
package/locales/itIT.js CHANGED
@@ -9,10 +9,9 @@ const itITGrid = {
9
9
  // Root
10
10
  noRowsLabel: 'Nessun record',
11
11
  noResultsOverlayLabel: 'Nessun record trovato.',
12
- // noColumnsOverlayLabel: 'No columns',
13
- // noColumnsOverlayManageColumns: 'Manage columns',
14
- // emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
15
-
12
+ noColumnsOverlayLabel: 'Nessuna colonna',
13
+ noColumnsOverlayManageColumns: 'Gestisci colonne',
14
+ emptyPivotOverlayLabel: 'Aggiungi campi a righe, colonne e valori per creare una tabella pivot',
16
15
  // Density selector toolbar button text
17
16
  toolbarDensity: 'Densità',
18
17
  toolbarDensityLabel: 'Densità',
@@ -39,14 +38,11 @@ const itITGrid = {
39
38
  toolbarExportPrint: 'Stampa',
40
39
  toolbarExportExcel: 'Scarica come Excel',
41
40
  // Toolbar pivot button
42
- // toolbarPivot: 'Pivot',
43
-
41
+ toolbarPivot: 'Pivota',
44
42
  // Toolbar charts button
45
- // toolbarCharts: 'Charts',
46
-
43
+ toolbarCharts: 'Grafici',
47
44
  // Toolbar AI Assistant button
48
- // toolbarAssistant: 'AI Assistant',
49
-
45
+ toolbarAssistant: 'Assistente AI',
50
46
  // Columns management text
51
47
  columnsManagementSearchTitle: 'Cerca',
52
48
  columnsManagementNoColumns: 'Nessuna colonna',
@@ -109,15 +105,14 @@ const itITGrid = {
109
105
  'headerFilterOperator>=': 'Maggiore o uguale a',
110
106
  'headerFilterOperator<': 'Minore di',
111
107
  'headerFilterOperator<=': 'Minore o uguale a',
112
- // headerFilterClear: 'Clear filter',
113
-
108
+ headerFilterClear: 'Rimuovi filtri',
114
109
  // Filter values text
115
110
  filterValueAny: 'qualunque',
116
111
  filterValueTrue: 'vero',
117
112
  filterValueFalse: 'falso',
118
113
  // Column menu text
119
114
  columnMenuLabel: 'Menu',
120
- // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
115
+ columnMenuAriaLabel: columnName => `Menù della colonna ${columnName}`,
121
116
  columnMenuShowColumns: 'Mostra le colonne',
122
117
  columnMenuManageColumns: 'Gestisci colonne',
123
118
  columnMenuFilter: 'Filtra',
@@ -125,9 +120,8 @@ const itITGrid = {
125
120
  columnMenuUnsort: "Annulla l'ordinamento",
126
121
  columnMenuSortAsc: 'Ordinamento crescente',
127
122
  columnMenuSortDesc: 'Ordinamento decrescente',
128
- // columnMenuManagePivot: 'Manage pivot',
129
- // columnMenuManageCharts: 'Manage charts',
130
-
123
+ columnMenuManagePivot: 'Gestisci pivoting',
124
+ columnMenuManageCharts: 'Gestisci grafici',
131
125
  // Column header text
132
126
  columnHeaderFiltersTooltipActive: count => count > 1 ? `${count} filtri attivi` : `${count} filtro attivo`,
133
127
  columnHeaderFiltersLabel: 'Mostra i filtri',
@@ -167,18 +161,18 @@ const itITGrid = {
167
161
  collapseDetailPanel: 'Comprimi',
168
162
  // Pagination
169
163
  paginationRowsPerPage: 'Righe per pagina:',
170
- // paginationDisplayedRows: ({
171
- // from,
172
- // to,
173
- // count,
174
- // estimated
175
- // }) => {
176
- // if (!estimated) {
177
- // return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
178
- // }
179
- // const estimatedLabel = estimated && estimated > to ? `around ${estimated}` : `more than ${to}`;
180
- // return `${from}–${to} of ${count !== -1 ? count : estimatedLabel}`;
181
- // },
164
+ paginationDisplayedRows: ({
165
+ from,
166
+ to,
167
+ count,
168
+ estimated
169
+ }) => {
170
+ if (!estimated) {
171
+ return `${from}–${to} di ${count !== -1 ? count : `più di ${to}`}`;
172
+ }
173
+ const estimatedLabel = estimated && estimated > to ? `circa ${estimated}` : `più di ${to}`;
174
+ return `${from}–${to} di ${count !== -1 ? count : estimatedLabel}`;
175
+ },
182
176
  paginationItemAriaLabel: type => {
183
177
  if (type === 'first') {
184
178
  return 'Vai alla prima pagina';
@@ -196,95 +190,89 @@ const itITGrid = {
196
190
  rowReorderingHeaderName: 'Riordinamento righe',
197
191
  // Aggregation
198
192
  aggregationMenuItemHeader: 'aggregazione',
199
- // aggregationFunctionLabelNone: 'none',
193
+ aggregationFunctionLabelNone: 'nessuna',
200
194
  aggregationFunctionLabelSum: 'somma',
201
195
  aggregationFunctionLabelAvg: 'media',
202
196
  aggregationFunctionLabelMin: 'minimo',
203
197
  aggregationFunctionLabelMax: 'massimo',
204
- aggregationFunctionLabelSize: 'numero di elementi'
205
-
198
+ aggregationFunctionLabelSize: 'numero di elementi',
206
199
  // Pivot panel
207
- // pivotToggleLabel: 'Pivot',
208
- // pivotRows: 'Rows',
209
- // pivotColumns: 'Columns',
210
- // pivotValues: 'Values',
211
- // pivotCloseButton: 'Close pivot settings',
212
- // pivotSearchButton: 'Search fields',
213
- // pivotSearchControlPlaceholder: 'Search fields',
214
- // pivotSearchControlLabel: 'Search fields',
215
- // pivotSearchControlClear: 'Clear search',
216
- // pivotNoFields: 'No fields',
217
- // pivotMenuMoveUp: 'Move up',
218
- // pivotMenuMoveDown: 'Move down',
219
- // pivotMenuMoveToTop: 'Move to top',
220
- // pivotMenuMoveToBottom: 'Move to bottom',
221
- // pivotMenuRows: 'Rows',
222
- // pivotMenuColumns: 'Columns',
223
- // pivotMenuValues: 'Values',
224
- // pivotMenuOptions: 'Field options',
225
- // pivotMenuAddToRows: 'Add to Rows',
226
- // pivotMenuAddToColumns: 'Add to Columns',
227
- // pivotMenuAddToValues: 'Add to Values',
228
- // pivotMenuRemove: 'Remove',
229
- // pivotDragToRows: 'Drag here to create rows',
230
- // pivotDragToColumns: 'Drag here to create columns',
231
- // pivotDragToValues: 'Drag here to create values',
232
- // pivotYearColumnHeaderName: '(Year)',
233
- // pivotQuarterColumnHeaderName: '(Quarter)',
234
-
200
+ pivotToggleLabel: 'Pivota la tabella',
201
+ pivotRows: 'Righe',
202
+ pivotColumns: 'Colonne',
203
+ pivotValues: 'Valori',
204
+ pivotCloseButton: 'Chiudi impostazioni di trasposizione',
205
+ pivotSearchButton: 'Cerca attrubuti',
206
+ pivotSearchControlPlaceholder: 'Cerca attrubuti',
207
+ pivotSearchControlLabel: 'Cerca attrubuti',
208
+ pivotSearchControlClear: 'Annulla ricerca',
209
+ pivotNoFields: 'Nessun attributo',
210
+ pivotMenuMoveUp: 'Sposta in alto',
211
+ pivotMenuMoveDown: 'Sposta in basso',
212
+ pivotMenuMoveToTop: 'Sposta in cima',
213
+ pivotMenuMoveToBottom: 'Sposta in fondo',
214
+ pivotMenuRows: 'Righe',
215
+ pivotMenuColumns: 'Colonne',
216
+ pivotMenuValues: 'Valori',
217
+ pivotMenuOptions: 'Opzioni',
218
+ pivotMenuAddToRows: 'Aggiungi alle Righe',
219
+ pivotMenuAddToColumns: 'Aggiungi alle Colonne',
220
+ pivotMenuAddToValues: 'Aggiungi ai Valori',
221
+ pivotMenuRemove: 'Rimuovi',
222
+ pivotDragToRows: 'Trascina qui per creare le righe',
223
+ pivotDragToColumns: 'Trascina qui per creare le colonne',
224
+ pivotDragToValues: 'Trascina qui per creare valori',
225
+ pivotYearColumnHeaderName: '(Anno)',
226
+ pivotQuarterColumnHeaderName: '(Quarto)',
235
227
  // Charts configuration panel
236
- // chartsNoCharts: 'There are no charts available',
237
- // chartsChartNotSelected: 'Select a chart type to configure its options',
238
- // chartsTabChart: 'Chart',
239
- // chartsTabFields: 'Fields',
240
- // chartsTabCustomize: 'Customize',
241
- // chartsCloseButton: 'Close charts configuration',
242
- // chartsSyncButtonLabel: 'Sync chart',
243
- // chartsSearchPlaceholder: 'Search fields',
244
- // chartsSearchLabel: 'Search fields',
245
- // chartsSearchClear: 'Clear search',
246
- // chartsNoFields: 'No fields',
247
- // chartsFieldBlocked: 'This field cannot be added to any section',
248
- // chartsCategories: 'Categories',
249
- // chartsSeries: 'Series',
250
- // chartsMenuAddToDimensions: (dimensionLabel: string) => `Add to ${dimensionLabel}`,
251
- // chartsMenuAddToValues: (valuesLabel: string) => `Add to ${valuesLabel}`,
252
- // chartsMenuMoveUp: 'Move up',
253
- // chartsMenuMoveDown: 'Move down',
254
- // chartsMenuMoveToTop: 'Move to top',
255
- // chartsMenuMoveToBottom: 'Move to bottom',
256
- // chartsMenuOptions: 'Field options',
257
- // chartsMenuRemove: 'Remove',
258
- // chartsDragToDimensions: (dimensionLabel: string) => `Drag here to use column as ${dimensionLabel}`,
259
- // chartsDragToValues: (valuesLabel: string) => `Drag here to use column as ${valuesLabel}`,
260
-
228
+ chartsNoCharts: 'Non ci sono grafici disponibili',
229
+ chartsChartNotSelected: 'Seleziona un tipo di grafico per configurarne le opzioni',
230
+ chartsTabChart: 'Grafico',
231
+ chartsTabFields: 'Attributi',
232
+ chartsTabCustomize: 'Personalizza',
233
+ chartsCloseButton: 'Chiudi la configurazione dei grafici',
234
+ chartsSyncButtonLabel: 'Sincronizza grafico',
235
+ chartsSearchPlaceholder: 'Cerca attributi',
236
+ chartsSearchLabel: 'Cerca attributi',
237
+ chartsSearchClear: 'Annulla ricerca',
238
+ chartsNoFields: 'Nessun attributo',
239
+ chartsFieldBlocked: 'Questo attributo non può essere aggiunto ad alcuna sezione',
240
+ chartsCategories: 'Categorie',
241
+ chartsSeries: 'Serie',
242
+ chartsMenuAddToDimensions: dimensionLabel => `Aggiungi a ${dimensionLabel}`,
243
+ chartsMenuAddToValues: valuesLabel => `Aggiungi a ${valuesLabel}`,
244
+ chartsMenuMoveUp: 'Sposta in alto',
245
+ chartsMenuMoveDown: 'Sposta in basso',
246
+ chartsMenuMoveToTop: 'Sposta in cima',
247
+ chartsMenuMoveToBottom: 'Sposta in fondo',
248
+ chartsMenuOptions: "Opzioni per l'attributo",
249
+ chartsMenuRemove: 'Rimuovi',
250
+ chartsDragToDimensions: dimensionLabel => `Trascina qui per usare la colonna come ${dimensionLabel}`,
251
+ chartsDragToValues: valuesLabel => `Trascina qui per usare la colonna come ${valuesLabel}`,
261
252
  // AI Assistant panel
262
- // aiAssistantPanelTitle: 'AI Assistant',
263
- // aiAssistantPanelClose: 'Close AI Assistant',
264
- // aiAssistantPanelNewConversation: 'New conversation',
265
- // aiAssistantPanelConversationHistory: 'Conversation history',
266
- // aiAssistantPanelEmptyConversation: 'No prompt history',
267
- // aiAssistantSuggestions: 'Suggestions',
268
-
253
+ aiAssistantPanelTitle: 'Assistente AI',
254
+ aiAssistantPanelClose: 'Chiudi Assistente AI',
255
+ aiAssistantPanelNewConversation: 'Nuova Conversazione',
256
+ aiAssistantPanelConversationHistory: 'Conversazioni precedenti',
257
+ aiAssistantPanelEmptyConversation: 'Nessuna conversazione precedente',
258
+ aiAssistantSuggestions: 'Suggerimenti:',
269
259
  // Prompt field
270
- // promptFieldLabel: 'Prompt',
271
- // promptFieldPlaceholder: 'Type a prompt…',
272
- // promptFieldPlaceholderWithRecording: 'Type or record a prompt…',
273
- // promptFieldPlaceholderListening: 'Listening for prompt…',
274
- // promptFieldSpeechRecognitionNotSupported: 'Speech recognition is not supported in this browser',
275
- // promptFieldSend: 'Send',
276
- // promptFieldRecord: 'Record',
277
- // promptFieldStopRecording: 'Stop recording',
278
-
260
+ promptFieldLabel: 'Prompt',
261
+ promptFieldPlaceholder: 'Scrivi un prompt…',
262
+ promptFieldPlaceholderWithRecording: 'Scrivi o registra un prompt…',
263
+ promptFieldPlaceholderListening: 'In attesa di un prompt…',
264
+ promptFieldSpeechRecognitionNotSupported: 'Il riconoscimento vocale non è supportato dal tuo browser.',
265
+ promptFieldSend: 'Invia',
266
+ promptFieldRecord: 'Registra',
267
+ promptFieldStopRecording: 'Interrompi registrazione',
279
268
  // Prompt
280
- // promptRerun: 'Run again',
281
- // promptProcessing: 'Processing…',
282
- // promptAppliedChanges: 'Applied changes',
283
-
269
+ promptRerun: 'Esegui nuovamente',
270
+ promptProcessing: 'In elaborazione…',
271
+ promptAppliedChanges: 'Cambiamenti applicati',
284
272
  // Prompt changes
285
- // promptChangeGroupDescription: (column: string) => `Group by ${column}`,
286
- // promptChangeAggregationLabel: (column: string, aggregation: string) => `${column} (${aggregation})`,
287
- // promptChangeAggregationDescription: (column: string, aggregation: string) => `Aggregate ${column} (${aggregation})`,
273
+ promptChangeGroupDescription: column => `Raggruppa per ${column}`,
274
+ promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
275
+ promptChangeAggregationDescription: (column, aggregation) => `Aggrega ${column} (${aggregation})`,
288
276
  // promptChangeFilterLabel: (column: string, operator: string, value: string) => {
289
277
  // if (operator === 'is any of') {
290
278
  // return `${column} is any of: ${value}`;
@@ -297,13 +285,13 @@ const itITGrid = {
297
285
  // }
298
286
  // return `Filter where ${column} ${operator} ${value}`;
299
287
  // },
300
- // promptChangeSortDescription: (column: string, direction: string) => `Sort by ${column} (${direction})`,
301
- // promptChangePivotEnableLabel: 'Pivot',
302
- // promptChangePivotEnableDescription: 'Enable pivot',
303
- // promptChangePivotColumnsLabel: (count: number) => `Columns (${count})`,
304
- // promptChangePivotColumnsDescription: (column: string, direction: string) => `${column}${direction ? ` (${direction})` : ''}`,
305
- // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
306
- // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
307
- // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
288
+ promptChangeSortDescription: (column, direction) => `Ordina per ${column} (${direction})`,
289
+ promptChangePivotEnableLabel: 'Pivota',
290
+ promptChangePivotEnableDescription: 'Abilita pivoting',
291
+ promptChangePivotColumnsLabel: count => `Colonne (${count})`,
292
+ promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
293
+ promptChangePivotRowsLabel: count => `Righe (${count})`,
294
+ promptChangePivotValuesLabel: count => `Valori (${count})`,
295
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
308
296
  };
309
297
  const itIT = exports.itIT = (0, _getGridLocalization.getGridLocalization)(itITGrid);
@@ -13,7 +13,7 @@ import type { GridRowReorderState } from "../hooks/features/rowReorder/gridRowRe
13
13
  * Some props are passed on the state to enable grid selectors to select
14
14
  * and react to them.
15
15
  */
16
- type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView'>;
16
+ export type GridStateProps = Pick<DataGridProcessedProps, 'getRowId' | 'listView' | 'isCellEditable'>;
17
17
  /**
18
18
  * The state of Data Grid.
19
19
  */
@@ -58,5 +58,4 @@ export interface GridInitialStateCommunity {
58
58
  top: number;
59
59
  left: number;
60
60
  };
61
- }
62
- export {};
61
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "8.14.0",
3
+ "version": "8.14.1",
4
4
  "author": "MUI Team",
5
5
  "description": "The Community plan edition of the MUI X Data Grid components.",
6
6
  "license": "MIT",
@@ -43,7 +43,7 @@
43
43
  "prop-types": "^15.8.1",
44
44
  "use-sync-external-store": "^1.6.0",
45
45
  "@mui/x-internals": "8.14.0",
46
- "@mui/x-virtualizer": "0.2.3"
46
+ "@mui/x-virtualizer": "0.2.4"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@emotion/react": "^11.9.0",