primenglab 22.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +77 -0
- package/README.md +11 -0
- package/fesm2022/primenglab-accordion.mjs +656 -0
- package/fesm2022/primenglab-accordion.mjs.map +1 -0
- package/fesm2022/primenglab-animateonscroll.mjs +166 -0
- package/fesm2022/primenglab-animateonscroll.mjs.map +1 -0
- package/fesm2022/primenglab-api.mjs +850 -0
- package/fesm2022/primenglab-api.mjs.map +1 -0
- package/fesm2022/primenglab-autocomplete.mjs +2140 -0
- package/fesm2022/primenglab-autocomplete.mjs.map +1 -0
- package/fesm2022/primenglab-autofocus.mjs +78 -0
- package/fesm2022/primenglab-autofocus.mjs.map +1 -0
- package/fesm2022/primenglab-avatar.mjs +211 -0
- package/fesm2022/primenglab-avatar.mjs.map +1 -0
- package/fesm2022/primenglab-avatargroup.mjs +99 -0
- package/fesm2022/primenglab-avatargroup.mjs.map +1 -0
- package/fesm2022/primenglab-badge.mjs +161 -0
- package/fesm2022/primenglab-badge.mjs.map +1 -0
- package/fesm2022/primenglab-base.mjs +124 -0
- package/fesm2022/primenglab-base.mjs.map +1 -0
- package/fesm2022/primenglab-basecomponent.mjs +477 -0
- package/fesm2022/primenglab-basecomponent.mjs.map +1 -0
- package/fesm2022/primenglab-baseeditableholder.mjs +70 -0
- package/fesm2022/primenglab-baseeditableholder.mjs.map +1 -0
- package/fesm2022/primenglab-baseinput.mjs +100 -0
- package/fesm2022/primenglab-baseinput.mjs.map +1 -0
- package/fesm2022/primenglab-basemodelholder.mjs +27 -0
- package/fesm2022/primenglab-basemodelholder.mjs.map +1 -0
- package/fesm2022/primenglab-bind.mjs +97 -0
- package/fesm2022/primenglab-bind.mjs.map +1 -0
- package/fesm2022/primenglab-blockui.mjs +240 -0
- package/fesm2022/primenglab-blockui.mjs.map +1 -0
- package/fesm2022/primenglab-breadcrumb.mjs +582 -0
- package/fesm2022/primenglab-breadcrumb.mjs.map +1 -0
- package/fesm2022/primenglab-button.mjs +799 -0
- package/fesm2022/primenglab-button.mjs.map +1 -0
- package/fesm2022/primenglab-buttongroup.mjs +110 -0
- package/fesm2022/primenglab-buttongroup.mjs.map +1 -0
- package/fesm2022/primenglab-card.mjs +252 -0
- package/fesm2022/primenglab-card.mjs.map +1 -0
- package/fesm2022/primenglab-carousel.mjs +2052 -0
- package/fesm2022/primenglab-carousel.mjs.map +1 -0
- package/fesm2022/primenglab-cascadeselect.mjs +1756 -0
- package/fesm2022/primenglab-cascadeselect.mjs.map +1 -0
- package/fesm2022/primenglab-chart.mjs +235 -0
- package/fesm2022/primenglab-chart.mjs.map +1 -0
- package/fesm2022/primenglab-checkbox.mjs +441 -0
- package/fesm2022/primenglab-checkbox.mjs.map +1 -0
- package/fesm2022/primenglab-chip.mjs +304 -0
- package/fesm2022/primenglab-chip.mjs.map +1 -0
- package/fesm2022/primenglab-classnames.mjs +49 -0
- package/fesm2022/primenglab-classnames.mjs.map +1 -0
- package/fesm2022/primenglab-colorpicker.mjs +741 -0
- package/fesm2022/primenglab-colorpicker.mjs.map +1 -0
- package/fesm2022/primenglab-commandmenu.mjs +419 -0
- package/fesm2022/primenglab-commandmenu.mjs.map +1 -0
- package/fesm2022/primenglab-compare.mjs +520 -0
- package/fesm2022/primenglab-compare.mjs.map +1 -0
- package/fesm2022/primenglab-config.mjs +322 -0
- package/fesm2022/primenglab-config.mjs.map +1 -0
- package/fesm2022/primenglab-confirmdialog.mjs +746 -0
- package/fesm2022/primenglab-confirmdialog.mjs.map +1 -0
- package/fesm2022/primenglab-confirmpopup.mjs +685 -0
- package/fesm2022/primenglab-confirmpopup.mjs.map +1 -0
- package/fesm2022/primenglab-contextmenu.mjs +1485 -0
- package/fesm2022/primenglab-contextmenu.mjs.map +1 -0
- package/fesm2022/primenglab-dataview.mjs +765 -0
- package/fesm2022/primenglab-dataview.mjs.map +1 -0
- package/fesm2022/primenglab-datepicker.mjs +4373 -0
- package/fesm2022/primenglab-datepicker.mjs.map +1 -0
- package/fesm2022/primenglab-dialog.mjs +1234 -0
- package/fesm2022/primenglab-dialog.mjs.map +1 -0
- package/fesm2022/primenglab-divider.mjs +160 -0
- package/fesm2022/primenglab-divider.mjs.map +1 -0
- package/fesm2022/primenglab-dock.mjs +580 -0
- package/fesm2022/primenglab-dock.mjs.map +1 -0
- package/fesm2022/primenglab-dom.mjs +778 -0
- package/fesm2022/primenglab-dom.mjs.map +1 -0
- package/fesm2022/primenglab-dragdrop.mjs +312 -0
- package/fesm2022/primenglab-dragdrop.mjs.map +1 -0
- package/fesm2022/primenglab-drawer.mjs +708 -0
- package/fesm2022/primenglab-drawer.mjs.map +1 -0
- package/fesm2022/primenglab-dynamicdialog.mjs +1096 -0
- package/fesm2022/primenglab-dynamicdialog.mjs.map +1 -0
- package/fesm2022/primenglab-editor.mjs +496 -0
- package/fesm2022/primenglab-editor.mjs.map +1 -0
- package/fesm2022/primenglab-fieldset.mjs +418 -0
- package/fesm2022/primenglab-fieldset.mjs.map +1 -0
- package/fesm2022/primenglab-fileupload.mjs +1486 -0
- package/fesm2022/primenglab-fileupload.mjs.map +1 -0
- package/fesm2022/primenglab-floatlabel.mjs +106 -0
- package/fesm2022/primenglab-floatlabel.mjs.map +1 -0
- package/fesm2022/primenglab-fluid.mjs +89 -0
- package/fesm2022/primenglab-fluid.mjs.map +1 -0
- package/fesm2022/primenglab-focustrap.mjs +113 -0
- package/fesm2022/primenglab-focustrap.mjs.map +1 -0
- package/fesm2022/primenglab-galleria.mjs +1854 -0
- package/fesm2022/primenglab-galleria.mjs.map +1 -0
- package/fesm2022/primenglab-gallery.mjs +1859 -0
- package/fesm2022/primenglab-gallery.mjs.map +1 -0
- package/fesm2022/primenglab-iconfield.mjs +97 -0
- package/fesm2022/primenglab-iconfield.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angledoubledown.mjs +37 -0
- package/fesm2022/primenglab-icons-angledoubledown.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angledoubleleft.mjs +37 -0
- package/fesm2022/primenglab-icons-angledoubleleft.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angledoubleright.mjs +37 -0
- package/fesm2022/primenglab-icons-angledoubleright.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angledoubleup.mjs +37 -0
- package/fesm2022/primenglab-icons-angledoubleup.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angledown.mjs +33 -0
- package/fesm2022/primenglab-icons-angledown.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angleleft.mjs +33 -0
- package/fesm2022/primenglab-icons-angleleft.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angleright.mjs +33 -0
- package/fesm2022/primenglab-icons-angleright.mjs.map +1 -0
- package/fesm2022/primenglab-icons-angleup.mjs +33 -0
- package/fesm2022/primenglab-icons-angleup.mjs.map +1 -0
- package/fesm2022/primenglab-icons-arrowdown.mjs +56 -0
- package/fesm2022/primenglab-icons-arrowdown.mjs.map +1 -0
- package/fesm2022/primenglab-icons-arrowdownleft.mjs +33 -0
- package/fesm2022/primenglab-icons-arrowdownleft.mjs.map +1 -0
- package/fesm2022/primenglab-icons-arrowdownright.mjs +33 -0
- package/fesm2022/primenglab-icons-arrowdownright.mjs.map +1 -0
- package/fesm2022/primenglab-icons-arrowleft.mjs +56 -0
- package/fesm2022/primenglab-icons-arrowleft.mjs.map +1 -0
- package/fesm2022/primenglab-icons-arrowright.mjs +37 -0
- package/fesm2022/primenglab-icons-arrowright.mjs.map +1 -0
- package/fesm2022/primenglab-icons-arrowup.mjs +56 -0
- package/fesm2022/primenglab-icons-arrowup.mjs.map +1 -0
- package/fesm2022/primenglab-icons-ban.mjs +52 -0
- package/fesm2022/primenglab-icons-ban.mjs.map +1 -0
- package/fesm2022/primenglab-icons-bars.mjs +37 -0
- package/fesm2022/primenglab-icons-bars.mjs.map +1 -0
- package/fesm2022/primenglab-icons-baseicon.mjs +103 -0
- package/fesm2022/primenglab-icons-baseicon.mjs.map +1 -0
- package/fesm2022/primenglab-icons-blank.mjs +23 -0
- package/fesm2022/primenglab-icons-blank.mjs.map +1 -0
- package/fesm2022/primenglab-icons-calendar.mjs +33 -0
- package/fesm2022/primenglab-icons-calendar.mjs.map +1 -0
- package/fesm2022/primenglab-icons-caretleft.mjs +33 -0
- package/fesm2022/primenglab-icons-caretleft.mjs.map +1 -0
- package/fesm2022/primenglab-icons-caretright.mjs +33 -0
- package/fesm2022/primenglab-icons-caretright.mjs.map +1 -0
- package/fesm2022/primenglab-icons-check.mjs +33 -0
- package/fesm2022/primenglab-icons-check.mjs.map +1 -0
- package/fesm2022/primenglab-icons-chevrondown.mjs +33 -0
- package/fesm2022/primenglab-icons-chevrondown.mjs.map +1 -0
- package/fesm2022/primenglab-icons-chevronleft.mjs +33 -0
- package/fesm2022/primenglab-icons-chevronleft.mjs.map +1 -0
- package/fesm2022/primenglab-icons-chevronright.mjs +33 -0
- package/fesm2022/primenglab-icons-chevronright.mjs.map +1 -0
- package/fesm2022/primenglab-icons-chevronup.mjs +33 -0
- package/fesm2022/primenglab-icons-chevronup.mjs.map +1 -0
- package/fesm2022/primenglab-icons-exclamationtriangle.mjs +68 -0
- package/fesm2022/primenglab-icons-exclamationtriangle.mjs.map +1 -0
- package/fesm2022/primenglab-icons-eye.mjs +37 -0
- package/fesm2022/primenglab-icons-eye.mjs.map +1 -0
- package/fesm2022/primenglab-icons-eyeslash.mjs +56 -0
- package/fesm2022/primenglab-icons-eyeslash.mjs.map +1 -0
- package/fesm2022/primenglab-icons-filter.mjs +52 -0
- package/fesm2022/primenglab-icons-filter.mjs.map +1 -0
- package/fesm2022/primenglab-icons-filterfill.mjs +33 -0
- package/fesm2022/primenglab-icons-filterfill.mjs.map +1 -0
- package/fesm2022/primenglab-icons-filterslash.mjs +56 -0
- package/fesm2022/primenglab-icons-filterslash.mjs.map +1 -0
- package/fesm2022/primenglab-icons-home.mjs +56 -0
- package/fesm2022/primenglab-icons-home.mjs.map +1 -0
- package/fesm2022/primenglab-icons-infocircle.mjs +56 -0
- package/fesm2022/primenglab-icons-infocircle.mjs.map +1 -0
- package/fesm2022/primenglab-icons-minus.mjs +33 -0
- package/fesm2022/primenglab-icons-minus.mjs.map +1 -0
- package/fesm2022/primenglab-icons-pencil.mjs +52 -0
- package/fesm2022/primenglab-icons-pencil.mjs.map +1 -0
- package/fesm2022/primenglab-icons-plus.mjs +52 -0
- package/fesm2022/primenglab-icons-plus.mjs.map +1 -0
- package/fesm2022/primenglab-icons-refresh.mjs +56 -0
- package/fesm2022/primenglab-icons-refresh.mjs.map +1 -0
- package/fesm2022/primenglab-icons-search.mjs +56 -0
- package/fesm2022/primenglab-icons-search.mjs.map +1 -0
- package/fesm2022/primenglab-icons-searchminus.mjs +56 -0
- package/fesm2022/primenglab-icons-searchminus.mjs.map +1 -0
- package/fesm2022/primenglab-icons-searchplus.mjs +56 -0
- package/fesm2022/primenglab-icons-searchplus.mjs.map +1 -0
- package/fesm2022/primenglab-icons-sortalt.mjs +64 -0
- package/fesm2022/primenglab-icons-sortalt.mjs.map +1 -0
- package/fesm2022/primenglab-icons-sortamountdown.mjs +52 -0
- package/fesm2022/primenglab-icons-sortamountdown.mjs.map +1 -0
- package/fesm2022/primenglab-icons-sortamountupalt.mjs +52 -0
- package/fesm2022/primenglab-icons-sortamountupalt.mjs.map +1 -0
- package/fesm2022/primenglab-icons-spinner.mjs +52 -0
- package/fesm2022/primenglab-icons-spinner.mjs.map +1 -0
- package/fesm2022/primenglab-icons-star.mjs +52 -0
- package/fesm2022/primenglab-icons-star.mjs.map +1 -0
- package/fesm2022/primenglab-icons-starfill.mjs +52 -0
- package/fesm2022/primenglab-icons-starfill.mjs.map +1 -0
- package/fesm2022/primenglab-icons-thlarge.mjs +56 -0
- package/fesm2022/primenglab-icons-thlarge.mjs.map +1 -0
- package/fesm2022/primenglab-icons-times.mjs +33 -0
- package/fesm2022/primenglab-icons-times.mjs.map +1 -0
- package/fesm2022/primenglab-icons-timescircle.mjs +56 -0
- package/fesm2022/primenglab-icons-timescircle.mjs.map +1 -0
- package/fesm2022/primenglab-icons-trash.mjs +56 -0
- package/fesm2022/primenglab-icons-trash.mjs.map +1 -0
- package/fesm2022/primenglab-icons-undo.mjs +56 -0
- package/fesm2022/primenglab-icons-undo.mjs.map +1 -0
- package/fesm2022/primenglab-icons-upload.mjs +56 -0
- package/fesm2022/primenglab-icons-upload.mjs.map +1 -0
- package/fesm2022/primenglab-icons-windowmaximize.mjs +56 -0
- package/fesm2022/primenglab-icons-windowmaximize.mjs.map +1 -0
- package/fesm2022/primenglab-icons-windowminimize.mjs +56 -0
- package/fesm2022/primenglab-icons-windowminimize.mjs.map +1 -0
- package/fesm2022/primenglab-icons.mjs +63 -0
- package/fesm2022/primenglab-icons.mjs.map +1 -0
- package/fesm2022/primenglab-iftalabel.mjs +90 -0
- package/fesm2022/primenglab-iftalabel.mjs.map +1 -0
- package/fesm2022/primenglab-image.mjs +728 -0
- package/fesm2022/primenglab-image.mjs.map +1 -0
- package/fesm2022/primenglab-imagecompare.mjs +177 -0
- package/fesm2022/primenglab-imagecompare.mjs.map +1 -0
- package/fesm2022/primenglab-inplace.mjs +237 -0
- package/fesm2022/primenglab-inplace.mjs.map +1 -0
- package/fesm2022/primenglab-inputcolor.mjs +2262 -0
- package/fesm2022/primenglab-inputcolor.mjs.map +1 -0
- package/fesm2022/primenglab-inputgroup.mjs +121 -0
- package/fesm2022/primenglab-inputgroup.mjs.map +1 -0
- package/fesm2022/primenglab-inputgroupaddon.mjs +70 -0
- package/fesm2022/primenglab-inputgroupaddon.mjs.map +1 -0
- package/fesm2022/primenglab-inputicon.mjs +74 -0
- package/fesm2022/primenglab-inputicon.mjs.map +1 -0
- package/fesm2022/primenglab-inputmask.mjs +1495 -0
- package/fesm2022/primenglab-inputmask.mjs.map +1 -0
- package/fesm2022/primenglab-inputnumber.mjs +1624 -0
- package/fesm2022/primenglab-inputnumber.mjs.map +1 -0
- package/fesm2022/primenglab-inputotp.mjs +445 -0
- package/fesm2022/primenglab-inputotp.mjs.map +1 -0
- package/fesm2022/primenglab-inputpassword.mjs +102 -0
- package/fesm2022/primenglab-inputpassword.mjs.map +1 -0
- package/fesm2022/primenglab-inputtags.mjs +748 -0
- package/fesm2022/primenglab-inputtags.mjs.map +1 -0
- package/fesm2022/primenglab-inputtext.mjs +174 -0
- package/fesm2022/primenglab-inputtext.mjs.map +1 -0
- package/fesm2022/primenglab-keyfilter.mjs +252 -0
- package/fesm2022/primenglab-keyfilter.mjs.map +1 -0
- package/fesm2022/primenglab-knob.mjs +467 -0
- package/fesm2022/primenglab-knob.mjs.map +1 -0
- package/fesm2022/primenglab-label.mjs +85 -0
- package/fesm2022/primenglab-label.mjs.map +1 -0
- package/fesm2022/primenglab-license.mjs +39 -0
- package/fesm2022/primenglab-license.mjs.map +1 -0
- package/fesm2022/primenglab-listbox.mjs +2108 -0
- package/fesm2022/primenglab-listbox.mjs.map +1 -0
- package/fesm2022/primenglab-megamenu.mjs +1595 -0
- package/fesm2022/primenglab-megamenu.mjs.map +1 -0
- package/fesm2022/primenglab-menu.mjs +1224 -0
- package/fesm2022/primenglab-menu.mjs.map +1 -0
- package/fesm2022/primenglab-menubar.mjs +1448 -0
- package/fesm2022/primenglab-menubar.mjs.map +1 -0
- package/fesm2022/primenglab-message.mjs +306 -0
- package/fesm2022/primenglab-message.mjs.map +1 -0
- package/fesm2022/primenglab-metergroup.mjs +412 -0
- package/fesm2022/primenglab-metergroup.mjs.map +1 -0
- package/fesm2022/primenglab-motion.mjs +719 -0
- package/fesm2022/primenglab-motion.mjs.map +1 -0
- package/fesm2022/primenglab-multiselect.mjs +2543 -0
- package/fesm2022/primenglab-multiselect.mjs.map +1 -0
- package/fesm2022/primenglab-orderlist.mjs +868 -0
- package/fesm2022/primenglab-orderlist.mjs.map +1 -0
- package/fesm2022/primenglab-organizationchart.mjs +617 -0
- package/fesm2022/primenglab-organizationchart.mjs.map +1 -0
- package/fesm2022/primenglab-overlay.mjs +751 -0
- package/fesm2022/primenglab-overlay.mjs.map +1 -0
- package/fesm2022/primenglab-overlaybadge.mjs +134 -0
- package/fesm2022/primenglab-overlaybadge.mjs.map +1 -0
- package/fesm2022/primenglab-paginator.mjs +759 -0
- package/fesm2022/primenglab-paginator.mjs.map +1 -0
- package/fesm2022/primenglab-panel.mjs +487 -0
- package/fesm2022/primenglab-panel.mjs.map +1 -0
- package/fesm2022/primenglab-panelmenu.mjs +1599 -0
- package/fesm2022/primenglab-panelmenu.mjs.map +1 -0
- package/fesm2022/primenglab-passthrough.mjs +21 -0
- package/fesm2022/primenglab-passthrough.mjs.map +1 -0
- package/fesm2022/primenglab-password.mjs +1089 -0
- package/fesm2022/primenglab-password.mjs.map +1 -0
- package/fesm2022/primenglab-picklist.mjs +1992 -0
- package/fesm2022/primenglab-picklist.mjs.map +1 -0
- package/fesm2022/primenglab-popover.mjs +488 -0
- package/fesm2022/primenglab-popover.mjs.map +1 -0
- package/fesm2022/primenglab-progressbar.mjs +200 -0
- package/fesm2022/primenglab-progressbar.mjs.map +1 -0
- package/fesm2022/primenglab-progressspinner.mjs +313 -0
- package/fesm2022/primenglab-progressspinner.mjs.map +1 -0
- package/fesm2022/primenglab-radiobutton.mjs +347 -0
- package/fesm2022/primenglab-radiobutton.mjs.map +1 -0
- package/fesm2022/primenglab-rating.mjs +488 -0
- package/fesm2022/primenglab-rating.mjs.map +1 -0
- package/fesm2022/primenglab-ripple.mjs +192 -0
- package/fesm2022/primenglab-ripple.mjs.map +1 -0
- package/fesm2022/primenglab-scrollarea.mjs +730 -0
- package/fesm2022/primenglab-scrollarea.mjs.map +1 -0
- package/fesm2022/primenglab-scroller.mjs +1183 -0
- package/fesm2022/primenglab-scroller.mjs.map +1 -0
- package/fesm2022/primenglab-scrollpanel.mjs +543 -0
- package/fesm2022/primenglab-scrollpanel.mjs.map +1 -0
- package/fesm2022/primenglab-scrolltop.mjs +323 -0
- package/fesm2022/primenglab-scrolltop.mjs.map +1 -0
- package/fesm2022/primenglab-select.mjs +2287 -0
- package/fesm2022/primenglab-select.mjs.map +1 -0
- package/fesm2022/primenglab-selectbutton.mjs +390 -0
- package/fesm2022/primenglab-selectbutton.mjs.map +1 -0
- package/fesm2022/primenglab-sidebar.mjs +1461 -0
- package/fesm2022/primenglab-sidebar.mjs.map +1 -0
- package/fesm2022/primenglab-skeleton.mjs +161 -0
- package/fesm2022/primenglab-skeleton.mjs.map +1 -0
- package/fesm2022/primenglab-slider.mjs +776 -0
- package/fesm2022/primenglab-slider.mjs.map +1 -0
- package/fesm2022/primenglab-speeddial.mjs +892 -0
- package/fesm2022/primenglab-speeddial.mjs.map +1 -0
- package/fesm2022/primenglab-splitbutton.mjs +544 -0
- package/fesm2022/primenglab-splitbutton.mjs.map +1 -0
- package/fesm2022/primenglab-splitter.mjs +853 -0
- package/fesm2022/primenglab-splitter.mjs.map +1 -0
- package/fesm2022/primenglab-stepper.mjs +724 -0
- package/fesm2022/primenglab-stepper.mjs.map +1 -0
- package/fesm2022/primenglab-steps.mjs +425 -0
- package/fesm2022/primenglab-steps.mjs.map +1 -0
- package/fesm2022/primenglab-styleclass.mjs +331 -0
- package/fesm2022/primenglab-styleclass.mjs.map +1 -0
- package/fesm2022/primenglab-table.mjs +7125 -0
- package/fesm2022/primenglab-table.mjs.map +1 -0
- package/fesm2022/primenglab-tabs.mjs +932 -0
- package/fesm2022/primenglab-tabs.mjs.map +1 -0
- package/fesm2022/primenglab-tag.mjs +179 -0
- package/fesm2022/primenglab-tag.mjs.map +1 -0
- package/fesm2022/primenglab-terminal.mjs +253 -0
- package/fesm2022/primenglab-terminal.mjs.map +1 -0
- package/fesm2022/primenglab-textarea.mjs +208 -0
- package/fesm2022/primenglab-textarea.mjs.map +1 -0
- package/fesm2022/primenglab-tieredmenu.mjs +1547 -0
- package/fesm2022/primenglab-tieredmenu.mjs.map +1 -0
- package/fesm2022/primenglab-timeline.mjs +211 -0
- package/fesm2022/primenglab-timeline.mjs.map +1 -0
- package/fesm2022/primenglab-toast.mjs +1140 -0
- package/fesm2022/primenglab-toast.mjs.map +1 -0
- package/fesm2022/primenglab-togglebutton.mjs +343 -0
- package/fesm2022/primenglab-togglebutton.mjs.map +1 -0
- package/fesm2022/primenglab-toggleswitch.mjs +296 -0
- package/fesm2022/primenglab-toggleswitch.mjs.map +1 -0
- package/fesm2022/primenglab-toolbar.mjs +167 -0
- package/fesm2022/primenglab-toolbar.mjs.map +1 -0
- package/fesm2022/primenglab-tooltip.mjs +770 -0
- package/fesm2022/primenglab-tooltip.mjs.map +1 -0
- package/fesm2022/primenglab-tree.mjs +2332 -0
- package/fesm2022/primenglab-tree.mjs.map +1 -0
- package/fesm2022/primenglab-treeselect.mjs +1263 -0
- package/fesm2022/primenglab-treeselect.mjs.map +1 -0
- package/fesm2022/primenglab-treetable.mjs +4817 -0
- package/fesm2022/primenglab-treetable.mjs.map +1 -0
- package/fesm2022/primenglab-ts-helpers.mjs +4 -0
- package/fesm2022/primenglab-ts-helpers.mjs.map +1 -0
- package/fesm2022/primenglab-types-accordion.mjs +4 -0
- package/fesm2022/primenglab-types-accordion.mjs.map +1 -0
- package/fesm2022/primenglab-types-autocomplete.mjs +4 -0
- package/fesm2022/primenglab-types-autocomplete.mjs.map +1 -0
- package/fesm2022/primenglab-types-avatar.mjs +4 -0
- package/fesm2022/primenglab-types-avatar.mjs.map +1 -0
- package/fesm2022/primenglab-types-avatargroup.mjs +4 -0
- package/fesm2022/primenglab-types-avatargroup.mjs.map +1 -0
- package/fesm2022/primenglab-types-badge.mjs +4 -0
- package/fesm2022/primenglab-types-badge.mjs.map +1 -0
- package/fesm2022/primenglab-types-blockui.mjs +4 -0
- package/fesm2022/primenglab-types-blockui.mjs.map +1 -0
- package/fesm2022/primenglab-types-breadcrumb.mjs +4 -0
- package/fesm2022/primenglab-types-breadcrumb.mjs.map +1 -0
- package/fesm2022/primenglab-types-button.mjs +4 -0
- package/fesm2022/primenglab-types-button.mjs.map +1 -0
- package/fesm2022/primenglab-types-card.mjs +4 -0
- package/fesm2022/primenglab-types-card.mjs.map +1 -0
- package/fesm2022/primenglab-types-carousel.mjs +4 -0
- package/fesm2022/primenglab-types-carousel.mjs.map +1 -0
- package/fesm2022/primenglab-types-cascadeselect.mjs +4 -0
- package/fesm2022/primenglab-types-cascadeselect.mjs.map +1 -0
- package/fesm2022/primenglab-types-chart.mjs +4 -0
- package/fesm2022/primenglab-types-chart.mjs.map +1 -0
- package/fesm2022/primenglab-types-checkbox.mjs +4 -0
- package/fesm2022/primenglab-types-checkbox.mjs.map +1 -0
- package/fesm2022/primenglab-types-chip.mjs +4 -0
- package/fesm2022/primenglab-types-chip.mjs.map +1 -0
- package/fesm2022/primenglab-types-colorpicker.mjs +4 -0
- package/fesm2022/primenglab-types-colorpicker.mjs.map +1 -0
- package/fesm2022/primenglab-types-commandmenu.mjs +4 -0
- package/fesm2022/primenglab-types-commandmenu.mjs.map +1 -0
- package/fesm2022/primenglab-types-compare.mjs +4 -0
- package/fesm2022/primenglab-types-compare.mjs.map +1 -0
- package/fesm2022/primenglab-types-confirmdialog.mjs +4 -0
- package/fesm2022/primenglab-types-confirmdialog.mjs.map +1 -0
- package/fesm2022/primenglab-types-confirmpopup.mjs +4 -0
- package/fesm2022/primenglab-types-confirmpopup.mjs.map +1 -0
- package/fesm2022/primenglab-types-contextmenu.mjs +4 -0
- package/fesm2022/primenglab-types-contextmenu.mjs.map +1 -0
- package/fesm2022/primenglab-types-dataview.mjs +4 -0
- package/fesm2022/primenglab-types-dataview.mjs.map +1 -0
- package/fesm2022/primenglab-types-datepicker.mjs +4 -0
- package/fesm2022/primenglab-types-datepicker.mjs.map +1 -0
- package/fesm2022/primenglab-types-dialog.mjs +4 -0
- package/fesm2022/primenglab-types-dialog.mjs.map +1 -0
- package/fesm2022/primenglab-types-divider.mjs +4 -0
- package/fesm2022/primenglab-types-divider.mjs.map +1 -0
- package/fesm2022/primenglab-types-dock.mjs +4 -0
- package/fesm2022/primenglab-types-dock.mjs.map +1 -0
- package/fesm2022/primenglab-types-drawer.mjs +4 -0
- package/fesm2022/primenglab-types-drawer.mjs.map +1 -0
- package/fesm2022/primenglab-types-editor.mjs +4 -0
- package/fesm2022/primenglab-types-editor.mjs.map +1 -0
- package/fesm2022/primenglab-types-fieldset.mjs +4 -0
- package/fesm2022/primenglab-types-fieldset.mjs.map +1 -0
- package/fesm2022/primenglab-types-fileupload.mjs +4 -0
- package/fesm2022/primenglab-types-fileupload.mjs.map +1 -0
- package/fesm2022/primenglab-types-floatlabel.mjs +4 -0
- package/fesm2022/primenglab-types-floatlabel.mjs.map +1 -0
- package/fesm2022/primenglab-types-fluid.mjs +4 -0
- package/fesm2022/primenglab-types-fluid.mjs.map +1 -0
- package/fesm2022/primenglab-types-galleria.mjs +4 -0
- package/fesm2022/primenglab-types-galleria.mjs.map +1 -0
- package/fesm2022/primenglab-types-gallery.mjs +4 -0
- package/fesm2022/primenglab-types-gallery.mjs.map +1 -0
- package/fesm2022/primenglab-types-iconfield.mjs +4 -0
- package/fesm2022/primenglab-types-iconfield.mjs.map +1 -0
- package/fesm2022/primenglab-types-iftalabel.mjs +4 -0
- package/fesm2022/primenglab-types-iftalabel.mjs.map +1 -0
- package/fesm2022/primenglab-types-image.mjs +4 -0
- package/fesm2022/primenglab-types-image.mjs.map +1 -0
- package/fesm2022/primenglab-types-imagecompare.mjs +4 -0
- package/fesm2022/primenglab-types-imagecompare.mjs.map +1 -0
- package/fesm2022/primenglab-types-inplace.mjs +4 -0
- package/fesm2022/primenglab-types-inplace.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputcolor.mjs +4 -0
- package/fesm2022/primenglab-types-inputcolor.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputgroup.mjs +4 -0
- package/fesm2022/primenglab-types-inputgroup.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputgroupaddon.mjs +4 -0
- package/fesm2022/primenglab-types-inputgroupaddon.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputicon.mjs +4 -0
- package/fesm2022/primenglab-types-inputicon.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputmask.mjs +4 -0
- package/fesm2022/primenglab-types-inputmask.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputnumber.mjs +4 -0
- package/fesm2022/primenglab-types-inputnumber.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputotp.mjs +4 -0
- package/fesm2022/primenglab-types-inputotp.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputpassword.mjs +4 -0
- package/fesm2022/primenglab-types-inputpassword.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputtags.mjs +4 -0
- package/fesm2022/primenglab-types-inputtags.mjs.map +1 -0
- package/fesm2022/primenglab-types-inputtext.mjs +4 -0
- package/fesm2022/primenglab-types-inputtext.mjs.map +1 -0
- package/fesm2022/primenglab-types-knob.mjs +4 -0
- package/fesm2022/primenglab-types-knob.mjs.map +1 -0
- package/fesm2022/primenglab-types-label.mjs +4 -0
- package/fesm2022/primenglab-types-label.mjs.map +1 -0
- package/fesm2022/primenglab-types-listbox.mjs +4 -0
- package/fesm2022/primenglab-types-listbox.mjs.map +1 -0
- package/fesm2022/primenglab-types-megamenu.mjs +4 -0
- package/fesm2022/primenglab-types-megamenu.mjs.map +1 -0
- package/fesm2022/primenglab-types-menu.mjs +4 -0
- package/fesm2022/primenglab-types-menu.mjs.map +1 -0
- package/fesm2022/primenglab-types-menubar.mjs +4 -0
- package/fesm2022/primenglab-types-menubar.mjs.map +1 -0
- package/fesm2022/primenglab-types-message.mjs +4 -0
- package/fesm2022/primenglab-types-message.mjs.map +1 -0
- package/fesm2022/primenglab-types-metergroup.mjs +4 -0
- package/fesm2022/primenglab-types-metergroup.mjs.map +1 -0
- package/fesm2022/primenglab-types-motion.mjs +4 -0
- package/fesm2022/primenglab-types-motion.mjs.map +1 -0
- package/fesm2022/primenglab-types-multiselect.mjs +4 -0
- package/fesm2022/primenglab-types-multiselect.mjs.map +1 -0
- package/fesm2022/primenglab-types-orderlist.mjs +4 -0
- package/fesm2022/primenglab-types-orderlist.mjs.map +1 -0
- package/fesm2022/primenglab-types-organizationchart.mjs +4 -0
- package/fesm2022/primenglab-types-organizationchart.mjs.map +1 -0
- package/fesm2022/primenglab-types-overlay.mjs +4 -0
- package/fesm2022/primenglab-types-overlay.mjs.map +1 -0
- package/fesm2022/primenglab-types-overlaybadge.mjs +4 -0
- package/fesm2022/primenglab-types-overlaybadge.mjs.map +1 -0
- package/fesm2022/primenglab-types-paginator.mjs +4 -0
- package/fesm2022/primenglab-types-paginator.mjs.map +1 -0
- package/fesm2022/primenglab-types-panel.mjs +4 -0
- package/fesm2022/primenglab-types-panel.mjs.map +1 -0
- package/fesm2022/primenglab-types-panelmenu.mjs +4 -0
- package/fesm2022/primenglab-types-panelmenu.mjs.map +1 -0
- package/fesm2022/primenglab-types-password.mjs +4 -0
- package/fesm2022/primenglab-types-password.mjs.map +1 -0
- package/fesm2022/primenglab-types-picklist.mjs +4 -0
- package/fesm2022/primenglab-types-picklist.mjs.map +1 -0
- package/fesm2022/primenglab-types-popover.mjs +4 -0
- package/fesm2022/primenglab-types-popover.mjs.map +1 -0
- package/fesm2022/primenglab-types-progressbar.mjs +4 -0
- package/fesm2022/primenglab-types-progressbar.mjs.map +1 -0
- package/fesm2022/primenglab-types-progressspinner.mjs +4 -0
- package/fesm2022/primenglab-types-progressspinner.mjs.map +1 -0
- package/fesm2022/primenglab-types-radiobutton.mjs +4 -0
- package/fesm2022/primenglab-types-radiobutton.mjs.map +1 -0
- package/fesm2022/primenglab-types-rating.mjs +4 -0
- package/fesm2022/primenglab-types-rating.mjs.map +1 -0
- package/fesm2022/primenglab-types-scrollarea.mjs +4 -0
- package/fesm2022/primenglab-types-scrollarea.mjs.map +1 -0
- package/fesm2022/primenglab-types-scroller.mjs +4 -0
- package/fesm2022/primenglab-types-scroller.mjs.map +1 -0
- package/fesm2022/primenglab-types-scrollpanel.mjs +4 -0
- package/fesm2022/primenglab-types-scrollpanel.mjs.map +1 -0
- package/fesm2022/primenglab-types-scrolltop.mjs +4 -0
- package/fesm2022/primenglab-types-scrolltop.mjs.map +1 -0
- package/fesm2022/primenglab-types-select.mjs +4 -0
- package/fesm2022/primenglab-types-select.mjs.map +1 -0
- package/fesm2022/primenglab-types-selectbutton.mjs +4 -0
- package/fesm2022/primenglab-types-selectbutton.mjs.map +1 -0
- package/fesm2022/primenglab-types-shared.mjs +4 -0
- package/fesm2022/primenglab-types-shared.mjs.map +1 -0
- package/fesm2022/primenglab-types-sidebar.mjs +4 -0
- package/fesm2022/primenglab-types-sidebar.mjs.map +1 -0
- package/fesm2022/primenglab-types-skeleton.mjs +4 -0
- package/fesm2022/primenglab-types-skeleton.mjs.map +1 -0
- package/fesm2022/primenglab-types-slider.mjs +4 -0
- package/fesm2022/primenglab-types-slider.mjs.map +1 -0
- package/fesm2022/primenglab-types-speeddial.mjs +4 -0
- package/fesm2022/primenglab-types-speeddial.mjs.map +1 -0
- package/fesm2022/primenglab-types-splitbutton.mjs +4 -0
- package/fesm2022/primenglab-types-splitbutton.mjs.map +1 -0
- package/fesm2022/primenglab-types-splitter.mjs +4 -0
- package/fesm2022/primenglab-types-splitter.mjs.map +1 -0
- package/fesm2022/primenglab-types-stepper.mjs +4 -0
- package/fesm2022/primenglab-types-stepper.mjs.map +1 -0
- package/fesm2022/primenglab-types-table.mjs +4 -0
- package/fesm2022/primenglab-types-table.mjs.map +1 -0
- package/fesm2022/primenglab-types-tabs.mjs +4 -0
- package/fesm2022/primenglab-types-tabs.mjs.map +1 -0
- package/fesm2022/primenglab-types-tag.mjs +4 -0
- package/fesm2022/primenglab-types-tag.mjs.map +1 -0
- package/fesm2022/primenglab-types-terminal.mjs +4 -0
- package/fesm2022/primenglab-types-terminal.mjs.map +1 -0
- package/fesm2022/primenglab-types-textarea.mjs +4 -0
- package/fesm2022/primenglab-types-textarea.mjs.map +1 -0
- package/fesm2022/primenglab-types-tieredmenu.mjs +4 -0
- package/fesm2022/primenglab-types-tieredmenu.mjs.map +1 -0
- package/fesm2022/primenglab-types-timeline.mjs +4 -0
- package/fesm2022/primenglab-types-timeline.mjs.map +1 -0
- package/fesm2022/primenglab-types-toast.mjs +4 -0
- package/fesm2022/primenglab-types-toast.mjs.map +1 -0
- package/fesm2022/primenglab-types-togglebutton.mjs +4 -0
- package/fesm2022/primenglab-types-togglebutton.mjs.map +1 -0
- package/fesm2022/primenglab-types-toggleswitch.mjs +4 -0
- package/fesm2022/primenglab-types-toggleswitch.mjs.map +1 -0
- package/fesm2022/primenglab-types-toolbar.mjs +4 -0
- package/fesm2022/primenglab-types-toolbar.mjs.map +1 -0
- package/fesm2022/primenglab-types-tooltip.mjs +4 -0
- package/fesm2022/primenglab-types-tooltip.mjs.map +1 -0
- package/fesm2022/primenglab-types-tree.mjs +4 -0
- package/fesm2022/primenglab-types-tree.mjs.map +1 -0
- package/fesm2022/primenglab-types-treeselect.mjs +4 -0
- package/fesm2022/primenglab-types-treeselect.mjs.map +1 -0
- package/fesm2022/primenglab-types-treetable.mjs +4 -0
- package/fesm2022/primenglab-types-treetable.mjs.map +1 -0
- package/fesm2022/primenglab-usestyle.mjs +54 -0
- package/fesm2022/primenglab-usestyle.mjs.map +1 -0
- package/fesm2022/primenglab-utils.mjs +332 -0
- package/fesm2022/primenglab-utils.mjs.map +1 -0
- package/fesm2022/primenglab.mjs +6 -0
- package/fesm2022/primenglab.mjs.map +1 -0
- package/package.json +1188 -0
- package/types/primenglab-accordion.d.ts +252 -0
- package/types/primenglab-animateonscroll.d.ts +68 -0
- package/types/primenglab-api.d.ts +2000 -0
- package/types/primenglab-autocomplete.d.ts +774 -0
- package/types/primenglab-autofocus.d.ts +29 -0
- package/types/primenglab-avatar.d.ts +133 -0
- package/types/primenglab-avatargroup.d.ts +58 -0
- package/types/primenglab-badge.d.ts +96 -0
- package/types/primenglab-base.d.ts +58 -0
- package/types/primenglab-basecomponent.d.ts +178 -0
- package/types/primenglab-baseeditableholder.d.ts +45 -0
- package/types/primenglab-baseinput.d.ts +74 -0
- package/types/primenglab-basemodelholder.d.ts +12 -0
- package/types/primenglab-bind.d.ts +37 -0
- package/types/primenglab-blockui.d.ts +97 -0
- package/types/primenglab-breadcrumb.d.ts +150 -0
- package/types/primenglab-button.d.ts +468 -0
- package/types/primenglab-buttongroup.d.ts +44 -0
- package/types/primenglab-card.d.ts +138 -0
- package/types/primenglab-carousel.d.ts +687 -0
- package/types/primenglab-cascadeselect.d.ts +581 -0
- package/types/primenglab-chart.d.ts +133 -0
- package/types/primenglab-checkbox.d.ts +227 -0
- package/types/primenglab-chip.d.ts +159 -0
- package/types/primenglab-classnames.d.ts +32 -0
- package/types/primenglab-colorpicker.d.ts +295 -0
- package/types/primenglab-commandmenu.d.ts +182 -0
- package/types/primenglab-compare.d.ts +225 -0
- package/types/primenglab-config.d.ts +313 -0
- package/types/primenglab-confirmdialog.d.ts +344 -0
- package/types/primenglab-confirmpopup.d.ts +230 -0
- package/types/primenglab-contextmenu.d.ts +388 -0
- package/types/primenglab-dataview.d.ts +361 -0
- package/types/primenglab-datepicker.d.ts +967 -0
- package/types/primenglab-dialog.d.ts +481 -0
- package/types/primenglab-divider.d.ts +116 -0
- package/types/primenglab-dock.d.ts +189 -0
- package/types/primenglab-dom.d.ts +109 -0
- package/types/primenglab-dragdrop.d.ts +117 -0
- package/types/primenglab-drawer.d.ts +272 -0
- package/types/primenglab-dynamicdialog.d.ts +576 -0
- package/types/primenglab-editor.d.ts +182 -0
- package/types/primenglab-fieldset.d.ts +182 -0
- package/types/primenglab-fileupload.d.ts +542 -0
- package/types/primenglab-floatlabel.d.ts +67 -0
- package/types/primenglab-fluid.d.ts +54 -0
- package/types/primenglab-focustrap.d.ts +32 -0
- package/types/primenglab-galleria.d.ts +450 -0
- package/types/primenglab-gallery.d.ts +653 -0
- package/types/primenglab-iconfield.d.ts +61 -0
- package/types/primenglab-icons-angledoubledown.d.ts +9 -0
- package/types/primenglab-icons-angledoubleleft.d.ts +9 -0
- package/types/primenglab-icons-angledoubleright.d.ts +9 -0
- package/types/primenglab-icons-angledoubleup.d.ts +9 -0
- package/types/primenglab-icons-angledown.d.ts +9 -0
- package/types/primenglab-icons-angleleft.d.ts +9 -0
- package/types/primenglab-icons-angleright.d.ts +9 -0
- package/types/primenglab-icons-angleup.d.ts +9 -0
- package/types/primenglab-icons-arrowdown.d.ts +11 -0
- package/types/primenglab-icons-arrowdownleft.d.ts +9 -0
- package/types/primenglab-icons-arrowdownright.d.ts +9 -0
- package/types/primenglab-icons-arrowleft.d.ts +11 -0
- package/types/primenglab-icons-arrowright.d.ts +9 -0
- package/types/primenglab-icons-arrowup.d.ts +11 -0
- package/types/primenglab-icons-ban.d.ts +11 -0
- package/types/primenglab-icons-bars.d.ts +9 -0
- package/types/primenglab-icons-baseicon.d.ts +33 -0
- package/types/primenglab-icons-blank.d.ts +9 -0
- package/types/primenglab-icons-calendar.d.ts +9 -0
- package/types/primenglab-icons-caretleft.d.ts +9 -0
- package/types/primenglab-icons-caretright.d.ts +9 -0
- package/types/primenglab-icons-check.d.ts +9 -0
- package/types/primenglab-icons-chevrondown.d.ts +9 -0
- package/types/primenglab-icons-chevronleft.d.ts +9 -0
- package/types/primenglab-icons-chevronright.d.ts +9 -0
- package/types/primenglab-icons-chevronup.d.ts +9 -0
- package/types/primenglab-icons-exclamationtriangle.d.ts +11 -0
- package/types/primenglab-icons-eye.d.ts +9 -0
- package/types/primenglab-icons-eyeslash.d.ts +11 -0
- package/types/primenglab-icons-filter.d.ts +11 -0
- package/types/primenglab-icons-filterfill.d.ts +9 -0
- package/types/primenglab-icons-filterslash.d.ts +11 -0
- package/types/primenglab-icons-home.d.ts +11 -0
- package/types/primenglab-icons-infocircle.d.ts +11 -0
- package/types/primenglab-icons-minus.d.ts +9 -0
- package/types/primenglab-icons-pencil.d.ts +11 -0
- package/types/primenglab-icons-plus.d.ts +11 -0
- package/types/primenglab-icons-refresh.d.ts +11 -0
- package/types/primenglab-icons-search.d.ts +11 -0
- package/types/primenglab-icons-searchminus.d.ts +11 -0
- package/types/primenglab-icons-searchplus.d.ts +11 -0
- package/types/primenglab-icons-sortalt.d.ts +11 -0
- package/types/primenglab-icons-sortamountdown.d.ts +11 -0
- package/types/primenglab-icons-sortamountupalt.d.ts +11 -0
- package/types/primenglab-icons-spinner.d.ts +11 -0
- package/types/primenglab-icons-star.d.ts +11 -0
- package/types/primenglab-icons-starfill.d.ts +11 -0
- package/types/primenglab-icons-thlarge.d.ts +11 -0
- package/types/primenglab-icons-times.d.ts +9 -0
- package/types/primenglab-icons-timescircle.d.ts +11 -0
- package/types/primenglab-icons-trash.d.ts +11 -0
- package/types/primenglab-icons-undo.d.ts +11 -0
- package/types/primenglab-icons-upload.d.ts +11 -0
- package/types/primenglab-icons-windowmaximize.d.ts +11 -0
- package/types/primenglab-icons-windowminimize.d.ts +11 -0
- package/types/primenglab-icons.d.ts +53 -0
- package/types/primenglab-iftalabel.d.ts +56 -0
- package/types/primenglab-image.d.ts +336 -0
- package/types/primenglab-imagecompare.d.ts +97 -0
- package/types/primenglab-inplace.d.ts +132 -0
- package/types/primenglab-inputcolor.d.ts +568 -0
- package/types/primenglab-inputgroup.d.ts +59 -0
- package/types/primenglab-inputgroupaddon.d.ts +37 -0
- package/types/primenglab-inputicon.d.ts +38 -0
- package/types/primenglab-inputmask.d.ts +385 -0
- package/types/primenglab-inputnumber.d.ts +424 -0
- package/types/primenglab-inputotp.d.ts +177 -0
- package/types/primenglab-inputpassword.d.ts +63 -0
- package/types/primenglab-inputtags.d.ts +315 -0
- package/types/primenglab-inputtext.d.ts +112 -0
- package/types/primenglab-keyfilter.d.ts +58 -0
- package/types/primenglab-knob.d.ts +202 -0
- package/types/primenglab-label.d.ts +55 -0
- package/types/primenglab-license.d.ts +23 -0
- package/types/primenglab-listbox.d.ts +775 -0
- package/types/primenglab-megamenu.d.ts +402 -0
- package/types/primenglab-menu.d.ts +382 -0
- package/types/primenglab-menubar.d.ts +374 -0
- package/types/primenglab-message.d.ts +166 -0
- package/types/primenglab-metergroup.d.ts +209 -0
- package/types/primenglab-motion.d.ts +398 -0
- package/types/primenglab-multiselect.d.ts +877 -0
- package/types/primenglab-orderlist.d.ts +390 -0
- package/types/primenglab-organizationchart.d.ts +189 -0
- package/types/primenglab-overlay.d.ts +300 -0
- package/types/primenglab-overlaybadge.d.ts +70 -0
- package/types/primenglab-paginator.d.ts +330 -0
- package/types/primenglab-panel.d.ts +234 -0
- package/types/primenglab-panelmenu.d.ts +248 -0
- package/types/primenglab-passthrough.d.ts +14 -0
- package/types/primenglab-password.d.ts +459 -0
- package/types/primenglab-picklist.d.ts +751 -0
- package/types/primenglab-popover.d.ts +183 -0
- package/types/primenglab-progressbar.d.ts +118 -0
- package/types/primenglab-progressspinner.d.ts +126 -0
- package/types/primenglab-radiobutton.d.ts +188 -0
- package/types/primenglab-rating.d.ts +210 -0
- package/types/primenglab-ripple.d.ts +60 -0
- package/types/primenglab-scrollarea.d.ts +286 -0
- package/types/primenglab-scroller.d.ts +462 -0
- package/types/primenglab-scrollpanel.d.ts +147 -0
- package/types/primenglab-scrolltop.d.ts +143 -0
- package/types/primenglab-select.d.ts +757 -0
- package/types/primenglab-selectbutton.d.ts +184 -0
- package/types/primenglab-sidebar.d.ts +669 -0
- package/types/primenglab-skeleton.d.ts +103 -0
- package/types/primenglab-slider.d.ts +327 -0
- package/types/primenglab-speeddial.d.ts +394 -0
- package/types/primenglab-splitbutton.d.ts +259 -0
- package/types/primenglab-splitter.d.ts +334 -0
- package/types/primenglab-stepper.d.ts +311 -0
- package/types/primenglab-steps.d.ts +153 -0
- package/types/primenglab-styleclass.d.ts +110 -0
- package/types/primenglab-table.d.ts +1953 -0
- package/types/primenglab-tabs.d.ts +356 -0
- package/types/primenglab-tag.d.ts +104 -0
- package/types/primenglab-terminal.d.ts +137 -0
- package/types/primenglab-textarea.d.ts +126 -0
- package/types/primenglab-tieredmenu.d.ts +419 -0
- package/types/primenglab-timeline.d.ts +128 -0
- package/types/primenglab-toast.d.ts +268 -0
- package/types/primenglab-togglebutton.d.ts +200 -0
- package/types/primenglab-toggleswitch.d.ts +161 -0
- package/types/primenglab-toolbar.d.ts +95 -0
- package/types/primenglab-tooltip.d.ts +251 -0
- package/types/primenglab-tree.d.ts +571 -0
- package/types/primenglab-treeselect.d.ts +560 -0
- package/types/primenglab-treetable.d.ts +1290 -0
- package/types/primenglab-ts-helpers.d.ts +6 -0
- package/types/primenglab-types-accordion.d.ts +135 -0
- package/types/primenglab-types-autocomplete.d.ts +312 -0
- package/types/primenglab-types-avatar.d.ts +50 -0
- package/types/primenglab-types-avatargroup.d.ts +28 -0
- package/types/primenglab-types-badge.d.ts +36 -0
- package/types/primenglab-types-blockui.d.ts +39 -0
- package/types/primenglab-types-breadcrumb.d.ts +96 -0
- package/types/primenglab-types-button.d.ts +140 -0
- package/types/primenglab-types-card.d.ts +75 -0
- package/types/primenglab-types-carousel.d.ts +244 -0
- package/types/primenglab-types-cascadeselect.d.ts +278 -0
- package/types/primenglab-types-chart.d.ts +57 -0
- package/types/primenglab-types-checkbox.d.ts +85 -0
- package/types/primenglab-types-chip.d.ts +70 -0
- package/types/primenglab-types-colorpicker.d.ts +83 -0
- package/types/primenglab-types-commandmenu.d.ts +154 -0
- package/types/primenglab-types-compare.d.ts +55 -0
- package/types/primenglab-types-confirmdialog.d.ts +161 -0
- package/types/primenglab-types-confirmpopup.d.ts +110 -0
- package/types/primenglab-types-contextmenu.d.ts +135 -0
- package/types/primenglab-types-dataview.d.ts +263 -0
- package/types/primenglab-types-datepicker.d.ts +535 -0
- package/types/primenglab-types-dialog.d.ts +124 -0
- package/types/primenglab-types-divider.d.ts +43 -0
- package/types/primenglab-types-dock.d.ts +75 -0
- package/types/primenglab-types-drawer.d.ts +83 -0
- package/types/primenglab-types-editor.d.ts +210 -0
- package/types/primenglab-types-fieldset.d.ts +120 -0
- package/types/primenglab-types-fileupload.d.ts +416 -0
- package/types/primenglab-types-floatlabel.d.ts +27 -0
- package/types/primenglab-types-fluid.d.ts +28 -0
- package/types/primenglab-types-galleria.d.ts +259 -0
- package/types/primenglab-types-gallery.d.ts +434 -0
- package/types/primenglab-types-iconfield.d.ts +27 -0
- package/types/primenglab-types-iftalabel.d.ts +26 -0
- package/types/primenglab-types-image.d.ts +149 -0
- package/types/primenglab-types-imagecompare.d.ts +43 -0
- package/types/primenglab-types-inplace.d.ts +72 -0
- package/types/primenglab-types-inputcolor.d.ts +206 -0
- package/types/primenglab-types-inputgroup.d.ts +28 -0
- package/types/primenglab-types-inputgroupaddon.d.ts +28 -0
- package/types/primenglab-types-inputicon.d.ts +26 -0
- package/types/primenglab-types-inputmask.d.ts +56 -0
- package/types/primenglab-types-inputnumber.d.ts +115 -0
- package/types/primenglab-types-inputotp.d.ts +101 -0
- package/types/primenglab-types-inputpassword.d.ts +24 -0
- package/types/primenglab-types-inputtags.d.ts +178 -0
- package/types/primenglab-types-inputtext.d.ts +24 -0
- package/types/primenglab-types-knob.d.ts +40 -0
- package/types/primenglab-types-label.d.ts +24 -0
- package/types/primenglab-types-listbox.d.ts +359 -0
- package/types/primenglab-types-megamenu.d.ts +183 -0
- package/types/primenglab-types-menu.d.ts +135 -0
- package/types/primenglab-types-menubar.d.ts +171 -0
- package/types/primenglab-types-message.d.ts +112 -0
- package/types/primenglab-types-metergroup.d.ts +178 -0
- package/types/primenglab-types-motion.d.ts +26 -0
- package/types/primenglab-types-multiselect.d.ts +454 -0
- package/types/primenglab-types-orderlist.d.ts +177 -0
- package/types/primenglab-types-organizationchart.d.ts +187 -0
- package/types/primenglab-types-overlay.d.ts +60 -0
- package/types/primenglab-types-overlaybadge.d.ts +34 -0
- package/types/primenglab-types-paginator.d.ts +167 -0
- package/types/primenglab-types-panel.d.ts +139 -0
- package/types/primenglab-types-panelmenu.d.ts +180 -0
- package/types/primenglab-types-password.d.ts +120 -0
- package/types/primenglab-types-picklist.d.ts +358 -0
- package/types/primenglab-types-popover.d.ts +59 -0
- package/types/primenglab-types-progressbar.d.ts +63 -0
- package/types/primenglab-types-progressspinner.d.ts +44 -0
- package/types/primenglab-types-radiobutton.d.ts +51 -0
- package/types/primenglab-types-rating.d.ts +94 -0
- package/types/primenglab-types-scrollarea.d.ts +60 -0
- package/types/primenglab-types-scroller.d.ts +231 -0
- package/types/primenglab-types-scrollpanel.d.ts +56 -0
- package/types/primenglab-types-scrolltop.d.ts +71 -0
- package/types/primenglab-types-select.d.ts +330 -0
- package/types/primenglab-types-selectbutton.d.ts +92 -0
- package/types/primenglab-types-shared.d.ts +27 -0
- package/types/primenglab-types-sidebar.d.ts +108 -0
- package/types/primenglab-types-skeleton.d.ts +28 -0
- package/types/primenglab-types-slider.d.ts +91 -0
- package/types/primenglab-types-speeddial.d.ts +110 -0
- package/types/primenglab-types-splitbutton.d.ts +60 -0
- package/types/primenglab-types-splitter.d.ts +127 -0
- package/types/primenglab-types-stepper.d.ts +186 -0
- package/types/primenglab-types-table.d.ts +902 -0
- package/types/primenglab-types-tabs.d.ts +120 -0
- package/types/primenglab-types-tag.d.ts +48 -0
- package/types/primenglab-types-terminal.d.ts +60 -0
- package/types/primenglab-types-textarea.d.ts +28 -0
- package/types/primenglab-types-tieredmenu.d.ts +203 -0
- package/types/primenglab-types-timeline.d.ts +93 -0
- package/types/primenglab-types-toast.d.ts +148 -0
- package/types/primenglab-types-togglebutton.d.ts +91 -0
- package/types/primenglab-types-toggleswitch.d.ts +73 -0
- package/types/primenglab-types-toolbar.d.ts +55 -0
- package/types/primenglab-types-tooltip.d.ts +42 -0
- package/types/primenglab-types-tree.d.ts +355 -0
- package/types/primenglab-types-treeselect.d.ts +266 -0
- package/types/primenglab-types-treetable.d.ts +659 -0
- package/types/primenglab-usestyle.d.ts +15 -0
- package/types/primenglab-utils.d.ts +43 -0
- package/types/primenglab.d.ts +2 -0
|
@@ -0,0 +1,2287 @@
|
|
|
1
|
+
export * from 'primenglab/types/select';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { InjectionToken, Injectable, inject, input, booleanAttribute, numberAttribute, computed, output, Component, forwardRef, viewChild, contentChild, signal, effect, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
5
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
+
import { uuid, equals, isNotEmpty, isEmpty, deepEquals, findSingle, scrollInView, resolveFieldData, focus, isPrintableCharacter, findLastIndex, getFirstFocusableElement, getLastFocusableElement, getFocusableElements } from '@primeuix/utils';
|
|
7
|
+
import { SharedModule, FilterService, TranslationKeys } from 'primenglab/api';
|
|
8
|
+
import { AutoFocus } from 'primenglab/autofocus';
|
|
9
|
+
import { BaseComponent, PARENT_INSTANCE } from 'primenglab/basecomponent';
|
|
10
|
+
import { BaseInput } from 'primenglab/baseinput';
|
|
11
|
+
import * as i1 from 'primenglab/bind';
|
|
12
|
+
import { BindModule, Bind } from 'primenglab/bind';
|
|
13
|
+
import { unblockBodyScroll } from 'primenglab/dom';
|
|
14
|
+
import { IconField } from 'primenglab/iconfield';
|
|
15
|
+
import { ChevronDown } from '@primeicons/angular/chevron-down';
|
|
16
|
+
import { Search } from '@primeicons/angular/search';
|
|
17
|
+
import { Times } from '@primeicons/angular/times';
|
|
18
|
+
import { InputIcon } from 'primenglab/inputicon';
|
|
19
|
+
import { InputText } from 'primenglab/inputtext';
|
|
20
|
+
import { Overlay } from 'primenglab/overlay';
|
|
21
|
+
import { Scroller } from 'primenglab/scroller';
|
|
22
|
+
import { Tooltip } from 'primenglab/tooltip';
|
|
23
|
+
import { Check } from '@primeicons/angular/check';
|
|
24
|
+
import { Blank } from '@primeicons/angular/blank';
|
|
25
|
+
import { Ripple } from 'primenglab/ripple';
|
|
26
|
+
import { style } from '@primeuix/styles/select';
|
|
27
|
+
import { BaseStyle } from 'primenglab/base';
|
|
28
|
+
|
|
29
|
+
const SELECT_INSTANCE = new InjectionToken('SELECT_INSTANCE');
|
|
30
|
+
const SELECT_ITEM_INSTANCE = new InjectionToken('SELECT_ITEM_INSTANCE');
|
|
31
|
+
|
|
32
|
+
const classes = {
|
|
33
|
+
root: ({ instance }) => [
|
|
34
|
+
'p-select p-component p-inputwrapper',
|
|
35
|
+
{
|
|
36
|
+
'p-disabled': instance.$disabled(),
|
|
37
|
+
'p-invalid': instance.invalid(),
|
|
38
|
+
'p-variant-filled': instance.$variant() === 'filled',
|
|
39
|
+
'p-focus': instance.focused(),
|
|
40
|
+
'p-inputwrapper-filled': instance.$filled(),
|
|
41
|
+
'p-inputwrapper-focus': instance.focused() || instance.overlayVisible(),
|
|
42
|
+
'p-select-open': instance.overlayVisible(),
|
|
43
|
+
'p-select-fluid': instance.hasFluid,
|
|
44
|
+
'p-select-sm p-inputfield-sm': instance.size() === 'small',
|
|
45
|
+
'p-select-lg p-inputfield-lg': instance.size() === 'large'
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
label: ({ instance }) => [
|
|
49
|
+
'p-select-label',
|
|
50
|
+
{
|
|
51
|
+
'p-placeholder': instance.placeholder() && instance.label() === instance.placeholder(),
|
|
52
|
+
'p-select-label-empty': !instance.editable() && !instance.selectedItemTemplate() && (instance.label() === undefined || instance.label() === null || instance.label() === 'p-emptylabel' || instance.label().length === 0)
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
clearIcon: 'p-select-clear-icon',
|
|
56
|
+
dropdown: 'p-select-dropdown',
|
|
57
|
+
loadingIcon: 'p-select-loading-icon',
|
|
58
|
+
dropdownIcon: 'p-select-dropdown-icon',
|
|
59
|
+
overlay: 'p-select-overlay p-component-overlay p-component',
|
|
60
|
+
header: 'p-select-header',
|
|
61
|
+
pcFilter: 'p-select-filter',
|
|
62
|
+
listContainer: 'p-select-list-container',
|
|
63
|
+
list: 'p-select-list',
|
|
64
|
+
optionGroup: 'p-select-option-group',
|
|
65
|
+
optionGroupLabel: 'p-select-option-group-label',
|
|
66
|
+
option: ({ instance }) => [
|
|
67
|
+
'p-select-option',
|
|
68
|
+
{
|
|
69
|
+
'p-select-option-selected': instance.selected() && !instance.checkmark(),
|
|
70
|
+
'p-disabled': instance.disabled(),
|
|
71
|
+
'p-focus': instance.focused()
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
optionLabel: 'p-select-option-label',
|
|
75
|
+
optionCheckIcon: 'p-select-option-check-icon',
|
|
76
|
+
optionBlankIcon: 'p-select-option-blank-icon',
|
|
77
|
+
emptyMessage: 'p-select-empty-message'
|
|
78
|
+
};
|
|
79
|
+
class SelectStyle extends BaseStyle {
|
|
80
|
+
name = 'select';
|
|
81
|
+
style = style;
|
|
82
|
+
classes = classes;
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
84
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectStyle });
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectStyle, decorators: [{
|
|
87
|
+
type: Injectable
|
|
88
|
+
}] });
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* Select also known as Select, is used to choose an item from a collection of options.
|
|
92
|
+
*
|
|
93
|
+
* [Live Demo](https://www.primeng.org/select/)
|
|
94
|
+
*
|
|
95
|
+
* @module selectstyle
|
|
96
|
+
*
|
|
97
|
+
*/
|
|
98
|
+
var SelectClasses;
|
|
99
|
+
(function (SelectClasses) {
|
|
100
|
+
/**
|
|
101
|
+
* Class name of the root element
|
|
102
|
+
*/
|
|
103
|
+
SelectClasses["root"] = "p-select";
|
|
104
|
+
/**
|
|
105
|
+
* Class name of the label element
|
|
106
|
+
*/
|
|
107
|
+
SelectClasses["label"] = "p-select-label";
|
|
108
|
+
/**
|
|
109
|
+
* Class name of the clear icon element
|
|
110
|
+
*/
|
|
111
|
+
SelectClasses["clearIcon"] = "p-select-clear-icon";
|
|
112
|
+
/**
|
|
113
|
+
* Class name of the dropdown element
|
|
114
|
+
*/
|
|
115
|
+
SelectClasses["dropdown"] = "p-select-dropdown";
|
|
116
|
+
/**
|
|
117
|
+
* Class name of the loadingicon element
|
|
118
|
+
*/
|
|
119
|
+
SelectClasses["loadingIcon"] = "p-select-loading-icon";
|
|
120
|
+
/**
|
|
121
|
+
* Class name of the dropdown icon element
|
|
122
|
+
*/
|
|
123
|
+
SelectClasses["dropdownIcon"] = "p-select-dropdown-icon";
|
|
124
|
+
/**
|
|
125
|
+
* Class name of the overlay element
|
|
126
|
+
*/
|
|
127
|
+
SelectClasses["overlay"] = "p-select-overlay";
|
|
128
|
+
/**
|
|
129
|
+
* Class name of the header element
|
|
130
|
+
*/
|
|
131
|
+
SelectClasses["header"] = "p-select-header";
|
|
132
|
+
/**
|
|
133
|
+
* Class name of the filter element
|
|
134
|
+
*/
|
|
135
|
+
SelectClasses["pcFilter"] = "p-select-filter";
|
|
136
|
+
/**
|
|
137
|
+
* Class name of the list container element
|
|
138
|
+
*/
|
|
139
|
+
SelectClasses["listContainer"] = "p-select-list-container";
|
|
140
|
+
/**
|
|
141
|
+
* Class name of the list element
|
|
142
|
+
*/
|
|
143
|
+
SelectClasses["list"] = "p-select-list";
|
|
144
|
+
/**
|
|
145
|
+
* Class name of the option group element
|
|
146
|
+
*/
|
|
147
|
+
SelectClasses["optionGroup"] = "p-select-option-group";
|
|
148
|
+
/**
|
|
149
|
+
* Class name of the option group label element
|
|
150
|
+
*/
|
|
151
|
+
SelectClasses["optionGroupLabel"] = "p-select-option-group-label";
|
|
152
|
+
/**
|
|
153
|
+
* Class name of the option element
|
|
154
|
+
*/
|
|
155
|
+
SelectClasses["option"] = "p-select-option";
|
|
156
|
+
/**
|
|
157
|
+
* Class name of the option label element
|
|
158
|
+
*/
|
|
159
|
+
SelectClasses["optionLabel"] = "p-select-option-label";
|
|
160
|
+
/**
|
|
161
|
+
* Class name of the option check icon element
|
|
162
|
+
*/
|
|
163
|
+
SelectClasses["optionCheckIcon"] = "p-select-option-check-icon";
|
|
164
|
+
/**
|
|
165
|
+
* Class name of the option blank icon element
|
|
166
|
+
*/
|
|
167
|
+
SelectClasses["optionBlankIcon"] = "p-select-option-blank-icon";
|
|
168
|
+
/**
|
|
169
|
+
* Class name of the empty message element
|
|
170
|
+
*/
|
|
171
|
+
SelectClasses["emptyMessage"] = "p-select-empty-message";
|
|
172
|
+
})(SelectClasses || (SelectClasses = {}));
|
|
173
|
+
|
|
174
|
+
class SelectItem extends BaseComponent {
|
|
175
|
+
hostName = 'select';
|
|
176
|
+
$pcSelectItem = inject(SELECT_ITEM_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
177
|
+
$pcSelect = inject(SELECT_INSTANCE, { optional: true, skipSelf: true });
|
|
178
|
+
id = input(/* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
180
|
+
option = input(/* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [undefined, { debugName: "option" }] : /* istanbul ignore next */ []));
|
|
182
|
+
selected = input(undefined, { ...(ngDevMode ? { debugName: "selected" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
183
|
+
focused = input(undefined, { ...(ngDevMode ? { debugName: "focused" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
184
|
+
label = input(/* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
186
|
+
disabled = input(undefined, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
187
|
+
visible = input(undefined, { ...(ngDevMode ? { debugName: "visible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
188
|
+
itemSize = input(undefined, { ...(ngDevMode ? { debugName: "itemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
189
|
+
ariaPosInset = input(/* @ts-ignore */
|
|
190
|
+
...(ngDevMode ? [undefined, { debugName: "ariaPosInset" }] : /* istanbul ignore next */ []));
|
|
191
|
+
ariaSetSize = input(/* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [undefined, { debugName: "ariaSetSize" }] : /* istanbul ignore next */ []));
|
|
193
|
+
template = input(/* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [undefined, { debugName: "template" }] : /* istanbul ignore next */ []));
|
|
195
|
+
checkmark = input(false, { ...(ngDevMode ? { debugName: "checkmark" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
196
|
+
index = input(/* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [undefined, { debugName: "index" }] : /* istanbul ignore next */ []));
|
|
198
|
+
scrollerOptions = input(/* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [undefined, { debugName: "scrollerOptions" }] : /* istanbul ignore next */ []));
|
|
200
|
+
templateContext = computed(() => ({ $implicit: this.option() }), /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []));
|
|
202
|
+
itemSizeStyle = computed(() => ({ height: this.scrollerOptions()?.itemSize + 'px' }), /* @ts-ignore */
|
|
203
|
+
...(ngDevMode ? [{ debugName: "itemSizeStyle" }] : /* istanbul ignore next */ []));
|
|
204
|
+
onClick = output();
|
|
205
|
+
onMouseEnter = output();
|
|
206
|
+
_componentStyle = inject(SelectStyle);
|
|
207
|
+
onOptionClick(event) {
|
|
208
|
+
this.onClick.emit(event);
|
|
209
|
+
}
|
|
210
|
+
onOptionMouseEnter(event) {
|
|
211
|
+
this.onMouseEnter.emit(event);
|
|
212
|
+
}
|
|
213
|
+
getPTOptions() {
|
|
214
|
+
return (this.$pcSelect?.getPTItemOptions?.(this.option(), this.scrollerOptions(), this.index() ?? 0, 'option') ??
|
|
215
|
+
this.$pcSelect?.ptm('option', {
|
|
216
|
+
context: {
|
|
217
|
+
option: this.option(),
|
|
218
|
+
selected: this.selected(),
|
|
219
|
+
focused: this.focused(),
|
|
220
|
+
disabled: this.disabled()
|
|
221
|
+
}
|
|
222
|
+
}));
|
|
223
|
+
}
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectItem, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
225
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: SelectItem, isStandalone: true, selector: "p-select-item", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, option: { classPropertyName: "option", publicName: "option", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, itemSize: { classPropertyName: "itemSize", publicName: "itemSize", isSignal: true, isRequired: false, transformFunction: null }, ariaPosInset: { classPropertyName: "ariaPosInset", publicName: "ariaPosInset", isSignal: true, isRequired: false, transformFunction: null }, ariaSetSize: { classPropertyName: "ariaSetSize", publicName: "ariaSetSize", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, scrollerOptions: { classPropertyName: "scrollerOptions", publicName: "scrollerOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onMouseEnter: "onMouseEnter" }, providers: [SelectStyle, { provide: PARENT_INSTANCE, useExisting: SelectItem }], usesInheritance: true, ngImport: i0, template: `
|
|
226
|
+
<li
|
|
227
|
+
[id]="id()"
|
|
228
|
+
[pBind]="getPTOptions()"
|
|
229
|
+
(click)="onOptionClick($event)"
|
|
230
|
+
(mouseenter)="onOptionMouseEnter($event)"
|
|
231
|
+
role="option"
|
|
232
|
+
pRipple
|
|
233
|
+
[attr.aria-label]="label()"
|
|
234
|
+
[attr.aria-setsize]="ariaSetSize()"
|
|
235
|
+
[attr.aria-posinset]="ariaPosInset()"
|
|
236
|
+
[attr.aria-selected]="selected()"
|
|
237
|
+
[attr.data-p-focused]="focused()"
|
|
238
|
+
[attr.data-p-highlight]="selected()"
|
|
239
|
+
[attr.data-p-selected]="selected()"
|
|
240
|
+
[attr.data-p-disabled]="disabled()"
|
|
241
|
+
[style]="itemSizeStyle()"
|
|
242
|
+
[class]="cx('option')"
|
|
243
|
+
>
|
|
244
|
+
@if (checkmark()) {
|
|
245
|
+
@if (selected()) {
|
|
246
|
+
<svg data-p-icon="check" [class]="cx('optionCheckIcon')" [pBind]="$pcSelect?.ptm('optionCheckIcon')" />
|
|
247
|
+
} @else {
|
|
248
|
+
<svg data-p-icon="blank" [class]="cx('optionBlankIcon')" [pBind]="$pcSelect?.ptm('optionBlankIcon')" />
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
@if (!template()) {
|
|
252
|
+
<span [pBind]="$pcSelect?.ptm('optionLabel')">{{ label() ?? 'empty' }}</span>
|
|
253
|
+
}
|
|
254
|
+
<ng-container *ngTemplateOutlet="template(); context: templateContext()"></ng-container>
|
|
255
|
+
</li>
|
|
256
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: Check, selector: "svg[data-p-icon=\"check\"]" }, { kind: "component", type: Blank, selector: "svg[data-p-icon=\"blank\"]" }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }] });
|
|
257
|
+
}
|
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectItem, decorators: [{
|
|
259
|
+
type: Component,
|
|
260
|
+
args: [{
|
|
261
|
+
selector: 'p-select-item',
|
|
262
|
+
standalone: true,
|
|
263
|
+
imports: [NgTemplateOutlet, SharedModule, Ripple, Check, Blank, BindModule],
|
|
264
|
+
template: `
|
|
265
|
+
<li
|
|
266
|
+
[id]="id()"
|
|
267
|
+
[pBind]="getPTOptions()"
|
|
268
|
+
(click)="onOptionClick($event)"
|
|
269
|
+
(mouseenter)="onOptionMouseEnter($event)"
|
|
270
|
+
role="option"
|
|
271
|
+
pRipple
|
|
272
|
+
[attr.aria-label]="label()"
|
|
273
|
+
[attr.aria-setsize]="ariaSetSize()"
|
|
274
|
+
[attr.aria-posinset]="ariaPosInset()"
|
|
275
|
+
[attr.aria-selected]="selected()"
|
|
276
|
+
[attr.data-p-focused]="focused()"
|
|
277
|
+
[attr.data-p-highlight]="selected()"
|
|
278
|
+
[attr.data-p-selected]="selected()"
|
|
279
|
+
[attr.data-p-disabled]="disabled()"
|
|
280
|
+
[style]="itemSizeStyle()"
|
|
281
|
+
[class]="cx('option')"
|
|
282
|
+
>
|
|
283
|
+
@if (checkmark()) {
|
|
284
|
+
@if (selected()) {
|
|
285
|
+
<svg data-p-icon="check" [class]="cx('optionCheckIcon')" [pBind]="$pcSelect?.ptm('optionCheckIcon')" />
|
|
286
|
+
} @else {
|
|
287
|
+
<svg data-p-icon="blank" [class]="cx('optionBlankIcon')" [pBind]="$pcSelect?.ptm('optionBlankIcon')" />
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
@if (!template()) {
|
|
291
|
+
<span [pBind]="$pcSelect?.ptm('optionLabel')">{{ label() ?? 'empty' }}</span>
|
|
292
|
+
}
|
|
293
|
+
<ng-container *ngTemplateOutlet="template(); context: templateContext()"></ng-container>
|
|
294
|
+
</li>
|
|
295
|
+
`,
|
|
296
|
+
providers: [SelectStyle, { provide: PARENT_INSTANCE, useExisting: SelectItem }]
|
|
297
|
+
}]
|
|
298
|
+
}], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], option: [{ type: i0.Input, args: [{ isSignal: true, alias: "option", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], focused: [{ type: i0.Input, args: [{ isSignal: true, alias: "focused", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "visible", required: false }] }], itemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemSize", required: false }] }], ariaPosInset: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaPosInset", required: false }] }], ariaSetSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaSetSize", required: false }] }], template: [{ type: i0.Input, args: [{ isSignal: true, alias: "template", required: false }] }], checkmark: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkmark", required: false }] }], index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: false }] }], scrollerOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollerOptions", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onMouseEnter: [{ type: i0.Output, args: ["onMouseEnter"] }] } });
|
|
299
|
+
|
|
300
|
+
const SELECT_VALUE_ACCESSOR = {
|
|
301
|
+
provide: NG_VALUE_ACCESSOR,
|
|
302
|
+
useExisting: forwardRef(() => Select),
|
|
303
|
+
multi: true
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Select is used to choose an item from a collection of options.
|
|
307
|
+
* @group Components
|
|
308
|
+
*/
|
|
309
|
+
class Select extends BaseInput {
|
|
310
|
+
componentName = 'Select';
|
|
311
|
+
bindDirectiveInstance = inject(Bind, { self: true });
|
|
312
|
+
filterService = inject(FilterService);
|
|
313
|
+
/**
|
|
314
|
+
* Unique identifier of the component
|
|
315
|
+
* @group Props
|
|
316
|
+
*/
|
|
317
|
+
id = input(/* @ts-ignore */
|
|
318
|
+
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
319
|
+
_internalId = uuid('pn_id_');
|
|
320
|
+
$id = computed(() => this.id() || this._internalId, /* @ts-ignore */
|
|
321
|
+
...(ngDevMode ? [{ debugName: "$id" }] : /* istanbul ignore next */ []));
|
|
322
|
+
/**
|
|
323
|
+
* Height of the viewport in pixels, a scrollbar is defined if height of list exceeds this value.
|
|
324
|
+
* @group Props
|
|
325
|
+
*/
|
|
326
|
+
scrollHeight = input('200px', /* @ts-ignore */
|
|
327
|
+
...(ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
|
|
328
|
+
/**
|
|
329
|
+
* When specified, displays an input field to filter the items on keyup.
|
|
330
|
+
* @group Props
|
|
331
|
+
*/
|
|
332
|
+
filter = input(undefined, { ...(ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
333
|
+
/**
|
|
334
|
+
* Inline style of the overlay panel element.
|
|
335
|
+
* @group Props
|
|
336
|
+
*/
|
|
337
|
+
panelStyle = input(/* @ts-ignore */
|
|
338
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
339
|
+
/**
|
|
340
|
+
* Style class of the overlay panel element.
|
|
341
|
+
* @group Props
|
|
342
|
+
*/
|
|
343
|
+
panelStyleClass = input(/* @ts-ignore */
|
|
344
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
|
|
345
|
+
/**
|
|
346
|
+
* When present, it specifies that the component cannot be edited.
|
|
347
|
+
* @group Props
|
|
348
|
+
*/
|
|
349
|
+
readonly = input(undefined, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
350
|
+
/**
|
|
351
|
+
* When present, custom value instead of predefined options can be entered using the editable input field.
|
|
352
|
+
* @group Props
|
|
353
|
+
*/
|
|
354
|
+
editable = input(undefined, { ...(ngDevMode ? { debugName: "editable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
355
|
+
/**
|
|
356
|
+
* Index of the element in tabbing order.
|
|
357
|
+
* @group Props
|
|
358
|
+
*/
|
|
359
|
+
tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
360
|
+
/**
|
|
361
|
+
* Default text to display when no option is selected.
|
|
362
|
+
* @group Props
|
|
363
|
+
*/
|
|
364
|
+
placeholder = input(/* @ts-ignore */
|
|
365
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
366
|
+
/**
|
|
367
|
+
* Icon to display in loading state.
|
|
368
|
+
* @group Props
|
|
369
|
+
*/
|
|
370
|
+
loadingIcon = input(/* @ts-ignore */
|
|
371
|
+
...(ngDevMode ? [undefined, { debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
|
|
372
|
+
/**
|
|
373
|
+
* Placeholder text to show when filter input is empty.
|
|
374
|
+
* @group Props
|
|
375
|
+
*/
|
|
376
|
+
filterPlaceholder = input(/* @ts-ignore */
|
|
377
|
+
...(ngDevMode ? [undefined, { debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
|
|
378
|
+
/**
|
|
379
|
+
* Locale to use in filtering. The default locale is the host environment's current locale.
|
|
380
|
+
* @group Props
|
|
381
|
+
*/
|
|
382
|
+
filterLocale = input(/* @ts-ignore */
|
|
383
|
+
...(ngDevMode ? [undefined, { debugName: "filterLocale" }] : /* istanbul ignore next */ []));
|
|
384
|
+
/**
|
|
385
|
+
* Identifier of the accessible input element.
|
|
386
|
+
* @group Props
|
|
387
|
+
*/
|
|
388
|
+
inputId = input(/* @ts-ignore */
|
|
389
|
+
...(ngDevMode ? [undefined, { debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
390
|
+
/**
|
|
391
|
+
* A property to uniquely identify a value in options.
|
|
392
|
+
* @group Props
|
|
393
|
+
*/
|
|
394
|
+
dataKey = input(/* @ts-ignore */
|
|
395
|
+
...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
|
|
396
|
+
/**
|
|
397
|
+
* When filtering is enabled, filterBy decides which field or fields (comma separated) to search against.
|
|
398
|
+
* @group Props
|
|
399
|
+
*/
|
|
400
|
+
filterBy = input(/* @ts-ignore */
|
|
401
|
+
...(ngDevMode ? [undefined, { debugName: "filterBy" }] : /* istanbul ignore next */ []));
|
|
402
|
+
/**
|
|
403
|
+
* Fields used when filtering the options, defaults to optionLabel.
|
|
404
|
+
* @group Props
|
|
405
|
+
*/
|
|
406
|
+
filterFields = input(/* @ts-ignore */
|
|
407
|
+
...(ngDevMode ? [undefined, { debugName: "filterFields" }] : /* istanbul ignore next */ []));
|
|
408
|
+
/**
|
|
409
|
+
* When present, it specifies that the component should automatically get focus on load.
|
|
410
|
+
* @group Props
|
|
411
|
+
*/
|
|
412
|
+
autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
413
|
+
/**
|
|
414
|
+
* Clears the filter value when hiding the select.
|
|
415
|
+
* @group Props
|
|
416
|
+
*/
|
|
417
|
+
resetFilterOnHide = input(false, { ...(ngDevMode ? { debugName: "resetFilterOnHide" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
418
|
+
/**
|
|
419
|
+
* Whether the selected option will be shown with a check mark.
|
|
420
|
+
* @group Props
|
|
421
|
+
*/
|
|
422
|
+
checkmark = input(false, { ...(ngDevMode ? { debugName: "checkmark" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
423
|
+
/**
|
|
424
|
+
* Icon class of the select icon.
|
|
425
|
+
* @group Props
|
|
426
|
+
*/
|
|
427
|
+
dropdownIcon = input(/* @ts-ignore */
|
|
428
|
+
...(ngDevMode ? [undefined, { debugName: "dropdownIcon" }] : /* istanbul ignore next */ []));
|
|
429
|
+
/**
|
|
430
|
+
* Whether the select is in loading state.
|
|
431
|
+
* @group Props
|
|
432
|
+
*/
|
|
433
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
434
|
+
/**
|
|
435
|
+
* Name of the label field of an option.
|
|
436
|
+
* @group Props
|
|
437
|
+
*/
|
|
438
|
+
optionLabel = input(/* @ts-ignore */
|
|
439
|
+
...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
440
|
+
/**
|
|
441
|
+
* Name of the value field of an option.
|
|
442
|
+
* @group Props
|
|
443
|
+
*/
|
|
444
|
+
optionValue = input(/* @ts-ignore */
|
|
445
|
+
...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
446
|
+
/**
|
|
447
|
+
* Name of the disabled field of an option.
|
|
448
|
+
* @group Props
|
|
449
|
+
*/
|
|
450
|
+
optionDisabled = input(/* @ts-ignore */
|
|
451
|
+
...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
|
|
452
|
+
/**
|
|
453
|
+
* Name of the label field of an option group.
|
|
454
|
+
* @group Props
|
|
455
|
+
*/
|
|
456
|
+
optionGroupLabel = input('label', /* @ts-ignore */
|
|
457
|
+
...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
|
|
458
|
+
/**
|
|
459
|
+
* Name of the options field of an option group.
|
|
460
|
+
* @group Props
|
|
461
|
+
*/
|
|
462
|
+
optionGroupChildren = input('items', /* @ts-ignore */
|
|
463
|
+
...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
|
|
464
|
+
/**
|
|
465
|
+
* Whether to display options as grouped when nested options are provided.
|
|
466
|
+
* @group Props
|
|
467
|
+
*/
|
|
468
|
+
group = input(undefined, { ...(ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
469
|
+
/**
|
|
470
|
+
* When enabled, a clear icon is displayed to clear the value.
|
|
471
|
+
* @group Props
|
|
472
|
+
*/
|
|
473
|
+
showClear = input(undefined, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
474
|
+
/**
|
|
475
|
+
* Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration.
|
|
476
|
+
* @group Props
|
|
477
|
+
*/
|
|
478
|
+
emptyFilterMessage = input('', /* @ts-ignore */
|
|
479
|
+
...(ngDevMode ? [{ debugName: "emptyFilterMessage" }] : /* istanbul ignore next */ []));
|
|
480
|
+
/**
|
|
481
|
+
* Text to display when there is no data. Defaults to global value in i18n translation configuration.
|
|
482
|
+
* @group Props
|
|
483
|
+
*/
|
|
484
|
+
emptyMessage = input('', /* @ts-ignore */
|
|
485
|
+
...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
486
|
+
/**
|
|
487
|
+
* Defines if data is loaded and interacted with in lazy manner.
|
|
488
|
+
* @group Props
|
|
489
|
+
*/
|
|
490
|
+
lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
491
|
+
/**
|
|
492
|
+
* Whether the data should be loaded on demand during scroll.
|
|
493
|
+
* @group Props
|
|
494
|
+
*/
|
|
495
|
+
virtualScroll = input(undefined, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
496
|
+
/**
|
|
497
|
+
* Height of an item in the list for VirtualScrolling.
|
|
498
|
+
* @group Props
|
|
499
|
+
*/
|
|
500
|
+
virtualScrollItemSize = input(undefined, { ...(ngDevMode ? { debugName: "virtualScrollItemSize" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
501
|
+
/**
|
|
502
|
+
* Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
|
|
503
|
+
* @group Props
|
|
504
|
+
*/
|
|
505
|
+
virtualScrollOptions = input(/* @ts-ignore */
|
|
506
|
+
...(ngDevMode ? [undefined, { debugName: "virtualScrollOptions" }] : /* istanbul ignore next */ []));
|
|
507
|
+
/**
|
|
508
|
+
* Whether to use overlay API feature. The properties of overlay API can be used like an object in it.
|
|
509
|
+
* @group Props
|
|
510
|
+
*/
|
|
511
|
+
overlayOptions = input(/* @ts-ignore */
|
|
512
|
+
...(ngDevMode ? [undefined, { debugName: "overlayOptions" }] : /* istanbul ignore next */ []));
|
|
513
|
+
/**
|
|
514
|
+
* Defines a string that labels the filter input.
|
|
515
|
+
* @group Props
|
|
516
|
+
*/
|
|
517
|
+
ariaFilterLabel = input(/* @ts-ignore */
|
|
518
|
+
...(ngDevMode ? [undefined, { debugName: "ariaFilterLabel" }] : /* istanbul ignore next */ []));
|
|
519
|
+
/**
|
|
520
|
+
* Used to define a aria label attribute the current element.
|
|
521
|
+
* @group Props
|
|
522
|
+
*/
|
|
523
|
+
ariaLabel = input(/* @ts-ignore */
|
|
524
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
525
|
+
/**
|
|
526
|
+
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
527
|
+
* @group Props
|
|
528
|
+
*/
|
|
529
|
+
ariaLabelledBy = input(/* @ts-ignore */
|
|
530
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
531
|
+
/**
|
|
532
|
+
* Defines how the items are filtered.
|
|
533
|
+
* @group Props
|
|
534
|
+
*/
|
|
535
|
+
filterMatchMode = input('contains', /* @ts-ignore */
|
|
536
|
+
...(ngDevMode ? [{ debugName: "filterMatchMode" }] : /* istanbul ignore next */ []));
|
|
537
|
+
/**
|
|
538
|
+
* Advisory information to display in a tooltip on hover.
|
|
539
|
+
* @group Props
|
|
540
|
+
*/
|
|
541
|
+
tooltip = input('', /* @ts-ignore */
|
|
542
|
+
...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
543
|
+
/**
|
|
544
|
+
* Position of the tooltip.
|
|
545
|
+
* @group Props
|
|
546
|
+
*/
|
|
547
|
+
tooltipPosition = input('right', /* @ts-ignore */
|
|
548
|
+
...(ngDevMode ? [{ debugName: "tooltipPosition" }] : /* istanbul ignore next */ []));
|
|
549
|
+
/**
|
|
550
|
+
* Type of CSS position.
|
|
551
|
+
* @group Props
|
|
552
|
+
*/
|
|
553
|
+
tooltipPositionStyle = input('absolute', /* @ts-ignore */
|
|
554
|
+
...(ngDevMode ? [{ debugName: "tooltipPositionStyle" }] : /* istanbul ignore next */ []));
|
|
555
|
+
/**
|
|
556
|
+
* Style class of the tooltip.
|
|
557
|
+
* @group Props
|
|
558
|
+
*/
|
|
559
|
+
tooltipStyleClass = input(/* @ts-ignore */
|
|
560
|
+
...(ngDevMode ? [undefined, { debugName: "tooltipStyleClass" }] : /* istanbul ignore next */ []));
|
|
561
|
+
/**
|
|
562
|
+
* Fields used when filtering the options, defaults to optionLabel.
|
|
563
|
+
* @group Props
|
|
564
|
+
*/
|
|
565
|
+
focusOnHover = input(true, { ...(ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
566
|
+
/**
|
|
567
|
+
* Determines if the option will be selected on focus.
|
|
568
|
+
* @group Props
|
|
569
|
+
*/
|
|
570
|
+
selectOnFocus = input(false, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
571
|
+
/**
|
|
572
|
+
* When enabled, allows multiple items to be selected.
|
|
573
|
+
* @group Props
|
|
574
|
+
*/
|
|
575
|
+
multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
576
|
+
/**
|
|
577
|
+
* Whether to focus on the first visible or selected element when the overlay panel is shown.
|
|
578
|
+
* @group Props
|
|
579
|
+
*/
|
|
580
|
+
autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
581
|
+
/**
|
|
582
|
+
* Applies focus to the filter element when the overlay is shown.
|
|
583
|
+
* @group Props
|
|
584
|
+
*/
|
|
585
|
+
autofocusFilter = input(true, { ...(ngDevMode ? { debugName: "autofocusFilter" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
586
|
+
/**
|
|
587
|
+
* When specified, filter displays with this value.
|
|
588
|
+
* @group Props
|
|
589
|
+
*/
|
|
590
|
+
filterValue = input(/* @ts-ignore */
|
|
591
|
+
...(ngDevMode ? [undefined, { debugName: "filterValue" }] : /* istanbul ignore next */ []));
|
|
592
|
+
/**
|
|
593
|
+
* An array of objects to display as the available options.
|
|
594
|
+
* @group Props
|
|
595
|
+
*/
|
|
596
|
+
options = input(/* @ts-ignore */
|
|
597
|
+
...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
|
|
598
|
+
/**
|
|
599
|
+
* Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
|
|
600
|
+
* @defaultValue 'self'
|
|
601
|
+
* @group Props
|
|
602
|
+
*/
|
|
603
|
+
appendTo = input(undefined, /* @ts-ignore */
|
|
604
|
+
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
605
|
+
/**
|
|
606
|
+
* The motion options.
|
|
607
|
+
* @group Props
|
|
608
|
+
*/
|
|
609
|
+
motionOptions = input(undefined, /* @ts-ignore */
|
|
610
|
+
...(ngDevMode ? [{ debugName: "motionOptions" }] : /* istanbul ignore next */ []));
|
|
611
|
+
/**
|
|
612
|
+
* Callback to invoke when value of select changes.
|
|
613
|
+
* @param {SelectChangeEvent} event - custom change event.
|
|
614
|
+
* @group Emits
|
|
615
|
+
*/
|
|
616
|
+
onChange = output();
|
|
617
|
+
/**
|
|
618
|
+
* Callback to invoke when data is filtered.
|
|
619
|
+
* @param {SelectFilterEvent} event - custom filter event.
|
|
620
|
+
* @group Emits
|
|
621
|
+
*/
|
|
622
|
+
onFilter = output();
|
|
623
|
+
/**
|
|
624
|
+
* Callback to invoke when select gets focus.
|
|
625
|
+
* @param {Event} event - Browser event.
|
|
626
|
+
* @group Emits
|
|
627
|
+
*/
|
|
628
|
+
onFocus = output();
|
|
629
|
+
/**
|
|
630
|
+
* Callback to invoke when select loses focus.
|
|
631
|
+
* @param {Event} event - Browser event.
|
|
632
|
+
* @group Emits
|
|
633
|
+
*/
|
|
634
|
+
onBlur = output();
|
|
635
|
+
/**
|
|
636
|
+
* Callback to invoke when component is clicked.
|
|
637
|
+
* @param {MouseEvent} event - Mouse event.
|
|
638
|
+
* @group Emits
|
|
639
|
+
*/
|
|
640
|
+
onClick = output();
|
|
641
|
+
/**
|
|
642
|
+
* Callback to invoke when select overlay gets visible.
|
|
643
|
+
* @param {AnimationEvent} event - Animation event.
|
|
644
|
+
* @group Emits
|
|
645
|
+
*/
|
|
646
|
+
onShow = output();
|
|
647
|
+
/**
|
|
648
|
+
* Callback to invoke when select overlay gets hidden.
|
|
649
|
+
* @param {AnimationEvent} event - Animation event.
|
|
650
|
+
* @group Emits
|
|
651
|
+
*/
|
|
652
|
+
onHide = output();
|
|
653
|
+
/**
|
|
654
|
+
* Callback to invoke when select clears the value.
|
|
655
|
+
* @param {Event} event - Browser event.
|
|
656
|
+
* @group Emits
|
|
657
|
+
*/
|
|
658
|
+
onClear = output();
|
|
659
|
+
/**
|
|
660
|
+
* Callback to invoke in lazy mode to load new data.
|
|
661
|
+
* @param {SelectLazyLoadEvent} event - Lazy load event.
|
|
662
|
+
* @group Emits
|
|
663
|
+
*/
|
|
664
|
+
onLazyLoad = output();
|
|
665
|
+
_componentStyle = inject(SelectStyle);
|
|
666
|
+
filterViewChild = viewChild('filter', /* @ts-ignore */
|
|
667
|
+
...(ngDevMode ? [{ debugName: "filterViewChild" }] : /* istanbul ignore next */ []));
|
|
668
|
+
focusInputViewChild = viewChild('focusInput', /* @ts-ignore */
|
|
669
|
+
...(ngDevMode ? [{ debugName: "focusInputViewChild" }] : /* istanbul ignore next */ []));
|
|
670
|
+
editableInputViewChild = viewChild('editableInput', /* @ts-ignore */
|
|
671
|
+
...(ngDevMode ? [{ debugName: "editableInputViewChild" }] : /* istanbul ignore next */ []));
|
|
672
|
+
itemsViewChild = viewChild('items', /* @ts-ignore */
|
|
673
|
+
...(ngDevMode ? [{ debugName: "itemsViewChild" }] : /* istanbul ignore next */ []));
|
|
674
|
+
scroller = viewChild('scroller', /* @ts-ignore */
|
|
675
|
+
...(ngDevMode ? [{ debugName: "scroller" }] : /* istanbul ignore next */ []));
|
|
676
|
+
overlayViewChild = viewChild('overlay', /* @ts-ignore */
|
|
677
|
+
...(ngDevMode ? [{ debugName: "overlayViewChild" }] : /* istanbul ignore next */ []));
|
|
678
|
+
firstHiddenFocusableElementOnOverlay = viewChild('firstHiddenFocusableEl', /* @ts-ignore */
|
|
679
|
+
...(ngDevMode ? [{ debugName: "firstHiddenFocusableElementOnOverlay" }] : /* istanbul ignore next */ []));
|
|
680
|
+
lastHiddenFocusableElementOnOverlay = viewChild('lastHiddenFocusableEl', /* @ts-ignore */
|
|
681
|
+
...(ngDevMode ? [{ debugName: "lastHiddenFocusableElementOnOverlay" }] : /* istanbul ignore next */ []));
|
|
682
|
+
itemsWrapper;
|
|
683
|
+
$appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
|
|
684
|
+
...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
|
|
685
|
+
/**
|
|
686
|
+
* Custom item template.
|
|
687
|
+
* @group Templates
|
|
688
|
+
*/
|
|
689
|
+
itemTemplate = contentChild('item', { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
690
|
+
/**
|
|
691
|
+
* Custom group template.
|
|
692
|
+
* @group Templates
|
|
693
|
+
*/
|
|
694
|
+
groupTemplate = contentChild('group', { ...(ngDevMode ? { debugName: "groupTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
695
|
+
/**
|
|
696
|
+
* Custom loader template.
|
|
697
|
+
* @group Templates
|
|
698
|
+
*/
|
|
699
|
+
loaderTemplate = contentChild('loader', { ...(ngDevMode ? { debugName: "loaderTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
700
|
+
/**
|
|
701
|
+
* Custom selected item template.
|
|
702
|
+
* @group Templates
|
|
703
|
+
*/
|
|
704
|
+
selectedItemTemplate = contentChild('selectedItem', { ...(ngDevMode ? { debugName: "selectedItemTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
705
|
+
/**
|
|
706
|
+
* Custom header template.
|
|
707
|
+
* @param {SelectHeaderTemplateContext} context - header context.
|
|
708
|
+
* @group Templates
|
|
709
|
+
*/
|
|
710
|
+
headerTemplate = contentChild('header', { ...(ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
711
|
+
/**
|
|
712
|
+
* Custom filter template.
|
|
713
|
+
* @group Templates
|
|
714
|
+
*/
|
|
715
|
+
filterTemplate = contentChild('filter', { ...(ngDevMode ? { debugName: "filterTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
716
|
+
/**
|
|
717
|
+
* Custom footer template.
|
|
718
|
+
* @group Templates
|
|
719
|
+
*/
|
|
720
|
+
footerTemplate = contentChild('footer', { ...(ngDevMode ? { debugName: "footerTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
721
|
+
/**
|
|
722
|
+
* Custom empty filter template.
|
|
723
|
+
* @group Templates
|
|
724
|
+
*/
|
|
725
|
+
emptyFilterTemplate = contentChild('emptyfilter', { ...(ngDevMode ? { debugName: "emptyFilterTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
726
|
+
/**
|
|
727
|
+
* Custom empty template.
|
|
728
|
+
* @group Templates
|
|
729
|
+
*/
|
|
730
|
+
emptyTemplate = contentChild('empty', { ...(ngDevMode ? { debugName: "emptyTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
731
|
+
/**
|
|
732
|
+
* Custom dropdown icon template.
|
|
733
|
+
* @group Templates
|
|
734
|
+
*/
|
|
735
|
+
dropdownIconTemplate = contentChild('dropdownicon', { ...(ngDevMode ? { debugName: "dropdownIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
736
|
+
/**
|
|
737
|
+
* Custom loading icon template.
|
|
738
|
+
* @group Templates
|
|
739
|
+
*/
|
|
740
|
+
loadingIconTemplate = contentChild('loadingicon', { ...(ngDevMode ? { debugName: "loadingIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
741
|
+
/**
|
|
742
|
+
* Custom clear icon template.
|
|
743
|
+
* @group Templates
|
|
744
|
+
*/
|
|
745
|
+
clearIconTemplate = contentChild('clearicon', { ...(ngDevMode ? { debugName: "clearIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
746
|
+
/**
|
|
747
|
+
* Custom filter icon template.
|
|
748
|
+
* @group Templates
|
|
749
|
+
*/
|
|
750
|
+
filterIconTemplate = contentChild('filtericon', { ...(ngDevMode ? { debugName: "filterIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
751
|
+
/**
|
|
752
|
+
* Custom on icon template.
|
|
753
|
+
* @group Templates
|
|
754
|
+
*/
|
|
755
|
+
onIconTemplate = contentChild('onicon', { ...(ngDevMode ? { debugName: "onIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
756
|
+
/**
|
|
757
|
+
* Custom off icon template.
|
|
758
|
+
* @group Templates
|
|
759
|
+
*/
|
|
760
|
+
offIconTemplate = contentChild('officon', { ...(ngDevMode ? { debugName: "offIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
761
|
+
/**
|
|
762
|
+
* Custom cancel icon template.
|
|
763
|
+
* @group Templates
|
|
764
|
+
*/
|
|
765
|
+
cancelIconTemplate = contentChild('cancelicon', { ...(ngDevMode ? { debugName: "cancelIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
766
|
+
filterOptions;
|
|
767
|
+
_filterValue = signal(null, /* @ts-ignore */
|
|
768
|
+
...(ngDevMode ? [{ debugName: "_filterValue" }] : /* istanbul ignore next */ []));
|
|
769
|
+
_placeholder = signal(undefined, /* @ts-ignore */
|
|
770
|
+
...(ngDevMode ? [{ debugName: "_placeholder" }] : /* istanbul ignore next */ []));
|
|
771
|
+
_options = signal(null, /* @ts-ignore */
|
|
772
|
+
...(ngDevMode ? [{ debugName: "_options" }] : /* istanbul ignore next */ []));
|
|
773
|
+
value;
|
|
774
|
+
hover;
|
|
775
|
+
focused = signal(false, /* @ts-ignore */
|
|
776
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
777
|
+
overlayVisible = signal(false, /* @ts-ignore */
|
|
778
|
+
...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
|
|
779
|
+
optionsChanged;
|
|
780
|
+
panel;
|
|
781
|
+
dimensionsUpdated;
|
|
782
|
+
hoveredItem;
|
|
783
|
+
selectedOptionUpdated;
|
|
784
|
+
searchValue;
|
|
785
|
+
searchIndex;
|
|
786
|
+
searchTimeout;
|
|
787
|
+
previousSearchChar;
|
|
788
|
+
currentSearchChar;
|
|
789
|
+
preventModelTouched;
|
|
790
|
+
focusedOptionIndex = signal(-1, /* @ts-ignore */
|
|
791
|
+
...(ngDevMode ? [{ debugName: "focusedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
792
|
+
labelId;
|
|
793
|
+
listId;
|
|
794
|
+
clicked = signal(false, /* @ts-ignore */
|
|
795
|
+
...(ngDevMode ? [{ debugName: "clicked" }] : /* istanbul ignore next */ []));
|
|
796
|
+
emptyMessageLabel = computed(() => this.emptyMessage() || this.translate(TranslationKeys.EMPTY_MESSAGE), /* @ts-ignore */
|
|
797
|
+
...(ngDevMode ? [{ debugName: "emptyMessageLabel" }] : /* istanbul ignore next */ []));
|
|
798
|
+
emptyFilterMessageLabel = computed(() => this.emptyFilterMessage() || this.translate(TranslationKeys.EMPTY_FILTER_MESSAGE), /* @ts-ignore */
|
|
799
|
+
...(ngDevMode ? [{ debugName: "emptyFilterMessageLabel" }] : /* istanbul ignore next */ []));
|
|
800
|
+
isVisibleClearIcon = computed(() => {
|
|
801
|
+
if (!this.showClear() || this.$disabled())
|
|
802
|
+
return false;
|
|
803
|
+
const value = this.modelValue();
|
|
804
|
+
if (this.multiple()) {
|
|
805
|
+
return Array.isArray(value) && value.length > 0;
|
|
806
|
+
}
|
|
807
|
+
return value != null && this.hasSelectedOption();
|
|
808
|
+
}, /* @ts-ignore */
|
|
809
|
+
...(ngDevMode ? [{ debugName: "isVisibleClearIcon" }] : /* istanbul ignore next */ []));
|
|
810
|
+
get listLabel() {
|
|
811
|
+
return this.translate(TranslationKeys.ARIA, 'listLabel');
|
|
812
|
+
}
|
|
813
|
+
focusedOptionId = computed(() => (this.focusedOptionIndex() !== -1 ? `${this.$id()}_${this.focusedOptionIndex()}` : null), /* @ts-ignore */
|
|
814
|
+
...(ngDevMode ? [{ debugName: "focusedOptionId" }] : /* istanbul ignore next */ []));
|
|
815
|
+
visibleOptions = computed(() => {
|
|
816
|
+
const options = this.getAllVisibleAndNonVisibleOptions();
|
|
817
|
+
if (this._filterValue()) {
|
|
818
|
+
const _filterBy = this.filterBy() || this.optionLabel();
|
|
819
|
+
const filteredOptions = !_filterBy && !this.filterFields() && !this.optionValue()
|
|
820
|
+
? this._options()?.filter((option) => {
|
|
821
|
+
if (option.label) {
|
|
822
|
+
return option.label.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim()) !== -1;
|
|
823
|
+
}
|
|
824
|
+
return option.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim()) !== -1;
|
|
825
|
+
})
|
|
826
|
+
: this.filterService.filter(options, this.searchFields(), this._filterValue().trim(), this.filterMatchMode(), this.filterLocale());
|
|
827
|
+
if (this.group()) {
|
|
828
|
+
const optionGroups = this._options() || [];
|
|
829
|
+
const filtered = [];
|
|
830
|
+
optionGroups.forEach((group) => {
|
|
831
|
+
const groupChildren = this.getOptionGroupChildren(group);
|
|
832
|
+
const filteredItems = groupChildren.filter((item) => filteredOptions?.includes(item));
|
|
833
|
+
if (filteredItems.length > 0)
|
|
834
|
+
filtered.push({
|
|
835
|
+
...group,
|
|
836
|
+
[typeof this.optionGroupChildren() === 'string' ? this.optionGroupChildren() : 'items']: [...filteredItems]
|
|
837
|
+
});
|
|
838
|
+
});
|
|
839
|
+
return this.flatOptions(filtered);
|
|
840
|
+
}
|
|
841
|
+
return filteredOptions;
|
|
842
|
+
}
|
|
843
|
+
return options;
|
|
844
|
+
}, /* @ts-ignore */
|
|
845
|
+
...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
|
|
846
|
+
label = computed(() => {
|
|
847
|
+
if (this.multiple()) {
|
|
848
|
+
const currentValue = this.modelValue();
|
|
849
|
+
if (!Array.isArray(currentValue) || currentValue.length === 0) {
|
|
850
|
+
return this.placeholder() || 'p-emptylabel';
|
|
851
|
+
}
|
|
852
|
+
const options = this.getAllVisibleAndNonVisibleOptions();
|
|
853
|
+
const labels = currentValue
|
|
854
|
+
.map((val) => {
|
|
855
|
+
const opt = options.find((o) => !this.isOptionGroup(o) && equals(val, this.getOptionValue(o), this.equalityKey()));
|
|
856
|
+
return opt ? this.getOptionLabel(opt) : String(val);
|
|
857
|
+
})
|
|
858
|
+
.filter(Boolean);
|
|
859
|
+
return labels.join(', ');
|
|
860
|
+
}
|
|
861
|
+
// use getAllVisibleAndNonVisibleOptions verses just visible options
|
|
862
|
+
// this will find the selected option whether or not the user is currently filtering because the filtered (i.e. visible) options, are a subset of all the options
|
|
863
|
+
const options = this.getAllVisibleAndNonVisibleOptions();
|
|
864
|
+
// use isOptionEqualsModelValue for the use case where the dropdown is initalized with a disabled option
|
|
865
|
+
const selectedOptionIndex = options.findIndex((option) => {
|
|
866
|
+
const isEqual = this.isOptionValueEqualsModelValue(option);
|
|
867
|
+
return isEqual;
|
|
868
|
+
});
|
|
869
|
+
if (selectedOptionIndex !== -1) {
|
|
870
|
+
const selectedOption = options[selectedOptionIndex];
|
|
871
|
+
// Always show the label for selected options, even if disabled
|
|
872
|
+
return this.getOptionLabel(selectedOption);
|
|
873
|
+
}
|
|
874
|
+
return this.placeholder() || 'p-emptylabel';
|
|
875
|
+
}, /* @ts-ignore */
|
|
876
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
877
|
+
$ariaLabel = computed(() => {
|
|
878
|
+
return this.ariaLabel() || (this.label() === 'p-emptylabel' ? undefined : this.label());
|
|
879
|
+
}, /* @ts-ignore */
|
|
880
|
+
...(ngDevMode ? [{ debugName: "$ariaLabel" }] : /* istanbul ignore next */ []));
|
|
881
|
+
$ariaMultiselectable = computed(() => this.multiple() || undefined, /* @ts-ignore */
|
|
882
|
+
...(ngDevMode ? [{ debugName: "$ariaMultiselectable" }] : /* istanbul ignore next */ []));
|
|
883
|
+
$placeholder = computed(() => {
|
|
884
|
+
const modelVal = this.modelValue();
|
|
885
|
+
return modelVal === undefined || modelVal === null ? this.placeholder() || this._placeholder() : undefined;
|
|
886
|
+
}, /* @ts-ignore */
|
|
887
|
+
...(ngDevMode ? [{ debugName: "$placeholder" }] : /* istanbul ignore next */ []));
|
|
888
|
+
$required = computed(() => (this.required() ? '' : undefined), /* @ts-ignore */
|
|
889
|
+
...(ngDevMode ? [{ debugName: "$required" }] : /* istanbul ignore next */ []));
|
|
890
|
+
$readonly = computed(() => (this.readonly() ? '' : undefined), /* @ts-ignore */
|
|
891
|
+
...(ngDevMode ? [{ debugName: "$readonly" }] : /* istanbul ignore next */ []));
|
|
892
|
+
$disabledAttr = computed(() => (this.$disabled() ? '' : undefined), /* @ts-ignore */
|
|
893
|
+
...(ngDevMode ? [{ debugName: "$disabledAttr" }] : /* istanbul ignore next */ []));
|
|
894
|
+
$tabindex = computed(() => (!this.$disabled() ? this.tabindex() : -1), /* @ts-ignore */
|
|
895
|
+
...(ngDevMode ? [{ debugName: "$tabindex" }] : /* istanbul ignore next */ []));
|
|
896
|
+
filterInputValue = computed(() => this._filterValue() || '', /* @ts-ignore */
|
|
897
|
+
...(ngDevMode ? [{ debugName: "filterInputValue" }] : /* istanbul ignore next */ []));
|
|
898
|
+
get $ariaActivedescendant() {
|
|
899
|
+
return this.focused() ? this.focusedOptionId() : undefined;
|
|
900
|
+
}
|
|
901
|
+
get $ariaExpanded() {
|
|
902
|
+
return this.overlayVisible();
|
|
903
|
+
}
|
|
904
|
+
$ariaControls = computed(() => (this.overlayVisible() ? this.$id() + '_list' : null), /* @ts-ignore */
|
|
905
|
+
...(ngDevMode ? [{ debugName: "$ariaControls" }] : /* istanbul ignore next */ []));
|
|
906
|
+
showEmptyFilterMessage = computed(() => this._filterValue() && this.isEmpty(), /* @ts-ignore */
|
|
907
|
+
...(ngDevMode ? [{ debugName: "showEmptyFilterMessage" }] : /* istanbul ignore next */ []));
|
|
908
|
+
showEmptyMessage = computed(() => !this._filterValue() && this.isEmpty(), /* @ts-ignore */
|
|
909
|
+
...(ngDevMode ? [{ debugName: "showEmptyMessage" }] : /* istanbul ignore next */ []));
|
|
910
|
+
hasEmptyTemplate = computed(() => this.emptyFilterTemplate() || this.emptyTemplate(), /* @ts-ignore */
|
|
911
|
+
...(ngDevMode ? [{ debugName: "hasEmptyTemplate" }] : /* istanbul ignore next */ []));
|
|
912
|
+
$ariaOwns = computed(() => this.$id() + '_list', /* @ts-ignore */
|
|
913
|
+
...(ngDevMode ? [{ debugName: "$ariaOwns" }] : /* istanbul ignore next */ []));
|
|
914
|
+
get selectedItemContext() {
|
|
915
|
+
return { $implicit: this.selectedOption() };
|
|
916
|
+
}
|
|
917
|
+
get clearIconContext() {
|
|
918
|
+
return { class: this.cx('clearIcon') ?? '' };
|
|
919
|
+
}
|
|
920
|
+
get dropdownIconContext() {
|
|
921
|
+
return { class: this.cx('dropdownIcon') ?? '' };
|
|
922
|
+
}
|
|
923
|
+
get filterTemplateContext() {
|
|
924
|
+
return { options: this.filterOptions ?? {} };
|
|
925
|
+
}
|
|
926
|
+
get defaultBuildInItemsContext() {
|
|
927
|
+
return { $implicit: this.visibleOptions(), options: {} };
|
|
928
|
+
}
|
|
929
|
+
getBuildInItemsContext(items, scrollerOptions) {
|
|
930
|
+
return { $implicit: items, options: scrollerOptions };
|
|
931
|
+
}
|
|
932
|
+
getLoaderContext(scrollerOptions) {
|
|
933
|
+
return { options: scrollerOptions };
|
|
934
|
+
}
|
|
935
|
+
getItemSizeStyle(scrollerOptions) {
|
|
936
|
+
return { height: scrollerOptions.itemSize + 'px' };
|
|
937
|
+
}
|
|
938
|
+
getGroupContext(optionGroup) {
|
|
939
|
+
return { $implicit: optionGroup };
|
|
940
|
+
}
|
|
941
|
+
selectedOption = signal(null, /* @ts-ignore */
|
|
942
|
+
...(ngDevMode ? [{ debugName: "selectedOption" }] : /* istanbul ignore next */ []));
|
|
943
|
+
constructor() {
|
|
944
|
+
super();
|
|
945
|
+
effect(() => {
|
|
946
|
+
const modelValue = this.modelValue();
|
|
947
|
+
const visibleOptions = this.visibleOptions();
|
|
948
|
+
if (visibleOptions && isNotEmpty(visibleOptions)) {
|
|
949
|
+
const selectedOptionIndex = this.findSelectedOptionIndex();
|
|
950
|
+
if (selectedOptionIndex !== -1 || modelValue === undefined || (typeof modelValue === 'string' && modelValue.length === 0) || this.isModelValueNotSet() || this.editable()) {
|
|
951
|
+
this.selectedOption.set(visibleOptions[selectedOptionIndex]);
|
|
952
|
+
}
|
|
953
|
+
else {
|
|
954
|
+
// If no valid selected option found but we have a model value,
|
|
955
|
+
// try to find the option including disabled ones for template display
|
|
956
|
+
const disabledSelectedIndex = visibleOptions.findIndex((option) => this.isSelected(option));
|
|
957
|
+
if (disabledSelectedIndex !== -1) {
|
|
958
|
+
this.selectedOption.set(visibleOptions[disabledSelectedIndex]);
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
if (isEmpty(visibleOptions) && (modelValue === undefined || this.isModelValueNotSet()) && isNotEmpty(this.selectedOption())) {
|
|
963
|
+
this.selectedOption.set(null);
|
|
964
|
+
}
|
|
965
|
+
if (modelValue !== undefined && this.editable()) {
|
|
966
|
+
this.updateEditableLabel();
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
// Handle filterValue input changes
|
|
970
|
+
effect(() => {
|
|
971
|
+
const filterVal = this.filterValue();
|
|
972
|
+
if (filterVal !== undefined) {
|
|
973
|
+
this._filterValue.set(filterVal);
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
// Handle options input changes with deepEquals check
|
|
977
|
+
effect(() => {
|
|
978
|
+
const opts = this.options();
|
|
979
|
+
if (!deepEquals(opts, this._options())) {
|
|
980
|
+
this._options.set(opts ?? null);
|
|
981
|
+
this.optionsChanged = true;
|
|
982
|
+
}
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
isModelValueNotSet() {
|
|
986
|
+
return this.modelValue() === null && !this.isOptionValueEqualsModelValue(this.selectedOption());
|
|
987
|
+
}
|
|
988
|
+
getAllVisibleAndNonVisibleOptions() {
|
|
989
|
+
return this.group() ? this.flatOptions(this._options()) : this._options() || [];
|
|
990
|
+
}
|
|
991
|
+
onInit() {
|
|
992
|
+
this.autoUpdateModel();
|
|
993
|
+
if (this.filterBy()) {
|
|
994
|
+
this.filterOptions = {
|
|
995
|
+
filter: (value) => this.onFilterInputChange(value),
|
|
996
|
+
reset: () => this.resetFilter()
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
onAfterViewChecked() {
|
|
1001
|
+
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
1002
|
+
if (this.optionsChanged && this.overlayVisible()) {
|
|
1003
|
+
this.optionsChanged = false;
|
|
1004
|
+
setTimeout(() => {
|
|
1005
|
+
if (this.overlayViewChild()) {
|
|
1006
|
+
this.overlayViewChild()?.alignOverlay();
|
|
1007
|
+
}
|
|
1008
|
+
}, 1);
|
|
1009
|
+
}
|
|
1010
|
+
if (this.selectedOptionUpdated && this.itemsWrapper) {
|
|
1011
|
+
let selectedItem = findSingle(this.overlayViewChild()?.overlayViewChild()?.nativeElement, 'li[data-p-selected="true"]');
|
|
1012
|
+
if (selectedItem) {
|
|
1013
|
+
scrollInView(this.itemsWrapper, selectedItem);
|
|
1014
|
+
}
|
|
1015
|
+
this.selectedOptionUpdated = false;
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
flatOptions(options) {
|
|
1019
|
+
return (options || []).reduce((result, option, index) => {
|
|
1020
|
+
result.push({ optionGroup: option, group: true, index });
|
|
1021
|
+
const optionGroupChildren = this.getOptionGroupChildren(option);
|
|
1022
|
+
optionGroupChildren && optionGroupChildren.forEach((o) => result.push(o));
|
|
1023
|
+
return result;
|
|
1024
|
+
}, []);
|
|
1025
|
+
}
|
|
1026
|
+
autoUpdateModel() {
|
|
1027
|
+
if (this.selectOnFocus() && this.autoOptionFocus() && !this.hasSelectedOption()) {
|
|
1028
|
+
this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex());
|
|
1029
|
+
this.onOptionSelect(null, this.visibleOptions()[this.focusedOptionIndex()], false);
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
onOptionSelect(event, option, isHide = true, preventChange = false) {
|
|
1033
|
+
// Check if option is disabled before proceeding
|
|
1034
|
+
if (this.isOptionDisabled(option)) {
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
if (this.multiple()) {
|
|
1038
|
+
this.onOptionSelectMultiple(event, option, preventChange);
|
|
1039
|
+
return;
|
|
1040
|
+
}
|
|
1041
|
+
if (!this.isSelected(option)) {
|
|
1042
|
+
const value = this.getOptionValue(option);
|
|
1043
|
+
this.updateModel(value, event);
|
|
1044
|
+
this.focusedOptionIndex.set(this.findSelectedOptionIndex());
|
|
1045
|
+
preventChange === false && this.onChange.emit({ originalEvent: event, value: value });
|
|
1046
|
+
}
|
|
1047
|
+
if (isHide) {
|
|
1048
|
+
this.hide(true);
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
onOptionSelectMultiple(event, option, preventChange = false) {
|
|
1052
|
+
const value = this.getOptionValue(option);
|
|
1053
|
+
const currentValue = this.modelValue() ?? [];
|
|
1054
|
+
const newValue = this.isSelected(option) ? currentValue.filter((v) => !equals(v, value, this.equalityKey())) : [...currentValue, value];
|
|
1055
|
+
this.updateModel(newValue, event);
|
|
1056
|
+
preventChange === false && this.onChange.emit({ originalEvent: event, value: newValue });
|
|
1057
|
+
}
|
|
1058
|
+
onOptionMouseEnter(event, index) {
|
|
1059
|
+
if (this.focusOnHover()) {
|
|
1060
|
+
this.changeFocusedOptionIndex(event, index);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
updateModel(value, event) {
|
|
1064
|
+
this.value = value;
|
|
1065
|
+
this.onModelChange(value);
|
|
1066
|
+
this.writeModelValue(value);
|
|
1067
|
+
this.selectedOptionUpdated = true;
|
|
1068
|
+
}
|
|
1069
|
+
allowModelChange() {
|
|
1070
|
+
return !!this.modelValue() && !this.placeholder() && (this.modelValue() === undefined || this.modelValue() === null) && !this.editable() && this._options() && this._options().length;
|
|
1071
|
+
}
|
|
1072
|
+
isSelected(option) {
|
|
1073
|
+
if (this.multiple()) {
|
|
1074
|
+
const currentValue = this.modelValue();
|
|
1075
|
+
if (!Array.isArray(currentValue))
|
|
1076
|
+
return false;
|
|
1077
|
+
const optionValue = this.getOptionValue(option);
|
|
1078
|
+
return currentValue.some((v) => equals(v, optionValue, this.equalityKey()));
|
|
1079
|
+
}
|
|
1080
|
+
return this.isOptionValueEqualsModelValue(option);
|
|
1081
|
+
}
|
|
1082
|
+
isOptionValueEqualsModelValue(option) {
|
|
1083
|
+
// Don't check isValidOption here since we need to match disabled options too
|
|
1084
|
+
return option !== undefined && option !== null && !this.isOptionGroup(option) && equals(this.modelValue(), this.getOptionValue(option), this.equalityKey());
|
|
1085
|
+
}
|
|
1086
|
+
onAfterViewInit() {
|
|
1087
|
+
if (this.editable()) {
|
|
1088
|
+
this.updateEditableLabel();
|
|
1089
|
+
}
|
|
1090
|
+
this.updatePlaceHolderForFloatingLabel();
|
|
1091
|
+
}
|
|
1092
|
+
updatePlaceHolderForFloatingLabel() {
|
|
1093
|
+
const parentElement = this.el.nativeElement.parentElement;
|
|
1094
|
+
const isInFloatingLabel = parentElement?.classList.contains('p-float-label');
|
|
1095
|
+
if (parentElement && isInFloatingLabel && !this.selectedOption()) {
|
|
1096
|
+
const label = parentElement.querySelector('label');
|
|
1097
|
+
if (label) {
|
|
1098
|
+
this._placeholder.set(label.textContent);
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
updateEditableLabel() {
|
|
1103
|
+
if (this.editableInputViewChild()) {
|
|
1104
|
+
this.editableInputViewChild().nativeElement.value = this.getOptionLabel(this.selectedOption()) || this.modelValue() || '';
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
clearEditableLabel() {
|
|
1108
|
+
if (this.editableInputViewChild()) {
|
|
1109
|
+
this.editableInputViewChild().nativeElement.value = '';
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
getOptionIndex(index, scrollerOptions) {
|
|
1113
|
+
return this.virtualScrollerDisabled() ? index : scrollerOptions && scrollerOptions.getItemOptions(index)['index'];
|
|
1114
|
+
}
|
|
1115
|
+
getOptionLabel(option) {
|
|
1116
|
+
return this.optionLabel() !== undefined && this.optionLabel() !== null ? resolveFieldData(option, this.optionLabel()) : option && option.label !== undefined ? option.label : option;
|
|
1117
|
+
}
|
|
1118
|
+
getOptionValue(option) {
|
|
1119
|
+
return this.optionValue() && this.optionValue() !== null ? resolveFieldData(option, this.optionValue()) : !this.optionLabel() && option && option.value !== undefined ? option.value : option;
|
|
1120
|
+
}
|
|
1121
|
+
getPTItemOptions(option, itemOptions, index, key) {
|
|
1122
|
+
return this.ptm(key, {
|
|
1123
|
+
context: {
|
|
1124
|
+
option,
|
|
1125
|
+
index,
|
|
1126
|
+
selected: this.isSelected(option),
|
|
1127
|
+
focused: this.focusedOptionIndex() === this.getOptionIndex(index, itemOptions),
|
|
1128
|
+
disabled: this.isOptionDisabled(option)
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
isSelectedOptionEmpty() {
|
|
1133
|
+
if (this.multiple()) {
|
|
1134
|
+
const currentValue = this.modelValue();
|
|
1135
|
+
return !Array.isArray(currentValue) || currentValue.length === 0;
|
|
1136
|
+
}
|
|
1137
|
+
return isEmpty(this.selectedOption());
|
|
1138
|
+
}
|
|
1139
|
+
isOptionDisabled(option) {
|
|
1140
|
+
return this.optionDisabled() ? resolveFieldData(option, this.optionDisabled()) : option && option.disabled !== undefined ? option.disabled : false;
|
|
1141
|
+
}
|
|
1142
|
+
getOptionGroupLabel(optionGroup) {
|
|
1143
|
+
return this.optionGroupLabel() !== undefined && this.optionGroupLabel() !== null ? resolveFieldData(optionGroup, this.optionGroupLabel()) : optionGroup && optionGroup.label !== undefined ? optionGroup.label : optionGroup;
|
|
1144
|
+
}
|
|
1145
|
+
getOptionGroupChildren(optionGroup) {
|
|
1146
|
+
return this.optionGroupChildren() !== undefined && this.optionGroupChildren() !== null ? resolveFieldData(optionGroup, this.optionGroupChildren()) : optionGroup.items;
|
|
1147
|
+
}
|
|
1148
|
+
getAriaPosInset(index) {
|
|
1149
|
+
return ((this.optionGroupLabel()
|
|
1150
|
+
? index -
|
|
1151
|
+
this.visibleOptions()
|
|
1152
|
+
.slice(0, index)
|
|
1153
|
+
.filter((option) => this.isOptionGroup(option)).length
|
|
1154
|
+
: index) + 1);
|
|
1155
|
+
}
|
|
1156
|
+
get ariaSetSize() {
|
|
1157
|
+
return this.visibleOptions().filter((option) => !this.isOptionGroup(option)).length;
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* Callback to invoke on filter reset.
|
|
1161
|
+
* @group Method
|
|
1162
|
+
*/
|
|
1163
|
+
resetFilter() {
|
|
1164
|
+
this._filterValue.set(null);
|
|
1165
|
+
if (this.filterViewChild() && this.filterViewChild().nativeElement) {
|
|
1166
|
+
this.filterViewChild().nativeElement.value = '';
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
onContainerClick(event) {
|
|
1170
|
+
if (this.$disabled() || this.readonly() || this.loading()) {
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
if (event.target.tagName === 'INPUT' || event.target.getAttribute('data-pc-section') === 'clearicon' || event.target.closest('[data-pc-section="clearicon"]')) {
|
|
1174
|
+
return;
|
|
1175
|
+
}
|
|
1176
|
+
else if (!this.overlayViewChild() || !this.overlayViewChild().el.nativeElement.contains(event.target)) {
|
|
1177
|
+
this.overlayVisible() ? this.hide(true) : this.show(true);
|
|
1178
|
+
}
|
|
1179
|
+
this.focusInputViewChild()?.nativeElement.focus({ preventScroll: true });
|
|
1180
|
+
this.onClick.emit(event);
|
|
1181
|
+
this.clicked.set(true);
|
|
1182
|
+
}
|
|
1183
|
+
isEmpty() {
|
|
1184
|
+
return !this._options() || (this.visibleOptions() && this.visibleOptions().length === 0);
|
|
1185
|
+
}
|
|
1186
|
+
onEditableInput(event) {
|
|
1187
|
+
const value = event.target.value;
|
|
1188
|
+
this.searchValue = '';
|
|
1189
|
+
const matched = this.searchOptions(event, value);
|
|
1190
|
+
!matched && this.focusedOptionIndex.set(-1);
|
|
1191
|
+
this.onModelChange(value);
|
|
1192
|
+
this.updateModel(value || null, event);
|
|
1193
|
+
setTimeout(() => {
|
|
1194
|
+
this.onChange.emit({ originalEvent: event, value: value });
|
|
1195
|
+
}, 1);
|
|
1196
|
+
!this.overlayVisible() && isNotEmpty(value) && this.show();
|
|
1197
|
+
}
|
|
1198
|
+
/**
|
|
1199
|
+
* Displays the panel.
|
|
1200
|
+
* @group Method
|
|
1201
|
+
*/
|
|
1202
|
+
show(isFocus) {
|
|
1203
|
+
this.overlayVisible.set(true);
|
|
1204
|
+
this.focusedOptionIndex.set(this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : this.editable() ? -1 : this.findSelectedOptionIndex());
|
|
1205
|
+
if (isFocus) {
|
|
1206
|
+
focus(this.focusInputViewChild()?.nativeElement);
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
onOverlayBeforeEnter(event) {
|
|
1210
|
+
this.itemsWrapper = findSingle(this.overlayViewChild()?.overlayViewChild()?.nativeElement, this.virtualScroll() ? '[data-pc-name="virtualscroller"]' : '[data-pc-section="listcontainer"]');
|
|
1211
|
+
this.virtualScroll() && this.scroller()?.setContentEl(this.itemsViewChild()?.nativeElement);
|
|
1212
|
+
if (this._options() && this._options().length) {
|
|
1213
|
+
if (this.virtualScroll()) {
|
|
1214
|
+
const selectedIndex = this.modelValue() ? this.focusedOptionIndex() : -1;
|
|
1215
|
+
if (selectedIndex !== -1) {
|
|
1216
|
+
setTimeout(() => {
|
|
1217
|
+
this.scroller()?.scrollToIndex(selectedIndex);
|
|
1218
|
+
}, 10);
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
else {
|
|
1222
|
+
let selectedListItem = findSingle(this.itemsWrapper, '[data-p-selected="true"]');
|
|
1223
|
+
if (selectedListItem) {
|
|
1224
|
+
selectedListItem.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
if (this.filterViewChild() && this.filterViewChild().nativeElement) {
|
|
1229
|
+
this.preventModelTouched = true;
|
|
1230
|
+
if (this.autofocusFilter() && !this.editable()) {
|
|
1231
|
+
this.filterViewChild().nativeElement.focus();
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
this.onShow.emit(event);
|
|
1235
|
+
}
|
|
1236
|
+
onOverlayAfterLeave(event) {
|
|
1237
|
+
this.itemsWrapper = null;
|
|
1238
|
+
this.onModelTouched();
|
|
1239
|
+
this.onHide.emit(event);
|
|
1240
|
+
}
|
|
1241
|
+
/**
|
|
1242
|
+
* Hides the panel.
|
|
1243
|
+
* @group Method
|
|
1244
|
+
*/
|
|
1245
|
+
hide(isFocus) {
|
|
1246
|
+
this.overlayVisible.set(false);
|
|
1247
|
+
this.focusedOptionIndex.set(-1);
|
|
1248
|
+
this.clicked.set(false);
|
|
1249
|
+
this.searchValue = '';
|
|
1250
|
+
if (this.overlayOptions()?.mode === 'modal') {
|
|
1251
|
+
unblockBodyScroll();
|
|
1252
|
+
}
|
|
1253
|
+
if (this.filter() && this.resetFilterOnHide()) {
|
|
1254
|
+
this.resetFilter();
|
|
1255
|
+
}
|
|
1256
|
+
if (isFocus) {
|
|
1257
|
+
if (this.focusInputViewChild()) {
|
|
1258
|
+
focus(this.focusInputViewChild()?.nativeElement);
|
|
1259
|
+
}
|
|
1260
|
+
if (this.editable() && this.editableInputViewChild()) {
|
|
1261
|
+
focus(this.editableInputViewChild()?.nativeElement);
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
onInputFocus(event) {
|
|
1266
|
+
if (this.$disabled()) {
|
|
1267
|
+
// For ScreenReaders
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
this.focused.set(true);
|
|
1271
|
+
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.overlayVisible() && this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : -1;
|
|
1272
|
+
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
1273
|
+
this.overlayVisible() && this.scrollInView(this.focusedOptionIndex());
|
|
1274
|
+
this.onFocus.emit(event);
|
|
1275
|
+
}
|
|
1276
|
+
onInputBlur(event) {
|
|
1277
|
+
this.focused.set(false);
|
|
1278
|
+
this.onBlur.emit(event);
|
|
1279
|
+
if (!this.preventModelTouched && !this.overlayVisible()) {
|
|
1280
|
+
this.onModelTouched();
|
|
1281
|
+
}
|
|
1282
|
+
this.preventModelTouched = false;
|
|
1283
|
+
}
|
|
1284
|
+
onKeyDown(event, search = false) {
|
|
1285
|
+
if (this.$disabled() || this.readonly() || this.loading()) {
|
|
1286
|
+
return;
|
|
1287
|
+
}
|
|
1288
|
+
switch (event.code) {
|
|
1289
|
+
//down
|
|
1290
|
+
case 'ArrowDown':
|
|
1291
|
+
this.onArrowDownKey(event);
|
|
1292
|
+
break;
|
|
1293
|
+
//up
|
|
1294
|
+
case 'ArrowUp':
|
|
1295
|
+
this.onArrowUpKey(event, this.editable());
|
|
1296
|
+
break;
|
|
1297
|
+
case 'ArrowLeft':
|
|
1298
|
+
case 'ArrowRight':
|
|
1299
|
+
this.onArrowLeftKey(event, this.editable());
|
|
1300
|
+
break;
|
|
1301
|
+
case 'Delete':
|
|
1302
|
+
this.onDeleteKey(event);
|
|
1303
|
+
break;
|
|
1304
|
+
case 'Home':
|
|
1305
|
+
this.onHomeKey(event, this.editable());
|
|
1306
|
+
break;
|
|
1307
|
+
case 'End':
|
|
1308
|
+
this.onEndKey(event, this.editable());
|
|
1309
|
+
break;
|
|
1310
|
+
case 'PageDown':
|
|
1311
|
+
this.onPageDownKey(event);
|
|
1312
|
+
break;
|
|
1313
|
+
case 'PageUp':
|
|
1314
|
+
this.onPageUpKey(event);
|
|
1315
|
+
break;
|
|
1316
|
+
//space
|
|
1317
|
+
case 'Space':
|
|
1318
|
+
this.onSpaceKey(event, search);
|
|
1319
|
+
break;
|
|
1320
|
+
//enter
|
|
1321
|
+
case 'Enter':
|
|
1322
|
+
case 'NumpadEnter':
|
|
1323
|
+
this.onEnterKey(event);
|
|
1324
|
+
break;
|
|
1325
|
+
//escape and tab
|
|
1326
|
+
case 'Escape':
|
|
1327
|
+
this.onEscapeKey(event);
|
|
1328
|
+
break;
|
|
1329
|
+
case 'Tab':
|
|
1330
|
+
this.onTabKey(event);
|
|
1331
|
+
break;
|
|
1332
|
+
case 'Backspace':
|
|
1333
|
+
this.onBackspaceKey(event, this.editable());
|
|
1334
|
+
break;
|
|
1335
|
+
case 'ShiftLeft':
|
|
1336
|
+
case 'ShiftRight':
|
|
1337
|
+
//NOOP
|
|
1338
|
+
break;
|
|
1339
|
+
default:
|
|
1340
|
+
if (!event.metaKey && isPrintableCharacter(event.key)) {
|
|
1341
|
+
!this.overlayVisible() && this.show();
|
|
1342
|
+
!this.editable() && this.searchOptions(event, event.key);
|
|
1343
|
+
}
|
|
1344
|
+
break;
|
|
1345
|
+
}
|
|
1346
|
+
this.clicked.set(false);
|
|
1347
|
+
}
|
|
1348
|
+
onFilterKeyDown(event) {
|
|
1349
|
+
switch (event.code) {
|
|
1350
|
+
case 'ArrowDown':
|
|
1351
|
+
this.onArrowDownKey(event);
|
|
1352
|
+
break;
|
|
1353
|
+
case 'ArrowUp':
|
|
1354
|
+
this.onArrowUpKey(event, true);
|
|
1355
|
+
break;
|
|
1356
|
+
case 'ArrowLeft':
|
|
1357
|
+
case 'ArrowRight':
|
|
1358
|
+
this.onArrowLeftKey(event, true);
|
|
1359
|
+
break;
|
|
1360
|
+
case 'Home':
|
|
1361
|
+
this.onHomeKey(event, true);
|
|
1362
|
+
break;
|
|
1363
|
+
case 'End':
|
|
1364
|
+
this.onEndKey(event, true);
|
|
1365
|
+
break;
|
|
1366
|
+
case 'Enter':
|
|
1367
|
+
case 'NumpadEnter':
|
|
1368
|
+
this.onEnterKey(event, true);
|
|
1369
|
+
break;
|
|
1370
|
+
case 'Escape':
|
|
1371
|
+
this.onEscapeKey(event);
|
|
1372
|
+
break;
|
|
1373
|
+
case 'Tab':
|
|
1374
|
+
this.onTabKey(event, true);
|
|
1375
|
+
break;
|
|
1376
|
+
default:
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
onFilterBlur(event) {
|
|
1381
|
+
this.focusedOptionIndex.set(-1);
|
|
1382
|
+
}
|
|
1383
|
+
onArrowDownKey(event) {
|
|
1384
|
+
if (!this.overlayVisible()) {
|
|
1385
|
+
this.show();
|
|
1386
|
+
this.editable() && this.changeFocusedOptionIndex(event, this.findSelectedOptionIndex());
|
|
1387
|
+
}
|
|
1388
|
+
else {
|
|
1389
|
+
const optionIndex = this.focusedOptionIndex() !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex()) : this.clicked() ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex();
|
|
1390
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
1391
|
+
}
|
|
1392
|
+
// const optionIndex = this.focusedOptionIndex() !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex()) : this.findFirstFocusedOptionIndex();
|
|
1393
|
+
// this.changeFocusedOptionIndex(event, optionIndex);
|
|
1394
|
+
// !this.overlayVisible() && this.show();
|
|
1395
|
+
event.preventDefault();
|
|
1396
|
+
event.stopPropagation();
|
|
1397
|
+
}
|
|
1398
|
+
changeFocusedOptionIndex(event, index) {
|
|
1399
|
+
if (this.focusedOptionIndex() !== index) {
|
|
1400
|
+
this.focusedOptionIndex.set(index);
|
|
1401
|
+
this.scrollInView();
|
|
1402
|
+
if (this.selectOnFocus() && !this.multiple()) {
|
|
1403
|
+
const option = this.visibleOptions()[index];
|
|
1404
|
+
this.onOptionSelect(event, option, false);
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
virtualScrollerDisabled = computed(() => !this.virtualScroll(), /* @ts-ignore */
|
|
1409
|
+
...(ngDevMode ? [{ debugName: "virtualScrollerDisabled" }] : /* istanbul ignore next */ []));
|
|
1410
|
+
scrollInView(index = -1) {
|
|
1411
|
+
const id = index !== -1 ? `${this.$id()}_${index}` : this.focusedOptionId();
|
|
1412
|
+
if (this.itemsViewChild() && this.itemsViewChild().nativeElement) {
|
|
1413
|
+
const element = findSingle(this.itemsViewChild().nativeElement, `li[id="${id}"]`);
|
|
1414
|
+
if (element) {
|
|
1415
|
+
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
1416
|
+
}
|
|
1417
|
+
else if (!this.virtualScrollerDisabled()) {
|
|
1418
|
+
setTimeout(() => {
|
|
1419
|
+
this.virtualScroll() && this.scroller()?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
|
|
1420
|
+
}, 0);
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
hasSelectedOption() {
|
|
1425
|
+
return this.modelValue() !== undefined;
|
|
1426
|
+
}
|
|
1427
|
+
isValidSelectedOption(option) {
|
|
1428
|
+
return this.isValidOption(option) && this.isSelected(option);
|
|
1429
|
+
}
|
|
1430
|
+
equalityKey() {
|
|
1431
|
+
return this.optionValue() ? undefined : this.dataKey();
|
|
1432
|
+
}
|
|
1433
|
+
findFirstFocusedOptionIndex() {
|
|
1434
|
+
const selectedIndex = this.findSelectedOptionIndex();
|
|
1435
|
+
return selectedIndex < 0 ? this.findFirstOptionIndex() : selectedIndex;
|
|
1436
|
+
}
|
|
1437
|
+
findFirstOptionIndex() {
|
|
1438
|
+
return this.visibleOptions().findIndex((option) => this.isValidOption(option));
|
|
1439
|
+
}
|
|
1440
|
+
findSelectedOptionIndex() {
|
|
1441
|
+
return this.hasSelectedOption() ? this.visibleOptions().findIndex((option) => this.isValidSelectedOption(option)) : -1;
|
|
1442
|
+
}
|
|
1443
|
+
findNextOptionIndex(index) {
|
|
1444
|
+
const matchedOptionIndex = index < this.visibleOptions().length - 1
|
|
1445
|
+
? this.visibleOptions()
|
|
1446
|
+
.slice(index + 1)
|
|
1447
|
+
.findIndex((option) => this.isValidOption(option))
|
|
1448
|
+
: -1;
|
|
1449
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex + index + 1 : index;
|
|
1450
|
+
}
|
|
1451
|
+
findPrevOptionIndex(index) {
|
|
1452
|
+
const matchedOptionIndex = index > 0 ? findLastIndex(this.visibleOptions().slice(0, index), (option) => this.isValidOption(option)) : -1;
|
|
1453
|
+
return matchedOptionIndex > -1 ? matchedOptionIndex : index;
|
|
1454
|
+
}
|
|
1455
|
+
findLastOptionIndex() {
|
|
1456
|
+
return findLastIndex(this.visibleOptions(), (option) => this.isValidOption(option));
|
|
1457
|
+
}
|
|
1458
|
+
findLastFocusedOptionIndex() {
|
|
1459
|
+
const selectedIndex = this.findSelectedOptionIndex();
|
|
1460
|
+
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
1461
|
+
}
|
|
1462
|
+
isValidOption(option) {
|
|
1463
|
+
return option !== undefined && option !== null && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
|
1464
|
+
}
|
|
1465
|
+
isOptionGroup(option) {
|
|
1466
|
+
return this.optionGroupLabel() !== undefined && this.optionGroupLabel() !== null && option.optionGroup !== undefined && option.optionGroup !== null && option.group;
|
|
1467
|
+
}
|
|
1468
|
+
isOptionFocused(index, scrollerOptions) {
|
|
1469
|
+
return this.focusedOptionIndex() === this.getOptionIndex(index, scrollerOptions);
|
|
1470
|
+
}
|
|
1471
|
+
trackOption(option, index) {
|
|
1472
|
+
if (this.isOptionGroup(option)) {
|
|
1473
|
+
return `group_${option.index}`;
|
|
1474
|
+
}
|
|
1475
|
+
const dataKey = this.dataKey();
|
|
1476
|
+
if (dataKey) {
|
|
1477
|
+
return resolveFieldData(option, dataKey);
|
|
1478
|
+
}
|
|
1479
|
+
return this.getOptionValue(option);
|
|
1480
|
+
}
|
|
1481
|
+
onArrowUpKey(event, pressedInInputText = false) {
|
|
1482
|
+
if (event.altKey && !pressedInInputText) {
|
|
1483
|
+
if (this.focusedOptionIndex() !== -1) {
|
|
1484
|
+
const option = this.visibleOptions()[this.focusedOptionIndex()];
|
|
1485
|
+
this.onOptionSelect(event, option);
|
|
1486
|
+
}
|
|
1487
|
+
!this.multiple() && this.overlayVisible() && this.hide();
|
|
1488
|
+
}
|
|
1489
|
+
else {
|
|
1490
|
+
const optionIndex = this.focusedOptionIndex() !== -1 ? this.findPrevOptionIndex(this.focusedOptionIndex()) : this.clicked() ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();
|
|
1491
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
1492
|
+
!this.overlayVisible() && this.show();
|
|
1493
|
+
}
|
|
1494
|
+
event.preventDefault();
|
|
1495
|
+
event.stopPropagation();
|
|
1496
|
+
}
|
|
1497
|
+
onArrowLeftKey(event, pressedInInputText = false) {
|
|
1498
|
+
pressedInInputText && this.focusedOptionIndex.set(-1);
|
|
1499
|
+
}
|
|
1500
|
+
onDeleteKey(event) {
|
|
1501
|
+
if (this.showClear()) {
|
|
1502
|
+
this.clear(event);
|
|
1503
|
+
event.preventDefault();
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
onHomeKey(event, pressedInInputText = false) {
|
|
1507
|
+
if (pressedInInputText && event.currentTarget && event.currentTarget.setSelectionRange) {
|
|
1508
|
+
const target = event.currentTarget;
|
|
1509
|
+
if (event.shiftKey) {
|
|
1510
|
+
target.setSelectionRange(0, target.value.length);
|
|
1511
|
+
}
|
|
1512
|
+
else {
|
|
1513
|
+
target.setSelectionRange(0, 0);
|
|
1514
|
+
this.focusedOptionIndex.set(-1);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
else {
|
|
1518
|
+
this.changeFocusedOptionIndex(event, this.findFirstOptionIndex());
|
|
1519
|
+
!this.overlayVisible() && this.show();
|
|
1520
|
+
}
|
|
1521
|
+
event.preventDefault();
|
|
1522
|
+
}
|
|
1523
|
+
onEndKey(event, pressedInInputText = false) {
|
|
1524
|
+
if (pressedInInputText && event.currentTarget && event.currentTarget.setSelectionRange) {
|
|
1525
|
+
const target = event.currentTarget;
|
|
1526
|
+
if (event.shiftKey) {
|
|
1527
|
+
target.setSelectionRange(0, target.value.length);
|
|
1528
|
+
}
|
|
1529
|
+
else {
|
|
1530
|
+
const len = target.value.length;
|
|
1531
|
+
target.setSelectionRange(len, len);
|
|
1532
|
+
this.focusedOptionIndex.set(-1);
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
else {
|
|
1536
|
+
this.changeFocusedOptionIndex(event, this.findLastOptionIndex());
|
|
1537
|
+
!this.overlayVisible() && this.show();
|
|
1538
|
+
}
|
|
1539
|
+
event.preventDefault();
|
|
1540
|
+
}
|
|
1541
|
+
onPageDownKey(event) {
|
|
1542
|
+
this.scrollInView(this.visibleOptions().length - 1);
|
|
1543
|
+
event.preventDefault();
|
|
1544
|
+
}
|
|
1545
|
+
onPageUpKey(event) {
|
|
1546
|
+
this.scrollInView(0);
|
|
1547
|
+
event.preventDefault();
|
|
1548
|
+
}
|
|
1549
|
+
onSpaceKey(event, pressedInInputText = false) {
|
|
1550
|
+
!this.editable() && !pressedInInputText && this.onEnterKey(event);
|
|
1551
|
+
}
|
|
1552
|
+
onEnterKey(event, pressedInInput = false) {
|
|
1553
|
+
if (!this.overlayVisible()) {
|
|
1554
|
+
this.focusedOptionIndex.set(-1);
|
|
1555
|
+
this.onArrowDownKey(event);
|
|
1556
|
+
}
|
|
1557
|
+
else {
|
|
1558
|
+
if (this.focusedOptionIndex() !== -1) {
|
|
1559
|
+
const option = this.visibleOptions()[this.focusedOptionIndex()];
|
|
1560
|
+
this.onOptionSelect(event, option);
|
|
1561
|
+
}
|
|
1562
|
+
!pressedInInput && !this.multiple() && this.hide();
|
|
1563
|
+
}
|
|
1564
|
+
event.preventDefault();
|
|
1565
|
+
}
|
|
1566
|
+
onEscapeKey(event) {
|
|
1567
|
+
if (this.overlayVisible()) {
|
|
1568
|
+
this.hide(true);
|
|
1569
|
+
event.preventDefault();
|
|
1570
|
+
event.stopPropagation();
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
onTabKey(event, pressedInInputText = false) {
|
|
1574
|
+
if (!pressedInInputText) {
|
|
1575
|
+
if (this.overlayVisible() && this.hasFocusableElements()) {
|
|
1576
|
+
focus(event.shiftKey ? this.lastHiddenFocusableElementOnOverlay()?.nativeElement : this.firstHiddenFocusableElementOnOverlay()?.nativeElement);
|
|
1577
|
+
event.preventDefault();
|
|
1578
|
+
}
|
|
1579
|
+
else {
|
|
1580
|
+
if (this.focusedOptionIndex() !== -1 && this.overlayVisible()) {
|
|
1581
|
+
const option = this.visibleOptions()[this.focusedOptionIndex()];
|
|
1582
|
+
this.onOptionSelect(event, option);
|
|
1583
|
+
}
|
|
1584
|
+
this.overlayVisible() && this.hide(this.filter());
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
event.stopPropagation();
|
|
1588
|
+
}
|
|
1589
|
+
onFirstHiddenFocus(event) {
|
|
1590
|
+
const focusableEl = event.relatedTarget === this.focusInputViewChild()?.nativeElement ? getFirstFocusableElement(this.overlayViewChild()?.el?.nativeElement, ':not([data-p-hidden-focusable="true"])') : this.focusInputViewChild()?.nativeElement;
|
|
1591
|
+
focus(focusableEl);
|
|
1592
|
+
}
|
|
1593
|
+
onLastHiddenFocus(event) {
|
|
1594
|
+
const focusableEl = event.relatedTarget === this.focusInputViewChild()?.nativeElement ? getLastFocusableElement(this.overlayViewChild()?.overlayViewChild()?.nativeElement, ':not([data-p-hidden-focusable="true"])') : this.focusInputViewChild()?.nativeElement;
|
|
1595
|
+
focus(focusableEl);
|
|
1596
|
+
}
|
|
1597
|
+
hasFocusableElements() {
|
|
1598
|
+
return getFocusableElements(this.overlayViewChild()?.overlayViewChild()?.nativeElement, ':not([data-p-hidden-focusable="true"])').length > 0;
|
|
1599
|
+
}
|
|
1600
|
+
onBackspaceKey(event, pressedInInputText = false) {
|
|
1601
|
+
if (pressedInInputText) {
|
|
1602
|
+
!this.overlayVisible() && this.show();
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
searchFields() {
|
|
1606
|
+
return this.filterBy()?.split(',') || this.filterFields() || [this.optionLabel()];
|
|
1607
|
+
}
|
|
1608
|
+
searchOptions(event, char) {
|
|
1609
|
+
this.searchValue = (this.searchValue || '') + char;
|
|
1610
|
+
let optionIndex = -1;
|
|
1611
|
+
let matched = false;
|
|
1612
|
+
optionIndex = this.visibleOptions().findIndex((option) => this.isOptionMatched(option));
|
|
1613
|
+
if (optionIndex !== -1) {
|
|
1614
|
+
matched = true;
|
|
1615
|
+
}
|
|
1616
|
+
if (optionIndex === -1 && this.focusedOptionIndex() === -1) {
|
|
1617
|
+
optionIndex = this.findFirstFocusedOptionIndex();
|
|
1618
|
+
}
|
|
1619
|
+
if (optionIndex !== -1) {
|
|
1620
|
+
setTimeout(() => {
|
|
1621
|
+
this.changeFocusedOptionIndex(event, optionIndex);
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
if (this.searchTimeout) {
|
|
1625
|
+
clearTimeout(this.searchTimeout);
|
|
1626
|
+
}
|
|
1627
|
+
this.searchTimeout = setTimeout(() => {
|
|
1628
|
+
this.searchValue = '';
|
|
1629
|
+
this.searchTimeout = null;
|
|
1630
|
+
}, 500);
|
|
1631
|
+
return matched;
|
|
1632
|
+
}
|
|
1633
|
+
isOptionMatched(option) {
|
|
1634
|
+
return this.isValidOption(option) && this.getOptionLabel(option).toString().toLocaleLowerCase(this.filterLocale()).startsWith(this.searchValue?.toLocaleLowerCase(this.filterLocale()));
|
|
1635
|
+
}
|
|
1636
|
+
onFilterInputChange(event) {
|
|
1637
|
+
let value = event.target.value;
|
|
1638
|
+
this._filterValue.set(value);
|
|
1639
|
+
this.focusedOptionIndex.set(-1);
|
|
1640
|
+
this.onFilter.emit({ originalEvent: event, filter: this._filterValue() });
|
|
1641
|
+
!this.virtualScrollerDisabled() && this.scroller()?.scrollToIndex(0);
|
|
1642
|
+
setTimeout(() => {
|
|
1643
|
+
this.overlayViewChild()?.alignOverlay();
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
applyFocus() {
|
|
1647
|
+
if (this.editable())
|
|
1648
|
+
findSingle(this.el.nativeElement, '[data-pc-section="label"]').focus();
|
|
1649
|
+
else
|
|
1650
|
+
focus(this.focusInputViewChild()?.nativeElement);
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* Applies focus.
|
|
1654
|
+
* @group Method
|
|
1655
|
+
*/
|
|
1656
|
+
focus() {
|
|
1657
|
+
this.applyFocus();
|
|
1658
|
+
}
|
|
1659
|
+
/**
|
|
1660
|
+
* Clears the model.
|
|
1661
|
+
* @group Method
|
|
1662
|
+
*/
|
|
1663
|
+
clear(event) {
|
|
1664
|
+
this.updateModel(this.multiple() ? [] : null, event);
|
|
1665
|
+
this.clearEditableLabel();
|
|
1666
|
+
this.onModelTouched();
|
|
1667
|
+
this.onChange.emit({ originalEvent: event, value: this.value });
|
|
1668
|
+
this.onClear.emit(event);
|
|
1669
|
+
this.resetFilter();
|
|
1670
|
+
}
|
|
1671
|
+
/**
|
|
1672
|
+
* @override
|
|
1673
|
+
*
|
|
1674
|
+
* @see {@link BaseEditableHolder.writeControlValue}
|
|
1675
|
+
* Writes the value to the control.
|
|
1676
|
+
*/
|
|
1677
|
+
writeControlValue(value, setModelValue) {
|
|
1678
|
+
if (this.filter()) {
|
|
1679
|
+
this.resetFilter();
|
|
1680
|
+
}
|
|
1681
|
+
this.value = value;
|
|
1682
|
+
this.allowModelChange() && this.onModelChange(value);
|
|
1683
|
+
setModelValue(this.value);
|
|
1684
|
+
this.updateEditableLabel();
|
|
1685
|
+
}
|
|
1686
|
+
get containerDataP() {
|
|
1687
|
+
return this.cn({
|
|
1688
|
+
invalid: this.invalid(),
|
|
1689
|
+
disabled: this.$disabled(),
|
|
1690
|
+
focus: this.focused(),
|
|
1691
|
+
fluid: this.hasFluid,
|
|
1692
|
+
filled: this.$variant() === 'filled',
|
|
1693
|
+
[this.size()]: this.size()
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1696
|
+
get labelDataP() {
|
|
1697
|
+
return this.cn({
|
|
1698
|
+
placeholder: this.label() === this.placeholder(),
|
|
1699
|
+
clearable: this.showClear(),
|
|
1700
|
+
disabled: this.$disabled(),
|
|
1701
|
+
[this.size()]: this.size(),
|
|
1702
|
+
empty: !this.editable() && !this.selectedItemTemplate() && (!this.label() || this.label() === 'p-emptylabel' || this.label().length === 0)
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
get dropdownIconDataP() {
|
|
1706
|
+
return this.cn({
|
|
1707
|
+
[this.size()]: this.size()
|
|
1708
|
+
});
|
|
1709
|
+
}
|
|
1710
|
+
get overlayDataP() {
|
|
1711
|
+
return this.cn({
|
|
1712
|
+
['overlay-' + this.$appendTo()]: 'overlay-' + this.$appendTo()
|
|
1713
|
+
});
|
|
1714
|
+
}
|
|
1715
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: Select, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1716
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.3", type: Select, isStandalone: true, selector: "p-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, editable: { classPropertyName: "editable", publicName: "editable", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, filterLocale: { classPropertyName: "filterLocale", publicName: "filterLocale", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, filterBy: { classPropertyName: "filterBy", publicName: "filterBy", isSignal: true, isRequired: false, transformFunction: null }, filterFields: { classPropertyName: "filterFields", publicName: "filterFields", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, resetFilterOnHide: { classPropertyName: "resetFilterOnHide", publicName: "resetFilterOnHide", isSignal: true, isRequired: false, transformFunction: null }, checkmark: { classPropertyName: "checkmark", publicName: "checkmark", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: true, isRequired: false, transformFunction: null }, ariaFilterLabel: { classPropertyName: "ariaFilterLabel", publicName: "ariaFilterLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, filterMatchMode: { classPropertyName: "filterMatchMode", publicName: "filterMatchMode", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipPositionStyle: { classPropertyName: "tooltipPositionStyle", publicName: "tooltipPositionStyle", isSignal: true, isRequired: false, transformFunction: null }, tooltipStyleClass: { classPropertyName: "tooltipStyleClass", publicName: "tooltipStyleClass", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, autofocusFilter: { classPropertyName: "autofocusFilter", publicName: "autofocusFilter", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, appendTo: { classPropertyName: "appendTo", publicName: "appendTo", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", onFilter: "onFilter", onFocus: "onFocus", onBlur: "onBlur", onClick: "onClick", onShow: "onShow", onHide: "onHide", onClear: "onClear", onLazyLoad: "onLazyLoad" }, host: { listeners: { "click": "onContainerClick($event)" }, properties: { "class": "cx('root')", "attr.id": "$id()", "attr.data-p": "containerDataP" } }, providers: [SELECT_VALUE_ACCESSOR, SelectStyle, { provide: SELECT_INSTANCE, useExisting: Select }, { provide: PARENT_INSTANCE, useExisting: Select }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selectedItem"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "filterTemplate", first: true, predicate: ["filter"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "emptyFilterTemplate", first: true, predicate: ["emptyfilter"], isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], isSignal: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"], isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], isSignal: true }, { propertyName: "filterIconTemplate", first: true, predicate: ["filtericon"], isSignal: true }, { propertyName: "onIconTemplate", first: true, predicate: ["onicon"], isSignal: true }, { propertyName: "offIconTemplate", first: true, predicate: ["officon"], isSignal: true }, { propertyName: "cancelIconTemplate", first: true, predicate: ["cancelicon"], isSignal: true }], viewQueries: [{ propertyName: "filterViewChild", first: true, predicate: ["filter"], descendants: true, isSignal: true }, { propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true, isSignal: true }, { propertyName: "editableInputViewChild", first: true, predicate: ["editableInput"], descendants: true, isSignal: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true, isSignal: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true, isSignal: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true, isSignal: true }, { propertyName: "firstHiddenFocusableElementOnOverlay", first: true, predicate: ["firstHiddenFocusableEl"], descendants: true, isSignal: true }, { propertyName: "lastHiddenFocusableElementOnOverlay", first: true, predicate: ["lastHiddenFocusableEl"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
1717
|
+
@if (!editable()) {
|
|
1718
|
+
<span
|
|
1719
|
+
#focusInput
|
|
1720
|
+
[class]="cx('label')"
|
|
1721
|
+
[pBind]="ptm('label')"
|
|
1722
|
+
[pTooltip]="tooltip()"
|
|
1723
|
+
[pTooltipUnstyled]="unstyled()"
|
|
1724
|
+
[tooltipPosition]="tooltipPosition()"
|
|
1725
|
+
[positionStyle]="tooltipPositionStyle()"
|
|
1726
|
+
[tooltipStyleClass]="tooltipStyleClass()"
|
|
1727
|
+
[attr.aria-disabled]="$disabled()"
|
|
1728
|
+
[attr.id]="inputId()"
|
|
1729
|
+
role="combobox"
|
|
1730
|
+
[attr.aria-label]="$ariaLabel()"
|
|
1731
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1732
|
+
[attr.aria-haspopup]="'listbox'"
|
|
1733
|
+
[attr.aria-expanded]="$ariaExpanded"
|
|
1734
|
+
[attr.aria-multiselectable]="$ariaMultiselectable()"
|
|
1735
|
+
[attr.aria-controls]="$ariaControls()"
|
|
1736
|
+
[attr.tabindex]="$tabindex()"
|
|
1737
|
+
[pAutoFocus]="autofocus()"
|
|
1738
|
+
[attr.aria-activedescendant]="$ariaActivedescendant"
|
|
1739
|
+
(focus)="onInputFocus($event)"
|
|
1740
|
+
(blur)="onInputBlur($event)"
|
|
1741
|
+
(keydown)="onKeyDown($event)"
|
|
1742
|
+
[attr.aria-required]="required()"
|
|
1743
|
+
[attr.required]="$required()"
|
|
1744
|
+
[attr.disabled]="$disabledAttr()"
|
|
1745
|
+
[attr.data-p]="labelDataP"
|
|
1746
|
+
>
|
|
1747
|
+
@if (!selectedItemTemplate()) {
|
|
1748
|
+
{{ label() === 'p-emptylabel' ? ' ' : label() }}
|
|
1749
|
+
} @else {
|
|
1750
|
+
@if (isSelectedOptionEmpty()) {
|
|
1751
|
+
<span>{{ label() === 'p-emptylabel' ? ' ' : label() }}</span>
|
|
1752
|
+
} @else {
|
|
1753
|
+
<ng-container *ngTemplateOutlet="selectedItemTemplate(); context: selectedItemContext"></ng-container>
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
</span>
|
|
1757
|
+
} @else {
|
|
1758
|
+
<input
|
|
1759
|
+
#editableInput
|
|
1760
|
+
type="text"
|
|
1761
|
+
[attr.id]="inputId()"
|
|
1762
|
+
[class]="cx('label')"
|
|
1763
|
+
[pBind]="ptm('label')"
|
|
1764
|
+
[attr.aria-haspopup]="'listbox'"
|
|
1765
|
+
[attr.placeholder]="$placeholder()"
|
|
1766
|
+
[attr.aria-label]="$ariaLabel()"
|
|
1767
|
+
(input)="onEditableInput($event)"
|
|
1768
|
+
(keydown)="onKeyDown($event)"
|
|
1769
|
+
[pAutoFocus]="autofocus()"
|
|
1770
|
+
[attr.aria-activedescendant]="$ariaActivedescendant"
|
|
1771
|
+
(focus)="onInputFocus($event)"
|
|
1772
|
+
(blur)="onInputBlur($event)"
|
|
1773
|
+
[attr.name]="name()"
|
|
1774
|
+
[attr.minlength]="minlength()"
|
|
1775
|
+
[attr.min]="min()"
|
|
1776
|
+
[attr.max]="max()"
|
|
1777
|
+
[attr.pattern]="$pattern()"
|
|
1778
|
+
[attr.size]="inputSize()"
|
|
1779
|
+
[attr.maxlength]="maxlength()"
|
|
1780
|
+
[attr.required]="$required()"
|
|
1781
|
+
[attr.readonly]="$readonly()"
|
|
1782
|
+
[attr.disabled]="$disabledAttr()"
|
|
1783
|
+
[attr.data-p]="labelDataP"
|
|
1784
|
+
/>
|
|
1785
|
+
}
|
|
1786
|
+
@if (isVisibleClearIcon()) {
|
|
1787
|
+
@if (!clearIconTemplate()) {
|
|
1788
|
+
<svg data-p-icon="times" [class]="cx('clearIcon')" [pBind]="ptm('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'" />
|
|
1789
|
+
} @else {
|
|
1790
|
+
<span [class]="cx('clearIcon')" [pBind]="ptm('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'">
|
|
1791
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate(); context: clearIconContext"></ng-template>
|
|
1792
|
+
</span>
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
<div [class]="cx('dropdown')" [pBind]="ptm('dropdown')" role="button" aria-label="dropdown trigger" aria-haspopup="listbox" [attr.aria-expanded]="$ariaExpanded" [attr.data-pc-section]="'trigger'">
|
|
1797
|
+
@if (loading()) {
|
|
1798
|
+
@if (loadingIconTemplate()) {
|
|
1799
|
+
<ng-container *ngTemplateOutlet="loadingIconTemplate()"></ng-container>
|
|
1800
|
+
} @else {
|
|
1801
|
+
@if (loadingIcon()) {
|
|
1802
|
+
<span [class]="cn(cx('loadingIcon'), 'pi-spin' + loadingIcon())" [pBind]="ptm('loadingIcon')" aria-hidden="true"></span>
|
|
1803
|
+
} @else {
|
|
1804
|
+
<span [class]="cn(cx('loadingIcon'), 'pi pi-spinner pi-spin')" [pBind]="ptm('loadingIcon')" aria-hidden="true"></span>
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
} @else {
|
|
1808
|
+
@if (!dropdownIconTemplate()) {
|
|
1809
|
+
@if (dropdownIcon()) {
|
|
1810
|
+
<span [class]="cn(cx('dropdownIcon'), dropdownIcon())" [pBind]="ptm('dropdownIcon')"></span>
|
|
1811
|
+
} @else {
|
|
1812
|
+
<svg data-p-icon="chevron-down" [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')" />
|
|
1813
|
+
}
|
|
1814
|
+
} @else {
|
|
1815
|
+
<span [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')">
|
|
1816
|
+
<ng-template *ngTemplateOutlet="dropdownIconTemplate(); context: dropdownIconContext"></ng-template>
|
|
1817
|
+
</span>
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
</div>
|
|
1821
|
+
|
|
1822
|
+
<p-overlay
|
|
1823
|
+
#overlay
|
|
1824
|
+
[hostAttrSelector]="$attrSelector"
|
|
1825
|
+
[visible]="overlayVisible()"
|
|
1826
|
+
(visibleChange)="overlayVisible.set($event)"
|
|
1827
|
+
[options]="overlayOptions()"
|
|
1828
|
+
[target]="'@parent'"
|
|
1829
|
+
[appendTo]="$appendTo()"
|
|
1830
|
+
[unstyled]="unstyled()"
|
|
1831
|
+
[pt]="ptm('pcOverlay')"
|
|
1832
|
+
[motionOptions]="motionOptions()"
|
|
1833
|
+
(onBeforeEnter)="onOverlayBeforeEnter($event)"
|
|
1834
|
+
(onAfterLeave)="onOverlayAfterLeave($event)"
|
|
1835
|
+
(onHide)="hide()"
|
|
1836
|
+
>
|
|
1837
|
+
<ng-template #content>
|
|
1838
|
+
<div [class]="cn(cx('overlay'), panelStyleClass())" [style]="panelStyle()" [pBind]="ptm('overlay')" [attr.data-p]="overlayDataP">
|
|
1839
|
+
<span
|
|
1840
|
+
#firstHiddenFocusableEl
|
|
1841
|
+
role="presentation"
|
|
1842
|
+
class="p-hidden-accessible p-hidden-focusable"
|
|
1843
|
+
[attr.tabindex]="0"
|
|
1844
|
+
(focus)="onFirstHiddenFocus($event)"
|
|
1845
|
+
[attr.data-p-hidden-accessible]="true"
|
|
1846
|
+
[attr.data-p-hidden-focusable]="true"
|
|
1847
|
+
[pBind]="ptm('hiddenFirstFocusableEl')"
|
|
1848
|
+
>
|
|
1849
|
+
</span>
|
|
1850
|
+
<ng-container *ngTemplateOutlet="headerTemplate(); context: { class: cx('header') }"></ng-container>
|
|
1851
|
+
@if (filter()) {
|
|
1852
|
+
<div [class]="cx('header')" (click)="$event.stopPropagation()" [pBind]="ptm('header')">
|
|
1853
|
+
@if (filterTemplate()) {
|
|
1854
|
+
<ng-container *ngTemplateOutlet="filterTemplate(); context: filterTemplateContext"></ng-container>
|
|
1855
|
+
} @else {
|
|
1856
|
+
<p-iconfield [pt]="ptm('pcFilterContainer')" [unstyled]="unstyled()">
|
|
1857
|
+
<input
|
|
1858
|
+
#filter
|
|
1859
|
+
pInputText
|
|
1860
|
+
[pSize]="size()"
|
|
1861
|
+
type="text"
|
|
1862
|
+
role="searchbox"
|
|
1863
|
+
autocomplete="off"
|
|
1864
|
+
[value]="filterInputValue()"
|
|
1865
|
+
[class]="cx('pcFilter')"
|
|
1866
|
+
[variant]="$variant()"
|
|
1867
|
+
[attr.placeholder]="filterPlaceholder()"
|
|
1868
|
+
[attr.aria-owns]="$ariaOwns()"
|
|
1869
|
+
(input)="onFilterInputChange($event)"
|
|
1870
|
+
[attr.aria-label]="ariaFilterLabel()"
|
|
1871
|
+
[attr.aria-activedescendant]="focusedOptionId()"
|
|
1872
|
+
(keydown)="onFilterKeyDown($event)"
|
|
1873
|
+
(blur)="onFilterBlur($event)"
|
|
1874
|
+
[pt]="ptm('pcFilter')"
|
|
1875
|
+
[unstyled]="unstyled()"
|
|
1876
|
+
/>
|
|
1877
|
+
<p-inputicon [pt]="ptm('pcFilterIconContainer')" [unstyled]="unstyled()">
|
|
1878
|
+
@if (!filterIconTemplate()) {
|
|
1879
|
+
<svg data-p-icon="search" [pBind]="ptm('filterIcon')" />
|
|
1880
|
+
} @else {
|
|
1881
|
+
<span [pBind]="ptm('filterIcon')">
|
|
1882
|
+
<ng-template *ngTemplateOutlet="filterIconTemplate()"></ng-template>
|
|
1883
|
+
</span>
|
|
1884
|
+
}
|
|
1885
|
+
</p-inputicon>
|
|
1886
|
+
</p-iconfield>
|
|
1887
|
+
}
|
|
1888
|
+
</div>
|
|
1889
|
+
}
|
|
1890
|
+
<div [class]="cx('listContainer')" [style.max-height]="virtualScroll() ? 'auto' : scrollHeight() || 'auto'" [pBind]="ptm('listContainer')">
|
|
1891
|
+
@if (virtualScroll()) {
|
|
1892
|
+
<p-scroller
|
|
1893
|
+
hostName="select"
|
|
1894
|
+
#scroller
|
|
1895
|
+
[items]="visibleOptions()"
|
|
1896
|
+
[style]="{ height: scrollHeight() }"
|
|
1897
|
+
[itemSize]="virtualScrollItemSize()"
|
|
1898
|
+
[autoSize]="true"
|
|
1899
|
+
[lazy]="lazy()"
|
|
1900
|
+
(onLazyLoad)="onLazyLoad.emit($event)"
|
|
1901
|
+
[options]="virtualScrollOptions()"
|
|
1902
|
+
[pt]="ptm('virtualScroller')"
|
|
1903
|
+
>
|
|
1904
|
+
<ng-template #content let-items let-scrollerOptions="options">
|
|
1905
|
+
<ng-container *ngTemplateOutlet="buildInItems; context: getBuildInItemsContext(items, scrollerOptions)"></ng-container>
|
|
1906
|
+
</ng-template>
|
|
1907
|
+
@if (loaderTemplate()) {
|
|
1908
|
+
<ng-template #loader let-scrollerOptions="options">
|
|
1909
|
+
<ng-container *ngTemplateOutlet="loaderTemplate(); context: getLoaderContext(scrollerOptions)"></ng-container>
|
|
1910
|
+
</ng-template>
|
|
1911
|
+
}
|
|
1912
|
+
</p-scroller>
|
|
1913
|
+
} @else {
|
|
1914
|
+
<ng-container *ngTemplateOutlet="buildInItems; context: defaultBuildInItemsContext"></ng-container>
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
<ng-template #buildInItems let-items let-scrollerOptions="options">
|
|
1918
|
+
<ul #items [attr.id]="$id() + '_list'" [attr.aria-label]="listLabel" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [pBind]="ptm('list')">
|
|
1919
|
+
@for (option of items; track trackOption(option, i); let i = $index) {
|
|
1920
|
+
@if (isOptionGroup(option)) {
|
|
1921
|
+
<li [class]="cx('optionGroup')" [attr.id]="$id() + '_' + getOptionIndex(i, scrollerOptions)" [style]="getItemSizeStyle(scrollerOptions)" role="option" [pBind]="ptm('optionGroup')">
|
|
1922
|
+
@if (!groupTemplate()) {
|
|
1923
|
+
<span [class]="cx('optionGroupLabel')" [pBind]="ptm('optionGroupLabel')">{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
1924
|
+
}
|
|
1925
|
+
<ng-container *ngTemplateOutlet="groupTemplate(); context: getGroupContext(option.optionGroup)"></ng-container>
|
|
1926
|
+
</li>
|
|
1927
|
+
} @else {
|
|
1928
|
+
<p-select-item
|
|
1929
|
+
[id]="$id() + '_' + getOptionIndex(i, scrollerOptions)"
|
|
1930
|
+
[option]="option"
|
|
1931
|
+
[checkmark]="checkmark()"
|
|
1932
|
+
[selected]="isSelected(option)"
|
|
1933
|
+
[label]="getOptionLabel(option)"
|
|
1934
|
+
[disabled]="isOptionDisabled(option)"
|
|
1935
|
+
[template]="itemTemplate()"
|
|
1936
|
+
[focused]="isOptionFocused(i, scrollerOptions)"
|
|
1937
|
+
[ariaPosInset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
|
|
1938
|
+
[ariaSetSize]="ariaSetSize"
|
|
1939
|
+
[index]="i"
|
|
1940
|
+
[unstyled]="unstyled()"
|
|
1941
|
+
[scrollerOptions]="scrollerOptions"
|
|
1942
|
+
(onClick)="onOptionSelect($event, option)"
|
|
1943
|
+
(onMouseEnter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
|
|
1944
|
+
></p-select-item>
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
@if (showEmptyFilterMessage()) {
|
|
1948
|
+
<li [class]="cx('emptyMessage')" [style]="getItemSizeStyle(scrollerOptions)" role="option" [pBind]="ptm('emptyMessage')">
|
|
1949
|
+
@if (!hasEmptyTemplate()) {
|
|
1950
|
+
{{ emptyFilterMessageLabel() }}
|
|
1951
|
+
} @else {
|
|
1952
|
+
<ng-container *ngTemplateOutlet="hasEmptyTemplate()"></ng-container>
|
|
1953
|
+
}
|
|
1954
|
+
</li>
|
|
1955
|
+
}
|
|
1956
|
+
@if (showEmptyMessage()) {
|
|
1957
|
+
<li [class]="cx('emptyMessage')" [style]="getItemSizeStyle(scrollerOptions)" role="option" [pBind]="ptm('emptyMessage')">
|
|
1958
|
+
@if (!emptyTemplate()) {
|
|
1959
|
+
{{ emptyMessageLabel() || emptyFilterMessageLabel() }}
|
|
1960
|
+
} @else {
|
|
1961
|
+
<ng-container *ngTemplateOutlet="emptyTemplate()"></ng-container>
|
|
1962
|
+
}
|
|
1963
|
+
</li>
|
|
1964
|
+
}
|
|
1965
|
+
</ul>
|
|
1966
|
+
</ng-template>
|
|
1967
|
+
</div>
|
|
1968
|
+
<ng-container *ngTemplateOutlet="footerTemplate()"></ng-container>
|
|
1969
|
+
<span
|
|
1970
|
+
#lastHiddenFocusableEl
|
|
1971
|
+
role="presentation"
|
|
1972
|
+
class="p-hidden-accessible p-hidden-focusable"
|
|
1973
|
+
[pBind]="ptm('hiddenLastFocusableEl')"
|
|
1974
|
+
[attr.tabindex]="0"
|
|
1975
|
+
(focus)="onLastHiddenFocus($event)"
|
|
1976
|
+
[attr.data-p-hidden-accessible]="true"
|
|
1977
|
+
[attr.data-p-hidden-focusable]="true"
|
|
1978
|
+
></span>
|
|
1979
|
+
</div>
|
|
1980
|
+
</ng-template>
|
|
1981
|
+
</p-overlay>
|
|
1982
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SelectItem, selector: "p-select-item", inputs: ["id", "option", "selected", "focused", "label", "disabled", "visible", "itemSize", "ariaPosInset", "ariaSetSize", "template", "checkmark", "index", "scrollerOptions"], outputs: ["onClick", "onMouseEnter"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: Times, selector: "svg[data-p-icon=\"times\"]" }, { kind: "component", type: ChevronDown, selector: "svg[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: Search, selector: "svg[data-p-icon=\"search\"]" }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: IconField, selector: "p-iconfield, p-icon-field", inputs: ["hostName", "iconPosition"] }, { kind: "component", type: InputIcon, selector: "p-inputicon", inputs: ["hostName"] }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1983
|
+
}
|
|
1984
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: Select, decorators: [{
|
|
1985
|
+
type: Component,
|
|
1986
|
+
args: [{
|
|
1987
|
+
selector: 'p-select',
|
|
1988
|
+
standalone: true,
|
|
1989
|
+
imports: [NgTemplateOutlet, SelectItem, Overlay, Tooltip, AutoFocus, Times, ChevronDown, Search, InputText, IconField, InputIcon, Scroller, SharedModule, BindModule],
|
|
1990
|
+
template: `
|
|
1991
|
+
@if (!editable()) {
|
|
1992
|
+
<span
|
|
1993
|
+
#focusInput
|
|
1994
|
+
[class]="cx('label')"
|
|
1995
|
+
[pBind]="ptm('label')"
|
|
1996
|
+
[pTooltip]="tooltip()"
|
|
1997
|
+
[pTooltipUnstyled]="unstyled()"
|
|
1998
|
+
[tooltipPosition]="tooltipPosition()"
|
|
1999
|
+
[positionStyle]="tooltipPositionStyle()"
|
|
2000
|
+
[tooltipStyleClass]="tooltipStyleClass()"
|
|
2001
|
+
[attr.aria-disabled]="$disabled()"
|
|
2002
|
+
[attr.id]="inputId()"
|
|
2003
|
+
role="combobox"
|
|
2004
|
+
[attr.aria-label]="$ariaLabel()"
|
|
2005
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
2006
|
+
[attr.aria-haspopup]="'listbox'"
|
|
2007
|
+
[attr.aria-expanded]="$ariaExpanded"
|
|
2008
|
+
[attr.aria-multiselectable]="$ariaMultiselectable()"
|
|
2009
|
+
[attr.aria-controls]="$ariaControls()"
|
|
2010
|
+
[attr.tabindex]="$tabindex()"
|
|
2011
|
+
[pAutoFocus]="autofocus()"
|
|
2012
|
+
[attr.aria-activedescendant]="$ariaActivedescendant"
|
|
2013
|
+
(focus)="onInputFocus($event)"
|
|
2014
|
+
(blur)="onInputBlur($event)"
|
|
2015
|
+
(keydown)="onKeyDown($event)"
|
|
2016
|
+
[attr.aria-required]="required()"
|
|
2017
|
+
[attr.required]="$required()"
|
|
2018
|
+
[attr.disabled]="$disabledAttr()"
|
|
2019
|
+
[attr.data-p]="labelDataP"
|
|
2020
|
+
>
|
|
2021
|
+
@if (!selectedItemTemplate()) {
|
|
2022
|
+
{{ label() === 'p-emptylabel' ? ' ' : label() }}
|
|
2023
|
+
} @else {
|
|
2024
|
+
@if (isSelectedOptionEmpty()) {
|
|
2025
|
+
<span>{{ label() === 'p-emptylabel' ? ' ' : label() }}</span>
|
|
2026
|
+
} @else {
|
|
2027
|
+
<ng-container *ngTemplateOutlet="selectedItemTemplate(); context: selectedItemContext"></ng-container>
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
</span>
|
|
2031
|
+
} @else {
|
|
2032
|
+
<input
|
|
2033
|
+
#editableInput
|
|
2034
|
+
type="text"
|
|
2035
|
+
[attr.id]="inputId()"
|
|
2036
|
+
[class]="cx('label')"
|
|
2037
|
+
[pBind]="ptm('label')"
|
|
2038
|
+
[attr.aria-haspopup]="'listbox'"
|
|
2039
|
+
[attr.placeholder]="$placeholder()"
|
|
2040
|
+
[attr.aria-label]="$ariaLabel()"
|
|
2041
|
+
(input)="onEditableInput($event)"
|
|
2042
|
+
(keydown)="onKeyDown($event)"
|
|
2043
|
+
[pAutoFocus]="autofocus()"
|
|
2044
|
+
[attr.aria-activedescendant]="$ariaActivedescendant"
|
|
2045
|
+
(focus)="onInputFocus($event)"
|
|
2046
|
+
(blur)="onInputBlur($event)"
|
|
2047
|
+
[attr.name]="name()"
|
|
2048
|
+
[attr.minlength]="minlength()"
|
|
2049
|
+
[attr.min]="min()"
|
|
2050
|
+
[attr.max]="max()"
|
|
2051
|
+
[attr.pattern]="$pattern()"
|
|
2052
|
+
[attr.size]="inputSize()"
|
|
2053
|
+
[attr.maxlength]="maxlength()"
|
|
2054
|
+
[attr.required]="$required()"
|
|
2055
|
+
[attr.readonly]="$readonly()"
|
|
2056
|
+
[attr.disabled]="$disabledAttr()"
|
|
2057
|
+
[attr.data-p]="labelDataP"
|
|
2058
|
+
/>
|
|
2059
|
+
}
|
|
2060
|
+
@if (isVisibleClearIcon()) {
|
|
2061
|
+
@if (!clearIconTemplate()) {
|
|
2062
|
+
<svg data-p-icon="times" [class]="cx('clearIcon')" [pBind]="ptm('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'" />
|
|
2063
|
+
} @else {
|
|
2064
|
+
<span [class]="cx('clearIcon')" [pBind]="ptm('clearIcon')" (click)="clear($event)" [attr.data-pc-section]="'clearicon'">
|
|
2065
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate(); context: clearIconContext"></ng-template>
|
|
2066
|
+
</span>
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
<div [class]="cx('dropdown')" [pBind]="ptm('dropdown')" role="button" aria-label="dropdown trigger" aria-haspopup="listbox" [attr.aria-expanded]="$ariaExpanded" [attr.data-pc-section]="'trigger'">
|
|
2071
|
+
@if (loading()) {
|
|
2072
|
+
@if (loadingIconTemplate()) {
|
|
2073
|
+
<ng-container *ngTemplateOutlet="loadingIconTemplate()"></ng-container>
|
|
2074
|
+
} @else {
|
|
2075
|
+
@if (loadingIcon()) {
|
|
2076
|
+
<span [class]="cn(cx('loadingIcon'), 'pi-spin' + loadingIcon())" [pBind]="ptm('loadingIcon')" aria-hidden="true"></span>
|
|
2077
|
+
} @else {
|
|
2078
|
+
<span [class]="cn(cx('loadingIcon'), 'pi pi-spinner pi-spin')" [pBind]="ptm('loadingIcon')" aria-hidden="true"></span>
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
} @else {
|
|
2082
|
+
@if (!dropdownIconTemplate()) {
|
|
2083
|
+
@if (dropdownIcon()) {
|
|
2084
|
+
<span [class]="cn(cx('dropdownIcon'), dropdownIcon())" [pBind]="ptm('dropdownIcon')"></span>
|
|
2085
|
+
} @else {
|
|
2086
|
+
<svg data-p-icon="chevron-down" [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')" />
|
|
2087
|
+
}
|
|
2088
|
+
} @else {
|
|
2089
|
+
<span [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')">
|
|
2090
|
+
<ng-template *ngTemplateOutlet="dropdownIconTemplate(); context: dropdownIconContext"></ng-template>
|
|
2091
|
+
</span>
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
</div>
|
|
2095
|
+
|
|
2096
|
+
<p-overlay
|
|
2097
|
+
#overlay
|
|
2098
|
+
[hostAttrSelector]="$attrSelector"
|
|
2099
|
+
[visible]="overlayVisible()"
|
|
2100
|
+
(visibleChange)="overlayVisible.set($event)"
|
|
2101
|
+
[options]="overlayOptions()"
|
|
2102
|
+
[target]="'@parent'"
|
|
2103
|
+
[appendTo]="$appendTo()"
|
|
2104
|
+
[unstyled]="unstyled()"
|
|
2105
|
+
[pt]="ptm('pcOverlay')"
|
|
2106
|
+
[motionOptions]="motionOptions()"
|
|
2107
|
+
(onBeforeEnter)="onOverlayBeforeEnter($event)"
|
|
2108
|
+
(onAfterLeave)="onOverlayAfterLeave($event)"
|
|
2109
|
+
(onHide)="hide()"
|
|
2110
|
+
>
|
|
2111
|
+
<ng-template #content>
|
|
2112
|
+
<div [class]="cn(cx('overlay'), panelStyleClass())" [style]="panelStyle()" [pBind]="ptm('overlay')" [attr.data-p]="overlayDataP">
|
|
2113
|
+
<span
|
|
2114
|
+
#firstHiddenFocusableEl
|
|
2115
|
+
role="presentation"
|
|
2116
|
+
class="p-hidden-accessible p-hidden-focusable"
|
|
2117
|
+
[attr.tabindex]="0"
|
|
2118
|
+
(focus)="onFirstHiddenFocus($event)"
|
|
2119
|
+
[attr.data-p-hidden-accessible]="true"
|
|
2120
|
+
[attr.data-p-hidden-focusable]="true"
|
|
2121
|
+
[pBind]="ptm('hiddenFirstFocusableEl')"
|
|
2122
|
+
>
|
|
2123
|
+
</span>
|
|
2124
|
+
<ng-container *ngTemplateOutlet="headerTemplate(); context: { class: cx('header') }"></ng-container>
|
|
2125
|
+
@if (filter()) {
|
|
2126
|
+
<div [class]="cx('header')" (click)="$event.stopPropagation()" [pBind]="ptm('header')">
|
|
2127
|
+
@if (filterTemplate()) {
|
|
2128
|
+
<ng-container *ngTemplateOutlet="filterTemplate(); context: filterTemplateContext"></ng-container>
|
|
2129
|
+
} @else {
|
|
2130
|
+
<p-iconfield [pt]="ptm('pcFilterContainer')" [unstyled]="unstyled()">
|
|
2131
|
+
<input
|
|
2132
|
+
#filter
|
|
2133
|
+
pInputText
|
|
2134
|
+
[pSize]="size()"
|
|
2135
|
+
type="text"
|
|
2136
|
+
role="searchbox"
|
|
2137
|
+
autocomplete="off"
|
|
2138
|
+
[value]="filterInputValue()"
|
|
2139
|
+
[class]="cx('pcFilter')"
|
|
2140
|
+
[variant]="$variant()"
|
|
2141
|
+
[attr.placeholder]="filterPlaceholder()"
|
|
2142
|
+
[attr.aria-owns]="$ariaOwns()"
|
|
2143
|
+
(input)="onFilterInputChange($event)"
|
|
2144
|
+
[attr.aria-label]="ariaFilterLabel()"
|
|
2145
|
+
[attr.aria-activedescendant]="focusedOptionId()"
|
|
2146
|
+
(keydown)="onFilterKeyDown($event)"
|
|
2147
|
+
(blur)="onFilterBlur($event)"
|
|
2148
|
+
[pt]="ptm('pcFilter')"
|
|
2149
|
+
[unstyled]="unstyled()"
|
|
2150
|
+
/>
|
|
2151
|
+
<p-inputicon [pt]="ptm('pcFilterIconContainer')" [unstyled]="unstyled()">
|
|
2152
|
+
@if (!filterIconTemplate()) {
|
|
2153
|
+
<svg data-p-icon="search" [pBind]="ptm('filterIcon')" />
|
|
2154
|
+
} @else {
|
|
2155
|
+
<span [pBind]="ptm('filterIcon')">
|
|
2156
|
+
<ng-template *ngTemplateOutlet="filterIconTemplate()"></ng-template>
|
|
2157
|
+
</span>
|
|
2158
|
+
}
|
|
2159
|
+
</p-inputicon>
|
|
2160
|
+
</p-iconfield>
|
|
2161
|
+
}
|
|
2162
|
+
</div>
|
|
2163
|
+
}
|
|
2164
|
+
<div [class]="cx('listContainer')" [style.max-height]="virtualScroll() ? 'auto' : scrollHeight() || 'auto'" [pBind]="ptm('listContainer')">
|
|
2165
|
+
@if (virtualScroll()) {
|
|
2166
|
+
<p-scroller
|
|
2167
|
+
hostName="select"
|
|
2168
|
+
#scroller
|
|
2169
|
+
[items]="visibleOptions()"
|
|
2170
|
+
[style]="{ height: scrollHeight() }"
|
|
2171
|
+
[itemSize]="virtualScrollItemSize()"
|
|
2172
|
+
[autoSize]="true"
|
|
2173
|
+
[lazy]="lazy()"
|
|
2174
|
+
(onLazyLoad)="onLazyLoad.emit($event)"
|
|
2175
|
+
[options]="virtualScrollOptions()"
|
|
2176
|
+
[pt]="ptm('virtualScroller')"
|
|
2177
|
+
>
|
|
2178
|
+
<ng-template #content let-items let-scrollerOptions="options">
|
|
2179
|
+
<ng-container *ngTemplateOutlet="buildInItems; context: getBuildInItemsContext(items, scrollerOptions)"></ng-container>
|
|
2180
|
+
</ng-template>
|
|
2181
|
+
@if (loaderTemplate()) {
|
|
2182
|
+
<ng-template #loader let-scrollerOptions="options">
|
|
2183
|
+
<ng-container *ngTemplateOutlet="loaderTemplate(); context: getLoaderContext(scrollerOptions)"></ng-container>
|
|
2184
|
+
</ng-template>
|
|
2185
|
+
}
|
|
2186
|
+
</p-scroller>
|
|
2187
|
+
} @else {
|
|
2188
|
+
<ng-container *ngTemplateOutlet="buildInItems; context: defaultBuildInItemsContext"></ng-container>
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
<ng-template #buildInItems let-items let-scrollerOptions="options">
|
|
2192
|
+
<ul #items [attr.id]="$id() + '_list'" [attr.aria-label]="listLabel" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [pBind]="ptm('list')">
|
|
2193
|
+
@for (option of items; track trackOption(option, i); let i = $index) {
|
|
2194
|
+
@if (isOptionGroup(option)) {
|
|
2195
|
+
<li [class]="cx('optionGroup')" [attr.id]="$id() + '_' + getOptionIndex(i, scrollerOptions)" [style]="getItemSizeStyle(scrollerOptions)" role="option" [pBind]="ptm('optionGroup')">
|
|
2196
|
+
@if (!groupTemplate()) {
|
|
2197
|
+
<span [class]="cx('optionGroupLabel')" [pBind]="ptm('optionGroupLabel')">{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
2198
|
+
}
|
|
2199
|
+
<ng-container *ngTemplateOutlet="groupTemplate(); context: getGroupContext(option.optionGroup)"></ng-container>
|
|
2200
|
+
</li>
|
|
2201
|
+
} @else {
|
|
2202
|
+
<p-select-item
|
|
2203
|
+
[id]="$id() + '_' + getOptionIndex(i, scrollerOptions)"
|
|
2204
|
+
[option]="option"
|
|
2205
|
+
[checkmark]="checkmark()"
|
|
2206
|
+
[selected]="isSelected(option)"
|
|
2207
|
+
[label]="getOptionLabel(option)"
|
|
2208
|
+
[disabled]="isOptionDisabled(option)"
|
|
2209
|
+
[template]="itemTemplate()"
|
|
2210
|
+
[focused]="isOptionFocused(i, scrollerOptions)"
|
|
2211
|
+
[ariaPosInset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
|
|
2212
|
+
[ariaSetSize]="ariaSetSize"
|
|
2213
|
+
[index]="i"
|
|
2214
|
+
[unstyled]="unstyled()"
|
|
2215
|
+
[scrollerOptions]="scrollerOptions"
|
|
2216
|
+
(onClick)="onOptionSelect($event, option)"
|
|
2217
|
+
(onMouseEnter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
|
|
2218
|
+
></p-select-item>
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
@if (showEmptyFilterMessage()) {
|
|
2222
|
+
<li [class]="cx('emptyMessage')" [style]="getItemSizeStyle(scrollerOptions)" role="option" [pBind]="ptm('emptyMessage')">
|
|
2223
|
+
@if (!hasEmptyTemplate()) {
|
|
2224
|
+
{{ emptyFilterMessageLabel() }}
|
|
2225
|
+
} @else {
|
|
2226
|
+
<ng-container *ngTemplateOutlet="hasEmptyTemplate()"></ng-container>
|
|
2227
|
+
}
|
|
2228
|
+
</li>
|
|
2229
|
+
}
|
|
2230
|
+
@if (showEmptyMessage()) {
|
|
2231
|
+
<li [class]="cx('emptyMessage')" [style]="getItemSizeStyle(scrollerOptions)" role="option" [pBind]="ptm('emptyMessage')">
|
|
2232
|
+
@if (!emptyTemplate()) {
|
|
2233
|
+
{{ emptyMessageLabel() || emptyFilterMessageLabel() }}
|
|
2234
|
+
} @else {
|
|
2235
|
+
<ng-container *ngTemplateOutlet="emptyTemplate()"></ng-container>
|
|
2236
|
+
}
|
|
2237
|
+
</li>
|
|
2238
|
+
}
|
|
2239
|
+
</ul>
|
|
2240
|
+
</ng-template>
|
|
2241
|
+
</div>
|
|
2242
|
+
<ng-container *ngTemplateOutlet="footerTemplate()"></ng-container>
|
|
2243
|
+
<span
|
|
2244
|
+
#lastHiddenFocusableEl
|
|
2245
|
+
role="presentation"
|
|
2246
|
+
class="p-hidden-accessible p-hidden-focusable"
|
|
2247
|
+
[pBind]="ptm('hiddenLastFocusableEl')"
|
|
2248
|
+
[attr.tabindex]="0"
|
|
2249
|
+
(focus)="onLastHiddenFocus($event)"
|
|
2250
|
+
[attr.data-p-hidden-accessible]="true"
|
|
2251
|
+
[attr.data-p-hidden-focusable]="true"
|
|
2252
|
+
></span>
|
|
2253
|
+
</div>
|
|
2254
|
+
</ng-template>
|
|
2255
|
+
</p-overlay>
|
|
2256
|
+
`,
|
|
2257
|
+
host: {
|
|
2258
|
+
'[class]': "cx('root')",
|
|
2259
|
+
'[attr.id]': '$id()',
|
|
2260
|
+
'[attr.data-p]': 'containerDataP',
|
|
2261
|
+
'(click)': 'onContainerClick($event)'
|
|
2262
|
+
},
|
|
2263
|
+
providers: [SELECT_VALUE_ACCESSOR, SelectStyle, { provide: SELECT_INSTANCE, useExisting: Select }, { provide: PARENT_INSTANCE, useExisting: Select }],
|
|
2264
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2265
|
+
encapsulation: ViewEncapsulation.None,
|
|
2266
|
+
hostDirectives: [Bind]
|
|
2267
|
+
}]
|
|
2268
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], editable: [{ type: i0.Input, args: [{ isSignal: true, alias: "editable", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], filterLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterLocale", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], filterBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterBy", required: false }] }], filterFields: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterFields", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], resetFilterOnHide: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetFilterOnHide", required: false }] }], checkmark: [{ type: i0.Input, args: [{ isSignal: true, alias: "checkmark", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], emptyFilterMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyFilterMessage", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], virtualScrollOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollOptions", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], ariaFilterLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaFilterLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], filterMatchMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterMatchMode", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], tooltipPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPosition", required: false }] }], tooltipPositionStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPositionStyle", required: false }] }], tooltipStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipStyleClass", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], autofocusFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocusFilter", required: false }] }], filterValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterValue", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onFilter: [{ type: i0.Output, args: ["onFilter"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], filterViewChild: [{ type: i0.ViewChild, args: ['filter', { isSignal: true }] }], focusInputViewChild: [{ type: i0.ViewChild, args: ['focusInput', { isSignal: true }] }], editableInputViewChild: [{ type: i0.ViewChild, args: ['editableInput', { isSignal: true }] }], itemsViewChild: [{ type: i0.ViewChild, args: ['items', { isSignal: true }] }], scroller: [{ type: i0.ViewChild, args: ['scroller', { isSignal: true }] }], overlayViewChild: [{ type: i0.ViewChild, args: ['overlay', { isSignal: true }] }], firstHiddenFocusableElementOnOverlay: [{ type: i0.ViewChild, args: ['firstHiddenFocusableEl', { isSignal: true }] }], lastHiddenFocusableElementOnOverlay: [{ type: i0.ViewChild, args: ['lastHiddenFocusableEl', { isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { ...{ descendants: false }, isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { ...{ descendants: false }, isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selectedItem', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], filterTemplate: [{ type: i0.ContentChild, args: ['filter', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], emptyFilterTemplate: [{ type: i0.ContentChild, args: ['emptyfilter', { ...{ descendants: false }, isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { ...{ descendants: false }, isSignal: true }] }], dropdownIconTemplate: [{ type: i0.ContentChild, args: ['dropdownicon', { ...{ descendants: false }, isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], filterIconTemplate: [{ type: i0.ContentChild, args: ['filtericon', { ...{ descendants: false }, isSignal: true }] }], onIconTemplate: [{ type: i0.ContentChild, args: ['onicon', { ...{ descendants: false }, isSignal: true }] }], offIconTemplate: [{ type: i0.ContentChild, args: ['officon', { ...{ descendants: false }, isSignal: true }] }], cancelIconTemplate: [{ type: i0.ContentChild, args: ['cancelicon', { ...{ descendants: false }, isSignal: true }] }] } });
|
|
2269
|
+
class SelectModule {
|
|
2270
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2271
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.3", ngImport: i0, type: SelectModule, imports: [Select, SharedModule], exports: [Select, SharedModule] });
|
|
2272
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectModule, imports: [Select, SharedModule, SharedModule] });
|
|
2273
|
+
}
|
|
2274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImport: i0, type: SelectModule, decorators: [{
|
|
2275
|
+
type: NgModule,
|
|
2276
|
+
args: [{
|
|
2277
|
+
imports: [Select, SharedModule],
|
|
2278
|
+
exports: [Select, SharedModule]
|
|
2279
|
+
}]
|
|
2280
|
+
}] });
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* Generated bundle index. Do not edit.
|
|
2284
|
+
*/
|
|
2285
|
+
|
|
2286
|
+
export { SELECT_VALUE_ACCESSOR, Select, SelectClasses, SelectModule, SelectStyle };
|
|
2287
|
+
//# sourceMappingURL=primenglab-select.mjs.map
|