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

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 +32 -102
  142. package/schematics/ngAdd/index.js +7 -4
  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,853 +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 { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, HostBinding, Input, NgZone, Output, Renderer2, ViewChild, ViewContainerRef, isDevMode, forwardRef, ChangeDetectorRef } from '@angular/core';
7
- import { anyChanged, hasObservers, isDocumentAvailable } from '@progress/kendo-angular-common';
8
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
9
- import { BehaviorSubject, of, Subscription } from 'rxjs';
10
- import { validatePackage } from '@progress/kendo-licensing';
11
- import { packageMetadata } from './package-metadata';
12
- import { DataChangeNotificationService } from './data-change-notification.service';
13
- import { hasChildren, isChecked, isDisabled, isExpanded, isSelected, isVisible, trackBy } from './default-callbacks';
14
- import { ExpandStateService } from './expand-state.service';
15
- import { IndexBuilderService } from './index-builder.service';
16
- import { LoadingNotificationService } from './loading-notification.service';
17
- import { NavigationService } from './navigation/navigation.service';
18
- import { NodeChildrenService } from './node-children.service';
19
- import { NodeTemplateDirective } from './node-template.directive';
20
- import { LoadMoreButtonTemplateDirective } from './load-more/load-more-button-template.directive';
21
- import { DataBoundComponent } from './data-bound-component';
22
- import { ExpandableComponent } from './expandable-component';
23
- import { SelectionService } from './selection/selection.service';
24
- import { TreeViewLookupService } from './treeview-lookup.service';
25
- import { closestNode, focusableNode, hasParent, isContent, isFocusable, match, nodeId, isLoadMoreButton, isPresent, nodeIndex, buildTreeItem, getSizeClass } from './utils';
26
- var LOAD_MORE_DOC_LINK = 'http://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button/';
27
- var providers = [
28
- ExpandStateService,
29
- IndexBuilderService,
30
- TreeViewLookupService,
31
- LoadingNotificationService,
32
- NodeChildrenService,
33
- NavigationService,
34
- SelectionService,
35
- DataChangeNotificationService,
36
- LocalizationService,
37
- {
38
- provide: L10N_PREFIX,
39
- useValue: 'kendo.treeview'
40
- },
41
- {
42
- provide: DataBoundComponent,
43
- useExisting: forwardRef(function () { return TreeViewComponent; })
44
- },
45
- {
46
- provide: ExpandableComponent,
47
- useExisting: forwardRef(function () { return TreeViewComponent; })
48
- }
49
- ];
50
- /* tslint:disable:member-ordering */
51
- /**
52
- * Represents the [Kendo UI TreeView component for Angular]({% slug overview_treeview %}).
53
- *
54
- * @example
55
- * {% meta height:450 %}
56
- * {% embed_file get-started/app.component.ts preview %}
57
- * {% embed_file get-started/app.module.ts %}
58
- * {% embed_file shared/main.ts %}
59
- * {% endmeta %}
60
- */
61
- var TreeViewComponent = /** @class */ (function () {
62
- function TreeViewComponent(element, changeDetectorRef, expandService, navigationService, nodeChildrenService, selectionService, treeViewLookupService, ngZone, renderer, dataChangeNotification, localization) {
63
- var _this = this;
64
- this.element = element;
65
- this.changeDetectorRef = changeDetectorRef;
66
- this.expandService = expandService;
67
- this.navigationService = navigationService;
68
- this.nodeChildrenService = nodeChildrenService;
69
- this.selectionService = selectionService;
70
- this.treeViewLookupService = treeViewLookupService;
71
- this.ngZone = ngZone;
72
- this.renderer = renderer;
73
- this.dataChangeNotification = dataChangeNotification;
74
- this.localization = localization;
75
- this.classNames = true;
76
- this.role = 'tree';
77
- /**
78
- * The hint which is displayed when the component is empty.
79
- */
80
- this.filterInputPlaceholder = "";
81
- /** @hidden */
82
- this.fetchNodes = function () { return _this.data; };
83
- /**
84
- * Fires when the children of the expanded node are loaded.
85
- */
86
- this.childrenLoaded = new EventEmitter();
87
- /**
88
- * Fires when the user blurs the component.
89
- */
90
- this.onBlur = new EventEmitter();
91
- /**
92
- * Fires when the user focuses the component.
93
- */
94
- this.onFocus = new EventEmitter();
95
- /**
96
- * Fires when the user expands a TreeView node.
97
- */
98
- this.expand = new EventEmitter();
99
- /**
100
- * Fires when the user collapses a TreeView node.
101
- */
102
- this.collapse = new EventEmitter();
103
- /**
104
- * Fires just before the dragging of the node starts ([see example]({% slug draganddrop_treeview %}#toc-setup)). This event is preventable.
105
- * If you prevent the event default, no drag hint will be created and the subsequent drag-related events will not be fired.
106
- */
107
- this.nodeDragStart = new EventEmitter();
108
- /**
109
- * Fires when an item is being dragged ([see example]({% slug draganddrop_treeview %}#toc-setup)).
110
- */
111
- this.nodeDrag = new EventEmitter();
112
- /**
113
- * Emits when the built-in filtering mechanism in the data-binding directives updates the node's visibility.
114
- * Used for the built-in auto-expand functionalities of the component and available for custom implementations.
115
- */
116
- this.filterStateChange = new EventEmitter();
117
- /**
118
- * Fires on the target TreeView when a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
119
- * This event is preventable. If you prevent the event default (`event.preventDefualt()`) or invalidate its state (`event.setValid(false)`),
120
- * the `addItem` and `removeItem` events will not be triggered.
121
- *
122
- * Both operations cancel the default drop operation, but the indication to the user is different. `event.setValid(false)` indicates that the operation was
123
- * unsuccessful by animating the drag clue to its original position. `event.preventDefault()` simply removes the clue, as if it has been dropped successfully.
124
- * As a general rule, use `preventDefault` to manually handle the add and remove operations, and `setValid(false)` to indicate the operation was unsuccessful.
125
- */
126
- this.nodeDrop = new EventEmitter();
127
- /**
128
- * Fires on the source TreeView after the dragged item has been dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
129
- */
130
- this.nodeDragEnd = new EventEmitter();
131
- /**
132
- * Fires after a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
133
- * Called on the TreeView where the item is dropped.
134
- */
135
- this.addItem = new EventEmitter();
136
- /**
137
- * Fires after a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
138
- * Called on the TreeView from where the item is dragged.
139
- */
140
- this.removeItem = new EventEmitter();
141
- /**
142
- * Fires when the user selects a TreeView node checkbox
143
- * ([see example]({% slug checkboxes_treeview %}#toc-modifying-the-checked-state)).
144
- */
145
- this.checkedChange = new EventEmitter();
146
- /**
147
- * Fires when the user selects a TreeView node
148
- * ([see example]({% slug selection_treeview %}#toc-modifying-the-selection)).
149
- */
150
- this.selectionChange = new EventEmitter();
151
- /**
152
- * Fires when the value of the built-in filter input element changes.
153
- */
154
- this.filterChange = new EventEmitter();
155
- /**
156
- * Fires when the user clicks a TreeView node.
157
- */
158
- this.nodeClick = new EventEmitter();
159
- /**
160
- * Fires when the user double clicks a TreeView node.
161
- */
162
- this.nodeDblClick = new EventEmitter();
163
- /**
164
- * A function that defines how to track node changes.
165
- * By default, the TreeView tracks the nodes by data item object reference.
166
- *
167
- * @example
168
- * ```ts
169
- * @Component({
170
- * selector: 'my-app',
171
- * template: `
172
- * <kendo-treeview
173
- * [nodes]="data"
174
- * textField="text"
175
- * [trackBy]="trackBy"
176
- * >
177
- * </kendo-treeview>
178
- * `
179
- * })
180
- * export class AppComponent {
181
- * public data: any[] = [
182
- * { text: "Furniture" },
183
- * { text: "Decor" }
184
- * ];
185
- *
186
- * public trackBy(index: number, item: any): any {
187
- * return item.text;
188
- * }
189
- * }
190
- * ```
191
- */
192
- this.trackBy = trackBy;
193
- /**
194
- * A function which determines if a specific node is disabled.
195
- */
196
- this.isDisabled = isDisabled;
197
- /**
198
- * A callback which determines whether a TreeView node should be rendered as hidden. The utility .k-display-none class is used to hide the nodes.
199
- * Useful for custom filtering implementations.
200
- */
201
- this.isVisible = isVisible;
202
- /**
203
- * Determines whether the TreeView keyboard navigable is enabled.
204
- */
205
- this.navigable = true;
206
- /**
207
- * A function which provides the child nodes for a given parent node
208
- * ([see example]({% slug databinding_treeview %})).
209
- */
210
- this.children = function () { return of([]); };
211
- /**
212
- * Indicates whether the child nodes will be fetched on node expand or will be initially prefetched.
213
- * @default true
214
- */
215
- this.loadOnDemand = true;
216
- /**
217
- * Renders the built-in input element for filtering the TreeView.
218
- * If set to `true`, the component emits the `filterChange` event, which can be used to [filter the TreeView manually]({% slug filtering_treeview %}#toc-manual-filtering).
219
- * A built-in filtering implementation is available to use with the [`kendoTreeViewHierarchyBinding`]({% slug api_treeview_hierarchybindingdirective %}) and [`kendoTreeViewFlatDataBinding`]({% slug api_treeview_flatdatabindingdirective %}) directives.
220
- */
221
- this.filterable = false;
222
- /**
223
- * Sets an initial value of the built-in input element used for filtering.
224
- */
225
- this.filter = '';
226
- this.checkboxes = false;
227
- this.expandIcons = false;
228
- this.selectable = false;
229
- this.touchActions = true;
230
- this.isActive = false;
231
- this.data = new BehaviorSubject([]);
232
- this._animate = true;
233
- this._size = 'medium';
234
- this.subscriptions = new Subscription();
235
- this.domSubscriptions = [];
236
- validatePackage(packageMetadata);
237
- }
238
- Object.defineProperty(TreeViewComponent.prototype, "direction", {
239
- /** @hidden */
240
- get: function () {
241
- return this.localization.rtl ? 'rtl' : 'ltr';
242
- },
243
- enumerable: true,
244
- configurable: true
245
- });
246
- Object.defineProperty(TreeViewComponent.prototype, "animate", {
247
- get: function () {
248
- return !this._animate;
249
- },
250
- /**
251
- * Determines whether the content animation is enabled.
252
- */
253
- set: function (value) {
254
- this._animate = value;
255
- },
256
- enumerable: true,
257
- configurable: true
258
- });
259
- Object.defineProperty(TreeViewComponent.prototype, "nodeTemplateRef", {
260
- get: function () {
261
- return this._nodeTemplateRef || this.nodeTemplateQuery;
262
- },
263
- /**
264
- * @hidden
265
- *
266
- * Defines the template for each node.
267
- * Takes precedence over nested templates in the TreeView tag.
268
- */
269
- set: function (template) {
270
- this._nodeTemplateRef = template;
271
- },
272
- enumerable: true,
273
- configurable: true
274
- });
275
- Object.defineProperty(TreeViewComponent.prototype, "loadMoreButtonTemplateRef", {
276
- get: function () {
277
- return this._loadMoreButtonTemplateRef || this.loadMoreButtonTemplateQuery;
278
- },
279
- /**
280
- * @hidden
281
- *
282
- * Defines the template for each load-more button.
283
- * Takes precedence over nested templates in the TreeView tag.
284
- */
285
- set: function (template) {
286
- this._loadMoreButtonTemplateRef = template;
287
- },
288
- enumerable: true,
289
- configurable: true
290
- });
291
- Object.defineProperty(TreeViewComponent.prototype, "nodes", {
292
- get: function () {
293
- return this.data.value;
294
- },
295
- /**
296
- * The nodes which will be displayed by the TreeView
297
- * ([see example]({% slug databinding_treeview %})).
298
- */
299
- set: function (value) {
300
- this.data.next(value || []);
301
- this.dataChangeNotification.notify();
302
- },
303
- enumerable: true,
304
- configurable: true
305
- });
306
- Object.defineProperty(TreeViewComponent.prototype, "hasChildren", {
307
- /**
308
- * A function which determines if a specific node has child nodes
309
- * ([see example]({% slug databinding_treeview %})).
310
- */
311
- get: function () {
312
- return this._hasChildren || hasChildren;
313
- },
314
- set: function (callback) {
315
- this._hasChildren = callback;
316
- this.expandIcons = Boolean(this._isExpanded && this._hasChildren);
317
- },
318
- enumerable: true,
319
- configurable: true
320
- });
321
- Object.defineProperty(TreeViewComponent.prototype, "isChecked", {
322
- /**
323
- * A function which determines if a specific node is checked
324
- * ([see example]({% slug checkboxes_treeview %}#toc-modifying-the-checked-state)).
325
- */
326
- get: function () {
327
- return this._isChecked || isChecked;
328
- },
329
- set: function (callback) {
330
- this._isChecked = callback;
331
- this.checkboxes = Boolean(this._isChecked);
332
- },
333
- enumerable: true,
334
- configurable: true
335
- });
336
- Object.defineProperty(TreeViewComponent.prototype, "isExpanded", {
337
- /**
338
- * A function which determines if a specific node is expanded.
339
- */
340
- get: function () {
341
- return this._isExpanded || isExpanded;
342
- },
343
- set: function (callback) {
344
- this._isExpanded = callback;
345
- this.expandIcons = Boolean(this._isExpanded && this._hasChildren);
346
- },
347
- enumerable: true,
348
- configurable: true
349
- });
350
- Object.defineProperty(TreeViewComponent.prototype, "isSelected", {
351
- /**
352
- * A function which determines if a specific node is selected
353
- * ([see example]({% slug selection_treeview %}#toc-modifying-the-selection)).
354
- */
355
- get: function () {
356
- return this._isSelected || isSelected;
357
- },
358
- set: function (callback) {
359
- this._isSelected = callback;
360
- this.selectable = Boolean(this._isSelected);
361
- },
362
- enumerable: true,
363
- configurable: true
364
- });
365
- Object.defineProperty(TreeViewComponent.prototype, "size", {
366
- get: function () {
367
- return this._size;
368
- },
369
- /**
370
- * Sets the size of the component.
371
- *
372
- * The possible values are:
373
- * * `'small'`
374
- * * `'medium'` (default)
375
- * * `'large'`
376
- * * `null`
377
- *
378
- */
379
- set: function (size) {
380
- this.renderer.removeClass(this.element.nativeElement, getSizeClass('treeview', this.size));
381
- if (size) {
382
- this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', size));
383
- }
384
- this._size = size;
385
- },
386
- enumerable: true,
387
- configurable: true
388
- });
389
- TreeViewComponent.prototype.ngOnChanges = function (changes) {
390
- this.navigationService.navigable = Boolean(this.navigable);
391
- // TODO: should react to changes.loadOnDemand as well - should preload the data or clear the already cached items
392
- if (anyChanged(['nodes', 'children', 'hasChildren', 'loadOnDemand'], changes, false) && !this.loadOnDemand) {
393
- this.preloadChildNodes();
394
- }
395
- };
396
- TreeViewComponent.prototype.ngOnDestroy = function () {
397
- this.subscriptions.unsubscribe();
398
- this.domSubscriptions.forEach(function (subscription) { return subscription(); });
399
- };
400
- TreeViewComponent.prototype.ngOnInit = function () {
401
- var _this = this;
402
- this.subscriptions.add(this.nodeChildrenService
403
- .changes
404
- .subscribe(function (x) { return _this.childrenLoaded.emit(x); }));
405
- this.subscriptions.add(this.expandService.changes
406
- .subscribe(function (_a) {
407
- var index = _a.index, dataItem = _a.dataItem, expand = _a.expand;
408
- return expand
409
- ? _this.expand.emit({ index: index, dataItem: dataItem })
410
- : _this.collapse.emit({ index: index, dataItem: dataItem });
411
- }));
412
- this.subscriptions.add(this.navigationService.checks
413
- .subscribe(function (x) {
414
- return _this.checkedChange.emit(_this.treeViewLookupService.itemLookup(x));
415
- }));
416
- this.subscriptions.add(this.selectionService.changes
417
- .subscribe(function (x) {
418
- if (hasObservers(_this.selectionChange)) {
419
- _this.ngZone.run(function () {
420
- _this.selectionChange.emit(x);
421
- });
422
- }
423
- }));
424
- if (this.element) {
425
- this.ngZone.runOutsideAngular(function () {
426
- _this.attachDomHandlers();
427
- });
428
- }
429
- if (this.size) {
430
- this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', this.size));
431
- }
432
- };
433
- /**
434
- * Blurs the focused TreeView item.
435
- */
436
- TreeViewComponent.prototype.blur = function () {
437
- if (!isDocumentAvailable()) {
438
- return;
439
- }
440
- var target = focusableNode(this.element);
441
- if (document.activeElement === target) {
442
- target.blur();
443
- }
444
- };
445
- /**
446
- * Focuses the first focusable item in the TreeView component if no hierarchical index is provided.
447
- *
448
- * @example
449
- * ```ts
450
- * import { Component } from '@angular/core';
451
- *
452
- * @Component({
453
- * selector: 'my-app',
454
- * template: `
455
- * <button (click)="treeview.focus('1')">Focuses the second node</button>
456
- * <kendo-treeview
457
- * #treeview
458
- * [nodes]="data"
459
- * textField="text"
460
- * >
461
- * </kendo-treeview>
462
- * `
463
- * })
464
- * export class AppComponent {
465
- * public data: any[] = [
466
- * { text: "Furniture" },
467
- * { text: "Decor" }
468
- * ];
469
- * }
470
- * ```
471
- */
472
- TreeViewComponent.prototype.focus = function (index) {
473
- var focusIndex = index || nodeIndex(this.navigationService.focusableItem);
474
- this.navigationService.activateIndex(focusIndex);
475
- var target = focusableNode(this.element);
476
- if (target) {
477
- target.focus();
478
- }
479
- };
480
- /**
481
- * Based on the specified index, returns the TreeItemLookup node.
482
- *
483
- * @param index - The index of the node.
484
- * @returns {TreeItemLookup} - The item that was searched (looked up).
485
- */
486
- TreeViewComponent.prototype.itemLookup = function (index) {
487
- return this.treeViewLookupService.itemLookup(index);
488
- };
489
- /**
490
- * Triggers the [`children`]({% slug api_treeview_treeviewcomponent %}#toc-children) function for every expanded node,
491
- * causing all rendered child nodes to be fetched again.
492
- */
493
- TreeViewComponent.prototype.rebindChildren = function () {
494
- this.dataChangeNotification.notify();
495
- };
496
- /**
497
- * Triggers the `expand` event for the provided node and displays it's loading indicator.
498
- */
499
- TreeViewComponent.prototype.expandNode = function (item, index) {
500
- this.expandService.expand(index, item);
501
- };
502
- /**
503
- * Triggers the `collapse` event for the provided node.
504
- */
505
- TreeViewComponent.prototype.collapseNode = function (item, index) {
506
- this.expandService.collapse(index, item);
507
- };
508
- /**
509
- * Gets the current page size of the checked data item children collection
510
- * ([see example]({% slug loadmorebutton_treeview %}#toc-managing-page-sizes)).
511
- *
512
- * > Since the root nodes collection is not associated with any parent data item, pass `null` as `dataItem` param to get its page size.
513
- *
514
- * @param dataItem {any} - The parent data item of the targeted collection.
515
- * @returns {number} - The page size of the checked data item children collection.
516
- */
517
- TreeViewComponent.prototype.getNodePageSize = function (dataItem) {
518
- this.verifyLoadMoreService();
519
- return this.loadMoreService.getGroupSize(dataItem);
520
- };
521
- /**
522
- * Sets the page size of the targeted data item children collection
523
- * ([see example]({% slug loadmorebutton_treeview %}#toc-managing-page-sizes)).
524
- *
525
- * > Since the root nodes collection is not associated with any parent data item, pass `null` as `dataItem` param to target its page size.
526
- *
527
- * @param dataItem {any} - The parent data item of the targeted collection.
528
- * @param pageSize {number} - The new page size.
529
- */
530
- TreeViewComponent.prototype.setNodePageSize = function (dataItem, pageSize) {
531
- this.verifyLoadMoreService();
532
- this.loadMoreService.setGroupSize(dataItem, pageSize);
533
- };
534
- /**
535
- * @hidden
536
- *
537
- * Clears the current TreeViewLookupService node map and re-registers all nodes anew.
538
- * Child nodes are acquired through the provided `children` callback.
539
- */
540
- TreeViewComponent.prototype.preloadChildNodes = function () {
541
- this.treeViewLookupService.reset();
542
- this.registerLookupItems(this.nodes);
543
- };
544
- TreeViewComponent.prototype.attachDomHandlers = function () {
545
- var element = this.element.nativeElement;
546
- this.clickHandler = this.clickHandler.bind(this);
547
- this.domSubscriptions.push(this.renderer.listen(element, 'contextmenu', this.clickHandler), this.renderer.listen(element, 'click', this.clickHandler), this.renderer.listen(element, 'dblclick', this.clickHandler), this.renderer.listen(element, 'focusin', this.focusHandler.bind(this)), this.renderer.listen(element, 'focusout', this.blurHandler.bind(this)), this.renderer.listen(element, 'keydown', this.keydownHandler.bind(this)));
548
- };
549
- TreeViewComponent.prototype.focusHandler = function (e) {
550
- var _this = this;
551
- var focusItem;
552
- if (match(e.target, '.k-treeview-item')) {
553
- focusItem = e.target;
554
- }
555
- else if (!isFocusable(e.target)) { // with compliments to IE
556
- focusItem = closestNode(e.target);
557
- }
558
- if (focusItem) {
559
- this.navigationService.activateIndex(nodeId(e.target));
560
- if (!this.isActive && hasObservers(this.onFocus)) {
561
- this.ngZone.run(function () {
562
- _this.onFocus.emit();
563
- });
564
- }
565
- this.isActive = true;
566
- }
567
- };
568
- TreeViewComponent.prototype.blurHandler = function (e) {
569
- var _this = this;
570
- if (this.isActive && match(e.target, '.k-treeview-item') &&
571
- (!e.relatedTarget || !match(e.relatedTarget, '.k-treeview-item') || !hasParent(e.relatedTarget, this.element.nativeElement))) {
572
- this.navigationService.deactivate();
573
- this.isActive = false;
574
- if (hasObservers(this.onBlur)) {
575
- this.ngZone.run(function () {
576
- _this.onBlur.emit();
577
- });
578
- }
579
- }
580
- };
581
- TreeViewComponent.prototype.clickHandler = function (e) {
582
- var _this = this;
583
- var target = e.target;
584
- if ((e.type === 'contextmenu' && !hasObservers(this.nodeClick)) ||
585
- (e.type === 'click' && !hasObservers(this.nodeClick) && !hasObservers(this.selectionChange) && !isLoadMoreButton(target)) ||
586
- (e.type === 'dblclick' && !hasObservers(this.nodeDblClick)) || isFocusable(target) ||
587
- (!isContent(target) && !isLoadMoreButton(target)) || !hasParent(target, this.element.nativeElement)) {
588
- return;
589
- }
590
- var index = nodeId(closestNode(target));
591
- // the disabled check is probably not needed due to the k-disabled styles
592
- if (!index || this.navigationService.isDisabled(index)) {
593
- return;
594
- }
595
- this.ngZone.run(function () {
596
- // record this value before emitting selectionChange (`this.navigationService.selectIndex`), as the treeview state may be changed on its emission
597
- var lookup = _this.treeViewLookupService.itemLookup(index);
598
- if (e.type === 'click') {
599
- var loadMoreButton = _this.navigationService.model.findNode(index).loadMoreButton;
600
- if (loadMoreButton) {
601
- _this.navigationService.notifyLoadMore(index);
602
- return;
603
- }
604
- else {
605
- _this.navigationService.selectIndex(index);
606
- }
607
- }
608
- var emitter = e.type === 'dblclick' ? _this.nodeDblClick : _this.nodeClick;
609
- emitter.emit({
610
- item: lookup.item,
611
- originalEvent: e,
612
- type: e.type
613
- });
614
- });
615
- };
616
- TreeViewComponent.prototype.keydownHandler = function (e) {
617
- var _this = this;
618
- if (this.isActive && this.navigable) {
619
- this.ngZone.run(function () {
620
- _this.navigationService.move(e);
621
- });
622
- }
623
- };
624
- TreeViewComponent.prototype.verifyLoadMoreService = function () {
625
- if (isDevMode() && !isPresent(this.loadMoreService)) {
626
- throw new Error("To use the TreeView paging functionality, you need to assign the `kendoTreeViewLoadMore` directive. See " + LOAD_MORE_DOC_LINK + ".");
627
- }
628
- };
629
- TreeViewComponent.prototype.registerLookupItems = function (data, parentItem) {
630
- var _this = this;
631
- if (parentItem === void 0) { parentItem = null; }
632
- if (!isPresent(data) || data.length === 0) {
633
- return;
634
- }
635
- var parentIndex = nodeIndex(parentItem);
636
- var treeItems = data.map(function (node, index) {
637
- return buildTreeItem(node, index, parentIndex);
638
- });
639
- if (isPresent(parentItem)) {
640
- this.treeViewLookupService.registerChildren(parentIndex, treeItems);
641
- }
642
- treeItems.forEach(function (item) {
643
- _this.treeViewLookupService.registerItem(item, parentItem);
644
- if (_this.hasChildren(item.dataItem)) {
645
- _this.children(item.dataItem)
646
- .subscribe(function (children) {
647
- return _this.registerLookupItems(children, item);
648
- });
649
- }
650
- });
651
- };
652
- tslib_1.__decorate([
653
- HostBinding("class.k-treeview"),
654
- tslib_1.__metadata("design:type", Boolean)
655
- ], TreeViewComponent.prototype, "classNames", void 0);
656
- tslib_1.__decorate([
657
- HostBinding("attr.role"),
658
- tslib_1.__metadata("design:type", String)
659
- ], TreeViewComponent.prototype, "role", void 0);
660
- tslib_1.__decorate([
661
- HostBinding("attr.dir"),
662
- tslib_1.__metadata("design:type", String),
663
- tslib_1.__metadata("design:paramtypes", [])
664
- ], TreeViewComponent.prototype, "direction", null);
665
- tslib_1.__decorate([
666
- ViewChild('assetsContainer', { read: ViewContainerRef, static: true }),
667
- tslib_1.__metadata("design:type", ViewContainerRef)
668
- ], TreeViewComponent.prototype, "assetsContainer", void 0);
669
- tslib_1.__decorate([
670
- Input(),
671
- tslib_1.__metadata("design:type", String)
672
- ], TreeViewComponent.prototype, "filterInputPlaceholder", void 0);
673
- tslib_1.__decorate([
674
- Input(),
675
- HostBinding('@.disabled'),
676
- tslib_1.__metadata("design:type", Boolean),
677
- tslib_1.__metadata("design:paramtypes", [Boolean])
678
- ], TreeViewComponent.prototype, "animate", null);
679
- tslib_1.__decorate([
680
- Output(),
681
- tslib_1.__metadata("design:type", EventEmitter)
682
- ], TreeViewComponent.prototype, "childrenLoaded", void 0);
683
- tslib_1.__decorate([
684
- Output('blur'),
685
- tslib_1.__metadata("design:type", EventEmitter)
686
- ], TreeViewComponent.prototype, "onBlur", void 0);
687
- tslib_1.__decorate([
688
- Output('focus'),
689
- tslib_1.__metadata("design:type", EventEmitter)
690
- ], TreeViewComponent.prototype, "onFocus", void 0);
691
- tslib_1.__decorate([
692
- Output(),
693
- tslib_1.__metadata("design:type", EventEmitter)
694
- ], TreeViewComponent.prototype, "expand", void 0);
695
- tslib_1.__decorate([
696
- Output(),
697
- tslib_1.__metadata("design:type", EventEmitter)
698
- ], TreeViewComponent.prototype, "collapse", void 0);
699
- tslib_1.__decorate([
700
- Output(),
701
- tslib_1.__metadata("design:type", EventEmitter)
702
- ], TreeViewComponent.prototype, "nodeDragStart", void 0);
703
- tslib_1.__decorate([
704
- Output(),
705
- tslib_1.__metadata("design:type", EventEmitter)
706
- ], TreeViewComponent.prototype, "nodeDrag", void 0);
707
- tslib_1.__decorate([
708
- Output(),
709
- tslib_1.__metadata("design:type", EventEmitter)
710
- ], TreeViewComponent.prototype, "filterStateChange", void 0);
711
- tslib_1.__decorate([
712
- Output(),
713
- tslib_1.__metadata("design:type", EventEmitter)
714
- ], TreeViewComponent.prototype, "nodeDrop", void 0);
715
- tslib_1.__decorate([
716
- Output(),
717
- tslib_1.__metadata("design:type", EventEmitter)
718
- ], TreeViewComponent.prototype, "nodeDragEnd", void 0);
719
- tslib_1.__decorate([
720
- Output(),
721
- tslib_1.__metadata("design:type", EventEmitter)
722
- ], TreeViewComponent.prototype, "addItem", void 0);
723
- tslib_1.__decorate([
724
- Output(),
725
- tslib_1.__metadata("design:type", EventEmitter)
726
- ], TreeViewComponent.prototype, "removeItem", void 0);
727
- tslib_1.__decorate([
728
- Output(),
729
- tslib_1.__metadata("design:type", EventEmitter)
730
- ], TreeViewComponent.prototype, "checkedChange", void 0);
731
- tslib_1.__decorate([
732
- Output(),
733
- tslib_1.__metadata("design:type", EventEmitter)
734
- ], TreeViewComponent.prototype, "selectionChange", void 0);
735
- tslib_1.__decorate([
736
- Output(),
737
- tslib_1.__metadata("design:type", EventEmitter)
738
- ], TreeViewComponent.prototype, "filterChange", void 0);
739
- tslib_1.__decorate([
740
- Output(),
741
- tslib_1.__metadata("design:type", EventEmitter)
742
- ], TreeViewComponent.prototype, "nodeClick", void 0);
743
- tslib_1.__decorate([
744
- Output(),
745
- tslib_1.__metadata("design:type", EventEmitter)
746
- ], TreeViewComponent.prototype, "nodeDblClick", void 0);
747
- tslib_1.__decorate([
748
- ContentChild(NodeTemplateDirective, { static: false }),
749
- tslib_1.__metadata("design:type", NodeTemplateDirective)
750
- ], TreeViewComponent.prototype, "nodeTemplateQuery", void 0);
751
- tslib_1.__decorate([
752
- Input('nodeTemplate'),
753
- tslib_1.__metadata("design:type", NodeTemplateDirective),
754
- tslib_1.__metadata("design:paramtypes", [NodeTemplateDirective])
755
- ], TreeViewComponent.prototype, "nodeTemplateRef", null);
756
- tslib_1.__decorate([
757
- ContentChild(LoadMoreButtonTemplateDirective, { static: false }),
758
- tslib_1.__metadata("design:type", LoadMoreButtonTemplateDirective)
759
- ], TreeViewComponent.prototype, "loadMoreButtonTemplateQuery", void 0);
760
- tslib_1.__decorate([
761
- Input('loadMoreButtonTemplate'),
762
- tslib_1.__metadata("design:type", LoadMoreButtonTemplateDirective),
763
- tslib_1.__metadata("design:paramtypes", [LoadMoreButtonTemplateDirective])
764
- ], TreeViewComponent.prototype, "loadMoreButtonTemplateRef", null);
765
- tslib_1.__decorate([
766
- Input(),
767
- tslib_1.__metadata("design:type", Function)
768
- ], TreeViewComponent.prototype, "trackBy", void 0);
769
- tslib_1.__decorate([
770
- Input(),
771
- tslib_1.__metadata("design:type", Array),
772
- tslib_1.__metadata("design:paramtypes", [Array])
773
- ], TreeViewComponent.prototype, "nodes", null);
774
- tslib_1.__decorate([
775
- Input(),
776
- tslib_1.__metadata("design:type", Object)
777
- ], TreeViewComponent.prototype, "textField", void 0);
778
- tslib_1.__decorate([
779
- Input(),
780
- tslib_1.__metadata("design:type", Function),
781
- tslib_1.__metadata("design:paramtypes", [Function])
782
- ], TreeViewComponent.prototype, "hasChildren", null);
783
- tslib_1.__decorate([
784
- Input(),
785
- tslib_1.__metadata("design:type", Function),
786
- tslib_1.__metadata("design:paramtypes", [Function])
787
- ], TreeViewComponent.prototype, "isChecked", null);
788
- tslib_1.__decorate([
789
- Input(),
790
- tslib_1.__metadata("design:type", Function)
791
- ], TreeViewComponent.prototype, "isDisabled", void 0);
792
- tslib_1.__decorate([
793
- Input(),
794
- tslib_1.__metadata("design:type", Function),
795
- tslib_1.__metadata("design:paramtypes", [Function])
796
- ], TreeViewComponent.prototype, "isExpanded", null);
797
- tslib_1.__decorate([
798
- Input(),
799
- tslib_1.__metadata("design:type", Function),
800
- tslib_1.__metadata("design:paramtypes", [Function])
801
- ], TreeViewComponent.prototype, "isSelected", null);
802
- tslib_1.__decorate([
803
- Input(),
804
- tslib_1.__metadata("design:type", Function)
805
- ], TreeViewComponent.prototype, "isVisible", void 0);
806
- tslib_1.__decorate([
807
- Input(),
808
- tslib_1.__metadata("design:type", Boolean)
809
- ], TreeViewComponent.prototype, "navigable", void 0);
810
- tslib_1.__decorate([
811
- Input(),
812
- tslib_1.__metadata("design:type", Function)
813
- ], TreeViewComponent.prototype, "children", void 0);
814
- tslib_1.__decorate([
815
- Input(),
816
- tslib_1.__metadata("design:type", Boolean)
817
- ], TreeViewComponent.prototype, "loadOnDemand", void 0);
818
- tslib_1.__decorate([
819
- Input(),
820
- tslib_1.__metadata("design:type", Boolean)
821
- ], TreeViewComponent.prototype, "filterable", void 0);
822
- tslib_1.__decorate([
823
- Input(),
824
- tslib_1.__metadata("design:type", String)
825
- ], TreeViewComponent.prototype, "filter", void 0);
826
- tslib_1.__decorate([
827
- Input(),
828
- tslib_1.__metadata("design:type", String),
829
- tslib_1.__metadata("design:paramtypes", [String])
830
- ], TreeViewComponent.prototype, "size", null);
831
- TreeViewComponent = tslib_1.__decorate([
832
- Component({
833
- changeDetection: ChangeDetectionStrategy.Default,
834
- exportAs: 'kendoTreeView',
835
- providers: providers,
836
- selector: 'kendo-treeview',
837
- template: "\n <span\n class=\"k-treeview-filter\"\n *ngIf=\"filterable\"\n >\n <kendo-textbox\n [size]=\"size\"\n [value]=\"filter\"\n [clearButton]=\"true\"\n (valueChange)=\"filterChange.emit($event)\"\n [placeholder]=\"filterInputPlaceholder\"\n >\n <ng-template kendoTextBoxPrefixTemplate>\n <span class=\"k-input-icon k-icon k-i-search\"></span>\n </ng-template>\n </kendo-textbox>\n </span>\n <ul class=\"k-treeview-lines\"\n kendoTreeViewGroup\n role=\"group\"\n [size]=\"size\"\n [loadOnDemand]=\"loadOnDemand\"\n [checkboxes]=\"checkboxes\"\n [expandIcons]=\"expandIcons\"\n [selectable]=\"selectable\"\n [touchActions]=\"touchActions\"\n [children]=\"children\"\n [hasChildren]=\"hasChildren\"\n [isChecked]=\"isChecked\"\n [isDisabled]=\"isDisabled\"\n [isExpanded]=\"isExpanded\"\n [isSelected]=\"isSelected\"\n [isVisible]=\"isVisible\"\n [nodeTemplateRef]=\"nodeTemplateRef?.templateRef\"\n [loadMoreButtonTemplateRef]=\"loadMoreButtonTemplateRef?.templateRef\"\n [textField]=\"textField\"\n [nodes]=\"fetchNodes\"\n [loadMoreService]=\"loadMoreService\"\n [trackBy]=\"trackBy\"\n >\n </ul>\n <ng-container #assetsContainer></ng-container>\n "
838
- }),
839
- tslib_1.__metadata("design:paramtypes", [ElementRef,
840
- ChangeDetectorRef,
841
- ExpandStateService,
842
- NavigationService,
843
- NodeChildrenService,
844
- SelectionService,
845
- TreeViewLookupService,
846
- NgZone,
847
- Renderer2,
848
- DataChangeNotificationService,
849
- LocalizationService])
850
- ], TreeViewComponent);
851
- return TreeViewComponent;
852
- }());
853
- export { TreeViewComponent };