@progress/kendo-angular-treeview 6.0.2 → 7.0.0-next.202203241311

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 (327) 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 +0 -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 +6 -10
  48. package/{dist/es2015 → esm2015}/drag-and-drop/drag-and-drop.directive.js +47 -50
  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 +0 -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 +242 -134
  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 +165 -205
  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} +3401 -3322
  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 +35 -103
  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/{dist/es2015/size.d.ts → size.d.ts} +0 -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} +12 -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} +22 -10
  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.js +0 -4
  246. package/dist/es2015/treeitem-lookup.interface.js +0 -4
  247. package/dist/es2015/treeitem.interface.js +0 -4
  248. package/dist/es2015/treeview.module.d.ts +0 -9
  249. package/dist/fesm5/index.js +0 -5426
  250. package/dist/npm/check-mode.js +0 -6
  251. package/dist/npm/check.directive.js +0 -285
  252. package/dist/npm/checkable-settings.js +0 -6
  253. package/dist/npm/checkbox/checkbox.component.js +0 -129
  254. package/dist/npm/checkbox/checkbox.module.js +0 -29
  255. package/dist/npm/checkbox/checked-state.js +0 -6
  256. package/dist/npm/data-bound-component.js +0 -23
  257. package/dist/npm/data-change-notification.service.js +0 -20
  258. package/dist/npm/default-callbacks.js +0 -34
  259. package/dist/npm/disable.directive.js +0 -73
  260. package/dist/npm/drag-and-drop/drag-and-drop-editing.directive.js +0 -67
  261. package/dist/npm/drag-and-drop/drag-and-drop-utils.js +0 -278
  262. package/dist/npm/drag-and-drop/drag-and-drop.directive.js +0 -336
  263. package/dist/npm/drag-and-drop/drag-clue/drag-clue-template.directive.js +0 -36
  264. package/dist/npm/drag-and-drop/drag-clue/drag-clue.component.js +0 -56
  265. package/dist/npm/drag-and-drop/drag-clue/drag-clue.service.js +0 -134
  266. package/dist/npm/drag-and-drop/drop-hint/drop-hint-template.directive.js +0 -33
  267. package/dist/npm/drag-and-drop/drop-hint/drop-hint.component.js +0 -45
  268. package/dist/npm/drag-and-drop/drop-hint/drop-hint.service.js +0 -48
  269. package/dist/npm/drag-and-drop/editing-services/drag-and-drop-asset.service.js +0 -55
  270. package/dist/npm/drag-and-drop/editing-services/flat-editing.service.js +0 -147
  271. package/dist/npm/drag-and-drop/editing-services/hierarchy-editing.service.js +0 -92
  272. package/dist/npm/drag-and-drop/models/drop-action.js +0 -19
  273. package/dist/npm/drag-and-drop/models/drop-position.js +0 -15
  274. package/dist/npm/drag-and-drop/models/editing-service.js +0 -6
  275. package/dist/npm/drag-and-drop/models/preventable-event.js +0 -31
  276. package/dist/npm/drag-and-drop/models/scroll-direction.js +0 -14
  277. package/dist/npm/drag-and-drop/models/scroll-settings.js +0 -6
  278. package/dist/npm/drag-and-drop/models/tree-item-filter-state.js +0 -6
  279. package/dist/npm/drag-and-drop/models/treeitem-add-remove-args.js +0 -6
  280. package/dist/npm/drag-and-drop/models/treeitem-drag-event.js +0 -16
  281. package/dist/npm/drag-and-drop/models/treeitem-drag-start-event.js +0 -24
  282. package/dist/npm/drag-and-drop/models/treeitem-drop-event.js +0 -38
  283. package/dist/npm/drag-and-drop/models.js +0 -14
  284. package/dist/npm/expand-state.service.js +0 -28
  285. package/dist/npm/expand.directive.js +0 -221
  286. package/dist/npm/expandable-component.js +0 -23
  287. package/dist/npm/filter-expand-settings.interface.js +0 -6
  288. package/dist/npm/filter-state.interface.js +0 -6
  289. package/dist/npm/filtering-base.js +0 -97
  290. package/dist/npm/flat-binding.directive.js +0 -154
  291. package/dist/npm/funcs.js +0 -17
  292. package/dist/npm/hierarchy-binding.directive.js +0 -154
  293. package/dist/npm/index-builder.service.js +0 -40
  294. package/dist/npm/index.js +0 -55
  295. package/dist/npm/load-more/load-more-button-template.directive.js +0 -32
  296. package/dist/npm/load-more/load-more-request-args.js +0 -6
  297. package/dist/npm/load-more/load-more-utils.js +0 -37
  298. package/dist/npm/load-more/load-more.directive.js +0 -116
  299. package/dist/npm/load-more/load-more.service.js +0 -6
  300. package/dist/npm/loading-indicator.directive.js +0 -78
  301. package/dist/npm/loading-notification.service.js +0 -25
  302. package/dist/npm/main.js +0 -50
  303. package/dist/npm/navigation/navigation-item.interface.js +0 -6
  304. package/dist/npm/navigation/navigation-model.js +0 -166
  305. package/dist/npm/navigation/navigation-state.interface.js +0 -6
  306. package/dist/npm/navigation/navigation.service.js +0 -245
  307. package/dist/npm/node-children.service.js +0 -25
  308. package/dist/npm/node-click-event.interface.js +0 -6
  309. package/dist/npm/node-template.directive.js +0 -76
  310. package/dist/npm/package-metadata.js +0 -17
  311. package/dist/npm/selection/select.directive.js +0 -154
  312. package/dist/npm/selection/selectable-settings.js +0 -6
  313. package/dist/npm/selection/selection-mode.js +0 -6
  314. package/dist/npm/selection/selection.service.js +0 -36
  315. package/dist/npm/shared.module.js +0 -77
  316. package/dist/npm/size.js +0 -6
  317. package/dist/npm/treeitem-lookup.interface.js +0 -6
  318. package/dist/npm/treeitem.interface.js +0 -6
  319. package/dist/npm/treeview-filter-settings.js +0 -14
  320. package/dist/npm/treeview-group.component.js +0 -395
  321. package/dist/npm/treeview-item-content.directive.js +0 -87
  322. package/dist/npm/treeview-item.directive.js +0 -308
  323. package/dist/npm/treeview-lookup.service.js +0 -95
  324. package/dist/npm/treeview.component.js +0 -855
  325. package/dist/npm/treeview.module.js +0 -54
  326. package/dist/npm/utils.js +0 -322
  327. package/dist/systemjs/kendo-angular-treeview.js +0 -5
