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