@progress/kendo-react-treelist 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009
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-treelist.js +1 -1
- package/dist/es/ScrollMode.js +1 -0
- package/dist/es/TreeList.d.ts +11 -8
- package/dist/es/TreeList.js +36 -25
- package/dist/es/TreeListNoRecords.js +3 -1
- package/dist/es/TreeListToolbar.js +3 -1
- package/dist/es/cells/EditCells/TreeListBooleanEditor.d.ts +2 -1
- package/dist/es/cells/EditCells/TreeListDateEditor.d.ts +2 -1
- package/dist/es/cells/EditCells/TreeListNumericEditor.d.ts +2 -1
- package/dist/es/cells/EditCells/TreeListTextEditor.d.ts +2 -1
- package/dist/es/cells/FilterCells/TreeListBooleanFilter.js +4 -2
- package/dist/es/cells/FilterCells/TreeListDateFilter.js +4 -2
- package/dist/es/cells/FilterCells/TreeListNumericFilter.js +4 -2
- package/dist/es/cells/FilterCells/TreeListTextFilter.js +4 -2
- package/dist/es/cells/TreeListCell.d.ts +2 -1
- package/dist/es/cells/TreeListCell.js +1 -1
- package/dist/es/cells/TreeListSelectionCell.d.ts +2 -1
- package/dist/es/header/TreeListHeaderSelectionCell.js +3 -1
- package/dist/es/interfaces/DataItemWrapper.js +1 -0
- package/dist/es/interfaces/TreeListCellProps.d.ts +1 -1
- package/dist/es/interfaces/TreeListCellProps.js +1 -0
- package/dist/es/interfaces/TreeListColumnProps.d.ts +1 -1
- package/dist/es/interfaces/TreeListColumnProps.js +1 -0
- package/dist/es/interfaces/TreeListFilterCellProps.js +1 -0
- package/dist/es/interfaces/TreeListFilterOperator.js +1 -0
- package/dist/es/interfaces/TreeListHeaderCellProps.js +1 -0
- package/dist/es/interfaces/TreeListNoRecordsProps.js +1 -0
- package/dist/es/interfaces/TreeListProps.js +1 -0
- package/dist/es/interfaces/TreeListRowProps.js +1 -0
- package/dist/es/interfaces/TreeListSelectableSettings.js +1 -0
- package/dist/es/interfaces/TreeListSortSettings.js +1 -0
- package/dist/es/interfaces/TreeListToolbarProps.js +1 -0
- package/dist/es/interfaces/events.js +1 -0
- package/dist/es/messages/index.d.ts +23 -23
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/rows/TreeListDraggableRow.js +16 -4
- package/dist/es/rows/TreeListRow.js +2 -2
- package/dist/es/utils/data-operations.d.ts +1 -1
- package/dist/es/utils/data-operations.js +18 -9
- package/dist/npm/TreeList.d.ts +11 -8
- package/dist/npm/TreeList.js +54 -42
- package/dist/npm/TreeListNoRecords.js +6 -3
- package/dist/npm/TreeListToolbar.js +4 -1
- package/dist/npm/cells/EditCells/TreeListBooleanEditor.d.ts +2 -1
- package/dist/npm/cells/EditCells/TreeListBooleanEditor.js +7 -5
- package/dist/npm/cells/EditCells/TreeListDateEditor.d.ts +2 -1
- package/dist/npm/cells/EditCells/TreeListDateEditor.js +6 -4
- package/dist/npm/cells/EditCells/TreeListNumericEditor.d.ts +2 -1
- package/dist/npm/cells/EditCells/TreeListNumericEditor.js +6 -4
- package/dist/npm/cells/EditCells/TreeListTextEditor.d.ts +2 -1
- package/dist/npm/cells/EditCells/TreeListTextEditor.js +6 -4
- package/dist/npm/cells/FilterCells/TreeListBooleanFilter.js +8 -4
- package/dist/npm/cells/FilterCells/TreeListDateFilter.js +8 -4
- package/dist/npm/cells/FilterCells/TreeListNumericFilter.js +8 -4
- package/dist/npm/cells/FilterCells/TreeListTextFilter.js +8 -4
- package/dist/npm/cells/FilterCells/utils.js +1 -0
- package/dist/npm/cells/TreeListCell.d.ts +2 -1
- package/dist/npm/cells/TreeListCell.js +8 -6
- package/dist/npm/cells/TreeListSelectionCell.d.ts +2 -1
- package/dist/npm/cells/TreeListSelectionCell.js +6 -4
- package/dist/npm/constants/index.js +1 -0
- package/dist/npm/header/TreeListHeaderCell.js +3 -1
- package/dist/npm/header/TreeListHeaderSelectionCell.js +5 -2
- package/dist/npm/interfaces/TreeListCellProps.d.ts +1 -1
- package/dist/npm/interfaces/TreeListColumnProps.d.ts +1 -1
- package/dist/npm/main.js +39 -38
- package/dist/npm/messages/index.d.ts +23 -23
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/npm/rows/TreeListDraggableRow.js +17 -4
- package/dist/npm/rows/TreeListRow.js +4 -3
- package/dist/npm/utils/data-operations.d.ts +1 -1
- package/dist/npm/utils/data-operations.js +49 -30
- package/dist/npm/utils/index.js +1 -0
- package/dist/systemjs/kendo-react-treelist.js +1 -1
- package/package.json +11 -11
package/dist/es/ScrollMode.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/es/TreeList.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as PropTypes from 'prop-types';
|
|
3
3
|
import { CommonDragLogic, TableKeyboardNavigationContextType } from '@progress/kendo-react-data-tools';
|
|
4
|
+
import { TreeListCellProps } from './interfaces/TreeListCellProps';
|
|
4
5
|
import { TreeListProps } from './interfaces/TreeListProps';
|
|
6
|
+
import { TreeListHeaderCellProps } from './interfaces/TreeListHeaderCellProps';
|
|
7
|
+
import { TreeListFilterCellProps } from './interfaces/TreeListFilterCellProps';
|
|
5
8
|
/**
|
|
6
9
|
* Represents the [KendoReact TreeList component]({% slug getstarted_treelist %}).
|
|
7
10
|
*/
|
|
@@ -19,7 +22,7 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
19
22
|
}>>;
|
|
20
23
|
onSortChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
24
|
sort: PropTypes.Requireable<any[]>;
|
|
22
|
-
columns: PropTypes.Requireable<object[]>;
|
|
25
|
+
columns: PropTypes.Requireable<(object | null)[]>;
|
|
23
26
|
columnVirtualization: PropTypes.Requireable<boolean>;
|
|
24
27
|
filter: PropTypes.Requireable<any[]>;
|
|
25
28
|
onFilterChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -50,7 +53,7 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
50
53
|
navigatable: PropTypes.Requireable<boolean>;
|
|
51
54
|
};
|
|
52
55
|
/** @hidden */
|
|
53
|
-
static contextType: React.Context<TableKeyboardNavigationContextType>;
|
|
56
|
+
static contextType: React.Context<TableKeyboardNavigationContextType | undefined>;
|
|
54
57
|
private wrapperScrollLeft;
|
|
55
58
|
private wrapperScrollTop;
|
|
56
59
|
private updateOnScroll;
|
|
@@ -62,9 +65,9 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
62
65
|
private columnsMap;
|
|
63
66
|
private columnResize;
|
|
64
67
|
private element;
|
|
65
|
-
protected dragLogic: CommonDragLogic
|
|
68
|
+
protected dragLogic: CommonDragLogic<TreeListCellProps, TreeListHeaderCellProps, TreeListFilterCellProps>;
|
|
66
69
|
private _treeListId;
|
|
67
|
-
private
|
|
70
|
+
private get document();
|
|
68
71
|
private contextStateRef;
|
|
69
72
|
private navigationStateRef;
|
|
70
73
|
constructor(props: TreeListProps);
|
|
@@ -74,7 +77,7 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
74
77
|
* @param options - Object, containing the rowIndex to which is going to be scrolled.
|
|
75
78
|
*/
|
|
76
79
|
scrollIntoView: (options: {
|
|
77
|
-
rowIndex?: number;
|
|
80
|
+
rowIndex?: number | undefined;
|
|
78
81
|
}) => void;
|
|
79
82
|
/**
|
|
80
83
|
* @hidden
|
|
@@ -83,7 +86,7 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
83
86
|
/**
|
|
84
87
|
* @hidden
|
|
85
88
|
*/
|
|
86
|
-
getSnapshotBeforeUpdate():
|
|
89
|
+
getSnapshotBeforeUpdate(): null;
|
|
87
90
|
/**
|
|
88
91
|
* @hidden
|
|
89
92
|
*/
|
|
@@ -96,8 +99,8 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
96
99
|
* @hidden
|
|
97
100
|
*/
|
|
98
101
|
render(): JSX.Element;
|
|
99
|
-
private
|
|
100
|
-
private
|
|
102
|
+
private get columns();
|
|
103
|
+
private get flatData();
|
|
101
104
|
private onKeyDown;
|
|
102
105
|
private onFocus;
|
|
103
106
|
private onRowDrag;
|
package/dist/es/TreeList.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,10 +29,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
27
29
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
28
30
|
t[p] = s[p];
|
|
29
31
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
30
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
31
|
-
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
32
36
|
return t;
|
|
33
37
|
};
|
|
38
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
+
if (ar || !(i in from)) {
|
|
41
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
+
ar[i] = from[i];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
+
};
|
|
34
47
|
import * as React from 'react';
|
|
35
48
|
import * as PropTypes from 'prop-types';
|
|
36
49
|
import { classNames, noop, getter, guid, canUseDOM } from '@progress/kendo-react-common';
|
|
@@ -77,7 +90,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
77
90
|
_this.element.scroll(0, (rowIndex - 1) * rowHeight);
|
|
78
91
|
}
|
|
79
92
|
else {
|
|
80
|
-
var selectedRow = _this.element.querySelector("tbody > tr:nth-child("
|
|
93
|
+
var selectedRow = _this.element.querySelector("tbody > tr:nth-child(".concat(rowIndex, ")"));
|
|
81
94
|
if (selectedRow) {
|
|
82
95
|
var offsetTop = selectedRow.offsetTop - _this.tbodyOffsetTop;
|
|
83
96
|
_this.element.scroll(0, offsetTop);
|
|
@@ -91,8 +104,8 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
91
104
|
});
|
|
92
105
|
if (_this.props.onKeyDown) {
|
|
93
106
|
var _a = getSelectionOptions(_this.props.selectable), mode = _a.mode, cell = _a.cell;
|
|
94
|
-
|
|
95
|
-
|
|
107
|
+
var ev = __assign({ dataItems: _this.getLeafDataItems(), mode: mode, cell: cell, componentId: _this._treeListId, selectedField: _this.props.selectedField }, _this.getArguments(event));
|
|
108
|
+
_this.props.onKeyDown.call(undefined, ev);
|
|
96
109
|
}
|
|
97
110
|
};
|
|
98
111
|
_this.onFocus = function (event) {
|
|
@@ -102,12 +115,12 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
102
115
|
};
|
|
103
116
|
_this.onRowDrag = function (event) {
|
|
104
117
|
if (_this.props.onRowDrag) {
|
|
105
|
-
_this.props.onRowDrag.call(undefined, __assign({}, event, { target: _this }));
|
|
118
|
+
_this.props.onRowDrag.call(undefined, __assign(__assign({}, event), { target: _this }));
|
|
106
119
|
}
|
|
107
120
|
};
|
|
108
121
|
_this.onRowDrop = function (event) {
|
|
109
122
|
if (_this.props.onRowDrop) {
|
|
110
|
-
_this.props.onRowDrop.call(undefined, __assign({}, event, { target: _this }));
|
|
123
|
+
_this.props.onRowDrop.call(undefined, __assign(__assign({}, event), { target: _this }));
|
|
111
124
|
}
|
|
112
125
|
};
|
|
113
126
|
_this.columnReorder = function (prev, next, nativeEvent) {
|
|
@@ -120,7 +133,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
120
133
|
return index;
|
|
121
134
|
};
|
|
122
135
|
var spliced = _this.extendedColumn.splice(prev, end(prev) - prev);
|
|
123
|
-
(_a = _this.extendedColumn).splice.apply(_a, [prev < next ? end(next - spliced.length) : next, 0]
|
|
136
|
+
(_a = _this.extendedColumn).splice.apply(_a, __spreadArray([prev < next ? end(next - spliced.length) : next, 0], spliced, false));
|
|
124
137
|
_this.extendedColumn.filter(function (q) { return q.declarationIndex >= 0; }).forEach(function (c, i) { return c.orderIndex = i; });
|
|
125
138
|
if (_this.props.onColumnReorder) {
|
|
126
139
|
var event_1 = {
|
|
@@ -200,13 +213,13 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
200
213
|
if (event.field === _this.props.expandField) {
|
|
201
214
|
var expandChange = _this.props.onExpandChange;
|
|
202
215
|
if (expandChange) {
|
|
203
|
-
var expandEvent = __assign({}, _this.getArguments(event.syntheticEvent), { dataItem: event.dataItem, level: event.level, value: event.value });
|
|
216
|
+
var expandEvent = __assign(__assign({}, _this.getArguments(event.syntheticEvent)), { dataItem: event.dataItem, level: event.level, value: event.value });
|
|
204
217
|
expandChange.call(undefined, expandEvent);
|
|
205
218
|
}
|
|
206
219
|
return;
|
|
207
220
|
}
|
|
208
221
|
if (itemChange) {
|
|
209
|
-
var itemChangeEvent = __assign({}, _this.getArguments(event.syntheticEvent), { dataItem: event.dataItem, level: event.level, field: event.field, value: event.value });
|
|
222
|
+
var itemChangeEvent = __assign(__assign({}, _this.getArguments(event.syntheticEvent)), { dataItem: event.dataItem, level: event.level, field: event.field, value: event.value });
|
|
210
223
|
itemChange.call(undefined, itemChangeEvent);
|
|
211
224
|
}
|
|
212
225
|
};
|
|
@@ -252,8 +265,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
252
265
|
_this.expandChange = function (event, dataItem, level) {
|
|
253
266
|
var _a = _this.props, expandField = _a.expandField, onExpandChange = _a.onExpandChange;
|
|
254
267
|
if (expandField && onExpandChange) {
|
|
255
|
-
var expandEvent = __assign({}, _this.getArguments(event), { dataItem: dataItem,
|
|
256
|
-
level: level, value: _this.expanded(dataItem) });
|
|
268
|
+
var expandEvent = __assign(__assign({}, _this.getArguments(event)), { dataItem: dataItem, level: level, value: _this.expanded(dataItem) });
|
|
257
269
|
onExpandChange.call(undefined, expandEvent);
|
|
258
270
|
}
|
|
259
271
|
};
|
|
@@ -277,7 +289,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
277
289
|
};
|
|
278
290
|
_this.onPageChange = function (e) {
|
|
279
291
|
if (_this.props.onPageChange) {
|
|
280
|
-
var event_3 = __assign({}, _this.getArguments(e.syntheticEvent), { skip: e.skip, take: e.take });
|
|
292
|
+
var event_3 = __assign(__assign({}, _this.getArguments(e.syntheticEvent)), { skip: e.skip, take: e.take });
|
|
281
293
|
_this.props.onPageChange.call(undefined, event_3);
|
|
282
294
|
}
|
|
283
295
|
};
|
|
@@ -311,7 +323,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
311
323
|
// useful only for user actions
|
|
312
324
|
return (this.element && this.element.ownerDocument) || document;
|
|
313
325
|
},
|
|
314
|
-
enumerable:
|
|
326
|
+
enumerable: false,
|
|
315
327
|
configurable: true
|
|
316
328
|
});
|
|
317
329
|
/**
|
|
@@ -394,10 +406,10 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
394
406
|
return null;
|
|
395
407
|
}
|
|
396
408
|
var columnKey = column.id ? column.id : columnIndex;
|
|
397
|
-
var className = ""
|
|
398
|
-
+
|
|
409
|
+
var className = "".concat(column.className ? column.className + ' ' : '')
|
|
410
|
+
+ "".concat(column.locked ? 'k-grid-content-sticky' : '');
|
|
399
411
|
var cellProps = {
|
|
400
|
-
id: navigationTools.generateNavigatableId(rowId
|
|
412
|
+
id: navigationTools.generateNavigatableId("".concat(rowId, "-").concat(String(columnIndex)), idPrefix),
|
|
401
413
|
colSpan: colSpans[columnIndex],
|
|
402
414
|
dataItem: item.dataItem,
|
|
403
415
|
field: column.field,
|
|
@@ -491,7 +503,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
491
503
|
React.createElement("div", __assign({ style: this.props.style, className: classNames('k-widget k-grid', this.props.className, { 'k-treelist-scrollable': scrollable !== 'none' }), ref: function (e) { return _this.element = e; }, onScroll: virtualScroll ? this.handleOnScroll : undefined, onKeyDown: this.onKeyDown, onFocus: this.onFocus, "aria-rowcount": total, "aria-colcount": leafColumns.length, role: 'treegrid' }, tableKeyboardNavigationScopeAttributes),
|
|
492
504
|
this.props.toolbar,
|
|
493
505
|
React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease },
|
|
494
|
-
React.createElement("table", __assign({}, tableProps, { style: __assign({}, (tableProps.style || {}), { userSelect: tableUserSelect }), role: 'presentation' }),
|
|
506
|
+
React.createElement("table", __assign({}, tableProps, { style: __assign(__assign({}, (tableProps.style || {})), { userSelect: tableUserSelect }), role: 'presentation' }),
|
|
495
507
|
colGroups,
|
|
496
508
|
header,
|
|
497
509
|
React.createElement("tbody", __assign({}, tableKeyboardNavigationBodyAttributes, { role: 'presentation' }), body))),
|
|
@@ -512,7 +524,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
512
524
|
};
|
|
513
525
|
return sanitize(shuffledColumns);
|
|
514
526
|
},
|
|
515
|
-
enumerable:
|
|
527
|
+
enumerable: false,
|
|
516
528
|
configurable: true
|
|
517
529
|
});
|
|
518
530
|
Object.defineProperty(TreeList.prototype, "flatData", {
|
|
@@ -534,25 +546,24 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
534
546
|
this.flattedData = flattedData;
|
|
535
547
|
return flattedData;
|
|
536
548
|
},
|
|
537
|
-
enumerable:
|
|
549
|
+
enumerable: false,
|
|
538
550
|
configurable: true
|
|
539
551
|
});
|
|
540
552
|
TreeList.prototype.selectionChange = function (options) {
|
|
541
553
|
if (this.props.onSelectionChange) {
|
|
542
554
|
var event_4 = options.event, item = options.item, dataIndex = options.dataIndex, columnIndex = options.columnIndex;
|
|
543
555
|
var _a = getSelectionOptions(this.props.selectable), mode = _a.mode, cell = _a.cell;
|
|
544
|
-
var selectionEvent = __assign({}, this.getArguments(event_4.syntheticEvent), { dataItem: item.dataItem, level: item.level, startColIndex: columnIndex, endColIndex: columnIndex, startRowIndex: dataIndex, endRowIndex: dataIndex, dataItems: this.getLeafDataItems(), altKey: false, ctrlKey: false, shiftKey: false, metaKey: false, mode: mode,
|
|
545
|
-
cell: cell, isDrag: false, componentId: this._treeListId, selectedField: this.props.selectedField || '' });
|
|
556
|
+
var selectionEvent = __assign(__assign({}, this.getArguments(event_4.syntheticEvent)), { dataItem: item.dataItem, level: item.level, startColIndex: columnIndex, endColIndex: columnIndex, startRowIndex: dataIndex, endRowIndex: dataIndex, dataItems: this.getLeafDataItems(), altKey: false, ctrlKey: false, shiftKey: false, metaKey: false, mode: mode, cell: cell, isDrag: false, componentId: this._treeListId, selectedField: this.props.selectedField || '' });
|
|
546
557
|
this.props.onSelectionChange.call(undefined, selectionEvent);
|
|
547
558
|
}
|
|
548
559
|
};
|
|
549
560
|
TreeList.prototype.raiseDataEvent = function (handler, data, syntheticEvent) {
|
|
550
561
|
var dataStateChange = this.props.onDataStateChange;
|
|
551
562
|
if (handler) {
|
|
552
|
-
handler.call(undefined, __assign({}, this.getArguments(syntheticEvent), data));
|
|
563
|
+
handler.call(undefined, __assign(__assign({}, this.getArguments(syntheticEvent)), data));
|
|
553
564
|
}
|
|
554
565
|
else if (dataStateChange) {
|
|
555
|
-
var dataStateEvent = __assign({}, this.getArguments(syntheticEvent), { dataState: __assign({}, this.getDataState(), data) });
|
|
566
|
+
var dataStateEvent = __assign(__assign({}, this.getArguments(syntheticEvent)), { dataState: __assign(__assign({}, this.getDataState()), data) });
|
|
556
567
|
dataStateChange.call(undefined, dataStateEvent);
|
|
557
568
|
}
|
|
558
569
|
};
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TreeListCellProps } from '../../interfaces/TreeListCellProps';
|
|
2
3
|
export interface TreeListBooleanEditorProps extends TreeListCellProps {
|
|
3
4
|
}
|
|
4
5
|
export declare const TreeListBooleanEditor: {
|
|
5
|
-
(props: TreeListBooleanEditorProps):
|
|
6
|
+
(props: TreeListBooleanEditorProps): JSX.Element | null;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TreeListCellProps } from '../../interfaces/TreeListCellProps';
|
|
2
3
|
export interface TreeListDateEditorProps extends TreeListCellProps {
|
|
3
4
|
}
|
|
4
5
|
export declare const TreeListDateEditor: {
|
|
5
|
-
(props: TreeListDateEditorProps):
|
|
6
|
+
(props: TreeListDateEditorProps): JSX.Element | null;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { TreeListCellProps } from '../../interfaces/TreeListCellProps';
|
|
2
3
|
export interface TreeListNumericEditorProps extends TreeListCellProps {
|
|
3
4
|
}
|
|
4
5
|
export declare const TreeListNumericEditor: {
|
|
5
|
-
(props: TreeListNumericEditorProps): any;
|
|
6
|
+
(props: TreeListNumericEditorProps): React.ReactElement<HTMLTableCellElement, string | React.JSXElementConstructor<any>> | null;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TreeListCellProps } from '../../interfaces/TreeListCellProps';
|
|
2
3
|
export interface TreeListTextEditorProps extends TreeListCellProps {
|
|
3
4
|
}
|
|
4
5
|
export declare const TreeListTextEditor: {
|
|
5
|
-
(props: TreeListTextEditorProps):
|
|
6
|
+
(props: TreeListTextEditorProps): JSX.Element | null;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -14,8 +14,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
14
14
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
15
|
t[p] = s[p];
|
|
16
16
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++)
|
|
18
|
-
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
19
21
|
return t;
|
|
20
22
|
};
|
|
21
23
|
import * as React from 'react';
|
|
@@ -40,7 +40,7 @@ export var TreeListCell = function (props) {
|
|
|
40
40
|
if (props.expandable) {
|
|
41
41
|
icons.push.apply(icons, level.slice(1).map(function (_x, i) { return (React.createElement("span", { className: "k-icon k-i-none", key: i })); }));
|
|
42
42
|
if (hasChildren) {
|
|
43
|
-
icons.push(React.createElement("span", __assign({ className: "k-icon k-i-"
|
|
43
|
+
icons.push(React.createElement("span", __assign({ className: "k-icon k-i-".concat(expanded ? 'collapse' : 'expand'), key: "expand-collapse", onClick: function (event) { return props.onExpandChange(event, dataItem, level); } }, (_a = {}, _a[TREELIST_PREVENT_SELECTION_ELEMENT] = true, _a))));
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
46
46
|
icons.push(React.createElement("span", { className: "k-icon k-i-none", key: icons.length }));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { TreeListCellProps } from '../interfaces/TreeListCellProps';
|
|
2
3
|
export interface TreeListSelectionCellProps extends TreeListCellProps {
|
|
3
4
|
}
|
|
4
5
|
export declare const TreeListSelectionCell: {
|
|
5
|
-
(props: TreeListSelectionCellProps):
|
|
6
|
+
(props: TreeListSelectionCellProps): JSX.Element | null;
|
|
6
7
|
displayName: string;
|
|
7
8
|
};
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { CellProps } from '@progress/kendo-react-data-tools';
|
|
|
3
3
|
/**
|
|
4
4
|
* Represents the props of the TreeListCell component.
|
|
5
5
|
*/
|
|
6
|
-
export interface TreeListCellProps extends CellProps {
|
|
6
|
+
export interface TreeListCellProps extends Omit<CellProps, 'onExpandChange' | 'render' | 'onChange'> {
|
|
7
7
|
/**
|
|
8
8
|
* An array of indexes of each parent and current item in the data tree.
|
|
9
9
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,7 +6,7 @@ import { TreeListFilterCellProps } from './TreeListFilterCellProps';
|
|
|
6
6
|
/**
|
|
7
7
|
* The props of the columns of the TreeList component.
|
|
8
8
|
*/
|
|
9
|
-
export interface TreeListColumnProps extends TreeColumnBaseProps {
|
|
9
|
+
export interface TreeListColumnProps extends Omit<TreeColumnBaseProps, 'children' | 'cell' | 'editCell'> {
|
|
10
10
|
/**
|
|
11
11
|
* Defines the component that will be rendered as a cell. If not set, a `TreeListCell` will be rendered by default.
|
|
12
12
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -94,27 +94,27 @@ export declare const noRecords = "treelist.noRecords";
|
|
|
94
94
|
* @hidden
|
|
95
95
|
*/
|
|
96
96
|
export declare const messages: {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
97
|
+
"treelist.filterClearButton": string;
|
|
98
|
+
"treelist.filterEqOperator": string;
|
|
99
|
+
"treelist.filterNotEqOperator": string;
|
|
100
|
+
"treelist.filterIsNullOperator": string;
|
|
101
|
+
"treelist.filterIsNotNullOperator": string;
|
|
102
|
+
"treelist.filterIsEmptyOperator": string;
|
|
103
|
+
"treelist.filterIsNotEmptyOperator": string;
|
|
104
|
+
"treelist.filterStartsWithOperator": string;
|
|
105
|
+
"treelist.filterContainsOperator": string;
|
|
106
|
+
"treelist.filterNotContainsOperator": string;
|
|
107
|
+
"treelist.filterEndsWithOperator": string;
|
|
108
|
+
"treelist.filterGteOperator": string;
|
|
109
|
+
"treelist.filterGtOperator": string;
|
|
110
|
+
"treelist.filterLteOperator": string;
|
|
111
|
+
"treelist.filterLtOperator": string;
|
|
112
|
+
"treelist.filterIsTrue": string;
|
|
113
|
+
"treelist.filterIsFalse": string;
|
|
114
|
+
"treelist.filterBooleanAll": string;
|
|
115
|
+
"treelist.filterAfterOrEqualOperator": string;
|
|
116
|
+
"treelist.filterAfterOperator": string;
|
|
117
|
+
"treelist.filterBeforeOperator": string;
|
|
118
|
+
"treelist.filterBeforeOrEqualOperator": string;
|
|
119
|
+
"treelist.noRecords": string;
|
|
120
120
|
};
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-treelist',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1654509417,
|
|
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
|
};
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
8
|
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -22,6 +24,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
22
24
|
};
|
|
23
25
|
return __assign.apply(this, arguments);
|
|
24
26
|
};
|
|
27
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
28
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
29
|
+
if (ar || !(i in from)) {
|
|
30
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
31
|
+
ar[i] = from[i];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
35
|
+
};
|
|
25
36
|
import * as React from 'react';
|
|
26
37
|
import * as ReactDOM from 'react-dom';
|
|
27
38
|
import { Draggable, canUseDOM } from '@progress/kendo-react-common';
|
|
@@ -126,8 +137,8 @@ var TreeListDraggableRow = /** @class */ (function (_super) {
|
|
|
126
137
|
_this.onRelease = function (args) {
|
|
127
138
|
var event = args.event;
|
|
128
139
|
if (_this.dragged) {
|
|
129
|
-
var dragged = _this.dragged
|
|
130
|
-
var draggedOver = _this.draggedOver && _this.draggedOver
|
|
140
|
+
var dragged = __spreadArray([], _this.dragged, true);
|
|
141
|
+
var draggedOver = _this.draggedOver && __spreadArray([], _this.draggedOver, true);
|
|
131
142
|
var allowDrop = _this.state.clueProps.allowDrop;
|
|
132
143
|
_this.dragged = null;
|
|
133
144
|
_this.draggedOver = null;
|
|
@@ -136,7 +147,8 @@ var TreeListDraggableRow = /** @class */ (function (_super) {
|
|
|
136
147
|
if (allowDrop && _this.props.onDrop) {
|
|
137
148
|
_this.props.onDrop.call(undefined, {
|
|
138
149
|
nativeEvent: event.originalEvent,
|
|
139
|
-
dragged: dragged,
|
|
150
|
+
dragged: dragged,
|
|
151
|
+
draggedOver: draggedOver,
|
|
140
152
|
draggedItem: draggedItem
|
|
141
153
|
});
|
|
142
154
|
}
|
|
@@ -24,7 +24,7 @@ export var TreeListRow = React.forwardRef(function (props, ref) {
|
|
|
24
24
|
});
|
|
25
25
|
var style = React.useMemo(function () { return rowHeight !== undefined ? { height: rowHeight + 'px' } : undefined; }, [rowHeight]);
|
|
26
26
|
var defaultRendering = (React.createElement("tr", __assign({ onClick: props.onClick, onDoubleClick: props.onDoubleClick, onContextMenu: props.onContextMenu, className: className, style: style, ref: ref, "aria-expanded": expanded, role: 'row', "aria-rowindex": ariaRowIndex, "aria-level": level.length, "aria-posinset": ariaPosInSet, "aria-setsize": ariaSetSize }, (_a = {}, _a[TREELIST_ROW_INDEX_ATTRIBUTE] = props.rowIndex, _a)), props.children));
|
|
27
|
-
return props.render ?
|
|
27
|
+
return (React.createElement(React.Fragment, null, props.render ?
|
|
28
28
|
props.render.call(undefined, defaultRendering, props) :
|
|
29
|
-
defaultRendering;
|
|
29
|
+
defaultRendering));
|
|
30
30
|
});
|