@progress/kendo-react-grid 5.10.0-dev.202211241147 → 5.10.0-dev.202212021149
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/dist/cdn/js/kendo-react-grid.js +1 -1
- package/dist/es/Grid.js +3 -3
- package/dist/es/cells/GridGroupCell.js +15 -7
- package/dist/es/drag/GroupingIndicator.js +1 -1
- package/dist/es/header/FilterRow.js +1 -1
- package/dist/es/header/GroupPanel.js +2 -2
- package/dist/es/header/Header.js +1 -1
- package/dist/es/header/HeaderRow.js +1 -1
- package/dist/es/interfaces/GridCellProps.d.ts +4 -0
- package/dist/es/interfaces/GridProps.d.ts +6 -0
- package/dist/es/messages/index.d.ts +5 -0
- package/dist/es/messages/index.js +5 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/Grid.js +3 -3
- package/dist/npm/cells/GridGroupCell.js +14 -6
- package/dist/npm/drag/GroupingIndicator.js +1 -1
- package/dist/npm/header/FilterRow.js +1 -1
- package/dist/npm/header/GroupPanel.js +1 -1
- package/dist/npm/header/Header.js +1 -1
- package/dist/npm/header/HeaderRow.js +1 -1
- package/dist/npm/interfaces/GridCellProps.d.ts +4 -0
- package/dist/npm/interfaces/GridProps.d.ts +6 -0
- package/dist/npm/messages/index.d.ts +5 -0
- package/dist/npm/messages/index.js +6 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
package/dist/es/Grid.js
CHANGED
|
@@ -513,7 +513,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
if (column.cell) {
|
|
516
|
-
return React.createElement(column.cell, __assign({ key: columnKey }, cellProps));
|
|
516
|
+
return React.createElement(column.cell, __assign({ key: columnKey }, cellProps, { locked: _this.props.lockGroups }));
|
|
517
517
|
}
|
|
518
518
|
return currentColumnIsInEdit
|
|
519
519
|
? React.createElement(GridEditCell, __assign({ key: columnKey }, cellProps))
|
|
@@ -570,7 +570,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
570
570
|
currentAriaRowIndex = absoluteIndex + rowIndexStart + detailRowCount_1;
|
|
571
571
|
body.push((React.createElement("tr", { key: detailRowId, className: isAlt ? 'k-detail-row k-alt' : 'k-detail-row', style: { visibility: hidden(rowIndex) ? 'hidden' : '' }, role: "row", "aria-rowindex": currentAriaRowIndex },
|
|
572
572
|
_this.props.group && _this.props.group.map(function (group, idx) {
|
|
573
|
-
return (React.createElement(GridGroupCell, { id: '', dataIndex: item.dataIndex, field: group.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false }));
|
|
573
|
+
return (React.createElement(GridGroupCell, { id: '', dataIndex: item.dataIndex, field: group.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false, locked: _this.props.lockGroups }));
|
|
574
574
|
}),
|
|
575
575
|
_this.props.expandField &&
|
|
576
576
|
React.createElement(GridDetailHierarchyCell, { id: navigationTools.generateNavigatableId("".concat(detailRowId, "-dhcell"), idPrefix) }),
|
|
@@ -774,7 +774,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
774
774
|
columnIndexOffset++;
|
|
775
775
|
}
|
|
776
776
|
for (var i = 0; i < groupCount; i++) {
|
|
777
|
-
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell, field: 'value' }));
|
|
777
|
+
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell, field: 'value', locked: this.props.lockGroups }));
|
|
778
778
|
columnIndexOffset++;
|
|
779
779
|
}
|
|
780
780
|
this._columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { Keys } from '@progress/kendo-react-common';
|
|
12
|
+
import { classNames, Keys } from '@progress/kendo-react-common';
|
|
13
13
|
import { useTableKeyboardNavigation } from '@progress/kendo-react-data-tools';
|
|
14
14
|
import { useLocalization } from '@progress/kendo-react-intl';
|
|
15
15
|
import * as React from 'react';
|
|
@@ -38,14 +38,10 @@ export var GridGroupCell = function (props) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
}, [expanded, onChange, dataItem, dataIndex]);
|
|
41
|
-
|
|
42
|
-
columnsCount === undefined || rowType !== 'groupHeader' || dataItem[definedField] === undefined) {
|
|
43
|
-
defaultRendering = (React.createElement("td", { style: props.style, key: 'g' + columnIndex, className: "k-group-cell", role: "presentation" }));
|
|
44
|
-
}
|
|
45
|
-
else if (columnIndex <= level) {
|
|
41
|
+
var renderCellCollapse = function (colspan, styles) {
|
|
46
42
|
var baseMessage = expanded ? groupCollapse : groupExpand;
|
|
47
43
|
var message = localization.toLanguageString(baseMessage, messages[baseMessage]);
|
|
48
|
-
|
|
44
|
+
return (React.createElement("td", __assign({ style: __assign(__assign({}, props.style), styles), colSpan: colspan, key: 'g-colspan', role: 'gridcell', "aria-selected": false, "aria-expanded": expanded, "aria-colindex": ariaColumnIndex, onKeyDown: onKeyDownHandler }, navigationAttributes),
|
|
49
45
|
React.createElement("p", { className: "k-reset" },
|
|
50
46
|
React.createElement("a", { onClick: function (e) {
|
|
51
47
|
e.preventDefault();
|
|
@@ -62,6 +58,18 @@ export var GridGroupCell = function (props) {
|
|
|
62
58
|
((dataItem[definedField] instanceof Date) && dataItem[definedField].toString) ?
|
|
63
59
|
dataItem[definedField].toString() :
|
|
64
60
|
dataItem[definedField])));
|
|
61
|
+
};
|
|
62
|
+
if (columnIndex === undefined || level === undefined || columnIndex < level ||
|
|
63
|
+
columnsCount === undefined || rowType !== 'groupHeader' || dataItem[definedField] === undefined) {
|
|
64
|
+
defaultRendering = (React.createElement("td", { style: props.style, key: 'g' + columnIndex, className: classNames('k-group-cell', { 'k-grid-content-sticky': props.locked }), role: "presentation" }));
|
|
65
|
+
}
|
|
66
|
+
else if (columnIndex <= level && !props.locked) {
|
|
67
|
+
defaultRendering = renderCellCollapse(columnsCount - columnIndex, {});
|
|
68
|
+
}
|
|
69
|
+
else if (columnIndex <= level && props.locked) {
|
|
70
|
+
defaultRendering = (React.createElement(React.Fragment, null,
|
|
71
|
+
renderCellCollapse(0, { position: 'sticky', zIndex: 2 }),
|
|
72
|
+
React.createElement("td", { colSpan: (columnsCount - columnIndex), style: { borderLeftWidth: 0, borderRightWidth: 0 } })));
|
|
65
73
|
}
|
|
66
74
|
return render ?
|
|
67
75
|
render.call(undefined, defaultRendering, props) :
|
|
@@ -73,7 +73,7 @@ var GroupingIndicator = /** @class */ (function (_super) {
|
|
|
73
73
|
var localizationService = provideLocalizationService(this);
|
|
74
74
|
return (React.createElement(Draggable, { onPress: this.onPress, onDrag: this.onDrag, onRelease: this.onRelease, ref: function (component) { _this.draggable = component; } },
|
|
75
75
|
React.createElement("div", { className: "k-indicator-container", style: { touchAction: 'none' } },
|
|
76
|
-
React.createElement("div", { className: "k-group-indicator" },
|
|
76
|
+
React.createElement("div", { className: "k-group-indicator", role: "button" },
|
|
77
77
|
React.createElement("a", { className: "k-link", href: "#", tabIndex: -1, onClick: this.sortChange },
|
|
78
78
|
React.createElement("span", { className: 'k-icon k-i-sort-' + this.props.dir + '-small' }),
|
|
79
79
|
this.props.title),
|
|
@@ -118,7 +118,7 @@ var FilterRow = /** @class */ (function (_super) {
|
|
|
118
118
|
? { left: column.left, right: column.right }
|
|
119
119
|
: { left: column.right, right: column.left }
|
|
120
120
|
: {};
|
|
121
|
-
return (React.createElement(HeaderThElement, __assign({ key: key, columnId: navigationTools.getFilterColumnId(column.id), navigatable: column.navigatable, style: style, className: _this.headerCellClassName(column.field, column.locked) || undefined }, ariaAttrs), filterCellProps && (column.filterCell ?
|
|
121
|
+
return (React.createElement(HeaderThElement, __assign({ key: key, columnId: navigationTools.getFilterColumnId(column.id), navigatable: column.navigatable, style: style, className: _this.headerCellClassName(column.field, column.locked) || undefined, role: "columnheader" }, ariaAttrs), filterCellProps && (column.filterCell ?
|
|
122
122
|
React.createElement(column.filterCell, __assign({}, filterCellProps)) :
|
|
123
123
|
React.createElement(GridFilterCell, __assign({}, filterCellProps)))));
|
|
124
124
|
});
|
|
@@ -16,7 +16,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import { GroupingIndicator } from '../drag/GroupingIndicator';
|
|
18
18
|
import { registerForLocalization, provideLocalizationService as intl } from '@progress/kendo-react-intl';
|
|
19
|
-
import { messages, groupPanelEmpty as messageKey } from './../messages';
|
|
19
|
+
import { messages, groupPanelEmpty as messageKey, groupPanelAriaLabel } from './../messages';
|
|
20
20
|
/**
|
|
21
21
|
* @hidden
|
|
22
22
|
*/
|
|
@@ -45,7 +45,7 @@ var GroupPanel = /** @class */ (function (_super) {
|
|
|
45
45
|
}, onSortChange: function (event, dir) {
|
|
46
46
|
_this.onGroupSortChange(event, index, groupDesc, dir);
|
|
47
47
|
}, onPress: _this.props.pressHandler, onDrag: _this.props.dragHandler, onRelease: _this.props.releaseHandler })); });
|
|
48
|
-
return (React.createElement("div", { ref: this.props.refCallback, className: "k-grouping-header k-grouping-header-flex" },
|
|
48
|
+
return (React.createElement("div", { ref: this.props.refCallback, className: "k-grouping-header k-grouping-header-flex", role: "toolbar", "aria-label": intl(this).toLanguageString(groupPanelAriaLabel, messages[groupPanelAriaLabel]) },
|
|
49
49
|
groups,
|
|
50
50
|
React.createElement("div", { className: "k-indicator-container" },
|
|
51
51
|
!groups.length && intl(this).toLanguageString(messageKey, messages[messageKey]),
|
package/dist/es/header/Header.js
CHANGED
|
@@ -98,7 +98,7 @@ var Header = /** @class */ (function (_super) {
|
|
|
98
98
|
React.createElement("div", { ref: function (div) { _this.headerWrap = div; }, className: "k-grid-header-wrap", style: this.scrollbarWidth ? {} : { borderWidth: 0 }, onScroll: this.onScroll, role: "presentation" },
|
|
99
99
|
React.createElement("table", { ref: function (table) { _this.table = table; }, role: "presentation" },
|
|
100
100
|
React.createElement("colgroup", { ref: function (e) { _this.props.columnResize.colGroupHeader = e; } }, this.props.cols),
|
|
101
|
-
React.createElement("thead", __assign({ role: "
|
|
101
|
+
React.createElement("thead", __assign({ role: "rowgroup" }, tableKeyboardNavigationHeaderAttributes),
|
|
102
102
|
this.props.headerRow,
|
|
103
103
|
this.props.filterRow)))));
|
|
104
104
|
};
|
|
@@ -121,7 +121,7 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
121
121
|
columnMenuWrapperProps: columnMenuWrapperProps
|
|
122
122
|
};
|
|
123
123
|
var key = (column.declarationIndex >= 0) ? ++_this.index : --_this.serviceIndex;
|
|
124
|
-
return (React.createElement(HeaderThElement, __assign({}, ariaAttrs, { key: key, colSpan: column.colSpan, rowSpan: column.rowSpan, className: className, style: style, columnId: column.id, navigatable: column.navigatable, onKeyDown: sortable && (function (e) { return _this.cellKeyDown(e, column); }) || undefined }),
|
|
124
|
+
return (React.createElement(HeaderThElement, __assign({}, ariaAttrs, { key: key, colSpan: column.colSpan, rowSpan: column.rowSpan, className: className, style: style, columnId: column.id, navigatable: column.navigatable, onKeyDown: sortable && (function (e) { return _this.cellKeyDown(e, column); }) || undefined, role: "columnheader" }),
|
|
125
125
|
column.headerCell ? React.createElement(column.headerCell, __assign({}, headerCellProps)) : React.createElement(GridHeaderCell, __assign({}, headerCellProps)),
|
|
126
126
|
_this.props.columnResize && _this.props.columnResize.resizable && column.resizable &&
|
|
127
127
|
React.createElement(ColumnResizer, { key: 2, resize: function (e, element, end) {
|
|
@@ -50,4 +50,8 @@ export interface GridCellProps extends Omit<CellProps, 'onChange' | 'render'> {
|
|
|
50
50
|
* A function for overriding the default rendering of the cell.
|
|
51
51
|
*/
|
|
52
52
|
render?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: GridCellProps) => React.ReactElement<HTMLTableCellElement> | null;
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
locked?: boolean | undefined;
|
|
53
57
|
}
|
|
@@ -285,4 +285,10 @@ export interface GridProps extends KendoReactComponentBaseProps {
|
|
|
285
285
|
* The accessible label of the Grid.
|
|
286
286
|
*/
|
|
287
287
|
ariaLabel?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Defines if the group descriptor columns are locked (frozen or sticky).
|
|
290
|
+
* Locked columns are the columns that are visible at all times while the user scrolls the component horizontally.
|
|
291
|
+
* Defaults to `false`.
|
|
292
|
+
*/
|
|
293
|
+
lockGroups?: boolean;
|
|
288
294
|
}
|
|
@@ -94,6 +94,10 @@ export declare const sortAriaLabel = "grid.sortAriaLabel";
|
|
|
94
94
|
* @hidden
|
|
95
95
|
*/
|
|
96
96
|
export declare const filterAriaLabel = "grid.filterAriaLabel";
|
|
97
|
+
/**
|
|
98
|
+
* @hidden
|
|
99
|
+
*/
|
|
100
|
+
export declare const groupPanelAriaLabel = "grid.groupPanelAriaLabel";
|
|
97
101
|
/**
|
|
98
102
|
* @hidden
|
|
99
103
|
*/
|
|
@@ -142,6 +146,7 @@ export declare const messages: {
|
|
|
142
146
|
"grid.filterChooseOperator": string;
|
|
143
147
|
"grid.filterSelectedItems": string;
|
|
144
148
|
"grid.filterAriaLabel": string;
|
|
149
|
+
"grid.groupPanelAriaLabel": string;
|
|
145
150
|
'grid.filterEqOperator': string;
|
|
146
151
|
'grid.filterNotEqOperator': string;
|
|
147
152
|
'grid.filterIsNullOperator': string;
|
|
@@ -95,6 +95,10 @@ export var sortAriaLabel = 'grid.sortAriaLabel';
|
|
|
95
95
|
* @hidden
|
|
96
96
|
*/
|
|
97
97
|
export var filterAriaLabel = 'grid.filterAriaLabel';
|
|
98
|
+
/**
|
|
99
|
+
* @hidden
|
|
100
|
+
*/
|
|
101
|
+
export var groupPanelAriaLabel = 'grid.groupPanelAriaLabel';
|
|
98
102
|
/**
|
|
99
103
|
* @hidden
|
|
100
104
|
*/
|
|
@@ -143,6 +147,7 @@ export var messages = (_a = {},
|
|
|
143
147
|
_a[filterChooseOperator] = 'Choose Operator',
|
|
144
148
|
_a[filterSelectedItems] = 'selected items',
|
|
145
149
|
_a[filterAriaLabel] = 'Filter',
|
|
150
|
+
_a[groupPanelAriaLabel] = 'Group panel',
|
|
146
151
|
_a['grid.filterEqOperator'] = 'Is equal to',
|
|
147
152
|
_a['grid.filterNotEqOperator'] = 'Is not equal to',
|
|
148
153
|
_a['grid.filterIsNullOperator'] = 'Is null',
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-grid',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1669981120,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
package/dist/npm/Grid.js
CHANGED
|
@@ -516,7 +516,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
if (column.cell) {
|
|
519
|
-
return React.createElement(column.cell, __assign({ key: columnKey }, cellProps));
|
|
519
|
+
return React.createElement(column.cell, __assign({ key: columnKey }, cellProps, { locked: _this.props.lockGroups }));
|
|
520
520
|
}
|
|
521
521
|
return currentColumnIsInEdit
|
|
522
522
|
? React.createElement(GridEditCell_1.GridEditCell, __assign({ key: columnKey }, cellProps))
|
|
@@ -573,7 +573,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
573
573
|
currentAriaRowIndex = absoluteIndex + rowIndexStart + detailRowCount_1;
|
|
574
574
|
body.push((React.createElement("tr", { key: detailRowId, className: isAlt ? 'k-detail-row k-alt' : 'k-detail-row', style: { visibility: hidden(rowIndex) ? 'hidden' : '' }, role: "row", "aria-rowindex": currentAriaRowIndex },
|
|
575
575
|
_this.props.group && _this.props.group.map(function (group, idx) {
|
|
576
|
-
return (React.createElement(GridGroupCell_1.GridGroupCell, { id: '', dataIndex: item.dataIndex, field: group.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false }));
|
|
576
|
+
return (React.createElement(GridGroupCell_1.GridGroupCell, { id: '', dataIndex: item.dataIndex, field: group.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false, locked: _this.props.lockGroups }));
|
|
577
577
|
}),
|
|
578
578
|
_this.props.expandField &&
|
|
579
579
|
React.createElement(GridDetailHierarchyCell_1.GridDetailHierarchyCell, { id: kendo_react_data_tools_1.tableKeyboardNavigationTools.generateNavigatableId("".concat(detailRowId, "-dhcell"), idPrefix) }),
|
|
@@ -777,7 +777,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
777
777
|
columnIndexOffset++;
|
|
778
778
|
}
|
|
779
779
|
for (var i = 0; i < groupCount; i++) {
|
|
780
|
-
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell_1.GridGroupCell, field: 'value' }));
|
|
780
|
+
this._columns.unshift(__assign(__assign({}, defaultServiceProps), { isAccessible: false, cell: GridGroupCell_1.GridGroupCell, field: 'value', locked: this.props.lockGroups }));
|
|
781
781
|
columnIndexOffset++;
|
|
782
782
|
}
|
|
783
783
|
this._columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
|
@@ -41,14 +41,10 @@ var GridGroupCell = function (props) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
}, [expanded, onChange, dataItem, dataIndex]);
|
|
44
|
-
|
|
45
|
-
columnsCount === undefined || rowType !== 'groupHeader' || dataItem[definedField] === undefined) {
|
|
46
|
-
defaultRendering = (React.createElement("td", { style: props.style, key: 'g' + columnIndex, className: "k-group-cell", role: "presentation" }));
|
|
47
|
-
}
|
|
48
|
-
else if (columnIndex <= level) {
|
|
44
|
+
var renderCellCollapse = function (colspan, styles) {
|
|
49
45
|
var baseMessage = expanded ? messages_1.groupCollapse : messages_1.groupExpand;
|
|
50
46
|
var message = localization.toLanguageString(baseMessage, messages_1.messages[baseMessage]);
|
|
51
|
-
|
|
47
|
+
return (React.createElement("td", __assign({ style: __assign(__assign({}, props.style), styles), colSpan: colspan, key: 'g-colspan', role: 'gridcell', "aria-selected": false, "aria-expanded": expanded, "aria-colindex": ariaColumnIndex, onKeyDown: onKeyDownHandler }, navigationAttributes),
|
|
52
48
|
React.createElement("p", { className: "k-reset" },
|
|
53
49
|
React.createElement("a", { onClick: function (e) {
|
|
54
50
|
e.preventDefault();
|
|
@@ -65,6 +61,18 @@ var GridGroupCell = function (props) {
|
|
|
65
61
|
((dataItem[definedField] instanceof Date) && dataItem[definedField].toString) ?
|
|
66
62
|
dataItem[definedField].toString() :
|
|
67
63
|
dataItem[definedField])));
|
|
64
|
+
};
|
|
65
|
+
if (columnIndex === undefined || level === undefined || columnIndex < level ||
|
|
66
|
+
columnsCount === undefined || rowType !== 'groupHeader' || dataItem[definedField] === undefined) {
|
|
67
|
+
defaultRendering = (React.createElement("td", { style: props.style, key: 'g' + columnIndex, className: (0, kendo_react_common_1.classNames)('k-group-cell', { 'k-grid-content-sticky': props.locked }), role: "presentation" }));
|
|
68
|
+
}
|
|
69
|
+
else if (columnIndex <= level && !props.locked) {
|
|
70
|
+
defaultRendering = renderCellCollapse(columnsCount - columnIndex, {});
|
|
71
|
+
}
|
|
72
|
+
else if (columnIndex <= level && props.locked) {
|
|
73
|
+
defaultRendering = (React.createElement(React.Fragment, null,
|
|
74
|
+
renderCellCollapse(0, { position: 'sticky', zIndex: 2 }),
|
|
75
|
+
React.createElement("td", { colSpan: (columnsCount - columnIndex), style: { borderLeftWidth: 0, borderRightWidth: 0 } })));
|
|
68
76
|
}
|
|
69
77
|
return render ?
|
|
70
78
|
render.call(undefined, defaultRendering, props) :
|
|
@@ -76,7 +76,7 @@ var GroupingIndicator = /** @class */ (function (_super) {
|
|
|
76
76
|
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
77
77
|
return (React.createElement(kendo_react_common_1.Draggable, { onPress: this.onPress, onDrag: this.onDrag, onRelease: this.onRelease, ref: function (component) { _this.draggable = component; } },
|
|
78
78
|
React.createElement("div", { className: "k-indicator-container", style: { touchAction: 'none' } },
|
|
79
|
-
React.createElement("div", { className: "k-group-indicator" },
|
|
79
|
+
React.createElement("div", { className: "k-group-indicator", role: "button" },
|
|
80
80
|
React.createElement("a", { className: "k-link", href: "#", tabIndex: -1, onClick: this.sortChange },
|
|
81
81
|
React.createElement("span", { className: 'k-icon k-i-sort-' + this.props.dir + '-small' }),
|
|
82
82
|
this.props.title),
|
|
@@ -121,7 +121,7 @@ var FilterRow = /** @class */ (function (_super) {
|
|
|
121
121
|
? { left: column.left, right: column.right }
|
|
122
122
|
: { left: column.right, right: column.left }
|
|
123
123
|
: {};
|
|
124
|
-
return (React.createElement(kendo_react_data_tools_1.HeaderThElement, __assign({ key: key, columnId: kendo_react_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id), navigatable: column.navigatable, style: style, className: _this.headerCellClassName(column.field, column.locked) || undefined }, ariaAttrs), filterCellProps && (column.filterCell ?
|
|
124
|
+
return (React.createElement(kendo_react_data_tools_1.HeaderThElement, __assign({ key: key, columnId: kendo_react_data_tools_1.tableKeyboardNavigationTools.getFilterColumnId(column.id), navigatable: column.navigatable, style: style, className: _this.headerCellClassName(column.field, column.locked) || undefined, role: "columnheader" }, ariaAttrs), filterCellProps && (column.filterCell ?
|
|
125
125
|
React.createElement(column.filterCell, __assign({}, filterCellProps)) :
|
|
126
126
|
React.createElement(GridFilterCell_1.GridFilterCell, __assign({}, filterCellProps)))));
|
|
127
127
|
});
|
|
@@ -48,7 +48,7 @@ var GroupPanel = /** @class */ (function (_super) {
|
|
|
48
48
|
}, onSortChange: function (event, dir) {
|
|
49
49
|
_this.onGroupSortChange(event, index, groupDesc, dir);
|
|
50
50
|
}, onPress: _this.props.pressHandler, onDrag: _this.props.dragHandler, onRelease: _this.props.releaseHandler })); });
|
|
51
|
-
return (React.createElement("div", { ref: this.props.refCallback, className: "k-grouping-header k-grouping-header-flex" },
|
|
51
|
+
return (React.createElement("div", { ref: this.props.refCallback, className: "k-grouping-header k-grouping-header-flex", role: "toolbar", "aria-label": (0, kendo_react_intl_1.provideLocalizationService)(this).toLanguageString(messages_1.groupPanelAriaLabel, messages_1.messages[messages_1.groupPanelAriaLabel]) },
|
|
52
52
|
groups,
|
|
53
53
|
React.createElement("div", { className: "k-indicator-container" },
|
|
54
54
|
!groups.length && (0, kendo_react_intl_1.provideLocalizationService)(this).toLanguageString(messages_1.groupPanelEmpty, messages_1.messages[messages_1.groupPanelEmpty]),
|
|
@@ -101,7 +101,7 @@ var Header = /** @class */ (function (_super) {
|
|
|
101
101
|
React.createElement("div", { ref: function (div) { _this.headerWrap = div; }, className: "k-grid-header-wrap", style: this.scrollbarWidth ? {} : { borderWidth: 0 }, onScroll: this.onScroll, role: "presentation" },
|
|
102
102
|
React.createElement("table", { ref: function (table) { _this.table = table; }, role: "presentation" },
|
|
103
103
|
React.createElement("colgroup", { ref: function (e) { _this.props.columnResize.colGroupHeader = e; } }, this.props.cols),
|
|
104
|
-
React.createElement("thead", __assign({ role: "
|
|
104
|
+
React.createElement("thead", __assign({ role: "rowgroup" }, kendo_react_data_tools_1.tableKeyboardNavigationHeaderAttributes),
|
|
105
105
|
this.props.headerRow,
|
|
106
106
|
this.props.filterRow)))));
|
|
107
107
|
};
|
|
@@ -124,7 +124,7 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
124
124
|
columnMenuWrapperProps: columnMenuWrapperProps
|
|
125
125
|
};
|
|
126
126
|
var key = (column.declarationIndex >= 0) ? ++_this.index : --_this.serviceIndex;
|
|
127
|
-
return (React.createElement(kendo_react_data_tools_1.HeaderThElement, __assign({}, ariaAttrs, { key: key, colSpan: column.colSpan, rowSpan: column.rowSpan, className: className, style: style, columnId: column.id, navigatable: column.navigatable, onKeyDown: sortable && (function (e) { return _this.cellKeyDown(e, column); }) || undefined }),
|
|
127
|
+
return (React.createElement(kendo_react_data_tools_1.HeaderThElement, __assign({}, ariaAttrs, { key: key, colSpan: column.colSpan, rowSpan: column.rowSpan, className: className, style: style, columnId: column.id, navigatable: column.navigatable, onKeyDown: sortable && (function (e) { return _this.cellKeyDown(e, column); }) || undefined, role: "columnheader" }),
|
|
128
128
|
column.headerCell ? React.createElement(column.headerCell, __assign({}, headerCellProps)) : React.createElement(GridHeaderCell_1.GridHeaderCell, __assign({}, headerCellProps)),
|
|
129
129
|
_this.props.columnResize && _this.props.columnResize.resizable && column.resizable &&
|
|
130
130
|
React.createElement(ColumnResizer_1.ColumnResizer, { key: 2, resize: function (e, element, end) {
|
|
@@ -50,4 +50,8 @@ export interface GridCellProps extends Omit<CellProps, 'onChange' | 'render'> {
|
|
|
50
50
|
* A function for overriding the default rendering of the cell.
|
|
51
51
|
*/
|
|
52
52
|
render?: (defaultRendering: React.ReactElement<HTMLTableCellElement> | null, props: GridCellProps) => React.ReactElement<HTMLTableCellElement> | null;
|
|
53
|
+
/**
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
56
|
+
locked?: boolean | undefined;
|
|
53
57
|
}
|
|
@@ -285,4 +285,10 @@ export interface GridProps extends KendoReactComponentBaseProps {
|
|
|
285
285
|
* The accessible label of the Grid.
|
|
286
286
|
*/
|
|
287
287
|
ariaLabel?: string;
|
|
288
|
+
/**
|
|
289
|
+
* Defines if the group descriptor columns are locked (frozen or sticky).
|
|
290
|
+
* Locked columns are the columns that are visible at all times while the user scrolls the component horizontally.
|
|
291
|
+
* Defaults to `false`.
|
|
292
|
+
*/
|
|
293
|
+
lockGroups?: boolean;
|
|
288
294
|
}
|
|
@@ -94,6 +94,10 @@ export declare const sortAriaLabel = "grid.sortAriaLabel";
|
|
|
94
94
|
* @hidden
|
|
95
95
|
*/
|
|
96
96
|
export declare const filterAriaLabel = "grid.filterAriaLabel";
|
|
97
|
+
/**
|
|
98
|
+
* @hidden
|
|
99
|
+
*/
|
|
100
|
+
export declare const groupPanelAriaLabel = "grid.groupPanelAriaLabel";
|
|
97
101
|
/**
|
|
98
102
|
* @hidden
|
|
99
103
|
*/
|
|
@@ -142,6 +146,7 @@ export declare const messages: {
|
|
|
142
146
|
"grid.filterChooseOperator": string;
|
|
143
147
|
"grid.filterSelectedItems": string;
|
|
144
148
|
"grid.filterAriaLabel": string;
|
|
149
|
+
"grid.groupPanelAriaLabel": string;
|
|
145
150
|
'grid.filterEqOperator': string;
|
|
146
151
|
'grid.filterNotEqOperator': string;
|
|
147
152
|
'grid.filterIsNullOperator': string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.pagerMessagesMap = exports.messages = exports.detailCollapse = exports.detailExpand = exports.groupCollapse = exports.groupExpand = exports.filterAriaLabel = exports.sortAriaLabel = exports.filterSelectedItems = exports.filterChooseOperator = exports.filterCheckAll = exports.searchPlaceholder = exports.sortDescending = exports.sortAscending = exports.filterTitle = exports.filterSubmitButton = exports.filterClearButton = exports.ungroupColumn = exports.groupColumn = exports.groupPanelEmpty = exports.pagerTotalPages = exports.pagerOf = exports.pagerPage = exports.pagerItemPerPage = exports.pagerLastPage = exports.pagerNextPage = exports.pagerPreviousPage = exports.pagerFirstPage = exports.pagerInfo = exports.noRecords = void 0;
|
|
4
|
+
exports.pagerMessagesMap = exports.messages = exports.detailCollapse = exports.detailExpand = exports.groupCollapse = exports.groupExpand = exports.groupPanelAriaLabel = exports.filterAriaLabel = exports.sortAriaLabel = exports.filterSelectedItems = exports.filterChooseOperator = exports.filterCheckAll = exports.searchPlaceholder = exports.sortDescending = exports.sortAscending = exports.filterTitle = exports.filterSubmitButton = exports.filterClearButton = exports.ungroupColumn = exports.groupColumn = exports.groupPanelEmpty = exports.pagerTotalPages = exports.pagerOf = exports.pagerPage = exports.pagerItemPerPage = exports.pagerLastPage = exports.pagerNextPage = exports.pagerPreviousPage = exports.pagerFirstPage = exports.pagerInfo = exports.noRecords = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
*/
|
|
@@ -98,6 +98,10 @@ exports.sortAriaLabel = 'grid.sortAriaLabel';
|
|
|
98
98
|
* @hidden
|
|
99
99
|
*/
|
|
100
100
|
exports.filterAriaLabel = 'grid.filterAriaLabel';
|
|
101
|
+
/**
|
|
102
|
+
* @hidden
|
|
103
|
+
*/
|
|
104
|
+
exports.groupPanelAriaLabel = 'grid.groupPanelAriaLabel';
|
|
101
105
|
/**
|
|
102
106
|
* @hidden
|
|
103
107
|
*/
|
|
@@ -146,6 +150,7 @@ exports.messages = (_a = {},
|
|
|
146
150
|
_a[exports.filterChooseOperator] = 'Choose Operator',
|
|
147
151
|
_a[exports.filterSelectedItems] = 'selected items',
|
|
148
152
|
_a[exports.filterAriaLabel] = 'Filter',
|
|
153
|
+
_a[exports.groupPanelAriaLabel] = 'Group panel',
|
|
149
154
|
_a['grid.filterEqOperator'] = 'Is equal to',
|
|
150
155
|
_a['grid.filterNotEqOperator'] = 'Is not equal to',
|
|
151
156
|
_a['grid.filterIsNullOperator'] = 'Is null',
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-grid',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1669981120,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|