@mui/x-data-grid 6.10.2 → 6.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +92 -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/cell/GridCell.js +57 -46
  7. package/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  8. package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  9. package/components/containers/GridMainContainer.js +10 -3
  10. package/components/containers/GridRoot.js +7 -13
  11. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
  12. package/hooks/features/columns/gridColumnsUtils.js +2 -2
  13. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +7 -4
  14. package/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  15. package/hooks/utils/useGridAriaAttributes.d.ts +6 -0
  16. package/hooks/utils/useGridAriaAttributes.js +25 -0
  17. package/index.js +1 -1
  18. package/legacy/DataGrid/DataGrid.js +2 -1
  19. package/legacy/colDef/utils.js +1 -1
  20. package/legacy/components/cell/GridCell.js +57 -46
  21. package/legacy/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  22. package/legacy/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  23. package/legacy/components/containers/GridMainContainer.js +10 -3
  24. package/legacy/components/containers/GridRoot.js +7 -13
  25. package/legacy/hooks/features/columns/gridColumnsUtils.js +2 -2
  26. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  27. package/legacy/hooks/utils/useGridAriaAttributes.js +25 -0
  28. package/legacy/index.js +1 -1
  29. package/legacy/locales/fiFI.js +28 -30
  30. package/legacy/locales/heIL.js +26 -29
  31. package/legacy/locales/itIT.js +34 -38
  32. package/locales/fiFI.js +28 -30
  33. package/locales/heIL.js +26 -29
  34. package/locales/itIT.js +34 -38
  35. package/models/gridFilterOperator.d.ts +1 -1
  36. package/models/props/DataGridProps.d.ts +7 -1
  37. package/modern/DataGrid/DataGrid.js +2 -1
  38. package/modern/colDef/utils.js +1 -1
  39. package/modern/components/cell/GridCell.js +54 -43
  40. package/modern/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  41. package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  42. package/modern/components/containers/GridMainContainer.js +9 -3
  43. package/modern/components/containers/GridRoot.js +6 -13
  44. package/modern/hooks/features/columns/gridColumnsUtils.js +2 -2
  45. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  46. package/modern/hooks/utils/useGridAriaAttributes.js +24 -0
  47. package/modern/index.js +1 -1
  48. package/modern/locales/fiFI.js +28 -30
  49. package/modern/locales/heIL.js +26 -29
  50. package/modern/locales/itIT.js +34 -38
  51. package/node/DataGrid/DataGrid.js +2 -1
  52. package/node/colDef/utils.js +1 -1
  53. package/node/components/cell/GridCell.js +54 -43
  54. package/node/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
  55. package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
  56. package/node/components/containers/GridMainContainer.js +10 -3
  57. package/node/components/containers/GridRoot.js +6 -13
  58. package/node/hooks/features/columns/gridColumnsUtils.js +1 -1
  59. package/node/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
  60. package/node/hooks/utils/useGridAriaAttributes.js +31 -0
  61. package/node/index.js +1 -1
  62. package/node/locales/fiFI.js +28 -30
  63. package/node/locales/heIL.js +26 -29
  64. package/node/locales/itIT.js +34 -38
  65. package/package.json +2 -2
@@ -4,7 +4,6 @@ var _excluded = ["changeReason", "unstable_updateValueOnRender"],
4
4
  _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"],
5
5
  _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"],
6
6
  _excluded4 = ["changeReason", "unstable_updateValueOnRender"];
7
- /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
8
7
  import * as React from 'react';
9
8
  import PropTypes from 'prop-types';
10
9
  import clsx from 'clsx';
@@ -150,7 +149,7 @@ var GridCellWrapper = /*#__PURE__*/React.forwardRef(function (props, ref) {
150
149
  return /*#__PURE__*/React.createElement(CellComponent, cellProps);
151
150
  });
152
151
  var GridCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
153
- var _rootProps$experiment;
152
+ var _rootProps$experiment, _rootProps$experiment2;
154
153
  var align = props.align,
155
154
  childrenProp = props.children,
