@exhaustive-ui/core 3.0.0-alpha.0 → 22.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
- package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
- package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-api.mjs +10 -17
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +786 -928
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
- package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
- package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
- package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
- package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
- package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
- package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-carousel.mjs +561 -599
- package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
- package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
- package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
- package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
- package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
- package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +227 -394
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +255 -266
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +585 -653
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
- package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-datepicker.mjs +1792 -1787
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +480 -577
- package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
- package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
- package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
- package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
- package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
- package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
- package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-fileupload.mjs +774 -745
- package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
- package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
- package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
- package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
- package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angledown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angledown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-angleup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-angleup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-ban.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-ban.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-bars.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-bars.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
- package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-blank.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-blank.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-calendar.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-calendar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-caretright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-caretright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-check.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-check.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-eye.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-eye.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filter.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-home.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-home.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-minus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-minus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-pencil.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-pencil.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-plus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-plus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-refresh.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-refresh.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-search.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-search.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-spinner.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-spinner.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-star.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-star.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-starfill.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-starfill.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-times.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-times.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-trash.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-trash.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-undo.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-undo.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-upload.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-upload.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
- package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
- package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inplace.mjs +68 -102
- package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
- package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
- package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
- package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
- package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
- package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
- package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
- package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
- package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
- package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-listbox.mjs +591 -728
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +324 -375
- package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
- package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
- package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
- package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-motion.mjs +2 -2
- package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-multiselect.mjs +945 -1045
- package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
- package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
- package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
- package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
- package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
- package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
- package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
- package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-picklist.mjs +861 -879
- package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
- package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
- package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
- package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
- package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
- package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-select.mjs +837 -986
- package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
- package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
- package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
- package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
- package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
- package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
- package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
- package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-table.mjs +2435 -2721
- package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
- package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
- package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +604 -690
- package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
- package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
- package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
- package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
- package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
- package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
- package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treeselect.mjs +333 -423
- package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
- package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
- package/package.json +11 -11
- package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
- package/schematics/migrations/renamed-inputs/migration.js +97 -0
- package/schematics/migrations/styleclass-to-class/migration.js +92 -1
- package/schematics/migrations.json +11 -6
- package/schematics/utils/removed-inputs.js +0 -0
- package/schematics/utils/renamed-inputs.js +175 -0
- package/schematics/utils/styleclass.js +24 -8
- package/schematics/utils/versions.json +8 -8
- package/types/exhaustive-ui-core-accordion.d.ts +8 -24
- package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
- package/types/exhaustive-ui-core-api.d.ts +2 -3
- package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
- package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
- package/types/exhaustive-ui-core-avatar.d.ts +18 -25
- package/types/exhaustive-ui-core-badge.d.ts +13 -27
- package/types/exhaustive-ui-core-blockui.d.ts +18 -30
- package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
- package/types/exhaustive-ui-core-button.d.ts +57 -89
- package/types/exhaustive-ui-core-carousel.d.ts +56 -82
- package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
- package/types/exhaustive-ui-core-chart.d.ts +21 -29
- package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
- package/types/exhaustive-ui-core-chip.d.ts +31 -38
- package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
- package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
- package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
- package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
- package/types/exhaustive-ui-core-dataview.d.ts +42 -65
- package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
- package/types/exhaustive-ui-core-dialog.d.ts +73 -123
- package/types/exhaustive-ui-core-dock.d.ts +16 -25
- package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
- package/types/exhaustive-ui-core-drawer.d.ts +32 -64
- package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
- package/types/exhaustive-ui-core-editor.d.ts +15 -25
- package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
- package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
- package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
- package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
- package/types/exhaustive-ui-core-galleria.d.ts +124 -194
- package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
- package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
- package/types/exhaustive-ui-core-image.d.ts +35 -68
- package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
- package/types/exhaustive-ui-core-inplace.d.ts +30 -42
- package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
- package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
- package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
- package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
- package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
- package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
- package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
- package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
- package/types/exhaustive-ui-core-knob.d.ts +45 -60
- package/types/exhaustive-ui-core-listbox.d.ts +90 -126
- package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
- package/types/exhaustive-ui-core-menu.d.ts +33 -53
- package/types/exhaustive-ui-core-menubar.d.ts +38 -85
- package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
- package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
- package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
- package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
- package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
- package/types/exhaustive-ui-core-paginator.d.ts +41 -69
- package/types/exhaustive-ui-core-panel.d.ts +18 -45
- package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
- package/types/exhaustive-ui-core-password.d.ts +56 -93
- package/types/exhaustive-ui-core-picklist.d.ts +107 -121
- package/types/exhaustive-ui-core-popover.d.ts +23 -47
- package/types/exhaustive-ui-core-rating.d.ts +18 -26
- package/types/exhaustive-ui-core-scroller.d.ts +90 -120
- package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
- package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
- package/types/exhaustive-ui-core-select.d.ts +137 -188
- package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
- package/types/exhaustive-ui-core-slider.d.ts +52 -67
- package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
- package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
- package/types/exhaustive-ui-core-splitter.d.ts +47 -59
- package/types/exhaustive-ui-core-steps.d.ts +24 -31
- package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
- package/types/exhaustive-ui-core-table.d.ts +349 -453
- package/types/exhaustive-ui-core-terminal.d.ts +10 -22
- package/types/exhaustive-ui-core-textarea.d.ts +7 -10
- package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
- package/types/exhaustive-ui-core-timeline.d.ts +20 -28
- package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
- package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
- package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
- package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
- package/types/exhaustive-ui-core-tree.d.ts +82 -119
- package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
- package/types/exhaustive-ui-core-treetable.d.ts +203 -280
- package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
|
@@ -2,7 +2,7 @@ export * from '@exhaustive-ui/core/types/menu';
|
|
|
2
2
|
import * as i1 from '@angular/common';
|
|
3
3
|
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable,
|
|
5
|
+
import { Injectable, inject, PLATFORM_ID, Pipe, input, output, ViewEncapsulation, ChangeDetectionStrategy, Component, booleanAttribute, numberAttribute, computed, viewChild, signal, afterEveryRender, contentChild, contentChildren, NgModule } from '@angular/core';
|
|
6
6
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
7
7
|
import * as i2 from '@angular/router';
|
|
8
8
|
import { RouterModule } from '@angular/router';
|
|
@@ -24,13 +24,13 @@ import { style } from '@exhaustive-ui/styles/menu';
|
|
|
24
24
|
import { BaseStyle } from '@exhaustive-ui/core/base';
|
|
25
25
|
|
|
26
26
|
const inlineStyles = {
|
|
27
|
-
root: ({ instance }) => ({ position: instance.popup ? 'absolute' : 'relative' })
|
|
27
|
+
root: ({ instance }) => ({ position: instance.popup() ? 'absolute' : 'relative' })
|
|
28
28
|
};
|
|
29
29
|
const classes = {
|
|
30
30
|
root: ({ instance }) => [
|
|
31
31
|
'p-menu p-component',
|
|
32
32
|
{
|
|
33
|
-
'p-menu-overlay': instance.popup
|
|
33
|
+
'p-menu-overlay': instance.popup()
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
start: 'p-menu-start',
|
|
@@ -119,7 +119,6 @@ var MenuClasses;
|
|
|
119
119
|
MenuClasses["itemLabel"] = "p-menu-item-label";
|
|
120
120
|
})(MenuClasses || (MenuClasses = {}));
|
|
121
121
|
|
|
122
|
-
const MENU_INSTANCE = new InjectionToken('MENU_INSTANCE');
|
|
123
122
|
class SafeHtmlPipe {
|
|
124
123
|
platformId = inject(PLATFORM_ID);
|
|
125
124
|
sanitizer = inject(DomSanitizer);
|
|
@@ -135,172 +134,161 @@ class SafeHtmlPipe {
|
|
|
135
134
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
136
135
|
type: Pipe,
|
|
137
136
|
args: [{
|
|
138
|
-
name: 'safeHtml'
|
|
139
|
-
standalone: true
|
|
137
|
+
name: 'safeHtml'
|
|
140
138
|
}]
|
|
141
139
|
}] });
|
|
142
140
|
class MenuItemContent extends BaseComponent {
|
|
143
|
-
item;
|
|
144
|
-
itemTemplate
|
|
141
|
+
item = input(undefined, { ...(ngDevMode ? { debugName: "item" } : /* istanbul ignore next */ {}), alias: 'pMenuItemContent' });
|
|
142
|
+
itemTemplate = input(undefined, /* @ts-ignore */
|
|
143
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
145
144
|
menuitemId = input('', /* @ts-ignore */
|
|
146
145
|
...(ngDevMode ? [{ debugName: "menuitemId" }] : /* istanbul ignore next */ []));
|
|
147
146
|
idx = input(0, /* @ts-ignore */
|
|
148
147
|
...(ngDevMode ? [{ debugName: "idx" }] : /* istanbul ignore next */ []));
|
|
149
148
|
onMenuItemClick = output();
|
|
150
|
-
menu;
|
|
149
|
+
menu = inject(Menu);
|
|
151
150
|
_componentStyle = inject(MenuStyle);
|
|
152
151
|
hostName = 'Menu';
|
|
153
|
-
constructor() {
|
|
154
|
-
const menu = inject(Menu);
|
|
155
|
-
super();
|
|
156
|
-
this.menu = menu;
|
|
157
|
-
}
|
|
158
152
|
onItemClick(event, item) {
|
|
159
153
|
this.onMenuItemClick.emit({ originalEvent: event, item });
|
|
160
154
|
}
|
|
161
155
|
getPTOptions(key) {
|
|
162
|
-
return this.menu.getPTOptions(key, this.item, this.idx(), this.menuitemId());
|
|
156
|
+
return this.menu.getPTOptions(key, this.item(), this.idx(), this.menuitemId());
|
|
163
157
|
}
|
|
164
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MenuItemContent, deps:
|
|
165
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: MenuItemContent, isStandalone: true, selector: "[pMenuItemContent]", inputs: { item: { classPropertyName: "item", publicName: "pMenuItemContent", isSignal:
|
|
166
|
-
@if (!itemTemplate) {
|
|
167
|
-
@if (!item?.routerLink) {
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MenuItemContent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: MenuItemContent, isStandalone: true, selector: "[pMenuItemContent]", inputs: { item: { classPropertyName: "item", publicName: "pMenuItemContent", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, menuitemId: { classPropertyName: "menuitemId", publicName: "menuitemId", isSignal: true, isRequired: false, transformFunction: null }, idx: { classPropertyName: "idx", publicName: "idx", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onMenuItemClick: "onMenuItemClick" }, providers: [MenuStyle], usesInheritance: true, ngImport: i0, template: ` <div [class]="cx('itemContent')" (click)="onItemClick($event, item())" [attr.data-pc-section]="'content'" [pBind]="getPTOptions('itemContent')">
|
|
160
|
+
@if (!itemTemplate()) {
|
|
161
|
+
@if (!item()?.routerLink) {
|
|
168
162
|
<a
|
|
169
|
-
[attr.title]="item.title"
|
|
170
|
-
[attr.href]="item.url || null"
|
|
171
|
-
[attr.data-automationid]="item.automationId"
|
|
163
|
+
[attr.title]="item().title"
|
|
164
|
+
[attr.href]="item().url || null"
|
|
165
|
+
[attr.data-automationid]="item().automationId"
|
|
172
166
|
[attr.tabindex]="-1"
|
|
173
|
-
[class]="cn(cx('itemLink'), item?.linkClass)"
|
|
174
|
-
[ngStyle]="item?.linkStyle"
|
|
175
|
-
[target]="item.target"
|
|
167
|
+
[class]="cn(cx('itemLink'), item()?.linkClass)"
|
|
168
|
+
[ngStyle]="item()?.linkStyle"
|
|
169
|
+
[target]="item().target"
|
|
176
170
|
[pBind]="getPTOptions('itemLink')"
|
|
177
171
|
pRipple
|
|
178
172
|
>
|
|
179
|
-
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
|
173
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item() }"></ng-container>
|
|
180
174
|
</a>
|
|
181
175
|
}
|
|
182
|
-
@if (item?.routerLink) {
|
|
176
|
+
@if (item()?.routerLink) {
|
|
183
177
|
<a
|
|
184
|
-
[routerLink]="item.routerLink"
|
|
185
|
-
[attr.data-automationid]="item.automationId"
|
|
178
|
+
[routerLink]="item().routerLink"
|
|
179
|
+
[attr.data-automationid]="item().automationId"
|
|
186
180
|
[attr.tabindex]="-1"
|
|
187
|
-
[attr.title]="item.title"
|
|
188
|
-
[queryParams]="item.queryParams"
|
|
181
|
+
[attr.title]="item().title"
|
|
182
|
+
[queryParams]="item().queryParams"
|
|
189
183
|
routerLinkActive="p-menu-item-link-active"
|
|
190
|
-
[routerLinkActiveOptions]="item.routerLinkActiveOptions || { exact: false }"
|
|
191
|
-
[class]="cn(cx('itemLink'), item?.linkClass)"
|
|
192
|
-
[ngStyle]="item?.linkStyle"
|
|
193
|
-
[target]="item.target"
|
|
194
|
-
[fragment]="item.fragment"
|
|
195
|
-
[queryParamsHandling]="item.queryParamsHandling"
|
|
196
|
-
[preserveFragment]="item.preserveFragment"
|
|
197
|
-
[skipLocationChange]="item.skipLocationChange"
|
|
198
|
-
[replaceUrl]="item.replaceUrl"
|
|
199
|
-
[state]="item.state"
|
|
184
|
+
[routerLinkActiveOptions]="item().routerLinkActiveOptions || { exact: false }"
|
|
185
|
+
[class]="cn(cx('itemLink'), item()?.linkClass)"
|
|
186
|
+
[ngStyle]="item()?.linkStyle"
|
|
187
|
+
[target]="item().target"
|
|
188
|
+
[fragment]="item().fragment"
|
|
189
|
+
[queryParamsHandling]="item().queryParamsHandling"
|
|
190
|
+
[preserveFragment]="item().preserveFragment"
|
|
191
|
+
[skipLocationChange]="item().skipLocationChange"
|
|
192
|
+
[replaceUrl]="item().replaceUrl"
|
|
193
|
+
[state]="item().state"
|
|
200
194
|
[pBind]="getPTOptions('itemLink')"
|
|
201
195
|
pRipple
|
|
202
196
|
>
|
|
203
|
-
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
|
197
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item() }"></ng-container>
|
|
204
198
|
</a>
|
|
205
199
|
}
|
|
206
200
|
}
|
|
207
201
|
|
|
208
|
-
@if (itemTemplate) {
|
|
209
|
-
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-template>
|
|
202
|
+
@if (itemTemplate()) {
|
|
203
|
+
<ng-template *ngTemplateOutlet="itemTemplate(); context: { $implicit: item() }"></ng-template>
|
|
210
204
|
}
|
|
211
205
|
|
|
212
206
|
<ng-template #itemContent>
|
|
213
|
-
@if (item.icon) {
|
|
214
|
-
<span [class]="cn(cx('itemIcon', { item }), item.iconClass)" [pBind]="getPTOptions('itemIcon')" [ngStyle]="item.iconStyle" [attr.data-pc-section]="'itemicon'"></span>
|
|
207
|
+
@if (item().icon) {
|
|
208
|
+
<span [class]="cn(cx('itemIcon', { item: item() }), item().iconClass)" [pBind]="getPTOptions('itemIcon')" [ngStyle]="item().iconStyle" [attr.data-pc-section]="'itemicon'"></span>
|
|
215
209
|
}
|
|
216
|
-
@if (item.escape !== false) {
|
|
217
|
-
<span [class]="cn(cx('itemLabel'), item.labelClass)" [ngStyle]="item.labelStyle" [pBind]="getPTOptions('itemLabel')" [attr.data-pc-section]="'itemlabel'">{{ item.label }}</span>
|
|
210
|
+
@if (item().escape !== false) {
|
|
211
|
+
<span [class]="cn(cx('itemLabel'), item().labelClass)" [ngStyle]="item().labelStyle" [pBind]="getPTOptions('itemLabel')" [attr.data-pc-section]="'itemlabel'">{{ item().label }}</span>
|
|
218
212
|
} @else {
|
|
219
|
-
<span [class]="cn(cx('itemLabel'), item.labelClass)" [ngStyle]="item.labelStyle" [attr.data-pc-section]="'itemlabel'" [innerHTML]="item.label | safeHtml" [pBind]="getPTOptions('itemLabel')"></span>
|
|
213
|
+
<span [class]="cn(cx('itemLabel'), item().labelClass)" [ngStyle]="item().labelStyle" [attr.data-pc-section]="'itemlabel'" [innerHTML]="item().label | safeHtml" [pBind]="getPTOptions('itemLabel')"></span>
|
|
220
214
|
}
|
|
221
|
-
@if (item.badge) {
|
|
222
|
-
<p-badge [
|
|
215
|
+
@if (item().badge) {
|
|
216
|
+
<p-badge [class]="item().badgeStyleClass" [value]="item().badge" [pt]="getPTOptions('pcBadge')" [unstyled]="unstyled()" />
|
|
223
217
|
}
|
|
224
218
|
</ng-template>
|
|
225
|
-
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Bind, selector: "[pBind]", inputs: ["pBind"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i4.Badge, selector: "p-badge", inputs: ["
|
|
219
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Bind, selector: "[pBind]", inputs: ["pBind"] }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i4.Badge, selector: "p-badge", inputs: ["badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
226
220
|
}
|
|
227
221
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MenuItemContent, decorators: [{
|
|
228
222
|
type: Component,
|
|
229
223
|
args: [{
|
|
230
|
-
changeDetection: ChangeDetectionStrategy.
|
|
224
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
231
225
|
selector: '[pMenuItemContent]',
|
|
232
|
-
standalone: true,
|
|
233
226
|
imports: [CommonModule, RouterModule, Ripple, TooltipModule, BadgeModule, SharedModule, SafeHtmlPipe, BindModule],
|
|
234
|
-
template: ` <div [class]="cx('itemContent')" (click)="onItemClick($event, item)" [attr.data-pc-section]="'content'" [pBind]="getPTOptions('itemContent')">
|
|
235
|
-
@if (!itemTemplate) {
|
|
236
|
-
@if (!item?.routerLink) {
|
|
227
|
+
template: ` <div [class]="cx('itemContent')" (click)="onItemClick($event, item())" [attr.data-pc-section]="'content'" [pBind]="getPTOptions('itemContent')">
|
|
228
|
+
@if (!itemTemplate()) {
|
|
229
|
+
@if (!item()?.routerLink) {
|
|
237
230
|
<a
|
|
238
|
-
[attr.title]="item.title"
|
|
239
|
-
[attr.href]="item.url || null"
|
|
240
|
-
[attr.data-automationid]="item.automationId"
|
|
231
|
+
[attr.title]="item().title"
|
|
232
|
+
[attr.href]="item().url || null"
|
|
233
|
+
[attr.data-automationid]="item().automationId"
|
|
241
234
|
[attr.tabindex]="-1"
|
|
242
|
-
[class]="cn(cx('itemLink'), item?.linkClass)"
|
|
243
|
-
[ngStyle]="item?.linkStyle"
|
|
244
|
-
[target]="item.target"
|
|
235
|
+
[class]="cn(cx('itemLink'), item()?.linkClass)"
|
|
236
|
+
[ngStyle]="item()?.linkStyle"
|
|
237
|
+
[target]="item().target"
|
|
245
238
|
[pBind]="getPTOptions('itemLink')"
|
|
246
239
|
pRipple
|
|
247
240
|
>
|
|
248
|
-
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
|
241
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item() }"></ng-container>
|
|
249
242
|
</a>
|
|
250
243
|
}
|
|
251
|
-
@if (item?.routerLink) {
|
|
244
|
+
@if (item()?.routerLink) {
|
|
252
245
|
<a
|
|
253
|
-
[routerLink]="item.routerLink"
|
|
254
|
-
[attr.data-automationid]="item.automationId"
|
|
246
|
+
[routerLink]="item().routerLink"
|
|
247
|
+
[attr.data-automationid]="item().automationId"
|
|
255
248
|
[attr.tabindex]="-1"
|
|
256
|
-
[attr.title]="item.title"
|
|
257
|
-
[queryParams]="item.queryParams"
|
|
249
|
+
[attr.title]="item().title"
|
|
250
|
+
[queryParams]="item().queryParams"
|
|
258
251
|
routerLinkActive="p-menu-item-link-active"
|
|
259
|
-
[routerLinkActiveOptions]="item.routerLinkActiveOptions || { exact: false }"
|
|
260
|
-
[class]="cn(cx('itemLink'), item?.linkClass)"
|
|
261
|
-
[ngStyle]="item?.linkStyle"
|
|
262
|
-
[target]="item.target"
|
|
263
|
-
[fragment]="item.fragment"
|
|
264
|
-
[queryParamsHandling]="item.queryParamsHandling"
|
|
265
|
-
[preserveFragment]="item.preserveFragment"
|
|
266
|
-
[skipLocationChange]="item.skipLocationChange"
|
|
267
|
-
[replaceUrl]="item.replaceUrl"
|
|
268
|
-
[state]="item.state"
|
|
252
|
+
[routerLinkActiveOptions]="item().routerLinkActiveOptions || { exact: false }"
|
|
253
|
+
[class]="cn(cx('itemLink'), item()?.linkClass)"
|
|
254
|
+
[ngStyle]="item()?.linkStyle"
|
|
255
|
+
[target]="item().target"
|
|
256
|
+
[fragment]="item().fragment"
|
|
257
|
+
[queryParamsHandling]="item().queryParamsHandling"
|
|
258
|
+
[preserveFragment]="item().preserveFragment"
|
|
259
|
+
[skipLocationChange]="item().skipLocationChange"
|
|
260
|
+
[replaceUrl]="item().replaceUrl"
|
|
261
|
+
[state]="item().state"
|
|
269
262
|
[pBind]="getPTOptions('itemLink')"
|
|
270
263
|
pRipple
|
|
271
264
|
>
|
|
272
|
-
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
|
265
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item() }"></ng-container>
|
|
273
266
|
</a>
|
|
274
267
|
}
|
|
275
268
|
}
|
|
276
269
|
|
|
277
|
-
@if (itemTemplate) {
|
|
278
|
-
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-template>
|
|
270
|
+
@if (itemTemplate()) {
|
|
271
|
+
<ng-template *ngTemplateOutlet="itemTemplate(); context: { $implicit: item() }"></ng-template>
|
|
279
272
|
}
|
|
280
273
|
|
|
281
274
|
<ng-template #itemContent>
|
|
282
|
-
@if (item.icon) {
|
|
283
|
-
<span [class]="cn(cx('itemIcon', { item }), item.iconClass)" [pBind]="getPTOptions('itemIcon')" [ngStyle]="item.iconStyle" [attr.data-pc-section]="'itemicon'"></span>
|
|
275
|
+
@if (item().icon) {
|
|
276
|
+
<span [class]="cn(cx('itemIcon', { item: item() }), item().iconClass)" [pBind]="getPTOptions('itemIcon')" [ngStyle]="item().iconStyle" [attr.data-pc-section]="'itemicon'"></span>
|
|
284
277
|
}
|
|
285
|
-
@if (item.escape !== false) {
|
|
286
|
-
<span [class]="cn(cx('itemLabel'), item.labelClass)" [ngStyle]="item.labelStyle" [pBind]="getPTOptions('itemLabel')" [attr.data-pc-section]="'itemlabel'">{{ item.label }}</span>
|
|
278
|
+
@if (item().escape !== false) {
|
|
279
|
+
<span [class]="cn(cx('itemLabel'), item().labelClass)" [ngStyle]="item().labelStyle" [pBind]="getPTOptions('itemLabel')" [attr.data-pc-section]="'itemlabel'">{{ item().label }}</span>
|
|
287
280
|
} @else {
|
|
288
|
-
<span [class]="cn(cx('itemLabel'), item.labelClass)" [ngStyle]="item.labelStyle" [attr.data-pc-section]="'itemlabel'" [innerHTML]="item.label | safeHtml" [pBind]="getPTOptions('itemLabel')"></span>
|
|
281
|
+
<span [class]="cn(cx('itemLabel'), item().labelClass)" [ngStyle]="item().labelStyle" [attr.data-pc-section]="'itemlabel'" [innerHTML]="item().label | safeHtml" [pBind]="getPTOptions('itemLabel')"></span>
|
|
289
282
|
}
|
|
290
|
-
@if (item.badge) {
|
|
291
|
-
<p-badge [
|
|
283
|
+
@if (item().badge) {
|
|
284
|
+
<p-badge [class]="item().badgeStyleClass" [value]="item().badge" [pt]="getPTOptions('pcBadge')" [unstyled]="unstyled()" />
|
|
292
285
|
}
|
|
293
286
|
</ng-template>
|
|
294
287
|
</div>`,
|
|
295
288
|
encapsulation: ViewEncapsulation.None,
|
|
296
289
|
providers: [MenuStyle]
|
|
297
290
|
}]
|
|
298
|
-
}],
|
|
299
|
-
type: Input,
|
|
300
|
-
args: ['pMenuItemContent']
|
|
301
|
-
}], itemTemplate: [{
|
|
302
|
-
type: Input
|
|
303
|
-
}], menuitemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuitemId", required: false }] }], idx: [{ type: i0.Input, args: [{ isSignal: true, alias: "idx", required: false }] }], onMenuItemClick: [{ type: i0.Output, args: ["onMenuItemClick"] }] } });
|
|
291
|
+
}], propDecorators: { item: [{ type: i0.Input, args: [{ isSignal: true, alias: "pMenuItemContent", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], menuitemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuitemId", required: false }] }], idx: [{ type: i0.Input, args: [{ isSignal: true, alias: "idx", required: false }] }], onMenuItemClick: [{ type: i0.Output, args: ["onMenuItemClick"] }] } });
|
|
304
292
|
/**
|
|
305
293
|
* Menu is a navigation / command component that supports dynamic and static positioning.
|
|
306
294
|
* @group Components
|
|
@@ -312,64 +300,60 @@ class Menu extends BaseComponent {
|
|
|
312
300
|
* An array of menuitems.
|
|
313
301
|
* @group Props
|
|
314
302
|
*/
|
|
315
|
-
model
|
|
303
|
+
model = input(undefined, /* @ts-ignore */
|
|
304
|
+
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
316
305
|
/**
|
|
317
306
|
* Defines if menu would displayed as a popup.
|
|
318
307
|
* @group Props
|
|
319
308
|
*/
|
|
320
|
-
popup;
|
|
309
|
+
popup = input(undefined, { ...(ngDevMode ? { debugName: "popup" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
321
310
|
/**
|
|
322
311
|
* Inline style of the component.
|
|
323
312
|
* @group Props
|
|
324
313
|
*/
|
|
325
|
-
style
|
|
314
|
+
style = input(undefined, /* @ts-ignore */
|
|
315
|
+
...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
|
|
326
316
|
/**
|
|
327
317
|
* Style class of the component.
|
|
328
318
|
* @group Props
|
|
329
319
|
*/
|
|
330
|
-
styleClass
|
|
320
|
+
styleClass = input(undefined, /* @ts-ignore */
|
|
321
|
+
...(ngDevMode ? [{ debugName: "styleClass" }] : /* istanbul ignore next */ []));
|
|
331
322
|
/**
|
|
332
323
|
* Whether to automatically manage layering.
|
|
333
324
|
* @group Props
|
|
334
325
|
*/
|
|
335
|
-
autoZIndex = true;
|
|
326
|
+
autoZIndex = input(true, { ...(ngDevMode ? { debugName: "autoZIndex" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
336
327
|
/**
|
|
337
328
|
* Base zIndex value to use in layering.
|
|
338
329
|
* @group Props
|
|
339
330
|
*/
|
|
340
|
-
baseZIndex = 0;
|
|
341
|
-
/**
|
|
342
|
-
* Transition options of the show animation.
|
|
343
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
344
|
-
* @group Props
|
|
345
|
-
*/
|
|
346
|
-
showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
|
|
347
|
-
/**
|
|
348
|
-
* Transition options of the hide animation.
|
|
349
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
350
|
-
* @group Props
|
|
351
|
-
*/
|
|
352
|
-
hideTransitionOptions = '.1s linear';
|
|
331
|
+
baseZIndex = input(0, { ...(ngDevMode ? { debugName: "baseZIndex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
353
332
|
/**
|
|
354
333
|
* Defines a string value that labels an interactive element.
|
|
355
334
|
* @group Props
|
|
356
335
|
*/
|
|
357
|
-
ariaLabel
|
|
336
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
337
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
358
338
|
/**
|
|
359
339
|
* Identifier of the underlying input element.
|
|
360
340
|
* @group Props
|
|
361
341
|
*/
|
|
362
|
-
ariaLabelledBy
|
|
342
|
+
ariaLabelledBy = input(undefined, /* @ts-ignore */
|
|
343
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
363
344
|
/**
|
|
364
345
|
* Current id state as a string.
|
|
365
346
|
* @group Props
|
|
366
347
|
*/
|
|
367
|
-
id
|
|
348
|
+
id = input(undefined, /* @ts-ignore */
|
|
349
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
350
|
+
_id = computed(() => this.id() || uuid('pn_id_'), /* @ts-ignore */
|
|
351
|
+
...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
|
|
368
352
|
/**
|
|
369
353
|
* Index of the element in tabbing order.
|
|
370
354
|
* @group Props
|
|
371
355
|
*/
|
|
372
|
-
tabindex = 0;
|
|
356
|
+
tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
373
357
|
/**
|
|
374
358
|
* Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name).
|
|
375
359
|
* @defaultValue 'self'
|
|
@@ -418,13 +402,20 @@ class Menu extends BaseComponent {
|
|
|
418
402
|
...(ngDevMode ? [{ debugName: "containerViewChild" }] : /* istanbul ignore next */ []));
|
|
419
403
|
$appendTo = computed(() => this.appendTo() || this.config.overlayAppendTo(), /* @ts-ignore */
|
|
420
404
|
...(ngDevMode ? [{ debugName: "$appendTo" }] : /* istanbul ignore next */ []));
|
|
421
|
-
container
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
405
|
+
container = signal(undefined, /* @ts-ignore */
|
|
406
|
+
...(ngDevMode ? [{ debugName: "container" }] : /* istanbul ignore next */ []));
|
|
407
|
+
scrollHandler = signal(undefined, /* @ts-ignore */
|
|
408
|
+
...(ngDevMode ? [{ debugName: "scrollHandler" }] : /* istanbul ignore next */ []));
|
|
409
|
+
documentClickListener = signal(undefined, /* @ts-ignore */
|
|
410
|
+
...(ngDevMode ? [{ debugName: "documentClickListener" }] : /* istanbul ignore next */ []));
|
|
411
|
+
documentResizeListener = signal(undefined, /* @ts-ignore */
|
|
412
|
+
...(ngDevMode ? [{ debugName: "documentResizeListener" }] : /* istanbul ignore next */ []));
|
|
413
|
+
preventDocumentDefault = signal(undefined, /* @ts-ignore */
|
|
414
|
+
...(ngDevMode ? [{ debugName: "preventDocumentDefault" }] : /* istanbul ignore next */ []));
|
|
415
|
+
target = signal(undefined, /* @ts-ignore */
|
|
416
|
+
...(ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []));
|
|
417
|
+
visible = signal(undefined, /* @ts-ignore */
|
|
418
|
+
...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
|
|
428
419
|
focusedOptionId = computed(() => {
|
|
429
420
|
return this.focusedOptionIndex() !== -1 ? this.focusedOptionIndex() : null;
|
|
430
421
|
}, /* @ts-ignore */
|
|
@@ -433,17 +424,15 @@ class Menu extends BaseComponent {
|
|
|
433
424
|
...(ngDevMode ? [{ debugName: "focusedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
434
425
|
selectedOptionIndex = signal(-1, /* @ts-ignore */
|
|
435
426
|
...(ngDevMode ? [{ debugName: "selectedOptionIndex" }] : /* istanbul ignore next */ []));
|
|
436
|
-
focused = false
|
|
437
|
-
|
|
438
|
-
|
|
427
|
+
focused = signal(false, /* @ts-ignore */
|
|
428
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
429
|
+
overlayVisible = signal(false, /* @ts-ignore */
|
|
430
|
+
...(ngDevMode ? [{ debugName: "overlayVisible" }] : /* istanbul ignore next */ []));
|
|
439
431
|
_componentStyle = inject(MenuStyle);
|
|
440
432
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
441
|
-
onAfterViewChecked() {
|
|
442
|
-
this.bindDirectiveInstance.setAttrs(this.ptm('host'));
|
|
443
|
-
}
|
|
444
433
|
constructor() {
|
|
445
434
|
super();
|
|
446
|
-
|
|
435
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptm('host')));
|
|
447
436
|
}
|
|
448
437
|
getPTOptions(key, item, index, id) {
|
|
449
438
|
return this.ptm(key, {
|
|
@@ -461,11 +450,11 @@ class Menu extends BaseComponent {
|
|
|
461
450
|
* @group Method
|
|
462
451
|
*/
|
|
463
452
|
toggle(event) {
|
|
464
|
-
if (this.visible)
|
|
453
|
+
if (this.visible())
|
|
465
454
|
this.hide();
|
|
466
455
|
else
|
|
467
456
|
this.show(event);
|
|
468
|
-
this.preventDocumentDefault
|
|
457
|
+
this.preventDocumentDefault.set(true);
|
|
469
458
|
}
|
|
470
459
|
/**
|
|
471
460
|
* Displays the popup menu.
|
|
@@ -474,17 +463,16 @@ class Menu extends BaseComponent {
|
|
|
474
463
|
*/
|
|
475
464
|
show(event) {
|
|
476
465
|
// Clear container if exists but overlay is not currently visible (fast toggle case)
|
|
477
|
-
if (this.container && !this.overlayVisible) {
|
|
478
|
-
this.container
|
|
466
|
+
if (this.container() && !this.overlayVisible()) {
|
|
467
|
+
this.container.set(undefined);
|
|
479
468
|
}
|
|
480
|
-
this.target
|
|
481
|
-
this.visible
|
|
482
|
-
this.preventDocumentDefault
|
|
483
|
-
this.overlayVisible
|
|
484
|
-
this.cd.markForCheck();
|
|
469
|
+
this.target.set(event.currentTarget);
|
|
470
|
+
this.visible.set(true);
|
|
471
|
+
this.preventDocumentDefault.set(true);
|
|
472
|
+
this.overlayVisible.set(true);
|
|
485
473
|
}
|
|
486
474
|
onInit() {
|
|
487
|
-
if (!this.popup) {
|
|
475
|
+
if (!this.popup()) {
|
|
488
476
|
this.bindDocumentClickListener();
|
|
489
477
|
}
|
|
490
478
|
}
|
|
@@ -493,13 +481,19 @@ class Menu extends BaseComponent {
|
|
|
493
481
|
* @group Templates
|
|
494
482
|
*/
|
|
495
483
|
startTemplate = contentChild('start', { ...(ngDevMode ? { debugName: "startTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
496
|
-
_startTemplate
|
|
484
|
+
_startTemplate = computed(() => this.templates()
|
|
485
|
+
.filter((item) => item.getType() === 'start')
|
|
486
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
487
|
+
...(ngDevMode ? [{ debugName: "_startTemplate" }] : /* istanbul ignore next */ []));
|
|
497
488
|
/**
|
|
498
489
|
* Defines template option for end.
|
|
499
490
|
* @group Templates
|
|
500
491
|
*/
|
|
501
492
|
endTemplate = contentChild('end', { ...(ngDevMode ? { debugName: "endTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
502
|
-
_endTemplate
|
|
493
|
+
_endTemplate = computed(() => this.templates()
|
|
494
|
+
.filter((item) => item.getType() === 'end')
|
|
495
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
496
|
+
...(ngDevMode ? [{ debugName: "_endTemplate" }] : /* istanbul ignore next */ []));
|
|
503
497
|
/**
|
|
504
498
|
* Custom item template.
|
|
505
499
|
* @param {MenuItemTemplateContext} context - item context.
|
|
@@ -507,7 +501,10 @@ class Menu extends BaseComponent {
|
|
|
507
501
|
* @group Templates
|
|
508
502
|
*/
|
|
509
503
|
itemTemplate = contentChild('item', { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
510
|
-
_itemTemplate
|
|
504
|
+
_itemTemplate = computed(() => this.templates()
|
|
505
|
+
.filter((item) => !['start', 'end', 'submenuheader'].includes(item.getType()))
|
|
506
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
507
|
+
...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
|
|
511
508
|
/**
|
|
512
509
|
* Custom submenu header template.
|
|
513
510
|
* @param {MenuSubmenuHeaderTemplateContext} context - submenu header context.
|
|
@@ -515,44 +512,26 @@ class Menu extends BaseComponent {
|
|
|
515
512
|
* @group Templates
|
|
516
513
|
*/
|
|
517
514
|
submenuHeaderTemplate = contentChild('submenuheader', { ...(ngDevMode ? { debugName: "submenuHeaderTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
518
|
-
_submenuHeaderTemplate
|
|
515
|
+
_submenuHeaderTemplate = computed(() => this.templates()
|
|
516
|
+
.filter((item) => item.getType() === 'submenuheader')
|
|
517
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
518
|
+
...(ngDevMode ? [{ debugName: "_submenuHeaderTemplate" }] : /* istanbul ignore next */ []));
|
|
519
519
|
templates = contentChildren(PrimeTemplate, /* @ts-ignore */
|
|
520
520
|
...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
switch (item.getType()) {
|
|
524
|
-
case 'start':
|
|
525
|
-
this._startTemplate = item.template;
|
|
526
|
-
break;
|
|
527
|
-
case 'end':
|
|
528
|
-
this._endTemplate = item.template;
|
|
529
|
-
break;
|
|
530
|
-
case 'item':
|
|
531
|
-
this._itemTemplate = item.template;
|
|
532
|
-
break;
|
|
533
|
-
case 'submenuheader':
|
|
534
|
-
this._submenuHeaderTemplate = item.template;
|
|
535
|
-
break;
|
|
536
|
-
default:
|
|
537
|
-
this._itemTemplate = item.template;
|
|
538
|
-
break;
|
|
539
|
-
}
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
getTabIndexValue() {
|
|
543
|
-
return this.tabindex !== undefined ? this.tabindex.toString() : null;
|
|
544
|
-
}
|
|
521
|
+
getTabIndexValue = computed(() => (this.tabindex() !== undefined ? this.tabindex().toString() : null), /* @ts-ignore */
|
|
522
|
+
...(ngDevMode ? [{ debugName: "getTabIndexValue" }] : /* istanbul ignore next */ []));
|
|
545
523
|
onOverlayBeforeEnter(event) {
|
|
546
|
-
this.container
|
|
547
|
-
|
|
548
|
-
|
|
524
|
+
this.container.set(event.element);
|
|
525
|
+
const container = this.container();
|
|
526
|
+
if (container) {
|
|
527
|
+
addStyle(container, { position: 'absolute', top: '0' });
|
|
549
528
|
this.appendOverlay();
|
|
550
529
|
this.moveOnTop();
|
|
551
|
-
this.$attrSelector &&
|
|
530
|
+
this.$attrSelector && container.setAttribute(this.$attrSelector, '');
|
|
552
531
|
this.bindDocumentClickListener();
|
|
553
532
|
this.bindDocumentResizeListener();
|
|
554
533
|
this.bindScrollListener();
|
|
555
|
-
absolutePosition(
|
|
534
|
+
absolutePosition(container, this.target());
|
|
556
535
|
focus(this.listViewChild()?.nativeElement);
|
|
557
536
|
this.onShow.emit({});
|
|
558
537
|
}
|
|
@@ -560,27 +539,28 @@ class Menu extends BaseComponent {
|
|
|
560
539
|
onOverlayAfterLeave() {
|
|
561
540
|
this.restoreOverlayAppend();
|
|
562
541
|
this.onOverlayHide();
|
|
563
|
-
this.overlayVisible
|
|
542
|
+
this.overlayVisible.set(false);
|
|
564
543
|
this.onHide.emit({});
|
|
565
544
|
}
|
|
566
545
|
appendOverlay() {
|
|
567
546
|
if (this.$appendTo() && this.$appendTo() !== 'self') {
|
|
568
547
|
if (this.$appendTo() === 'body') {
|
|
569
|
-
appendChild(this.document.body, this.container);
|
|
548
|
+
appendChild(this.document.body, this.container());
|
|
570
549
|
}
|
|
571
550
|
else {
|
|
572
|
-
appendChild(this.$appendTo(), this.container);
|
|
551
|
+
appendChild(this.$appendTo(), this.container());
|
|
573
552
|
}
|
|
574
553
|
}
|
|
575
554
|
}
|
|
576
555
|
restoreOverlayAppend() {
|
|
577
|
-
|
|
578
|
-
|
|
556
|
+
const container = this.container();
|
|
557
|
+
if (container && this.$appendTo() !== 'self') {
|
|
558
|
+
appendChild(this.el.nativeElement, container);
|
|
579
559
|
}
|
|
580
560
|
}
|
|
581
561
|
moveOnTop() {
|
|
582
|
-
if (this.autoZIndex) {
|
|
583
|
-
ZIndexUtils.set('menu', this.container, this.baseZIndex + this.config.zIndex.menu);
|
|
562
|
+
if (this.autoZIndex()) {
|
|
563
|
+
ZIndexUtils.set('menu', this.container(), this.baseZIndex() + this.config.zIndex.menu);
|
|
584
564
|
}
|
|
585
565
|
}
|
|
586
566
|
/**
|
|
@@ -588,11 +568,10 @@ class Menu extends BaseComponent {
|
|
|
588
568
|
* @group Method
|
|
589
569
|
*/
|
|
590
570
|
hide() {
|
|
591
|
-
this.visible
|
|
592
|
-
this.cd.markForCheck();
|
|
571
|
+
this.visible.set(false);
|
|
593
572
|
}
|
|
594
573
|
onWindowResize() {
|
|
595
|
-
if (this.visible && !isTouchDevice()) {
|
|
574
|
+
if (this.visible() && !isTouchDevice()) {
|
|
596
575
|
this.hide();
|
|
597
576
|
}
|
|
598
577
|
}
|
|
@@ -608,19 +587,18 @@ class Menu extends BaseComponent {
|
|
|
608
587
|
disabled(disabled) {
|
|
609
588
|
return typeof disabled === 'function' ? disabled() : typeof disabled === 'undefined' ? false : disabled;
|
|
610
589
|
}
|
|
611
|
-
activedescendant()
|
|
612
|
-
|
|
613
|
-
}
|
|
590
|
+
activedescendant = computed(() => (this.focused() ? this.focusedOptionId() : undefined), /* @ts-ignore */
|
|
591
|
+
...(ngDevMode ? [{ debugName: "activedescendant" }] : /* istanbul ignore next */ []));
|
|
614
592
|
onListFocus(event) {
|
|
615
|
-
if (!this.focused) {
|
|
616
|
-
this.focused
|
|
617
|
-
!this.popup && this.changeFocusedOptionIndex(0);
|
|
593
|
+
if (!this.focused()) {
|
|
594
|
+
this.focused.set(true);
|
|
595
|
+
!this.popup() && this.changeFocusedOptionIndex(0);
|
|
618
596
|
this.onFocus.emit(event);
|
|
619
597
|
}
|
|
620
598
|
}
|
|
621
599
|
onListBlur(event) {
|
|
622
|
-
if (this.focused) {
|
|
623
|
-
this.focused
|
|
600
|
+
if (this.focused()) {
|
|
601
|
+
this.focused.set(false);
|
|
624
602
|
this.changeFocusedOptionIndex(-1);
|
|
625
603
|
this.selectedOptionIndex.set(-1);
|
|
626
604
|
this.focusedOptionIndex.set(-1);
|
|
@@ -652,11 +630,11 @@ class Menu extends BaseComponent {
|
|
|
652
630
|
break;
|
|
653
631
|
case 'Escape':
|
|
654
632
|
case 'Tab':
|
|
655
|
-
if (this.popup) {
|
|
656
|
-
focus(this.target);
|
|
633
|
+
if (this.popup()) {
|
|
634
|
+
focus(this.target());
|
|
657
635
|
this.hide();
|
|
658
636
|
}
|
|
659
|
-
this.overlayVisible && this.hide();
|
|
637
|
+
this.overlayVisible() && this.hide();
|
|
660
638
|
break;
|
|
661
639
|
default:
|
|
662
640
|
break;
|
|
@@ -668,8 +646,8 @@ class Menu extends BaseComponent {
|
|
|
668
646
|
event.preventDefault();
|
|
669
647
|
}
|
|
670
648
|
onArrowUpKey(event) {
|
|
671
|
-
if (event.altKey && this.popup) {
|
|
672
|
-
focus(this.target);
|
|
649
|
+
if (event.altKey && this.popup()) {
|
|
650
|
+
focus(this.target());
|
|
673
651
|
this.hide();
|
|
674
652
|
event.preventDefault();
|
|
675
653
|
}
|
|
@@ -690,7 +668,7 @@ class Menu extends BaseComponent {
|
|
|
690
668
|
onEnterKey(event) {
|
|
691
669
|
const element = findSingle(this.containerViewChild()?.nativeElement, `li[id="${`${this.focusedOptionIndex()}`}"]`);
|
|
692
670
|
const anchorElement = element && (findSingle(element, '[data-pc-section="itemlink"]') || findSingle(element, 'a,button'));
|
|
693
|
-
this.popup && focus(this.target);
|
|
671
|
+
this.popup() && focus(this.target());
|
|
694
672
|
anchorElement ? anchorElement.click() : element && element.click();
|
|
695
673
|
event.preventDefault();
|
|
696
674
|
}
|
|
@@ -716,8 +694,8 @@ class Menu extends BaseComponent {
|
|
|
716
694
|
}
|
|
717
695
|
itemClick(event, id) {
|
|
718
696
|
const { originalEvent, item } = event;
|
|
719
|
-
if (!this.focused) {
|
|
720
|
-
this.focused
|
|
697
|
+
if (!this.focused()) {
|
|
698
|
+
this.focused.set(true);
|
|
721
699
|
this.onFocus.emit(originalEvent);
|
|
722
700
|
}
|
|
723
701
|
if (item.disabled) {
|
|
@@ -733,143 +711,144 @@ class Menu extends BaseComponent {
|
|
|
733
711
|
item: item
|
|
734
712
|
});
|
|
735
713
|
}
|
|
736
|
-
if (this.popup) {
|
|
714
|
+
if (this.popup()) {
|
|
737
715
|
this.hide();
|
|
738
716
|
}
|
|
739
|
-
if (!this.popup && this.focusedOptionIndex() !== id) {
|
|
717
|
+
if (!this.popup() && this.focusedOptionIndex() !== id) {
|
|
740
718
|
this.focusedOptionIndex.set(id);
|
|
741
719
|
}
|
|
742
720
|
}
|
|
743
721
|
onOverlayClick(event) {
|
|
744
|
-
if (this.popup) {
|
|
722
|
+
if (this.popup()) {
|
|
745
723
|
this.overlayService.add({
|
|
746
724
|
originalEvent: event,
|
|
747
725
|
target: this.el.nativeElement
|
|
748
726
|
});
|
|
749
727
|
}
|
|
750
|
-
this.preventDocumentDefault
|
|
728
|
+
this.preventDocumentDefault.set(true);
|
|
751
729
|
}
|
|
752
730
|
bindDocumentClickListener() {
|
|
753
|
-
if (!this.documentClickListener && isPlatformBrowser(this.platformId)) {
|
|
731
|
+
if (!this.documentClickListener() && isPlatformBrowser(this.platformId)) {
|
|
754
732
|
const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
|
|
755
|
-
this.documentClickListener
|
|
733
|
+
this.documentClickListener.set(this.renderer.listen(documentTarget, 'click', (event) => {
|
|
734
|
+
const target = this.target();
|
|
756
735
|
const isOutsideContainer = this.containerViewChild()?.nativeElement && !this.containerViewChild()?.nativeElement.contains(event.target);
|
|
757
|
-
const isOutsideTarget = !(
|
|
758
|
-
if (!this.popup && isOutsideContainer && isOutsideTarget) {
|
|
736
|
+
const isOutsideTarget = !(target && (target === event.target || target.contains(event.target)));
|
|
737
|
+
if (!this.popup() && isOutsideContainer && isOutsideTarget) {
|
|
759
738
|
this.onListBlur(event);
|
|
760
739
|
}
|
|
761
|
-
if (this.preventDocumentDefault && this.overlayVisible && isOutsideContainer && isOutsideTarget) {
|
|
740
|
+
if (this.preventDocumentDefault() && this.overlayVisible() && isOutsideContainer && isOutsideTarget) {
|
|
762
741
|
this.hide();
|
|
763
|
-
this.preventDocumentDefault
|
|
742
|
+
this.preventDocumentDefault.set(false);
|
|
764
743
|
}
|
|
765
|
-
});
|
|
744
|
+
}));
|
|
766
745
|
}
|
|
767
746
|
}
|
|
768
747
|
unbindDocumentClickListener() {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
748
|
+
const documentClickListener = this.documentClickListener();
|
|
749
|
+
if (documentClickListener) {
|
|
750
|
+
documentClickListener();
|
|
751
|
+
this.documentClickListener.set(null);
|
|
772
752
|
}
|
|
773
753
|
}
|
|
774
754
|
bindDocumentResizeListener() {
|
|
775
|
-
if (!this.documentResizeListener && isPlatformBrowser(this.platformId)) {
|
|
755
|
+
if (!this.documentResizeListener() && isPlatformBrowser(this.platformId)) {
|
|
776
756
|
const window = this.document.defaultView;
|
|
777
|
-
this.documentResizeListener
|
|
757
|
+
this.documentResizeListener.set(this.renderer.listen(window, 'resize', this.onWindowResize.bind(this)));
|
|
778
758
|
}
|
|
779
759
|
}
|
|
780
760
|
unbindDocumentResizeListener() {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
761
|
+
const documentResizeListener = this.documentResizeListener();
|
|
762
|
+
if (documentResizeListener) {
|
|
763
|
+
documentResizeListener();
|
|
764
|
+
this.documentResizeListener.set(null);
|
|
784
765
|
}
|
|
785
766
|
}
|
|
786
767
|
bindScrollListener() {
|
|
787
|
-
if (!this.scrollHandler && isPlatformBrowser(this.platformId)) {
|
|
788
|
-
this.scrollHandler
|
|
789
|
-
if (this.visible) {
|
|
768
|
+
if (!this.scrollHandler() && isPlatformBrowser(this.platformId)) {
|
|
769
|
+
this.scrollHandler.set(new ConnectedOverlayScrollHandler(this.target(), () => {
|
|
770
|
+
if (this.visible()) {
|
|
790
771
|
this.hide();
|
|
791
772
|
}
|
|
792
|
-
});
|
|
773
|
+
}));
|
|
793
774
|
}
|
|
794
|
-
this.scrollHandler?.bindScrollListener();
|
|
775
|
+
this.scrollHandler()?.bindScrollListener();
|
|
795
776
|
}
|
|
796
777
|
unbindScrollListener() {
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
778
|
+
const scrollHandler = this.scrollHandler();
|
|
779
|
+
if (scrollHandler) {
|
|
780
|
+
scrollHandler.unbindScrollListener();
|
|
781
|
+
this.scrollHandler.set(null);
|
|
800
782
|
}
|
|
801
783
|
}
|
|
802
784
|
onOverlayHide() {
|
|
803
785
|
this.unbindDocumentClickListener();
|
|
804
786
|
this.unbindDocumentResizeListener();
|
|
805
787
|
this.unbindScrollListener();
|
|
806
|
-
this.preventDocumentDefault
|
|
788
|
+
this.preventDocumentDefault.set(false);
|
|
807
789
|
if (!this.cd.destroyed) {
|
|
808
|
-
this.target
|
|
790
|
+
this.target.set(null);
|
|
809
791
|
}
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
792
|
+
const container = this.container();
|
|
793
|
+
if (container) {
|
|
794
|
+
if (this.autoZIndex()) {
|
|
795
|
+
ZIndexUtils.clear(container);
|
|
813
796
|
}
|
|
814
|
-
this.container
|
|
797
|
+
this.container.set(undefined);
|
|
815
798
|
}
|
|
816
799
|
}
|
|
817
800
|
onDestroy() {
|
|
818
|
-
if (this.popup) {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
801
|
+
if (this.popup()) {
|
|
802
|
+
const scrollHandler = this.scrollHandler();
|
|
803
|
+
if (scrollHandler) {
|
|
804
|
+
scrollHandler.destroy();
|
|
805
|
+
this.scrollHandler.set(null);
|
|
822
806
|
}
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
807
|
+
const container = this.container();
|
|
808
|
+
if (container) {
|
|
809
|
+
if (this.autoZIndex()) {
|
|
810
|
+
ZIndexUtils.clear(container);
|
|
826
811
|
}
|
|
827
|
-
this.container
|
|
812
|
+
this.container.set(undefined);
|
|
828
813
|
}
|
|
829
814
|
this.restoreOverlayAppend();
|
|
830
815
|
this.onOverlayHide();
|
|
831
816
|
}
|
|
832
|
-
if (!this.popup) {
|
|
817
|
+
if (!this.popup()) {
|
|
833
818
|
this.unbindDocumentClickListener();
|
|
834
819
|
}
|
|
835
820
|
}
|
|
836
|
-
hasSubMenu()
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
isItemHidden(item) {
|
|
840
|
-
if (item.separator) {
|
|
841
|
-
return item.visible === false || (item.items && item.items.some((subitem) => subitem.visible !== false));
|
|
842
|
-
}
|
|
843
|
-
return item.visible === false;
|
|
844
|
-
}
|
|
845
|
-
get dataP() {
|
|
821
|
+
hasSubMenu = computed(() => this.model()?.some((item) => item.items) ?? false, /* @ts-ignore */
|
|
822
|
+
...(ngDevMode ? [{ debugName: "hasSubMenu" }] : /* istanbul ignore next */ []));
|
|
823
|
+
dataP = computed(() => {
|
|
846
824
|
return this.cn({
|
|
847
|
-
popup: this.popup
|
|
825
|
+
popup: this.popup()
|
|
848
826
|
});
|
|
849
|
-
}
|
|
827
|
+
}, /* @ts-ignore */
|
|
828
|
+
...(ngDevMode ? [{ debugName: "dataP" }] : /* istanbul ignore next */ []));
|
|
850
829
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
851
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Menu, isStandalone: true, selector: "p-menu", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal:
|
|
852
|
-
@if (!popup || overlayVisible) {
|
|
830
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Menu, isStandalone: true, selector: "p-menu", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, popup: { classPropertyName: "popup", publicName: "popup", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, autoZIndex: { classPropertyName: "autoZIndex", publicName: "autoZIndex", isSignal: true, isRequired: false, transformFunction: null }, baseZIndex: { classPropertyName: "baseZIndex", publicName: "baseZIndex", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", 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: { onShow: "onShow", onHide: "onHide", onBlur: "onBlur", onFocus: "onFocus" }, providers: [MenuStyle, { provide: PARENT_INSTANCE, useExisting: Menu }], queries: [{ propertyName: "startTemplate", first: true, predicate: ["start"], isSignal: true }, { propertyName: "endTemplate", first: true, predicate: ["end"], isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["item"], isSignal: true }, { propertyName: "submenuHeaderTemplate", first: true, predicate: ["submenuheader"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "listViewChild", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i3.Bind }], ngImport: i0, template: `
|
|
831
|
+
@if (!popup() || overlayVisible()) {
|
|
853
832
|
<div
|
|
854
833
|
#container
|
|
855
|
-
[class]="cn(cx('root'), styleClass)"
|
|
834
|
+
[class]="cn(cx('root'), styleClass())"
|
|
856
835
|
[style]="sx('root')"
|
|
857
|
-
[ngStyle]="style"
|
|
836
|
+
[ngStyle]="style()"
|
|
858
837
|
(click)="onOverlayClick($event)"
|
|
859
|
-
[attr.id]="
|
|
838
|
+
[attr.id]="_id()"
|
|
860
839
|
[pBind]="ptm('root')"
|
|
861
|
-
[attr.data-p]="dataP"
|
|
862
|
-
[pMotion]="visible || !popup"
|
|
840
|
+
[attr.data-p]="dataP()"
|
|
841
|
+
[pMotion]="visible() || !popup()"
|
|
863
842
|
[pMotionName]="'p-anchored-overlay'"
|
|
864
|
-
[pMotionAppear]="!!popup"
|
|
865
|
-
[pMotionDisabled]="!popup"
|
|
843
|
+
[pMotionAppear]="!!popup()"
|
|
844
|
+
[pMotionDisabled]="!popup()"
|
|
866
845
|
[pMotionOptions]="computedMotionOptions()"
|
|
867
846
|
(pMotionOnBeforeEnter)="onOverlayBeforeEnter($event)"
|
|
868
847
|
(pMotionOnAfterLeave)="onOverlayAfterLeave()"
|
|
869
848
|
>
|
|
870
|
-
@if (startTemplate() ?? _startTemplate) {
|
|
849
|
+
@if (startTemplate() ?? _startTemplate()) {
|
|
871
850
|
<div [class]="cx('start')" [pBind]="ptm('start')" [attr.data-pc-section]="'start'">
|
|
872
|
-
<ng-container *ngTemplateOutlet="startTemplate() ?? _startTemplate"></ng-container>
|
|
851
|
+
<ng-container *ngTemplateOutlet="startTemplate() ?? _startTemplate()"></ng-container>
|
|
873
852
|
</div>
|
|
874
853
|
}
|
|
875
854
|
<ul
|
|
@@ -877,18 +856,18 @@ class Menu extends BaseComponent {
|
|
|
877
856
|
[class]="cx('list')"
|
|
878
857
|
[pBind]="ptm('list')"
|
|
879
858
|
role="menu"
|
|
880
|
-
[attr.id]="
|
|
859
|
+
[attr.id]="_id() + '_list'"
|
|
881
860
|
[attr.tabindex]="getTabIndexValue()"
|
|
882
861
|
[attr.data-pc-section]="'menu'"
|
|
883
862
|
[attr.aria-activedescendant]="activedescendant()"
|
|
884
|
-
[attr.aria-label]="ariaLabel"
|
|
885
|
-
[attr.aria-labelledBy]="ariaLabelledBy"
|
|
863
|
+
[attr.aria-label]="ariaLabel()"
|
|
864
|
+
[attr.aria-labelledBy]="ariaLabelledBy()"
|
|
886
865
|
(focus)="onListFocus($event)"
|
|
887
866
|
(blur)="onListBlur($event)"
|
|
888
867
|
(keydown)="onListKeyDown($event)"
|
|
889
868
|
>
|
|
890
869
|
@if (hasSubMenu()) {
|
|
891
|
-
@for (submenu of model; track submenu; let i = $index) {
|
|
870
|
+
@for (submenu of model(); track submenu; let i = $index) {
|
|
892
871
|
@if (submenu.visible !== false) {
|
|
893
872
|
@if (submenu.separator) {
|
|
894
873
|
<li [class]="cx('separator')" [pBind]="ptm('separator')" role="separator" [attr.data-pc-section]="'separator'"></li>
|
|
@@ -901,10 +880,10 @@ class Menu extends BaseComponent {
|
|
|
901
880
|
[tooltipOptions]="submenu.tooltipOptions"
|
|
902
881
|
[pTooltipUnstyled]="unstyled()"
|
|
903
882
|
role="none"
|
|
904
|
-
[attr.id]="menuitemId(submenu,
|
|
883
|
+
[attr.id]="menuitemId(submenu, _id(), i)"
|
|
905
884
|
[attr.data-pc-section]="'submenulabel'"
|
|
906
885
|
>
|
|
907
|
-
@let submenuHeader = submenuHeaderTemplate() ?? _submenuHeaderTemplate;
|
|
886
|
+
@let submenuHeader = submenuHeaderTemplate() ?? _submenuHeaderTemplate();
|
|
908
887
|
@if (submenuHeader) {
|
|
909
888
|
<ng-container *ngTemplateOutlet="submenuHeader; context: { $implicit: submenu }"></ng-container>
|
|
910
889
|
} @else {
|
|
@@ -923,62 +902,62 @@ class Menu extends BaseComponent {
|
|
|
923
902
|
}
|
|
924
903
|
@if (!item.separator && item.visible !== false && (item.visible !== undefined || submenu.visible !== false)) {
|
|
925
904
|
<li
|
|
926
|
-
[class]="cn(cx('item', { item, id: menuitemId(item,
|
|
905
|
+
[class]="cn(cx('item', { item, id: menuitemId(item, _id(), i, j) }), item?.styleClass)"
|
|
927
906
|
[pBind]="ptm('item')"
|
|
928
907
|
[pMenuItemContent]="item"
|
|
929
|
-
[itemTemplate]="itemTemplate() ?? _itemTemplate"
|
|
908
|
+
[itemTemplate]="itemTemplate() ?? _itemTemplate()"
|
|
930
909
|
[idx]="j"
|
|
931
|
-
[menuitemId]="menuitemId(item,
|
|
910
|
+
[menuitemId]="menuitemId(item, _id(), i, j)"
|
|
932
911
|
[style]="item.style"
|
|
933
|
-
(onMenuItemClick)="itemClick($event, menuitemId(item,
|
|
912
|
+
(onMenuItemClick)="itemClick($event, menuitemId(item, _id(), i, j))"
|
|
934
913
|
pTooltip
|
|
935
914
|
[tooltipOptions]="item.tooltipOptions"
|
|
936
915
|
[pTooltipUnstyled]="unstyled()"
|
|
937
916
|
[unstyled]="unstyled()"
|
|
938
917
|
role="menuitem"
|
|
939
918
|
[attr.aria-label]="label(item.label)"
|
|
940
|
-
[attr.data-p-focused]="isItemFocused(menuitemId(item,
|
|
919
|
+
[attr.data-p-focused]="isItemFocused(menuitemId(item, _id(), i, j))"
|
|
941
920
|
[attr.data-p-disabled]="disabled(item.disabled)"
|
|
942
921
|
[attr.aria-disabled]="disabled(item.disabled)"
|
|
943
|
-
[attr.id]="menuitemId(item,
|
|
922
|
+
[attr.id]="menuitemId(item, _id(), i, j)"
|
|
944
923
|
></li>
|
|
945
924
|
}
|
|
946
925
|
}
|
|
947
926
|
}
|
|
948
927
|
}
|
|
949
928
|
@if (!hasSubMenu()) {
|
|
950
|
-
@for (item of model; track item; let i = $index) {
|
|
929
|
+
@for (item of model(); track item; let i = $index) {
|
|
951
930
|
@if (item.separator && item.visible !== false) {
|
|
952
931
|
<li [class]="cx('separator')" [pBind]="ptm('separator')" role="separator" [attr.data-pc-section]="'separator'"></li>
|
|
953
932
|
}
|
|
954
933
|
@if (!item.separator && item.visible !== false) {
|
|
955
934
|
<li
|
|
956
|
-
[class]="cn(cx('item', { item, id: menuitemId(item,
|
|
935
|
+
[class]="cn(cx('item', { item, id: menuitemId(item, _id(), i) }), item?.styleClass)"
|
|
957
936
|
[pBind]="ptm('item')"
|
|
958
937
|
[pMenuItemContent]="item"
|
|
959
|
-
[itemTemplate]="itemTemplate() ?? _itemTemplate"
|
|
938
|
+
[itemTemplate]="itemTemplate() ?? _itemTemplate()"
|
|
960
939
|
[idx]="i"
|
|
961
|
-
[menuitemId]="menuitemId(item,
|
|
940
|
+
[menuitemId]="menuitemId(item, _id(), i)"
|
|
962
941
|
[ngStyle]="item.style"
|
|
963
|
-
(onMenuItemClick)="itemClick($event, menuitemId(item,
|
|
942
|
+
(onMenuItemClick)="itemClick($event, menuitemId(item, _id(), i))"
|
|
964
943
|
pTooltip
|
|
965
944
|
[tooltipOptions]="item.tooltipOptions"
|
|
966
945
|
[unstyled]="unstyled()"
|
|
967
946
|
[pTooltipUnstyled]="unstyled()"
|
|
968
947
|
role="menuitem"
|
|
969
948
|
[attr.aria-label]="label(item.label)"
|
|
970
|
-
[attr.data-p-focused]="isItemFocused(menuitemId(item,
|
|
949
|
+
[attr.data-p-focused]="isItemFocused(menuitemId(item, _id(), i))"
|
|
971
950
|
[attr.data-p-disabled]="disabled(item.disabled)"
|
|
972
951
|
[attr.aria-disabled]="disabled(item.disabled)"
|
|
973
|
-
[attr.id]="menuitemId(item,
|
|
952
|
+
[attr.id]="menuitemId(item, _id(), i)"
|
|
974
953
|
></li>
|
|
975
954
|
}
|
|
976
955
|
}
|
|
977
956
|
}
|
|
978
957
|
</ul>
|
|
979
|
-
@if (endTemplate() ?? _endTemplate) {
|
|
958
|
+
@if (endTemplate() ?? _endTemplate()) {
|
|
980
959
|
<div [class]="cx('end')" [pBind]="ptm('end')" [attr.data-pc-section]="'end'">
|
|
981
|
-
<ng-container *ngTemplateOutlet="endTemplate() ?? _endTemplate"></ng-container>
|
|
960
|
+
<ng-container *ngTemplateOutlet="endTemplate() ?? _endTemplate()"></ng-container>
|
|
982
961
|
</div>
|
|
983
962
|
}
|
|
984
963
|
</div>
|
|
@@ -989,30 +968,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
989
968
|
type: Component,
|
|
990
969
|
args: [{
|
|
991
970
|
selector: 'p-menu',
|
|
992
|
-
standalone: true,
|
|
993
971
|
imports: [CommonModule, RouterModule, MenuItemContent, TooltipModule, BadgeModule, SharedModule, SafeHtmlPipe, BindModule, MotionModule],
|
|
994
972
|
template: `
|
|
995
|
-
@if (!popup || overlayVisible) {
|
|
973
|
+
@if (!popup() || overlayVisible()) {
|
|
996
974
|
<div
|
|
997
975
|
#container
|
|
998
|
-
[class]="cn(cx('root'), styleClass)"
|
|
976
|
+
[class]="cn(cx('root'), styleClass())"
|
|
999
977
|
[style]="sx('root')"
|
|
1000
|
-
[ngStyle]="style"
|
|
978
|
+
[ngStyle]="style()"
|
|
1001
979
|
(click)="onOverlayClick($event)"
|
|
1002
|
-
[attr.id]="
|
|
980
|
+
[attr.id]="_id()"
|
|
1003
981
|
[pBind]="ptm('root')"
|
|
1004
|
-
[attr.data-p]="dataP"
|
|
1005
|
-
[pMotion]="visible || !popup"
|
|
982
|
+
[attr.data-p]="dataP()"
|
|
983
|
+
[pMotion]="visible() || !popup()"
|
|
1006
984
|
[pMotionName]="'p-anchored-overlay'"
|
|
1007
|
-
[pMotionAppear]="!!popup"
|
|
1008
|
-
[pMotionDisabled]="!popup"
|
|
985
|
+
[pMotionAppear]="!!popup()"
|
|
986
|
+
[pMotionDisabled]="!popup()"
|
|
1009
987
|
[pMotionOptions]="computedMotionOptions()"
|
|
1010
988
|
(pMotionOnBeforeEnter)="onOverlayBeforeEnter($event)"
|
|
1011
989
|
(pMotionOnAfterLeave)="onOverlayAfterLeave()"
|
|
1012
990
|
>
|
|
1013
|
-
@if (startTemplate() ?? _startTemplate) {
|
|
991
|
+
@if (startTemplate() ?? _startTemplate()) {
|
|
1014
992
|
<div [class]="cx('start')" [pBind]="ptm('start')" [attr.data-pc-section]="'start'">
|
|
1015
|
-
<ng-container *ngTemplateOutlet="startTemplate() ?? _startTemplate"></ng-container>
|
|
993
|
+
<ng-container *ngTemplateOutlet="startTemplate() ?? _startTemplate()"></ng-container>
|
|
1016
994
|
</div>
|
|
1017
995
|
}
|
|
1018
996
|
<ul
|
|
@@ -1020,18 +998,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1020
998
|
[class]="cx('list')"
|
|
1021
999
|
[pBind]="ptm('list')"
|
|
1022
1000
|
role="menu"
|
|
1023
|
-
[attr.id]="
|
|
1001
|
+
[attr.id]="_id() + '_list'"
|
|
1024
1002
|
[attr.tabindex]="getTabIndexValue()"
|
|
1025
1003
|
[attr.data-pc-section]="'menu'"
|
|
1026
1004
|
[attr.aria-activedescendant]="activedescendant()"
|
|
1027
|
-
[attr.aria-label]="ariaLabel"
|
|
1028
|
-
[attr.aria-labelledBy]="ariaLabelledBy"
|
|
1005
|
+
[attr.aria-label]="ariaLabel()"
|
|
1006
|
+
[attr.aria-labelledBy]="ariaLabelledBy()"
|
|
1029
1007
|
(focus)="onListFocus($event)"
|
|
1030
1008
|
(blur)="onListBlur($event)"
|
|
1031
1009
|
(keydown)="onListKeyDown($event)"
|
|
1032
1010
|
>
|
|
1033
1011
|
@if (hasSubMenu()) {
|
|
1034
|
-
@for (submenu of model; track submenu; let i = $index) {
|
|
1012
|
+
@for (submenu of model(); track submenu; let i = $index) {
|
|
1035
1013
|
@if (submenu.visible !== false) {
|
|
1036
1014
|
@if (submenu.separator) {
|
|
1037
1015
|
<li [class]="cx('separator')" [pBind]="ptm('separator')" role="separator" [attr.data-pc-section]="'separator'"></li>
|
|
@@ -1044,10 +1022,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1044
1022
|
[tooltipOptions]="submenu.tooltipOptions"
|
|
1045
1023
|
[pTooltipUnstyled]="unstyled()"
|
|
1046
1024
|
role="none"
|
|
1047
|
-
[attr.id]="menuitemId(submenu,
|
|
1025
|
+
[attr.id]="menuitemId(submenu, _id(), i)"
|
|
1048
1026
|
[attr.data-pc-section]="'submenulabel'"
|
|
1049
1027
|
>
|
|
1050
|
-
@let submenuHeader = submenuHeaderTemplate() ?? _submenuHeaderTemplate;
|
|
1028
|
+
@let submenuHeader = submenuHeaderTemplate() ?? _submenuHeaderTemplate();
|
|
1051
1029
|
@if (submenuHeader) {
|
|
1052
1030
|
<ng-container *ngTemplateOutlet="submenuHeader; context: { $implicit: submenu }"></ng-container>
|
|
1053
1031
|
} @else {
|
|
@@ -1066,62 +1044,62 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1066
1044
|
}
|
|
1067
1045
|
@if (!item.separator && item.visible !== false && (item.visible !== undefined || submenu.visible !== false)) {
|
|
1068
1046
|
<li
|
|
1069
|
-
[class]="cn(cx('item', { item, id: menuitemId(item,
|
|
1047
|
+
[class]="cn(cx('item', { item, id: menuitemId(item, _id(), i, j) }), item?.styleClass)"
|
|
1070
1048
|
[pBind]="ptm('item')"
|
|
1071
1049
|
[pMenuItemContent]="item"
|
|
1072
|
-
[itemTemplate]="itemTemplate() ?? _itemTemplate"
|
|
1050
|
+
[itemTemplate]="itemTemplate() ?? _itemTemplate()"
|
|
1073
1051
|
[idx]="j"
|
|
1074
|
-
[menuitemId]="menuitemId(item,
|
|
1052
|
+
[menuitemId]="menuitemId(item, _id(), i, j)"
|
|
1075
1053
|
[style]="item.style"
|
|
1076
|
-
(onMenuItemClick)="itemClick($event, menuitemId(item,
|
|
1054
|
+
(onMenuItemClick)="itemClick($event, menuitemId(item, _id(), i, j))"
|
|
1077
1055
|
pTooltip
|
|
1078
1056
|
[tooltipOptions]="item.tooltipOptions"
|
|
1079
1057
|
[pTooltipUnstyled]="unstyled()"
|
|
1080
1058
|
[unstyled]="unstyled()"
|
|
1081
1059
|
role="menuitem"
|
|
1082
1060
|
[attr.aria-label]="label(item.label)"
|
|
1083
|
-
[attr.data-p-focused]="isItemFocused(menuitemId(item,
|
|
1061
|
+
[attr.data-p-focused]="isItemFocused(menuitemId(item, _id(), i, j))"
|
|
1084
1062
|
[attr.data-p-disabled]="disabled(item.disabled)"
|
|
1085
1063
|
[attr.aria-disabled]="disabled(item.disabled)"
|
|
1086
|
-
[attr.id]="menuitemId(item,
|
|
1064
|
+
[attr.id]="menuitemId(item, _id(), i, j)"
|
|
1087
1065
|
></li>
|
|
1088
1066
|
}
|
|
1089
1067
|
}
|
|
1090
1068
|
}
|
|
1091
1069
|
}
|
|
1092
1070
|
@if (!hasSubMenu()) {
|
|
1093
|
-
@for (item of model; track item; let i = $index) {
|
|
1071
|
+
@for (item of model(); track item; let i = $index) {
|
|
1094
1072
|
@if (item.separator && item.visible !== false) {
|
|
1095
1073
|
<li [class]="cx('separator')" [pBind]="ptm('separator')" role="separator" [attr.data-pc-section]="'separator'"></li>
|
|
1096
1074
|
}
|
|
1097
1075
|
@if (!item.separator && item.visible !== false) {
|
|
1098
1076
|
<li
|
|
1099
|
-
[class]="cn(cx('item', { item, id: menuitemId(item,
|
|
1077
|
+
[class]="cn(cx('item', { item, id: menuitemId(item, _id(), i) }), item?.styleClass)"
|
|
1100
1078
|
[pBind]="ptm('item')"
|
|
1101
1079
|
[pMenuItemContent]="item"
|
|
1102
|
-
[itemTemplate]="itemTemplate() ?? _itemTemplate"
|
|
1080
|
+
[itemTemplate]="itemTemplate() ?? _itemTemplate()"
|
|
1103
1081
|
[idx]="i"
|
|
1104
|
-
[menuitemId]="menuitemId(item,
|
|
1082
|
+
[menuitemId]="menuitemId(item, _id(), i)"
|
|
1105
1083
|
[ngStyle]="item.style"
|
|
1106
|
-
(onMenuItemClick)="itemClick($event, menuitemId(item,
|
|
1084
|
+
(onMenuItemClick)="itemClick($event, menuitemId(item, _id(), i))"
|
|
1107
1085
|
pTooltip
|
|
1108
1086
|
[tooltipOptions]="item.tooltipOptions"
|
|
1109
1087
|
[unstyled]="unstyled()"
|
|
1110
1088
|
[pTooltipUnstyled]="unstyled()"
|
|
1111
1089
|
role="menuitem"
|
|
1112
1090
|
[attr.aria-label]="label(item.label)"
|
|
1113
|
-
[attr.data-p-focused]="isItemFocused(menuitemId(item,
|
|
1091
|
+
[attr.data-p-focused]="isItemFocused(menuitemId(item, _id(), i))"
|
|
1114
1092
|
[attr.data-p-disabled]="disabled(item.disabled)"
|
|
1115
1093
|
[attr.aria-disabled]="disabled(item.disabled)"
|
|
1116
|
-
[attr.id]="menuitemId(item,
|
|
1094
|
+
[attr.id]="menuitemId(item, _id(), i)"
|
|
1117
1095
|
></li>
|
|
1118
1096
|
}
|
|
1119
1097
|
}
|
|
1120
1098
|
}
|
|
1121
1099
|
</ul>
|
|
1122
|
-
@if (endTemplate() ?? _endTemplate) {
|
|
1100
|
+
@if (endTemplate() ?? _endTemplate()) {
|
|
1123
1101
|
<div [class]="cx('end')" [pBind]="ptm('end')" [attr.data-pc-section]="'end'">
|
|
1124
|
-
<ng-container *ngTemplateOutlet="endTemplate() ?? _endTemplate"></ng-container>
|
|
1102
|
+
<ng-container *ngTemplateOutlet="endTemplate() ?? _endTemplate()"></ng-container>
|
|
1125
1103
|
</div>
|
|
1126
1104
|
}
|
|
1127
1105
|
</div>
|
|
@@ -1129,38 +1107,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1129
1107
|
`,
|
|
1130
1108
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1131
1109
|
encapsulation: ViewEncapsulation.None,
|
|
1132
|
-
providers: [MenuStyle, { provide:
|
|
1110
|
+
providers: [MenuStyle, { provide: PARENT_INSTANCE, useExisting: Menu }],
|
|
1133
1111
|
hostDirectives: [Bind]
|
|
1134
1112
|
}]
|
|
1135
|
-
}], ctorParameters: () => [], propDecorators: { model: [{
|
|
1136
|
-
type: Input
|
|
1137
|
-
}], popup: [{
|
|
1138
|
-
type: Input,
|
|
1139
|
-
args: [{ transform: booleanAttribute }]
|
|
1140
|
-
}], style: [{
|
|
1141
|
-
type: Input
|
|
1142
|
-
}], styleClass: [{
|
|
1143
|
-
type: Input
|
|
1144
|
-
}], autoZIndex: [{
|
|
1145
|
-
type: Input,
|
|
1146
|
-
args: [{ transform: booleanAttribute }]
|
|
1147
|
-
}], baseZIndex: [{
|
|
1148
|
-
type: Input,
|
|
1149
|
-
args: [{ transform: numberAttribute }]
|
|
1150
|
-
}], showTransitionOptions: [{
|
|
1151
|
-
type: Input
|
|
1152
|
-
}], hideTransitionOptions: [{
|
|
1153
|
-
type: Input
|
|
1154
|
-
}], ariaLabel: [{
|
|
1155
|
-
type: Input
|
|
1156
|
-
}], ariaLabelledBy: [{
|
|
1157
|
-
type: Input
|
|
1158
|
-
}], id: [{
|
|
1159
|
-
type: Input
|
|
1160
|
-
}], tabindex: [{
|
|
1161
|
-
type: Input,
|
|
1162
|
-
args: [{ transform: numberAttribute }]
|
|
1163
|
-
}], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], listViewChild: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }], containerViewChild: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], startTemplate: [{ type: i0.ContentChild, args: ['start', { ...{ descendants: false }, isSignal: true }] }], endTemplate: [{ type: i0.ContentChild, args: ['end', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], submenuHeaderTemplate: [{ type: i0.ContentChild, args: ['submenuheader', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
1113
|
+
}], ctorParameters: () => [], propDecorators: { model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], popup: [{ type: i0.Input, args: [{ isSignal: true, alias: "popup", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], autoZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoZIndex", required: false }] }], baseZIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "baseZIndex", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], appendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "appendTo", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], onShow: [{ type: i0.Output, args: ["onShow"] }], onHide: [{ type: i0.Output, args: ["onHide"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], listViewChild: [{ type: i0.ViewChild, args: ['list', { isSignal: true }] }], containerViewChild: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], startTemplate: [{ type: i0.ContentChild, args: ['start', { ...{ descendants: false }, isSignal: true }] }], endTemplate: [{ type: i0.ContentChild, args: ['end', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], submenuHeaderTemplate: [{ type: i0.ContentChild, args: ['submenuheader', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
1164
1114
|
class MenuModule {
|
|
1165
1115
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1166
1116
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: MenuModule, imports: [Menu, SharedModule, SafeHtmlPipe], exports: [Menu, SharedModule, SafeHtmlPipe] });
|