@progress/kendo-vue-treelist 5.3.0-dev.202410141143 → 5.3.0-develop.1

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.
Files changed (263) hide show
  1. package/README.md +26 -34
  2. package/TreeList.js +8 -0
  3. package/TreeList.mjs +722 -0
  4. package/TreeListNav.js +8 -0
  5. package/TreeListNav.mjs +98 -0
  6. package/cells/EditCells/TreeListBooleanEditor.js +8 -0
  7. package/cells/EditCells/TreeListBooleanEditor.mjs +154 -0
  8. package/cells/EditCells/TreeListDateEditor.js +8 -0
  9. package/cells/EditCells/TreeListDateEditor.mjs +140 -0
  10. package/cells/EditCells/TreeListNumericEditor.js +8 -0
  11. package/cells/EditCells/TreeListNumericEditor.mjs +140 -0
  12. package/cells/EditCells/TreeListTextEditor.js +8 -0
  13. package/cells/EditCells/TreeListTextEditor.mjs +157 -0
  14. package/cells/FilterCells/TreeListBooleanFilter.js +8 -0
  15. package/cells/FilterCells/TreeListBooleanFilter.mjs +54 -0
  16. package/cells/FilterCells/TreeListDateFilter.js +8 -0
  17. package/cells/FilterCells/TreeListDateFilter.mjs +54 -0
  18. package/cells/FilterCells/TreeListNumericFilter.js +8 -0
  19. package/cells/FilterCells/TreeListNumericFilter.mjs +54 -0
  20. package/cells/FilterCells/TreeListTextFilter.js +8 -0
  21. package/cells/FilterCells/TreeListTextFilter.mjs +54 -0
  22. package/cells/FilterCells/utils.js +8 -0
  23. package/cells/FilterCells/utils.mjs +59 -0
  24. package/cells/TreeListCell.js +8 -0
  25. package/cells/TreeListCell.mjs +184 -0
  26. package/cells/TreeListSelectionCell.js +8 -0
  27. package/cells/TreeListSelectionCell.mjs +146 -0
  28. package/constants/main.js +8 -0
  29. package/constants/main.mjs +14 -0
  30. package/dist/cdn/js/kendo-vue-treelist.js +8 -1
  31. package/index.d.mts +1814 -0
  32. package/index.d.ts +1814 -0
  33. package/index.js +8 -0
  34. package/index.mjs +58 -0
  35. package/messages/main.js +8 -0
  36. package/messages/main.mjs +112 -0
  37. package/package-metadata.js +8 -0
  38. package/package-metadata.mjs +18 -0
  39. package/package.json +24 -61
  40. package/rows/RowDragClue.js +8 -0
  41. package/rows/RowDragClue.mjs +56 -0
  42. package/rows/TreeListDraggableRow.js +8 -0
  43. package/rows/TreeListDraggableRow.mjs +113 -0
  44. package/rows/TreeListRow.js +8 -0
  45. package/rows/TreeListRow.mjs +124 -0
  46. package/utils/data-operations.js +8 -0
  47. package/utils/data-operations.mjs +103 -0
  48. package/utils/main.js +8 -0
  49. package/utils/main.mjs +53 -0
  50. package/dist/es/ScrollMode.d.ts +0 -1
  51. package/dist/es/ScrollMode.js +0 -1
  52. package/dist/es/TreeList.d.ts +0 -56
  53. package/dist/es/TreeList.js +0 -1289
  54. package/dist/es/TreeListNav.d.ts +0 -46
  55. package/dist/es/TreeListNav.js +0 -123
  56. package/dist/es/additionalTypes.ts +0 -21
  57. package/dist/es/cells/EditCells/TreeListBooleanEditor.d.ts +0 -49
  58. package/dist/es/cells/EditCells/TreeListBooleanEditor.js +0 -194
  59. package/dist/es/cells/EditCells/TreeListDateEditor.d.ts +0 -49
  60. package/dist/es/cells/EditCells/TreeListDateEditor.js +0 -174
  61. package/dist/es/cells/EditCells/TreeListNumericEditor.d.ts +0 -49
  62. package/dist/es/cells/EditCells/TreeListNumericEditor.js +0 -174
  63. package/dist/es/cells/EditCells/TreeListTextEditor.d.ts +0 -50
  64. package/dist/es/cells/EditCells/TreeListTextEditor.js +0 -190
  65. package/dist/es/cells/FilterCells/TreeListBooleanFilter.d.ts +0 -22
  66. package/dist/es/cells/FilterCells/TreeListBooleanFilter.js +0 -89
  67. package/dist/es/cells/FilterCells/TreeListDateFilter.d.ts +0 -22
  68. package/dist/es/cells/FilterCells/TreeListDateFilter.js +0 -89
  69. package/dist/es/cells/FilterCells/TreeListNumericFilter.d.ts +0 -22
  70. package/dist/es/cells/FilterCells/TreeListNumericFilter.js +0 -89
  71. package/dist/es/cells/FilterCells/TreeListTextFilter.d.ts +0 -25
  72. package/dist/es/cells/FilterCells/TreeListTextFilter.js +0 -89
  73. package/dist/es/cells/FilterCells/utils.d.ts +0 -38
  74. package/dist/es/cells/FilterCells/utils.js +0 -66
  75. package/dist/es/cells/TreeListCell.d.ts +0 -41
  76. package/dist/es/cells/TreeListCell.js +0 -256
  77. package/dist/es/cells/TreeListSelectionCell.d.ts +0 -41
  78. package/dist/es/cells/TreeListSelectionCell.js +0 -181
  79. package/dist/es/constants/main.d.ts +0 -6
  80. package/dist/es/constants/main.js +0 -7
  81. package/dist/es/interfaces/DataItemWrapper.d.ts +0 -10
  82. package/dist/es/interfaces/DataItemWrapper.js +0 -1
  83. package/dist/es/interfaces/TreeListCellProps.d.ts +0 -35
  84. package/dist/es/interfaces/TreeListCellProps.js +0 -1
  85. package/dist/es/interfaces/TreeListColumnProps.d.ts +0 -33
  86. package/dist/es/interfaces/TreeListColumnProps.js +0 -1
  87. package/dist/es/interfaces/TreeListFilterCellProps.d.ts +0 -6
  88. package/dist/es/interfaces/TreeListFilterCellProps.js +0 -1
  89. package/dist/es/interfaces/TreeListFilterOperator.d.ts +0 -6
  90. package/dist/es/interfaces/TreeListFilterOperator.js +0 -1
  91. package/dist/es/interfaces/TreeListHeaderCellProps.d.ts +0 -6
  92. package/dist/es/interfaces/TreeListHeaderCellProps.js +0 -1
  93. package/dist/es/interfaces/TreeListProps.d.ts +0 -345
  94. package/dist/es/interfaces/TreeListProps.js +0 -1
  95. package/dist/es/interfaces/TreeListRowProps.d.ts +0 -92
  96. package/dist/es/interfaces/TreeListRowProps.js +0 -1
  97. package/dist/es/interfaces/TreeListSelectableSettings.d.ts +0 -18
  98. package/dist/es/interfaces/TreeListSelectableSettings.js +0 -1
  99. package/dist/es/interfaces/TreeListSortSettings.d.ts +0 -9
  100. package/dist/es/interfaces/TreeListSortSettings.js +0 -1
  101. package/dist/es/interfaces/TreeListToolbarProps.d.ts +0 -5
  102. package/dist/es/interfaces/TreeListToolbarProps.js +0 -1
  103. package/dist/es/interfaces/events.d.ts +0 -286
  104. package/dist/es/interfaces/events.js +0 -1
  105. package/dist/es/main.d.ts +0 -27
  106. package/dist/es/main.js +0 -17
  107. package/dist/es/messages/main.d.ts +0 -239
  108. package/dist/es/messages/main.js +0 -240
  109. package/dist/es/package-metadata.d.ts +0 -5
  110. package/dist/es/package-metadata.js +0 -11
  111. package/dist/es/rows/RowDragClue.d.ts +0 -40
  112. package/dist/es/rows/RowDragClue.js +0 -76
  113. package/dist/es/rows/TreeListDraggableRow.d.ts +0 -38
  114. package/dist/es/rows/TreeListDraggableRow.js +0 -175
  115. package/dist/es/rows/TreeListRow.d.ts +0 -36
  116. package/dist/es/rows/TreeListRow.js +0 -154
  117. package/dist/es/utils/data-operations.d.ts +0 -115
  118. package/dist/es/utils/data-operations.js +0 -250
  119. package/dist/es/utils/main.d.ts +0 -17
  120. package/dist/es/utils/main.js +0 -68
  121. package/dist/esm/ScrollMode.d.ts +0 -1
  122. package/dist/esm/ScrollMode.js +0 -1
  123. package/dist/esm/TreeList.d.ts +0 -56
  124. package/dist/esm/TreeList.js +0 -1289
  125. package/dist/esm/TreeListNav.d.ts +0 -46
  126. package/dist/esm/TreeListNav.js +0 -123
  127. package/dist/esm/additionalTypes.ts +0 -21
  128. package/dist/esm/cells/EditCells/TreeListBooleanEditor.d.ts +0 -49
  129. package/dist/esm/cells/EditCells/TreeListBooleanEditor.js +0 -194
  130. package/dist/esm/cells/EditCells/TreeListDateEditor.d.ts +0 -49
  131. package/dist/esm/cells/EditCells/TreeListDateEditor.js +0 -174
  132. package/dist/esm/cells/EditCells/TreeListNumericEditor.d.ts +0 -49
  133. package/dist/esm/cells/EditCells/TreeListNumericEditor.js +0 -174
  134. package/dist/esm/cells/EditCells/TreeListTextEditor.d.ts +0 -50
  135. package/dist/esm/cells/EditCells/TreeListTextEditor.js +0 -190
  136. package/dist/esm/cells/FilterCells/TreeListBooleanFilter.d.ts +0 -22
  137. package/dist/esm/cells/FilterCells/TreeListBooleanFilter.js +0 -89
  138. package/dist/esm/cells/FilterCells/TreeListDateFilter.d.ts +0 -22
  139. package/dist/esm/cells/FilterCells/TreeListDateFilter.js +0 -89
  140. package/dist/esm/cells/FilterCells/TreeListNumericFilter.d.ts +0 -22
  141. package/dist/esm/cells/FilterCells/TreeListNumericFilter.js +0 -89
  142. package/dist/esm/cells/FilterCells/TreeListTextFilter.d.ts +0 -25
  143. package/dist/esm/cells/FilterCells/TreeListTextFilter.js +0 -89
  144. package/dist/esm/cells/FilterCells/utils.d.ts +0 -38
  145. package/dist/esm/cells/FilterCells/utils.js +0 -66
  146. package/dist/esm/cells/TreeListCell.d.ts +0 -41
  147. package/dist/esm/cells/TreeListCell.js +0 -256
  148. package/dist/esm/cells/TreeListSelectionCell.d.ts +0 -41
  149. package/dist/esm/cells/TreeListSelectionCell.js +0 -181
  150. package/dist/esm/constants/main.d.ts +0 -6
  151. package/dist/esm/constants/main.js +0 -7
  152. package/dist/esm/interfaces/DataItemWrapper.d.ts +0 -10
  153. package/dist/esm/interfaces/DataItemWrapper.js +0 -1
  154. package/dist/esm/interfaces/TreeListCellProps.d.ts +0 -35
  155. package/dist/esm/interfaces/TreeListCellProps.js +0 -1
  156. package/dist/esm/interfaces/TreeListColumnProps.d.ts +0 -33
  157. package/dist/esm/interfaces/TreeListColumnProps.js +0 -1
  158. package/dist/esm/interfaces/TreeListFilterCellProps.d.ts +0 -6
  159. package/dist/esm/interfaces/TreeListFilterCellProps.js +0 -1
  160. package/dist/esm/interfaces/TreeListFilterOperator.d.ts +0 -6
  161. package/dist/esm/interfaces/TreeListFilterOperator.js +0 -1
  162. package/dist/esm/interfaces/TreeListHeaderCellProps.d.ts +0 -6
  163. package/dist/esm/interfaces/TreeListHeaderCellProps.js +0 -1
  164. package/dist/esm/interfaces/TreeListProps.d.ts +0 -345
  165. package/dist/esm/interfaces/TreeListProps.js +0 -1
  166. package/dist/esm/interfaces/TreeListRowProps.d.ts +0 -92
  167. package/dist/esm/interfaces/TreeListRowProps.js +0 -1
  168. package/dist/esm/interfaces/TreeListSelectableSettings.d.ts +0 -18
  169. package/dist/esm/interfaces/TreeListSelectableSettings.js +0 -1
  170. package/dist/esm/interfaces/TreeListSortSettings.d.ts +0 -9
  171. package/dist/esm/interfaces/TreeListSortSettings.js +0 -1
  172. package/dist/esm/interfaces/TreeListToolbarProps.d.ts +0 -5
  173. package/dist/esm/interfaces/TreeListToolbarProps.js +0 -1
  174. package/dist/esm/interfaces/events.d.ts +0 -286
  175. package/dist/esm/interfaces/events.js +0 -1
  176. package/dist/esm/main.d.ts +0 -27
  177. package/dist/esm/main.js +0 -17
  178. package/dist/esm/messages/main.d.ts +0 -239
  179. package/dist/esm/messages/main.js +0 -240
  180. package/dist/esm/package-metadata.d.ts +0 -5
  181. package/dist/esm/package-metadata.js +0 -11
  182. package/dist/esm/package.json +0 -3
  183. package/dist/esm/rows/RowDragClue.d.ts +0 -40
  184. package/dist/esm/rows/RowDragClue.js +0 -76
  185. package/dist/esm/rows/TreeListDraggableRow.d.ts +0 -38
  186. package/dist/esm/rows/TreeListDraggableRow.js +0 -175
  187. package/dist/esm/rows/TreeListRow.d.ts +0 -36
  188. package/dist/esm/rows/TreeListRow.js +0 -154
  189. package/dist/esm/utils/data-operations.d.ts +0 -115
  190. package/dist/esm/utils/data-operations.js +0 -250
  191. package/dist/esm/utils/main.d.ts +0 -17
  192. package/dist/esm/utils/main.js +0 -68
  193. package/dist/npm/ScrollMode.d.ts +0 -1
  194. package/dist/npm/ScrollMode.js +0 -2
  195. package/dist/npm/TreeList.d.ts +0 -56
  196. package/dist/npm/TreeList.js +0 -1296
  197. package/dist/npm/TreeListNav.d.ts +0 -46
  198. package/dist/npm/TreeListNav.js +0 -130
  199. package/dist/npm/additionalTypes.ts +0 -21
  200. package/dist/npm/cells/EditCells/TreeListBooleanEditor.d.ts +0 -49
  201. package/dist/npm/cells/EditCells/TreeListBooleanEditor.js +0 -201
  202. package/dist/npm/cells/EditCells/TreeListDateEditor.d.ts +0 -49
  203. package/dist/npm/cells/EditCells/TreeListDateEditor.js +0 -181
  204. package/dist/npm/cells/EditCells/TreeListNumericEditor.d.ts +0 -49
  205. package/dist/npm/cells/EditCells/TreeListNumericEditor.js +0 -181
  206. package/dist/npm/cells/EditCells/TreeListTextEditor.d.ts +0 -50
  207. package/dist/npm/cells/EditCells/TreeListTextEditor.js +0 -197
  208. package/dist/npm/cells/FilterCells/TreeListBooleanFilter.d.ts +0 -22
  209. package/dist/npm/cells/FilterCells/TreeListBooleanFilter.js +0 -96
  210. package/dist/npm/cells/FilterCells/TreeListDateFilter.d.ts +0 -22
  211. package/dist/npm/cells/FilterCells/TreeListDateFilter.js +0 -96
  212. package/dist/npm/cells/FilterCells/TreeListNumericFilter.d.ts +0 -22
  213. package/dist/npm/cells/FilterCells/TreeListNumericFilter.js +0 -96
  214. package/dist/npm/cells/FilterCells/TreeListTextFilter.d.ts +0 -25
  215. package/dist/npm/cells/FilterCells/TreeListTextFilter.js +0 -96
  216. package/dist/npm/cells/FilterCells/utils.d.ts +0 -38
  217. package/dist/npm/cells/FilterCells/utils.js +0 -70
  218. package/dist/npm/cells/TreeListCell.d.ts +0 -41
  219. package/dist/npm/cells/TreeListCell.js +0 -263
  220. package/dist/npm/cells/TreeListSelectionCell.d.ts +0 -41
  221. package/dist/npm/cells/TreeListSelectionCell.js +0 -188
  222. package/dist/npm/constants/main.d.ts +0 -6
  223. package/dist/npm/constants/main.js +0 -10
  224. package/dist/npm/interfaces/DataItemWrapper.d.ts +0 -10
  225. package/dist/npm/interfaces/DataItemWrapper.js +0 -2
  226. package/dist/npm/interfaces/TreeListCellProps.d.ts +0 -35
  227. package/dist/npm/interfaces/TreeListCellProps.js +0 -2
  228. package/dist/npm/interfaces/TreeListColumnProps.d.ts +0 -33
  229. package/dist/npm/interfaces/TreeListColumnProps.js +0 -2
  230. package/dist/npm/interfaces/TreeListFilterCellProps.d.ts +0 -6
  231. package/dist/npm/interfaces/TreeListFilterCellProps.js +0 -2
  232. package/dist/npm/interfaces/TreeListFilterOperator.d.ts +0 -6
  233. package/dist/npm/interfaces/TreeListFilterOperator.js +0 -2
  234. package/dist/npm/interfaces/TreeListHeaderCellProps.d.ts +0 -6
  235. package/dist/npm/interfaces/TreeListHeaderCellProps.js +0 -2
  236. package/dist/npm/interfaces/TreeListProps.d.ts +0 -345
  237. package/dist/npm/interfaces/TreeListProps.js +0 -2
  238. package/dist/npm/interfaces/TreeListRowProps.d.ts +0 -92
  239. package/dist/npm/interfaces/TreeListRowProps.js +0 -2
  240. package/dist/npm/interfaces/TreeListSelectableSettings.d.ts +0 -18
  241. package/dist/npm/interfaces/TreeListSelectableSettings.js +0 -2
  242. package/dist/npm/interfaces/TreeListSortSettings.d.ts +0 -9
  243. package/dist/npm/interfaces/TreeListSortSettings.js +0 -2
  244. package/dist/npm/interfaces/TreeListToolbarProps.d.ts +0 -5
  245. package/dist/npm/interfaces/TreeListToolbarProps.js +0 -5
  246. package/dist/npm/interfaces/events.d.ts +0 -286
  247. package/dist/npm/interfaces/events.js +0 -2
  248. package/dist/npm/main.d.ts +0 -27
  249. package/dist/npm/main.js +0 -52
  250. package/dist/npm/messages/main.d.ts +0 -239
  251. package/dist/npm/messages/main.js +0 -244
  252. package/dist/npm/package-metadata.d.ts +0 -5
  253. package/dist/npm/package-metadata.js +0 -14
  254. package/dist/npm/rows/RowDragClue.d.ts +0 -40
  255. package/dist/npm/rows/RowDragClue.js +0 -83
  256. package/dist/npm/rows/TreeListDraggableRow.d.ts +0 -38
  257. package/dist/npm/rows/TreeListDraggableRow.js +0 -182
  258. package/dist/npm/rows/TreeListRow.d.ts +0 -36
  259. package/dist/npm/rows/TreeListRow.js +0 -161
  260. package/dist/npm/utils/data-operations.d.ts +0 -115
  261. package/dist/npm/utils/data-operations.js +0 -265
  262. package/dist/npm/utils/main.d.ts +0 -17
  263. package/dist/npm/utils/main.js +0 -74
