@progress/kendo-vue-treelist 5.3.0-dev.202410141143 → 5.3.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -34
- package/TreeList.js +8 -0
- package/TreeList.mjs +722 -0
- package/TreeListNav.js +8 -0
- package/TreeListNav.mjs +98 -0
- package/cells/EditCells/TreeListBooleanEditor.js +8 -0
- package/cells/EditCells/TreeListBooleanEditor.mjs +154 -0
- package/cells/EditCells/TreeListDateEditor.js +8 -0
- package/cells/EditCells/TreeListDateEditor.mjs +140 -0
- package/cells/EditCells/TreeListNumericEditor.js +8 -0
- package/cells/EditCells/TreeListNumericEditor.mjs +140 -0
- package/cells/EditCells/TreeListTextEditor.js +8 -0
- package/cells/EditCells/TreeListTextEditor.mjs +157 -0
- package/cells/FilterCells/TreeListBooleanFilter.js +8 -0
- package/cells/FilterCells/TreeListBooleanFilter.mjs +54 -0
- package/cells/FilterCells/TreeListDateFilter.js +8 -0
- package/cells/FilterCells/TreeListDateFilter.mjs +54 -0
- package/cells/FilterCells/TreeListNumericFilter.js +8 -0
- package/cells/FilterCells/TreeListNumericFilter.mjs +54 -0
- package/cells/FilterCells/TreeListTextFilter.js +8 -0
- package/cells/FilterCells/TreeListTextFilter.mjs +54 -0
- package/cells/FilterCells/utils.js +8 -0
- package/cells/FilterCells/utils.mjs +59 -0
- package/cells/TreeListCell.js +8 -0
- package/cells/TreeListCell.mjs +184 -0
- package/cells/TreeListSelectionCell.js +8 -0
- package/cells/TreeListSelectionCell.mjs +146 -0
- package/constants/main.js +8 -0
- package/constants/main.mjs +14 -0
- package/dist/cdn/js/kendo-vue-treelist.js +8 -1
- package/index.d.mts +1814 -0
- package/index.d.ts +1814 -0
- package/index.js +8 -0
- package/index.mjs +58 -0
- package/messages/main.js +8 -0
- package/messages/main.mjs +112 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +18 -0
- package/package.json +24 -61
- package/rows/RowDragClue.js +8 -0
- package/rows/RowDragClue.mjs +56 -0
- package/rows/TreeListDraggableRow.js +8 -0
- package/rows/TreeListDraggableRow.mjs +113 -0
- package/rows/TreeListRow.js +8 -0
- package/rows/TreeListRow.mjs +124 -0
- package/utils/data-operations.js +8 -0
- package/utils/data-operations.mjs +103 -0
- package/utils/main.js +8 -0
- package/utils/main.mjs +53 -0
- package/dist/es/ScrollMode.d.ts +0 -1
- package/dist/es/ScrollMode.js +0 -1
- package/dist/es/TreeList.d.ts +0 -56
- package/dist/es/TreeList.js +0 -1289
- package/dist/es/TreeListNav.d.ts +0 -46
- package/dist/es/TreeListNav.js +0 -123
- package/dist/es/additionalTypes.ts +0 -21
- package/dist/es/cells/EditCells/TreeListBooleanEditor.d.ts +0 -49
- package/dist/es/cells/EditCells/TreeListBooleanEditor.js +0 -194
- package/dist/es/cells/EditCells/TreeListDateEditor.d.ts +0 -49
- package/dist/es/cells/EditCells/TreeListDateEditor.js +0 -174
- package/dist/es/cells/EditCells/TreeListNumericEditor.d.ts +0 -49
- package/dist/es/cells/EditCells/TreeListNumericEditor.js +0 -174
- package/dist/es/cells/EditCells/TreeListTextEditor.d.ts +0 -50
- package/dist/es/cells/EditCells/TreeListTextEditor.js +0 -190
- package/dist/es/cells/FilterCells/TreeListBooleanFilter.d.ts +0 -22
- package/dist/es/cells/FilterCells/TreeListBooleanFilter.js +0 -89
- package/dist/es/cells/FilterCells/TreeListDateFilter.d.ts +0 -22
- package/dist/es/cells/FilterCells/TreeListDateFilter.js +0 -89
- package/dist/es/cells/FilterCells/TreeListNumericFilter.d.ts +0 -22
- package/dist/es/cells/FilterCells/TreeListNumericFilter.js +0 -89
- package/dist/es/cells/FilterCells/TreeListTextFilter.d.ts +0 -25
- package/dist/es/cells/FilterCells/TreeListTextFilter.js +0 -89
- package/dist/es/cells/FilterCells/utils.d.ts +0 -38
- package/dist/es/cells/FilterCells/utils.js +0 -66
- package/dist/es/cells/TreeListCell.d.ts +0 -41
- package/dist/es/cells/TreeListCell.js +0 -256
- package/dist/es/cells/TreeListSelectionCell.d.ts +0 -41
- package/dist/es/cells/TreeListSelectionCell.js +0 -181
- package/dist/es/constants/main.d.ts +0 -6
- package/dist/es/constants/main.js +0 -7
- package/dist/es/interfaces/DataItemWrapper.d.ts +0 -10
- package/dist/es/interfaces/DataItemWrapper.js +0 -1
- package/dist/es/interfaces/TreeListCellProps.d.ts +0 -35
- package/dist/es/interfaces/TreeListCellProps.js +0 -1
- package/dist/es/interfaces/TreeListColumnProps.d.ts +0 -33
- package/dist/es/interfaces/TreeListColumnProps.js +0 -1
- package/dist/es/interfaces/TreeListFilterCellProps.d.ts +0 -6
- package/dist/es/interfaces/TreeListFilterCellProps.js +0 -1
- package/dist/es/interfaces/TreeListFilterOperator.d.ts +0 -6
- package/dist/es/interfaces/TreeListFilterOperator.js +0 -1
- package/dist/es/interfaces/TreeListHeaderCellProps.d.ts +0 -6
- package/dist/es/interfaces/TreeListHeaderCellProps.js +0 -1
- package/dist/es/interfaces/TreeListProps.d.ts +0 -345
- package/dist/es/interfaces/TreeListProps.js +0 -1
- package/dist/es/interfaces/TreeListRowProps.d.ts +0 -92
- package/dist/es/interfaces/TreeListRowProps.js +0 -1
- package/dist/es/interfaces/TreeListSelectableSettings.d.ts +0 -18
- package/dist/es/interfaces/TreeListSelectableSettings.js +0 -1
- package/dist/es/interfaces/TreeListSortSettings.d.ts +0 -9
- package/dist/es/interfaces/TreeListSortSettings.js +0 -1
- package/dist/es/interfaces/TreeListToolbarProps.d.ts +0 -5
- package/dist/es/interfaces/TreeListToolbarProps.js +0 -1
- package/dist/es/interfaces/events.d.ts +0 -286
- package/dist/es/interfaces/events.js +0 -1
- package/dist/es/main.d.ts +0 -27
- package/dist/es/main.js +0 -17
- package/dist/es/messages/main.d.ts +0 -239
- package/dist/es/messages/main.js +0 -240
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/rows/RowDragClue.d.ts +0 -40
- package/dist/es/rows/RowDragClue.js +0 -76
- package/dist/es/rows/TreeListDraggableRow.d.ts +0 -38
- package/dist/es/rows/TreeListDraggableRow.js +0 -175
- package/dist/es/rows/TreeListRow.d.ts +0 -36
- package/dist/es/rows/TreeListRow.js +0 -154
- package/dist/es/utils/data-operations.d.ts +0 -115
- package/dist/es/utils/data-operations.js +0 -250
- package/dist/es/utils/main.d.ts +0 -17
- package/dist/es/utils/main.js +0 -68
- package/dist/esm/ScrollMode.d.ts +0 -1
- package/dist/esm/ScrollMode.js +0 -1
- package/dist/esm/TreeList.d.ts +0 -56
- package/dist/esm/TreeList.js +0 -1289
- package/dist/esm/TreeListNav.d.ts +0 -46
- package/dist/esm/TreeListNav.js +0 -123
- package/dist/esm/additionalTypes.ts +0 -21
- package/dist/esm/cells/EditCells/TreeListBooleanEditor.d.ts +0 -49
- package/dist/esm/cells/EditCells/TreeListBooleanEditor.js +0 -194
- package/dist/esm/cells/EditCells/TreeListDateEditor.d.ts +0 -49
- package/dist/esm/cells/EditCells/TreeListDateEditor.js +0 -174
- package/dist/esm/cells/EditCells/TreeListNumericEditor.d.ts +0 -49
- package/dist/esm/cells/EditCells/TreeListNumericEditor.js +0 -174
- package/dist/esm/cells/EditCells/TreeListTextEditor.d.ts +0 -50
- package/dist/esm/cells/EditCells/TreeListTextEditor.js +0 -190
- package/dist/esm/cells/FilterCells/TreeListBooleanFilter.d.ts +0 -22
- package/dist/esm/cells/FilterCells/TreeListBooleanFilter.js +0 -89
- package/dist/esm/cells/FilterCells/TreeListDateFilter.d.ts +0 -22
- package/dist/esm/cells/FilterCells/TreeListDateFilter.js +0 -89
- package/dist/esm/cells/FilterCells/TreeListNumericFilter.d.ts +0 -22
- package/dist/esm/cells/FilterCells/TreeListNumericFilter.js +0 -89
- package/dist/esm/cells/FilterCells/TreeListTextFilter.d.ts +0 -25
- package/dist/esm/cells/FilterCells/TreeListTextFilter.js +0 -89
- package/dist/esm/cells/FilterCells/utils.d.ts +0 -38
- package/dist/esm/cells/FilterCells/utils.js +0 -66
- package/dist/esm/cells/TreeListCell.d.ts +0 -41
- package/dist/esm/cells/TreeListCell.js +0 -256
- package/dist/esm/cells/TreeListSelectionCell.d.ts +0 -41
- package/dist/esm/cells/TreeListSelectionCell.js +0 -181
- package/dist/esm/constants/main.d.ts +0 -6
- package/dist/esm/constants/main.js +0 -7
- package/dist/esm/interfaces/DataItemWrapper.d.ts +0 -10
- package/dist/esm/interfaces/DataItemWrapper.js +0 -1
- package/dist/esm/interfaces/TreeListCellProps.d.ts +0 -35
- package/dist/esm/interfaces/TreeListCellProps.js +0 -1
- package/dist/esm/interfaces/TreeListColumnProps.d.ts +0 -33
- package/dist/esm/interfaces/TreeListColumnProps.js +0 -1
- package/dist/esm/interfaces/TreeListFilterCellProps.d.ts +0 -6
- package/dist/esm/interfaces/TreeListFilterCellProps.js +0 -1
- package/dist/esm/interfaces/TreeListFilterOperator.d.ts +0 -6
- package/dist/esm/interfaces/TreeListFilterOperator.js +0 -1
- package/dist/esm/interfaces/TreeListHeaderCellProps.d.ts +0 -6
- package/dist/esm/interfaces/TreeListHeaderCellProps.js +0 -1
- package/dist/esm/interfaces/TreeListProps.d.ts +0 -345
- package/dist/esm/interfaces/TreeListProps.js +0 -1
- package/dist/esm/interfaces/TreeListRowProps.d.ts +0 -92
- package/dist/esm/interfaces/TreeListRowProps.js +0 -1
- package/dist/esm/interfaces/TreeListSelectableSettings.d.ts +0 -18
- package/dist/esm/interfaces/TreeListSelectableSettings.js +0 -1
- package/dist/esm/interfaces/TreeListSortSettings.d.ts +0 -9
- package/dist/esm/interfaces/TreeListSortSettings.js +0 -1
- package/dist/esm/interfaces/TreeListToolbarProps.d.ts +0 -5
- package/dist/esm/interfaces/TreeListToolbarProps.js +0 -1
- package/dist/esm/interfaces/events.d.ts +0 -286
- package/dist/esm/interfaces/events.js +0 -1
- package/dist/esm/main.d.ts +0 -27
- package/dist/esm/main.js +0 -17
- package/dist/esm/messages/main.d.ts +0 -239
- package/dist/esm/messages/main.js +0 -240
- package/dist/esm/package-metadata.d.ts +0 -5
- package/dist/esm/package-metadata.js +0 -11
- package/dist/esm/package.json +0 -3
- package/dist/esm/rows/RowDragClue.d.ts +0 -40
- package/dist/esm/rows/RowDragClue.js +0 -76
- package/dist/esm/rows/TreeListDraggableRow.d.ts +0 -38
- package/dist/esm/rows/TreeListDraggableRow.js +0 -175
- package/dist/esm/rows/TreeListRow.d.ts +0 -36
- package/dist/esm/rows/TreeListRow.js +0 -154
- package/dist/esm/utils/data-operations.d.ts +0 -115
- package/dist/esm/utils/data-operations.js +0 -250
- package/dist/esm/utils/main.d.ts +0 -17
- package/dist/esm/utils/main.js +0 -68
- package/dist/npm/ScrollMode.d.ts +0 -1
- package/dist/npm/ScrollMode.js +0 -2
- package/dist/npm/TreeList.d.ts +0 -56
- package/dist/npm/TreeList.js +0 -1296
- package/dist/npm/TreeListNav.d.ts +0 -46
- package/dist/npm/TreeListNav.js +0 -130
- package/dist/npm/additionalTypes.ts +0 -21
- package/dist/npm/cells/EditCells/TreeListBooleanEditor.d.ts +0 -49
- package/dist/npm/cells/EditCells/TreeListBooleanEditor.js +0 -201
- package/dist/npm/cells/EditCells/TreeListDateEditor.d.ts +0 -49
- package/dist/npm/cells/EditCells/TreeListDateEditor.js +0 -181
- package/dist/npm/cells/EditCells/TreeListNumericEditor.d.ts +0 -49
- package/dist/npm/cells/EditCells/TreeListNumericEditor.js +0 -181
- package/dist/npm/cells/EditCells/TreeListTextEditor.d.ts +0 -50
- package/dist/npm/cells/EditCells/TreeListTextEditor.js +0 -197
- package/dist/npm/cells/FilterCells/TreeListBooleanFilter.d.ts +0 -22
- package/dist/npm/cells/FilterCells/TreeListBooleanFilter.js +0 -96
- package/dist/npm/cells/FilterCells/TreeListDateFilter.d.ts +0 -22
- package/dist/npm/cells/FilterCells/TreeListDateFilter.js +0 -96
- package/dist/npm/cells/FilterCells/TreeListNumericFilter.d.ts +0 -22
- package/dist/npm/cells/FilterCells/TreeListNumericFilter.js +0 -96
- package/dist/npm/cells/FilterCells/TreeListTextFilter.d.ts +0 -25
- package/dist/npm/cells/FilterCells/TreeListTextFilter.js +0 -96
- package/dist/npm/cells/FilterCells/utils.d.ts +0 -38
- package/dist/npm/cells/FilterCells/utils.js +0 -70
- package/dist/npm/cells/TreeListCell.d.ts +0 -41
- package/dist/npm/cells/TreeListCell.js +0 -263
- package/dist/npm/cells/TreeListSelectionCell.d.ts +0 -41
- package/dist/npm/cells/TreeListSelectionCell.js +0 -188
- package/dist/npm/constants/main.d.ts +0 -6
- package/dist/npm/constants/main.js +0 -10
- package/dist/npm/interfaces/DataItemWrapper.d.ts +0 -10
- package/dist/npm/interfaces/DataItemWrapper.js +0 -2
- package/dist/npm/interfaces/TreeListCellProps.d.ts +0 -35
- package/dist/npm/interfaces/TreeListCellProps.js +0 -2
- package/dist/npm/interfaces/TreeListColumnProps.d.ts +0 -33
- package/dist/npm/interfaces/TreeListColumnProps.js +0 -2
- package/dist/npm/interfaces/TreeListFilterCellProps.d.ts +0 -6
- package/dist/npm/interfaces/TreeListFilterCellProps.js +0 -2
- package/dist/npm/interfaces/TreeListFilterOperator.d.ts +0 -6
- package/dist/npm/interfaces/TreeListFilterOperator.js +0 -2
- package/dist/npm/interfaces/TreeListHeaderCellProps.d.ts +0 -6
- package/dist/npm/interfaces/TreeListHeaderCellProps.js +0 -2
- package/dist/npm/interfaces/TreeListProps.d.ts +0 -345
- package/dist/npm/interfaces/TreeListProps.js +0 -2
- package/dist/npm/interfaces/TreeListRowProps.d.ts +0 -92
- package/dist/npm/interfaces/TreeListRowProps.js +0 -2
- package/dist/npm/interfaces/TreeListSelectableSettings.d.ts +0 -18
- package/dist/npm/interfaces/TreeListSelectableSettings.js +0 -2
- package/dist/npm/interfaces/TreeListSortSettings.d.ts +0 -9
- package/dist/npm/interfaces/TreeListSortSettings.js +0 -2
- package/dist/npm/interfaces/TreeListToolbarProps.d.ts +0 -5
- package/dist/npm/interfaces/TreeListToolbarProps.js +0 -5
- package/dist/npm/interfaces/events.d.ts +0 -286
- package/dist/npm/interfaces/events.js +0 -2
- package/dist/npm/main.d.ts +0 -27
- package/dist/npm/main.js +0 -52
- package/dist/npm/messages/main.d.ts +0 -239
- package/dist/npm/messages/main.js +0 -244
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/rows/RowDragClue.d.ts +0 -40
- package/dist/npm/rows/RowDragClue.js +0 -83
- package/dist/npm/rows/TreeListDraggableRow.d.ts +0 -38
- package/dist/npm/rows/TreeListDraggableRow.js +0 -182
- package/dist/npm/rows/TreeListRow.d.ts +0 -36
- package/dist/npm/rows/TreeListRow.js +0 -161
- package/dist/npm/utils/data-operations.d.ts +0 -115
- package/dist/npm/utils/data-operations.js +0 -265
- package/dist/npm/utils/main.d.ts +0 -17
- package/dist/npm/utils/main.js +0 -74
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { defineComponent as d, createVNode as u, h } from "vue";
|
|
9
|
+
import { getDefaultSlots as c, getTemplate as m } from "@progress/kendo-vue-common";
|
|
10
|
+
const k = /* @__PURE__ */ d({
|
|
11
|
+
name: "KendoTreeListRow",
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
emits: {
|
|
14
|
+
click: null,
|
|
15
|
+
dblclick: null,
|
|
16
|
+
contextmenu: null,
|
|
17
|
+
focus: null,
|
|
18
|
+
blur: null,
|
|
19
|
+
mousedown: null,
|
|
20
|
+
mouseup: null
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
level: Array,
|
|
24
|
+
className: String,
|
|
25
|
+
expanded: Boolean,
|
|
26
|
+
rowIndex: Number,
|
|
27
|
+
levels: Array,
|
|
28
|
+
ariaSetSize: Number,
|
|
29
|
+
ariaPosInSet: Number,
|
|
30
|
+
isSelected: Boolean,
|
|
31
|
+
dataItem: Object,
|
|
32
|
+
isAltRow: Boolean,
|
|
33
|
+
onClick: Function,
|
|
34
|
+
selectedField: String,
|
|
35
|
+
rowHeight: Number,
|
|
36
|
+
ariaRowIndex: Number,
|
|
37
|
+
render: [String, Function, Object]
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
wrapperClass() {
|
|
41
|
+
const {
|
|
42
|
+
isSelected: e,
|
|
43
|
+
isAltRow: t,
|
|
44
|
+
className: l
|
|
45
|
+
} = this.$props;
|
|
46
|
+
return {
|
|
47
|
+
"k-table-row": !0,
|
|
48
|
+
"k-table-alt-row": t,
|
|
49
|
+
"k-master-row": !0,
|
|
50
|
+
"k-selected": e,
|
|
51
|
+
"k-alt": t,
|
|
52
|
+
"k-group-footer": this.dataItem && this.dataItem.footer,
|
|
53
|
+
[l]: l
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
handleClick(e) {
|
|
59
|
+
this.$emit("click", e);
|
|
60
|
+
},
|
|
61
|
+
handleDoubleClick(e) {
|
|
62
|
+
this.$emit("dblclick", e);
|
|
63
|
+
},
|
|
64
|
+
handleContextMenu(e) {
|
|
65
|
+
this.$emit("contextmenu", e);
|
|
66
|
+
},
|
|
67
|
+
handleFocus(e) {
|
|
68
|
+
this.$emit("focus", e);
|
|
69
|
+
},
|
|
70
|
+
handleBlur(e) {
|
|
71
|
+
this.$emit("blur", e);
|
|
72
|
+
},
|
|
73
|
+
handleMousedown(e) {
|
|
74
|
+
this.$emit("mousedown", e);
|
|
75
|
+
},
|
|
76
|
+
handleMouseup(e) {
|
|
77
|
+
this.$emit("mouseup", e);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
render() {
|
|
81
|
+
const e = c(this), {
|
|
82
|
+
rowHeight: t,
|
|
83
|
+
expanded: l,
|
|
84
|
+
ariaRowIndex: o,
|
|
85
|
+
level: n,
|
|
86
|
+
ariaSetSize: i,
|
|
87
|
+
ariaPosInSet: s,
|
|
88
|
+
rowIndex: a
|
|
89
|
+
} = this.$props, r = u("tr", {
|
|
90
|
+
onClick: this.handleClick,
|
|
91
|
+
onDblclick: this.handleDoubleClick,
|
|
92
|
+
onContextmenu: this.handleContextMenu,
|
|
93
|
+
onFocus: this.handleFocus,
|
|
94
|
+
onBlur: this.handleBlur,
|
|
95
|
+
onMousedown: this.handleMousedown,
|
|
96
|
+
onMouseup: this.handleMouseup,
|
|
97
|
+
class: this.wrapperClass,
|
|
98
|
+
style: t !== void 0 ? {
|
|
99
|
+
height: t + "px"
|
|
100
|
+
} : this.$attrs.style,
|
|
101
|
+
"aria-expanded": l,
|
|
102
|
+
role: "row",
|
|
103
|
+
"aria-rowindex": o,
|
|
104
|
+
"aria-level": n.length,
|
|
105
|
+
"aria-posinset": s,
|
|
106
|
+
"aria-setsize": i,
|
|
107
|
+
"data-grid-row-index": a
|
|
108
|
+
}, [e]);
|
|
109
|
+
return m.call(this, {
|
|
110
|
+
h,
|
|
111
|
+
template: this.$props.render,
|
|
112
|
+
defaultRendering: r,
|
|
113
|
+
additionalProps: this.$props,
|
|
114
|
+
additionalListeners: {
|
|
115
|
+
click: this.handleClick
|
|
116
|
+
},
|
|
117
|
+
defaultSlots: e,
|
|
118
|
+
swapDefaultSlots: !0
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export {
|
|
123
|
+
k as TreeListRow
|
|
124
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./main.js"),T=require("@progress/kendo-vue-data-tools"),u=require("@progress/kendo-vue-common");function v(t,e,n){return T.orderBy(t,e,n)}function D(t,e,n){return T.filterBy(t,e,n)}const i=(t,e,n)=>u.mapTree(t,e,n),d=(t,e,n,o)=>u.mapTreeItem(t,e,n,o);function y(t,e,n){let o=[];const r=[];for(let a=t.length-1;a>=0;a--){const c=t[a];o.push({root:c,data:e(c),level:[a],levelCount:t.length})}for(;o.length>0;){let a=o.pop();if(r.push({dataItem:a.root,level:[...a.level],...n(a.root),levelCount:a.levelCount}),a.data.length)for(let c=a.data.length-1;c>=0;c--){const l=a.data[c];o.push({root:l,data:e(l),level:[...a.level,c],levelCount:a.data.length})}}return r}const B=(t,e,n)=>{const o=s=>!!f.getNestedValue(e,s),r=s=>!!f.getNestedValue(n,s),a=s=>{const h=[];return o(s)&&r(s)&&h.push(...f.getNestedValue(n,s)),h},c=(s,h,p)=>{h.push({...s,level:p}),a(s).forEach(g=>c(g,h,p+1))},l=[];return t.forEach(s=>c(s,l,0)),l},C=(t,e,n,o)=>{let r={},a=[],c;return t.forEach(l=>r[e(l)]={...l}),t.forEach(l=>{c=r[n(l)],c?(c[o]=c[o]||[],c[o].push(r[e(l)])):a.push(r[e(l)])}),a},P=(t,e,n)=>u.extendDataItem(t,e,n),x=(t,e,n)=>[...i([{[e]:[...t]}],e,r=>I(r,n,e))[0][e]],I=(t,e,n)=>{const o=t[n]||[],r=o.findIndex(e);if(r!==-1){const a=[...o];return a.splice(r,1),{...t,[n]:a}}return t},V=(t,e,n,o)=>i(t,e,r=>n(r)?{...r,[e]:o(r[e]||[])}:r),m=(t,e,n)=>u.getItemPath(t,e,n),k=(t,e,n,o)=>{const r=[...t],a=m(r,e,o),c=a.pop(),l=a.pop(),s=e[e.length-1];if(n){const p=m(r,n,o).pop();(l?l[o]:r).splice(s,1),p[o]=p[o]||[],p[o].push(c)}else(l?l[o]:r).splice(s,1),r.push(c);return r};exports.createDataTree=C;exports.extendDataItem=P;exports.filterBy=D;exports.flatData=y;exports.getItemPath=m;exports.mapTree=i;exports.mapTreeItem=d;exports.modifySubItems=V;exports.moveTreeItem=k;exports.orderBy=v;exports.removeItems=x;exports.treeToFlat=B;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { getNestedValue as f } from "./main.mjs";
|
|
9
|
+
import { orderBy as i, filterBy as v } from "@progress/kendo-vue-data-tools";
|
|
10
|
+
import { mapTree as T, mapTreeItem as x, extendDataItem as B, getItemPath as D } from "@progress/kendo-vue-common";
|
|
11
|
+
function w(e, t, n) {
|
|
12
|
+
return i(e, t, n);
|
|
13
|
+
}
|
|
14
|
+
function E(e, t, n) {
|
|
15
|
+
return v(e, t, n);
|
|
16
|
+
}
|
|
17
|
+
const m = (e, t, n) => T(e, t, n), d = (e, t, n, o) => x(e, t, n, o);
|
|
18
|
+
function I(e, t, n) {
|
|
19
|
+
let o = [];
|
|
20
|
+
const r = [];
|
|
21
|
+
for (let a = e.length - 1; a >= 0; a--) {
|
|
22
|
+
const c = e[a];
|
|
23
|
+
o.push({
|
|
24
|
+
root: c,
|
|
25
|
+
data: t(c),
|
|
26
|
+
level: [a],
|
|
27
|
+
levelCount: e.length
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
for (; o.length > 0; ) {
|
|
31
|
+
let a = o.pop();
|
|
32
|
+
if (r.push({
|
|
33
|
+
dataItem: a.root,
|
|
34
|
+
level: [...a.level],
|
|
35
|
+
...n(a.root),
|
|
36
|
+
levelCount: a.levelCount
|
|
37
|
+
}), a.data.length)
|
|
38
|
+
for (let c = a.data.length - 1; c >= 0; c--) {
|
|
39
|
+
const h = a.data[c];
|
|
40
|
+
o.push({
|
|
41
|
+
root: h,
|
|
42
|
+
data: t(h),
|
|
43
|
+
level: [...a.level, c],
|
|
44
|
+
levelCount: a.data.length
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return r;
|
|
49
|
+
}
|
|
50
|
+
const k = (e, t, n) => {
|
|
51
|
+
const o = (l) => !!f(t, l), r = (l) => !!f(n, l), a = (l) => {
|
|
52
|
+
const p = [];
|
|
53
|
+
return o(l) && r(l) && p.push(...f(n, l)), p;
|
|
54
|
+
}, c = (l, p, s) => {
|
|
55
|
+
p.push({ ...l, level: s }), a(l).forEach((g) => c(g, p, s + 1));
|
|
56
|
+
}, h = [];
|
|
57
|
+
return e.forEach((l) => c(l, h, 0)), h;
|
|
58
|
+
}, N = (e, t, n, o) => {
|
|
59
|
+
let r = {}, a = [], c;
|
|
60
|
+
return e.forEach((h) => r[t(h)] = { ...h }), e.forEach((h) => {
|
|
61
|
+
c = r[n(h)], c ? (c[o] = c[o] || [], c[o].push(r[t(h)])) : a.push(r[t(h)]);
|
|
62
|
+
}), a;
|
|
63
|
+
}, S = (e, t, n) => B(e, t, n), V = (e, t, n) => [...m(
|
|
64
|
+
[{ [t]: [...e] }],
|
|
65
|
+
t,
|
|
66
|
+
(r) => y(r, n, t)
|
|
67
|
+
)[0][t]], y = (e, t, n) => {
|
|
68
|
+
const o = e[n] || [], r = o.findIndex(t);
|
|
69
|
+
if (r !== -1) {
|
|
70
|
+
const a = [...o];
|
|
71
|
+
return a.splice(r, 1), {
|
|
72
|
+
...e,
|
|
73
|
+
[n]: a
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return e;
|
|
77
|
+
}, j = (e, t, n, o) => m(
|
|
78
|
+
e,
|
|
79
|
+
t,
|
|
80
|
+
(r) => n(r) ? { ...r, [t]: o(r[t] || []) } : r
|
|
81
|
+
), u = (e, t, n) => D(e, t, n), q = (e, t, n, o) => {
|
|
82
|
+
const r = [...e], a = u(r, t, o), c = a.pop(), h = a.pop(), l = t[t.length - 1];
|
|
83
|
+
if (n) {
|
|
84
|
+
const s = u(r, n, o).pop();
|
|
85
|
+
(h ? h[o] : r).splice(l, 1), s[o] = s[o] || [], s[o].push(c);
|
|
86
|
+
} else
|
|
87
|
+
(h ? h[o] : r).splice(l, 1), r.push(c);
|
|
88
|
+
return r;
|
|
89
|
+
};
|
|
90
|
+
export {
|
|
91
|
+
N as createDataTree,
|
|
92
|
+
S as extendDataItem,
|
|
93
|
+
E as filterBy,
|
|
94
|
+
I as flatData,
|
|
95
|
+
u as getItemPath,
|
|
96
|
+
m as mapTree,
|
|
97
|
+
d as mapTreeItem,
|
|
98
|
+
j as modifySubItems,
|
|
99
|
+
q as moveTreeItem,
|
|
100
|
+
w as orderBy,
|
|
101
|
+
V as removeItems,
|
|
102
|
+
k as treeToFlat
|
|
103
|
+
};
|
package/utils/main.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function g(o,e){const r=(o||"").split(".");let n=e;return r.forEach(i=>{n=n?n[i]:void 0}),n}function u(o){return o!==void 0&&(typeof o=="number"||/px$/i.test(String(o)))}function d(o,e,r){const n=Array.from(o.tHead&&o.tHead.rows||[]),i=[e];let h;const a=r||(t=>window.getComputedStyle(t).height||void 0);n.forEach(t=>{let s=a(t);i.push(u(s)?parseFloat(String(s)):t.offsetHeight)});for(let t=0;t<n.length;t++)h=i.slice(0,t+1).reduce((s,l)=>s+l),Array.from(n[t].cells).forEach(s=>s.style.top=h+"px")}const c=1e6;function p(o){const{rows:e,tableViewPortHeight:r,scrollTop:n}=o;if(e.length===0)return[];const i=e[0].height,h=Math.min(Math.round(n/i),e.length),a=Math.round(r/i),t=Math.max(0,h-a),s=Math.min(e.length,h+2*a),l=e.slice(t,s),f=l[l.length-1];return t>0&&l.unshift({dataItem:{},level:[c],offsetTop:0,height:l[0].offsetTop,levelCount:0}),s<e.length-1&&l.push({dataItem:{},level:[c,c],offsetTop:f.offsetTop+f.height,height:(e.length-s)*i,levelCount:0}),l}exports.getNestedValue=g;exports.setHeaderRowsTop=d;exports.tableRowsVirtualization=p;
|
package/utils/main.mjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
function u(o, e) {
|
|
9
|
+
const l = (o || "").split(".");
|
|
10
|
+
let n = e;
|
|
11
|
+
return l.forEach((i) => {
|
|
12
|
+
n = n ? n[i] : void 0;
|
|
13
|
+
}), n;
|
|
14
|
+
}
|
|
15
|
+
function g(o) {
|
|
16
|
+
return o !== void 0 && (typeof o == "number" || /px$/i.test(String(o)));
|
|
17
|
+
}
|
|
18
|
+
function d(o, e, l) {
|
|
19
|
+
const n = Array.from(o.tHead && o.tHead.rows || []), i = [e];
|
|
20
|
+
let r;
|
|
21
|
+
const c = l || ((t) => window.getComputedStyle(t).height || void 0);
|
|
22
|
+
n.forEach((t) => {
|
|
23
|
+
let s = c(t);
|
|
24
|
+
i.push(g(s) ? parseFloat(String(s)) : t.offsetHeight);
|
|
25
|
+
});
|
|
26
|
+
for (let t = 0; t < n.length; t++)
|
|
27
|
+
r = i.slice(0, t + 1).reduce((s, h) => s + h), Array.from(n[t].cells).forEach((s) => s.style.top = r + "px");
|
|
28
|
+
}
|
|
29
|
+
const a = 1e6;
|
|
30
|
+
function p(o) {
|
|
31
|
+
const { rows: e, tableViewPortHeight: l, scrollTop: n } = o;
|
|
32
|
+
if (e.length === 0)
|
|
33
|
+
return [];
|
|
34
|
+
const i = e[0].height, r = Math.min(Math.round(n / i), e.length), c = Math.round(l / i), t = Math.max(0, r - c), s = Math.min(e.length, r + 2 * c), h = e.slice(t, s), f = h[h.length - 1];
|
|
35
|
+
return t > 0 && h.unshift({
|
|
36
|
+
dataItem: {},
|
|
37
|
+
level: [a],
|
|
38
|
+
offsetTop: 0,
|
|
39
|
+
height: h[0].offsetTop,
|
|
40
|
+
levelCount: 0
|
|
41
|
+
}), s < e.length - 1 && h.push({
|
|
42
|
+
dataItem: {},
|
|
43
|
+
level: [a, a],
|
|
44
|
+
offsetTop: f.offsetTop + f.height,
|
|
45
|
+
height: (e.length - s) * i,
|
|
46
|
+
levelCount: 0
|
|
47
|
+
}), h;
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
u as getNestedValue,
|
|
51
|
+
d as setHeaderRowsTop,
|
|
52
|
+
p as tableRowsVirtualization
|
|
53
|
+
};
|
package/dist/es/ScrollMode.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type ScrollMode = 'none' | 'scrollable' | 'virtual';
|
package/dist/es/ScrollMode.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/es/TreeList.d.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type } from './additionalTypes';
|
|
2
|
-
declare type DefaultData<V> = object | ((this: V) => TreeListData);
|
|
3
|
-
declare type DefaultMethods<V> = {
|
|
4
|
-
[key: string]: (this: V, ...args: any[]) => any;
|
|
5
|
-
};
|
|
6
|
-
import { ColumnResize, CommonDragLogic, ExtendedColumnProps } from '@progress/kendo-vue-data-tools';
|
|
7
|
-
import { TreeListProps } from './interfaces/TreeListProps';
|
|
8
|
-
import { DataItemWrapper } from './interfaces/DataItemWrapper';
|
|
9
|
-
import { TreeListColumnProps } from './interfaces/TreeListColumnProps';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export interface TreeListMethods {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @hidden
|
|
18
|
-
*/
|
|
19
|
-
export interface TreeListData {
|
|
20
|
-
wrapperScrollLeft: number;
|
|
21
|
-
wrapperScrollTop: number;
|
|
22
|
-
updateOnScroll: boolean;
|
|
23
|
-
tbodyOffsetTop: number;
|
|
24
|
-
prevData: any[];
|
|
25
|
-
prevColumns: TreeListColumnProps[] | undefined;
|
|
26
|
-
flattedData: DataItemWrapper[];
|
|
27
|
-
extendedColumn: ExtendedColumnProps[];
|
|
28
|
-
columnsMap: number[][];
|
|
29
|
-
columnResize: ColumnResize;
|
|
30
|
-
element: HTMLDivElement | null;
|
|
31
|
-
dragLogic: CommonDragLogic;
|
|
32
|
-
_treeListId: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
*/
|
|
37
|
-
export interface TreeListState {
|
|
38
|
-
v3: boolean;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* @hidden
|
|
42
|
-
*/
|
|
43
|
-
export interface TreeListComputed {
|
|
44
|
-
[key: string]: any;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
export interface TreeListAll extends TreeListMethods, TreeListData, TreeListState, TreeListComputed, TreeListProps, Vue2type {
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @hidden
|
|
53
|
-
*/
|
|
54
|
-
declare let TreeListVue2: ComponentOptions<Vue2type, DefaultData<TreeListData>, DefaultMethods<TreeListAll>, TreeListComputed, RecordPropsDefinition<TreeListProps>>;
|
|
55
|
-
declare const TreeList: DefineComponent<TreeListProps, any, TreeListData, TreeListComputed, TreeListMethods, {}, {}, {}, string, TreeListProps, TreeListProps, {}>;
|
|
56
|
-
export { TreeList, TreeListVue2 };
|