@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.
- package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
- package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-api.mjs +10 -17
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +786 -928
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
- package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
- package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
- package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
- package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
- package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-carousel.mjs +561 -599
- package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
- package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
- package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +227 -394
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +255 -266
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +585 -653
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
- package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +1792 -1787
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +480 -577
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
- package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
- package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +774 -745
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
- package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
- package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-ban.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-ban.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-bars.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-bars.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-blank.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-blank.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-calendar.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-calendar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-caretright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-caretright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-check.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-check.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-eye.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-eye.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filter.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-home.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-home.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-minus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-minus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-pencil.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-pencil.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-plus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-plus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-refresh.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-refresh.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-search.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-search.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-spinner.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-spinner.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-star.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-star.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-starfill.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-starfill.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-times.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-times.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-trash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-trash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-undo.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-undo.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-upload.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-upload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
- package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inplace.mjs +68 -102
- package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
- package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
- package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
- package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
- package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +591 -728
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +324 -375
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
- package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-motion.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +945 -1045
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
- package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +861 -879
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
- package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
- package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +837 -986
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
- package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
- package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
- package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +2435 -2721
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
- package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
- package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +604 -690
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
- package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
- package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
- package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +333 -423
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/package.json +11 -11
- package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
- package/schematics/migrations/renamed-inputs/migration.js +97 -0
- package/schematics/migrations/styleclass-to-class/migration.js +92 -1
- package/schematics/migrations.json +11 -6
- package/schematics/utils/removed-inputs.js +0 -0
- package/schematics/utils/renamed-inputs.js +175 -0
- package/schematics/utils/styleclass.js +24 -8
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-accordion.d.ts +8 -24
- package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
- package/types/exhaustive-ui-core-api.d.ts +2 -3
- package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
- package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
- package/types/exhaustive-ui-core-avatar.d.ts +18 -25
- package/types/exhaustive-ui-core-badge.d.ts +13 -27
- package/types/exhaustive-ui-core-blockui.d.ts +18 -30
- package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
- package/types/exhaustive-ui-core-button.d.ts +57 -89
- package/types/exhaustive-ui-core-carousel.d.ts +56 -82
- package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
- package/types/exhaustive-ui-core-chart.d.ts +21 -29
- package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
- package/types/exhaustive-ui-core-chip.d.ts +31 -38
- package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
- package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
- package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
- package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
- package/types/exhaustive-ui-core-dataview.d.ts +42 -65
- package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
- package/types/exhaustive-ui-core-dialog.d.ts +73 -123
- package/types/exhaustive-ui-core-dock.d.ts +16 -25
- package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
- package/types/exhaustive-ui-core-drawer.d.ts +32 -64
- package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
- package/types/exhaustive-ui-core-editor.d.ts +15 -25
- package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
- package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
- package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
- package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
- package/types/exhaustive-ui-core-galleria.d.ts +124 -194
- package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
- package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
- package/types/exhaustive-ui-core-image.d.ts +35 -68
- package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
- package/types/exhaustive-ui-core-inplace.d.ts +30 -42
- package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
- package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
- package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
- package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
- package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
- package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
- package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
- package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
- package/types/exhaustive-ui-core-knob.d.ts +45 -60
- package/types/exhaustive-ui-core-listbox.d.ts +90 -126
- package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
- package/types/exhaustive-ui-core-menu.d.ts +33 -53
- package/types/exhaustive-ui-core-menubar.d.ts +38 -85
- package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
- package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
- package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
- package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
- package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
- package/types/exhaustive-ui-core-paginator.d.ts +41 -69
- package/types/exhaustive-ui-core-panel.d.ts +18 -45
- package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
- package/types/exhaustive-ui-core-password.d.ts +56 -93
- package/types/exhaustive-ui-core-picklist.d.ts +107 -121
- package/types/exhaustive-ui-core-popover.d.ts +23 -47
- package/types/exhaustive-ui-core-rating.d.ts +18 -26
- package/types/exhaustive-ui-core-scroller.d.ts +90 -120
- package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
- package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
- package/types/exhaustive-ui-core-select.d.ts +137 -188
- package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
- package/types/exhaustive-ui-core-slider.d.ts +52 -67
- package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
- package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
- package/types/exhaustive-ui-core-splitter.d.ts +47 -59
- package/types/exhaustive-ui-core-steps.d.ts +24 -31
- package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
- package/types/exhaustive-ui-core-table.d.ts +349 -453
- package/types/exhaustive-ui-core-terminal.d.ts +10 -22
- package/types/exhaustive-ui-core-textarea.d.ts +7 -10
- package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
- package/types/exhaustive-ui-core-timeline.d.ts +20 -28
- package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
- package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
- package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
- package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
- package/types/exhaustive-ui-core-tree.d.ts +82 -119
- package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
- package/types/exhaustive-ui-core-treetable.d.ts +203 -280
- 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,
|
|
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.
|
|
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
|
-
|
|
151
|
-
|
|
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
|
-
|
|
161
|
-
|
|
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
|
-
|
|
171
|
-
|
|
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
|
-
|
|
181
|
-
|
|
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
|
-
|
|
191
|
-
|
|
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
|
-
|
|
201
|
-
|
|
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
|
-
|
|
211
|
-
|
|
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
|
-
|
|
221
|
-
|
|
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
|
-
|
|
231
|
-
|
|
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
|
-
|
|
241
|
-
|
|
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
|
-
|
|
251
|
-
|
|
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
|
-
|
|
261
|
-
|
|
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
|
-
|
|
271
|
-
|
|
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
|
-
|
|
281
|
-
|
|
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
|
-
|
|
291
|
-
|
|
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
|
-
|
|
301
|
-
|
|
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
|
-
|
|
311
|
-
|
|
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
|
-
|
|
321
|
-
|
|
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
|
-
|
|
331
|
-
|
|
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
|
-
|
|
341
|
-
|
|
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
|
-
|
|
351
|
-
|
|
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
|
-
|
|
361
|
-
|
|
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
|
-
|
|
371
|
-
|
|
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
|
-
|
|
381
|
-
|
|
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
|
-
|
|
391
|
-
|
|
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
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
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
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
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
|
|
481
|
+
else if (this.horizontal() && this._columns())
|
|
482
|
+
return items;
|
|
536
483
|
else
|
|
537
|
-
return
|
|
484
|
+
return items.slice(this._appendOnly() ? 0 : this.first(), this.last());
|
|
538
485
|
}
|
|
539
486
|
return [];
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
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
|
|
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
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
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
|
-
|
|
614
|
-
|
|
615
|
-
|
|
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
|
|
627
|
-
this.initialized
|
|
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
|
|
637
|
-
this.defaultHeight
|
|
638
|
-
this.defaultContentWidth
|
|
639
|
-
this.defaultContentHeight
|
|
640
|
-
this.initialized
|
|
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
|
|
565
|
+
this.contentEl.set(el || this.contentViewChild()?.nativeElement || findSingle(this.elementViewChild()?.nativeElement, '.p-virtualscroller-content'));
|
|
659
566
|
}
|
|
660
567
|
setInitialState() {
|
|
661
|
-
this.first
|
|
662
|
-
this.last
|
|
663
|
-
this.numItemsInViewport
|
|
664
|
-
this.lastScrollPos
|
|
665
|
-
if (this.d_loading === undefined || this.d_loading === false) {
|
|
666
|
-
this.d_loading
|
|
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
|
|
669
|
-
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.
|
|
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
|
|
713
|
-
isScrollChanged &&
|
|
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 *
|
|
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) *
|
|
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) *
|
|
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 *
|
|
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) *
|
|
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) *
|
|
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(
|
|
815
|
-
cols: calculateLast(
|
|
721
|
+
rows: calculateLast(first.rows, numItemsInViewport.rows, numToleratedItems[0]),
|
|
722
|
+
cols: calculateLast(first.cols, numItemsInViewport.cols, numToleratedItems[1], true)
|
|
816
723
|
}
|
|
817
|
-
: calculateLast(
|
|
818
|
-
this.last
|
|
819
|
-
this.numItemsInViewport
|
|
820
|
-
this.d_numToleratedItems
|
|
821
|
-
if (this._showLoader) {
|
|
822
|
-
this.loaderArr
|
|
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
|
-
|
|
838
|
-
|
|
839
|
-
|
|
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(
|
|
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
|
-
|
|
848
|
-
|
|
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
|
-
|
|
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
|
-
|
|
859
|
-
|
|
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
|
-
|
|
800
|
+
const items = this._items();
|
|
801
|
+
if (items) {
|
|
891
802
|
const contentPos = this.getContentPosition();
|
|
892
|
-
const setProp = (_name, _value, _size, _cpos = 0) =>
|
|
893
|
-
...
|
|
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',
|
|
898
|
-
setProp('width', this._columns ||
|
|
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 ||
|
|
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) =>
|
|
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
|
-
|
|
946
|
-
|
|
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 =
|
|
949
|
-
if (this.both) {
|
|
950
|
-
const isScrollDown =
|
|
951
|
-
const isScrollRight =
|
|
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,
|
|
959
|
-
cols: calculateTriggerIndex(currentIndex.cols,
|
|
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,
|
|
963
|
-
cols: calculateFirst(currentIndex.cols, triggerIndex.cols,
|
|
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,
|
|
967
|
-
cols: calculateLast(currentIndex.cols, newFirst.cols,
|
|
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 !==
|
|
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 =
|
|
976
|
-
if (!this._appendOnly || (this._appendOnly && isScrollDownOrRight)) {
|
|
977
|
-
const currentIndex = calculateCurrentIndex(scrollPos, this._itemSize);
|
|
978
|
-
const triggerIndex = calculateTriggerIndex(currentIndex,
|
|
979
|
-
newFirst = calculateFirst(currentIndex, triggerIndex,
|
|
980
|
-
newLast = calculateLast(currentIndex, newFirst,
|
|
981
|
-
isRangeChanged = newFirst !==
|
|
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
|
|
1004
|
-
this.last
|
|
1005
|
-
this.lastScrollPos
|
|
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:
|
|
1010
|
-
last: Math.min(
|
|
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
|
|
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
|
|
1029
|
-
this.cd.detectChanges();
|
|
946
|
+
this.d_loading.set(true);
|
|
1030
947
|
}
|
|
1031
948
|
}
|
|
1032
|
-
this.scrollTimeout
|
|
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
|
|
1036
|
-
this.page
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
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
|
|
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
|
|
1075
|
-
this.defaultWidth
|
|
1076
|
-
this.defaultHeight
|
|
1077
|
-
this.defaultContentWidth
|
|
1078
|
-
this.defaultContentHeight
|
|
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
|
|
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:
|
|
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": "
|
|
1136
|
-
@if (!_disabled) {
|
|
1137
|
-
<div #element [attr.id]="_id" [attr.tabindex]="
|
|
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 (!
|
|
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:
|
|
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.
|
|
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]="
|
|
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 (!
|
|
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:
|
|
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.
|
|
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] });
|