@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.
- package/CHANGELOG.md +92 -0
- package/DataGrid/DataGrid.d.ts +1 -1
- package/DataGrid/DataGrid.js +2 -1
- package/colDef/utils.d.ts +1 -1
- package/colDef/utils.js +1 -1
- package/components/cell/GridCell.js +57 -46
- package/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
- package/components/containers/GridMainContainer.js +10 -3
- package/components/containers/GridRoot.js +7 -13
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +7 -4
- package/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
- package/hooks/utils/useGridAriaAttributes.d.ts +6 -0
- package/hooks/utils/useGridAriaAttributes.js +25 -0
- package/index.js +1 -1
- package/legacy/DataGrid/DataGrid.js +2 -1
- package/legacy/colDef/utils.js +1 -1
- package/legacy/components/cell/GridCell.js +57 -46
- package/legacy/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
- package/legacy/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
- package/legacy/components/containers/GridMainContainer.js +10 -3
- package/legacy/components/containers/GridRoot.js +7 -13
- package/legacy/hooks/features/columns/gridColumnsUtils.js +2 -2
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
- package/legacy/hooks/utils/useGridAriaAttributes.js +25 -0
- package/legacy/index.js +1 -1
- package/legacy/locales/fiFI.js +28 -30
- package/legacy/locales/heIL.js +26 -29
- package/legacy/locales/itIT.js +34 -38
- package/locales/fiFI.js +28 -30
- package/locales/heIL.js +26 -29
- package/locales/itIT.js +34 -38
- package/models/gridFilterOperator.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +7 -1
- package/modern/DataGrid/DataGrid.js +2 -1
- package/modern/colDef/utils.js +1 -1
- package/modern/components/cell/GridCell.js +54 -43
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
- package/modern/components/containers/GridMainContainer.js +9 -3
- package/modern/components/containers/GridRoot.js +6 -13
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
- package/modern/hooks/utils/useGridAriaAttributes.js +24 -0
- package/modern/index.js +1 -1
- package/modern/locales/fiFI.js +28 -30
- package/modern/locales/heIL.js +26 -29
- package/modern/locales/itIT.js +34 -38
- package/node/DataGrid/DataGrid.js +2 -1
- package/node/colDef/utils.js +1 -1
- package/node/components/cell/GridCell.js +54 -43
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +3 -1
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -1
- package/node/components/containers/GridMainContainer.js +10 -3
- package/node/components/containers/GridRoot.js +6 -13
- package/node/hooks/features/columns/gridColumnsUtils.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +6 -3
- package/node/hooks/utils/useGridAriaAttributes.js +31 -0
- package/node/index.js +1 -1
- package/node/locales/fiFI.js +28 -30
- package/node/locales/heIL.js +26 -29
- package/node/locales/itIT.js +34 -38
- 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
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
"
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
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$
|
|
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$
|
|
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
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
"
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
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 --------------------------------
|
|
@@ -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
|
-
|
|
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 {
|
|
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
|
|
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
|
-
|
|
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
package/legacy/locales/fiFI.js
CHANGED
|
@@ -39,7 +39,7 @@ var fiFIGrid = {
|
|
|
39
39
|
columnsPanelHideAllButton: 'Piilota kaikki',
|
|
40
40
|
// Filter panel text
|
|
41
41
|
filterPanelAddFilter: 'Lisää suodatin',
|
|
42
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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',
|
package/legacy/locales/heIL.js
CHANGED
|
@@ -70,26 +70,25 @@ var heILGrid = {
|
|
|
70
70
|
// 'filterOperator<=': '<=',
|
|
71
71
|
|
|
72
72
|
// Header filter operators text
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
156
|
+
aggregationMenuItemHeader: 'צבירה',
|
|
157
|
+
aggregationFunctionLabelSum: 'סכום',
|
|
158
|
+
aggregationFunctionLabelAvg: 'ממוצע',
|
|
159
|
+
aggregationFunctionLabelMin: 'מינימום',
|
|
160
|
+
aggregationFunctionLabelMax: 'מקסימום',
|
|
161
|
+
aggregationFunctionLabelSize: 'גודל'
|
|
164
162
|
};
|
|
165
|
-
|
|
166
163
|
export var heIL = getGridLocalization(heILGrid, heILCore);
|
package/legacy/locales/itIT.js
CHANGED
|
@@ -39,7 +39,7 @@ var itITGrid = {
|
|
|
39
39
|
columnsPanelHideAllButton: 'Nascondi tutto',
|
|
40
40
|
// Filter panel text
|
|
41
41
|
filterPanelAddFilter: 'Aggiungi un filtro',
|
|
42
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
'filterOperator=': '=',
|
|
66
|
+
'filterOperator!=': '!=',
|
|
67
|
+
'filterOperator>': '>',
|
|
68
|
+
'filterOperator>=': '>=',
|
|
69
|
+
'filterOperator<': '<',
|
|
70
|
+
'filterOperator<=': '<=',
|
|
72
71
|
// Header filter operators text
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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);
|