@progress/kendo-react-grid 4.10.0-dev.202110110856 → 4.10.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/README.md +3 -3
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/dist/es/Grid.js +2 -2
- package/dist/es/columnMenu/ColumnMenu.js +2 -2
- package/dist/es/header/GridHeaderCell.js +2 -2
- package/dist/es/header/HeaderRow.d.ts +1 -3
- package/dist/es/header/HeaderRow.js +25 -29
- package/dist/es/interfaces/GridSelectableSettings.d.ts +1 -1
- package/dist/es/messages/index.d.ts +1 -1
- package/dist/es/messages/index.js +1 -1
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/Grid.js +2 -2
- package/dist/npm/columnMenu/ColumnMenu.js +2 -2
- package/dist/npm/header/GridHeaderCell.js +2 -2
- package/dist/npm/header/HeaderRow.d.ts +1 -3
- package/dist/npm/header/HeaderRow.js +24 -28
- package/dist/npm/interfaces/GridSelectableSettings.d.ts +1 -1
- package/dist/npm/messages/index.d.ts +1 -1
- package/dist/npm/messages/index.js +1 -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
|
@@ -431,7 +431,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
431
431
|
var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
|
|
432
432
|
var _a = tableColumnsVirtualization({
|
|
433
433
|
enabled: this.props.columnVirtualization,
|
|
434
|
-
columns:
|
|
434
|
+
columns: leafColumns,
|
|
435
435
|
tableViewPortWidth: tableWidth,
|
|
436
436
|
scrollLeft: scrollLeft
|
|
437
437
|
}), colSpans = _a.colSpans, isColHidden = _a.hiddenColumns;
|
|
@@ -439,7 +439,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
439
439
|
var isInEdit = false;
|
|
440
440
|
var selectedValue = _this.props.selectedField ? getNestedValue(_this.props.selectedField, item.dataItem) : undefined;
|
|
441
441
|
return {
|
|
442
|
-
row:
|
|
442
|
+
row: leafColumns.map(function (column, columnIndex) {
|
|
443
443
|
if (isColHidden[columnIndex]) {
|
|
444
444
|
return null;
|
|
445
445
|
}
|
|
@@ -62,8 +62,8 @@ var ColumnMenu = /** @class */ (function (_super) {
|
|
|
62
62
|
ColumnMenu.prototype.render = function () {
|
|
63
63
|
var _this = this;
|
|
64
64
|
var _a = this.props, ChildComponent = _a.render, others = __rest(_a, ["render"]);
|
|
65
|
-
return (React.createElement(
|
|
66
|
-
React.createElement("div", {
|
|
65
|
+
return (React.createElement(React.Fragment, null,
|
|
66
|
+
React.createElement("div", { className: 'k-grid-column-menu k-grid-filter', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick },
|
|
67
67
|
React.createElement("span", { className: 'k-icon k-i-more-vertical' })),
|
|
68
68
|
React.createElement(Popup, { anchor: this._anchor, show: this.state.show },
|
|
69
69
|
React.createElement("div", { ref: function (e) { return _this._content = e; }, className: 'k-grid-columnmenu-popup', tabIndex: 0, onBlur: this.blur, onFocus: this.focus, style: { outline: 'none' } },
|
|
@@ -78,8 +78,8 @@ var GridHeaderCell = /** @class */ (function (_super) {
|
|
|
78
78
|
var clickProps = this.props.onClick ? {
|
|
79
79
|
onClick: this.props.onClick
|
|
80
80
|
} : {};
|
|
81
|
-
var defaultRendering = (React.createElement("span", __assign({ className:
|
|
82
|
-
this.props.title || this.props.field || '\u00A0',
|
|
81
|
+
var defaultRendering = (React.createElement("span", __assign({ className: 'k-link' }, clickProps),
|
|
82
|
+
React.createElement("span", { className: 'k-column-title' }, this.props.title || this.props.field || '\u00A0'),
|
|
83
83
|
this.props.children));
|
|
84
84
|
if (this.props.render) {
|
|
85
85
|
return this.props.render.call(undefined, defaultRendering, this.props);
|
|
@@ -8,7 +8,6 @@ import { GridColumnProps } from '../interfaces/GridColumnProps';
|
|
|
8
8
|
import { GridHeaderCellProps } from '../interfaces/GridHeaderCellProps';
|
|
9
9
|
import { GridColumnMenuProps } from '../interfaces/GridColumnMenuProps';
|
|
10
10
|
import { GridFilterOperators } from '../interfaces/GridFilterOperators';
|
|
11
|
-
import { ColumnSortSettings } from '@progress/kendo-react-data-tools';
|
|
12
11
|
/**
|
|
13
12
|
* @hidden
|
|
14
13
|
*/
|
|
@@ -40,8 +39,7 @@ export declare class HeaderRow extends React.Component<HeaderRowProps, {}> {
|
|
|
40
39
|
constructor(props: HeaderRowProps);
|
|
41
40
|
cellClick(e: React.MouseEvent<HTMLSpanElement> | React.KeyboardEvent<HTMLElement>, column: GridColumnProps): void;
|
|
42
41
|
cellKeyDown: (event: React.KeyboardEvent<HTMLElement>, column: GridColumnProps) => void;
|
|
43
|
-
|
|
44
|
-
sortIcon(sortIndex: number, sortable: ColumnSortSettings | undefined): JSX.Element | JSX.Element[];
|
|
42
|
+
sortIcon(sortIndex: number): JSX.Element[];
|
|
45
43
|
render(): JSX.Element[];
|
|
46
44
|
private cells;
|
|
47
45
|
}
|
|
@@ -28,7 +28,7 @@ import { ColumnResizer } from '../drag/ColumnResizer';
|
|
|
28
28
|
import { ColumnDraggable } from '../drag/ColumnDraggable';
|
|
29
29
|
import { GridHeaderCell } from './GridHeaderCell';
|
|
30
30
|
import { ColumnMenu } from '../columnMenu/ColumnMenu';
|
|
31
|
-
import { Keys } from '@progress/kendo-react-common';
|
|
31
|
+
import { classNames, Keys } from '@progress/kendo-react-common';
|
|
32
32
|
import { HeaderThElement } from '@progress/kendo-react-data-tools';
|
|
33
33
|
import { registerForLocalization, provideLocalizationService as intl } from '@progress/kendo-react-intl';
|
|
34
34
|
import { messages, sortAriaLabel } from '../messages';
|
|
@@ -76,35 +76,42 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
76
76
|
title: column.title,
|
|
77
77
|
selectionValue: column.headerSelectionValue,
|
|
78
78
|
render: _this.props.cellRender,
|
|
79
|
-
children: _this.sortIcon(sortIndex
|
|
79
|
+
children: _this.sortIcon(sortIndex),
|
|
80
80
|
key: 1
|
|
81
81
|
};
|
|
82
|
-
var className = (column.kFirst ? 'k-first ' : '')
|
|
83
|
-
+ _this.cellClass(column.field, column.headerClassName, column.locked);
|
|
84
82
|
var columnMenu = (column.columnMenu === null) ? null : (column.columnMenu || _this.props.columnMenu);
|
|
83
|
+
var className = classNames({
|
|
84
|
+
'k-first': column.kFirst,
|
|
85
|
+
'k-filterable': Boolean(columnMenu),
|
|
86
|
+
'k-header': true,
|
|
87
|
+
'k-grid-header-sticky': column.locked,
|
|
88
|
+
'k-sorted': _this.props.sort && _this.props.sort.some(function (descriptor) { return descriptor.field === column.field; })
|
|
89
|
+
}, column.headerClassName);
|
|
85
90
|
var style = column.left !== undefined
|
|
86
91
|
? !_this.props.isRtl
|
|
87
92
|
? { left: column.left, right: column.right }
|
|
88
93
|
: { left: column.right, right: column.left }
|
|
89
94
|
: {};
|
|
95
|
+
var sortLabel = intl(_this).toLanguageString(sortAriaLabel, messages[sortAriaLabel]);
|
|
90
96
|
var ariaAttrs = column.isAccessible ? {
|
|
91
97
|
ariaSort: ariaSortMap[sortDir],
|
|
92
98
|
role: 'columnheader',
|
|
93
99
|
ariaColumnIndex: column.ariaColumnIndex,
|
|
94
|
-
ariaSelected: false
|
|
100
|
+
ariaSelected: false,
|
|
101
|
+
ariaDescription: sortable ? sortLabel : ''
|
|
95
102
|
} : {
|
|
96
103
|
'role': 'presentation'
|
|
97
104
|
};
|
|
98
105
|
var key = (column.declarationIndex >= 0) ? ++_this.index : --_this.serviceIndex;
|
|
99
|
-
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 }),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
field: column.field,
|
|
103
|
-
filter: column.filter
|
|
104
|
-
}, sortable: sortable && _this.props.sortable, sort: _this.props.sort, onSortChange: _this.props.sortChange, filter: _this.props.filter, filterable: _this.props.filterable && column.filterable, filterOperators: _this.props.filterOperators, onFilterChange: _this.props.filterChange, group: _this.props.group, groupable: _this.props.groupable, onGroupChange: _this.props.groupChange, render: columnMenu }),
|
|
105
|
-
column.headerCell &&
|
|
106
|
-
React.createElement(column.headerCell, __assign({}, headerCellProps)) ||
|
|
106
|
+
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 }),
|
|
107
|
+
column.headerCell && React.createElement(column.headerCell, __assign({}, headerCellProps)),
|
|
108
|
+
!column.headerCell && (React.createElement("span", { className: 'k-cell-inner' },
|
|
107
109
|
React.createElement(GridHeaderCell, __assign({}, headerCellProps)),
|
|
110
|
+
columnMenu &&
|
|
111
|
+
React.createElement(ColumnMenu, { key: 0, column: {
|
|
112
|
+
field: column.field,
|
|
113
|
+
filter: column.filter
|
|
114
|
+
}, sortable: sortable && _this.props.sortable, sort: _this.props.sort, onSortChange: _this.props.sortChange, filter: _this.props.filter, filterable: _this.props.filterable && column.filterable, filterOperators: _this.props.filterOperators, onFilterChange: _this.props.filterChange, group: _this.props.group, groupable: _this.props.groupable, onGroupChange: _this.props.groupChange, render: columnMenu }))),
|
|
108
115
|
_this.props.columnResize && _this.props.columnResize.resizable && column.resizable &&
|
|
109
116
|
React.createElement(ColumnResizer, { key: 2, resize: function (e, element, end) {
|
|
110
117
|
return _this.props.columnResize &&
|
|
@@ -112,8 +119,7 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
112
119
|
}, autofit: function (e) {
|
|
113
120
|
return _this.props.columnResize &&
|
|
114
121
|
_this.props.columnResize.dblClickHandler(e, [column.id]);
|
|
115
|
-
} })
|
|
116
|
-
]));
|
|
122
|
+
} })));
|
|
117
123
|
}); };
|
|
118
124
|
_this.cellClick = _this.cellClick.bind(_this);
|
|
119
125
|
return _this;
|
|
@@ -133,24 +139,14 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
133
139
|
}
|
|
134
140
|
this.props.sortChange(newDescriptor, e);
|
|
135
141
|
};
|
|
136
|
-
HeaderRow.prototype.
|
|
137
|
-
var customClass = headerClassName ? ' ' + headerClassName : '';
|
|
138
|
-
var result = "k-header " + (locked ? 'k-grid-header-sticky' : '') + customClass;
|
|
139
|
-
if (this.props.sort &&
|
|
140
|
-
this.props.sort.filter(function (descriptor) { return descriptor.field === field; }).length > 0) {
|
|
141
|
-
result += ' k-sorted';
|
|
142
|
-
}
|
|
143
|
-
return result;
|
|
144
|
-
};
|
|
145
|
-
HeaderRow.prototype.sortIcon = function (sortIndex, sortable) {
|
|
142
|
+
HeaderRow.prototype.sortIcon = function (sortIndex) {
|
|
146
143
|
if (!this.props.sort) {
|
|
147
144
|
return null;
|
|
148
145
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
React.createElement("span", { key: 1, "aria-label": sortLabel, className: 'k-icon k-i-sort-' + this.props.sort[sortIndex].dir + '-sm' }),
|
|
146
|
+
return sortIndex >= 0 && [
|
|
147
|
+
React.createElement("span", { key: 1, className: 'k-icon k-i-sort-' + this.props.sort[sortIndex].dir + '-sm' }),
|
|
152
148
|
this.props.sort.length > 1 && React.createElement("span", { key: 2, className: "k-sort-order" }, sortIndex + 1)
|
|
153
|
-
]
|
|
149
|
+
];
|
|
154
150
|
};
|
|
155
151
|
HeaderRow.prototype.render = function () {
|
|
156
152
|
var _this = this;
|
|
@@ -105,6 +105,7 @@ export declare const messages: {
|
|
|
105
105
|
[filterTitle]: string;
|
|
106
106
|
[sortAscending]: string;
|
|
107
107
|
[sortDescending]: string;
|
|
108
|
+
[sortAriaLabel]: string;
|
|
108
109
|
[groupColumn]: string;
|
|
109
110
|
[ungroupColumn]: string;
|
|
110
111
|
[pagerItemPerPage]: string;
|
|
@@ -120,7 +121,6 @@ export declare const messages: {
|
|
|
120
121
|
[filterCheckAll]: string;
|
|
121
122
|
[filterChooseOperator]: string;
|
|
122
123
|
[filterSelectedItems]: string;
|
|
123
|
-
[sortAriaLabel]: string;
|
|
124
124
|
[filterAriaLabel]: string;
|
|
125
125
|
'grid.filterEqOperator': string;
|
|
126
126
|
'grid.filterNotEqOperator': string;
|
|
@@ -106,6 +106,7 @@ export var messages = (_a = {},
|
|
|
106
106
|
_a[filterTitle] = 'Filter',
|
|
107
107
|
_a[sortAscending] = 'Sort Ascending',
|
|
108
108
|
_a[sortDescending] = 'Sort Descending',
|
|
109
|
+
_a[sortAriaLabel] = 'Sortable',
|
|
109
110
|
_a[groupColumn] = 'Group Column',
|
|
110
111
|
_a[ungroupColumn] = 'Ungroup Column',
|
|
111
112
|
_a[pagerItemPerPage] = 'items per page',
|
|
@@ -121,7 +122,6 @@ export var messages = (_a = {},
|
|
|
121
122
|
_a[filterCheckAll] = 'Check All',
|
|
122
123
|
_a[filterChooseOperator] = 'Choose Operator',
|
|
123
124
|
_a[filterSelectedItems] = 'selected items',
|
|
124
|
-
_a[sortAriaLabel] = 'Sortable',
|
|
125
125
|
_a[filterAriaLabel] = 'Filter',
|
|
126
126
|
_a['grid.filterEqOperator'] = 'Is equal to',
|
|
127
127
|
_a['grid.filterNotEqOperator'] = 'Is not equal to',
|
|
@@ -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: 1635345203,
|
|
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
|
@@ -433,7 +433,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
433
433
|
var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
|
|
434
434
|
var _a = kendo_react_data_tools_1.tableColumnsVirtualization({
|
|
435
435
|
enabled: this.props.columnVirtualization,
|
|
436
|
-
columns:
|
|
436
|
+
columns: leafColumns,
|
|
437
437
|
tableViewPortWidth: tableWidth,
|
|
438
438
|
scrollLeft: scrollLeft
|
|
439
439
|
}), colSpans = _a.colSpans, isColHidden = _a.hiddenColumns;
|
|
@@ -441,7 +441,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
441
441
|
var isInEdit = false;
|
|
442
442
|
var selectedValue = _this.props.selectedField ? index_1.getNestedValue(_this.props.selectedField, item.dataItem) : undefined;
|
|
443
443
|
return {
|
|
444
|
-
row:
|
|
444
|
+
row: leafColumns.map(function (column, columnIndex) {
|
|
445
445
|
if (isColHidden[columnIndex]) {
|
|
446
446
|
return null;
|
|
447
447
|
}
|
|
@@ -64,8 +64,8 @@ var ColumnMenu = /** @class */ (function (_super) {
|
|
|
64
64
|
ColumnMenu.prototype.render = function () {
|
|
65
65
|
var _this = this;
|
|
66
66
|
var _a = this.props, ChildComponent = _a.render, others = __rest(_a, ["render"]);
|
|
67
|
-
return (React.createElement(
|
|
68
|
-
React.createElement("div", {
|
|
67
|
+
return (React.createElement(React.Fragment, null,
|
|
68
|
+
React.createElement("div", { className: 'k-grid-column-menu k-grid-filter', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick },
|
|
69
69
|
React.createElement("span", { className: 'k-icon k-i-more-vertical' })),
|
|
70
70
|
React.createElement(kendo_react_popup_1.Popup, { anchor: this._anchor, show: this.state.show },
|
|
71
71
|
React.createElement("div", { ref: function (e) { return _this._content = e; }, className: 'k-grid-columnmenu-popup', tabIndex: 0, onBlur: this.blur, onFocus: this.focus, style: { outline: 'none' } },
|
|
@@ -80,8 +80,8 @@ var GridHeaderCell = /** @class */ (function (_super) {
|
|
|
80
80
|
var clickProps = this.props.onClick ? {
|
|
81
81
|
onClick: this.props.onClick
|
|
82
82
|
} : {};
|
|
83
|
-
var defaultRendering = (React.createElement("span", __assign({ className:
|
|
84
|
-
this.props.title || this.props.field || '\u00A0',
|
|
83
|
+
var defaultRendering = (React.createElement("span", __assign({ className: 'k-link' }, clickProps),
|
|
84
|
+
React.createElement("span", { className: 'k-column-title' }, this.props.title || this.props.field || '\u00A0'),
|
|
85
85
|
this.props.children));
|
|
86
86
|
if (this.props.render) {
|
|
87
87
|
return this.props.render.call(undefined, defaultRendering, this.props);
|
|
@@ -8,7 +8,6 @@ import { GridColumnProps } from '../interfaces/GridColumnProps';
|
|
|
8
8
|
import { GridHeaderCellProps } from '../interfaces/GridHeaderCellProps';
|
|
9
9
|
import { GridColumnMenuProps } from '../interfaces/GridColumnMenuProps';
|
|
10
10
|
import { GridFilterOperators } from '../interfaces/GridFilterOperators';
|
|
11
|
-
import { ColumnSortSettings } from '@progress/kendo-react-data-tools';
|
|
12
11
|
/**
|
|
13
12
|
* @hidden
|
|
14
13
|
*/
|
|
@@ -40,8 +39,7 @@ export declare class HeaderRow extends React.Component<HeaderRowProps, {}> {
|
|
|
40
39
|
constructor(props: HeaderRowProps);
|
|
41
40
|
cellClick(e: React.MouseEvent<HTMLSpanElement> | React.KeyboardEvent<HTMLElement>, column: GridColumnProps): void;
|
|
42
41
|
cellKeyDown: (event: React.KeyboardEvent<HTMLElement>, column: GridColumnProps) => void;
|
|
43
|
-
|
|
44
|
-
sortIcon(sortIndex: number, sortable: ColumnSortSettings | undefined): JSX.Element | JSX.Element[];
|
|
42
|
+
sortIcon(sortIndex: number): JSX.Element[];
|
|
45
43
|
render(): JSX.Element[];
|
|
46
44
|
private cells;
|
|
47
45
|
}
|
|
@@ -78,35 +78,42 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
78
78
|
title: column.title,
|
|
79
79
|
selectionValue: column.headerSelectionValue,
|
|
80
80
|
render: _this.props.cellRender,
|
|
81
|
-
children: _this.sortIcon(sortIndex
|
|
81
|
+
children: _this.sortIcon(sortIndex),
|
|
82
82
|
key: 1
|
|
83
83
|
};
|
|
84
|
-
var className = (column.kFirst ? 'k-first ' : '')
|
|
85
|
-
+ _this.cellClass(column.field, column.headerClassName, column.locked);
|
|
86
84
|
var columnMenu = (column.columnMenu === null) ? null : (column.columnMenu || _this.props.columnMenu);
|
|
85
|
+
var className = kendo_react_common_1.classNames({
|
|
86
|
+
'k-first': column.kFirst,
|
|
87
|
+
'k-filterable': Boolean(columnMenu),
|
|
88
|
+
'k-header': true,
|
|
89
|
+
'k-grid-header-sticky': column.locked,
|
|
90
|
+
'k-sorted': _this.props.sort && _this.props.sort.some(function (descriptor) { return descriptor.field === column.field; })
|
|
91
|
+
}, column.headerClassName);
|
|
87
92
|
var style = column.left !== undefined
|
|
88
93
|
? !_this.props.isRtl
|
|
89
94
|
? { left: column.left, right: column.right }
|
|
90
95
|
: { left: column.right, right: column.left }
|
|
91
96
|
: {};
|
|
97
|
+
var sortLabel = kendo_react_intl_1.provideLocalizationService(_this).toLanguageString(messages_1.sortAriaLabel, messages_1.messages[messages_1.sortAriaLabel]);
|
|
92
98
|
var ariaAttrs = column.isAccessible ? {
|
|
93
99
|
ariaSort: ariaSortMap[sortDir],
|
|
94
100
|
role: 'columnheader',
|
|
95
101
|
ariaColumnIndex: column.ariaColumnIndex,
|
|
96
|
-
ariaSelected: false
|
|
102
|
+
ariaSelected: false,
|
|
103
|
+
ariaDescription: sortable ? sortLabel : ''
|
|
97
104
|
} : {
|
|
98
105
|
'role': 'presentation'
|
|
99
106
|
};
|
|
100
107
|
var key = (column.declarationIndex >= 0) ? ++_this.index : --_this.serviceIndex;
|
|
101
|
-
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 }),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
field: column.field,
|
|
105
|
-
filter: column.filter
|
|
106
|
-
}, sortable: sortable && _this.props.sortable, sort: _this.props.sort, onSortChange: _this.props.sortChange, filter: _this.props.filter, filterable: _this.props.filterable && column.filterable, filterOperators: _this.props.filterOperators, onFilterChange: _this.props.filterChange, group: _this.props.group, groupable: _this.props.groupable, onGroupChange: _this.props.groupChange, render: columnMenu }),
|
|
107
|
-
column.headerCell &&
|
|
108
|
-
React.createElement(column.headerCell, __assign({}, headerCellProps)) ||
|
|
108
|
+
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 }),
|
|
109
|
+
column.headerCell && React.createElement(column.headerCell, __assign({}, headerCellProps)),
|
|
110
|
+
!column.headerCell && (React.createElement("span", { className: 'k-cell-inner' },
|
|
109
111
|
React.createElement(GridHeaderCell_1.GridHeaderCell, __assign({}, headerCellProps)),
|
|
112
|
+
columnMenu &&
|
|
113
|
+
React.createElement(ColumnMenu_1.ColumnMenu, { key: 0, column: {
|
|
114
|
+
field: column.field,
|
|
115
|
+
filter: column.filter
|
|
116
|
+
}, sortable: sortable && _this.props.sortable, sort: _this.props.sort, onSortChange: _this.props.sortChange, filter: _this.props.filter, filterable: _this.props.filterable && column.filterable, filterOperators: _this.props.filterOperators, onFilterChange: _this.props.filterChange, group: _this.props.group, groupable: _this.props.groupable, onGroupChange: _this.props.groupChange, render: columnMenu }))),
|
|
110
117
|
_this.props.columnResize && _this.props.columnResize.resizable && column.resizable &&
|
|
111
118
|
React.createElement(ColumnResizer_1.ColumnResizer, { key: 2, resize: function (e, element, end) {
|
|
112
119
|
return _this.props.columnResize &&
|
|
@@ -114,8 +121,7 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
114
121
|
}, autofit: function (e) {
|
|
115
122
|
return _this.props.columnResize &&
|
|
116
123
|
_this.props.columnResize.dblClickHandler(e, [column.id]);
|
|
117
|
-
} })
|
|
118
|
-
]));
|
|
124
|
+
} })));
|
|
119
125
|
}); };
|
|
120
126
|
_this.cellClick = _this.cellClick.bind(_this);
|
|
121
127
|
return _this;
|
|
@@ -135,24 +141,14 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
135
141
|
}
|
|
136
142
|
this.props.sortChange(newDescriptor, e);
|
|
137
143
|
};
|
|
138
|
-
HeaderRow.prototype.
|
|
139
|
-
var customClass = headerClassName ? ' ' + headerClassName : '';
|
|
140
|
-
var result = "k-header " + (locked ? 'k-grid-header-sticky' : '') + customClass;
|
|
141
|
-
if (this.props.sort &&
|
|
142
|
-
this.props.sort.filter(function (descriptor) { return descriptor.field === field; }).length > 0) {
|
|
143
|
-
result += ' k-sorted';
|
|
144
|
-
}
|
|
145
|
-
return result;
|
|
146
|
-
};
|
|
147
|
-
HeaderRow.prototype.sortIcon = function (sortIndex, sortable) {
|
|
144
|
+
HeaderRow.prototype.sortIcon = function (sortIndex) {
|
|
148
145
|
if (!this.props.sort) {
|
|
149
146
|
return null;
|
|
150
147
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
React.createElement("span", { key: 1, "aria-label": sortLabel, className: 'k-icon k-i-sort-' + this.props.sort[sortIndex].dir + '-sm' }),
|
|
148
|
+
return sortIndex >= 0 && [
|
|
149
|
+
React.createElement("span", { key: 1, className: 'k-icon k-i-sort-' + this.props.sort[sortIndex].dir + '-sm' }),
|
|
154
150
|
this.props.sort.length > 1 && React.createElement("span", { key: 2, className: "k-sort-order" }, sortIndex + 1)
|
|
155
|
-
]
|
|
151
|
+
];
|
|
156
152
|
};
|
|
157
153
|
HeaderRow.prototype.render = function () {
|
|
158
154
|
var _this = this;
|
|
@@ -105,6 +105,7 @@ export declare const messages: {
|
|
|
105
105
|
[filterTitle]: string;
|
|
106
106
|
[sortAscending]: string;
|
|
107
107
|
[sortDescending]: string;
|
|
108
|
+
[sortAriaLabel]: string;
|
|
108
109
|
[groupColumn]: string;
|
|
109
110
|
[ungroupColumn]: string;
|
|
110
111
|
[pagerItemPerPage]: string;
|
|
@@ -120,7 +121,6 @@ export declare const messages: {
|
|
|
120
121
|
[filterCheckAll]: string;
|
|
121
122
|
[filterChooseOperator]: string;
|
|
122
123
|
[filterSelectedItems]: string;
|
|
123
|
-
[sortAriaLabel]: string;
|
|
124
124
|
[filterAriaLabel]: string;
|
|
125
125
|
'grid.filterEqOperator': string;
|
|
126
126
|
'grid.filterNotEqOperator': string;
|
|
@@ -108,6 +108,7 @@ exports.messages = (_a = {},
|
|
|
108
108
|
_a[exports.filterTitle] = 'Filter',
|
|
109
109
|
_a[exports.sortAscending] = 'Sort Ascending',
|
|
110
110
|
_a[exports.sortDescending] = 'Sort Descending',
|
|
111
|
+
_a[exports.sortAriaLabel] = 'Sortable',
|
|
111
112
|
_a[exports.groupColumn] = 'Group Column',
|
|
112
113
|
_a[exports.ungroupColumn] = 'Ungroup Column',
|
|
113
114
|
_a[exports.pagerItemPerPage] = 'items per page',
|
|
@@ -123,7 +124,6 @@ exports.messages = (_a = {},
|
|
|
123
124
|
_a[exports.filterCheckAll] = 'Check All',
|
|
124
125
|
_a[exports.filterChooseOperator] = 'Choose Operator',
|
|
125
126
|
_a[exports.filterSelectedItems] = 'selected items',
|
|
126
|
-
_a[exports.sortAriaLabel] = 'Sortable',
|
|
127
127
|
_a[exports.filterAriaLabel] = 'Filter',
|
|
128
128
|
_a['grid.filterEqOperator'] = 'Is equal to',
|
|
129
129
|
_a['grid.filterNotEqOperator'] = 'Is not equal to',
|
|
@@ -7,7 +7,7 @@ exports.packageMetadata = {
|
|
|
7
7
|
name: '@progress/kendo-react-grid',
|
|
8
8
|
productName: 'KendoReact',
|
|
9
9
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
10
|
-
publishDate:
|
|
10
|
+
publishDate: 1635345203,
|
|
11
11
|
version: '',
|
|
12
12
|
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'
|
|
13
13
|
};
|