@progress/kendo-react-treelist 5.4.0-dev.202205250548 → 5.4.0-dev.202205271059
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 +3 -3
- package/dist/es/TreeList.js +27 -21
- package/dist/es/TreeListNoRecords.js +3 -1
- package/dist/es/TreeListToolbar.js +3 -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/header/TreeListHeaderSelectionCell.js +3 -1
- package/dist/es/interfaces/DataItemWrapper.js +1 -0
- package/dist/es/interfaces/TreeListCellProps.js +1 -0
- 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 +12 -4
- package/dist/es/utils/data-operations.d.ts +1 -1
- package/dist/es/utils/data-operations.js +14 -9
- package/dist/npm/TreeList.d.ts +3 -3
- package/dist/npm/TreeList.js +28 -21
- package/dist/npm/TreeListNoRecords.js +4 -1
- package/dist/npm/TreeListToolbar.js +4 -1
- package/dist/npm/cells/EditCells/TreeListBooleanEditor.js +3 -1
- package/dist/npm/cells/EditCells/TreeListDateEditor.js +3 -1
- package/dist/npm/cells/EditCells/TreeListNumericEditor.js +3 -1
- package/dist/npm/cells/EditCells/TreeListTextEditor.js +3 -1
- package/dist/npm/cells/FilterCells/TreeListBooleanFilter.js +7 -3
- package/dist/npm/cells/FilterCells/TreeListDateFilter.js +7 -3
- package/dist/npm/cells/FilterCells/TreeListNumericFilter.js +7 -3
- package/dist/npm/cells/FilterCells/TreeListTextFilter.js +7 -3
- package/dist/npm/cells/FilterCells/utils.js +1 -0
- package/dist/npm/cells/TreeListCell.js +3 -1
- package/dist/npm/cells/TreeListSelectionCell.js +3 -1
- package/dist/npm/constants/index.js +1 -0
- package/dist/npm/header/TreeListHeaderCell.js +3 -1
- package/dist/npm/header/TreeListHeaderSelectionCell.js +4 -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 +13 -4
- package/dist/npm/rows/TreeListRow.js +1 -0
- package/dist/npm/utils/data-operations.d.ts +1 -1
- package/dist/npm/utils/data-operations.js +33 -18
- package/dist/npm/utils/index.js +1 -0
- package/dist/systemjs/kendo-react-treelist.js +1 -1
- package/package.json +10 -10
package/dist/es/ScrollMode.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/es/TreeList.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
64
64
|
private element;
|
|
65
65
|
protected dragLogic: CommonDragLogic;
|
|
66
66
|
private _treeListId;
|
|
67
|
-
private
|
|
67
|
+
private get document();
|
|
68
68
|
private contextStateRef;
|
|
69
69
|
private navigationStateRef;
|
|
70
70
|
constructor(props: TreeListProps);
|
|
@@ -96,8 +96,8 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
96
96
|
* @hidden
|
|
97
97
|
*/
|
|
98
98
|
render(): JSX.Element;
|
|
99
|
-
private
|
|
100
|
-
private
|
|
99
|
+
private get columns();
|
|
100
|
+
private get flatData();
|
|
101
101
|
private onKeyDown;
|
|
102
102
|
private onFocus;
|
|
103
103
|
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,17 @@ 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) {
|
|
39
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
40
|
+
to[j] = from[i];
|
|
41
|
+
return to;
|
|
42
|
+
};
|
|
34
43
|
import * as React from 'react';
|
|
35
44
|
import * as PropTypes from 'prop-types';
|
|
36
45
|
import { classNames, noop, getter, guid, canUseDOM } from '@progress/kendo-react-common';
|
|
@@ -91,8 +100,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
91
100
|
});
|
|
92
101
|
if (_this.props.onKeyDown) {
|
|
93
102
|
var _a = getSelectionOptions(_this.props.selectable), mode = _a.mode, cell = _a.cell;
|
|
94
|
-
_this.props.onKeyDown.call(undefined, __assign({ dataItems: _this.getLeafDataItems(), mode: mode,
|
|
95
|
-
cell: cell, componentId: _this._treeListId, selectedField: _this.props.selectedField }, _this.getArguments(event)));
|
|
103
|
+
_this.props.onKeyDown.call(undefined, __assign({ dataItems: _this.getLeafDataItems(), mode: mode, cell: cell, componentId: _this._treeListId, selectedField: _this.props.selectedField }, _this.getArguments(event)));
|
|
96
104
|
}
|
|
97
105
|
};
|
|
98
106
|
_this.onFocus = function (event) {
|
|
@@ -102,12 +110,12 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
102
110
|
};
|
|
103
111
|
_this.onRowDrag = function (event) {
|
|
104
112
|
if (_this.props.onRowDrag) {
|
|
105
|
-
_this.props.onRowDrag.call(undefined, __assign({}, event, { target: _this }));
|
|
113
|
+
_this.props.onRowDrag.call(undefined, __assign(__assign({}, event), { target: _this }));
|
|
106
114
|
}
|
|
107
115
|
};
|
|
108
116
|
_this.onRowDrop = function (event) {
|
|
109
117
|
if (_this.props.onRowDrop) {
|
|
110
|
-
_this.props.onRowDrop.call(undefined, __assign({}, event, { target: _this }));
|
|
118
|
+
_this.props.onRowDrop.call(undefined, __assign(__assign({}, event), { target: _this }));
|
|
111
119
|
}
|
|
112
120
|
};
|
|
113
121
|
_this.columnReorder = function (prev, next, nativeEvent) {
|
|
@@ -120,7 +128,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
120
128
|
return index;
|
|
121
129
|
};
|
|
122
130
|
var spliced = _this.extendedColumn.splice(prev, end(prev) - prev);
|
|
123
|
-
(_a = _this.extendedColumn).splice.apply(_a, [prev < next ? end(next - spliced.length) : next, 0]
|
|
131
|
+
(_a = _this.extendedColumn).splice.apply(_a, __spreadArray([prev < next ? end(next - spliced.length) : next, 0], spliced));
|
|
124
132
|
_this.extendedColumn.filter(function (q) { return q.declarationIndex >= 0; }).forEach(function (c, i) { return c.orderIndex = i; });
|
|
125
133
|
if (_this.props.onColumnReorder) {
|
|
126
134
|
var event_1 = {
|
|
@@ -200,13 +208,13 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
200
208
|
if (event.field === _this.props.expandField) {
|
|
201
209
|
var expandChange = _this.props.onExpandChange;
|
|
202
210
|
if (expandChange) {
|
|
203
|
-
var expandEvent = __assign({}, _this.getArguments(event.syntheticEvent), { dataItem: event.dataItem, level: event.level, value: event.value });
|
|
211
|
+
var expandEvent = __assign(__assign({}, _this.getArguments(event.syntheticEvent)), { dataItem: event.dataItem, level: event.level, value: event.value });
|
|
204
212
|
expandChange.call(undefined, expandEvent);
|
|
205
213
|
}
|
|
206
214
|
return;
|
|
207
215
|
}
|
|
208
216
|
if (itemChange) {
|
|
209
|
-
var itemChangeEvent = __assign({}, _this.getArguments(event.syntheticEvent), { dataItem: event.dataItem, level: event.level, field: event.field, value: event.value });
|
|
217
|
+
var itemChangeEvent = __assign(__assign({}, _this.getArguments(event.syntheticEvent)), { dataItem: event.dataItem, level: event.level, field: event.field, value: event.value });
|
|
210
218
|
itemChange.call(undefined, itemChangeEvent);
|
|
211
219
|
}
|
|
212
220
|
};
|
|
@@ -252,8 +260,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
252
260
|
_this.expandChange = function (event, dataItem, level) {
|
|
253
261
|
var _a = _this.props, expandField = _a.expandField, onExpandChange = _a.onExpandChange;
|
|
254
262
|
if (expandField && onExpandChange) {
|
|
255
|
-
var expandEvent = __assign({}, _this.getArguments(event), { dataItem: dataItem,
|
|
256
|
-
level: level, value: _this.expanded(dataItem) });
|
|
263
|
+
var expandEvent = __assign(__assign({}, _this.getArguments(event)), { dataItem: dataItem, level: level, value: _this.expanded(dataItem) });
|
|
257
264
|
onExpandChange.call(undefined, expandEvent);
|
|
258
265
|
}
|
|
259
266
|
};
|
|
@@ -277,7 +284,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
277
284
|
};
|
|
278
285
|
_this.onPageChange = function (e) {
|
|
279
286
|
if (_this.props.onPageChange) {
|
|
280
|
-
var event_3 = __assign({}, _this.getArguments(e.syntheticEvent), { skip: e.skip, take: e.take });
|
|
287
|
+
var event_3 = __assign(__assign({}, _this.getArguments(e.syntheticEvent)), { skip: e.skip, take: e.take });
|
|
281
288
|
_this.props.onPageChange.call(undefined, event_3);
|
|
282
289
|
}
|
|
283
290
|
};
|
|
@@ -311,7 +318,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
311
318
|
// useful only for user actions
|
|
312
319
|
return (this.element && this.element.ownerDocument) || document;
|
|
313
320
|
},
|
|
314
|
-
enumerable:
|
|
321
|
+
enumerable: false,
|
|
315
322
|
configurable: true
|
|
316
323
|
});
|
|
317
324
|
/**
|
|
@@ -491,7 +498,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
491
498
|
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
499
|
this.props.toolbar,
|
|
493
500
|
React.createElement(TableSelection, { selectable: this.props.selectable, onRelease: this.selectionRelease },
|
|
494
|
-
React.createElement("table", __assign({}, tableProps, { style: __assign({}, (tableProps.style || {}), { userSelect: tableUserSelect }), role: 'presentation' }),
|
|
501
|
+
React.createElement("table", __assign({}, tableProps, { style: __assign(__assign({}, (tableProps.style || {})), { userSelect: tableUserSelect }), role: 'presentation' }),
|
|
495
502
|
colGroups,
|
|
496
503
|
header,
|
|
497
504
|
React.createElement("tbody", __assign({}, tableKeyboardNavigationBodyAttributes, { role: 'presentation' }), body))),
|
|
@@ -512,7 +519,7 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
512
519
|
};
|
|
513
520
|
return sanitize(shuffledColumns);
|
|
514
521
|
},
|
|
515
|
-
enumerable:
|
|
522
|
+
enumerable: false,
|
|
516
523
|
configurable: true
|
|
517
524
|
});
|
|
518
525
|
Object.defineProperty(TreeList.prototype, "flatData", {
|
|
@@ -534,25 +541,24 @@ var TreeList = /** @class */ (function (_super) {
|
|
|
534
541
|
this.flattedData = flattedData;
|
|
535
542
|
return flattedData;
|
|
536
543
|
},
|
|
537
|
-
enumerable:
|
|
544
|
+
enumerable: false,
|
|
538
545
|
configurable: true
|
|
539
546
|
});
|
|
540
547
|
TreeList.prototype.selectionChange = function (options) {
|
|
541
548
|
if (this.props.onSelectionChange) {
|
|
542
549
|
var event_4 = options.event, item = options.item, dataIndex = options.dataIndex, columnIndex = options.columnIndex;
|
|
543
550
|
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 || '' });
|
|
551
|
+
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
552
|
this.props.onSelectionChange.call(undefined, selectionEvent);
|
|
547
553
|
}
|
|
548
554
|
};
|
|
549
555
|
TreeList.prototype.raiseDataEvent = function (handler, data, syntheticEvent) {
|
|
550
556
|
var dataStateChange = this.props.onDataStateChange;
|
|
551
557
|
if (handler) {
|
|
552
|
-
handler.call(undefined, __assign({}, this.getArguments(syntheticEvent), data));
|
|
558
|
+
handler.call(undefined, __assign(__assign({}, this.getArguments(syntheticEvent)), data));
|
|
553
559
|
}
|
|
554
560
|
else if (dataStateChange) {
|
|
555
|
-
var dataStateEvent = __assign({}, this.getArguments(syntheticEvent), { dataState: __assign({}, this.getDataState(), data) });
|
|
561
|
+
var dataStateEvent = __assign(__assign({}, this.getArguments(syntheticEvent)), { dataState: __assign(__assign({}, this.getDataState()), data) });
|
|
556
562
|
dataStateChange.call(undefined, dataStateEvent);
|
|
557
563
|
}
|
|
558
564
|
};
|
|
@@ -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 __());
|
|
@@ -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';
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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: 1653648496,
|
|
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,11 @@ 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) {
|
|
28
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
29
|
+
to[j] = from[i];
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
25
32
|
import * as React from 'react';
|
|
26
33
|
import * as ReactDOM from 'react-dom';
|
|
27
34
|
import { Draggable, canUseDOM } from '@progress/kendo-react-common';
|
|
@@ -126,8 +133,8 @@ var TreeListDraggableRow = /** @class */ (function (_super) {
|
|
|
126
133
|
_this.onRelease = function (args) {
|
|
127
134
|
var event = args.event;
|
|
128
135
|
if (_this.dragged) {
|
|
129
|
-
var dragged = _this.dragged
|
|
130
|
-
var draggedOver = _this.draggedOver && _this.draggedOver
|
|
136
|
+
var dragged = __spreadArray([], _this.dragged);
|
|
137
|
+
var draggedOver = _this.draggedOver && __spreadArray([], _this.draggedOver);
|
|
131
138
|
var allowDrop = _this.state.clueProps.allowDrop;
|
|
132
139
|
_this.dragged = null;
|
|
133
140
|
_this.draggedOver = null;
|
|
@@ -136,7 +143,8 @@ var TreeListDraggableRow = /** @class */ (function (_super) {
|
|
|
136
143
|
if (allowDrop && _this.props.onDrop) {
|
|
137
144
|
_this.props.onDrop.call(undefined, {
|
|
138
145
|
nativeEvent: event.originalEvent,
|
|
139
|
-
dragged: dragged,
|
|
146
|
+
dragged: dragged,
|
|
147
|
+
draggedOver: draggedOver,
|
|
140
148
|
draggedItem: draggedItem
|
|
141
149
|
});
|
|
142
150
|
}
|
|
@@ -112,4 +112,4 @@ export declare const getItemPath: (tree: any[], level: number[], subItemsField?:
|
|
|
112
112
|
* @param {string} subItemsField - The field which points to the subitems collection of each data item.
|
|
113
113
|
* @returns {any[]} - The new data tree.
|
|
114
114
|
*/
|
|
115
|
-
export declare const moveTreeItem: (data: any[], target: number[], destination: number[], subItemsField: string) => any[];
|
|
115
|
+
export declare const moveTreeItem: (data: any[], target: number[], destination: number[] | null, subItemsField: string) => any[];
|
|
@@ -9,6 +9,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
13
|
+
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
14
|
+
to[j] = from[i];
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
12
17
|
import { getNestedValue } from './index';
|
|
13
18
|
import { filterBy as filterByCommon, orderBy as orderByCommon } from '@progress/kendo-react-data-tools';
|
|
14
19
|
import { mapTree as mapTreeCommon, mapTreeItem as mapTreeItemCommon, extendDataItem as extendDataItemCommon, getItemPath as getItemPathCommon } from '@progress/kendo-react-common';
|
|
@@ -77,14 +82,14 @@ export function flatData(data, getChildren, itemMap) {
|
|
|
77
82
|
}
|
|
78
83
|
while (stack.length > 0) {
|
|
79
84
|
var stackItem = stack.pop();
|
|
80
|
-
flatted.push(__assign({ dataItem: stackItem.root, level: stackItem.level
|
|
85
|
+
flatted.push(__assign(__assign({ dataItem: stackItem.root, level: __spreadArray([], stackItem.level) }, itemMap(stackItem.root)), { levelCount: stackItem.levelCount }));
|
|
81
86
|
if (stackItem.data.length) {
|
|
82
87
|
for (var i = stackItem.data.length - 1; i >= 0; i--) {
|
|
83
88
|
var root = stackItem.data[i];
|
|
84
89
|
stack.push({
|
|
85
90
|
root: root,
|
|
86
91
|
data: getChildren(root),
|
|
87
|
-
level: stackItem.level
|
|
92
|
+
level: __spreadArray(__spreadArray([], stackItem.level), [i]),
|
|
88
93
|
levelCount: stackItem.data.length
|
|
89
94
|
});
|
|
90
95
|
}
|
|
@@ -111,7 +116,7 @@ export var treeToFlat = function (data, expandField, subItemsField) {
|
|
|
111
116
|
return items;
|
|
112
117
|
};
|
|
113
118
|
var flatItems = function (dataItem, flatted, level) {
|
|
114
|
-
flatted.push(__assign({}, dataItem, { level: level }));
|
|
119
|
+
flatted.push(__assign(__assign({}, dataItem), { level: level }));
|
|
115
120
|
getChildren(dataItem).forEach(function (root) { return flatItems(root, flatted, level + 1); });
|
|
116
121
|
};
|
|
117
122
|
var flattedData = [];
|
|
@@ -164,8 +169,8 @@ export var extendDataItem = function (item, subItemsField, propsToExtend) {
|
|
|
164
169
|
*/
|
|
165
170
|
export var removeItems = function (data, subItemsField, condition) {
|
|
166
171
|
var _a;
|
|
167
|
-
var newData = mapTree([(_a = {}, _a[subItemsField] = data
|
|
168
|
-
return newData[0][subItemsField]
|
|
172
|
+
var newData = mapTree([(_a = {}, _a[subItemsField] = __spreadArray([], data), _a)], subItemsField, function (item) { return removeChild(item, condition, subItemsField); });
|
|
173
|
+
return __spreadArray([], newData[0][subItemsField]);
|
|
169
174
|
};
|
|
170
175
|
/**
|
|
171
176
|
* @hidden
|
|
@@ -175,9 +180,9 @@ var removeChild = function (item, condition, subItemsField) {
|
|
|
175
180
|
var subItems = item[subItemsField] || [];
|
|
176
181
|
var childIndex = subItems.findIndex(condition);
|
|
177
182
|
if (childIndex !== -1) {
|
|
178
|
-
var newChildren = subItems
|
|
183
|
+
var newChildren = __spreadArray([], subItems);
|
|
179
184
|
newChildren.splice(childIndex, 1);
|
|
180
|
-
return __assign({}, item, (_a = {}, _a[subItemsField] = newChildren, _a));
|
|
185
|
+
return __assign(__assign({}, item), (_a = {}, _a[subItemsField] = newChildren, _a));
|
|
181
186
|
}
|
|
182
187
|
return item;
|
|
183
188
|
};
|
|
@@ -195,7 +200,7 @@ var removeChild = function (item, condition, subItemsField) {
|
|
|
195
200
|
export var modifySubItems = function (data, subItemsField, condition, change) {
|
|
196
201
|
return mapTree(data, subItemsField, function (item) {
|
|
197
202
|
var _a;
|
|
198
|
-
return condition(item) ? __assign({}, item, (_a = {}, _a[subItemsField] = change(item[subItemsField] || []), _a)) :
|
|
203
|
+
return condition(item) ? __assign(__assign({}, item), (_a = {}, _a[subItemsField] = change(item[subItemsField] || []), _a)) :
|
|
199
204
|
item;
|
|
200
205
|
});
|
|
201
206
|
};
|
|
@@ -221,7 +226,7 @@ export var getItemPath = function (tree, level, subItemsField) {
|
|
|
221
226
|
* @returns {any[]} - The new data tree.
|
|
222
227
|
*/
|
|
223
228
|
export var moveTreeItem = function (data, target, destination, subItemsField) {
|
|
224
|
-
var tree = data
|
|
229
|
+
var tree = __spreadArray([], data);
|
|
225
230
|
var targetItemPath = getItemPath(tree, target, subItemsField);
|
|
226
231
|
var targetItem = targetItemPath.pop();
|
|
227
232
|
var targetParent = targetItemPath.pop();
|
package/dist/npm/TreeList.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
64
64
|
private element;
|
|
65
65
|
protected dragLogic: CommonDragLogic;
|
|
66
66
|
private _treeListId;
|
|
67
|
-
private
|
|
67
|
+
private get document();
|
|
68
68
|
private contextStateRef;
|
|
69
69
|
private navigationStateRef;
|
|
70
70
|
constructor(props: TreeListProps);
|
|
@@ -96,8 +96,8 @@ export declare class TreeList extends React.Component<TreeListProps, {}> {
|
|
|
96
96
|
* @hidden
|
|
97
97
|
*/
|
|
98
98
|
render(): JSX.Element;
|
|
99
|
-
private
|
|
100
|
-
private
|
|
99
|
+
private get columns();
|
|
100
|
+
private get flatData();
|
|
101
101
|
private onKeyDown;
|
|
102
102
|
private onFocus;
|
|
103
103
|
private onRowDrag;
|