@mui/x-data-grid 6.10.2 → 6.11.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +154 -0
  2. package/DataGrid/DataGrid.d.ts +1 -1
  3. package/DataGrid/DataGrid.js +2 -1
  4. package/colDef/utils.d.ts +1 -1
  5. package/colDef/utils.js +1 -1
  6. package/components/GridPagination.d.ts +6 -2
  7. package/components/cell/GridActionsCellItem.d.ts +6 -2
  8. package/components/cell/GridCell.js +57 -46
  9. package/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  10. package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  11. package/components/containers/GridMainContainer.js +10 -3
  12. package/components/containers/GridRoot.js +7 -13
  13. package/components/panel/GridPanel.d.ts +1 -1
  14. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
  15. package/hooks/features/columns/gridColumnsUtils.js +2 -2
  16. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +7 -4
  17. package/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  18. package/hooks/utils/useGridAriaAttributes.d.ts +6 -0
  19. package/hooks/utils/useGridAriaAttributes.js +25 -0
  20. package/index.js +1 -1
  21. package/legacy/DataGrid/DataGrid.js +2 -1
  22. package/legacy/colDef/utils.js +1 -1
  23. package/legacy/components/cell/GridCell.js +57 -46
  24. package/legacy/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  25. package/legacy/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  26. package/legacy/components/containers/GridMainContainer.js +10 -3
  27. package/legacy/components/containers/GridRoot.js +7 -13
  28. package/legacy/hooks/features/columns/gridColumnsUtils.js +2 -2
  29. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  30. package/legacy/hooks/utils/useGridAriaAttributes.js +25 -0
  31. package/legacy/index.js +1 -1
  32. package/legacy/locales/fiFI.js +28 -30
  33. package/legacy/locales/heIL.js +26 -29
  34. package/legacy/locales/itIT.js +34 -38
  35. package/locales/fiFI.js +28 -30
  36. package/locales/heIL.js +26 -29
  37. package/locales/itIT.js +34 -38
  38. package/models/gridFilterOperator.d.ts +1 -1
  39. package/models/props/DataGridProps.d.ts +7 -1
  40. package/modern/DataGrid/DataGrid.js +2 -1
  41. package/modern/colDef/utils.js +1 -1
  42. package/modern/components/cell/GridCell.js +54 -43
  43. package/modern/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  44. package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  45. package/modern/components/containers/GridMainContainer.js +9 -3
  46. package/modern/components/containers/GridRoot.js +6 -13
  47. package/modern/hooks/features/columns/gridColumnsUtils.js +2 -2
  48. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  49. package/modern/hooks/utils/useGridAriaAttributes.js +24 -0
  50. package/modern/index.js +1 -1
  51. package/modern/locales/fiFI.js +28 -30
  52. package/modern/locales/heIL.js +26 -29
  53. package/modern/locales/itIT.js +34 -38
  54. package/node/DataGrid/DataGrid.js +2 -1
  55. package/node/colDef/utils.js +1 -1
  56. package/node/components/cell/GridCell.js +54 -43
  57. package/node/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  58. package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  59. package/node/components/containers/GridMainContainer.js +10 -3
  60. package/node/components/containers/GridRoot.js +6 -13
  61. package/node/hooks/features/columns/gridColumnsUtils.js +1 -1
  62. package/node/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  63. package/node/hooks/utils/useGridAriaAttributes.js +31 -0
  64. package/node/index.js +1 -1
  65. package/node/locales/fiFI.js +28 -30
  66. package/node/locales/heIL.js +26 -29
  67. package/node/locales/itIT.js +34 -38
  68. package/package.json +3 -3
