primeng 21.1.9 → 22.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +25 -57
- package/README.md +6 -2
- package/fesm2022/primeng-accordion.mjs +214 -192
- package/fesm2022/primeng-accordion.mjs.map +1 -1
- package/fesm2022/primeng-animateonscroll.mjs +43 -52
- package/fesm2022/primeng-animateonscroll.mjs.map +1 -1
- package/fesm2022/primeng-api.mjs +42 -33
- package/fesm2022/primeng-api.mjs.map +1 -1
- package/fesm2022/primeng-autocomplete.mjs +881 -1051
- package/fesm2022/primeng-autocomplete.mjs.map +1 -1
- package/fesm2022/primeng-autofocus.mjs +13 -18
- package/fesm2022/primeng-autofocus.mjs.map +1 -1
- package/fesm2022/primeng-avatar.mjs +71 -74
- package/fesm2022/primeng-avatar.mjs.map +1 -1
- package/fesm2022/primeng-avatargroup.mjs +13 -20
- package/fesm2022/primeng-avatargroup.mjs.map +1 -1
- package/fesm2022/primeng-badge.mjs +45 -301
- package/fesm2022/primeng-badge.mjs.map +1 -1
- package/fesm2022/primeng-base.mjs +3 -3
- package/fesm2022/primeng-base.mjs.map +1 -1
- package/fesm2022/primeng-basecomponent.mjs +79 -30
- package/fesm2022/primeng-basecomponent.mjs.map +1 -1
- package/fesm2022/primeng-baseeditableholder.mjs +9 -6
- package/fesm2022/primeng-baseeditableholder.mjs.map +1 -1
- package/fesm2022/primeng-baseinput.mjs +28 -13
- package/fesm2022/primeng-baseinput.mjs.map +1 -1
- package/fesm2022/primeng-basemodelholder.mjs +7 -5
- package/fesm2022/primeng-basemodelholder.mjs.map +1 -1
- package/fesm2022/primeng-bind.mjs +22 -19
- package/fesm2022/primeng-bind.mjs.map +1 -1
- package/fesm2022/primeng-blockui.mjs +86 -110
- package/fesm2022/primeng-blockui.mjs.map +1 -1
- package/fesm2022/primeng-breadcrumb.mjs +414 -350
- package/fesm2022/primeng-breadcrumb.mjs.map +1 -1
- package/fesm2022/primeng-button.mjs +556 -785
- package/fesm2022/primeng-button.mjs.map +1 -1
- package/fesm2022/primeng-buttongroup.mjs +11 -11
- package/fesm2022/primeng-buttongroup.mjs.map +1 -1
- package/fesm2022/primeng-card.mjs +103 -163
- package/fesm2022/primeng-card.mjs.map +1 -1
- package/fesm2022/primeng-carousel.mjs +1430 -583
- package/fesm2022/primeng-carousel.mjs.map +1 -1
- package/fesm2022/primeng-cascadeselect.mjs +596 -661
- package/fesm2022/primeng-cascadeselect.mjs.map +1 -1
- package/fesm2022/primeng-chart.mjs +65 -100
- package/fesm2022/primeng-chart.mjs.map +1 -1
- package/fesm2022/primeng-checkbox.mjs +178 -204
- package/fesm2022/primeng-checkbox.mjs.map +1 -1
- package/fesm2022/primeng-chip.mjs +145 -219
- package/fesm2022/primeng-chip.mjs.map +1 -1
- package/fesm2022/primeng-classnames.mjs +9 -8
- package/fesm2022/primeng-classnames.mjs.map +1 -1
- package/fesm2022/primeng-colorpicker.mjs +129 -193
- package/fesm2022/primeng-colorpicker.mjs.map +1 -1
- package/fesm2022/primeng-commandmenu.mjs +421 -0
- package/fesm2022/primeng-commandmenu.mjs.map +1 -0
- package/fesm2022/primeng-compare.mjs +520 -0
- package/fesm2022/primeng-compare.mjs.map +1 -0
- package/fesm2022/primeng-config.mjs +47 -22
- package/fesm2022/primeng-config.mjs.map +1 -1
- package/fesm2022/primeng-confirmdialog.mjs +303 -415
- package/fesm2022/primeng-confirmdialog.mjs.map +1 -1
- package/fesm2022/primeng-confirmpopup.mjs +252 -268
- package/fesm2022/primeng-confirmpopup.mjs.map +1 -1
- package/fesm2022/primeng-contextmenu.mjs +550 -637
- package/fesm2022/primeng-contextmenu.mjs.map +1 -1
- package/fesm2022/primeng-dataview.mjs +323 -390
- package/fesm2022/primeng-dataview.mjs.map +1 -1
- package/fesm2022/primeng-datepicker.mjs +1697 -1671
- package/fesm2022/primeng-datepicker.mjs.map +1 -1
- package/fesm2022/primeng-dialog.mjs +463 -640
- package/fesm2022/primeng-dialog.mjs.map +1 -1
- package/fesm2022/primeng-divider.mjs +56 -58
- package/fesm2022/primeng-divider.mjs.map +1 -1
- package/fesm2022/primeng-dock.mjs +262 -272
- package/fesm2022/primeng-dock.mjs.map +1 -1
- package/fesm2022/primeng-dom.mjs +2 -2
- package/fesm2022/primeng-dom.mjs.map +1 -1
- package/fesm2022/primeng-dragdrop.mjs +29 -53
- package/fesm2022/primeng-dragdrop.mjs.map +1 -1
- package/fesm2022/primeng-drawer.mjs +196 -264
- package/fesm2022/primeng-drawer.mjs.map +1 -1
- package/fesm2022/primeng-dynamicdialog.mjs +310 -289
- package/fesm2022/primeng-dynamicdialog.mjs.map +1 -1
- package/fesm2022/primeng-editor.mjs +179 -207
- package/fesm2022/primeng-editor.mjs.map +1 -1
- package/fesm2022/primeng-fieldset.mjs +172 -210
- package/fesm2022/primeng-fieldset.mjs.map +1 -1
- package/fesm2022/primeng-fileupload.mjs +743 -834
- package/fesm2022/primeng-fileupload.mjs.map +1 -1
- package/fesm2022/primeng-floatlabel.mjs +28 -35
- package/fesm2022/primeng-floatlabel.mjs.map +1 -1
- package/fesm2022/primeng-fluid.mjs +10 -10
- package/fesm2022/primeng-fluid.mjs.map +1 -1
- package/fesm2022/primeng-focustrap.mjs +34 -29
- package/fesm2022/primeng-focustrap.mjs.map +1 -1
- package/fesm2022/primeng-galleria.mjs +1459 -1740
- package/fesm2022/primeng-galleria.mjs.map +1 -1
- package/fesm2022/primeng-gallery.mjs +1859 -0
- package/fesm2022/primeng-gallery.mjs.map +1 -0
- package/fesm2022/primeng-iconfield.mjs +20 -37
- package/fesm2022/primeng-iconfield.mjs.map +1 -1
- package/fesm2022/primeng-icons-angledoubledown.mjs +3 -3
- package/fesm2022/primeng-icons-angledoubledown.mjs.map +1 -1
- package/fesm2022/primeng-icons-angledoubleleft.mjs +3 -3
- package/fesm2022/primeng-icons-angledoubleleft.mjs.map +1 -1
- package/fesm2022/primeng-icons-angledoubleright.mjs +3 -3
- package/fesm2022/primeng-icons-angledoubleright.mjs.map +1 -1
- package/fesm2022/primeng-icons-angledoubleup.mjs +3 -3
- package/fesm2022/primeng-icons-angledoubleup.mjs.map +1 -1
- package/fesm2022/primeng-icons-angledown.mjs +3 -3
- package/fesm2022/primeng-icons-angledown.mjs.map +1 -1
- package/fesm2022/primeng-icons-angleleft.mjs +3 -3
- package/fesm2022/primeng-icons-angleleft.mjs.map +1 -1
- package/fesm2022/primeng-icons-angleright.mjs +3 -3
- package/fesm2022/primeng-icons-angleright.mjs.map +1 -1
- package/fesm2022/primeng-icons-angleup.mjs +3 -3
- package/fesm2022/primeng-icons-angleup.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowdown.mjs +3 -3
- package/fesm2022/primeng-icons-arrowdown.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowdownleft.mjs +3 -3
- package/fesm2022/primeng-icons-arrowdownleft.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowdownright.mjs +3 -3
- package/fesm2022/primeng-icons-arrowdownright.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowleft.mjs +3 -3
- package/fesm2022/primeng-icons-arrowleft.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowright.mjs +3 -3
- package/fesm2022/primeng-icons-arrowright.mjs.map +1 -1
- package/fesm2022/primeng-icons-arrowup.mjs +3 -3
- package/fesm2022/primeng-icons-arrowup.mjs.map +1 -1
- package/fesm2022/primeng-icons-ban.mjs +3 -3
- package/fesm2022/primeng-icons-ban.mjs.map +1 -1
- package/fesm2022/primeng-icons-bars.mjs +3 -3
- package/fesm2022/primeng-icons-bars.mjs.map +1 -1
- package/fesm2022/primeng-icons-baseicon.mjs +6 -6
- package/fesm2022/primeng-icons-baseicon.mjs.map +1 -1
- package/fesm2022/primeng-icons-blank.mjs +3 -3
- package/fesm2022/primeng-icons-blank.mjs.map +1 -1
- package/fesm2022/primeng-icons-calendar.mjs +3 -3
- package/fesm2022/primeng-icons-calendar.mjs.map +1 -1
- package/fesm2022/primeng-icons-caretleft.mjs +3 -3
- package/fesm2022/primeng-icons-caretleft.mjs.map +1 -1
- package/fesm2022/primeng-icons-caretright.mjs +3 -3
- package/fesm2022/primeng-icons-caretright.mjs.map +1 -1
- package/fesm2022/primeng-icons-check.mjs +3 -3
- package/fesm2022/primeng-icons-check.mjs.map +1 -1
- package/fesm2022/primeng-icons-chevrondown.mjs +3 -3
- package/fesm2022/primeng-icons-chevrondown.mjs.map +1 -1
- package/fesm2022/primeng-icons-chevronleft.mjs +3 -3
- package/fesm2022/primeng-icons-chevronleft.mjs.map +1 -1
- package/fesm2022/primeng-icons-chevronright.mjs +3 -3
- package/fesm2022/primeng-icons-chevronright.mjs.map +1 -1
- package/fesm2022/primeng-icons-chevronup.mjs +3 -3
- package/fesm2022/primeng-icons-chevronup.mjs.map +1 -1
- package/fesm2022/primeng-icons-exclamationtriangle.mjs +3 -3
- package/fesm2022/primeng-icons-exclamationtriangle.mjs.map +1 -1
- package/fesm2022/primeng-icons-eye.mjs +3 -3
- package/fesm2022/primeng-icons-eye.mjs.map +1 -1
- package/fesm2022/primeng-icons-eyeslash.mjs +3 -3
- package/fesm2022/primeng-icons-eyeslash.mjs.map +1 -1
- package/fesm2022/primeng-icons-filter.mjs +3 -3
- package/fesm2022/primeng-icons-filter.mjs.map +1 -1
- package/fesm2022/primeng-icons-filterfill.mjs +3 -3
- package/fesm2022/primeng-icons-filterfill.mjs.map +1 -1
- package/fesm2022/primeng-icons-filterslash.mjs +3 -3
- package/fesm2022/primeng-icons-filterslash.mjs.map +1 -1
- package/fesm2022/primeng-icons-home.mjs +3 -3
- package/fesm2022/primeng-icons-home.mjs.map +1 -1
- package/fesm2022/primeng-icons-infocircle.mjs +3 -3
- package/fesm2022/primeng-icons-infocircle.mjs.map +1 -1
- package/fesm2022/primeng-icons-minus.mjs +3 -3
- package/fesm2022/primeng-icons-minus.mjs.map +1 -1
- package/fesm2022/primeng-icons-pencil.mjs +3 -3
- package/fesm2022/primeng-icons-pencil.mjs.map +1 -1
- package/fesm2022/primeng-icons-plus.mjs +3 -3
- package/fesm2022/primeng-icons-plus.mjs.map +1 -1
- package/fesm2022/primeng-icons-refresh.mjs +3 -3
- package/fesm2022/primeng-icons-refresh.mjs.map +1 -1
- package/fesm2022/primeng-icons-search.mjs +3 -3
- package/fesm2022/primeng-icons-search.mjs.map +1 -1
- package/fesm2022/primeng-icons-searchminus.mjs +3 -3
- package/fesm2022/primeng-icons-searchminus.mjs.map +1 -1
- package/fesm2022/primeng-icons-searchplus.mjs +3 -3
- package/fesm2022/primeng-icons-searchplus.mjs.map +1 -1
- package/fesm2022/primeng-icons-sortalt.mjs +3 -3
- package/fesm2022/primeng-icons-sortalt.mjs.map +1 -1
- package/fesm2022/primeng-icons-sortamountdown.mjs +3 -3
- package/fesm2022/primeng-icons-sortamountdown.mjs.map +1 -1
- package/fesm2022/primeng-icons-sortamountupalt.mjs +3 -3
- package/fesm2022/primeng-icons-sortamountupalt.mjs.map +1 -1
- package/fesm2022/primeng-icons-spinner.mjs +3 -3
- package/fesm2022/primeng-icons-spinner.mjs.map +1 -1
- package/fesm2022/primeng-icons-star.mjs +3 -3
- package/fesm2022/primeng-icons-star.mjs.map +1 -1
- package/fesm2022/primeng-icons-starfill.mjs +3 -3
- package/fesm2022/primeng-icons-starfill.mjs.map +1 -1
- package/fesm2022/primeng-icons-thlarge.mjs +3 -3
- package/fesm2022/primeng-icons-thlarge.mjs.map +1 -1
- package/fesm2022/primeng-icons-times.mjs +3 -3
- package/fesm2022/primeng-icons-times.mjs.map +1 -1
- package/fesm2022/primeng-icons-timescircle.mjs +3 -3
- package/fesm2022/primeng-icons-timescircle.mjs.map +1 -1
- package/fesm2022/primeng-icons-trash.mjs +3 -3
- package/fesm2022/primeng-icons-trash.mjs.map +1 -1
- package/fesm2022/primeng-icons-undo.mjs +3 -3
- package/fesm2022/primeng-icons-undo.mjs.map +1 -1
- package/fesm2022/primeng-icons-upload.mjs +3 -3
- package/fesm2022/primeng-icons-upload.mjs.map +1 -1
- package/fesm2022/primeng-icons-windowmaximize.mjs +3 -3
- package/fesm2022/primeng-icons-windowmaximize.mjs.map +1 -1
- package/fesm2022/primeng-icons-windowminimize.mjs +3 -3
- package/fesm2022/primeng-icons-windowminimize.mjs.map +1 -1
- package/fesm2022/primeng-iftalabel.mjs +16 -26
- package/fesm2022/primeng-iftalabel.mjs.map +1 -1
- package/fesm2022/primeng-image.mjs +253 -327
- package/fesm2022/primeng-image.mjs.map +1 -1
- package/fesm2022/primeng-imagecompare.mjs +46 -69
- package/fesm2022/primeng-imagecompare.mjs.map +1 -1
- package/fesm2022/primeng-inplace.mjs +79 -172
- package/fesm2022/primeng-inplace.mjs.map +1 -1
- package/fesm2022/primeng-inputcolor.mjs +2262 -0
- package/fesm2022/primeng-inputcolor.mjs.map +1 -0
- package/fesm2022/primeng-inputgroup.mjs +16 -31
- package/fesm2022/primeng-inputgroup.mjs.map +1 -1
- package/fesm2022/primeng-inputgroupaddon.mjs +14 -34
- package/fesm2022/primeng-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/primeng-inputicon.mjs +18 -28
- package/fesm2022/primeng-inputicon.mjs.map +1 -1
- package/fesm2022/primeng-inputmask.mjs +259 -273
- package/fesm2022/primeng-inputmask.mjs.map +1 -1
- package/fesm2022/primeng-inputnumber.mjs +458 -505
- package/fesm2022/primeng-inputnumber.mjs.map +1 -1
- package/fesm2022/primeng-inputotp.mjs +117 -136
- package/fesm2022/primeng-inputotp.mjs.map +1 -1
- package/fesm2022/primeng-inputpassword.mjs +102 -0
- package/fesm2022/primeng-inputpassword.mjs.map +1 -0
- package/fesm2022/primeng-inputtags.mjs +748 -0
- package/fesm2022/primeng-inputtags.mjs.map +1 -0
- package/fesm2022/primeng-inputtext.mjs +39 -61
- package/fesm2022/primeng-inputtext.mjs.map +1 -1
- package/fesm2022/primeng-keyfilter.mjs +38 -62
- package/fesm2022/primeng-keyfilter.mjs.map +1 -1
- package/fesm2022/primeng-knob.mjs +106 -139
- package/fesm2022/primeng-knob.mjs.map +1 -1
- package/fesm2022/primeng-label.mjs +85 -0
- package/fesm2022/primeng-label.mjs.map +1 -0
- package/fesm2022/primeng-license.mjs +39 -0
- package/fesm2022/primeng-license.mjs.map +1 -0
- package/fesm2022/primeng-listbox.mjs +960 -835
- package/fesm2022/primeng-listbox.mjs.map +1 -1
- package/fesm2022/primeng-megamenu.mjs +781 -783
- package/fesm2022/primeng-megamenu.mjs.map +1 -1
- package/fesm2022/primeng-menu.mjs +635 -559
- package/fesm2022/primeng-menu.mjs.map +1 -1
- package/fesm2022/primeng-menubar.mjs +651 -741
- package/fesm2022/primeng-menubar.mjs.map +1 -1
- package/fesm2022/primeng-message.mjs +97 -198
- package/fesm2022/primeng-message.mjs.map +1 -1
- package/fesm2022/primeng-metergroup.mjs +199 -283
- package/fesm2022/primeng-metergroup.mjs.map +1 -1
- package/fesm2022/primeng-motion.mjs +59 -48
- package/fesm2022/primeng-motion.mjs.map +1 -1
- package/fesm2022/primeng-multiselect.mjs +1002 -1157
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-orderlist.mjs +424 -614
- package/fesm2022/primeng-orderlist.mjs.map +1 -1
- package/fesm2022/primeng-organizationchart.mjs +662 -376
- package/fesm2022/primeng-organizationchart.mjs.map +1 -1
- package/fesm2022/primeng-overlay.mjs +272 -400
- package/fesm2022/primeng-overlay.mjs.map +1 -1
- package/fesm2022/primeng-overlaybadge.mjs +29 -56
- package/fesm2022/primeng-overlaybadge.mjs.map +1 -1
- package/fesm2022/primeng-paginator.mjs +391 -455
- package/fesm2022/primeng-paginator.mjs.map +1 -1
- package/fesm2022/primeng-panel.mjs +218 -299
- package/fesm2022/primeng-panel.mjs.map +1 -1
- package/fesm2022/primeng-panelmenu.mjs +853 -873
- package/fesm2022/primeng-panelmenu.mjs.map +1 -1
- package/fesm2022/primeng-password.mjs +275 -361
- package/fesm2022/primeng-password.mjs.map +1 -1
- package/fesm2022/primeng-picklist.mjs +881 -1124
- package/fesm2022/primeng-picklist.mjs.map +1 -1
- package/fesm2022/primeng-popover.mjs +102 -142
- package/fesm2022/primeng-popover.mjs.map +1 -1
- package/fesm2022/primeng-progressbar.mjs +80 -96
- package/fesm2022/primeng-progressbar.mjs.map +1 -1
- package/fesm2022/primeng-progressspinner.mjs +215 -50
- package/fesm2022/primeng-progressspinner.mjs.map +1 -1
- package/fesm2022/primeng-radiobutton.mjs +85 -118
- package/fesm2022/primeng-radiobutton.mjs.map +1 -1
- package/fesm2022/primeng-rating.mjs +250 -172
- package/fesm2022/primeng-rating.mjs.map +1 -1
- package/fesm2022/primeng-ripple.mjs +14 -18
- package/fesm2022/primeng-ripple.mjs.map +1 -1
- package/fesm2022/primeng-scrollarea.mjs +730 -0
- package/fesm2022/primeng-scrollarea.mjs.map +1 -0
- package/fesm2022/primeng-scroller.mjs +473 -617
- package/fesm2022/primeng-scroller.mjs.map +1 -1
- package/fesm2022/primeng-scrollpanel.mjs +98 -127
- package/fesm2022/primeng-scrollpanel.mjs.map +1 -1
- package/fesm2022/primeng-scrolltop.mjs +121 -145
- package/fesm2022/primeng-scrolltop.mjs.map +1 -1
- package/fesm2022/primeng-select.mjs +968 -1074
- package/fesm2022/primeng-select.mjs.map +1 -1
- package/fesm2022/primeng-selectbutton.mjs +117 -160
- package/fesm2022/primeng-selectbutton.mjs.map +1 -1
- package/fesm2022/primeng-sidebar.mjs +1462 -0
- package/fesm2022/primeng-sidebar.mjs.map +1 -0
- package/fesm2022/primeng-skeleton.mjs +51 -60
- package/fesm2022/primeng-skeleton.mjs.map +1 -1
- package/fesm2022/primeng-slider.mjs +566 -679
- package/fesm2022/primeng-slider.mjs.map +1 -1
- package/fesm2022/primeng-speeddial.mjs +352 -397
- package/fesm2022/primeng-speeddial.mjs.map +1 -1
- package/fesm2022/primeng-splitbutton.mjs +241 -343
- package/fesm2022/primeng-splitbutton.mjs.map +1 -1
- package/fesm2022/primeng-splitter.mjs +590 -338
- package/fesm2022/primeng-splitter.mjs.map +1 -1
- package/fesm2022/primeng-stepper.mjs +382 -400
- package/fesm2022/primeng-stepper.mjs.map +1 -1
- package/fesm2022/primeng-steps.mjs +11 -11
- package/fesm2022/primeng-steps.mjs.map +1 -1
- package/fesm2022/primeng-styleclass.mjs +89 -112
- package/fesm2022/primeng-styleclass.mjs.map +1 -1
- package/fesm2022/primeng-table.mjs +3714 -4341
- package/fesm2022/primeng-table.mjs.map +1 -1
- package/fesm2022/primeng-tabs.mjs +189 -168
- package/fesm2022/primeng-tabs.mjs.map +1 -1
- package/fesm2022/primeng-tag.mjs +71 -90
- package/fesm2022/primeng-tag.mjs.map +1 -1
- package/fesm2022/primeng-terminal.mjs +62 -69
- package/fesm2022/primeng-terminal.mjs.map +1 -1
- package/fesm2022/primeng-textarea.mjs +40 -57
- package/fesm2022/primeng-textarea.mjs.map +1 -1
- package/fesm2022/primeng-tieredmenu.mjs +627 -705
- package/fesm2022/primeng-tieredmenu.mjs.map +1 -1
- package/fesm2022/primeng-timeline.mjs +73 -112
- package/fesm2022/primeng-timeline.mjs.map +1 -1
- package/fesm2022/primeng-toast.mjs +742 -357
- package/fesm2022/primeng-toast.mjs.map +1 -1
- package/fesm2022/primeng-togglebutton.mjs +131 -175
- package/fesm2022/primeng-togglebutton.mjs.map +1 -1
- package/fesm2022/primeng-toggleswitch.mjs +91 -141
- package/fesm2022/primeng-toggleswitch.mjs.map +1 -1
- package/fesm2022/primeng-toolbar.mjs +53 -84
- package/fesm2022/primeng-toolbar.mjs.map +1 -1
- package/fesm2022/primeng-tooltip.mjs +239 -311
- package/fesm2022/primeng-tooltip.mjs.map +1 -1
- package/fesm2022/primeng-tree.mjs +967 -917
- package/fesm2022/primeng-tree.mjs.map +1 -1
- package/fesm2022/primeng-treeselect.mjs +442 -587
- package/fesm2022/primeng-treeselect.mjs.map +1 -1
- package/fesm2022/primeng-treetable.mjs +2096 -2366
- package/fesm2022/primeng-treetable.mjs.map +1 -1
- package/fesm2022/primeng-types-commandmenu.mjs +4 -0
- package/fesm2022/primeng-types-commandmenu.mjs.map +1 -0
- package/fesm2022/primeng-types-compare.mjs +4 -0
- package/fesm2022/primeng-types-compare.mjs.map +1 -0
- package/fesm2022/primeng-types-gallery.mjs +4 -0
- package/fesm2022/primeng-types-gallery.mjs.map +1 -0
- package/fesm2022/primeng-types-inputcolor.mjs +4 -0
- package/fesm2022/primeng-types-inputcolor.mjs.map +1 -0
- package/fesm2022/primeng-types-inputpassword.mjs +4 -0
- package/fesm2022/primeng-types-inputpassword.mjs.map +1 -0
- package/fesm2022/primeng-types-inputtags.mjs +4 -0
- package/fesm2022/primeng-types-inputtags.mjs.map +1 -0
- package/fesm2022/primeng-types-label.mjs +4 -0
- package/fesm2022/primeng-types-label.mjs.map +1 -0
- package/fesm2022/primeng-types-scrollarea.mjs +4 -0
- package/fesm2022/primeng-types-scrollarea.mjs.map +1 -0
- package/fesm2022/primeng-types-shared.mjs +4 -0
- package/fesm2022/primeng-types-shared.mjs.map +1 -0
- package/fesm2022/primeng-types-sidebar.mjs +4 -0
- package/fesm2022/primeng-types-sidebar.mjs.map +1 -0
- package/fesm2022/primeng-usestyle.mjs +3 -3
- package/fesm2022/primeng-usestyle.mjs.map +1 -1
- package/fesm2022/primeng-utils.mjs.map +1 -1
- package/package.json +99 -20
- package/types/primeng-accordion.d.ts +45 -82
- package/types/primeng-animateonscroll.d.ts +15 -17
- package/types/primeng-api.d.ts +48 -18
- package/types/primeng-autocomplete.d.ts +210 -229
- package/types/primeng-autofocus.d.ts +2 -4
- package/types/primeng-avatar.d.ts +19 -26
- package/types/primeng-avatargroup.d.ts +4 -12
- package/types/primeng-badge.d.ts +10 -98
- package/types/primeng-base.d.ts +6 -6
- package/types/primeng-basecomponent.d.ts +3 -0
- package/types/primeng-baseinput.d.ts +2 -1
- package/types/primeng-bind.d.ts +3 -4
- package/types/primeng-blockui.d.ts +11 -25
- package/types/primeng-breadcrumb.d.ts +30 -30
- package/types/primeng-button.d.ts +242 -265
- package/types/primeng-buttongroup.d.ts +1 -1
- package/types/primeng-card.d.ts +28 -47
- package/types/primeng-carousel.d.ts +411 -112
- package/types/primeng-cascadeselect.d.ts +151 -198
- package/types/primeng-chart.d.ts +31 -33
- package/types/primeng-checkbox.d.ts +60 -64
- package/types/primeng-chip.d.ts +38 -46
- package/types/primeng-colorpicker.d.ts +40 -62
- package/types/primeng-commandmenu.d.ts +182 -0
- package/types/primeng-compare.d.ts +225 -0
- package/types/primeng-config.d.ts +63 -18
- package/types/primeng-confirmdialog.d.ts +79 -95
- package/types/primeng-confirmpopup.d.ts +33 -39
- package/types/primeng-contextmenu.d.ts +125 -118
- package/types/primeng-dataview.d.ts +74 -92
- package/types/primeng-datepicker.d.ts +167 -198
- package/types/primeng-dialog.d.ts +100 -174
- package/types/primeng-divider.d.ts +9 -15
- package/types/primeng-dock.d.ts +48 -54
- package/types/primeng-dragdrop.d.ts +5 -9
- package/types/primeng-drawer.d.ts +38 -69
- package/types/primeng-dynamicdialog.d.ts +76 -54
- package/types/primeng-editor.d.ts +35 -44
- package/types/primeng-fieldset.d.ts +46 -63
- package/types/primeng-fileupload.d.ts +110 -130
- package/types/primeng-floatlabel.d.ts +6 -6
- package/types/primeng-focustrap.d.ts +6 -10
- package/types/primeng-galleria.d.ts +68 -312
- package/types/primeng-gallery.d.ts +653 -0
- package/types/primeng-iconfield.d.ts +6 -18
- package/types/primeng-iftalabel.d.ts +7 -9
- package/types/primeng-image.d.ts +59 -72
- package/types/primeng-imagecompare.d.ts +11 -14
- package/types/primeng-inplace.d.ts +13 -52
- package/types/primeng-inputcolor.d.ts +568 -0
- package/types/primeng-inputgroup.d.ts +1 -7
- package/types/primeng-inputgroupaddon.d.ts +1 -16
- package/types/primeng-inputicon.d.ts +3 -9
- package/types/primeng-inputmask.d.ts +63 -59
- package/types/primeng-inputnumber.d.ts +82 -94
- package/types/primeng-inputotp.d.ts +54 -56
- package/types/primeng-inputpassword.d.ts +63 -0
- package/types/primeng-inputtags.d.ts +315 -0
- package/types/primeng-inputtext.d.ts +10 -15
- package/types/primeng-keyfilter.d.ts +9 -12
- package/types/primeng-knob.d.ts +31 -42
- package/types/primeng-label.d.ts +55 -0
- package/types/primeng-license.d.ts +23 -0
- package/types/primeng-listbox.d.ts +277 -149
- package/types/primeng-megamenu.d.ts +144 -133
- package/types/primeng-menu.d.ts +155 -137
- package/types/primeng-menubar.d.ts +148 -166
- package/types/primeng-message.d.ts +29 -75
- package/types/primeng-metergroup.d.ts +54 -54
- package/types/primeng-multiselect.d.ts +195 -222
- package/types/primeng-orderlist.d.ts +146 -113
- package/types/primeng-organizationchart.d.ts +112 -138
- package/types/primeng-overlay.d.ts +59 -114
- package/types/primeng-overlaybadge.d.ts +11 -21
- package/types/primeng-paginator.d.ts +57 -90
- package/types/primeng-panel.d.ts +48 -71
- package/types/primeng-panelmenu.d.ts +60 -179
- package/types/primeng-password.d.ts +74 -109
- package/types/primeng-picklist.d.ts +307 -201
- package/types/primeng-popover.d.ts +36 -55
- package/types/primeng-progressbar.d.ts +26 -32
- package/types/primeng-progressspinner.d.ts +60 -26
- package/types/primeng-radiobutton.d.ts +33 -38
- package/types/primeng-rating.d.ts +71 -57
- package/types/primeng-ripple.d.ts +2 -5
- package/types/primeng-scrollarea.d.ts +286 -0
- package/types/primeng-scroller.d.ts +145 -135
- package/types/primeng-scrollpanel.d.ts +32 -42
- package/types/primeng-scrolltop.d.ts +33 -49
- package/types/primeng-select.d.ts +163 -198
- package/types/primeng-selectbutton.d.ts +45 -47
- package/types/primeng-sidebar.d.ts +669 -0
- package/types/primeng-skeleton.d.ts +23 -24
- package/types/primeng-slider.d.ts +205 -102
- package/types/primeng-speeddial.d.ts +72 -98
- package/types/primeng-splitbutton.d.ts +54 -89
- package/types/primeng-splitter.d.ts +213 -91
- package/types/primeng-stepper.d.ts +192 -218
- package/types/primeng-styleclass.d.ts +20 -25
- package/types/primeng-table.d.ts +529 -654
- package/types/primeng-tabs.d.ts +34 -38
- package/types/primeng-tag.d.ts +12 -23
- package/types/primeng-terminal.d.ts +12 -16
- package/types/primeng-textarea.d.ts +23 -24
- package/types/primeng-tieredmenu.d.ts +134 -147
- package/types/primeng-timeline.d.ts +18 -31
- package/types/primeng-toast.d.ts +70 -105
- package/types/primeng-togglebutton.d.ts +47 -51
- package/types/primeng-toggleswitch.d.ts +36 -43
- package/types/primeng-toolbar.d.ts +7 -18
- package/types/primeng-tooltip.d.ts +51 -86
- package/types/primeng-tree.d.ts +107 -204
- package/types/primeng-treeselect.d.ts +115 -130
- package/types/primeng-treetable.d.ts +467 -400
- package/types/primeng-types-accordion.d.ts +39 -1
- package/types/primeng-types-avatar.d.ts +11 -1
- package/types/primeng-types-badge.d.ts +11 -1
- package/types/primeng-types-button.d.ts +26 -7
- package/types/primeng-types-carousel.d.ts +102 -1
- package/types/primeng-types-cascadeselect.d.ts +64 -1
- package/types/primeng-types-chart.d.ts +26 -1
- package/types/primeng-types-checkbox.d.ts +4 -0
- package/types/primeng-types-chip.d.ts +2 -3
- package/types/primeng-types-colorpicker.d.ts +6 -1
- package/types/primeng-types-commandmenu.d.ts +154 -0
- package/types/primeng-types-compare.d.ts +55 -0
- package/types/primeng-types-confirmdialog.d.ts +15 -1
- package/types/primeng-types-confirmpopup.d.ts +6 -1
- package/types/primeng-types-contextmenu.d.ts +34 -1
- package/types/primeng-types-dataview.d.ts +12 -2
- package/types/primeng-types-datepicker.d.ts +16 -2
- package/types/primeng-types-dialog.d.ts +19 -2
- package/types/primeng-types-divider.d.ts +16 -1
- package/types/primeng-types-dock.d.ts +6 -1
- package/types/primeng-types-drawer.d.ts +2 -1
- package/types/primeng-types-fieldset.d.ts +20 -1
- package/types/primeng-types-fileupload.d.ts +60 -4
- package/types/primeng-types-floatlabel.d.ts +2 -1
- package/types/primeng-types-galleria.d.ts +10 -1
- package/types/primeng-types-gallery.d.ts +434 -0
- package/types/primeng-types-iconfield.d.ts +2 -1
- package/types/primeng-types-image.d.ts +6 -1
- package/types/primeng-types-inputcolor.d.ts +206 -0
- package/types/primeng-types-inputnumber.d.ts +21 -1
- package/types/primeng-types-inputpassword.d.ts +24 -0
- package/types/primeng-types-inputtags.d.ts +178 -0
- package/types/primeng-types-label.d.ts +24 -0
- package/types/primeng-types-megamenu.d.ts +47 -2
- package/types/primeng-types-menu.d.ts +23 -2
- package/types/primeng-types-menubar.d.ts +48 -1
- package/types/primeng-types-message.d.ts +26 -1
- package/types/primeng-types-metergroup.d.ts +4 -2
- package/types/primeng-types-multiselect.d.ts +41 -1
- package/types/primeng-types-orderlist.d.ts +5 -1
- package/types/primeng-types-organizationchart.d.ts +125 -37
- package/types/primeng-types-panel.d.ts +11 -1
- package/types/primeng-types-panelmenu.d.ts +50 -1
- package/types/primeng-types-picklist.d.ts +11 -1
- package/types/primeng-types-progressbar.d.ts +6 -1
- package/types/primeng-types-progressspinner.d.ts +13 -5
- package/types/primeng-types-scrollarea.d.ts +60 -0
- package/types/primeng-types-scrollpanel.d.ts +6 -1
- package/types/primeng-types-scrolltop.d.ts +11 -1
- package/types/primeng-types-select.d.ts +13 -2
- package/types/primeng-types-shared.d.ts +27 -0
- package/types/primeng-types-sidebar.d.ts +108 -0
- package/types/primeng-types-slider.d.ts +14 -1
- package/types/primeng-types-speeddial.d.ts +11 -1
- package/types/primeng-types-splitbutton.d.ts +6 -16
- package/types/primeng-types-splitter.d.ts +59 -2
- package/types/primeng-types-stepper.d.ts +25 -1
- package/types/primeng-types-table.d.ts +21 -10
- package/types/primeng-types-tabs.d.ts +6 -5
- package/types/primeng-types-tag.d.ts +2 -1
- package/types/primeng-types-tieredmenu.d.ts +111 -3
- package/types/primeng-types-timeline.d.ts +9 -1
- package/types/primeng-types-toast.d.ts +18 -1
- package/types/primeng-types-togglebutton.d.ts +6 -1
- package/types/primeng-types-tooltip.d.ts +11 -1
- package/types/primeng-types-tree.d.ts +14 -1
- package/types/primeng-types-treeselect.d.ts +16 -1
- package/types/primeng-types-treetable.d.ts +31 -1
|
@@ -1,59 +1,27 @@
|
|
|
1
1
|
export * from 'primeng/types/autocomplete';
|
|
2
|
-
import
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
3
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, InjectionToken, forwardRef, inject, input,
|
|
4
|
+
import { Injectable, InjectionToken, forwardRef, inject, input, numberAttribute, booleanAttribute, output, viewChild, contentChild, signal, computed, effect, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
6
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
6
|
+
import { ChevronDown } from '@primeicons/angular/chevron-down';
|
|
7
|
+
import { Spinner } from '@primeicons/angular/spinner';
|
|
8
|
+
import { Times } from '@primeicons/angular/times';
|
|
9
|
+
import { TimesCircle } from '@primeicons/angular/times-circle';
|
|
10
|
+
import { uuid, equals, isNotEmpty, findLastIndex, resolveFieldData, focus, isEmpty, findSingle } from '@primeuix/utils';
|
|
11
|
+
import { OverlayService, TranslationKeys, SharedModule } from 'primeng/api';
|
|
10
12
|
import { AutoFocus } from 'primeng/autofocus';
|
|
11
13
|
import { PARENT_INSTANCE } from 'primeng/basecomponent';
|
|
12
14
|
import { BaseInput } from 'primeng/baseinput';
|
|
13
|
-
import * as
|
|
15
|
+
import * as i1 from 'primeng/bind';
|
|
14
16
|
import { Bind, BindModule } from 'primeng/bind';
|
|
15
17
|
import { Chip } from 'primeng/chip';
|
|
16
|
-
import { TimesCircleIcon, SpinnerIcon, ChevronDownIcon, TimesIcon } from 'primeng/icons';
|
|
17
18
|
import { InputText } from 'primeng/inputtext';
|
|
18
19
|
import { Overlay } from 'primeng/overlay';
|
|
19
20
|
import { Ripple } from 'primeng/ripple';
|
|
20
21
|
import { Scroller } from 'primeng/scroller';
|
|
21
|
-
import { style
|
|
22
|
+
import { style } from '@primeuix/styles/autocomplete';
|
|
22
23
|
import { BaseStyle } from 'primeng/base';
|
|
23
24
|
|
|
24
|
-
const style = /*css*/ `
|
|
25
|
-
${style$1}
|
|
26
|
-
|
|
27
|
-
/* For PrimeNG */
|
|
28
|
-
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input,
|
|
29
|
-
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple,
|
|
30
|
-
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input,
|
|
31
|
-
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-multiple p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input,
|
|
32
|
-
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple {
|
|
33
|
-
border-color: dt('autocomplete.invalid.border.color');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
|
|
37
|
-
p-autoComplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple,
|
|
38
|
-
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
|
|
39
|
-
p-auto-complete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple,
|
|
40
|
-
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input:enabled:focus,
|
|
41
|
-
p-autocomplete.ng-invalid.ng-dirty:not(.p-disabled).p-focus .p-autocomplete-input-multiple {
|
|
42
|
-
border-color: dt('autocomplete.focus.border.color');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder,
|
|
46
|
-
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder,
|
|
47
|
-
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-chip input::placeholder {
|
|
48
|
-
color: dt('autocomplete.invalid.placeholder.color');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
p-autoComplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder,
|
|
52
|
-
p-auto-complete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder,
|
|
53
|
-
p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input::placeholder {
|
|
54
|
-
color: dt('autocomplete.invalid.placeholder.color');
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
25
|
const inlineStyles = {
|
|
58
26
|
root: { position: 'relative' }
|
|
59
27
|
};
|
|
@@ -62,11 +30,10 @@ const classes = {
|
|
|
62
30
|
'p-autocomplete p-component p-inputwrapper',
|
|
63
31
|
{
|
|
64
32
|
'p-invalid': instance.invalid(),
|
|
65
|
-
'p-focus': instance.focused,
|
|
33
|
+
'p-focus': instance.focused(),
|
|
66
34
|
'p-inputwrapper-filled': instance.$filled(),
|
|
67
|
-
'p-inputwrapper-focus': (instance.focused && !instance.$disabled()) || instance.autofocus || instance.overlayVisible,
|
|
68
|
-
'p-autocomplete-open': instance.overlayVisible,
|
|
69
|
-
'p-autocomplete-clearable': instance.showClear && !instance.$disabled(),
|
|
35
|
+
'p-inputwrapper-focus': (instance.focused() && !instance.$disabled()) || instance.autofocus() || instance.overlayVisible(),
|
|
36
|
+
'p-autocomplete-open': instance.overlayVisible(),
|
|
70
37
|
'p-autocomplete-fluid': instance.hasFluid
|
|
71
38
|
}
|
|
72
39
|
],
|
|
@@ -78,6 +45,7 @@ const classes = {
|
|
|
78
45
|
'p-variant-filled': instance.$variant() === 'filled'
|
|
79
46
|
}
|
|
80
47
|
],
|
|
48
|
+
clearIcon: 'p-autocomplete-clear-icon',
|
|
81
49
|
chipItem: ({ instance, i }) => [
|
|
82
50
|
'p-autocomplete-chip-item',
|
|
83
51
|
{
|
|
@@ -99,18 +67,17 @@ const classes = {
|
|
|
99
67
|
'p-focus': instance.focusedOptionIndex() === instance.getOptionIndex(i, scrollerOptions),
|
|
100
68
|
'p-disabled': instance.isOptionDisabled(option)
|
|
101
69
|
}),
|
|
102
|
-
emptyMessage: 'p-autocomplete-empty-message'
|
|
103
|
-
clearIcon: 'p-autocomplete-clear-icon'
|
|
70
|
+
emptyMessage: 'p-autocomplete-empty-message'
|
|
104
71
|
};
|
|
105
72
|
class AutoCompleteStyle extends BaseStyle {
|
|
106
73
|
name = 'autocomplete';
|
|
107
74
|
style = style;
|
|
108
75
|
classes = classes;
|
|
109
76
|
inlineStyles = inlineStyles;
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
111
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
77
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoCompleteStyle, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
78
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoCompleteStyle });
|
|
112
79
|
}
|
|
113
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoCompleteStyle, decorators: [{
|
|
114
81
|
type: Injectable
|
|
115
82
|
}] });
|
|
116
83
|
/**
|
|
@@ -197,510 +164,523 @@ const AUTOCOMPLETE_VALUE_ACCESSOR = {
|
|
|
197
164
|
* @group Components
|
|
198
165
|
*/
|
|
199
166
|
class AutoComplete extends BaseInput {
|
|
200
|
-
overlayService;
|
|
201
|
-
zone;
|
|
202
167
|
componentName = 'AutoComplete';
|
|
203
168
|
$pcAutoComplete = inject(AUTOCOMPLETE_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
204
169
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
205
|
-
/**
|
|
206
|
-
* Minimum number of characters to initiate a search.
|
|
207
|
-
* @deprecated since v20.0.0, use `minQueryLength` instead.
|
|
208
|
-
* @group Props
|
|
209
|
-
*/
|
|
210
|
-
minLength = 1;
|
|
211
170
|
/**
|
|
212
171
|
* Minimum number of characters to initiate a search.
|
|
213
172
|
* @group Props
|
|
214
173
|
*/
|
|
215
|
-
minQueryLength
|
|
174
|
+
minQueryLength = input(/* @ts-ignore */
|
|
175
|
+
...(ngDevMode ? [undefined, { debugName: "minQueryLength" }] : /* istanbul ignore next */ []));
|
|
216
176
|
/**
|
|
217
177
|
* Delay between keystrokes to wait before sending a query.
|
|
218
178
|
* @group Props
|
|
219
179
|
*/
|
|
220
|
-
delay = 300;
|
|
180
|
+
delay = input(300, { ...(ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
221
181
|
/**
|
|
222
182
|
* Inline style of the overlay panel element.
|
|
223
183
|
* @group Props
|
|
224
184
|
*/
|
|
225
|
-
panelStyle
|
|
226
|
-
|
|
227
|
-
* Style class of the component.
|
|
228
|
-
* @deprecated since v20.0.0, use `class` instead.
|
|
229
|
-
* @group Props
|
|
230
|
-
*/
|
|
231
|
-
styleClass;
|
|
185
|
+
panelStyle = input(/* @ts-ignore */
|
|
186
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
232
187
|
/**
|
|
233
188
|
* Style class of the overlay panel element.
|
|
234
189
|
* @group Props
|
|
235
190
|
*/
|
|
236
|
-
panelStyleClass
|
|
191
|
+
panelStyleClass = input(/* @ts-ignore */
|
|
192
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
|
|
237
193
|
/**
|
|
238
194
|
* Inline style of the input field.
|
|
239
195
|
* @group Props
|
|
240
196
|
*/
|
|
241
|
-
inputStyle
|
|
197
|
+
inputStyle = input(/* @ts-ignore */
|
|
198
|
+
...(ngDevMode ? [undefined, { debugName: "inputStyle" }] : /* istanbul ignore next */ []));
|
|
242
199
|
/**
|
|
243
200
|
* Identifier of the focus input to match a label defined for the component.
|
|
244
201
|
* @group Props
|
|
245
202
|
*/
|
|
246
|
-
inputId
|
|
203
|
+
inputId = input(/* @ts-ignore */
|
|
204
|
+
...(ngDevMode ? [undefined, { debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
247
205
|
/**
|
|
248
206
|
* Inline style of the input field.
|
|
249
207
|
* @group Props
|
|
250
208
|
*/
|
|
251
|
-
inputStyleClass
|
|
209
|
+
inputStyleClass = input(/* @ts-ignore */
|
|
210
|
+
...(ngDevMode ? [undefined, { debugName: "inputStyleClass" }] : /* istanbul ignore next */ []));
|
|
252
211
|
/**
|
|
253
212
|
* Hint text for the input field.
|
|
254
213
|
* @group Props
|
|
255
214
|
*/
|
|
256
|
-
placeholder
|
|
215
|
+
placeholder = input(/* @ts-ignore */
|
|
216
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
257
217
|
/**
|
|
258
218
|
* When present, it specifies that the input cannot be typed.
|
|
259
219
|
* @group Props
|
|
260
220
|
*/
|
|
261
|
-
readonly;
|
|
221
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
262
222
|
/**
|
|
263
223
|
* Maximum height of the suggestions panel.
|
|
264
224
|
* @group Props
|
|
265
225
|
*/
|
|
266
|
-
scrollHeight = '200px'
|
|
226
|
+
scrollHeight = input('200px', /* @ts-ignore */
|
|
227
|
+
...(ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
|
|
267
228
|
/**
|
|
268
229
|
* Defines if data is loaded and interacted with in lazy manner.
|
|
269
230
|
* @group Props
|
|
270
231
|
*/
|
|
271
|
-
lazy = false;
|
|
232
|
+
lazy = input(false, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
272
233
|
/**
|
|
273
234
|
* Whether the data should be loaded on demand during scroll.
|
|
274
235
|
* @group Props
|
|
275
236
|
*/
|
|
276
|
-
virtualScroll;
|
|
237
|
+
virtualScroll = input(false, { ...(ngDevMode ? { debugName: "virtualScroll" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
277
238
|
/**
|
|
278
239
|
* Height of an item in the list for VirtualScrolling.
|
|
279
240
|
* @group Props
|
|
280
241
|
*/
|
|
281
|
-
virtualScrollItemSize
|
|
242
|
+
virtualScrollItemSize = input(/* @ts-ignore */
|
|
243
|
+
...(ngDevMode ? [undefined, { debugName: "virtualScrollItemSize" }] : /* istanbul ignore next */ []));
|
|
282
244
|
/**
|
|
283
245
|
* Whether to use the scroller feature. The properties of scroller component can be used like an object in it.
|
|
284
246
|
* @group Props
|
|
285
247
|
*/
|
|
286
|
-
virtualScrollOptions
|
|
248
|
+
virtualScrollOptions = input(/* @ts-ignore */
|
|
249
|
+
...(ngDevMode ? [undefined, { debugName: "virtualScrollOptions" }] : /* istanbul ignore next */ []));
|
|
287
250
|
/**
|
|
288
251
|
* When enabled, highlights the first item in the list by default.
|
|
289
252
|
* @group Props
|
|
290
253
|
*/
|
|
291
|
-
autoHighlight;
|
|
254
|
+
autoHighlight = input(false, { ...(ngDevMode ? { debugName: "autoHighlight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
292
255
|
/**
|
|
293
256
|
* When present, autocomplete clears the manual input if it does not match of the suggestions to force only accepting values from the suggestions.
|
|
294
257
|
* @group Props
|
|
295
258
|
*/
|
|
296
|
-
forceSelection;
|
|
259
|
+
forceSelection = input(false, { ...(ngDevMode ? { debugName: "forceSelection" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
297
260
|
/**
|
|
298
261
|
* Type of the input, defaults to "text".
|
|
299
262
|
* @group Props
|
|
300
263
|
*/
|
|
301
|
-
type = 'text'
|
|
264
|
+
type = input('text', /* @ts-ignore */
|
|
265
|
+
...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
|
|
302
266
|
/**
|
|
303
267
|
* Whether to automatically manage layering.
|
|
304
268
|
* @group Props
|
|
305
269
|
*/
|
|
306
|
-
autoZIndex = true;
|
|
270
|
+
autoZIndex = input(true, { ...(ngDevMode ? { debugName: "autoZIndex" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
307
271
|
/**
|
|
308
272
|
* Base zIndex value to use in layering.
|
|
309
273
|
* @group Props
|
|
310
274
|
*/
|
|
311
|
-
baseZIndex = 0;
|
|
275
|
+
baseZIndex = input(0, { ...(ngDevMode ? { debugName: "baseZIndex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
312
276
|
/**
|
|
313
277
|
* Defines a string that labels the input for accessibility.
|
|
314
278
|
* @group Props
|
|
315
279
|
*/
|
|
316
|
-
ariaLabel
|
|
280
|
+
ariaLabel = input(/* @ts-ignore */
|
|
281
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
317
282
|
/**
|
|
318
283
|
* Defines a string that labels the dropdown button for accessibility.
|
|
319
284
|
* @group Props
|
|
320
285
|
*/
|
|
321
|
-
dropdownAriaLabel
|
|
286
|
+
dropdownAriaLabel = input(/* @ts-ignore */
|
|
287
|
+
...(ngDevMode ? [undefined, { debugName: "dropdownAriaLabel" }] : /* istanbul ignore next */ []));
|
|
322
288
|
/**
|
|
323
289
|
* Specifies one or more IDs in the DOM that labels the input field.
|
|
324
290
|
* @group Props
|
|
325
291
|
*/
|
|
326
|
-
ariaLabelledBy
|
|
292
|
+
ariaLabelledBy = input(/* @ts-ignore */
|
|
293
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
327
294
|
/**
|
|
328
295
|
* Icon class of the dropdown icon.
|
|
329
296
|
* @group Props
|
|
330
297
|
*/
|
|
331
|
-
dropdownIcon
|
|
298
|
+
dropdownIcon = input(/* @ts-ignore */
|
|
299
|
+
...(ngDevMode ? [undefined, { debugName: "dropdownIcon" }] : /* istanbul ignore next */ []));
|
|
332
300
|
/**
|
|
333
301
|
* Ensures uniqueness of selected items on multiple mode.
|
|
334
302
|
* @group Props
|
|
335
303
|
*/
|
|
336
|
-
unique = true;
|
|
304
|
+
unique = input(true, { ...(ngDevMode ? { debugName: "unique" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
337
305
|
/**
|
|
338
306
|
* Whether to display options as grouped when nested options are provided.
|
|
339
307
|
* @group Props
|
|
340
308
|
*/
|
|
341
|
-
group;
|
|
309
|
+
group = input(false, { ...(ngDevMode ? { debugName: "group" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
342
310
|
/**
|
|
343
311
|
* Whether to run a query when input receives focus.
|
|
344
312
|
* @group Props
|
|
345
313
|
*/
|
|
346
|
-
completeOnFocus = false;
|
|
314
|
+
completeOnFocus = input(false, { ...(ngDevMode ? { debugName: "completeOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
347
315
|
/**
|
|
348
316
|
* When enabled, a clear icon is displayed to clear the value.
|
|
349
317
|
* @group Props
|
|
350
318
|
*/
|
|
351
|
-
showClear = false;
|
|
319
|
+
showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
352
320
|
/**
|
|
353
321
|
* Displays a button next to the input field when enabled.
|
|
354
322
|
* @group Props
|
|
355
323
|
*/
|
|
356
|
-
dropdown;
|
|
324
|
+
dropdown = input(false, { ...(ngDevMode ? { debugName: "dropdown" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
357
325
|
/**
|
|
358
326
|
* Whether to show the empty message or not.
|
|
359
327
|
* @group Props
|
|
360
328
|
*/
|
|
361
|
-
showEmptyMessage = true;
|
|
329
|
+
showEmptyMessage = input(true, { ...(ngDevMode ? { debugName: "showEmptyMessage" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
362
330
|
/**
|
|
363
331
|
* Specifies the behavior dropdown button. Default "blank" mode sends an empty string and "current" mode sends the input value.
|
|
364
332
|
* @group Props
|
|
365
333
|
*/
|
|
366
|
-
dropdownMode = 'blank'
|
|
334
|
+
dropdownMode = input('blank', /* @ts-ignore */
|
|
335
|
+
...(ngDevMode ? [{ debugName: "dropdownMode" }] : /* istanbul ignore next */ []));
|
|
367
336
|
/**
|
|
368
337
|
* Specifies if multiple values can be selected.
|
|
338
|
+
* @deprecated Use InputTags component instead for chips/tags input functionality.
|
|
369
339
|
* @group Props
|
|
370
340
|
*/
|
|
371
|
-
multiple;
|
|
341
|
+
multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
372
342
|
/**
|
|
373
343
|
* When enabled, the input value is added to the selected items on tab key press when multiple is true and typeahead is false.
|
|
344
|
+
* @deprecated Use InputTags component instead for chips/tags input functionality.
|
|
374
345
|
* @group Props
|
|
375
346
|
*/
|
|
376
|
-
addOnTab = false;
|
|
347
|
+
addOnTab = input(false, { ...(ngDevMode ? { debugName: "addOnTab" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
377
348
|
/**
|
|
378
349
|
* Index of the element in tabbing order.
|
|
379
350
|
* @group Props
|
|
380
351
|
*/
|
|
381
|
-
tabindex
|
|
352
|
+
tabindex = input(/* @ts-ignore */
|
|
353
|
+
...(ngDevMode ? [undefined, { debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
382
354
|
/**
|
|
383
355
|
* A property to uniquely identify a value in options.
|
|
384
356
|
* @group Props
|
|
385
357
|
*/
|
|
386
|
-
dataKey
|
|
358
|
+
dataKey = input(/* @ts-ignore */
|
|
359
|
+
...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
|
|
387
360
|
/**
|
|
388
361
|
* Text to display when there is no data. Defaults to global value in i18n translation configuration.
|
|
389
362
|
* @group Props
|
|
390
363
|
*/
|
|
391
|
-
emptyMessage
|
|
392
|
-
|
|
393
|
-
* Transition options of the show animation.
|
|
394
|
-
* @group Props
|
|
395
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
396
|
-
*/
|
|
397
|
-
showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
398
|
-
/**
|
|
399
|
-
* Transition options of the hide animation.
|
|
400
|
-
* @group Props
|
|
401
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
402
|
-
*/
|
|
403
|
-
hideTransitionOptions = '.1s linear';
|
|
364
|
+
emptyMessage = input(/* @ts-ignore */
|
|
365
|
+
...(ngDevMode ? [undefined, { debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
|
|
404
366
|
/**
|
|
405
367
|
* When present, it specifies that the component should automatically get focus on load.
|
|
406
368
|
* @group Props
|
|
407
369
|
*/
|
|
408
|
-
autofocus;
|
|
370
|
+
autofocus = input(false, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
409
371
|
/**
|
|
410
372
|
* Used to define a string that autocomplete attribute the current element.
|
|
411
373
|
* @group Props
|
|
412
374
|
*/
|
|
413
|
-
autocomplete = 'off'
|
|
375
|
+
autocomplete = input('off', /* @ts-ignore */
|
|
376
|
+
...(ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []));
|
|
414
377
|
/**
|
|
415
378
|
* Name of the options field of an option group.
|
|
416
379
|
* @group Props
|
|
417
380
|
*/
|
|
418
|
-
optionGroupChildren = 'items'
|
|
381
|
+
optionGroupChildren = input('items', /* @ts-ignore */
|
|
382
|
+
...(ngDevMode ? [{ debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
|
|
419
383
|
/**
|
|
420
384
|
* Name of the label field of an option group.
|
|
421
385
|
* @group Props
|
|
422
386
|
*/
|
|
423
|
-
optionGroupLabel = 'label'
|
|
387
|
+
optionGroupLabel = input('label', /* @ts-ignore */
|
|
388
|
+
...(ngDevMode ? [{ debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
|
|
424
389
|
/**
|
|
425
390
|
* Options for the overlay element.
|
|
426
391
|
* @group Props
|
|
427
392
|
*/
|
|
428
|
-
overlayOptions
|
|
393
|
+
overlayOptions = input(/* @ts-ignore */
|
|
394
|
+
...(ngDevMode ? [undefined, { debugName: "overlayOptions" }] : /* istanbul ignore next */ []));
|
|
429
395
|
/**
|
|
430
396
|
* An array of suggestions to display.
|
|
431
397
|
* @group Props
|
|
432
398
|
*/
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
set suggestions(value) {
|
|
437
|
-
this._suggestions.set(value);
|
|
438
|
-
this.handleSuggestionsChange();
|
|
439
|
-
}
|
|
399
|
+
suggestions = input([], /* @ts-ignore */
|
|
400
|
+
...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
|
|
440
401
|
/**
|
|
441
402
|
* Property name or getter function to use as the label of an option.
|
|
442
403
|
* @group Props
|
|
443
404
|
*/
|
|
444
|
-
optionLabel
|
|
405
|
+
optionLabel = input(/* @ts-ignore */
|
|
406
|
+
...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
445
407
|
/**
|
|
446
408
|
* Property name or getter function to use as the value of an option.
|
|
447
409
|
* @group Props
|
|
448
410
|
*/
|
|
449
|
-
optionValue
|
|
411
|
+
optionValue = input(/* @ts-ignore */
|
|
412
|
+
...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
450
413
|
/**
|
|
451
414
|
* Unique identifier of the component.
|
|
452
415
|
* @group Props
|
|
453
416
|
*/
|
|
454
|
-
id
|
|
417
|
+
id = input(/* @ts-ignore */
|
|
418
|
+
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
455
419
|
/**
|
|
456
420
|
* Text to display when the search is active. Defaults to global value in i18n translation configuration.
|
|
457
421
|
* @group Props
|
|
458
422
|
* @defaultValue '{0} results are available'
|
|
459
423
|
*/
|
|
460
|
-
searchMessage
|
|
424
|
+
searchMessage = input(/* @ts-ignore */
|
|
425
|
+
...(ngDevMode ? [undefined, { debugName: "searchMessage" }] : /* istanbul ignore next */ []));
|
|
461
426
|
/**
|
|
462
427
|
* Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration.
|
|
463
428
|
* @group Props
|
|
464
429
|
* @defaultValue 'No selected item'
|
|
465
430
|
*/
|
|
466
|
-
emptySelectionMessage
|
|
431
|
+
emptySelectionMessage = input(/* @ts-ignore */
|
|
432
|
+
...(ngDevMode ? [undefined, { debugName: "emptySelectionMessage" }] : /* istanbul ignore next */ []));
|
|
467
433
|
/**
|
|
468
434
|
* Text to be displayed in hidden accessible field when options are selected. Defaults to global value in i18n translation configuration.
|
|
469
435
|
* @group Props
|
|
470
436
|
* @defaultValue '{0} items selected'
|
|
471
437
|
*/
|
|
472
|
-
selectionMessage
|
|
438
|
+
selectionMessage = input(/* @ts-ignore */
|
|
439
|
+
...(ngDevMode ? [undefined, { debugName: "selectionMessage" }] : /* istanbul ignore next */ []));
|
|
473
440
|
/**
|
|
474
441
|
* Whether to focus on the first visible or selected element when the overlay panel is shown.
|
|
475
442
|
* @group Props
|
|
476
443
|
*/
|
|
477
|
-
autoOptionFocus = false;
|
|
444
|
+
autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
478
445
|
/**
|
|
479
446
|
* When enabled, the focused option is selected.
|
|
480
447
|
* @group Props
|
|
481
448
|
*/
|
|
482
|
-
selectOnFocus;
|
|
449
|
+
selectOnFocus = input(false, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
483
450
|
/**
|
|
484
451
|
* Locale to use in searching. The default locale is the host environment's current locale.
|
|
485
452
|
* @group Props
|
|
486
453
|
*/
|
|
487
|
-
searchLocale
|
|
454
|
+
searchLocale = input(/* @ts-ignore */
|
|
455
|
+
...(ngDevMode ? [undefined, { debugName: "searchLocale" }] : /* istanbul ignore next */ []));
|
|
488
456
|
/**
|
|
489
457
|
* Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.
|
|
490
458
|
* @group Props
|
|
491
459
|
*/
|
|
492
|
-
optionDisabled
|
|
460
|
+
optionDisabled = input(/* @ts-ignore */
|
|
461
|
+
...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
|
|
493
462
|
/**
|
|
494
463
|
* When enabled, the hovered option will be focused.
|
|
495
464
|
* @group Props
|
|
496
465
|
*/
|
|
497
|
-
focusOnHover = true;
|
|
466
|
+
focusOnHover = input(true, { ...(ngDevMode ? { debugName: "focusOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
498
467
|
/**
|
|
499
468
|
* Whether typeahead is active or not.
|
|
500
469
|
* @defaultValue true
|
|
501
470
|
* @group Props
|
|
502
471
|
*/
|
|
503
|
-
typeahead = true;
|
|
472
|
+
typeahead = input(true, { ...(ngDevMode ? { debugName: "typeahead" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
504
473
|
/**
|
|
505
474
|
* Whether to add an item on blur event if the input has value and typeahead is false with multiple mode.
|
|
475
|
+
* @deprecated Use InputTags component instead for chips/tags input functionality.
|
|
506
476
|
* @defaultValue false
|
|
507
477
|
* @group Props
|
|
508
478
|
*/
|
|
509
|
-
addOnBlur = false;
|
|
479
|
+
addOnBlur = input(false, { ...(ngDevMode ? { debugName: "addOnBlur" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
510
480
|
/**
|
|
511
481
|
* Separator char to add item when typeahead is false and multiple mode is enabled.
|
|
482
|
+
* @deprecated Use InputTags component instead for chips/tags input functionality.
|
|
512
483
|
* @group Props
|
|
513
484
|
*/
|
|
514
|
-
separator
|
|
485
|
+
separator = input(/* @ts-ignore */
|
|
486
|
+
...(ngDevMode ? [undefined, { debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
515
487
|
/**
|
|
516
488
|
* 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).
|
|
517
489
|
* @defaultValue 'self'
|
|
518
490
|
* @group Props
|
|
519
491
|
*/
|
|
520
|
-
appendTo = input(undefined,
|
|
492
|
+
appendTo = input(undefined, /* @ts-ignore */
|
|
493
|
+
...(ngDevMode ? [{ debugName: "appendTo" }] : /* istanbul ignore next */ []));
|
|
521
494
|
/**
|
|
522
495
|
* The motion options.
|
|
523
496
|
* @group Props
|
|
524
497
|
*/
|
|
525
|
-
motionOptions = input(undefined,
|
|
498
|
+
motionOptions = input(undefined, /* @ts-ignore */
|
|
499
|
+
...(ngDevMode ? [{ debugName: "motionOptions" }] : /* istanbul ignore next */ []));
|
|
526
500
|
/**
|
|
527
501
|
* Callback to invoke to search for suggestions.
|
|
528
502
|
* @param {AutoCompleteCompleteEvent} event - Custom complete event.
|
|
529
503
|
* @group Emits
|
|
530
504
|
*/
|
|
531
|
-
completeMethod =
|
|
505
|
+
completeMethod = output();
|
|
532
506
|
/**
|
|
533
507
|
* Callback to invoke when a suggestion is selected.
|
|
534
508
|
* @param {AutoCompleteSelectEvent} event - custom select event.
|
|
535
509
|
* @group Emits
|
|
536
510
|
*/
|
|
537
|
-
onSelect =
|
|
511
|
+
onSelect = output();
|
|
538
512
|
/**
|
|
539
513
|
* Callback to invoke when a selected value is removed.
|
|
540
514
|
* @param {AutoCompleteUnselectEvent} event - custom unselect event.
|
|
541
515
|
* @group Emits
|
|
542
516
|
*/
|
|
543
|
-
onUnselect =
|
|
517
|
+
onUnselect = output();
|
|
544
518
|
/**
|
|
545
519
|
* Callback to invoke when an item is added via addOnBlur or separator features.
|
|
546
520
|
* @param {AutoCompleteAddEvent} event - Custom add event.
|
|
547
521
|
* @group Emits
|
|
548
522
|
*/
|
|
549
|
-
onAdd =
|
|
523
|
+
onAdd = output();
|
|
550
524
|
/**
|
|
551
525
|
* Callback to invoke when the component receives focus.
|
|
552
526
|
* @param {Event} event - Browser event.
|
|
553
527
|
* @group Emits
|
|
554
528
|
*/
|
|
555
|
-
onFocus =
|
|
529
|
+
onFocus = output();
|
|
556
530
|
/**
|
|
557
531
|
* Callback to invoke when the component loses focus.
|
|
558
532
|
* @param {Event} event - Browser event.
|
|
559
533
|
* @group Emits
|
|
560
534
|
*/
|
|
561
|
-
onBlur =
|
|
535
|
+
onBlur = output();
|
|
562
536
|
/**
|
|
563
537
|
* Callback to invoke to when dropdown button is clicked.
|
|
564
538
|
* @param {AutoCompleteDropdownClickEvent} event - custom dropdown click event.
|
|
565
539
|
* @group Emits
|
|
566
540
|
*/
|
|
567
|
-
onDropdownClick =
|
|
541
|
+
onDropdownClick = output();
|
|
568
542
|
/**
|
|
569
543
|
* Callback to invoke when clear button is clicked.
|
|
570
|
-
* @param {Event} event - Browser event.
|
|
571
544
|
* @group Emits
|
|
572
545
|
*/
|
|
573
|
-
onClear =
|
|
546
|
+
onClear = output();
|
|
574
547
|
/**
|
|
575
548
|
* Callback to invoke on input key down.
|
|
576
549
|
* @param {KeyboardEvent} event - Keyboard event.
|
|
577
550
|
* @group Emits
|
|
578
551
|
*/
|
|
579
|
-
onInputKeydown =
|
|
552
|
+
onInputKeydown = output();
|
|
580
553
|
/**
|
|
581
554
|
* Callback to invoke on input key up.
|
|
582
555
|
* @param {KeyboardEvent} event - Keyboard event.
|
|
583
556
|
* @group Emits
|
|
584
557
|
*/
|
|
585
|
-
onKeyUp =
|
|
558
|
+
onKeyUp = output();
|
|
586
559
|
/**
|
|
587
560
|
* Callback to invoke on overlay is shown.
|
|
588
|
-
* @param {Event} event - Browser event.
|
|
589
561
|
* @group Emits
|
|
590
562
|
*/
|
|
591
|
-
onShow =
|
|
563
|
+
onShow = output();
|
|
592
564
|
/**
|
|
593
565
|
* Callback to invoke on overlay is hidden.
|
|
594
|
-
* @param {Event} event - Browser event.
|
|
595
566
|
* @group Emits
|
|
596
567
|
*/
|
|
597
|
-
onHide =
|
|
568
|
+
onHide = output();
|
|
598
569
|
/**
|
|
599
570
|
* Callback to invoke on lazy load data.
|
|
600
571
|
* @param {AutoCompleteLazyLoadEvent} event - Lazy load event.
|
|
601
572
|
* @group Emits
|
|
602
573
|
*/
|
|
603
|
-
onLazyLoad =
|
|
604
|
-
inputEL
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
574
|
+
onLazyLoad = output();
|
|
575
|
+
inputEL = viewChild('focusInput', /* @ts-ignore */
|
|
576
|
+
...(ngDevMode ? [{ debugName: "inputEL" }] : /* istanbul ignore next */ []));
|
|
577
|
+
multiInputEl = viewChild('multiIn', /* @ts-ignore */
|
|
578
|
+
...(ngDevMode ? [{ debugName: "multiInputEl" }] : /* istanbul ignore next */ []));
|
|
579
|
+
multiContainerEL = viewChild('multiContainer', /* @ts-ignore */
|
|
580
|
+
...(ngDevMode ? [{ debugName: "multiContainerEL" }] : /* istanbul ignore next */ []));
|
|
581
|
+
dropdownButton = viewChild('ddBtn', /* @ts-ignore */
|
|
582
|
+
...(ngDevMode ? [{ debugName: "dropdownButton" }] : /* istanbul ignore next */ []));
|
|
583
|
+
itemsViewChild = viewChild('items', /* @ts-ignore */
|
|
584
|
+
...(ngDevMode ? [{ debugName: "itemsViewChild" }] : /* istanbul ignore next */ []));
|
|
585
|
+
scroller = viewChild('scroller', /* @ts-ignore */
|
|
586
|
+
...(ngDevMode ? [{ debugName: "scroller" }] : /* istanbul ignore next */ []));
|
|
587
|
+
overlayViewChild = viewChild('overlay', /* @ts-ignore */
|
|
588
|
+
...(ngDevMode ? [{ debugName: "overlayViewChild" }] : /* istanbul ignore next */ []));
|
|
611
589
|
itemsWrapper;
|
|
612
590
|
/**
|
|
613
591
|
* Custom item template.
|
|
614
592
|
* @group Templates
|
|
615
593
|
*/
|
|
616
|
-
itemTemplate;
|
|
594
|
+
itemTemplate = contentChild('item', { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
617
595
|
/**
|
|
618
596
|
* Custom empty message template.
|
|
619
597
|
* @group Templates
|
|
620
598
|
*/
|
|
621
|
-
emptyTemplate;
|
|
599
|
+
emptyTemplate = contentChild('empty', { ...(ngDevMode ? { debugName: "emptyTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
622
600
|
/**
|
|
623
601
|
* Custom header template.
|
|
624
602
|
* @group Templates
|
|
625
603
|
*/
|
|
626
|
-
headerTemplate;
|
|
604
|
+
headerTemplate = contentChild('header', { ...(ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
627
605
|
/**
|
|
628
606
|
* Custom footer template.
|
|
629
607
|
* @group Templates
|
|
630
608
|
*/
|
|
631
|
-
footerTemplate;
|
|
609
|
+
footerTemplate = contentChild('footer', { ...(ngDevMode ? { debugName: "footerTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
632
610
|
/**
|
|
633
611
|
* Custom selected item template.
|
|
634
612
|
* @group Templates
|
|
635
613
|
*/
|
|
636
|
-
selectedItemTemplate;
|
|
614
|
+
selectedItemTemplate = contentChild('selecteditem', { ...(ngDevMode ? { debugName: "selectedItemTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
637
615
|
/**
|
|
638
616
|
* Custom group template.
|
|
639
617
|
* @group Templates
|
|
640
618
|
*/
|
|
641
|
-
groupTemplate;
|
|
619
|
+
groupTemplate = contentChild('group', { ...(ngDevMode ? { debugName: "groupTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
642
620
|
/**
|
|
643
621
|
* Custom loader template.
|
|
644
622
|
* @group Templates
|
|
645
623
|
*/
|
|
646
|
-
loaderTemplate;
|
|
624
|
+
loaderTemplate = contentChild('loader', { ...(ngDevMode ? { debugName: "loaderTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
647
625
|
/**
|
|
648
626
|
* Custom remove icon template.
|
|
649
627
|
* @group Templates
|
|
650
628
|
*/
|
|
651
|
-
removeIconTemplate;
|
|
629
|
+
removeIconTemplate = contentChild('removeicon', { ...(ngDevMode ? { debugName: "removeIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
652
630
|
/**
|
|
653
631
|
* Custom loading icon template.
|
|
654
632
|
* @group Templates
|
|
655
633
|
*/
|
|
656
|
-
loadingIconTemplate;
|
|
634
|
+
loadingIconTemplate = contentChild('loadingicon', { ...(ngDevMode ? { debugName: "loadingIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
657
635
|
/**
|
|
658
636
|
* Custom clear icon template.
|
|
659
637
|
* @group Templates
|
|
660
638
|
*/
|
|
661
|
-
clearIconTemplate;
|
|
639
|
+
clearIconTemplate = contentChild('clearicon', { ...(ngDevMode ? { debugName: "clearIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
662
640
|
/**
|
|
663
641
|
* Custom dropdown icon template.
|
|
664
642
|
* @group Templates
|
|
665
643
|
*/
|
|
666
|
-
dropdownIconTemplate;
|
|
644
|
+
dropdownIconTemplate = contentChild('dropdownicon', { ...(ngDevMode ? { debugName: "dropdownIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
667
645
|
onHostClick(event) {
|
|
668
646
|
this.onContainerClick(event);
|
|
669
647
|
}
|
|
670
648
|
value;
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
overlayVisible;
|
|
649
|
+
timeout = null;
|
|
650
|
+
overlayVisible = signal(false, /* @ts-ignore */
|
|
651
|
+
...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
|
|
674
652
|
suggestionsUpdated;
|
|
675
653
|
highlightOption;
|
|
676
654
|
highlightOptionChanged;
|
|
677
|
-
focused = false
|
|
678
|
-
|
|
655
|
+
focused = signal(false, /* @ts-ignore */
|
|
656
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
657
|
+
loading = signal(false, /* @ts-ignore */
|
|
658
|
+
...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
679
659
|
scrollHandler;
|
|
680
660
|
listId;
|
|
681
|
-
searchTimeout;
|
|
661
|
+
searchTimeout = null;
|
|
682
662
|
dirty = false;
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
_emptyTemplate;
|
|
688
|
-
_footerTemplate;
|
|
689
|
-
_loaderTemplate;
|
|
690
|
-
_removeIconTemplate;
|
|
691
|
-
_loadingIconTemplate;
|
|
692
|
-
_clearIconTemplate;
|
|
693
|
-
_dropdownIconTemplate;
|
|
694
|
-
focusedMultipleOptionIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedMultipleOptionIndex" }] : /* istanbul ignore next */ []));
|
|
695
|
-
focusedOptionIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
663
|
+
focusedMultipleOptionIndex = signal(-1, /* @ts-ignore */
|
|
664
|
+
...(ngDevMode ? [{ debugName: "focusedMultipleOptionIndex" }] : /* istanbul ignore next */ []));
|
|
665
|
+
focusedOptionIndex = signal(-1, /* @ts-ignore */
|
|
666
|
+
...(ngDevMode ? [{ debugName: "focusedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
696
667
|
_componentStyle = inject(AutoCompleteStyle);
|
|
697
|
-
|
|
668
|
+
overlayService = inject(OverlayService);
|
|
669
|
+
_internalId = uuid('pn_id_');
|
|
670
|
+
$id = computed(() => this.id() || this._internalId, /* @ts-ignore */
|
|
671
|
+
...(ngDevMode ? [{ debugName: "$id" }] : /* istanbul ignore next */ []));
|
|
672
|
+
$appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
|
|
673
|
+
...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
|
|
674
|
+
get $overlayTarget() {
|
|
675
|
+
return this.el?.nativeElement?.closest('[data-pc-name="inputtags"]') ? '@grandparent' : '@parent';
|
|
676
|
+
}
|
|
698
677
|
visibleOptions = computed(() => {
|
|
699
|
-
return this.group ? this.flatOptions(this.
|
|
700
|
-
},
|
|
678
|
+
return this.group() ? this.flatOptions(this.suggestions()) : this.suggestions() || [];
|
|
679
|
+
}, /* @ts-ignore */
|
|
680
|
+
...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
|
|
701
681
|
inputValue = computed(() => {
|
|
702
682
|
const modelValue = this.modelValue();
|
|
703
|
-
const selectedOption = this.optionValueSelected ? (this.suggestions || []).find((option) => equals(option, modelValue, this.equalityKey())) : modelValue;
|
|
683
|
+
const selectedOption = this.optionValueSelected ? (this.suggestions() || []).find((option) => equals(option, modelValue, this.equalityKey())) : modelValue;
|
|
704
684
|
if (isNotEmpty(modelValue)) {
|
|
705
685
|
if (typeof modelValue === 'object' || this.optionValueSelected) {
|
|
706
686
|
const label = this.getOptionLabel(selectedOption);
|
|
@@ -713,123 +693,89 @@ class AutoComplete extends BaseInput {
|
|
|
713
693
|
else {
|
|
714
694
|
return '';
|
|
715
695
|
}
|
|
716
|
-
},
|
|
696
|
+
}, /* @ts-ignore */
|
|
697
|
+
...(ngDevMode ? [{ debugName: "inputValue" }] : /* istanbul ignore next */ []));
|
|
698
|
+
$showClear = computed(() => this.$filled() && !this.$disabled() && this.showClear() && !this.loading(), /* @ts-ignore */
|
|
699
|
+
...(ngDevMode ? [{ debugName: "$showClear" }] : /* istanbul ignore next */ []));
|
|
700
|
+
scrollerStyle = computed(() => ({ height: this.scrollHeight() }), /* @ts-ignore */
|
|
701
|
+
...(ngDevMode ? [{ debugName: "scrollerStyle" }] : /* istanbul ignore next */ []));
|
|
702
|
+
$tabindex = computed(() => (!this.$disabled() ? this.tabindex() : -1), /* @ts-ignore */
|
|
703
|
+
...(ngDevMode ? [{ debugName: "$tabindex" }] : /* istanbul ignore next */ []));
|
|
704
|
+
requiredAttr = computed(() => (this.required() ? '' : undefined), /* @ts-ignore */
|
|
705
|
+
...(ngDevMode ? [{ debugName: "requiredAttr" }] : /* istanbul ignore next */ []));
|
|
706
|
+
readonlyAttr = computed(() => (this.readonly() ? '' : undefined), /* @ts-ignore */
|
|
707
|
+
...(ngDevMode ? [{ debugName: "readonlyAttr" }] : /* istanbul ignore next */ []));
|
|
708
|
+
disabledAttr = computed(() => (this.$disabled() ? '' : undefined), /* @ts-ignore */
|
|
709
|
+
...(ngDevMode ? [{ debugName: "disabledAttr" }] : /* istanbul ignore next */ []));
|
|
710
|
+
$listId = computed(() => this.$id() + '_list', /* @ts-ignore */
|
|
711
|
+
...(ngDevMode ? [{ debugName: "$listId" }] : /* istanbul ignore next */ []));
|
|
717
712
|
get focusedMultipleOptionId() {
|
|
718
|
-
return this.focusedMultipleOptionIndex() !== -1 ? `${this
|
|
713
|
+
return this.focusedMultipleOptionIndex() !== -1 ? `${this.$id()}_multiple_option_${this.focusedMultipleOptionIndex()}` : null;
|
|
719
714
|
}
|
|
720
715
|
get focusedOptionId() {
|
|
721
|
-
return this.focusedOptionIndex() !== -1 ? `${this
|
|
716
|
+
return this.focusedOptionIndex() !== -1 ? `${this.$id()}_${this.focusedOptionIndex()}` : null;
|
|
722
717
|
}
|
|
723
718
|
get searchResultMessageText() {
|
|
724
|
-
return isNotEmpty(this.visibleOptions()) && this.overlayVisible ? this.searchMessageText.replaceAll('{0}', this.visibleOptions().length) : this.emptySearchMessageText;
|
|
719
|
+
return isNotEmpty(this.visibleOptions()) && this.overlayVisible() ? this.searchMessageText.replaceAll('{0}', this.visibleOptions().length) : this.emptySearchMessageText;
|
|
725
720
|
}
|
|
726
721
|
get searchMessageText() {
|
|
727
|
-
return this.searchMessage || this.config.translation.searchMessage || '';
|
|
722
|
+
return this.searchMessage() || this.config.translation.searchMessage || '';
|
|
728
723
|
}
|
|
729
724
|
get emptySearchMessageText() {
|
|
730
|
-
return this.emptyMessage || this.config.translation.emptySearchMessage || '';
|
|
725
|
+
return this.emptyMessage() || this.config.translation.emptySearchMessage || '';
|
|
731
726
|
}
|
|
732
727
|
get selectionMessageText() {
|
|
733
|
-
return this.selectionMessage || this.config.translation.selectionMessage || '';
|
|
728
|
+
return this.selectionMessage() || this.config.translation.selectionMessage || '';
|
|
734
729
|
}
|
|
735
730
|
get emptySelectionMessageText() {
|
|
736
|
-
return this.emptySelectionMessage || this.config.translation.emptySelectionMessage || '';
|
|
731
|
+
return this.emptySelectionMessage() || this.config.translation.emptySelectionMessage || '';
|
|
737
732
|
}
|
|
738
733
|
get selectedMessageText() {
|
|
739
|
-
return this.hasSelectedOption() ? this.selectionMessageText.replaceAll('{0}', this.multiple ? this.modelValue()?.length : '1') : this.emptySelectionMessageText;
|
|
734
|
+
return this.hasSelectedOption() ? this.selectionMessageText.replaceAll('{0}', this.multiple() ? this.modelValue()?.length : '1') : this.emptySelectionMessageText;
|
|
740
735
|
}
|
|
741
736
|
get ariaSetSize() {
|
|
742
737
|
return this.visibleOptions().filter((option) => !this.isOptionGroup(option)).length;
|
|
743
738
|
}
|
|
744
739
|
get listLabel() {
|
|
745
|
-
return this.
|
|
740
|
+
return this.translate(TranslationKeys.ARIA, 'listLabel');
|
|
746
741
|
}
|
|
747
742
|
get virtualScrollerDisabled() {
|
|
748
|
-
return !this.virtualScroll;
|
|
743
|
+
return !this.virtualScroll();
|
|
749
744
|
}
|
|
750
745
|
get optionValueSelected() {
|
|
751
|
-
return typeof this.modelValue() === 'string' && this.optionValue;
|
|
746
|
+
return typeof this.modelValue() === 'string' && this.optionValue();
|
|
752
747
|
}
|
|
753
748
|
chipItemClass(index) {
|
|
754
749
|
return this._componentStyle.classes.chipItem({ instance: this, i: index });
|
|
755
750
|
}
|
|
756
|
-
constructor(
|
|
751
|
+
constructor() {
|
|
757
752
|
super();
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
this.id = this.id || uuid('pn_id_');
|
|
763
|
-
this.cd.detectChanges();
|
|
764
|
-
}
|
|
765
|
-
templates;
|
|
766
|
-
onAfterContentInit() {
|
|
767
|
-
this.templates.forEach((item) => {
|
|
768
|
-
switch (item.getType()) {
|
|
769
|
-
case 'item':
|
|
770
|
-
this._itemTemplate = item.template;
|
|
771
|
-
break;
|
|
772
|
-
case 'group':
|
|
773
|
-
this._groupTemplate = item.template;
|
|
774
|
-
break;
|
|
775
|
-
case 'selecteditem':
|
|
776
|
-
this._selectedItemTemplate = item.template;
|
|
777
|
-
break;
|
|
778
|
-
case 'selectedItem':
|
|
779
|
-
this._selectedItemTemplate = item.template;
|
|
780
|
-
break;
|
|
781
|
-
case 'header':
|
|
782
|
-
this._headerTemplate = item.template;
|
|
783
|
-
break;
|
|
784
|
-
case 'empty':
|
|
785
|
-
this._emptyTemplate = item.template;
|
|
786
|
-
break;
|
|
787
|
-
case 'footer':
|
|
788
|
-
this._footerTemplate = item.template;
|
|
789
|
-
break;
|
|
790
|
-
case 'loader':
|
|
791
|
-
this._loaderTemplate = item.template;
|
|
792
|
-
break;
|
|
793
|
-
case 'removetokenicon':
|
|
794
|
-
this._removeIconTemplate = item.template;
|
|
795
|
-
break;
|
|
796
|
-
case 'loadingicon':
|
|
797
|
-
this._loadingIconTemplate = item.template;
|
|
798
|
-
break;
|
|
799
|
-
case 'clearicon':
|
|
800
|
-
this._clearIconTemplate = item.template;
|
|
801
|
-
break;
|
|
802
|
-
case 'dropdownicon':
|
|
803
|
-
this._dropdownIconTemplate = item.template;
|
|
804
|
-
break;
|
|
805
|
-
default:
|
|
806
|
-
this._itemTemplate = item.template;
|
|
807
|
-
break;
|
|
753
|
+
effect(() => {
|
|
754
|
+
const value = this.suggestions();
|
|
755
|
+
if (value) {
|
|
756
|
+
this.handleSuggestionsChange();
|
|
808
757
|
}
|
|
809
758
|
});
|
|
810
759
|
}
|
|
811
760
|
onAfterViewChecked() {
|
|
812
761
|
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
813
762
|
//Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
|
|
814
|
-
if (this.suggestionsUpdated && this.overlayViewChild) {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
this.suggestionsUpdated = false;
|
|
822
|
-
});
|
|
763
|
+
if (this.suggestionsUpdated && this.overlayViewChild()) {
|
|
764
|
+
setTimeout(() => {
|
|
765
|
+
if (this.overlayViewChild()) {
|
|
766
|
+
this.overlayViewChild().alignOverlay();
|
|
767
|
+
}
|
|
768
|
+
}, 1);
|
|
769
|
+
this.suggestionsUpdated = false;
|
|
823
770
|
}
|
|
824
771
|
}
|
|
825
772
|
handleSuggestionsChange() {
|
|
826
|
-
if (this.loading) {
|
|
827
|
-
this.
|
|
828
|
-
const focusedOptionIndex = this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
773
|
+
if (this.loading()) {
|
|
774
|
+
this.suggestions()?.length > 0 || this.showEmptyMessage() || !!this.emptyTemplate() ? this.show() : this.hide();
|
|
775
|
+
const focusedOptionIndex = this.overlayVisible() && this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : -1;
|
|
829
776
|
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
830
777
|
this.suggestionsUpdated = true;
|
|
831
|
-
this.loading
|
|
832
|
-
this.cd.markForCheck();
|
|
778
|
+
this.loading.set(false);
|
|
833
779
|
}
|
|
834
780
|
}
|
|
835
781
|
flatOptions(options) {
|
|
@@ -841,7 +787,7 @@ class AutoComplete extends BaseInput {
|
|
|
841
787
|
}, []);
|
|
842
788
|
}
|
|
843
789
|
isOptionGroup(option) {
|
|
844
|
-
return this.optionGroupLabel && option.optionGroup && option.group;
|
|
790
|
+
return this.optionGroupLabel() && option.optionGroup && option.group;
|
|
845
791
|
}
|
|
846
792
|
findFirstOptionIndex() {
|
|
847
793
|
return this.visibleOptions().findIndex((option) => this.isValidOption(option));
|
|
@@ -879,74 +825,75 @@ class AutoComplete extends BaseInput {
|
|
|
879
825
|
return option && !(this.isOptionDisabled(option) || this.isOptionGroup(option));
|
|
880
826
|
}
|
|
881
827
|
isOptionDisabled(option) {
|
|
882
|
-
return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;
|
|
828
|
+
return this.optionDisabled() ? resolveFieldData(option, this.optionDisabled()) : false;
|
|
883
829
|
}
|
|
884
830
|
isSelected(option) {
|
|
885
|
-
if (this.multiple) {
|
|
886
|
-
return this.unique ? this.modelValue()?.some((model) => equals(model, option, this.equalityKey())) : false;
|
|
831
|
+
if (this.multiple()) {
|
|
832
|
+
return this.unique() ? this.modelValue()?.some((model) => equals(model, option, this.equalityKey())) : false;
|
|
887
833
|
}
|
|
888
834
|
return equals(this.modelValue(), option, this.equalityKey());
|
|
889
835
|
}
|
|
890
836
|
isOptionMatched(option, value) {
|
|
891
|
-
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.searchLocale) === value.toLocaleLowerCase(this.searchLocale);
|
|
837
|
+
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.searchLocale()) === value.toLocaleLowerCase(this.searchLocale());
|
|
892
838
|
}
|
|
893
839
|
isInputClicked(event) {
|
|
894
|
-
return event.target === this.inputEL?.nativeElement;
|
|
840
|
+
return event.target === this.inputEL()?.nativeElement;
|
|
895
841
|
}
|
|
896
842
|
isDropdownClicked(event) {
|
|
897
|
-
return this.dropdownButton?.nativeElement ? event.target === this.dropdownButton.nativeElement || this.dropdownButton.nativeElement.contains(event.target) : false;
|
|
843
|
+
return this.dropdownButton()?.nativeElement ? event.target === this.dropdownButton().nativeElement || this.dropdownButton().nativeElement.contains(event.target) : false;
|
|
898
844
|
}
|
|
899
845
|
equalityKey() {
|
|
900
|
-
return this.optionValue ? undefined : this.dataKey;
|
|
846
|
+
return this.optionValue() ? undefined : this.dataKey();
|
|
901
847
|
}
|
|
902
848
|
onContainerClick(event) {
|
|
903
|
-
if (this.$disabled() || this.loading || this.isInputClicked(event) || this.isDropdownClicked(event)) {
|
|
849
|
+
if (this.$disabled() || this.loading() || this.isInputClicked(event) || this.isDropdownClicked(event)) {
|
|
904
850
|
return;
|
|
905
851
|
}
|
|
906
|
-
if (!this.overlayViewChild || !this.overlayViewChild.overlayViewChild?.nativeElement.contains(event.target)) {
|
|
907
|
-
focus(this.inputEL?.nativeElement);
|
|
852
|
+
if (!this.overlayViewChild() || !this.overlayViewChild().overlayViewChild()?.nativeElement.contains(event.target)) {
|
|
853
|
+
focus(this.inputEL()?.nativeElement);
|
|
908
854
|
}
|
|
909
855
|
}
|
|
910
856
|
handleDropdownClick(event) {
|
|
911
857
|
let query = undefined;
|
|
912
|
-
if (this.overlayVisible) {
|
|
858
|
+
if (this.overlayVisible()) {
|
|
913
859
|
this.hide(true);
|
|
914
860
|
}
|
|
915
861
|
else {
|
|
916
|
-
focus(this.inputEL?.nativeElement);
|
|
917
|
-
query = this.inputEL?.nativeElement?.value;
|
|
918
|
-
if (this.dropdownMode === 'blank')
|
|
862
|
+
focus(this.inputEL()?.nativeElement);
|
|
863
|
+
query = this.inputEL()?.nativeElement?.value;
|
|
864
|
+
if (this.dropdownMode() === 'blank')
|
|
919
865
|
this.search(event, '', 'dropdown');
|
|
920
|
-
else if (this.dropdownMode === 'current')
|
|
866
|
+
else if (this.dropdownMode() === 'current')
|
|
921
867
|
this.search(event, query, 'dropdown');
|
|
922
868
|
}
|
|
923
869
|
this.onDropdownClick.emit({ originalEvent: event, query });
|
|
924
870
|
}
|
|
925
871
|
onInput(event) {
|
|
926
|
-
if (this.typeahead) {
|
|
927
|
-
const _minLength = this.minQueryLength ||
|
|
872
|
+
if (this.typeahead()) {
|
|
873
|
+
const _minLength = this.minQueryLength() || 1;
|
|
928
874
|
if (this.searchTimeout) {
|
|
929
875
|
clearTimeout(this.searchTimeout);
|
|
930
876
|
}
|
|
931
877
|
let query = event.target.value;
|
|
932
|
-
|
|
933
|
-
|
|
878
|
+
const maxLen = this.maxlength();
|
|
879
|
+
if (maxLen != null) {
|
|
880
|
+
query = query.split('').slice(0, maxLen).join('');
|
|
934
881
|
}
|
|
935
|
-
if (!this.multiple && !this.forceSelection) {
|
|
882
|
+
if (!this.multiple() && !this.forceSelection()) {
|
|
936
883
|
this.updateModel(query);
|
|
937
884
|
}
|
|
938
|
-
if (query.length === 0 && !this.multiple) {
|
|
885
|
+
if (query.length === 0 && !this.multiple()) {
|
|
939
886
|
this.onClear.emit();
|
|
940
887
|
setTimeout(() => {
|
|
941
888
|
this.hide();
|
|
942
|
-
}, this.delay / 2);
|
|
889
|
+
}, this.delay() / 2);
|
|
943
890
|
}
|
|
944
891
|
else {
|
|
945
892
|
if (query.length >= _minLength) {
|
|
946
893
|
this.focusedOptionIndex.set(-1);
|
|
947
894
|
this.searchTimeout = setTimeout(() => {
|
|
948
895
|
this.search(event, query, 'input');
|
|
949
|
-
}, this.delay);
|
|
896
|
+
}, this.delay());
|
|
950
897
|
}
|
|
951
898
|
else {
|
|
952
899
|
this.hide();
|
|
@@ -962,14 +909,14 @@ class AutoComplete extends BaseInput {
|
|
|
962
909
|
// For ScreenReaders
|
|
963
910
|
return;
|
|
964
911
|
}
|
|
965
|
-
if (!this.dirty && this.completeOnFocus) {
|
|
912
|
+
if (!this.dirty && this.completeOnFocus()) {
|
|
966
913
|
this.search(event, event.target.value, 'focus');
|
|
967
914
|
}
|
|
968
915
|
this.dirty = true;
|
|
969
|
-
this.focused
|
|
970
|
-
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.overlayVisible && this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
916
|
+
this.focused.set(true);
|
|
917
|
+
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.overlayVisible() && this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : -1;
|
|
971
918
|
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
972
|
-
this.overlayVisible && this.scrollInView(this.focusedOptionIndex());
|
|
919
|
+
this.overlayVisible() && this.scrollInView(this.focusedOptionIndex());
|
|
973
920
|
this.onFocus.emit(event);
|
|
974
921
|
}
|
|
975
922
|
onMultipleContainerFocus(event) {
|
|
@@ -977,11 +924,11 @@ class AutoComplete extends BaseInput {
|
|
|
977
924
|
// For ScreenReaders
|
|
978
925
|
return;
|
|
979
926
|
}
|
|
980
|
-
this.focused
|
|
927
|
+
this.focused.set(true);
|
|
981
928
|
}
|
|
982
929
|
onMultipleContainerBlur(event) {
|
|
983
930
|
this.focusedMultipleOptionIndex.set(-1);
|
|
984
|
-
this.focused
|
|
931
|
+
this.focused.set(false);
|
|
985
932
|
}
|
|
986
933
|
onMultipleContainerKeyDown(event) {
|
|
987
934
|
if (this.$disabled()) {
|
|
@@ -1004,15 +951,15 @@ class AutoComplete extends BaseInput {
|
|
|
1004
951
|
}
|
|
1005
952
|
onInputBlur(event) {
|
|
1006
953
|
this.dirty = false;
|
|
1007
|
-
this.focused
|
|
954
|
+
this.focused.set(false);
|
|
1008
955
|
this.focusedOptionIndex.set(-1);
|
|
1009
|
-
if (this.addOnBlur && this.multiple && !this.typeahead) {
|
|
1010
|
-
const inputValue = (this.multiInputEl?.nativeElement?.value || event.target.value || '').trim();
|
|
956
|
+
if (this.addOnBlur() && this.multiple() && !this.typeahead()) {
|
|
957
|
+
const inputValue = (this.multiInputEl()?.nativeElement?.value || event.target.value || '').trim();
|
|
1011
958
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1012
959
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
1013
960
|
this.onAdd.emit({ originalEvent: event, value: inputValue });
|
|
1014
|
-
if (this.multiInputEl?.nativeElement) {
|
|
1015
|
-
this.multiInputEl.nativeElement.value = '';
|
|
961
|
+
if (this.multiInputEl()?.nativeElement) {
|
|
962
|
+
this.multiInputEl().nativeElement.value = '';
|
|
1016
963
|
}
|
|
1017
964
|
else {
|
|
1018
965
|
event.target.value = '';
|
|
@@ -1023,10 +970,10 @@ class AutoComplete extends BaseInput {
|
|
|
1023
970
|
this.onBlur.emit(event);
|
|
1024
971
|
}
|
|
1025
972
|
onInputPaste(event) {
|
|
1026
|
-
if (this.separator && this.multiple && !this.typeahead) {
|
|
1027
|
-
const pastedData =
|
|
973
|
+
if (this.separator() && this.multiple() && !this.typeahead()) {
|
|
974
|
+
const pastedData = event.clipboardData?.getData('Text');
|
|
1028
975
|
if (pastedData) {
|
|
1029
|
-
const values = pastedData.split(this.separator);
|
|
976
|
+
const values = pastedData.split(this.separator());
|
|
1030
977
|
const newValues = [...(this.modelValue() || [])];
|
|
1031
978
|
values.forEach((value) => {
|
|
1032
979
|
const trimmedValue = value.trim();
|
|
@@ -1040,8 +987,8 @@ class AutoComplete extends BaseInput {
|
|
|
1040
987
|
addedValues.forEach((addedValue) => {
|
|
1041
988
|
this.onAdd.emit({ originalEvent: event, value: addedValue });
|
|
1042
989
|
});
|
|
1043
|
-
if (this.multiInputEl?.nativeElement) {
|
|
1044
|
-
this.multiInputEl.nativeElement.value = '';
|
|
990
|
+
if (this.multiInputEl()?.nativeElement) {
|
|
991
|
+
this.multiInputEl().nativeElement.value = '';
|
|
1045
992
|
}
|
|
1046
993
|
else {
|
|
1047
994
|
event.target.value = '';
|
|
@@ -1095,6 +1042,9 @@ class AutoComplete extends BaseInput {
|
|
|
1095
1042
|
break;
|
|
1096
1043
|
case 'Escape':
|
|
1097
1044
|
this.onEscapeKey(event);
|
|
1045
|
+
if (this.overlayVisible()) {
|
|
1046
|
+
event.stopPropagation();
|
|
1047
|
+
}
|
|
1098
1048
|
break;
|
|
1099
1049
|
case 'Tab':
|
|
1100
1050
|
this.onTabKey(event);
|
|
@@ -1112,14 +1062,15 @@ class AutoComplete extends BaseInput {
|
|
|
1112
1062
|
}
|
|
1113
1063
|
}
|
|
1114
1064
|
handleSeparatorKey(event) {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1065
|
+
const separator = this.separator();
|
|
1066
|
+
if (separator && this.multiple() && !this.typeahead()) {
|
|
1067
|
+
if (separator === event.key || (typeof separator === 'string' && event.key === separator) || (separator instanceof RegExp && event.key.match(separator))) {
|
|
1068
|
+
const inputValue = (this.multiInputEl()?.nativeElement?.value || event.target.value || '').trim();
|
|
1118
1069
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1119
1070
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
1120
1071
|
this.onAdd.emit({ originalEvent: event, value: inputValue });
|
|
1121
|
-
if (this.multiInputEl?.nativeElement) {
|
|
1122
|
-
this.multiInputEl.nativeElement.value = '';
|
|
1072
|
+
if (this.multiInputEl()?.nativeElement) {
|
|
1073
|
+
this.multiInputEl().nativeElement.value = '';
|
|
1123
1074
|
}
|
|
1124
1075
|
else {
|
|
1125
1076
|
event.target.value = '';
|
|
@@ -1130,7 +1081,7 @@ class AutoComplete extends BaseInput {
|
|
|
1130
1081
|
}
|
|
1131
1082
|
}
|
|
1132
1083
|
onArrowDownKey(event) {
|
|
1133
|
-
if (!this.overlayVisible) {
|
|
1084
|
+
if (!this.overlayVisible()) {
|
|
1134
1085
|
return;
|
|
1135
1086
|
}
|
|
1136
1087
|
const optionIndex = this.focusedOptionIndex() !== -1 ? this.findNextOptionIndex(this.focusedOptionIndex()) : this.findFirstFocusedOptionIndex();
|
|
@@ -1139,14 +1090,14 @@ class AutoComplete extends BaseInput {
|
|
|
1139
1090
|
event.stopPropagation();
|
|
1140
1091
|
}
|
|
1141
1092
|
onArrowUpKey(event) {
|
|
1142
|
-
if (!this.overlayVisible) {
|
|
1093
|
+
if (!this.overlayVisible()) {
|
|
1143
1094
|
return;
|
|
1144
1095
|
}
|
|
1145
1096
|
if (event.altKey) {
|
|
1146
1097
|
if (this.focusedOptionIndex() !== -1) {
|
|
1147
1098
|
this.onOptionSelect(event, this.visibleOptions()[this.focusedOptionIndex()]);
|
|
1148
1099
|
}
|
|
1149
|
-
this.overlayVisible && this.hide();
|
|
1100
|
+
this.overlayVisible() && this.hide();
|
|
1150
1101
|
event.preventDefault();
|
|
1151
1102
|
}
|
|
1152
1103
|
else {
|
|
@@ -1159,9 +1110,9 @@ class AutoComplete extends BaseInput {
|
|
|
1159
1110
|
onArrowLeftKey(event) {
|
|
1160
1111
|
const target = event.currentTarget;
|
|
1161
1112
|
this.focusedOptionIndex.set(-1);
|
|
1162
|
-
if (this.multiple) {
|
|
1113
|
+
if (this.multiple()) {
|
|
1163
1114
|
if (isEmpty(target.value) && this.hasSelectedOption()) {
|
|
1164
|
-
focus(this.multiContainerEL?.nativeElement);
|
|
1115
|
+
focus(this.multiContainerEL()?.nativeElement);
|
|
1165
1116
|
this.focusedMultipleOptionIndex.set(this.modelValue().length);
|
|
1166
1117
|
}
|
|
1167
1118
|
else {
|
|
@@ -1171,17 +1122,17 @@ class AutoComplete extends BaseInput {
|
|
|
1171
1122
|
}
|
|
1172
1123
|
onArrowRightKey(event) {
|
|
1173
1124
|
this.focusedOptionIndex.set(-1);
|
|
1174
|
-
this.multiple && event.stopPropagation(); // To prevent onArrowRightKeyOnMultiple method
|
|
1125
|
+
this.multiple() && event.stopPropagation(); // To prevent onArrowRightKeyOnMultiple method
|
|
1175
1126
|
}
|
|
1176
1127
|
onHomeKey(event) {
|
|
1177
|
-
const
|
|
1128
|
+
const currentTarget = event.currentTarget;
|
|
1178
1129
|
const len = currentTarget.value.length;
|
|
1179
1130
|
currentTarget.setSelectionRange(0, event.shiftKey ? len : 0);
|
|
1180
1131
|
this.focusedOptionIndex.set(-1);
|
|
1181
1132
|
event.preventDefault();
|
|
1182
1133
|
}
|
|
1183
1134
|
onEndKey(event) {
|
|
1184
|
-
const
|
|
1135
|
+
const currentTarget = event.currentTarget;
|
|
1185
1136
|
const len = currentTarget.value.length;
|
|
1186
1137
|
currentTarget.setSelectionRange(event.shiftKey ? 0 : len, len);
|
|
1187
1138
|
this.focusedOptionIndex.set(-1);
|
|
@@ -1196,17 +1147,17 @@ class AutoComplete extends BaseInput {
|
|
|
1196
1147
|
event.preventDefault();
|
|
1197
1148
|
}
|
|
1198
1149
|
onEnterKey(event) {
|
|
1199
|
-
if (!this.typeahead && !this.forceSelection) {
|
|
1200
|
-
if (this.multiple) {
|
|
1150
|
+
if (!this.typeahead() && !this.forceSelection()) {
|
|
1151
|
+
if (this.multiple()) {
|
|
1201
1152
|
const inputValue = event.target.value?.trim();
|
|
1202
1153
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1203
1154
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
1204
1155
|
this.onAdd.emit({ originalEvent: event, value: inputValue });
|
|
1205
|
-
this.inputEL?.nativeElement && (this.inputEL.nativeElement.value = '');
|
|
1156
|
+
this.inputEL()?.nativeElement && (this.inputEL().nativeElement.value = '');
|
|
1206
1157
|
}
|
|
1207
1158
|
}
|
|
1208
1159
|
}
|
|
1209
|
-
if (!this.overlayVisible) {
|
|
1160
|
+
if (!this.overlayVisible()) {
|
|
1210
1161
|
return;
|
|
1211
1162
|
}
|
|
1212
1163
|
else {
|
|
@@ -1218,7 +1169,7 @@ class AutoComplete extends BaseInput {
|
|
|
1218
1169
|
event.preventDefault();
|
|
1219
1170
|
}
|
|
1220
1171
|
onEscapeKey(event) {
|
|
1221
|
-
this.overlayVisible && this.hide(true);
|
|
1172
|
+
this.overlayVisible() && this.hide(true);
|
|
1222
1173
|
event.preventDefault();
|
|
1223
1174
|
}
|
|
1224
1175
|
onTabKey(event) {
|
|
@@ -1228,22 +1179,22 @@ class AutoComplete extends BaseInput {
|
|
|
1228
1179
|
return;
|
|
1229
1180
|
}
|
|
1230
1181
|
// Handle tab key behavior for multiple mode without typeahead
|
|
1231
|
-
if (this.multiple && !this.typeahead) {
|
|
1232
|
-
const inputValue = (this.multiInputEl?.nativeElement?.value || this.inputEL?.nativeElement?.value || '').trim();
|
|
1233
|
-
if (this.addOnTab) {
|
|
1182
|
+
if (this.multiple() && !this.typeahead()) {
|
|
1183
|
+
const inputValue = (this.multiInputEl()?.nativeElement?.value || this.inputEL()?.nativeElement?.value || '').trim();
|
|
1184
|
+
if (this.addOnTab()) {
|
|
1234
1185
|
if (inputValue && !this.isSelected(inputValue)) {
|
|
1235
1186
|
// Add the value and keep focus
|
|
1236
1187
|
this.updateModel([...(this.modelValue() || []), inputValue]);
|
|
1237
1188
|
this.onAdd.emit({ originalEvent: event, value: inputValue });
|
|
1238
|
-
if (this.multiInputEl?.nativeElement) {
|
|
1239
|
-
this.multiInputEl.nativeElement.value = '';
|
|
1189
|
+
if (this.multiInputEl()?.nativeElement) {
|
|
1190
|
+
this.multiInputEl().nativeElement.value = '';
|
|
1240
1191
|
}
|
|
1241
|
-
else if (this.inputEL?.nativeElement) {
|
|
1242
|
-
this.inputEL.nativeElement.value = '';
|
|
1192
|
+
else if (this.inputEL()?.nativeElement) {
|
|
1193
|
+
this.inputEL().nativeElement.value = '';
|
|
1243
1194
|
}
|
|
1244
1195
|
this.updateInputValue();
|
|
1245
1196
|
event.preventDefault(); // Keep focus on the component
|
|
1246
|
-
this.overlayVisible && this.hide();
|
|
1197
|
+
this.overlayVisible() && this.hide();
|
|
1247
1198
|
return;
|
|
1248
1199
|
}
|
|
1249
1200
|
// If no value or already selected, allow normal tab behavior (blur)
|
|
@@ -1251,11 +1202,11 @@ class AutoComplete extends BaseInput {
|
|
|
1251
1202
|
// If addOnTab is false or no value to add, allow normal tab behavior
|
|
1252
1203
|
// which will trigger blur and potentially addOnBlur
|
|
1253
1204
|
}
|
|
1254
|
-
this.overlayVisible && this.hide();
|
|
1205
|
+
this.overlayVisible() && this.hide();
|
|
1255
1206
|
}
|
|
1256
1207
|
onBackspaceKey(event) {
|
|
1257
|
-
if (this.multiple) {
|
|
1258
|
-
if (isNotEmpty(this.modelValue()) && !this.inputEL?.nativeElement?.value) {
|
|
1208
|
+
if (this.multiple()) {
|
|
1209
|
+
if (isNotEmpty(this.modelValue()) && !this.inputEL()?.nativeElement?.value) {
|
|
1259
1210
|
const removedValue = this.modelValue()[this.modelValue().length - 1];
|
|
1260
1211
|
const newValue = this.modelValue().slice(0, -1);
|
|
1261
1212
|
this.updateModel(newValue);
|
|
@@ -1274,7 +1225,7 @@ class AutoComplete extends BaseInput {
|
|
|
1274
1225
|
this.focusedMultipleOptionIndex.set(optionIndex);
|
|
1275
1226
|
if (optionIndex > this.modelValue().length - 1) {
|
|
1276
1227
|
this.focusedMultipleOptionIndex.set(-1);
|
|
1277
|
-
focus(this.inputEL?.nativeElement);
|
|
1228
|
+
focus(this.inputEL()?.nativeElement);
|
|
1278
1229
|
}
|
|
1279
1230
|
}
|
|
1280
1231
|
onBackspaceKeyOnMultiple(event) {
|
|
@@ -1283,8 +1234,8 @@ class AutoComplete extends BaseInput {
|
|
|
1283
1234
|
}
|
|
1284
1235
|
}
|
|
1285
1236
|
onOptionSelect(event, option, isHide = true) {
|
|
1286
|
-
if (this.multiple) {
|
|
1287
|
-
this.inputEL?.nativeElement && (this.inputEL.nativeElement.value = '');
|
|
1237
|
+
if (this.multiple()) {
|
|
1238
|
+
this.inputEL()?.nativeElement && (this.inputEL().nativeElement.value = '');
|
|
1288
1239
|
if (!this.isSelected(option)) {
|
|
1289
1240
|
this.updateModel([...(this.modelValue() || []), option]);
|
|
1290
1241
|
}
|
|
@@ -1292,11 +1243,13 @@ class AutoComplete extends BaseInput {
|
|
|
1292
1243
|
else {
|
|
1293
1244
|
this.updateModel(option);
|
|
1294
1245
|
}
|
|
1295
|
-
|
|
1246
|
+
if (event) {
|
|
1247
|
+
this.onSelect.emit({ originalEvent: event, value: option });
|
|
1248
|
+
}
|
|
1296
1249
|
isHide && this.hide(true);
|
|
1297
1250
|
}
|
|
1298
1251
|
onOptionMouseEnter(event, index) {
|
|
1299
|
-
if (this.focusOnHover) {
|
|
1252
|
+
if (this.focusOnHover()) {
|
|
1300
1253
|
this.changeFocusedOptionIndex(event, index);
|
|
1301
1254
|
}
|
|
1302
1255
|
}
|
|
@@ -1309,7 +1262,7 @@ class AutoComplete extends BaseInput {
|
|
|
1309
1262
|
if (source === 'input' && query.trim().length === 0) {
|
|
1310
1263
|
return;
|
|
1311
1264
|
}
|
|
1312
|
-
this.loading
|
|
1265
|
+
this.loading.set(true);
|
|
1313
1266
|
this.completeMethod.emit({ originalEvent: event, query });
|
|
1314
1267
|
}
|
|
1315
1268
|
removeOption(event, index) {
|
|
@@ -1318,43 +1271,43 @@ class AutoComplete extends BaseInput {
|
|
|
1318
1271
|
const value = this.modelValue().filter((_, i) => i !== index);
|
|
1319
1272
|
this.updateModel(value);
|
|
1320
1273
|
this.onUnselect.emit({ originalEvent: event, value: removedOption });
|
|
1321
|
-
focus(this.inputEL?.nativeElement);
|
|
1274
|
+
focus(this.inputEL()?.nativeElement);
|
|
1322
1275
|
}
|
|
1323
1276
|
updateModel(options) {
|
|
1324
1277
|
let value = null;
|
|
1325
1278
|
if (options) {
|
|
1326
|
-
value = this.multiple ? options.map((option) => this.getOptionValue(option)) : this.getOptionValue(options);
|
|
1279
|
+
value = this.multiple() ? options.map((option) => this.getOptionValue(option)) : this.getOptionValue(options);
|
|
1327
1280
|
}
|
|
1328
1281
|
this.value = value;
|
|
1329
1282
|
this.writeModelValue(options);
|
|
1330
1283
|
this.onModelChange(value);
|
|
1331
1284
|
this.updateInputValue();
|
|
1332
|
-
this.cd.markForCheck();
|
|
1333
1285
|
}
|
|
1334
1286
|
updateInputValue() {
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1287
|
+
const inputEl = this.inputEL();
|
|
1288
|
+
if (inputEl && inputEl.nativeElement) {
|
|
1289
|
+
if (!this.multiple()) {
|
|
1290
|
+
inputEl.nativeElement.value = this.inputValue();
|
|
1338
1291
|
}
|
|
1339
1292
|
else {
|
|
1340
|
-
|
|
1293
|
+
inputEl.nativeElement.value = '';
|
|
1341
1294
|
}
|
|
1342
1295
|
}
|
|
1343
1296
|
}
|
|
1344
1297
|
updateInputWithForceSelection(event) {
|
|
1345
|
-
const input = this.inputEL?.nativeElement;
|
|
1298
|
+
const input = this.inputEL()?.nativeElement;
|
|
1346
1299
|
const inputCleared = !input?.value && isNotEmpty(this.modelValue());
|
|
1347
|
-
if (!this.forceSelection || this.overlayVisible || (!input?.value && !inputCleared)) {
|
|
1300
|
+
if (!this.forceSelection() || this.overlayVisible() || (!input?.value && !inputCleared)) {
|
|
1348
1301
|
return;
|
|
1349
1302
|
}
|
|
1350
|
-
const _minLength = this.minQueryLength
|
|
1351
|
-
if (!inputCleared && input.value.length < _minLength) {
|
|
1303
|
+
const _minLength = this.minQueryLength();
|
|
1304
|
+
if (!inputCleared && _minLength != null && input.value.length < _minLength) {
|
|
1352
1305
|
return;
|
|
1353
1306
|
}
|
|
1354
1307
|
const matchedOption = this.visibleOptions()?.find((option) => this.isOptionMatched(option, input.value));
|
|
1355
1308
|
if (!matchedOption) {
|
|
1356
1309
|
input.value = '';
|
|
1357
|
-
if (!this.multiple) {
|
|
1310
|
+
if (!this.multiple()) {
|
|
1358
1311
|
this.clear();
|
|
1359
1312
|
}
|
|
1360
1313
|
return;
|
|
@@ -1364,22 +1317,23 @@ class AutoComplete extends BaseInput {
|
|
|
1364
1317
|
}
|
|
1365
1318
|
}
|
|
1366
1319
|
autoUpdateModel() {
|
|
1367
|
-
if ((this.selectOnFocus || this.autoHighlight) && this.autoOptionFocus && !this.hasSelectedOption()) {
|
|
1320
|
+
if ((this.selectOnFocus() || this.autoHighlight()) && this.autoOptionFocus() && !this.hasSelectedOption()) {
|
|
1368
1321
|
const focusedOptionIndex = this.findFirstFocusedOptionIndex();
|
|
1369
1322
|
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
1370
1323
|
this.onOptionSelect(null, this.visibleOptions()[this.focusedOptionIndex()], false);
|
|
1371
1324
|
}
|
|
1372
1325
|
}
|
|
1373
1326
|
scrollInView(index = -1) {
|
|
1374
|
-
const id = index !== -1 ? `${this
|
|
1375
|
-
|
|
1376
|
-
|
|
1327
|
+
const id = index !== -1 ? `${this.$id()}_${index}` : this.focusedOptionId;
|
|
1328
|
+
const itemsViewChild = this.itemsViewChild();
|
|
1329
|
+
if (itemsViewChild && itemsViewChild.nativeElement) {
|
|
1330
|
+
const element = findSingle(itemsViewChild.nativeElement, `li[id="${id}"]`);
|
|
1377
1331
|
if (element) {
|
|
1378
1332
|
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
1379
1333
|
}
|
|
1380
1334
|
else if (!this.virtualScrollerDisabled) {
|
|
1381
1335
|
setTimeout(() => {
|
|
1382
|
-
this.virtualScroll && this.scroller?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
|
|
1336
|
+
this.virtualScroll() && this.scroller()?.scrollToIndex(index !== -1 ? index : this.focusedOptionIndex());
|
|
1383
1337
|
}, 0);
|
|
1384
1338
|
}
|
|
1385
1339
|
}
|
|
@@ -1388,47 +1342,49 @@ class AutoComplete extends BaseInput {
|
|
|
1388
1342
|
if (this.focusedOptionIndex() !== index) {
|
|
1389
1343
|
this.focusedOptionIndex.set(index);
|
|
1390
1344
|
this.scrollInView();
|
|
1391
|
-
if (this.selectOnFocus) {
|
|
1345
|
+
if (this.selectOnFocus()) {
|
|
1392
1346
|
this.onOptionSelect(event, this.visibleOptions()[index], false);
|
|
1393
1347
|
}
|
|
1394
1348
|
}
|
|
1395
1349
|
}
|
|
1396
1350
|
show(isFocus = false) {
|
|
1397
1351
|
this.dirty = true;
|
|
1398
|
-
this.overlayVisible
|
|
1399
|
-
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : -1;
|
|
1352
|
+
this.overlayVisible.set(true);
|
|
1353
|
+
const focusedOptionIndex = this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : -1;
|
|
1400
1354
|
this.focusedOptionIndex.set(focusedOptionIndex);
|
|
1401
|
-
isFocus && focus(this.inputEL?.nativeElement);
|
|
1355
|
+
isFocus && focus(this.inputEL()?.nativeElement);
|
|
1402
1356
|
if (isFocus) {
|
|
1403
|
-
focus(this.inputEL?.nativeElement);
|
|
1357
|
+
focus(this.inputEL()?.nativeElement);
|
|
1404
1358
|
}
|
|
1405
1359
|
this.onShow.emit();
|
|
1406
|
-
this.cd.markForCheck();
|
|
1407
1360
|
}
|
|
1408
1361
|
hide(isFocus = false) {
|
|
1409
1362
|
const _hide = () => {
|
|
1410
1363
|
this.dirty = isFocus;
|
|
1411
|
-
this.overlayVisible
|
|
1364
|
+
this.overlayVisible.set(false);
|
|
1412
1365
|
this.focusedOptionIndex.set(-1);
|
|
1413
|
-
isFocus && focus(this.inputEL?.nativeElement);
|
|
1366
|
+
isFocus && focus(this.inputEL()?.nativeElement);
|
|
1414
1367
|
this.onHide.emit();
|
|
1415
1368
|
this.updateInputWithForceSelection(null);
|
|
1416
|
-
this.cd.markForCheck();
|
|
1417
1369
|
};
|
|
1418
|
-
|
|
1370
|
+
if (this.timeout) {
|
|
1371
|
+
clearTimeout(this.timeout);
|
|
1372
|
+
}
|
|
1373
|
+
this.timeout = setTimeout(() => {
|
|
1419
1374
|
_hide();
|
|
1420
1375
|
}, 0); // For ScreenReaders
|
|
1421
1376
|
}
|
|
1422
1377
|
clear() {
|
|
1423
1378
|
this.updateModel(null);
|
|
1424
|
-
this.inputEL?.nativeElement && (this.inputEL.nativeElement.value = '');
|
|
1379
|
+
this.inputEL()?.nativeElement && (this.inputEL().nativeElement.value = '');
|
|
1425
1380
|
this.onClear.emit();
|
|
1381
|
+
this.overlayVisible() && this.hide();
|
|
1426
1382
|
}
|
|
1427
1383
|
hasSelectedOption() {
|
|
1428
1384
|
return isNotEmpty(this.modelValue());
|
|
1429
1385
|
}
|
|
1430
1386
|
getAriaPosInset(index) {
|
|
1431
|
-
return ((this.optionGroupLabel
|
|
1387
|
+
return ((this.optionGroupLabel()
|
|
1432
1388
|
? index -
|
|
1433
1389
|
this.visibleOptions()
|
|
1434
1390
|
.slice(0, index)
|
|
@@ -1436,19 +1392,26 @@ class AutoComplete extends BaseInput {
|
|
|
1436
1392
|
: index) + 1);
|
|
1437
1393
|
}
|
|
1438
1394
|
getOptionLabel(option) {
|
|
1439
|
-
|
|
1395
|
+
const optionLabel = this.optionLabel();
|
|
1396
|
+
return optionLabel ? resolveFieldData(option, optionLabel) : option && option.label != undefined ? option.label : option;
|
|
1440
1397
|
}
|
|
1441
1398
|
getOptionValue(option) {
|
|
1442
|
-
|
|
1399
|
+
const optionValue = this.optionValue();
|
|
1400
|
+
return optionValue ? resolveFieldData(option, optionValue) : option && option.value != undefined ? option.value : option;
|
|
1401
|
+
}
|
|
1402
|
+
getChipTrackKey(option) {
|
|
1403
|
+
return option != null && typeof option === 'object' ? this.getOptionValue(option) : option;
|
|
1443
1404
|
}
|
|
1444
1405
|
getOptionIndex(index, scrollerOptions) {
|
|
1445
1406
|
return this.virtualScrollerDisabled ? index : scrollerOptions && scrollerOptions.getItemOptions(index)['index'];
|
|
1446
1407
|
}
|
|
1447
1408
|
getOptionGroupLabel(optionGroup) {
|
|
1448
|
-
|
|
1409
|
+
const optionGroupLabel = this.optionGroupLabel();
|
|
1410
|
+
return optionGroupLabel ? resolveFieldData(optionGroup, optionGroupLabel) : optionGroup && optionGroup.label != undefined ? optionGroup.label : optionGroup;
|
|
1449
1411
|
}
|
|
1450
1412
|
getOptionGroupChildren(optionGroup) {
|
|
1451
|
-
|
|
1413
|
+
const optionGroupChildren = this.optionGroupChildren();
|
|
1414
|
+
return optionGroupChildren ? resolveFieldData(optionGroup, optionGroupChildren) : optionGroup.items;
|
|
1452
1415
|
}
|
|
1453
1416
|
getPTOptions(option, scrollerOptions, index, key) {
|
|
1454
1417
|
return this.ptm(key, {
|
|
@@ -1461,17 +1424,71 @@ class AutoComplete extends BaseInput {
|
|
|
1461
1424
|
}
|
|
1462
1425
|
});
|
|
1463
1426
|
}
|
|
1427
|
+
getSelectedItemContext(option) {
|
|
1428
|
+
return { $implicit: option };
|
|
1429
|
+
}
|
|
1430
|
+
getRemoveIconContext(index) {
|
|
1431
|
+
return { removeCallback: this.removeOption.bind(this), index, class: this.cx('chipIcon') };
|
|
1432
|
+
}
|
|
1433
|
+
getGroupContext(optionGroup) {
|
|
1434
|
+
return { $implicit: optionGroup };
|
|
1435
|
+
}
|
|
1436
|
+
getItemContext(option, index, scrollerOptions) {
|
|
1437
|
+
return {
|
|
1438
|
+
$implicit: option,
|
|
1439
|
+
index: scrollerOptions.getOptions ? scrollerOptions.getOptions(index) : index
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
getLoaderContext(scrollerOptions) {
|
|
1443
|
+
return { options: scrollerOptions };
|
|
1444
|
+
}
|
|
1445
|
+
getBuildInItemsContext(items, scrollerOptions) {
|
|
1446
|
+
return { $implicit: items, options: scrollerOptions };
|
|
1447
|
+
}
|
|
1448
|
+
shouldShowEmptyMessage(items) {
|
|
1449
|
+
return !items || (items.length === 0 && this.showEmptyMessage());
|
|
1450
|
+
}
|
|
1451
|
+
getItemStyle(scrollerOptions) {
|
|
1452
|
+
return { height: scrollerOptions.itemSize + 'px' };
|
|
1453
|
+
}
|
|
1454
|
+
getChipLabel(option) {
|
|
1455
|
+
return !this.selectedItemTemplate() && this.getOptionLabel(option);
|
|
1456
|
+
}
|
|
1457
|
+
getMultipleOptionId(index) {
|
|
1458
|
+
return this.$id() + '_multiple_option_' + index;
|
|
1459
|
+
}
|
|
1460
|
+
getOptionElementId(index, scrollerOptions) {
|
|
1461
|
+
return this.$id() + '_' + this.getOptionIndex(index, scrollerOptions);
|
|
1462
|
+
}
|
|
1463
|
+
isOptionFocused(index, scrollerOptions) {
|
|
1464
|
+
return this.focusedOptionIndex() === this.getOptionIndex(index, scrollerOptions);
|
|
1465
|
+
}
|
|
1466
|
+
getAriaControls() {
|
|
1467
|
+
return this.overlayVisible() ? this.$listId() : null;
|
|
1468
|
+
}
|
|
1469
|
+
getAriaActiveDescendant() {
|
|
1470
|
+
return this.focused() ? this.focusedOptionId : undefined;
|
|
1471
|
+
}
|
|
1472
|
+
getMultipleAriaActiveDescendant() {
|
|
1473
|
+
return this.focused() ? this.focusedMultipleOptionId : undefined;
|
|
1474
|
+
}
|
|
1475
|
+
getMultiplePlaceholder() {
|
|
1476
|
+
return !this.$filled() ? this.placeholder() : null;
|
|
1477
|
+
}
|
|
1478
|
+
getListContainerMaxHeight() {
|
|
1479
|
+
return this.virtualScroll() ? 'auto' : this.scrollHeight();
|
|
1480
|
+
}
|
|
1464
1481
|
onOverlayBeforeEnter() {
|
|
1465
|
-
this.itemsWrapper = findSingle(this.overlayViewChild
|
|
1466
|
-
if (this.virtualScroll) {
|
|
1467
|
-
this.scroller?.setContentEl(this.itemsViewChild?.nativeElement);
|
|
1468
|
-
this.scroller?.viewInit();
|
|
1482
|
+
this.itemsWrapper = findSingle(this.overlayViewChild()?.overlayViewChild()?.nativeElement, this.virtualScroll() ? '[data-pc-name="virtualscroller"]' : '[data-pc-name="pcoverlay"]');
|
|
1483
|
+
if (this.virtualScroll()) {
|
|
1484
|
+
this.scroller()?.setContentEl(this.itemsViewChild()?.nativeElement);
|
|
1485
|
+
this.scroller()?.viewInit();
|
|
1469
1486
|
}
|
|
1470
1487
|
if (this.visibleOptions() && this.visibleOptions().length) {
|
|
1471
|
-
if (this.virtualScroll) {
|
|
1488
|
+
if (this.virtualScroll()) {
|
|
1472
1489
|
const selectedIndex = this.modelValue() ? this.focusedOptionIndex() : -1;
|
|
1473
1490
|
if (selectedIndex !== -1) {
|
|
1474
|
-
this.scroller?.scrollToIndex(selectedIndex);
|
|
1491
|
+
this.scroller()?.scrollToIndex(selectedIndex);
|
|
1475
1492
|
}
|
|
1476
1493
|
}
|
|
1477
1494
|
else {
|
|
@@ -1496,7 +1513,7 @@ class AutoComplete extends BaseInput {
|
|
|
1496
1513
|
return this.cn({
|
|
1497
1514
|
invalid: this.invalid(),
|
|
1498
1515
|
disabled: this.$disabled(),
|
|
1499
|
-
focus: this.focused,
|
|
1516
|
+
focus: this.focused(),
|
|
1500
1517
|
fluid: this.hasFluid,
|
|
1501
1518
|
filled: this.$variant() === 'filled',
|
|
1502
1519
|
empty: !this.$filled(),
|
|
@@ -1510,7 +1527,7 @@ class AutoComplete extends BaseInput {
|
|
|
1510
1527
|
* Writes the value to the control.
|
|
1511
1528
|
*/
|
|
1512
1529
|
writeControlValue(value, setModelValue) {
|
|
1513
|
-
if (this.multiple) {
|
|
1530
|
+
if (this.multiple()) {
|
|
1514
1531
|
const resolved = (value || []).map((val) => {
|
|
1515
1532
|
const match = this.visibleOptions().find((option) => equals(val, option, this.equalityKey()));
|
|
1516
1533
|
return match ?? val;
|
|
@@ -1523,174 +1540,192 @@ class AutoComplete extends BaseInput {
|
|
|
1523
1540
|
}
|
|
1524
1541
|
this.value = value;
|
|
1525
1542
|
this.updateInputValue();
|
|
1526
|
-
this.cd.markForCheck();
|
|
1527
1543
|
}
|
|
1528
1544
|
onDestroy() {
|
|
1545
|
+
if (this.searchTimeout) {
|
|
1546
|
+
clearTimeout(this.searchTimeout);
|
|
1547
|
+
}
|
|
1548
|
+
if (this.timeout) {
|
|
1549
|
+
clearTimeout(this.timeout);
|
|
1550
|
+
}
|
|
1529
1551
|
if (this.scrollHandler) {
|
|
1530
1552
|
this.scrollHandler.destroy();
|
|
1531
1553
|
this.scrollHandler = null;
|
|
1532
1554
|
}
|
|
1533
1555
|
}
|
|
1534
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1535
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.13", type: AutoComplete, isStandalone: true, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: { minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: false, isRequired: false, transformFunction: numberAttribute }, delay: { classPropertyName: "delay", publicName: "delay", isSignal: false, isRequired: false, transformFunction: numberAttribute }, 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 }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: false, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: false, isRequired: false, transformFunction: numberAttribute }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: false, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, dropdownAriaLabel: { classPropertyName: "dropdownAriaLabel", publicName: "dropdownAriaLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: false, isRequired: false, transformFunction: null }, unique: { classPropertyName: "unique", publicName: "unique", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, group: { classPropertyName: "group", publicName: "group", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, showEmptyMessage: { classPropertyName: "showEmptyMessage", publicName: "showEmptyMessage", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, dropdownMode: { classPropertyName: "dropdownMode", publicName: "dropdownMode", isSignal: false, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, addOnTab: { classPropertyName: "addOnTab", publicName: "addOnTab", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: false, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: false, isRequired: false, transformFunction: null }, showTransitionOptions: { classPropertyName: "showTransitionOptions", publicName: "showTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, hideTransitionOptions: { classPropertyName: "hideTransitionOptions", publicName: "hideTransitionOptions", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: false, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: false, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: false, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: false, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: false, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: false, isRequired: false, transformFunction: null }, optionValue: { classPropertyName: "optionValue", publicName: "optionValue", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, searchMessage: { classPropertyName: "searchMessage", publicName: "searchMessage", isSignal: false, isRequired: false, transformFunction: null }, emptySelectionMessage: { classPropertyName: "emptySelectionMessage", publicName: "emptySelectionMessage", isSignal: false, isRequired: false, transformFunction: null }, selectionMessage: { classPropertyName: "selectionMessage", publicName: "selectionMessage", isSignal: false, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, searchLocale: { classPropertyName: "searchLocale", publicName: "searchLocale", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: false, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, separator: { classPropertyName: "separator", publicName: "separator", 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: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onAdd: "onAdd", onFocus: "onFocus", onBlur: "onBlur", onDropdownClick: "onDropdownClick", onClear: "onClear", onInputKeydown: "onInputKeydown", onKeyUp: "onKeyUp", onShow: "onShow", onHide: "onHide", onLazyLoad: "onLazyLoad" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "cn(cx('root'), styleClass)", "style": "sx('root')", "attr.data-p": "containerDataP" } }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR, AutoCompleteStyle, { provide: AUTOCOMPLETE_INSTANCE, useExisting: AutoComplete }, { provide: PARENT_INSTANCE, useExisting: AutoComplete }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], descendants: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], descendants: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], descendants: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], descendants: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selecteditem"], descendants: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], descendants: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], descendants: true }, { propertyName: "removeIconTemplate", first: true, predicate: ["removeicon"], descendants: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], descendants: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"], descendants: true }, { propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "inputEL", first: true, predicate: ["focusInput"], descendants: true }, { propertyName: "multiInputEl", first: true, predicate: ["multiIn"], descendants: true }, { propertyName: "multiContainerEL", first: true, predicate: ["multiContainer"], descendants: true }, { propertyName: "dropdownButton", first: true, predicate: ["ddBtn"], descendants: true }, { propertyName: "itemsViewChild", first: true, predicate: ["items"], descendants: true }, { propertyName: "scroller", first: true, predicate: ["scroller"], descendants: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i2.Bind }], ngImport: i0, template: `
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
<
|
|
1585
|
-
|
|
1586
|
-
|
|
1556
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoComplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1557
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: AutoComplete, isStandalone: true, selector: "p-autocomplete, p-auto-complete", inputs: { minQueryLength: { classPropertyName: "minQueryLength", publicName: "minQueryLength", isSignal: true, isRequired: false, transformFunction: null }, delay: { classPropertyName: "delay", publicName: "delay", 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 }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, inputStyleClass: { classPropertyName: "inputStyleClass", publicName: "inputStyleClass", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollItemSize: { classPropertyName: "virtualScrollItemSize", publicName: "virtualScrollItemSize", isSignal: true, isRequired: false, transformFunction: null }, virtualScrollOptions: { classPropertyName: "virtualScrollOptions", publicName: "virtualScrollOptions", isSignal: true, isRequired: false, transformFunction: null }, autoHighlight: { classPropertyName: "autoHighlight", publicName: "autoHighlight", isSignal: true, isRequired: false, transformFunction: null }, forceSelection: { classPropertyName: "forceSelection", publicName: "forceSelection", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, dropdownAriaLabel: { classPropertyName: "dropdownAriaLabel", publicName: "dropdownAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, dropdownIcon: { classPropertyName: "dropdownIcon", publicName: "dropdownIcon", isSignal: true, isRequired: false, transformFunction: null }, unique: { classPropertyName: "unique", publicName: "unique", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null }, completeOnFocus: { classPropertyName: "completeOnFocus", publicName: "completeOnFocus", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, dropdown: { classPropertyName: "dropdown", publicName: "dropdown", isSignal: true, isRequired: false, transformFunction: null }, showEmptyMessage: { classPropertyName: "showEmptyMessage", publicName: "showEmptyMessage", isSignal: true, isRequired: false, transformFunction: null }, dropdownMode: { classPropertyName: "dropdownMode", publicName: "dropdownMode", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, addOnTab: { classPropertyName: "addOnTab", publicName: "addOnTab", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", 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 }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, searchMessage: { classPropertyName: "searchMessage", publicName: "searchMessage", isSignal: true, isRequired: false, transformFunction: null }, emptySelectionMessage: { classPropertyName: "emptySelectionMessage", publicName: "emptySelectionMessage", isSignal: true, isRequired: false, transformFunction: null }, selectionMessage: { classPropertyName: "selectionMessage", publicName: "selectionMessage", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, searchLocale: { classPropertyName: "searchLocale", publicName: "searchLocale", isSignal: true, isRequired: false, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnHover: { classPropertyName: "focusOnHover", publicName: "focusOnHover", isSignal: true, isRequired: false, transformFunction: null }, typeahead: { classPropertyName: "typeahead", publicName: "typeahead", isSignal: true, isRequired: false, transformFunction: null }, addOnBlur: { classPropertyName: "addOnBlur", publicName: "addOnBlur", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", 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: { completeMethod: "completeMethod", onSelect: "onSelect", onUnselect: "onUnselect", onAdd: "onAdd", onFocus: "onFocus", onBlur: "onBlur", onDropdownClick: "onDropdownClick", onClear: "onClear", onInputKeydown: "onInputKeydown", onKeyUp: "onKeyUp", onShow: "onShow", onHide: "onHide", onLazyLoad: "onLazyLoad" }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "class": "cx('root')", "style": "sx('root')", "attr.data-p": "containerDataP" } }, providers: [AUTOCOMPLETE_VALUE_ACCESSOR, AutoCompleteStyle, { provide: AUTOCOMPLETE_INSTANCE, useExisting: AutoComplete }, { provide: PARENT_INSTANCE, useExisting: AutoComplete }], queries: [{ propertyName: "itemTemplate", first: true, predicate: ["item"], isSignal: true }, { propertyName: "emptyTemplate", first: true, predicate: ["empty"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "selectedItemTemplate", first: true, predicate: ["selecteditem"], isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ["group"], isSignal: true }, { propertyName: "loaderTemplate", first: true, predicate: ["loader"], isSignal: true }, { propertyName: "removeIconTemplate", first: true, predicate: ["removeicon"], isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], isSignal: true }, { propertyName: "dropdownIconTemplate", first: true, predicate: ["dropdownicon"], isSignal: true }], viewQueries: [{ propertyName: "inputEL", first: true, predicate: ["focusInput"], descendants: true, isSignal: true }, { propertyName: "multiInputEl", first: true, predicate: ["multiIn"], descendants: true, isSignal: true }, { propertyName: "multiContainerEL", first: true, predicate: ["multiContainer"], descendants: true, isSignal: true }, { propertyName: "dropdownButton", first: true, predicate: ["ddBtn"], 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 }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
1558
|
+
@if (!multiple()) {
|
|
1559
|
+
<input
|
|
1560
|
+
#focusInput
|
|
1561
|
+
[pAutoFocus]="autofocus()"
|
|
1562
|
+
pInputText
|
|
1563
|
+
[pt]="ptm('pcInputText')"
|
|
1564
|
+
[class]="cn(cx('pcInputText'), inputStyleClass())"
|
|
1565
|
+
[style]="inputStyle()"
|
|
1566
|
+
[attr.type]="type()"
|
|
1567
|
+
[attr.value]="inputValue()"
|
|
1568
|
+
[variant]="$variant()"
|
|
1569
|
+
[invalid]="invalid()"
|
|
1570
|
+
[attr.id]="inputId()"
|
|
1571
|
+
[attr.autocomplete]="autocomplete()"
|
|
1572
|
+
aria-autocomplete="list"
|
|
1573
|
+
role="combobox"
|
|
1574
|
+
[attr.placeholder]="placeholder()"
|
|
1575
|
+
[attr.name]="name()"
|
|
1576
|
+
[attr.minlength]="minlength()"
|
|
1577
|
+
[pSize]="size()"
|
|
1578
|
+
[attr.min]="min()"
|
|
1579
|
+
[attr.max]="max()"
|
|
1580
|
+
[attr.pattern]="$pattern()"
|
|
1581
|
+
[attr.size]="inputSize()"
|
|
1582
|
+
[attr.maxlength]="maxlength()"
|
|
1583
|
+
[attr.tabindex]="$tabindex()"
|
|
1584
|
+
[attr.required]="requiredAttr()"
|
|
1585
|
+
[attr.readonly]="readonlyAttr()"
|
|
1586
|
+
[attr.disabled]="disabledAttr()"
|
|
1587
|
+
[attr.aria-label]="ariaLabel()"
|
|
1588
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1589
|
+
[attr.aria-required]="required()"
|
|
1590
|
+
[attr.aria-expanded]="overlayVisible()"
|
|
1591
|
+
[attr.aria-controls]="getAriaControls()"
|
|
1592
|
+
[attr.aria-activedescendant]="getAriaActiveDescendant()"
|
|
1593
|
+
(input)="onInput($event)"
|
|
1594
|
+
(keydown)="onKeyDown($event)"
|
|
1595
|
+
(change)="onInputChange($event)"
|
|
1596
|
+
(focus)="onInputFocus($event)"
|
|
1597
|
+
(blur)="onInputBlur($event)"
|
|
1598
|
+
(paste)="onInputPaste($event)"
|
|
1599
|
+
(keyup)="onInputKeyUp($event)"
|
|
1600
|
+
[fluid]="hasFluid"
|
|
1601
|
+
[pInputTextUnstyled]="unstyled()"
|
|
1602
|
+
/>
|
|
1603
|
+
}
|
|
1604
|
+
@if ($showClear()) {
|
|
1605
|
+
@if (!clearIconTemplate()) {
|
|
1606
|
+
<svg data-p-icon="times" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
|
|
1607
|
+
} @else {
|
|
1608
|
+
<span [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()">
|
|
1609
|
+
<ng-container [ngTemplateOutlet]="clearIconTemplate()!"></ng-container>
|
|
1610
|
+
</span>
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1587
1613
|
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
>
|
|
1602
|
-
<li
|
|
1603
|
-
#token
|
|
1604
|
-
*ngFor="let option of modelValue(); let i = index"
|
|
1605
|
-
[pBind]="ptm('chipItem')"
|
|
1606
|
-
[class]="cx('chipItem', { i })"
|
|
1607
|
-
[attr.id]="id + '_multiple_option_' + i"
|
|
1608
|
-
role="option"
|
|
1609
|
-
[attr.aria-label]="getOptionLabel(option)"
|
|
1610
|
-
[attr.aria-setsize]="modelValue().length"
|
|
1611
|
-
[attr.aria-posinset]="i + 1"
|
|
1612
|
-
[attr.aria-selected]="true"
|
|
1614
|
+
@if (multiple()) {
|
|
1615
|
+
<ul
|
|
1616
|
+
#multiContainer
|
|
1617
|
+
[pBind]="ptm('inputMultiple')"
|
|
1618
|
+
[class]="cx('inputMultiple')"
|
|
1619
|
+
[attr.data-p]="inputMultipleDataP"
|
|
1620
|
+
[tabindex]="-1"
|
|
1621
|
+
role="listbox"
|
|
1622
|
+
[attr.aria-orientation]="'horizontal'"
|
|
1623
|
+
[attr.aria-activedescendant]="getMultipleAriaActiveDescendant()"
|
|
1624
|
+
(focus)="onMultipleContainerFocus($event)"
|
|
1625
|
+
(blur)="onMultipleContainerBlur($event)"
|
|
1626
|
+
(keydown)="onMultipleContainerKeyDown($event)"
|
|
1613
1627
|
>
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1628
|
+
@for (option of modelValue(); track getChipTrackKey(option); let i = $index) {
|
|
1629
|
+
<li
|
|
1630
|
+
#token
|
|
1631
|
+
[pBind]="ptm('chipItem')"
|
|
1632
|
+
[class]="cx('chipItem', { i })"
|
|
1633
|
+
[attr.id]="getMultipleOptionId(i)"
|
|
1634
|
+
role="option"
|
|
1635
|
+
[attr.aria-label]="getOptionLabel(option)"
|
|
1636
|
+
[attr.aria-setsize]="modelValue().length"
|
|
1637
|
+
[attr.aria-posinset]="i + 1"
|
|
1638
|
+
[attr.aria-selected]="true"
|
|
1639
|
+
>
|
|
1640
|
+
<p-chip [pt]="ptm('pcChip')" [class]="cx('pcChip')" [label]="getChipLabel(option)" [disabled]="$disabled()" [removable]="true" (onRemove)="!readonly() ? removeOption($event, i) : ''" [unstyled]="unstyled()">
|
|
1641
|
+
@if (selectedItemTemplate()) {
|
|
1642
|
+
<ng-container [ngTemplateOutlet]="selectedItemTemplate()!" [ngTemplateOutletContext]="getSelectedItemContext(option)"></ng-container>
|
|
1643
|
+
}
|
|
1644
|
+
<ng-template #removeicon>
|
|
1645
|
+
@if (!removeIconTemplate()) {
|
|
1646
|
+
<span [pBind]="ptm('chipIcon')" [class]="cx('chipIcon')" (click)="!readonly() && !$disabled() ? removeOption($event, i) : ''">
|
|
1647
|
+
<svg data-p-icon="times-circle" [class]="cx('chipIcon')" [attr.aria-hidden]="true" />
|
|
1648
|
+
</span>
|
|
1649
|
+
} @else {
|
|
1650
|
+
<span [pBind]="ptm('chipIcon')" [attr.aria-hidden]="true">
|
|
1651
|
+
<ng-container [ngTemplateOutlet]="removeIconTemplate()!" [ngTemplateOutletContext]="getRemoveIconContext(i)"></ng-container>
|
|
1652
|
+
</span>
|
|
1653
|
+
}
|
|
1654
|
+
</ng-template>
|
|
1655
|
+
</p-chip>
|
|
1656
|
+
</li>
|
|
1657
|
+
}
|
|
1658
|
+
<li [pBind]="ptm('inputChip')" [class]="cx('inputChip')" role="option">
|
|
1659
|
+
<input
|
|
1660
|
+
#focusInput
|
|
1661
|
+
#multiIn
|
|
1662
|
+
[pAutoFocus]="autofocus()"
|
|
1663
|
+
[pBind]="ptm('input')"
|
|
1664
|
+
[class]="cx('pcInputText')"
|
|
1665
|
+
[style]="inputStyle()"
|
|
1666
|
+
[attr.type]="type()"
|
|
1667
|
+
[attr.id]="inputId()"
|
|
1668
|
+
[attr.autocomplete]="autocomplete()"
|
|
1669
|
+
[attr.name]="name()"
|
|
1670
|
+
[attr.minlength]="minlength()"
|
|
1671
|
+
[attr.maxlength]="maxlength()"
|
|
1672
|
+
[attr.size]="size()"
|
|
1673
|
+
[attr.min]="min()"
|
|
1674
|
+
[attr.max]="max()"
|
|
1675
|
+
[attr.pattern]="$pattern()"
|
|
1676
|
+
role="combobox"
|
|
1677
|
+
[attr.placeholder]="getMultiplePlaceholder()"
|
|
1678
|
+
aria-autocomplete="list"
|
|
1679
|
+
[attr.tabindex]="$tabindex()"
|
|
1680
|
+
[attr.required]="requiredAttr()"
|
|
1681
|
+
[attr.readonly]="readonlyAttr()"
|
|
1682
|
+
[attr.disabled]="disabledAttr()"
|
|
1683
|
+
[attr.aria-label]="ariaLabel()"
|
|
1684
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1685
|
+
[attr.aria-required]="required()"
|
|
1686
|
+
[attr.aria-expanded]="overlayVisible()"
|
|
1687
|
+
[attr.aria-controls]="getAriaControls()"
|
|
1688
|
+
[attr.aria-activedescendant]="getAriaActiveDescendant()"
|
|
1689
|
+
(input)="onInput($event)"
|
|
1690
|
+
(keydown)="onKeyDown($event)"
|
|
1691
|
+
(change)="onInputChange($event)"
|
|
1692
|
+
(focus)="onInputFocus($event)"
|
|
1693
|
+
(blur)="onInputBlur($event)"
|
|
1694
|
+
(paste)="onInputPaste($event)"
|
|
1695
|
+
(keyup)="onInputKeyUp($event)"
|
|
1696
|
+
/>
|
|
1697
|
+
</li>
|
|
1698
|
+
</ul>
|
|
1699
|
+
}
|
|
1700
|
+
@if (loading()) {
|
|
1701
|
+
@if (!loadingIconTemplate()) {
|
|
1702
|
+
<svg data-p-icon="spinner" [pBind]="ptm('loader')" [class]="cn(cx('loader'))" [attr.aria-hidden]="true" />
|
|
1703
|
+
} @else {
|
|
1704
|
+
<span [pBind]="ptm('loader')" [class]="cx('loader')" [attr.aria-hidden]="true">
|
|
1705
|
+
<ng-container [ngTemplateOutlet]="loadingIconTemplate()!"></ng-container>
|
|
1706
|
+
</span>
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
@if (dropdown()) {
|
|
1710
|
+
<button #ddBtn type="button" [pBind]="ptm('dropdown')" [attr.aria-label]="dropdownAriaLabel()" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" [attr.tabindex]="tabindex()">
|
|
1711
|
+
@if (dropdownIcon()) {
|
|
1712
|
+
<span [class]="dropdownIcon()" [attr.aria-hidden]="true"></span>
|
|
1713
|
+
} @else {
|
|
1714
|
+
@if (!dropdownIconTemplate()) {
|
|
1715
|
+
<svg data-p-icon="chevron-down" [pBind]="ptm('dropdown')" />
|
|
1716
|
+
} @else {
|
|
1717
|
+
<ng-container [ngTemplateOutlet]="dropdownIconTemplate()!"></ng-container>
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
</button>
|
|
1721
|
+
}
|
|
1688
1722
|
<p-overlay
|
|
1689
1723
|
#overlay
|
|
1690
1724
|
[hostAttrSelector]="$attrSelector"
|
|
1691
|
-
[
|
|
1692
|
-
|
|
1693
|
-
[
|
|
1725
|
+
[visible]="overlayVisible()"
|
|
1726
|
+
(visibleChange)="overlayVisible.set($event)"
|
|
1727
|
+
[options]="overlayOptions()"
|
|
1728
|
+
[target]="$overlayTarget"
|
|
1694
1729
|
[appendTo]="$appendTo()"
|
|
1695
1730
|
[unstyled]="unstyled()"
|
|
1696
1731
|
[pt]="ptm('pcOverlay')"
|
|
@@ -1700,258 +1735,276 @@ class AutoComplete extends BaseInput {
|
|
|
1700
1735
|
[attr.data-p]="overlayDataP"
|
|
1701
1736
|
>
|
|
1702
1737
|
<ng-template #content>
|
|
1703
|
-
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass)" [
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
<ng-template #loader let-scrollerOptions="options">
|
|
1724
|
-
<ng-container *ngTemplateOutlet="loaderTemplate || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
|
|
1738
|
+
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass())" [style]="panelStyle()">
|
|
1739
|
+
@if (headerTemplate()) {
|
|
1740
|
+
<ng-container [ngTemplateOutlet]="headerTemplate()!"></ng-container>
|
|
1741
|
+
}
|
|
1742
|
+
<div [pBind]="ptm('listContainer')" [class]="cx('listContainer')" [style.max-height]="getListContainerMaxHeight()" [tabindex]="-1">
|
|
1743
|
+
@if (virtualScroll()) {
|
|
1744
|
+
<p-scroller
|
|
1745
|
+
#scroller
|
|
1746
|
+
[tabindex]="-1"
|
|
1747
|
+
[pt]="ptm('virtualScroller')"
|
|
1748
|
+
[items]="visibleOptions()"
|
|
1749
|
+
[style]="scrollerStyle()"
|
|
1750
|
+
[itemSize]="virtualScrollItemSize()"
|
|
1751
|
+
[autoSize]="true"
|
|
1752
|
+
[lazy]="lazy()"
|
|
1753
|
+
(onLazyLoad)="onLazyLoad.emit($event)"
|
|
1754
|
+
[options]="virtualScrollOptions()"
|
|
1755
|
+
>
|
|
1756
|
+
<ng-template #content let-items let-scrollerOptions="options">
|
|
1757
|
+
<ng-container [ngTemplateOutlet]="buildInItems" [ngTemplateOutletContext]="getBuildInItemsContext(items, scrollerOptions)"></ng-container>
|
|
1725
1758
|
</ng-template>
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1759
|
+
@if (loaderTemplate()) {
|
|
1760
|
+
<ng-template #loader let-scrollerOptions="options">
|
|
1761
|
+
<ng-container [ngTemplateOutlet]="loaderTemplate()!" [ngTemplateOutletContext]="getLoaderContext(scrollerOptions)"></ng-container>
|
|
1762
|
+
</ng-template>
|
|
1763
|
+
}
|
|
1764
|
+
</p-scroller>
|
|
1765
|
+
} @else {
|
|
1766
|
+
<ng-container [ngTemplateOutlet]="buildInItems" [ngTemplateOutletContext]="getBuildInItemsContext(visibleOptions(), {})"></ng-container>
|
|
1767
|
+
}
|
|
1731
1768
|
</div>
|
|
1732
1769
|
|
|
1733
1770
|
<ng-template #buildInItems let-items let-scrollerOptions="options">
|
|
1734
|
-
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
<li [pBind]="ptm('optionGroup')" [attr.id]="
|
|
1738
|
-
|
|
1739
|
-
|
|
1771
|
+
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="$listId()" [attr.aria-label]="listLabel">
|
|
1772
|
+
@for (option of items; track getOptionValue(option); let i = $index) {
|
|
1773
|
+
@if (isOptionGroup(option)) {
|
|
1774
|
+
<li [pBind]="ptm('optionGroup')" [attr.id]="getOptionElementId(i, scrollerOptions)" [class]="cx('optionGroup')" [style]="getItemStyle(scrollerOptions)" role="option">
|
|
1775
|
+
@if (!groupTemplate()) {
|
|
1776
|
+
<span>{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
1777
|
+
}
|
|
1778
|
+
@if (groupTemplate()) {
|
|
1779
|
+
<ng-container [ngTemplateOutlet]="groupTemplate()!" [ngTemplateOutletContext]="getGroupContext(option.optionGroup)"></ng-container>
|
|
1780
|
+
}
|
|
1740
1781
|
</li>
|
|
1741
|
-
|
|
1742
|
-
<ng-container *ngIf="!isOptionGroup(option)">
|
|
1782
|
+
} @else {
|
|
1743
1783
|
<li
|
|
1744
1784
|
pRipple
|
|
1745
1785
|
[pBind]="getPTOptions(option, scrollerOptions, i, 'option')"
|
|
1746
|
-
[
|
|
1786
|
+
[style]="getItemStyle(scrollerOptions)"
|
|
1747
1787
|
[class]="cx('option', { option, i, scrollerOptions })"
|
|
1748
|
-
[attr.id]="
|
|
1788
|
+
[attr.id]="getOptionElementId(i, scrollerOptions)"
|
|
1749
1789
|
role="option"
|
|
1750
1790
|
[attr.aria-label]="getOptionLabel(option)"
|
|
1751
1791
|
[attr.aria-selected]="isSelected(option)"
|
|
1752
1792
|
[attr.data-p-selected]="isSelected(option)"
|
|
1753
1793
|
[attr.aria-disabled]="isOptionDisabled(option)"
|
|
1754
|
-
[attr.data-p-focused]="
|
|
1794
|
+
[attr.data-p-focused]="isOptionFocused(i, scrollerOptions)"
|
|
1755
1795
|
[attr.aria-setsize]="ariaSetSize"
|
|
1756
1796
|
[attr.aria-posinset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
|
|
1757
1797
|
(click)="onOptionSelect($event, option)"
|
|
1758
1798
|
(mouseenter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
|
|
1759
1799
|
>
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
$implicit: option,
|
|
1766
|
-
index: scrollerOptions.getOptions ? scrollerOptions.getOptions(i) : i
|
|
1767
|
-
}
|
|
1768
|
-
"
|
|
1769
|
-
></ng-container>
|
|
1800
|
+
@if (!itemTemplate()) {
|
|
1801
|
+
<span>{{ getOptionLabel(option) }}</span>
|
|
1802
|
+
} @else {
|
|
1803
|
+
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="getItemContext(option, i, scrollerOptions)"></ng-container>
|
|
1804
|
+
}
|
|
1770
1805
|
</li>
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
<
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
@if (shouldShowEmptyMessage(items)) {
|
|
1809
|
+
<li [pBind]="ptm('emptyMessage')" [class]="cx('emptyMessage')" [style]="getItemStyle(scrollerOptions)" role="option">
|
|
1810
|
+
@if (!emptyTemplate()) {
|
|
1811
|
+
{{ searchResultMessageText }}
|
|
1812
|
+
} @else {
|
|
1813
|
+
<ng-container [ngTemplateOutlet]="emptyTemplate()!"></ng-container>
|
|
1814
|
+
}
|
|
1815
|
+
</li>
|
|
1816
|
+
}
|
|
1779
1817
|
</ul>
|
|
1780
1818
|
</ng-template>
|
|
1781
|
-
|
|
1819
|
+
@if (footerTemplate()) {
|
|
1820
|
+
<ng-container [ngTemplateOutlet]="footerTemplate()!"></ng-container>
|
|
1821
|
+
}
|
|
1782
1822
|
</div>
|
|
1783
1823
|
<span role="status" aria-live="polite" class="p-hidden-accessible">
|
|
1784
1824
|
{{ selectedMessageText }}
|
|
1785
1825
|
</span>
|
|
1786
1826
|
</ng-template>
|
|
1787
1827
|
</p-overlay>
|
|
1788
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
1828
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onAnimationStart", "onAnimationDone", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: Scroller, selector: "p-scroller, p-virtualscroller, p-virtual-scroller", inputs: ["hostName", "id", "style", "styleClass", "tabindex", "items", "itemSize", "scrollHeight", "scrollWidth", "orientation", "step", "delay", "resizeDelay", "appendOnly", "inline", "lazy", "disabled", "loaderDisabled", "columns", "showSpacer", "showLoader", "numToleratedItems", "loading", "autoSize", "trackBy", "options"], outputs: ["onLazyLoad", "onScroll", "onScrollIndexChange"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: TimesCircle, selector: "svg[data-p-icon=\"times-circle\"]" }, { kind: "component", type: Spinner, selector: "svg[data-p-icon=\"spinner\"]" }, { kind: "component", type: ChevronDown, selector: "svg[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "ngmodule", type: SharedModule }, { kind: "component", type: Times, selector: "svg[data-p-icon=\"times\"]" }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1789
1829
|
}
|
|
1790
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1830
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoComplete, decorators: [{
|
|
1791
1831
|
type: Component,
|
|
1792
1832
|
args: [{
|
|
1793
|
-
selector: 'p-
|
|
1833
|
+
selector: 'p-autocomplete, p-auto-complete',
|
|
1794
1834
|
standalone: true,
|
|
1795
|
-
imports: [
|
|
1835
|
+
imports: [NgTemplateOutlet, Overlay, InputText, Ripple, Scroller, AutoFocus, TimesCircle, Spinner, ChevronDown, Chip, SharedModule, Times, BindModule],
|
|
1796
1836
|
template: `
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
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
|
-
|
|
1837
|
+
@if (!multiple()) {
|
|
1838
|
+
<input
|
|
1839
|
+
#focusInput
|
|
1840
|
+
[pAutoFocus]="autofocus()"
|
|
1841
|
+
pInputText
|
|
1842
|
+
[pt]="ptm('pcInputText')"
|
|
1843
|
+
[class]="cn(cx('pcInputText'), inputStyleClass())"
|
|
1844
|
+
[style]="inputStyle()"
|
|
1845
|
+
[attr.type]="type()"
|
|
1846
|
+
[attr.value]="inputValue()"
|
|
1847
|
+
[variant]="$variant()"
|
|
1848
|
+
[invalid]="invalid()"
|
|
1849
|
+
[attr.id]="inputId()"
|
|
1850
|
+
[attr.autocomplete]="autocomplete()"
|
|
1851
|
+
aria-autocomplete="list"
|
|
1852
|
+
role="combobox"
|
|
1853
|
+
[attr.placeholder]="placeholder()"
|
|
1854
|
+
[attr.name]="name()"
|
|
1855
|
+
[attr.minlength]="minlength()"
|
|
1856
|
+
[pSize]="size()"
|
|
1857
|
+
[attr.min]="min()"
|
|
1858
|
+
[attr.max]="max()"
|
|
1859
|
+
[attr.pattern]="$pattern()"
|
|
1860
|
+
[attr.size]="inputSize()"
|
|
1861
|
+
[attr.maxlength]="maxlength()"
|
|
1862
|
+
[attr.tabindex]="$tabindex()"
|
|
1863
|
+
[attr.required]="requiredAttr()"
|
|
1864
|
+
[attr.readonly]="readonlyAttr()"
|
|
1865
|
+
[attr.disabled]="disabledAttr()"
|
|
1866
|
+
[attr.aria-label]="ariaLabel()"
|
|
1867
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1868
|
+
[attr.aria-required]="required()"
|
|
1869
|
+
[attr.aria-expanded]="overlayVisible()"
|
|
1870
|
+
[attr.aria-controls]="getAriaControls()"
|
|
1871
|
+
[attr.aria-activedescendant]="getAriaActiveDescendant()"
|
|
1872
|
+
(input)="onInput($event)"
|
|
1873
|
+
(keydown)="onKeyDown($event)"
|
|
1874
|
+
(change)="onInputChange($event)"
|
|
1875
|
+
(focus)="onInputFocus($event)"
|
|
1876
|
+
(blur)="onInputBlur($event)"
|
|
1877
|
+
(paste)="onInputPaste($event)"
|
|
1878
|
+
(keyup)="onInputKeyUp($event)"
|
|
1879
|
+
[fluid]="hasFluid"
|
|
1880
|
+
[pInputTextUnstyled]="unstyled()"
|
|
1881
|
+
/>
|
|
1882
|
+
}
|
|
1883
|
+
@if ($showClear()) {
|
|
1884
|
+
@if (!clearIconTemplate()) {
|
|
1885
|
+
<svg data-p-icon="times" [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()" [attr.aria-hidden]="true" />
|
|
1886
|
+
} @else {
|
|
1887
|
+
<span [pBind]="ptm('clearIcon')" [class]="cx('clearIcon')" (click)="clear()">
|
|
1888
|
+
<ng-container [ngTemplateOutlet]="clearIconTemplate()!"></ng-container>
|
|
1889
|
+
</span>
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1848
1892
|
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
>
|
|
1863
|
-
<li
|
|
1864
|
-
#token
|
|
1865
|
-
*ngFor="let option of modelValue(); let i = index"
|
|
1866
|
-
[pBind]="ptm('chipItem')"
|
|
1867
|
-
[class]="cx('chipItem', { i })"
|
|
1868
|
-
[attr.id]="id + '_multiple_option_' + i"
|
|
1869
|
-
role="option"
|
|
1870
|
-
[attr.aria-label]="getOptionLabel(option)"
|
|
1871
|
-
[attr.aria-setsize]="modelValue().length"
|
|
1872
|
-
[attr.aria-posinset]="i + 1"
|
|
1873
|
-
[attr.aria-selected]="true"
|
|
1893
|
+
@if (multiple()) {
|
|
1894
|
+
<ul
|
|
1895
|
+
#multiContainer
|
|
1896
|
+
[pBind]="ptm('inputMultiple')"
|
|
1897
|
+
[class]="cx('inputMultiple')"
|
|
1898
|
+
[attr.data-p]="inputMultipleDataP"
|
|
1899
|
+
[tabindex]="-1"
|
|
1900
|
+
role="listbox"
|
|
1901
|
+
[attr.aria-orientation]="'horizontal'"
|
|
1902
|
+
[attr.aria-activedescendant]="getMultipleAriaActiveDescendant()"
|
|
1903
|
+
(focus)="onMultipleContainerFocus($event)"
|
|
1904
|
+
(blur)="onMultipleContainerBlur($event)"
|
|
1905
|
+
(keydown)="onMultipleContainerKeyDown($event)"
|
|
1874
1906
|
>
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1907
|
+
@for (option of modelValue(); track getChipTrackKey(option); let i = $index) {
|
|
1908
|
+
<li
|
|
1909
|
+
#token
|
|
1910
|
+
[pBind]="ptm('chipItem')"
|
|
1911
|
+
[class]="cx('chipItem', { i })"
|
|
1912
|
+
[attr.id]="getMultipleOptionId(i)"
|
|
1913
|
+
role="option"
|
|
1914
|
+
[attr.aria-label]="getOptionLabel(option)"
|
|
1915
|
+
[attr.aria-setsize]="modelValue().length"
|
|
1916
|
+
[attr.aria-posinset]="i + 1"
|
|
1917
|
+
[attr.aria-selected]="true"
|
|
1918
|
+
>
|
|
1919
|
+
<p-chip [pt]="ptm('pcChip')" [class]="cx('pcChip')" [label]="getChipLabel(option)" [disabled]="$disabled()" [removable]="true" (onRemove)="!readonly() ? removeOption($event, i) : ''" [unstyled]="unstyled()">
|
|
1920
|
+
@if (selectedItemTemplate()) {
|
|
1921
|
+
<ng-container [ngTemplateOutlet]="selectedItemTemplate()!" [ngTemplateOutletContext]="getSelectedItemContext(option)"></ng-container>
|
|
1922
|
+
}
|
|
1923
|
+
<ng-template #removeicon>
|
|
1924
|
+
@if (!removeIconTemplate()) {
|
|
1925
|
+
<span [pBind]="ptm('chipIcon')" [class]="cx('chipIcon')" (click)="!readonly() && !$disabled() ? removeOption($event, i) : ''">
|
|
1926
|
+
<svg data-p-icon="times-circle" [class]="cx('chipIcon')" [attr.aria-hidden]="true" />
|
|
1927
|
+
</span>
|
|
1928
|
+
} @else {
|
|
1929
|
+
<span [pBind]="ptm('chipIcon')" [attr.aria-hidden]="true">
|
|
1930
|
+
<ng-container [ngTemplateOutlet]="removeIconTemplate()!" [ngTemplateOutletContext]="getRemoveIconContext(i)"></ng-container>
|
|
1931
|
+
</span>
|
|
1932
|
+
}
|
|
1933
|
+
</ng-template>
|
|
1934
|
+
</p-chip>
|
|
1935
|
+
</li>
|
|
1936
|
+
}
|
|
1937
|
+
<li [pBind]="ptm('inputChip')" [class]="cx('inputChip')" role="option">
|
|
1938
|
+
<input
|
|
1939
|
+
#focusInput
|
|
1940
|
+
#multiIn
|
|
1941
|
+
[pAutoFocus]="autofocus()"
|
|
1942
|
+
[pBind]="ptm('input')"
|
|
1943
|
+
[class]="cx('pcInputText')"
|
|
1944
|
+
[style]="inputStyle()"
|
|
1945
|
+
[attr.type]="type()"
|
|
1946
|
+
[attr.id]="inputId()"
|
|
1947
|
+
[attr.autocomplete]="autocomplete()"
|
|
1948
|
+
[attr.name]="name()"
|
|
1949
|
+
[attr.minlength]="minlength()"
|
|
1950
|
+
[attr.maxlength]="maxlength()"
|
|
1951
|
+
[attr.size]="size()"
|
|
1952
|
+
[attr.min]="min()"
|
|
1953
|
+
[attr.max]="max()"
|
|
1954
|
+
[attr.pattern]="$pattern()"
|
|
1955
|
+
role="combobox"
|
|
1956
|
+
[attr.placeholder]="getMultiplePlaceholder()"
|
|
1957
|
+
aria-autocomplete="list"
|
|
1958
|
+
[attr.tabindex]="$tabindex()"
|
|
1959
|
+
[attr.required]="requiredAttr()"
|
|
1960
|
+
[attr.readonly]="readonlyAttr()"
|
|
1961
|
+
[attr.disabled]="disabledAttr()"
|
|
1962
|
+
[attr.aria-label]="ariaLabel()"
|
|
1963
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1964
|
+
[attr.aria-required]="required()"
|
|
1965
|
+
[attr.aria-expanded]="overlayVisible()"
|
|
1966
|
+
[attr.aria-controls]="getAriaControls()"
|
|
1967
|
+
[attr.aria-activedescendant]="getAriaActiveDescendant()"
|
|
1968
|
+
(input)="onInput($event)"
|
|
1969
|
+
(keydown)="onKeyDown($event)"
|
|
1970
|
+
(change)="onInputChange($event)"
|
|
1971
|
+
(focus)="onInputFocus($event)"
|
|
1972
|
+
(blur)="onInputBlur($event)"
|
|
1973
|
+
(paste)="onInputPaste($event)"
|
|
1974
|
+
(keyup)="onInputKeyUp($event)"
|
|
1975
|
+
/>
|
|
1976
|
+
</li>
|
|
1977
|
+
</ul>
|
|
1978
|
+
}
|
|
1979
|
+
@if (loading()) {
|
|
1980
|
+
@if (!loadingIconTemplate()) {
|
|
1981
|
+
<svg data-p-icon="spinner" [pBind]="ptm('loader')" [class]="cn(cx('loader'))" [attr.aria-hidden]="true" />
|
|
1982
|
+
} @else {
|
|
1983
|
+
<span [pBind]="ptm('loader')" [class]="cx('loader')" [attr.aria-hidden]="true">
|
|
1984
|
+
<ng-container [ngTemplateOutlet]="loadingIconTemplate()!"></ng-container>
|
|
1985
|
+
</span>
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
@if (dropdown()) {
|
|
1989
|
+
<button #ddBtn type="button" [pBind]="ptm('dropdown')" [attr.aria-label]="dropdownAriaLabel()" [class]="cx('dropdown')" [disabled]="$disabled()" pRipple (click)="handleDropdownClick($event)" [attr.tabindex]="tabindex()">
|
|
1990
|
+
@if (dropdownIcon()) {
|
|
1991
|
+
<span [class]="dropdownIcon()" [attr.aria-hidden]="true"></span>
|
|
1992
|
+
} @else {
|
|
1993
|
+
@if (!dropdownIconTemplate()) {
|
|
1994
|
+
<svg data-p-icon="chevron-down" [pBind]="ptm('dropdown')" />
|
|
1995
|
+
} @else {
|
|
1996
|
+
<ng-container [ngTemplateOutlet]="dropdownIconTemplate()!"></ng-container>
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
</button>
|
|
2000
|
+
}
|
|
1949
2001
|
<p-overlay
|
|
1950
2002
|
#overlay
|
|
1951
2003
|
[hostAttrSelector]="$attrSelector"
|
|
1952
|
-
[
|
|
1953
|
-
|
|
1954
|
-
[
|
|
2004
|
+
[visible]="overlayVisible()"
|
|
2005
|
+
(visibleChange)="overlayVisible.set($event)"
|
|
2006
|
+
[options]="overlayOptions()"
|
|
2007
|
+
[target]="$overlayTarget"
|
|
1955
2008
|
[appendTo]="$appendTo()"
|
|
1956
2009
|
[unstyled]="unstyled()"
|
|
1957
2010
|
[pt]="ptm('pcOverlay')"
|
|
@@ -1961,85 +2014,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
|
|
|
1961
2014
|
[attr.data-p]="overlayDataP"
|
|
1962
2015
|
>
|
|
1963
2016
|
<ng-template #content>
|
|
1964
|
-
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass)" [
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
<ng-template #loader let-scrollerOptions="options">
|
|
1985
|
-
<ng-container *ngTemplateOutlet="loaderTemplate || _loaderTemplate; context: { options: scrollerOptions }"></ng-container>
|
|
2017
|
+
<div [pBind]="ptm('overlay')" [class]="cn(cx('overlay'), panelStyleClass())" [style]="panelStyle()">
|
|
2018
|
+
@if (headerTemplate()) {
|
|
2019
|
+
<ng-container [ngTemplateOutlet]="headerTemplate()!"></ng-container>
|
|
2020
|
+
}
|
|
2021
|
+
<div [pBind]="ptm('listContainer')" [class]="cx('listContainer')" [style.max-height]="getListContainerMaxHeight()" [tabindex]="-1">
|
|
2022
|
+
@if (virtualScroll()) {
|
|
2023
|
+
<p-scroller
|
|
2024
|
+
#scroller
|
|
2025
|
+
[tabindex]="-1"
|
|
2026
|
+
[pt]="ptm('virtualScroller')"
|
|
2027
|
+
[items]="visibleOptions()"
|
|
2028
|
+
[style]="scrollerStyle()"
|
|
2029
|
+
[itemSize]="virtualScrollItemSize()"
|
|
2030
|
+
[autoSize]="true"
|
|
2031
|
+
[lazy]="lazy()"
|
|
2032
|
+
(onLazyLoad)="onLazyLoad.emit($event)"
|
|
2033
|
+
[options]="virtualScrollOptions()"
|
|
2034
|
+
>
|
|
2035
|
+
<ng-template #content let-items let-scrollerOptions="options">
|
|
2036
|
+
<ng-container [ngTemplateOutlet]="buildInItems" [ngTemplateOutletContext]="getBuildInItemsContext(items, scrollerOptions)"></ng-container>
|
|
1986
2037
|
</ng-template>
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2038
|
+
@if (loaderTemplate()) {
|
|
2039
|
+
<ng-template #loader let-scrollerOptions="options">
|
|
2040
|
+
<ng-container [ngTemplateOutlet]="loaderTemplate()!" [ngTemplateOutletContext]="getLoaderContext(scrollerOptions)"></ng-container>
|
|
2041
|
+
</ng-template>
|
|
2042
|
+
}
|
|
2043
|
+
</p-scroller>
|
|
2044
|
+
} @else {
|
|
2045
|
+
<ng-container [ngTemplateOutlet]="buildInItems" [ngTemplateOutletContext]="getBuildInItemsContext(visibleOptions(), {})"></ng-container>
|
|
2046
|
+
}
|
|
1992
2047
|
</div>
|
|
1993
2048
|
|
|
1994
2049
|
<ng-template #buildInItems let-items let-scrollerOptions="options">
|
|
1995
|
-
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
<li [pBind]="ptm('optionGroup')" [attr.id]="
|
|
1999
|
-
|
|
2000
|
-
|
|
2050
|
+
<ul #items [pBind]="ptm('list')" [class]="cn(cx('list'), scrollerOptions.contentStyleClass)" [style]="scrollerOptions.contentStyle" role="listbox" [attr.id]="$listId()" [attr.aria-label]="listLabel">
|
|
2051
|
+
@for (option of items; track getOptionValue(option); let i = $index) {
|
|
2052
|
+
@if (isOptionGroup(option)) {
|
|
2053
|
+
<li [pBind]="ptm('optionGroup')" [attr.id]="getOptionElementId(i, scrollerOptions)" [class]="cx('optionGroup')" [style]="getItemStyle(scrollerOptions)" role="option">
|
|
2054
|
+
@if (!groupTemplate()) {
|
|
2055
|
+
<span>{{ getOptionGroupLabel(option.optionGroup) }}</span>
|
|
2056
|
+
}
|
|
2057
|
+
@if (groupTemplate()) {
|
|
2058
|
+
<ng-container [ngTemplateOutlet]="groupTemplate()!" [ngTemplateOutletContext]="getGroupContext(option.optionGroup)"></ng-container>
|
|
2059
|
+
}
|
|
2001
2060
|
</li>
|
|
2002
|
-
|
|
2003
|
-
<ng-container *ngIf="!isOptionGroup(option)">
|
|
2061
|
+
} @else {
|
|
2004
2062
|
<li
|
|
2005
2063
|
pRipple
|
|
2006
2064
|
[pBind]="getPTOptions(option, scrollerOptions, i, 'option')"
|
|
2007
|
-
[
|
|
2065
|
+
[style]="getItemStyle(scrollerOptions)"
|
|
2008
2066
|
[class]="cx('option', { option, i, scrollerOptions })"
|
|
2009
|
-
[attr.id]="
|
|
2067
|
+
[attr.id]="getOptionElementId(i, scrollerOptions)"
|
|
2010
2068
|
role="option"
|
|
2011
2069
|
[attr.aria-label]="getOptionLabel(option)"
|
|
2012
2070
|
[attr.aria-selected]="isSelected(option)"
|
|
2013
2071
|
[attr.data-p-selected]="isSelected(option)"
|
|
2014
2072
|
[attr.aria-disabled]="isOptionDisabled(option)"
|
|
2015
|
-
[attr.data-p-focused]="
|
|
2073
|
+
[attr.data-p-focused]="isOptionFocused(i, scrollerOptions)"
|
|
2016
2074
|
[attr.aria-setsize]="ariaSetSize"
|
|
2017
2075
|
[attr.aria-posinset]="getAriaPosInset(getOptionIndex(i, scrollerOptions))"
|
|
2018
2076
|
(click)="onOptionSelect($event, option)"
|
|
2019
2077
|
(mouseenter)="onOptionMouseEnter($event, getOptionIndex(i, scrollerOptions))"
|
|
2020
2078
|
>
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
$implicit: option,
|
|
2027
|
-
index: scrollerOptions.getOptions ? scrollerOptions.getOptions(i) : i
|
|
2028
|
-
}
|
|
2029
|
-
"
|
|
2030
|
-
></ng-container>
|
|
2079
|
+
@if (!itemTemplate()) {
|
|
2080
|
+
<span>{{ getOptionLabel(option) }}</span>
|
|
2081
|
+
} @else {
|
|
2082
|
+
<ng-container [ngTemplateOutlet]="itemTemplate()!" [ngTemplateOutletContext]="getItemContext(option, i, scrollerOptions)"></ng-container>
|
|
2083
|
+
}
|
|
2031
2084
|
</li>
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
<
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
@if (shouldShowEmptyMessage(items)) {
|
|
2088
|
+
<li [pBind]="ptm('emptyMessage')" [class]="cx('emptyMessage')" [style]="getItemStyle(scrollerOptions)" role="option">
|
|
2089
|
+
@if (!emptyTemplate()) {
|
|
2090
|
+
{{ searchResultMessageText }}
|
|
2091
|
+
} @else {
|
|
2092
|
+
<ng-container [ngTemplateOutlet]="emptyTemplate()!"></ng-container>
|
|
2093
|
+
}
|
|
2094
|
+
</li>
|
|
2095
|
+
}
|
|
2040
2096
|
</ul>
|
|
2041
2097
|
</ng-template>
|
|
2042
|
-
|
|
2098
|
+
@if (footerTemplate()) {
|
|
2099
|
+
<ng-container [ngTemplateOutlet]="footerTemplate()!"></ng-container>
|
|
2100
|
+
}
|
|
2043
2101
|
</div>
|
|
2044
2102
|
<span role="status" aria-live="polite" class="p-hidden-accessible">
|
|
2045
2103
|
{{ selectedMessageText }}
|
|
@@ -2051,250 +2109,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImpo
|
|
|
2051
2109
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2052
2110
|
encapsulation: ViewEncapsulation.None,
|
|
2053
2111
|
host: {
|
|
2054
|
-
'[class]': "
|
|
2112
|
+
'[class]': "cx('root')",
|
|
2055
2113
|
'[style]': "sx('root')",
|
|
2056
2114
|
'[attr.data-p]': 'containerDataP'
|
|
2057
2115
|
},
|
|
2058
2116
|
hostDirectives: [Bind]
|
|
2059
2117
|
}]
|
|
2060
|
-
}], ctorParameters: () => [{ type:
|
|
2061
|
-
type: Input,
|
|
2062
|
-
args: [{ transform: numberAttribute }]
|
|
2063
|
-
}], minQueryLength: [{
|
|
2064
|
-
type: Input,
|
|
2065
|
-
args: [{ transform: numberAttribute }]
|
|
2066
|
-
}], delay: [{
|
|
2067
|
-
type: Input,
|
|
2068
|
-
args: [{ transform: numberAttribute }]
|
|
2069
|
-
}], panelStyle: [{
|
|
2070
|
-
type: Input
|
|
2071
|
-
}], styleClass: [{
|
|
2072
|
-
type: Input
|
|
2073
|
-
}], panelStyleClass: [{
|
|
2074
|
-
type: Input
|
|
2075
|
-
}], inputStyle: [{
|
|
2076
|
-
type: Input
|
|
2077
|
-
}], inputId: [{
|
|
2078
|
-
type: Input
|
|
2079
|
-
}], inputStyleClass: [{
|
|
2080
|
-
type: Input
|
|
2081
|
-
}], placeholder: [{
|
|
2082
|
-
type: Input
|
|
2083
|
-
}], readonly: [{
|
|
2084
|
-
type: Input,
|
|
2085
|
-
args: [{ transform: booleanAttribute }]
|
|
2086
|
-
}], scrollHeight: [{
|
|
2087
|
-
type: Input
|
|
2088
|
-
}], lazy: [{
|
|
2089
|
-
type: Input,
|
|
2090
|
-
args: [{ transform: booleanAttribute }]
|
|
2091
|
-
}], virtualScroll: [{
|
|
2092
|
-
type: Input,
|
|
2093
|
-
args: [{ transform: booleanAttribute }]
|
|
2094
|
-
}], virtualScrollItemSize: [{
|
|
2095
|
-
type: Input,
|
|
2096
|
-
args: [{ transform: numberAttribute }]
|
|
2097
|
-
}], virtualScrollOptions: [{
|
|
2098
|
-
type: Input
|
|
2099
|
-
}], autoHighlight: [{
|
|
2100
|
-
type: Input,
|
|
2101
|
-
args: [{ transform: booleanAttribute }]
|
|
2102
|
-
}], forceSelection: [{
|
|
2103
|
-
type: Input,
|
|
2104
|
-
args: [{ transform: booleanAttribute }]
|
|
2105
|
-
}], type: [{
|
|
2106
|
-
type: Input
|
|
2107
|
-
}], autoZIndex: [{
|
|
2108
|
-
type: Input,
|
|
2109
|
-
args: [{ transform: booleanAttribute }]
|
|
2110
|
-
}], baseZIndex: [{
|
|
2111
|
-
type: Input,
|
|
2112
|
-
args: [{ transform: numberAttribute }]
|
|
2113
|
-
}], ariaLabel: [{
|
|
2114
|
-
type: Input
|
|
2115
|
-
}], dropdownAriaLabel: [{
|
|
2116
|
-
type: Input
|
|
2117
|
-
}], ariaLabelledBy: [{
|
|
2118
|
-
type: Input
|
|
2119
|
-
}], dropdownIcon: [{
|
|
2120
|
-
type: Input
|
|
2121
|
-
}], unique: [{
|
|
2122
|
-
type: Input,
|
|
2123
|
-
args: [{ transform: booleanAttribute }]
|
|
2124
|
-
}], group: [{
|
|
2125
|
-
type: Input,
|
|
2126
|
-
args: [{ transform: booleanAttribute }]
|
|
2127
|
-
}], completeOnFocus: [{
|
|
2128
|
-
type: Input,
|
|
2129
|
-
args: [{ transform: booleanAttribute }]
|
|
2130
|
-
}], showClear: [{
|
|
2131
|
-
type: Input,
|
|
2132
|
-
args: [{ transform: booleanAttribute }]
|
|
2133
|
-
}], dropdown: [{
|
|
2134
|
-
type: Input,
|
|
2135
|
-
args: [{ transform: booleanAttribute }]
|
|
2136
|
-
}], showEmptyMessage: [{
|
|
2137
|
-
type: Input,
|
|
2138
|
-
args: [{ transform: booleanAttribute }]
|
|
2139
|
-
}], dropdownMode: [{
|
|
2140
|
-
type: Input
|
|
2141
|
-
}], multiple: [{
|
|
2142
|
-
type: Input,
|
|
2143
|
-
args: [{ transform: booleanAttribute }]
|
|
2144
|
-
}], addOnTab: [{
|
|
2145
|
-
type: Input,
|
|
2146
|
-
args: [{ transform: booleanAttribute }]
|
|
2147
|
-
}], tabindex: [{
|
|
2148
|
-
type: Input,
|
|
2149
|
-
args: [{ transform: numberAttribute }]
|
|
2150
|
-
}], dataKey: [{
|
|
2151
|
-
type: Input
|
|
2152
|
-
}], emptyMessage: [{
|
|
2153
|
-
type: Input
|
|
2154
|
-
}], showTransitionOptions: [{
|
|
2155
|
-
type: Input
|
|
2156
|
-
}], hideTransitionOptions: [{
|
|
2157
|
-
type: Input
|
|
2158
|
-
}], autofocus: [{
|
|
2159
|
-
type: Input,
|
|
2160
|
-
args: [{ transform: booleanAttribute }]
|
|
2161
|
-
}], autocomplete: [{
|
|
2162
|
-
type: Input
|
|
2163
|
-
}], optionGroupChildren: [{
|
|
2164
|
-
type: Input
|
|
2165
|
-
}], optionGroupLabel: [{
|
|
2166
|
-
type: Input
|
|
2167
|
-
}], overlayOptions: [{
|
|
2168
|
-
type: Input
|
|
2169
|
-
}], suggestions: [{
|
|
2170
|
-
type: Input
|
|
2171
|
-
}], optionLabel: [{
|
|
2172
|
-
type: Input
|
|
2173
|
-
}], optionValue: [{
|
|
2174
|
-
type: Input
|
|
2175
|
-
}], id: [{
|
|
2176
|
-
type: Input
|
|
2177
|
-
}], searchMessage: [{
|
|
2178
|
-
type: Input
|
|
2179
|
-
}], emptySelectionMessage: [{
|
|
2180
|
-
type: Input
|
|
2181
|
-
}], selectionMessage: [{
|
|
2182
|
-
type: Input
|
|
2183
|
-
}], autoOptionFocus: [{
|
|
2184
|
-
type: Input,
|
|
2185
|
-
args: [{ transform: booleanAttribute }]
|
|
2186
|
-
}], selectOnFocus: [{
|
|
2187
|
-
type: Input,
|
|
2188
|
-
args: [{ transform: booleanAttribute }]
|
|
2189
|
-
}], searchLocale: [{
|
|
2190
|
-
type: Input,
|
|
2191
|
-
args: [{ transform: booleanAttribute }]
|
|
2192
|
-
}], optionDisabled: [{
|
|
2193
|
-
type: Input
|
|
2194
|
-
}], focusOnHover: [{
|
|
2195
|
-
type: Input,
|
|
2196
|
-
args: [{ transform: booleanAttribute }]
|
|
2197
|
-
}], typeahead: [{
|
|
2198
|
-
type: Input,
|
|
2199
|
-
args: [{ transform: booleanAttribute }]
|
|
2200
|
-
}], addOnBlur: [{
|
|
2201
|
-
type: Input,
|
|
2202
|
-
args: [{ transform: booleanAttribute }]
|
|
2203
|
-
}], separator: [{
|
|
2204
|
-
type: Input
|
|
2205
|
-
}], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], completeMethod: [{
|
|
2206
|
-
type: Output
|
|
2207
|
-
}], onSelect: [{
|
|
2208
|
-
type: Output
|
|
2209
|
-
}], onUnselect: [{
|
|
2210
|
-
type: Output
|
|
2211
|
-
}], onAdd: [{
|
|
2212
|
-
type: Output
|
|
2213
|
-
}], onFocus: [{
|
|
2214
|
-
type: Output
|
|
2215
|
-
}], onBlur: [{
|
|
2216
|
-
type: Output
|
|
2217
|
-
}], onDropdownClick: [{
|
|
2218
|
-
type: Output
|
|
2219
|
-
}], onClear: [{
|
|
2220
|
-
type: Output
|
|
2221
|
-
}], onInputKeydown: [{
|
|
2222
|
-
type: Output
|
|
2223
|
-
}], onKeyUp: [{
|
|
2224
|
-
type: Output
|
|
2225
|
-
}], onShow: [{
|
|
2226
|
-
type: Output
|
|
2227
|
-
}], onHide: [{
|
|
2228
|
-
type: Output
|
|
2229
|
-
}], onLazyLoad: [{
|
|
2230
|
-
type: Output
|
|
2231
|
-
}], inputEL: [{
|
|
2232
|
-
type: ViewChild,
|
|
2233
|
-
args: ['focusInput']
|
|
2234
|
-
}], multiInputEl: [{
|
|
2235
|
-
type: ViewChild,
|
|
2236
|
-
args: ['multiIn']
|
|
2237
|
-
}], multiContainerEL: [{
|
|
2238
|
-
type: ViewChild,
|
|
2239
|
-
args: ['multiContainer']
|
|
2240
|
-
}], dropdownButton: [{
|
|
2241
|
-
type: ViewChild,
|
|
2242
|
-
args: ['ddBtn']
|
|
2243
|
-
}], itemsViewChild: [{
|
|
2244
|
-
type: ViewChild,
|
|
2245
|
-
args: ['items']
|
|
2246
|
-
}], scroller: [{
|
|
2247
|
-
type: ViewChild,
|
|
2248
|
-
args: ['scroller']
|
|
2249
|
-
}], overlayViewChild: [{
|
|
2250
|
-
type: ViewChild,
|
|
2251
|
-
args: ['overlay']
|
|
2252
|
-
}], itemTemplate: [{
|
|
2253
|
-
type: ContentChild,
|
|
2254
|
-
args: ['item']
|
|
2255
|
-
}], emptyTemplate: [{
|
|
2256
|
-
type: ContentChild,
|
|
2257
|
-
args: ['empty']
|
|
2258
|
-
}], headerTemplate: [{
|
|
2259
|
-
type: ContentChild,
|
|
2260
|
-
args: ['header']
|
|
2261
|
-
}], footerTemplate: [{
|
|
2262
|
-
type: ContentChild,
|
|
2263
|
-
args: ['footer']
|
|
2264
|
-
}], selectedItemTemplate: [{
|
|
2265
|
-
type: ContentChild,
|
|
2266
|
-
args: ['selecteditem']
|
|
2267
|
-
}], groupTemplate: [{
|
|
2268
|
-
type: ContentChild,
|
|
2269
|
-
args: ['group']
|
|
2270
|
-
}], loaderTemplate: [{
|
|
2271
|
-
type: ContentChild,
|
|
2272
|
-
args: ['loader']
|
|
2273
|
-
}], removeIconTemplate: [{
|
|
2274
|
-
type: ContentChild,
|
|
2275
|
-
args: ['removeicon']
|
|
2276
|
-
}], loadingIconTemplate: [{
|
|
2277
|
-
type: ContentChild,
|
|
2278
|
-
args: ['loadingicon']
|
|
2279
|
-
}], clearIconTemplate: [{
|
|
2280
|
-
type: ContentChild,
|
|
2281
|
-
args: ['clearicon']
|
|
2282
|
-
}], dropdownIconTemplate: [{
|
|
2283
|
-
type: ContentChild,
|
|
2284
|
-
args: ['dropdownicon']
|
|
2285
|
-
}], onHostClick: [{
|
|
2118
|
+
}], ctorParameters: () => [], propDecorators: { minQueryLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minQueryLength", required: false }] }], delay: [{ type: i0.Input, args: [{ isSignal: true, alias: "delay", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyleClass", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], virtualScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScroll", required: false }] }], virtualScrollItemSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollItemSize", required: false }] }], virtualScrollOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "virtualScrollOptions", required: false }] }], autoHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoHighlight", required: false }] }], forceSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceSelection", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], dropdownAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownAriaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], dropdownIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownIcon", required: false }] }], unique: [{ type: i0.Input, args: [{ isSignal: true, alias: "unique", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }], completeOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "completeOnFocus", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], dropdown: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdown", required: false }] }], showEmptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEmptyMessage", required: false }] }], dropdownMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "dropdownMode", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], addOnTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnTab", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], suggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "suggestions", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], searchMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchMessage", required: false }] }], emptySelectionMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptySelectionMessage", required: false }] }], selectionMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMessage", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], searchLocale: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLocale", required: false }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], focusOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnHover", required: false }] }], typeahead: [{ type: i0.Input, args: [{ isSignal: true, alias: "typeahead", required: false }] }], addOnBlur: [{ type: i0.Input, args: [{ isSignal: true, alias: "addOnBlur", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], completeMethod: [{ type: i0.Output, args: ["completeMethod"] }], onSelect: [{ type: i0.Output, args: ["onSelect"] }], onUnselect: [{ type: i0.Output, args: ["onUnselect"] }], onAdd: [{ type: i0.Output, args: ["onAdd"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onDropdownClick: [{ type: i0.Output, args: ["onDropdownClick"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onInputKeydown: [{ type: i0.Output, args: ["onInputKeydown"] }], onKeyUp: [{ type: i0.Output, args: ["onKeyUp"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onLazyLoad: [{ type: i0.Output, args: ["onLazyLoad"] }], inputEL: [{ type: i0.ViewChild, args: ['focusInput', { isSignal: true }] }], multiInputEl: [{ type: i0.ViewChild, args: ['multiIn', { isSignal: true }] }], multiContainerEL: [{ type: i0.ViewChild, args: ['multiContainer', { isSignal: true }] }], dropdownButton: [{ type: i0.ViewChild, args: ['ddBtn', { 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 }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], emptyTemplate: [{ type: i0.ContentChild, args: ['empty', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], selectedItemTemplate: [{ type: i0.ContentChild, args: ['selecteditem', { ...{ descendants: false }, isSignal: true }] }], groupTemplate: [{ type: i0.ContentChild, args: ['group', { ...{ descendants: false }, isSignal: true }] }], loaderTemplate: [{ type: i0.ContentChild, args: ['loader', { ...{ descendants: false }, isSignal: true }] }], removeIconTemplate: [{ type: i0.ContentChild, args: ['removeicon', { ...{ descendants: false }, isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], dropdownIconTemplate: [{ type: i0.ContentChild, args: ['dropdownicon', { ...{ descendants: false }, isSignal: true }] }], onHostClick: [{
|
|
2286
2119
|
type: HostListener,
|
|
2287
2120
|
args: ['click', ['$event']]
|
|
2288
|
-
}], templates: [{
|
|
2289
|
-
type: ContentChildren,
|
|
2290
|
-
args: [PrimeTemplate]
|
|
2291
2121
|
}] } });
|
|
2292
2122
|
class AutoCompleteModule {
|
|
2293
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2294
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2295
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoCompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2124
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.5", ngImport: i0, type: AutoCompleteModule, imports: [AutoComplete, SharedModule], exports: [AutoComplete, SharedModule] });
|
|
2125
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoCompleteModule, imports: [AutoComplete, SharedModule, SharedModule] });
|
|
2296
2126
|
}
|
|
2297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AutoCompleteModule, decorators: [{
|
|
2298
2128
|
type: NgModule,
|
|
2299
2129
|
args: [{
|
|
2300
2130
|
imports: [AutoComplete, SharedModule],
|