@exhaustive-ui/core 3.0.0-alpha.0 → 3.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
  2. package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
  4. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-api.mjs +6 -13
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
  8. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
  10. package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
  12. package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
  14. package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
  16. package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
  18. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
  20. package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-carousel.mjs +379 -451
  22. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
  24. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
  26. package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
  28. package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
  30. package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
  32. package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +157 -332
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
  38. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
  40. package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-datepicker.mjs +1012 -1157
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
  44. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
  46. package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
  48. package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
  50. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
  52. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
  54. package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
  56. package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-fileupload.mjs +486 -541
  58. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
  60. package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
  62. package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
  64. package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
  66. package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  68. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  70. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  72. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-inplace.mjs +64 -98
  74. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  76. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  78. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  80. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  82. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  84. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  86. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  88. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  90. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  92. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-listbox.mjs +365 -546
  94. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
  96. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  98. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  100. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  102. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-multiselect.mjs +647 -835
  104. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  106. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  108. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  110. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  112. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  114. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  116. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  118. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-picklist.mjs +557 -655
  120. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  122. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  124. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  126. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  128. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  130. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-select.mjs +581 -784
  132. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  134. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  136. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  138. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  140. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  142. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  144. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  146. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-table.mjs +2213 -2543
  148. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  150. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  152. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +318 -394
  154. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  156. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  158. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  160. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  162. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  164. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  166. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-treeselect.mjs +327 -421
  168. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  170. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  171. package/package.json +5 -5
  172. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  173. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  174. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  175. package/schematics/migrations.json +7 -2
  176. package/schematics/utils/removed-inputs.js +0 -0
  177. package/schematics/utils/renamed-inputs.js +175 -0
  178. package/schematics/utils/styleclass.js +24 -8
  179. package/schematics/utils/versions.json +8 -8
  180. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  181. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  182. package/types/exhaustive-ui-core-api.d.ts +2 -3
  183. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  184. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  185. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  186. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  187. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  188. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  189. package/types/exhaustive-ui-core-button.d.ts +57 -89
  190. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  191. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  192. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  193. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  194. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  195. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  196. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  197. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  198. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  199. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  200. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  201. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  202. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  203. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  204. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  205. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  206. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  207. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  208. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  209. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  210. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  211. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  212. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  213. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  214. package/types/exhaustive-ui-core-image.d.ts +35 -68
  215. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  216. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  217. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  218. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  219. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  220. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  221. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  222. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  223. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  224. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  225. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  226. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  227. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  228. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  229. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  230. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  231. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  232. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  233. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  234. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  235. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  236. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  237. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  238. package/types/exhaustive-ui-core-password.d.ts +56 -93
  239. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  240. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  241. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  242. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  243. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  244. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  245. package/types/exhaustive-ui-core-select.d.ts +137 -188
  246. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  247. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  248. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  249. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  250. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  251. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  252. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  253. package/types/exhaustive-ui-core-table.d.ts +349 -453
  254. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  255. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  256. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  257. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  258. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  259. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  260. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  261. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  262. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  263. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  264. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  265. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -2,7 +2,8 @@ export * from '@exhaustive-ui/core/types/tree';
2
2
  import * as i1 from '@angular/common';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, InjectionToken, inject, forwardRef, signal, computed, numberAttribute, booleanAttribute, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, model, output, contentChild, viewChild, contentChildren, HostListener, NgModule } from '@angular/core';
5
+ import { Injectable, InjectionToken, inject, input, numberAttribute, forwardRef, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, afterEveryRender, effect, untracked, model, booleanAttribute, output, contentChild, viewChild, contentChildren, HostListener, NgModule } from '@angular/core';
6
+ import { toSignal } from '@angular/core/rxjs-interop';
6
7
  import * as i2 from '@angular/forms';
7
8
  import { FormsModule } from '@angular/forms';
8
9
  import { getOuterWidth, getOuterHeight, find, findSingle, focus, removeAccents, resolveFieldData } from '@exhaustive-ui/utils';
