@progress/kendo-react-grid 5.14.0-dev.202305291502 → 5.14.0-dev.202305311028
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 +6 -6
- package/dist/es/cells/GridCell.d.ts +2 -2
- package/dist/es/cells/GridCell.js +16 -4
- package/dist/es/cells/GridEditCell.d.ts +2 -2
- package/dist/es/cells/GridEditCell.js +23 -9
- package/dist/es/cells/GridGroupCell.d.ts +2 -2
- package/dist/es/cells/GridGroupCell.js +50 -24
- package/dist/es/cells/GridHierarchyCell.d.ts +2 -2
- package/dist/es/cells/GridHierarchyCell.js +25 -15
- package/dist/es/cells/GridSelectionCell.js +13 -3
- package/dist/es/footer/FooterRow.d.ts +2 -0
- package/dist/es/footer/FooterRow.js +22 -11
- package/dist/es/header/FilterRow.d.ts +2 -0
- package/dist/es/header/FilterRow.js +10 -2
- package/dist/es/header/HeaderRow.d.ts +2 -0
- package/dist/es/header/HeaderRow.js +14 -5
- package/dist/es/interfaces/GridCellProps.d.ts +5 -0
- package/dist/es/interfaces/GridCellsSettings.d.ts +111 -0
- package/dist/es/interfaces/GridCellsSettings.js +1 -0
- package/dist/es/interfaces/GridColumnProps.d.ts +5 -0
- package/dist/es/interfaces/GridProps.d.ts +5 -0
- package/dist/es/main.d.ts +1 -0
- package/dist/es/main.js +1 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/utils/index.d.ts +5 -0
- package/dist/es/utils/index.js +15 -0
- package/dist/npm/Grid.js +5 -5
- package/dist/npm/cells/GridCell.d.ts +2 -2
- package/dist/npm/cells/GridCell.js +16 -4
- package/dist/npm/cells/GridEditCell.d.ts +2 -2
- package/dist/npm/cells/GridEditCell.js +23 -9
- package/dist/npm/cells/GridGroupCell.d.ts +2 -2
- package/dist/npm/cells/GridGroupCell.js +50 -24
- package/dist/npm/cells/GridHierarchyCell.d.ts +2 -2
- package/dist/npm/cells/GridHierarchyCell.js +25 -15
- package/dist/npm/cells/GridSelectionCell.js +13 -3
- package/dist/npm/footer/FooterRow.d.ts +2 -0
- package/dist/npm/footer/FooterRow.js +21 -10
- package/dist/npm/header/FilterRow.d.ts +2 -0
- package/dist/npm/header/FilterRow.js +10 -2
- package/dist/npm/header/HeaderRow.d.ts +2 -0
- package/dist/npm/header/HeaderRow.js +14 -5
- package/dist/npm/interfaces/GridCellProps.d.ts +5 -0
- package/dist/npm/interfaces/GridCellsSettings.d.ts +111 -0
- package/dist/npm/interfaces/GridCellsSettings.js +3 -0
- package/dist/npm/interfaces/GridColumnProps.d.ts +5 -0
- package/dist/npm/interfaces/GridProps.d.ts +5 -0
- package/dist/npm/main.d.ts +1 -0
- package/dist/npm/main.js +1 -0
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/utils/index.d.ts +5 -0
- package/dist/npm/utils/index.js +17 -1
- package/dist/systemjs/kendo-react-grid.js +1 -1
- package/package.json +18 -18
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { TABLE_COL_INDEX_ATTRIBUTE } from '@progress/kendo-react-data-tools';
|
|
3
|
+
import { GridCellProps } from './GridCellProps';
|
|
4
|
+
import { GridFooterCellProps } from './GridFooterCellProps';
|
|
5
|
+
import { GridFilterCellProps } from './GridFilterCellProps';
|
|
6
|
+
import { GridHeaderCellProps } from './GridHeaderCellProps';
|
|
7
|
+
export interface GridTdAttributes extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
8
|
+
[TABLE_COL_INDEX_ATTRIBUTE]?: number;
|
|
9
|
+
key?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GridThAttributes extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
12
|
+
columnId: string;
|
|
13
|
+
key?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The properties of the default Grid Cell.
|
|
17
|
+
*/
|
|
18
|
+
export interface GridCustomCellProps extends GridCellProps {
|
|
19
|
+
/**
|
|
20
|
+
* The props and attributes that are applied to the td element by default.
|
|
21
|
+
*/
|
|
22
|
+
tdProps?: React.TdHTMLAttributes<HTMLTableCellElement> | null;
|
|
23
|
+
/**
|
|
24
|
+
* The props and attributes that are applied to the second td. Such element is
|
|
25
|
+
* rendered in very rare cases when we have grouping and sticky columns.
|
|
26
|
+
*/
|
|
27
|
+
td2Props?: React.TdHTMLAttributes<HTMLTableCellElement> | null;
|
|
28
|
+
/**
|
|
29
|
+
* The default children of the table cell.
|
|
30
|
+
*/
|
|
31
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The properties of the footer Grid Cell.
|
|
35
|
+
*/
|
|
36
|
+
export interface GridCustomFooterCellProps extends GridFooterCellProps {
|
|
37
|
+
/**
|
|
38
|
+
* The props and attributes that are applied to the td element by default.
|
|
39
|
+
*/
|
|
40
|
+
tdProps?: React.TdHTMLAttributes<HTMLTableCellElement> | null;
|
|
41
|
+
/**
|
|
42
|
+
* The index of the column that is rendered.
|
|
43
|
+
*/
|
|
44
|
+
index?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The properties of the filter Grid Cell.
|
|
48
|
+
*/
|
|
49
|
+
export interface GridCustomFilterCellProps extends GridFilterCellProps {
|
|
50
|
+
/**
|
|
51
|
+
* The props and attributes that are applied to the td element by default.
|
|
52
|
+
*/
|
|
53
|
+
thProps?: GridThAttributes | null;
|
|
54
|
+
/**
|
|
55
|
+
* The default children of the table cell.
|
|
56
|
+
*/
|
|
57
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
58
|
+
/**
|
|
59
|
+
* The index of the column.
|
|
60
|
+
*/
|
|
61
|
+
index?: number;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The properties of the header Grid Cell.
|
|
65
|
+
*/
|
|
66
|
+
export interface GridCustomHeaderCellProps extends GridHeaderCellProps {
|
|
67
|
+
/**
|
|
68
|
+
* The props and attributes that are applied to the td element by default.
|
|
69
|
+
*/
|
|
70
|
+
thProps?: GridThAttributes | null;
|
|
71
|
+
/**
|
|
72
|
+
* The default children of the table cell.
|
|
73
|
+
*/
|
|
74
|
+
children: React.ReactNode | React.ReactNode[];
|
|
75
|
+
/**
|
|
76
|
+
* The index of the column.
|
|
77
|
+
*/
|
|
78
|
+
index?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The settings of the cells prop options.
|
|
82
|
+
*/
|
|
83
|
+
export interface GridCellsSettings {
|
|
84
|
+
headerCell?: ComponentType<GridCustomHeaderCellProps>;
|
|
85
|
+
filterCell?: ComponentType<GridCustomFilterCellProps>;
|
|
86
|
+
footerCell?: ComponentType<GridCustomFooterCellProps>;
|
|
87
|
+
groupHeader?: ComponentType<GridCustomCellProps>;
|
|
88
|
+
data?: ComponentType<GridCustomCellProps>;
|
|
89
|
+
groupFooter?: ComponentType<GridCustomCellProps>;
|
|
90
|
+
select?: {
|
|
91
|
+
groupHeader?: ComponentType<GridCustomCellProps>;
|
|
92
|
+
data?: ComponentType<GridCustomCellProps>;
|
|
93
|
+
groupFooter?: ComponentType<GridCustomCellProps>;
|
|
94
|
+
};
|
|
95
|
+
hierarchy?: {
|
|
96
|
+
groupHeader?: ComponentType<GridCustomCellProps>;
|
|
97
|
+
data?: ComponentType<GridCustomCellProps>;
|
|
98
|
+
groupFooter?: ComponentType<GridCustomCellProps>;
|
|
99
|
+
};
|
|
100
|
+
group?: {
|
|
101
|
+
groupHeader?: ComponentType<GridCustomCellProps>;
|
|
102
|
+
data?: ComponentType<GridCustomCellProps>;
|
|
103
|
+
groupFooter?: ComponentType<GridCustomCellProps>;
|
|
104
|
+
};
|
|
105
|
+
edit?: {
|
|
106
|
+
text?: ComponentType<GridCustomCellProps>;
|
|
107
|
+
numeric?: ComponentType<GridCustomCellProps>;
|
|
108
|
+
boolean?: ComponentType<GridCustomCellProps>;
|
|
109
|
+
date?: ComponentType<GridCustomCellProps>;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { TABLE_COL_INDEX_ATTRIBUTE } from '@progress/kendo-react-data-tools';
|
|
@@ -6,6 +6,7 @@ import { GridColumnMenuProps } from '../interfaces/GridColumnMenuProps';
|
|
|
6
6
|
import { GridFooterCellProps } from './GridFooterCellProps';
|
|
7
7
|
import { GridColumnSortSettings } from './GridSortSettings';
|
|
8
8
|
import { ColumnBaseProps } from '@progress/kendo-react-data-tools';
|
|
9
|
+
import { GridCellsSettings } from './GridCellsSettings';
|
|
9
10
|
/**
|
|
10
11
|
* The props of the GridColumn component.
|
|
11
12
|
*/
|
|
@@ -58,6 +59,10 @@ export interface GridColumnProps extends Omit<ColumnBaseProps, 'cell'> {
|
|
|
58
59
|
* Defines the component that will be rendered as a cell. If not set, a `GridCell` will be rendered by default.
|
|
59
60
|
*/
|
|
60
61
|
cell?: ComponentType<GridCellProps>;
|
|
62
|
+
/**
|
|
63
|
+
* Sets a set of cells components that the Grid will render instead of the built-in cell.
|
|
64
|
+
*/
|
|
65
|
+
cells?: GridCellsSettings;
|
|
61
66
|
/**
|
|
62
67
|
* Defines the component that will be rendered as a filter cell. If not set, a `GridFilterCell` will be rendered by default.
|
|
63
68
|
*/
|
|
@@ -15,6 +15,7 @@ import { GridFilterOperators } from './GridFilterOperators';
|
|
|
15
15
|
import { GridSelectableSettings } from './GridSelectableSettings';
|
|
16
16
|
import { PagerProps } from '@progress/kendo-react-data-tools';
|
|
17
17
|
import { KendoReactComponentBaseProps } from '@progress/kendo-react-common';
|
|
18
|
+
import { GridCellsSettings } from './GridCellsSettings';
|
|
18
19
|
/**
|
|
19
20
|
* Represents the props of the [KendoReact Grid component]({% slug overview_grid %}).
|
|
20
21
|
*/
|
|
@@ -28,6 +29,10 @@ export interface GridProps extends KendoReactComponentBaseProps {
|
|
|
28
29
|
* Sets a class of the Grid DOM element.
|
|
29
30
|
*/
|
|
30
31
|
className?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Sets a set of custom components that the Grid will render instead of the built-in cell.
|
|
34
|
+
*/
|
|
35
|
+
cells?: GridCellsSettings;
|
|
31
36
|
/**
|
|
32
37
|
* Sets the data of the Grid ([see example]({% slug paging_grid %})). If you use paging, the `data` option has to contain only the items for the current page.
|
|
33
38
|
*/
|
package/dist/es/main.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ import { GridToolbarProps } from './interfaces/GridToolbarProps';
|
|
|
31
31
|
import { GridNoRecords } from './GridNoRecords';
|
|
32
32
|
import { GridNoRecordsProps } from './interfaces/GridNoRecordsProps';
|
|
33
33
|
export * from './interfaces/events';
|
|
34
|
+
export * from './interfaces/GridCellsSettings';
|
|
34
35
|
export { messages as gridMessages, pagerInfo, pagerFirstPage, pagerPreviousPage, pagerNextPage, pagerLastPage, pagerItemPerPage } from './messages';
|
|
35
36
|
import { GridSortSettings } from './interfaces/GridSortSettings';
|
|
36
37
|
import { GridPagerSettings } from './paging/GridPagerSettings';
|
package/dist/es/main.js
CHANGED
|
@@ -19,6 +19,7 @@ import { GridRow } from './rows/GridRow';
|
|
|
19
19
|
import { GridToolbar } from './GridToolbar';
|
|
20
20
|
import { GridNoRecords } from './GridNoRecords';
|
|
21
21
|
export * from './interfaces/events';
|
|
22
|
+
export * from './interfaces/GridCellsSettings';
|
|
22
23
|
export { messages as gridMessages, pagerInfo, pagerFirstPage, pagerPreviousPage, pagerNextPage, pagerLastPage, pagerItemPerPage } from './messages';
|
|
23
24
|
import { GridColumnMenuItem } from './columnMenu/GridColumnMenuItem';
|
|
24
25
|
import { GridColumnMenuItemContent } from './columnMenu/GridColumnMenuItemContent';
|
|
@@ -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: 1685527715,
|
|
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/utils/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ import { ExtendedColumnProps } from '../GridColumn';
|
|
|
28
28
|
import { DataResult, GroupDescriptor } from '@progress/kendo-data-query';
|
|
29
29
|
import { GridRowType } from '../interfaces/GridRowType';
|
|
30
30
|
import { GridColumnProps } from '../interfaces/GridColumnProps';
|
|
31
|
+
import { GridCellsSettings } from '../interfaces/GridCellsSettings';
|
|
31
32
|
/**
|
|
32
33
|
* @hidden
|
|
33
34
|
*/
|
|
@@ -58,3 +59,7 @@ export declare const firefox: boolean;
|
|
|
58
59
|
* @hidden
|
|
59
60
|
*/
|
|
60
61
|
export declare const firefoxMaxHeight = 17895697;
|
|
62
|
+
/**
|
|
63
|
+
* @hidden
|
|
64
|
+
*/
|
|
65
|
+
export declare const resolveCells: (gridCells?: GridCellsSettings, columnCells?: GridCellsSettings) => GridCellsSettings | undefined;
|
package/dist/es/utils/index.js
CHANGED
|
@@ -236,3 +236,18 @@ export var firefox = typeof window !== 'undefined' &&
|
|
|
236
236
|
* @hidden
|
|
237
237
|
*/
|
|
238
238
|
export var firefoxMaxHeight = 17895697;
|
|
239
|
+
/**
|
|
240
|
+
* @hidden
|
|
241
|
+
*/
|
|
242
|
+
export var resolveCells = function (gridCells, columnCells) {
|
|
243
|
+
if (!gridCells && !columnCells) {
|
|
244
|
+
return undefined;
|
|
245
|
+
}
|
|
246
|
+
if (!columnCells) {
|
|
247
|
+
return gridCells;
|
|
248
|
+
}
|
|
249
|
+
if (!gridCells) {
|
|
250
|
+
return columnCells;
|
|
251
|
+
}
|
|
252
|
+
return __assign(__assign(__assign({}, gridCells), columnCells), { select: __assign(__assign({}, (gridCells.select || {})), (columnCells.select || {})), hierarchy: __assign(__assign({}, (gridCells.hierarchy || {})), (columnCells.hierarchy || {})), group: __assign(__assign({}, (gridCells.group || {})), (columnCells.group || {})), edit: __assign(__assign({}, (gridCells.edit || {})), (columnCells.edit || {})) });
|
|
253
|
+
};
|
package/dist/npm/Grid.js
CHANGED
|
@@ -435,7 +435,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
435
435
|
columns.slice(columnIndexOffset).forEach(function (c) { return c.parentIndex >= 0 && (c.parentIndex += columnIndexOffset); });
|
|
436
436
|
});
|
|
437
437
|
_this.getHeaderRow = (0, kendo_react_common_1.memoizeOne)(function (sort, sortable, group, groupable, filter, filterable, filterOperators, headerCellRender, columnMenu, columns, columnsMap) {
|
|
438
|
-
return (React.createElement(HeaderRow_1.HeaderRow, { sort: sort, sortable: sortable, sortChange: _this.sortChange, group: group || [], groupable: groupable, groupChange: _this.groupChange, filter: filter, filterable: filterable, filterOperators: filterOperators, filterChange: _this.filterChange, columnMenu: columnMenu, selectionChange: _this.onHeaderSelectionChange, columns: columns, columnResize: _this.columnResize, pressHandler: _this.dragLogic.pressHandler, dragHandler: _this.dragLogic.dragHandler, releaseHandler: _this.dragLogic.releaseHandler, columnsMap: columnsMap, cellRender: headerCellRender, isRtl: _this.isRtl, dragClue: _this.dragLogic.dragClueRef, headerRef: _this.headerElementRef, containerRef: _this.containerRef }));
|
|
438
|
+
return (React.createElement(HeaderRow_1.HeaderRow, { cells: _this.props.cells, sort: sort, sortable: sortable, sortChange: _this.sortChange, group: group || [], groupable: groupable, groupChange: _this.groupChange, filter: filter, filterable: filterable, filterOperators: filterOperators, filterChange: _this.filterChange, columnMenu: columnMenu, selectionChange: _this.onHeaderSelectionChange, columns: columns, columnResize: _this.columnResize, pressHandler: _this.dragLogic.pressHandler, dragHandler: _this.dragLogic.dragHandler, releaseHandler: _this.dragLogic.releaseHandler, columnsMap: columnsMap, cellRender: headerCellRender, isRtl: _this.isRtl, dragClue: _this.dragLogic.dragClueRef, headerRef: _this.headerElementRef, containerRef: _this.containerRef }));
|
|
439
439
|
});
|
|
440
440
|
_this.resolveTitle = function (field) {
|
|
441
441
|
var column = _this._columns.find(function (c) { return c.field === field; });
|
|
@@ -627,7 +627,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
627
627
|
var leafColumns = this._columns.filter(function (c) { return c.children.length === 0; });
|
|
628
628
|
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 }));
|
|
629
629
|
var _e = this.props, sort = _e.sort, sortable = _e.sortable, group = _e.group, filter = _e.filter, filterable = _e.filterable, _f = _e.filterOperators, filterOperators = _f === void 0 ? filterCommon_1.operators : _f, headerCellRender = _e.headerCellRender, columnMenu = _e.columnMenu;
|
|
630
|
-
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 ?
|
|
630
|
+
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, { cells: this.props.cells, 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 ?
|
|
631
631
|
Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) }));
|
|
632
632
|
var scrollLeft = this.vs && this.vs.container && this.vs.container.scrollLeft || 0;
|
|
633
633
|
var tableWidth = parseFloat(((this.props.style || {}).width || '').toString());
|
|
@@ -662,7 +662,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
var Cell = column.cell || (currentColumnIsInEdit && GridEditCell_1.GridEditCell) || GridCell_1.GridCell;
|
|
665
|
-
return (React.createElement(Cell, { onContextMenu: _this.onContextMenu, key: columnKey, locked: _this.props.lockGroups, id: kendo_react_data_tools_1.tableKeyboardNavigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix), colSpan: colSpans[columnIndex], dataItem: item.dataItem, field: column.field, editor: column.editor, format: column.format, className: className, render: _this.props.cellRender, onChange: _this.itemChange, selectionChange: (_this.props.onSelectionChange) ?
|
|
665
|
+
return (React.createElement(Cell, { onContextMenu: _this.onContextMenu, key: columnKey, locked: _this.props.lockGroups, id: kendo_react_data_tools_1.tableKeyboardNavigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix), colSpan: colSpans[columnIndex], dataItem: item.dataItem, field: column.field, editor: column.editor, format: column.format, className: className, render: _this.props.cellRender, cells: (0, index_1.resolveCells)(_this.props.cells, column.cells), onChange: _this.itemChange, selectionChange: (_this.props.onSelectionChange) ?
|
|
666
666
|
(function (e) { _this.selectionChange({ event: e, dataItem: item.dataItem, dataIndex: rowDataIndex, columnIndex: columnIndex }); }) :
|
|
667
667
|
undefined, columnIndex: columnIndex, columnsCount: leafColumns.length, rowType: item.rowType, level: item.level, expanded: item.expanded, dataIndex: item.dataIndex, style: style, ariaColumnIndex: column.ariaColumnIndex, isSelected: Array.isArray(selectedValue) && selectedValue.indexOf(columnIndex) > -1 }));
|
|
668
668
|
}),
|
|
@@ -724,7 +724,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
724
724
|
? { left: columnStyle.left, right: columnStyle.right }
|
|
725
725
|
: { left: columnStyle.right, right: columnStyle.left }
|
|
726
726
|
: {};
|
|
727
|
-
return (React.createElement(GridGroupCell_1.GridGroupCell, { id: '', dataIndex: item.dataIndex, field: gr.field, dataItem: item.dataItem, key: idx, style: style, ariaColumnIndex: 1 + idx, isSelected: false, locked: _this.props.lockGroups, isRtl: _this.isRtl }));
|
|
727
|
+
return (React.createElement(GridGroupCell_1.GridGroupCell, { id: '', dataIndex: item.dataIndex, field: gr.field, dataItem: item.dataItem, key: idx, style: style, ariaColumnIndex: 1 + idx, isSelected: false, locked: _this.props.lockGroups, isRtl: _this.isRtl, cells: _this.props.cells }));
|
|
728
728
|
}),
|
|
729
729
|
_this.props.expandField &&
|
|
730
730
|
React.createElement(GridDetailHierarchyCell_1.GridDetailHierarchyCell, { id: kendo_react_data_tools_1.tableKeyboardNavigationTools.generateNavigatableId("".concat(detailRowId, "-dhcell"), idPrefix) }),
|
|
@@ -741,7 +741,7 @@ var Grid = /** @class */ (function (_super) {
|
|
|
741
741
|
var sorted = function (field) {
|
|
742
742
|
return _this.props.sort && _this.props.sort.filter(function (descriptor) { return descriptor.field === field; }).length > 0;
|
|
743
743
|
};
|
|
744
|
-
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 ?
|
|
744
|
+
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, { cells: this.props.cells, 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 ?
|
|
745
745
|
Math.floor(parseFloat(column.width.toString())) + 'px' : undefined })); }) })) : null;
|
|
746
746
|
var colGroups = (React.createElement("colgroup", { ref: function (c) {
|
|
747
747
|
_this.columnResize.colGroupMain = c;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
3
|
-
export declare const GridCell: (props: GridCellProps) =>
|
|
3
|
+
export declare const GridCell: (props: GridCellProps) => JSX.Element | null;
|
|
@@ -28,19 +28,31 @@ var GridCell = function (props) {
|
|
|
28
28
|
props.onContextMenu.call(undefined, event, props.dataItem, props.field);
|
|
29
29
|
}
|
|
30
30
|
}, [props.onContextMenu, props.dataItem, props.field]);
|
|
31
|
+
var tdProps = null;
|
|
32
|
+
var content = null;
|
|
31
33
|
if (props.rowType === 'groupFooter') {
|
|
32
|
-
|
|
34
|
+
tdProps = {
|
|
35
|
+
onContextMenu: onContextMenu,
|
|
36
|
+
className: props.className
|
|
37
|
+
};
|
|
38
|
+
defaultRendering = React.createElement("td", __assign({}, tdProps));
|
|
33
39
|
}
|
|
34
40
|
else if (props.field !== undefined && props.rowType !== 'groupHeader') {
|
|
35
41
|
var data = (0, utils_1.getNestedValue)(props.field, props.dataItem);
|
|
36
|
-
var dataAsString = '';
|
|
37
42
|
if (data !== undefined && data !== null) {
|
|
38
|
-
|
|
43
|
+
content = props.format ?
|
|
39
44
|
intl.format(props.format, data) :
|
|
40
45
|
data.toString();
|
|
41
46
|
}
|
|
42
47
|
var className = (0, kendo_react_common_1.classNames)('k-table-td', props.className, { 'k-selected': props.isSelected });
|
|
43
|
-
|
|
48
|
+
tdProps = __assign((_a = { onContextMenu: onContextMenu, colSpan: props.colSpan, style: props.style, className: className, role: 'gridcell', 'aria-colindex': props.ariaColumnIndex, 'aria-selected': props.isSelected }, _a[constants_1.GRID_COL_INDEX_ATTRIBUTE] = props.columnIndex, _a), navigationAttributes);
|
|
49
|
+
defaultRendering = (React.createElement("td", __assign({}, tdProps), content));
|
|
50
|
+
}
|
|
51
|
+
var rowTypeSetting = props.rowType || 'data';
|
|
52
|
+
var customCells = props.cells;
|
|
53
|
+
if (customCells && customCells[rowTypeSetting]) {
|
|
54
|
+
var CustomCell = customCells[rowTypeSetting];
|
|
55
|
+
return (React.createElement(CustomCell, __assign({}, props, { tdProps: tdProps }), content));
|
|
44
56
|
}
|
|
45
57
|
return props.render ?
|
|
46
58
|
props.render.call(undefined, defaultRendering, props) :
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
3
3
|
/**
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
|
-
export declare const GridEditCell: (props: GridCellProps) =>
|
|
6
|
+
export declare const GridEditCell: (props: GridCellProps) => JSX.Element | null;
|
|
@@ -31,6 +31,8 @@ var GridEditCell = function (props) {
|
|
|
31
31
|
_a), props.className);
|
|
32
32
|
var inputId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
|
|
33
33
|
var navigationAttributes = (0, kendo_react_data_tools_1.useTableKeyboardNavigation)(props.id);
|
|
34
|
+
var tdProps = null;
|
|
35
|
+
var content = null;
|
|
34
36
|
var handleOnChange = React.useCallback(function (syntheticEvent) {
|
|
35
37
|
if (props.onChange) {
|
|
36
38
|
var value = syntheticEvent.target.type === 'checkbox' ?
|
|
@@ -63,21 +65,33 @@ var GridEditCell = function (props) {
|
|
|
63
65
|
}, [props.onChange, props.dataItem, props.dataIndex, props.field]);
|
|
64
66
|
switch (props.editor) {
|
|
65
67
|
case 'numeric':
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
tdProps = __assign((_b = { onContextMenu: onContextMenu, colSpan: props.colSpan, style: props.style, className: editCellClasses }, _b['aria-colindex'] = props.ariaColumnIndex, _b['aria-selected'] = props.isSelected, _b[constants_1.GRID_COL_INDEX_ATTRIBUTE] = props.columnIndex, _b.role = 'gridcell', _b), navigationAttributes);
|
|
69
|
+
content = (React.createElement(kendo_react_inputs_1.NumericTextBox, { width: "100%", value: (data === undefined) ? null : data, onChange: inputChange }));
|
|
70
|
+
defaultRendering = (React.createElement("td", __assign({}, tdProps), content));
|
|
68
71
|
break;
|
|
69
72
|
case 'date':
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
tdProps = __assign((_c = { onContextMenu: onContextMenu, colSpan: props.colSpan, style: props.style, className: editCellClasses }, _c['aria-colindex'] = props.ariaColumnIndex, _c['aria-selected'] = props.isSelected, _c[constants_1.GRID_COL_INDEX_ATTRIBUTE] = props.columnIndex, _c.role = 'gridcell', _c), navigationAttributes);
|
|
74
|
+
content = (React.createElement(kendo_react_dateinputs_1.DatePicker, { width: "100%", value: data, onChange: inputChange }));
|
|
75
|
+
defaultRendering = (React.createElement("td", __assign({}, tdProps), content));
|
|
72
76
|
break;
|
|
73
77
|
case 'boolean':
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
React.createElement("
|
|
78
|
+
tdProps = __assign((_d = { onContextMenu: onContextMenu, colSpan: props.colSpan, style: props.style, className: editCellClasses }, _d['aria-colindex'] = props.ariaColumnIndex, _d['aria-selected'] = props.isSelected, _d[constants_1.GRID_COL_INDEX_ATTRIBUTE] = props.columnIndex, _d.role = 'gridcell', _d), navigationAttributes);
|
|
79
|
+
content = ([
|
|
80
|
+
React.createElement("input", { checked: data || false, id: inputId, type: "checkbox", className: "k-checkbox k-checkbox-md k-rounded-md", onChange: handleOnChange, key: 1 }),
|
|
81
|
+
React.createElement("label", { className: "k-checkbox-label", htmlFor: inputId, key: 2 })
|
|
82
|
+
]);
|
|
83
|
+
defaultRendering = (React.createElement("td", __assign({}, tdProps), content));
|
|
77
84
|
break;
|
|
78
85
|
default:
|
|
79
|
-
|
|
80
|
-
|
|
86
|
+
tdProps = __assign((_e = { onContextMenu: onContextMenu, colSpan: props.colSpan, style: props.style, className: editCellClasses }, _e['aria-colindex'] = props.ariaColumnIndex, _e['aria-selected'] = props.isSelected, _e[constants_1.GRID_COL_INDEX_ATTRIBUTE] = props.columnIndex, _e.role = 'gridcell', _e), navigationAttributes);
|
|
87
|
+
content = (React.createElement("input", { style: { width: '100%' }, className: "k-input", value: data || '', onChange: handleOnChange }));
|
|
88
|
+
defaultRendering = (React.createElement("td", __assign({}, tdProps), content));
|
|
89
|
+
}
|
|
90
|
+
var editorSetting = props.editor || 'text';
|
|
91
|
+
var customCells = props.cells;
|
|
92
|
+
if (customCells && customCells.edit && customCells.edit[editorSetting]) {
|
|
93
|
+
var CustomCell = customCells.edit[editorSetting];
|
|
94
|
+
return (React.createElement(CustomCell, __assign({}, props, { tdProps: tdProps }), content));
|
|
81
95
|
}
|
|
82
96
|
return props.render ?
|
|
83
97
|
props.render.call(undefined, defaultRendering, props) :
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
3
3
|
/**
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
|
-
export declare const GridGroupCell: (props: GridCellProps) =>
|
|
6
|
+
export declare const GridGroupCell: (props: GridCellProps) => JSX.Element | null;
|
|
@@ -27,6 +27,9 @@ var GridGroupCell = function (props) {
|
|
|
27
27
|
var definedField = field || '';
|
|
28
28
|
var navigationAttributes = (0, kendo_react_data_tools_1.useTableKeyboardNavigation)(props.id);
|
|
29
29
|
var localization = (0, kendo_react_intl_1.useLocalization)();
|
|
30
|
+
var tdProps = null;
|
|
31
|
+
var td2Props = null;
|
|
32
|
+
var content = null;
|
|
30
33
|
var onKeyDownHandler = React.useCallback(function (event) {
|
|
31
34
|
if (event.isDefaultPrevented()) {
|
|
32
35
|
return;
|
|
@@ -48,42 +51,65 @@ var GridGroupCell = function (props) {
|
|
|
48
51
|
}
|
|
49
52
|
}, [props.onContextMenu, props.dataItem, props.field]);
|
|
50
53
|
var renderCellCollapse = function (colspan, styles) {
|
|
54
|
+
var _a;
|
|
51
55
|
var baseMessage = expanded ? messages_1.groupCollapse : messages_1.groupExpand;
|
|
52
56
|
var message = localization.toLanguageString(baseMessage, messages_1.messages[baseMessage]);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
57
|
+
tdProps = __assign((_a = { className: 'k-table-td', style: __assign(__assign({}, props.style), styles), colSpan: colspan, key: 'g-colspan', role: 'gridcell' }, _a['aria-selected'] = false, _a['aria-expanded'] = expanded, _a['aria-colindex'] = ariaColumnIndex, _a.onKeyDown = onKeyDownHandler, _a.onContextMenu = onContextMenu, _a), navigationAttributes);
|
|
58
|
+
content = (React.createElement("p", { className: "k-reset" },
|
|
59
|
+
React.createElement("a", { onClick: function (e) {
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
if (onChange) {
|
|
62
|
+
onChange({
|
|
63
|
+
dataItem: dataItem,
|
|
64
|
+
dataIndex: dataIndex,
|
|
65
|
+
syntheticEvent: e,
|
|
66
|
+
field: undefined,
|
|
67
|
+
value: !expanded
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}, href: "#", tabIndex: -1, "aria-label": message },
|
|
71
|
+
React.createElement(kendo_react_common_1.IconWrap, { name: expanded ?
|
|
72
|
+
'caret-alt-down'
|
|
73
|
+
: isRtl ? 'caret-alt-left' : 'caret-alt-right', icon: expanded ?
|
|
74
|
+
kendo_svg_icons_1.caretAltDownIcon
|
|
75
|
+
: isRtl ? kendo_svg_icons_1.caretAltLeftIcon : kendo_svg_icons_1.caretAltRightIcon })),
|
|
76
|
+
((dataItem[definedField] instanceof Date) && dataItem[definedField].toString) ?
|
|
77
|
+
dataItem[definedField].toString() :
|
|
78
|
+
dataItem[definedField]));
|
|
79
|
+
return (React.createElement("td", __assign({}, tdProps), content));
|
|
75
80
|
};
|
|
76
81
|
if (columnIndex === undefined || level === undefined || columnIndex < level ||
|
|
77
82
|
columnsCount === undefined || rowType !== 'groupHeader' || dataItem[definedField] === undefined) {
|
|
78
|
-
|
|
83
|
+
tdProps = {
|
|
84
|
+
style: props.style,
|
|
85
|
+
key: 'g' + columnIndex,
|
|
86
|
+
className: (0, kendo_react_common_1.classNames)('k-table-td', 'k-group-cell', { 'k-grid-content-sticky': props.locked }),
|
|
87
|
+
role: 'gridcell',
|
|
88
|
+
onContextMenu: onContextMenu
|
|
89
|
+
};
|
|
90
|
+
defaultRendering = (React.createElement("td", __assign({}, tdProps)));
|
|
79
91
|
}
|
|
80
92
|
else if (columnIndex <= level && !props.locked) {
|
|
81
93
|
defaultRendering = renderCellCollapse(columnsCount - columnIndex, {});
|
|
82
94
|
}
|
|
83
95
|
else if (columnIndex <= level && props.locked) {
|
|
96
|
+
td2Props = {
|
|
97
|
+
className: 'k-table-td',
|
|
98
|
+
role: 'gridcell',
|
|
99
|
+
colSpan: (columnsCount - columnIndex),
|
|
100
|
+
style: { borderLeftWidth: 0, borderRightWidth: 0 },
|
|
101
|
+
onContextMenu: onContextMenu
|
|
102
|
+
};
|
|
84
103
|
defaultRendering = (React.createElement(React.Fragment, null,
|
|
85
104
|
renderCellCollapse(0, { position: 'sticky', zIndex: 2 }),
|
|
86
|
-
React.createElement("td",
|
|
105
|
+
React.createElement("td", __assign({}, td2Props))));
|
|
106
|
+
}
|
|
107
|
+
var rowTypeSetting = props.rowType || 'data';
|
|
108
|
+
var customCells = props.cells;
|
|
109
|
+
if (customCells && customCells.group
|
|
110
|
+
&& customCells.group[rowTypeSetting]) {
|
|
111
|
+
var CustomCell = customCells.group[rowTypeSetting];
|
|
112
|
+
return (React.createElement(CustomCell, __assign({}, props, { tdProps: tdProps, td2Props: td2Props }), content));
|
|
87
113
|
}
|
|
88
114
|
return render ?
|
|
89
115
|
render.call(undefined, defaultRendering, props) :
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { GridCellProps } from '../interfaces/GridCellProps';
|
|
3
3
|
/**
|
|
4
4
|
* @hidden
|
|
5
5
|
*/
|
|
6
|
-
export declare const GridHierarchyCell: (props: GridCellProps) =>
|
|
6
|
+
export declare const GridHierarchyCell: (props: GridCellProps) => JSX.Element | null;
|
|
@@ -24,6 +24,8 @@ var kendo_svg_icons_1 = require("@progress/kendo-svg-icons");
|
|
|
24
24
|
*/
|
|
25
25
|
var GridHierarchyCell = function (props) {
|
|
26
26
|
var defaultRendering = null;
|
|
27
|
+
var tdProps = null;
|
|
28
|
+
var content = null;
|
|
27
29
|
var expanded = (0, utils_1.getNestedValue)(props.field, props.dataItem);
|
|
28
30
|
var navigationAttributes = (0, kendo_react_data_tools_1.useTableKeyboardNavigation)(props.id);
|
|
29
31
|
var localization = (0, kendo_react_intl_1.useLocalization)();
|
|
@@ -43,26 +45,34 @@ var GridHierarchyCell = function (props) {
|
|
|
43
45
|
}
|
|
44
46
|
}, [props.dataItem, props.dataIndex, props.field, props.onChange, expanded]);
|
|
45
47
|
if (props.rowType === 'groupFooter') {
|
|
48
|
+
tdProps = __assign({ className: 'k-table-td k-hierarchy-cell', role: 'gridcell' }, navigationAttributes);
|
|
46
49
|
defaultRendering =
|
|
47
|
-
React.createElement("td", __assign({
|
|
50
|
+
React.createElement("td", __assign({}, tdProps));
|
|
48
51
|
}
|
|
49
52
|
else if (props.rowType !== 'groupHeader') {
|
|
50
53
|
var baseMessage = expanded ? messages_1.detailCollapse : messages_1.detailExpand;
|
|
51
54
|
var message = localization.toLanguageString(baseMessage, messages_1.messages[baseMessage]);
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
tdProps = __assign({ className: 'k-table-td k-hierarchy-cell', onKeyDown: onKeyDownHandler, 'aria-expanded': expanded ? true : false, role: 'gridcell', 'aria-colindex': props.ariaColumnIndex }, navigationAttributes);
|
|
56
|
+
content = (React.createElement("a", { onClick: function (e) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
if (props.onChange) {
|
|
59
|
+
props.onChange({
|
|
60
|
+
dataItem: props.dataItem,
|
|
61
|
+
dataIndex: props.dataIndex,
|
|
62
|
+
syntheticEvent: e,
|
|
63
|
+
field: props.field,
|
|
64
|
+
value: !expanded
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}, "aria-label": message, href: "#", tabIndex: -1 },
|
|
68
|
+
React.createElement(kendo_react_common_1.IconWrap, { name: expanded ? 'minus' : 'plus', icon: expanded ? kendo_svg_icons_1.minusIcon : kendo_svg_icons_1.plusIcon })));
|
|
69
|
+
defaultRendering = (React.createElement("td", __assign({}, tdProps), content));
|
|
70
|
+
}
|
|
71
|
+
var rowTypeSetting = props.rowType || 'data';
|
|
72
|
+
var customCells = props.cells;
|
|
73
|
+
if (customCells && customCells.hierarchy && customCells.hierarchy[rowTypeSetting]) {
|
|
74
|
+
var CustomCell = customCells.hierarchy[rowTypeSetting];
|
|
75
|
+
return (React.createElement(CustomCell, __assign({}, props, { tdProps: tdProps }), content));
|
|
66
76
|
}
|
|
67
77
|
return props.render ?
|
|
68
78
|
props.render.call(undefined, defaultRendering, props) :
|
|
@@ -20,6 +20,7 @@ var kendo_react_data_tools_1 = require("@progress/kendo-react-data-tools");
|
|
|
20
20
|
* @hidden
|
|
21
21
|
*/
|
|
22
22
|
var GridSelectionCell = function (props) {
|
|
23
|
+
var _a;
|
|
23
24
|
var handleOnChange = React.useCallback(function (syntheticEvent) {
|
|
24
25
|
if (props.selectionChange) {
|
|
25
26
|
props.selectionChange({ syntheticEvent: syntheticEvent });
|
|
@@ -28,9 +29,18 @@ var GridSelectionCell = function (props) {
|
|
|
28
29
|
var inputId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
|
|
29
30
|
var selectedValue = (0, utils_1.getNestedValue)(props.field, props.dataItem);
|
|
30
31
|
var navigationAttributes = (0, kendo_react_data_tools_1.useTableKeyboardNavigation)(props.id);
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
React.createElement("
|
|
32
|
+
var tdProps = __assign((_a = { colSpan: props.colSpan, style: props.style, className: props.className }, _a['aria-colindex'] = props.ariaColumnIndex, _a.role = 'gridcell', _a), navigationAttributes);
|
|
33
|
+
var content = [
|
|
34
|
+
(React.createElement("input", { key: "1", checked: typeof selectedValue === 'boolean' && selectedValue, id: inputId, type: "checkbox", className: "k-checkbox k-checkbox-md k-rounded-md", onChange: handleOnChange })),
|
|
35
|
+
(React.createElement("label", { className: "k-checkbox-label", htmlFor: inputId, key: "2" }))
|
|
36
|
+
];
|
|
37
|
+
var defaultRendering = props.rowType !== 'groupHeader' ? (React.createElement("td", __assign({}, tdProps), content)) : null;
|
|
38
|
+
var rowTypeSetting = props.rowType || 'data';
|
|
39
|
+
var customCells = props.cells;
|
|
40
|
+
if (customCells && customCells.select && customCells.select[rowTypeSetting]) {
|
|
41
|
+
var CustomCell = customCells.select[rowTypeSetting];
|
|
42
|
+
return (React.createElement(CustomCell, __assign({}, props, { tdProps: tdProps }), content));
|
|
43
|
+
}
|
|
34
44
|
return props.render ?
|
|
35
45
|
props.render.call(undefined, defaultRendering, props) :
|
|
36
46
|
defaultRendering;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ExtendedColumnProps } from '../GridColumn';
|
|
3
|
+
import { GridCellsSettings } from '../interfaces/GridCellsSettings';
|
|
3
4
|
/**
|
|
4
5
|
* @hidden
|
|
5
6
|
*/
|
|
6
7
|
export interface FooterRowProps {
|
|
8
|
+
cells?: GridCellsSettings;
|
|
7
9
|
columns: ExtendedColumnProps[];
|
|
8
10
|
isRtl?: boolean;
|
|
9
11
|
ariaRowIndex: number;
|