@@ -1,161 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.TreeListRowVue2 = exports.TreeListRow = void 0;
7
- // @ts-ignore
8
- var Vue = require("vue");
9
- var allVue = Vue;
10
- var gh = allVue.h;
11
- var isV3 = allVue.version && allVue.version[0] === '3';
12
- var kendo_vue_common_1 = require("@progress/kendo-vue-common");
13
- /**
14
- * @hidden
15
- */
16
- var TreeListRowVue2 = {
17
- name: 'KendoTreeListRow',
18
- inheritAttrs: false,
19
- // @ts-ignore
20
- emits: {
21
- 'click': null,
22
- 'dblclick': null,
23
- 'contextmenu': null,
24
- 'focus': null,
25
- 'blur': null,
26
- 'mousedown': null,
27
- 'mouseup': null
28
- },
29
- props: {
30
- level: Array,
31
- className: String,
32
- expanded: Boolean,
33
- rowIndex: Number,
34
- levels: Array,
35
- ariaSetSize: Number,
36
- ariaPosInSet: Number,
37
- isSelected: Boolean,
38
- dataItem: Object,
39
- isAltRow: Boolean,
40
- onClick: Function,
41
- selectedField: String,
42
- rowHeight: Number,
43
- ariaRowIndex: Number,
44
- render: [String, Function, Object]
45
- },
46
- computed: {
47
- wrapperClass: function wrapperClass() {
48
- var _a;
49
- var _b = this.$props,
50
- isSelected = _b.isSelected,
51
- isAltRow = _b.isAltRow,
52
- className = _b.className;
53
- return _a = {
54
- 'k-table-row': true,
55
- 'k-table-alt-row': isAltRow,
56
- 'k-master-row': true,
57
- 'k-selected': isSelected,
58
- 'k-alt': isAltRow,
59
- 'k-group-footer': this.dataItem && this.dataItem.footer
60
- }, _a[className] = className, _a;
61
- }
62
- },
63
- methods: {
64
- handleClick: function handleClick(e) {
65
- this.$emit('click', e);
66
- },
67
- handleDoubleClick: function handleDoubleClick(e) {
68
- this.$emit('dblclick', e);
69
- },
70
- handleContextMenu: function handleContextMenu(e) {
71
- this.$emit('contextmenu', e);
72
- },
73
- handleFocus: function handleFocus(e) {
74
- this.$emit('focus', e);
75
- },
76
- handleBlur: function handleBlur(e) {
77
- this.$emit('blur', e);
78
- },
79
- handleMousedown: function handleMousedown(e) {
80
- this.$emit('mousedown', e);
81
- },
82
- handleMouseup: function handleMouseup(e) {
83
- this.$emit('mouseup', e);
84
- }
85
- },
86
- // @ts-ignore
87
- setup: !isV3 ? undefined : function () {
88
- var v3 = !!isV3;
89
- return {
90
- v3: v3
91
- };
92
- },
93
- // @ts-ignore
94
- render: function render(createElement) {
95
- var h = gh || createElement;
96
- var defaultSlot = (0, kendo_vue_common_1.getDefaultSlots)(this);
97
- var _a = this.$props,
98
- rowHeight = _a.rowHeight,
99
- expanded = _a.expanded,
100
- ariaRowIndex = _a.ariaRowIndex,
101
- level = _a.level,
102
- ariaSetSize = _a.ariaSetSize,
103
- ariaPosInSet = _a.ariaPosInSet,
104
- rowIndex = _a.rowIndex;
105
- var defaultRendering = h("tr", {
106
- onClick: this.handleClick,
107
- on: this.v3 ? undefined : {
108
- "click": this.handleClick,
109
- "dblclick": this.handleDoubleClick,
110
- "contextmenu": this.handleContextMenu,
111
- "focus": this.handleFocus,
112
- "blur": this.handleBlur,
113
- "mousedown": this.handleMousedown,
114
- "mouseup": this.handleMouseup
115
- },
116
- onDblclick: this.handleDoubleClick,
117
- onContextmenu: this.handleContextMenu,
118
- onFocus: this.handleFocus,
119
- onBlur: this.handleBlur,
120
- onMousedown: this.handleMousedown,
121
- onMouseup: this.handleMouseup,
122
- "class": this.wrapperClass,
123
- style: rowHeight !== undefined ? {
124
- height: rowHeight + 'px'
125
- } : this.$attrs.style,
126
- "aria-expanded": expanded,
127
- attrs: this.v3 ? undefined : {
128
- "aria-expanded": expanded,
129
- role: 'row',
130
- "aria-rowindex": ariaRowIndex,
131
- "aria-level": level.length,
132
- "aria-posinset": ariaPosInSet,
133
- "aria-setsize": ariaSetSize,
134
- "data-grid-row-index": rowIndex
135
- },
136
- role: 'row',
137
- "aria-rowindex": ariaRowIndex,
138
- "aria-level": level.length,
139
- "aria-posinset": ariaPosInSet,
140
- "aria-setsize": ariaSetSize,
141
- "data-grid-row-index": rowIndex
142
- }, [defaultSlot]);
143
- return kendo_vue_common_1.getTemplate.call(this, {
144
- h: h,
145
- template: this.$props.render,
146
- defaultRendering: defaultRendering,
147
- additionalProps: this.$props,
148
- additionalListeners: {
149
- click: this.handleClick
150
- },
151
- defaultSlots: defaultSlot,
152
- swapDefaultSlots: true
153
- });
154
- }
155
- };
156
- exports.TreeListRowVue2 = TreeListRowVue2;
157
- /**
158
- * @hidden
159
- */
160
- var TreeListRow = TreeListRowVue2;
161
- exports.TreeListRow = TreeListRow;
@@ -1,115 +0,0 @@
1
- import { SortDescriptor, FilterDescriptor, CompositeFilterDescriptor } from '@progress/kendo-data-query';
2
- import { DataItemWrapper } from '../interfaces/DataItemWrapper';
3
- /**
4
- * Orders the specified tree according to the provided sort descriptors.
5
- *
6
- * @param {T[]} data - The data that will be sorted.
7
- * @param {SortDescriptor[]} descriptors - The descriptors by which the data will be sorted.
8
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
9
- * @returns {T[]} - The sorted data.
10
- */
11
- export declare function orderBy(data: any[], descriptors: SortDescriptor[], subItemsField: string): any[];
12
- /**
13
- * Filters the provided data tree according to the specified `Array<FilterDescriptor|CompositeFilterDescriptor>`.
14
- *
15
- * @param {T[]} data - The data that will be filtered.
16
- * @param {FilterDescriptor[]|CompositeFilterDescriptor[]} descriptors - The filter criteria that will be applied.
17
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
18
- * @returns {T[]} - The filtered data.
19
- */
20
- export declare function filterBy(data: any[], descriptors: FilterDescriptor[] | CompositeFilterDescriptor[], subItemsField: string): any[];
21
- /**
22
- * Creates a new array with the results of calling the provided callback function
23
- * on every element in the provided data tree.
24
- *
25
- * @param {any[]} tree - The data tree.
26
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
27
- * @param {(value: any) => any} callback - The callback function.
28
- * @returns {any[]} - The new data tree.
29
- */
30
- export declare const mapTree: (tree: any[], subItemsField: string, callback: (value: any) => any) => any[];
31
- /**
32
- * Creates a new array with the results of calling the provided callback function
33
- * on the element which match the `level` in the provided data tree.
34
- *
35
- * @param {any[]} tree - The data tree.
36
- * @param {number[]} level - An array of indexes of each parent and current item in the data tree.
37
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
38
- * @param {(value: any) => any} callback - The callback function.
39
- * @returns {any[]} - The new data tree.
40
- */
41
- export declare const mapTreeItem: (tree: any[], level: number[], subItemsField: string, callback: (value: any) => any) => void;
42
- /**
43
- * @hidden
44
- */
45
- export declare function flatData(data: any[], getChildren: (dataItem: any) => any[], itemMap: (item: any) => any): DataItemWrapper[];
46
- /**
47
- * Creates a flat data array from the passed tree dataset.
48
- *
49
- * @param {object[]} dataset - The source dataset of data items.
50
- * @param {string} expandField - The field which points to the expanded value of each data item.
51
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
52
- * @returns {object[]} - A collection of the generated data items that are in a flat structure.
53
- */
54
- export declare const treeToFlat: (data: any[], expandField: string, subItemsField: string) => any[];
55
- /**
56
- * Creates a tree from the passed dataset.
57
- *
58
- * @param {object[]} dataset - The source dataset of data items.
59
- * @param {(item: object) => any} getId - A function which will return the id of the data item.
60
- * @param {(item: object) => any} getParentId - A function which will return the data item id of its parent data item.
61
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
62
- * @returns {object[]} - A collection of the generated data items that are structured in a tree.
63
- */
64
- export declare const createDataTree: (dataset: any[], getId: (item: any) => any, getParentId: (item: any) => any, subItemsField: string) => any[];
65
- /**
66
- * Similar to the `Object.assign` function. Additionally, creates a new array for the subitems.
67
- *
68
- * @param {object} item - The source data item.
69
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
70
- * @param {object} propsToExtend - The props with which the source data item will be extended.
71
- * @returns {object} - The target data item.
72
- */
73
- export declare const extendDataItem: (item: any, subItemsField: string, propsToExtend?: any) => any;
74
- /**
75
- * Removes the items from the passed `data` which match the passed `condition`.
76
- *
77
- * @param {any[]} data - The data tree.
78
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
79
- * @param {(item: object) => Boolean} condition - A function that will be executed for each data item
80
- * in the tree data and the items for which returns true will be removed.
81
- * @returns {any[]} - The new data tree.
82
- */
83
- export declare const removeItems: (data: any, subItemsField: any, condition: any) => any[];
84
- /**
85
- * Changes the `subItems` collection of each data item which matches the passed `condition`.
86
- *
87
- * @param {any[]} data - The data tree.
88
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
89
- * @param {(item: object) => Boolean} condition - A function that will be executed for each data item and
90
- * will return `true` for items that have to change the subitems collection.
91
- * @param {(subItems: object[]) => object[]} change - A function which
92
- * has as a parameter the subitems collection of the matched items and which will return the new subitems collection.
93
- * @returns {any[]} - The new data tree.
94
- */
95
- export declare const modifySubItems: (data: any, subItemsField: any, condition: any, change: any) => any[];
96
- /**
97
- * Returns the data item path in the tree based on the level parameter.
98
- *
99
- * @param {any[]} tree - The data tree.
100
- * @param {number[]} level - The level of the target tree item.
101
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
102
- * @returns {any[]} - The path of the data item.
103
- */
104
- export declare const getItemPath: (tree: any[], level: number[], subItemsField?: string) => any[];
105
- /**
106
- * Moves the targeted item in the tree to another position.
107
- *
108
- * @param {any[]} data - The data tree.
109
- * @param {number[]} target - The level of the target tree item which will be moved.
110
- * @param {number[] | null} destination - The level of the destination tree item where the target item will be moved in.
111
- * If it is null, the target item will be added at the root level.
112
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
113
- * @returns {any[]} - The new data tree.
114
- */
115
- export declare const moveTreeItem: (data: any[], target: number[], destination: number[] | null, subItemsField: string) => any[];
@@ -1,265 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.moveTreeItem = exports.getItemPath = exports.modifySubItems = exports.removeItems = exports.extendDataItem = exports.createDataTree = exports.treeToFlat = exports.flatData = exports.mapTreeItem = exports.mapTree = exports.filterBy = exports.orderBy = void 0;
24
- var main_1 = require("./main");
25
- var kendo_vue_data_tools_1 = require("@progress/kendo-vue-data-tools");
26
- var kendo_vue_common_1 = require("@progress/kendo-vue-common");
27
- /**
28
- * Orders the specified tree according to the provided sort descriptors.
29
- *
30
- * @param {T[]} data - The data that will be sorted.
31
- * @param {SortDescriptor[]} descriptors - The descriptors by which the data will be sorted.
32
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
33
- * @returns {T[]} - The sorted data.
34
- */
35
- function orderBy(data, descriptors, subItemsField) {
36
- return (0, kendo_vue_data_tools_1.orderBy)(data, descriptors, subItemsField);
37
- }
38
- exports.orderBy = orderBy;
39
- /**
40
- * Filters the provided data tree according to the specified `Array<FilterDescriptor|CompositeFilterDescriptor>`.
41
- *
42
- * @param {T[]} data - The data that will be filtered.
43
- * @param {FilterDescriptor[]|CompositeFilterDescriptor[]} descriptors - The filter criteria that will be applied.
44
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
45
- * @returns {T[]} - The filtered data.
46
- */
47
- function filterBy(data, descriptors, subItemsField) {
48
- return (0, kendo_vue_data_tools_1.filterBy)(data, descriptors, subItemsField);
49
- }
50
- exports.filterBy = filterBy;
51
- /**
52
- * Creates a new array with the results of calling the provided callback function
53
- * on every element in the provided data tree.
54
- *
55
- * @param {any[]} tree - The data tree.
56
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
57
- * @param {(value: any) => any} callback - The callback function.
58
- * @returns {any[]} - The new data tree.
59
- */
60
- var mapTree = function (tree, subItemsField, callback) {
61
- return (0, kendo_vue_common_1.mapTree)(tree, subItemsField, callback);
62
- };
63
- exports.mapTree = mapTree;
64
- /**
65
- * Creates a new array with the results of calling the provided callback function
66
- * on the element which match the `level` in the provided data tree.
67
- *
68
- * @param {any[]} tree - The data tree.
69
- * @param {number[]} level - An array of indexes of each parent and current item in the data tree.
70
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
71
- * @param {(value: any) => any} callback - The callback function.
72
- * @returns {any[]} - The new data tree.
73
- */
74
- var mapTreeItem = function (tree, level, subItemsField, callback) {
75
- return (0, kendo_vue_common_1.mapTreeItem)(tree, level, subItemsField, callback);
76
- };
77
- exports.mapTreeItem = mapTreeItem;
78
- /**
79
- * @hidden
80
- */
81
- function flatData(data, getChildren, itemMap) {
82
- var stack = [];
83
- var flatted = [];
84
- // we start from end as push() improves performance by up to 50%
85
- for (var i = data.length - 1; i >= 0; i--) {
86
- var root = data[i];
87
- stack.push({
88
- root: root,
89
- data: getChildren(root),
90
- level: [i],
91
- levelCount: data.length
92
- });
93
- }
94
- while (stack.length > 0) {
95
- var stackItem = stack.pop();
96
- flatted.push(__assign(__assign({ dataItem: stackItem.root, level: __spreadArray([], stackItem.level, true) }, itemMap(stackItem.root)), { levelCount: stackItem.levelCount }));
97
- if (stackItem.data.length) {
98
- for (var i = stackItem.data.length - 1; i >= 0; i--) {
99
- var root = stackItem.data[i];
100
- stack.push({
101
- root: root,
102
- data: getChildren(root),
103
- level: __spreadArray(__spreadArray([], stackItem.level, true), [i], false),
104
- levelCount: stackItem.data.length
105
- });
106
- }
107
- }
108
- }
109
- return flatted;
110
- }
111
- exports.flatData = flatData;
112
- /**
113
- * Creates a flat data array from the passed tree dataset.
114
- *
115
- * @param {object[]} dataset - The source dataset of data items.
116
- * @param {string} expandField - The field which points to the expanded value of each data item.
117
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
118
- * @returns {object[]} - A collection of the generated data items that are in a flat structure.
119
- */
120
- var treeToFlat = function (data, expandField, subItemsField) {
121
- var expanded = function (dataItem) { return Boolean((0, main_1.getNestedValue)(expandField, dataItem)); };
122
- var hasChildren = function (dataItem) { return Boolean((0, main_1.getNestedValue)(subItemsField, dataItem)); };
123
- var getChildren = function (dataItem) {
124
- var items = [];
125
- if (expanded(dataItem) && hasChildren(dataItem)) {
126
- items.push.apply(items, (0, main_1.getNestedValue)(subItemsField, dataItem));
127
- }
128
- return items;
129
- };
130
- var flatItems = function (dataItem, flatted, level) {
131
- flatted.push(__assign(__assign({}, dataItem), { level: level }));
132
- getChildren(dataItem).forEach(function (root) { return flatItems(root, flatted, level + 1); });
133
- };
134
- var flattedData = [];
135
- data.forEach(function (root) { return flatItems(root, flattedData, 0); });
136
- return flattedData;
137
- };
138
- exports.treeToFlat = treeToFlat;
139
- /**
140
- * Creates a tree from the passed dataset.
141
- *
142
- * @param {object[]} dataset - The source dataset of data items.
143
- * @param {(item: object) => any} getId - A function which will return the id of the data item.
144
- * @param {(item: object) => any} getParentId - A function which will return the data item id of its parent data item.
145
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
146
- * @returns {object[]} - A collection of the generated data items that are structured in a tree.
147
- */
148
- var createDataTree = function (dataset, getId, getParentId, subItemsField) {
149
- var hashTable = {}, dataTree = [], parentItem;
150
- dataset.forEach(function (dataItem) { return hashTable[getId(dataItem)] = __assign({}, dataItem); });
151
- dataset.forEach(function (dataItem) {
152
- parentItem = hashTable[getParentId(dataItem)];
153
- if (parentItem) {
154
- parentItem[subItemsField] = parentItem[subItemsField] || [];
155
- parentItem[subItemsField].push(hashTable[getId(dataItem)]);
156
- }
157
- else {
158
- dataTree.push(hashTable[getId(dataItem)]);
159
- }
160
- });
161
- return dataTree;
162
- };
163
- exports.createDataTree = createDataTree;
164
- /**
165
- * Similar to the `Object.assign` function. Additionally, creates a new array for the subitems.
166
- *
167
- * @param {object} item - The source data item.
168
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
169
- * @param {object} propsToExtend - The props with which the source data item will be extended.
170
- * @returns {object} - The target data item.
171
- */
172
- var extendDataItem = function (item, subItemsField, propsToExtend) {
173
- return (0, kendo_vue_common_1.extendDataItem)(item, subItemsField, propsToExtend);
174
- };
175
- exports.extendDataItem = extendDataItem;
176
- /**
177
- * Removes the items from the passed `data` which match the passed `condition`.
178
- *
179
- * @param {any[]} data - The data tree.
180
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
181
- * @param {(item: object) => Boolean} condition - A function that will be executed for each data item
182
- * in the tree data and the items for which returns true will be removed.
183
- * @returns {any[]} - The new data tree.
184
- */
185
- var removeItems = function (data, subItemsField, condition) {
186
- var _a;
187
- var newData = (0, exports.mapTree)([(_a = {}, _a[subItemsField] = __spreadArray([], data, true), _a)], subItemsField, function (item) { return removeChild(item, condition, subItemsField); });
188
- return __spreadArray([], newData[0][subItemsField], true);
189
- };
190
- exports.removeItems = removeItems;
191
- /**
192
- * @hidden
193
- */
194
- var removeChild = function (item, condition, subItemsField) {
195
- var _a;
196
- var subItems = item[subItemsField] || [];
197
- var childIndex = subItems.findIndex(condition);
198
- if (childIndex !== -1) {
199
- var newChildren = __spreadArray([], subItems, true);
200
- newChildren.splice(childIndex, 1);
201
- return __assign(__assign({}, item), (_a = {}, _a[subItemsField] = newChildren, _a));
202
- }
203
- return item;
204
- };
205
- /**
206
- * Changes the `subItems` collection of each data item which matches the passed `condition`.
207
- *
208
- * @param {any[]} data - The data tree.
209
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
210
- * @param {(item: object) => Boolean} condition - A function that will be executed for each data item and
211
- * will return `true` for items that have to change the subitems collection.
212
- * @param {(subItems: object[]) => object[]} change - A function which
213
- * has as a parameter the subitems collection of the matched items and which will return the new subitems collection.
214
- * @returns {any[]} - The new data tree.
215
- */
216
- var modifySubItems = function (data, subItemsField, condition, change) {
217
- return (0, exports.mapTree)(data, subItemsField, function (item) {
218
- var _a;
219
- return condition(item) ? __assign(__assign({}, item), (_a = {}, _a[subItemsField] = change(item[subItemsField] || []), _a)) :
220
- item;
221
- });
222
- };
223
- exports.modifySubItems = modifySubItems;
224
- /**
225
- * Returns the data item path in the tree based on the level parameter.
226
- *
227
- * @param {any[]} tree - The data tree.
228
- * @param {number[]} level - The level of the target tree item.
229
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
230
- * @returns {any[]} - The path of the data item.
231
- */
232
- var getItemPath = function (tree, level, subItemsField) {
233
- return (0, kendo_vue_common_1.getItemPath)(tree, level, subItemsField);
234
- };
235
- exports.getItemPath = getItemPath;
236
- /**
237
- * Moves the targeted item in the tree to another position.
238
- *
239
- * @param {any[]} data - The data tree.
240
- * @param {number[]} target - The level of the target tree item which will be moved.
241
- * @param {number[] | null} destination - The level of the destination tree item where the target item will be moved in.
242
- * If it is null, the target item will be added at the root level.
243
- * @param {string} subItemsField - The field which points to the subitems collection of each data item.
244
- * @returns {any[]} - The new data tree.
245
- */
246
- var moveTreeItem = function (data, target, destination, subItemsField) {
247
- var tree = __spreadArray([], data, true);
248
- var targetItemPath = (0, exports.getItemPath)(tree, target, subItemsField);
249
- var targetItem = targetItemPath.pop();
250
- var targetParent = targetItemPath.pop();
251
- var targetItemIndex = target[target.length - 1];
252
- if (destination) {
253
- var destinationItemPath = (0, exports.getItemPath)(tree, destination, subItemsField);
254
- var destinationItem = destinationItemPath.pop();
255
- (targetParent ? targetParent[subItemsField] : tree).splice(targetItemIndex, 1);
256
- destinationItem[subItemsField] = destinationItem[subItemsField] || [];
257
- destinationItem[subItemsField].push(targetItem);
258
- }
259
- else {
260
- (targetParent ? targetParent[subItemsField] : tree).splice(targetItemIndex, 1);
261
- tree.push(targetItem);
262
- }
263
- return tree;
264
- };
265
- exports.moveTreeItem = moveTreeItem;
@@ -1,17 +0,0 @@
1
- import { DataItemWrapper } from '../interfaces/DataItemWrapper';
2
- /**
3
- * @hidden
4
- */
5
- export declare function getNestedValue(fieldName: string | undefined, dataItem: any): any;
6
- /**
7
- * @hidden
8
- */
9
- export declare function setHeaderRowsTop(table: HTMLTableElement, toolbarHeight: number, rowHeight?: (row: HTMLTableRowElement) => string | undefined): void;
10
- /**
11
- * @hidden
12
- */
13
- export declare function tableRowsVirtualization(args: {
14
- rows: DataItemWrapper[];
15
- tableViewPortHeight: number;
16
- scrollTop: number;
17
- }): DataItemWrapper[];
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tableRowsVirtualization = exports.setHeaderRowsTop = exports.getNestedValue = void 0;
4
- /**
5
- * @hidden
6
- */
7
- function getNestedValue(fieldName, dataItem) {
8
- var path = (fieldName || '').split('.');
9
- var data = dataItem;
10
- path.forEach(function (p) {
11
- data = data ? data[p] : undefined;
12
- });
13
- return data;
14
- }
15
- exports.getNestedValue = getNestedValue;
16
- function inPX(value) {
17
- return value !== undefined && (typeof value === 'number' || /px$/i.test(String(value)));
18
- }
19
- /**
20
- * @hidden
21
- */
22
- function setHeaderRowsTop(table, toolbarHeight, rowHeight) {
23
- var rows = Array.from(table.tHead && table.tHead.rows || []);
24
- var heights = [toolbarHeight];
25
- var height;
26
- var calculateRowHeight = rowHeight ||
27
- (function (row) { return window.getComputedStyle(row).height || undefined; });
28
- rows.forEach(function (row) {
29
- var computedHeight = calculateRowHeight(row);
30
- heights.push(inPX(computedHeight) ? parseFloat(String(computedHeight)) : row.offsetHeight);
31
- });
32
- for (var i = 0; i < rows.length; i++) {
33
- height = heights.slice(0, i + 1).reduce(function (acc, curr) { return acc + curr; });
34
- Array.from(rows[i].cells).forEach(function (c) { return c.style.top = height + 'px'; });
35
- }
36
- }
37
- exports.setHeaderRowsTop = setHeaderRowsTop;
38
- var MAX_LEVEL = 1000000;
39
- /**
40
- * @hidden
41
- */
42
- function tableRowsVirtualization(args) {
43
- var rows = args.rows, tableViewPortHeight = args.tableViewPortHeight, scrollTop = args.scrollTop;
44
- if (rows.length === 0) {
45
- return [];
46
- }
47
- var itemHeight = rows[0].height;
48
- var scrollItemIndex = Math.min(Math.round(scrollTop / itemHeight), rows.length);
49
- var itemsOnOneScreen = Math.round(tableViewPortHeight / itemHeight);
50
- var start = Math.max(0, scrollItemIndex - itemsOnOneScreen);
51
- var end = Math.min(rows.length, scrollItemIndex + (2 * itemsOnOneScreen));
52
- var items = rows.slice(start, end);
53
- var lastItem = items[items.length - 1];
54
- if (start > 0) {
55
- items.unshift({
56
- dataItem: {},
57
- level: [MAX_LEVEL],
58
- offsetTop: 0,
59
- height: items[0].offsetTop,
60
- levelCount: 0
61
- });
62
- }
63
- if (end < rows.length - 1) {
64
- items.push({
65
- dataItem: {},
66
- level: [MAX_LEVEL, MAX_LEVEL],
67
- offsetTop: lastItem.offsetTop + lastItem.height,
68
- height: (rows.length - end) * itemHeight,
69
- levelCount: 0
70
- });
71
- }
72
- return items;
73
- }
74
- exports.tableRowsVirtualization = tableRowsVirtualization;