@@ -26,10 +27,10 @@ const classes = {
26
27
  root: ({ instance }) => [
27
28
  'p-tree p-component',
28
29
  {
29
- 'p-tree-selectable': instance.selectionMode != null,
30
- 'p-tree-loading': instance.loading,
31
- 'p-tree-flex-scrollable': instance.scrollHeight === 'flex',
32
- 'p-tree-node-dragover': instance.dragHover
30
+ 'p-tree-selectable': instance.selectionMode() != null,
31
+ 'p-tree-loading': instance.loading(),
32
+ 'p-tree-flex-scrollable': instance.scrollHeight() === 'flex',
33
+ 'p-tree-node-dragover': instance.dragHover()
33
34
  }
34
35
  ],
35
36
  mask: 'p-tree-mask p-overlay-mask',
@@ -40,9 +41,9 @@ const classes = {
40
41
  node: ({ instance }) => ({ 'p-tree-node': true, 'p-tree-node-leaf': instance.isLeaf() }),
41
42
  nodeContent: ({ instance }) => ({
42
43
  'p-tree-node-content': true,
43
- 'p-tree-node-selectable': instance.selectable,
44
+ 'p-tree-node-selectable': instance.selectable(),
44
45
  'p-tree-node-dragover': instance.isNodeDropActive(),
45
- 'p-tree-node-selected': instance.selectionMode === 'checkbox' && instance.tree.highlightOnSelect ? instance.checked : instance.selected,
46
+ 'p-tree-node-selected': instance.tree.selectionMode() === 'checkbox' && instance.tree.highlightOnSelect() ? instance.checked() : instance.selected(),
46
47
  'p-tree-node-contextmenu-selected': instance.isContextMenuSelected()
47
48
  }),
48
49
  nodeToggleButton: 'p-tree-node-toggle-button',
@@ -146,19 +147,17 @@ const TREENODE_INSTANCE = new InjectionToken('TREENODE_INSTANCE');
146
147
  class UITreeNode extends BaseComponent {
147
148
  $pcTreeNode = inject(TREENODE_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
148
149
  static ICON_CLASS = 'p-tree-node-icon ';
149
- rowNode;
150
- node;
151
- parentNode;
152
- root;
153
- index;
154
- firstChild;
155
- lastChild;
156
- level;
157
- indentation;
158
- itemSize;
159
- loadingMode;
150
+ node = input(/* @ts-ignore */
151
+ ...(ngDevMode ? [undefined, { debugName: "node" }] : /* istanbul ignore next */ []));
152
+ parentNode = input(/* @ts-ignore */
153
+ ...(ngDevMode ? [undefined, { debugName: "parentNode" }] : /* istanbul ignore next */ []));
154
+ index = input(undefined, { ...(ngDevMode ? { debugName: "index" } : /* istanbul ignore next */ {}), transform: numberAttribute });
155
+ level = input(undefined, { ...(ngDevMode ? { debugName: "level" } : /* istanbul ignore next */ {}), transform: numberAttribute });
156
+ indentation = input(undefined, { ...(ngDevMode ? { debugName: "indentation" } : /* istanbul ignore next */ {}), transform: numberAttribute });
157
+ itemSize = input(undefined, { ...(ngDevMode ? { debugName: "itemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
158
+ loadingMode = input(/* @ts-ignore */
159
+ ...(ngDevMode ? [undefined, { debugName: "loadingMode" }] : /* istanbul ignore next */ []));
160
160
  tree = inject(forwardRef(() => Tree));
161
- timeout;
162
161
  isPrevDropPointHovered = signal(false, /* @ts-ignore */
163
162
  ...(ngDevMode ? [{ debugName: "isPrevDropPointHovered" }] : /* istanbul ignore next */ []));
164
163
  isNextDropPointHovered = signal(false, /* @ts-ignore */
@@ -180,7 +179,7 @@ class UITreeNode extends BaseComponent {
180
179
  _selected = computed(() => {
181
180
  // Reading selection() makes this computed reactive to selection changes
182
181
  this.tree.selection();
183
- return this.tree.isSelected(this.node);
182
+ return this.tree.isSelected(this.node());
184
183
  }, /* @ts-ignore */
185
184
  ...(ngDevMode ? [{ debugName: "_selected" }] : /* istanbul ignore next */ []));
186
185
  /**
@@ -188,129 +187,122 @@ class UITreeNode extends BaseComponent {
188
187
  */
189
188
  _contextMenuSelected = computed(() => {
190
189
  const selection = this.tree.contextMenuSelection();
191
- if (!selection || !this.node) {
190
+ const node = this.node();
191
+ if (!selection || !node) {
192
192
  return false;
193
193
  }
194
- return selection === this.node || (selection.key && selection.key === this.node.key);
194
+ return selection === node || (selection.key && selection.key === node.key);
195
195
  }, /* @ts-ignore */
196
196
  ...(ngDevMode ? [{ debugName: "_contextMenuSelected" }] : /* istanbul ignore next */ []));
197
- get selected() {
198
- return this.tree.selectionMode === 'single' || this.tree.selectionMode === 'multiple' ? this._selected() : undefined;
199
- }
200
- get checked() {
201
- return this.tree.selectionMode === 'checkbox' ? this._selected() : undefined;
202
- }
203
- get nodeClass() {
204
- return this.tree._componentStyle.classes.node({ instance: this });
205
- }
206
- get selectable() {
207
- return this.node?.selectable === false ? false : this.tree?.selectionMode != null;
208
- }
197
+ selected = computed(() => (this.tree.selectionMode() === 'single' || this.tree.selectionMode() === 'multiple' ? this._selected() : undefined), /* @ts-ignore */
198
+ ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
199
+ checked = computed(() => (this.tree.selectionMode() === 'checkbox' ? this._selected() : undefined), /* @ts-ignore */
200
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
201
+ selectable = computed(() => (this.node()?.selectable === false ? false : this.tree?.selectionMode() != null), /* @ts-ignore */
202
+ ...(ngDevMode ? [{ debugName: "selectable" }] : /* istanbul ignore next */ []));
209
203
  get subNodes() {
210
- return this.node?.parent ? this.node.parent.children : this.tree.value;
204
+ const node = this.node();
205
+ return node?.parent ? node.parent.children : this.tree.value();
211
206
  }
212
207
  getPTOptions(key) {
213
208
  return this.ptm(key, {
214
209
  context: {
215
- node: this.node,
216
- index: this.index,
217
- expanded: this.node?.expanded,
218
- selected: this.selected,
219
- checked: this.checked,
220
- partialChecked: this.node?.partialSelected,
210
+ node: this.node(),
211
+ index: this.index(),
212
+ expanded: this.node()?.expanded,
213
+ selected: this.selected(),
214
+ checked: this.checked(),
215
+ partialChecked: this.node()?.partialSelected,
221
216
  leaf: this.isLeaf()
222
217
  }
223
218
  });
224
219
  }
225
220
  onInit() {
226
- this.node.parent = this.parentNode;
221
+ const parentNode = this.parentNode();
222
+ this.node().parent = parentNode;
227
223
  const nativeElement = this.tree.el.nativeElement;
228
224
  const pDialogWrapper = nativeElement.closest('p-dialog');
229
- if (this.parentNode && !pDialogWrapper) {
225
+ if (parentNode && !pDialogWrapper) {
230
226
  this.setAllNodesTabIndexes();
231
- this.tree.syncNodeOption(this.node, this.tree.value, 'parent', this.tree.getNodeWithKey(this.parentNode.key, this.tree.value));
227
+ this.tree.syncNodeOption(this.node(), this.tree.value(), 'parent', this.tree.getNodeWithKey(parentNode.key, this.tree.value()));
232
228
  }
233
229
  }
234
230
  getIcon() {
231
+ const node = this.node();
235
232
  let icon;
236
- if (this.node.icon)
237
- icon = this.node.icon;
233
+ if (node.icon)
234
+ icon = node.icon;
238
235
  else
239
- icon = this.node.expanded && this.node.children && this.node.children?.length ? this.node.expandedIcon : this.node.collapsedIcon;
236
+ icon = node.expanded && node.children && node.children?.length ? node.expandedIcon : node.collapsedIcon;
240
237
  return UITreeNode.ICON_CLASS + ' ' + icon + ' p-tree-node-icon';
241
238
  }
242
239
  isLeaf() {
243
- return this.tree.isNodeLeaf(this.node);
244
- }
245
- isSelected() {
246
- return this._selected();
247
- }
248
- isContextMenuSelected() {
249
- return this._contextMenuSelected();
240
+ return this.tree.isNodeLeaf(this.node());
250
241
  }
242
+ isSelected = computed(() => this._selected(), /* @ts-ignore */
243
+ ...(ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []));
244
+ isContextMenuSelected = computed(() => this._contextMenuSelected(), /* @ts-ignore */
245
+ ...(ngDevMode ? [{ debugName: "isContextMenuSelected" }] : /* istanbul ignore next */ []));
251
246
  isSameNode(event) {
252
247
  return event.currentTarget && (event.currentTarget.isSameNode(event.target) || event.currentTarget.isSameNode(event.target.closest('[role="treeitem"]')));
253
248
  }
254
- isDraggable() {
255
- return this.tree.draggableNodes;
256
- }
249
+ isDraggable = computed(() => this.tree.draggableNodes(), /* @ts-ignore */
250
+ ...(ngDevMode ? [{ debugName: "isDraggable" }] : /* istanbul ignore next */ []));
257
251
  isDroppable() {
258
- return this.tree.droppableNodes && this.tree.allowDrop(this.tree.dragNode, this.node, this.tree.dragNodeScope);
252
+ return this.tree.droppableNodes() && this.tree.allowDrop(this.tree.dragNode(), this.node(), this.tree.dragNodeScope());
259
253
  }
260
254
  isNodeDroppable() {
261
- return this.node?.droppable !== false && this.isDroppable();
255
+ return this.node()?.droppable !== false && this.isDroppable();
262
256
  }
263
257
  isNodeDraggable() {
264
- return this.node?.draggable !== false && this.isDraggable();
258
+ return this.node()?.draggable !== false && this.isDraggable();
265
259
  }
266
260
  toggle(event) {
267
- if (this.node.expanded)
261
+ if (this.node().expanded)
268
262
  this.collapse(event);
269
263
  else
270
264
  this.expand(event);
271
265
  event.stopPropagation();
272
266
  }
273
267
  expand(event) {
274
- this.node.expanded = true;
275
- if (this.tree.virtualScroll) {
268
+ this.node().expanded = true;
269
+ if (this.tree.virtualScroll()) {
276
270
  this.tree.updateSerializedValue();
277
271
  this.focusVirtualNode();
278
272
  }
279
- this.tree.onNodeExpand.emit({ originalEvent: event, node: this.node });
273
+ this.tree.onNodeExpand.emit({ originalEvent: event, node: this.node() });
280
274
  }
281
275
  collapse(event) {
282
- this.node.expanded = false;
283
- if (this.tree.virtualScroll) {
276
+ this.node().expanded = false;
277
+ if (this.tree.virtualScroll()) {
284
278
  this.tree.updateSerializedValue();
285
279
  }
286
- this.tree.onNodeCollapse.emit({ originalEvent: event, node: this.node });
280
+ this.tree.onNodeCollapse.emit({ originalEvent: event, node: this.node() });
287
281
  this.focusVirtualNode();
288
282
  }
289
283
  onNodeClick(event) {
290
- this.tree.onNodeClick(event, this.node);
291
- }
292
- onNodeKeydown(event) {
293
- if (event.key === 'Enter') {
294
- this.tree.onNodeClick(event, this.node);
295
- }
284
+ this.tree.onNodeClick(event, this.node());
296
285
  }
297
286
  onNodeTouchEnd() {
298
287
  this.tree.onNodeTouchEnd();
299
288
  }
300
289
  onNodeRightClick(event) {
301
- this.tree.onNodeRightClick(event, this.node);
290
+ this.tree.onNodeRightClick(event, this.node());
302
291
  }
303
292
  onNodeDblClick(event) {
304
- this.tree.onNodeDblClick(event, this.node);
293
+ this.tree.onNodeDblClick(event, this.node());
305
294
  }
306
295
  insertNodeOnDrop() {
307
- const { dragNode, dragNodeIndex, dragNodeSubNodes } = this.tree;
308
- if (!this.node || dragNodeIndex == null || !dragNode || !dragNodeSubNodes) {
296
+ const dragNode = this.tree.dragNode();
297
+ const dragNodeIndex = this.tree.dragNodeIndex();
298
+ const dragNodeSubNodes = this.tree.dragNodeSubNodes();
299
+ const node = this.node();
300
+ if (!node || dragNodeIndex == null || !dragNode || !dragNodeSubNodes) {
309
301
  return;
310
302
  }
311
303
  const position = this.dropPosition();
312
304
  const subNodes = this.subNodes || [];
313
- const index = this.index || 0;
305
+ const index = this.index() || 0;
314
306
  const dropIndex = dragNodeSubNodes === subNodes ? (dragNodeIndex > index ? index : index - 1) : index;
315
307
  dragNodeSubNodes.splice(dragNodeIndex, 1);
316
308
  if (position < 0) {
@@ -323,8 +315,8 @@ class UITreeNode extends BaseComponent {
323
315
  }
324
316
  else {
325
317
  // insert as child of a Node
326
- this.node.children = this.node.children || [];
327
- this.node.children.push(dragNode);
318
+ node.children = node.children || [];
319
+ node.children.push(dragNode);
328
320
  }
329
321
  this.tree.dragDropService?.stopDrag({
330
322
  node: dragNode,
@@ -336,16 +328,16 @@ class UITreeNode extends BaseComponent {
336
328
  event.preventDefault();
337
329
  event.stopPropagation();
338
330
  if (this.isDroppable()) {
339
- const { dragNode } = this.tree;
331
+ const dragNode = this.tree.dragNode();
340
332
  const position = this.dropPosition();
341
333
  const isValidDrop = position !== 0 || (position === 0 && this.isNodeDroppable());
342
334
  if (isValidDrop) {
343
- if (this.tree.validateDrop) {
335
+ if (this.tree.validateDrop()) {
344
336
  this.tree.onNodeDrop.emit({
345
337
  originalEvent: event,
346
338
  dragNode: dragNode,
347
- dropNode: this.node,
348
- index: this.index,
339
+ dropNode: this.node(),
340
+ index: this.index(),
349
341
  accept: () => {
350
342
  this.insertNodeOnDrop();
351
343
  }
@@ -356,8 +348,8 @@ class UITreeNode extends BaseComponent {
356
348
  this.tree.onNodeDrop.emit({
357
349
  originalEvent: event,
358
350
  dragNode: dragNode,
359
- dropNode: this.node,
360
- index: this.index
351
+ dropNode: this.node(),
352
+ index: this.index()
361
353
  });
362
354
  }
363
355
  }
@@ -385,10 +377,10 @@ class UITreeNode extends BaseComponent {
385
377
  setTimeout(() => document.body.removeChild(dragEl), 0);
386
378
  this.tree.dragDropService?.startDrag({
387
379
  tree: this,
388
- node: this.node,
380
+ node: this.node(),
389
381
  subNodes: this.subNodes,
390
- index: this.index,
391
- scope: this.tree.draggableScope
382
+ index: this.index(),
383
+ scope: this.tree.draggableScope()
392
384
  });
393
385
  }
394
386
  else {
@@ -417,7 +409,7 @@ class UITreeNode extends BaseComponent {
417
409
  else {
418
410
  event.dataTransfer.dropEffect = 'none';
419
411
  }
420
- if (this.tree.droppableNodes) {
412
+ if (this.tree.droppableNodes()) {
421
413
  event.preventDefault();
422
414
  event.stopPropagation();
423
415
  }
@@ -430,13 +422,13 @@ class UITreeNode extends BaseComponent {
430
422
  onNodeDragEnd(event) {
431
423
  event.currentTarget?.removeAttribute('data-p-dragging');
432
424
  this.tree.dragDropService?.stopDrag({
433
- node: this.node,
425
+ node: this.node(),
434
426
  subNodes: this.subNodes,
435
- index: this.index
427
+ index: this.index()
436
428
  });
437
429
  }
438
430
  onKeyDown(event) {
439
- if (!this.isSameNode(event) || (this.tree.contextMenu && this.tree.contextMenu.containerViewChild?.nativeElement.style.display === 'block')) {
431
+ if (!this.isSameNode(event) || this.tree.contextMenu()?.visible?.()) {
440
432
  return;
441
433
  }
442
434
  switch (event.code) {
@@ -504,7 +496,7 @@ class UITreeNode extends BaseComponent {
504
496
  event.preventDefault();
505
497
  }
506
498
  onArrowRight(event) {
507
- if (!this.node?.expanded && !this.tree.isNodeLeaf(this.node)) {
499
+ if (!this.node()?.expanded && !this.tree.isNodeLeaf(this.node())) {
508
500
  this.expand(event);
509
501
  event.currentTarget.tabIndex = -1;
510
502
  setTimeout(() => {
@@ -515,10 +507,10 @@ class UITreeNode extends BaseComponent {
515
507
  }
516
508
  onArrowLeft(event) {
517
509
  const nodeElement = event.target.getAttribute('data-pc-section') === 'nodetogglebutton' ? event.target.closest('[role="treeitem"]') : event.target;
518
- if (this.level === 0 && !this.node?.expanded) {
510
+ if (this.level() === 0 && !this.node()?.expanded) {
519
511
  return false;
520
512
  }
521
- if (this.node?.expanded) {
513
+ if (this.node()?.expanded) {
522
514
  this.collapse(event);
523
515
  return;
524
516
  }
@@ -529,8 +521,8 @@ class UITreeNode extends BaseComponent {
529
521
  event.preventDefault();
530
522
  }
531
523
  onEnter(event) {
532
- this.tree.onNodeClick(event, this.node);
533
- this.setTabIndexForSelectionMode(event, this.tree.nodeTouched);
524
+ this.tree.onNodeClick(event, this.node());
525
+ this.setTabIndexForSelectionMode(event, this.tree.nodeTouched());
534
526
  event.preventDefault();
535
527
  }
536
528
  setAllNodesTabIndexes() {
@@ -549,7 +541,7 @@ class UITreeNode extends BaseComponent {
549
541
  }
550
542
  }
551
543
  setTabIndexForSelectionMode(event, nodeTouched) {
552
- if (this.tree.selectionMode !== null) {
544
+ if (this.tree.selectionMode() !== null) {
553
545
  const elements = [...find(this.tree.el.nativeElement, '[role="treeitem"]')];
554
546
  event.currentTarget.tabIndex = nodeTouched === false ? -1 : 0;
555
547
  if (elements.every((element) => element.tabIndex === -1)) {
@@ -593,27 +585,27 @@ class UITreeNode extends BaseComponent {
593
585
  this.focusNode(lastVisibleDescendant || currentFocusedRow);
594
586
  }
595
587
  focusVirtualNode() {
596
- this.timeout = setTimeout(() => {
597
- let node = findSingle(this.tree?.contentViewChild()?.nativeElement, `[data-id="${this.node?.key ?? this.node?.data}"]`);
588
+ setTimeout(() => {
589
+ let node = findSingle(this.tree?.contentViewChild()?.nativeElement, `[data-id="${this.node()?.key ?? this.node()?.data}"]`);
598
590
  focus(node);
599
591
  }, 1);
600
592
  }
601
593
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: UITreeNode, deps: null, target: i0.ɵɵFactoryTarget.Component });
602
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: UITreeNode, isStandalone: true, selector: "p-treeNode", inputs: { rowNode: "rowNode", node: "node", parentNode: "parentNode", root: ["root", "root", booleanAttribute], index: ["index", "index", numberAttribute], firstChild: ["firstChild", "firstChild", booleanAttribute], lastChild: ["lastChild", "lastChild", booleanAttribute], level: ["level", "level", numberAttribute], indentation: ["indentation", "indentation", numberAttribute], itemSize: ["itemSize", "itemSize", numberAttribute], loadingMode: "loadingMode" }, providers: [TreeStyle, { provide: TREENODE_INSTANCE, useExisting: UITreeNode }, { provide: PARENT_INSTANCE, useExisting: UITreeNode }], usesInheritance: true, ngImport: i0, template: `
603
- @if (node) {
594
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: UITreeNode, isStandalone: true, selector: "p-treeNode", inputs: { node: { classPropertyName: "node", publicName: "node", isSignal: true, isRequired: false, transformFunction: null }, parentNode: { classPropertyName: "parentNode", publicName: "parentNode", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, indentation: { classPropertyName: "indentation", publicName: "indentation", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, loadingMode: { classPropertyName: "loadingMode", publicName: "loadingMode", isSignal: true, isRequired: false, transformFunction: null } }, providers: [TreeStyle, { provide: TREENODE_INSTANCE, useExisting: UITreeNode }, { provide: PARENT_INSTANCE, useExisting: UITreeNode }], usesInheritance: true, ngImport: i0, template: `
595
+ @if (node()) {
604
596
  <li
605
- [class]="cn(cx('node'), node.styleClass)"
606
- [ngStyle]="{ height: itemSize + 'px' }"
607
- [style]="node.style"
608
- [attr.aria-label]="node.label"
609
- [attr.aria-checked]="checked"
610
- [attr.aria-setsize]="node.children ? node.children.length : 0"
611
- [attr.aria-selected]="selected"
612
- [attr.aria-expanded]="node.expanded"
613
- [attr.aria-posinset]="index + 1"
614
- [attr.aria-level]="level + 1"
615
- [attr.tabindex]="index === 0 ? 0 : -1"
616
- [attr.data-id]="node.key"
597
+ [class]="cn(cx('node'), node()!.styleClass)"
598
+ [ngStyle]="{ height: itemSize() + 'px' }"
599
+ [style]="node()!.style"
600
+ [attr.aria-label]="node()!.label"
601
+ [attr.aria-checked]="checked()"
602
+ [attr.aria-setsize]="node()!.children ? node()!.children!.length : 0"
603
+ [attr.aria-selected]="selected()"
604
+ [attr.aria-expanded]="node()!.expanded"
605
+ [attr.aria-posinset]="index()! + 1"
606
+ [attr.aria-level]="level()! + 1"
607
+ [attr.tabindex]="index() === 0 ? 0 : -1"
608
+ [attr.data-id]="node()!.key"
617
609
  role="treeitem"
618
610
  (keydown)="onKeyDown($event)"
619
611
  [pBind]="getPTOptions('node')"
@@ -623,7 +615,7 @@ class UITreeNode extends BaseComponent {
623
615
  }
624
616
  <div
625
617
  [class]="cx('nodeContent')"
626
- [style.paddingLeft]="level * indentation + 'rem'"
618
+ [style.paddingLeft]="level()! * indentation()! + 'rem'"
627
619
  (click)="onNodeClick($event)"
628
620
  (contextmenu)="onNodeRightClick($event)"
629
621
  (dblclick)="onNodeDblClick($event)"
@@ -633,53 +625,53 @@ class UITreeNode extends BaseComponent {
633
625
  (dragover)="onNodeDragOver($event)"
634
626
  (dragleave)="onNodeDragLeave($event)"
635
627
  (dragend)="onNodeDragEnd($event)"
636
- [draggable]="tree.draggableNodes"
628
+ [draggable]="tree.draggableNodes()"
637
629
  [pBind]="getPTOptions('nodeContent')"
638
630
  >
639
631
  <button type="button" [class]="cx('nodeToggleButton')" (click)="toggle($event)" pRipple tabindex="-1" [pBind]="getPTOptions('nodeToggleButton')">
640
- @if (!tree.togglerIconTemplate() && !tree._togglerIconTemplate) {
641
- @if (!node.loading) {
642
- @if (!node.expanded) {
632
+ @if (!tree.togglerIconTemplate() && !tree._togglerIconTemplate()) {
633
+ @if (!node()!.loading) {
634
+ @if (!node()!.expanded) {
643
635
  <svg data-p-icon="chevron-right" [class]="cx('nodeToggleIcon')" [pBind]="getPTOptions('nodeToggleIcon')" />
644
636
  }
645
- @if (node.expanded) {
637
+ @if (node()!.expanded) {
646
638
  <svg data-p-icon="chevron-down" [class]="cx('nodeToggleIcon')" [pBind]="getPTOptions('nodeToggleIcon')" />
647
639
  }
648
640
  }
649
- @if (loadingMode === 'icon' && node.loading) {
641
+ @if (loadingMode() === 'icon' && node()!.loading) {
650
642
  <svg data-p-icon="spinner" [class]="cx('nodeToggleIcon')" spin [pBind]="getPTOptions('nodeToggleIcon')" />
651
643
  }
652
644
  }
653
- @if (tree.togglerIconTemplate() || tree._togglerIconTemplate) {
645
+ @if (tree.togglerIconTemplate() || tree._togglerIconTemplate()) {
654
646
  <span [class]="cx('nodeToggleIcon')" [pBind]="getPTOptions('nodeToggleIcon')">
655
- <ng-template *ngTemplateOutlet="tree.togglerIconTemplate() || tree._togglerIconTemplate; context: { $implicit: node.expanded, loading: node.loading }"></ng-template>
647
+ <ng-template *ngTemplateOutlet="tree.togglerIconTemplate() || tree._togglerIconTemplate(); context: { $implicit: node()!.expanded, loading: node()!.loading }"></ng-template>
656
648
  </span>
657
649
  }
658
650
  </button>
659
651
 
660
- @if (tree.selectionMode == 'checkbox') {
652
+ @if (tree.selectionMode() == 'checkbox') {
661
653
  <p-checkbox
662
654
  [ngModel]="isSelected()"
663
655
  [ngModelOptions]="{ standalone: true }"
664
- [styleClass]="cx('nodeCheckbox')"
656
+ [class]="cx('nodeCheckbox')"
665
657
  [binary]="true"
666
- [indeterminate]="node.partialSelected"
667
- [disabled]="node.selectable === false"
658
+ [indeterminate]="node()!.partialSelected"
659
+ [disabled]="node()!.selectable === false"
668
660
  [variant]="tree?.config.inputStyle() === 'filled' || tree?.config.inputVariant() === 'filled' ? 'filled' : 'outlined'"
669
- [attr.data-p-partialchecked]="node.partialSelected"
661
+ [attr.data-p-partialchecked]="node()!.partialSelected"
670
662
  [tabindex]="-1"
671
663
  (click)="$event.preventDefault()"
672
664
  [pt]="getPTOptions('pcNodeCheckbox')"
673
665
  [unstyled]="unstyled()"
674
666
  >
675
- @if (tree.checkboxIconTemplate() || tree._checkboxIconTemplate) {
667
+ @if (tree.checkboxIconTemplate() || tree._checkboxIconTemplate()) {
676
668
  <ng-template #icon>
677
669
  <ng-template
678
670
  *ngTemplateOutlet="
679
- tree.checkboxIconTemplate() || tree._checkboxIconTemplate;
671
+ tree.checkboxIconTemplate() || tree._checkboxIconTemplate();
680
672
  context: {
681
673
  $implicit: isSelected(),
682
- partialSelected: node.partialSelected,
674
+ partialSelected: node()!.partialSelected,
683
675
  class: cx('nodeCheckbox')
684
676
  }
685
677
  "
@@ -689,16 +681,16 @@ class UITreeNode extends BaseComponent {
689
681
  </p-checkbox>
690
682
  }
691
683
 
692
- @if (node.icon || node.expandedIcon || node.collapsedIcon) {
684
+ @if (node()!.icon || node()!.expandedIcon || node()!.collapsedIcon) {
693
685
  <span [class]="getIcon()" [pBind]="getPTOptions('nodeIcon')"></span>
694
686
  }
695
687
  <span [class]="cx('nodeLabel')" [pBind]="getPTOptions('nodeLabel')">
696
- @if (!tree.getTemplateForNode(node)) {
697
- <span>{{ node.label }}</span>
688
+ @if (!tree.getTemplateForNode(node()!)) {
689
+ <span>{{ node()!.label }}</span>
698
690
  }
699
- @if (tree.getTemplateForNode(node)) {
691
+ @if (tree.getTemplateForNode(node()!)) {
700
692
  <span>
701
- <ng-container *ngTemplateOutlet="tree.getTemplateForNode(node); context: { $implicit: node }"></ng-container>
693
+ <ng-container *ngTemplateOutlet="tree.getTemplateForNode(node()!); context: { $implicit: node() }"></ng-container>
702
694
  </span>
703
695
  }
704
696
  </span>
@@ -706,50 +698,38 @@ class UITreeNode extends BaseComponent {
706
698
  @if (isNextDropPointActive()) {
707
699
  <div [class]="cx('dropPoint', { next: true })" [attr.aria-hidden]="true" [pBind]="getPTOptions('dropPoint')"></div>
708
700
  }
709
- @if (!tree.virtualScroll && node.children && node.expanded) {
701
+ @if (!tree.virtualScroll() && node()!.children && node()!.expanded) {
710
702
  <ul [class]="cx('nodeChildren')" role="group" [pBind]="ptm('nodeChildren')">
711
- @for (childNode of node.children; track tree.trackBy.bind(this)(index, childNode); let firstChild = $first; let lastChild = $last; let index = $index) {
712
- <p-treeNode
713
- [node]="childNode"
714
- [parentNode]="node"
715
- [firstChild]="firstChild"
716
- [lastChild]="lastChild"
717
- [index]="index"
718
- [itemSize]="itemSize"
719
- [level]="level + 1"
720
- [loadingMode]="loadingMode"
721
- [pt]="pt"
722
- [unstyled]="unstyled()"
723
- ></p-treeNode>
703
+ @for (childNode of node()!.children; track tree.trackBy().bind(this)(index, childNode); let index = $index) {
704
+ <p-treeNode [node]="childNode" [parentNode]="node()" [index]="index" [itemSize]="itemSize()" [level]="level()! + 1" [loadingMode]="loadingMode()" [pt]="pt()" [unstyled]="unstyled()"></p-treeNode>
724
705
  }
725
706
  </ul>
726
707
  }
727
708
  </li>
728
709
  }
729
- `, isInline: true, dependencies: [{ kind: "component", type: UITreeNode, selector: "p-treeNode", inputs: ["rowNode", "node", "parentNode", "root", "index", "firstChild", "lastChild", "level", "indentation", "itemSize", "loadingMode"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ChevronRightIcon, selector: "[data-p-icon=\"chevron-right\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i3.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
710
+ `, isInline: true, dependencies: [{ kind: "component", type: UITreeNode, selector: "p-treeNode", inputs: ["node", "parentNode", "index", "level", "indentation", "itemSize", "loadingMode"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ChevronRightIcon, selector: "[data-p-icon=\"chevron-right\"]" }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i3.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
730
711
  }
731
712
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: UITreeNode, decorators: [{
732
713
  type: Component,
733
714
  args: [{
734
715
  selector: 'p-treeNode',
735
- standalone: true,
736
716
  imports: [CommonModule, Ripple, Checkbox, FormsModule, ChevronRightIcon, ChevronDownIcon, SpinnerIcon, SharedModule, BindModule],
737
717
  changeDetection: ChangeDetectionStrategy.OnPush,
738
718
  template: `
739
- @if (node) {
719
+ @if (node()) {
740
720
  <li
741
- [class]="cn(cx('node'), node.styleClass)"
742
- [ngStyle]="{ height: itemSize + 'px' }"
743
- [style]="node.style"
744
- [attr.aria-label]="node.label"
745
- [attr.aria-checked]="checked"
746
- [attr.aria-setsize]="node.children ? node.children.length : 0"
747
- [attr.aria-selected]="selected"
748
- [attr.aria-expanded]="node.expanded"
749
- [attr.aria-posinset]="index + 1"
750
- [attr.aria-level]="level + 1"
751
- [attr.tabindex]="index === 0 ? 0 : -1"
752
- [attr.data-id]="node.key"
721
+ [class]="cn(cx('node'), node()!.styleClass)"
722
+ [ngStyle]="{ height: itemSize() + 'px' }"
723
+ [style]="node()!.style"
724
+ [attr.aria-label]="node()!.label"
725
+ [attr.aria-checked]="checked()"
726
+ [attr.aria-setsize]="node()!.children ? node()!.children!.length : 0"
727
+ [attr.aria-selected]="selected()"
728
+ [attr.aria-expanded]="node()!.expanded"
729
+ [attr.aria-posinset]="index()! + 1"
730
+ [attr.aria-level]="level()! + 1"
731
+ [attr.tabindex]="index() === 0 ? 0 : -1"
732
+ [attr.data-id]="node()!.key"
753
733
  role="treeitem"
754
734
  (keydown)="onKeyDown($event)"
755
735
  [pBind]="getPTOptions('node')"
@@ -759,7 +739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
759
739
  }
760
740
  <div
761
741
  [class]="cx('nodeContent')"
762
- [style.paddingLeft]="level * indentation + 'rem'"
742
+ [style.paddingLeft]="level()! * indentation()! + 'rem'"
763
743
  (click)="onNodeClick($event)"
764
744
  (contextmenu)="onNodeRightClick($event)"
765
745
  (dblclick)="onNodeDblClick($event)"
@@ -769,53 +749,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
769
749
  (dragover)="onNodeDragOver($event)"
770
750
  (dragleave)="onNodeDragLeave($event)"
771
751
  (dragend)="onNodeDragEnd($event)"
772
- [draggable]="tree.draggableNodes"
752
+ [draggable]="tree.draggableNodes()"
773
753
  [pBind]="getPTOptions('nodeContent')"
774
754
  >
775
755
  <button type="button" [class]="cx('nodeToggleButton')" (click)="toggle($event)" pRipple tabindex="-1" [pBind]="getPTOptions('nodeToggleButton')">
776
- @if (!tree.togglerIconTemplate() && !tree._togglerIconTemplate) {
777
- @if (!node.loading) {
778
- @if (!node.expanded) {
756
+ @if (!tree.togglerIconTemplate() && !tree._togglerIconTemplate()) {
757
+ @if (!node()!.loading) {
758
+ @if (!node()!.expanded) {
779
759
  <svg data-p-icon="chevron-right" [class]="cx('nodeToggleIcon')" [pBind]="getPTOptions('nodeToggleIcon')" />
780
760
  }
781
- @if (node.expanded) {
761
+ @if (node()!.expanded) {
782
762
  <svg data-p-icon="chevron-down" [class]="cx('nodeToggleIcon')" [pBind]="getPTOptions('nodeToggleIcon')" />
783
763
  }
784
764
  }
785
- @if (loadingMode === 'icon' && node.loading) {
765
+ @if (loadingMode() === 'icon' && node()!.loading) {
786
766
  <svg data-p-icon="spinner" [class]="cx('nodeToggleIcon')" spin [pBind]="getPTOptions('nodeToggleIcon')" />
787
767
  }
788
768
  }
789
- @if (tree.togglerIconTemplate() || tree._togglerIconTemplate) {
769
+ @if (tree.togglerIconTemplate() || tree._togglerIconTemplate()) {
790
770
  <span [class]="cx('nodeToggleIcon')" [pBind]="getPTOptions('nodeToggleIcon')">
791
- <ng-template *ngTemplateOutlet="tree.togglerIconTemplate() || tree._togglerIconTemplate; context: { $implicit: node.expanded, loading: node.loading }"></ng-template>
771
+ <ng-template *ngTemplateOutlet="tree.togglerIconTemplate() || tree._togglerIconTemplate(); context: { $implicit: node()!.expanded, loading: node()!.loading }"></ng-template>
792
772
  </span>
793
773
  }
794
774
  </button>
795
775
 
796
- @if (tree.selectionMode == 'checkbox') {
776
+ @if (tree.selectionMode() == 'checkbox') {
797
777
  <p-checkbox
798
778
  [ngModel]="isSelected()"
799
779
  [ngModelOptions]="{ standalone: true }"
800
- [styleClass]="cx('nodeCheckbox')"
780
+ [class]="cx('nodeCheckbox')"
801
781
  [binary]="true"
802
- [indeterminate]="node.partialSelected"
803
- [disabled]="node.selectable === false"
782
+ [indeterminate]="node()!.partialSelected"
783
+ [disabled]="node()!.selectable === false"
804
784
  [variant]="tree?.config.inputStyle() === 'filled' || tree?.config.inputVariant() === 'filled' ? 'filled' : 'outlined'"
805
- [attr.data-p-partialchecked]="node.partialSelected"
785
+ [attr.data-p-partialchecked]="node()!.partialSelected"
806
786
  [tabindex]="-1"
807
787
  (click)="$event.preventDefault()"
808
788
  [pt]="getPTOptions('pcNodeCheckbox')"
809
789
  [unstyled]="unstyled()"
810
790
  >
811
- @if (tree.checkboxIconTemplate() || tree._checkboxIconTemplate) {
791
+ @if (tree.checkboxIconTemplate() || tree._checkboxIconTemplate()) {
812
792
  <ng-template #icon>
813
793
  <ng-template
814
794
  *ngTemplateOutlet="
815
- tree.checkboxIconTemplate() || tree._checkboxIconTemplate;
795
+ tree.checkboxIconTemplate() || tree._checkboxIconTemplate();
816
796
  context: {
817
797
  $implicit: isSelected(),
818
- partialSelected: node.partialSelected,
798
+ partialSelected: node()!.partialSelected,
819
799
  class: cx('nodeCheckbox')
820
800
  }
821
801
  "
@@ -825,16 +805,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
825
805
  </p-checkbox>
826
806
  }
827
807
 
828
- @if (node.icon || node.expandedIcon || node.collapsedIcon) {
808
+ @if (node()!.icon || node()!.expandedIcon || node()!.collapsedIcon) {
829
809
  <span [class]="getIcon()" [pBind]="getPTOptions('nodeIcon')"></span>
830
810
  }
831
811
  <span [class]="cx('nodeLabel')" [pBind]="getPTOptions('nodeLabel')">
832
- @if (!tree.getTemplateForNode(node)) {
833
- <span>{{ node.label }}</span>
812
+ @if (!tree.getTemplateForNode(node()!)) {
813
+ <span>{{ node()!.label }}</span>
834
814
  }
835
- @if (tree.getTemplateForNode(node)) {
815
+ @if (tree.getTemplateForNode(node()!)) {
836
816
  <span>
837
- <ng-container *ngTemplateOutlet="tree.getTemplateForNode(node); context: { $implicit: node }"></ng-container>
817
+ <ng-container *ngTemplateOutlet="tree.getTemplateForNode(node()!); context: { $implicit: node() }"></ng-container>
838
818
  </span>
839
819
  }
840
820
  </span>
@@ -842,21 +822,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
842
822
  @if (isNextDropPointActive()) {
843
823
  <div [class]="cx('dropPoint', { next: true })" [attr.aria-hidden]="true" [pBind]="getPTOptions('dropPoint')"></div>
844
824
  }
845
- @if (!tree.virtualScroll && node.children && node.expanded) {
825
+ @if (!tree.virtualScroll() && node()!.children && node()!.expanded) {
846
826
  <ul [class]="cx('nodeChildren')" role="group" [pBind]="ptm('nodeChildren')">
847
- @for (childNode of node.children; track tree.trackBy.bind(this)(index, childNode); let firstChild = $first; let lastChild = $last; let index = $index) {
848
- <p-treeNode
849
- [node]="childNode"
850
- [parentNode]="node"
851
- [firstChild]="firstChild"
852
- [lastChild]="lastChild"
853
- [index]="index"
854
- [itemSize]="itemSize"
855
- [level]="level + 1"
856
- [loadingMode]="loadingMode"
857
- [pt]="pt"
858
- [unstyled]="unstyled()"
859
- ></p-treeNode>
827
+ @for (childNode of node()!.children; track tree.trackBy().bind(this)(index, childNode); let index = $index) {
828
+ <p-treeNode [node]="childNode" [parentNode]="node()" [index]="index" [itemSize]="itemSize()" [level]="level()! + 1" [loadingMode]="loadingMode()" [pt]="pt()" [unstyled]="unstyled()"></p-treeNode>
860
829
  }
861
830
  </ul>
862
831
  }
@@ -866,36 +835,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
866
835
  encapsulation: ViewEncapsulation.None,
867
836
  providers: [TreeStyle, { provide: TREENODE_INSTANCE, useExisting: UITreeNode }, { provide: PARENT_INSTANCE, useExisting: UITreeNode }]
868
837
  }]
869
- }], propDecorators: { rowNode: [{
870
- type: Input
871
- }], node: [{
872
- type: Input
873
- }], parentNode: [{
874
- type: Input
875
- }], root: [{
876
- type: Input,
877
- args: [{ transform: booleanAttribute }]
878
- }], index: [{
879
- type: Input,
880
- args: [{ transform: numberAttribute }]
881
- }], firstChild: [{
882
- type: Input,
883
- args: [{ transform: booleanAttribute }]
884
- }], lastChild: [{
885
- type: Input,
886
- args: [{ transform: booleanAttribute }]
887
- }], level: [{
888
- type: Input,
889
- args: [{ transform: numberAttribute }]
890
- }], indentation: [{
891
- type: Input,
892
- args: [{ transform: numberAttribute }]
893
- }], itemSize: [{
894
- type: Input,
895
- args: [{ transform: numberAttribute }]
896
- }], loadingMode: [{
897
- type: Input
898
- }] } });
838
+ }], propDecorators: { node: [{ type: i0.Input, args: [{ isSignal: true, alias: "node", required: false }] }], parentNode: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentNode", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], indentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "indentation", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], loadingMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMode", required: false }] }] } });
899
839
  /**
900
840
  * Tree is used to display hierarchical data.
901
841
  * @group Components
@@ -905,46 +845,55 @@ class Tree extends BaseComponent {
905
845
  componentName = 'Tree';
906
846
  bindDirectiveInstance = inject(Bind, { self: true });
907
847
  $pcTree = inject(TREE_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
908
- onAfterViewChecked() {
909
- this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
848
+ constructor() {
849
+ super();
850
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
851
+ effect(() => {
852
+ this.value();
853
+ untracked(() => {
854
+ this.updateSerializedValue();
855
+ if (this.hasFilterActive()) {
856
+ this._filter(this.filterViewChild()?.nativeElement?.value);
857
+ }
858
+ });
859
+ });
910
860
  }
911
861
  /**
912
862
  * An array of treenodes.
913
863
  * @group Props
914
864
  */
915
- value;
865
+ value = model(/* @ts-ignore */
866
+ ...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
916
867
  /**
917
868
  * Defines the selection mode.
918
869
  * @group Props
919
870
  */
920
- selectionMode;
871
+ selectionMode = input(/* @ts-ignore */
872
+ ...(ngDevMode ? [undefined, { debugName: "selectionMode" }] : /* istanbul ignore next */ []));
921
873
  /**
922
874
  * Loading mode display.
923
875
  * @group Props
924
876
  */
925
- loadingMode = 'mask';
877
+ loadingMode = input('mask', /* @ts-ignore */
878
+ ...(ngDevMode ? [{ debugName: "loadingMode" }] : /* istanbul ignore next */ []));
926
879
  /**
927
880
  * A single treenode instance or an array to refer to the selections.
928
881
  * @group Props
929
882
  */
930
883
  selection = model(null, /* @ts-ignore */
931
884
  ...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
932
- /**
933
- * Style class of the component.
934
- * @deprecated since v20.0.0, use `class` instead.
935
- * @group Props
936
- */
937
- styleClass;
938
885
  /**
939
886
  * Context menu instance.
940
887
  * @group Props
941
888
  */
942
- contextMenu;
889
+ contextMenu = input(/* @ts-ignore */
890
+ ...(ngDevMode ? [undefined, { debugName: "contextMenu" }] : /* istanbul ignore next */ []));
943
891
  /**
944
892
  * Defines the behavior of context menu selection, in "separate" mode context menu updates contextMenuSelection property whereas in joint mode selection property is used instead so that when row selection is enabled, both row selection and context menu selection use the same property.
945
893
  * @group Props
946
894
  */
947
- contextMenuSelectionMode = 'joint';
895
+ contextMenuSelectionMode = input('joint', /* @ts-ignore */
896
+ ...(ngDevMode ? [{ debugName: "contextMenuSelectionMode" }] : /* istanbul ignore next */ []));
948
897
  /**
949
898
  * Selected node with a context menu.
950
899
  * @group Props
@@ -955,157 +904,174 @@ class Tree extends BaseComponent {
955
904
  * Scope of the draggable nodes to match a droppableScope.
956
905
  * @group Props
957
906
  */
958
- draggableScope;
907
+ draggableScope = input(/* @ts-ignore */
908
+ ...(ngDevMode ? [undefined, { debugName: "draggableScope" }] : /* istanbul ignore next */ []));
959
909
  /**
960
910
  * Scope of the droppable nodes to match a draggableScope.
961
911
  * @group Props
962
912
  */
963
- droppableScope;
913
+ droppableScope = input(/* @ts-ignore */
914
+ ...(ngDevMode ? [undefined, { debugName: "droppableScope" }] : /* istanbul ignore next */ []));
964
915
  /**
965
916
  * Whether the nodes are draggable.
966
917
  * @group Props
967
918
  */
968
- draggableNodes;
919
+ draggableNodes = input(undefined, { ...(ngDevMode ? { debugName: "draggableNodes" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
969
920
  /**
970
921
  * Whether the nodes are droppable.
971
922
  * @group Props
972
923
  */
973
- droppableNodes;
924
+ droppableNodes = input(undefined, { ...(ngDevMode ? { debugName: "droppableNodes" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
974
925
  /**
975
926
  * Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.
976
927
  * @group Props
977
928
  */
978
- metaKeySelection = false;
929
+ metaKeySelection = input(false, { ...(ngDevMode ? { debugName: "metaKeySelection" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
979
930
  /**
980
931
  * Whether checkbox selections propagate to ancestor nodes.
981
932
  * @group Props
982
933
  */
983
- propagateSelectionUp = true;
934
+ propagateSelectionUp = input(true, { ...(ngDevMode ? { debugName: "propagateSelectionUp" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
984
935
  /**
985
936
  * Whether checkbox selections propagate to descendant nodes.
986
937
  * @group Props
987
938
  */
988
- propagateSelectionDown = true;
939
+ propagateSelectionDown = input(true, { ...(ngDevMode ? { debugName: "propagateSelectionDown" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
989
940
  /**
990
941
  * Displays a loader to indicate data load is in progress.
991
942
  * @group Props
992
943
  */
993
- loading;
944
+ loading = input(undefined, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
994
945
  /**
995
946
  * The icon to show while indicating data load is in progress.
996
947
  * @group Props
997
948
  */
998
- loadingIcon;
949
+ loadingIcon = input(/* @ts-ignore */
950
+ ...(ngDevMode ? [undefined, { debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
999
951
  /**
1000
952
  * Text to display when there is no data.
1001
953
  * @group Props
1002
954
  */
1003
- emptyMessage = '';
955
+ emptyMessage = input('', /* @ts-ignore */
956
+ ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
1004
957
  /**
1005
958
  * Used to define a string that labels the tree.
1006
959
  * @group Props
1007
960
  */
1008
- ariaLabel;
961
+ ariaLabel = input(/* @ts-ignore */
962
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
1009
963
  /**
1010
964
  * Defines a string that labels the toggler icon for accessibility.
1011
965
  * @group Props
1012
966
  */
1013
- togglerAriaLabel;
967
+ togglerAriaLabel = input(/* @ts-ignore */
968
+ ...(ngDevMode ? [undefined, { debugName: "togglerAriaLabel" }] : /* istanbul ignore next */ []));
1014
969
  /**
1015
970
  * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
1016
971
  * @group Props
1017
972
  */
1018
- ariaLabelledBy;
973
+ ariaLabelledBy = input(/* @ts-ignore */
974
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
1019
975
  /**
1020
976
  * When enabled, drop can be accepted or rejected based on condition defined at onNodeDrop.
1021
977
  * @group Props
1022
978
  */
1023
- validateDrop;
979
+ validateDrop = input(undefined, { ...(ngDevMode ? { debugName: "validateDrop" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1024
980
  /**
1025
981
  * When specified, displays an input field to filter the items.
1026
982
  * @group Props
1027
983
  */
1028
- filter;
984
+ filter = input(undefined, { ...(ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1029
985
  /**
1030
986
  * Determines whether the filter input should be automatically focused when the component is rendered.
1031
987
  * @group Props
1032
988
  */
1033
- filterInputAutoFocus = false;
989
+ filterInputAutoFocus = input(false, { ...(ngDevMode ? { debugName: "filterInputAutoFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1034
990
  /**
1035
991
  * When filtering is enabled, filterBy decides which field or fields (comma separated) to search against.
1036
992
  * @group Props
1037
993
  */
1038
- filterBy = 'label';
994
+ filterBy = input('label', /* @ts-ignore */
995
+ ...(ngDevMode ? [{ debugName: "filterBy" }] : /* istanbul ignore next */ []));
1039
996
  /**
1040
997
  * Mode for filtering valid values are "lenient" and "strict". Default is lenient.
1041
998
  * @group Props
1042
999
  */
1043
- filterMode = 'lenient';
1000
+ filterMode = input('lenient', /* @ts-ignore */
1001
+ ...(ngDevMode ? [{ debugName: "filterMode" }] : /* istanbul ignore next */ []));
1044
1002
  /**
1045
1003
  * Mode for filtering valid values are "lenient" and "strict". Default is lenient.
1046
1004
  * @group Props
1047
1005
  */
1048
- filterOptions;
1006
+ filterOptions = input(/* @ts-ignore */
1007
+ ...(ngDevMode ? [undefined, { debugName: "filterOptions" }] : /* istanbul ignore next */ []));
1049
1008
  /**
1050
1009
  * Placeholder text to show when filter input is empty.
1051
1010
  * @group Props
1052
1011
  */
1053
- filterPlaceholder;
1012
+ filterPlaceholder = input(/* @ts-ignore */
1013
+ ...(ngDevMode ? [undefined, { debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
1054
1014
  /**
1055
1015
  * Values after the tree nodes are filtered.
1056
1016
  * @group Props
1057
1017
  */
1058
- filteredNodes;
1018
+ filteredNodes = model(/* @ts-ignore */
1019
+ ...(ngDevMode ? [undefined, { debugName: "filteredNodes" }] : /* istanbul ignore next */ []));
1059
1020
  /**
1060
1021
  * Locale to use in filtering. The default locale is the host environment's current locale.
1061
1022
  * @group Props
1062
1023
  */
1063
- filterLocale;
1024
+ filterLocale = input(/* @ts-ignore */
1025
+ ...(ngDevMode ? [undefined, { debugName: "filterLocale" }] : /* istanbul ignore next */ []));
1064
1026
  /**
1065
1027
  * Height of the scrollable viewport.
1066
1028
  * @group Props
1067
1029
  */
1068
- scrollHeight;
1030
+ scrollHeight = input(/* @ts-ignore */
1031
+ ...(ngDevMode ? [undefined, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
1069
1032
  /**
1070
1033
  * Defines if data is loaded and interacted with in lazy manner.
1071
1034
  * @group Props
1072
1035
  */
1073
- lazy = false;
1036
+ lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1074
1037
  /**
1075
1038
  * Whether the data should be loaded on demand during scroll.
1076
1039
  * @group Props
1077
1040
  */
1078
- virtualScroll;
1041
+ virtualScroll = input(undefined, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1079
1042
  /**
1080
1043
  * Height of an item in the list for VirtualScrolling.
1081
1044
  * @group Props
1082
1045
  */
1083
- virtualScrollItemSize;
1046
+ virtualScrollItemSize = input(undefined, { ...(ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
1084
1047
  /**
1085
1048
  * Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
1086
1049
  * @group Props
1087
1050
  */
1088
- virtualScrollOptions;
1051
+ virtualScrollOptions = input(/* @ts-ignore */
1052
+ ...(ngDevMode ? [undefined, { debugName: "virtualScrollOptions" }] : /* istanbul ignore next */ []));
1089
1053
  /**
1090
1054
  * Indentation factor for spacing of the nested node when virtual scrolling is enabled.
1091
1055
  * @group Props
1092
1056
  */
1093
- indentation = 1.5;
1057
+ indentation = input(1.5, { ...(ngDevMode ? { debugName: "indentation" } : /* istanbul ignore next */ {}), transform: numberAttribute });
1094
1058
  /**
1095
1059
  * Custom templates of the component.
1096
1060
  * @group Props
1097
1061
  */
1098
- _templateMap;
1062
+ _templateMap = input(/* @ts-ignore */
1063
+ ...(ngDevMode ? [undefined, { debugName: "_templateMap" }] : /* istanbul ignore next */ []));
1099
1064
  /**
1100
1065
  * Function to optimize the node list rendering, default algorithm checks for object identity.
1101
1066
  * @group Props
1102
1067
  */
1103
- trackBy = (index, item) => item;
1068
+ trackBy = input((index, item) => item, /* @ts-ignore */
1069
+ ...(ngDevMode ? [{ debugName: "trackBy" }] : /* istanbul ignore next */ []));
1104
1070
  /**
1105
1071
  * Highlights the node on select.
1106
1072
  * @group Props
1107
1073
  */
1108
- highlightOnSelect = false;
1074
+ highlightOnSelect = input(false, { ...(ngDevMode ? { debugName: "highlightOnSelect" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
1109
1075
  /**
1110
1076
  * Callback to invoke when a node is selected.
1111
1077
  * @param {TreeNodeSelectEvent} event - Node select event.
@@ -1235,64 +1201,74 @@ class Tree extends BaseComponent {
1235
1201
  ...(ngDevMode ? [{ debugName: "contentViewChild" }] : /* istanbul ignore next */ []));
1236
1202
  templates = contentChildren(PrimeTemplate, /* @ts-ignore */
1237
1203
  ...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
1238
- _headerTemplate;
1239
- _emptyTemplate;
1240
- _footerTemplate;
1241
- _loaderTemplate;
1242
- _togglerIconTemplate;
1243
- _checkboxIconTemplate;
1244
- _loadingIconTemplate;
1245
- _filterIconTemplate;
1246
- _filterTemplate;
1247
- onAfterContentInit() {
1248
- if (this.templates().length) {
1249
- this._templateMap = {};
1250
- }
1251
- this.templates().forEach((item) => {
1252
- switch (item.getType()) {
1253
- case 'header':
1254
- this._headerTemplate = item.template;
1255
- break;
1256
- case 'empty':
1257
- this._emptyTemplate = item.template;
1258
- break;
1259
- case 'footer':
1260
- this._footerTemplate = item.template;
1261
- break;
1262
- case 'loader':
1263
- this._loaderTemplate = item.template;
1264
- break;
1265
- case 'togglericon':
1266
- this._togglerIconTemplate = item.template;
1267
- break;
1268
- case 'checkboxicon':
1269
- this._checkboxIconTemplate = item.template;
1270
- break;
1271
- case 'loadingicon':
1272
- this._loadingIconTemplate = item.template;
1273
- break;
1274
- case 'filtericon':
1275
- this._filterIconTemplate = item.template;
1276
- break;
1277
- case 'filter':
1278
- this._filterTemplate = item.template;
1279
- break;
1280
- default:
1281
- this._templateMap[item.name] = item.template;
1282
- break;
1204
+ _headerTemplate = computed(() => this.templates()
1205
+ .filter((item) => item.getType() === 'header')
1206
+ .at(-1)?.template, /* @ts-ignore */
1207
+ ...(ngDevMode ? [{ debugName: "_headerTemplate" }] : /* istanbul ignore next */ []));
1208
+ _emptyTemplate = computed(() => this.templates()
1209
+ .filter((item) => item.getType() === 'empty')
1210
+ .at(-1)?.template, /* @ts-ignore */
1211
+ ...(ngDevMode ? [{ debugName: "_emptyTemplate" }] : /* istanbul ignore next */ []));
1212
+ _footerTemplate = computed(() => this.templates()
1213
+ .filter((item) => item.getType() === 'footer')
1214
+ .at(-1)?.template, /* @ts-ignore */
1215
+ ...(ngDevMode ? [{ debugName: "_footerTemplate" }] : /* istanbul ignore next */ []));
1216
+ _loaderTemplate = computed(() => this.templates()
1217
+ .filter((item) => item.getType() === 'loader')
1218
+ .at(-1)?.template, /* @ts-ignore */
1219
+ ...(ngDevMode ? [{ debugName: "_loaderTemplate" }] : /* istanbul ignore next */ []));
1220
+ _togglerIconTemplate = computed(() => this.templates()
1221
+ .filter((item) => item.getType() === 'togglericon')
1222
+ .at(-1)?.template, /* @ts-ignore */
1223
+ ...(ngDevMode ? [{ debugName: "_togglerIconTemplate" }] : /* istanbul ignore next */ []));
1224
+ _checkboxIconTemplate = computed(() => this.templates()
1225
+ .filter((item) => item.getType() === 'checkboxicon')
1226
+ .at(-1)?.template, /* @ts-ignore */
1227
+ ...(ngDevMode ? [{ debugName: "_checkboxIconTemplate" }] : /* istanbul ignore next */ []));
1228
+ _loadingIconTemplate = computed(() => this.templates()
1229
+ .filter((item) => item.getType() === 'loadingicon')
1230
+ .at(-1)?.template, /* @ts-ignore */
1231
+ ...(ngDevMode ? [{ debugName: "_loadingIconTemplate" }] : /* istanbul ignore next */ []));
1232
+ _filterIconTemplate = computed(() => this.templates()
1233
+ .filter((item) => item.getType() === 'filtericon')
1234
+ .at(-1)?.template, /* @ts-ignore */
1235
+ ...(ngDevMode ? [{ debugName: "_filterIconTemplate" }] : /* istanbul ignore next */ []));
1236
+ _filterTemplate = computed(() => this.templates()
1237
+ .filter((item) => item.getType() === 'filter')
1238
+ .at(-1)?.template, /* @ts-ignore */
1239
+ ...(ngDevMode ? [{ debugName: "_filterTemplate" }] : /* istanbul ignore next */ []));
1240
+ $templateMap = computed(() => {
1241
+ const templates = this.templates();
1242
+ if (!templates.length) {
1243
+ return this._templateMap();
1244
+ }
1245
+ const templateMap = {};
1246
+ templates.forEach((item) => {
1247
+ if (!['header', 'empty', 'footer', 'loader', 'togglericon', 'checkboxicon', 'loadingicon', 'filtericon', 'filter'].includes(item.getType())) {
1248
+ templateMap[item.name()] = item.template;
1283
1249
  }
1284
1250
  });
1285
- }
1286
- serializedValue;
1287
- nodeTouched;
1288
- dragNodeTree;
1289
- dragNode;
1290
- dragNodeSubNodes;
1291
- dragNodeIndex;
1292
- dragNodeScope;
1293
- dragHover;
1294
- dragStartSubscription;
1295
- dragStopSubscription;
1251
+ return templateMap;
1252
+ }, /* @ts-ignore */
1253
+ ...(ngDevMode ? [{ debugName: "$templateMap" }] : /* istanbul ignore next */ []));
1254
+ serializedValue = signal(undefined, /* @ts-ignore */
1255
+ ...(ngDevMode ? [{ debugName: "serializedValue" }] : /* istanbul ignore next */ []));
1256
+ nodeTouched = signal(undefined, /* @ts-ignore */
1257
+ ...(ngDevMode ? [{ debugName: "nodeTouched" }] : /* istanbul ignore next */ []));
1258
+ dragNode = signal(undefined, /* @ts-ignore */
1259
+ ...(ngDevMode ? [{ debugName: "dragNode" }] : /* istanbul ignore next */ []));
1260
+ dragNodeSubNodes = signal(undefined, /* @ts-ignore */
1261
+ ...(ngDevMode ? [{ debugName: "dragNodeSubNodes" }] : /* istanbul ignore next */ []));
1262
+ dragNodeIndex = signal(undefined, /* @ts-ignore */
1263
+ ...(ngDevMode ? [{ debugName: "dragNodeIndex" }] : /* istanbul ignore next */ []));
1264
+ dragNodeScope = signal(undefined, /* @ts-ignore */
1265
+ ...(ngDevMode ? [{ debugName: "dragNodeScope" }] : /* istanbul ignore next */ []));
1266
+ dragHover = signal(undefined, /* @ts-ignore */
1267
+ ...(ngDevMode ? [{ debugName: "dragHover" }] : /* istanbul ignore next */ []));
1268
+ dragStartSubscription = signal(undefined, /* @ts-ignore */
1269
+ ...(ngDevMode ? [{ debugName: "dragStartSubscription" }] : /* istanbul ignore next */ []));
1270
+ dragStopSubscription = signal(undefined, /* @ts-ignore */
1271
+ ...(ngDevMode ? [{ debugName: "dragStopSubscription" }] : /* istanbul ignore next */ []));
1296
1272
  _componentStyle = inject(TreeStyle);
1297
1273
  handleDropEvent(event) {
1298
1274
  this.onDrop(event);
@@ -1306,44 +1282,35 @@ class Tree extends BaseComponent {
1306
1282
  handleDragLeaveEvent(event) {
1307
1283
  this.onDragLeave(event);
1308
1284
  }
1309
- onInit() {
1310
- if (this.filterBy) {
1311
- this.filterOptions = {
1312
- filter: (value) => this._filter(value),
1313
- reset: () => this.resetFilter()
1314
- };
1315
- }
1316
- if (this.droppableNodes) {
1317
- this.dragStartSubscription = this.dragDropService?.dragStart$.subscribe((event) => {
1318
- this.dragNodeTree = event.tree;
1319
- this.dragNode = event.node;
1320
- this.dragNodeSubNodes = event.subNodes;
1321
- this.dragNodeIndex = event.index;
1322
- this.dragNodeScope = event.scope;
1323
- });
1324
- this.dragStopSubscription = this.dragDropService?.dragStop$.subscribe((event) => {
1325
- this.dragNodeTree = null;
1326
- this.dragNode = null;
1327
- this.dragNodeSubNodes = null;
1328
- this.dragNodeIndex = null;
1329
- this.dragNodeScope = null;
1330
- this.dragHover = false;
1331
- });
1332
- }
1333
- }
1334
- onChanges(simpleChange) {
1335
- if (simpleChange.value) {
1336
- this.updateSerializedValue();
1337
- if (this.hasFilterActive()) {
1338
- this._filter(this.filterViewChild()?.nativeElement?.value);
1339
- }
1285
+ _filterOptions = computed(() => this.filterBy()
1286
+ ? {
1287
+ filter: (value) => this._filter(value),
1288
+ reset: () => this.resetFilter()
1340
1289
  }
1341
- }
1342
- get emptyMessageLabel() {
1343
- return this.emptyMessage || this.config.getTranslation(TranslationKeys.EMPTY_MESSAGE);
1344
- }
1290
+ : this.filterOptions(), /* @ts-ignore */
1291
+ ...(ngDevMode ? [{ debugName: "_filterOptions" }] : /* istanbul ignore next */ []));
1292
+ onInit() {
1293
+ if (this.droppableNodes()) {
1294
+ this.dragStartSubscription.set(this.dragDropService?.dragStart$.subscribe((event) => {
1295
+ this.dragNode.set(event.node);
1296
+ this.dragNodeSubNodes.set(event.subNodes);
1297
+ this.dragNodeIndex.set(event.index);
1298
+ this.dragNodeScope.set(event.scope);
1299
+ }));
1300
+ this.dragStopSubscription.set(this.dragDropService?.dragStop$.subscribe((event) => {
1301
+ this.dragNode.set(null);
1302
+ this.dragNodeSubNodes.set(null);
1303
+ this.dragNodeIndex.set(null);
1304
+ this.dragNodeScope.set(null);
1305
+ this.dragHover.set(false);
1306
+ }));
1307
+ }
1308
+ }
1309
+ translation = toSignal(this.config.translationObserver, { initialValue: this.config.translation });
1310
+ emptyMessageLabel = computed(() => this.emptyMessage() || this.translation()[TranslationKeys.EMPTY_MESSAGE], /* @ts-ignore */
1311
+ ...(ngDevMode ? [{ debugName: "emptyMessageLabel" }] : /* istanbul ignore next */ []));
1345
1312
  updateSerializedValue() {
1346
- this.serializedValue = [];
1313
+ this.serializedValue.set([]);
1347
1314
  this.serializeNodes(null, this.getRootNode(), 0, true);
1348
1315
  }
1349
1316
  serializeNodes(parent, nodes, level, visible) {
@@ -1356,7 +1323,7 @@ class Tree extends BaseComponent {
1356
1323
  level: level,
1357
1324
  visible: visible && (parent ? parent.expanded : true)
1358
1325
  };
1359
- this.serializedValue.push(rowNode);
1326
+ this.serializedValue().push(rowNode);
1360
1327
  if (rowNode.visible && node.expanded) {
1361
1328
  this.serializeNodes(node, node.children, level + 1, rowNode.visible);
1362
1329
  }
@@ -1369,7 +1336,7 @@ class Tree extends BaseComponent {
1369
1336
  if (section === 'nodetogglebutton' || section === 'nodetoggleicon') {
1370
1337
  return;
1371
1338
  }
1372
- if (this.selectionMode) {
1339
+ if (this.selectionMode()) {
1373
1340
  if (node.selectable === false) {
1374
1341
  node.style = '--p-focus-ring-color: none;';
1375
1342
  return;
@@ -1382,11 +1349,11 @@ class Tree extends BaseComponent {
1382
1349
  if (this.hasFilteredNodes()) {
1383
1350
  if (this.isCheckboxSelectionMode()) {
1384
1351
  // checkbox propagation must walk the full tree, not only the children left visible by the filter
1385
- this.linkParentNodes(this.value, undefined);
1386
- node = this.getNodeWithKey(node.key, this.value);
1352
+ this.linkParentNodes(this.value(), undefined);
1353
+ node = this.getNodeWithKey(node.key, this.value());
1387
1354
  }
1388
1355
  else {
1389
- node = this.getNodeWithKey(node.key, this.filteredNodes);
1356
+ node = this.getNodeWithKey(node.key, this.filteredNodes());
1390
1357
  }
1391
1358
  if (!node) {
1392
1359
  return;
@@ -1397,28 +1364,28 @@ class Tree extends BaseComponent {
1397
1364
  const currentSelection = this.selection();
1398
1365
  if (this.isCheckboxSelectionMode()) {
1399
1366
  if (selected) {
1400
- if (this.propagateSelectionDown)
1367
+ if (this.propagateSelectionDown())
1401
1368
  this.propagateDown(node, false);
1402
1369
  else
1403
1370
  this.selection.set(currentSelection.filter((_val, i) => i != index));
1404
- if (this.propagateSelectionUp && node.parent) {
1371
+ if (this.propagateSelectionUp() && node.parent) {
1405
1372
  this.propagateUp(node.parent, false);
1406
1373
  }
1407
1374
  this.onNodeUnselect.emit({ originalEvent: event, node: node });
1408
1375
  }
1409
1376
  else {
1410
- if (this.propagateSelectionDown)
1377
+ if (this.propagateSelectionDown())
1411
1378
  this.propagateDown(node, true);
1412
1379
  else
1413
1380
  this.selection.set([...(currentSelection || []), node]);
1414
- if (this.propagateSelectionUp && node.parent) {
1381
+ if (this.propagateSelectionUp() && node.parent) {
1415
1382
  this.propagateUp(node.parent, true);
1416
1383
  }
1417
1384
  this.onNodeSelect.emit({ originalEvent: event, node: node });
1418
1385
  }
1419
1386
  }
1420
1387
  else {
1421
- let metaSelection = this.nodeTouched ? false : this.metaKeySelection;
1388
+ let metaSelection = this.nodeTouched() ? false : this.metaKeySelection();
1422
1389
  if (metaSelection) {
1423
1390
  let metaKey = event.metaKey || event.ctrlKey;
1424
1391
  if (selected && metaKey) {
@@ -1469,13 +1436,13 @@ class Tree extends BaseComponent {
1469
1436
  }
1470
1437
  }
1471
1438
  }
1472
- this.nodeTouched = false;
1439
+ this.nodeTouched.set(false);
1473
1440
  }
1474
1441
  onNodeTouchEnd() {
1475
- this.nodeTouched = true;
1442
+ this.nodeTouched.set(true);
1476
1443
  }
1477
1444
  onNodeRightClick(event, node) {
1478
- if (this.contextMenu) {
1445
+ if (this.contextMenu()) {
1479
1446
  let eventTarget = event.target;
1480
1447
  const section = eventTarget.getAttribute('data-pc-section');
1481
1448
  if (section === 'nodetogglebutton' || section === 'nodetoggleicon') {
@@ -1484,18 +1451,18 @@ class Tree extends BaseComponent {
1484
1451
  let index = this.findIndexInSelection(node);
1485
1452
  let isNodeSelected = index >= 0;
1486
1453
  const onContextMenuCallback = () => {
1487
- this.contextMenu.show(event);
1488
- this.contextMenu.hideCallback = () => {
1454
+ this.contextMenu().show(event);
1455
+ this.contextMenu().hideCallback.set(() => {
1489
1456
  this.contextMenuSelection.set(null);
1490
- };
1457
+ });
1491
1458
  this.onNodeContextMenuSelect.emit({ originalEvent: event, node: node });
1492
1459
  };
1493
- if (this.contextMenuSelectionMode === 'separate') {
1460
+ if (this.contextMenuSelectionMode() === 'separate') {
1494
1461
  // In 'separate' mode: Update contextMenuSelection with clicked node, don't modify selection
1495
1462
  this.contextMenuSelection.set(node);
1496
1463
  onContextMenuCallback();
1497
1464
  }
1498
- else if (this.contextMenuSelectionMode === 'joint') {
1465
+ else if (this.contextMenuSelectionMode() === 'joint') {
1499
1466
  // In 'joint' mode: Update only selection, don't touch contextMenuSelection
1500
1467
  if (!isNodeSelected) {
1501
1468
  if (this.isSingleSelectionMode()) {
@@ -1516,7 +1483,7 @@ class Tree extends BaseComponent {
1516
1483
  findIndexInSelection(node) {
1517
1484
  let index = -1;
1518
1485
  const currentSelection = this.selection();
1519
- if (this.selectionMode && currentSelection) {
1486
+ if (this.selectionMode() && currentSelection) {
1520
1487
  if (this.isSingleSelectionMode()) {
1521
1488
  const sel = currentSelection;
1522
1489
  let areNodesEqual = (sel.key && sel.key === node.key) || sel == node;
@@ -1537,17 +1504,16 @@ class Tree extends BaseComponent {
1537
1504
  return index;
1538
1505
  }
1539
1506
  syncNodeOption(node, parentNodes, option, value) {
1540
- // to synchronize the node option between the filtered nodes and the original nodes(this.value)
1507
+ // to synchronize the node option between the filtered nodes and the original nodes(this.value())
1541
1508
  const _node = this.hasFilteredNodes() ? this.getNodeWithKey(node.key, parentNodes) : null;
1542
1509
  if (_node) {
1543
1510
  _node[option] = value || node[option];
1544
1511
  }
1545
1512
  }
1546
- hasFilteredNodes() {
1547
- return this.filter && this.filteredNodes && this.filteredNodes.length;
1548
- }
1513
+ hasFilteredNodes = computed(() => this.filter() && this.filteredNodes() && this.filteredNodes().length, /* @ts-ignore */
1514
+ ...(ngDevMode ? [{ debugName: "hasFilteredNodes" }] : /* istanbul ignore next */ []));
1549
1515
  hasFilterActive() {
1550
- return this.filter && this.filterViewChild()?.nativeElement?.value.length > 0;
1516
+ return this.filter() && this.filterViewChild()?.nativeElement?.value.length > 0;
1551
1517
  }
1552
1518
  getNodeWithKey(key, nodes) {
1553
1519
  for (let node of nodes) {
@@ -1599,7 +1565,7 @@ class Tree extends BaseComponent {
1599
1565
  else
1600
1566
  node.partialSelected = false;
1601
1567
  }
1602
- this.syncNodeOption(node, this.filteredNodes, 'partialSelected');
1568
+ this.syncNodeOption(node, this.filteredNodes(), 'partialSelected');
1603
1569
  }
1604
1570
  let parent = node.parent;
1605
1571
  if (parent) {
@@ -1616,7 +1582,7 @@ class Tree extends BaseComponent {
1616
1582
  this.selection.set(currentSelection.filter((_val, i) => i != index));
1617
1583
  }
1618
1584
  node.partialSelected = false;
1619
- this.syncNodeOption(node, this.filteredNodes, 'partialSelected');
1585
+ this.syncNodeOption(node, this.filteredNodes(), 'partialSelected');
1620
1586
  if (node.children && node.children.length) {
1621
1587
  for (let child of node.children) {
1622
1588
  this.propagateDown(child, select);
@@ -1626,44 +1592,41 @@ class Tree extends BaseComponent {
1626
1592
  isSelected(node) {
1627
1593
  return this.findIndexInSelection(node) != -1;
1628
1594
  }
1629
- isSingleSelectionMode() {
1630
- return this.selectionMode && this.selectionMode == 'single';
1631
- }
1632
- isMultipleSelectionMode() {
1633
- return this.selectionMode && this.selectionMode == 'multiple';
1634
- }
1635
- isCheckboxSelectionMode() {
1636
- return this.selectionMode && this.selectionMode == 'checkbox';
1637
- }
1595
+ isSingleSelectionMode = computed(() => this.selectionMode() && this.selectionMode() == 'single', /* @ts-ignore */
1596
+ ...(ngDevMode ? [{ debugName: "isSingleSelectionMode" }] : /* istanbul ignore next */ []));
1597
+ isMultipleSelectionMode = computed(() => this.selectionMode() && this.selectionMode() == 'multiple', /* @ts-ignore */
1598
+ ...(ngDevMode ? [{ debugName: "isMultipleSelectionMode" }] : /* istanbul ignore next */ []));
1599
+ isCheckboxSelectionMode = computed(() => this.selectionMode() && this.selectionMode() == 'checkbox', /* @ts-ignore */
1600
+ ...(ngDevMode ? [{ debugName: "isCheckboxSelectionMode" }] : /* istanbul ignore next */ []));
1638
1601
  isNodeLeaf(node) {
1639
1602
  return node.leaf == false ? false : !(node.children && node.children.length);
1640
1603
  }
1641
- getRootNode() {
1642
- return this.filteredNodes ? this.filteredNodes : this.value;
1643
- }
1604
+ getRootNode = computed(() => (this.filteredNodes() ? this.filteredNodes() : this.value()), /* @ts-ignore */
1605
+ ...(ngDevMode ? [{ debugName: "getRootNode" }] : /* istanbul ignore next */ []));
1644
1606
  getTemplateForNode(node) {
1645
- if (this._templateMap)
1646
- return node.type ? this._templateMap[node.type] : this._templateMap['default'];
1607
+ const templateMap = this.$templateMap();
1608
+ if (templateMap)
1609
+ return node.type ? templateMap[node.type] : templateMap['default'];
1647
1610
  else
1648
1611
  return null;
1649
1612
  }
1650
1613
  onDragOver(event) {
1651
- if (this.droppableNodes && this.allowDrop(this.dragNode, null, this.dragNodeScope)) {
1614
+ if (this.droppableNodes() && this.allowDrop(this.dragNode(), null, this.dragNodeScope())) {
1652
1615
  event.dataTransfer.dropEffect = 'copy';
1653
1616
  event.preventDefault();
1654
1617
  }
1655
1618
  }
1656
1619
  onDrop(event) {
1657
- if (this.droppableNodes) {
1620
+ if (this.droppableNodes()) {
1658
1621
  event.preventDefault();
1659
- let dragNode = this.dragNode;
1660
- if (this.isSameTreeScope(this.dragNodeScope)) {
1622
+ let dragNode = this.dragNode();
1623
+ if (this.isSameTreeScope(this.dragNodeScope())) {
1661
1624
  return;
1662
1625
  }
1663
- if (this.allowDrop(dragNode, null, this.dragNodeScope)) {
1664
- let dragNodeIndex = this.dragNodeIndex;
1665
- this.value = this.value || [];
1666
- if (this.validateDrop) {
1626
+ if (this.allowDrop(dragNode, null, this.dragNodeScope())) {
1627
+ let dragNodeIndex = this.dragNodeIndex();
1628
+ this.value.set(this.value() || []);
1629
+ if (this.validateDrop()) {
1667
1630
  this.onNodeDrop.emit({
1668
1631
  originalEvent: event,
1669
1632
  dragNode: dragNode,
@@ -1687,22 +1650,22 @@ class Tree extends BaseComponent {
1687
1650
  }
1688
1651
  }
1689
1652
  processTreeDrop(dragNode, dragNodeIndex) {
1690
- this.dragNodeSubNodes.splice(dragNodeIndex, 1);
1691
- this.value.push(dragNode);
1653
+ this.dragNodeSubNodes().splice(dragNodeIndex, 1);
1654
+ this.value().push(dragNode);
1692
1655
  this.dragDropService?.stopDrag({
1693
1656
  node: dragNode
1694
1657
  });
1695
1658
  }
1696
1659
  onDragEnter() {
1697
- if (this.droppableNodes && this.allowDrop(this.dragNode, null, this.dragNodeScope)) {
1698
- this.dragHover = true;
1660
+ if (this.droppableNodes() && this.allowDrop(this.dragNode(), null, this.dragNodeScope())) {
1661
+ this.dragHover.set(true);
1699
1662
  }
1700
1663
  }
1701
1664
  onDragLeave(event) {
1702
- if (this.droppableNodes) {
1665
+ if (this.droppableNodes()) {
1703
1666
  let rect = event.currentTarget.getBoundingClientRect();
1704
1667
  if (event.x > parseInt(rect.left) + rect.width || event.x < parseInt(rect.left) || event.y > parseInt(rect.top) + rect.height || event.y < parseInt(rect.top)) {
1705
- this.dragHover = false;
1668
+ this.dragHover.set(false);
1706
1669
  }
1707
1670
  }
1708
1671
  }
@@ -1758,10 +1721,10 @@ class Tree extends BaseComponent {
1758
1721
  return false;
1759
1722
  }
1760
1723
  isSameTreeScope(dragScope) {
1761
- return this.hasCommonScope(dragScope, this.draggableScope);
1724
+ return this.hasCommonScope(dragScope, this.draggableScope());
1762
1725
  }
1763
1726
  isValidDragScope(dragScope) {
1764
- let dropScope = this.droppableScope;
1727
+ let dropScope = this.droppableScope();
1765
1728
  if (dropScope) {
1766
1729
  return this.hasCommonScope(dragScope, dropScope);
1767
1730
  }
@@ -1772,26 +1735,27 @@ class Tree extends BaseComponent {
1772
1735
  _filter(value) {
1773
1736
  let filterValue = value;
1774
1737
  if (filterValue === '') {
1775
- this.filteredNodes = null;
1738
+ this.filteredNodes.set(null);
1776
1739
  }
1777
1740
  else {
1778
- this.filteredNodes = [];
1779
- const searchFields = this.filterBy.split(',');
1780
- const filterText = removeAccents(filterValue).toLocaleLowerCase(this.filterLocale);
1781
- const isStrictMode = this.filterMode === 'strict';
1782
- for (let node of this.value) {
1741
+ const filteredNodes = [];
1742
+ const searchFields = this.filterBy().split(',');
1743
+ const filterText = removeAccents(filterValue).toLocaleLowerCase(this.filterLocale());
1744
+ const isStrictMode = this.filterMode() === 'strict';
1745
+ for (let node of this.value()) {
1783
1746
  let copyNode = { ...node };
1784
1747
  let paramsWithoutNode = { searchFields, filterText, isStrictMode };
1785
1748
  if ((isStrictMode && (this.findFilteredNodes(copyNode, paramsWithoutNode) || this.isFilterMatched(copyNode, paramsWithoutNode))) ||
1786
1749
  (!isStrictMode && (this.isFilterMatched(copyNode, paramsWithoutNode) || this.findFilteredNodes(copyNode, paramsWithoutNode)))) {
1787
- this.filteredNodes.push(copyNode);
1750
+ filteredNodes.push(copyNode);
1788
1751
  }
1789
1752
  }
1753
+ this.filteredNodes.set(filteredNodes);
1790
1754
  }
1791
1755
  this.updateSerializedValue();
1792
1756
  this.onFilter.emit({
1793
1757
  filter: filterValue,
1794
- filteredValue: this.filteredNodes
1758
+ filteredValue: this.filteredNodes()
1795
1759
  });
1796
1760
  }
1797
1761
  /**
@@ -1799,7 +1763,7 @@ class Tree extends BaseComponent {
1799
1763
  * @group Method
1800
1764
  */
1801
1765
  resetFilter() {
1802
- this.filteredNodes = null;
1766
+ this.filteredNodes.set(null);
1803
1767
  const filterViewChild = this.filterViewChild();
1804
1768
  if (filterViewChild && filterViewChild.nativeElement) {
1805
1769
  filterViewChild.nativeElement.value = '';
@@ -1811,7 +1775,7 @@ class Tree extends BaseComponent {
1811
1775
  * @group Method
1812
1776
  */
1813
1777
  scrollToVirtualIndex(index) {
1814
- this.virtualScroll && this.scroller()?.scrollToIndex(index);
1778
+ this.virtualScroll() && this.scroller()?.scrollToIndex(index);
1815
1779
  }
1816
1780
  /**
1817
1781
  * Scrolls to virtual index.
@@ -1820,7 +1784,7 @@ class Tree extends BaseComponent {
1820
1784
  */
1821
1785
  scrollTo(options) {
1822
1786
  const wrapperViewChild = this.wrapperViewChild();
1823
- if (this.virtualScroll) {
1787
+ if (this.virtualScroll()) {
1824
1788
  this.scroller()?.scrollTo(options);
1825
1789
  }
1826
1790
  else if (wrapperViewChild && wrapperViewChild.nativeElement) {
@@ -1857,7 +1821,7 @@ class Tree extends BaseComponent {
1857
1821
  let { searchFields, filterText, isStrictMode } = params;
1858
1822
  let matched = false;
1859
1823
  for (let field of searchFields) {
1860
- let fieldValue = removeAccents(String(resolveFieldData(node, field))).toLocaleLowerCase(this.filterLocale);
1824
+ let fieldValue = removeAccents(String(resolveFieldData(node, field))).toLocaleLowerCase(this.filterLocale());
1861
1825
  if (fieldValue.indexOf(filterText) > -1) {
1862
1826
  matched = true;
1863
1827
  }
@@ -1875,69 +1839,69 @@ class Tree extends BaseComponent {
1875
1839
  return this.el.nativeElement.children[0];
1876
1840
  }
1877
1841
  onDestroy() {
1878
- if (this.dragStartSubscription) {
1879
- this.dragStartSubscription.unsubscribe();
1880
- }
1881
- if (this.dragStopSubscription) {
1882
- this.dragStopSubscription.unsubscribe();
1883
- }
1884
- }
1885
- get containerDataP() {
1886
- return this.cn({
1887
- loading: this.loading,
1888
- scrollable: this.scrollHeight === 'flex'
1889
- });
1890
- }
1891
- get wrapperDataP() {
1892
- return this.cn({
1893
- scrollable: this.scrollHeight === 'flex'
1894
- });
1895
- }
1896
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Tree, deps: null, target: i0.ɵɵFactoryTarget.Component });
1897
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Tree, isStandalone: true, selector: "p-tree", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: false, isRequired: false, transformFunction: null }, loadingMode: { classPropertyName: "loadingMode", publicName: "loadingMode", isSignal: false, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, contextMenu: { classPropertyName: "contextMenu", publicName: "contextMenu", isSignal: false, isRequired: false, transformFunction: null }, contextMenuSelectionMode: { classPropertyName: "contextMenuSelectionMode", publicName: "contextMenuSelectionMode", isSignal: false, isRequired: false, transformFunction: null }, contextMenuSelection: { classPropertyName: "contextMenuSelection", publicName: "contextMenuSelection", isSignal: true, isRequired: false, transformFunction: null }, draggableScope: { classPropertyName: "draggableScope", publicName: "draggableScope", isSignal: false, isRequired: false, transformFunction: null }, droppableScope: { classPropertyName: "droppableScope", publicName: "droppableScope", isSignal: false, isRequired: false, transformFunction: null }, draggableNodes: { classPropertyName: "draggableNodes", publicName: "draggableNodes", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, droppableNodes: { classPropertyName: "droppableNodes", publicName: "droppableNodes", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, metaKeySelection: { classPropertyName: "metaKeySelection", publicName: "metaKeySelection", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, togglerAriaLabel: { classPropertyName: "togglerAriaLabel", publicName: "togglerAriaLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, validateDrop: { classPropertyName: "validateDrop", publicName: "validateDrop", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filterInputAutoFocus: { classPropertyName: "filterInputAutoFocus", publicName: "filterInputAutoFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: false, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: false, isRequired: false, transformFunction: null }, filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: false, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: false, isRequired: false, transformFunction: null }, filteredNodes: { classPropertyName: "filteredNodes", publicName: "filteredNodes", isSignal: false, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: false, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: false, isRequired: false, transformFunction: null }, indentation: { classPropertyName: "indentation", publicName: "indentation", isSignal: false, isRequired: false, transformFunction: numberAttribute }, _templateMap: { classPropertyName: "_templateMap", publicName: "_templateMap", isSignal: false, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: false, isRequired: false, transformFunction: null }, highlightOnSelect: { classPropertyName: "highlightOnSelect", publicName: "highlightOnSelect", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, outputs: { selection: "selectionChange", contextMenuSelection: "contextMenuSelectionChange", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onNodeExpand: "onNodeExpand", onNodeCollapse: "onNodeCollapse", onNodeContextMenuSelect: "onNodeContextMenuSelect", onNodeDoubleClick: "onNodeDoubleClick", onNodeDrop: "onNodeDrop", onLazyLoad: "onLazyLoad", onScroll: "onScroll", onScrollIndexChange: "onScrollIndexChange", onFilter: "onFilter" }, host: { listeners: { "drop": "handleDropEvent($event)", "dragover": "handleDragOverEvent($event)", "dragenter": "handleDragEnterEvent()", "dragleave": "handleDragLeaveEvent($event)" }, properties: { "class": "cn(cx('root'), styleClass)", "attr.data-p": "containerDataP" } }, providers: [TreeStyle, { provide: TREE_INSTANCE, useExisting: Tree }, { provide: PARENT_INSTANCE, useExisting: Tree }], queries: [{ propertyName: "filterTemplate", first: true, predicate: ["filter"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], isSignal: true }, { propertyName: "togglerIconTemplate", first: true, predicate: ["togglericon"], isSignal: true }, { propertyName: "checkboxIconTemplate", first: true, predicate: ["checkboxicon"], isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], isSignal: true }, { propertyName: "filterIconTemplate", first: true, predicate: ["filtericon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "wrapperViewChild", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }, { propertyName: "contentViewChild", first: true, predicate: ["content"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i3.Bind }], ngImport: i0, template: `
1898
- @if (loading && loadingMode === 'mask') {
1842
+ const dragStartSubscription = this.dragStartSubscription();
1843
+ if (dragStartSubscription) {
1844
+ dragStartSubscription.unsubscribe();
1845
+ }
1846
+ const dragStopSubscription = this.dragStopSubscription();
1847
+ if (dragStopSubscription) {
1848
+ dragStopSubscription.unsubscribe();
1849
+ }
1850
+ }
1851
+ containerDataP = computed(() => this.cn({
1852
+ loading: this.loading(),
1853
+ scrollable: this.scrollHeight() === 'flex'
1854
+ }), /* @ts-ignore */
1855
+ ...(ngDevMode ? [{ debugName: "containerDataP" }] : /* istanbul ignore next */ []));
1856
+ wrapperDataP = computed(() => this.cn({
1857
+ scrollable: this.scrollHeight() === 'flex'
1858
+ }), /* @ts-ignore */
1859
+ ...(ngDevMode ? [{ debugName: "wrapperDataP" }] : /* istanbul ignore next */ []));
1860
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Tree, deps: [], target: i0.ɵɵFactoryTarget.Component });
1861
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Tree, isStandalone: true, selector: "p-tree", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, loadingMode: { classPropertyName: "loadingMode", publicName: "loadingMode", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, contextMenu: { classPropertyName: "contextMenu", publicName: "contextMenu", isSignal: true, isRequired: false, transformFunction: null }, contextMenuSelectionMode: { classPropertyName: "contextMenuSelectionMode", publicName: "contextMenuSelectionMode", isSignal: true, isRequired: false, transformFunction: null }, contextMenuSelection: { classPropertyName: "contextMenuSelection", publicName: "contextMenuSelection", isSignal: true, isRequired: false, transformFunction: null }, draggableScope: { classPropertyName: "draggableScope", publicName: "draggableScope", isSignal: true, isRequired: false, transformFunction: null }, droppableScope: { classPropertyName: "droppableScope", publicName: "droppableScope", isSignal: true, isRequired: false, transformFunction: null }, draggableNodes: { classPropertyName: "draggableNodes", publicName: "draggableNodes", isSignal: true, isRequired: false, transformFunction: null }, droppableNodes: { classPropertyName: "droppableNodes", publicName: "droppableNodes", isSignal: true, isRequired: false, transformFunction: null }, metaKeySelection: { classPropertyName: "metaKeySelection", publicName: "metaKeySelection", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionUp: { classPropertyName: "propagateSelectionUp", publicName: "propagateSelectionUp", isSignal: true, isRequired: false, transformFunction: null }, propagateSelectionDown: { classPropertyName: "propagateSelectionDown", publicName: "propagateSelectionDown", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, togglerAriaLabel: { classPropertyName: "togglerAriaLabel", publicName: "togglerAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, validateDrop: { classPropertyName: "validateDrop", publicName: "validateDrop", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterInputAutoFocus: { classPropertyName: "filterInputAutoFocus", publicName: "filterInputAutoFocus", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterMode: { classPropertyName: "filterMode", publicName: "filterMode", isSignal: true, isRequired: false, transformFunction: null }, filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filteredNodes: { classPropertyName: "filteredNodes", publicName: "filteredNodes", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: true, isRequired: false, transformFunction: null }, indentation: { classPropertyName: "indentation", publicName: "indentation", isSignal: true, isRequired: false, transformFunction: null }, _templateMap: { classPropertyName: "_templateMap", publicName: "_templateMap", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, highlightOnSelect: { classPropertyName: "highlightOnSelect", publicName: "highlightOnSelect", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selection: "selectionChange", contextMenuSelection: "contextMenuSelectionChange", filteredNodes: "filteredNodesChange", onNodeSelect: "onNodeSelect", onNodeUnselect: "onNodeUnselect", onNodeExpand: "onNodeExpand", onNodeCollapse: "onNodeCollapse", onNodeContextMenuSelect: "onNodeContextMenuSelect", onNodeDoubleClick: "onNodeDoubleClick", onNodeDrop: "onNodeDrop", onLazyLoad: "onLazyLoad", onScroll: "onScroll", onScrollIndexChange: "onScrollIndexChange", onFilter: "onFilter" }, host: { listeners: { "drop": "handleDropEvent($event)", "dragover": "handleDragOverEvent($event)", "dragenter": "handleDragEnterEvent()", "dragleave": "handleDragLeaveEvent($event)" }, properties: { "class": "cx('root')", "attr.data-p": "containerDataP()" } }, providers: [TreeStyle, { provide: TREE_INSTANCE, useExisting: Tree }, { provide: PARENT_INSTANCE, useExisting: Tree }], queries: [{ propertyName: "filterTemplate", first: true, predicate: ["filter"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], isSignal: true }, { propertyName: "togglerIconTemplate", first: true, predicate: ["togglericon"], isSignal: true }, { propertyName: "checkboxIconTemplate", first: true, predicate: ["checkboxicon"], isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], isSignal: true }, { propertyName: "filterIconTemplate", first: true, predicate: ["filtericon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "wrapperViewChild", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }, { propertyName: "contentViewChild", first: true, predicate: ["content"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i3.Bind }], ngImport: i0, template: `
1862
+ @if (loading() && loadingMode() === 'mask') {
1899
1863
  <div [class]="cx('mask')" [pBind]="ptm('mask')" animate.enter="p-overlay-mask-enter-active" animate.leave="p-overlay-mask-leave-active">
1900
- @if (loadingIcon) {
1901
- <i [class]="cn(cx('loadingIcon'), 'pi-spin' + loadingIcon)" [pBind]="ptm('loadingIcon')"></i>
1864
+ @if (loadingIcon()) {
1865
+ <i [class]="cn(cx('loadingIcon'), 'pi-spin' + loadingIcon())" [pBind]="ptm('loadingIcon')"></i>
1902
1866
  }
1903
- @if (!loadingIcon) {
1904
- @if (!loadingIconTemplate() && !_loadingIconTemplate) {
1867
+ @if (!loadingIcon()) {
1868
+ @if (!loadingIconTemplate() && !_loadingIconTemplate()) {
1905
1869
  <svg data-p-icon="spinner" spin [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')" />
1906
1870
  }
1907
- @if (loadingIconTemplate() || _loadingIconTemplate) {
1871
+ @if (loadingIconTemplate() || _loadingIconTemplate()) {
1908
1872
  <span [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')">
1909
- <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate"></ng-template>
1873
+ <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate()"></ng-template>
1910
1874
  </span>
1911
1875
  }
1912
1876
  }
1913
1877
  </div>
1914
1878
  }
1915
- <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
1916
- @if (filterTemplate() || _filterTemplate) {
1917
- <ng-container *ngTemplateOutlet="filterTemplate() || _filterTemplate; context: { $implicit: filterOptions }"></ng-container>
1879
+ <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
1880
+ @if (filterTemplate() || _filterTemplate()) {
1881
+ <ng-container *ngTemplateOutlet="filterTemplate() || _filterTemplate(); context: { $implicit: _filterOptions() }"></ng-container>
1918
1882
  } @else {
1919
- @if (filter) {
1883
+ @if (filter()) {
1920
1884
  <p-iconfield [class]="cx('pcFilterContainer')" [pt]="ptm('pcFilterContainer')" [unstyled]="unstyled()">
1921
1885
  <input
1922
1886
  #filter
1923
- [pAutoFocus]="filterInputAutoFocus"
1887
+ [pAutoFocus]="filterInputAutoFocus()"
1924
1888
  pInputText
1925
1889
  type="search"
1926
1890
  autocomplete="off"
1927
1891
  [class]="cx('pcFilterInput')"
1928
- [attr.placeholder]="filterPlaceholder"
1892
+ [attr.placeholder]="filterPlaceholder()"
1929
1893
  (keydown.enter)="$event.preventDefault()"
1930
1894
  (input)="_filter($event.target?.value)"
1931
1895
  [pt]="ptm('pcFilterInput')"
1932
1896
  [unstyled]="unstyled()"
1933
1897
  />
1934
1898
  <p-inputicon [pt]="ptm('pcFilterIconContainer')" [unstyled]="unstyled()">
1935
- @if (!filterIconTemplate() && !_filterIconTemplate) {
1899
+ @if (!filterIconTemplate() && !_filterIconTemplate()) {
1936
1900
  <svg data-p-icon="search" [class]="cx('filterIcon')" [pBind]="ptm('filterIcon')" />
1937
1901
  }
1938
- @if (filterIconTemplate() || _filterIconTemplate) {
1902
+ @if (filterIconTemplate() || _filterIconTemplate()) {
1939
1903
  <span [class]="cx('filterIcon')" [pBind]="ptm('filterIcon')">
1940
- <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate"></ng-template>
1904
+ <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate()"></ng-template>
1941
1905
  </span>
1942
1906
  }
1943
1907
  </p-inputicon>
@@ -1946,23 +1910,23 @@ class Tree extends BaseComponent {
1946
1910
  }
1947
1911
 
1948
1912
  @if (getRootNode()?.length) {
1949
- @if (virtualScroll) {
1913
+ @if (virtualScroll()) {
1950
1914
  <p-scroller
1951
1915
  #scroller
1952
- [items]="serializedValue"
1916
+ [items]="serializedValue()"
1953
1917
  [tabindex]="-1"
1954
1918
  [styleClass]="cx('wrapper')"
1955
- [style]="{ height: scrollHeight !== 'flex' ? scrollHeight : undefined }"
1956
- [scrollHeight]="scrollHeight !== 'flex' ? undefined : '100%'"
1957
- [itemSize]="virtualScrollItemSize"
1958
- [lazy]="lazy"
1919
+ [style]="{ height: scrollHeight() !== 'flex' ? scrollHeight() : undefined }"
1920
+ [scrollHeight]="scrollHeight() !== 'flex' ? undefined : '100%'"
1921
+ [itemSize]="virtualScrollItemSize()"
1922
+ [lazy]="lazy()"
1959
1923
  (onScroll)="onScroll.emit($event)"
1960
1924
  (onScrollIndexChange)="onScrollIndexChange.emit($event)"
1961
1925
  (onLazyLoad)="onLazyLoad.emit($event)"
1962
- [options]="virtualScrollOptions"
1926
+ [options]="virtualScrollOptions()"
1963
1927
  [pt]="ptm('virtualScroller')"
1964
1928
  hostName="tree"
1965
- [attr.data-p]="wrapperDataP"
1929
+ [attr.data-p]="wrapperDataP()"
1966
1930
  >
1967
1931
  <ng-template #content let-items let-scrollerOptions="options">
1968
1932
  @if (items) {
@@ -1972,43 +1936,40 @@ class Tree extends BaseComponent {
1972
1936
  [ngClass]="scrollerOptions.contentStyleClass"
1973
1937
  [style]="scrollerOptions.contentStyle"
1974
1938
  role="tree"
1975
- [attr.aria-label]="ariaLabel"
1976
- [attr.aria-labelledby]="ariaLabelledBy"
1939
+ [attr.aria-label]="ariaLabel()"
1940
+ [attr.aria-labelledby]="ariaLabelledBy()"
1977
1941
  [pBind]="ptm('rootChildren')"
1978
1942
  >
1979
- @for (rowNode of items; track trackBy(index, rowNode); let firstChild = $first; let lastChild = $last; let index = $index) {
1943
+ @for (rowNode of items; track trackBy().bind(this)(index, rowNode); let index = $index) {
1980
1944
  <p-treeNode
1981
1945
  #treeNode
1982
1946
  [level]="rowNode.level"
1983
- [rowNode]="rowNode"
1984
1947
  [node]="rowNode.node"
1985
1948
  [parentNode]="rowNode.parent"
1986
- [firstChild]="firstChild"
1987
- [lastChild]="lastChild"
1988
1949
  [index]="getIndex(scrollerOptions, index)"
1989
1950
  [itemSize]="scrollerOptions.itemSize"
1990
- [indentation]="indentation"
1991
- [loadingMode]="loadingMode"
1992
- [pt]="pt"
1951
+ [indentation]="indentation()"
1952
+ [loadingMode]="loadingMode()"
1953
+ [pt]="pt()"
1993
1954
  [unstyled]="unstyled()"
1994
1955
  ></p-treeNode>
1995
1956
  }
1996
1957
  </ul>
1997
1958
  }
1998
1959
  </ng-template>
1999
- @if (loaderTemplate() || _loaderTemplate) {
1960
+ @if (loaderTemplate() || _loaderTemplate()) {
2000
1961
  <ng-template #loader let-scrollerOptions="options">
2001
- <ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
1962
+ <ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate(); context: { options: scrollerOptions }"></ng-container>
2002
1963
  </ng-template>
2003
1964
  }
2004
1965
  </p-scroller>
2005
1966
  }
2006
- @if (!virtualScroll) {
2007
- <div #wrapper [class]="cx('wrapper')" [style.max-height]="scrollHeight" [pBind]="ptm('wrapper')" [attr.data-p]="wrapperDataP">
1967
+ @if (!virtualScroll()) {
1968
+ <div #wrapper [class]="cx('wrapper')" [style.max-height]="scrollHeight()" [pBind]="ptm('wrapper')" [attr.data-p]="wrapperDataP()">
2008
1969
  @if (getRootNode()) {
2009
- <ul #content [class]="cx('rootChildren')" role="tree" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [pBind]="ptm('rootChildren')">
2010
- @for (node of getRootNode(); track trackBy.bind(this)(index, node); let firstChild = $first; let lastChild = $last; let index = $index) {
2011
- <p-treeNode [node]="node" [firstChild]="firstChild" [lastChild]="lastChild" [index]="index" [level]="0" [loadingMode]="loadingMode" [pt]="pt" [unstyled]="unstyled()"></p-treeNode>
1970
+ <ul #content [class]="cx('rootChildren')" role="tree" [attr.aria-label]="ariaLabel()" [attr.aria-labelledby]="ariaLabelledBy()" [pBind]="ptm('rootChildren')">
1971
+ @for (node of getRootNode(); track trackBy().bind(this)(index, node); let index = $index) {
1972
+ <p-treeNode [node]="node" [index]="index" [level]="0" [loadingMode]="loadingMode()" [pt]="pt()" [unstyled]="unstyled()"></p-treeNode>
2012
1973
  }
2013
1974
  </ul>
2014
1975
  }
@@ -2016,68 +1977,67 @@ class Tree extends BaseComponent {
2016
1977
  }
2017
1978
  }
2018
1979
 
2019
- @if (!loading && (getRootNode() == null || getRootNode().length === 0)) {
1980
+ @if (!loading() && (getRootNode() == null || getRootNode().length === 0)) {
2020
1981
  <div [class]="cx('emptyMessage')" [pBind]="ptm('emptyMessage')">
2021
- @if (!emptyTemplate() && !_emptyTemplate) {
2022
- {{ emptyMessageLabel }}
1982
+ @if (!emptyTemplate() && !_emptyTemplate()) {
1983
+ {{ emptyMessageLabel() }}
2023
1984
  } @else {
2024
- <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate"></ng-container>
1985
+ <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate()"></ng-container>
2025
1986
  }
2026
1987
  </div>
2027
1988
  }
2028
- <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
2029
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: SearchIcon, selector: "[data-p-icon=\"search\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition", "styleClass"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName", "styleClass"] }, { kind: "component", type: UITreeNode, selector: "p-treeNode", inputs: ["rowNode", "node", "parentNode", "root", "index", "firstChild", "lastChild", "level", "indentation", "itemSize", "loadingMode"] }, { kind: "ngmodule", type: AutoFocusModule }, { kind: "directive", type: i4.AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1989
+ <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
1990
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: SearchIcon, selector: "[data-p-icon=\"search\"]" }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: IconField, selector: "p-iconfield, p-iconField, p-icon-field", inputs: ["hostName", "iconPosition"] }, { kind: "component", type: InputIcon, selector: "p-inputicon, p-inputIcon", inputs: ["hostName"] }, { kind: "component", type: UITreeNode, selector: "p-treeNode", inputs: ["node", "parentNode", "index", "level", "indentation", "itemSize", "loadingMode"] }, { kind: "ngmodule", type: AutoFocusModule }, { kind: "directive", type: i4.AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2030
1991
  }
2031
1992
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Tree, decorators: [{
2032
1993
  type: Component,
2033
1994
  args: [{
2034
1995
  selector: 'p-tree',
2035
- standalone: true,
2036
1996
  imports: [CommonModule, Scroller, SharedModule, SearchIcon, SpinnerIcon, InputText, FormsModule, IconField, InputIcon, UITreeNode, AutoFocusModule, Bind],
2037
1997
  template: `
2038
- @if (loading && loadingMode === 'mask') {
1998
+ @if (loading() && loadingMode() === 'mask') {
2039
1999
  <div [class]="cx('mask')" [pBind]="ptm('mask')" animate.enter="p-overlay-mask-enter-active" animate.leave="p-overlay-mask-leave-active">
2040
- @if (loadingIcon) {
2041
- <i [class]="cn(cx('loadingIcon'), 'pi-spin' + loadingIcon)" [pBind]="ptm('loadingIcon')"></i>
2000
+ @if (loadingIcon()) {
2001
+ <i [class]="cn(cx('loadingIcon'), 'pi-spin' + loadingIcon())" [pBind]="ptm('loadingIcon')"></i>
2042
2002
  }
2043
- @if (!loadingIcon) {
2044
- @if (!loadingIconTemplate() && !_loadingIconTemplate) {
2003
+ @if (!loadingIcon()) {
2004
+ @if (!loadingIconTemplate() && !_loadingIconTemplate()) {
2045
2005
  <svg data-p-icon="spinner" spin [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')" />
2046
2006
  }
2047
- @if (loadingIconTemplate() || _loadingIconTemplate) {
2007
+ @if (loadingIconTemplate() || _loadingIconTemplate()) {
2048
2008
  <span [class]="cx('loadingIcon')" [pBind]="ptm('loadingIcon')">
2049
- <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate"></ng-template>
2009
+ <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate()"></ng-template>
2050
2010
  </span>
2051
2011
  }
2052
2012
  }
2053
2013
  </div>
2054
2014
  }
2055
- <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-container>
2056
- @if (filterTemplate() || _filterTemplate) {
2057
- <ng-container *ngTemplateOutlet="filterTemplate() || _filterTemplate; context: { $implicit: filterOptions }"></ng-container>
2015
+ <ng-container *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-container>
2016
+ @if (filterTemplate() || _filterTemplate()) {
2017
+ <ng-container *ngTemplateOutlet="filterTemplate() || _filterTemplate(); context: { $implicit: _filterOptions() }"></ng-container>
2058
2018
  } @else {
2059
- @if (filter) {
2019
+ @if (filter()) {
2060
2020
  <p-iconfield [class]="cx('pcFilterContainer')" [pt]="ptm('pcFilterContainer')" [unstyled]="unstyled()">
2061
2021
  <input
2062
2022
  #filter
2063
- [pAutoFocus]="filterInputAutoFocus"
2023
+ [pAutoFocus]="filterInputAutoFocus()"
2064
2024
  pInputText
2065
2025
  type="search"
2066
2026
  autocomplete="off"
2067
2027
  [class]="cx('pcFilterInput')"
2068
- [attr.placeholder]="filterPlaceholder"
2028
+ [attr.placeholder]="filterPlaceholder()"
2069
2029
  (keydown.enter)="$event.preventDefault()"
2070
2030
  (input)="_filter($event.target?.value)"
2071
2031
  [pt]="ptm('pcFilterInput')"
2072
2032
  [unstyled]="unstyled()"
2073
2033
  />
2074
2034
  <p-inputicon [pt]="ptm('pcFilterIconContainer')" [unstyled]="unstyled()">
2075
- @if (!filterIconTemplate() && !_filterIconTemplate) {
2035
+ @if (!filterIconTemplate() && !_filterIconTemplate()) {
2076
2036
  <svg data-p-icon="search" [class]="cx('filterIcon')" [pBind]="ptm('filterIcon')" />
2077
2037
  }
2078
- @if (filterIconTemplate() || _filterIconTemplate) {
2038
+ @if (filterIconTemplate() || _filterIconTemplate()) {
2079
2039
  <span [class]="cx('filterIcon')" [pBind]="ptm('filterIcon')">
2080
- <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate"></ng-template>
2040
+ <ng-template *ngTemplateOutlet="filterIconTemplate() || _filterIconTemplate()"></ng-template>
2081
2041
  </span>
2082
2042
  }
2083
2043
  </p-inputicon>
@@ -2086,23 +2046,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
2086
2046
  }
2087
2047
 
2088
2048
  @if (getRootNode()?.length) {
2089
- @if (virtualScroll) {
2049
+ @if (virtualScroll()) {
2090
2050
  <p-scroller
2091
2051
  #scroller
2092
- [items]="serializedValue"
2052
+ [items]="serializedValue()"
2093
2053
  [tabindex]="-1"
2094
2054
  [styleClass]="cx('wrapper')"
2095
- [style]="{ height: scrollHeight !== 'flex' ? scrollHeight : undefined }"
2096
- [scrollHeight]="scrollHeight !== 'flex' ? undefined : '100%'"
2097
- [itemSize]="virtualScrollItemSize"
2098
- [lazy]="lazy"
2055
+ [style]="{ height: scrollHeight() !== 'flex' ? scrollHeight() : undefined }"
2056
+ [scrollHeight]="scrollHeight() !== 'flex' ? undefined : '100%'"
2057
+ [itemSize]="virtualScrollItemSize()"
2058
+ [lazy]="lazy()"
2099
2059
  (onScroll)="onScroll.emit($event)"
2100
2060
  (onScrollIndexChange)="onScrollIndexChange.emit($event)"
2101
2061
  (onLazyLoad)="onLazyLoad.emit($event)"
2102
- [options]="virtualScrollOptions"
2062
+ [options]="virtualScrollOptions()"
2103
2063
  [pt]="ptm('virtualScroller')"
2104
2064
  hostName="tree"
2105
- [attr.data-p]="wrapperDataP"
2065
+ [attr.data-p]="wrapperDataP()"
2106
2066
  >
2107
2067
  <ng-template #content let-items let-scrollerOptions="options">
2108
2068
  @if (items) {
@@ -2112,43 +2072,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
2112
2072
  [ngClass]="scrollerOptions.contentStyleClass"
2113
2073
  [style]="scrollerOptions.contentStyle"
2114
2074
  role="tree"
2115
- [attr.aria-label]="ariaLabel"
2116
- [attr.aria-labelledby]="ariaLabelledBy"
2075
+ [attr.aria-label]="ariaLabel()"
2076
+ [attr.aria-labelledby]="ariaLabelledBy()"
2117
2077
  [pBind]="ptm('rootChildren')"
2118
2078
  >
2119
- @for (rowNode of items; track trackBy(index, rowNode); let firstChild = $first; let lastChild = $last; let index = $index) {
2079
+ @for (rowNode of items; track trackBy().bind(this)(index, rowNode); let index = $index) {
2120
2080
  <p-treeNode
2121
2081
  #treeNode
2122
2082
  [level]="rowNode.level"
2123
- [rowNode]="rowNode"
2124
2083
  [node]="rowNode.node"
2125
2084
  [parentNode]="rowNode.parent"
2126
- [firstChild]="firstChild"
2127
- [lastChild]="lastChild"
2128
2085
  [index]="getIndex(scrollerOptions, index)"
2129
2086
  [itemSize]="scrollerOptions.itemSize"
2130
- [indentation]="indentation"
2131
- [loadingMode]="loadingMode"
2132
- [pt]="pt"
2087
+ [indentation]="indentation()"
2088
+ [loadingMode]="loadingMode()"
2089
+ [pt]="pt()"
2133
2090
  [unstyled]="unstyled()"
2134
2091
  ></p-treeNode>
2135
2092
  }
2136
2093
  </ul>
2137
2094
  }
2138
2095
  </ng-template>
2139
- @if (loaderTemplate() || _loaderTemplate) {
2096
+ @if (loaderTemplate() || _loaderTemplate()) {
2140
2097
  <ng-template #loader let-scrollerOptions="options">
2141
- <ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
2098
+ <ng-container *ngTemplateOutlet="loaderTemplate() || _loaderTemplate(); context: { options: scrollerOptions }"></ng-container>
2142
2099
  </ng-template>
2143
2100
  }
2144
2101
  </p-scroller>
2145
2102
  }
2146
- @if (!virtualScroll) {
2147
- <div #wrapper [class]="cx('wrapper')" [style.max-height]="scrollHeight" [pBind]="ptm('wrapper')" [attr.data-p]="wrapperDataP">
2103
+ @if (!virtualScroll()) {
2104
+ <div #wrapper [class]="cx('wrapper')" [style.max-height]="scrollHeight()" [pBind]="ptm('wrapper')" [attr.data-p]="wrapperDataP()">
2148
2105
  @if (getRootNode()) {
2149
- <ul #content [class]="cx('rootChildren')" role="tree" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledBy" [pBind]="ptm('rootChildren')">
2150
- @for (node of getRootNode(); track trackBy.bind(this)(index, node); let firstChild = $first; let lastChild = $last; let index = $index) {
2151
- <p-treeNode [node]="node" [firstChild]="firstChild" [lastChild]="lastChild" [index]="index" [level]="0" [loadingMode]="loadingMode" [pt]="pt" [unstyled]="unstyled()"></p-treeNode>
2106
+ <ul #content [class]="cx('rootChildren')" role="tree" [attr.aria-label]="ariaLabel()" [attr.aria-labelledby]="ariaLabelledBy()" [pBind]="ptm('rootChildren')">
2107
+ @for (node of getRootNode(); track trackBy().bind(this)(index, node); let index = $index) {
2108
+ <p-treeNode [node]="node" [index]="index" [level]="0" [loadingMode]="loadingMode()" [pt]="pt()" [unstyled]="unstyled()"></p-treeNode>
2152
2109
  }
2153
2110
  </ul>
2154
2111
  }
@@ -2156,115 +2113,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
2156
2113
  }
2157
2114
  }
2158
2115
 
2159
- @if (!loading && (getRootNode() == null || getRootNode().length === 0)) {
2116
+ @if (!loading() && (getRootNode() == null || getRootNode().length === 0)) {
2160
2117
  <div [class]="cx('emptyMessage')" [pBind]="ptm('emptyMessage')">
2161
- @if (!emptyTemplate() && !_emptyTemplate) {
2162
- {{ emptyMessageLabel }}
2118
+ @if (!emptyTemplate() && !_emptyTemplate()) {
2119
+ {{ emptyMessageLabel() }}
2163
2120
  } @else {
2164
- <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate"></ng-container>
2121
+ <ng-container *ngTemplateOutlet="emptyTemplate() || _emptyTemplate()"></ng-container>
2165
2122
  }
2166
2123
  </div>
2167
2124
  }
2168
- <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-container>
2125
+ <ng-container *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-container>
2169
2126
  `,
2170
2127
  changeDetection: ChangeDetectionStrategy.OnPush,
2171
2128
  encapsulation: ViewEncapsulation.None,
2172
2129
  providers: [TreeStyle, { provide: TREE_INSTANCE, useExisting: Tree }, { provide: PARENT_INSTANCE, useExisting: Tree }],
2173
2130
  host: {
2174
- '[class]': "cn(cx('root'), styleClass)",
2175
- '[attr.data-p]': 'containerDataP'
2131
+ '[class]': "cx('root')",
2132
+ '[attr.data-p]': 'containerDataP()'
2176
2133
  },
2177
2134
  hostDirectives: [Bind]
2178
2135
  }]
2179
- }], propDecorators: { value: [{
2180
- type: Input
2181
- }], selectionMode: [{
2182
- type: Input
2183
- }], loadingMode: [{
2184
- type: Input
2185
- }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], styleClass: [{
2186
- type: Input
2187
- }], contextMenu: [{
2188
- type: Input
2189
- }], contextMenuSelectionMode: [{
2190
- type: Input
2191
- }], contextMenuSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuSelection", required: false }] }, { type: i0.Output, args: ["contextMenuSelectionChange"] }], draggableScope: [{
2192
- type: Input
2193
- }], droppableScope: [{
2194
- type: Input
2195
- }], draggableNodes: [{
2196
- type: Input,
2197
- args: [{ transform: booleanAttribute }]
2198
- }], droppableNodes: [{
2199
- type: Input,
2200
- args: [{ transform: booleanAttribute }]
2201
- }], metaKeySelection: [{
2202
- type: Input,
2203
- args: [{ transform: booleanAttribute }]
2204
- }], propagateSelectionUp: [{
2205
- type: Input,
2206
- args: [{ transform: booleanAttribute }]
2207
- }], propagateSelectionDown: [{
2208
- type: Input,
2209
- args: [{ transform: booleanAttribute }]
2210
- }], loading: [{
2211
- type: Input,
2212
- args: [{ transform: booleanAttribute }]
2213
- }], loadingIcon: [{
2214
- type: Input
2215
- }], emptyMessage: [{
2216
- type: Input
2217
- }], ariaLabel: [{
2218
- type: Input
2219
- }], togglerAriaLabel: [{
2220
- type: Input
2221
- }], ariaLabelledBy: [{
2222
- type: Input
2223
- }], validateDrop: [{
2224
- type: Input,
2225
- args: [{ transform: booleanAttribute }]
2226
- }], filter: [{
2227
- type: Input,
2228
- args: [{ transform: booleanAttribute }]
2229
- }], filterInputAutoFocus: [{
2230
- type: Input,
2231
- args: [{ transform: booleanAttribute }]
2232
- }], filterBy: [{
2233
- type: Input
2234
- }], filterMode: [{
2235
- type: Input
2236
- }], filterOptions: [{
2237
- type: Input
2238
- }], filterPlaceholder: [{
2239
- type: Input
2240
- }], filteredNodes: [{
2241
- type: Input
2242
- }], filterLocale: [{
2243
- type: Input
2244
- }], scrollHeight: [{
2245
- type: Input
2246
- }], lazy: [{
2247
- type: Input,
2248
- args: [{ transform: booleanAttribute }]
2249
- }], virtualScroll: [{
2250
- type: Input,
2251
- args: [{ transform: booleanAttribute }]
2252
- }], virtualScrollItemSize: [{
2253
- type: Input,
2254
- args: [{ transform: numberAttribute }]
2255
- }], virtualScrollOptions: [{
2256
- type: Input
2257
- }], indentation: [{
2258
- type: Input,
2259
- args: [{ transform: numberAttribute }]
2260
- }], _templateMap: [{
2261
- type: Input
2262
- }], trackBy: [{
2263
- type: Input
2264
- }], highlightOnSelect: [{
2265
- type: Input,
2266
- args: [{ transform: booleanAttribute }]
2267
- }], onNodeSelect: [{ type: i0.Output, args: ["onNodeSelect"] }], onNodeUnselect: [{ type: i0.Output, args: ["onNodeUnselect"] }], onNodeExpand: [{ type: i0.Output, args: ["onNodeExpand"] }], onNodeCollapse: [{ type: i0.Output, args: ["onNodeCollapse"] }], onNodeContextMenuSelect: [{ type: i0.Output, args: ["onNodeContextMenuSelect"] }], onNodeDoubleClick: [{ type: i0.Output, args: ["onNodeDoubleClick"] }], onNodeDrop: [{ type: i0.Output, args: ["onNodeDrop"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onScroll: [{ type: i0.Output, args: ["onScroll"] }], onScrollIndexChange: [{ type: i0.Output, args: ["onScrollIndexChange"] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], filterTemplate: [{ type: i0.ContentChild, args: ['filter', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { ...{ descendants: false }, isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { ...{ descendants: false }, isSignal: true }] }], togglerIconTemplate: [{ type: i0.ContentChild, args: ['togglericon', { ...{ descendants: false }, isSignal: true }] }], checkboxIconTemplate: [{ type: i0.ContentChild, args: ['checkboxicon', { ...{ descendants: false }, isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { ...{ descendants: false }, isSignal: true }] }], filterIconTemplate: [{ type: i0.ContentChild, args: ['filtericon', { ...{ descendants: false }, isSignal: true }] }], filterViewChild: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], wrapperViewChild: [{ type: i0.ViewChild, args: ['wrapper', { isSignal: true }] }], contentViewChild: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }], handleDropEvent: [{
2136
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], loadingMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMode", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }, { type: i0.Output, args: ["selectionChange"] }], contextMenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenu", required: false }] }], contextMenuSelectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuSelectionMode", required: false }] }], contextMenuSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "contextMenuSelection", required: false }] }, { type: i0.Output, args: ["contextMenuSelectionChange"] }], draggableScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggableScope", required: false }] }], droppableScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "droppableScope", required: false }] }], draggableNodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "draggableNodes", required: false }] }], droppableNodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "droppableNodes", required: false }] }], metaKeySelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "metaKeySelection", required: false }] }], propagateSelectionUp: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionUp", required: false }] }], propagateSelectionDown: [{ type: i0.Input, args: [{ isSignal: true, alias: "propagateSelectionDown", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], togglerAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "togglerAriaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], validateDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "validateDrop", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterInputAutoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterInputAutoFocus", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMode", required: false }] }], filterOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterOptions", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filteredNodes: [{ type: i0.Input, args: [{ isSignal: true, alias: "filteredNodes", required: false }] }, { type: i0.Output, args: ["filteredNodesChange"] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], virtualScrollOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollOptions", required: false }] }], indentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "indentation", required: false }] }], _templateMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "_templateMap", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], highlightOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightOnSelect", required: false }] }], onNodeSelect: [{ type: i0.Output, args: ["onNodeSelect"] }], onNodeUnselect: [{ type: i0.Output, args: ["onNodeUnselect"] }], onNodeExpand: [{ type: i0.Output, args: ["onNodeExpand"] }], onNodeCollapse: [{ type: i0.Output, args: ["onNodeCollapse"] }], onNodeContextMenuSelect: [{ type: i0.Output, args: ["onNodeContextMenuSelect"] }], onNodeDoubleClick: [{ type: i0.Output, args: ["onNodeDoubleClick"] }], onNodeDrop: [{ type: i0.Output, args: ["onNodeDrop"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onScroll: [{ type: i0.Output, args: ["onScroll"] }], onScrollIndexChange: [{ type: i0.Output, args: ["onScrollIndexChange"] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], filterTemplate: [{ type: i0.ContentChild, args: ['filter', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { ...{ descendants: false }, isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { ...{ descendants: false }, isSignal: true }] }], togglerIconTemplate: [{ type: i0.ContentChild, args: ['togglericon', { ...{ descendants: false }, isSignal: true }] }], checkboxIconTemplate: [{ type: i0.ContentChild, args: ['checkboxicon', { ...{ descendants: false }, isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { ...{ descendants: false }, isSignal: true }] }], filterIconTemplate: [{ type: i0.ContentChild, args: ['filtericon', { ...{ descendants: false }, isSignal: true }] }], filterViewChild: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], wrapperViewChild: [{ type: i0.ViewChild, args: ['wrapper', { isSignal: true }] }], contentViewChild: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }], handleDropEvent: [{
2268
2137
  type: HostListener,
2269
2138
  args: ['drop', ['$event']]
2270
2139
  }], handleDragOverEvent: [{