@@ -75,10 +75,12 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
75
75
  }, other, {
76
76
  children: [/*#__PURE__*/_jsxs("div", _extends({
77
77
  className: classes.draggableContainer,
78
- draggable: isDraggable
78
+ draggable: isDraggable,
79
+ role: "presentation"
79
80
  }, draggableContainerProps, {
80
81
  children: [/*#__PURE__*/_jsxs("div", {
81
82
  className: classes.titleContainer,
83
+ role: "presentation",
82
84
  children: [/*#__PURE__*/_jsx("div", {
83
85
  className: classes.titleContainerContent,
84
86
  children: headerComponent !== undefined ? headerComponent : /*#__PURE__*/_jsx(GridColumnHeaderTitle, {
@@ -1,8 +1,10 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import * as React from 'react';
2
3
  import { unstable_composeClasses as composeClasses } from '@mui/utils';
3
4
  import { styled } from '@mui/system';
4
5
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
5
6
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
7
+ import { useGridAriaAttributes } from '../../hooks/utils/useGridAriaAttributes';
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
7
9
  const useUtilityClasses = ownerState => {
8
10
  const {
@@ -27,10 +29,14 @@ const GridMainContainerRoot = styled('div', {
27
29
  export const GridMainContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
28
30
  const rootProps = useGridRootProps();
29
31
  const classes = useUtilityClasses(rootProps);
30
- return /*#__PURE__*/_jsx(GridMainContainerRoot, {
32
+ const getAriaAttributes = rootProps.experimentalFeatures?.ariaV7 // ariaV7 should never change
33
+ ? useGridAriaAttributes : null;
34
+ const ariaAttributes = typeof getAriaAttributes === 'function' ? getAriaAttributes() : null;
35
+ return /*#__PURE__*/_jsx(GridMainContainerRoot, _extends({
31
36
  ref: ref,
32
37
  className: classes.root,
33
- ownerState: rootProps,
38
+ ownerState: rootProps
39
+ }, ariaAttributes, {
34
40
  children: props.children
35
- });
41
+ }));
36
42
  });
@@ -6,14 +6,12 @@ import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_capitalize as capitalize, unstable_composeClasses as composeClasses } from '@mui/utils';
8
8
  import { GridRootStyles } from './GridRootStyles';
9
- import { gridVisibleColumnDefinitionsSelector } from '../../hooks/features/columns/gridColumnsSelector';
10
9
  import { useGridSelector } from '../../hooks/utils/useGridSelector';
11
10
  import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
12
11
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
13
12
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
14
13
  import { gridDensityValueSelector } from '../../hooks/features/density/densitySelector';
15
- import { gridColumnGroupsHeaderMaxDepthSelector } from '../../hooks/features/columnGrouping/gridColumnGroupsSelector';
16
- import { gridPinnedRowsCountSelector, gridRowCountSelector } from '../../hooks/features/rows/gridRowsSelector';
14
+ import { useGridAriaAttributes } from '../../hooks/utils/useGridAriaAttributes';
17
15
  import { jsx as _jsx } from "react/jsx-runtime";
18
16
  const useUtilityClasses = ownerState => {
19
17
  const {
@@ -34,13 +32,12 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
34
32
  } = props,
35
33
  other = _objectWithoutPropertiesLoose(props, _excluded);
36
34
  const apiRef = useGridPrivateApiContext();
37
- const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
38
- const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
39
35
  const densityValue = useGridSelector(apiRef, gridDensityValueSelector);
40
- const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
41
36
  const rootContainerRef = React.useRef(null);
42
37
  const handleRef = useForkRef(rootContainerRef, ref);
43
- const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
38
+ const getAriaAttributes = rootProps.experimentalFeatures?.ariaV7 // ariaV7 should never change
39
+ ? null : useGridAriaAttributes;
40
+ const ariaAttributes = typeof getAriaAttributes === 'function' ? getAriaAttributes() : null;
44
41
  const ownerState = _extends({}, rootProps, {
45
42
  density: densityValue
46
43
  });
@@ -60,12 +57,8 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
60
57
  return /*#__PURE__*/_jsx(GridRootStyles, _extends({
61
58
  ref: handleRef,
62
59
  className: clsx(className, classes.root),
63
- ownerState: ownerState,
64
- role: "grid",
65
- "aria-colcount": visibleColumns.length,
66
- "aria-rowcount": headerGroupingMaxDepth + 1 + pinnedRowsCount + totalRowCount,
67
- "aria-multiselectable": !rootProps.disableMultipleRowSelection
68
- }, other, {
60
+ ownerState: ownerState
61
+ }, ariaAttributes, other, {
69
62
  children: children
70
63
  }));
71
64
  });
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { DEFAULT_GRID_COL_TYPE_KEY } from '../../../colDef';
2
+ import { DEFAULT_GRID_COL_TYPE_KEY, GRID_STRING_COL_DEF } from '../../../colDef';
3
3
  import { gridColumnsStateSelector, gridColumnVisibilityModelSelector } from './gridColumnsSelector';
4
4
  import { clamp } from '../../../utils/utils';
5
5
  import { gridDensityFactorSelector } from '../density/densitySelector';
@@ -127,7 +127,7 @@ export const hydrateColumnsWidth = (rawState, viewportInnerWidth) => {
127
127
  computedWidth = 0;
128
128
  flexColumns.push(newColumn);
129
129
  } else {
130
- computedWidth = clamp(newColumn.width, newColumn.minWidth, newColumn.maxWidth);
130
+ computedWidth = clamp(newColumn.width || GRID_STRING_COL_DEF.width, newColumn.minWidth || GRID_STRING_COL_DEF.minWidth, newColumn.maxWidth || GRID_STRING_COL_DEF.maxWidth);
131
131
  }
132
132
  widthAllocatedBeforeFlex += computedWidth;
133
133
  newColumn.computedWidth = computedWidth;
@@ -549,15 +549,18 @@ export const useGridVirtualScroller = props => {
549
549
  onWheel: handleWheel,
550
550
  onTouchMove: handleTouchMove
551
551
  }, inputProps, {
552
- style: inputProps.style ? _extends({}, inputProps.style, rootStyle) : rootStyle
552
+ style: inputProps.style ? _extends({}, inputProps.style, rootStyle) : rootStyle,
553
+ role: 'presentation'
553
554
  }),
554
555
  getContentProps: ({
555
556
  style
556
557
  } = {}) => ({
557
- style: style ? _extends({}, style, contentSize) : contentSize
558
+ style: style ? _extends({}, style, contentSize) : contentSize,
559
+ role: 'presentation'
558
560
  }),
559
561
  getRenderZoneProps: () => ({
560
- ref: renderZoneRef
562
+ ref: renderZoneRef,
563
+ role: 'rowgroup'
561
564
  })
562
565
  };
563
566
  };
@@ -0,0 +1,24 @@
1
+ import { gridVisibleColumnDefinitionsSelector } from '../features/columns/gridColumnsSelector';
2
+ import { useGridSelector } from './useGridSelector';
3
+ import { useGridRootProps } from './useGridRootProps';
4
+ import { gridColumnGroupsHeaderMaxDepthSelector } from '../features/columnGrouping/gridColumnGroupsSelector';
5
+ import { gridPinnedRowsCountSelector, gridRowCountSelector } from '../features/rows/gridRowsSelector';
6
+ import { useGridPrivateApiContext } from './useGridPrivateApiContext';
7
+ export const useGridAriaAttributes = () => {
8
+ const apiRef = useGridPrivateApiContext();
9
+ const rootProps = useGridRootProps();
10
+ const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
11
+ const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
12
+ const headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
13
+ const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
14
+ let role = 'grid';
15
+ if (rootProps.experimentalFeatures?.ariaV7 && rootProps.treeData) {
16
+ role = 'treegrid';
17
+ }
18
+ return {
19
+ role,
20
+ 'aria-colcount': visibleColumns.length,
21
+ 'aria-rowcount': headerGroupingMaxDepth + 1 + pinnedRowsCount + totalRowCount,
22
+ 'aria-multiselectable': !rootProps.disableMultipleRowSelection
23
+ };
24
+ };
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.10.2
2
+ * @mui/x-data-grid v6.11.1
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -37,7 +37,7 @@ const fiFIGrid = {
37
37
  columnsPanelHideAllButton: 'Piilota kaikki',
38
38
  // Filter panel text
39
39
  filterPanelAddFilter: 'Lisää suodatin',
40
- // filterPanelRemoveAll: 'Remove all',
40
+ filterPanelRemoveAll: 'Poista kaikki',
41
41
  filterPanelDeleteIconLabel: 'Poista',
42
42
  filterPanelLogicOperator: 'Logiikkaoperaattori',
43
43
  filterPanelOperator: 'Operaattorit',
@@ -48,7 +48,7 @@ const fiFIGrid = {
48
48
  filterPanelInputPlaceholder: 'Suodattimen arvo',
49
49
  // Filter operators text
50
50
  filterOperatorContains: 'sisältää',
51
- filterOperatorEquals: 'on yhtä suuri',
51
+ filterOperatorEquals: 'on yhtä suuri kuin',
52
52
  filterOperatorStartsWith: 'alkaa',
53
53
  filterOperatorEndsWith: 'päättyy',
54
54
  filterOperatorIs: 'on',
@@ -59,35 +59,33 @@ const fiFIGrid = {
59
59
  filterOperatorOnOrBefore: 'on sama tai ennen',
60
60
  filterOperatorIsEmpty: 'on tyhjä',
61
61
  filterOperatorIsNotEmpty: 'ei ole tyhjä',
62
- filterOperatorIsAnyOf: 'mikä tahansa seuraavista',
63
- // 'filterOperator=': '=',
64
- // 'filterOperator!=': '!=',
65
- // 'filterOperator>': '>',
66
- // 'filterOperator>=': '>=',
67
- // 'filterOperator<': '<',
68
- // 'filterOperator<=': '<=',
69
-
62
+ filterOperatorIsAnyOf: 'on mikä tahansa seuraavista',
63
+ 'filterOperator=': '=',
64
+ 'filterOperator!=': '!=',
65
+ 'filterOperator>': '>',
66
+ 'filterOperator>=': '>=',
67
+ 'filterOperator<': '<',
68
+ 'filterOperator<=': '<=',
70
69
  // Header filter operators text
71
- // headerFilterOperatorContains: 'Contains',
72
- // headerFilterOperatorEquals: 'Equals',
73
- // headerFilterOperatorStartsWith: 'Starts with',
74
- // headerFilterOperatorEndsWith: 'Ends with',
75
- // headerFilterOperatorIs: 'Is',
76
- // headerFilterOperatorNot: 'Is not',
77
- // headerFilterOperatorAfter: 'Is after',
78
- // headerFilterOperatorOnOrAfter: 'Is on or after',
79
- // headerFilterOperatorBefore: 'Is before',
80
- // headerFilterOperatorOnOrBefore: 'Is on or before',
81
- // headerFilterOperatorIsEmpty: 'Is empty',
82
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
83
- // headerFilterOperatorIsAnyOf: 'Is any of',
84
- // 'headerFilterOperator=': 'Equals',
85
- // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Greater than',
87
- // 'headerFilterOperator>=': 'Greater than or equal to',
88
- // 'headerFilterOperator<': 'Less than',
89
- // 'headerFilterOperator<=': 'Less than or equal to',
90
-
70
+ headerFilterOperatorContains: 'Sisältää',
71
+ headerFilterOperatorEquals: 'On yhtä suuri kuin',
72
+ headerFilterOperatorStartsWith: 'Alkaa',
73
+ headerFilterOperatorEndsWith: 'Päättyy',
74
+ headerFilterOperatorIs: 'On',
75
+ headerFilterOperatorNot: 'Ei ole',
76
+ headerFilterOperatorAfter: 'On jälkeen',
77
+ headerFilterOperatorOnOrAfter: 'On sama tai jälkeen',
78
+ headerFilterOperatorBefore: 'On ennen',
79
+ headerFilterOperatorOnOrBefore: 'On sama tai ennen',
80
+ headerFilterOperatorIsEmpty: 'On tyhjä',
81
+ headerFilterOperatorIsNotEmpty: 'Ei ole tyhjä',
82
+ headerFilterOperatorIsAnyOf: 'On mikä tahansa seuraavista',
83
+ 'headerFilterOperator=': 'On yhtä suuri kuin',
84
+ 'headerFilterOperator!=': 'Ei ole yhtä suuri kuin',
85
+ 'headerFilterOperator>': 'Enemmän kuin',
86
+ 'headerFilterOperator>=': 'Enemmän tai yhtä paljon kuin',
87
+ 'headerFilterOperator<': 'Vähemmän kuin',
88
+ 'headerFilterOperator<=': 'Vähemmän tai yhtä paljon kuin',
91
89
  // Filter values text
92
90
  filterValueAny: 'mikä tahansa',
93
91
  filterValueTrue: 'tosi',
@@ -68,26 +68,25 @@ const heILGrid = {
68
68
  // 'filterOperator<=': '<=',
69
69
 
70
70
  // Header filter operators text
71
- // headerFilterOperatorContains: 'Contains',
72
- // headerFilterOperatorEquals: 'Equals',
73
- // headerFilterOperatorStartsWith: 'Starts with',
74
- // headerFilterOperatorEndsWith: 'Ends with',
75
- // headerFilterOperatorIs: 'Is',
76
- // headerFilterOperatorNot: 'Is not',
77
- // headerFilterOperatorAfter: 'Is after',
78
- // headerFilterOperatorOnOrAfter: 'Is on or after',
79
- // headerFilterOperatorBefore: 'Is before',
80
- // headerFilterOperatorOnOrBefore: 'Is on or before',
81
- // headerFilterOperatorIsEmpty: 'Is empty',
82
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
83
- // headerFilterOperatorIsAnyOf: 'Is any of',
84
- // 'headerFilterOperator=': 'Equals',
85
- // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Greater than',
87
- // 'headerFilterOperator>=': 'Greater than or equal to',
88
- // 'headerFilterOperator<': 'Less than',
89
- // 'headerFilterOperator<=': 'Less than or equal to',
90
-
71
+ headerFilterOperatorContains: 'מכיל',
72
+ headerFilterOperatorEquals: 'שווה',
73
+ headerFilterOperatorStartsWith: 'מתחיל ב-',
74
+ headerFilterOperatorEndsWith: 'נגמר ב-',
75
+ headerFilterOperatorIs: 'הינו',
76
+ headerFilterOperatorNot: 'אינו',
77
+ headerFilterOperatorAfter: 'אחרי',
78
+ headerFilterOperatorOnOrAfter: 'ב- או אחרי',
79
+ headerFilterOperatorBefore: 'לפני',
80
+ headerFilterOperatorOnOrBefore: 'ב- או לפני',
81
+ headerFilterOperatorIsEmpty: 'ריק',
82
+ headerFilterOperatorIsNotEmpty: 'אינו ריק',
83
+ headerFilterOperatorIsAnyOf: 'הוא אחד מ-',
84
+ 'headerFilterOperator=': 'שווה',
85
+ 'headerFilterOperator!=': 'אינו שווה',
86
+ 'headerFilterOperator>': 'גדול מ-',
87
+ 'headerFilterOperator>=': 'גדול שווה ל-',
88
+ 'headerFilterOperator<': 'קטן מ-',
89
+ 'headerFilterOperator<=': 'קטן שווה ל-',
91
90
  // Filter values text
92
91
  filterValueAny: 'כל ערך',
93
92
  filterValueTrue: 'כן',
@@ -140,15 +139,13 @@ const heILGrid = {
140
139
  expandDetailPanel: 'הרחב',
141
140
  collapseDetailPanel: 'כווץ',
142
141
  // Row reordering text
143
- rowReorderingHeaderName: 'סידור שורות'
144
-
142
+ rowReorderingHeaderName: 'סידור שורות',
145
143
  // Aggregation
146
- // aggregationMenuItemHeader: 'Aggregation',
147
- // aggregationFunctionLabelSum: 'sum',
148
- // aggregationFunctionLabelAvg: 'avg',
149
- // aggregationFunctionLabelMin: 'min',
150
- // aggregationFunctionLabelMax: 'max',
151
- // aggregationFunctionLabelSize: 'size',
144
+ aggregationMenuItemHeader: 'צבירה',
145
+ aggregationFunctionLabelSum: 'סכום',
146
+ aggregationFunctionLabelAvg: 'ממוצע',
147
+ aggregationFunctionLabelMin: 'מינימום',
148
+ aggregationFunctionLabelMax: 'מקסימום',
149
+ aggregationFunctionLabelSize: 'גודל'
152
150
  };
153
-
154
151
  export const heIL = getGridLocalization(heILGrid, heILCore);
@@ -37,7 +37,7 @@ const itITGrid = {
37
37
  columnsPanelHideAllButton: 'Nascondi tutto',
38
38
  // Filter panel text
39
39
  filterPanelAddFilter: 'Aggiungi un filtro',
40
- // filterPanelRemoveAll: 'Remove all',
40
+ filterPanelRemoveAll: 'Rimuovi filtri',
41
41
  filterPanelDeleteIconLabel: 'Rimuovi',
42
42
  filterPanelLogicOperator: 'Operatore logico',
43
43
  filterPanelOperator: 'Operatori',
@@ -60,34 +60,32 @@ const itITGrid = {
60
60
  filterOperatorIsEmpty: 'è vuoto',
61
61
  filterOperatorIsNotEmpty: 'non è vuoto',
62
62
  filterOperatorIsAnyOf: 'è uno tra',
63
- // 'filterOperator=': '=',
64
- // 'filterOperator!=': '!=',
65
- // 'filterOperator>': '>',
66
- // 'filterOperator>=': '>=',
67
- // 'filterOperator<': '<',
68
- // 'filterOperator<=': '<=',
69
-
63
+ 'filterOperator=': '=',
64
+ 'filterOperator!=': '!=',
65
+ 'filterOperator>': '>',
66
+ 'filterOperator>=': '>=',
67
+ 'filterOperator<': '<',
68
+ 'filterOperator<=': '<=',
70
69
  // Header filter operators text
71
- // headerFilterOperatorContains: 'Contains',
72
- // headerFilterOperatorEquals: 'Equals',
73
- // headerFilterOperatorStartsWith: 'Starts with',
74
- // headerFilterOperatorEndsWith: 'Ends with',
75
- // headerFilterOperatorIs: 'Is',
76
- // headerFilterOperatorNot: 'Is not',
77
- // headerFilterOperatorAfter: 'Is after',
78
- // headerFilterOperatorOnOrAfter: 'Is on or after',
79
- // headerFilterOperatorBefore: 'Is before',
80
- // headerFilterOperatorOnOrBefore: 'Is on or before',
81
- // headerFilterOperatorIsEmpty: 'Is empty',
82
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
83
- // headerFilterOperatorIsAnyOf: 'Is any of',
84
- // 'headerFilterOperator=': 'Equals',
85
- // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Greater than',
87
- // 'headerFilterOperator>=': 'Greater than or equal to',
88
- // 'headerFilterOperator<': 'Less than',
89
- // 'headerFilterOperator<=': 'Less than or equal to',
90
-
70
+ headerFilterOperatorContains: 'Contiene',
71
+ headerFilterOperatorEquals: 'uguale a',
72
+ headerFilterOperatorStartsWith: 'comincia per',
73
+ headerFilterOperatorEndsWith: 'termina per',
74
+ headerFilterOperatorIs: 'uguale a',
75
+ headerFilterOperatorNot: 'diversa da',
76
+ headerFilterOperatorAfter: 'dopo il',
77
+ headerFilterOperatorOnOrAfter: 'a partire dal',
78
+ headerFilterOperatorBefore: 'prima del',
79
+ headerFilterOperatorOnOrBefore: 'fino al',
80
+ headerFilterOperatorIsEmpty: 'è vuoto',
81
+ headerFilterOperatorIsNotEmpty: 'non è vuoto',
82
+ headerFilterOperatorIsAnyOf: 'è uno tra',
83
+ 'headerFilterOperator=': 'uguale a',
84
+ 'headerFilterOperator!=': 'diverso da',
85
+ 'headerFilterOperator>': 'maggiore di',
86
+ 'headerFilterOperator>=': 'maggiore o uguale a',
87
+ 'headerFilterOperator<': 'minore di',
88
+ 'headerFilterOperator<=': 'minore o uguale a',
91
89
  // Filter values text
92
90
  filterValueAny: 'qualunque',
93
91
  filterValueTrue: 'vero',
@@ -95,7 +93,7 @@ const itITGrid = {
95
93
  // Column menu text
96
94
  columnMenuLabel: 'Menu',
97
95
  columnMenuShowColumns: 'Mostra le colonne',
98
- // columnMenuManageColumns: 'Manage columns',
96
+ columnMenuManageColumns: 'Gestisci colonne',
99
97
  columnMenuFilter: 'Filtra',
100
98
  columnMenuHideColumn: 'Nascondi',
101
99
  columnMenuUnsort: "Annulla l'ordinamento",
@@ -139,15 +137,13 @@ const itITGrid = {
139
137
  expandDetailPanel: 'Espandi',
140
138
  collapseDetailPanel: 'Comprimi',
141
139
  // Row reordering text
142
- rowReorderingHeaderName: 'Riordinamento righe'
143
-
140
+ rowReorderingHeaderName: 'Riordinamento righe',
144
141
  // Aggregation
145
- // aggregationMenuItemHeader: 'Aggregation',
146
- // aggregationFunctionLabelSum: 'sum',
147
- // aggregationFunctionLabelAvg: 'avg',
148
- // aggregationFunctionLabelMin: 'min',
149
- // aggregationFunctionLabelMax: 'max',
150
- // aggregationFunctionLabelSize: 'size',
142
+ aggregationMenuItemHeader: 'aggregazione',
143
+ aggregationFunctionLabelSum: 'somma',
144
+ aggregationFunctionLabelAvg: 'media',
145
+ aggregationFunctionLabelMin: 'minimo',
146
+ aggregationFunctionLabelMax: 'massimo',
147
+ aggregationFunctionLabelSize: 'numero di elementi'
151
148
  };
152
-
153
149
  export const itIT = getGridLocalization(itITGrid, itITCore);
@@ -170,6 +170,7 @@ DataGridRaw.propTypes = {
170
170
  * For each feature, if the flag is not explicitly set to `true`, the feature will be fully disabled and any property / method call will not have any effect.
171
171
  */
172
172
  experimentalFeatures: _propTypes.default.shape({
173
+ ariaV7: _propTypes.default.bool,
173
174
  columnGrouping: _propTypes.default.bool,
174
175
  warnIfFocusStateIsNotSynced: _propTypes.default.bool
175
176
  }),
@@ -208,7 +209,7 @@ DataGridRaw.propTypes = {
208
209
  /**
209
210
  * Function that returns the element to render in row detail.
210
211
  * @param {GridRowParams} params With all properties from [[GridRowParams]].
211
- * @returns {JSX.Element} The row detail element.
212
+ * @returns {React.JSX.Element} The row detail element.
212
213
  */
213
214
  getDetailPanelContent: _propTypes.default.func,
214
215
  /**
@@ -20,7 +20,7 @@ const GLOBAL_API_REF = {
20
20
 
21
21
  /**
22
22
  * A tagger to determine if the filter is internal or custom user-supplied.
23
- * To be a valid internal filter, the V7 function *must* be defined/redefined at
23
+ * To be a valid internal filter, the v7 function *must* be defined/redefined at
24
24
  * the same time as the legacy one.
25
25
  * https://github.com/mui/mui-x/pull/9254#discussion_r1231095551
26
26
  */
@@ -25,7 +25,6 @@ const _excluded = ["changeReason", "unstable_updateValueOnRender"],
25
25
  _excluded2 = ["align", "children", "editCellState", "colIndex", "column", "cellMode", "field", "formattedValue", "hasFocus", "height", "isEditable", "isSelected", "rowId", "tabIndex", "value", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "colSpan", "disableDragEvents", "isNotVisible", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
26
26
  _excluded3 = ["column", "rowId", "editCellState", "align", "children", "colIndex", "height", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "colSpan", "disableDragEvents", "isNotVisible", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
27
27
  _excluded4 = ["changeReason", "unstable_updateValueOnRender"];
28
- /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
29
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
29
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
30
  const EMPTY_CELL_PARAMS = {
@@ -295,6 +294,7 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
295
294
  children = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
296
295
  className: classes.content,
297
296
  title: valueString,
297
+ role: "presentation",
298
298
  children: valueString
299
299
  });
300
300
  }
@@ -307,27 +307,32 @@ const GridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
307
307
  onDragEnter: publish('cellDragEnter', onDragEnter),
308
308
  onDragOver: publish('cellDragOver', onDragOver)
309
309
  };
310
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
311
- ref: handleRef,
312
- className: (0, _clsx.default)(className, classes.root),
313
- role: "cell",
314
- "data-field": field,
315
- "data-colindex": colIndex,
316
- "aria-colindex": colIndex + 1,
317
- "aria-colspan": colSpan,
318
- style: style,
319
- tabIndex: tabIndex,
320
- onClick: publish('cellClick', onClick),
321
- onDoubleClick: publish('cellDoubleClick', onDoubleClick),
322
- onMouseOver: publish('cellMouseOver', onMouseOver),
323
- onMouseDown: publishMouseDown('cellMouseDown'),
324
- onMouseUp: publishMouseUp('cellMouseUp'),
325
- onKeyDown: publish('cellKeyDown', onKeyDown),
326
- onKeyUp: publish('cellKeyUp', onKeyUp)
327
- }, draggableEventHandlers, other, {
328
- onFocus: handleFocus,
329
- children: children
330
- }));
310
+ const ariaV7 = rootProps.experimentalFeatures?.ariaV7;
311
+ return (
312
+ /*#__PURE__*/
313
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
314
+ (0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
315
+ ref: handleRef,
316
+ className: (0, _clsx.default)(className, classes.root),
317
+ role: ariaV7 ? 'gridcell' : 'cell',
318
+ "data-field": field,
319
+ "data-colindex": colIndex,
320
+ "aria-colindex": colIndex + 1,
321
+ "aria-colspan": colSpan,
322
+ style: style,
323
+ tabIndex: tabIndex,
324
+ onClick: publish('cellClick', onClick),
325
+ onDoubleClick: publish('cellDoubleClick', onDoubleClick),
326
+ onMouseOver: publish('cellMouseOver', onMouseOver),
327
+ onMouseDown: publishMouseDown('cellMouseDown'),
328
+ onMouseUp: publishMouseUp('cellMouseUp'),
329
+ onKeyDown: publish('cellKeyDown', onKeyDown),
330
+ onKeyUp: publish('cellKeyUp', onKeyUp)
331
+ }, draggableEventHandlers, other, {
332
+ onFocus: handleFocus,
333
+ children: children
334
+ }))
335
+ );
331
336
  });
332
337
  exports.GridCell = GridCell;
333
338
  const MemoizedCellWrapper = (0, _fastMemo.fastMemo)(GridCellWrapper);
@@ -573,6 +578,7 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
573
578
  children = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
574
579
  className: classes.content,
575
580
  title: valueString,
581
+ role: "presentation",
576
582
  children: valueString
577
583
  });
578
584
  }
@@ -585,27 +591,32 @@ const GridCellV7 = /*#__PURE__*/React.forwardRef((props, ref) => {
585
591
  onDragEnter: publish('cellDragEnter', onDragEnter),
586
592
  onDragOver: publish('cellDragOver', onDragOver)
587
593
  };
588
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
589
- ref: handleRef,
590
- className: (0, _clsx.default)(className, classNames, classes.root),
591
- role: "cell",
592
- "data-field": field,
593
- "data-colindex": colIndex,
594
- "aria-colindex": colIndex + 1,
595
- "aria-colspan": colSpan,
596
- style: style,
597
- tabIndex: tabIndex,
598
- onClick: publish('cellClick', onClick),
599
- onDoubleClick: publish('cellDoubleClick', onDoubleClick),
600
- onMouseOver: publish('cellMouseOver', onMouseOver),
601
- onMouseDown: publishMouseDown('cellMouseDown'),
602
- onMouseUp: publishMouseUp('cellMouseUp'),
603
- onKeyDown: publish('cellKeyDown', onKeyDown),
604
- onKeyUp: publish('cellKeyUp', onKeyUp)
605
- }, draggableEventHandlers, other, {
606
- onFocus: handleFocus,
607
- children: children
608
- }));
594
+ const ariaV7 = rootProps.experimentalFeatures?.ariaV7;
595
+ return (
596
+ /*#__PURE__*/
597
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
598
+ (0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
599
+ ref: handleRef,
600
+ className: (0, _clsx.default)(className, classNames, classes.root),
601
+ role: ariaV7 ? 'gridcell' : 'cell',
602
+ "data-field": field,
603
+ "data-colindex": colIndex,
604
+ "aria-colindex": colIndex + 1,
605
+ "aria-colspan": colSpan,
606
+ style: style,
607
+ tabIndex: tabIndex,
608
+ onClick: publish('cellClick', onClick),
609
+ onDoubleClick: publish('cellDoubleClick', onDoubleClick),
610
+ onMouseOver: publish('cellMouseOver', onMouseOver),
611
+ onMouseDown: publishMouseDown('cellMouseDown'),
612
+ onMouseUp: publishMouseUp('cellMouseUp'),
613
+ onKeyDown: publish('cellKeyDown', onKeyDown),
614
+ onKeyUp: publish('cellKeyUp', onKeyUp)
615
+ }, draggableEventHandlers, other, {
616
+ onFocus: handleFocus,
617
+ children: children
618
+ }))
619
+ );
609
620
  });
610
621
  process.env.NODE_ENV !== "production" ? GridCellV7.propTypes = {
611
622
  // ----------------------------- Warning --------------------------------
@@ -51,6 +51,8 @@ const GridBaseColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnH
51
51
  ref: ref,
52
52
  className: (0, _clsx.default)(className, classes.root),
53
53
  ownerState: rootProps
54
- }, other));
54
+ }, other, {
55
+ role: "presentation"
56
+ }));
55
57
  });
56
58
  exports.GridBaseColumnHeaders = GridBaseColumnHeaders;
@@ -83,10 +83,12 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
83
83
  }, other, {
84
84
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
85
85
  className: classes.draggableContainer,
86
- draggable: isDraggable
86
+ draggable: isDraggable,
87
+ role: "presentation"
87
88
  }, draggableContainerProps, {
88
89
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
89
90
  className: classes.titleContainer,
91
+ role: "presentation",
90
92
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
91
93
  className: classes.titleContainerContent,
92
94
  children: headerComponent !== undefined ? headerComponent : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnHeaderTitle.GridColumnHeaderTitle, {