@progress/kendo-react-grid 5.10.0-dev.202301051045 → 5.10.0-dev.202301091032
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.d.ts +1 -0
- package/dist/es/Grid.js +39 -27
- package/dist/es/GridToolbar.js +5 -1
- package/dist/es/cells/GridCell.js +1 -1
- package/dist/es/cells/GridDetailCell.js +1 -1
- package/dist/es/cells/GridDetailHierarchyCell.js +1 -1
- package/dist/es/cells/GridEditCell.js +1 -1
- package/dist/es/cells/GridFilterCell.js +8 -8
- package/dist/es/cells/GridGroupCell.js +3 -3
- package/dist/es/cells/GridHierarchyCell.js +3 -2
- package/dist/es/columnMenu/GridColumnMenuWrapper.d.ts +2 -2
- package/dist/es/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/dist/es/drag/ColumnDraggable.js +1 -1
- package/dist/es/footer/Footer.d.ts +2 -0
- package/dist/es/footer/Footer.js +7 -3
- package/dist/es/footer/FooterRow.js +3 -2
- package/dist/es/header/FilterRow.d.ts +2 -1
- package/dist/es/header/FilterRow.js +4 -3
- package/dist/es/header/Header.d.ts +2 -0
- package/dist/es/header/Header.js +7 -4
- package/dist/es/header/HeaderRow.js +6 -3
- package/dist/es/interfaces/GridColumnProps.d.ts +1 -1
- package/dist/es/interfaces/GridFilterCellProps.d.ts +12 -0
- package/dist/es/interfaces/GridProps.d.ts +10 -0
- package/dist/es/interfaces/GridToolbarProps.d.ts +16 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rows/GridRow.js +2 -2
- package/dist/npm/Grid.d.ts +1 -0
- package/dist/npm/Grid.js +38 -26
- package/dist/npm/GridToolbar.js +5 -1
- package/dist/npm/cells/GridCell.js +1 -1
- package/dist/npm/cells/GridDetailCell.js +1 -1
- package/dist/npm/cells/GridDetailHierarchyCell.js +1 -1
- package/dist/npm/cells/GridEditCell.js +1 -1
- package/dist/npm/cells/GridFilterCell.js +7 -7
- package/dist/npm/cells/GridGroupCell.js +3 -3
- package/dist/npm/cells/GridHierarchyCell.js +3 -2
- package/dist/npm/columnMenu/GridColumnMenuWrapper.d.ts +2 -2
- package/dist/npm/columnMenu/GridColumnMenuWrapper.js +1 -1
- package/dist/npm/drag/ColumnDraggable.js +1 -1
- package/dist/npm/footer/Footer.d.ts +2 -0
- package/dist/npm/footer/Footer.js +7 -3
- package/dist/npm/footer/FooterRow.js +3 -2
- package/dist/npm/header/FilterRow.d.ts +2 -1
- package/dist/npm/header/FilterRow.js +4 -3
- package/dist/npm/header/Header.d.ts +2 -0
- package/dist/npm/header/Header.js +6 -3
- package/dist/npm/header/HeaderRow.js +6 -3
- package/dist/npm/interfaces/GridColumnProps.d.ts +1 -1
- package/dist/npm/interfaces/GridFilterCellProps.d.ts +12 -0
- package/dist/npm/interfaces/GridProps.d.ts +10 -0
- package/dist/npm/interfaces/GridToolbarProps.d.ts +16 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/rows/GridRow.js +2 -2
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
|
@@ -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: 1673259545,
|
|
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/es/rows/GridRow.js
CHANGED
|
@@ -40,12 +40,12 @@ var GridRow = /** @class */ (function (_super) {
|
|
|
40
40
|
*/
|
|
41
41
|
GridRow.prototype.render = function () {
|
|
42
42
|
var _a;
|
|
43
|
-
var className = classNames({
|
|
43
|
+
var className = classNames('k-table-row', {
|
|
44
44
|
'k-grouping-row': this.props.rowType === 'groupHeader',
|
|
45
45
|
'k-group-footer': this.props.rowType === 'groupFooter',
|
|
46
46
|
'k-master-row': this.props.rowType !== 'groupHeader' &&
|
|
47
47
|
this.props.rowType !== 'groupFooter',
|
|
48
|
-
'k-alt': this.props.rowType !== 'groupHeader' &&
|
|
48
|
+
'k-table-alt-row k-alt': this.props.rowType !== 'groupHeader' &&
|
|
49
49
|
this.props.rowType !== 'groupFooter' &&
|
|
50
50
|
this.props.isAltRow,
|
|
51
51
|
'k-selected': this.props.isSelected,
|
package/dist/npm/Grid.d.ts
CHANGED
|
@@ -100,6 +100,7 @@ export declare class Grid extends React.Component<GridProps, {}> {
|
|
|
100
100
|
onColumnReorder: PropTypes.Requireable<(...args: any[]) => any>;
|
|
101
101
|
dataItemKey: PropTypes.Requireable<string>;
|
|
102
102
|
navigatable: PropTypes.Requireable<boolean>;
|
|
103
|
+
size: PropTypes.Requireable<string>;
|
|
103
104
|
};
|
|
104
105
|
/** @hidden */
|
|
105
106
|
static contextType: React.Context<TableKeyboardNavigationContextType | undefined>;
|
package/dist/npm/Grid.js
CHANGED
|
@@ -424,6 +424,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
424
424
|
* @hidden
|
|
425
425
|
*/
|
|
426
426
|
Grid.prototype.render = function () {
|
|
427
|
+
var _a, _b, _c;
|
|
427
428
|
var _this = this;
|
|
428
429
|
var total = this.props.total || 0;
|
|
429
430
|
var idPrefix = kendo_react_data_tools_1.tableKeyboardNavigationTools.getIdPrefix(this.navigationStateRef);
|
|
@@ -473,17 +474,17 @@ var Grid = /** @class */ (function (_super) {
|
|
|
473
474
|
child.type.displayName === 'KendoReactGridNoRecords'; });
|
|
474
475
|
var leafColumns = this._columns.filter(function (c) { return c.children.length === 0; });
|
|
475
476
|
var groupingPanel = groupable && (React.createElement(GroupPanel_1.GroupPanel, { group: this.props.group || [], groupChange: this.groupChange, pressHandler: this.dragLogic.pressHandler, dragHandler: this.dragLogic.dragHandler, releaseHandler: this.dragLogic.releaseHandler, refCallback: this.dragLogic.refGroupPanelDiv, resolveTitle: this.resolveTitle }));
|
|
476
|
-
var
|
|
477
|
-
var header = (React.createElement(Header_1.Header, { columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, elemRef: this.headerElementRef, headerRow: this.getHeaderRow(sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, this._columns, this._columnsMap), filterRow: this.props.filterable && React.createElement(FilterRow_1.FilterRow, { columns: this._columns, filter: this.props.filter, filterOperators: this.props.filterOperators || filterCommon_1.operators, filterChange: this.filterChange, sort: this.props.sort, cellRender: this.props.filterCellRender, isRtl: this.isRtl, ariaRowIndex: this._columnsMap.length + 1 }) || undefined, cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
|
|
477
|
+
var _d = this.props, sort = _d.sort, sortable = _d.sortable, group = _d.group, filter = _d.filter, filterable = _d.filterable, _e = _d.filterOperators, filterOperators = _e === void 0 ? filterCommon_1.operators : _e, headerCellRender = _d.headerCellRender, columnMenu = _d.columnMenu;
|
|
478
|
+
var header = (React.createElement(Header_1.Header, { size: this.props.size, columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', scrollableDataElement: function () { return _this.vs.container; }, draggable: this.props.reorderable || groupable, ref: this.headerRef, elemRef: this.headerElementRef, headerRow: this.getHeaderRow(sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, this._columns, this._columnsMap), filterRow: this.props.filterable && React.createElement(FilterRow_1.FilterRow, { size: this.props.size, columns: this._columns, filter: this.props.filter, filterOperators: this.props.filterOperators || filterCommon_1.operators, filterChange: this.filterChange, sort: this.props.sort, cellRender: this.props.filterCellRender, isRtl: this.isRtl, ariaRowIndex: this._columnsMap.length + 1 }) || undefined, cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
|
|
478
479
|
Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) }));
|
|
479
480
|
var scrollLeft = this.vs && this.vs.container && this.vs.container.scrollLeft || 0;
|
|
480
481
|
var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
|
|
481
|
-
var
|
|
482
|
+
var _f = (0, kendo_react_data_tools_1.tableColumnsVirtualization)({
|
|
482
483
|
enabled: this.props.columnVirtualization,
|
|
483
484
|
columns: leafColumns,
|
|
484
485
|
tableViewPortWidth: tableWidth,
|
|
485
486
|
scrollLeft: scrollLeft
|
|
486
|
-
}), colSpans =
|
|
487
|
+
}), colSpans = _f.colSpans, isColHidden = _f.hiddenColumns;
|
|
487
488
|
var dataRow = function (item, rowId, rowDataIndex) {
|
|
488
489
|
var isInEdit = false;
|
|
489
490
|
var selectedValue = _this.props.selectedField ? (0, index_1.getNestedValue)(_this.props.selectedField, item.dataItem) : undefined;
|
|
@@ -562,7 +563,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
562
563
|
- (_this.props.group ? _this.props.group.length : 0)) || 1;
|
|
563
564
|
detailRowCount_1++;
|
|
564
565
|
currentAriaRowIndex = absoluteIndex + rowIndexStart + detailRowCount_1;
|
|
565
|
-
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 },
|
|
566
|
+
body.push((React.createElement("tr", { key: detailRowId, className: (0, kendo_react_common_1.classNames)('k-table-row', isAlt ? 'k-detail-row k-table-alt-row k-alt' : 'k-detail-row'), style: { visibility: hidden(rowIndex) ? 'hidden' : '' }, role: "row", "aria-rowindex": currentAriaRowIndex },
|
|
566
567
|
_this.props.group && _this.props.group.map(function (gr, idx) {
|
|
567
568
|
return (React.createElement(GridGroupCell_1.GridGroupCell, { id: '', dataIndex: item.dataIndex, field: gr.field, dataItem: item.dataItem, key: idx, style: {}, ariaColumnIndex: 1 + idx, isSelected: false, locked: _this.props.lockGroups }));
|
|
568
569
|
}),
|
|
@@ -573,15 +574,15 @@ var Grid = /** @class */ (function (_super) {
|
|
|
573
574
|
});
|
|
574
575
|
}
|
|
575
576
|
else {
|
|
576
|
-
body.push((React.createElement("tr", { key: "no-records", className: "k-grid-norecords", "aria-rowindex": rowIndexStart },
|
|
577
|
-
React.createElement("td", { colSpan: leafColumns.length }, noRecords.length ? noRecords : React.createElement(GridNoRecords_1.GridNoRecords, null)))));
|
|
577
|
+
body.push((React.createElement("tr", { key: "no-records", className: "k-table-row k-grid-norecords", role: 'row', "aria-rowindex": rowIndexStart },
|
|
578
|
+
React.createElement("td", { className: 'k-table-td', colSpan: leafColumns.length, role: 'gridcell' }, noRecords.length ? noRecords : React.createElement(GridNoRecords_1.GridNoRecords, null)))));
|
|
578
579
|
}
|
|
579
|
-
var pagerProps = __assign({
|
|
580
|
-
var pager = this.props.pager ? React.createElement(this.props.pager, __assign({}, pagerProps)) : React.createElement(kendo_react_data_tools_1.Pager, __assign({}, pagerProps));
|
|
580
|
+
var pagerProps = __assign({ size: this.props.size, onPageChange: this.pagerPageChange, total: total, skip: this.vs.propsSkip || 0, take: (this.props.take !== undefined ? this.props.take : this.props.pageSize) || 10, messagesMap: messages_1.pagerMessagesMap }, ((0, GridPagerSettings_1.normalize)(this.props.pageable || {})));
|
|
581
|
+
var pager = this.props.pager ? React.createElement(this.props.pager, __assign({}, pagerProps)) : React.createElement(kendo_react_data_tools_1.Pager, __assign({ className: "k-grid-pager" }, pagerProps));
|
|
581
582
|
var sorted = function (field) {
|
|
582
583
|
return _this.props.sort && _this.props.sort.filter(function (descriptor) { return descriptor.field === field; }).length > 0;
|
|
583
584
|
};
|
|
584
|
-
var footer = this._columns.some(function (c) { return Boolean(c.footerCell); }) ? (React.createElement(Footer_1.Footer, { columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', ref: function (f) { return _this._footer = f; }, row: React.createElement(FooterRow_1.FooterRow, { columns: this._columns, isRtl: this.isRtl, ariaRowIndex: currentAriaRowIndex + 1 }), cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
|
|
585
|
+
var footer = this._columns.some(function (c) { return Boolean(c.footerCell); }) ? (React.createElement(Footer_1.Footer, { size: this.props.size, columnResize: this.columnResize, staticHeaders: this.props.scrollable !== 'none', ref: function (f) { return _this._footer = f; }, row: React.createElement(FooterRow_1.FooterRow, { columns: this._columns, isRtl: this.isRtl, ariaRowIndex: currentAriaRowIndex + 1 }), cols: leafColumns.map(function (column, index) { return (React.createElement("col", { key: index.toString(), width: column.width !== undefined ?
|
|
585
586
|
Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) })) : null;
|
|
586
587
|
var colGroups = (React.createElement("colgroup", { ref: function (c) {
|
|
587
588
|
_this.columnResize.colGroupMain = c;
|
|
@@ -591,7 +592,11 @@ var Grid = /** @class */ (function (_super) {
|
|
|
591
592
|
var tableDisplay = this.props.columnVirtualization ? 'block' : 'table';
|
|
592
593
|
if (this.props.scrollable === 'none') {
|
|
593
594
|
return (React.createElement(kendo_react_data_tools_1.TableKeyboardNavigationContext.Provider, { value: this.contextStateRef.current },
|
|
594
|
-
React.createElement("div", __assign({ id: this.props.id, style: this.props.style, className: (0, kendo_react_common_1.classNames)('k-
|
|
595
|
+
React.createElement("div", __assign({ id: this.props.id, style: this.props.style, className: (0, kendo_react_common_1.classNames)('k-grid', (_a = {
|
|
596
|
+
'k-grid-md': !this.props.size
|
|
597
|
+
},
|
|
598
|
+
_a["k-grid-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
599
|
+
_a), this.props.className), ref: function (el) { _this._element = el; }, "aria-label": this.props.ariaLabel, onKeyDown: this.onKeyDown, onFocus: this.onFocus }, kendo_react_data_tools_1.tableKeyboardNavigationScopeAttributes),
|
|
595
600
|
toolbar,
|
|
596
601
|
groupingPanel,
|
|
597
602
|
React.createElement(kendo_react_data_tools_1.TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
|
|
@@ -602,7 +607,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
602
607
|
React.createElement("table", { style: { userSelect: tableUserSelect, display: tableDisplay } },
|
|
603
608
|
colGroups,
|
|
604
609
|
header,
|
|
605
|
-
React.createElement("tbody", __assign({}, kendo_react_data_tools_1.tableKeyboardNavigationBodyAttributes), body),
|
|
610
|
+
React.createElement("tbody", __assign({ role: 'rowgroup', className: 'k-table-tbody' }, kendo_react_data_tools_1.tableKeyboardNavigationBodyAttributes), body),
|
|
606
611
|
footer)),
|
|
607
612
|
this.props.pageable && pager,
|
|
608
613
|
enableDragClues && (React.createElement(React.Fragment, null,
|
|
@@ -617,9 +622,12 @@ var Grid = /** @class */ (function (_super) {
|
|
|
617
622
|
}
|
|
618
623
|
}
|
|
619
624
|
return (React.createElement(kendo_react_data_tools_1.TableKeyboardNavigationContext.Provider, { value: this.contextStateRef.current },
|
|
620
|
-
React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: (0, kendo_react_common_1.classNames)('k-
|
|
621
|
-
|
|
622
|
-
|
|
625
|
+
React.createElement("div", __assign({ id: this.props.id, style: wrapperStyle, className: (0, kendo_react_common_1.classNames)('k-grid', (_b = {
|
|
626
|
+
'k-grid-md': !this.props.size
|
|
627
|
+
},
|
|
628
|
+
_b["k-grid-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
629
|
+
_b['k-grid-virtual'] = this.props.scrollable === 'virtual',
|
|
630
|
+
_b), this.props.className), ref: function (el) {
|
|
623
631
|
_this._element = el;
|
|
624
632
|
_this.resetTableWidth();
|
|
625
633
|
}, role: "grid", "aria-colcount": leafColumns.length, "aria-rowcount": total, "aria-label": this.props.ariaLabel, onKeyDown: this.onKeyDown, onFocus: this.onFocus }, kendo_react_data_tools_1.tableKeyboardNavigationScopeAttributes),
|
|
@@ -628,16 +636,19 @@ var Grid = /** @class */ (function (_super) {
|
|
|
628
636
|
header,
|
|
629
637
|
React.createElement("div", { className: "k-grid-container", role: "presentation" },
|
|
630
638
|
React.createElement("div", { ref: this.vs.containerRef, className: "k-grid-content k-virtual-content", onScroll: this.scrollHandler, role: "presentation" },
|
|
631
|
-
React.createElement(
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
639
|
+
React.createElement(kendo_react_data_tools_1.TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease, childRef: function (table) {
|
|
640
|
+
_this.vs.table = table;
|
|
641
|
+
_this.tableElement = table;
|
|
642
|
+
} },
|
|
643
|
+
React.createElement("table", { className: (0, kendo_react_common_1.classNames)('k-table k-grid-table', (_c = {
|
|
644
|
+
'k-grid-md': !this.props.size
|
|
645
|
+
},
|
|
646
|
+
_c["k-table-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
647
|
+
_c), this.props.className), role: "presentation", style: { userSelect: tableUserSelect, display: tableDisplay } },
|
|
648
|
+
colGroups,
|
|
649
|
+
React.createElement("tbody", __assign({ className: 'k-table-tbody', ref: function (tableBody) {
|
|
650
|
+
_this.vs.tableBody = tableBody;
|
|
651
|
+
}, role: 'rowgroup' }, kendo_react_data_tools_1.tableKeyboardNavigationBodyAttributes), body))),
|
|
641
652
|
React.createElement("div", { className: "k-height-container", role: "presentation" },
|
|
642
653
|
React.createElement("div", { style: this.props.scrollable === 'virtual' ?
|
|
643
654
|
{ 'height': (this.vs.containerHeight) + 'px' } : {} })))),
|
|
@@ -870,7 +881,8 @@ var Grid = /** @class */ (function (_super) {
|
|
|
870
881
|
onColumnResize: PropTypes.func,
|
|
871
882
|
onColumnReorder: PropTypes.func,
|
|
872
883
|
dataItemKey: PropTypes.string,
|
|
873
|
-
navigatable: PropTypes.bool
|
|
884
|
+
navigatable: PropTypes.bool,
|
|
885
|
+
size: PropTypes.oneOf(['small', 'medium'])
|
|
874
886
|
};
|
|
875
887
|
/** @hidden */
|
|
876
888
|
Grid.contextType = kendo_react_data_tools_1.TableKeyboardNavigationContext;
|
package/dist/npm/GridToolbar.js
CHANGED
|
@@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.GridToolbar = void 0;
|
|
19
19
|
var React = require("react");
|
|
20
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
20
21
|
/**
|
|
21
22
|
* Represents the GridToolbar component.
|
|
22
23
|
*
|
|
@@ -64,7 +65,10 @@ var GridToolbar = /** @class */ (function (_super) {
|
|
|
64
65
|
* @hidden
|
|
65
66
|
*/
|
|
66
67
|
GridToolbar.prototype.render = function () {
|
|
67
|
-
|
|
68
|
+
var _a;
|
|
69
|
+
return (React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-toolbar k-grid-toolbar', (_a = {},
|
|
70
|
+
_a["k-toolbar-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
71
|
+
_a), this.props.className) }, this.props.children));
|
|
68
72
|
};
|
|
69
73
|
/**
|
|
70
74
|
* @hidden
|
|
@@ -34,7 +34,7 @@ var GridCell = function (props) {
|
|
|
34
34
|
intl.format(props.format, data) :
|
|
35
35
|
data.toString();
|
|
36
36
|
}
|
|
37
|
-
var className = (0, kendo_react_common_1.classNames)(props.className, { 'k-selected': props.isSelected });
|
|
37
|
+
var className = (0, kendo_react_common_1.classNames)('k-table-td', props.className, { 'k-selected': props.isSelected });
|
|
38
38
|
defaultRendering = (React.createElement("td", __assign({ colSpan: props.colSpan, style: props.style, className: className, role: 'gridcell', "aria-colindex": props.ariaColumnIndex, "aria-selected": props.isSelected }, (_a = {}, _a[constants_1.GRID_COL_INDEX_ATTRIBUTE] = props.columnIndex, _a), navigationAttributes), dataAsString));
|
|
39
39
|
}
|
|
40
40
|
return props.render ?
|
|
@@ -18,7 +18,7 @@ var React = require("react");
|
|
|
18
18
|
var GridDetailCell = function (props) {
|
|
19
19
|
var colSpan = props.colSpan, ariaColIndex = props.ariaColIndex, dataItem = props.dataItem, dataIndex = props.dataIndex, id = props.id;
|
|
20
20
|
var navigationAttributes = (0, kendo_react_data_tools_1.useTableKeyboardNavigation)(id);
|
|
21
|
-
return (React.createElement("td", __assign({ className: "k-detail-cell", colSpan: colSpan, "aria-colindex": ariaColIndex, role: 'gridcell' }, navigationAttributes),
|
|
21
|
+
return (React.createElement("td", __assign({ className: "k-table-td k-detail-cell", colSpan: colSpan, "aria-colindex": ariaColIndex, role: 'gridcell' }, navigationAttributes),
|
|
22
22
|
React.createElement(props.detail, { dataItem: dataItem, dataIndex: dataIndex })));
|
|
23
23
|
};
|
|
24
24
|
exports.GridDetailCell = GridDetailCell;
|
|
@@ -17,6 +17,6 @@ var React = require("react");
|
|
|
17
17
|
/** @hidden */
|
|
18
18
|
var GridDetailHierarchyCell = function (props) {
|
|
19
19
|
var navigationAttributes = (0, kendo_react_data_tools_1.useTableKeyboardNavigation)(props.id);
|
|
20
|
-
return (React.createElement("td", __assign({ className: "k-hierarchy-cell" }, navigationAttributes)));
|
|
20
|
+
return (React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell" }, navigationAttributes, { role: 'gridcell' })));
|
|
21
21
|
};
|
|
22
22
|
exports.GridDetailHierarchyCell = GridDetailHierarchyCell;
|
|
@@ -26,7 +26,7 @@ var GridEditCell = function (props) {
|
|
|
26
26
|
var _a, _b, _c, _d, _e;
|
|
27
27
|
var data = (0, utils_1.getNestedValue)(props.field, props.dataItem);
|
|
28
28
|
var defaultRendering = null;
|
|
29
|
-
var editCellClasses = (0, kendo_react_common_1.classNames)('k-grid-edit-cell', (_a = {},
|
|
29
|
+
var editCellClasses = (0, kendo_react_common_1.classNames)('k-table-td', 'k-grid-edit-cell', (_a = {},
|
|
30
30
|
_a['k-selected'] = props.isSelected,
|
|
31
31
|
_a), props.className);
|
|
32
32
|
var inputId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
|
|
@@ -34,7 +34,7 @@ var GridFilterCell = /** @class */ (function (_super) {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
var value = _this.props.operators.find(function (item) { return item.operator === _this.props.operator; }) || null;
|
|
37
|
-
return (React.createElement(kendo_react_dropdowns_1.DropDownList, { value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", data: _this.props.operators, textField: "text", title: localization.toLanguageString(messages_1.filterChooseOperator, messages_1.messages[messages_1.filterChooseOperator]), popupSettings: {
|
|
37
|
+
return (React.createElement(kendo_react_dropdowns_1.DropDownList, { size: _this.props.size, value: value, onChange: _this.operatorChange, className: "k-dropdown-operator", iconClassName: "k-i-filter k-icon", data: _this.props.operators, textField: "text", title: localization.toLanguageString(messages_1.filterChooseOperator, messages_1.messages[messages_1.filterChooseOperator]), popupSettings: {
|
|
38
38
|
width: ''
|
|
39
39
|
} }));
|
|
40
40
|
};
|
|
@@ -51,12 +51,12 @@ var GridFilterCell = /** @class */ (function (_super) {
|
|
|
51
51
|
var _a;
|
|
52
52
|
var localizationService = (0, kendo_react_intl_1.provideLocalizationService)(this);
|
|
53
53
|
var defaultRendering = (React.createElement("div", { className: "k-filtercell" },
|
|
54
|
-
React.createElement("
|
|
54
|
+
React.createElement("div", { className: "k-filtercell-wrapper" },
|
|
55
55
|
this.filterComponent(this.props.filterType, this.props.value, this.props.booleanValues),
|
|
56
56
|
React.createElement("div", { className: "k-filtercell-operator" },
|
|
57
57
|
this.renderOperatorEditor(localizationService),
|
|
58
58
|
"\u00A0",
|
|
59
|
-
React.createElement(kendo_react_buttons_1.Button, { icon: 'filter-clear', className: (0, kendo_react_common_1.classNames)((_a = {},
|
|
59
|
+
React.createElement(kendo_react_buttons_1.Button, { size: this.props.size, icon: 'filter-clear', className: (0, kendo_react_common_1.classNames)((_a = {},
|
|
60
60
|
_a['k-clear-button-visible'] = Boolean(!(this.props.value === null || this.props.value === '') || this.props.operator),
|
|
61
61
|
_a)), title: localizationService.toLanguageString(messages_1.filterClearButton, messages_1.messages[messages_1.filterClearButton]), type: "button", onClick: this.clear, disabled: !(!(this.props.value === null || this.props.value === '') || this.props.operator) })))));
|
|
62
62
|
if (this.props.render) {
|
|
@@ -81,13 +81,13 @@ var GridFilterCell = /** @class */ (function (_super) {
|
|
|
81
81
|
var _this = this;
|
|
82
82
|
switch (filterType) {
|
|
83
83
|
case 'numeric':
|
|
84
|
-
return (React.createElement(kendo_react_inputs_1.NumericTextBox, { value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
84
|
+
return (React.createElement(kendo_react_inputs_1.NumericTextBox, { size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
85
85
|
case 'date':
|
|
86
|
-
return (React.createElement(kendo_react_dateinputs_1.DatePicker, { value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
86
|
+
return (React.createElement(kendo_react_dateinputs_1.DatePicker, { size: this.props.size, value: value, onChange: function (e) { _this.inputChange(e.value, e.syntheticEvent); }, title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
87
87
|
case 'boolean':
|
|
88
88
|
var noFilterSet_1 = function (filter) { return filter === null || filter === undefined; };
|
|
89
|
-
return (React.createElement(kendo_react_dropdowns_1.DropDownList, { onChange: this.boolDropdownChange, value: booleanValues.find(function (item) { return item.operator === (noFilterSet_1(value) ? '' : value); }), data: booleanValues, textField: "text", title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
90
|
-
default: return (React.createElement(kendo_react_inputs_1.
|
|
89
|
+
return (React.createElement(kendo_react_dropdowns_1.DropDownList, { size: this.props.size, onChange: this.boolDropdownChange, value: booleanValues.find(function (item) { return item.operator === (noFilterSet_1(value) ? '' : value); }), data: booleanValues, textField: "text", title: this.props.title, ariaLabel: this.props.ariaLabel }));
|
|
90
|
+
default: return (React.createElement(kendo_react_inputs_1.TextBox, { size: this.props.size, value: value || '', onChange: function (e) { _this.inputChange(e.target.value, e.syntheticEvent); }, title: this.props.title, "aria-label": this.props.ariaLabel }));
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
return GridFilterCell;
|
|
@@ -44,7 +44,7 @@ var GridGroupCell = function (props) {
|
|
|
44
44
|
var renderCellCollapse = function (colspan, styles) {
|
|
45
45
|
var baseMessage = expanded ? messages_1.groupCollapse : messages_1.groupExpand;
|
|
46
46
|
var message = localization.toLanguageString(baseMessage, messages_1.messages[baseMessage]);
|
|
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),
|
|
47
|
+
return (React.createElement("td", __assign({ className: 'k-table-td', 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),
|
|
48
48
|
React.createElement("p", { className: "k-reset" },
|
|
49
49
|
React.createElement("a", { onClick: function (e) {
|
|
50
50
|
e.preventDefault();
|
|
@@ -64,7 +64,7 @@ var GridGroupCell = function (props) {
|
|
|
64
64
|
};
|
|
65
65
|
if (columnIndex === undefined || level === undefined || columnIndex < level ||
|
|
66
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: "
|
|
67
|
+
defaultRendering = (React.createElement("td", { style: props.style, key: 'g' + columnIndex, className: (0, kendo_react_common_1.classNames)('k-table-td', 'k-group-cell', { 'k-grid-content-sticky': props.locked }), role: "gridcell" }));
|
|
68
68
|
}
|
|
69
69
|
else if (columnIndex <= level && !props.locked) {
|
|
70
70
|
defaultRendering = renderCellCollapse(columnsCount - columnIndex, {});
|
|
@@ -72,7 +72,7 @@ var GridGroupCell = function (props) {
|
|
|
72
72
|
else if (columnIndex <= level && props.locked) {
|
|
73
73
|
defaultRendering = (React.createElement(React.Fragment, null,
|
|
74
74
|
renderCellCollapse(0, { position: 'sticky', zIndex: 2 }),
|
|
75
|
-
React.createElement("td", { colSpan: (columnsCount - columnIndex), style: { borderLeftWidth: 0, borderRightWidth: 0 } })));
|
|
75
|
+
React.createElement("td", { className: 'k-table-td', role: 'gridcell', colSpan: (columnsCount - columnIndex), style: { borderLeftWidth: 0, borderRightWidth: 0 } })));
|
|
76
76
|
}
|
|
77
77
|
return render ?
|
|
78
78
|
render.call(undefined, defaultRendering, props) :
|
|
@@ -42,13 +42,14 @@ var GridHierarchyCell = function (props) {
|
|
|
42
42
|
}
|
|
43
43
|
}, [props.dataItem, props.dataIndex, props.field, props.onChange, expanded]);
|
|
44
44
|
if (props.rowType === 'groupFooter') {
|
|
45
|
-
defaultRendering =
|
|
45
|
+
defaultRendering =
|
|
46
|
+
React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell", role: 'gridcell' }, navigationAttributes));
|
|
46
47
|
}
|
|
47
48
|
else if (props.rowType !== 'groupHeader') {
|
|
48
49
|
var className = expanded ? 'k-icon k-i-minus' : 'k-icon k-i-plus';
|
|
49
50
|
var baseMessage = expanded ? messages_1.detailCollapse : messages_1.detailExpand;
|
|
50
51
|
var message = localization.toLanguageString(baseMessage, messages_1.messages[baseMessage]);
|
|
51
|
-
defaultRendering = (React.createElement("td", __assign({ className: "k-hierarchy-cell", onKeyDown: onKeyDownHandler, "aria-expanded": expanded ? 'true' : 'false', role: 'gridcell', "aria-colindex": props.ariaColumnIndex }, navigationAttributes),
|
|
52
|
+
defaultRendering = (React.createElement("td", __assign({ className: "k-table-td k-hierarchy-cell", onKeyDown: onKeyDownHandler, "aria-expanded": expanded ? 'true' : 'false', role: 'gridcell', "aria-colindex": props.ariaColumnIndex }, navigationAttributes),
|
|
52
53
|
React.createElement("a", { onClick: function (e) {
|
|
53
54
|
e.preventDefault();
|
|
54
55
|
if (props.onChange) {
|
|
@@ -22,7 +22,7 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
|
|
|
22
22
|
/** @hidden */
|
|
23
23
|
readonly state: ColumnMenuStateProps;
|
|
24
24
|
/** @hidden */
|
|
25
|
-
_anchor:
|
|
25
|
+
_anchor: HTMLAnchorElement | null;
|
|
26
26
|
/** @hidden */
|
|
27
27
|
_content: HTMLDivElement | null;
|
|
28
28
|
/** @hidden */
|
|
@@ -38,6 +38,6 @@ export declare class GridColumnMenuWrapper extends React.Component<GridColumnMen
|
|
|
38
38
|
/** @hidden */
|
|
39
39
|
closeMenu: () => void;
|
|
40
40
|
/** @hidden */
|
|
41
|
-
onAnchorMouseDown: (event: React.MouseEvent<
|
|
41
|
+
onAnchorMouseDown: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
42
42
|
render(): JSX.Element;
|
|
43
43
|
}
|
|
@@ -90,7 +90,7 @@ var GridColumnMenuWrapper = /** @class */ (function (_super) {
|
|
|
90
90
|
var _this = this;
|
|
91
91
|
var _a = this.props, ColumnMenu = _a.columnMenu, others = __rest(_a, ["columnMenu"]);
|
|
92
92
|
return (React.createElement(React.Fragment, null,
|
|
93
|
-
React.createElement("
|
|
93
|
+
React.createElement("a", { className: 'k-grid-header-menu k-grid-column-menu', ref: function (e) { return _this._anchor = e; }, onClick: this.anchorClick, onMouseDown: this.onAnchorMouseDown, href: "#" },
|
|
94
94
|
React.createElement("span", { className: 'k-icon k-i-more-vertical' })),
|
|
95
95
|
React.createElement(kendo_react_popup_1.Popup, { anchor: this._anchor, show: this.state.show },
|
|
96
96
|
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' } }, ColumnMenu && (React.createElement(ColumnMenu, __assign({}, others, { onCloseMenu: this.closeMenu })))))));
|
|
@@ -58,7 +58,7 @@ var ColumnDraggable = /** @class */ (function (_super) {
|
|
|
58
58
|
ColumnDraggable.prototype.render = function () {
|
|
59
59
|
var _this = this;
|
|
60
60
|
return (React.createElement(kendo_react_common_1.Draggable, { onPress: this.onPress, onDrag: this.onDrag, onRelease: this.onRelease, hint: this.props.dragClue, autoScroll: { boundaryElementRef: this.props.headerRef, direction: { horizontal: true, vertical: false } }, scrollContainer: this.props.containerRef || undefined, ref: function (component) { _this.draggable = component; } },
|
|
61
|
-
React.createElement("tr", { style: { touchAction: 'none' }, role: "row", "aria-rowindex": this.props.ariaRowIndex }, this.props.children)));
|
|
61
|
+
React.createElement("tr", { className: 'k-table-row', style: { touchAction: 'none' }, role: "row", "aria-rowindex": this.props.ariaRowIndex }, this.props.children)));
|
|
62
62
|
};
|
|
63
63
|
return ColumnDraggable;
|
|
64
64
|
}(React.PureComponent));
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.Footer = void 0;
|
|
19
19
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
20
20
|
var React = require("react");
|
|
21
|
+
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
21
22
|
/**
|
|
22
23
|
* @hidden
|
|
23
24
|
*/
|
|
@@ -52,15 +53,18 @@ var Footer = /** @class */ (function (_super) {
|
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
55
|
Footer.prototype.render = function () {
|
|
56
|
+
var _a;
|
|
55
57
|
var _this = this;
|
|
56
58
|
if (!this.props.staticHeaders) {
|
|
57
|
-
return (React.createElement("tfoot", { className: "k-
|
|
59
|
+
return (React.createElement("tfoot", { className: "k-table-tfoot" }, this.props.row));
|
|
58
60
|
}
|
|
59
61
|
return (React.createElement("div", { className: "k-grid-footer", role: "presentation" },
|
|
60
62
|
React.createElement("div", { ref: function (div) { _this.footerWrap = div; }, className: "k-grid-footer-wrap", style: this.scrollbarWidth ? {} : { borderWidth: 0 }, role: "presentation" },
|
|
61
|
-
React.createElement("table", { ref: function (table) { _this.table = table; },
|
|
63
|
+
React.createElement("table", { ref: function (table) { _this.table = table; }, className: (0, kendo_react_common_2.classNames)('k-table k-grid-footer-table', (_a = {},
|
|
64
|
+
_a["k-table-".concat(kendo_react_common_2.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
65
|
+
_a), this.props.className), role: "presentation" },
|
|
62
66
|
React.createElement("colgroup", { ref: function (e) { _this.props.columnResize.colGroupFooter = e; }, role: "presentation" }, this.props.cols),
|
|
63
|
-
React.createElement("tfoot", { role: "presentation" }, this.props.row)))));
|
|
67
|
+
React.createElement("tfoot", { className: "k-table-tfoot", role: "presentation" }, this.props.row)))));
|
|
64
68
|
};
|
|
65
69
|
return Footer;
|
|
66
70
|
}(React.Component));
|
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.FooterRow = void 0;
|
|
30
30
|
var React = require("react");
|
|
31
31
|
var utils_1 = require("./../utils");
|
|
32
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
32
33
|
/**
|
|
33
34
|
* @hidden
|
|
34
35
|
*/
|
|
@@ -45,7 +46,7 @@ var FooterRow = /** @class */ (function (_super) {
|
|
|
45
46
|
? { left: column.left, right: column.right }
|
|
46
47
|
: { left: column.right, right: column.left }
|
|
47
48
|
: {},
|
|
48
|
-
className: column.locked && column.left !== undefined ? 'k-grid-footer-sticky' : ''
|
|
49
|
+
className: (0, kendo_react_common_1.classNames)('k-table-td', column.locked && column.left !== undefined ? 'k-grid-footer-sticky' : '')
|
|
49
50
|
};
|
|
50
51
|
var cellProps = __assign({ field: column.field, ariaColumnIndex: column.ariaColumnIndex }, tdProps);
|
|
51
52
|
return (column.footerCell && React.createElement(column.footerCell, __assign({}, cellProps, { key: index }))) || (React.createElement("td", __assign({ key: index }, tdProps, { role: 'columnfooter', "aria-selected": false, "aria-colindex": column.ariaColumnIndex })));
|
|
@@ -60,7 +61,7 @@ var FooterRow = /** @class */ (function (_super) {
|
|
|
60
61
|
configurable: true
|
|
61
62
|
});
|
|
62
63
|
FooterRow.prototype.render = function () {
|
|
63
|
-
return React.createElement("tr", { role: "row", "aria-rowindex": this.props.ariaRowIndex }, (0, utils_1.footerColumns)(this.props.columns).map(this.renderCell));
|
|
64
|
+
return React.createElement("tr", { className: 'k-table-row', role: "row", "aria-rowindex": this.props.ariaRowIndex }, (0, utils_1.footerColumns)(this.props.columns).map(this.renderCell));
|
|
64
65
|
};
|
|
65
66
|
return FooterRow;
|
|
66
67
|
}(React.Component));
|
|
@@ -6,7 +6,7 @@ import { GridFilterOperators } from '../interfaces/GridFilterOperators';
|
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
|
-
export declare const FILTER_ROW_CLASS = "k-filter-row";
|
|
9
|
+
export declare const FILTER_ROW_CLASS = "k-table-row k-filter-row";
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
@@ -19,6 +19,7 @@ export interface FilterRowProps {
|
|
|
19
19
|
cellRender?: (defaultRendering: React.ReactElement<any> | null, props: GridFilterCellProps) => React.ReactElement<any> | null;
|
|
20
20
|
isRtl?: boolean;
|
|
21
21
|
ariaRowIndex?: number;
|
|
22
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
22
23
|
}
|
|
23
24
|
/**
|
|
24
25
|
*
|
|
@@ -33,10 +33,11 @@ var GridFilterCell_1 = require("../cells/GridFilterCell");
|
|
|
33
33
|
var filterCommon_1 = require("../filterCommon");
|
|
34
34
|
var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
|
|
35
35
|
var messages_1 = require("../messages");
|
|
36
|
+
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
36
37
|
/**
|
|
37
38
|
* @hidden
|
|
38
39
|
*/
|
|
39
|
-
exports.FILTER_ROW_CLASS = 'k-filter-row';
|
|
40
|
+
exports.FILTER_ROW_CLASS = 'k-table-row k-filter-row';
|
|
40
41
|
/**
|
|
41
42
|
*
|
|
42
43
|
* @hidden
|
|
@@ -121,9 +122,9 @@ var FilterRow = /** @class */ (function (_super) {
|
|
|
121
122
|
? { left: column.left, right: column.right }
|
|
122
123
|
: { left: column.right, right: column.left }
|
|
123
124
|
: {};
|
|
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
|
+
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: (0, kendo_react_common_1.classNames)('k-header', _this.headerCellClassName(column.field, column.locked) || undefined), role: "columnheader" }, ariaAttrs), filterCellProps && (column.filterCell ?
|
|
125
126
|
React.createElement(column.filterCell, __assign({}, filterCellProps)) :
|
|
126
|
-
React.createElement(GridFilterCell_1.GridFilterCell, __assign({}, filterCellProps)))));
|
|
127
|
+
React.createElement(GridFilterCell_1.GridFilterCell, __assign({ size: _this.props.size }, filterCellProps)))));
|
|
127
128
|
});
|
|
128
129
|
return React.createElement("tr", { className: exports.FILTER_ROW_CLASS, "aria-rowindex": this.props.ariaRowIndex, role: "row" }, filterCells);
|
|
129
130
|
};
|
|
@@ -91,17 +91,20 @@ var Header = /** @class */ (function (_super) {
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
Header.prototype.render = function () {
|
|
94
|
+
var _a;
|
|
94
95
|
var _this = this;
|
|
95
96
|
if (!this.props.staticHeaders) {
|
|
96
|
-
return (React.createElement("thead", __assign({ role: "presentation", className: (0, kendo_react_common_1.classNames)('k-
|
|
97
|
+
return (React.createElement("thead", __assign({ role: "presentation", className: (0, kendo_react_common_1.classNames)('k-table-thead', { 'k-grid-draggable-header': this.props.draggable }) }, kendo_react_data_tools_1.tableKeyboardNavigationHeaderAttributes),
|
|
97
98
|
this.props.headerRow,
|
|
98
99
|
this.props.filterRow));
|
|
99
100
|
}
|
|
100
101
|
return (React.createElement("div", { ref: this.props.elemRef, className: (0, kendo_react_common_1.classNames)('k-grid-header', { 'k-grid-draggable-header': this.props.draggable }), role: "presentation" },
|
|
101
102
|
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
|
-
React.createElement("table", { ref: function (table) { _this.table = table; },
|
|
103
|
+
React.createElement("table", { ref: function (table) { _this.table = table; }, className: (0, kendo_react_common_1.classNames)('k-table k-grid-header-table', (_a = {},
|
|
104
|
+
_a["k-table-".concat(kendo_react_common_1.kendoThemeMaps.sizeMap[this.props.size] || this.props.size)] = this.props.size,
|
|
105
|
+
_a), this.props.className), role: "presentation" },
|
|
103
106
|
React.createElement("colgroup", { ref: function (e) { _this.props.columnResize.colGroupHeader = e; } }, this.props.cols),
|
|
104
|
-
React.createElement("thead", __assign({ role: "rowgroup" }, kendo_react_data_tools_1.tableKeyboardNavigationHeaderAttributes),
|
|
107
|
+
React.createElement("thead", __assign({ className: 'k-table-thead', role: "rowgroup" }, kendo_react_data_tools_1.tableKeyboardNavigationHeaderAttributes),
|
|
105
108
|
this.props.headerRow,
|
|
106
109
|
this.props.filterRow)))));
|
|
107
110
|
};
|
|
@@ -149,8 +149,11 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
149
149
|
return null;
|
|
150
150
|
}
|
|
151
151
|
return sortIndex >= 0 && [
|
|
152
|
-
React.createElement("span", { key: 1, className: 'k-
|
|
153
|
-
|
|
152
|
+
React.createElement("span", { key: 1, className: 'k-sort-icon' },
|
|
153
|
+
React.createElement("span", { className: 'k-icon k-i-sort-' + this.props.sort[sortIndex].dir + '-small' })),
|
|
154
|
+
this.props.sort.length > 1 &&
|
|
155
|
+
React.createElement("span", { key: 2, className: 'k-sort-icon' },
|
|
156
|
+
React.createElement("span", { className: "k-sort-order" }, sortIndex + 1))
|
|
154
157
|
];
|
|
155
158
|
};
|
|
156
159
|
HeaderRow.prototype.render = function () {
|
|
@@ -158,7 +161,7 @@ var HeaderRow = /** @class */ (function (_super) {
|
|
|
158
161
|
this.serviceIndex = 0;
|
|
159
162
|
this.index = -1;
|
|
160
163
|
return this.props.columnsMap.map(function (rowIndexes, i) {
|
|
161
|
-
return _this.props.pressHandler && (React.createElement(ColumnDraggable_1.ColumnDraggable, { key: i, pressHandler: _this.props.pressHandler, dragHandler: _this.props.dragHandler, releaseHandler: _this.props.releaseHandler, ariaRowIndex: i + 1, dragClue: _this.props.dragClue, headerRef: _this.props.headerRef, containerRef: _this.props.containerRef }, _this.cells(rowIndexes))) || React.createElement("tr", { role: "row", "aria-rowindex": i + 1 }, _this.cells(rowIndexes));
|
|
164
|
+
return _this.props.pressHandler && (React.createElement(ColumnDraggable_1.ColumnDraggable, { key: i, pressHandler: _this.props.pressHandler, dragHandler: _this.props.dragHandler, releaseHandler: _this.props.releaseHandler, ariaRowIndex: i + 1, dragClue: _this.props.dragClue, headerRef: _this.props.headerRef, containerRef: _this.props.containerRef }, _this.cells(rowIndexes))) || React.createElement("tr", { className: 'k-table-row', role: "row", "aria-rowindex": i + 1 }, _this.cells(rowIndexes));
|
|
162
165
|
});
|
|
163
166
|
};
|
|
164
167
|
return HeaderRow;
|
|
@@ -74,7 +74,7 @@ export interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
|
|
|
74
74
|
* ```jsx-no-run
|
|
75
75
|
* <GridColumn
|
|
76
76
|
* footerCell={props => (
|
|
77
|
-
* <td colSpan={props.colSpan} style={props.style}>Sum: 50</td>
|
|
77
|
+
* <td className='k-table-td' colSpan={props.colSpan} style={props.style} role={'gridcell'}>Sum: 50</td>
|
|
78
78
|
* )}
|
|
79
79
|
* />
|
|
80
80
|
* ```
|
|
@@ -50,4 +50,16 @@ export interface GridFilterCellProps {
|
|
|
50
50
|
* Accessible label of the filter.
|
|
51
51
|
*/
|
|
52
52
|
ariaLabel?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Configures the `size` of the cell.
|
|
55
|
+
*
|
|
56
|
+
* The available options are:
|
|
57
|
+
* - small
|
|
58
|
+
* - medium
|
|
59
|
+
* - large
|
|
60
|
+
* - null—Does not set a size `className`.
|
|
61
|
+
*
|
|
62
|
+
* @default `medium`
|
|
63
|
+
*/
|
|
64
|
+
size?: null | 'small' | 'medium' | 'large';
|
|
53
65
|
}
|
|
@@ -291,4 +291,14 @@ export interface GridProps extends KendoReactComponentBaseProps {
|
|
|
291
291
|
* Defaults to `false`.
|
|
292
292
|
*/
|
|
293
293
|
lockGroups?: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Configures the `size` of the Grid.
|
|
296
|
+
*
|
|
297
|
+
* The available options are:
|
|
298
|
+
* - small
|
|
299
|
+
* - medium
|
|
300
|
+
*
|
|
301
|
+
* @default `medium`
|
|
302
|
+
*/
|
|
303
|
+
size?: 'small' | 'medium';
|
|
294
304
|
}
|