156
155
  editCellState = props.editCellState,
@@ -288,6 +287,7 @@ var GridCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
288
287
  children = /*#__PURE__*/_jsx("div", {
289
288
  className: classes.content,
290
289
  title: valueString,
290
+ role: "presentation",
291
291
  children: valueString
292
292
  });
293
293
  }
@@ -300,27 +300,32 @@ var GridCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
300
300
  onDragEnter: publish('cellDragEnter', onDragEnter),
301
301
  onDragOver: publish('cellDragOver', onDragOver)
302
302
  };
303
- return /*#__PURE__*/_jsx("div", _extends({
304
- ref: handleRef,
305
- className: clsx(className, classes.root),
306
- role: "cell",
307
- "data-field": field,
308
- "data-colindex": colIndex,
309
- "aria-colindex": colIndex + 1,
310
- "aria-colspan": colSpan,
311
- style: style,
312
- tabIndex: tabIndex,
313
- onClick: publish('cellClick', onClick),
314
- onDoubleClick: publish('cellDoubleClick', onDoubleClick),
315
- onMouseOver: publish('cellMouseOver', onMouseOver),
316
- onMouseDown: publishMouseDown('cellMouseDown'),
317
- onMouseUp: publishMouseUp('cellMouseUp'),
318
- onKeyDown: publish('cellKeyDown', onKeyDown),
319
- onKeyUp: publish('cellKeyUp', onKeyUp)
320
- }, draggableEventHandlers, other, {
321
- onFocus: handleFocus,
322
- children: children
323
- }));
303
+ var ariaV7 = (_rootProps$experiment2 = rootProps.experimentalFeatures) == null ? void 0 : _rootProps$experiment2.ariaV7;
304
+ return (
305
+ /*#__PURE__*/
306
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
307
+ _jsx("div", _extends({
308
+ ref: handleRef,
309
+ className: clsx(className, classes.root),
310
+ role: ariaV7 ? 'gridcell' : 'cell',
311
+ "data-field": field,
312
+ "data-colindex": colIndex,
313
+ "aria-colindex": colIndex + 1,
314
+ "aria-colspan": colSpan,
315
+ style: style,
316
+ tabIndex: tabIndex,
317
+ onClick: publish('cellClick', onClick),
318
+ onDoubleClick: publish('cellDoubleClick', onDoubleClick),
319
+ onMouseOver: publish('cellMouseOver', onMouseOver),
320
+ onMouseDown: publishMouseDown('cellMouseDown'),
321
+ onMouseUp: publishMouseUp('cellMouseUp'),
322
+ onKeyDown: publish('cellKeyDown', onKeyDown),
323
+ onKeyUp: publish('cellKeyUp', onKeyUp)
324
+ }, draggableEventHandlers, other, {
325
+ onFocus: handleFocus,
326
+ children: children
327
+ }))
328
+ );
324
329
  });
325
330
  var MemoizedCellWrapper = fastMemo(GridCellWrapper);
326
331
  process.env.NODE_ENV !== "production" ? GridCellWrapper.propTypes = {
@@ -380,7 +385,7 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
380
385
  } : void 0;
381
386
  export { MemoizedCellWrapper as GridCellWrapper, GridCell };
382
387
  var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
383
- var _rootProps$experiment2;
388
+ var _rootProps$experiment3, _rootProps$experiment4;
384
389
  var column = props.column,
385
390
  rowId = props.rowId,
386
391
  editCellState = props.editCellState,
@@ -533,7 +538,7 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
533
538
  return null;
534
539
  }
535
540
  var handleFocus = other.onFocus;
