@progress/kendo-angular-treeview 6.0.2-dev.202202251428 → 7.0.0-dev.202204131935

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 (328) hide show
  1. package/bundles/kendo-angular-treeview.umd.js +5 -0
  2. package/{dist/es2015/check-mode.d.ts → check-mode.d.ts} +0 -0
  3. package/{dist/es2015/check.directive.d.ts → check.directive.d.ts} +5 -2
  4. package/{dist/es2015/checkable-settings.d.ts → checkable-settings.d.ts} +0 -0
  5. package/{dist/es2015/checkbox → checkbox}/checkbox.component.d.ts +7 -4
  6. package/{dist/es2015/checkbox → checkbox}/checkbox.module.d.ts +5 -0
  7. package/{dist/es2015/checkbox → checkbox}/checked-state.d.ts +0 -0
  8. package/{dist/es2015/data-bound-component.d.ts → data-bound-component.d.ts} +3 -0
  9. package/{dist/es2015/data-change-notification.service.d.ts → data-change-notification.service.d.ts} +0 -0
  10. package/{dist/es2015/default-callbacks.d.ts → default-callbacks.d.ts} +0 -0
  11. package/{dist/es2015/disable.directive.d.ts → disable.directive.d.ts} +4 -1
  12. package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-and-drop-editing.directive.d.ts +4 -1
  13. package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-and-drop-utils.d.ts +0 -0
  14. package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-and-drop.directive.d.ts +4 -1
  15. package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-clue/drag-clue-template.directive.d.ts +3 -0
  16. package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-clue/drag-clue.component.d.ts +4 -1
  17. package/{dist/es2015/drag-and-drop → drag-and-drop}/drag-clue/drag-clue.service.d.ts +3 -0
  18. package/{dist/es2015/drag-and-drop → drag-and-drop}/drop-hint/drop-hint-template.directive.d.ts +3 -0
  19. package/{dist/es2015/drag-and-drop → drag-and-drop}/drop-hint/drop-hint.component.d.ts +3 -0
  20. package/{dist/es2015/drag-and-drop → drag-and-drop}/drop-hint/drop-hint.service.d.ts +3 -0
  21. package/{dist/es2015/drag-and-drop → drag-and-drop}/editing-services/drag-and-drop-asset.service.d.ts +6 -2
  22. package/{dist/es2015/drag-and-drop → drag-and-drop}/editing-services/flat-editing.service.d.ts +0 -0
  23. package/{dist/es2015/drag-and-drop → drag-and-drop}/editing-services/hierarchy-editing.service.d.ts +0 -0
  24. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/drop-action.d.ts +0 -0
  25. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/drop-position.d.ts +0 -0
  26. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/editing-service.d.ts +0 -0
  27. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/preventable-event.d.ts +0 -0
  28. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/scroll-direction.d.ts +0 -0
  29. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/scroll-settings.d.ts +0 -0
  30. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/tree-item-filter-state.d.ts +0 -0
  31. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-add-remove-args.d.ts +0 -0
  32. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-drag-event.d.ts +2 -0
  33. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-drag-start-event.d.ts +0 -0
  34. package/{dist/es2015/drag-and-drop → drag-and-drop}/models/treeitem-drop-event.d.ts +0 -0
  35. package/{dist/es2015/drag-and-drop → drag-and-drop}/models.d.ts +0 -0
  36. package/{dist/es2015 → esm2015}/check-mode.js +1 -0
  37. package/{dist/es2015 → esm2015}/check.directive.js +23 -35
  38. package/{dist/es → esm2015}/checkable-settings.js +1 -0
  39. package/{dist/es2015 → esm2015}/checkbox/checkbox.component.js +47 -51
  40. package/esm2015/checkbox/checkbox.module.js +27 -0
  41. package/{dist/es2015 → esm2015}/checkbox/checked-state.js +1 -0
  42. package/esm2015/data-bound-component.js +19 -0
  43. package/{dist/es2015 → esm2015}/data-change-notification.service.js +0 -0
  44. package/{dist/es2015 → esm2015}/default-callbacks.js +0 -0
  45. package/{dist/es2015 → esm2015}/disable.directive.js +18 -24
  46. package/{dist/es2015 → esm2015}/drag-and-drop/drag-and-drop-editing.directive.js +14 -16
  47. package/{dist/es2015 → esm2015}/drag-and-drop/drag-and-drop-utils.js +7 -11
  48. package/{dist/es2015 → esm2015}/drag-and-drop/drag-and-drop.directive.js +48 -51
  49. package/{dist/es2015 → esm2015}/drag-and-drop/drag-clue/drag-clue-template.directive.js +14 -12
  50. package/esm2015/drag-and-drop/drag-clue/drag-clue.component.js +85 -0
  51. package/{dist/es2015 → esm2015}/drag-and-drop/drag-clue/drag-clue.service.js +9 -9
  52. package/{dist/es2015 → esm2015}/drag-and-drop/drop-hint/drop-hint-template.directive.js +14 -12
  53. package/esm2015/drag-and-drop/drop-hint/drop-hint.component.js +79 -0
  54. package/{dist/es2015 → esm2015}/drag-and-drop/drop-hint/drop-hint.service.js +9 -9
  55. package/{dist/es2015 → esm2015}/drag-and-drop/editing-services/drag-and-drop-asset.service.js +7 -0
  56. package/{dist/es2015 → esm2015}/drag-and-drop/editing-services/flat-editing.service.js +0 -0
  57. package/{dist/es2015 → esm2015}/drag-and-drop/editing-services/hierarchy-editing.service.js +0 -0
  58. package/{dist/es → esm2015}/drag-and-drop/models/drop-action.js +0 -0
  59. package/{dist/es → esm2015}/drag-and-drop/models/drop-position.js +0 -0
  60. package/{dist/es2015 → esm2015}/drag-and-drop/models/editing-service.js +1 -0
  61. package/{dist/es2015 → esm2015}/drag-and-drop/models/preventable-event.js +0 -0
  62. package/{dist/es → esm2015}/drag-and-drop/models/scroll-direction.js +0 -0
  63. package/{dist/es → esm2015}/drag-and-drop/models/scroll-settings.js +1 -0
  64. package/{dist/es → esm2015}/drag-and-drop/models/tree-item-filter-state.js +1 -0
  65. package/{dist/es → esm2015}/drag-and-drop/models/treeitem-add-remove-args.js +1 -0
  66. package/{dist/es2015 → esm2015}/drag-and-drop/models/treeitem-drag-event.js +2 -0
  67. package/{dist/es2015 → esm2015}/drag-and-drop/models/treeitem-drag-start-event.js +0 -0
  68. package/{dist/es2015 → esm2015}/drag-and-drop/models/treeitem-drop-event.js +0 -0
  69. package/{dist/es → esm2015}/drag-and-drop/models.js +3 -0
  70. package/{dist/es2015 → esm2015}/expand-state.service.js +8 -10
  71. package/{dist/es2015 → esm2015}/expand.directive.js +22 -31
  72. package/esm2015/expandable-component.js +19 -0
  73. package/{dist/es → esm2015}/filter-expand-settings.interface.js +1 -0
  74. package/{dist/es → esm2015}/filter-state.interface.js +1 -0
  75. package/{dist/es2015 → esm2015}/filtering-base.js +13 -13
  76. package/{dist/es2015 → esm2015}/flat-binding.directive.js +20 -34
  77. package/{dist/es2015 → esm2015}/funcs.js +0 -0
  78. package/{dist/es2015 → esm2015}/hierarchy-binding.directive.js +23 -33
  79. package/{dist/es2015 → esm2015}/index-builder.service.js +8 -10
  80. package/{dist/es2015/shared.module.d.ts → esm2015/kendo-angular-treeview.js} +2 -3
  81. package/esm2015/load-more/load-more-button-template.directive.js +31 -0
  82. package/{dist/es → esm2015}/load-more/load-more-request-args.js +1 -0
  83. package/{dist/es2015 → esm2015}/load-more/load-more-utils.js +0 -0
  84. package/{dist/es2015 → esm2015}/load-more/load-more.directive.js +21 -28
  85. package/{dist/es → esm2015}/load-more/load-more.service.js +1 -0
  86. package/{dist/es2015 → esm2015}/loading-indicator.directive.js +18 -22
  87. package/esm2015/loading-notification.service.js +23 -0
  88. package/{dist/es → esm2015}/main.js +0 -0
  89. package/{dist/es → esm2015}/navigation/navigation-item.interface.js +1 -0
  90. package/{dist/es2015 → esm2015}/navigation/navigation-model.js +0 -4
  91. package/{dist/es → esm2015}/navigation/navigation-state.interface.js +1 -0
  92. package/{dist/es2015 → esm2015}/navigation/navigation.service.js +9 -9
  93. package/{dist/es2015 → esm2015}/node-children.service.js +8 -10
  94. package/{dist/es → esm2015}/node-click-event.interface.js +1 -0
  95. package/{dist/es2015 → esm2015}/node-template.directive.js +14 -12
  96. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  97. package/{dist/es2015 → esm2015}/selection/select.directive.js +25 -35
  98. package/{dist/es → esm2015}/selection/selectable-settings.js +1 -0
  99. package/{dist/es → esm2015}/selection/selection-mode.js +1 -0
  100. package/{dist/es2015 → esm2015}/selection/selection.service.js +8 -10
  101. package/{dist/es2015 → esm2015}/shared.module.js +63 -16
  102. package/{dist/es → esm2015}/size.js +1 -0
  103. package/{dist/es → esm2015}/treeitem-lookup.interface.js +1 -0
  104. package/{dist/es → esm2015}/treeitem.interface.js +1 -0
  105. package/{dist/es2015 → esm2015}/treeview-filter-settings.js +0 -0
  106. package/{dist/es2015 → esm2015}/treeview-group.component.js +264 -135
  107. package/{dist/es2015 → esm2015}/treeview-item-content.directive.js +20 -30
  108. package/{dist/es2015 → esm2015}/treeview-item.directive.js +43 -81
  109. package/{dist/es2015 → esm2015}/treeview-lookup.service.js +8 -10
  110. package/{dist/es2015 → esm2015}/treeview.component.js +173 -213
  111. package/{dist/es2015 → esm2015}/treeview.module.js +26 -10
  112. package/{dist/es2015 → esm2015}/utils.js +6 -12
  113. package/{dist/es2015/expand-state.service.d.ts → expand-state.service.d.ts} +3 -0
  114. package/{dist/es2015/expand.directive.d.ts → expand.directive.d.ts} +5 -2
  115. package/{dist/es2015/expandable-component.d.ts → expandable-component.d.ts} +3 -0
  116. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-treeview.js} +3415 -3313
  117. package/{dist/es2015/filter-expand-settings.interface.d.ts → filter-expand-settings.interface.d.ts} +0 -0
  118. package/{dist/es2015/filter-state.interface.d.ts → filter-state.interface.d.ts} +0 -0
  119. package/{dist/es2015/filtering-base.d.ts → filtering-base.d.ts} +6 -2
  120. package/{dist/es2015/flat-binding.directive.d.ts → flat-binding.directive.d.ts} +5 -2
  121. package/{dist/es2015/funcs.d.ts → funcs.d.ts} +0 -0
  122. package/{dist/es2015/hierarchy-binding.directive.d.ts → hierarchy-binding.directive.d.ts} +10 -6
  123. package/{dist/es2015/index-builder.service.d.ts → index-builder.service.d.ts} +3 -0
  124. package/{dist/es/treeview-filter-settings.js → kendo-angular-treeview.d.ts} +3 -6
  125. package/{dist/es2015/load-more → load-more}/load-more-button-template.directive.d.ts +3 -0
  126. package/{dist/es2015/load-more → load-more}/load-more-request-args.d.ts +0 -0
  127. package/{dist/es2015/load-more → load-more}/load-more-utils.d.ts +0 -0
  128. package/{dist/es2015/load-more → load-more}/load-more.directive.d.ts +4 -1
  129. package/{dist/es2015/load-more → load-more}/load-more.service.d.ts +0 -0
  130. package/{dist/es2015/loading-indicator.directive.d.ts → loading-indicator.directive.d.ts} +5 -1
  131. package/{dist/es2015/loading-notification.service.d.ts → loading-notification.service.d.ts} +3 -0
  132. package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
  133. package/{dist/es2015/navigation → navigation}/navigation-item.interface.d.ts +0 -0
  134. package/{dist/es2015/navigation → navigation}/navigation-model.d.ts +0 -0
  135. package/{dist/es2015/navigation → navigation}/navigation-state.interface.d.ts +0 -0
  136. package/{dist/es2015/navigation → navigation}/navigation.service.d.ts +9 -5
  137. package/{dist/es2015/node-children.service.d.ts → node-children.service.d.ts} +3 -0
  138. package/{dist/es2015/node-click-event.interface.d.ts → node-click-event.interface.d.ts} +0 -0
  139. package/{dist/es2015/node-template.directive.d.ts → node-template.directive.d.ts} +3 -0
  140. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  141. package/package.json +36 -104
  142. package/schematics/ngAdd/index.js +5 -2
  143. package/schematics/ngAdd/index.js.map +1 -1
  144. package/{dist/es2015/selection → selection}/select.directive.d.ts +6 -3
  145. package/{dist/es2015/selection → selection}/selectable-settings.d.ts +0 -0
  146. package/{dist/es2015/selection → selection}/selection-mode.d.ts +0 -0
  147. package/{dist/es2015/selection → selection}/selection.service.d.ts +3 -0
  148. package/shared.module.d.ts +36 -0
  149. package/size.d.ts +8 -0
  150. package/{dist/es2015/treeitem-lookup.interface.d.ts → treeitem-lookup.interface.d.ts} +0 -0
  151. package/{dist/es2015/treeitem.interface.d.ts → treeitem.interface.d.ts} +0 -0
  152. package/{dist/es2015/treeview-filter-settings.d.ts → treeview-filter-settings.d.ts} +0 -0
  153. package/{dist/es2015/treeview-group.component.d.ts → treeview-group.component.d.ts} +16 -7
  154. package/{dist/es2015/treeview-item-content.directive.d.ts → treeview-item-content.directive.d.ts} +3 -0
  155. package/{dist/es2015/treeview-item.directive.d.ts → treeview-item.directive.d.ts} +11 -6
  156. package/{dist/es2015/treeview-lookup.service.d.ts → treeview-lookup.service.d.ts} +3 -0
  157. package/{dist/es2015/treeview.component.d.ts → treeview.component.d.ts} +26 -15
  158. package/treeview.module.d.ts +28 -0
  159. package/{dist/es2015/utils.d.ts → utils.d.ts} +1 -1
  160. package/dist/cdn/js/kendo-angular-treeview.js +0 -20
  161. package/dist/cdn/main.js +0 -5
  162. package/dist/es/check-mode.js +0 -4
  163. package/dist/es/check.directive.js +0 -282
  164. package/dist/es/checkbox/checkbox.component.js +0 -127
  165. package/dist/es/checkbox/checkbox.module.js +0 -27
  166. package/dist/es/checkbox/checked-state.js +0 -4
  167. package/dist/es/data-bound-component.js +0 -21
  168. package/dist/es/data-change-notification.service.js +0 -18
  169. package/dist/es/default-callbacks.js +0 -32
  170. package/dist/es/disable.directive.js +0 -71
  171. package/dist/es/drag-and-drop/drag-and-drop-editing.directive.js +0 -65
  172. package/dist/es/drag-and-drop/drag-and-drop-utils.js +0 -274
  173. package/dist/es/drag-and-drop/drag-and-drop.directive.js +0 -334
  174. package/dist/es/drag-and-drop/drag-clue/drag-clue-template.directive.js +0 -34
  175. package/dist/es/drag-and-drop/drag-clue/drag-clue.component.js +0 -54
  176. package/dist/es/drag-and-drop/drag-clue/drag-clue.service.js +0 -132
  177. package/dist/es/drag-and-drop/drop-hint/drop-hint-template.directive.js +0 -31
  178. package/dist/es/drag-and-drop/drop-hint/drop-hint.component.js +0 -43
  179. package/dist/es/drag-and-drop/drop-hint/drop-hint.service.js +0 -46
  180. package/dist/es/drag-and-drop/editing-services/drag-and-drop-asset.service.js +0 -53
  181. package/dist/es/drag-and-drop/editing-services/flat-editing.service.js +0 -145
  182. package/dist/es/drag-and-drop/editing-services/hierarchy-editing.service.js +0 -90
  183. package/dist/es/drag-and-drop/models/editing-service.js +0 -4
  184. package/dist/es/drag-and-drop/models/preventable-event.js +0 -29
  185. package/dist/es/drag-and-drop/models/treeitem-drag-event.js +0 -14
  186. package/dist/es/drag-and-drop/models/treeitem-drag-start-event.js +0 -22
  187. package/dist/es/drag-and-drop/models/treeitem-drop-event.js +0 -36
  188. package/dist/es/expand-state.service.js +0 -26
  189. package/dist/es/expand.directive.js +0 -219
  190. package/dist/es/expandable-component.js +0 -21
  191. package/dist/es/filtering-base.js +0 -95
  192. package/dist/es/flat-binding.directive.js +0 -151
  193. package/dist/es/funcs.js +0 -15
  194. package/dist/es/hierarchy-binding.directive.js +0 -152
  195. package/dist/es/index-builder.service.js +0 -38
  196. package/dist/es/index.js +0 -30
  197. package/dist/es/load-more/load-more-button-template.directive.js +0 -30
  198. package/dist/es/load-more/load-more-utils.js +0 -35
  199. package/dist/es/load-more/load-more.directive.js +0 -114
  200. package/dist/es/loading-indicator.directive.js +0 -76
  201. package/dist/es/loading-notification.service.js +0 -23
  202. package/dist/es/navigation/navigation-model.js +0 -162
  203. package/dist/es/navigation/navigation.service.js +0 -243
  204. package/dist/es/node-children.service.js +0 -23
  205. package/dist/es/node-template.directive.js +0 -74
  206. package/dist/es/package-metadata.js +0 -15
  207. package/dist/es/selection/select.directive.js +0 -152
  208. package/dist/es/selection/selection.service.js +0 -34
  209. package/dist/es/shared.module.js +0 -75
  210. package/dist/es/treeview-group.component.js +0 -393
  211. package/dist/es/treeview-item-content.directive.js +0 -85
  212. package/dist/es/treeview-item.directive.js +0 -306
  213. package/dist/es/treeview-lookup.service.js +0 -93
  214. package/dist/es/treeview.component.js +0 -853
  215. package/dist/es/treeview.module.js +0 -52
  216. package/dist/es/utils.js +0 -311
  217. package/dist/es2015/checkable-settings.js +0 -4
  218. package/dist/es2015/checkbox/checkbox.module.js +0 -24
  219. package/dist/es2015/data-bound-component.js +0 -18
  220. package/dist/es2015/drag-and-drop/drag-clue/drag-clue.component.js +0 -66
  221. package/dist/es2015/drag-and-drop/drop-hint/drop-hint.component.js +0 -61
  222. package/dist/es2015/drag-and-drop/models/drop-action.js +0 -17
  223. package/dist/es2015/drag-and-drop/models/drop-position.js +0 -13
  224. package/dist/es2015/drag-and-drop/models/scroll-direction.js +0 -12
  225. package/dist/es2015/drag-and-drop/models/scroll-settings.js +0 -4
  226. package/dist/es2015/drag-and-drop/models/tree-item-filter-state.js +0 -4
  227. package/dist/es2015/drag-and-drop/models/treeitem-add-remove-args.js +0 -4
  228. package/dist/es2015/drag-and-drop/models.js +0 -11
  229. package/dist/es2015/expandable-component.js +0 -18
  230. package/dist/es2015/filter-expand-settings.interface.js +0 -4
  231. package/dist/es2015/filter-state.interface.js +0 -4
  232. package/dist/es2015/index.d.ts +0 -30
  233. package/dist/es2015/index.js +0 -30
  234. package/dist/es2015/index.metadata.json +0 -1
  235. package/dist/es2015/load-more/load-more-button-template.directive.js +0 -29
  236. package/dist/es2015/load-more/load-more-request-args.js +0 -4
  237. package/dist/es2015/load-more/load-more.service.js +0 -4
  238. package/dist/es2015/loading-notification.service.js +0 -25
  239. package/dist/es2015/main.js +0 -26
  240. package/dist/es2015/navigation/navigation-item.interface.js +0 -4
  241. package/dist/es2015/navigation/navigation-state.interface.js +0 -4
  242. package/dist/es2015/node-click-event.interface.js +0 -4
  243. package/dist/es2015/selection/selectable-settings.js +0 -4
  244. package/dist/es2015/selection/selection-mode.js +0 -4
  245. package/dist/es2015/size.d.ts +0 -14
  246. package/dist/es2015/size.js +0 -4
  247. package/dist/es2015/treeitem-lookup.interface.js +0 -4
  248. package/dist/es2015/treeitem.interface.js +0 -4
  249. package/dist/es2015/treeview.module.d.ts +0 -9
  250. package/dist/fesm5/index.js +0 -5426
  251. package/dist/npm/check-mode.js +0 -6
  252. package/dist/npm/check.directive.js +0 -285
  253. package/dist/npm/checkable-settings.js +0 -6
  254. package/dist/npm/checkbox/checkbox.component.js +0 -129
  255. package/dist/npm/checkbox/checkbox.module.js +0 -29
  256. package/dist/npm/checkbox/checked-state.js +0 -6
  257. package/dist/npm/data-bound-component.js +0 -23
  258. package/dist/npm/data-change-notification.service.js +0 -20
  259. package/dist/npm/default-callbacks.js +0 -34
  260. package/dist/npm/disable.directive.js +0 -73
  261. package/dist/npm/drag-and-drop/drag-and-drop-editing.directive.js +0 -67
  262. package/dist/npm/drag-and-drop/drag-and-drop-utils.js +0 -278
  263. package/dist/npm/drag-and-drop/drag-and-drop.directive.js +0 -336
  264. package/dist/npm/drag-and-drop/drag-clue/drag-clue-template.directive.js +0 -36
  265. package/dist/npm/drag-and-drop/drag-clue/drag-clue.component.js +0 -56
  266. package/dist/npm/drag-and-drop/drag-clue/drag-clue.service.js +0 -134
  267. package/dist/npm/drag-and-drop/drop-hint/drop-hint-template.directive.js +0 -33
  268. package/dist/npm/drag-and-drop/drop-hint/drop-hint.component.js +0 -45
  269. package/dist/npm/drag-and-drop/drop-hint/drop-hint.service.js +0 -48
  270. package/dist/npm/drag-and-drop/editing-services/drag-and-drop-asset.service.js +0 -55
  271. package/dist/npm/drag-and-drop/editing-services/flat-editing.service.js +0 -147
  272. package/dist/npm/drag-and-drop/editing-services/hierarchy-editing.service.js +0 -92
  273. package/dist/npm/drag-and-drop/models/drop-action.js +0 -19
  274. package/dist/npm/drag-and-drop/models/drop-position.js +0 -15
  275. package/dist/npm/drag-and-drop/models/editing-service.js +0 -6
  276. package/dist/npm/drag-and-drop/models/preventable-event.js +0 -31
  277. package/dist/npm/drag-and-drop/models/scroll-direction.js +0 -14
  278. package/dist/npm/drag-and-drop/models/scroll-settings.js +0 -6
  279. package/dist/npm/drag-and-drop/models/tree-item-filter-state.js +0 -6
  280. package/dist/npm/drag-and-drop/models/treeitem-add-remove-args.js +0 -6
  281. package/dist/npm/drag-and-drop/models/treeitem-drag-event.js +0 -16
  282. package/dist/npm/drag-and-drop/models/treeitem-drag-start-event.js +0 -24
  283. package/dist/npm/drag-and-drop/models/treeitem-drop-event.js +0 -38
  284. package/dist/npm/drag-and-drop/models.js +0 -14
  285. package/dist/npm/expand-state.service.js +0 -28
  286. package/dist/npm/expand.directive.js +0 -221
  287. package/dist/npm/expandable-component.js +0 -23
  288. package/dist/npm/filter-expand-settings.interface.js +0 -6
  289. package/dist/npm/filter-state.interface.js +0 -6
  290. package/dist/npm/filtering-base.js +0 -97
  291. package/dist/npm/flat-binding.directive.js +0 -154
  292. package/dist/npm/funcs.js +0 -17
  293. package/dist/npm/hierarchy-binding.directive.js +0 -154
  294. package/dist/npm/index-builder.service.js +0 -40
  295. package/dist/npm/index.js +0 -55
  296. package/dist/npm/load-more/load-more-button-template.directive.js +0 -32
  297. package/dist/npm/load-more/load-more-request-args.js +0 -6
  298. package/dist/npm/load-more/load-more-utils.js +0 -37
  299. package/dist/npm/load-more/load-more.directive.js +0 -116
  300. package/dist/npm/load-more/load-more.service.js +0 -6
  301. package/dist/npm/loading-indicator.directive.js +0 -78
  302. package/dist/npm/loading-notification.service.js +0 -25
  303. package/dist/npm/main.js +0 -50
  304. package/dist/npm/navigation/navigation-item.interface.js +0 -6
  305. package/dist/npm/navigation/navigation-model.js +0 -166
  306. package/dist/npm/navigation/navigation-state.interface.js +0 -6
  307. package/dist/npm/navigation/navigation.service.js +0 -245
  308. package/dist/npm/node-children.service.js +0 -25
  309. package/dist/npm/node-click-event.interface.js +0 -6
  310. package/dist/npm/node-template.directive.js +0 -76
  311. package/dist/npm/package-metadata.js +0 -17
  312. package/dist/npm/selection/select.directive.js +0 -154
  313. package/dist/npm/selection/selectable-settings.js +0 -6
  314. package/dist/npm/selection/selection-mode.js +0 -6
  315. package/dist/npm/selection/selection.service.js +0 -36
  316. package/dist/npm/shared.module.js +0 -77
  317. package/dist/npm/size.js +0 -6
  318. package/dist/npm/treeitem-lookup.interface.js +0 -6
  319. package/dist/npm/treeitem.interface.js +0 -6
  320. package/dist/npm/treeview-filter-settings.js +0 -14
  321. package/dist/npm/treeview-group.component.js +0 -395
  322. package/dist/npm/treeview-item-content.directive.js +0 -87
  323. package/dist/npm/treeview-item.directive.js +0 -308
  324. package/dist/npm/treeview-lookup.service.js +0 -95
  325. package/dist/npm/treeview.component.js +0 -855
  326. package/dist/npm/treeview.module.js +0 -54
  327. package/dist/npm/utils.js +0 -322
  328. package/dist/systemjs/kendo-angular-treeview.js +0 -5
