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

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 (375) 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 +10 -17
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +786 -928
  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 +561 -599
  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 +227 -394
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +255 -266
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +585 -653
  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 +1792 -1787
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +480 -577
  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 +774 -745
  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-angledoubledown.mjs +2 -2
  68. package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs +2 -2
  70. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs +2 -2
  72. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs +2 -2
  74. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs +2 -2
  76. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs +2 -2
  78. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs +2 -2
  80. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs +2 -2
  82. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs +2 -2
  84. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs +2 -2
  86. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs +2 -2
  88. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs +2 -2
  90. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs +2 -2
  92. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs +2 -2
  94. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-icons-ban.mjs +2 -2
  96. package/fesm2022/exhaustive-ui-core-icons-ban.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-icons-bars.mjs +2 -2
  98. package/fesm2022/exhaustive-ui-core-icons-bars.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  100. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-icons-blank.mjs +2 -2
  102. package/fesm2022/exhaustive-ui-core-icons-blank.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs +2 -2
  104. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs +2 -2
  106. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs +2 -2
  108. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-icons-check.mjs +2 -2
  110. package/fesm2022/exhaustive-ui-core-icons-check.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs +2 -2
  112. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs +2 -2
  114. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs +2 -2
  116. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs +2 -2
  118. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs +2 -2
  120. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-icons-eye.mjs +2 -2
  122. package/fesm2022/exhaustive-ui-core-icons-eye.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs +2 -2
  124. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-icons-filter.mjs +2 -2
  126. package/fesm2022/exhaustive-ui-core-icons-filter.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs +2 -2
  128. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs +2 -2
  130. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-icons-home.mjs +2 -2
  132. package/fesm2022/exhaustive-ui-core-icons-home.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs +2 -2
  134. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-icons-minus.mjs +2 -2
  136. package/fesm2022/exhaustive-ui-core-icons-minus.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs +2 -2
  138. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-icons-plus.mjs +2 -2
  140. package/fesm2022/exhaustive-ui-core-icons-plus.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs +2 -2
  142. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-icons-search.mjs +2 -2
  144. package/fesm2022/exhaustive-ui-core-icons-search.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs +2 -2
  146. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs +2 -2
  148. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs +2 -2
  150. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs +2 -2
  152. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs +2 -2
  154. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs +2 -2
  156. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-icons-star.mjs +2 -2
  158. package/fesm2022/exhaustive-ui-core-icons-star.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs +2 -2
  160. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs +2 -2
  162. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-icons-times.mjs +2 -2
  164. package/fesm2022/exhaustive-ui-core-icons-times.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs +2 -2
  166. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-icons-trash.mjs +2 -2
  168. package/fesm2022/exhaustive-ui-core-icons-trash.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-icons-undo.mjs +2 -2
  170. package/fesm2022/exhaustive-ui-core-icons-undo.mjs.map +1 -1
  171. package/fesm2022/exhaustive-ui-core-icons-upload.mjs +2 -2
  172. package/fesm2022/exhaustive-ui-core-icons-upload.mjs.map +1 -1
  173. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs +2 -2
  174. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs.map +1 -1
  175. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs +2 -2
  176. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs.map +1 -1
  177. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  178. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  179. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  180. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  181. package/fesm2022/exhaustive-ui-core-inplace.mjs +68 -102
  182. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  183. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  184. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  185. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  186. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  187. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  188. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  189. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  190. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  191. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  192. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  193. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  194. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  195. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  196. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  197. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  198. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  199. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  200. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  201. package/fesm2022/exhaustive-ui-core-listbox.mjs +591 -728
  202. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  203. package/fesm2022/exhaustive-ui-core-megamenu.mjs +324 -375
  204. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  205. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  206. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  207. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  208. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  209. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  210. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  211. package/fesm2022/exhaustive-ui-core-motion.mjs +2 -2
  212. package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
  213. package/fesm2022/exhaustive-ui-core-multiselect.mjs +945 -1045
  214. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  215. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  216. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  217. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  218. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  219. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  220. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  221. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  222. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  223. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  224. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  225. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  226. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  227. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  228. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  229. package/fesm2022/exhaustive-ui-core-picklist.mjs +861 -879
  230. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  231. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  232. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  233. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  234. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  235. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  236. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  237. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  238. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  239. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  240. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  241. package/fesm2022/exhaustive-ui-core-select.mjs +837 -986
  242. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  243. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  244. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  245. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  246. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  247. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  248. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  249. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  250. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  251. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  252. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  253. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  254. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  255. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  256. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  257. package/fesm2022/exhaustive-ui-core-table.mjs +2435 -2721
  258. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  259. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  260. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  261. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  262. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  263. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +604 -690
  264. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  265. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  266. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  267. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  268. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  269. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  270. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  271. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  272. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  273. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  274. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  275. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  276. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  277. package/fesm2022/exhaustive-ui-core-treeselect.mjs +333 -423
  278. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  279. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  280. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  281. package/package.json +11 -11
  282. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  283. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  284. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  285. package/schematics/migrations.json +11 -6
  286. package/schematics/utils/removed-inputs.js +0 -0
  287. package/schematics/utils/renamed-inputs.js +175 -0
  288. package/schematics/utils/styleclass.js +24 -8
  289. package/schematics/utils/versions.json +8 -8
  290. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  291. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  292. package/types/exhaustive-ui-core-api.d.ts +2 -3
  293. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  294. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  295. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  296. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  297. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  298. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  299. package/types/exhaustive-ui-core-button.d.ts +57 -89
  300. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  301. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  302. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  303. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  304. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  305. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  306. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  307. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  308. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  309. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  310. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  311. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  312. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  313. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  314. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  315. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  316. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  317. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  318. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  319. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  320. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  321. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  322. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  323. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  324. package/types/exhaustive-ui-core-image.d.ts +35 -68
  325. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  326. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  327. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  328. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  329. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  330. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  331. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  332. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  333. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  334. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  335. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  336. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  337. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  338. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  339. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  340. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  341. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  342. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  343. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  344. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  345. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  346. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  347. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  348. package/types/exhaustive-ui-core-password.d.ts +56 -93
  349. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  350. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  351. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  352. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  353. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  354. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  355. package/types/exhaustive-ui-core-select.d.ts +137 -188
  356. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  357. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  358. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  359. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  360. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  361. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  362. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  363. package/types/exhaustive-ui-core-table.d.ts +349 -453
  364. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  365. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  366. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  367. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  368. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  369. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  370. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  371. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  372. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  373. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  374. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  375. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -2,7 +2,7 @@ export * from '@exhaustive-ui/core/types/scroller';
2
2
  import * as i2 from '@angular/common';
3
3
  import { isPlatformBrowser, CommonModule } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, InjectionToken, inject, NgZone, output, viewChild, contentChild, contentChildren, HostBinding, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