536
- if (process.env.NODE_ENV === 'test' && (_rootProps$experiment2 = rootProps.experimentalFeatures) != null && _rootProps$experiment2.warnIfFocusStateIsNotSynced) {
541
+ if (process.env.NODE_ENV === 'test' && (_rootProps$experiment3 = rootProps.experimentalFeatures) != null && _rootProps$experiment3.warnIfFocusStateIsNotSynced) {
537
542
  handleFocus = function handleFocus(event) {
538
543
  var focusedCell = gridFocusCellSelector(apiRef);
539
544
  if ((focusedCell == null ? void 0 : focusedCell.id) === rowId && focusedCell.field === field) {
@@ -573,6 +578,7 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
573
578
  children = /*#__PURE__*/_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 @@ var GridCellV7 = /*#__PURE__*/React.forwardRef(function (props, ref) {
585
591
  onDragEnter: publish('cellDragEnter', onDragEnter),
586
592
  onDragOver: publish('cellDragOver', onDragOver)
587
593
  };
588
- return /*#__PURE__*/_jsx("div", _extends({
589
- ref: handleRef,
590
- className: clsx(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
+ var ariaV7 = (_rootProps$experiment4 = rootProps.experimentalFeatures) == null ? void 0 : _rootProps$experiment4.ariaV7;
595
+ return (
596
+ /*#__PURE__*/
597
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
598
+ _jsx("div", _extends({
599
+ ref: handleRef,
600
+ className: clsx(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 --------------------------------
@@ -40,5 +40,7 @@ export var GridBaseColumnHeaders = /*#__PURE__*/React.forwardRef(function GridCo
40
40
  ref: ref,
41
41
  className: clsx(className, classes.root),
42
42
  ownerState: rootProps
43
- }, other));
43
+ }, other, {
44
+ role: "presentation"
45
+ }));
44
46
  });
@@ -81,10 +81,12 @@ var GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridGen
81
81
  }, other, {
82
82
  children: [/*#__PURE__*/_jsxs("div", _extends({
83
83
  className: classes.draggableContainer,
84
- draggable: isDraggable
84
+ draggable: isDraggable,
85
+ role: "presentation"
85
86
  }, draggableContainerProps, {
86
87
  children: [/*#__PURE__*/_jsxs("div", {
87
88
  className: classes.titleContainer,
89
+ role: "presentation",
88
90
  children: [/*#__PURE__*/_jsx("div", {
89
91
  className: classes.titleContainerContent,
90
92
  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
  var useUtilityClasses = function useUtilityClasses(ownerState) {
8
10
  var classes = ownerState.classes;
@@ -27,12 +29,17 @@ var GridMainContainerRoot = styled('div', {
27
29
  };
28
30
  });
29
31
  export var GridMainContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
32
+ var _rootProps$experiment;
30
33
  var rootProps = useGridRootProps();
31
34
  var classes = useUtilityClasses(rootProps);
32
- return /*#__PURE__*/_jsx(GridMainContainerRoot, {
35
+ var getAriaAttributes = (_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.ariaV7 // ariaV7 should never change
36
+ ? useGridAriaAttributes : null;
37
+ var ariaAttributes = typeof getAriaAttributes === 'function' ? getAriaAttributes() : null;
38
+ return /*#__PURE__*/_jsx(GridMainContainerRoot, _extends({
33
39
  ref: ref,
34
40
  className: classes.root,
35
- ownerState: rootProps,
41
+ ownerState: rootProps
42
+ }, ariaAttributes, {
36
43
  children: props.children
37
- });
44
+ }));
38
45
  });
@@ -7,14 +7,12 @@ import PropTypes from 'prop-types';
7
7
  import clsx from 'clsx';
8
8
  import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_capitalize as capitalize, unstable_composeClasses as composeClasses } from '@mui/utils';
9
9
  import { GridRootStyles } from './GridRootStyles';
10
- import { gridVisibleColumnDefinitionsSelector } from '../../hooks/features/columns/gridColumnsSelector';
11
10
  import { useGridSelector } from '../../hooks/utils/useGridSelector';
12
11
  import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
13
12
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
14
13
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
15
14
  import { gridDensityValueSelector } from '../../hooks/features/density/densitySelector';
16
- import { gridColumnGroupsHeaderMaxDepthSelector } from '../../hooks/features/columnGrouping/gridColumnGroupsSelector';
17
- import { gridPinnedRowsCountSelector, gridRowCountSelector } from '../../hooks/features/rows/gridRowsSelector';
15
+ import { useGridAriaAttributes } from '../../hooks/utils/useGridAriaAttributes';
18
16
  import { jsx as _jsx } from "react/jsx-runtime";
19
17
  var useUtilityClasses = function useUtilityClasses(ownerState) {
20
18
  var autoHeight = ownerState.autoHeight,
@@ -26,18 +24,18 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
26
24
  return composeClasses(slots, getDataGridUtilityClass, classes);
27
25
  };
28
26
  var GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
27
+ var _rootProps$experiment;
29
28
  var rootProps = useGridRootProps();
30
29
  var children = props.children,
31
30
  className = props.className,
32
31
  other = _objectWithoutProperties(props, _excluded);
33
32
  var apiRef = useGridPrivateApiContext();
34
- var visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
35
- var totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
36
33
  var densityValue = useGridSelector(apiRef, gridDensityValueSelector);
37
- var headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
38
34
  var rootContainerRef = React.useRef(null);
39
35
  var handleRef = useForkRef(rootContainerRef, ref);
40
- var pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
36
+ var getAriaAttributes = (_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.ariaV7 // ariaV7 should never change
37
+ ? null : useGridAriaAttributes;
38
+ var ariaAttributes = typeof getAriaAttributes === 'function' ? getAriaAttributes() : null;
41
39
  var ownerState = _extends({}, rootProps, {
42
40
  density: densityValue
43
41
  });
@@ -60,12 +58,8 @@ var GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
60
58
  return /*#__PURE__*/_jsx(GridRootStyles, _extends({
61
59
  ref: handleRef,
62
60
  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, {
61
+ ownerState: ownerState
62
+ }, ariaAttributes, other, {
69
63
  children: children
70
64
  }));
71
65
  });
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- import { DEFAULT_GRID_COL_TYPE_KEY } from '../../../colDef';
5
+ import { DEFAULT_GRID_COL_TYPE_KEY, GRID_STRING_COL_DEF } from '../../../colDef';
6
6
  import { gridColumnsStateSelector, gridColumnVisibilityModelSelector } from './gridColumnsSelector';
7
7
  import { clamp } from '../../../utils/utils';
8
8
  import { gridDensityFactorSelector } from '../density/densitySelector';
@@ -130,7 +130,7 @@ export var hydrateColumnsWidth = function hydrateColumnsWidth(rawState, viewport
130
130
  computedWidth = 0;
131
131
  flexColumns.push(newColumn);
132
132
  } else {
133
- computedWidth = clamp(newColumn.width, newColumn.minWidth, newColumn.maxWidth);
133
+ computedWidth = clamp(newColumn.width || GRID_STRING_COL_DEF.width, newColumn.minWidth || GRID_STRING_COL_DEF.minWidth, newColumn.maxWidth || GRID_STRING_COL_DEF.maxWidth);
134
134
  }
135
135
  widthAllocatedBeforeFlex += computedWidth;
136
136
  newColumn.computedWidth = computedWidth;
@@ -580,19 +580,22 @@ export var useGridVirtualScroller = function useGridVirtualScroller(props) {
580
580
  onWheel: handleWheel,
581
581
  onTouchMove: handleTouchMove
582
582
  }, inputProps, {
583
- style: inputProps.style ? _extends({}, inputProps.style, rootStyle) : rootStyle
583
+ style: inputProps.style ? _extends({}, inputProps.style, rootStyle) : rootStyle,
584
+ role: 'presentation'
584
585
  });
585
586
  },
586
587
  getContentProps: function getContentProps() {
587
588
  var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
588
589
  style = _ref6.style;
589
590
  return {
590
- style: style ? _extends({}, style, contentSize) : contentSize
591
+ style: style ? _extends({}, style, contentSize) : contentSize,
592
+ role: 'presentation'
591
593
  };
592
594
  },
593
595
  getRenderZoneProps: function getRenderZoneProps() {
594
596
  return {
595
- ref: renderZoneRef
597
+ ref: renderZoneRef,
598
+ role: 'rowgroup'
596
599
  };
597
600
  }
598
601
  };
@@ -0,0 +1,25 @@
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 var useGridAriaAttributes = function useGridAriaAttributes() {
8
+ var _rootProps$experiment;
9
+ var apiRef = useGridPrivateApiContext();
10
+ var rootProps = useGridRootProps();
11
+ var visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
12
+ var totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
13
+ var headerGroupingMaxDepth = useGridSelector(apiRef, gridColumnGroupsHeaderMaxDepthSelector);
14
+ var pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
15
+ var role = 'grid';
16
+ if ((_rootProps$experiment = rootProps.experimentalFeatures) != null && _rootProps$experiment.ariaV7 && rootProps.treeData) {
17
+ role = 'treegrid';
18
+ }
19
+ return {
20
+ role: role,
21
+ 'aria-colcount': visibleColumns.length,
22
+ 'aria-rowcount': headerGroupingMaxDepth + 1 + pinnedRowsCount + totalRowCount,
23
+ 'aria-multiselectable': !rootProps.disableMultipleRowSelection
24
+ };
25
+ };
package/legacy/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v6.10.2
2
+ * @mui/x-data-grid v6.11.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -39,7 +39,7 @@ var fiFIGrid = {
39
39
  columnsPanelHideAllButton: 'Piilota kaikki',
40
40
  // Filter panel text
41
41
  filterPanelAddFilter: 'Lisää suodatin',
42
- // filterPanelRemoveAll: 'Remove all',
42
+ filterPanelRemoveAll: 'Poista kaikki',
43
43
  filterPanelDeleteIconLabel: 'Poista',
44
44
  filterPanelLogicOperator: 'Logiikkaoperaattori',
45
45
  filterPanelOperator: 'Operaattorit',
@@ -50,7 +50,7 @@ var fiFIGrid = {
50
50
  filterPanelInputPlaceholder: 'Suodattimen arvo',
51
51
  // Filter operators text
52
52
  filterOperatorContains: 'sisältää',
53
- filterOperatorEquals: 'on yhtä suuri',
53
+ filterOperatorEquals: 'on yhtä suuri kuin',
54
54
  filterOperatorStartsWith: 'alkaa',
55
55
  filterOperatorEndsWith: 'päättyy',
56
56
  filterOperatorIs: 'on',
@@ -61,35 +61,33 @@ var fiFIGrid = {
61
61
  filterOperatorOnOrBefore: 'on sama tai ennen',
62
62
  filterOperatorIsEmpty: 'on tyhjä',
63
63
  filterOperatorIsNotEmpty: 'ei ole tyhjä',
64
- filterOperatorIsAnyOf: 'mikä tahansa seuraavista',
65
- // 'filterOperator=': '=',
66
- // 'filterOperator!=': '!=',
67
- // 'filterOperator>': '>',
68
- // 'filterOperator>=': '>=',
69
- // 'filterOperator<': '<',
70
- // 'filterOperator<=': '<=',
71
-
64
+ filterOperatorIsAnyOf: 'on mikä tahansa seuraavista',
65
+ 'filterOperator=': '=',
66
+ 'filterOperator!=': '!=',
67
+ 'filterOperator>': '>',
68
+ 'filterOperator>=': '>=',
69
+ 'filterOperator<': '<',
70
+ 'filterOperator<=': '<=',
72
71
  // Header filter operators text
73
- // headerFilterOperatorContains: 'Contains',
74
- // headerFilterOperatorEquals: 'Equals',
75
- // headerFilterOperatorStartsWith: 'Starts with',
76
- // headerFilterOperatorEndsWith: 'Ends with',
77
- // headerFilterOperatorIs: 'Is',
78
- // headerFilterOperatorNot: 'Is not',
79
- // headerFilterOperatorAfter: 'Is after',
80
- // headerFilterOperatorOnOrAfter: 'Is on or after',
81
- // headerFilterOperatorBefore: 'Is before',
82
- // headerFilterOperatorOnOrBefore: 'Is on or before',
83
- // headerFilterOperatorIsEmpty: 'Is empty',
84
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
85
- // headerFilterOperatorIsAnyOf: 'Is any of',
86
- // 'headerFilterOperator=': 'Equals',
87
- // 'headerFilterOperator!=': 'Not equals',
88
- // 'headerFilterOperator>': 'Greater than',
89
- // 'headerFilterOperator>=': 'Greater than or equal to',
90
- // 'headerFilterOperator<': 'Less than',
91
- // 'headerFilterOperator<=': 'Less than or equal to',
92
-
72
+ headerFilterOperatorContains: 'Sisältää',
73
+ headerFilterOperatorEquals: 'On yhtä suuri kuin',
74
+ headerFilterOperatorStartsWith: 'Alkaa',
75
+ headerFilterOperatorEndsWith: 'Päättyy',
76
+ headerFilterOperatorIs: 'On',
77
+ headerFilterOperatorNot: 'Ei ole',
78
+ headerFilterOperatorAfter: 'On jälkeen',
79
+ headerFilterOperatorOnOrAfter: 'On sama tai jälkeen',
80
+ headerFilterOperatorBefore: 'On ennen',
81
+ headerFilterOperatorOnOrBefore: 'On sama tai ennen',
82
+ headerFilterOperatorIsEmpty: 'On tyhjä',
83
+ headerFilterOperatorIsNotEmpty: 'Ei ole tyhjä',
84
+ headerFilterOperatorIsAnyOf: 'On mikä tahansa seuraavista',
85
+ 'headerFilterOperator=': 'On yhtä suuri kuin',
86
+ 'headerFilterOperator!=': 'Ei ole yhtä suuri kuin',
87
+ 'headerFilterOperator>': 'Enemmän kuin',
88
+ 'headerFilterOperator>=': 'Enemmän tai yhtä paljon kuin',
89
+ 'headerFilterOperator<': 'Vähemmän kuin',
90
+ 'headerFilterOperator<=': 'Vähemmän tai yhtä paljon kuin',
93
91
  // Filter values text
94
92
  filterValueAny: 'mikä tahansa',
95
93
  filterValueTrue: 'tosi',
@@ -70,26 +70,25 @@ var heILGrid = {
70
70
  // 'filterOperator<=': '<=',
71
71
 
72
72
  // Header filter operators text
73
- // headerFilterOperatorContains: 'Contains',
74
- // headerFilterOperatorEquals: 'Equals',
75
- // headerFilterOperatorStartsWith: 'Starts with',
76
- // headerFilterOperatorEndsWith: 'Ends with',
77
- // headerFilterOperatorIs: 'Is',
78
- // headerFilterOperatorNot: 'Is not',
79
- // headerFilterOperatorAfter: 'Is after',
80
- // headerFilterOperatorOnOrAfter: 'Is on or after',
81
- // headerFilterOperatorBefore: 'Is before',
82
- // headerFilterOperatorOnOrBefore: 'Is on or before',
83
- // headerFilterOperatorIsEmpty: 'Is empty',
84
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
85
- // headerFilterOperatorIsAnyOf: 'Is any of',
86
- // 'headerFilterOperator=': 'Equals',
87
- // 'headerFilterOperator!=': 'Not equals',
88
- // 'headerFilterOperator>': 'Greater than',
89
- // 'headerFilterOperator>=': 'Greater than or equal to',
90
- // 'headerFilterOperator<': 'Less than',
91
- // 'headerFilterOperator<=': 'Less than or equal to',
92
-
73
+ headerFilterOperatorContains: 'מכיל',
74
+ headerFilterOperatorEquals: 'שווה',
75
+ headerFilterOperatorStartsWith: 'מתחיל ב-',
76
+ headerFilterOperatorEndsWith: 'נגמר ב-',
77
+ headerFilterOperatorIs: 'הינו',
78
+ headerFilterOperatorNot: 'אינו',
79
+ headerFilterOperatorAfter: 'אחרי',
80
+ headerFilterOperatorOnOrAfter: 'ב- או אחרי',
81
+ headerFilterOperatorBefore: 'לפני',
82
+ headerFilterOperatorOnOrBefore: 'ב- או לפני',
83
+ headerFilterOperatorIsEmpty: 'ריק',
84
+ headerFilterOperatorIsNotEmpty: 'אינו ריק',
85
+ headerFilterOperatorIsAnyOf: 'הוא אחד מ-',
86
+ 'headerFilterOperator=': 'שווה',
87
+ 'headerFilterOperator!=': 'אינו שווה',
88
+ 'headerFilterOperator>': 'גדול מ-',
89
+ 'headerFilterOperator>=': 'גדול שווה ל-',
90
+ 'headerFilterOperator<': 'קטן מ-',
91
+ 'headerFilterOperator<=': 'קטן שווה ל-',
93
92
  // Filter values text
94
93
  filterValueAny: 'כל ערך',
95
94
  filterValueTrue: 'כן',
@@ -152,15 +151,13 @@ var heILGrid = {
152
151
  expandDetailPanel: 'הרחב',
153
152
  collapseDetailPanel: 'כווץ',
154
153
  // Row reordering text
155
- rowReorderingHeaderName: 'סידור שורות'
156
-
154
+ rowReorderingHeaderName: 'סידור שורות',
157
155
  // Aggregation
158
- // aggregationMenuItemHeader: 'Aggregation',
159
- // aggregationFunctionLabelSum: 'sum',
160
- // aggregationFunctionLabelAvg: 'avg',
161
- // aggregationFunctionLabelMin: 'min',
162
- // aggregationFunctionLabelMax: 'max',
163
- // aggregationFunctionLabelSize: 'size',
156
+ aggregationMenuItemHeader: 'צבירה',
157
+ aggregationFunctionLabelSum: 'סכום',
158
+ aggregationFunctionLabelAvg: 'ממוצע',
159
+ aggregationFunctionLabelMin: 'מינימום',
160
+ aggregationFunctionLabelMax: 'מקסימום',
161
+ aggregationFunctionLabelSize: 'גודל'
164
162
  };
165
-
166
163
  export var heIL = getGridLocalization(heILGrid, heILCore);
@@ -39,7 +39,7 @@ var itITGrid = {
39
39
  columnsPanelHideAllButton: 'Nascondi tutto',
40
40
  // Filter panel text
41
41
  filterPanelAddFilter: 'Aggiungi un filtro',
42
- // filterPanelRemoveAll: 'Remove all',
42
+ filterPanelRemoveAll: 'Rimuovi filtri',
43
43
  filterPanelDeleteIconLabel: 'Rimuovi',
44
44
  filterPanelLogicOperator: 'Operatore logico',
45
45
  filterPanelOperator: 'Operatori',
@@ -62,34 +62,32 @@ var itITGrid = {
62
62
  filterOperatorIsEmpty: 'è vuoto',
63
63
  filterOperatorIsNotEmpty: 'non è vuoto',
64
64
  filterOperatorIsAnyOf: 'è uno tra',
65
- // 'filterOperator=': '=',
66
- // 'filterOperator!=': '!=',
67
- // 'filterOperator>': '>',
68
- // 'filterOperator>=': '>=',
69
- // 'filterOperator<': '<',
70
- // 'filterOperator<=': '<=',
71
-
65
+ 'filterOperator=': '=',
66
+ 'filterOperator!=': '!=',
67
+ 'filterOperator>': '>',
68
+ 'filterOperator>=': '>=',
69
+ 'filterOperator<': '<',
70
+ 'filterOperator<=': '<=',
72
71
  // Header filter operators text
73
- // headerFilterOperatorContains: 'Contains',
74
- // headerFilterOperatorEquals: 'Equals',
75
- // headerFilterOperatorStartsWith: 'Starts with',
76
- // headerFilterOperatorEndsWith: 'Ends with',
77
- // headerFilterOperatorIs: 'Is',
78
- // headerFilterOperatorNot: 'Is not',
79
- // headerFilterOperatorAfter: 'Is after',
80
- // headerFilterOperatorOnOrAfter: 'Is on or after',
81
- // headerFilterOperatorBefore: 'Is before',
82
- // headerFilterOperatorOnOrBefore: 'Is on or before',
83
- // headerFilterOperatorIsEmpty: 'Is empty',
84
- // headerFilterOperatorIsNotEmpty: 'Is not empty',
85
- // headerFilterOperatorIsAnyOf: 'Is any of',
86
- // 'headerFilterOperator=': 'Equals',
87
- // 'headerFilterOperator!=': 'Not equals',
88
- // 'headerFilterOperator>': 'Greater than',
89
- // 'headerFilterOperator>=': 'Greater than or equal to',
90
- // 'headerFilterOperator<': 'Less than',
91
- // 'headerFilterOperator<=': 'Less than or equal to',
92
-
72
+ headerFilterOperatorContains: 'Contiene',
73
+ headerFilterOperatorEquals: 'uguale a',
74
+ headerFilterOperatorStartsWith: 'comincia per',
75
+ headerFilterOperatorEndsWith: 'termina per',
76
+ headerFilterOperatorIs: 'uguale a',
77
+ headerFilterOperatorNot: 'diversa da',
78
+ headerFilterOperatorAfter: 'dopo il',
79
+ headerFilterOperatorOnOrAfter: 'a partire dal',
80
+ headerFilterOperatorBefore: 'prima del',
81
+ headerFilterOperatorOnOrBefore: 'fino al',
82
+ headerFilterOperatorIsEmpty: 'è vuoto',
83
+ headerFilterOperatorIsNotEmpty: 'non è vuoto',
84
+ headerFilterOperatorIsAnyOf: 'è uno tra',
85
+ 'headerFilterOperator=': 'uguale a',
86
+ 'headerFilterOperator!=': 'diverso da',
87
+ 'headerFilterOperator>': 'maggiore di',
88
+ 'headerFilterOperator>=': 'maggiore o uguale a',
89
+ 'headerFilterOperator<': 'minore di',
90
+ 'headerFilterOperator<=': 'minore o uguale a',
93
91
  // Filter values text
94
92
  filterValueAny: 'qualunque',
95
93
  filterValueTrue: 'vero',
@@ -97,7 +95,7 @@ var itITGrid = {
97
95
  // Column menu text
98
96
  columnMenuLabel: 'Menu',
99
97
  columnMenuShowColumns: 'Mostra le colonne',
100
- // columnMenuManageColumns: 'Manage columns',
98
+ columnMenuManageColumns: 'Gestisci colonne',
101
99
  columnMenuFilter: 'Filtra',
102
100
  columnMenuHideColumn: 'Nascondi',
103
101
  columnMenuUnsort: "Annulla l'ordinamento",
@@ -151,15 +149,13 @@ var itITGrid = {
151
149
  expandDetailPanel: 'Espandi',
152
150
  collapseDetailPanel: 'Comprimi',
153
151
  // Row reordering text
154
- rowReorderingHeaderName: 'Riordinamento righe'
155
-
152
+ rowReorderingHeaderName: 'Riordinamento righe',
156
153
  // Aggregation
157
- // aggregationMenuItemHeader: 'Aggregation',
158
- // aggregationFunctionLabelSum: 'sum',
159
- // aggregationFunctionLabelAvg: 'avg',
160
- // aggregationFunctionLabelMin: 'min',
161
- // aggregationFunctionLabelMax: 'max',
162
- // aggregationFunctionLabelSize: 'size',
154
+ aggregationMenuItemHeader: 'aggregazione',
155
+ aggregationFunctionLabelSum: 'somma',
156
+ aggregationFunctionLabelAvg: 'media',
157
+ aggregationFunctionLabelMin: 'minimo',
158
+ aggregationFunctionLabelMax: 'massimo',
159
+ aggregationFunctionLabelSize: 'numero di elementi'
163
160
  };
164
-
165
161
  export var itIT = getGridLocalization(itITGrid, itITCore);