@exhaustive-ui/core 3.0.0-alpha.0 → 22.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
- package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-api.mjs +10 -17
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +786 -928
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
- package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
- package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
- package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
- package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
- package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-carousel.mjs +561 -599
- package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
- package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
- package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +227 -394
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +255 -266
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +585 -653
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
- package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +1792 -1787
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +480 -577
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
- package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
- package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +774 -745
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
- package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
- package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-ban.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-ban.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-bars.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-bars.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-blank.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-blank.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-calendar.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-calendar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-caretright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-caretright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-check.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-check.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-eye.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-eye.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filter.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-home.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-home.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-minus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-minus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-pencil.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-pencil.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-plus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-plus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-refresh.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-refresh.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-search.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-search.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-spinner.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-spinner.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-star.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-star.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-starfill.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-starfill.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-times.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-times.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-trash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-trash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-undo.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-undo.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-upload.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-upload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
- package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inplace.mjs +68 -102
- package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
- package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
- package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
- package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
- package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +591 -728
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +324 -375
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
- package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-motion.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +945 -1045
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
- package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +861 -879
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
- package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
- package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +837 -986
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
- package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
- package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
- package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +2435 -2721
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
- package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
- package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +604 -690
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
- package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
- package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
- package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +333 -423
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/package.json +11 -11
- package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
- package/schematics/migrations/renamed-inputs/migration.js +97 -0
- package/schematics/migrations/styleclass-to-class/migration.js +92 -1
- package/schematics/migrations.json +11 -6
- package/schematics/utils/removed-inputs.js +0 -0
- package/schematics/utils/renamed-inputs.js +175 -0
- package/schematics/utils/styleclass.js +24 -8
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-accordion.d.ts +8 -24
- package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
- package/types/exhaustive-ui-core-api.d.ts +2 -3
- package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
- package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
- package/types/exhaustive-ui-core-avatar.d.ts +18 -25
- package/types/exhaustive-ui-core-badge.d.ts +13 -27
- package/types/exhaustive-ui-core-blockui.d.ts +18 -30
- package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
- package/types/exhaustive-ui-core-button.d.ts +57 -89
- package/types/exhaustive-ui-core-carousel.d.ts +56 -82
- package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
- package/types/exhaustive-ui-core-chart.d.ts +21 -29
- package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
- package/types/exhaustive-ui-core-chip.d.ts +31 -38
- package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
- package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
- package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
- package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
- package/types/exhaustive-ui-core-dataview.d.ts +42 -65
- package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
- package/types/exhaustive-ui-core-dialog.d.ts +73 -123
- package/types/exhaustive-ui-core-dock.d.ts +16 -25
- package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
- package/types/exhaustive-ui-core-drawer.d.ts +32 -64
- package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
- package/types/exhaustive-ui-core-editor.d.ts +15 -25
- package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
- package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
- package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
- package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
- package/types/exhaustive-ui-core-galleria.d.ts +124 -194
- package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
- package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
- package/types/exhaustive-ui-core-image.d.ts +35 -68
- package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
- package/types/exhaustive-ui-core-inplace.d.ts +30 -42
- package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
- package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
- package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
- package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
- package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
- package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
- package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
- package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
- package/types/exhaustive-ui-core-knob.d.ts +45 -60
- package/types/exhaustive-ui-core-listbox.d.ts +90 -126
- package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
- package/types/exhaustive-ui-core-menu.d.ts +33 -53
- package/types/exhaustive-ui-core-menubar.d.ts +38 -85
- package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
- package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
- package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
- package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
- package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
- package/types/exhaustive-ui-core-paginator.d.ts +41 -69
- package/types/exhaustive-ui-core-panel.d.ts +18 -45
- package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
- package/types/exhaustive-ui-core-password.d.ts +56 -93
- package/types/exhaustive-ui-core-picklist.d.ts +107 -121
- package/types/exhaustive-ui-core-popover.d.ts +23 -47
- package/types/exhaustive-ui-core-rating.d.ts +18 -26
- package/types/exhaustive-ui-core-scroller.d.ts +90 -120
- package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
- package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
- package/types/exhaustive-ui-core-select.d.ts +137 -188
- package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
- package/types/exhaustive-ui-core-slider.d.ts +52 -67
- package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
- package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
- package/types/exhaustive-ui-core-splitter.d.ts +47 -59
- package/types/exhaustive-ui-core-steps.d.ts +24 -31
- package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
- package/types/exhaustive-ui-core-table.d.ts +349 -453
- package/types/exhaustive-ui-core-terminal.d.ts +10 -22
- package/types/exhaustive-ui-core-textarea.d.ts +7 -10
- package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
- package/types/exhaustive-ui-core-timeline.d.ts +20 -28
- package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
- package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
- package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
- package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
- package/types/exhaustive-ui-core-tree.d.ts +82 -119
- package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
- package/types/exhaustive-ui-core-treetable.d.ts +203 -280
- package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Injectable, InjectionToken, forwardRef, inject,
|
|
4
|
+
import { Injectable, InjectionToken, forwardRef, inject, input, numberAttribute, booleanAttribute, output, ChangeDetectionStrategy, ViewEncapsulation, Component, model, viewChild, contentChild, computed, signal, DestroyRef, contentChildren, afterEveryRender, effect, untracked, HostListener, NgModule } from '@angular/core';
|
|
5
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
5
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
-
import { resolveFieldData, isNotEmpty, equals, getOffset, getViewport, getHiddenElementOuterWidth, getOuterWidth, calculateScrollbarWidth, isPrintableCharacter, isEmpty, findSingle, findLastIndex, focus
|
|
7
|
+
import { resolveFieldData, isNotEmpty, equals, getOffset, getViewport, getHiddenElementOuterWidth, getOuterWidth, calculateScrollbarWidth, uuid, isPrintableCharacter, isEmpty, findSingle, findLastIndex, focus } from '@exhaustive-ui/utils';
|
|
7
8
|
import { SharedModule, OverlayService, TranslationKeys, PrimeTemplate } from '@exhaustive-ui/core/api';
|
|
8
9
|
import { AutoFocus } from '@exhaustive-ui/core/autofocus';
|
|
9
10
|
import { BaseComponent, PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';
|
|
@@ -38,16 +39,16 @@ const classes = {
|
|
|
38
39
|
'p-cascadeselect p-component p-inputwrapper',
|
|
39
40
|
{
|
|
40
41
|
'p-cascadeselect p-component p-inputwrapper': true,
|
|
41
|
-
'p-cascadeselect-clearable': instance.showClear && !instance.$disabled(),
|
|
42
|
+
'p-cascadeselect-clearable': instance.showClear() && !instance.$disabled(),
|
|
42
43
|
'p-cascadeselect-mobile': instance.queryMatches(),
|
|
43
44
|
'p-disabled': instance.$disabled(),
|
|
44
45
|
'p-invalid': instance.invalid(),
|
|
45
|
-
'p-focus': instance.focused,
|
|
46
|
+
'p-focus': instance.focused(),
|
|
46
47
|
'p-inputwrapper-filled': instance.modelValue(),
|
|
47
48
|
'p-variant-filled': instance.$variant() === 'filled',
|
|
48
|
-
'p-inputwrapper-focus': instance.focused || instance.overlayVisible,
|
|
49
|
-
'p-cascadeselect-open': instance.overlayVisible,
|
|
50
|
-
'p-cascadeselect-fluid': instance.hasFluid,
|
|
49
|
+
'p-inputwrapper-focus': instance.focused() || instance.overlayVisible(),
|
|
50
|
+
'p-cascadeselect-open': instance.overlayVisible(),
|
|
51
|
+
'p-cascadeselect-fluid': instance.hasFluid(),
|
|
51
52
|
'p-cascadeselect-sm p-inputfield-sm': instance.size() === 'small',
|
|
52
53
|
'p-cascadeselect-lg p-inputfield-lg': instance.size() === 'large'
|
|
53
54
|
}
|
|
@@ -55,8 +56,8 @@ const classes = {
|
|
|
55
56
|
label: ({ instance }) => [
|
|
56
57
|
'p-cascadeselect-label',
|
|
57
58
|
{
|
|
58
|
-
'p-placeholder': instance.label() === instance.placeholder,
|
|
59
|
-
'p-cascadeselect-label-empty': !instance.value && (instance.label() === 'p-emptylabel' || instance.label().length === 0)
|
|
59
|
+
'p-placeholder': instance.label() === instance.placeholder(),
|
|
60
|
+
'p-cascadeselect-label-empty': !instance.value() && (instance.label() === 'p-emptylabel' || instance.label().length === 0)
|
|
60
61
|
}
|
|
61
62
|
],
|
|
62
63
|
clearIcon: 'p-cascadeselect-clear-icon',
|
|
@@ -174,20 +175,26 @@ const CASCADESELECT_VALUE_ACCESSOR = {
|
|
|
174
175
|
};
|
|
175
176
|
class CascadeSelectSub extends BaseComponent {
|
|
176
177
|
cascadeselect = inject(CascadeSelect);
|
|
177
|
-
selectId
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
178
|
+
selectId = input(/* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [undefined, { debugName: "selectId" }] : /* istanbul ignore next */ []));
|
|
180
|
+
activeOptionPath = input.required(/* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [{ debugName: "activeOptionPath" }] : /* istanbul ignore next */ []));
|
|
182
|
+
optionDisabled = input(/* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [undefined, { debugName: "optionDisabled" }] : /* istanbul ignore next */ []));
|
|
184
|
+
focusedOptionId = input(/* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [undefined, { debugName: "focusedOptionId" }] : /* istanbul ignore next */ []));
|
|
186
|
+
options = input(/* @ts-ignore */
|
|
187
|
+
...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
|
|
188
|
+
optionTemplate = input(/* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [undefined, { debugName: "optionTemplate" }] : /* istanbul ignore next */ []));
|
|
190
|
+
groupicon = input(/* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [undefined, { debugName: "groupicon" }] : /* istanbul ignore next */ []));
|
|
192
|
+
level = input(0, { ...(ngDevMode ? { debugName: "level" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
193
|
+
optionLabel = input(/* @ts-ignore */
|
|
194
|
+
...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
195
|
+
optionGroupLabel = input(/* @ts-ignore */
|
|
196
|
+
...(ngDevMode ? [undefined, { debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
|
|
197
|
+
root = input(undefined, { ...(ngDevMode ? { debugName: "root" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
191
198
|
onChange = output();
|
|
192
199
|
onFocusChange = output();
|
|
193
200
|
onFocusEnterChange = output();
|
|
@@ -197,7 +204,7 @@ class CascadeSelectSub extends BaseComponent {
|
|
|
197
204
|
context: {
|
|
198
205
|
option: processedOption,
|
|
199
206
|
index,
|
|
200
|
-
level: this.level,
|
|
207
|
+
level: this.level(),
|
|
201
208
|
optionGroup: this.isOptionGroup(processedOption),
|
|
202
209
|
active: this.isOptionActive(processedOption),
|
|
203
210
|
focused: this.isOptionFocused(processedOption),
|
|
@@ -206,7 +213,7 @@ class CascadeSelectSub extends BaseComponent {
|
|
|
206
213
|
});
|
|
207
214
|
}
|
|
208
215
|
onInit() {
|
|
209
|
-
if (!this.root) {
|
|
216
|
+
if (!this.root()) {
|
|
210
217
|
this.position();
|
|
211
218
|
}
|
|
212
219
|
}
|
|
@@ -224,22 +231,19 @@ class CascadeSelectSub extends BaseComponent {
|
|
|
224
231
|
this.onFocusChange.emit({ originalEvent: event, processedOption });
|
|
225
232
|
}
|
|
226
233
|
getOptionId(processedOption) {
|
|
227
|
-
return `${this.selectId}_${processedOption.key}`;
|
|
234
|
+
return `${this.selectId()}_${processedOption.key}`;
|
|
228
235
|
}
|
|
229
236
|
getOptionLabel(processedOption) {
|
|
230
|
-
return this.optionLabel ? resolveFieldData(processedOption.option, this.optionLabel) : processedOption.option;
|
|
231
|
-
}
|
|
232
|
-
getOptionValue(processedOption) {
|
|
233
|
-
return this.optionValue ? resolveFieldData(processedOption.option, this.optionValue) : processedOption.option;
|
|
237
|
+
return this.optionLabel() ? resolveFieldData(processedOption.option, this.optionLabel()) : processedOption.option;
|
|
234
238
|
}
|
|
235
239
|
getOptionLabelToRender(processedOption) {
|
|
236
240
|
return this.isOptionGroup(processedOption) ? this.getOptionGroupLabel(processedOption) : this.getOptionLabel(processedOption);
|
|
237
241
|
}
|
|
238
242
|
isOptionDisabled(processedOption) {
|
|
239
|
-
return this.optionDisabled ? resolveFieldData(processedOption.option, this.optionDisabled) : false;
|
|
243
|
+
return this.optionDisabled() ? resolveFieldData(processedOption.option, this.optionDisabled()) : false;
|
|
240
244
|
}
|
|
241
245
|
getOptionGroupLabel(processedOption) {
|
|
242
|
-
return this.optionGroupLabel ? resolveFieldData(processedOption.option, this.optionGroupLabel) : null;
|
|
246
|
+
return this.optionGroupLabel() ? resolveFieldData(processedOption.option, this.optionGroupLabel()) : null;
|
|
243
247
|
}
|
|
244
248
|
getOptionGroupChildren(processedOption) {
|
|
245
249
|
return processedOption.children;
|
|
@@ -251,10 +255,10 @@ class CascadeSelectSub extends BaseComponent {
|
|
|
251
255
|
return equals(this.cascadeselect?.modelValue(), processedOption?.option);
|
|
252
256
|
}
|
|
253
257
|
isOptionActive(processedOption) {
|
|
254
|
-
return this.activeOptionPath.some((path) => path.key === processedOption.key);
|
|
258
|
+
return this.activeOptionPath().some((path) => path.key === processedOption.key);
|
|
255
259
|
}
|
|
256
260
|
isOptionFocused(processedOption) {
|
|
257
|
-
return this.focusedOptionId === this.getOptionId(processedOption);
|
|
261
|
+
return this.focusedOptionId() === this.getOptionId(processedOption);
|
|
258
262
|
}
|
|
259
263
|
position() {
|
|
260
264
|
const parentItem = this.el.nativeElement.parentElement;
|
|
@@ -267,13 +271,13 @@ class CascadeSelectSub extends BaseComponent {
|
|
|
267
271
|
}
|
|
268
272
|
}
|
|
269
273
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: CascadeSelectSub, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
270
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: CascadeSelectSub, isStandalone: true, selector: "ul[pCascadeSelectSub]", inputs: { selectId: "selectId", activeOptionPath: "activeOptionPath", optionDisabled: "optionDisabled", focusedOptionId: "focusedOptionId", options: "options",
|
|
271
|
-
@for (processedOption of options; track processedOption; let i = $index) {
|
|
274
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: CascadeSelectSub, isStandalone: true, selector: "ul[pCascadeSelectSub]", inputs: { selectId: { classPropertyName: "selectId", publicName: "selectId", isSignal: true, isRequired: false, transformFunction: null }, activeOptionPath: { classPropertyName: "activeOptionPath", publicName: "activeOptionPath", isSignal: true, isRequired: true, transformFunction: null }, optionDisabled: { classPropertyName: "optionDisabled", publicName: "optionDisabled", isSignal: true, isRequired: false, transformFunction: null }, focusedOptionId: { classPropertyName: "focusedOptionId", publicName: "focusedOptionId", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupicon: { classPropertyName: "groupicon", publicName: "groupicon", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange", onFocusChange: "onFocusChange", onFocusEnterChange: "onFocusEnterChange" }, providers: [CascadeSelectStyle, { provide: PARENT_INSTANCE, useExisting: CascadeSelectSub }], usesInheritance: true, ngImport: i0, template: `
|
|
275
|
+
@for (processedOption of options(); track processedOption; let i = $index) {
|
|
272
276
|
<li
|
|
273
277
|
[class]="cx('option', { processedOption })"
|
|
274
278
|
role="treeitem"
|
|
275
|
-
[attr.aria-level]="level + 1"
|
|
276
|
-
[attr.aria-setsize]="options.length"
|
|
279
|
+
[attr.aria-level]="level() + 1"
|
|
280
|
+
[attr.aria-setsize]="options().length"
|
|
277
281
|
[pBind]="getPTOptions(processedOption, i, 'option')"
|
|
278
282
|
[id]="getOptionId(processedOption)"
|
|
279
283
|
[attr.aria-label]="getOptionLabelToRender(processedOption)"
|
|
@@ -288,17 +292,17 @@ class CascadeSelectSub extends BaseComponent {
|
|
|
288
292
|
pRipple
|
|
289
293
|
[pBind]="getPTOptions(processedOption, i, 'optionContent')"
|
|
290
294
|
>
|
|
291
|
-
@if (optionTemplate) {
|
|
292
|
-
<ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: processedOption?.option, level: level }"></ng-container>
|
|
295
|
+
@if (optionTemplate()) {
|
|
296
|
+
<ng-container *ngTemplateOutlet="optionTemplate(); context: { $implicit: processedOption?.option, level: level() }"></ng-container>
|
|
293
297
|
} @else {
|
|
294
298
|
<span [class]="cx('optionText')" [pBind]="getPTOptions(processedOption, i, 'optionText')">{{ getOptionLabelToRender(processedOption) }}</span>
|
|
295
299
|
}
|
|
296
300
|
@if (isOptionGroup(processedOption)) {
|
|
297
301
|
<span [class]="cx('groupIcon')" [pBind]="getPTOptions(processedOption, i, 'groupIcon')">
|
|
298
|
-
@if (!groupicon) {
|
|
299
|
-
<svg data-p-icon="angle-right" [pBind]="getPTOptions(processedOption,
|
|
302
|
+
@if (!groupicon()) {
|
|
303
|
+
<svg data-p-icon="angle-right" [pBind]="getPTOptions(processedOption, i, 'groupIcon')" />
|
|
300
304
|
}
|
|
301
|
-
<ng-template *ngTemplateOutlet="groupicon"></ng-template>
|
|
305
|
+
<ng-template *ngTemplateOutlet="groupicon()"></ng-template>
|
|
302
306
|
</span>
|
|
303
307
|
}
|
|
304
308
|
</div>
|
|
@@ -307,42 +311,40 @@ class CascadeSelectSub extends BaseComponent {
|
|
|
307
311
|
pCascadeSelectSub
|
|
308
312
|
[attr.role]="'group'"
|
|
309
313
|
[class]="cx('optionList')"
|
|
310
|
-
[selectId]="selectId"
|
|
311
|
-
[focusedOptionId]="focusedOptionId"
|
|
312
|
-
[activeOptionPath]="activeOptionPath"
|
|
314
|
+
[selectId]="selectId()"
|
|
315
|
+
[focusedOptionId]="focusedOptionId()"
|
|
316
|
+
[activeOptionPath]="activeOptionPath()"
|
|
313
317
|
[options]="getOptionGroupChildren(processedOption)"
|
|
314
|
-
[optionLabel]="optionLabel"
|
|
315
|
-
[
|
|
316
|
-
[level]="level + 1"
|
|
318
|
+
[optionLabel]="optionLabel()"
|
|
319
|
+
[level]="level() + 1"
|
|
317
320
|
(onChange)="onChange.emit($event)"
|
|
318
321
|
(onFocusChange)="onFocusChange.emit($event)"
|
|
319
322
|
(onFocusEnterChange)="onFocusEnterChange.emit($event)"
|
|
320
|
-
[optionGroupLabel]="optionGroupLabel"
|
|
321
|
-
[
|
|
322
|
-
[
|
|
323
|
-
[
|
|
323
|
+
[optionGroupLabel]="optionGroupLabel()"
|
|
324
|
+
[optionDisabled]="optionDisabled()"
|
|
325
|
+
[optionTemplate]="optionTemplate()"
|
|
326
|
+
[groupicon]="groupicon()"
|
|
324
327
|
[pBind]="ptm('optionList')"
|
|
325
|
-
[pt]="pt"
|
|
328
|
+
[pt]="pt()"
|
|
326
329
|
[unstyled]="unstyled()"
|
|
327
330
|
></ul>
|
|
328
331
|
}
|
|
329
332
|
</li>
|
|
330
333
|
}
|
|
331
|
-
`, isInline: true, dependencies: [{ kind: "component", type: CascadeSelectSub, selector: "ul[pCascadeSelectSub]", inputs: ["selectId", "activeOptionPath", "optionDisabled", "focusedOptionId", "options", "
|
|
334
|
+
`, isInline: true, dependencies: [{ kind: "component", type: CascadeSelectSub, selector: "ul[pCascadeSelectSub]", inputs: ["selectId", "activeOptionPath", "optionDisabled", "focusedOptionId", "options", "optionTemplate", "groupicon", "level", "optionLabel", "optionGroupLabel", "root"], outputs: ["onChange", "onFocusChange", "onFocusEnterChange"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "component", type: AngleRightIcon, selector: "[data-p-icon=\"angle-right\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
332
335
|
}
|
|
333
336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: CascadeSelectSub, decorators: [{
|
|
334
337
|
type: Component,
|
|
335
338
|
args: [{
|
|
336
339
|
selector: 'ul[pCascadeSelectSub]',
|
|
337
|
-
standalone: true,
|
|
338
340
|
imports: [CommonModule, Ripple, AngleRightIcon, SharedModule, Bind],
|
|
339
341
|
template: `
|
|
340
|
-
@for (processedOption of options; track processedOption; let i = $index) {
|
|
342
|
+
@for (processedOption of options(); track processedOption; let i = $index) {
|
|
341
343
|
<li
|
|
342
344
|
[class]="cx('option', { processedOption })"
|
|
343
345
|
role="treeitem"
|
|
344
|
-
[attr.aria-level]="level + 1"
|
|
345
|
-
[attr.aria-setsize]="options.length"
|
|
346
|
+
[attr.aria-level]="level() + 1"
|
|
347
|
+
[attr.aria-setsize]="options().length"
|
|
346
348
|
[pBind]="getPTOptions(processedOption, i, 'option')"
|
|
347
349
|
[id]="getOptionId(processedOption)"
|
|
348
350
|
[attr.aria-label]="getOptionLabelToRender(processedOption)"
|
|
@@ -357,17 +359,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
357
359
|
pRipple
|
|
358
360
|
[pBind]="getPTOptions(processedOption, i, 'optionContent')"
|
|
359
361
|
>
|
|
360
|
-
@if (optionTemplate) {
|
|
361
|
-
<ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: processedOption?.option, level: level }"></ng-container>
|
|
362
|
+
@if (optionTemplate()) {
|
|
363
|
+
<ng-container *ngTemplateOutlet="optionTemplate(); context: { $implicit: processedOption?.option, level: level() }"></ng-container>
|
|
362
364
|
} @else {
|
|
363
365
|
<span [class]="cx('optionText')" [pBind]="getPTOptions(processedOption, i, 'optionText')">{{ getOptionLabelToRender(processedOption) }}</span>
|
|
364
366
|
}
|
|
365
367
|
@if (isOptionGroup(processedOption)) {
|
|
366
368
|
<span [class]="cx('groupIcon')" [pBind]="getPTOptions(processedOption, i, 'groupIcon')">
|
|
367
|
-
@if (!groupicon) {
|
|
368
|
-
<svg data-p-icon="angle-right" [pBind]="getPTOptions(processedOption,
|
|
369
|
+
@if (!groupicon()) {
|
|
370
|
+
<svg data-p-icon="angle-right" [pBind]="getPTOptions(processedOption, i, 'groupIcon')" />
|
|
369
371
|
}
|
|
370
|
-
<ng-template *ngTemplateOutlet="groupicon"></ng-template>
|
|
372
|
+
<ng-template *ngTemplateOutlet="groupicon()"></ng-template>
|
|
371
373
|
</span>
|
|
372
374
|
}
|
|
373
375
|
</div>
|
|
@@ -376,22 +378,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
376
378
|
pCascadeSelectSub
|
|
377
379
|
[attr.role]="'group'"
|
|
378
380
|
[class]="cx('optionList')"
|
|
379
|
-
[selectId]="selectId"
|
|
380
|
-
[focusedOptionId]="focusedOptionId"
|
|
381
|
-
[activeOptionPath]="activeOptionPath"
|
|
381
|
+
[selectId]="selectId()"
|
|
382
|
+
[focusedOptionId]="focusedOptionId()"
|
|
383
|
+
[activeOptionPath]="activeOptionPath()"
|
|
382
384
|
[options]="getOptionGroupChildren(processedOption)"
|
|
383
|
-
[optionLabel]="optionLabel"
|
|
384
|
-
[
|
|
385
|
-
[level]="level + 1"
|
|
385
|
+
[optionLabel]="optionLabel()"
|
|
386
|
+
[level]="level() + 1"
|
|
386
387
|
(onChange)="onChange.emit($event)"
|
|
387
388
|
(onFocusChange)="onFocusChange.emit($event)"
|
|
388
389
|
(onFocusEnterChange)="onFocusEnterChange.emit($event)"
|
|
389
|
-
[optionGroupLabel]="optionGroupLabel"
|
|
390
|
-
[
|
|
391
|
-
[
|
|
392
|
-
[
|
|
390
|
+
[optionGroupLabel]="optionGroupLabel()"
|
|
391
|
+
[optionDisabled]="optionDisabled()"
|
|
392
|
+
[optionTemplate]="optionTemplate()"
|
|
393
|
+
[groupicon]="groupicon()"
|
|
393
394
|
[pBind]="ptm('optionList')"
|
|
394
|
-
[pt]="pt"
|
|
395
|
+
[pt]="pt()"
|
|
395
396
|
[unstyled]="unstyled()"
|
|
396
397
|
></ul>
|
|
397
398
|
}
|
|
@@ -402,38 +403,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
402
403
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
403
404
|
providers: [CascadeSelectStyle, { provide: PARENT_INSTANCE, useExisting: CascadeSelectSub }]
|
|
404
405
|
}]
|
|
405
|
-
}], propDecorators: { selectId: [{
|
|
406
|
-
type: Input
|
|
407
|
-
}], activeOptionPath: [{
|
|
408
|
-
type: Input
|
|
409
|
-
}], optionDisabled: [{
|
|
410
|
-
type: Input
|
|
411
|
-
}], focusedOptionId: [{
|
|
412
|
-
type: Input
|
|
413
|
-
}], options: [{
|
|
414
|
-
type: Input
|
|
415
|
-
}], optionGroupChildren: [{
|
|
416
|
-
type: Input
|
|
417
|
-
}], optionTemplate: [{
|
|
418
|
-
type: Input
|
|
419
|
-
}], groupicon: [{
|
|
420
|
-
type: Input
|
|
421
|
-
}], level: [{
|
|
422
|
-
type: Input,
|
|
423
|
-
args: [{ transform: numberAttribute }]
|
|
424
|
-
}], optionLabel: [{
|
|
425
|
-
type: Input
|
|
426
|
-
}], optionValue: [{
|
|
427
|
-
type: Input
|
|
428
|
-
}], optionGroupLabel: [{
|
|
429
|
-
type: Input
|
|
430
|
-
}], dirty: [{
|
|
431
|
-
type: Input,
|
|
432
|
-
args: [{ transform: booleanAttribute }]
|
|
433
|
-
}], root: [{
|
|
434
|
-
type: Input,
|
|
435
|
-
args: [{ transform: booleanAttribute }]
|
|
436
|
-
}], onChange: [{ type: i0.Output, args: ["onChange"] }], onFocusChange: [{ type: i0.Output, args: ["onFocusChange"] }], onFocusEnterChange: [{ type: i0.Output, args: ["onFocusEnterChange"] }] } });
|
|
406
|
+
}], propDecorators: { selectId: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectId", required: false }] }], activeOptionPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeOptionPath", required: true }] }], optionDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionDisabled", required: false }] }], focusedOptionId: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedOptionId", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionTemplate", required: false }] }], groupicon: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupicon", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onFocusChange: [{ type: i0.Output, args: ["onFocusChange"] }], onFocusEnterChange: [{ type: i0.Output, args: ["onFocusEnterChange"] }] } });
|
|
437
407
|
/**
|
|
438
408
|
* CascadeSelect is a form component to select a value from a nested structure of options.
|
|
439
409
|
* @group Components
|
|
@@ -443,179 +413,183 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
443
413
|
componentName = 'CascadeSelect';
|
|
444
414
|
$pcCascadeSelect = inject(CASCADESELECT_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
445
415
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
446
|
-
onAfterViewChecked() {
|
|
447
|
-
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
448
|
-
}
|
|
449
416
|
/**
|
|
450
417
|
* Unique identifier of the component
|
|
451
418
|
* @group Props
|
|
452
419
|
*/
|
|
453
|
-
id
|
|
420
|
+
id = input(/* @ts-ignore */
|
|
421
|
+
...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
454
422
|
/**
|
|
455
423
|
* Text to display when the search is active. Defaults to global value in i18n translation configuration.
|
|
456
424
|
* @group Props
|
|
457
425
|
* @defaultValue '{0} results are available'
|
|
458
426
|
*/
|
|
459
|
-
searchMessage
|
|
460
|
-
|
|
461
|
-
* Text to display when there is no data. Defaults to global value in i18n translation configuration.
|
|
462
|
-
* @group Props
|
|
463
|
-
*/
|
|
464
|
-
emptyMessage;
|
|
427
|
+
searchMessage = input(/* @ts-ignore */
|
|
428
|
+
...(ngDevMode ? [undefined, { debugName: "searchMessage" }] : /* istanbul ignore next */ []));
|
|
465
429
|
/**
|
|
466
430
|
* Text to be displayed in hidden accessible field when options are selected. Defaults to global value in i18n translation configuration.
|
|
467
431
|
* @group Props
|
|
468
432
|
* @defaultValue '{0} items selected'
|
|
469
433
|
*/
|
|
470
|
-
selectionMessage
|
|
434
|
+
selectionMessage = input(/* @ts-ignore */
|
|
435
|
+
...(ngDevMode ? [undefined, { debugName: "selectionMessage" }] : /* istanbul ignore next */ []));
|
|
471
436
|
/**
|
|
472
437
|
* Text to display when filtering does not return any results. Defaults to value from Exhaustive locale configuration.
|
|
473
438
|
* @group Props
|
|
474
439
|
* @defaultValue 'No available options'
|
|
475
440
|
*/
|
|
476
|
-
emptySearchMessage
|
|
441
|
+
emptySearchMessage = input(/* @ts-ignore */
|
|
442
|
+
...(ngDevMode ? [undefined, { debugName: "emptySearchMessage" }] : /* istanbul ignore next */ []));
|
|
477
443
|
/**
|
|
478
444
|
* Text to display when filtering does not return any results. Defaults to global value in i18n translation configuration.
|
|
479
445
|
* @group Props
|
|
480
446
|
* @defaultValue 'No selected item'
|
|
481
447
|
*/
|
|
482
|
-
emptySelectionMessage
|
|
448
|
+
emptySelectionMessage = input(/* @ts-ignore */
|
|
449
|
+
...(ngDevMode ? [undefined, { debugName: "emptySelectionMessage" }] : /* istanbul ignore next */ []));
|
|
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
|
* Name of the disabled field of an option.
|
|
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
|
* Fields used when filtering the options, defaults to optionLabel.
|
|
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
|
* Determines if the option will be selected on focus.
|
|
500
469
|
* @group Props
|
|
501
470
|
*/
|
|
502
|
-
selectOnFocus = false;
|
|
471
|
+
selectOnFocus = input(false, { ...(ngDevMode ? { debugName: "selectOnFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
503
472
|
/**
|
|
504
473
|
* Whether to focus on the first visible or selected element when the overlay panel is shown.
|
|
505
474
|
* @group Props
|
|
506
475
|
*/
|
|
507
|
-
autoOptionFocus = false;
|
|
508
|
-
/**
|
|
509
|
-
* Style class of the component.
|
|
510
|
-
* @deprecated since v20.0.0, use `class` instead.
|
|
511
|
-
* @group Props
|
|
512
|
-
*/
|
|
513
|
-
styleClass;
|
|
476
|
+
autoOptionFocus = input(false, { ...(ngDevMode ? { debugName: "autoOptionFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
514
477
|
/**
|
|
515
478
|
* An array of selectitems to display as the available options.
|
|
516
479
|
* @group Props
|
|
517
480
|
*/
|
|
518
|
-
options
|
|
481
|
+
options = input(/* @ts-ignore */
|
|
482
|
+
...(ngDevMode ? [undefined, { debugName: "options" }] : /* istanbul ignore next */ []));
|
|
519
483
|
/**
|
|
520
484
|
* Property name or getter function to use as the label of an option.
|
|
521
485
|
* @group Props
|
|
522
486
|
*/
|
|
523
|
-
optionLabel
|
|
487
|
+
optionLabel = input(/* @ts-ignore */
|
|
488
|
+
...(ngDevMode ? [undefined, { debugName: "optionLabel" }] : /* istanbul ignore next */ []));
|
|
524
489
|
/**
|
|
525
490
|
* Property name or getter function to use as the value of an option, defaults to the option itself when not defined.
|
|
526
491
|
* @group Props
|
|
527
492
|
*/
|
|
528
|
-
optionValue
|
|
493
|
+
optionValue = input(/* @ts-ignore */
|
|
494
|
+
...(ngDevMode ? [undefined, { debugName: "optionValue" }] : /* istanbul ignore next */ []));
|
|
529
495
|
/**
|
|
530
496
|
* Property name or getter function to use as the label of an option group.
|
|
531
497
|
* @group Props
|
|
532
498
|
*/
|
|
533
|
-
optionGroupLabel
|
|
499
|
+
optionGroupLabel = input(/* @ts-ignore */
|
|
500
|
+
...(ngDevMode ? [undefined, { debugName: "optionGroupLabel" }] : /* istanbul ignore next */ []));
|
|
534
501
|
/**
|
|
535
502
|
* Property name or getter function to retrieve the items of a group.
|
|
536
503
|
* @group Props
|
|
537
504
|
*/
|
|
538
|
-
optionGroupChildren
|
|
505
|
+
optionGroupChildren = input(/* @ts-ignore */
|
|
506
|
+
...(ngDevMode ? [undefined, { debugName: "optionGroupChildren" }] : /* istanbul ignore next */ []));
|
|
539
507
|
/**
|
|
540
508
|
* Default text to display when no option is selected.
|
|
541
509
|
* @group Props
|
|
542
510
|
*/
|
|
543
|
-
placeholder
|
|
511
|
+
placeholder = input(/* @ts-ignore */
|
|
512
|
+
...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
544
513
|
/**
|
|
545
514
|
* Selected value of the component.
|
|
546
515
|
* @group Props
|
|
547
516
|
*/
|
|
548
|
-
value
|
|
517
|
+
value = model(/* @ts-ignore */
|
|
518
|
+
...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
|
|
549
519
|
/**
|
|
550
520
|
* A property to uniquely identify an option.
|
|
551
521
|
* @group Props
|
|
552
522
|
*/
|
|
553
|
-
dataKey
|
|
523
|
+
dataKey = input(/* @ts-ignore */
|
|
524
|
+
...(ngDevMode ? [undefined, { debugName: "dataKey" }] : /* istanbul ignore next */ []));
|
|
554
525
|
/**
|
|
555
526
|
* Identifier of the underlying input element.
|
|
556
527
|
* @group Props
|
|
557
528
|
*/
|
|
558
|
-
inputId
|
|
529
|
+
inputId = input(/* @ts-ignore */
|
|
530
|
+
...(ngDevMode ? [undefined, { debugName: "inputId" }] : /* istanbul ignore next */ []));
|
|
559
531
|
/**
|
|
560
532
|
* Index of the element in tabbing order.
|
|
561
533
|
* @group Props
|
|
562
534
|
*/
|
|
563
|
-
tabindex = 0;
|
|
535
|
+
tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
564
536
|
/**
|
|
565
537
|
* Establishes relationships between the component and label(s) where its value should be one or more element IDs.
|
|
566
538
|
* @group Props
|
|
567
539
|
*/
|
|
568
|
-
ariaLabelledBy
|
|
569
|
-
|
|
570
|
-
* Label of the input for accessibility.
|
|
571
|
-
* @group Props
|
|
572
|
-
*/
|
|
573
|
-
inputLabel;
|
|
540
|
+
ariaLabelledBy = input(/* @ts-ignore */
|
|
541
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
574
542
|
/**
|
|
575
543
|
* Defines a string that labels the input for accessibility.
|
|
576
544
|
* @group Props
|
|
577
545
|
*/
|
|
578
|
-
ariaLabel
|
|
546
|
+
ariaLabel = input(/* @ts-ignore */
|
|
547
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
579
548
|
/**
|
|
580
549
|
* When enabled, a clear icon is displayed to clear the value.
|
|
581
550
|
* @group Props
|
|
582
551
|
*/
|
|
583
|
-
showClear = false;
|
|
552
|
+
showClear = input(false, { ...(ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
584
553
|
/**
|
|
585
554
|
* Style class of the overlay panel.
|
|
586
555
|
* @group Props
|
|
587
556
|
*/
|
|
588
|
-
panelStyleClass
|
|
557
|
+
panelStyleClass = input(/* @ts-ignore */
|
|
558
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyleClass" }] : /* istanbul ignore next */ []));
|
|
589
559
|
/**
|
|
590
560
|
* Inline style of the overlay panel.
|
|
591
561
|
* @group Props
|
|
592
562
|
*/
|
|
593
|
-
panelStyle
|
|
563
|
+
panelStyle = input(/* @ts-ignore */
|
|
564
|
+
...(ngDevMode ? [undefined, { debugName: "panelStyle" }] : /* istanbul ignore next */ []));
|
|
594
565
|
/**
|
|
595
566
|
* Whether to use overlay API feature. The properties of overlay API can be used like an object in it.
|
|
596
567
|
* @group Props
|
|
597
568
|
*/
|
|
598
|
-
overlayOptions
|
|
569
|
+
overlayOptions = input(/* @ts-ignore */
|
|
570
|
+
...(ngDevMode ? [undefined, { debugName: "overlayOptions" }] : /* istanbul ignore next */ []));
|
|
599
571
|
/**
|
|
600
572
|
* When present, it specifies that the component should automatically get focus on load.
|
|
601
573
|
* @group Props
|
|
602
574
|
*/
|
|
603
|
-
autofocus;
|
|
575
|
+
autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
604
576
|
/**
|
|
605
577
|
* Whether the dropdown is in loading state.
|
|
606
578
|
* @group Props
|
|
607
579
|
*/
|
|
608
|
-
loading = false;
|
|
580
|
+
loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
609
581
|
/**
|
|
610
582
|
* Icon to display in loading state.
|
|
611
583
|
* @group Props
|
|
612
584
|
*/
|
|
613
|
-
loadingIcon
|
|
585
|
+
loadingIcon = input(/* @ts-ignore */
|
|
586
|
+
...(ngDevMode ? [undefined, { debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
|
|
614
587
|
/**
|
|
615
588
|
* The breakpoint to define the maximum width boundary.
|
|
616
589
|
* @group Props
|
|
617
590
|
*/
|
|
618
|
-
breakpoint = '960px'
|
|
591
|
+
breakpoint = input('960px', /* @ts-ignore */
|
|
592
|
+
...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
|
|
619
593
|
/**
|
|
620
594
|
* Specifies the size of the component.
|
|
621
595
|
* @defaultValue undefined
|
|
@@ -748,73 +722,99 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
748
722
|
* @group Templates
|
|
749
723
|
*/
|
|
750
724
|
clearIconTemplate = contentChild('clearicon', { ...(ngDevMode ? { debugName: "clearIconTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
751
|
-
_valueTemplate
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
725
|
+
_valueTemplate = computed(() => this.templates()
|
|
726
|
+
.filter((item) => item.getType() === 'value')
|
|
727
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
728
|
+
...(ngDevMode ? [{ debugName: "_valueTemplate" }] : /* istanbul ignore next */ []));
|
|
729
|
+
_optionTemplate = computed(() => this.templates()
|
|
730
|
+
.filter((item) => item.getType() === 'option')
|
|
731
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
732
|
+
...(ngDevMode ? [{ debugName: "_optionTemplate" }] : /* istanbul ignore next */ []));
|
|
733
|
+
_headerTemplate = computed(() => this.templates()
|
|
734
|
+
.filter((item) => item.getType() === 'header')
|
|
735
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
736
|
+
...(ngDevMode ? [{ debugName: "_headerTemplate" }] : /* istanbul ignore next */ []));
|
|
737
|
+
_footerTemplate = computed(() => this.templates()
|
|
738
|
+
.filter((item) => item.getType() === 'footer')
|
|
739
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
740
|
+
...(ngDevMode ? [{ debugName: "_footerTemplate" }] : /* istanbul ignore next */ []));
|
|
741
|
+
_triggerIconTemplate = computed(() => this.templates()
|
|
742
|
+
.filter((item) => item.getType() === 'triggericon')
|
|
743
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
744
|
+
...(ngDevMode ? [{ debugName: "_triggerIconTemplate" }] : /* istanbul ignore next */ []));
|
|
745
|
+
_loadingIconTemplate = computed(() => this.templates()
|
|
746
|
+
.filter((item) => item.getType() === 'loadingicon')
|
|
747
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
748
|
+
...(ngDevMode ? [{ debugName: "_loadingIconTemplate" }] : /* istanbul ignore next */ []));
|
|
749
|
+
_groupIconTemplate = computed(() => this.templates()
|
|
750
|
+
.filter((item) => item.getType() === 'optiongroupicon')
|
|
751
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
752
|
+
...(ngDevMode ? [{ debugName: "_groupIconTemplate" }] : /* istanbul ignore next */ []));
|
|
753
|
+
_clearIconTemplate = computed(() => this.templates()
|
|
754
|
+
.filter((item) => item.getType() === 'clearicon')
|
|
755
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
756
|
+
...(ngDevMode ? [{ debugName: "_clearIconTemplate" }] : /* istanbul ignore next */ []));
|
|
757
|
+
focused = signal(false, /* @ts-ignore */
|
|
758
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
759
|
+
overlayVisible = signal(false, /* @ts-ignore */
|
|
760
|
+
...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
|
|
761
|
+
clicked = signal(false, /* @ts-ignore */
|
|
762
|
+
...(ngDevMode ? [{ debugName: "clicked" }] : /* istanbul ignore next */ []));
|
|
763
|
+
dirty = signal(false, /* @ts-ignore */
|
|
764
|
+
...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
|
|
765
|
+
searchValue = signal(undefined, /* @ts-ignore */
|
|
766
|
+
...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
767
|
+
searchTimeout = signal(undefined, /* @ts-ignore */
|
|
768
|
+
...(ngDevMode ? [{ debugName: "searchTimeout" }] : /* istanbul ignore next */ []));
|
|
766
769
|
focusedOptionInfo = signal({ index: -1, level: 0, parentKey: '' }, /* @ts-ignore */
|
|
767
770
|
...(ngDevMode ? [{ debugName: "focusedOptionInfo" }] : /* istanbul ignore next */ []));
|
|
768
771
|
activeOptionPath = signal([], /* @ts-ignore */
|
|
769
772
|
...(ngDevMode ? [{ debugName: "activeOptionPath" }] : /* istanbul ignore next */ []));
|
|
770
|
-
processedOptions = []
|
|
773
|
+
processedOptions = computed(() => this.createProcessedOptions(this.options() || []), /* @ts-ignore */
|
|
774
|
+
...(ngDevMode ? [{ debugName: "processedOptions" }] : /* istanbul ignore next */ []));
|
|
771
775
|
_componentStyle = inject(CascadeSelectStyle);
|
|
772
|
-
initialized = false
|
|
776
|
+
initialized = signal(false, /* @ts-ignore */
|
|
777
|
+
...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
|
|
778
|
+
destroyRef = inject(DestroyRef);
|
|
773
779
|
$variant = computed(() => this.variant() || this.config.inputStyle() || this.config.inputVariant(), /* @ts-ignore */
|
|
774
780
|
...(ngDevMode ? [{ debugName: "$variant" }] : /* istanbul ignore next */ []));
|
|
775
781
|
$appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
|
|
776
782
|
...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
|
|
777
783
|
pcFluid = inject(Fluid, { optional: true, host: true, skipSelf: true });
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
}
|
|
784
|
+
hasFluid = computed(() => this.fluid() ?? !!this.pcFluid, /* @ts-ignore */
|
|
785
|
+
...(ngDevMode ? [{ debugName: "hasFluid" }] : /* istanbul ignore next */ []));
|
|
781
786
|
onHostClick(event) {
|
|
782
787
|
this.onContainerClick(event);
|
|
783
788
|
}
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
return
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
return this.emptySelectionMessage || this.config.translation.emptySelectionMessage || '';
|
|
807
|
-
}
|
|
808
|
-
get selectedMessageText() {
|
|
809
|
-
return this.hasSelectedOption() ? this.selectionMessageText.replaceAll('{0}', '1') : this.emptySelectionMessageText;
|
|
810
|
-
}
|
|
789
|
+
translation = toSignal(this.config.translationObserver, { initialValue: this.config.translation });
|
|
790
|
+
listLabel = computed(() => this.translation()[TranslationKeys.ARIA]['listLabel'], /* @ts-ignore */
|
|
791
|
+
...(ngDevMode ? [{ debugName: "listLabel" }] : /* istanbul ignore next */ []));
|
|
792
|
+
_id = computed(() => this.id() || uuid('pn_id_'), /* @ts-ignore */
|
|
793
|
+
...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
|
|
794
|
+
focusedOptionId = computed(() => {
|
|
795
|
+
const focusedOptionInfo = this.focusedOptionInfo();
|
|
796
|
+
return focusedOptionInfo.index !== -1 ? `${this._id()}${isNotEmpty(focusedOptionInfo.parentKey) ? '_' + focusedOptionInfo.parentKey : ''}_${focusedOptionInfo.index}` : null;
|
|
797
|
+
}, /* @ts-ignore */
|
|
798
|
+
...(ngDevMode ? [{ debugName: "focusedOptionId" }] : /* istanbul ignore next */ []));
|
|
799
|
+
searchResultMessageText = computed(() => (isNotEmpty(this.visibleOptions()) ? this.searchMessageText().replaceAll('{0}', this.visibleOptions().length) : this.emptySearchMessageText()), /* @ts-ignore */
|
|
800
|
+
...(ngDevMode ? [{ debugName: "searchResultMessageText" }] : /* istanbul ignore next */ []));
|
|
801
|
+
searchMessageText = computed(() => this.searchMessage() || this.translation().searchMessage || '', /* @ts-ignore */
|
|
802
|
+
...(ngDevMode ? [{ debugName: "searchMessageText" }] : /* istanbul ignore next */ []));
|
|
803
|
+
emptySearchMessageText = computed(() => this.emptySearchMessage() || this.translation().emptySearchMessage || '', /* @ts-ignore */
|
|
804
|
+
...(ngDevMode ? [{ debugName: "emptySearchMessageText" }] : /* istanbul ignore next */ []));
|
|
805
|
+
selectionMessageText = computed(() => this.selectionMessage() || this.translation().selectionMessage || '', /* @ts-ignore */
|
|
806
|
+
...(ngDevMode ? [{ debugName: "selectionMessageText" }] : /* istanbul ignore next */ []));
|
|
807
|
+
emptySelectionMessageText = computed(() => this.emptySelectionMessage() || this.translation().emptySelectionMessage || '', /* @ts-ignore */
|
|
808
|
+
...(ngDevMode ? [{ debugName: "emptySelectionMessageText" }] : /* istanbul ignore next */ []));
|
|
809
|
+
selectedMessageText = computed(() => (this.hasSelectedOption() ? this.selectionMessageText().replaceAll('{0}', '1') : this.emptySelectionMessageText()), /* @ts-ignore */
|
|
810
|
+
...(ngDevMode ? [{ debugName: "selectedMessageText" }] : /* istanbul ignore next */ []));
|
|
811
811
|
visibleOptions = computed(() => {
|
|
812
812
|
const processedOption = this.activeOptionPath().find((p) => p.key === this.focusedOptionInfo().parentKey);
|
|
813
|
-
return processedOption ? processedOption.children : this.processedOptions;
|
|
813
|
+
return processedOption ? processedOption.children : this.processedOptions();
|
|
814
814
|
}, /* @ts-ignore */
|
|
815
815
|
...(ngDevMode ? [{ debugName: "visibleOptions" }] : /* istanbul ignore next */ []));
|
|
816
816
|
label = computed(() => {
|
|
817
|
-
const label = this.placeholder || 'p-emptylabel';
|
|
817
|
+
const label = this.placeholder() || 'p-emptylabel';
|
|
818
818
|
if (this.hasSelectedOption()) {
|
|
819
819
|
const activeOptionPath = this.findOptionPathByValue(this.modelValue(), null);
|
|
820
820
|
const processedOption = isNotEmpty(activeOptionPath) ? activeOptionPath[activeOptionPath.length - 1] : null;
|
|
@@ -823,56 +823,10 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
823
823
|
return label;
|
|
824
824
|
}, /* @ts-ignore */
|
|
825
825
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
826
|
-
get _label() {
|
|
827
|
-
const label = this.placeholder || 'p-emptylabel';
|
|
828
|
-
if (this.hasSelectedOption()) {
|
|
829
|
-
const activeOptionPath = this.findOptionPathByValue(this.modelValue(), null);
|
|
830
|
-
const processedOption = isNotEmpty(activeOptionPath) ? activeOptionPath[activeOptionPath.length - 1] : null;
|
|
831
|
-
return processedOption ? this.getOptionLabel(processedOption.option) : label;
|
|
832
|
-
}
|
|
833
|
-
return label;
|
|
834
|
-
}
|
|
835
826
|
templates = contentChildren(PrimeTemplate, /* @ts-ignore */
|
|
836
827
|
...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
switch (item.getType()) {
|
|
840
|
-
case 'value':
|
|
841
|
-
this._valueTemplate = item.template;
|
|
842
|
-
break;
|
|
843
|
-
case 'option':
|
|
844
|
-
this._optionTemplate = item.template;
|
|
845
|
-
break;
|
|
846
|
-
case 'header':
|
|
847
|
-
this._headerTemplate = item.template;
|
|
848
|
-
break;
|
|
849
|
-
case 'footer':
|
|
850
|
-
this._footerTemplate = item.template;
|
|
851
|
-
break;
|
|
852
|
-
case 'triggericon':
|
|
853
|
-
this._triggerIconTemplate = item.template;
|
|
854
|
-
break;
|
|
855
|
-
case 'loadingicon':
|
|
856
|
-
this._loadingIconTemplate = item.template;
|
|
857
|
-
break;
|
|
858
|
-
case 'clearicon':
|
|
859
|
-
this._clearIconTemplate = item.template;
|
|
860
|
-
break;
|
|
861
|
-
case 'optiongroupicon':
|
|
862
|
-
this._groupIconTemplate = item.template;
|
|
863
|
-
break;
|
|
864
|
-
}
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
|
-
onChanges(changes) {
|
|
868
|
-
if (changes.options) {
|
|
869
|
-
this.processedOptions = this.createProcessedOptions(changes.options.currentValue || []);
|
|
870
|
-
this.updateModel(null);
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
hasSelectedOption() {
|
|
874
|
-
return isNotEmpty(this.modelValue());
|
|
875
|
-
}
|
|
828
|
+
hasSelectedOption = computed(() => isNotEmpty(this.modelValue()), /* @ts-ignore */
|
|
829
|
+
...(ngDevMode ? [{ debugName: "hasSelectedOption" }] : /* istanbul ignore next */ []));
|
|
876
830
|
createProcessedOptions(options, level = 0, parent = {}, parentKey = '') {
|
|
877
831
|
const processedOptions = [];
|
|
878
832
|
options &&
|
|
@@ -896,18 +850,18 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
896
850
|
// For screenreaders
|
|
897
851
|
return;
|
|
898
852
|
}
|
|
899
|
-
this.focused
|
|
853
|
+
this.focused.set(true);
|
|
900
854
|
this.onFocus.emit(event);
|
|
901
855
|
}
|
|
902
856
|
onInputBlur(event) {
|
|
903
|
-
this.focused
|
|
904
|
-
this.focusedOptionInfo.set({
|
|
905
|
-
this.searchValue
|
|
857
|
+
this.focused.set(false);
|
|
858
|
+
this.focusedOptionInfo.set({ index: -1, level: 0, parentKey: '' });
|
|
859
|
+
this.searchValue.set('');
|
|
906
860
|
this.onModelTouched();
|
|
907
861
|
this.onBlur.emit(event);
|
|
908
862
|
}
|
|
909
863
|
onInputKeyDown(event) {
|
|
910
|
-
if (this.$disabled() || this.loading) {
|
|
864
|
+
if (this.$disabled() || this.loading()) {
|
|
911
865
|
event.preventDefault();
|
|
912
866
|
return;
|
|
913
867
|
}
|
|
@@ -955,19 +909,19 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
955
909
|
break;
|
|
956
910
|
default:
|
|
957
911
|
if (!metaKey && isPrintableCharacter(event.key)) {
|
|
958
|
-
!this.overlayVisible && this.show();
|
|
912
|
+
!this.overlayVisible() && this.show();
|
|
959
913
|
this.searchOptions(event, event.key);
|
|
960
914
|
}
|
|
961
915
|
break;
|
|
962
916
|
}
|
|
963
|
-
this.clicked
|
|
917
|
+
this.clicked.set(false);
|
|
964
918
|
}
|
|
965
919
|
onArrowDownKey(event) {
|
|
966
|
-
if (!this.overlayVisible) {
|
|
920
|
+
if (!this.overlayVisible()) {
|
|
967
921
|
this.show();
|
|
968
922
|
}
|
|
969
923
|
else {
|
|
970
|
-
const optionIndex = this.focusedOptionInfo().index !== -1 ? this.findNextOptionIndex(this.focusedOptionInfo().index) : this.clicked ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex();
|
|
924
|
+
const optionIndex = this.focusedOptionInfo().index !== -1 ? this.findNextOptionIndex(this.focusedOptionInfo().index) : this.clicked() ? this.findFirstOptionIndex() : this.findFirstFocusedOptionIndex();
|
|
971
925
|
this.changeFocusedOptionIndex(event, optionIndex, true);
|
|
972
926
|
}
|
|
973
927
|
event.preventDefault();
|
|
@@ -975,22 +929,22 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
975
929
|
onArrowUpKey(event) {
|
|
976
930
|
if (event.altKey) {
|
|
977
931
|
if (this.focusedOptionInfo().index !== -1) {
|
|
978
|
-
const processedOption = this.visibleOptions[this.focusedOptionInfo().index];
|
|
932
|
+
const processedOption = this.visibleOptions()[this.focusedOptionInfo().index];
|
|
979
933
|
const grouped = this.isProccessedOptionGroup(processedOption);
|
|
980
934
|
!grouped && this.onOptionChange({ originalEvent: event, processedOption });
|
|
981
935
|
}
|
|
982
|
-
this.overlayVisible && this.hide();
|
|
936
|
+
this.overlayVisible() && this.hide();
|
|
983
937
|
event.preventDefault();
|
|
984
938
|
}
|
|
985
939
|
else {
|
|
986
|
-
const optionIndex = this.focusedOptionInfo().index !== -1 ? this.findPrevOptionIndex(this.focusedOptionInfo().index) : this.clicked ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();
|
|
940
|
+
const optionIndex = this.focusedOptionInfo().index !== -1 ? this.findPrevOptionIndex(this.focusedOptionInfo().index) : this.clicked() ? this.findLastOptionIndex() : this.findLastFocusedOptionIndex();
|
|
987
941
|
this.changeFocusedOptionIndex(event, optionIndex, true);
|
|
988
|
-
!this.overlayVisible && this.show();
|
|
942
|
+
!this.overlayVisible() && this.show();
|
|
989
943
|
event.preventDefault();
|
|
990
944
|
}
|
|
991
945
|
}
|
|
992
946
|
onArrowLeftKey(event) {
|
|
993
|
-
if (this.overlayVisible) {
|
|
947
|
+
if (this.overlayVisible()) {
|
|
994
948
|
const processedOption = this.visibleOptions()[this.focusedOptionInfo().index];
|
|
995
949
|
const parentOption = this.activeOptionPath().find((p) => p.key === processedOption.parentKey);
|
|
996
950
|
const matched = this.focusedOptionInfo().parentKey === '' || (parentOption && parentOption.key === this.focusedOptionInfo().parentKey);
|
|
@@ -1001,21 +955,21 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1001
955
|
}
|
|
1002
956
|
if (!root) {
|
|
1003
957
|
this.focusedOptionInfo.set({ index: -1, parentKey: parentOption ? parentOption.parentKey : '' });
|
|
1004
|
-
this.searchValue
|
|
958
|
+
this.searchValue.set('');
|
|
1005
959
|
this.onArrowDownKey(event);
|
|
1006
960
|
}
|
|
1007
961
|
event.preventDefault();
|
|
1008
962
|
}
|
|
1009
963
|
}
|
|
1010
964
|
onArrowRightKey(event) {
|
|
1011
|
-
if (this.overlayVisible) {
|
|
965
|
+
if (this.overlayVisible()) {
|
|
1012
966
|
const processedOption = this.visibleOptions()[this.focusedOptionInfo().index];
|
|
1013
967
|
const grouped = this.isProccessedOptionGroup(processedOption);
|
|
1014
968
|
if (grouped) {
|
|
1015
969
|
const matched = this.activeOptionPath().some((p) => processedOption.key === p.key);
|
|
1016
970
|
if (matched) {
|
|
1017
971
|
this.focusedOptionInfo.set({ index: -1, parentKey: processedOption.key });
|
|
1018
|
-
this.searchValue
|
|
972
|
+
this.searchValue.set('');
|
|
1019
973
|
this.onArrowDownKey(event);
|
|
1020
974
|
}
|
|
1021
975
|
else {
|
|
@@ -1027,16 +981,16 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1027
981
|
}
|
|
1028
982
|
onHomeKey(event) {
|
|
1029
983
|
this.changeFocusedOptionIndex(event, this.findFirstOptionIndex());
|
|
1030
|
-
!this.overlayVisible && this.show();
|
|
984
|
+
!this.overlayVisible() && this.show();
|
|
1031
985
|
event.preventDefault();
|
|
1032
986
|
}
|
|
1033
987
|
onEndKey(event) {
|
|
1034
988
|
this.changeFocusedOptionIndex(event, this.findLastOptionIndex());
|
|
1035
|
-
!this.overlayVisible && this.show();
|
|
989
|
+
!this.overlayVisible() && this.show();
|
|
1036
990
|
event.preventDefault();
|
|
1037
991
|
}
|
|
1038
992
|
onEnterKey(event) {
|
|
1039
|
-
if (!this.overlayVisible) {
|
|
993
|
+
if (!this.overlayVisible()) {
|
|
1040
994
|
this.focusedOptionInfo.set({ ...this.focusedOptionInfo(), index: -1 }); // reset
|
|
1041
995
|
this.onArrowDownKey(event);
|
|
1042
996
|
}
|
|
@@ -1054,7 +1008,7 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1054
1008
|
this.onEnterKey(event);
|
|
1055
1009
|
}
|
|
1056
1010
|
onEscapeKey(event) {
|
|
1057
|
-
this.overlayVisible && this.hide(event, true);
|
|
1011
|
+
this.overlayVisible() && this.hide(event, true);
|
|
1058
1012
|
event.preventDefault();
|
|
1059
1013
|
}
|
|
1060
1014
|
onTabKey(event) {
|
|
@@ -1063,22 +1017,21 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1063
1017
|
const grouped = this.isProccessedOptionGroup(processedOption);
|
|
1064
1018
|
!grouped && this.onOptionChange({ originalEvent: event, processedOption });
|
|
1065
1019
|
}
|
|
1066
|
-
this.overlayVisible && this.hide();
|
|
1020
|
+
this.overlayVisible() && this.hide();
|
|
1067
1021
|
}
|
|
1068
1022
|
onBackspaceKey(event) {
|
|
1069
|
-
if (isNotEmpty(this.modelValue()) && this.showClear) {
|
|
1023
|
+
if (isNotEmpty(this.modelValue()) && this.showClear()) {
|
|
1070
1024
|
this.clear();
|
|
1071
1025
|
}
|
|
1072
1026
|
event.stopPropagation();
|
|
1073
1027
|
}
|
|
1074
|
-
equalityKey()
|
|
1075
|
-
|
|
1076
|
-
}
|
|
1028
|
+
equalityKey = computed(() => (this.optionValue() ? undefined : this.dataKey()), /* @ts-ignore */
|
|
1029
|
+
...(ngDevMode ? [{ debugName: "equalityKey" }] : /* istanbul ignore next */ []));
|
|
1077
1030
|
updateModel(value, event) {
|
|
1078
|
-
this.value
|
|
1031
|
+
this.value.set(value);
|
|
1079
1032
|
this.onModelChange(value);
|
|
1080
1033
|
this.writeModelValue(value);
|
|
1081
|
-
if (this.initialized) {
|
|
1034
|
+
if (this.initialized()) {
|
|
1082
1035
|
this.onChange.emit({
|
|
1083
1036
|
originalEvent: event,
|
|
1084
1037
|
value: value
|
|
@@ -1086,18 +1039,18 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1086
1039
|
}
|
|
1087
1040
|
}
|
|
1088
1041
|
autoUpdateModel() {
|
|
1089
|
-
if (this.selectOnFocus && this.autoOptionFocus && !this.hasSelectedOption()) {
|
|
1090
|
-
this.focusedOptionInfo()
|
|
1042
|
+
if (this.selectOnFocus() && this.autoOptionFocus() && !this.hasSelectedOption()) {
|
|
1043
|
+
this.focusedOptionInfo.set({ ...this.focusedOptionInfo(), index: this.findFirstFocusedOptionIndex() });
|
|
1091
1044
|
this.onOptionChange({
|
|
1092
1045
|
originalEvent: null,
|
|
1093
1046
|
processedOption: this.visibleOptions()[this.focusedOptionInfo().index],
|
|
1094
1047
|
isHide: false
|
|
1095
1048
|
});
|
|
1096
|
-
!this.overlayVisible && this.focusedOptionInfo.set({ index: -1, level: 0, parentKey: '' });
|
|
1049
|
+
!this.overlayVisible() && this.focusedOptionInfo.set({ index: -1, level: 0, parentKey: '' });
|
|
1097
1050
|
}
|
|
1098
1051
|
}
|
|
1099
1052
|
scrollInView(index = -1) {
|
|
1100
|
-
const id = index !== -1 ? `${this.
|
|
1053
|
+
const id = index !== -1 ? `${this._id()}_${index}` : this.focusedOptionId();
|
|
1101
1054
|
const element = findSingle(this.panelViewChild()?.nativeElement, `li[id="${id}"]`);
|
|
1102
1055
|
if (element) {
|
|
1103
1056
|
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' });
|
|
@@ -1108,15 +1061,16 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1108
1061
|
if (focusedOptionInfo.index !== index) {
|
|
1109
1062
|
this.focusedOptionInfo.set({ ...focusedOptionInfo, index });
|
|
1110
1063
|
this.scrollInView();
|
|
1111
|
-
if (this.focusOnHover) {
|
|
1064
|
+
if (this.focusOnHover()) {
|
|
1112
1065
|
this.onOptionClick({ originalEvent: event, processedOption: this.visibleOptions()[index], isHide: false, preventSelection });
|
|
1113
1066
|
}
|
|
1114
|
-
if (this.selectOnFocus) {
|
|
1067
|
+
if (this.selectOnFocus()) {
|
|
1115
1068
|
this.onOptionChange({ originalEvent: event, processedOption: this.visibleOptions()[index], isHide: false });
|
|
1116
1069
|
}
|
|
1117
1070
|
}
|
|
1118
1071
|
}
|
|
1119
|
-
matchMediaListener
|
|
1072
|
+
matchMediaListener = signal(undefined, /* @ts-ignore */
|
|
1073
|
+
...(ngDevMode ? [{ debugName: "matchMediaListener" }] : /* istanbul ignore next */ []));
|
|
1120
1074
|
onOptionSelect(event) {
|
|
1121
1075
|
const { originalEvent, value, isHide } = event;
|
|
1122
1076
|
const newValue = this.getOptionValue(value);
|
|
@@ -1127,15 +1081,15 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1127
1081
|
isHide && this.hide(event, true);
|
|
1128
1082
|
}
|
|
1129
1083
|
onOptionGroupSelect(event) {
|
|
1130
|
-
this.dirty
|
|
1084
|
+
this.dirty.set(true);
|
|
1131
1085
|
this.onGroupChange.emit(event);
|
|
1132
1086
|
}
|
|
1133
1087
|
onContainerClick(event) {
|
|
1134
|
-
if (this.$disabled() || this.loading) {
|
|
1088
|
+
if (this.$disabled() || this.loading()) {
|
|
1135
1089
|
return;
|
|
1136
1090
|
}
|
|
1137
1091
|
if (!this.overlayViewChild()?.el?.nativeElement?.contains(event.target)) {
|
|
1138
|
-
if (this.overlayVisible) {
|
|
1092
|
+
if (this.overlayVisible()) {
|
|
1139
1093
|
this.hide();
|
|
1140
1094
|
}
|
|
1141
1095
|
else {
|
|
@@ -1143,13 +1097,13 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1143
1097
|
}
|
|
1144
1098
|
this.focusInputViewChild().nativeElement.focus();
|
|
1145
1099
|
}
|
|
1146
|
-
this.clicked
|
|
1100
|
+
this.clicked.set(true);
|
|
1147
1101
|
}
|
|
1148
1102
|
isOptionMatched(processedOption) {
|
|
1149
|
-
return this.isValidOption(processedOption) && this.getProccessedOptionLabel(processedOption).toLocaleLowerCase(this.searchLocale).startsWith(this.searchValue?.toLocaleLowerCase(this.searchLocale));
|
|
1103
|
+
return this.isValidOption(processedOption) && this.getProccessedOptionLabel(processedOption).toLocaleLowerCase(this.searchLocale()).startsWith(this.searchValue()?.toLocaleLowerCase(this.searchLocale()));
|
|
1150
1104
|
}
|
|
1151
1105
|
isOptionDisabled(option) {
|
|
1152
|
-
return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : false;
|
|
1106
|
+
return this.optionDisabled() ? resolveFieldData(option, this.optionDisabled()) : false;
|
|
1153
1107
|
}
|
|
1154
1108
|
isValidOption(processedOption) {
|
|
1155
1109
|
return !!processedOption && !this.isOptionDisabled(processedOption.option);
|
|
@@ -1161,7 +1115,7 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1161
1115
|
return this.activeOptionPath().some((p) => p.key === processedOption.key);
|
|
1162
1116
|
}
|
|
1163
1117
|
findOptionPathByValue(value, processedOptions, level = 0) {
|
|
1164
|
-
processedOptions = processedOptions || (level === 0 && this.processedOptions);
|
|
1118
|
+
processedOptions = processedOptions || (level === 0 && this.processedOptions());
|
|
1165
1119
|
if (!processedOptions)
|
|
1166
1120
|
return null;
|
|
1167
1121
|
if (isEmpty(value))
|
|
@@ -1208,7 +1162,7 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1208
1162
|
return selectedIndex < 0 ? this.findLastOptionIndex() : selectedIndex;
|
|
1209
1163
|
}
|
|
1210
1164
|
searchOptions(event, char) {
|
|
1211
|
-
this.searchValue
|
|
1165
|
+
this.searchValue.set((this.searchValue() || '') + char);
|
|
1212
1166
|
let optionIndex = -1;
|
|
1213
1167
|
let matched = false;
|
|
1214
1168
|
const focusedOptionInfo = this.focusedOptionInfo();
|
|
@@ -1235,32 +1189,31 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1235
1189
|
if (optionIndex !== -1) {
|
|
1236
1190
|
this.changeFocusedOptionIndex(event, optionIndex);
|
|
1237
1191
|
}
|
|
1238
|
-
if (this.searchTimeout) {
|
|
1239
|
-
clearTimeout(this.searchTimeout);
|
|
1192
|
+
if (this.searchTimeout()) {
|
|
1193
|
+
clearTimeout(this.searchTimeout());
|
|
1240
1194
|
}
|
|
1241
|
-
this.searchTimeout
|
|
1242
|
-
this.searchValue
|
|
1243
|
-
this.searchTimeout
|
|
1244
|
-
}, 500);
|
|
1195
|
+
this.searchTimeout.set(setTimeout(() => {
|
|
1196
|
+
this.searchValue.set('');
|
|
1197
|
+
this.searchTimeout.set(null);
|
|
1198
|
+
}, 500));
|
|
1245
1199
|
return matched;
|
|
1246
1200
|
}
|
|
1247
1201
|
hide(event, isFocus = false) {
|
|
1248
1202
|
const _hide = () => {
|
|
1249
|
-
this.overlayVisible
|
|
1250
|
-
this.clicked
|
|
1203
|
+
this.overlayVisible.set(false);
|
|
1204
|
+
this.clicked.set(false);
|
|
1251
1205
|
this.activeOptionPath.set([]);
|
|
1252
1206
|
this.focusedOptionInfo.set({ index: -1, level: 0, parentKey: '' });
|
|
1253
1207
|
isFocus && focus(this.focusInputViewChild().nativeElement);
|
|
1254
1208
|
this.onHide.emit(event);
|
|
1255
|
-
this.cd.markForCheck();
|
|
1256
1209
|
};
|
|
1257
1210
|
setTimeout(() => {
|
|
1258
|
-
_hide();
|
|
1211
|
+
!this.destroyRef.destroyed && _hide();
|
|
1259
1212
|
}, 0); // For ScreenReaders
|
|
1260
1213
|
}
|
|
1261
1214
|
show(event, isFocus = false) {
|
|
1262
1215
|
this.onShow.emit(event);
|
|
1263
|
-
this.overlayVisible
|
|
1216
|
+
this.overlayVisible.set(true);
|
|
1264
1217
|
const activeOptionPath = this.hasSelectedOption() ? this.findOptionPathByValue(this.modelValue()) : this.activeOptionPath();
|
|
1265
1218
|
this.activeOptionPath.set(activeOptionPath);
|
|
1266
1219
|
let focusedOptionInfo;
|
|
@@ -1273,13 +1226,13 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1273
1226
|
};
|
|
1274
1227
|
}
|
|
1275
1228
|
else {
|
|
1276
|
-
focusedOptionInfo = { index: this.autoOptionFocus ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex(), level: 0, parentKey: '' };
|
|
1229
|
+
focusedOptionInfo = { index: this.autoOptionFocus() ? this.findFirstFocusedOptionIndex() : this.findSelectedOptionIndex(), level: 0, parentKey: '' };
|
|
1277
1230
|
}
|
|
1278
1231
|
this.focusedOptionInfo.set(focusedOptionInfo);
|
|
1279
1232
|
isFocus && focus(this.focusInputViewChild().nativeElement);
|
|
1280
1233
|
}
|
|
1281
1234
|
clear(event) {
|
|
1282
|
-
if (isNotEmpty(this.modelValue()) && this.showClear) {
|
|
1235
|
+
if (isNotEmpty(this.modelValue()) && this.showClear()) {
|
|
1283
1236
|
this.updateModel(null);
|
|
1284
1237
|
this.focusedOptionInfo.set({ index: -1, level: 0, parentKey: '' });
|
|
1285
1238
|
this.activeOptionPath.set([]);
|
|
@@ -1288,19 +1241,19 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1288
1241
|
event && event.stopPropagation();
|
|
1289
1242
|
}
|
|
1290
1243
|
getOptionLabel(option) {
|
|
1291
|
-
return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option;
|
|
1244
|
+
return this.optionLabel() ? resolveFieldData(option, this.optionLabel()) : option;
|
|
1292
1245
|
}
|
|
1293
1246
|
getOptionValue(option) {
|
|
1294
|
-
return this.optionValue ? resolveFieldData(option, this.optionValue) : option;
|
|
1247
|
+
return this.optionValue() ? resolveFieldData(option, this.optionValue()) : option;
|
|
1295
1248
|
}
|
|
1296
1249
|
getOptionGroupLabel(optionGroup) {
|
|
1297
|
-
return this.optionGroupLabel ? resolveFieldData(optionGroup, this.optionGroupLabel) : null;
|
|
1250
|
+
return this.optionGroupLabel() ? resolveFieldData(optionGroup, this.optionGroupLabel()) : null;
|
|
1298
1251
|
}
|
|
1299
1252
|
getOptionGroupChildren(optionGroup, level) {
|
|
1300
|
-
return resolveFieldData(optionGroup, this.optionGroupChildren?.[level]);
|
|
1253
|
+
return resolveFieldData(optionGroup, this.optionGroupChildren()?.[level]);
|
|
1301
1254
|
}
|
|
1302
1255
|
isOptionGroup(option, level) {
|
|
1303
|
-
return Object.prototype.hasOwnProperty.call(option, this.optionGroupChildren?.[level]);
|
|
1256
|
+
return Object.prototype.hasOwnProperty.call(option, this.optionGroupChildren()?.[level]);
|
|
1304
1257
|
}
|
|
1305
1258
|
isProccessedOptionGroup(processedOption) {
|
|
1306
1259
|
return isNotEmpty(processedOption?.children);
|
|
@@ -1311,6 +1264,15 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1311
1264
|
}
|
|
1312
1265
|
constructor() {
|
|
1313
1266
|
super();
|
|
1267
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
|
|
1268
|
+
let optionsBound = false;
|
|
1269
|
+
effect(() => {
|
|
1270
|
+
this.options();
|
|
1271
|
+
if (optionsBound) {
|
|
1272
|
+
untracked(() => this.updateModel(null));
|
|
1273
|
+
}
|
|
1274
|
+
optionsBound = true;
|
|
1275
|
+
});
|
|
1314
1276
|
effect(() => {
|
|
1315
1277
|
const activeOptionPath = this.activeOptionPath();
|
|
1316
1278
|
if (isNotEmpty(activeOptionPath)) {
|
|
@@ -1318,11 +1280,10 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1318
1280
|
}
|
|
1319
1281
|
});
|
|
1320
1282
|
}
|
|
1321
|
-
query
|
|
1283
|
+
query = signal(undefined, /* @ts-ignore */
|
|
1284
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
1322
1285
|
queryMatches = signal(false, /* @ts-ignore */
|
|
1323
1286
|
...(ngDevMode ? [{ debugName: "queryMatches" }] : /* istanbul ignore next */ []));
|
|
1324
|
-
mobileActive = signal(false, /* @ts-ignore */
|
|
1325
|
-
...(ngDevMode ? [{ debugName: "mobileActive" }] : /* istanbul ignore next */ []));
|
|
1326
1287
|
onOptionChange(event) {
|
|
1327
1288
|
const { processedOption, type } = event;
|
|
1328
1289
|
if (isEmpty(processedOption))
|
|
@@ -1367,51 +1328,49 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1367
1328
|
isFocus && focus(this.focusInputViewChild().nativeElement);
|
|
1368
1329
|
}
|
|
1369
1330
|
onOptionMouseEnter(event) {
|
|
1370
|
-
if (this.focusOnHover) {
|
|
1371
|
-
if (this.dirty || (!this.dirty && isNotEmpty(this.modelValue()))) {
|
|
1331
|
+
if (this.focusOnHover()) {
|
|
1332
|
+
if (this.dirty() || (!this.dirty() && isNotEmpty(this.modelValue()))) {
|
|
1372
1333
|
this.onOptionChange({ ...event, type: 'hover' });
|
|
1373
1334
|
}
|
|
1374
|
-
else if (!this.dirty && event.processedOption.level === 0) {
|
|
1335
|
+
else if (!this.dirty() && event.processedOption.level === 0) {
|
|
1375
1336
|
this.onOptionClick({ ...event, type: 'hover' });
|
|
1376
1337
|
}
|
|
1377
1338
|
}
|
|
1378
1339
|
}
|
|
1379
1340
|
onOptionMouseMove(event) {
|
|
1380
|
-
if (this.focused && this.focusOnHover) {
|
|
1341
|
+
if (this.focused() && this.focusOnHover()) {
|
|
1381
1342
|
this.changeFocusedOptionIndex(event, event.processedOption.index);
|
|
1382
1343
|
}
|
|
1383
1344
|
}
|
|
1384
1345
|
onInit() {
|
|
1385
|
-
this.id = this.id || uuid('pn_id_');
|
|
1386
1346
|
this.autoUpdateModel();
|
|
1387
1347
|
this.bindMatchMediaListener();
|
|
1388
1348
|
}
|
|
1389
1349
|
onAfterViewInit() {
|
|
1390
|
-
this.initialized
|
|
1350
|
+
this.initialized.set(true);
|
|
1391
1351
|
}
|
|
1392
1352
|
bindMatchMediaListener() {
|
|
1393
|
-
if (!this.matchMediaListener) {
|
|
1353
|
+
if (!this.matchMediaListener()) {
|
|
1394
1354
|
const window = this.document.defaultView;
|
|
1395
1355
|
if (window && window.matchMedia) {
|
|
1396
|
-
const query = window.matchMedia(`(max-width: ${this.breakpoint})`);
|
|
1397
|
-
this.query
|
|
1356
|
+
const query = window.matchMedia(`(max-width: ${this.breakpoint()})`);
|
|
1357
|
+
this.query.set(query);
|
|
1398
1358
|
this.queryMatches.set(query?.matches);
|
|
1399
|
-
this.matchMediaListener
|
|
1359
|
+
this.matchMediaListener.set(() => {
|
|
1400
1360
|
this.queryMatches.set(query?.matches);
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
this.query.addEventListener('change', this.matchMediaListener);
|
|
1361
|
+
});
|
|
1362
|
+
this.query().addEventListener('change', this.matchMediaListener());
|
|
1404
1363
|
}
|
|
1405
1364
|
}
|
|
1406
1365
|
}
|
|
1407
1366
|
unbindMatchMediaListener() {
|
|
1408
|
-
if (this.matchMediaListener) {
|
|
1409
|
-
this.query.removeEventListener('change', this.matchMediaListener);
|
|
1410
|
-
this.matchMediaListener
|
|
1367
|
+
if (this.matchMediaListener()) {
|
|
1368
|
+
this.query().removeEventListener('change', this.matchMediaListener());
|
|
1369
|
+
this.matchMediaListener.set(null);
|
|
1411
1370
|
}
|
|
1412
1371
|
}
|
|
1413
1372
|
onOverlayAfterLeave() {
|
|
1414
|
-
this.dirty
|
|
1373
|
+
this.dirty.set(false);
|
|
1415
1374
|
}
|
|
1416
1375
|
/**
|
|
1417
1376
|
* @override
|
|
@@ -1420,17 +1379,19 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1420
1379
|
* Writes the value to the control.
|
|
1421
1380
|
*/
|
|
1422
1381
|
writeControlValue(value, setModelValue) {
|
|
1423
|
-
this.value
|
|
1382
|
+
this.value.set(value);
|
|
1424
1383
|
setModelValue(value);
|
|
1425
|
-
this.cd.markForCheck();
|
|
1426
1384
|
}
|
|
1427
1385
|
onDestroy() {
|
|
1428
|
-
if (this.matchMediaListener) {
|
|
1386
|
+
if (this.matchMediaListener()) {
|
|
1429
1387
|
this.unbindMatchMediaListener();
|
|
1430
1388
|
}
|
|
1389
|
+
if (this.searchTimeout()) {
|
|
1390
|
+
clearTimeout(this.searchTimeout());
|
|
1391
|
+
}
|
|
1431
1392
|
}
|
|
1432
1393
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: CascadeSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1433
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: CascadeSelect, isStandalone: true, selector: "p-cascadeSelect, p-cascadeselect, p-cascade-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal:
|
|
1394
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: CascadeSelect, isStandalone: true, selector: "p-cascadeSelect, p-cascadeselect, p-cascade-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, searchMessage: { classPropertyName: "searchMessage", publicName: "searchMessage", isSignal: true, isRequired: false, transformFunction: null }, selectionMessage: { classPropertyName: "selectionMessage", publicName: "selectionMessage", isSignal: true, isRequired: false, transformFunction: null }, emptySearchMessage: { classPropertyName: "emptySearchMessage", publicName: "emptySearchMessage", isSignal: true, isRequired: false, transformFunction: null }, emptySelectionMessage: { classPropertyName: "emptySelectionMessage", publicName: "emptySelectionMessage", 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 }, selectOnFocus: { classPropertyName: "selectOnFocus", publicName: "selectOnFocus", isSignal: true, isRequired: false, transformFunction: null }, autoOptionFocus: { classPropertyName: "autoOptionFocus", publicName: "autoOptionFocus", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", 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 }, optionGroupLabel: { classPropertyName: "optionGroupLabel", publicName: "optionGroupLabel", isSignal: true, isRequired: false, transformFunction: null }, optionGroupChildren: { classPropertyName: "optionGroupChildren", publicName: "optionGroupChildren", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, dataKey: { classPropertyName: "dataKey", publicName: "dataKey", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, panelStyleClass: { classPropertyName: "panelStyleClass", publicName: "panelStyleClass", isSignal: true, isRequired: false, transformFunction: null }, panelStyle: { classPropertyName: "panelStyle", publicName: "panelStyle", isSignal: true, isRequired: false, transformFunction: null }, overlayOptions: { classPropertyName: "overlayOptions", publicName: "overlayOptions", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", 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: { value: "valueChange", onChange: "onChange", onGroupChange: "onGroupChange", onShow: "onShow", onHide: "onHide", onClear: "onClear", onBeforeShow: "onBeforeShow", onBeforeHide: "onBeforeHide", onFocus: "onFocus", onBlur: "onBlur" }, host: { listeners: { "mousedown": "onHostClick($event)" }, properties: { "class": "cx('root')", "style": "sx('root')" } }, providers: [CASCADESELECT_VALUE_ACCESSOR, CascadeSelectStyle, { provide: PARENT_INSTANCE, useExisting: CascadeSelect }, { provide: CASCADESELECT_INSTANCE, useExisting: CascadeSelect }], queries: [{ propertyName: "valueTemplate", first: true, predicate: ["value"], isSignal: true }, { propertyName: "optionTemplate", first: true, predicate: ["option"], isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ["header"], isSignal: true }, { propertyName: "footerTemplate", first: true, predicate: ["footer"], isSignal: true }, { propertyName: "triggerIconTemplate", first: true, predicate: ["triggericon"], isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], isSignal: true }, { propertyName: "groupIconTemplate", first: true, predicate: ["optiongroupicon"], isSignal: true }, { propertyName: "clearIconTemplate", first: true, predicate: ["clearicon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "focusInputViewChild", first: true, predicate: ["focusInput"], descendants: true, isSignal: true }, { propertyName: "panelViewChild", first: true, predicate: ["panel"], descendants: true, isSignal: true }, { propertyName: "overlayViewChild", first: true, predicate: ["overlay"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i2.Bind }], ngImport: i0, template: `
|
|
1434
1395
|
<div class="p-hidden-accessible" [pBind]="ptm('hiddenInputWrapper')">
|
|
1435
1396
|
<input
|
|
1436
1397
|
#focusInput
|
|
@@ -1440,73 +1401,73 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1440
1401
|
[attr.name]="name()"
|
|
1441
1402
|
[attr.required]="required() ? '' : undefined"
|
|
1442
1403
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
1443
|
-
[attr.placeholder]="placeholder"
|
|
1444
|
-
[attr.tabindex]="!$disabled() ? tabindex : -1"
|
|
1445
|
-
[attr.id]="inputId"
|
|
1446
|
-
[attr.aria-label]="ariaLabel"
|
|
1447
|
-
[attr.aria-labelledby]="ariaLabelledBy"
|
|
1404
|
+
[attr.placeholder]="placeholder()"
|
|
1405
|
+
[attr.tabindex]="!$disabled() ? tabindex() : -1"
|
|
1406
|
+
[attr.id]="inputId()"
|
|
1407
|
+
[attr.aria-label]="ariaLabel()"
|
|
1408
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1448
1409
|
[attr.aria-haspopup]="'tree'"
|
|
1449
|
-
[attr.aria-expanded]="overlayVisible ?? false"
|
|
1450
|
-
[attr.aria-controls]="overlayVisible ?
|
|
1451
|
-
[attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
|
|
1410
|
+
[attr.aria-expanded]="overlayVisible() ?? false"
|
|
1411
|
+
[attr.aria-controls]="overlayVisible() ? _id() + '_tree' : null"
|
|
1412
|
+
[attr.aria-activedescendant]="focused() ? focusedOptionId() : undefined"
|
|
1452
1413
|
(focus)="onInputFocus($event)"
|
|
1453
1414
|
(blur)="onInputBlur($event)"
|
|
1454
1415
|
(keydown)="onInputKeyDown($event)"
|
|
1455
|
-
[pAutoFocus]="autofocus"
|
|
1416
|
+
[pAutoFocus]="autofocus()"
|
|
1456
1417
|
[pBind]="ptm('hiddenInput')"
|
|
1457
1418
|
/>
|
|
1458
1419
|
</div>
|
|
1459
1420
|
<span [class]="cx('label')" [pBind]="ptm('label')">
|
|
1460
|
-
@if (valueTemplate() || _valueTemplate) {
|
|
1461
|
-
<ng-container *ngTemplateOutlet="valueTemplate() || _valueTemplate; context: { $implicit: value, placeholder: placeholder }"></ng-container>
|
|
1421
|
+
@if (valueTemplate() || _valueTemplate()) {
|
|
1422
|
+
<ng-container *ngTemplateOutlet="valueTemplate() || _valueTemplate(); context: { $implicit: value(), placeholder: placeholder() }"></ng-container>
|
|
1462
1423
|
} @else {
|
|
1463
1424
|
{{ label() }}
|
|
1464
1425
|
}
|
|
1465
1426
|
</span>
|
|
1466
1427
|
|
|
1467
|
-
@if ($filled() && !$disabled() && showClear) {
|
|
1468
|
-
@if (!clearIconTemplate() && !_clearIconTemplate) {
|
|
1428
|
+
@if ($filled() && !$disabled() && showClear()) {
|
|
1429
|
+
@if (!clearIconTemplate() && !_clearIconTemplate()) {
|
|
1469
1430
|
<svg data-p-icon="times" [class]="cx('clearIcon')" (click)="clear($event)" [pBind]="ptm('clearIcon')" [attr.aria-hidden]="true" />
|
|
1470
1431
|
}
|
|
1471
|
-
@if (clearIconTemplate() || _clearIconTemplate) {
|
|
1432
|
+
@if (clearIconTemplate() || _clearIconTemplate()) {
|
|
1472
1433
|
<span [class]="cx('clearIcon')" (click)="clear($event)" [pBind]="ptm('clearIcon')" [attr.aria-hidden]="true">
|
|
1473
|
-
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
|
|
1434
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
|
|
1474
1435
|
</span>
|
|
1475
1436
|
}
|
|
1476
1437
|
}
|
|
1477
1438
|
|
|
1478
|
-
<div [class]="cx('dropdown')" role="button" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible ?? false" [pBind]="ptm('dropdown')" [attr.aria-hidden]="true">
|
|
1479
|
-
@if (loading) {
|
|
1480
|
-
@if (loadingIconTemplate() || _loadingIconTemplate) {
|
|
1481
|
-
<ng-container *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate"></ng-container>
|
|
1439
|
+
<div [class]="cx('dropdown')" role="button" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible() ?? false" [pBind]="ptm('dropdown')" [attr.aria-hidden]="true">
|
|
1440
|
+
@if (loading()) {
|
|
1441
|
+
@if (loadingIconTemplate() || _loadingIconTemplate()) {
|
|
1442
|
+
<ng-container *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate()"></ng-container>
|
|
1482
1443
|
}
|
|
1483
|
-
@if (!loadingIconTemplate() && !_loadingIconTemplate) {
|
|
1484
|
-
@if (loadingIcon) {
|
|
1485
|
-
<span [class]="cn(cx('loadingIcon'), loadingIcon + 'pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1444
|
+
@if (!loadingIconTemplate() && !_loadingIconTemplate()) {
|
|
1445
|
+
@if (loadingIcon()) {
|
|
1446
|
+
<span [class]="cn(cx('loadingIcon'), loadingIcon() + 'pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1486
1447
|
}
|
|
1487
|
-
@if (!loadingIcon) {
|
|
1488
|
-
<span [class]="cn(cx('loadingIcon'), loadingIcon + ' pi pi-spinner pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1448
|
+
@if (!loadingIcon()) {
|
|
1449
|
+
<span [class]="cn(cx('loadingIcon'), loadingIcon() + ' pi pi-spinner pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1489
1450
|
}
|
|
1490
1451
|
}
|
|
1491
1452
|
} @else {
|
|
1492
|
-
@if (!triggerIconTemplate() && !_triggerIconTemplate) {
|
|
1453
|
+
@if (!triggerIconTemplate() && !_triggerIconTemplate()) {
|
|
1493
1454
|
<svg data-p-icon="chevron-down" [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')" />
|
|
1494
1455
|
}
|
|
1495
|
-
@if (triggerIconTemplate() || _triggerIconTemplate) {
|
|
1456
|
+
@if (triggerIconTemplate() || _triggerIconTemplate()) {
|
|
1496
1457
|
<span [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')">
|
|
1497
|
-
<ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate"></ng-template>
|
|
1458
|
+
<ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate()"></ng-template>
|
|
1498
1459
|
</span>
|
|
1499
1460
|
}
|
|
1500
1461
|
}
|
|
1501
1462
|
</div>
|
|
1502
1463
|
<span role="status" aria-live="polite" class="p-hidden-accessible" [pBind]="ptm('hiddenSearchResult')">
|
|
1503
|
-
{{ searchResultMessageText }}
|
|
1464
|
+
{{ searchResultMessageText() }}
|
|
1504
1465
|
</span>
|
|
1505
1466
|
<p-overlay
|
|
1506
1467
|
#overlay
|
|
1507
1468
|
[hostAttrSelector]="$attrSelector"
|
|
1508
1469
|
[(visible)]="overlayVisible"
|
|
1509
|
-
[options]="overlayOptions"
|
|
1470
|
+
[options]="overlayOptions()"
|
|
1510
1471
|
[target]="'@parent'"
|
|
1511
1472
|
[appendTo]="$appendTo()"
|
|
1512
1473
|
[unstyled]="unstyled()"
|
|
@@ -1519,51 +1480,47 @@ class CascadeSelect extends BaseEditableHolder {
|
|
|
1519
1480
|
(onHide)="hide($event)"
|
|
1520
1481
|
>
|
|
1521
1482
|
<ng-template #content>
|
|
1522
|
-
<div #panel [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle" [pBind]="ptm('overlay')">
|
|
1523
|
-
<ng-template *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-template>
|
|
1483
|
+
<div #panel [class]="cn(cx('overlay'), panelStyleClass())" [ngStyle]="panelStyle()" [pBind]="ptm('overlay')">
|
|
1484
|
+
<ng-template *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-template>
|
|
1524
1485
|
<div [class]="cx('listContainer')" [pBind]="ptm('listContainer')">
|
|
1525
1486
|
<ul
|
|
1526
1487
|
pCascadeSelectSub
|
|
1527
1488
|
[class]="cx('list')"
|
|
1528
|
-
[options]="processedOptions"
|
|
1529
|
-
[selectId]="
|
|
1530
|
-
[focusedOptionId]="focused ? focusedOptionId : undefined"
|
|
1489
|
+
[options]="processedOptions()"
|
|
1490
|
+
[selectId]="_id()"
|
|
1491
|
+
[focusedOptionId]="focused() ? focusedOptionId() : undefined"
|
|
1531
1492
|
[activeOptionPath]="activeOptionPath()"
|
|
1532
|
-
[optionLabel]="optionLabel"
|
|
1533
|
-
[optionValue]="optionValue"
|
|
1493
|
+
[optionLabel]="optionLabel()"
|
|
1534
1494
|
[level]="0"
|
|
1535
|
-
[optionTemplate]="optionTemplate() || _optionTemplate"
|
|
1536
|
-
[groupicon]="groupIconTemplate() ||
|
|
1537
|
-
[optionGroupLabel]="optionGroupLabel"
|
|
1538
|
-
[
|
|
1539
|
-
[optionDisabled]="optionDisabled"
|
|
1495
|
+
[optionTemplate]="optionTemplate() || _optionTemplate()"
|
|
1496
|
+
[groupicon]="groupIconTemplate() || _groupIconTemplate()"
|
|
1497
|
+
[optionGroupLabel]="optionGroupLabel()"
|
|
1498
|
+
[optionDisabled]="optionDisabled()"
|
|
1540
1499
|
[root]="true"
|
|
1541
1500
|
(onChange)="onOptionClick($event)"
|
|
1542
1501
|
(onFocusChange)="onOptionMouseMove($event)"
|
|
1543
1502
|
(onFocusEnterChange)="onOptionMouseEnter($event)"
|
|
1544
|
-
[dirty]="dirty"
|
|
1545
1503
|
[attr.role]="'tree'"
|
|
1546
1504
|
[attr.aria-orientation]="'horizontal'"
|
|
1547
1505
|
[pBind]="ptm('list')"
|
|
1548
|
-
[attr.aria-label]="listLabel"
|
|
1549
|
-
[pt]="pt"
|
|
1506
|
+
[attr.aria-label]="listLabel()"
|
|
1507
|
+
[pt]="pt()"
|
|
1550
1508
|
[unstyled]="unstyled()"
|
|
1551
1509
|
></ul>
|
|
1552
1510
|
</div>
|
|
1553
1511
|
<span role="status" aria-live="polite" class="p-hidden-accessible" [pBind]="ptm('selectedMessageText')">
|
|
1554
|
-
{{ selectedMessageText }}
|
|
1512
|
+
{{ selectedMessageText() }}
|
|
1555
1513
|
</span>
|
|
1556
|
-
<ng-template *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-template>
|
|
1514
|
+
<ng-template *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-template>
|
|
1557
1515
|
</div>
|
|
1558
1516
|
</ng-template>
|
|
1559
1517
|
</p-overlay>
|
|
1560
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: CascadeSelectSub, selector: "ul[pCascadeSelectSub]", inputs: ["selectId", "activeOptionPath", "optionDisabled", "focusedOptionId", "options", "
|
|
1518
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: Overlay, selector: "p-overlay", inputs: ["hostName", "visible", "mode", "style", "styleClass", "contentStyle", "contentStyleClass", "target", "autoZIndex", "baseZIndex", "listener", "responsive", "options", "appendTo", "inline", "motionOptions", "hostAttrSelector"], outputs: ["visibleChange", "onBeforeShow", "onShow", "onBeforeHide", "onHide", "onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"] }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: CascadeSelectSub, selector: "ul[pCascadeSelectSub]", inputs: ["selectId", "activeOptionPath", "optionDisabled", "focusedOptionId", "options", "optionTemplate", "groupicon", "level", "optionLabel", "optionGroupLabel", "root"], outputs: ["onChange", "onFocusChange", "onFocusEnterChange"] }, { kind: "component", type: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: TimesIcon, selector: "[data-p-icon=\"times\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1561
1519
|
}
|
|
1562
1520
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: CascadeSelect, decorators: [{
|
|
1563
1521
|
type: Component,
|
|
1564
1522
|
args: [{
|
|
1565
1523
|
selector: 'p-cascadeSelect, p-cascadeselect, p-cascade-select',
|
|
1566
|
-
standalone: true,
|
|
1567
1524
|
imports: [CommonModule, Overlay, AutoFocus, CascadeSelectSub, ChevronDownIcon, TimesIcon, SharedModule, Bind],
|
|
1568
1525
|
template: `
|
|
1569
1526
|
<div class="p-hidden-accessible" [pBind]="ptm('hiddenInputWrapper')">
|
|
@@ -1575,73 +1532,73 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1575
1532
|
[attr.name]="name()"
|
|
1576
1533
|
[attr.required]="required() ? '' : undefined"
|
|
1577
1534
|
[attr.disabled]="$disabled() ? '' : undefined"
|
|
1578
|
-
[attr.placeholder]="placeholder"
|
|
1579
|
-
[attr.tabindex]="!$disabled() ? tabindex : -1"
|
|
1580
|
-
[attr.id]="inputId"
|
|
1581
|
-
[attr.aria-label]="ariaLabel"
|
|
1582
|
-
[attr.aria-labelledby]="ariaLabelledBy"
|
|
1535
|
+
[attr.placeholder]="placeholder()"
|
|
1536
|
+
[attr.tabindex]="!$disabled() ? tabindex() : -1"
|
|
1537
|
+
[attr.id]="inputId()"
|
|
1538
|
+
[attr.aria-label]="ariaLabel()"
|
|
1539
|
+
[attr.aria-labelledby]="ariaLabelledBy()"
|
|
1583
1540
|
[attr.aria-haspopup]="'tree'"
|
|
1584
|
-
[attr.aria-expanded]="overlayVisible ?? false"
|
|
1585
|
-
[attr.aria-controls]="overlayVisible ?
|
|
1586
|
-
[attr.aria-activedescendant]="focused ? focusedOptionId : undefined"
|
|
1541
|
+
[attr.aria-expanded]="overlayVisible() ?? false"
|
|
1542
|
+
[attr.aria-controls]="overlayVisible() ? _id() + '_tree' : null"
|
|
1543
|
+
[attr.aria-activedescendant]="focused() ? focusedOptionId() : undefined"
|
|
1587
1544
|
(focus)="onInputFocus($event)"
|
|
1588
1545
|
(blur)="onInputBlur($event)"
|
|
1589
1546
|
(keydown)="onInputKeyDown($event)"
|
|
1590
|
-
[pAutoFocus]="autofocus"
|
|
1547
|
+
[pAutoFocus]="autofocus()"
|
|
1591
1548
|
[pBind]="ptm('hiddenInput')"
|
|
1592
1549
|
/>
|
|
1593
1550
|
</div>
|
|
1594
1551
|
<span [class]="cx('label')" [pBind]="ptm('label')">
|
|
1595
|
-
@if (valueTemplate() || _valueTemplate) {
|
|
1596
|
-
<ng-container *ngTemplateOutlet="valueTemplate() || _valueTemplate; context: { $implicit: value, placeholder: placeholder }"></ng-container>
|
|
1552
|
+
@if (valueTemplate() || _valueTemplate()) {
|
|
1553
|
+
<ng-container *ngTemplateOutlet="valueTemplate() || _valueTemplate(); context: { $implicit: value(), placeholder: placeholder() }"></ng-container>
|
|
1597
1554
|
} @else {
|
|
1598
1555
|
{{ label() }}
|
|
1599
1556
|
}
|
|
1600
1557
|
</span>
|
|
1601
1558
|
|
|
1602
|
-
@if ($filled() && !$disabled() && showClear) {
|
|
1603
|
-
@if (!clearIconTemplate() && !_clearIconTemplate) {
|
|
1559
|
+
@if ($filled() && !$disabled() && showClear()) {
|
|
1560
|
+
@if (!clearIconTemplate() && !_clearIconTemplate()) {
|
|
1604
1561
|
<svg data-p-icon="times" [class]="cx('clearIcon')" (click)="clear($event)" [pBind]="ptm('clearIcon')" [attr.aria-hidden]="true" />
|
|
1605
1562
|
}
|
|
1606
|
-
@if (clearIconTemplate() || _clearIconTemplate) {
|
|
1563
|
+
@if (clearIconTemplate() || _clearIconTemplate()) {
|
|
1607
1564
|
<span [class]="cx('clearIcon')" (click)="clear($event)" [pBind]="ptm('clearIcon')" [attr.aria-hidden]="true">
|
|
1608
|
-
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate"></ng-template>
|
|
1565
|
+
<ng-template *ngTemplateOutlet="clearIconTemplate() || _clearIconTemplate()"></ng-template>
|
|
1609
1566
|
</span>
|
|
1610
1567
|
}
|
|
1611
1568
|
}
|
|
1612
1569
|
|
|
1613
|
-
<div [class]="cx('dropdown')" role="button" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible ?? false" [pBind]="ptm('dropdown')" [attr.aria-hidden]="true">
|
|
1614
|
-
@if (loading) {
|
|
1615
|
-
@if (loadingIconTemplate() || _loadingIconTemplate) {
|
|
1616
|
-
<ng-container *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate"></ng-container>
|
|
1570
|
+
<div [class]="cx('dropdown')" role="button" aria-haspopup="listbox" [attr.aria-expanded]="overlayVisible() ?? false" [pBind]="ptm('dropdown')" [attr.aria-hidden]="true">
|
|
1571
|
+
@if (loading()) {
|
|
1572
|
+
@if (loadingIconTemplate() || _loadingIconTemplate()) {
|
|
1573
|
+
<ng-container *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate()"></ng-container>
|
|
1617
1574
|
}
|
|
1618
|
-
@if (!loadingIconTemplate() && !_loadingIconTemplate) {
|
|
1619
|
-
@if (loadingIcon) {
|
|
1620
|
-
<span [class]="cn(cx('loadingIcon'), loadingIcon + 'pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1575
|
+
@if (!loadingIconTemplate() && !_loadingIconTemplate()) {
|
|
1576
|
+
@if (loadingIcon()) {
|
|
1577
|
+
<span [class]="cn(cx('loadingIcon'), loadingIcon() + 'pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1621
1578
|
}
|
|
1622
|
-
@if (!loadingIcon) {
|
|
1623
|
-
<span [class]="cn(cx('loadingIcon'), loadingIcon + ' pi pi-spinner pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1579
|
+
@if (!loadingIcon()) {
|
|
1580
|
+
<span [class]="cn(cx('loadingIcon'), loadingIcon() + ' pi pi-spinner pi-spin')" aria-hidden="true" [pBind]="ptm('loadingIcon')"></span>
|
|
1624
1581
|
}
|
|
1625
1582
|
}
|
|
1626
1583
|
} @else {
|
|
1627
|
-
@if (!triggerIconTemplate() && !_triggerIconTemplate) {
|
|
1584
|
+
@if (!triggerIconTemplate() && !_triggerIconTemplate()) {
|
|
1628
1585
|
<svg data-p-icon="chevron-down" [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')" />
|
|
1629
1586
|
}
|
|
1630
|
-
@if (triggerIconTemplate() || _triggerIconTemplate) {
|
|
1587
|
+
@if (triggerIconTemplate() || _triggerIconTemplate()) {
|
|
1631
1588
|
<span [class]="cx('dropdownIcon')" [pBind]="ptm('dropdownIcon')">
|
|
1632
|
-
<ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate"></ng-template>
|
|
1589
|
+
<ng-template *ngTemplateOutlet="triggerIconTemplate() || _triggerIconTemplate()"></ng-template>
|
|
1633
1590
|
</span>
|
|
1634
1591
|
}
|
|
1635
1592
|
}
|
|
1636
1593
|
</div>
|
|
1637
1594
|
<span role="status" aria-live="polite" class="p-hidden-accessible" [pBind]="ptm('hiddenSearchResult')">
|
|
1638
|
-
{{ searchResultMessageText }}
|
|
1595
|
+
{{ searchResultMessageText() }}
|
|
1639
1596
|
</span>
|
|
1640
1597
|
<p-overlay
|
|
1641
1598
|
#overlay
|
|
1642
1599
|
[hostAttrSelector]="$attrSelector"
|
|
1643
1600
|
[(visible)]="overlayVisible"
|
|
1644
|
-
[options]="overlayOptions"
|
|
1601
|
+
[options]="overlayOptions()"
|
|
1645
1602
|
[target]="'@parent'"
|
|
1646
1603
|
[appendTo]="$appendTo()"
|
|
1647
1604
|
[unstyled]="unstyled()"
|
|
@@ -1654,41 +1611,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1654
1611
|
(onHide)="hide($event)"
|
|
1655
1612
|
>
|
|
1656
1613
|
<ng-template #content>
|
|
1657
|
-
<div #panel [class]="cn(cx('overlay'), panelStyleClass)" [ngStyle]="panelStyle" [pBind]="ptm('overlay')">
|
|
1658
|
-
<ng-template *ngTemplateOutlet="headerTemplate() || _headerTemplate"></ng-template>
|
|
1614
|
+
<div #panel [class]="cn(cx('overlay'), panelStyleClass())" [ngStyle]="panelStyle()" [pBind]="ptm('overlay')">
|
|
1615
|
+
<ng-template *ngTemplateOutlet="headerTemplate() || _headerTemplate()"></ng-template>
|
|
1659
1616
|
<div [class]="cx('listContainer')" [pBind]="ptm('listContainer')">
|
|
1660
1617
|
<ul
|
|
1661
1618
|
pCascadeSelectSub
|
|
1662
1619
|
[class]="cx('list')"
|
|
1663
|
-
[options]="processedOptions"
|
|
1664
|
-
[selectId]="
|
|
1665
|
-
[focusedOptionId]="focused ? focusedOptionId : undefined"
|
|
1620
|
+
[options]="processedOptions()"
|
|
1621
|
+
[selectId]="_id()"
|
|
1622
|
+
[focusedOptionId]="focused() ? focusedOptionId() : undefined"
|
|
1666
1623
|
[activeOptionPath]="activeOptionPath()"
|
|
1667
|
-
[optionLabel]="optionLabel"
|
|
1668
|
-
[optionValue]="optionValue"
|
|
1624
|
+
[optionLabel]="optionLabel()"
|
|
1669
1625
|
[level]="0"
|
|
1670
|
-
[optionTemplate]="optionTemplate() || _optionTemplate"
|
|
1671
|
-
[groupicon]="groupIconTemplate() ||
|
|
1672
|
-
[optionGroupLabel]="optionGroupLabel"
|
|
1673
|
-
[
|
|
1674
|
-
[optionDisabled]="optionDisabled"
|
|
1626
|
+
[optionTemplate]="optionTemplate() || _optionTemplate()"
|
|
1627
|
+
[groupicon]="groupIconTemplate() || _groupIconTemplate()"
|
|
1628
|
+
[optionGroupLabel]="optionGroupLabel()"
|
|
1629
|
+
[optionDisabled]="optionDisabled()"
|
|
1675
1630
|
[root]="true"
|
|
1676
1631
|
(onChange)="onOptionClick($event)"
|
|
1677
1632
|
(onFocusChange)="onOptionMouseMove($event)"
|
|
1678
1633
|
(onFocusEnterChange)="onOptionMouseEnter($event)"
|
|
1679
|
-
[dirty]="dirty"
|
|
1680
1634
|
[attr.role]="'tree'"
|
|
1681
1635
|
[attr.aria-orientation]="'horizontal'"
|
|
1682
1636
|
[pBind]="ptm('list')"
|
|
1683
|
-
[attr.aria-label]="listLabel"
|
|
1684
|
-
[pt]="pt"
|
|
1637
|
+
[attr.aria-label]="listLabel()"
|
|
1638
|
+
[pt]="pt()"
|
|
1685
1639
|
[unstyled]="unstyled()"
|
|
1686
1640
|
></ul>
|
|
1687
1641
|
</div>
|
|
1688
1642
|
<span role="status" aria-live="polite" class="p-hidden-accessible" [pBind]="ptm('selectedMessageText')">
|
|
1689
|
-
{{ selectedMessageText }}
|
|
1643
|
+
{{ selectedMessageText() }}
|
|
1690
1644
|
</span>
|
|
1691
|
-
<ng-template *ngTemplateOutlet="footerTemplate() || _footerTemplate"></ng-template>
|
|
1645
|
+
<ng-template *ngTemplateOutlet="footerTemplate() || _footerTemplate()"></ng-template>
|
|
1692
1646
|
</div>
|
|
1693
1647
|
</ng-template>
|
|
1694
1648
|
</p-overlay>
|
|
@@ -1697,85 +1651,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1697
1651
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1698
1652
|
encapsulation: ViewEncapsulation.None,
|
|
1699
1653
|
host: {
|
|
1700
|
-
'[class]': "
|
|
1654
|
+
'[class]': "cx('root')",
|
|
1701
1655
|
'[style]': "sx('root')"
|
|
1702
1656
|
},
|
|
1703
1657
|
hostDirectives: [Bind]
|
|
1704
1658
|
}]
|
|
1705
|
-
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
1706
|
-
type: Input
|
|
1707
|
-
}], searchMessage: [{
|
|
1708
|
-
type: Input
|
|
1709
|
-
}], emptyMessage: [{
|
|
1710
|
-
type: Input
|
|
1711
|
-
}], selectionMessage: [{
|
|
1712
|
-
type: Input
|
|
1713
|
-
}], emptySearchMessage: [{
|
|
1714
|
-
type: Input
|
|
1715
|
-
}], emptySelectionMessage: [{
|
|
1716
|
-
type: Input
|
|
1717
|
-
}], searchLocale: [{
|
|
1718
|
-
type: Input
|
|
1719
|
-
}], optionDisabled: [{
|
|
1720
|
-
type: Input
|
|
1721
|
-
}], focusOnHover: [{
|
|
1722
|
-
type: Input,
|
|
1723
|
-
args: [{ transform: booleanAttribute }]
|
|
1724
|
-
}], selectOnFocus: [{
|
|
1725
|
-
type: Input,
|
|
1726
|
-
args: [{ transform: booleanAttribute }]
|
|
1727
|
-
}], autoOptionFocus: [{
|
|
1728
|
-
type: Input,
|
|
1729
|
-
args: [{ transform: booleanAttribute }]
|
|
1730
|
-
}], styleClass: [{
|
|
1731
|
-
type: Input
|
|
1732
|
-
}], options: [{
|
|
1733
|
-
type: Input
|
|
1734
|
-
}], optionLabel: [{
|
|
1735
|
-
type: Input
|
|
1736
|
-
}], optionValue: [{
|
|
1737
|
-
type: Input
|
|
1738
|
-
}], optionGroupLabel: [{
|
|
1739
|
-
type: Input
|
|
1740
|
-
}], optionGroupChildren: [{
|
|
1741
|
-
type: Input
|
|
1742
|
-
}], placeholder: [{
|
|
1743
|
-
type: Input
|
|
1744
|
-
}], value: [{
|
|
1745
|
-
type: Input
|
|
1746
|
-
}], dataKey: [{
|
|
1747
|
-
type: Input
|
|
1748
|
-
}], inputId: [{
|
|
1749
|
-
type: Input
|
|
1750
|
-
}], tabindex: [{
|
|
1751
|
-
type: Input,
|
|
1752
|
-
args: [{ transform: numberAttribute }]
|
|
1753
|
-
}], ariaLabelledBy: [{
|
|
1754
|
-
type: Input
|
|
1755
|
-
}], inputLabel: [{
|
|
1756
|
-
type: Input
|
|
1757
|
-
}], ariaLabel: [{
|
|
1758
|
-
type: Input
|
|
1759
|
-
}], showClear: [{
|
|
1760
|
-
type: Input,
|
|
1761
|
-
args: [{ transform: booleanAttribute }]
|
|
1762
|
-
}], panelStyleClass: [{
|
|
1763
|
-
type: Input
|
|
1764
|
-
}], panelStyle: [{
|
|
1765
|
-
type: Input
|
|
1766
|
-
}], overlayOptions: [{
|
|
1767
|
-
type: Input
|
|
1768
|
-
}], autofocus: [{
|
|
1769
|
-
type: Input,
|
|
1770
|
-
args: [{ transform: booleanAttribute }]
|
|
1771
|
-
}], loading: [{
|
|
1772
|
-
type: Input,
|
|
1773
|
-
args: [{ transform: booleanAttribute }]
|
|
1774
|
-
}], loadingIcon: [{
|
|
1775
|
-
type: Input
|
|
1776
|
-
}], breakpoint: [{
|
|
1777
|
-
type: Input
|
|
1778
|
-
}], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onGroupChange: [{ type: i0.Output, args: ["onGroupChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onBeforeShow: [{ type: i0.Output, args: ["onBeforeShow"] }], onBeforeHide: [{ type: i0.Output, args: ["onBeforeHide"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], focusInputViewChild: [{ type: i0.ViewChild, args: ['focusInput', { isSignal: true }] }], panelViewChild: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], overlayViewChild: [{ type: i0.ViewChild, args: ['overlay', { isSignal: true }] }], valueTemplate: [{ type: i0.ContentChild, args: ['value', { ...{ descendants: false }, isSignal: true }] }], optionTemplate: [{ type: i0.ContentChild, args: ['option', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], triggerIconTemplate: [{ type: i0.ContentChild, args: ['triggericon', { ...{ descendants: false }, isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { ...{ descendants: false }, isSignal: true }] }], groupIconTemplate: [{ type: i0.ContentChild, args: ['optiongroupicon', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], onHostClick: [{
|
|
1659
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], searchMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchMessage", required: false }] }], selectionMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMessage", required: false }] }], emptySearchMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptySearchMessage", required: false }] }], emptySelectionMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptySelectionMessage", 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 }] }], selectOnFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectOnFocus", required: false }] }], autoOptionFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOptionFocus", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], optionLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionLabel", required: false }] }], optionValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionValue", required: false }] }], optionGroupLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupLabel", required: false }] }], optionGroupChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionGroupChildren", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], dataKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataKey", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], showClear: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClear", required: false }] }], panelStyleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyleClass", required: false }] }], panelStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelStyle", required: false }] }], overlayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "overlayOptions", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], onGroupChange: [{ type: i0.Output, args: ["onGroupChange"] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onClear: [{ type: i0.Output, args: ["onClear"] }], onBeforeShow: [{ type: i0.Output, args: ["onBeforeShow"] }], onBeforeHide: [{ type: i0.Output, args: ["onBeforeHide"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], focusInputViewChild: [{ type: i0.ViewChild, args: ['focusInput', { isSignal: true }] }], panelViewChild: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], overlayViewChild: [{ type: i0.ViewChild, args: ['overlay', { isSignal: true }] }], valueTemplate: [{ type: i0.ContentChild, args: ['value', { ...{ descendants: false }, isSignal: true }] }], optionTemplate: [{ type: i0.ContentChild, args: ['option', { ...{ descendants: false }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: ['header', { ...{ descendants: false }, isSignal: true }] }], footerTemplate: [{ type: i0.ContentChild, args: ['footer', { ...{ descendants: false }, isSignal: true }] }], triggerIconTemplate: [{ type: i0.ContentChild, args: ['triggericon', { ...{ descendants: false }, isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { ...{ descendants: false }, isSignal: true }] }], groupIconTemplate: [{ type: i0.ContentChild, args: ['optiongroupicon', { ...{ descendants: false }, isSignal: true }] }], clearIconTemplate: [{ type: i0.ContentChild, args: ['clearicon', { ...{ descendants: false }, isSignal: true }] }], onHostClick: [{
|
|
1779
1660
|
type: HostListener,
|
|
1780
1661
|
args: ['mousedown', ['$event']]
|
|
1781
1662
|
}], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|