@@ -1,54 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Component, HostBinding, ChangeDetectorRef, ChangeDetectionStrategy } from "@angular/core";
7
- import { DropAction } from '../models';
8
- /**
9
- * @hidden
10
- */
11
- var DragClueComponent = /** @class */ (function () {
12
- function DragClueComponent(cdr) {
13
- this.cdr = cdr;
14
- this.hostClasses = true;
15
- this.posistionStyle = 'fixed';
16
- }
17
- Object.defineProperty(DragClueComponent.prototype, "statusIconClass", {
18
- get: function () {
19
- switch (this.action) {
20
- case DropAction.Add: return 'k-i-plus';
21
- case DropAction.InsertTop: return 'k-i-insert-up';
22
- case DropAction.InsertBottom: return 'k-i-insert-down';
23
- case DropAction.InsertMiddle: return 'k-i-insert-middle';
24
- case DropAction.Invalid:
25
- default: return 'k-i-cancel';
26
- }
27
- },
28
- enumerable: true,
29
- configurable: true
30
- });
31
- // exposed as a public method that can be called from outside as the component uses `OnPush` strategy
32
- DragClueComponent.prototype.detectChanges = function () {
33
- this.cdr.detectChanges();
34
- };
35
- tslib_1.__decorate([
36
- HostBinding('class.k-header'),
37
- HostBinding('class.k-drag-clue'),
38
- tslib_1.__metadata("design:type", Boolean)
39
- ], DragClueComponent.prototype, "hostClasses", void 0);
40
- tslib_1.__decorate([
41
- HostBinding('style.position'),
42
- tslib_1.__metadata("design:type", String)
43
- ], DragClueComponent.prototype, "posistionStyle", void 0);
44
- DragClueComponent = tslib_1.__decorate([
45
- Component({
46
- changeDetection: ChangeDetectionStrategy.OnPush,
47
- selector: 'kendo-treeview-drag-clue',
48
- template: "\n <ng-container *ngIf=\"!template\">\n <span class=\"k-icon {{statusIconClass}} k-drag-status\"></span>\n <span>{{text}}</span>\n </ng-container>\n\n <ng-template\n *ngIf=\"template\"\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n text: text,\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }\"\n >\n </ng-template>\n "
49
- }),
50
- tslib_1.__metadata("design:paramtypes", [ChangeDetectorRef])
51
- ], DragClueComponent);
52
- return DragClueComponent;
53
- }());
54
- export { DragClueComponent };
@@ -1,132 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Injectable, ComponentFactoryResolver } from '@angular/core';
7
- import { DragClueComponent } from './drag-clue.component';
8
- import { ScrollDirection } from '../models';
9
- import { isPresent, dataItemsEqual } from '../../utils';
10
- import { DragAndDropAssetService } from '../editing-services/drag-and-drop-asset.service';
11
- import { scrollElementBy, getScrollableContainer } from '../drag-and-drop-utils';
12
- /**
13
- * @hidden
14
- */
15
- export var CLUE_OFFSET = 10;
16
- /**
17
- * @hidden
18
- */
19
- export var RETURN_ANIMATION_DURATION = 200;
20
- /**
21
- * @hidden
22
- */
23
- var DragClueService = /** @class */ (function (_super) {
24
- tslib_1.__extends(DragClueService, _super);
25
- function DragClueService(componentFactoryResolver) {
26
- var _this = _super.call(this) || this;
27
- _this.componentFactoryResolver = componentFactoryResolver;
28
- return _this;
29
- }
30
- DragClueService.prototype.initialize = function (container, template) {
31
- if (isPresent(this._componentRef)) {
32
- this.ngOnDestroy();
33
- }
34
- var clueComponentFactory = this.componentFactoryResolver.resolveComponentFactory(DragClueComponent);
35
- this.componentRef = container.createComponent(clueComponentFactory);
36
- this.hide();
37
- this.componentRef.instance.template = template;
38
- this.componentRef.changeDetectorRef.detectChanges();
39
- };
40
- DragClueService.prototype.ngOnDestroy = function () {
41
- this.cancelReturnAnimation();
42
- this.cancelScroll();
43
- _super.prototype.ngOnDestroy.call(this);
44
- };
45
- DragClueService.prototype.move = function (left, top) {
46
- _super.prototype.move.call(this, left, top, CLUE_OFFSET);
47
- };
48
- DragClueService.prototype.animateDragClueToElementPosition = function (target) {
49
- var _this = this;
50
- if (!(isPresent(target) && isPresent(this.element.animate))) {
51
- this.hide();
52
- return;
53
- }
54
- var targetElementViewPortCoords = target.getBoundingClientRect();
55
- var clueElementViewPortCoords = this.element.getBoundingClientRect();
56
- this.returnAnimation = this.element.animate([
57
- { transform: 'translate(0, 0)' },
58
- { transform: "translate(" + (targetElementViewPortCoords.left - clueElementViewPortCoords.left) + "px, " + (targetElementViewPortCoords.top - clueElementViewPortCoords.top) + "px)" }
59
- ], RETURN_ANIMATION_DURATION);
60
- this.returnAnimation.onfinish = function () { return _this.hide(); };
61
- };
62
- DragClueService.prototype.cancelReturnAnimation = function () {
63
- if (!isPresent(this.returnAnimation)) {
64
- return;
65
- }
66
- this.returnAnimation.cancel();
67
- this.returnAnimation = null;
68
- };
69
- DragClueService.prototype.updateDragClueData = function (action, sourceItem, destinationItem) {
70
- var dragClue = this.componentRef.instance;
71
- if (action === dragClue.action && dataItemsEqual(sourceItem, dragClue.sourceItem) && dataItemsEqual(destinationItem, dragClue.destinationItem)) {
72
- return;
73
- }
74
- dragClue.action = action;
75
- dragClue.sourceItem = sourceItem;
76
- dragClue.destinationItem = destinationItem;
77
- dragClue.detectChanges();
78
- };
79
- DragClueService.prototype.updateText = function (text) {
80
- if (text === this.componentRef.instance.text) {
81
- return;
82
- }
83
- this.componentRef.instance.text = text;
84
- this.componentRef.instance.detectChanges();
85
- };
86
- /**
87
- * Triggers the first scrollable parent to scroll upwards or downwards.
88
- * Uses setInterval, so should be called outside the angular zone.
89
- */
90
- DragClueService.prototype.scrollIntoView = function (_a) {
91
- var step = _a.step, interval = _a.interval;
92
- this.cancelScroll();
93
- var scrollableContainer = getScrollableContainer(this.element);
94
- if (!isPresent(scrollableContainer)) {
95
- return;
96
- }
97
- var containerRect = scrollableContainer.getBoundingClientRect();
98
- var clueRect = this.element.getBoundingClientRect();
99
- // if the beginning of the scrollable container is above the current viewport, fall-back to 0
100
- var firstVisibleClientTopPart = Math.max(containerRect.top, 0);
101
- // start scrolling up when the first visible item is dragged over
102
- var topLimit = firstVisibleClientTopPart + clueRect.height;
103
- // if the end of the scrollable container is beneath the current viewport, fall-back to its client height
104
- // add the distance from the start of the viewport to the beginning of the container to ensure scrolling bottom begins when the actual end of the container is reached
105
- var bottomLimit = firstVisibleClientTopPart + Math.min(containerRect.bottom, scrollableContainer.clientHeight);
106
- if (clueRect.top < topLimit) {
107
- this.scrollInterval = setInterval(function () {
108
- return scrollElementBy(scrollableContainer, step, ScrollDirection.Up);
109
- }, interval);
110
- }
111
- else if (clueRect.bottom > bottomLimit) {
112
- this.scrollInterval = setInterval(function () {
113
- return scrollElementBy(scrollableContainer, step, ScrollDirection.Down);
114
- }, interval);
115
- }
116
- };
117
- /**
118
- * Cancels out the on-going scroll animation, if present.
119
- */
120
- DragClueService.prototype.cancelScroll = function () {
121
- if (isPresent(this.scrollInterval)) {
122
- clearInterval(this.scrollInterval);
123
- this.scrollInterval = null;
124
- }
125
- };
126
- DragClueService = tslib_1.__decorate([
127
- Injectable(),
128
- tslib_1.__metadata("design:paramtypes", [ComponentFactoryResolver])
129
- ], DragClueService);
130
- return DragClueService;
131
- }(DragAndDropAssetService));
132
- export { DragClueService };
@@ -1,31 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Directive, Optional, TemplateRef } from '@angular/core';
7
- /**
8
- * Represents the template for the TreeView drop hint when an item is dragged. To define the hint template,
9
- * nest an `<ng-template>` tag with the `kendoTreeViewDropHintTemplate` directive inside a `<kendo-treeview>` tag
10
- * ([see example]({% slug draganddrop_treeview %}#toc-templates)).
11
- *
12
- * The attempted drop action, source item and destination item are available as context variables in the template:
13
- *
14
- * - `let-action="action"` ([`DropAction`]({% slug api_treeview_dropaction %}))
15
- * - `let-sourceItem="sourceItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
16
- * - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
17
- */
18
- var DropHintTemplateDirective = /** @class */ (function () {
19
- function DropHintTemplateDirective(templateRef) {
20
- this.templateRef = templateRef;
21
- }
22
- DropHintTemplateDirective = tslib_1.__decorate([
23
- Directive({
24
- selector: '[kendoTreeViewDropHintTemplate]'
25
- }),
26
- tslib_1.__param(0, Optional()),
27
- tslib_1.__metadata("design:paramtypes", [TemplateRef])
28
- ], DropHintTemplateDirective);
29
- return DropHintTemplateDirective;
30
- }());
31
- export { DropHintTemplateDirective };
@@ -1,43 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Component, HostBinding, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
7
- /**
8
- * @hidden
9
- */
10
- var DropHintComponent = /** @class */ (function () {
11
- function DropHintComponent(changeDetectorRef) {
12
- this.changeDetectorRef = changeDetectorRef;
13
- this.hostClass = true;
14
- this.position = 'fixed';
15
- this.pointerEvents = 'none';
16
- }
17
- // exposed as a public method that can be called from outside as the component uses `OnPush` strategy
18
- DropHintComponent.prototype.detectChanges = function () {
19
- this.changeDetectorRef.detectChanges();
20
- };
21
- tslib_1.__decorate([
22
- HostBinding('class.k-drop-hint-container'),
23
- tslib_1.__metadata("design:type", Boolean)
24
- ], DropHintComponent.prototype, "hostClass", void 0);
25
- tslib_1.__decorate([
26
- HostBinding('style.position'),
27
- tslib_1.__metadata("design:type", String)
28
- ], DropHintComponent.prototype, "position", void 0);
29
- tslib_1.__decorate([
30
- HostBinding('style.pointer-events'),
31
- tslib_1.__metadata("design:type", String)
32
- ], DropHintComponent.prototype, "pointerEvents", void 0);
33
- DropHintComponent = tslib_1.__decorate([
34
- Component({
35
- changeDetection: ChangeDetectionStrategy.OnPush,
36
- selector: 'kendo-treeview-drop-hint',
37
- template: "\n <div\n *ngIf=\"!template\"\n class=\"k-drop-hint k-drop-hint-h\"\n >\n <div class='k-drop-hint-start'></div>\n <div class='k-drop-hint-line'></div>\n </div>\n\n <ng-template\n *ngIf=\"template\"\n [ngTemplateOutlet]=\"template\"\n [ngTemplateOutletContext]=\"{\n action: action,\n sourceItem: sourceItem,\n destinationItem: destinationItem\n }\"\n >\n <ng-template>\n "
38
- }),
39
- tslib_1.__metadata("design:paramtypes", [ChangeDetectorRef])
40
- ], DropHintComponent);
41
- return DropHintComponent;
42
- }());
43
- export { DropHintComponent };
@@ -1,46 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import * as tslib_1 from "tslib";
6
- import { Injectable, ComponentFactoryResolver } from '@angular/core';
7
- import { dataItemsEqual, isPresent } from '../../utils';
8
- import { DropHintComponent } from './drop-hint.component';
9
- import { DragAndDropAssetService } from '../editing-services/drag-and-drop-asset.service';
10
- /**
11
- * @hidden
12
- */
13
- var DropHintService = /** @class */ (function (_super) {
14
- tslib_1.__extends(DropHintService, _super);
15
- function DropHintService(componentFactoryResolver) {
16
- var _this = _super.call(this) || this;
17
- _this.componentFactoryResolver = componentFactoryResolver;
18
- return _this;
19
- }
20
- DropHintService.prototype.initialize = function (container, template) {
21
- if (isPresent(this._componentRef)) {
22
- this.ngOnDestroy();
23
- }
24
- var hintComponentFactory = this.componentFactoryResolver.resolveComponentFactory(DropHintComponent);
25
- this.componentRef = container.createComponent(hintComponentFactory);
26
- this.hide();
27
- this.componentRef.instance.template = template;
28
- this.componentRef.changeDetectorRef.detectChanges();
29
- };
30
- DropHintService.prototype.updateDropHintData = function (action, sourceItem, destinationItem) {
31
- var dropHint = this.componentRef.instance;
32
- if (action === dropHint.action && dataItemsEqual(sourceItem, dropHint.sourceItem) && dataItemsEqual(destinationItem, dropHint.destinationItem)) {
33
- return;
34
- }
35
- dropHint.action = action;
36
- dropHint.sourceItem = sourceItem;
37
- dropHint.destinationItem = destinationItem;
38
- dropHint.detectChanges();
39
- };
40
- DropHintService = tslib_1.__decorate([
41
- Injectable(),
42
- tslib_1.__metadata("design:paramtypes", [ComponentFactoryResolver])
43
- ], DropHintService);
44
- return DropHintService;
45
- }(DragAndDropAssetService));
46
- export { DropHintService };
@@ -1,53 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { isPresent } from '../../utils';
6
- /**
7
- * @hidden
8
- */
9
- var DragAndDropAssetService = /** @class */ (function () {
10
- function DragAndDropAssetService() {
11
- }
12
- Object.defineProperty(DragAndDropAssetService.prototype, "componentRef", {
13
- get: function () {
14
- if (!isPresent(this._componentRef)) {
15
- throw new Error('The `initalize` method must be called before calling other service methods.');
16
- }
17
- return this._componentRef;
18
- },
19
- set: function (componentRef) {
20
- this._componentRef = componentRef;
21
- },
22
- enumerable: true,
23
- configurable: true
24
- });
25
- Object.defineProperty(DragAndDropAssetService.prototype, "element", {
26
- get: function () {
27
- return this.componentRef.location.nativeElement;
28
- },
29
- enumerable: true,
30
- configurable: true
31
- });
32
- DragAndDropAssetService.prototype.ngOnDestroy = function () {
33
- if (!isPresent(this._componentRef)) {
34
- return;
35
- }
36
- this.element.parentElement.removeChild(this.element);
37
- this.componentRef.destroy();
38
- this.componentRef = null;
39
- };
40
- DragAndDropAssetService.prototype.show = function () {
41
- this.element.style.display = '';
42
- };
43
- DragAndDropAssetService.prototype.hide = function () {
44
- this.element.style.display = 'none';
45
- };
46
- DragAndDropAssetService.prototype.move = function (left, top, offset) {
47
- if (offset === void 0) { offset = 0; }
48
- this.element.style.left = left + offset + "px";
49
- this.element.style.top = top + offset + "px";
50
- };
51
- return DragAndDropAssetService;
52
- }());
53
- export { DragAndDropAssetService };
@@ -1,145 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { getter, setter } from '@progress/kendo-common';
6
- import { take } from 'rxjs/operators';
7
- import { DropPosition } from '../models';
8
- import { expandDropTarget, collapseEmptyParent, updateMovedItemIndex } from '../drag-and-drop-utils';
9
- import { incrementPageSize, copyPageSize, decrementPageSize } from '../../load-more/load-more-utils';
10
- import { buildTreeIndex, getDataItem, isPresent } from '../../utils';
11
- /**
12
- * @hidden
13
- */
14
- var FlatEditingService = /** @class */ (function () {
15
- function FlatEditingService(flatBinding) {
16
- this.flatBinding = flatBinding;
17
- }
18
- FlatEditingService.prototype.add = function (_a) {
19
- var sourceItem = _a.sourceItem, destinationItem = _a.destinationItem, dropPosition = _a.dropPosition, sourceTree = _a.sourceTree, destinationTree = _a.destinationTree;
20
- // shallow clone the item as not to mistake it for its 'older' version when the remove handler kicks in to splice the item at its old position
21
- var clonedSourceDataItem = Object.assign({}, getDataItem(sourceItem));
22
- if (dropPosition === DropPosition.Over) {
23
- // expand the item that was dropped into
24
- expandDropTarget(destinationItem, destinationTree);
25
- var destinationItemId = getter(this.flatBinding.idField)(getDataItem(destinationItem));
26
- setter(this.flatBinding.parentIdField)(clonedSourceDataItem, destinationItemId);
27
- var lastChildNodeIndex = this.getLastVisibleChildNodeIndex(destinationTree, this.flatBinding.originalData, getDataItem(destinationItem));
28
- // insert after the last visible child
29
- var targetIndex = lastChildNodeIndex + 1;
30
- this.flatBinding.originalData.splice(targetIndex, 0, clonedSourceDataItem);
31
- // rebind the treeview data before searching for the focus target index
32
- this.rebindData();
33
- var focusTarget = this.fetchChildNodes(getDataItem(destinationItem), destinationTree).indexOf(clonedSourceDataItem);
34
- this.movedItemNewIndex = buildTreeIndex(destinationItem.item.index, focusTarget);
35
- }
36
- else {
37
- var shiftIndex = dropPosition === DropPosition.After ? 1 : 0;
38
- var targetIndex = this.flatBinding.originalData.indexOf(getDataItem(destinationItem)) + shiftIndex;
39
- this.flatBinding.originalData.splice(targetIndex, 0, clonedSourceDataItem);
40
- var destinationItemParentId = getter(this.flatBinding.parentIdField)(getDataItem(destinationItem));
41
- setter(this.flatBinding.parentIdField)(clonedSourceDataItem, destinationItemParentId);
42
- // rebind the treeview data before searching for the focus target index
43
- this.rebindData();
44
- var parentIndex = destinationItem.parent ?
45
- destinationItem.parent.item.index :
46
- null;
47
- var parentContainer = destinationItem.parent ?
48
- this.fetchChildNodes(getDataItem(destinationItem.parent), destinationTree) :
49
- destinationTree.nodes;
50
- var focusTarget = parentContainer.indexOf(clonedSourceDataItem);
51
- this.movedItemNewIndex = buildTreeIndex(parentIndex, focusTarget);
52
- }
53
- if (sourceTree !== destinationTree) {
54
- this.addChildNodes(clonedSourceDataItem, sourceTree);
55
- }
56
- // increment the parent page size => an item is moved into it
57
- var updatedParent = dropPosition === DropPosition.Over ? getDataItem(destinationItem) : getDataItem(destinationItem.parent);
58
- incrementPageSize(destinationTree, updatedParent);
59
- // the page sizes are stored by data-item reference => copy the old item ref page size to the new item reference
60
- copyPageSize(destinationTree, getDataItem(sourceItem), clonedSourceDataItem);
61
- // the source tree nodes are reloaded on `removeItem` - reload the destination tree nodes if the soruce and the destination tree are different
62
- if (sourceTree !== destinationTree && !destinationTree.loadOnDemand) {
63
- destinationTree.preloadChildNodes();
64
- }
65
- // if the source and destination trees are the same, focusing the moved item here will not have the desired effect
66
- // as the `remove` handler has not yet kicked-in to remove the item from its old position
67
- if (sourceTree !== destinationTree) {
68
- // ensure the focus target is rendered and registered
69
- destinationTree.changeDetectorRef.detectChanges();
70
- destinationTree.focus(this.movedItemNewIndex);
71
- }
72
- };
73
- FlatEditingService.prototype.remove = function (_a) {
74
- var sourceItem = _a.sourceItem, sourceTree = _a.sourceTree, destinationTree = _a.destinationTree;
75
- var sourceDataItem = getDataItem(sourceItem);
76
- var sourceItemIndex = this.flatBinding.originalData.indexOf(sourceDataItem);
77
- this.flatBinding.originalData.splice(sourceItemIndex, 1);
78
- if (sourceTree !== destinationTree) {
79
- this.removeChildNodes(sourceDataItem, sourceTree);
80
- }
81
- this.rebindData();
82
- // emit collapse for the parent node if its last child node was spliced
83
- var parentChildren = sourceItem.parent ? sourceItem.parent.children : [];
84
- collapseEmptyParent(sourceItem.parent, parentChildren, sourceTree);
85
- // decrement source item parent page size => an item has been removed from it
86
- decrementPageSize(sourceTree, getDataItem(sourceItem.parent));
87
- // reload the treeview nodes
88
- if (!sourceTree.loadOnDemand) {
89
- sourceTree.preloadChildNodes();
90
- }
91
- // if the source and destination trees are different we want to focus only the moved item in the destination tree
92
- if (sourceTree === destinationTree) {
93
- // ensure the focus target is rendered and registered
94
- destinationTree.changeDetectorRef.detectChanges();
95
- // after the source item is removed from its original position, the candidate index might have to be corrected
96
- var index = updateMovedItemIndex(this.movedItemNewIndex, sourceItem.item.index);
97
- destinationTree.focus(index);
98
- }
99
- };
100
- FlatEditingService.prototype.addChildNodes = function (dataItem, source) {
101
- var _a;
102
- var itemChildren = this.fetchAllDescendantNodes(dataItem, source);
103
- (_a = this.flatBinding.originalData).push.apply(_a, itemChildren);
104
- };
105
- FlatEditingService.prototype.removeChildNodes = function (dataItem, source) {
106
- var _this = this;
107
- var sourceChildren = this.fetchAllDescendantNodes(dataItem, source);
108
- sourceChildren.forEach(function (item) {
109
- var index = _this.flatBinding.originalData.indexOf(item);
110
- _this.flatBinding.originalData.splice(index, 1);
111
- });
112
- };
113
- FlatEditingService.prototype.fetchAllDescendantNodes = function (node, treeview) {
114
- var _this = this;
115
- var nodes = this.fetchChildNodes(node, treeview);
116
- nodes.forEach(function (node) { return nodes = nodes.concat(_this.fetchAllDescendantNodes(node, treeview) || []); });
117
- return nodes;
118
- };
119
- FlatEditingService.prototype.fetchChildNodes = function (node, treeview) {
120
- if (!node) {
121
- return [];
122
- }
123
- var nodes = [];
124
- treeview
125
- .children(node)
126
- .pipe(take(1))
127
- .subscribe(function (children) { return nodes = nodes.concat(children || []); });
128
- return nodes;
129
- };
130
- FlatEditingService.prototype.getLastVisibleChildNodeIndex = function (treeview, data, node) {
131
- if (!isPresent(treeview.loadMoreService) || !treeview.hasChildren(node)) {
132
- return data.length;
133
- }
134
- var visibleNodesCount = treeview.loadMoreService.getGroupSize(node);
135
- var visibleChildren = this.fetchChildNodes(node, treeview).slice(0, visibleNodesCount);
136
- var lastNode = visibleChildren[visibleChildren.length - 1];
137
- var lastNodeIndex = data.indexOf(lastNode);
138
- return lastNodeIndex;
139
- };
140
- FlatEditingService.prototype.rebindData = function () {
141
- this.flatBinding.nodes = this.flatBinding.originalData;
142
- };
143
- return FlatEditingService;
144
- }());
145
- export { FlatEditingService };
@@ -1,90 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { getter, setter } from '@progress/kendo-common';
6
- import { DropPosition } from '../models';
7
- import { collapseEmptyParent, expandDropTarget, updateMovedItemIndex } from '../drag-and-drop-utils';
8
- import { decrementPageSize, incrementPageSize, copyPageSize } from '../../load-more/load-more-utils';
9
- import { isPresent, getDataItem, buildTreeIndex } from '../../utils';
10
- /**
11
- * @hidden
12
- */
13
- var HierarchyEditingService = /** @class */ (function () {
14
- function HierarchyEditingService(hierarchyBinding) {
15
- this.hierarchyBinding = hierarchyBinding;
16
- }
17
- HierarchyEditingService.prototype.add = function (_a) {
18
- var sourceItem = _a.sourceItem, destinationItem = _a.destinationItem, dropPosition = _a.dropPosition, sourceTree = _a.sourceTree, destinationTree = _a.destinationTree;
19
- // shallow clone the item as not to mistake it for its 'older' version when the remove handler kicks in to splice the item at its old position
20
- var clonedSourceDataItem = Object.assign({}, getDataItem(sourceItem));
21
- if (dropPosition === DropPosition.Over) {
22
- // expand the item that was dropped into
23
- expandDropTarget(destinationItem, destinationTree);
24
- var destinationChildren = this.childrenFor(getDataItem(destinationItem));
25
- // add the moved node just before the load more button if load more is enabled
26
- var targetIndex = isPresent(destinationTree.loadMoreService) ?
27
- Math.min(destinationTree.loadMoreService.getGroupSize(getDataItem(destinationItem)), destinationChildren.length) : // the page size might be greater than the actual children array length
28
- destinationChildren.length;
29
- destinationChildren.splice(targetIndex, 0, clonedSourceDataItem);
30
- setter(this.hierarchyBinding.childrenField)(getDataItem(destinationItem), destinationChildren);
31
- this.movedItemNewIndex = buildTreeIndex(destinationItem.item.index, targetIndex);
32
- }
33
- else {
34
- var destinationParentNodes = this.getParentNodes(destinationItem, destinationTree);
35
- var shiftIndex = dropPosition === DropPosition.After ? 1 : 0;
36
- var targetIndex = destinationParentNodes.indexOf(getDataItem(destinationItem)) + shiftIndex;
37
- destinationParentNodes.splice(targetIndex, 0, clonedSourceDataItem);
38
- var parentIndex = destinationItem.parent ? destinationItem.parent.item.index : null;
39
- this.movedItemNewIndex = buildTreeIndex(parentIndex, targetIndex);
40
- }
41
- // increment the parent page size => an item is moved into it
42
- var updatedParent = dropPosition === DropPosition.Over ? getDataItem(destinationItem) : getDataItem(destinationItem.parent);
43
- incrementPageSize(destinationTree, updatedParent);
44
- // the page sizes are stored by data-item reference => copy the old item ref page size to the new item reference
45
- copyPageSize(destinationTree, getDataItem(sourceItem), clonedSourceDataItem);
46
- // the source tree nodes are reloaded on `removeItem` - reload the destination tree nodes if the soruce and the destination tree are different
47
- if (sourceTree !== destinationTree && !destinationTree.loadOnDemand) {
48
- destinationTree.preloadChildNodes();
49
- }
50
- // if the source and destination trees are the same, focusing the moved item here will not have the desired effect
51
- // as the `remove` handler has not yet kicked-in to remove the item from its old position
52
- if (sourceTree !== destinationTree) {
53
- // ensure the focus target is rendered and registered
54
- destinationTree.changeDetectorRef.detectChanges();
55
- destinationTree.focus(this.movedItemNewIndex);
56
- }
57
- };
58
- HierarchyEditingService.prototype.remove = function (_a) {
59
- var sourceItem = _a.sourceItem, sourceTree = _a.sourceTree, destinationTree = _a.destinationTree;
60
- var sourceParentNodes = this.getParentNodes(sourceItem, sourceTree);
61
- var sourceItemIndex = sourceParentNodes.indexOf(getDataItem(sourceItem));
62
- sourceParentNodes.splice(sourceItemIndex, 1);
63
- // emit collapse for the parent node if its last child node was spliced
64
- collapseEmptyParent(sourceItem.parent, sourceParentNodes, sourceTree);
65
- // decrement source item parent page size => an item has been removed from it
66
- decrementPageSize(sourceTree, getDataItem(sourceItem.parent));
67
- // reload the treeview nodes
68
- if (!sourceTree.loadOnDemand) {
69
- sourceTree.preloadChildNodes();
70
- }
71
- // if the source and destination trees are different we want to focus only the moved item in the destination tree
72
- if (sourceTree === destinationTree) {
73
- // ensure the focus target is rendered and registered
74
- destinationTree.changeDetectorRef.detectChanges();
75
- // after the source item is removed from its original position, the candidate index might have to be corrected
76
- var index = updateMovedItemIndex(this.movedItemNewIndex, sourceItem.item.index);
77
- destinationTree.focus(index);
78
- }
79
- };
80
- HierarchyEditingService.prototype.getParentNodes = function (node, treeView) {
81
- return isPresent(node.parent) ?
82
- this.childrenFor(getDataItem(node.parent)) :
83
- treeView.nodes;
84
- };
85
- HierarchyEditingService.prototype.childrenFor = function (dataItem) {
86
- return getter(this.hierarchyBinding.childrenField)(dataItem) || [];
87
- };
88
- return HierarchyEditingService;
89
- }());
90
- export { HierarchyEditingService };
@@ -1,4 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
@@ -1,29 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- var PreventableEvent = /** @class */ (function () {
9
- function PreventableEvent() {
10
- this.prevented = false;
11
- }
12
- /**
13
- * Prevents the default action for a specified event.
14
- * In this way, the source component suppresses the built-in behavior that follows the event.
15
- */
16
- PreventableEvent.prototype.preventDefault = function () {
17
- this.prevented = true;
18
- };
19
- /**
20
- * If the event is prevented by any of its subscribers, returns `true`.
21
- *
22
- * @returns `true` if the default action was prevented. Otherwise, returns `false`.
23
- */
24
- PreventableEvent.prototype.isDefaultPrevented = function () {
25
- return this.prevented;
26
- };
27
- return PreventableEvent;
28
- }());
29
- export { PreventableEvent };
@@ -1,14 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Arguments for the TreeView [`nodeDrag`]({% slug api_treeview_treeviewcomponent %}#toc-nodedrag) and
7
- * [`nodeDragEnd`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragend) events.
8
- */
9
- var TreeItemDragEvent = /** @class */ (function () {
10
- function TreeItemDragEvent() {
11
- }
12
- return TreeItemDragEvent;
13
- }());
14
- export { TreeItemDragEvent };