@@ -1,274 +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 { isDocumentAvailable } from '@progress/kendo-angular-common';
6
- import { isPresent, closestNode, closestWithMatch, hasParent, isContent, nodeId, getContentElement } from '../utils';
7
- import { DropPosition, DropAction, ScrollDirection } from './models';
8
- var ɵ0 = function () {
9
- if (!(isDocumentAvailable() && isPresent(document.body))) {
10
- return false;
11
- }
12
- var top = 10;
13
- var parent = document.createElement("div");
14
- parent.style.transform = "matrix(10, 0, 0, 10, 0, 0)";
15
- parent.innerHTML = "<div style=\"position: fixed; top: " + top + "px;\">child</div>";
16
- document.body.appendChild(parent);
17
- var isDifferent = parent.children[0].getBoundingClientRect().top !== top;
18
- document.body.removeChild(parent);
19
- return isDifferent;
20
- };
21
- /**
22
- * Checks if the browser supports relative stacking context.
23
- * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
24
- */
25
- var hasRelativeStackingContext = memoize(ɵ0);
26
- /**
27
- * Stores the result of the passed function's first invokation and returns it instead of invoking it again afterwards.
28
- */
29
- function memoize(fn) {
30
- var result;
31
- var called = false;
32
- return function () {
33
- var args = [];
34
- for (var _i = 0; _i < arguments.length; _i++) {
35
- args[_i] = arguments[_i];
36
- }
37
- if (called) {
38
- return result;
39
- }
40
- result = fn.apply(void 0, args);
41
- called = true;
42
- return result;
43
- };
44
- }
45
- /**
46
- * @hidden
47
- *
48
- * Gets the offset of the parent element if the latter has the `transform` CSS prop applied.
49
- * Transformed parents create new stacking context and the `fixed` children must be position based on the transformed parent.
50
- * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
51
- *
52
- * If no parent container is `transform`-ed the function will return `{ left: 0, top: 0 }`;
53
- */
54
- export var getContainerOffset = function (element) {
55
- if (!(element && hasRelativeStackingContext())) {
56
- return { left: 0, top: 0 };
57
- }
58
- var offsetParent = element.parentElement;
59
- while (offsetParent) {
60
- if (window.getComputedStyle(offsetParent).transform !== 'none') {
61
- break;
62
- }
63
- offsetParent = offsetParent.parentElement;
64
- }
65
- if (offsetParent) {
66
- var rect = offsetParent.getBoundingClientRect();
67
- return {
68
- left: rect.left - offsetParent.scrollLeft,
69
- top: rect.top - offsetParent.scrollTop
70
- };
71
- }
72
- return { left: 0, top: 0 };
73
- };
74
- /**
75
- * @hidden
76
- */
77
- export var getDropAction = function (dropPosition, dropTarget) {
78
- if (!(isPresent(dropPosition) && isPresent(dropTarget))) {
79
- return DropAction.Invalid;
80
- }
81
- switch (dropPosition) {
82
- case DropPosition.Over:
83
- return DropAction.Add;
84
- case DropPosition.Before:
85
- return isPresent(closestNode(dropTarget).previousElementSibling) ? DropAction.InsertMiddle : DropAction.InsertTop;
86
- case DropPosition.After:
87
- return isPresent(closestNode(dropTarget).nextElementSibling) ? DropAction.InsertMiddle : DropAction.InsertBottom;
88
- default:
89
- return DropAction.Invalid;
90
- }
91
- };
92
- /**
93
- * @hidden
94
- */
95
- export var getDropPosition = function (draggedItem, target, clientY, targetTreeView, containerOffset) {
96
- if (!(isPresent(draggedItem) && isPresent(target) && isPresent(targetTreeView) && isPresent(containerOffset))) {
97
- return;
98
- }
99
- // the .k-treeview-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
100
- var item = closestWithMatch(target, '.k-treeview-mid');
101
- if (!isPresent(item)) {
102
- return;
103
- }
104
- // the content element (.k-treeview-leaf:not(.k-treeview-load-more-button)) holds just the treeview item text
105
- var content = getContentElement(item);
106
- var targetChildOfDraggedItem = hasParent(item, closestNode(draggedItem));
107
- if (!isPresent(content) || (content === draggedItem) || targetChildOfDraggedItem) {
108
- return;
109
- }
110
- var itemViewPortCoords = content.getBoundingClientRect();
111
- /*
112
- if the user is hovering a treeview item, split the item height into four parts:
113
- - dropping into the top quarter should insert the dragged item before the drop target
114
- - dropping into the bottom quarter should insert the dragged item after the drop target
115
- - dropping into the second or third quarter should add the item as child node of the drop target
116
-
117
- if the user is NOT hovering a treeview item (he's dragging somewhere on the right), split the item height to just two parts:
118
- - dropping should insert before or after
119
- */
120
- var itemDivisionHeight = itemViewPortCoords.height / (isContent(target) ? 4 : 2);
121
- // clear any possible container offset created by parent elements with `transform` css property set
122
- var pointerPosition = clientY - containerOffset.top;
123
- var itemTop = itemViewPortCoords.top - containerOffset.top;
124
- if (pointerPosition < itemTop + itemDivisionHeight) {
125
- return DropPosition.Before;
126
- }
127
- if (pointerPosition >= itemTop + itemViewPortCoords.height - itemDivisionHeight) {
128
- return DropPosition.After;
129
- }
130
- return DropPosition.Over;
131
- };
132
- /**
133
- * @hidden
134
- */
135
- export var treeItemFromEventTarget = function (treeView, dropTarget) {
136
- if (!(isPresent(treeView) && isPresent(dropTarget))) {
137
- return null;
138
- }
139
- var node = closestNode(dropTarget);
140
- var index = nodeId(node);
141
- var lookup = treeView.itemLookup(index);
142
- if (!(isPresent(lookup) && isPresent(lookup.item.dataItem))) {
143
- return null;
144
- }
145
- return lookup;
146
- };
147
- /**
148
- * @hidden
149
- *
150
- * Emits `collapse` on the specified TreeView node if the latter is left empty after its last child node was dragged out.
151
- */
152
- export var collapseEmptyParent = function (parent, parentNodes, treeview) {
153
- if (isPresent(parent) && parentNodes.length === 0 && treeview.isExpanded(parent.item.dataItem, parent.item.index)) {
154
- treeview.collapseNode(parent.item.dataItem, parent.item.index);
155
- }
156
- };
157
- /**
158
- * @hidden
159
- *
160
- * Expands the node if it's dropped into and it's not yet expanded.
161
- */
162
- export var expandDropTarget = function (dropTarget, treeView) {
163
- if (!treeView.isExpanded(dropTarget.item.dataItem, dropTarget.item.index)) {
164
- treeView.expandNode(dropTarget.item.dataItem, dropTarget.item.index);
165
- }
166
- };
167
- /**
168
- * @hidden
169
- *
170
- * Extracts the event target from the viewport coords. Required for touch devices
171
- * where the `event.target` of a `pointermove` event is always the initially dragged item.
172
- */
173
- export var getDropTarget = function (event) {
174
- if (!(isDocumentAvailable() && isPresent(document.elementFromPoint))) {
175
- return event.target;
176
- }
177
- return document.elementFromPoint(event.clientX, event.clientY);
178
- };
179
- /**
180
- * @hidden
181
- *
182
- * Checks if the original index is before the new one and corrects the new one by decrementing the index for the level, where the original item stood.
183
- */
184
- export var updateMovedItemIndex = function (newIndex, originalIndex) {
185
- var movedItemNewIndexParts = newIndex.split('_');
186
- var originalItemIndexParts = originalIndex.split('_');
187
- // if the original item was moved from a deeper level, there's no need for index correction
188
- // e.g. 4_0_1 is moved to 5_0 => removing 4_0_1 will not cause 5_0 to be moved
189
- if (movedItemNewIndexParts.length < originalItemIndexParts.length) {
190
- return newIndex;
191
- }
192
- // check if the parent item paths are the same - index correction is not required when the original item path differs from the path of the moved item - they belong to different hierarchies
193
- // e.g. 4_1 is moved to 5_1 - the parent item paths are differen (4 compared to 5) => removing 4_1 will not cause 5_1 to be moved
194
- // e.g 4_1 is moved to 4_3 - the parent paths are the same (both 4) => removing 4_1 will cause 4_3 to be moved
195
- var originalItemParentPathLength = originalItemIndexParts.length - 1;
196
- var originalItemParentPath = originalItemIndexParts.slice(0, originalItemParentPathLength).join('_');
197
- var movedItemParentPath = movedItemNewIndexParts.slice(0, originalItemParentPathLength).join('_');
198
- // check if the the index of the level where the original item is taken from is greater than the one of the moved item
199
- // e.g. 4_5 is moved to 4_1 (comapre 5 and 1) => removing 4_5 will not cause 4_1 to be moved
200
- // e.g. 4_1 is moved to 4_5 (comapre 1 and 5) => removing 4_1 will cause 4_5 to be moved
201
- var originalItemIndexLevel = originalItemIndexParts.length - 1;
202
- var originalItemLevelIndex = Number(originalItemIndexParts[originalItemIndexLevel]);
203
- var movedItemLevelIndex = Number(movedItemNewIndexParts[originalItemIndexLevel]);
204
- if ((originalItemParentPath === movedItemParentPath) && (movedItemLevelIndex > originalItemLevelIndex)) {
205
- // if the removed item causes the dropped item to be moved a position up - decrement the index at that level
206
- movedItemNewIndexParts[originalItemIndexLevel] = String(movedItemLevelIndex - 1);
207
- return movedItemNewIndexParts.join('_');
208
- }
209
- return newIndex;
210
- };
211
- /**
212
- * @hidden
213
- */
214
- var SCROLLBAR_REG_EXP = new RegExp('(auto|scroll)');
215
- /**
216
- * @hidden
217
- *
218
- * Retrives the first scrollable element starting the search from the provided one, traversing to the top of the DOM tree.
219
- */
220
- export var getScrollableContainer = function (node) {
221
- while (isPresent(node) && node.nodeName !== 'HTML') {
222
- var hasOverflow = node.scrollHeight > node.clientHeight;
223
- var hasScrollbar = SCROLLBAR_REG_EXP.test(getComputedStyle(node).overflowY);
224
- if (hasOverflow && hasScrollbar) {
225
- return node;
226
- }
227
- node = node.parentNode;
228
- }
229
- return node;
230
- };
231
- /**
232
- * @hidden
233
- *
234
- * Checks if the top of the scrollable element is reached.
235
- * Floors the scrollTop value.
236
- */
237
- var isTopReached = function (element) { return Math.floor(element.scrollTop) <= 0; };
238
- var ɵ1 = isTopReached;
239
- /**
240
- * @hidden
241
- *
242
- * Checks if the bottom of the scrollable element is reached.
243
- * Ceils the scrollTop value.
244
- */
245
- var isBottomReached = function (element) { return Math.ceil(element.scrollTop) >= element.scrollHeight - element.clientHeight; };
246
- var ɵ2 = isBottomReached;
247
- /**
248
- * @hidden
249
- *
250
- * Scrolls the element in the given direction by the provided step.
251
- *
252
- * If the targeted scroll incrementation doesn't yield any result due to device pixel ratio issues (https://github.com/dimitar-pechev/RenderingIndependentScrollOffsets#readme),
253
- * increments the step with 1px and again attempts to change the scrollTop of the element, until the content is actually scrolled.
254
- *
255
- * Cuts the operation short after 20 unsuccessful attempts to prevent infinite loops in possible corner-case scenarios.
256
- */
257
- export var scrollElementBy = function (element, step, direction) {
258
- if (!(isPresent(element) && isDocumentAvailable())) {
259
- return;
260
- }
261
- var initialScrollTop = element.scrollTop;
262
- var currentStep = step;
263
- var iterations = 0;
264
- while (initialScrollTop === element.scrollTop &&
265
- !(direction === ScrollDirection.Up && isTopReached(element)) &&
266
- !(direction === ScrollDirection.Down && isBottomReached(element)) &&
267
- iterations < 20 // as the bulgarian saying goes - to ties our underpants
268
- ) {
269
- element.scrollTop += (currentStep * direction);
270
- currentStep += 1;
271
- iterations += 1;
272
- }
273
- };
274
- export { ɵ0, ɵ1, ɵ2 };
@@ -1,334 +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, ElementRef, NgZone, ContentChild, Input, HostBinding } from '@angular/core';
7
- import { hasObservers } from '@progress/kendo-angular-common';
8
- import Draggable from '@telerik/kendo-draggable';
9
- import { DragClueService } from './drag-clue/drag-clue.service';
10
- import { DropHintService } from './drop-hint/drop-hint.service';
11
- import { DragClueTemplateDirective } from './drag-clue/drag-clue-template.directive';
12
- import { DropHintTemplateDirective } from './drop-hint/drop-hint-template.directive';
13
- import { getDropAction, getDropPosition, treeItemFromEventTarget, getContainerOffset, getDropTarget } from './drag-and-drop-utils';
14
- import { closestWithMatch, isPresent, isContent } from '../utils';
15
- import { TreeViewComponent } from '../treeview.component';
16
- import { TreeItemDropEvent, DropPosition, TreeItemDragStartEvent } from './models';
17
- var DEFAULT_SCROLL_SETTINGS = {
18
- enabled: true,
19
- step: 1,
20
- interval: 1
21
- };
22
- /**
23
- * A directive which enables the dragging and dropping items inside the current TreeView or between multiple linked TreeView component instances
24
- * ([see example]({% slug draganddrop_treeview %})).
25
- *
26
- * Triggers the [`nodeDragStart`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragstart),
27
- * [`nodeDrag`]({% slug api_treeview_treeviewcomponent %}#toc-nodedrag),
28
- * [`nodeDrop`]({% slug api_treeview_treeviewcomponent %}#toc-nodedrop),
29
- * [`nodeDragEnd`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragend),
30
- * [`addItem`]({% slug api_treeview_treeviewcomponent %}#toc-additem) and
31
- * [`removeItem`]({% slug api_treeview_treeviewcomponent %}#toc-removeitem)
32
- * events when the corresponding actions occur on the respective TreeView instance.
33
- */
34
- var DragAndDropDirective = /** @class */ (function () {
35
- function DragAndDropDirective(element, zone, treeview, dragClueService, dropHintService) {
36
- this.element = element;
37
- this.zone = zone;
38
- this.treeview = treeview;
39
- this.dragClueService = dragClueService;
40
- this.dropHintService = dropHintService;
41
- /**
42
- * Specifies whether the `removeItem` event will be fired after an item is dropped when the `ctrl` key is pressed.
43
- * If enabled, the `removeItem` event will not be fired on the source TreeView
44
- * ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
45
- *
46
- * @default false
47
- */
48
- this.allowCopy = false;
49
- /**
50
- * Specifes the TreeViewComponent instances into which dragged items from the current TreeViewComponent can be dropped
51
- * ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
52
- */
53
- this.dropZoneTreeViews = [];
54
- /**
55
- * Specifies the distance in pixels from the initial item pointerdown event, before the dragging is initiated.
56
- * The `nodeDragStart` and all consequent TreeView drag events will not be fired until the actual dragging begins.
57
- *
58
- * @default 5
59
- */
60
- this.startDragAfter = 5;
61
- /**
62
- * Controlls the auto-scrolling behavior during drag-and-drop ([see example]({% slug draganddrop_treeview %}#toc-auto-scrolling)).
63
- * Enbaled by default. To turn the auto-scrolling off, set this prop to `false`.
64
- *
65
- * By default, the scrolling will be performed by 1 pixel at every 1 millisecond, when the dragged item reaches the top or the bottom of the scrollable container.
66
- * The `step` and `interval` can be overridden by providing a `DragAndDropScrollSettings` object to this prop.
67
- *
68
- * @default true
69
- */
70
- this.autoScroll = true;
71
- /**
72
- * @hidden
73
- */
74
- this.userSelectStyle = 'none';
75
- /**
76
- * Describes the offset of the parent element if the latter has the `transform` CSS prop applied.
77
- * Transformed parents create new stacking context and the fixed children must be position based on the transformed parent.
78
- * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
79
- */
80
- this.containerOffset = { top: 0, left: 0 };
81
- this.treeview.touchActions = false;
82
- }
83
- Object.defineProperty(DragAndDropDirective.prototype, "scrollSettings", {
84
- get: function () {
85
- var userProvidedSettings = typeof this.autoScroll === 'boolean' ?
86
- { enabled: this.autoScroll } :
87
- this.autoScroll;
88
- return Object.assign({}, DEFAULT_SCROLL_SETTINGS, userProvidedSettings);
89
- },
90
- enumerable: true,
91
- configurable: true
92
- });
93
- DragAndDropDirective.prototype.ngAfterContentInit = function () {
94
- this.initalizeDraggable();
95
- this.dragClueService.initialize(this.treeview.assetsContainer, this.dragClueTemplate && this.dragClueTemplate.templateRef);
96
- this.dropHintService.initialize(this.treeview.assetsContainer, this.dropHintTemplate && this.dropHintTemplate.templateRef);
97
- };
98
- DragAndDropDirective.prototype.ngOnDestroy = function () {
99
- this.draggable.destroy();
100
- };
101
- /**
102
- * @hidden
103
- */
104
- DragAndDropDirective.prototype.handlePress = function (_a) {
105
- var originalEvent = _a.originalEvent;
106
- if (!isContent(originalEvent.target)) {
107
- return;
108
- }
109
- // store the drag target on press, show it only when it's actually dragged
110
- this.draggedItem = closestWithMatch(originalEvent.target, '.k-treeview-leaf');
111
- // record the current pointer down coords - copared to the `startDragAfter` value to calculate whether to initiate dragging
112
- this.pendingDragStartEvent = originalEvent;
113
- };
114
- /**
115
- * @hidden
116
- */
117
- DragAndDropDirective.prototype.handleDrag = function (_a) {
118
- var _this = this;
119
- var originalEvent = _a.originalEvent, clientX = _a.clientX, clientY = _a.clientY;
120
- if (this.shouldInitiateDragStart({ clientX: clientX, clientY: clientY })) {
121
- this.initiateDragStart();
122
- }
123
- if (!isPresent(this.draggedItem) || isPresent(this.pendingDragStartEvent)) {
124
- return;
125
- }
126
- var dropTarget = getDropTarget(originalEvent);
127
- if (hasObservers(this.treeview.nodeDrag)) {
128
- this.zone.run(function () { return _this.notifyDrag(originalEvent, dropTarget); });
129
- }
130
- var targetTreeView = this.getTargetTreeView(dropTarget);
131
- var dropPosition = getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
132
- var dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-mid');
133
- var dropAction = getDropAction(dropPosition, dropTarget);
134
- var sourceItem = treeItemFromEventTarget(this.treeview, this.draggedItem);
135
- var destinationItem = treeItemFromEventTarget(targetTreeView, dropTarget);
136
- this.updateDropHintState(dropPosition, dropHintAnchor, dropAction, sourceItem, destinationItem);
137
- this.updateDragClueState(dropAction, clientX, clientY, sourceItem, destinationItem);
138
- if (this.scrollSettings.enabled) {
139
- this.dragClueService.scrollIntoView(this.scrollSettings);
140
- }
141
- };
142
- /**
143
- * @hidden
144
- */
145
- DragAndDropDirective.prototype.handleRelease = function (_a) {
146
- var _this = this;
147
- var originalEvent = _a.originalEvent, clientY = _a.clientY;
148
- if (this.scrollSettings.enabled) {
149
- this.dragClueService.cancelScroll();
150
- }
151
- if (!isPresent(this.draggedItem) || isPresent(this.pendingDragStartEvent)) {
152
- this.pendingDragStartEvent = null;
153
- this.draggedItem = null;
154
- return;
155
- }
156
- var dropTarget = getDropTarget(originalEvent);
157
- var sourceTree = this.treeview;
158
- var destinationTree = this.getTargetTreeView(dropTarget);
159
- var dropPosition = getDropPosition(this.draggedItem, dropTarget, clientY, this.getTargetTreeView(dropTarget), this.containerOffset);
160
- var sourceItem = treeItemFromEventTarget(sourceTree, this.draggedItem);
161
- var destinationItem = treeItemFromEventTarget(destinationTree, dropTarget);
162
- if (isPresent(destinationItem) && isPresent(dropPosition)) {
163
- this.zone.run(function () { return _this.notifyDrop({ sourceItem: sourceItem, destinationItem: destinationItem, dropPosition: dropPosition, sourceTree: sourceTree, destinationTree: destinationTree }, originalEvent); });
164
- }
165
- else {
166
- this.dragClueService.animateDragClueToElementPosition(this.draggedItem);
167
- }
168
- if (hasObservers(this.treeview.nodeDragEnd)) {
169
- this.zone.run(function () { return _this.notifyDragEnd({ sourceItem: sourceItem, destinationItem: destinationItem, originalEvent: originalEvent }); });
170
- }
171
- this.dropHintService.hide();
172
- this.draggedItem = null;
173
- };
174
- DragAndDropDirective.prototype.updateDropHintState = function (dropPosition, dropHintAnchor, dropAction, sourceItem, destinationItem) {
175
- if (!isPresent(dropHintAnchor) || dropPosition === DropPosition.Over || !isPresent(dropPosition)) {
176
- this.dropHintService.hide();
177
- return;
178
- }
179
- var anchorViewPortCoords = dropHintAnchor.getBoundingClientRect();
180
- var insertBefore = dropPosition === DropPosition.Before;
181
- var top = insertBefore ? anchorViewPortCoords.top : (anchorViewPortCoords.top + anchorViewPortCoords.height);
182
- this.dropHintService.updateDropHintData(dropAction, sourceItem, destinationItem);
183
- // clear any possible container offset created by parent elements with `transform` css property set
184
- this.dropHintService.move(anchorViewPortCoords.left - this.containerOffset.left, top - this.containerOffset.top);
185
- this.dropHintService.show();
186
- };
187
- DragAndDropDirective.prototype.updateDragClueState = function (dropAction, clientX, clientY, sourceItem, destinationItem) {
188
- // clear any possible container offset created by parent elements with `transform` css property set
189
- this.dragClueService.move(clientX - this.containerOffset.left, clientY - this.containerOffset.top);
190
- this.dragClueService.updateDragClueData(dropAction, sourceItem, destinationItem);
191
- this.dragClueService.show();
192
- };
193
- DragAndDropDirective.prototype.initalizeDraggable = function () {
194
- var _this = this;
195
- this.draggable = new Draggable({
196
- press: this.handlePress.bind(this),
197
- drag: this.handleDrag.bind(this),
198
- release: this.handleRelease.bind(this)
199
- });
200
- this.zone.runOutsideAngular(function () { return _this.draggable.bindTo(_this.element.nativeElement); });
201
- };
202
- DragAndDropDirective.prototype.notifyDragStart = function (originalEvent, dropTarget) {
203
- var sourceItem = treeItemFromEventTarget(this.treeview, dropTarget);
204
- var event = new TreeItemDragStartEvent({ sourceItem: sourceItem, originalEvent: originalEvent });
205
- this.treeview.nodeDragStart.emit(event);
206
- return event;
207
- };
208
- DragAndDropDirective.prototype.notifyDrag = function (originalEvent, dropTarget) {
209
- var dragEvent = {
210
- sourceItem: treeItemFromEventTarget(this.treeview, this.draggedItem),
211
- destinationItem: treeItemFromEventTarget(this.getTargetTreeView(dropTarget), dropTarget),
212
- originalEvent: originalEvent
213
- };
214
- this.treeview.nodeDrag.emit(dragEvent);
215
- };
216
- DragAndDropDirective.prototype.notifyDrop = function (args, originalEvent) {
217
- var event = new TreeItemDropEvent(args, originalEvent);
218
- args.destinationTree.nodeDrop.emit(event);
219
- // disable the animations on drop and restore them afterwards (if they were initially turned on)
220
- this.disableAnimationsForNextTick(args.destinationTree);
221
- if (args.sourceTree !== args.destinationTree) {
222
- this.disableAnimationsForNextTick(args.sourceTree);
223
- }
224
- if (!event.isDefaultPrevented() && event.isValid) {
225
- this.dragClueService.hide();
226
- // order matters in a flat data binding scenario (first add, then remove)
227
- args.destinationTree.addItem.emit(args);
228
- if (!(originalEvent.ctrlKey && this.allowCopy)) {
229
- args.sourceTree.removeItem.emit(args);
230
- }
231
- }
232
- else if (event.isDefaultPrevented()) {
233
- // directly hide the clue if the default is prevented
234
- this.dragClueService.hide();
235
- }
236
- else if (!event.isValid) {
237
- // animate the clue back to the source item position if marked as invalid
238
- this.dragClueService.animateDragClueToElementPosition(this.draggedItem);
239
- }
240
- };
241
- DragAndDropDirective.prototype.notifyDragEnd = function (dragEndEvent) {
242
- this.treeview.nodeDragEnd.emit(dragEndEvent);
243
- };
244
- DragAndDropDirective.prototype.getTargetTreeView = function (dropTarget) {
245
- var treeViewTagName = this.treeview.element.nativeElement.tagName;
246
- var targetTreeView = closestWithMatch(dropTarget, treeViewTagName);
247
- return [this.treeview].concat(this.dropZoneTreeViews).find(function (treeView) {
248
- return isPresent(treeView) && treeView.element.nativeElement === targetTreeView;
249
- });
250
- };
251
- DragAndDropDirective.prototype.disableAnimationsForNextTick = function (treeView) {
252
- // the treeView.animate getter returns `true` when the animations are turned off
253
- // confusing, but seems on purpose (the `animate` prop sets the value of the @.disabled host-bound attribute)
254
- if (treeView.animate) {
255
- return;
256
- }
257
- treeView.animate = false;
258
- this.zone.runOutsideAngular(function () {
259
- return setTimeout(function () { return treeView.animate = true; });
260
- });
261
- };
262
- DragAndDropDirective.prototype.shouldInitiateDragStart = function (currentPointerCoords) {
263
- if (!isPresent(this.pendingDragStartEvent)) {
264
- return false;
265
- }
266
- var distanceFromPointerDown = Math.sqrt(Math.pow((this.pendingDragStartEvent.clientX - currentPointerCoords.clientX), 2) +
267
- Math.pow((this.pendingDragStartEvent.clientY - currentPointerCoords.clientY), 2));
268
- return distanceFromPointerDown >= this.startDragAfter;
269
- };
270
- DragAndDropDirective.prototype.initiateDragStart = function () {
271
- var _this = this;
272
- if (hasObservers(this.treeview.nodeDragStart)) {
273
- var dragStartEvent = this.zone.run(function () {
274
- return _this.notifyDragStart(_this.pendingDragStartEvent, getDropTarget(_this.pendingDragStartEvent));
275
- });
276
- if (dragStartEvent.isDefaultPrevented()) {
277
- this.pendingDragStartEvent = null;
278
- this.draggedItem = null;
279
- return;
280
- }
281
- }
282
- this.dragClueService.cancelReturnAnimation();
283
- this.dragClueService.updateText(this.draggedItem.innerText);
284
- this.containerOffset = getContainerOffset(this.draggedItem);
285
- this.pendingDragStartEvent = null;
286
- };
287
- tslib_1.__decorate([
288
- Input(),
289
- tslib_1.__metadata("design:type", Boolean)
290
- ], DragAndDropDirective.prototype, "allowCopy", void 0);
291
- tslib_1.__decorate([
292
- Input(),
293
- tslib_1.__metadata("design:type", Array)
294
- ], DragAndDropDirective.prototype, "dropZoneTreeViews", void 0);
295
- tslib_1.__decorate([
296
- Input(),
297
- tslib_1.__metadata("design:type", Number)
298
- ], DragAndDropDirective.prototype, "startDragAfter", void 0);
299
- tslib_1.__decorate([
300
- Input(),
301
- tslib_1.__metadata("design:type", Object)
302
- ], DragAndDropDirective.prototype, "autoScroll", void 0);
303
- tslib_1.__decorate([
304
- ContentChild(DragClueTemplateDirective, { static: false }),
305
- tslib_1.__metadata("design:type", DragClueTemplateDirective)
306
- ], DragAndDropDirective.prototype, "dragClueTemplate", void 0);
307
- tslib_1.__decorate([
308
- ContentChild(DropHintTemplateDirective, { static: false }),
309
- tslib_1.__metadata("design:type", DropHintTemplateDirective)
310
- ], DragAndDropDirective.prototype, "dropHintTemplate", void 0);
311
- tslib_1.__decorate([
312
- HostBinding('style.user-select'),
313
- HostBinding('style.-ms-user-select'),
314
- HostBinding('style.-moz-user-select'),
315
- HostBinding('style.-webkit-user-select'),
316
- tslib_1.__metadata("design:type", String)
317
- ], DragAndDropDirective.prototype, "userSelectStyle", void 0);
318
- DragAndDropDirective = tslib_1.__decorate([
319
- Directive({
320
- selector: '[kendoTreeViewDragAndDrop]',
321
- providers: [
322
- DragClueService,
323
- DropHintService
324
- ]
325
- }),
326
- tslib_1.__metadata("design:paramtypes", [ElementRef,
327
- NgZone,
328
- TreeViewComponent,
329
- DragClueService,
330
- DropHintService])
331
- ], DragAndDropDirective);
332
- return DragAndDropDirective;
333
- }());
334
- export { DragAndDropDirective };
@@ -1,34 +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 drag clue when an item is dragged. To define the clue template,
9
- * nest an `<ng-template>` tag with the `kendoTreeViewDragClueTemplate` directive inside a `<kendo-treeview>` tag
10
- * ([see example]({% slug draganddrop_treeview %}#toc-templates)).
11
- *
12
- *
13
- * The text, attempted drop action, source item and destination item are available as context variables in the template:
14
- *
15
- *
16
- * - `let-text="text"` (`string`)
17
- * - `let-action="action"` ([`DropAction`]({% slug api_treeview_dropaction %}))
18
- * - `let-sourceItem="sourceItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
19
- * - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
20
- */
21
- var DragClueTemplateDirective = /** @class */ (function () {
22
- function DragClueTemplateDirective(templateRef) {
23
- this.templateRef = templateRef;
24
- }
25
- DragClueTemplateDirective = tslib_1.__decorate([
26
- Directive({
27
- selector: '[kendoTreeViewDragClueTemplate]'
28
- }),
29
- tslib_1.__param(0, Optional()),
30
- tslib_1.__metadata("design:paramtypes", [TemplateRef])
31
- ], DragClueTemplateDirective);
32
- return DragClueTemplateDirective;
33
- }());
34
- export { DragClueTemplateDirective };