+ import { Injectable, InjectionToken, inject, NgZone, input, output, viewChild, computed, linkedSignal, untracked, signal, contentChild, contentChildren, effect, afterNextRender, afterEveryRender, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
6
6
  import { isVisible, getWidth, getHeight, findSingle, isTouchDevice } from '@exhaustive-ui/utils';
7
7
  import { PrimeTemplate, SharedModule } from '@exhaustive-ui/core/api';
8
8
  import { BaseComponent, PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';
@@ -74,9 +74,9 @@ const classes = {
74
74
  root: ({ instance }) => [
75
75
  'p-virtualscroller',
76
76
  {
77
- 'p-virtualscroller-inline': instance.inline,
78
- 'p-virtualscroller-both p-both-scroll': instance.both,
79
- 'p-virtualscroller-horizontal p-horizontal-scroll': instance.horizontal
77
+ 'p-virtualscroller-inline': instance._inline(),
78
+ 'p-virtualscroller-both p-both-scroll': instance.both(),
79
+ 'p-virtualscroller-horizontal p-horizontal-scroll': instance.horizontal()
80
80
  }
81
81
  ],
82
82
  content: 'p-virtualscroller-content',
@@ -84,7 +84,7 @@ const classes = {
84
84
  loader: ({ instance }) => [
85
85
  'p-virtualscroller-loader',
86
86
  {
87
- 'p-virtualscroller-loader-mask': !instance.loaderTemplate
87
+ 'p-virtualscroller-loader-mask': !instance.loaderTemplate()
88
88
  }
89
89
  ],
90
90
  loadingIcon: 'p-virtualscroller-loading-icon'
@@ -142,261 +142,158 @@ class Scroller extends BaseComponent {
142
142
  componentName = 'VirtualScroller';
143
143
  bindDirectiveInstance = inject(Bind, { self: true });
144
144
  $pcScroller = inject(SCROLLER_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
145
- hostName = '';
145
+ hostName = input('', /* @ts-ignore */
146
+ ...(ngDevMode ? [{ debugName: "hostName" }] : /* istanbul ignore next */ []));
146
147
  /**
147
148
  * Unique identifier of the element.
148
149
  * @group Props
149
150
  */
150
- get id() {
151
- return this._id;
152
- }
153
- set id(val) {
154
- this._id = val;
155
- }
151
+ id = input(/* @ts-ignore */
152
+ ...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
156
153
  /**
157
154
  * Inline style of the component.
158
155
  * @group Props
159
156
  */
160
- get style() {
161
- return this._style;
162
- }
163
- set style(val) {
164
- this._style = val;
165
- }
157
+ style = input(/* @ts-ignore */
158
+ ...(ngDevMode ? [undefined, { debugName: "style" }] : /* istanbul ignore next */ []));
166
159
  /**
167
160
  * Style class of the element.
168
161
  * @group Props
169
162
  */
170
- get styleClass() {
171
- return this._styleClass;
172
- }
173
- set styleClass(val) {
174
- this._styleClass = val;
175
- }
163
+ styleClass = input(/* @ts-ignore */
164
+ ...(ngDevMode ? [undefined, { debugName: "styleClass" }] : /* istanbul ignore next */ []));
176
165
  /**
177
166
  * Index of the element in tabbing order.
178
167
  * @group Props
179
168
  */
180
- get tabindex() {
181
- return this._tabindex;
182
- }
183
- set tabindex(val) {
184
- this._tabindex = val;
185
- }
169
+ tabindex = input(0, /* @ts-ignore */
170
+ ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
186
171
  /**
187
172
  * An array of objects to display.
188
173
  * @group Props
189
174
  */
190
- get items() {
191
- return this._items;
192
- }
193
- set items(val) {
194
- this._items = val;
195
- }
175
+ items = input(/* @ts-ignore */
176
+ ...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
196
177
  /**
197
178
  * The height/width of item according to orientation.
198
179
  * @group Props
199
180
  */
200
- get itemSize() {
201
- return this._itemSize;
202
- }
203
- set itemSize(val) {
204
- this._itemSize = val;
205
- }
181
+ itemSize = input(0, /* @ts-ignore */
182
+ ...(ngDevMode ? [{ debugName: "itemSize" }] : /* istanbul ignore next */ []));
206
183
  /**
207
184
  * Height of the scroll viewport.
208
185
  * @group Props
209
186
  */
210
- get scrollHeight() {
211
- return this._scrollHeight;
212
- }
213
- set scrollHeight(val) {
214
- this._scrollHeight = val;
215
- }
187
+ scrollHeight = input(/* @ts-ignore */
188
+ ...(ngDevMode ? [undefined, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
216
189
  /**
217
190
  * Width of the scroll viewport.
218
191
  * @group Props
219
192
  */
220
- get scrollWidth() {
221
- return this._scrollWidth;
222
- }
223
- set scrollWidth(val) {
224
- this._scrollWidth = val;
225
- }
193
+ scrollWidth = input(/* @ts-ignore */
194
+ ...(ngDevMode ? [undefined, { debugName: "scrollWidth" }] : /* istanbul ignore next */ []));
226
195
  /**
227
196
  * The orientation of scrollbar.
228
197
  * @group Props
229
198
  */
230
- get orientation() {
231
- return this._orientation;
232
- }
233
- set orientation(val) {
234
- this._orientation = val;
235
- }
199
+ orientation = input('vertical', /* @ts-ignore */
200
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
236
201
  /**
237
202
  * Used to specify how many items to load in each load method in lazy mode.
238
203
  * @group Props
239
204
  */
240
- get step() {
241
- return this._step;
242
- }
243
- set step(val) {
244
- this._step = val;
245
- }
205
+ step = input(0, /* @ts-ignore */
206
+ ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
246
207
  /**
247
208
  * Delay in scroll before new data is loaded.
248
209
  * @group Props
249
210
  */
250
- get delay() {
251
- return this._delay;
252
- }
253
- set delay(val) {
254
- this._delay = val;
255
- }
211
+ delay = input(0, /* @ts-ignore */
212
+ ...(ngDevMode ? [{ debugName: "delay" }] : /* istanbul ignore next */ []));
256
213
  /**
257
214
  * Delay after window's resize finishes.
258
215
  * @group Props
259
216
  */
260
- get resizeDelay() {
261
- return this._resizeDelay;
262
- }
263
- set resizeDelay(val) {
264
- this._resizeDelay = val;
265
- }
217
+ resizeDelay = input(10, /* @ts-ignore */
218
+ ...(ngDevMode ? [{ debugName: "resizeDelay" }] : /* istanbul ignore next */ []));
266
219
  /**
267
220
  * Used to append each loaded item to top without removing any items from the DOM. Using very large data may cause the browser to crash.
268
221
  * @group Props
269
222
  */
270
- get appendOnly() {
271
- return this._appendOnly;
272
- }
273
- set appendOnly(val) {
274
- this._appendOnly = val;
275
- }
223
+ appendOnly = input(false, /* @ts-ignore */
224
+ ...(ngDevMode ? [{ debugName: "appendOnly" }] : /* istanbul ignore next */ []));
276
225
  /**
277
226
  * Specifies whether the scroller should be displayed inline or not.
278
227
  * @group Props
279
228
  */
280
- get inline() {
281
- return this._inline;
282
- }
283
- set inline(val) {
284
- this._inline = val;
285
- }
229
+ inline = input(false, /* @ts-ignore */
230
+ ...(ngDevMode ? [{ debugName: "inline" }] : /* istanbul ignore next */ []));
286
231
  /**
287
232
  * Defines if data is loaded and interacted with in lazy manner.
288
233
  * @group Props
289
234
  */
290
- get lazy() {
291
- return this._lazy;
292
- }
293
- set lazy(val) {
294
- this._lazy = val;
295
- }
235
+ lazy = input(false, /* @ts-ignore */
236
+ ...(ngDevMode ? [{ debugName: "lazy" }] : /* istanbul ignore next */ []));
296
237
  /**
297
238
  * If disabled, the scroller feature is eliminated and the content is displayed directly.
298
239
  * @group Props
299
240
  */
300
- get disabled() {
301
- return this._disabled;
302
- }
303
- set disabled(val) {
304
- this._disabled = val;
305
- }
241
+ disabled = input(false, /* @ts-ignore */
242
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
306
243
  /**
307
244
  * Used to implement a custom loader instead of using the loader feature in the scroller.
308
245
  * @group Props
309
246
  */
310
- get loaderDisabled() {
311
- return this._loaderDisabled;
312
- }
313
- set loaderDisabled(val) {
314
- this._loaderDisabled = val;
315
- }
247
+ loaderDisabled = input(false, /* @ts-ignore */
248
+ ...(ngDevMode ? [{ debugName: "loaderDisabled" }] : /* istanbul ignore next */ []));
316
249
  /**
317
250
  * Columns to display.
318
251
  * @group Props
319
252
  */
320
- get columns() {
321
- return this._columns;
322
- }
323
- set columns(val) {
324
- this._columns = val;
325
- }
253
+ columns = input(/* @ts-ignore */
254
+ ...(ngDevMode ? [undefined, { debugName: "columns" }] : /* istanbul ignore next */ []));
326
255
  /**
327
256
  * Used to implement a custom spacer instead of using the spacer feature in the scroller.
328
257
  * @group Props
329
258
  */
330
- get showSpacer() {
331
- return this._showSpacer;
332
- }
333
- set showSpacer(val) {
334
- this._showSpacer = val;
335
- }
259
+ showSpacer = input(true, /* @ts-ignore */
260
+ ...(ngDevMode ? [{ debugName: "showSpacer" }] : /* istanbul ignore next */ []));
336
261
  /**
337
262
  * Defines whether to show loader.
338
263
  * @group Props
339
264
  */
340
- get showLoader() {
341
- return this._showLoader;
342
- }
343
- set showLoader(val) {
344
- this._showLoader = val;
345
- }
265
+ showLoader = input(false, /* @ts-ignore */
266
+ ...(ngDevMode ? [{ debugName: "showLoader" }] : /* istanbul ignore next */ []));
346
267
  /**
347
268
  * Determines how many additional elements to add to the DOM outside of the view. According to the scrolls made up and down, extra items are added in a certain algorithm in the form of multiples of this number. Default value is half the number of items shown in the view.
348
269
  * @group Props
349
270
  */
350
- get numToleratedItems() {
351
- return this._numToleratedItems;
352
- }
353
- set numToleratedItems(val) {
354
- this._numToleratedItems = val;
355
- }
271
+ numToleratedItems = input(/* @ts-ignore */
272
+ ...(ngDevMode ? [undefined, { debugName: "numToleratedItems" }] : /* istanbul ignore next */ []));
356
273
  /**
357
274
  * Defines whether the data is loaded.
358
275
  * @group Props
359
276
  */
360
- get loading() {
361
- return this._loading;
362
- }
363
- set loading(val) {
364
- this._loading = val;
365
- }
277
+ loading = input(/* @ts-ignore */
278
+ ...(ngDevMode ? [undefined, { debugName: "loading" }] : /* istanbul ignore next */ []));
366
279
  /**
367
280
  * Defines whether to dynamically change the height or width of scrollable container.
368
281
  * @group Props
369
282
  */
370
- get autoSize() {
371
- return this._autoSize;
372
- }
373
- set autoSize(val) {
374
- this._autoSize = val;
375
- }
283
+ autoSize = input(false, /* @ts-ignore */
284
+ ...(ngDevMode ? [{ debugName: "autoSize" }] : /* istanbul ignore next */ []));
376
285
  /**
377
286
  * Function to optimize the dom operations by delegating to ngForTrackBy, default algoritm checks for object identity.
378
287
  * @group Props
379
288
  */
380
- get trackBy() {
381
- return this._trackBy;
382
- }
383
- set trackBy(val) {
384
- this._trackBy = val;
385
- }
289
+ trackBy = input(/* @ts-ignore */
290
+ ...(ngDevMode ? [undefined, { debugName: "trackBy" }] : /* istanbul ignore next */ []));
386
291
  /**
387
292
  * Defines whether to use the scroller feature. The properties of scroller component can be used like an object in it.
388
293
  * @group Props
389
294
  */
390
- get options() {
391
- return this._options;
392
- }
393
- set options(val) {
394
- this._options = val;
395
- if (val && typeof val === 'object') {
396
- Object.entries(val).forEach(([k, v]) => this[`_${k}`] !== v && (this[`_${k}`] = v));
397
- Object.entries(val).forEach(([k, v]) => this[`${k}`] !== v && (this[`${k}`] = v));
398
- }
399
- }
295
+ options = input(/* @ts-ignore */
296
+ ...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
400
297
  /**
401
298
  * Callback to invoke in lazy mode to load new data.
402
299
  * @param {ScrollerLazyLoadEvent} event - Custom lazy load event.
@@ -419,35 +316,62 @@ class Scroller extends BaseComponent {
419
316
  ...(ngDevMode ? [{ debugName: "elementViewChild" }] : /* istanbul ignore next */ []));
420
317
  contentViewChild = viewChild('content', /* @ts-ignore */
421
318
  ...(ngDevMode ? [{ debugName: "contentViewChild" }] : /* istanbul ignore next */ []));
422
- height;
423
- _id;
424
- _style;
425
- _styleClass;
426
- _tabindex = 0;
427
- _items;
428
- _itemSize = 0;
429
- _scrollHeight;
430
- _scrollWidth;
431
- _orientation = 'vertical';
432
- _step = 0;
433
- _delay = 0;
434
- _resizeDelay = 10;
435
- _appendOnly = false;
436
- _inline = false;
437
- _lazy = false;
438
- _disabled = false;
439
- _loaderDisabled = false;
440
- _columns;
441
- _showSpacer = true;
442
- _showLoader = false;
443
- _numToleratedItems;
444
- _loading;
445
- _autoSize = false;
446
- _trackBy;
447
- _options;
448
- d_loading = false;
449
- d_numToleratedItems;
450
- contentEl;
319
+ height = computed(() => (this._scrollHeight() == '100%' ? '100%' : undefined), /* @ts-ignore */
320
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
321
+ _id = computed(() => this.resolveOption('id', this.id()), /* @ts-ignore */
322
+ ...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
323
+ _style = computed(() => this.resolveOption('style', this.style()), /* @ts-ignore */
324
+ ...(ngDevMode ? [{ debugName: "_style" }] : /* istanbul ignore next */ []));
325
+ _styleClass = computed(() => this.resolveOption('styleClass', this.styleClass()), /* @ts-ignore */
326
+ ...(ngDevMode ? [{ debugName: "_styleClass" }] : /* istanbul ignore next */ []));
327
+ _tabindex = computed(() => this.resolveOption('tabindex', this.tabindex()), /* @ts-ignore */
328
+ ...(ngDevMode ? [{ debugName: "_tabindex" }] : /* istanbul ignore next */ []));
329
+ _items = computed(() => this.resolveOption('items', this.items()), /* @ts-ignore */
330
+ ...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
331
+ _itemSize = computed(() => this.resolveOption('itemSize', this.itemSize()), /* @ts-ignore */
332
+ ...(ngDevMode ? [{ debugName: "_itemSize" }] : /* istanbul ignore next */ []));
333
+ _scrollHeight = computed(() => this.resolveOption('scrollHeight', this.scrollHeight()), /* @ts-ignore */
334
+ ...(ngDevMode ? [{ debugName: "_scrollHeight" }] : /* istanbul ignore next */ []));
335
+ _scrollWidth = computed(() => this.resolveOption('scrollWidth', this.scrollWidth()), /* @ts-ignore */
336
+ ...(ngDevMode ? [{ debugName: "_scrollWidth" }] : /* istanbul ignore next */ []));
337
+ _orientation = computed(() => this.resolveOption('orientation', this.orientation()), /* @ts-ignore */
338
+ ...(ngDevMode ? [{ debugName: "_orientation" }] : /* istanbul ignore next */ []));
339
+ _step = computed(() => this.resolveOption('step', this.step()), /* @ts-ignore */
340
+ ...(ngDevMode ? [{ debugName: "_step" }] : /* istanbul ignore next */ []));
341
+ _delay = computed(() => this.resolveOption('delay', this.delay()), /* @ts-ignore */
342
+ ...(ngDevMode ? [{ debugName: "_delay" }] : /* istanbul ignore next */ []));
343
+ _resizeDelay = computed(() => this.resolveOption('resizeDelay', this.resizeDelay()), /* @ts-ignore */
344
+ ...(ngDevMode ? [{ debugName: "_resizeDelay" }] : /* istanbul ignore next */ []));
345
+ _appendOnly = computed(() => this.resolveOption('appendOnly', this.appendOnly()), /* @ts-ignore */
346
+ ...(ngDevMode ? [{ debugName: "_appendOnly" }] : /* istanbul ignore next */ []));
347
+ _inline = computed(() => this.resolveOption('inline', this.inline()), /* @ts-ignore */
348
+ ...(ngDevMode ? [{ debugName: "_inline" }] : /* istanbul ignore next */ []));
349
+ _lazy = computed(() => this.resolveOption('lazy', this.lazy()), /* @ts-ignore */
350
+ ...(ngDevMode ? [{ debugName: "_lazy" }] : /* istanbul ignore next */ []));
351
+ _disabled = computed(() => this.resolveOption('disabled', this.disabled()), /* @ts-ignore */
352
+ ...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
353
+ _loaderDisabled = computed(() => this.resolveOption('loaderDisabled', this.loaderDisabled()), /* @ts-ignore */
354
+ ...(ngDevMode ? [{ debugName: "_loaderDisabled" }] : /* istanbul ignore next */ []));
355
+ _columns = computed(() => this.resolveOption('columns', this.columns()), /* @ts-ignore */
356
+ ...(ngDevMode ? [{ debugName: "_columns" }] : /* istanbul ignore next */ []));
357
+ _showSpacer = computed(() => this.resolveOption('showSpacer', this.showSpacer()), /* @ts-ignore */
358
+ ...(ngDevMode ? [{ debugName: "_showSpacer" }] : /* istanbul ignore next */ []));
359
+ _showLoader = computed(() => this.resolveOption('showLoader', this.showLoader()), /* @ts-ignore */
360
+ ...(ngDevMode ? [{ debugName: "_showLoader" }] : /* istanbul ignore next */ []));
361
+ _numToleratedItems = computed(() => this.resolveOption('numToleratedItems', this.numToleratedItems()), /* @ts-ignore */
362
+ ...(ngDevMode ? [{ debugName: "_numToleratedItems" }] : /* istanbul ignore next */ []));
363
+ _loading = computed(() => this.resolveOption('loading', this.loading()), /* @ts-ignore */
364
+ ...(ngDevMode ? [{ debugName: "_loading" }] : /* istanbul ignore next */ []));
365
+ _autoSize = computed(() => this.resolveOption('autoSize', this.autoSize()), /* @ts-ignore */
366
+ ...(ngDevMode ? [{ debugName: "_autoSize" }] : /* istanbul ignore next */ []));
367
+ _trackBy = computed(() => this.resolveOption('trackBy', this.trackBy()), /* @ts-ignore */
368
+ ...(ngDevMode ? [{ debugName: "_trackBy" }] : /* istanbul ignore next */ []));
369
+ d_loading = linkedSignal({ ...(ngDevMode ? { debugName: "d_loading" } : /* istanbul ignore next */ {}), source: () => this._loading(),
370
+ computation: (loading, previous) => (previous === undefined ? false : untracked(() => this._lazy()) ? loading : previous.value) });
371
+ d_numToleratedItems = linkedSignal(() => this._numToleratedItems(), /* @ts-ignore */
372
+ ...(ngDevMode ? [{ debugName: "d_numToleratedItems" }] : /* istanbul ignore next */ []));
373
+ contentEl = signal(undefined, /* @ts-ignore */
374
+ ...(ngDevMode ? [{ debugName: "contentEl" }] : /* istanbul ignore next */ []));
451
375
  /**
452
376
  * Content template of the component.
453
377
  * @param {ScrollerContentTemplateContext} context - content context.
@@ -478,171 +402,155 @@ class Scroller extends BaseComponent {
478
402
  loaderIconTemplate = contentChild('loadericon', { ...(ngDevMode ? { debugName: "loaderIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
479
403
  templates = contentChildren(PrimeTemplate, /* @ts-ignore */
480
404
  ...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
481
- _contentTemplate;
482
- _itemTemplate;
483
- _loaderTemplate;
484
- _loaderIconTemplate;
485
- first = 0;
486
- last = 0;
487
- page = 0;
488
- isRangeChanged = false;
489
- numItemsInViewport = 0;
490
- lastScrollPos = 0;
491
- lazyLoadState = {};
492
- loaderArr = [];
493
- spacerStyle = {};
494
- contentStyle = {};
495
- scrollTimeout;
496
- resizeTimeout;
497
- initialized = false;
498
- windowResizeListener;
499
- defaultWidth;
500
- defaultHeight;
501
- defaultContentWidth;
502
- defaultContentHeight;
503
- _contentStyleClass;
504
- get contentStyleClass() {
505
- return this._contentStyleClass;
506
- }
507
- set contentStyleClass(val) {
508
- this._contentStyleClass = val;
509
- }
510
- get vertical() {
511
- return this._orientation === 'vertical';
512
- }
513
- get horizontal() {
514
- return this._orientation === 'horizontal';
515
- }
516
- get both() {
517
- return this._orientation === 'both';
518
- }
519
- get loadedItems() {
520
- if (this._items && !this.d_loading) {
521
- if (this.both) {
522
- return this._items.slice(this._appendOnly ? 0 : this.first.rows, this.last.rows).map((item) => {
523
- if (this._columns) {
405
+ _contentTemplate = computed(() => this.templates()
406
+ .filter((item) => item.getType() === 'content')
407
+ .at(-1)?.template, /* @ts-ignore */
408
+ ...(ngDevMode ? [{ debugName: "_contentTemplate" }] : /* istanbul ignore next */ []));
409
+ _itemTemplate = computed(() => this.templates()
410
+ .filter((item) => !['content', 'loader', 'loadericon'].includes(item.getType()))
411
+ .at(-1)?.template, /* @ts-ignore */
412
+ ...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
413
+ _loaderTemplate = computed(() => this.templates()
414
+ .filter((item) => item.getType() === 'loader')
415
+ .at(-1)?.template, /* @ts-ignore */
416
+ ...(ngDevMode ? [{ debugName: "_loaderTemplate" }] : /* istanbul ignore next */ []));
417
+ _loaderIconTemplate = computed(() => this.templates()
418
+ .filter((item) => item.getType() === 'loadericon')
419
+ .at(-1)?.template, /* @ts-ignore */
420
+ ...(ngDevMode ? [{ debugName: "_loaderIconTemplate" }] : /* istanbul ignore next */ []));
421
+ first = signal(0, /* @ts-ignore */
422
+ ...(ngDevMode ? [{ debugName: "first" }] : /* istanbul ignore next */ []));
423
+ last = signal(0, /* @ts-ignore */
424
+ ...(ngDevMode ? [{ debugName: "last" }] : /* istanbul ignore next */ []));
425
+ page = signal(0, /* @ts-ignore */
426
+ ...(ngDevMode ? [{ debugName: "page" }] : /* istanbul ignore next */ []));
427
+ isRangeChanged = signal(false, /* @ts-ignore */
428
+ ...(ngDevMode ? [{ debugName: "isRangeChanged" }] : /* istanbul ignore next */ []));
429
+ numItemsInViewport = signal(0, /* @ts-ignore */
430
+ ...(ngDevMode ? [{ debugName: "numItemsInViewport" }] : /* istanbul ignore next */ []));
431
+ lastScrollPos = linkedSignal({ ...(ngDevMode ? { debugName: "lastScrollPos" } : /* istanbul ignore next */ {}), source: () => this._orientation(),
432
+ computation: (orientation) => (orientation === 'both' ? { top: 0, left: 0 } : 0) });
433
+ lazyLoadState = signal({}, /* @ts-ignore */
434
+ ...(ngDevMode ? [{ debugName: "lazyLoadState" }] : /* istanbul ignore next */ []));
435
+ loaderArr = signal([], /* @ts-ignore */
436
+ ...(ngDevMode ? [{ debugName: "loaderArr" }] : /* istanbul ignore next */ []));
437
+ spacerStyle = signal({}, /* @ts-ignore */
438
+ ...(ngDevMode ? [{ debugName: "spacerStyle" }] : /* istanbul ignore next */ []));
439
+ contentStyle = linkedSignal({ ...(ngDevMode ? { debugName: "contentStyle" } : /* istanbul ignore next */ {}), source: () => this.resolveOption('contentStyle', undefined),
440
+ computation: (contentStyle, previous) => (contentStyle !== undefined ? contentStyle : (previous?.value ?? {})) });
441
+ scrollTimeout = signal(undefined, /* @ts-ignore */
442
+ ...(ngDevMode ? [{ debugName: "scrollTimeout" }] : /* istanbul ignore next */ []));
443
+ resizeTimeout = signal(undefined, /* @ts-ignore */
444
+ ...(ngDevMode ? [{ debugName: "resizeTimeout" }] : /* istanbul ignore next */ []));
445
+ initialized = signal(false, /* @ts-ignore */
446
+ ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
447
+ windowResizeListener = signal(undefined, /* @ts-ignore */
448
+ ...(ngDevMode ? [{ debugName: "windowResizeListener" }] : /* istanbul ignore next */ []));
449
+ defaultWidth = signal(undefined, /* @ts-ignore */
450
+ ...(ngDevMode ? [{ debugName: "defaultWidth" }] : /* istanbul ignore next */ []));
451
+ defaultHeight = signal(undefined, /* @ts-ignore */
452
+ ...(ngDevMode ? [{ debugName: "defaultHeight" }] : /* istanbul ignore next */ []));
453
+ defaultContentWidth = signal(undefined, /* @ts-ignore */
454
+ ...(ngDevMode ? [{ debugName: "defaultContentWidth" }] : /* istanbul ignore next */ []));
455
+ defaultContentHeight = signal(undefined, /* @ts-ignore */
456
+ ...(ngDevMode ? [{ debugName: "defaultContentHeight" }] : /* istanbul ignore next */ []));
457
+ contentStyleClass = computed(() => this.resolveOption('contentStyleClass', undefined), /* @ts-ignore */
458
+ ...(ngDevMode ? [{ debugName: "contentStyleClass" }] : /* istanbul ignore next */ []));
459
+ vertical = computed(() => this._orientation() === 'vertical', /* @ts-ignore */
460
+ ...(ngDevMode ? [{ debugName: "vertical" }] : /* istanbul ignore next */ []));
461
+ horizontal = computed(() => this._orientation() === 'horizontal', /* @ts-ignore */
462
+ ...(ngDevMode ? [{ debugName: "horizontal" }] : /* istanbul ignore next */ []));
463
+ both = computed(() => this._orientation() === 'both', /* @ts-ignore */
464
+ ...(ngDevMode ? [{ debugName: "both" }] : /* istanbul ignore next */ []));
465
+ loadedItems = computed(() => {
466
+ const items = this._items();
467
+ if (items && !this.d_loading()) {
468
+ if (this.both()) {
469
+ return items.slice(this._appendOnly() ? 0 : this.first().rows, this.last().rows).map((item) => {
470
+ if (this._columns()) {
524
471
  return item;
525
472
  }
526
473
  else if (Array.isArray(item)) {
527
- return item.slice(this._appendOnly ? 0 : this.first.cols, this.last.cols);
474
+ return item.slice(this._appendOnly() ? 0 : this.first().cols, this.last().cols);
528
475
  }
529
476
  else {
530
477
  return item;
531
478
  }
532
479
  });
533
480
  }
534
- else if (this.horizontal && this._columns)
535
- return this._items;
481
+ else if (this.horizontal() && this._columns())
482
+ return items;
536
483
  else
537
- return this._items.slice(this._appendOnly ? 0 : this.first, this.last);
484
+ return items.slice(this._appendOnly() ? 0 : this.first(), this.last());
538
485
  }
539
486
  return [];
540
- }
541
- get loadedRows() {
542
- return this.d_loading ? (this._loaderDisabled ? this.loaderArr : []) : this.loadedItems;
543
- }
544
- get loadedColumns() {
545
- if (this._columns && (this.both || this.horizontal)) {
546
- return this.d_loading && this._loaderDisabled ? (this.both ? this.loaderArr[0] : this.loaderArr) : this._columns.slice(this.both ? this.first.cols : this.first, this.both ? this.last.cols : this.last);
487
+ }, /* @ts-ignore */
488
+ ...(ngDevMode ? [{ debugName: "loadedItems" }] : /* istanbul ignore next */ []));
489
+ loadedRows = computed(() => (this.d_loading() ? (this._loaderDisabled() ? this.loaderArr() : []) : this.loadedItems()), /* @ts-ignore */
490
+ ...(ngDevMode ? [{ debugName: "loadedRows" }] : /* istanbul ignore next */ []));
491
+ loadedColumns = computed(() => {
492
+ const columns = this._columns();
493
+ if (columns && (this.both() || this.horizontal())) {
494
+ return this.d_loading() && this._loaderDisabled() ? (this.both() ? this.loaderArr()[0] : this.loaderArr()) : columns.slice(this.both() ? this.first().cols : this.first(), this.both() ? this.last().cols : this.last());
547
495
  }
548
- return this._columns;
549
- }
496
+ return columns;
497
+ }, /* @ts-ignore */
498
+ ...(ngDevMode ? [{ debugName: "loadedColumns" }] : /* istanbul ignore next */ []));
550
499
  _componentStyle = inject(ScrollerStyle);
551
500
  onInit() {
552
501
  this.setInitialState();
553
502
  }
554
- onChanges(simpleChanges) {
555
- let isLoadingChanged = false;
556
- if (this.scrollHeight == '100%') {
557
- this.height = '100%';
558
- }
559
- if (simpleChanges.loading) {
560
- const { previousValue, currentValue } = simpleChanges.loading;
561
- if (this.lazy && previousValue !== currentValue && currentValue !== this.d_loading) {
562
- this.d_loading = currentValue;
563
- isLoadingChanged = true;
564
- }
565
- }
566
- if (simpleChanges.orientation) {
567
- this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
568
- }
569
- if (simpleChanges.numToleratedItems) {
570
- const { previousValue, currentValue } = simpleChanges.numToleratedItems;
571
- if (previousValue !== currentValue && currentValue !== this.d_numToleratedItems) {
572
- this.d_numToleratedItems = currentValue;
573
- }
574
- }
575
- if (simpleChanges.options) {
576
- const { previousValue, currentValue } = simpleChanges.options;
577
- if (this.lazy && previousValue?.loading !== currentValue?.loading && currentValue?.loading !== this.d_loading) {
578
- this.d_loading = currentValue.loading;
579
- isLoadingChanged = true;
580
- }
581
- if (previousValue?.numToleratedItems !== currentValue?.numToleratedItems && currentValue?.numToleratedItems !== this.d_numToleratedItems) {
582
- this.d_numToleratedItems = currentValue.numToleratedItems;
583
- }
584
- }
585
- if (this.initialized) {
586
- const isChanged = !isLoadingChanged && (simpleChanges.items?.previousValue?.length !== simpleChanges.items?.currentValue?.length || simpleChanges.itemSize || simpleChanges.scrollHeight || simpleChanges.scrollWidth);
587
- if (isChanged) {
588
- this.init();
589
- }
590
- }
591
- }
592
- onAfterContentInit() {
593
- this.templates().forEach((item) => {
594
- switch (item.getType()) {
595
- case 'content':
596
- this._contentTemplate = item.template;
597
- break;
598
- case 'item':
599
- this._itemTemplate = item.template;
600
- break;
601
- case 'loader':
602
- this._loaderTemplate = item.template;
603
- break;
604
- case 'loadericon':
605
- this._loaderIconTemplate = item.template;
606
- break;
607
- default:
608
- this._itemTemplate = item.template;
609
- break;
610
- }
503
+ constructor() {
504
+ super();
505
+ let previousLayout;
506
+ effect(() => {
507
+ const layout = { itemsLength: this._items()?.length, itemSize: this._itemSize(), scrollHeight: this._scrollHeight(), scrollWidth: this._scrollWidth(), loading: this._loading() };
508
+ untracked(() => {
509
+ if (previousLayout && this.initialized()) {
510
+ const isLoadingChanged = this._lazy() && previousLayout.loading !== layout.loading;
511
+ const isChanged = !isLoadingChanged &&
512
+ (previousLayout.itemsLength !== layout.itemsLength || previousLayout.itemSize !== layout.itemSize || previousLayout.scrollHeight !== layout.scrollHeight || previousLayout.scrollWidth !== layout.scrollWidth);
513
+ if (isChanged) {
514
+ this.init();
515
+ }
516
+ }
517
+ previousLayout = layout;
518
+ });
611
519
  });
612
- }
613
- onAfterViewInit() {
614
- Promise.resolve().then(() => {
615
- this.viewInit();
520
+ afterNextRender(() => {
521
+ Promise.resolve().then(() => {
522
+ this.viewInit();
523
+ });
524
+ });
525
+ afterEveryRender(() => {
526
+ this.bindDirectiveInstance.setAttrs(this.ptm('host'));
527
+ if (!this.initialized()) {
528
+ this.viewInit();
529
+ }
616
530
  });
617
- }
618
- onAfterViewChecked() {
619
- this.bindDirectiveInstance.setAttrs(this.ptm('host'));
620
- if (!this.initialized) {
621
- this.viewInit();
622
- }
623
531
  }
624
532
  onDestroy() {
625
533
  this.unbindResizeListener();
626
- this.contentEl = null;
627
- this.initialized = false;
534
+ this.contentEl.set(null);
535
+ this.initialized.set(false);
628
536
  }
629
537
  viewInit() {
630
- if (isPlatformBrowser(this.platformId) && !this.initialized) {
538
+ if (isPlatformBrowser(this.platformId) && !this.initialized()) {
631
539
  const elementViewChild = this.elementViewChild();
632
540
  if (isVisible(elementViewChild?.nativeElement)) {
633
541
  this.setInitialState();
634
- this.setContentEl(this.contentEl);
542
+ this.setContentEl(this.contentEl());
635
543
  this.init();
636
- this.defaultWidth = getWidth(elementViewChild?.nativeElement);
637
- this.defaultHeight = getHeight(elementViewChild?.nativeElement);
638
- this.defaultContentWidth = getWidth(this.contentEl);
639
- this.defaultContentHeight = getHeight(this.contentEl);
640
- this.initialized = true;
544
+ this.defaultWidth.set(getWidth(elementViewChild?.nativeElement));
545
+ this.defaultHeight.set(getHeight(elementViewChild?.nativeElement));
546
+ this.defaultContentWidth.set(getWidth(this.contentEl()));
547
+ this.defaultContentHeight.set(getHeight(this.contentEl()));
548
+ this.initialized.set(true);
641
549
  }
642
550
  }
643
551
  }
644
552
  init() {
645
- if (!this._disabled) {
553
+ if (!this._disabled()) {
646
554
  this.bindResizeListener();
647
555
  // wait for the next tick
648
556
  setTimeout(() => {
@@ -650,67 +558,65 @@ class Scroller extends BaseComponent {
650
558
  this.setSize();
651
559
  this.calculateOptions();
652
560
  this.calculateAutoSize();
653
- this.cd.detectChanges();
654
561
  }, 1);
655
562
  }
656
563
  }
657
564
  setContentEl(el) {
658
- this.contentEl = el || this.contentViewChild()?.nativeElement || findSingle(this.elementViewChild()?.nativeElement, '.p-virtualscroller-content');
565
+ this.contentEl.set(el || this.contentViewChild()?.nativeElement || findSingle(this.elementViewChild()?.nativeElement, '.p-virtualscroller-content'));
659
566
  }
660
567
  setInitialState() {
661
- this.first = this.both ? { rows: 0, cols: 0 } : 0;
662
- this.last = this.both ? { rows: 0, cols: 0 } : 0;
663
- this.numItemsInViewport = this.both ? { rows: 0, cols: 0 } : 0;
664
- this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
665
- if (this.d_loading === undefined || this.d_loading === false) {
666
- this.d_loading = this._loading || false;
568
+ this.first.set(this.both() ? { rows: 0, cols: 0 } : 0);
569
+ this.last.set(this.both() ? { rows: 0, cols: 0 } : 0);
570
+ this.numItemsInViewport.set(this.both() ? { rows: 0, cols: 0 } : 0);
571
+ this.lastScrollPos.set(this.both() ? { top: 0, left: 0 } : 0);
572
+ if (this.d_loading() === undefined || this.d_loading() === false) {
573
+ this.d_loading.set(this._loading() || false);
667
574
  }
668
- this.d_numToleratedItems = this._numToleratedItems;
669
- this.loaderArr = this.loaderArr.length > 0 ? this.loaderArr : [];
575
+ this.d_numToleratedItems.set(this._numToleratedItems());
576
+ this.loaderArr.set(this.loaderArr().length > 0 ? this.loaderArr() : []);
670
577
  }
671
578
  getElementRef() {
672
579
  return this.elementViewChild();
673
580
  }
674
581
  getPageByFirst(first) {
675
- return Math.floor(((first ?? this.first) + this.d_numToleratedItems * 4) / (this._step || 1));
582
+ return Math.floor(((first ?? this.first()) + this.d_numToleratedItems() * 4) / (this._step() || 1));
676
583
  }
677
584
  isPageChanged(first) {
678
- return this._step ? this.page !== this.getPageByFirst(first ?? this.first) : true;
585
+ return this._step() ? this.page() !== this.getPageByFirst(first ?? this.first()) : true;
679
586
  }
680
587
  scrollTo(options) {
681
- // this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
682
588
  this.elementViewChild()?.nativeElement?.scrollTo(options);
683
589
  }
684
590
  scrollToIndex(index, behavior = 'auto') {
685
- const valid = this.both ? index.every((i) => i > -1) : index > -1;
591
+ const valid = this.both() ? index.every((i) => i > -1) : index > -1;
686
592
  if (valid) {
687
- const first = this.first;
593
+ const first = this.first();
688
594
  const { scrollTop = 0, scrollLeft = 0 } = this.elementViewChild()?.nativeElement;
689
595
  const { numToleratedItems } = this.calculateNumItems();
690
596
  const contentPos = this.getContentPosition();
691
- const itemSize = this.itemSize;
597
+ const itemSize = this._itemSize();
692
598
  const calculateFirst = (_index = 0, _numT) => (_index <= _numT ? 0 : _index);
693
599
  const calculateCoord = (_first, _size, _cpos) => _first * _size + _cpos;
694
600
  const scrollTo = (left = 0, top = 0) => this.scrollTo({ left, top, behavior });
695
- let newFirst = this.both ? { rows: 0, cols: 0 } : 0;
601
+ let newFirst = this.both() ? { rows: 0, cols: 0 } : 0;
696
602
  let isRangeChanged = false, isScrollChanged = false;
697
- if (this.both) {
603
+ if (this.both()) {
698
604
  newFirst = {
699
605
  rows: calculateFirst(index[0], numToleratedItems[0]),
700
606
  cols: calculateFirst(index[1], numToleratedItems[1])
701
607
  };
702
608
  scrollTo(calculateCoord(newFirst.cols, itemSize[1], contentPos.left), calculateCoord(newFirst.rows, itemSize[0], contentPos.top));
703
- isScrollChanged = this.lastScrollPos.top !== scrollTop || this.lastScrollPos.left !== scrollLeft;
609
+ isScrollChanged = this.lastScrollPos().top !== scrollTop || this.lastScrollPos().left !== scrollLeft;
704
610
  isRangeChanged = newFirst.rows !== first.rows || newFirst.cols !== first.cols;
705
611
  }
706
612
  else {
707
613
  newFirst = calculateFirst(index, numToleratedItems);
708
- this.horizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPos.left), scrollTop) : scrollTo(scrollLeft, calculateCoord(newFirst, itemSize, contentPos.top));
709
- isScrollChanged = this.lastScrollPos !== (this.horizontal ? scrollLeft : scrollTop);
614
+ this.horizontal() ? scrollTo(calculateCoord(newFirst, itemSize, contentPos.left), scrollTop) : scrollTo(scrollLeft, calculateCoord(newFirst, itemSize, contentPos.top));
615
+ isScrollChanged = this.lastScrollPos() !== (this.horizontal() ? scrollLeft : scrollTop);
710
616
  isRangeChanged = newFirst !== first;
711
617
  }
712
- this.isRangeChanged = isRangeChanged;
713
- isScrollChanged && (this.first = newFirst);
618
+ this.isRangeChanged.set(isRangeChanged);
619
+ isScrollChanged && this.first.set(newFirst);
714
620
  }
715
621
  }
716
622
  scrollInView(index, to, behavior = 'auto') {
@@ -719,35 +625,36 @@ class Scroller extends BaseComponent {
719
625
  const scrollTo = (left = 0, top = 0) => this.scrollTo({ left, top, behavior });
720
626
  const isToStart = to === 'to-start';
721
627
  const isToEnd = to === 'to-end';
628
+ const itemSize = this._itemSize();
722
629
  if (isToStart) {
723
- if (this.both) {
630
+ if (this.both()) {
724
631
  if (viewport.first.rows - first.rows > index[0]) {
725
- scrollTo(viewport.first.cols * this._itemSize[1], (viewport.first.rows - 1) * this._itemSize[0]);
632
+ scrollTo(viewport.first.cols * itemSize[1], (viewport.first.rows - 1) * itemSize[0]);
726
633
  }
727
634
  else if (viewport.first.cols - first.cols > index[1]) {
728
- scrollTo((viewport.first.cols - 1) * this._itemSize[1], viewport.first.rows * this._itemSize[0]);
635
+ scrollTo((viewport.first.cols - 1) * itemSize[1], viewport.first.rows * itemSize[0]);
729
636
  }
730
637
  }
731
638
  else {
732
639
  if (viewport.first - first > index) {
733
- const pos = (viewport.first - 1) * this._itemSize;
734
- this.horizontal ? scrollTo(pos, 0) : scrollTo(0, pos);
640
+ const pos = (viewport.first - 1) * itemSize;
641
+ this.horizontal() ? scrollTo(pos, 0) : scrollTo(0, pos);
735
642
  }
736
643
  }
737
644
  }
738
645
  else if (isToEnd) {
739
- if (this.both) {
646
+ if (this.both()) {
740
647
  if (viewport.last.rows - first.rows <= index[0] + 1) {
741
- scrollTo(viewport.first.cols * this._itemSize[1], (viewport.first.rows + 1) * this._itemSize[0]);
648
+ scrollTo(viewport.first.cols * itemSize[1], (viewport.first.rows + 1) * itemSize[0]);
742
649
  }
743
650
  else if (viewport.last.cols - first.cols <= index[1] + 1) {
744
- scrollTo((viewport.first.cols + 1) * this._itemSize[1], viewport.first.rows * this._itemSize[0]);
651
+ scrollTo((viewport.first.cols + 1) * itemSize[1], viewport.first.rows * itemSize[0]);
745
652
  }
746
653
  }
747
654
  else {
748
655
  if (viewport.last - first <= index + 1) {
749
- const pos = (viewport.first + 1) * this._itemSize;
750
- this.horizontal ? scrollTo(pos, 0) : scrollTo(0, pos);
656
+ const pos = (viewport.first + 1) * itemSize;
657
+ this.horizontal() ? scrollTo(pos, 0) : scrollTo(0, pos);
751
658
  }
752
659
  }
753
660
  }
@@ -758,30 +665,30 @@ class Scroller extends BaseComponent {
758
665
  }
759
666
  getRenderedRange() {
760
667
  const calculateFirstInViewport = (_pos, _size) => (_size || _pos ? Math.floor(_pos / (_size || _pos)) : 0);
761
- let firstInViewport = this.first;
668
+ let firstInViewport = this.first();
762
669
  let lastInViewport = 0;
763
670
  const elementViewChild = this.elementViewChild();
764
671
  if (elementViewChild?.nativeElement) {
765
672
  const { scrollTop, scrollLeft } = elementViewChild.nativeElement;
766
- if (this.both) {
673
+ if (this.both()) {
767
674
  firstInViewport = {
768
- rows: calculateFirstInViewport(scrollTop, this._itemSize[0]),
769
- cols: calculateFirstInViewport(scrollLeft, this._itemSize[1])
675
+ rows: calculateFirstInViewport(scrollTop, this._itemSize()[0]),
676
+ cols: calculateFirstInViewport(scrollLeft, this._itemSize()[1])
770
677
  };
771
678
  lastInViewport = {
772
- rows: firstInViewport.rows + this.numItemsInViewport.rows,
773
- cols: firstInViewport.cols + this.numItemsInViewport.cols
679
+ rows: firstInViewport.rows + this.numItemsInViewport().rows,
680
+ cols: firstInViewport.cols + this.numItemsInViewport().cols
774
681
  };
775
682
  }
776
683
  else {
777
- const scrollPos = this.horizontal ? scrollLeft : scrollTop;
778
- firstInViewport = calculateFirstInViewport(scrollPos, this._itemSize);
779
- lastInViewport = firstInViewport + this.numItemsInViewport;
684
+ const scrollPos = this.horizontal() ? scrollLeft : scrollTop;
685
+ firstInViewport = calculateFirstInViewport(scrollPos, this._itemSize());
686
+ lastInViewport = firstInViewport + this.numItemsInViewport();
780
687
  }
781
688
  }
782
689
  return {
783
- first: this.first,
784
- last: this.last,
690
+ first: this.first(),
691
+ last: this.last(),
785
692
  viewport: {
786
693
  first: firstInViewport,
787
694
  last: lastInViewport
@@ -796,67 +703,70 @@ class Scroller extends BaseComponent {
796
703
  const contentHeight = (elementViewChildValue?.nativeElement ? elementViewChildValue.nativeElement.offsetHeight - contentPos.top : 0) || 0;
797
704
  const calculateNumItemsInViewport = (_contentSize, _itemSize) => (_itemSize || _contentSize ? Math.ceil(_contentSize / (_itemSize || _contentSize)) : 0);
798
705
  const calculateNumToleratedItems = (_numItems) => Math.ceil(_numItems / 2);
799
- const numItemsInViewport = this.both
706
+ const numItemsInViewport = this.both()
800
707
  ? {
801
- rows: calculateNumItemsInViewport(contentHeight, this._itemSize[0]),
802
- cols: calculateNumItemsInViewport(contentWidth, this._itemSize[1])
708
+ rows: calculateNumItemsInViewport(contentHeight, this._itemSize()[0]),
709
+ cols: calculateNumItemsInViewport(contentWidth, this._itemSize()[1])
803
710
  }
804
- : calculateNumItemsInViewport(this.horizontal ? contentWidth : contentHeight, this._itemSize);
805
- const numToleratedItems = this.d_numToleratedItems || (this.both ? [calculateNumToleratedItems(numItemsInViewport.rows), calculateNumToleratedItems(numItemsInViewport.cols)] : calculateNumToleratedItems(numItemsInViewport));
711
+ : calculateNumItemsInViewport(this.horizontal() ? contentWidth : contentHeight, this._itemSize());
712
+ const numToleratedItems = this.d_numToleratedItems() || (this.both() ? [calculateNumToleratedItems(numItemsInViewport.rows), calculateNumToleratedItems(numItemsInViewport.cols)] : calculateNumToleratedItems(numItemsInViewport));
806
713
  return { numItemsInViewport, numToleratedItems };
807
714
  }
808
715
  calculateOptions() {
809
716
  const { numItemsInViewport, numToleratedItems } = this.calculateNumItems();
810
717
  const calculateLast = (_first, _num, _numT, _isCols = false) => this.getLast(_first + _num + (_first < _numT ? 2 : 3) * _numT, _isCols);
811
- const first = this.first;
812
- const last = this.both
718
+ const first = this.first();
719
+ const last = this.both()
813
720
  ? {
814
- rows: calculateLast(this.first.rows, numItemsInViewport.rows, numToleratedItems[0]),
815
- cols: calculateLast(this.first.cols, numItemsInViewport.cols, numToleratedItems[1], true)
721
+ rows: calculateLast(first.rows, numItemsInViewport.rows, numToleratedItems[0]),
722
+ cols: calculateLast(first.cols, numItemsInViewport.cols, numToleratedItems[1], true)
816
723
  }
817
- : calculateLast(this.first, numItemsInViewport, numToleratedItems);
818
- this.last = last;
819
- this.numItemsInViewport = numItemsInViewport;
820
- this.d_numToleratedItems = numToleratedItems;
821
- if (this._showLoader) {
822
- this.loaderArr = this.both ? Array.from({ length: numItemsInViewport.rows }).map(() => Array.from({ length: numItemsInViewport.cols })) : Array.from({ length: numItemsInViewport });
724
+ : calculateLast(first, numItemsInViewport, numToleratedItems);
725
+ this.last.set(last);
726
+ this.numItemsInViewport.set(numItemsInViewport);
727
+ this.d_numToleratedItems.set(numToleratedItems);
728
+ if (this._showLoader()) {
729
+ this.loaderArr.set(this.both() ? Array.from({ length: numItemsInViewport.rows }).map(() => Array.from({ length: numItemsInViewport.cols })) : Array.from({ length: numItemsInViewport }));
823
730
  }
824
- if (this._lazy) {
731
+ if (this._lazy()) {
825
732
  Promise.resolve().then(() => {
826
- this.lazyLoadState = {
827
- first: this._step ? (this.both ? { rows: 0, cols: first.cols } : 0) : first,
828
- last: Math.min(this._step ? this._step : this.last, this._items.length)
829
- };
830
- this.handleEvents('onLazyLoad', this.lazyLoadState);
733
+ this.lazyLoadState.set({
734
+ first: this._step() ? (this.both() ? { rows: 0, cols: first.cols } : 0) : first,
735
+ last: Math.min(this._step() ? this._step() : this.last(), this._items().length)
736
+ });
737
+ this.handleEvents('onLazyLoad', this.lazyLoadState());
831
738
  });
832
739
  }
833
740
  }
834
741
  calculateAutoSize() {
835
- if (this._autoSize && !this.d_loading) {
742
+ if (this._autoSize() && !this.d_loading()) {
836
743
  Promise.resolve().then(() => {
837
- if (this.contentEl) {
838
- this.contentEl.style.minHeight = this.contentEl.style.minWidth = 'auto';
839
- this.contentEl.style.position = 'relative';
744
+ const contentEl = this.contentEl();
745
+ if (contentEl) {
746
+ contentEl.style.minHeight = contentEl.style.minWidth = 'auto';
747
+ contentEl.style.position = 'relative';
840
748
  this.elementViewChild().nativeElement.style.contain = 'none';
841
- const [contentWidth, contentHeight] = [getWidth(this.contentEl), getHeight(this.contentEl)];
842
- contentWidth !== this.defaultContentWidth && (this.elementViewChild().nativeElement.style.width = '');
843
- contentHeight !== this.defaultContentHeight && (this.elementViewChild().nativeElement.style.height = '');
749
+ const [contentWidth, contentHeight] = [getWidth(contentEl), getHeight(contentEl)];
750
+ contentWidth !== this.defaultContentWidth() && (this.elementViewChild().nativeElement.style.width = '');
751
+ contentHeight !== this.defaultContentHeight() && (this.elementViewChild().nativeElement.style.height = '');
844
752
  const [width, height] = [getWidth(this.elementViewChild().nativeElement), getHeight(this.elementViewChild().nativeElement)];
845
- (this.both || this.horizontal) && (this.elementViewChild().nativeElement.style.width = width < this.defaultWidth ? width + 'px' : this._scrollWidth || this.defaultWidth + 'px');
846
- (this.both || this.vertical) && (this.elementViewChild().nativeElement.style.height = height < this.defaultHeight ? height + 'px' : this._scrollHeight || this.defaultHeight + 'px');
847
- this.contentEl.style.minHeight = this.contentEl.style.minWidth = '';
848
- this.contentEl.style.position = '';
753
+ (this.both() || this.horizontal()) && (this.elementViewChild().nativeElement.style.width = width < this.defaultWidth() ? width + 'px' : this._scrollWidth() || this.defaultWidth() + 'px');
754
+ (this.both() || this.vertical()) && (this.elementViewChild().nativeElement.style.height = height < this.defaultHeight() ? height + 'px' : this._scrollHeight() || this.defaultHeight() + 'px');
755
+ contentEl.style.minHeight = contentEl.style.minWidth = '';
756
+ contentEl.style.position = '';
849
757
  this.elementViewChild().nativeElement.style.contain = '';
850
758
  }
851
759
  });
852
760
  }
853
761
  }
854
762
  getLast(last = 0, isCols = false) {
855
- return this._items ? Math.min(isCols ? (this._columns || this._items[0]).length : this._items.length, last) : 0;
763
+ const items = this._items();
764
+ return items ? Math.min(isCols ? (this._columns() || items[0]).length : items.length, last) : 0;
856
765
  }
857
766
  getContentPosition() {
858
- if (this.contentEl) {
859
- const style = getComputedStyle(this.contentEl);
767
+ const contentEl = this.contentEl();
768
+ if (contentEl) {
769
+ const style = getComputedStyle(contentEl);
860
770
  const left = parseFloat(style.paddingLeft) + Math.max(parseFloat(style.left) || 0, 0);
861
771
  const right = parseFloat(style.paddingRight) + Math.max(parseFloat(style.right) || 0, 0);
862
772
  const top = parseFloat(style.paddingTop) + Math.max(parseFloat(style.top) || 0, 0);
@@ -872,12 +782,12 @@ class Scroller extends BaseComponent {
872
782
  const parentElement = nativeElement.parentElement?.parentElement;
873
783
  const elementWidth = nativeElement.offsetWidth;
874
784
  const parentWidth = parentElement?.offsetWidth || 0;
875
- const width = this._scrollWidth || `${elementWidth || parentWidth}px`;
785
+ const width = this._scrollWidth() || `${elementWidth || parentWidth}px`;
876
786
  const elementHeight = nativeElement.offsetHeight;
877
787
  const parentHeight = parentElement?.offsetHeight || 0;
878
- const height = this._scrollHeight || `${elementHeight || parentHeight}px`;
788
+ const height = this._scrollHeight() || `${elementHeight || parentHeight}px`;
879
789
  const setProp = (_name, _value) => (nativeElement.style[_name] = _value);
880
- if (this.both || this.horizontal) {
790
+ if (this.both() || this.horizontal()) {
881
791
  setProp('height', height);
882
792
  setProp('width', width);
883
793
  }
@@ -887,32 +797,33 @@ class Scroller extends BaseComponent {
887
797
  }
888
798
  }
889
799
  setSpacerSize() {
890
- if (this._items) {
800
+ const items = this._items();
801
+ if (items) {
891
802
  const contentPos = this.getContentPosition();
892
- const setProp = (_name, _value, _size, _cpos = 0) => (this.spacerStyle = {
893
- ...this.spacerStyle,
803
+ const setProp = (_name, _value, _size, _cpos = 0) => this.spacerStyle.update((spacerStyle) => ({
804
+ ...spacerStyle,
894
805
  ...{ [`${_name}`]: (_value || []).length * _size + _cpos + 'px' }
895
- });
896
- if (this.both) {
897
- setProp('height', this._items, this._itemSize[0], contentPos.y);
898
- setProp('width', this._columns || this._items[1], this._itemSize[1], contentPos.x);
806
+ }));
807
+ if (this.both()) {
808
+ setProp('height', items, this._itemSize()[0], contentPos.y);
809
+ setProp('width', this._columns() || items[1], this._itemSize()[1], contentPos.x);
899
810
  }
900
811
  else {
901
- this.horizontal ? setProp('width', this._columns || this._items, this._itemSize, contentPos.x) : setProp('height', this._items, this._itemSize, contentPos.y);
812
+ this.horizontal() ? setProp('width', this._columns() || items, this._itemSize(), contentPos.x) : setProp('height', items, this._itemSize(), contentPos.y);
902
813
  }
903
814
  }
904
815
  }
905
816
  setContentPosition(pos) {
906
- if (this.contentEl && !this._appendOnly) {
907
- const first = pos ? pos.first : this.first;
817
+ if (this.contentEl() && !this._appendOnly()) {
818
+ const first = pos ? pos.first : this.first();
908
819
  const calculateTranslateVal = (_first, _size) => _first * _size;
909
- const setTransform = (_x = 0, _y = 0) => (this.contentStyle = { ...this.contentStyle, ...{ transform: `translate3d(${_x}px, ${_y}px, 0)` } });
910
- if (this.both) {
911
- setTransform(calculateTranslateVal(first.cols, this._itemSize[1]), calculateTranslateVal(first.rows, this._itemSize[0]));
820
+ const setTransform = (_x = 0, _y = 0) => this.contentStyle.update((contentStyle) => ({ ...contentStyle, ...{ transform: `translate3d(${_x}px, ${_y}px, 0)` } }));
821
+ if (this.both()) {
822
+ setTransform(calculateTranslateVal(first.cols, this._itemSize()[1]), calculateTranslateVal(first.rows, this._itemSize()[0]));
912
823
  }
913
824
  else {
914
- const translateVal = calculateTranslateVal(first, this._itemSize);
915
- this.horizontal ? setTransform(translateVal, 0) : setTransform(0, translateVal);
825
+ const translateVal = calculateTranslateVal(first, this._itemSize());
826
+ this.horizontal() ? setTransform(translateVal, 0) : setTransform(0, translateVal);
916
827
  }
917
828
  }
918
829
  }
@@ -942,43 +853,48 @@ class Scroller extends BaseComponent {
942
853
  };
943
854
  const scrollTop = calculateScrollPos(target.scrollTop, contentPos.top);
944
855
  const scrollLeft = calculateScrollPos(target.scrollLeft, contentPos.left);
945
- let newFirst = this.both ? { rows: 0, cols: 0 } : 0;
946
- let newLast = this.last;
856
+ const first = this.first();
857
+ const last = this.last();
858
+ const numItemsInViewport = this.numItemsInViewport();
859
+ const d_numToleratedItems = this.d_numToleratedItems();
860
+ const lastScrollPos = this.lastScrollPos();
861
+ let newFirst = this.both() ? { rows: 0, cols: 0 } : 0;
862
+ let newLast = last;
947
863
  let isRangeChanged = false;
948
- let newScrollPos = this.lastScrollPos;
949
- if (this.both) {
950
- const isScrollDown = this.lastScrollPos.top <= scrollTop;
951
- const isScrollRight = this.lastScrollPos.left <= scrollLeft;
952
- if (!this._appendOnly || (this._appendOnly && (isScrollDown || isScrollRight))) {
864
+ let newScrollPos = lastScrollPos;
865
+ if (this.both()) {
866
+ const isScrollDown = lastScrollPos.top <= scrollTop;
867
+ const isScrollRight = lastScrollPos.left <= scrollLeft;
868
+ if (!this._appendOnly() || (this._appendOnly() && (isScrollDown || isScrollRight))) {
953
869
  const currentIndex = {
954
- rows: calculateCurrentIndex(scrollTop, this._itemSize[0]),
955
- cols: calculateCurrentIndex(scrollLeft, this._itemSize[1])
870
+ rows: calculateCurrentIndex(scrollTop, this._itemSize()[0]),
871
+ cols: calculateCurrentIndex(scrollLeft, this._itemSize()[1])
956
872
  };
957
873
  const triggerIndex = {
958
- rows: calculateTriggerIndex(currentIndex.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], isScrollDown),
959
- cols: calculateTriggerIndex(currentIndex.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], isScrollRight)
874
+ rows: calculateTriggerIndex(currentIndex.rows, first.rows, last.rows, numItemsInViewport.rows, d_numToleratedItems[0], isScrollDown),
875
+ cols: calculateTriggerIndex(currentIndex.cols, first.cols, last.cols, numItemsInViewport.cols, d_numToleratedItems[1], isScrollRight)
960
876
  };
961
877
  newFirst = {
962
- rows: calculateFirst(currentIndex.rows, triggerIndex.rows, this.first.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0], isScrollDown),
963
- cols: calculateFirst(currentIndex.cols, triggerIndex.cols, this.first.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], isScrollRight)
878
+ rows: calculateFirst(currentIndex.rows, triggerIndex.rows, first.rows, last.rows, numItemsInViewport.rows, d_numToleratedItems[0], isScrollDown),
879
+ cols: calculateFirst(currentIndex.cols, triggerIndex.cols, first.cols, last.cols, numItemsInViewport.cols, d_numToleratedItems[1], isScrollRight)
964
880
  };
965
881
  newLast = {
966
- rows: calculateLast(currentIndex.rows, newFirst.rows, this.last.rows, this.numItemsInViewport.rows, this.d_numToleratedItems[0]),
967
- cols: calculateLast(currentIndex.cols, newFirst.cols, this.last.cols, this.numItemsInViewport.cols, this.d_numToleratedItems[1], true)
882
+ rows: calculateLast(currentIndex.rows, newFirst.rows, last.rows, numItemsInViewport.rows, d_numToleratedItems[0]),
883
+ cols: calculateLast(currentIndex.cols, newFirst.cols, last.cols, numItemsInViewport.cols, d_numToleratedItems[1], true)
968
884
  };
969
- isRangeChanged = newFirst.rows !== this.first.rows || newLast.rows !== this.last.rows || newFirst.cols !== this.first.cols || newLast.cols !== this.last.cols || this.isRangeChanged;
885
+ isRangeChanged = newFirst.rows !== first.rows || newLast.rows !== last.rows || newFirst.cols !== first.cols || newLast.cols !== last.cols || this.isRangeChanged();
970
886
  newScrollPos = { top: scrollTop, left: scrollLeft };
971
887
  }
972
888
  }
973
889
  else {
974
- const scrollPos = this.horizontal ? scrollLeft : scrollTop;
975
- const isScrollDownOrRight = this.lastScrollPos <= scrollPos;
976
- if (!this._appendOnly || (this._appendOnly && isScrollDownOrRight)) {
977
- const currentIndex = calculateCurrentIndex(scrollPos, this._itemSize);
978
- const triggerIndex = calculateTriggerIndex(currentIndex, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, isScrollDownOrRight);
979
- newFirst = calculateFirst(currentIndex, triggerIndex, this.first, this.last, this.numItemsInViewport, this.d_numToleratedItems, isScrollDownOrRight);
980
- newLast = calculateLast(currentIndex, newFirst, this.last, this.numItemsInViewport, this.d_numToleratedItems);
981
- isRangeChanged = newFirst !== this.first || newLast !== this.last || this.isRangeChanged;
890
+ const scrollPos = this.horizontal() ? scrollLeft : scrollTop;
891
+ const isScrollDownOrRight = lastScrollPos <= scrollPos;
892
+ if (!this._appendOnly() || (this._appendOnly() && isScrollDownOrRight)) {
893
+ const currentIndex = calculateCurrentIndex(scrollPos, this._itemSize());
894
+ const triggerIndex = calculateTriggerIndex(currentIndex, first, last, numItemsInViewport, d_numToleratedItems, isScrollDownOrRight);
895
+ newFirst = calculateFirst(currentIndex, triggerIndex, first, last, numItemsInViewport, d_numToleratedItems, isScrollDownOrRight);
896
+ newLast = calculateLast(currentIndex, newFirst, last, numItemsInViewport, d_numToleratedItems);
897
+ isRangeChanged = newFirst !== first || newLast !== last || this.isRangeChanged();
982
898
  newScrollPos = scrollPos;
983
899
  }
984
900
  }
@@ -998,117 +914,123 @@ class Scroller extends BaseComponent {
998
914
  // multi-page jump), the page before the landing page can still be (partially) visible
999
915
  // through the tolerated items, so it must be included in the lazy load request.
1000
916
  const currentPage = this.getPageByFirst(first);
1001
- const previousPage = this.getPageByFirst(this.first);
917
+ const previousPage = this.getPageByFirst(this.first());
1002
918
  const loadPreviousPage = currentPage !== previousPage && currentPage !== previousPage + 1;
1003
- this.first = first;
1004
- this.last = last;
1005
- this.lastScrollPos = scrollPos;
919
+ this.first.set(first);
920
+ this.last.set(last);
921
+ this.lastScrollPos.set(scrollPos);
1006
922
  this.handleEvents('onScrollIndexChange', newState);
1007
- if (this._lazy && this.isPageChanged(first)) {
923
+ if (this._lazy() && this.isPageChanged(first)) {
924
+ const step = this._step();
925
+ const itemsLength = this._items().length;
1008
926
  const lazyLoadState = {
1009
- first: this._step ? Math.max(0, Math.min((currentPage - (loadPreviousPage ? 1 : 0)) * this._step, this._items.length - this._step)) : first,
1010
- last: Math.min(this._step ? (currentPage + 1) * this._step : last, this._items.length)
927
+ first: step ? Math.max(0, Math.min((currentPage - (loadPreviousPage ? 1 : 0)) * step, itemsLength - step)) : first,
928
+ last: Math.min(step ? (currentPage + 1) * step : last, itemsLength)
1011
929
  };
1012
- const isLazyStateChanged = lazyLoadState.first < this.lazyLoadState.first || lazyLoadState.last > this.lazyLoadState.last;
930
+ const isLazyStateChanged = lazyLoadState.first < this.lazyLoadState().first || lazyLoadState.last > this.lazyLoadState().last;
1013
931
  isLazyStateChanged && this.handleEvents('onLazyLoad', lazyLoadState);
1014
- this.lazyLoadState = lazyLoadState;
932
+ this.lazyLoadState.set(lazyLoadState);
1015
933
  }
1016
934
  }
1017
935
  }
1018
936
  onContainerScroll(event) {
1019
937
  this.handleEvents('onScroll', { originalEvent: event });
1020
- if (this._delay) {
1021
- if (this.scrollTimeout) {
1022
- clearTimeout(this.scrollTimeout);
938
+ if (this._delay()) {
939
+ if (this.scrollTimeout()) {
940
+ clearTimeout(this.scrollTimeout());
1023
941
  }
1024
- if (!this.d_loading && this._showLoader) {
942
+ if (!this.d_loading() && this._showLoader()) {
1025
943
  const { isRangeChanged } = this.onScrollPositionChange(event);
1026
- const changed = isRangeChanged || (this._step ? this.isPageChanged() : false);
944
+ const changed = isRangeChanged || (this._step() ? this.isPageChanged() : false);
1027
945
  if (changed) {
1028
- this.d_loading = true;
1029
- this.cd.detectChanges();
946
+ this.d_loading.set(true);
1030
947
  }
1031
948
  }
1032
- this.scrollTimeout = setTimeout(() => {
949
+ this.scrollTimeout.set(setTimeout(() => {
1033
950
  this.onScrollChange(event);
1034
- if (this.d_loading && this._showLoader && (!this._lazy || this._loading === undefined)) {
1035
- this.d_loading = false;
1036
- this.page = this.getPageByFirst();
951
+ if (this.d_loading() && this._showLoader() && (!this._lazy() || this._loading() === undefined)) {
952
+ this.d_loading.set(false);
953
+ this.page.set(this.getPageByFirst());
1037
954
  }
1038
- this.cd.detectChanges();
1039
- }, this._delay);
955
+ }, this._delay()));
1040
956
  }
1041
957
  else {
1042
- !this.d_loading && this.onScrollChange(event);
958
+ !this.d_loading() && this.onScrollChange(event);
1043
959
  }
1044
960
  }
1045
961
  bindResizeListener() {
1046
962
  if (isPlatformBrowser(this.platformId)) {
1047
- if (!this.windowResizeListener) {
963
+ if (!this.windowResizeListener()) {
1048
964
  this.zone.runOutsideAngular(() => {
1049
965
  const window = this.document.defaultView;
1050
966
  const event = isTouchDevice() ? 'orientationchange' : 'resize';
1051
- this.windowResizeListener = this.renderer.listen(window, event, this.onWindowResize.bind(this));
967
+ this.windowResizeListener.set(this.renderer.listen(window, event, this.onWindowResize.bind(this)));
1052
968
  });
1053
969
  }
1054
970
  }
1055
971
  }
1056
972
  unbindResizeListener() {
1057
- if (this.windowResizeListener) {
1058
- this.windowResizeListener();
1059
- this.windowResizeListener = null;
973
+ const windowResizeListener = this.windowResizeListener();
974
+ if (windowResizeListener) {
975
+ windowResizeListener();
976
+ this.windowResizeListener.set(null);
1060
977
  }
1061
978
  }
1062
979
  onWindowResize() {
1063
- if (this.resizeTimeout) {
1064
- clearTimeout(this.resizeTimeout);
980
+ if (this.resizeTimeout()) {
981
+ clearTimeout(this.resizeTimeout());
1065
982
  }
1066
- this.resizeTimeout = setTimeout(() => {
983
+ this.resizeTimeout.set(setTimeout(() => {
1067
984
  const elementViewChild = this.elementViewChild();
1068
985
  if (isVisible(elementViewChild?.nativeElement)) {
1069
986
  const [width, height] = [getWidth(elementViewChild?.nativeElement), getHeight(elementViewChild?.nativeElement)];
1070
- const [isDiffWidth, isDiffHeight] = [width !== this.defaultWidth, height !== this.defaultHeight];
1071
- const reinit = this.both ? isDiffWidth || isDiffHeight : this.horizontal ? isDiffWidth : this.vertical ? isDiffHeight : false;
987
+ const [isDiffWidth, isDiffHeight] = [width !== this.defaultWidth(), height !== this.defaultHeight()];
988
+ const reinit = this.both() ? isDiffWidth || isDiffHeight : this.horizontal() ? isDiffWidth : this.vertical() ? isDiffHeight : false;
1072
989
  reinit &&
1073
990
  this.zone.run(() => {
1074
- this.d_numToleratedItems = this._numToleratedItems;
1075
- this.defaultWidth = width;
1076
- this.defaultHeight = height;
1077
- this.defaultContentWidth = getWidth(this.contentEl);
1078
- this.defaultContentHeight = getHeight(this.contentEl);
991
+ this.d_numToleratedItems.set(this._numToleratedItems());
992
+ this.defaultWidth.set(width);
993
+ this.defaultHeight.set(height);
994
+ this.defaultContentWidth.set(getWidth(this.contentEl()));
995
+ this.defaultContentHeight.set(getHeight(this.contentEl()));
1079
996
  this.init();
1080
997
  });
1081
998
  }
1082
- }, this._resizeDelay);
999
+ }, this._resizeDelay()));
1083
1000
  }
1084
1001
  handleEvents(name, params) {
1002
+ const options = this.options();
1085
1003
  //@ts-ignore
1086
- return this.options && this.options[name] ? this.options[name](params) : this[name].emit(params);
1004
+ return options && options[name] ? options[name](params) : this[name].emit(params);
1005
+ }
1006
+ resolveOption(key, value) {
1007
+ const options = this.options();
1008
+ return options && typeof options === 'object' && Object.prototype.hasOwnProperty.call(options, key) ? options[key] : value;
1087
1009
  }
1088
1010
  getContentOptions() {
1089
1011
  return {
1090
- contentStyleClass: `p-virtualscroller-content ${this.d_loading ? 'p-virtualscroller-loading' : ''}`,
1091
- items: this.loadedItems,
1012
+ contentStyleClass: `p-virtualscroller-content ${this.d_loading() ? 'p-virtualscroller-loading' : ''}`,
1013
+ items: this.loadedItems(),
1092
1014
  getItemOptions: (index) => this.getOptions(index),
1093
- loading: this.d_loading,
1015
+ loading: this.d_loading(),
1094
1016
  getLoaderOptions: (index, options) => this.getLoaderOptions(index, options),
1095
- itemSize: this._itemSize,
1096
- rows: this.loadedRows,
1097
- columns: this.loadedColumns,
1098
- spacerStyle: this.spacerStyle,
1099
- contentStyle: this.contentStyle,
1100
- vertical: this.vertical,
1101
- horizontal: this.horizontal,
1102
- both: this.both,
1017
+ itemSize: this._itemSize(),
1018
+ rows: this.loadedRows(),
1019
+ columns: this.loadedColumns(),
1020
+ spacerStyle: this.spacerStyle(),
1021
+ contentStyle: this.contentStyle(),
1022
+ vertical: this.vertical(),
1023
+ horizontal: this.horizontal(),
1024
+ both: this.both(),
1103
1025
  scrollTo: this.scrollTo.bind(this),
1104
1026
  scrollToIndex: this.scrollToIndex.bind(this),
1105
- orientation: this._orientation,
1027
+ orientation: this._orientation(),
1106
1028
  scrollableElement: this.elementViewChild()?.nativeElement
1107
1029
  };
1108
1030
  }
1109
1031
  getOptions(renderedIndex) {
1110
- const count = (this._items || []).length;
1111
- const index = this.both ? this.first.rows + renderedIndex : this.first + renderedIndex;
1032
+ const count = (this._items() || []).length;
1033
+ const index = this.both() ? this.first().rows + renderedIndex : this.first() + renderedIndex;
1112
1034
  return {
1113
1035
  index,
1114
1036
  count,
@@ -1119,7 +1041,7 @@ class Scroller extends BaseComponent {
1119
1041
  };
1120
1042
  }
1121
1043
  getLoaderOptions(index, extOptions) {
1122
- const count = this.loaderArr.length;
1044
+ const count = this.loaderArr().length;
1123
1045
  return {
1124
1046
  index,
1125
1047
  count,
@@ -1127,42 +1049,42 @@ class Scroller extends BaseComponent {
1127
1049
  last: index === count - 1,
1128
1050
  even: index % 2 === 0,
1129
1051
  odd: index % 2 !== 0,
1130
- loading: this.d_loading,
1052
+ loading: this.d_loading(),
1131
1053
  ...extOptions
1132
1054
  };
1133
1055
  }
1134
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Scroller, deps: null, target: i0.ɵɵFactoryTarget.Component });
1135
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Scroller, isStandalone: true, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: { hostName: "hostName", id: "id", style: "style", styleClass: "styleClass", tabindex: "tabindex", items: "items", itemSize: "itemSize", scrollHeight: "scrollHeight", scrollWidth: "scrollWidth", orientation: "orientation", step: "step", delay: "delay", resizeDelay: "resizeDelay", appendOnly: "appendOnly", inline: "inline", lazy: "lazy", disabled: "disabled", loaderDisabled: "loaderDisabled", columns: "columns", showSpacer: "showSpacer", showLoader: "showLoader", numToleratedItems: "numToleratedItems", loading: "loading", autoSize: "autoSize", trackBy: "trackBy", options: "options" }, outputs: { onLazyLoad: "onLazyLoad", onScroll: "onScroll", onScrollIndexChange: "onScrollIndexChange" }, host: { properties: { "style.height": "this.height" } }, providers: [ScrollerStyle, { provide: SCROLLER_INSTANCE, useExisting: Scroller }, { provide: PARENT_INSTANCE, useExisting: Scroller }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["item"], isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], isSignal: true }, { propertyName: "loaderIconTemplate", first: true, predicate: ["loadericon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "elementViewChild", first: true, predicate: ["element"], descendants: true, isSignal: true }, { propertyName: "contentViewChild", first: true, predicate: ["content"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
1136
- @if (!_disabled) {
1137
- <div #element [attr.id]="_id" [attr.tabindex]="tabindex" [ngStyle]="_style" [class]="cn(cx('root'), styleClass)" (scroll)="onContainerScroll($event)" [pBind]="ptm('root')">
1138
- @if (contentTemplate() || _contentTemplate) {
1139
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate; context: { $implicit: loadedItems, options: getContentOptions() }"></ng-container>
1056
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Scroller, deps: [], target: i0.ɵɵFactoryTarget.Component });
1057
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Scroller, isStandalone: true, selector: "p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, scrollWidth: { classPropertyName: "scrollWidth", publicName: "scrollWidth", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null }, resizeDelay: { classPropertyName: "resizeDelay", publicName: "resizeDelay", isSignal: true, isRequired: false, transformFunction: null }, appendOnly: { classPropertyName: "appendOnly", publicName: "appendOnly", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loaderDisabled: { classPropertyName: "loaderDisabled", publicName: "loaderDisabled", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, showSpacer: { classPropertyName: "showSpacer", publicName: "showSpacer", isSignal: true, isRequired: false, transformFunction: null }, showLoader: { classPropertyName: "showLoader", publicName: "showLoader", isSignal: true, isRequired: false, transformFunction: null }, numToleratedItems: { classPropertyName: "numToleratedItems", publicName: "numToleratedItems", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, autoSize: { classPropertyName: "autoSize", publicName: "autoSize", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onLazyLoad: "onLazyLoad", onScroll: "onScroll", onScrollIndexChange: "onScrollIndexChange" }, host: { properties: { "style.height": "height()" } }, providers: [ScrollerStyle, { provide: SCROLLER_INSTANCE, useExisting: Scroller }, { provide: PARENT_INSTANCE, useExisting: Scroller }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["item"], isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], isSignal: true }, { propertyName: "loaderIconTemplate", first: true, predicate: ["loadericon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "elementViewChild", first: true, predicate: ["element"], descendants: true, isSignal: true }, { propertyName: "contentViewChild", first: true, predicate: ["content"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
1058
+ @if (!_disabled()) {
1059
+ <div #element [attr.id]="_id()" [attr.tabindex]="_tabindex()" [ngStyle]="_style()" [class]="cn(cx('root'), _styleClass())" (scroll)="onContainerScroll($event)" [pBind]="ptm('root')">
1060
+ @if (contentTemplate() || _contentTemplate()) {
1061
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate(); context: { $implicit: loadedItems(), options: getContentOptions() }"></ng-container>
1140
1062
  } @else {
1141
- <div #content [class]="cn(cx('content'), contentStyleClass)" [style]="contentStyle" [pBind]="ptm('content')">
1142
- @for (item of loadedItems; track _trackBy ? _trackBy($index, item) : item; let index = $index) {
1143
- <ng-container *ngTemplateOutlet="itemTemplate() || _itemTemplate; context: { $implicit: item, options: getOptions(index) }"></ng-container>
1063
+ <div #content [class]="cn(cx('content'), contentStyleClass())" [style]="contentStyle()" [pBind]="ptm('content')">
1064
+ @for (item of loadedItems(); track _trackBy() ? _trackBy()($index, item) : item; let index = $index) {
1065
+ <ng-container *ngTemplateOutlet="itemTemplate() || _itemTemplate(); context: { $implicit: item, options: getOptions(index) }"></ng-container>
1144
1066
  }
1145
1067
  </div>
1146
1068
  }
1147
- @if (_showSpacer) {
1148
- <div [class]="cx('spacer')" [ngStyle]="spacerStyle" [pBind]="ptm('spacer')"></div>
1069
+ @if (_showSpacer()) {
1070
+ <div [class]="cx('spacer')" [ngStyle]="spacerStyle()" [pBind]="ptm('spacer')"></div>
1149
1071
  }
1150
- @if (!loaderDisabled && _showLoader && d_loading) {
1072
+ @if (!_loaderDisabled() && _showLoader() && d_loading()) {
1151
1073
  <div [class]="cx('loader')" [pBind]="ptm('loader')">
1152
- @if (loaderTemplate() || _loaderTemplate) {
1153
- @for (item of loaderArr; track item; let index = $index) {
1074
+ @if (loaderTemplate() || _loaderTemplate()) {
1075
+ @for (item of loaderArr(); track item; let index = $index) {
1154
1076
  <ng-container
1155
1077
  *ngTemplateOutlet="
1156
- loaderTemplate() || _loaderTemplate;
1078
+ loaderTemplate() || _loaderTemplate();
1157
1079
  context: {
1158
- options: getLoaderOptions(index, both && { numCols: numItemsInViewport.cols })
1080
+ options: getLoaderOptions(index, both() && { numCols: numItemsInViewport().cols })
1159
1081
  }
1160
1082
  "
1161
1083
  ></ng-container>
1162
1084
  }
1163
1085
  } @else {
1164
- @if (loaderIconTemplate() || _loaderIconTemplate) {
1165
- <ng-container *ngTemplateOutlet="loaderIconTemplate() || _loaderIconTemplate; context: { options: { styleClass: 'p-virtualscroller-loading-icon' } }"></ng-container>
1086
+ @if (loaderIconTemplate() || _loaderIconTemplate()) {
1087
+ <ng-container *ngTemplateOutlet="loaderIconTemplate() || _loaderIconTemplate(); context: { options: { styleClass: 'p-virtualscroller-loading-icon' } }"></ng-container>
1166
1088
  } @else {
1167
1089
  <svg data-p-icon="spinner" [class]="cx('loadingIcon')" [spin]="true" [pBind]="ptm('loadingIcon')" />
1168
1090
  }
@@ -1172,49 +1094,48 @@ class Scroller extends BaseComponent {
1172
1094
  </div>
1173
1095
  } @else {
1174
1096
  <ng-content></ng-content>
1175
- @if (contentTemplate() || _contentTemplate) {
1176
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate; context: { $implicit: items, options: { rows: _items, columns: loadedColumns } }"></ng-container>
1097
+ @if (contentTemplate() || _contentTemplate()) {
1098
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate(); context: { $implicit: _items(), options: { rows: _items(), columns: loadedColumns() } }"></ng-container>
1177
1099
  }
1178
1100
  }
1179
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.Eager, encapsulation: i0.ViewEncapsulation.None });
1101
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
1180
1102
  }
1181
1103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Scroller, decorators: [{
1182
1104
  type: Component,
1183
1105
  args: [{
1184
1106
  selector: 'p-scroller, p-virtualscroller, p-virtual-scroller, p-virtualScroller',
1185
1107
  imports: [CommonModule, SpinnerIcon, SharedModule, Bind],
1186
- standalone: true,
1187
1108
  template: `
1188
- @if (!_disabled) {
1189
- <div #element [attr.id]="_id" [attr.tabindex]="tabindex" [ngStyle]="_style" [class]="cn(cx('root'), styleClass)" (scroll)="onContainerScroll($event)" [pBind]="ptm('root')">
1190
- @if (contentTemplate() || _contentTemplate) {
1191
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate; context: { $implicit: loadedItems, options: getContentOptions() }"></ng-container>
1109
+ @if (!_disabled()) {
1110
+ <div #element [attr.id]="_id()" [attr.tabindex]="_tabindex()" [ngStyle]="_style()" [class]="cn(cx('root'), _styleClass())" (scroll)="onContainerScroll($event)" [pBind]="ptm('root')">
1111
+ @if (contentTemplate() || _contentTemplate()) {
1112
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate(); context: { $implicit: loadedItems(), options: getContentOptions() }"></ng-container>
1192
1113
  } @else {
1193
- <div #content [class]="cn(cx('content'), contentStyleClass)" [style]="contentStyle" [pBind]="ptm('content')">
1194
- @for (item of loadedItems; track _trackBy ? _trackBy($index, item) : item; let index = $index) {
1195
- <ng-container *ngTemplateOutlet="itemTemplate() || _itemTemplate; context: { $implicit: item, options: getOptions(index) }"></ng-container>
1114
+ <div #content [class]="cn(cx('content'), contentStyleClass())" [style]="contentStyle()" [pBind]="ptm('content')">
1115
+ @for (item of loadedItems(); track _trackBy() ? _trackBy()($index, item) : item; let index = $index) {
1116
+ <ng-container *ngTemplateOutlet="itemTemplate() || _itemTemplate(); context: { $implicit: item, options: getOptions(index) }"></ng-container>
1196
1117
  }
1197
1118
  </div>
1198
1119
  }
1199
- @if (_showSpacer) {
1200
- <div [class]="cx('spacer')" [ngStyle]="spacerStyle" [pBind]="ptm('spacer')"></div>
1120
+ @if (_showSpacer()) {
1121
+ <div [class]="cx('spacer')" [ngStyle]="spacerStyle()" [pBind]="ptm('spacer')"></div>
1201
1122
  }
1202
- @if (!loaderDisabled && _showLoader && d_loading) {
1123
+ @if (!_loaderDisabled() && _showLoader() && d_loading()) {
1203
1124
  <div [class]="cx('loader')" [pBind]="ptm('loader')">
1204
- @if (loaderTemplate() || _loaderTemplate) {
1205
- @for (item of loaderArr; track item; let index = $index) {
1125
+ @if (loaderTemplate() || _loaderTemplate()) {
1126
+ @for (item of loaderArr(); track item; let index = $index) {
1206
1127
  <ng-container
1207
1128
  *ngTemplateOutlet="
1208
- loaderTemplate() || _loaderTemplate;
1129
+ loaderTemplate() || _loaderTemplate();
1209
1130
  context: {
1210
- options: getLoaderOptions(index, both && { numCols: numItemsInViewport.cols })
1131
+ options: getLoaderOptions(index, both() && { numCols: numItemsInViewport().cols })
1211
1132
  }
1212
1133
  "
1213
1134
  ></ng-container>
1214
1135
  }
1215
1136
  } @else {
1216
- @if (loaderIconTemplate() || _loaderIconTemplate) {
1217
- <ng-container *ngTemplateOutlet="loaderIconTemplate() || _loaderIconTemplate; context: { options: { styleClass: 'p-virtualscroller-loading-icon' } }"></ng-container>
1137
+ @if (loaderIconTemplate() || _loaderIconTemplate()) {
1138
+ <ng-container *ngTemplateOutlet="loaderIconTemplate() || _loaderIconTemplate(); context: { options: { styleClass: 'p-virtualscroller-loading-icon' } }"></ng-container>
1218
1139
  } @else {
1219
1140
  <svg data-p-icon="spinner" [class]="cx('loadingIcon')" [spin]="true" [pBind]="ptm('loadingIcon')" />
1220
1141
  }
@@ -1224,72 +1145,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
1224
1145
  </div>
1225
1146
  } @else {
1226
1147
  <ng-content></ng-content>
1227
- @if (contentTemplate() || _contentTemplate) {
1228
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate; context: { $implicit: items, options: { rows: _items, columns: loadedColumns } }"></ng-container>
1148
+ @if (contentTemplate() || _contentTemplate()) {
1149
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate(); context: { $implicit: _items(), options: { rows: _items(), columns: loadedColumns() } }"></ng-container>
1229
1150
  }
1230
1151
  }
1231
1152
  `,
1232
- changeDetection: ChangeDetectionStrategy.Eager,
1153
+ changeDetection: ChangeDetectionStrategy.OnPush,
1233
1154
  encapsulation: ViewEncapsulation.None,
1234
1155
  providers: [ScrollerStyle, { provide: SCROLLER_INSTANCE, useExisting: Scroller }, { provide: PARENT_INSTANCE, useExisting: Scroller }],
1156
+ host: {
1157
+ '[style.height]': 'height()'
1158
+ },
1235
1159
  hostDirectives: [Bind]
1236
1160
  }]
1237
- }], propDecorators: { hostName: [{
1238
- type: Input
1239
- }], id: [{
1240
- type: Input
1241
- }], style: [{
1242
- type: Input
1243
- }], styleClass: [{
1244
- type: Input
1245
- }], tabindex: [{
1246
- type: Input
1247
- }], items: [{
1248
- type: Input
1249
- }], itemSize: [{
1250
- type: Input
1251
- }], scrollHeight: [{
1252
- type: Input
1253
- }], scrollWidth: [{
1254
- type: Input
1255
- }], orientation: [{
1256
- type: Input
1257
- }], step: [{
1258
- type: Input
1259
- }], delay: [{
1260
- type: Input
1261
- }], resizeDelay: [{
1262
- type: Input
1263
- }], appendOnly: [{
1264
- type: Input
1265
- }], inline: [{
1266
- type: Input
1267
- }], lazy: [{
1268
- type: Input
1269
- }], disabled: [{
1270
- type: Input
1271
- }], loaderDisabled: [{
1272
- type: Input
1273
- }], columns: [{
1274
- type: Input
1275
- }], showSpacer: [{
1276
- type: Input
1277
- }], showLoader: [{
1278
- type: Input
1279
- }], numToleratedItems: [{
1280
- type: Input
1281
- }], loading: [{
1282
- type: Input
1283
- }], autoSize: [{
1284
- type: Input
1285
- }], trackBy: [{
1286
- type: Input
1287
- }], options: [{
1288
- type: Input
1289
- }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onScroll: [{ type: i0.Output, args: ["onScroll"] }], onScrollIndexChange: [{ type: i0.Output, args: ["onScrollIndexChange"] }], elementViewChild: [{ type: i0.ViewChild, args: ['element', { isSignal: true }] }], contentViewChild: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], height: [{
1290
- type: HostBinding,
1291
- args: ['style.height']
1292
- }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { ...{ descendants: false }, isSignal: true }] }], loaderIconTemplate: [{ type: i0.ContentChild, args: ['loadericon', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
1161
+ }], ctorParameters: () => [], propDecorators: { hostName: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostName", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], scrollWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollWidth", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], resizeDelay: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeDelay", required: false }] }], appendOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendOnly", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loaderDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "loaderDisabled", required: false }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], showSpacer: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSpacer", required: false }] }], showLoader: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLoader", required: false }] }], numToleratedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "numToleratedItems", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], autoSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSize", required: false }] }], trackBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "trackBy", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], onScroll: [{ type: i0.Output, args: ["onScroll"] }], onScrollIndexChange: [{ type: i0.Output, args: ["onScrollIndexChange"] }], elementViewChild: [{ type: i0.ViewChild, args: ['element', { isSignal: true }] }], contentViewChild: [{ type: i0.ViewChild, args: ['content', { isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { ...{ descendants: false }, isSignal: true }] }], loaderIconTemplate: [{ type: i0.ContentChild, args: ['loadericon', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
1293
1162
  class ScrollerModule {
1294
1163
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ScrollerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1295
1164
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: ScrollerModule, imports: [Scroller, SharedModule], exports: [Scroller, SharedModule] });