@exhaustive-ui/core 3.0.0-alpha.0 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +6 -13
- package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
- 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 +379 -451
- 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 +157 -332
- package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
- package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
- 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 +1012 -1157
- package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
- 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 +486 -541
- 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-baseicon.mjs +8 -13
- package/fesm2022/exhaustive-ui-core-icons-baseicon.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 +64 -98
- 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 +365 -546
- package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
- package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
- 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-multiselect.mjs +647 -835
- 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 +557 -655
- 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 +581 -784
- 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 +2213 -2543
- 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 +318 -394
- 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 +327 -421
- 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 +5 -5
- 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 +7 -2
- 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/megamenu';
|
|
|
2
2
|
import * as i2 from '@angular/common';
|
|
3
3
|
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, InjectionToken, inject,
|
|
5
|
+
import { Injectable, InjectionToken, inject, input, numberAttribute, booleanAttribute, output, forwardRef, afterEveryRender, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, contentChild, contentChildren, viewChild, signal, effect, untracked, NgModule } from '@angular/core';
|
|
6
6
|
import * as i3 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
8
|
import { resolve, isNotEmpty, uuid, isEmpty, focus, findSingle, isPrintableCharacter, findLastIndex, isTouchDevice } from '@exhaustive-ui/utils';
|
|
@@ -21,16 +21,16 @@ import { style } from '@exhaustive-ui/styles/megamenu';
|
|
|
21
21
|
import { BaseStyle } from '@exhaustive-ui/core/base';
|
|
22
22
|
|
|
23
23
|
const inlineStyles = {
|
|
24
|
-
rootList: ({ instance }) => ({ 'max-height': instance.scrollHeight, overflow: 'auto' })
|
|
24
|
+
rootList: ({ instance }) => ({ 'max-height': instance.scrollHeight(), overflow: 'auto' })
|
|
25
25
|
};
|
|
26
26
|
const classes = {
|
|
27
27
|
root: ({ instance }) => [
|
|
28
28
|
'p-megamenu p-component',
|
|
29
29
|
{
|
|
30
30
|
'p-megamenu-mobile': instance.queryMatches(),
|
|
31
|
-
'p-megamenu-mobile-active': instance.mobileActive,
|
|
32
|
-
'p-megamenu-horizontal': instance.orientation === 'horizontal',
|
|
33
|
-
'p-megamenu-vertical': instance.orientation === 'vertical'
|
|
31
|
+
'p-megamenu-mobile-active': instance.mobileActive(),
|
|
32
|
+
'p-megamenu-horizontal': instance.orientation() === 'horizontal',
|
|
33
|
+
'p-megamenu-vertical': instance.orientation() === 'vertical'
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
start: 'p-megamenu-start',
|
|
@@ -187,23 +187,32 @@ class MegaMenuSub extends BaseComponent {
|
|
|
187
187
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
188
188
|
$pcMegaMenu = inject(MEGAMENU_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
189
189
|
$pcMegaMenuSub = inject(MEGAMENU_SUB_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
190
|
-
id
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
190
|
+
id = input(undefined, /* @ts-ignore */
|
|
191
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
192
|
+
items = input(undefined, /* @ts-ignore */
|
|
193
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
194
|
+
itemTemplate = input(undefined, /* @ts-ignore */
|
|
195
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
196
|
+
menuId = input(undefined, /* @ts-ignore */
|
|
197
|
+
...(ngDevMode ? [{ debugName: "menuId" }] : /* istanbul ignore next */ []));
|
|
198
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
199
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
200
|
+
ariaLabelledBy = input(undefined, /* @ts-ignore */
|
|
201
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
202
|
+
level = input(0, { ...(ngDevMode ? { debugName: "level" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
203
|
+
focusedItemId = input(undefined, /* @ts-ignore */
|
|
204
|
+
...(ngDevMode ? [{ debugName: "focusedItemId" }] : /* istanbul ignore next */ []));
|
|
205
|
+
orientation = input(undefined, /* @ts-ignore */
|
|
206
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
207
|
+
activeItem = input(/* @ts-ignore */
|
|
208
|
+
...(ngDevMode ? [undefined, { debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
209
|
+
submenu = input(/* @ts-ignore */
|
|
210
|
+
...(ngDevMode ? [undefined, { debugName: "submenu" }] : /* istanbul ignore next */ []));
|
|
211
|
+
mobileActive = input(false, { ...(ngDevMode ? { debugName: "mobileActive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
212
|
+
scrollHeight = input(/* @ts-ignore */
|
|
213
|
+
...(ngDevMode ? [undefined, { debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
|
|
214
|
+
tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
215
|
+
root = input(false, { ...(ngDevMode ? { debugName: "root" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
207
216
|
itemClick = output();
|
|
208
217
|
itemMouseEnter = output();
|
|
209
218
|
menuFocus = output();
|
|
@@ -212,8 +221,9 @@ class MegaMenuSub extends BaseComponent {
|
|
|
212
221
|
menuMouseDown = output();
|
|
213
222
|
megaMenu = inject(forwardRef(() => MegaMenu));
|
|
214
223
|
_componentStyle = inject(MegaMenuStyle);
|
|
215
|
-
|
|
216
|
-
|
|
224
|
+
constructor() {
|
|
225
|
+
super();
|
|
226
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptm(this.root() ? 'rootList' : 'submenu')));
|
|
217
227
|
}
|
|
218
228
|
onItemClick(event, processedItem) {
|
|
219
229
|
this.getItemProp(processedItem, 'command', { originalEvent: event, item: processedItem.item });
|
|
@@ -223,7 +233,7 @@ class MegaMenuSub extends BaseComponent {
|
|
|
223
233
|
return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : undefined;
|
|
224
234
|
}
|
|
225
235
|
getItemId(processedItem) {
|
|
226
|
-
return processedItem.item && processedItem.item?.id ? processedItem.item.id : `${this.menuId}_${processedItem.key}`;
|
|
236
|
+
return processedItem.item && processedItem.item?.id ? processedItem.item.id : `${this.menuId()}_${processedItem.key}`;
|
|
227
237
|
}
|
|
228
238
|
getSubListId(processedItem) {
|
|
229
239
|
return `${this.getItemId(processedItem)}_list`;
|
|
@@ -232,7 +242,7 @@ class MegaMenuSub extends BaseComponent {
|
|
|
232
242
|
return this.getItemProp(processedItem, 'label');
|
|
233
243
|
}
|
|
234
244
|
isSubmenuVisible(submenu) {
|
|
235
|
-
if (this.submenu && !this.root) {
|
|
245
|
+
if (this.submenu() && !this.root()) {
|
|
236
246
|
return this.isItemVisible(submenu);
|
|
237
247
|
}
|
|
238
248
|
else {
|
|
@@ -243,22 +253,26 @@ class MegaMenuSub extends BaseComponent {
|
|
|
243
253
|
return this.getItemProp(processedItem, 'visible') !== false;
|
|
244
254
|
}
|
|
245
255
|
isItemActive(processedItem) {
|
|
246
|
-
|
|
256
|
+
const activeItem = this.activeItem();
|
|
257
|
+
return isNotEmpty(activeItem) ? activeItem.key === processedItem.key : false;
|
|
247
258
|
}
|
|
248
259
|
isItemDisabled(processedItem) {
|
|
249
260
|
return this.getItemProp(processedItem, 'disabled');
|
|
250
261
|
}
|
|
251
262
|
isItemFocused(processedItem) {
|
|
252
|
-
return this.focusedItemId === this.getItemId(processedItem);
|
|
263
|
+
return this.focusedItemId() === this.getItemId(processedItem);
|
|
253
264
|
}
|
|
254
265
|
isItemGroup(processedItem) {
|
|
255
266
|
return isNotEmpty(processedItem.items);
|
|
256
267
|
}
|
|
257
|
-
getAriaSetSize()
|
|
258
|
-
|
|
259
|
-
}
|
|
268
|
+
getAriaSetSize = computed(() => this.items()?.filter((processedItem) => this.isItemVisible(processedItem) && !this.getItemProp(processedItem, 'separator')).length, /* @ts-ignore */
|
|
269
|
+
...(ngDevMode ? [{ debugName: "getAriaSetSize" }] : /* istanbul ignore next */ []));
|
|
260
270
|
getAriaPosInset(index) {
|
|
261
|
-
return index -
|
|
271
|
+
return (index -
|
|
272
|
+
(this.items()
|
|
273
|
+
?.slice(0, index)
|
|
274
|
+
.filter((processedItem) => this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length || 0) +
|
|
275
|
+
1);
|
|
262
276
|
}
|
|
263
277
|
onItemMouseEnter(param) {
|
|
264
278
|
const { event, processedItem } = param;
|
|
@@ -276,17 +290,17 @@ class MegaMenuSub extends BaseComponent {
|
|
|
276
290
|
};
|
|
277
291
|
return this.ptm(key, ptContext);
|
|
278
292
|
}
|
|
279
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MegaMenuSub, deps:
|
|
280
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: MegaMenuSub, isStandalone: true, selector: "p-megaMenuSub, p-megamenu-sub, ul[pMegaMenuSub]", inputs: { id: "id", items: "items", itemTemplate: "itemTemplate", menuId: "menuId", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", level:
|
|
293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MegaMenuSub, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
294
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: MegaMenuSub, isStandalone: true, selector: "p-megaMenuSub, p-megamenu-sub, ul[pMegaMenuSub]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, menuId: { classPropertyName: "menuId", publicName: "menuId", 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 }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, focusedItemId: { classPropertyName: "focusedItemId", publicName: "focusedItemId", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, activeItem: { classPropertyName: "activeItem", publicName: "activeItem", isSignal: true, isRequired: false, transformFunction: null }, submenu: { classPropertyName: "submenu", publicName: "submenu", isSignal: true, isRequired: false, transformFunction: null }, mobileActive: { classPropertyName: "mobileActive", publicName: "mobileActive", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", itemMouseEnter: "itemMouseEnter", menuFocus: "menuFocus", menuBlur: "menuBlur", menuKeydown: "menuKeydown", menuMouseDown: "menuMouseDown" }, host: { listeners: { "keydown": "menuKeydown.emit($event)", "focus": "menuFocus.emit($event)", "blur": "menuBlur.emit($event)", "mousedown": "menuMouseDown.emit($event)" }, properties: { "class": "root() ? cx(\"rootList\") : cx(\"submenu\")", "style": "sx(\"rootList\")", "style.display": "isSubmenuVisible(submenu()) ? null : \"none\"", "attr.role": "root() ? \"menubar\" : \"menu\"", "attr.id": "id()", "attr.aria-orientation": "orientation()", "tabindex": "tabindex()", "attr.aria-activedescendant": "focusedItemId()", "attr.data-pc-section": "root() ? \"rootlist\" : \"submenu\"" } }, providers: [
|
|
281
295
|
{ provide: MEGAMENU_SUB_INSTANCE, useExisting: MegaMenuSub },
|
|
282
296
|
{ provide: PARENT_INSTANCE, useExisting: MegaMenuSub }
|
|
283
297
|
], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
284
|
-
@if (submenu) {
|
|
285
|
-
<li [class]="cn(cx('submenuLabel'), getItemProp(submenu, 'class'))" [style]="getItemProp(submenu, 'style')" role="presentation" [pBind]="ptm('submenuLabel')">
|
|
286
|
-
{{ getItemLabel(submenu) }}
|
|
298
|
+
@if (submenu()) {
|
|
299
|
+
<li [class]="cn(cx('submenuLabel'), getItemProp(submenu(), 'class'))" [style]="getItemProp(submenu(), 'style')" role="presentation" [pBind]="ptm('submenuLabel')">
|
|
300
|
+
{{ getItemLabel(submenu()) }}
|
|
287
301
|
</li>
|
|
288
302
|
}
|
|
289
|
-
@for (processedItem of items; track processedItem; let index = $index) {
|
|
303
|
+
@for (processedItem of items(); track processedItem; let index = $index) {
|
|
290
304
|
@if (isItemVisible(processedItem) && getItemProp(processedItem, 'separator')) {
|
|
291
305
|
<li [attr.id]="getItemId(processedItem)" [style]="getItemProp(processedItem, 'style')" [class]="cn(cx('separator'), this.getItemProp(processedItem, 'class'))" role="separator" [pBind]="ptm('separator')"></li>
|
|
292
306
|
}
|
|
@@ -302,7 +316,7 @@ class MegaMenuSub extends BaseComponent {
|
|
|
302
316
|
[attr.aria-disabled]="isItemDisabled(processedItem) || undefined"
|
|
303
317
|
[attr.aria-haspopup]="isItemGroup(processedItem) && !getItemProp(processedItem, 'to') ? 'menu' : undefined"
|
|
304
318
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
305
|
-
[attr.aria-level]="level + 1"
|
|
319
|
+
[attr.aria-level]="level() + 1"
|
|
306
320
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
307
321
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
308
322
|
[ngStyle]="getItemProp(processedItem, 'style')"
|
|
@@ -313,7 +327,7 @@ class MegaMenuSub extends BaseComponent {
|
|
|
313
327
|
[pTooltipUnstyled]="unstyled()"
|
|
314
328
|
>
|
|
315
329
|
<div [class]="cx('itemContent')" [pBind]="getPTOptions(processedItem, index, 'itemContent')" (click)="onItemClick($event, processedItem)" (mouseenter)="onItemMouseEnter({ $event, processedItem })">
|
|
316
|
-
@if (!itemTemplate) {
|
|
330
|
+
@if (!itemTemplate()) {
|
|
317
331
|
@if (!getItemProp(processedItem, 'routerLink')) {
|
|
318
332
|
<a
|
|
319
333
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
@@ -351,16 +365,16 @@ class MegaMenuSub extends BaseComponent {
|
|
|
351
365
|
<p-badge [class]="getItemProp(processedItem, 'badgeStyleClass')" [value]="getItemProp(processedItem, 'badge')" [unstyled]="unstyled()" />
|
|
352
366
|
}
|
|
353
367
|
@if (isItemGroup(processedItem)) {
|
|
354
|
-
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate) {
|
|
355
|
-
@if (orientation === 'horizontal' || mobileActive) {
|
|
368
|
+
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate()) {
|
|
369
|
+
@if (orientation() === 'horizontal' || mobileActive()) {
|
|
356
370
|
<svg data-p-icon="angle-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
357
371
|
} @else {
|
|
358
|
-
@if (orientation === 'vertical') {
|
|
372
|
+
@if (orientation() === 'vertical') {
|
|
359
373
|
<svg data-p-icon="angle-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
360
374
|
}
|
|
361
375
|
}
|
|
362
376
|
}
|
|
363
|
-
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate" [attr.aria-hidden]="true"></ng-template>
|
|
377
|
+
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate()" [attr.aria-hidden]="true"></ng-template>
|
|
364
378
|
}
|
|
365
379
|
</a>
|
|
366
380
|
}
|
|
@@ -406,24 +420,24 @@ class MegaMenuSub extends BaseComponent {
|
|
|
406
420
|
></span>
|
|
407
421
|
}
|
|
408
422
|
@if (getItemProp(processedItem, 'badge')) {
|
|
409
|
-
<p-badge [
|
|
423
|
+
<p-badge [class]="getItemProp(processedItem, 'badgeStyleClass')" [value]="getItemProp(processedItem, 'badge')" [unstyled]="unstyled()" />
|
|
410
424
|
}
|
|
411
425
|
@if (isItemGroup(processedItem)) {
|
|
412
|
-
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate) {
|
|
413
|
-
@if (orientation === 'horizontal') {
|
|
426
|
+
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate()) {
|
|
427
|
+
@if (orientation() === 'horizontal') {
|
|
414
428
|
<svg data-p-icon="angle-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
415
429
|
}
|
|
416
|
-
@if (orientation === 'vertical') {
|
|
430
|
+
@if (orientation() === 'vertical') {
|
|
417
431
|
<svg data-p-icon="angle-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
418
432
|
}
|
|
419
433
|
}
|
|
420
|
-
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate" [attr.aria-hidden]="true"></ng-template>
|
|
434
|
+
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate()" [attr.aria-hidden]="true"></ng-template>
|
|
421
435
|
}
|
|
422
436
|
</a>
|
|
423
437
|
}
|
|
424
438
|
}
|
|
425
|
-
@if (itemTemplate) {
|
|
426
|
-
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
439
|
+
@if (itemTemplate()) {
|
|
440
|
+
<ng-template *ngTemplateOutlet="itemTemplate(); context: { $implicit: processedItem.item }"></ng-template>
|
|
427
441
|
}
|
|
428
442
|
</div>
|
|
429
443
|
@if (isItemVisible(processedItem) && isItemGroup(processedItem)) {
|
|
@@ -437,11 +451,11 @@ class MegaMenuSub extends BaseComponent {
|
|
|
437
451
|
[id]="getSubListId(submenu)"
|
|
438
452
|
[submenu]="submenu"
|
|
439
453
|
[items]="submenu.items"
|
|
440
|
-
[itemTemplate]="itemTemplate"
|
|
441
|
-
[mobileActive]="mobileActive"
|
|
442
|
-
[menuId]="menuId"
|
|
443
|
-
[focusedItemId]="focusedItemId"
|
|
444
|
-
[level]="level + 1"
|
|
454
|
+
[itemTemplate]="itemTemplate()"
|
|
455
|
+
[mobileActive]="mobileActive()"
|
|
456
|
+
[menuId]="menuId()"
|
|
457
|
+
[focusedItemId]="focusedItemId()"
|
|
458
|
+
[level]="level() + 1"
|
|
445
459
|
[root]="false"
|
|
446
460
|
(itemClick)="itemClick.emit($event)"
|
|
447
461
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
@@ -457,22 +471,21 @@ class MegaMenuSub extends BaseComponent {
|
|
|
457
471
|
</li>
|
|
458
472
|
}
|
|
459
473
|
}
|
|
460
|
-
`, isInline: true, dependencies: [{ kind: "component", type: MegaMenuSub, selector: "p-megaMenuSub, p-megamenu-sub, ul[pMegaMenuSub]", inputs: ["id", "items", "itemTemplate", "menuId", "ariaLabel", "ariaLabelledBy", "level", "focusedItemId", "
|
|
474
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MegaMenuSub, selector: "p-megaMenuSub, p-megamenu-sub, ul[pMegaMenuSub]", inputs: ["id", "items", "itemTemplate", "menuId", "ariaLabel", "ariaLabelledBy", "level", "focusedItemId", "orientation", "activeItem", "submenu", "mobileActive", "scrollHeight", "tabindex", "root"], outputs: ["itemClick", "itemMouseEnter", "menuFocus", "menuBlur", "menuKeydown", "menuMouseDown"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i4.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "showOnEllipsis", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo", "ptTooltip", "pTooltipPT", "pTooltipUnstyled"] }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }, { kind: "component", type: AngleDownIcon, selector: "[data-p-icon=\"angle-down\"]" }, { kind: "component", type: AngleRightIcon, selector: "[data-p-icon=\"angle-right\"]" }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i5.Badge, selector: "p-badge", inputs: ["badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
461
475
|
}
|
|
462
476
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MegaMenuSub, decorators: [{
|
|
463
477
|
type: Component,
|
|
464
478
|
args: [{
|
|
465
|
-
changeDetection: ChangeDetectionStrategy.
|
|
479
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
466
480
|
selector: 'p-megaMenuSub, p-megamenu-sub, ul[pMegaMenuSub]',
|
|
467
|
-
standalone: true,
|
|
468
481
|
imports: [CommonModule, RouterModule, Ripple, TooltipModule, AngleDownIcon, AngleRightIcon, BadgeModule, SharedModule, Bind],
|
|
469
482
|
template: `
|
|
470
|
-
@if (submenu) {
|
|
471
|
-
<li [class]="cn(cx('submenuLabel'), getItemProp(submenu, 'class'))" [style]="getItemProp(submenu, 'style')" role="presentation" [pBind]="ptm('submenuLabel')">
|
|
472
|
-
{{ getItemLabel(submenu) }}
|
|
483
|
+
@if (submenu()) {
|
|
484
|
+
<li [class]="cn(cx('submenuLabel'), getItemProp(submenu(), 'class'))" [style]="getItemProp(submenu(), 'style')" role="presentation" [pBind]="ptm('submenuLabel')">
|
|
485
|
+
{{ getItemLabel(submenu()) }}
|
|
473
486
|
</li>
|
|
474
487
|
}
|
|
475
|
-
@for (processedItem of items; track processedItem; let index = $index) {
|
|
488
|
+
@for (processedItem of items(); track processedItem; let index = $index) {
|
|
476
489
|
@if (isItemVisible(processedItem) && getItemProp(processedItem, 'separator')) {
|
|
477
490
|
<li [attr.id]="getItemId(processedItem)" [style]="getItemProp(processedItem, 'style')" [class]="cn(cx('separator'), this.getItemProp(processedItem, 'class'))" role="separator" [pBind]="ptm('separator')"></li>
|
|
478
491
|
}
|
|
@@ -488,7 +501,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
488
501
|
[attr.aria-disabled]="isItemDisabled(processedItem) || undefined"
|
|
489
502
|
[attr.aria-haspopup]="isItemGroup(processedItem) && !getItemProp(processedItem, 'to') ? 'menu' : undefined"
|
|
490
503
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
491
|
-
[attr.aria-level]="level + 1"
|
|
504
|
+
[attr.aria-level]="level() + 1"
|
|
492
505
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
493
506
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
494
507
|
[ngStyle]="getItemProp(processedItem, 'style')"
|
|
@@ -499,7 +512,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
499
512
|
[pTooltipUnstyled]="unstyled()"
|
|
500
513
|
>
|
|
501
514
|
<div [class]="cx('itemContent')" [pBind]="getPTOptions(processedItem, index, 'itemContent')" (click)="onItemClick($event, processedItem)" (mouseenter)="onItemMouseEnter({ $event, processedItem })">
|
|
502
|
-
@if (!itemTemplate) {
|
|
515
|
+
@if (!itemTemplate()) {
|
|
503
516
|
@if (!getItemProp(processedItem, 'routerLink')) {
|
|
504
517
|
<a
|
|
505
518
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
@@ -537,16 +550,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
537
550
|
<p-badge [class]="getItemProp(processedItem, 'badgeStyleClass')" [value]="getItemProp(processedItem, 'badge')" [unstyled]="unstyled()" />
|
|
538
551
|
}
|
|
539
552
|
@if (isItemGroup(processedItem)) {
|
|
540
|
-
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate) {
|
|
541
|
-
@if (orientation === 'horizontal' || mobileActive) {
|
|
553
|
+
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate()) {
|
|
554
|
+
@if (orientation() === 'horizontal' || mobileActive()) {
|
|
542
555
|
<svg data-p-icon="angle-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
543
556
|
} @else {
|
|
544
|
-
@if (orientation === 'vertical') {
|
|
557
|
+
@if (orientation() === 'vertical') {
|
|
545
558
|
<svg data-p-icon="angle-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
546
559
|
}
|
|
547
560
|
}
|
|
548
561
|
}
|
|
549
|
-
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate" [attr.aria-hidden]="true"></ng-template>
|
|
562
|
+
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate()" [attr.aria-hidden]="true"></ng-template>
|
|
550
563
|
}
|
|
551
564
|
</a>
|
|
552
565
|
}
|
|
@@ -592,24 +605,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
592
605
|
></span>
|
|
593
606
|
}
|
|
594
607
|
@if (getItemProp(processedItem, 'badge')) {
|
|
595
|
-
<p-badge [
|
|
608
|
+
<p-badge [class]="getItemProp(processedItem, 'badgeStyleClass')" [value]="getItemProp(processedItem, 'badge')" [unstyled]="unstyled()" />
|
|
596
609
|
}
|
|
597
610
|
@if (isItemGroup(processedItem)) {
|
|
598
|
-
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate) {
|
|
599
|
-
@if (orientation === 'horizontal') {
|
|
611
|
+
@if (!megaMenu.submenuIconTemplate() && !megaMenu._submenuIconTemplate()) {
|
|
612
|
+
@if (orientation() === 'horizontal') {
|
|
600
613
|
<svg data-p-icon="angle-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
601
614
|
}
|
|
602
|
-
@if (orientation === 'vertical') {
|
|
615
|
+
@if (orientation() === 'vertical') {
|
|
603
616
|
<svg data-p-icon="angle-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions(processedItem, index, 'submenuIcon')" [attr.aria-hidden]="true" />
|
|
604
617
|
}
|
|
605
618
|
}
|
|
606
|
-
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate" [attr.aria-hidden]="true"></ng-template>
|
|
619
|
+
<ng-template *ngTemplateOutlet="megaMenu.submenuIconTemplate() || megaMenu._submenuIconTemplate()" [attr.aria-hidden]="true"></ng-template>
|
|
607
620
|
}
|
|
608
621
|
</a>
|
|
609
622
|
}
|
|
610
623
|
}
|
|
611
|
-
@if (itemTemplate) {
|
|
612
|
-
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
624
|
+
@if (itemTemplate()) {
|
|
625
|
+
<ng-template *ngTemplateOutlet="itemTemplate(); context: { $implicit: processedItem.item }"></ng-template>
|
|
613
626
|
}
|
|
614
627
|
</div>
|
|
615
628
|
@if (isItemVisible(processedItem) && isItemGroup(processedItem)) {
|
|
@@ -623,11 +636,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
623
636
|
[id]="getSubListId(submenu)"
|
|
624
637
|
[submenu]="submenu"
|
|
625
638
|
[items]="submenu.items"
|
|
626
|
-
[itemTemplate]="itemTemplate"
|
|
627
|
-
[mobileActive]="mobileActive"
|
|
628
|
-
[menuId]="menuId"
|
|
629
|
-
[focusedItemId]="focusedItemId"
|
|
630
|
-
[level]="level + 1"
|
|
639
|
+
[itemTemplate]="itemTemplate()"
|
|
640
|
+
[mobileActive]="mobileActive()"
|
|
641
|
+
[menuId]="menuId()"
|
|
642
|
+
[focusedItemId]="focusedItemId()"
|
|
643
|
+
[level]="level() + 1"
|
|
631
644
|
[root]="false"
|
|
632
645
|
(itemClick)="itemClick.emit($event)"
|
|
633
646
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
@@ -650,15 +663,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
650
663
|
{ provide: PARENT_INSTANCE, useExisting: MegaMenuSub }
|
|
651
664
|
],
|
|
652
665
|
host: {
|
|
653
|
-
'[class]': 'root ? cx("rootList") : cx("submenu")',
|
|
666
|
+
'[class]': 'root() ? cx("rootList") : cx("submenu")',
|
|
654
667
|
'[style]': 'sx("rootList")',
|
|
655
|
-
'[style.display]': 'isSubmenuVisible(submenu) ? null : "none"',
|
|
656
|
-
'[attr.role]': 'root ? "menubar" : "menu"',
|
|
657
|
-
'[attr.id]': 'id',
|
|
658
|
-
'[attr.aria-orientation]': 'orientation',
|
|
659
|
-
'[tabindex]': 'tabindex',
|
|
660
|
-
'[attr.aria-activedescendant]': 'focusedItemId',
|
|
661
|
-
'[attr.data-pc-section]': 'root ? "rootlist" : "submenu"',
|
|
668
|
+
'[style.display]': 'isSubmenuVisible(submenu()) ? null : "none"',
|
|
669
|
+
'[attr.role]': 'root() ? "menubar" : "menu"',
|
|
670
|
+
'[attr.id]': 'id()',
|
|
671
|
+
'[attr.aria-orientation]': 'orientation()',
|
|
672
|
+
'[tabindex]': 'tabindex()',
|
|
673
|
+
'[attr.aria-activedescendant]': 'focusedItemId()',
|
|
674
|
+
'[attr.data-pc-section]': 'root() ? "rootlist" : "submenu"',
|
|
662
675
|
'(keydown)': 'menuKeydown.emit($event)',
|
|
663
676
|
'(focus)': 'menuFocus.emit($event)',
|
|
664
677
|
'(blur)': 'menuBlur.emit($event)',
|
|
@@ -666,47 +679,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
666
679
|
},
|
|
667
680
|
hostDirectives: [Bind]
|
|
668
681
|
}]
|
|
669
|
-
}], propDecorators: { id: [{
|
|
670
|
-
type: Input
|
|
671
|
-
}], items: [{
|
|
672
|
-
type: Input
|
|
673
|
-
}], itemTemplate: [{
|
|
674
|
-
type: Input
|
|
675
|
-
}], menuId: [{
|
|
676
|
-
type: Input
|
|
677
|
-
}], ariaLabel: [{
|
|
678
|
-
type: Input
|
|
679
|
-
}], ariaLabelledBy: [{
|
|
680
|
-
type: Input
|
|
681
|
-
}], level: [{
|
|
682
|
-
type: Input,
|
|
683
|
-
args: [{ transform: numberAttribute }]
|
|
684
|
-
}], focusedItemId: [{
|
|
685
|
-
type: Input
|
|
686
|
-
}], disabled: [{
|
|
687
|
-
type: Input,
|
|
688
|
-
args: [{ transform: booleanAttribute }]
|
|
689
|
-
}], orientation: [{
|
|
690
|
-
type: Input
|
|
691
|
-
}], activeItem: [{
|
|
692
|
-
type: Input
|
|
693
|
-
}], submenu: [{
|
|
694
|
-
type: Input
|
|
695
|
-
}], queryMatches: [{
|
|
696
|
-
type: Input,
|
|
697
|
-
args: [{ transform: booleanAttribute }]
|
|
698
|
-
}], mobileActive: [{
|
|
699
|
-
type: Input,
|
|
700
|
-
args: [{ transform: booleanAttribute }]
|
|
701
|
-
}], scrollHeight: [{
|
|
702
|
-
type: Input
|
|
703
|
-
}], tabindex: [{
|
|
704
|
-
type: Input,
|
|
705
|
-
args: [{ transform: numberAttribute }]
|
|
706
|
-
}], root: [{
|
|
707
|
-
type: Input,
|
|
708
|
-
args: [{ transform: booleanAttribute }]
|
|
709
|
-
}], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemMouseEnter: [{ type: i0.Output, args: ["itemMouseEnter"] }], menuFocus: [{ type: i0.Output, args: ["menuFocus"] }], menuBlur: [{ type: i0.Output, args: ["menuBlur"] }], menuKeydown: [{ type: i0.Output, args: ["menuKeydown"] }], menuMouseDown: [{ type: i0.Output, args: ["menuMouseDown"] }] } });
|
|
682
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], menuId: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], focusedItemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedItemId", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], activeItem: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeItem", required: false }] }], submenu: [{ type: i0.Input, args: [{ isSignal: true, alias: "submenu", required: false }] }], mobileActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobileActive", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemMouseEnter: [{ type: i0.Output, args: ["itemMouseEnter"] }], menuFocus: [{ type: i0.Output, args: ["menuFocus"] }], menuBlur: [{ type: i0.Output, args: ["menuBlur"] }], menuKeydown: [{ type: i0.Output, args: ["menuKeydown"] }], menuMouseDown: [{ type: i0.Output, args: ["menuMouseDown"] }] } });
|
|
710
683
|
/**
|
|
711
684
|
* MegaMenu is navigation component that displays submenus together.
|
|
712
685
|
* @group Components
|
|
@@ -718,59 +691,56 @@ class MegaMenu extends BaseComponent {
|
|
|
718
691
|
* An array of menuitems.
|
|
719
692
|
* @group Props
|
|
720
693
|
*/
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
this._processedItems = this.createProcessedItems(this._model || []);
|
|
724
|
-
}
|
|
725
|
-
get model() {
|
|
726
|
-
return this._model;
|
|
727
|
-
}
|
|
728
|
-
/**
|
|
729
|
-
* Class of the element.
|
|
730
|
-
* @deprecated since v20.0.0, use `class` instead.
|
|
731
|
-
* @group Props
|
|
732
|
-
*/
|
|
733
|
-
styleClass;
|
|
694
|
+
model = input(undefined, /* @ts-ignore */
|
|
695
|
+
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
734
696
|
/**
|
|
735
697
|
* Defines the orientation.
|
|
736
698
|
* @group Props
|
|
737
699
|
*/
|
|
738
|
-
orientation = 'horizontal'
|
|
700
|
+
orientation = input('horizontal', /* @ts-ignore */
|
|
701
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
739
702
|
/**
|
|
740
703
|
* Current id state as a string.
|
|
741
704
|
* @group Props
|
|
742
705
|
*/
|
|
743
|
-
id
|
|
706
|
+
id = input(undefined, /* @ts-ignore */
|
|
707
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
708
|
+
_id = computed(() => this.id() || uuid('pn_id_'), /* @ts-ignore */
|
|
709
|
+
...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
|
|
744
710
|
/**
|
|
745
711
|
* Defines a string value that labels an interactive element.
|
|
746
712
|
* @group Props
|
|
747
713
|
*/
|
|
748
|
-
ariaLabel
|
|
714
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
715
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
749
716
|
/**
|
|
750
717
|
* Identifier of the underlying input element.
|
|
751
718
|
* @group Props
|
|
752
719
|
*/
|
|
753
|
-
ariaLabelledBy
|
|
720
|
+
ariaLabelledBy = input(undefined, /* @ts-ignore */
|
|
721
|
+
...(ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
|
|
754
722
|
/**
|
|
755
723
|
* The breakpoint to define the maximum width boundary.
|
|
756
724
|
* @group Props
|
|
757
725
|
*/
|
|
758
|
-
breakpoint = '960px'
|
|
726
|
+
breakpoint = input('960px', /* @ts-ignore */
|
|
727
|
+
...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
|
|
759
728
|
/**
|
|
760
729
|
* Height of the viewport, a scrollbar is defined if height of list exceeds this value.
|
|
761
730
|
* @group Props
|
|
762
731
|
*/
|
|
763
|
-
scrollHeight = '20rem'
|
|
732
|
+
scrollHeight = input('20rem', /* @ts-ignore */
|
|
733
|
+
...(ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []));
|
|
764
734
|
/**
|
|
765
735
|
* When present, it specifies that the component should be disabled.
|
|
766
736
|
* @group Props
|
|
767
737
|
*/
|
|
768
|
-
disabled = false;
|
|
738
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
769
739
|
/**
|
|
770
740
|
* Index of the element in tabbing order.
|
|
771
741
|
* @group Props
|
|
772
742
|
*/
|
|
773
|
-
tabindex = 0;
|
|
743
|
+
tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
774
744
|
/**
|
|
775
745
|
* Defines template option for start.
|
|
776
746
|
* @group Templates
|
|
@@ -809,32 +779,56 @@ class MegaMenu extends BaseComponent {
|
|
|
809
779
|
...(ngDevMode ? [{ debugName: "menubuttonViewChild" }] : /* istanbul ignore next */ []));
|
|
810
780
|
rootmenu = viewChild.required('rootmenu', /* @ts-ignore */
|
|
811
781
|
...(ngDevMode ? [{ debugName: "rootmenu" }] : /* istanbul ignore next */ []));
|
|
812
|
-
_startTemplate
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
782
|
+
_startTemplate = computed(() => this.templates()
|
|
783
|
+
.filter((item) => item.getType() === 'start')
|
|
784
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
785
|
+
...(ngDevMode ? [{ debugName: "_startTemplate" }] : /* istanbul ignore next */ []));
|
|
786
|
+
_endTemplate = computed(() => this.templates()
|
|
787
|
+
.filter((item) => item.getType() === 'end')
|
|
788
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
789
|
+
...(ngDevMode ? [{ debugName: "_endTemplate" }] : /* istanbul ignore next */ []));
|
|
790
|
+
_submenuIconTemplate = computed(() => this.templates()
|
|
791
|
+
.filter((item) => item.getType() === 'submenuicon')
|
|
792
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
793
|
+
...(ngDevMode ? [{ debugName: "_submenuIconTemplate" }] : /* istanbul ignore next */ []));
|
|
794
|
+
_itemTemplate = computed(() => this.templates()
|
|
795
|
+
.filter((item) => !['start', 'end', 'menuicon', 'submenuicon', 'button', 'buttonicon'].includes(item.getType()))
|
|
796
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
797
|
+
...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
|
|
798
|
+
_buttonTemplate = computed(() => this.templates()
|
|
799
|
+
.filter((item) => item.getType() === 'button')
|
|
800
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
801
|
+
...(ngDevMode ? [{ debugName: "_buttonTemplate" }] : /* istanbul ignore next */ []));
|
|
802
|
+
_buttonIconTemplate = computed(() => this.templates()
|
|
803
|
+
.filter((item) => item.getType() === 'buttonicon')
|
|
804
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
805
|
+
...(ngDevMode ? [{ debugName: "_buttonIconTemplate" }] : /* istanbul ignore next */ []));
|
|
806
|
+
outsideClickListener = signal(undefined, /* @ts-ignore */
|
|
807
|
+
...(ngDevMode ? [{ debugName: "outsideClickListener" }] : /* istanbul ignore next */ []));
|
|
808
|
+
resizeListener = signal(undefined, /* @ts-ignore */
|
|
809
|
+
...(ngDevMode ? [{ debugName: "resizeListener" }] : /* istanbul ignore next */ []));
|
|
810
|
+
dirty = signal(false, /* @ts-ignore */
|
|
811
|
+
...(ngDevMode ? [{ debugName: "dirty" }] : /* istanbul ignore next */ []));
|
|
812
|
+
focused = signal(false, /* @ts-ignore */
|
|
813
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
823
814
|
activeItem = signal(null, /* @ts-ignore */
|
|
824
815
|
...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
825
816
|
focusedItemInfo = signal({ index: -1, level: 0, parentKey: '', item: null }, /* @ts-ignore */
|
|
826
817
|
...(ngDevMode ? [{ debugName: "focusedItemInfo" }] : /* istanbul ignore next */ []));
|
|
827
|
-
searchValue = ''
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
818
|
+
searchValue = signal('', /* @ts-ignore */
|
|
819
|
+
...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
820
|
+
searchTimeout = signal(undefined, /* @ts-ignore */
|
|
821
|
+
...(ngDevMode ? [{ debugName: "searchTimeout" }] : /* istanbul ignore next */ []));
|
|
831
822
|
_componentStyle = inject(MegaMenuStyle);
|
|
832
|
-
matchMediaListener
|
|
833
|
-
|
|
823
|
+
matchMediaListener = signal(undefined, /* @ts-ignore */
|
|
824
|
+
...(ngDevMode ? [{ debugName: "matchMediaListener" }] : /* istanbul ignore next */ []));
|
|
825
|
+
query = signal(undefined, /* @ts-ignore */
|
|
826
|
+
...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
|
|
834
827
|
queryMatches = signal(false, /* @ts-ignore */
|
|
835
828
|
...(ngDevMode ? [{ debugName: "queryMatches" }] : /* istanbul ignore next */ []));
|
|
836
|
-
mobileActive = false
|
|
837
|
-
|
|
829
|
+
mobileActive = signal(false, /* @ts-ignore */
|
|
830
|
+
...(ngDevMode ? [{ debugName: "mobileActive" }] : /* istanbul ignore next */ []));
|
|
831
|
+
visibleItems = computed(() => {
|
|
838
832
|
const processedItem = isNotEmpty(this.activeItem()) ? this.activeItem() : null;
|
|
839
833
|
return processedItem
|
|
840
834
|
? processedItem.items.reduce((items, col) => {
|
|
@@ -845,88 +839,56 @@ class MegaMenu extends BaseComponent {
|
|
|
845
839
|
});
|
|
846
840
|
return items;
|
|
847
841
|
}, [])
|
|
848
|
-
: this.processedItems;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
return this._processedItems;
|
|
855
|
-
}
|
|
856
|
-
get focusedItemId() {
|
|
842
|
+
: this.processedItems();
|
|
843
|
+
}, /* @ts-ignore */
|
|
844
|
+
...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
845
|
+
processedItems = computed(() => this.createProcessedItems(this.model() || []), /* @ts-ignore */
|
|
846
|
+
...(ngDevMode ? [{ debugName: "processedItems" }] : /* istanbul ignore next */ []));
|
|
847
|
+
focusedItemId = computed(() => {
|
|
857
848
|
const focusedItem = this.focusedItemInfo();
|
|
858
|
-
return focusedItem?.item && focusedItem.item?.id ? focusedItem.item.id : isNotEmpty(focusedItem.key) ? `${this.
|
|
859
|
-
}
|
|
849
|
+
return focusedItem?.item && focusedItem.item?.id ? focusedItem.item.id : isNotEmpty(focusedItem.key) ? `${this._id()}_${focusedItem.key}` : null;
|
|
850
|
+
}, /* @ts-ignore */
|
|
851
|
+
...(ngDevMode ? [{ debugName: "focusedItemId" }] : /* istanbul ignore next */ []));
|
|
860
852
|
constructor() {
|
|
861
853
|
super();
|
|
862
854
|
effect(() => {
|
|
863
855
|
const activeItem = this.activeItem();
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
856
|
+
untracked(() => {
|
|
857
|
+
if (isNotEmpty(activeItem)) {
|
|
858
|
+
this.bindOutsideClickListener();
|
|
859
|
+
this.bindResizeListener();
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
this.unbindOutsideClickListener();
|
|
863
|
+
this.unbindResizeListener();
|
|
864
|
+
}
|
|
865
|
+
});
|
|
872
866
|
});
|
|
867
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
|
|
873
868
|
}
|
|
874
869
|
onInit() {
|
|
875
870
|
this.bindMatchMediaListener();
|
|
876
|
-
this.id = this.id || uuid('pn_id_');
|
|
877
|
-
}
|
|
878
|
-
onAfterViewChecked() {
|
|
879
|
-
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
880
|
-
}
|
|
881
|
-
onAfterContentInit() {
|
|
882
|
-
this.templates()?.forEach((item) => {
|
|
883
|
-
switch (item.getType()) {
|
|
884
|
-
case 'start':
|
|
885
|
-
this._startTemplate = item.template;
|
|
886
|
-
break;
|
|
887
|
-
case 'end':
|
|
888
|
-
this._endTemplate = item.template;
|
|
889
|
-
break;
|
|
890
|
-
case 'menuicon':
|
|
891
|
-
this._menuIconTemplate = item.template;
|
|
892
|
-
break;
|
|
893
|
-
case 'submenuicon':
|
|
894
|
-
this._submenuIconTemplate = item.template;
|
|
895
|
-
break;
|
|
896
|
-
case 'item':
|
|
897
|
-
this._itemTemplate = item.template;
|
|
898
|
-
break;
|
|
899
|
-
case 'button':
|
|
900
|
-
this._buttonTemplate = item.template;
|
|
901
|
-
break;
|
|
902
|
-
case 'buttonicon':
|
|
903
|
-
this._buttonIconTemplate = item.template;
|
|
904
|
-
break;
|
|
905
|
-
default:
|
|
906
|
-
this._itemTemplate = item.template;
|
|
907
|
-
break;
|
|
908
|
-
}
|
|
909
|
-
});
|
|
910
871
|
}
|
|
911
872
|
bindMatchMediaListener() {
|
|
912
873
|
if (isPlatformBrowser(this.platformId)) {
|
|
913
|
-
if (!this.matchMediaListener) {
|
|
914
|
-
const query = window.matchMedia(`(max-width: ${this.breakpoint})`);
|
|
915
|
-
this.query
|
|
874
|
+
if (!this.matchMediaListener()) {
|
|
875
|
+
const query = window.matchMedia(`(max-width: ${this.breakpoint()})`);
|
|
876
|
+
this.query.set(query);
|
|
916
877
|
this.queryMatches.set(query.matches);
|
|
917
|
-
|
|
878
|
+
const matchMediaListener = () => {
|
|
918
879
|
this.queryMatches.set(query.matches);
|
|
919
|
-
this.mobileActive
|
|
920
|
-
this.cd.markForCheck();
|
|
880
|
+
this.mobileActive.set(false);
|
|
921
881
|
};
|
|
922
|
-
|
|
882
|
+
this.matchMediaListener.set(matchMediaListener);
|
|
883
|
+
query.addEventListener('change', matchMediaListener);
|
|
923
884
|
}
|
|
924
885
|
}
|
|
925
886
|
}
|
|
926
887
|
unbindMatchMediaListener() {
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
this.matchMediaListener
|
|
888
|
+
const matchMediaListener = this.matchMediaListener();
|
|
889
|
+
if (matchMediaListener) {
|
|
890
|
+
this.query()?.removeEventListener('change', matchMediaListener);
|
|
891
|
+
this.matchMediaListener.set(null);
|
|
930
892
|
}
|
|
931
893
|
}
|
|
932
894
|
createProcessedItems(items, level = 0, parent = {}, parentKey = '', columnIndex) {
|
|
@@ -955,7 +917,7 @@ class MegaMenu extends BaseComponent {
|
|
|
955
917
|
return item ? resolve(item[name]) : undefined;
|
|
956
918
|
}
|
|
957
919
|
onItemClick(event) {
|
|
958
|
-
this.dirty
|
|
920
|
+
this.dirty.set(true);
|
|
959
921
|
const { originalEvent, processedItem } = event;
|
|
960
922
|
const grouped = this.isProcessedItemGroup(processedItem);
|
|
961
923
|
const root = isEmpty(processedItem.parent);
|
|
@@ -964,8 +926,8 @@ class MegaMenu extends BaseComponent {
|
|
|
964
926
|
const { index, key, parentKey, item } = processedItem;
|
|
965
927
|
this.activeItem.set(null);
|
|
966
928
|
this.focusedItemInfo.set({ index, key, parentKey, item });
|
|
967
|
-
this.dirty
|
|
968
|
-
if (!this.mobileActive) {
|
|
929
|
+
this.dirty.set(!root);
|
|
930
|
+
if (!this.mobileActive()) {
|
|
969
931
|
focus(this.rootmenu().el?.nativeElement, { preventScroll: true });
|
|
970
932
|
}
|
|
971
933
|
}
|
|
@@ -979,7 +941,7 @@ class MegaMenu extends BaseComponent {
|
|
|
979
941
|
}
|
|
980
942
|
}
|
|
981
943
|
onItemMouseEnter(event) {
|
|
982
|
-
if (!this.mobileActive && this.dirty) {
|
|
944
|
+
if (!this.mobileActive() && this.dirty()) {
|
|
983
945
|
this.onItemChange(event);
|
|
984
946
|
}
|
|
985
947
|
}
|
|
@@ -990,13 +952,13 @@ class MegaMenu extends BaseComponent {
|
|
|
990
952
|
(event.code === 'Enter' || event.code === 'NumpadEnter' || event.code === 'Space') && this.menuButtonClick(event);
|
|
991
953
|
}
|
|
992
954
|
toggle(event) {
|
|
993
|
-
if (this.mobileActive) {
|
|
994
|
-
this.mobileActive
|
|
955
|
+
if (this.mobileActive()) {
|
|
956
|
+
this.mobileActive.set(false);
|
|
995
957
|
ZIndexUtils.clear(this.rootmenu().el.nativeElement);
|
|
996
958
|
this.hide();
|
|
997
959
|
}
|
|
998
960
|
else {
|
|
999
|
-
this.mobileActive
|
|
961
|
+
this.mobileActive.set(true);
|
|
1000
962
|
ZIndexUtils.set('menu', this.rootmenu().el.nativeElement, this.config.zIndex.menu);
|
|
1001
963
|
setTimeout(() => {
|
|
1002
964
|
this.show();
|
|
@@ -1010,7 +972,7 @@ class MegaMenu extends BaseComponent {
|
|
|
1010
972
|
focus(this.rootmenu().el.nativeElement);
|
|
1011
973
|
}
|
|
1012
974
|
scrollInView(index = -1) {
|
|
1013
|
-
const id = index !== -1 ? `${this.
|
|
975
|
+
const id = index !== -1 ? `${this._id()}_${index}` : this.focusedItemId();
|
|
1014
976
|
let element;
|
|
1015
977
|
if (id === null && this.queryMatches()) {
|
|
1016
978
|
element = this.menubuttonViewChild()?.nativeElement;
|
|
@@ -1032,12 +994,12 @@ class MegaMenu extends BaseComponent {
|
|
|
1032
994
|
this.activeItem.set(processedItem);
|
|
1033
995
|
}
|
|
1034
996
|
this.focusedItemInfo.set({ index, key, parentKey, item });
|
|
1035
|
-
grouped &&
|
|
997
|
+
grouped && this.dirty.set(true);
|
|
1036
998
|
isFocus && focus(this.rootmenu().el?.nativeElement);
|
|
1037
999
|
}
|
|
1038
1000
|
hide(event, isFocus) {
|
|
1039
|
-
if (this.mobileActive) {
|
|
1040
|
-
this.mobileActive
|
|
1001
|
+
if (this.mobileActive()) {
|
|
1002
|
+
this.mobileActive.set(false);
|
|
1041
1003
|
setTimeout(() => {
|
|
1042
1004
|
focus(this.menubuttonViewChild()?.nativeElement);
|
|
1043
1005
|
this.scrollInView();
|
|
@@ -1046,16 +1008,16 @@ class MegaMenu extends BaseComponent {
|
|
|
1046
1008
|
this.activeItem.set(null);
|
|
1047
1009
|
this.focusedItemInfo.set({ index: -1, key: '', parentKey: '', item: null });
|
|
1048
1010
|
isFocus && focus(this.rootmenu().el?.nativeElement);
|
|
1049
|
-
this.dirty
|
|
1011
|
+
this.dirty.set(false);
|
|
1050
1012
|
}
|
|
1051
1013
|
onMenuMouseDown(event) {
|
|
1052
|
-
this.dirty
|
|
1014
|
+
this.dirty.set(true);
|
|
1053
1015
|
}
|
|
1054
1016
|
onMenuFocus(event) {
|
|
1055
|
-
this.focused
|
|
1017
|
+
this.focused.set(true);
|
|
1056
1018
|
const relatedTarget = event.relatedTarget;
|
|
1057
1019
|
const isFromOutside = !relatedTarget || !this.el.nativeElement.contains(relatedTarget);
|
|
1058
|
-
if (isFromOutside && this.focusedItemInfo().index === -1 && isEmpty(this.activeItem()) && !this.dirty) {
|
|
1020
|
+
if (isFromOutside && this.focusedItemInfo().index === -1 && isEmpty(this.activeItem()) && !this.dirty()) {
|
|
1059
1021
|
const index = this.findFirstFocusedItemIndex();
|
|
1060
1022
|
const processedItem = this.findVisibleItem(index);
|
|
1061
1023
|
this.focusedItemInfo.set({ index, key: processedItem.key, parentKey: processedItem.parentKey, item: processedItem.item });
|
|
@@ -1071,10 +1033,10 @@ class MegaMenu extends BaseComponent {
|
|
|
1071
1033
|
if (activeElement && this.el.nativeElement.contains(activeElement)) {
|
|
1072
1034
|
return;
|
|
1073
1035
|
}
|
|
1074
|
-
this.focused
|
|
1036
|
+
this.focused.set(false);
|
|
1075
1037
|
this.focusedItemInfo.set({ index: -1, level: 0, parentKey: '', item: null });
|
|
1076
|
-
this.searchValue
|
|
1077
|
-
this.dirty
|
|
1038
|
+
this.searchValue.set('');
|
|
1039
|
+
this.dirty.set(false);
|
|
1078
1040
|
});
|
|
1079
1041
|
}
|
|
1080
1042
|
onKeyDown(event) {
|
|
@@ -1129,10 +1091,10 @@ class MegaMenu extends BaseComponent {
|
|
|
1129
1091
|
return selectedIndex < 0 ? this.findFirstItemIndex() : selectedIndex;
|
|
1130
1092
|
}
|
|
1131
1093
|
findFirstItemIndex() {
|
|
1132
|
-
return this.visibleItems.findIndex((processedItem) => this.isValidItem(processedItem));
|
|
1094
|
+
return this.visibleItems().findIndex((processedItem) => this.isValidItem(processedItem));
|
|
1133
1095
|
}
|
|
1134
1096
|
findSelectedItemIndex() {
|
|
1135
|
-
return this.visibleItems.findIndex((processedItem) => this.isValidSelectedItem(processedItem));
|
|
1097
|
+
return this.visibleItems().findIndex((processedItem) => this.isValidSelectedItem(processedItem));
|
|
1136
1098
|
}
|
|
1137
1099
|
isProcessedItemGroup(processedItem) {
|
|
1138
1100
|
return processedItem && isNotEmpty(processedItem.items);
|
|
@@ -1153,21 +1115,28 @@ class MegaMenu extends BaseComponent {
|
|
|
1153
1115
|
return this.getItemProp(item, 'separator');
|
|
1154
1116
|
}
|
|
1155
1117
|
isItemMatched(processedItem) {
|
|
1156
|
-
return this.isValidItem(processedItem) && this.getProccessedItemLabel(processedItem).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase());
|
|
1118
|
+
return this.isValidItem(processedItem) && this.getProccessedItemLabel(processedItem).toLocaleLowerCase().startsWith(this.searchValue().toLocaleLowerCase());
|
|
1157
1119
|
}
|
|
1158
1120
|
isProccessedItemGroup(processedItem) {
|
|
1159
1121
|
return processedItem && isNotEmpty(processedItem.items);
|
|
1160
1122
|
}
|
|
1161
1123
|
searchItems(event, char) {
|
|
1162
|
-
this.searchValue
|
|
1124
|
+
this.searchValue.set((this.searchValue() || '') + char);
|
|
1163
1125
|
let itemIndex = -1;
|
|
1164
1126
|
let matched = false;
|
|
1165
1127
|
if (this.focusedItemInfo().index !== -1) {
|
|
1166
|
-
itemIndex = this.visibleItems
|
|
1167
|
-
|
|
1128
|
+
itemIndex = this.visibleItems()
|
|
1129
|
+
.slice(this.focusedItemInfo().index)
|
|
1130
|
+
.findIndex((processedItem) => this.isItemMatched(processedItem));
|
|
1131
|
+
itemIndex =
|
|
1132
|
+
itemIndex === -1
|
|
1133
|
+
? this.visibleItems()
|
|
1134
|
+
.slice(0, this.focusedItemInfo().index)
|
|
1135
|
+
.findIndex((processedItem) => this.isItemMatched(processedItem))
|
|
1136
|
+
: itemIndex + this.focusedItemInfo().index;
|
|
1168
1137
|
}
|
|
1169
1138
|
else {
|
|
1170
|
-
itemIndex = this.visibleItems.findIndex((processedItem) => this.isItemMatched(processedItem));
|
|
1139
|
+
itemIndex = this.visibleItems().findIndex((processedItem) => this.isItemMatched(processedItem));
|
|
1171
1140
|
}
|
|
1172
1141
|
if (itemIndex !== -1) {
|
|
1173
1142
|
matched = true;
|
|
@@ -1178,13 +1147,13 @@ class MegaMenu extends BaseComponent {
|
|
|
1178
1147
|
if (itemIndex !== -1) {
|
|
1179
1148
|
this.changeFocusedItemInfo(event, itemIndex);
|
|
1180
1149
|
}
|
|
1181
|
-
if (this.searchTimeout) {
|
|
1182
|
-
clearTimeout(this.searchTimeout);
|
|
1150
|
+
if (this.searchTimeout()) {
|
|
1151
|
+
clearTimeout(this.searchTimeout());
|
|
1183
1152
|
}
|
|
1184
|
-
this.searchTimeout
|
|
1185
|
-
this.searchValue
|
|
1186
|
-
this.searchTimeout
|
|
1187
|
-
}, 500);
|
|
1153
|
+
this.searchTimeout.set(setTimeout(() => {
|
|
1154
|
+
this.searchValue.set('');
|
|
1155
|
+
this.searchTimeout.set(null);
|
|
1156
|
+
}, 500));
|
|
1188
1157
|
return matched;
|
|
1189
1158
|
}
|
|
1190
1159
|
getProccessedItemLabel(processedItem) {
|
|
@@ -1202,7 +1171,7 @@ class MegaMenu extends BaseComponent {
|
|
|
1202
1171
|
this.scrollInView();
|
|
1203
1172
|
}
|
|
1204
1173
|
onArrowDownKey(event) {
|
|
1205
|
-
if (this.orientation === 'horizontal') {
|
|
1174
|
+
if (this.orientation() === 'horizontal') {
|
|
1206
1175
|
if (isNotEmpty(this.activeItem()) && this.activeItem().key === this.focusedItemInfo().key) {
|
|
1207
1176
|
const { key, item } = this.activeItem();
|
|
1208
1177
|
this.focusedItemInfo.set({ index: -1, key: '', parentKey: key, item });
|
|
@@ -1214,7 +1183,7 @@ class MegaMenu extends BaseComponent {
|
|
|
1214
1183
|
const { parentKey, key, item } = processedItem;
|
|
1215
1184
|
this.onItemChange({ originalEvent: event, processedItem });
|
|
1216
1185
|
this.focusedItemInfo.set({ index: -1, key: key, parentKey: parentKey, item: item });
|
|
1217
|
-
this.searchValue
|
|
1186
|
+
this.searchValue.set('');
|
|
1218
1187
|
}
|
|
1219
1188
|
}
|
|
1220
1189
|
}
|
|
@@ -1226,7 +1195,7 @@ class MegaMenu extends BaseComponent {
|
|
|
1226
1195
|
const processedItem = this.findVisibleItem(this.focusedItemInfo().index);
|
|
1227
1196
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
1228
1197
|
if (grouped) {
|
|
1229
|
-
if (this.orientation === 'vertical') {
|
|
1198
|
+
if (this.orientation() === 'vertical') {
|
|
1230
1199
|
if (isNotEmpty(this.activeItem()) && this.activeItem().key === processedItem.key) {
|
|
1231
1200
|
this.focusedItemInfo.set({ index: -1, key: '', parentKey: this.activeItem().key, item: processedItem.item });
|
|
1232
1201
|
}
|
|
@@ -1241,7 +1210,7 @@ class MegaMenu extends BaseComponent {
|
|
|
1241
1210
|
parentKey: processedItem.parentKey,
|
|
1242
1211
|
item: processedItem.item
|
|
1243
1212
|
});
|
|
1244
|
-
this.searchValue
|
|
1213
|
+
this.searchValue.set('');
|
|
1245
1214
|
}
|
|
1246
1215
|
}
|
|
1247
1216
|
}
|
|
@@ -1250,17 +1219,17 @@ class MegaMenu extends BaseComponent {
|
|
|
1250
1219
|
}
|
|
1251
1220
|
else {
|
|
1252
1221
|
const columnIndex = processedItem.columnIndex + 1;
|
|
1253
|
-
const itemIndex = this.visibleItems.findIndex((item) => item.columnIndex === columnIndex);
|
|
1222
|
+
const itemIndex = this.visibleItems().findIndex((item) => item.columnIndex === columnIndex);
|
|
1254
1223
|
itemIndex !== -1 && this.changeFocusedItemInfo(event, itemIndex);
|
|
1255
1224
|
}
|
|
1256
1225
|
event.preventDefault();
|
|
1257
1226
|
}
|
|
1258
1227
|
onArrowUpKey(event) {
|
|
1259
|
-
if (event.altKey && this.orientation === 'horizontal') {
|
|
1228
|
+
if (event.altKey && this.orientation() === 'horizontal') {
|
|
1260
1229
|
if (this.focusedItemInfo().index !== -1) {
|
|
1261
1230
|
const processedItem = this.findVisibleItem(this.focusedItemInfo().index);
|
|
1262
1231
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
1263
|
-
if (!grouped && isNotEmpty(this.activeItem)) {
|
|
1232
|
+
if (!grouped && isNotEmpty(this.activeItem())) {
|
|
1264
1233
|
if (this.focusedItemInfo().index === 0) {
|
|
1265
1234
|
this.focusedItemInfo.set({
|
|
1266
1235
|
index: this.activeItem().index,
|
|
@@ -1287,13 +1256,13 @@ class MegaMenu extends BaseComponent {
|
|
|
1287
1256
|
const processedItem = this.findVisibleItem(this.focusedItemInfo().index);
|
|
1288
1257
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
1289
1258
|
if (grouped) {
|
|
1290
|
-
if (this.orientation === 'horizontal') {
|
|
1259
|
+
if (this.orientation() === 'horizontal') {
|
|
1291
1260
|
const itemIndex = this.focusedItemInfo().index !== -1 ? this.findPrevItemIndex(this.focusedItemInfo().index) : this.findLastFocusedItemIndex();
|
|
1292
1261
|
this.changeFocusedItemInfo(event, itemIndex);
|
|
1293
1262
|
}
|
|
1294
1263
|
}
|
|
1295
1264
|
else {
|
|
1296
|
-
if (this.orientation === 'vertical' && isNotEmpty(this.activeItem())) {
|
|
1265
|
+
if (this.orientation() === 'vertical' && isNotEmpty(this.activeItem())) {
|
|
1297
1266
|
if (processedItem.columnIndex === 0) {
|
|
1298
1267
|
this.focusedItemInfo.set({
|
|
1299
1268
|
index: this.activeItem().index,
|
|
@@ -1305,7 +1274,7 @@ class MegaMenu extends BaseComponent {
|
|
|
1305
1274
|
}
|
|
1306
1275
|
}
|
|
1307
1276
|
const columnIndex = processedItem.columnIndex - 1;
|
|
1308
|
-
const itemIndex = this.visibleItems.findIndex((item) => item.columnIndex === columnIndex);
|
|
1277
|
+
const itemIndex = this.visibleItems().findIndex((item) => item.columnIndex === columnIndex);
|
|
1309
1278
|
itemIndex !== -1 && this.changeFocusedItemInfo(event, itemIndex);
|
|
1310
1279
|
}
|
|
1311
1280
|
event.preventDefault();
|
|
@@ -1338,66 +1307,73 @@ class MegaMenu extends BaseComponent {
|
|
|
1338
1307
|
}
|
|
1339
1308
|
onEnterKey(event) {
|
|
1340
1309
|
if (this.focusedItemInfo().index !== -1) {
|
|
1341
|
-
const element = findSingle(this.rootmenu().el?.nativeElement, `li[id="${`${this.focusedItemId}`}"]`);
|
|
1310
|
+
const element = findSingle(this.rootmenu().el?.nativeElement, `li[id="${`${this.focusedItemId()}`}"]`);
|
|
1342
1311
|
const anchorElement = element && (findSingle(element, '[data-pc-section="itemlink"]') || findSingle(element, 'a,button'));
|
|
1343
1312
|
anchorElement ? anchorElement.click() : element && element.click();
|
|
1344
|
-
const processedItem = this.visibleItems[this.focusedItemInfo().index];
|
|
1313
|
+
const processedItem = this.visibleItems()[this.focusedItemInfo().index];
|
|
1345
1314
|
const grouped = this.isProccessedItemGroup(processedItem);
|
|
1346
1315
|
!grouped && this.changeFocusedItemInfo(event, this.findFirstFocusedItemIndex());
|
|
1347
1316
|
}
|
|
1348
1317
|
event.preventDefault();
|
|
1349
1318
|
}
|
|
1350
1319
|
findVisibleItem(index) {
|
|
1351
|
-
return isNotEmpty(this.visibleItems) ? this.visibleItems[index] : null;
|
|
1320
|
+
return isNotEmpty(this.visibleItems()) ? this.visibleItems()[index] : null;
|
|
1352
1321
|
}
|
|
1353
1322
|
findLastFocusedItemIndex() {
|
|
1354
1323
|
const selectedIndex = this.findSelectedItemIndex();
|
|
1355
1324
|
return selectedIndex < 0 ? this.findLastItemIndex() : selectedIndex;
|
|
1356
1325
|
}
|
|
1357
1326
|
findLastItemIndex() {
|
|
1358
|
-
return findLastIndex(this.visibleItems, (processedItem) => this.isValidItem(processedItem));
|
|
1327
|
+
return findLastIndex(this.visibleItems(), (processedItem) => this.isValidItem(processedItem));
|
|
1359
1328
|
}
|
|
1360
1329
|
findPrevItemIndex(index) {
|
|
1361
|
-
const matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems.slice(0, index), (processedItem) => this.isValidItem(processedItem)) : -1;
|
|
1330
|
+
const matchedItemIndex = index > 0 ? findLastIndex(this.visibleItems().slice(0, index), (processedItem) => this.isValidItem(processedItem)) : -1;
|
|
1362
1331
|
return matchedItemIndex > -1 ? matchedItemIndex : index;
|
|
1363
1332
|
}
|
|
1364
1333
|
findNextItemIndex(index) {
|
|
1365
|
-
const matchedItemIndex = index < this.visibleItems.length - 1
|
|
1334
|
+
const matchedItemIndex = index < this.visibleItems().length - 1
|
|
1335
|
+
? this.visibleItems()
|
|
1336
|
+
.slice(index + 1)
|
|
1337
|
+
.findIndex((processedItem) => this.isValidItem(processedItem))
|
|
1338
|
+
: -1;
|
|
1366
1339
|
return matchedItemIndex > -1 ? matchedItemIndex + index + 1 : index;
|
|
1367
1340
|
}
|
|
1368
1341
|
bindResizeListener() {
|
|
1369
|
-
if (!this.resizeListener) {
|
|
1370
|
-
|
|
1342
|
+
if (!this.resizeListener()) {
|
|
1343
|
+
const resizeListener = (event) => {
|
|
1371
1344
|
if (!isTouchDevice()) {
|
|
1372
1345
|
this.hide(event, true);
|
|
1373
1346
|
}
|
|
1374
|
-
this.mobileActive
|
|
1347
|
+
this.mobileActive.set(false);
|
|
1375
1348
|
};
|
|
1376
|
-
|
|
1349
|
+
this.resizeListener.set(resizeListener);
|
|
1350
|
+
window.addEventListener('resize', resizeListener);
|
|
1377
1351
|
}
|
|
1378
1352
|
}
|
|
1379
1353
|
bindOutsideClickListener() {
|
|
1380
1354
|
if (isPlatformBrowser(this.platformId)) {
|
|
1381
|
-
if (!this.outsideClickListener) {
|
|
1382
|
-
this.outsideClickListener
|
|
1355
|
+
if (!this.outsideClickListener()) {
|
|
1356
|
+
this.outsideClickListener.set(this.renderer.listen(this.document, 'click', (event) => {
|
|
1383
1357
|
const isOutsideContainer = this.el?.nativeElement !== event.target && !this.el?.nativeElement.contains(event.target);
|
|
1384
1358
|
if (isOutsideContainer) {
|
|
1385
1359
|
this.hide();
|
|
1386
1360
|
}
|
|
1387
|
-
});
|
|
1361
|
+
}));
|
|
1388
1362
|
}
|
|
1389
1363
|
}
|
|
1390
1364
|
}
|
|
1391
1365
|
unbindOutsideClickListener() {
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1366
|
+
const outsideClickListener = this.outsideClickListener();
|
|
1367
|
+
if (outsideClickListener) {
|
|
1368
|
+
outsideClickListener();
|
|
1369
|
+
this.outsideClickListener.set(null);
|
|
1395
1370
|
}
|
|
1396
1371
|
}
|
|
1397
1372
|
unbindResizeListener() {
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1373
|
+
const resizeListener = this.resizeListener();
|
|
1374
|
+
if (resizeListener) {
|
|
1375
|
+
window.removeEventListener('resize', resizeListener);
|
|
1376
|
+
this.resizeListener.set(null);
|
|
1401
1377
|
}
|
|
1402
1378
|
}
|
|
1403
1379
|
onDestroy() {
|
|
@@ -1406,136 +1382,131 @@ class MegaMenu extends BaseComponent {
|
|
|
1406
1382
|
this.unbindMatchMediaListener();
|
|
1407
1383
|
}
|
|
1408
1384
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MegaMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: MegaMenu, isStandalone: true, selector: "p-megaMenu, p-megamenu, p-mega-menu", inputs: { model: "model",
|
|
1410
|
-
@if (startTemplate() || _startTemplate) {
|
|
1385
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: MegaMenu, isStandalone: true, selector: "p-megaMenu, p-megamenu, p-mega-menu", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", 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 }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, scrollHeight: { classPropertyName: "scrollHeight", publicName: "scrollHeight", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cx(\"root\")", "id": "_id()" } }, providers: [MegaMenuStyle, { provide: MEGAMENU_INSTANCE, useExisting: MegaMenu }, { provide: PARENT_INSTANCE, useExisting: MegaMenu }], queries: [{ propertyName: "startTemplate", first: true, predicate: ["start"], isSignal: true }, { propertyName: "endTemplate", first: true, predicate: ["end"], isSignal: true }, { propertyName: "submenuIconTemplate", first: true, predicate: ["submenuicon"], isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["item"], isSignal: true }, { propertyName: "buttonTemplate", first: true, predicate: ["button"], isSignal: true }, { propertyName: "buttonIconTemplate", first: true, predicate: ["buttonicon"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], viewQueries: [{ propertyName: "menubuttonViewChild", first: true, predicate: ["menubutton"], descendants: true, isSignal: true }, { propertyName: "rootmenu", first: true, predicate: ["rootmenu"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
1386
|
+
@if (startTemplate() || _startTemplate()) {
|
|
1411
1387
|
<div [class]="cx('start')" [pBind]="ptm('start')">
|
|
1412
|
-
<ng-container *ngTemplateOutlet="startTemplate() || _startTemplate"></ng-container>
|
|
1388
|
+
<ng-container *ngTemplateOutlet="startTemplate() || _startTemplate()"></ng-container>
|
|
1413
1389
|
</div>
|
|
1414
1390
|
}
|
|
1415
|
-
@if (!buttonTemplate() && !_buttonTemplate) {
|
|
1416
|
-
@if (model && model.length > 0) {
|
|
1391
|
+
@if (!buttonTemplate() && !_buttonTemplate()) {
|
|
1392
|
+
@if (model() && model().length > 0) {
|
|
1417
1393
|
<a
|
|
1418
1394
|
#menubutton
|
|
1419
1395
|
role="button"
|
|
1420
1396
|
tabindex="0"
|
|
1421
1397
|
[class]="cx('button')"
|
|
1422
|
-
[attr.aria-haspopup]="model.length && model.length > 0 ? true : false"
|
|
1423
|
-
[attr.aria-expanded]="mobileActive"
|
|
1424
|
-
[attr.aria-controls]="
|
|
1398
|
+
[attr.aria-haspopup]="model().length && model().length > 0 ? true : false"
|
|
1399
|
+
[attr.aria-expanded]="mobileActive()"
|
|
1400
|
+
[attr.aria-controls]="_id()"
|
|
1425
1401
|
[attr.aria-label]="config.translation.aria.navigation"
|
|
1426
1402
|
[pBind]="ptm('button')"
|
|
1427
1403
|
(click)="menuButtonClick($event)"
|
|
1428
1404
|
(keydown)="menuButtonKeydown($event)"
|
|
1429
1405
|
>
|
|
1430
|
-
@if (!buttonIconTemplate() && !_buttonIconTemplate) {
|
|
1406
|
+
@if (!buttonIconTemplate() && !_buttonIconTemplate()) {
|
|
1431
1407
|
<svg data-p-icon="bars" [pBind]="ptm('buttonIcon')" />
|
|
1432
1408
|
}
|
|
1433
|
-
<ng-template *ngTemplateOutlet="buttonIconTemplate() || _buttonIconTemplate"></ng-template>
|
|
1409
|
+
<ng-template *ngTemplateOutlet="buttonIconTemplate() || _buttonIconTemplate()"></ng-template>
|
|
1434
1410
|
</a>
|
|
1435
1411
|
}
|
|
1436
1412
|
}
|
|
1437
|
-
<ng-container *ngTemplateOutlet="buttonTemplate() || _buttonTemplate"></ng-container>
|
|
1413
|
+
<ng-container *ngTemplateOutlet="buttonTemplate() || _buttonTemplate()"></ng-container>
|
|
1438
1414
|
<ul
|
|
1439
1415
|
pMegaMenuSub
|
|
1440
1416
|
#rootmenu
|
|
1441
|
-
[itemTemplate]="itemTemplate() || _itemTemplate"
|
|
1442
|
-
[items]="processedItems"
|
|
1443
|
-
[attr.id]="
|
|
1444
|
-
[menuId]="
|
|
1417
|
+
[itemTemplate]="itemTemplate() || _itemTemplate()"
|
|
1418
|
+
[items]="processedItems()"
|
|
1419
|
+
[attr.id]="_id() + '_list'"
|
|
1420
|
+
[menuId]="_id()"
|
|
1445
1421
|
[root]="true"
|
|
1446
|
-
[orientation]="orientation"
|
|
1447
|
-
[ariaLabel]="ariaLabel"
|
|
1448
|
-
[
|
|
1449
|
-
[tabindex]="!disabled ? tabindex : -1"
|
|
1422
|
+
[orientation]="orientation()"
|
|
1423
|
+
[ariaLabel]="ariaLabel()"
|
|
1424
|
+
[tabindex]="!disabled() ? tabindex() : -1"
|
|
1450
1425
|
[activeItem]="activeItem()"
|
|
1451
1426
|
[level]="0"
|
|
1452
|
-
[ariaLabelledBy]="ariaLabelledBy"
|
|
1453
|
-
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
1454
|
-
[mobileActive]="mobileActive"
|
|
1427
|
+
[ariaLabelledBy]="ariaLabelledBy()"
|
|
1428
|
+
[focusedItemId]="focused() ? focusedItemId() : undefined"
|
|
1429
|
+
[mobileActive]="mobileActive()"
|
|
1455
1430
|
(itemClick)="onItemClick($event)"
|
|
1456
1431
|
(menuFocus)="onMenuFocus($event)"
|
|
1457
1432
|
(menuBlur)="onMenuBlur($event)"
|
|
1458
1433
|
(menuKeydown)="onKeyDown($event)"
|
|
1459
1434
|
(menuMouseDown)="onMenuMouseDown($event)"
|
|
1460
1435
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
1461
|
-
[
|
|
1462
|
-
[scrollHeight]="scrollHeight"
|
|
1436
|
+
[scrollHeight]="scrollHeight()"
|
|
1463
1437
|
[pt]="pt()"
|
|
1464
1438
|
[unstyled]="unstyled()"
|
|
1465
1439
|
></ul>
|
|
1466
|
-
@if (endTemplate() || _endTemplate) {
|
|
1440
|
+
@if (endTemplate() || _endTemplate()) {
|
|
1467
1441
|
<div [class]="cx('end')" [pBind]="ptm('end')">
|
|
1468
|
-
<ng-container *ngTemplateOutlet="endTemplate() || _endTemplate"></ng-container>
|
|
1442
|
+
<ng-container *ngTemplateOutlet="endTemplate() || _endTemplate()"></ng-container>
|
|
1469
1443
|
</div>
|
|
1470
1444
|
}
|
|
1471
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: MegaMenuSub, selector: "p-megaMenuSub, p-megamenu-sub, ul[pMegaMenuSub]", inputs: ["id", "items", "itemTemplate", "menuId", "ariaLabel", "ariaLabelledBy", "level", "focusedItemId", "
|
|
1445
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: RouterModule }, { kind: "component", type: MegaMenuSub, selector: "p-megaMenuSub, p-megamenu-sub, ul[pMegaMenuSub]", inputs: ["id", "items", "itemTemplate", "menuId", "ariaLabel", "ariaLabelledBy", "level", "focusedItemId", "orientation", "activeItem", "submenu", "mobileActive", "scrollHeight", "tabindex", "root"], outputs: ["itemClick", "itemMouseEnter", "menuFocus", "menuBlur", "menuKeydown", "menuMouseDown"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i1.Bind, selector: "[pBind]", inputs: ["pBind"] }, { kind: "component", type: BarsIcon, selector: "[data-p-icon=\"bars\"]" }, { kind: "ngmodule", type: BadgeModule }, { kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1472
1446
|
}
|
|
1473
1447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MegaMenu, decorators: [{
|
|
1474
1448
|
type: Component,
|
|
1475
1449
|
args: [{
|
|
1476
1450
|
selector: 'p-megaMenu, p-megamenu, p-mega-menu',
|
|
1477
|
-
standalone: true,
|
|
1478
1451
|
imports: [CommonModule, RouterModule, MegaMenuSub, TooltipModule, BarsIcon, BadgeModule, SharedModule, Bind],
|
|
1479
1452
|
template: `
|
|
1480
|
-
@if (startTemplate() || _startTemplate) {
|
|
1453
|
+
@if (startTemplate() || _startTemplate()) {
|
|
1481
1454
|
<div [class]="cx('start')" [pBind]="ptm('start')">
|
|
1482
|
-
<ng-container *ngTemplateOutlet="startTemplate() || _startTemplate"></ng-container>
|
|
1455
|
+
<ng-container *ngTemplateOutlet="startTemplate() || _startTemplate()"></ng-container>
|
|
1483
1456
|
</div>
|
|
1484
1457
|
}
|
|
1485
|
-
@if (!buttonTemplate() && !_buttonTemplate) {
|
|
1486
|
-
@if (model && model.length > 0) {
|
|
1458
|
+
@if (!buttonTemplate() && !_buttonTemplate()) {
|
|
1459
|
+
@if (model() && model().length > 0) {
|
|
1487
1460
|
<a
|
|
1488
1461
|
#menubutton
|
|
1489
1462
|
role="button"
|
|
1490
1463
|
tabindex="0"
|
|
1491
1464
|
[class]="cx('button')"
|
|
1492
|
-
[attr.aria-haspopup]="model.length && model.length > 0 ? true : false"
|
|
1493
|
-
[attr.aria-expanded]="mobileActive"
|
|
1494
|
-
[attr.aria-controls]="
|
|
1465
|
+
[attr.aria-haspopup]="model().length && model().length > 0 ? true : false"
|
|
1466
|
+
[attr.aria-expanded]="mobileActive()"
|
|
1467
|
+
[attr.aria-controls]="_id()"
|
|
1495
1468
|
[attr.aria-label]="config.translation.aria.navigation"
|
|
1496
1469
|
[pBind]="ptm('button')"
|
|
1497
1470
|
(click)="menuButtonClick($event)"
|
|
1498
1471
|
(keydown)="menuButtonKeydown($event)"
|
|
1499
1472
|
>
|
|
1500
|
-
@if (!buttonIconTemplate() && !_buttonIconTemplate) {
|
|
1473
|
+
@if (!buttonIconTemplate() && !_buttonIconTemplate()) {
|
|
1501
1474
|
<svg data-p-icon="bars" [pBind]="ptm('buttonIcon')" />
|
|
1502
1475
|
}
|
|
1503
|
-
<ng-template *ngTemplateOutlet="buttonIconTemplate() || _buttonIconTemplate"></ng-template>
|
|
1476
|
+
<ng-template *ngTemplateOutlet="buttonIconTemplate() || _buttonIconTemplate()"></ng-template>
|
|
1504
1477
|
</a>
|
|
1505
1478
|
}
|
|
1506
1479
|
}
|
|
1507
|
-
<ng-container *ngTemplateOutlet="buttonTemplate() || _buttonTemplate"></ng-container>
|
|
1480
|
+
<ng-container *ngTemplateOutlet="buttonTemplate() || _buttonTemplate()"></ng-container>
|
|
1508
1481
|
<ul
|
|
1509
1482
|
pMegaMenuSub
|
|
1510
1483
|
#rootmenu
|
|
1511
|
-
[itemTemplate]="itemTemplate() || _itemTemplate"
|
|
1512
|
-
[items]="processedItems"
|
|
1513
|
-
[attr.id]="
|
|
1514
|
-
[menuId]="
|
|
1484
|
+
[itemTemplate]="itemTemplate() || _itemTemplate()"
|
|
1485
|
+
[items]="processedItems()"
|
|
1486
|
+
[attr.id]="_id() + '_list'"
|
|
1487
|
+
[menuId]="_id()"
|
|
1515
1488
|
[root]="true"
|
|
1516
|
-
[orientation]="orientation"
|
|
1517
|
-
[ariaLabel]="ariaLabel"
|
|
1518
|
-
[
|
|
1519
|
-
[tabindex]="!disabled ? tabindex : -1"
|
|
1489
|
+
[orientation]="orientation()"
|
|
1490
|
+
[ariaLabel]="ariaLabel()"
|
|
1491
|
+
[tabindex]="!disabled() ? tabindex() : -1"
|
|
1520
1492
|
[activeItem]="activeItem()"
|
|
1521
1493
|
[level]="0"
|
|
1522
|
-
[ariaLabelledBy]="ariaLabelledBy"
|
|
1523
|
-
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
1524
|
-
[mobileActive]="mobileActive"
|
|
1494
|
+
[ariaLabelledBy]="ariaLabelledBy()"
|
|
1495
|
+
[focusedItemId]="focused() ? focusedItemId() : undefined"
|
|
1496
|
+
[mobileActive]="mobileActive()"
|
|
1525
1497
|
(itemClick)="onItemClick($event)"
|
|
1526
1498
|
(menuFocus)="onMenuFocus($event)"
|
|
1527
1499
|
(menuBlur)="onMenuBlur($event)"
|
|
1528
1500
|
(menuKeydown)="onKeyDown($event)"
|
|
1529
1501
|
(menuMouseDown)="onMenuMouseDown($event)"
|
|
1530
1502
|
(itemMouseEnter)="onItemMouseEnter($event)"
|
|
1531
|
-
[
|
|
1532
|
-
[scrollHeight]="scrollHeight"
|
|
1503
|
+
[scrollHeight]="scrollHeight()"
|
|
1533
1504
|
[pt]="pt()"
|
|
1534
1505
|
[unstyled]="unstyled()"
|
|
1535
1506
|
></ul>
|
|
1536
|
-
@if (endTemplate() || _endTemplate) {
|
|
1507
|
+
@if (endTemplate() || _endTemplate()) {
|
|
1537
1508
|
<div [class]="cx('end')" [pBind]="ptm('end')">
|
|
1538
|
-
<ng-container *ngTemplateOutlet="endTemplate() || _endTemplate"></ng-container>
|
|
1509
|
+
<ng-container *ngTemplateOutlet="endTemplate() || _endTemplate()"></ng-container>
|
|
1539
1510
|
</div>
|
|
1540
1511
|
}
|
|
1541
1512
|
`,
|
|
@@ -1543,34 +1514,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1543
1514
|
encapsulation: ViewEncapsulation.None,
|
|
1544
1515
|
providers: [MegaMenuStyle, { provide: MEGAMENU_INSTANCE, useExisting: MegaMenu }, { provide: PARENT_INSTANCE, useExisting: MegaMenu }],
|
|
1545
1516
|
host: {
|
|
1546
|
-
'[class]': '
|
|
1547
|
-
'[id]': '
|
|
1517
|
+
'[class]': 'cx("root")',
|
|
1518
|
+
'[id]': '_id()'
|
|
1548
1519
|
},
|
|
1549
1520
|
hostDirectives: [Bind]
|
|
1550
1521
|
}]
|
|
1551
|
-
}], ctorParameters: () => [], propDecorators: { model: [{
|
|
1552
|
-
type: Input
|
|
1553
|
-
}], styleClass: [{
|
|
1554
|
-
type: Input
|
|
1555
|
-
}], orientation: [{
|
|
1556
|
-
type: Input
|
|
1557
|
-
}], id: [{
|
|
1558
|
-
type: Input
|
|
1559
|
-
}], ariaLabel: [{
|
|
1560
|
-
type: Input
|
|
1561
|
-
}], ariaLabelledBy: [{
|
|
1562
|
-
type: Input
|
|
1563
|
-
}], breakpoint: [{
|
|
1564
|
-
type: Input
|
|
1565
|
-
}], scrollHeight: [{
|
|
1566
|
-
type: Input
|
|
1567
|
-
}], disabled: [{
|
|
1568
|
-
type: Input,
|
|
1569
|
-
args: [{ transform: booleanAttribute }]
|
|
1570
|
-
}], tabindex: [{
|
|
1571
|
-
type: Input,
|
|
1572
|
-
args: [{ transform: numberAttribute }]
|
|
1573
|
-
}], startTemplate: [{ type: i0.ContentChild, args: ['start', { ...{ descendants: false }, isSignal: true }] }], endTemplate: [{ type: i0.ContentChild, args: ['end', { ...{ descendants: false }, isSignal: true }] }], submenuIconTemplate: [{ type: i0.ContentChild, args: ['submenuicon', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], buttonTemplate: [{ type: i0.ContentChild, args: ['button', { ...{ descendants: false }, isSignal: true }] }], buttonIconTemplate: [{ type: i0.ContentChild, args: ['buttonicon', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }], menubuttonViewChild: [{ type: i0.ViewChild, args: ['menubutton', { isSignal: true }] }], rootmenu: [{ type: i0.ViewChild, args: ['rootmenu', { isSignal: true }] }] } });
|
|
1522
|
+
}], ctorParameters: () => [], propDecorators: { model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], scrollHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollHeight", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], startTemplate: [{ type: i0.ContentChild, args: ['start', { ...{ descendants: false }, isSignal: true }] }], endTemplate: [{ type: i0.ContentChild, args: ['end', { ...{ descendants: false }, isSignal: true }] }], submenuIconTemplate: [{ type: i0.ContentChild, args: ['submenuicon', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], buttonTemplate: [{ type: i0.ContentChild, args: ['button', { ...{ descendants: false }, isSignal: true }] }], buttonIconTemplate: [{ type: i0.ContentChild, args: ['buttonicon', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }], menubuttonViewChild: [{ type: i0.ViewChild, args: ['menubutton', { isSignal: true }] }], rootmenu: [{ type: i0.ViewChild, args: ['rootmenu', { isSignal: true }] }] } });
|
|
1574
1523
|
class MegaMenuModule {
|
|
1575
1524
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: MegaMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1576
1525
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: MegaMenuModule, imports: [MegaMenu, SharedModule], exports: [MegaMenu, SharedModule] });
|