@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/panelmenu';
|
|
|
2
2
|
import * as i2 from '@angular/common';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, InjectionToken, input, output, inject, ElementRef, forwardRef,
|
|
5
|
+
import { Injectable, InjectionToken, input, numberAttribute, booleanAttribute, output, inject, ElementRef, forwardRef, afterEveryRender, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, signal, linkedSignal, contentChild, contentChildren, NgModule } from '@angular/core';
|
|
6
6
|
import * as i3 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
8
|
import { resolve, isNotEmpty, findLast, findSingle, isPrintableCharacter, isEmpty, uuid, equals, focus, getAttribute } from '@exhaustive-ui/utils';
|
|
@@ -158,29 +158,32 @@ var PanelMenuClasses;
|
|
|
158
158
|
const PANELMENU_INSTANCE = new InjectionToken('PANELMENU_INSTANCE');
|
|
159
159
|
const PANELMENUSUB_INSTANCE = new InjectionToken('PANELMENUSUB_INSTANCE');
|
|
160
160
|
class PanelMenuSub extends BaseComponent {
|
|
161
|
-
panelId
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
161
|
+
panelId = input(undefined, /* @ts-ignore */
|
|
162
|
+
...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
163
|
+
focusedItemId = input(undefined, /* @ts-ignore */
|
|
164
|
+
...(ngDevMode ? [{ debugName: "focusedItemId" }] : /* istanbul ignore next */ []));
|
|
165
|
+
items = input.required(/* @ts-ignore */
|
|
166
|
+
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
167
|
+
itemTemplate = input(undefined, /* @ts-ignore */
|
|
168
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
169
|
+
level = input(0, { ...(ngDevMode ? { debugName: "level" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
170
|
+
activeItemPath = input.required(/* @ts-ignore */
|
|
171
|
+
...(ngDevMode ? [{ debugName: "activeItemPath" }] : /* istanbul ignore next */ []));
|
|
172
|
+
root = input(undefined, { ...(ngDevMode ? { debugName: "root" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
173
|
+
parentExpanded = input(undefined, { ...(ngDevMode ? { debugName: "parentExpanded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
171
174
|
motionOptions = input(/* @ts-ignore */
|
|
172
175
|
...(ngDevMode ? [undefined, { debugName: "motionOptions" }] : /* istanbul ignore next */ []));
|
|
173
176
|
itemToggle = output();
|
|
174
177
|
menuFocus = output();
|
|
175
178
|
menuBlur = output();
|
|
176
|
-
menuKeyDown = output();
|
|
177
179
|
listViewChild = inject(ElementRef);
|
|
178
180
|
panelMenu = inject(forwardRef(() => PanelMenu));
|
|
179
181
|
_componentStyle = inject(PanelMenuStyle);
|
|
180
182
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
181
183
|
$pcPanelMenu = inject(PANELMENU_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
constructor() {
|
|
185
|
+
super();
|
|
186
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptm(this.root() ? 'rootList' : 'submenu')));
|
|
184
187
|
}
|
|
185
188
|
getPTOptions(processedItem, index, key) {
|
|
186
189
|
return this.ptm(key, {
|
|
@@ -194,29 +197,16 @@ class PanelMenuSub extends BaseComponent {
|
|
|
194
197
|
});
|
|
195
198
|
}
|
|
196
199
|
getItemId(processedItem) {
|
|
197
|
-
return processedItem.item?.id ?? `${this.panelId}_${processedItem.key}`;
|
|
198
|
-
}
|
|
199
|
-
getItemKey(processedItem) {
|
|
200
|
-
return this.getItemId(processedItem);
|
|
201
|
-
}
|
|
202
|
-
getItemClass(processedItem) {
|
|
203
|
-
return {
|
|
204
|
-
'p-panelmenu-item': true,
|
|
205
|
-
'p-disabled': this.isItemDisabled(processedItem),
|
|
206
|
-
'p-focus': this.isItemFocused(processedItem)
|
|
207
|
-
};
|
|
200
|
+
return processedItem.item?.id ?? `${this.panelId()}_${processedItem.key}`;
|
|
208
201
|
}
|
|
209
202
|
getItemProp(processedItem, name, params) {
|
|
210
203
|
return processedItem && processedItem.item ? resolve(processedItem.item[name], params) : undefined;
|
|
211
204
|
}
|
|
212
|
-
getItemLabel(processedItem) {
|
|
213
|
-
return this.getItemProp(processedItem, 'label');
|
|
214
|
-
}
|
|
215
205
|
isItemExpanded(processedItem) {
|
|
216
206
|
return processedItem.expanded;
|
|
217
207
|
}
|
|
218
208
|
isItemActive(processedItem) {
|
|
219
|
-
return this.isItemExpanded(processedItem) || this.activeItemPath.some((path) => path && path.key === processedItem.key);
|
|
209
|
+
return this.isItemExpanded(processedItem) || this.activeItemPath().some((path) => path && path.key === processedItem.key);
|
|
220
210
|
}
|
|
221
211
|
isItemVisible(processedItem) {
|
|
222
212
|
return this.getItemProp(processedItem, 'visible') !== false;
|
|
@@ -225,16 +215,19 @@ class PanelMenuSub extends BaseComponent {
|
|
|
225
215
|
return this.getItemProp(processedItem, 'disabled');
|
|
226
216
|
}
|
|
227
217
|
isItemFocused(processedItem) {
|
|
228
|
-
return this.focusedItemId === this.getItemId(processedItem);
|
|
218
|
+
return this.focusedItemId() === this.getItemId(processedItem);
|
|
229
219
|
}
|
|
230
220
|
isItemGroup(processedItem) {
|
|
231
221
|
return isNotEmpty(processedItem.items);
|
|
232
222
|
}
|
|
233
|
-
getAriaSetSize()
|
|
234
|
-
|
|
235
|
-
}
|
|
223
|
+
getAriaSetSize = computed(() => this.items().filter((processedItem) => this.isItemVisible(processedItem) && !this.getItemProp(processedItem, 'separator')).length, /* @ts-ignore */
|
|
224
|
+
...(ngDevMode ? [{ debugName: "getAriaSetSize" }] : /* istanbul ignore next */ []));
|
|
236
225
|
getAriaPosInset(index) {
|
|
237
|
-
return index -
|
|
226
|
+
return (index -
|
|
227
|
+
this.items()
|
|
228
|
+
.slice(0, index)
|
|
229
|
+
.filter((processedItem) => this.isItemVisible(processedItem) && this.getItemProp(processedItem, 'separator')).length +
|
|
230
|
+
1);
|
|
238
231
|
}
|
|
239
232
|
onItemClick(event, processedItem) {
|
|
240
233
|
if (!this.isItemDisabled(processedItem)) {
|
|
@@ -245,9 +238,9 @@ class PanelMenuSub extends BaseComponent {
|
|
|
245
238
|
onItemToggle(event) {
|
|
246
239
|
this.itemToggle.emit(event);
|
|
247
240
|
}
|
|
248
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenuSub, deps:
|
|
249
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: PanelMenuSub, isStandalone: true, selector: "ul[pPanelMenuSub]", inputs: { panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal:
|
|
250
|
-
@for (processedItem of items; track processedItem; let index = $index) {
|
|
241
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenuSub, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
242
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: PanelMenuSub, isStandalone: true, selector: "ul[pPanelMenuSub]", inputs: { panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null }, focusedItemId: { classPropertyName: "focusedItemId", publicName: "focusedItemId", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, itemTemplate: { classPropertyName: "itemTemplate", publicName: "itemTemplate", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, activeItemPath: { classPropertyName: "activeItemPath", publicName: "activeItemPath", isSignal: true, isRequired: true, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null }, parentExpanded: { classPropertyName: "parentExpanded", publicName: "parentExpanded", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemToggle: "itemToggle", menuFocus: "menuFocus", menuBlur: "menuBlur" }, host: { attributes: { "role": "tree" }, listeners: { "focusin": "menuFocus.emit($event)", "focusout": "menuBlur.emit($event)" }, properties: { "class": "root() ? cn(cx(\"rootList\"), cx(\"submenu\")) : cx(\"submenu\")", "tabindex": "-1", "attr.aria-activedescendant": "focusedItemId()", "attr.aria-hidden": "!parentExpanded()" } }, providers: [PanelMenuStyle, { provide: PANELMENUSUB_INSTANCE, useExisting: PanelMenuSub }, { provide: PARENT_INSTANCE, useExisting: PanelMenuSub }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
243
|
+
@for (processedItem of items(); track processedItem; let index = $index) {
|
|
251
244
|
@if (processedItem.separator) {
|
|
252
245
|
<li [class]="cn(cx('separator'), getItemProp(processedItem, 'styleClass'))" role="separator" [pBind]="ptm('separator')"></li>
|
|
253
246
|
}
|
|
@@ -257,7 +250,7 @@ class PanelMenuSub extends BaseComponent {
|
|
|
257
250
|
[attr.id]="getItemId(processedItem)"
|
|
258
251
|
[attr.aria-label]="getItemProp(processedItem, 'label')"
|
|
259
252
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
260
|
-
[attr.aria-level]="level + 1"
|
|
253
|
+
[attr.aria-level]="level() + 1"
|
|
261
254
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
262
255
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
263
256
|
[class]="cn(cx('item', { processedItem }), getItemProp(processedItem, 'styleClass'))"
|
|
@@ -270,7 +263,7 @@ class PanelMenuSub extends BaseComponent {
|
|
|
270
263
|
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
|
|
271
264
|
>
|
|
272
265
|
<div [class]="cx('itemContent')" [pBind]="getPTOptions(processedItem, index, 'itemContent')" (click)="onItemClick($event, processedItem)">
|
|
273
|
-
@if (!itemTemplate) {
|
|
266
|
+
@if (!itemTemplate()) {
|
|
274
267
|
@if (!getItemProp(processedItem, 'routerLink')) {
|
|
275
268
|
<a
|
|
276
269
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
@@ -279,11 +272,11 @@ class PanelMenuSub extends BaseComponent {
|
|
|
279
272
|
[class]="cn(cx('itemLink'), getItemProp(processedItem, 'linkClass'))"
|
|
280
273
|
[ngStyle]="getItemProp(processedItem, 'linkStyle')"
|
|
281
274
|
[target]="getItemProp(processedItem, 'target')"
|
|
282
|
-
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
275
|
+
[attr.tabindex]="!!parentExpanded() ? '0' : '-1'"
|
|
283
276
|
[pBind]="getPTOptions(processedItem, index, 'itemLink')"
|
|
284
277
|
>
|
|
285
278
|
@if (isItemGroup(processedItem)) {
|
|
286
|
-
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate) {
|
|
279
|
+
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate()) {
|
|
287
280
|
@if (isItemActive(processedItem)) {
|
|
288
281
|
<svg
|
|
289
282
|
data-p-icon="chevron-down"
|
|
@@ -301,7 +294,7 @@ class PanelMenuSub extends BaseComponent {
|
|
|
301
294
|
/>
|
|
302
295
|
}
|
|
303
296
|
}
|
|
304
|
-
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate() || panelMenu._submenuIconTemplate"></ng-template>
|
|
297
|
+
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate() || panelMenu._submenuIconTemplate()"></ng-template>
|
|
305
298
|
}
|
|
306
299
|
@if (processedItem.icon) {
|
|
307
300
|
<span
|
|
@@ -341,11 +334,11 @@ class PanelMenuSub extends BaseComponent {
|
|
|
341
334
|
[skipLocationChange]="getItemProp(processedItem, 'skipLocationChange')"
|
|
342
335
|
[replaceUrl]="getItemProp(processedItem, 'replaceUrl')"
|
|
343
336
|
[state]="getItemProp(processedItem, 'state')"
|
|
344
|
-
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
337
|
+
[attr.tabindex]="!!parentExpanded() ? '0' : '-1'"
|
|
345
338
|
[pBind]="getPTOptions(processedItem, index, 'itemLink')"
|
|
346
339
|
>
|
|
347
340
|
@if (isItemGroup(processedItem)) {
|
|
348
|
-
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate) {
|
|
341
|
+
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate()) {
|
|
349
342
|
@if (isItemActive(processedItem)) {
|
|
350
343
|
<svg
|
|
351
344
|
data-p-icon="chevron-down"
|
|
@@ -363,7 +356,7 @@ class PanelMenuSub extends BaseComponent {
|
|
|
363
356
|
/>
|
|
364
357
|
}
|
|
365
358
|
}
|
|
366
|
-
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate()
|
|
359
|
+
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate() || panelMenu._submenuIconTemplate()"></ng-template>
|
|
367
360
|
}
|
|
368
361
|
@if (processedItem.icon) {
|
|
369
362
|
<span
|
|
@@ -386,8 +379,8 @@ class PanelMenuSub extends BaseComponent {
|
|
|
386
379
|
</a>
|
|
387
380
|
}
|
|
388
381
|
}
|
|
389
|
-
@if (itemTemplate) {
|
|
390
|
-
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
382
|
+
@if (itemTemplate()) {
|
|
383
|
+
<ng-template *ngTemplateOutlet="itemTemplate(); context: { $implicit: processedItem.item }"></ng-template>
|
|
391
384
|
}
|
|
392
385
|
</div>
|
|
393
386
|
<div
|
|
@@ -400,16 +393,15 @@ class PanelMenuSub extends BaseComponent {
|
|
|
400
393
|
<ul
|
|
401
394
|
pPanelMenuSub
|
|
402
395
|
[id]="getItemId(processedItem) + '_list'"
|
|
403
|
-
[panelId]="panelId"
|
|
396
|
+
[panelId]="panelId()"
|
|
404
397
|
[items]="processedItem?.items"
|
|
405
|
-
[itemTemplate]="itemTemplate"
|
|
406
|
-
[
|
|
407
|
-
[
|
|
408
|
-
[
|
|
409
|
-
[level]="level + 1"
|
|
398
|
+
[itemTemplate]="itemTemplate()"
|
|
399
|
+
[focusedItemId]="focusedItemId()"
|
|
400
|
+
[activeItemPath]="activeItemPath()"
|
|
401
|
+
[level]="level() + 1"
|
|
410
402
|
[pt]="pt()"
|
|
411
403
|
[unstyled]="unstyled()"
|
|
412
|
-
[parentExpanded]="!!parentExpanded && isItemExpanded(processedItem)"
|
|
404
|
+
[parentExpanded]="!!parentExpanded() && isItemExpanded(processedItem)"
|
|
413
405
|
(itemToggle)="onItemToggle($event)"
|
|
414
406
|
[motionOptions]="motionOptions()"
|
|
415
407
|
></ul>
|
|
@@ -418,17 +410,16 @@ class PanelMenuSub extends BaseComponent {
|
|
|
418
410
|
</li>
|
|
419
411
|
}
|
|
420
412
|
}
|
|
421
|
-
`, isInline: true, dependencies: [{ kind: "component", type: PanelMenuSub, selector: "ul[pPanelMenuSub]", inputs: ["panelId", "focusedItemId", "items", "itemTemplate", "level", "activeItemPath", "root", "
|
|
413
|
+
`, isInline: true, dependencies: [{ kind: "component", type: PanelMenuSub, selector: "ul[pPanelMenuSub]", inputs: ["panelId", "focusedItemId", "items", "itemTemplate", "level", "activeItemPath", "root", "parentExpanded", "motionOptions"], outputs: ["itemToggle", "menuFocus", "menuBlur"] }, { 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: "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: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: ChevronRightIcon, selector: "[data-p-icon=\"chevron-right\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "ngmodule", type: MotionModule }, { kind: "directive", type: i5.MotionDirective, selector: "[pMotion]", inputs: ["pMotion", "pMotionName", "pMotionType", "pMotionSafe", "pMotionDisabled", "pMotionAppear", "pMotionEnter", "pMotionLeave", "pMotionDuration", "pMotionHideStrategy", "pMotionEnterFromClass", "pMotionEnterToClass", "pMotionEnterActiveClass", "pMotionLeaveFromClass", "pMotionLeaveToClass", "pMotionLeaveActiveClass", "pMotionOptions"], outputs: ["pMotionOnBeforeEnter", "pMotionOnEnter", "pMotionOnAfterEnter", "pMotionOnEnterCancelled", "pMotionOnBeforeLeave", "pMotionOnLeave", "pMotionOnAfterLeave", "pMotionOnLeaveCancelled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
422
414
|
}
|
|
423
415
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenuSub, decorators: [{
|
|
424
416
|
type: Component,
|
|
425
417
|
args: [{
|
|
426
|
-
changeDetection: ChangeDetectionStrategy.
|
|
418
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
427
419
|
selector: 'ul[pPanelMenuSub]',
|
|
428
420
|
imports: [CommonModule, RouterModule, TooltipModule, ChevronDownIcon, ChevronRightIcon, SharedModule, BindModule, MotionModule],
|
|
429
|
-
standalone: true,
|
|
430
421
|
template: `
|
|
431
|
-
@for (processedItem of items; track processedItem; let index = $index) {
|
|
422
|
+
@for (processedItem of items(); track processedItem; let index = $index) {
|
|
432
423
|
@if (processedItem.separator) {
|
|
433
424
|
<li [class]="cn(cx('separator'), getItemProp(processedItem, 'styleClass'))" role="separator" [pBind]="ptm('separator')"></li>
|
|
434
425
|
}
|
|
@@ -438,7 +429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
438
429
|
[attr.id]="getItemId(processedItem)"
|
|
439
430
|
[attr.aria-label]="getItemProp(processedItem, 'label')"
|
|
440
431
|
[attr.aria-expanded]="isItemGroup(processedItem) ? isItemActive(processedItem) : undefined"
|
|
441
|
-
[attr.aria-level]="level + 1"
|
|
432
|
+
[attr.aria-level]="level() + 1"
|
|
442
433
|
[attr.aria-setsize]="getAriaSetSize()"
|
|
443
434
|
[attr.aria-posinset]="getAriaPosInset(index)"
|
|
444
435
|
[class]="cn(cx('item', { processedItem }), getItemProp(processedItem, 'styleClass'))"
|
|
@@ -451,7 +442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
451
442
|
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
|
|
452
443
|
>
|
|
453
444
|
<div [class]="cx('itemContent')" [pBind]="getPTOptions(processedItem, index, 'itemContent')" (click)="onItemClick($event, processedItem)">
|
|
454
|
-
@if (!itemTemplate) {
|
|
445
|
+
@if (!itemTemplate()) {
|
|
455
446
|
@if (!getItemProp(processedItem, 'routerLink')) {
|
|
456
447
|
<a
|
|
457
448
|
[attr.href]="getItemProp(processedItem, 'url')"
|
|
@@ -460,11 +451,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
460
451
|
[class]="cn(cx('itemLink'), getItemProp(processedItem, 'linkClass'))"
|
|
461
452
|
[ngStyle]="getItemProp(processedItem, 'linkStyle')"
|
|
462
453
|
[target]="getItemProp(processedItem, 'target')"
|
|
463
|
-
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
454
|
+
[attr.tabindex]="!!parentExpanded() ? '0' : '-1'"
|
|
464
455
|
[pBind]="getPTOptions(processedItem, index, 'itemLink')"
|
|
465
456
|
>
|
|
466
457
|
@if (isItemGroup(processedItem)) {
|
|
467
|
-
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate) {
|
|
458
|
+
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate()) {
|
|
468
459
|
@if (isItemActive(processedItem)) {
|
|
469
460
|
<svg
|
|
470
461
|
data-p-icon="chevron-down"
|
|
@@ -482,7 +473,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
482
473
|
/>
|
|
483
474
|
}
|
|
484
475
|
}
|
|
485
|
-
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate() || panelMenu._submenuIconTemplate"></ng-template>
|
|
476
|
+
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate() || panelMenu._submenuIconTemplate()"></ng-template>
|
|
486
477
|
}
|
|
487
478
|
@if (processedItem.icon) {
|
|
488
479
|
<span
|
|
@@ -522,11 +513,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
522
513
|
[skipLocationChange]="getItemProp(processedItem, 'skipLocationChange')"
|
|
523
514
|
[replaceUrl]="getItemProp(processedItem, 'replaceUrl')"
|
|
524
515
|
[state]="getItemProp(processedItem, 'state')"
|
|
525
|
-
[attr.tabindex]="!!parentExpanded ? '0' : '-1'"
|
|
516
|
+
[attr.tabindex]="!!parentExpanded() ? '0' : '-1'"
|
|
526
517
|
[pBind]="getPTOptions(processedItem, index, 'itemLink')"
|
|
527
518
|
>
|
|
528
519
|
@if (isItemGroup(processedItem)) {
|
|
529
|
-
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate) {
|
|
520
|
+
@if (!panelMenu.submenuIconTemplate() && !panelMenu._submenuIconTemplate()) {
|
|
530
521
|
@if (isItemActive(processedItem)) {
|
|
531
522
|
<svg
|
|
532
523
|
data-p-icon="chevron-down"
|
|
@@ -544,7 +535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
544
535
|
/>
|
|
545
536
|
}
|
|
546
537
|
}
|
|
547
|
-
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate()
|
|
538
|
+
<ng-template *ngTemplateOutlet="panelMenu.submenuIconTemplate() || panelMenu._submenuIconTemplate()"></ng-template>
|
|
548
539
|
}
|
|
549
540
|
@if (processedItem.icon) {
|
|
550
541
|
<span
|
|
@@ -567,8 +558,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
567
558
|
</a>
|
|
568
559
|
}
|
|
569
560
|
}
|
|
570
|
-
@if (itemTemplate) {
|
|
571
|
-
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: processedItem.item }"></ng-template>
|
|
561
|
+
@if (itemTemplate()) {
|
|
562
|
+
<ng-template *ngTemplateOutlet="itemTemplate(); context: { $implicit: processedItem.item }"></ng-template>
|
|
572
563
|
}
|
|
573
564
|
</div>
|
|
574
565
|
<div
|
|
@@ -581,16 +572,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
581
572
|
<ul
|
|
582
573
|
pPanelMenuSub
|
|
583
574
|
[id]="getItemId(processedItem) + '_list'"
|
|
584
|
-
[panelId]="panelId"
|
|
575
|
+
[panelId]="panelId()"
|
|
585
576
|
[items]="processedItem?.items"
|
|
586
|
-
[itemTemplate]="itemTemplate"
|
|
587
|
-
[
|
|
588
|
-
[
|
|
589
|
-
[
|
|
590
|
-
[level]="level + 1"
|
|
577
|
+
[itemTemplate]="itemTemplate()"
|
|
578
|
+
[focusedItemId]="focusedItemId()"
|
|
579
|
+
[activeItemPath]="activeItemPath()"
|
|
580
|
+
[level]="level() + 1"
|
|
591
581
|
[pt]="pt()"
|
|
592
582
|
[unstyled]="unstyled()"
|
|
593
|
-
[parentExpanded]="!!parentExpanded && isItemExpanded(processedItem)"
|
|
583
|
+
[parentExpanded]="!!parentExpanded() && isItemExpanded(processedItem)"
|
|
594
584
|
(itemToggle)="onItemToggle($event)"
|
|
595
585
|
[motionOptions]="motionOptions()"
|
|
596
586
|
></ul>
|
|
@@ -603,80 +593,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
603
593
|
encapsulation: ViewEncapsulation.None,
|
|
604
594
|
providers: [PanelMenuStyle, { provide: PANELMENUSUB_INSTANCE, useExisting: PanelMenuSub }, { provide: PARENT_INSTANCE, useExisting: PanelMenuSub }],
|
|
605
595
|
host: {
|
|
606
|
-
'[class]': 'root ? cn(cx("rootList"), cx("submenu")) : cx("submenu")',
|
|
596
|
+
'[class]': 'root() ? cn(cx("rootList"), cx("submenu")) : cx("submenu")',
|
|
607
597
|
role: 'tree',
|
|
608
598
|
'[tabindex]': '-1',
|
|
609
|
-
'[attr.aria-activedescendant]': 'focusedItemId',
|
|
610
|
-
'[attr.aria-hidden]': '!parentExpanded',
|
|
599
|
+
'[attr.aria-activedescendant]': 'focusedItemId()',
|
|
600
|
+
'[attr.aria-hidden]': '!parentExpanded()',
|
|
611
601
|
'(focusin)': 'menuFocus.emit($event)',
|
|
612
|
-
'(focusout)': 'menuBlur.emit($event)'
|
|
613
|
-
'(keydown)': 'menuKeyDown.emit($event)'
|
|
602
|
+
'(focusout)': 'menuBlur.emit($event)'
|
|
614
603
|
},
|
|
615
604
|
hostDirectives: [Bind]
|
|
616
605
|
}]
|
|
617
|
-
}], propDecorators: { panelId: [{
|
|
618
|
-
type: Input
|
|
619
|
-
}], focusedItemId: [{
|
|
620
|
-
type: Input
|
|
621
|
-
}], items: [{
|
|
622
|
-
type: Input
|
|
623
|
-
}], itemTemplate: [{
|
|
624
|
-
type: Input
|
|
625
|
-
}], level: [{
|
|
626
|
-
type: Input,
|
|
627
|
-
args: [{ transform: numberAttribute }]
|
|
628
|
-
}], activeItemPath: [{
|
|
629
|
-
type: Input
|
|
630
|
-
}], root: [{
|
|
631
|
-
type: Input,
|
|
632
|
-
args: [{ transform: booleanAttribute }]
|
|
633
|
-
}], tabindex: [{
|
|
634
|
-
type: Input,
|
|
635
|
-
args: [{ transform: numberAttribute }]
|
|
636
|
-
}], transitionOptions: [{
|
|
637
|
-
type: Input
|
|
638
|
-
}], parentExpanded: [{
|
|
639
|
-
type: Input,
|
|
640
|
-
args: [{ transform: booleanAttribute }]
|
|
641
|
-
}], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], itemToggle: [{ type: i0.Output, args: ["itemToggle"] }], menuFocus: [{ type: i0.Output, args: ["menuFocus"] }], menuBlur: [{ type: i0.Output, args: ["menuBlur"] }], menuKeyDown: [{ type: i0.Output, args: ["menuKeyDown"] }] } });
|
|
606
|
+
}], ctorParameters: () => [], propDecorators: { panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], focusedItemId: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusedItemId", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], activeItemPath: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeItemPath", required: true }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], parentExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentExpanded", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], itemToggle: [{ type: i0.Output, args: ["itemToggle"] }], menuFocus: [{ type: i0.Output, args: ["menuFocus"] }], menuBlur: [{ type: i0.Output, args: ["menuBlur"] }] } });
|
|
642
607
|
class PanelMenuList extends BaseComponent {
|
|
643
|
-
panelId
|
|
644
|
-
|
|
645
|
-
items
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
root;
|
|
651
|
-
tabindex;
|
|
652
|
-
activeItem;
|
|
608
|
+
panelId = input(undefined, /* @ts-ignore */
|
|
609
|
+
...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
610
|
+
items = input(/* @ts-ignore */
|
|
611
|
+
...(ngDevMode ? [undefined, { debugName: "items" }] : /* istanbul ignore next */ []));
|
|
612
|
+
itemTemplate = input(undefined, /* @ts-ignore */
|
|
613
|
+
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
614
|
+
parentExpanded = input(undefined, { ...(ngDevMode ? { debugName: "parentExpanded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
615
|
+
root = input(undefined, { ...(ngDevMode ? { debugName: "root" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
653
616
|
motionOptions = input(/* @ts-ignore */
|
|
654
617
|
...(ngDevMode ? [undefined, { debugName: "motionOptions" }] : /* istanbul ignore next */ []));
|
|
655
618
|
itemToggle = output();
|
|
656
619
|
headerFocus = output();
|
|
657
620
|
subMenuViewChild = viewChild.required('submenu', /* @ts-ignore */
|
|
658
621
|
...(ngDevMode ? [{ debugName: "subMenuViewChild" }] : /* istanbul ignore next */ []));
|
|
659
|
-
searchTimeout
|
|
660
|
-
|
|
661
|
-
|
|
622
|
+
searchTimeout = signal(undefined, /* @ts-ignore */
|
|
623
|
+
...(ngDevMode ? [{ debugName: "searchTimeout" }] : /* istanbul ignore next */ []));
|
|
624
|
+
searchValue = signal(undefined, /* @ts-ignore */
|
|
625
|
+
...(ngDevMode ? [{ debugName: "searchValue" }] : /* istanbul ignore next */ []));
|
|
626
|
+
focused = signal(undefined, /* @ts-ignore */
|
|
627
|
+
...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
|
|
662
628
|
focusedItem = signal(null, /* @ts-ignore */
|
|
663
629
|
...(ngDevMode ? [{ debugName: "focusedItem" }] : /* istanbul ignore next */ []));
|
|
664
630
|
activeItemPath = signal([], /* @ts-ignore */
|
|
665
631
|
...(ngDevMode ? [{ debugName: "activeItemPath" }] : /* istanbul ignore next */ []));
|
|
666
|
-
processedItems =
|
|
632
|
+
processedItems = linkedSignal(() => this.createProcessedItems(this.items() || []), /* @ts-ignore */
|
|
667
633
|
...(ngDevMode ? [{ debugName: "processedItems" }] : /* istanbul ignore next */ []));
|
|
668
634
|
visibleItems = computed(() => {
|
|
669
635
|
const processedItems = this.processedItems();
|
|
670
636
|
return this.flatItems(processedItems);
|
|
671
637
|
}, /* @ts-ignore */
|
|
672
638
|
...(ngDevMode ? [{ debugName: "visibleItems" }] : /* istanbul ignore next */ []));
|
|
673
|
-
|
|
639
|
+
focusedItemId = computed(() => {
|
|
674
640
|
const focusedItem = this.focusedItem();
|
|
675
|
-
return focusedItem && focusedItem.item?.id ? focusedItem.item.id : isNotEmpty(this.focusedItem()) ? `${this.panelId}_${this.focusedItem().key}` : undefined;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
this.processedItems.set(this.createProcessedItems(changes?.items?.currentValue || this.items || []));
|
|
679
|
-
}
|
|
641
|
+
return focusedItem && focusedItem.item?.id ? focusedItem.item.id : isNotEmpty(this.focusedItem()) ? `${this.panelId()}_${this.focusedItem().key}` : undefined;
|
|
642
|
+
}, /* @ts-ignore */
|
|
643
|
+
...(ngDevMode ? [{ debugName: "focusedItemId" }] : /* istanbul ignore next */ []));
|
|
680
644
|
getItemProp(processedItem, name) {
|
|
681
645
|
return processedItem && processedItem.item ? resolve(processedItem.item[name]) : undefined;
|
|
682
646
|
}
|
|
@@ -700,7 +664,7 @@ class PanelMenuList extends BaseComponent {
|
|
|
700
664
|
return panel && panel.contains(element);
|
|
701
665
|
}
|
|
702
666
|
isItemMatched(processedItem) {
|
|
703
|
-
return this.isValidItem(processedItem) && this.getItemLabel(processedItem).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase());
|
|
667
|
+
return this.isValidItem(processedItem) && this.getItemLabel(processedItem).toLocaleLowerCase().startsWith(this.searchValue().toLocaleLowerCase());
|
|
704
668
|
}
|
|
705
669
|
isVisibleItem(processedItem) {
|
|
706
670
|
return !!processedItem && (processedItem.level === 0 || this.isItemActive(processedItem)) && this.isItemVisible(processedItem);
|
|
@@ -719,7 +683,7 @@ class PanelMenuList extends BaseComponent {
|
|
|
719
683
|
while (parentNode && parentNode.tagName?.toLowerCase() !== 'li') {
|
|
720
684
|
parentNode = parentNode?.parentNode;
|
|
721
685
|
}
|
|
722
|
-
return parentNode?.id && this.visibleItems().find((processedItem) => this.isValidItem(processedItem) && `${this.panelId}_${processedItem.key}` === parentNode.id);
|
|
686
|
+
return parentNode?.id && this.visibleItems().find((processedItem) => this.isValidItem(processedItem) && `${this.panelId()}_${processedItem.key}` === parentNode.id);
|
|
723
687
|
}
|
|
724
688
|
createProcessedItems(items, level = 0, parent = {}, parentKey = '') {
|
|
725
689
|
const processedItems = [];
|
|
@@ -776,14 +740,14 @@ class PanelMenuList extends BaseComponent {
|
|
|
776
740
|
}
|
|
777
741
|
}
|
|
778
742
|
scrollInView() {
|
|
779
|
-
const element = findSingle(this.subMenuViewChild().listViewChild.nativeElement, `li[id="${`${this.focusedItemId}`}"]`);
|
|
743
|
+
const element = findSingle(this.subMenuViewChild().listViewChild.nativeElement, `li[id="${`${this.focusedItemId()}`}"]`);
|
|
780
744
|
if (element) {
|
|
781
745
|
element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
782
746
|
}
|
|
783
747
|
}
|
|
784
748
|
onFocus(event) {
|
|
785
|
-
if (!this.focused) {
|
|
786
|
-
this.focused
|
|
749
|
+
if (!this.focused()) {
|
|
750
|
+
this.focused.set(true);
|
|
787
751
|
const focusedItem = this.focusedItem() || (this.isElementInPanel(event, event.relatedTarget) ? this.findItemByEventTarget(event.target) || this.findFirstItem() : this.findLastItem());
|
|
788
752
|
if (event.relatedTarget !== null)
|
|
789
753
|
this.focusedItem.set(focusedItem);
|
|
@@ -791,10 +755,10 @@ class PanelMenuList extends BaseComponent {
|
|
|
791
755
|
}
|
|
792
756
|
onBlur(event) {
|
|
793
757
|
const target = event.relatedTarget;
|
|
794
|
-
if (this.focused && !this.el.nativeElement.contains(target)) {
|
|
795
|
-
this.focused
|
|
758
|
+
if (this.focused() && !this.el.nativeElement.contains(target)) {
|
|
759
|
+
this.focused.set(false);
|
|
796
760
|
this.focusedItem.set(null);
|
|
797
|
-
this.searchValue
|
|
761
|
+
this.searchValue.set('');
|
|
798
762
|
}
|
|
799
763
|
}
|
|
800
764
|
onItemToggle(event) {
|
|
@@ -910,7 +874,7 @@ class PanelMenuList extends BaseComponent {
|
|
|
910
874
|
}
|
|
911
875
|
onEnterKey(event) {
|
|
912
876
|
if (isNotEmpty(this.focusedItem())) {
|
|
913
|
-
const element = findSingle(this.subMenuViewChild().listViewChild.nativeElement, `li[id="${`${this.focusedItemId}`}"]`);
|
|
877
|
+
const element = findSingle(this.subMenuViewChild().listViewChild.nativeElement, `li[id="${`${this.focusedItemId()}`}"]`);
|
|
914
878
|
const anchorElement = element && (findSingle(element, 'a') || findSingle(element, 'button'));
|
|
915
879
|
anchorElement ? anchorElement.click() : element && element.click();
|
|
916
880
|
}
|
|
@@ -934,7 +898,7 @@ class PanelMenuList extends BaseComponent {
|
|
|
934
898
|
return matchedItem || processedItem;
|
|
935
899
|
}
|
|
936
900
|
searchItems(event, char) {
|
|
937
|
-
this.searchValue
|
|
901
|
+
this.searchValue.set((this.searchValue() || '') + char);
|
|
938
902
|
let matchedItem = null;
|
|
939
903
|
let matched = false;
|
|
940
904
|
if (isNotEmpty(this.focusedItem())) {
|
|
@@ -965,30 +929,28 @@ class PanelMenuList extends BaseComponent {
|
|
|
965
929
|
allowHeaderFocus: false
|
|
966
930
|
});
|
|
967
931
|
}
|
|
968
|
-
if (this.searchTimeout) {
|
|
969
|
-
clearTimeout(this.searchTimeout);
|
|
932
|
+
if (this.searchTimeout()) {
|
|
933
|
+
clearTimeout(this.searchTimeout());
|
|
970
934
|
}
|
|
971
|
-
this.searchTimeout
|
|
972
|
-
this.searchValue
|
|
973
|
-
this.searchTimeout
|
|
974
|
-
}, 500);
|
|
935
|
+
this.searchTimeout.set(setTimeout(() => {
|
|
936
|
+
this.searchValue.set('');
|
|
937
|
+
this.searchTimeout.set(null);
|
|
938
|
+
}, 500));
|
|
975
939
|
return matched;
|
|
976
940
|
}
|
|
977
941
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenuList, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
978
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.1", type: PanelMenuList, isStandalone: true, selector: "ul[pPanelMenuList]", inputs: { panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal:
|
|
942
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.2.1", type: PanelMenuList, isStandalone: true, selector: "ul[pPanelMenuList]", inputs: { panelId: { classPropertyName: "panelId", publicName: "panelId", 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 }, parentExpanded: { classPropertyName: "parentExpanded", publicName: "parentExpanded", isSignal: true, isRequired: false, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemToggle: "itemToggle", headerFocus: "headerFocus" }, viewQueries: [{ propertyName: "subMenuViewChild", first: true, predicate: ["submenu"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
979
943
|
<ul
|
|
980
944
|
pPanelMenuSub
|
|
981
945
|
#submenu
|
|
982
|
-
[root]="root"
|
|
983
|
-
[id]="panelId + '_list'"
|
|
984
|
-
[panelId]="panelId"
|
|
985
|
-
[
|
|
986
|
-
[
|
|
987
|
-
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
946
|
+
[root]="root()"
|
|
947
|
+
[id]="panelId() + '_list'"
|
|
948
|
+
[panelId]="panelId()"
|
|
949
|
+
[itemTemplate]="itemTemplate()"
|
|
950
|
+
[focusedItemId]="focused() ? focusedItemId() : undefined"
|
|
988
951
|
[activeItemPath]="activeItemPath()"
|
|
989
|
-
[transitionOptions]="transitionOptions"
|
|
990
952
|
[items]="processedItems()"
|
|
991
|
-
[parentExpanded]="parentExpanded"
|
|
953
|
+
[parentExpanded]="parentExpanded()"
|
|
992
954
|
(itemToggle)="onItemToggle($event)"
|
|
993
955
|
(keydown)="onKeyDown($event)"
|
|
994
956
|
(menuFocus)="onFocus($event)"
|
|
@@ -997,28 +959,25 @@ class PanelMenuList extends BaseComponent {
|
|
|
997
959
|
[unstyled]="unstyled()"
|
|
998
960
|
[motionOptions]="motionOptions()"
|
|
999
961
|
></ul>
|
|
1000
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PanelMenuSub, selector: "ul[pPanelMenuSub]", inputs: ["panelId", "focusedItemId", "items", "itemTemplate", "level", "activeItemPath", "root", "
|
|
962
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: PanelMenuSub, selector: "ul[pPanelMenuSub]", inputs: ["panelId", "focusedItemId", "items", "itemTemplate", "level", "activeItemPath", "root", "parentExpanded", "motionOptions"], outputs: ["itemToggle", "menuFocus", "menuBlur"] }, { kind: "ngmodule", type: RouterModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1001
963
|
}
|
|
1002
964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenuList, decorators: [{
|
|
1003
965
|
type: Component,
|
|
1004
966
|
args: [{
|
|
1005
967
|
selector: 'ul[pPanelMenuList]',
|
|
1006
968
|
imports: [CommonModule, PanelMenuSub, RouterModule, TooltipModule, SharedModule],
|
|
1007
|
-
standalone: true,
|
|
1008
969
|
template: `
|
|
1009
970
|
<ul
|
|
1010
971
|
pPanelMenuSub
|
|
1011
972
|
#submenu
|
|
1012
|
-
[root]="root"
|
|
1013
|
-
[id]="panelId + '_list'"
|
|
1014
|
-
[panelId]="panelId"
|
|
1015
|
-
[
|
|
1016
|
-
[
|
|
1017
|
-
[focusedItemId]="focused ? focusedItemId : undefined"
|
|
973
|
+
[root]="root()"
|
|
974
|
+
[id]="panelId() + '_list'"
|
|
975
|
+
[panelId]="panelId()"
|
|
976
|
+
[itemTemplate]="itemTemplate()"
|
|
977
|
+
[focusedItemId]="focused() ? focusedItemId() : undefined"
|
|
1018
978
|
[activeItemPath]="activeItemPath()"
|
|
1019
|
-
[transitionOptions]="transitionOptions"
|
|
1020
979
|
[items]="processedItems()"
|
|
1021
|
-
[parentExpanded]="parentExpanded"
|
|
980
|
+
[parentExpanded]="parentExpanded()"
|
|
1022
981
|
(itemToggle)="onItemToggle($event)"
|
|
1023
982
|
(keydown)="onKeyDown($event)"
|
|
1024
983
|
(menuFocus)="onFocus($event)"
|
|
@@ -1031,31 +990,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1031
990
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1032
991
|
encapsulation: ViewEncapsulation.None
|
|
1033
992
|
}]
|
|
1034
|
-
}], propDecorators: { panelId: [{
|
|
1035
|
-
type: Input
|
|
1036
|
-
}], id: [{
|
|
1037
|
-
type: Input
|
|
1038
|
-
}], items: [{
|
|
1039
|
-
type: Input
|
|
1040
|
-
}], itemTemplate: [{
|
|
1041
|
-
type: Input
|
|
1042
|
-
}], parentExpanded: [{
|
|
1043
|
-
type: Input,
|
|
1044
|
-
args: [{ transform: booleanAttribute }]
|
|
1045
|
-
}], expanded: [{
|
|
1046
|
-
type: Input,
|
|
1047
|
-
args: [{ transform: booleanAttribute }]
|
|
1048
|
-
}], transitionOptions: [{
|
|
1049
|
-
type: Input
|
|
1050
|
-
}], root: [{
|
|
1051
|
-
type: Input,
|
|
1052
|
-
args: [{ transform: booleanAttribute }]
|
|
1053
|
-
}], tabindex: [{
|
|
1054
|
-
type: Input,
|
|
1055
|
-
args: [{ transform: numberAttribute }]
|
|
1056
|
-
}], activeItem: [{
|
|
1057
|
-
type: Input
|
|
1058
|
-
}], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], itemToggle: [{ type: i0.Output, args: ["itemToggle"] }], headerFocus: [{ type: i0.Output, args: ["headerFocus"] }], subMenuViewChild: [{ type: i0.ViewChild, args: ['submenu', { isSignal: true }] }] } });
|
|
993
|
+
}], propDecorators: { panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], itemTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemTemplate", required: false }] }], parentExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentExpanded", required: false }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], itemToggle: [{ type: i0.Output, args: ["itemToggle"] }], headerFocus: [{ type: i0.Output, args: ["headerFocus"] }], subMenuViewChild: [{ type: i0.ViewChild, args: ['submenu', { isSignal: true }] }] } });
|
|
1059
994
|
/**
|
|
1060
995
|
* PanelMenu is a hybrid of Accordion and Tree components.
|
|
1061
996
|
* @group Components
|
|
@@ -1066,24 +1001,13 @@ class PanelMenu extends BaseComponent {
|
|
|
1066
1001
|
* An array of menuitems.
|
|
1067
1002
|
* @group Props
|
|
1068
1003
|
*/
|
|
1069
|
-
model
|
|
1070
|
-
|
|
1071
|
-
* Style class of the component.
|
|
1072
|
-
* @deprecated since v20.0.0, use `class` instead.
|
|
1073
|
-
* @group Props
|
|
1074
|
-
*/
|
|
1075
|
-
styleClass;
|
|
1004
|
+
model = input(undefined, /* @ts-ignore */
|
|
1005
|
+
...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
|
|
1076
1006
|
/**
|
|
1077
1007
|
* Whether multiple tabs can be activated at the same time or not.
|
|
1078
1008
|
* @group Props
|
|
1079
1009
|
*/
|
|
1080
|
-
multiple = false;
|
|
1081
|
-
/**
|
|
1082
|
-
* Transition options of the animation.
|
|
1083
|
-
* @group Props
|
|
1084
|
-
* @deprecated since v21.0.0, use `motionOptions` instead.
|
|
1085
|
-
*/
|
|
1086
|
-
transitionOptions = '400ms cubic-bezier(0.86, 0, 0.07, 1)';
|
|
1010
|
+
multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1087
1011
|
/**
|
|
1088
1012
|
* The motion options.
|
|
1089
1013
|
* @group Props
|
|
@@ -1101,14 +1025,10 @@ class PanelMenu extends BaseComponent {
|
|
|
1101
1025
|
* Current id state as a string.
|
|
1102
1026
|
* @group Props
|
|
1103
1027
|
*/
|
|
1104
|
-
id
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
*/
|
|
1109
|
-
tabindex = 0;
|
|
1110
|
-
containerViewChild = viewChild('container', /* @ts-ignore */
|
|
1111
|
-
...(ngDevMode ? [{ debugName: "containerViewChild" }] : /* istanbul ignore next */ []));
|
|
1028
|
+
id = input(undefined, /* @ts-ignore */
|
|
1029
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1030
|
+
_id = computed(() => this.id() || uuid('pn_id_'), /* @ts-ignore */
|
|
1031
|
+
...(ngDevMode ? [{ debugName: "_id" }] : /* istanbul ignore next */ []));
|
|
1112
1032
|
/**
|
|
1113
1033
|
* Template option of submenu icon.
|
|
1114
1034
|
* @group Templates
|
|
@@ -1128,16 +1048,26 @@ class PanelMenu extends BaseComponent {
|
|
|
1128
1048
|
itemTemplate = contentChild('item', { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), descendants: false });
|
|
1129
1049
|
templates = contentChildren(PrimeTemplate, /* @ts-ignore */
|
|
1130
1050
|
...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
|
|
1131
|
-
_submenuIconTemplate
|
|
1132
|
-
|
|
1133
|
-
|
|
1051
|
+
_submenuIconTemplate = computed(() => this.templates()
|
|
1052
|
+
.filter((item) => item.getType() === 'submenuicon')
|
|
1053
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
1054
|
+
...(ngDevMode ? [{ debugName: "_submenuIconTemplate" }] : /* istanbul ignore next */ []));
|
|
1055
|
+
_headerIconTemplate = computed(() => this.templates()
|
|
1056
|
+
.filter((item) => item.getType() === 'headericon')
|
|
1057
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
1058
|
+
...(ngDevMode ? [{ debugName: "_headerIconTemplate" }] : /* istanbul ignore next */ []));
|
|
1059
|
+
_itemTemplate = computed(() => this.templates()
|
|
1060
|
+
.filter((item) => !['submenuicon', 'headericon'].includes(item.getType()))
|
|
1061
|
+
.at(-1)?.template, /* @ts-ignore */
|
|
1062
|
+
...(ngDevMode ? [{ debugName: "_itemTemplate" }] : /* istanbul ignore next */ []));
|
|
1134
1063
|
activeItem = signal(null, /* @ts-ignore */
|
|
1135
1064
|
...(ngDevMode ? [{ debugName: "activeItem" }] : /* istanbul ignore next */ []));
|
|
1136
1065
|
_componentStyle = inject(PanelMenuStyle);
|
|
1137
1066
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
1138
1067
|
$pcPanelMenu = inject(PANELMENU_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
|
|
1139
|
-
|
|
1140
|
-
|
|
1068
|
+
constructor() {
|
|
1069
|
+
super();
|
|
1070
|
+
afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
|
|
1141
1071
|
}
|
|
1142
1072
|
getPTOptions(key, item, index) {
|
|
1143
1073
|
return this.ptm(key, {
|
|
@@ -1148,33 +1078,12 @@ class PanelMenu extends BaseComponent {
|
|
|
1148
1078
|
}
|
|
1149
1079
|
});
|
|
1150
1080
|
}
|
|
1151
|
-
onInit() {
|
|
1152
|
-
this.id = this.id || uuid('pn_id_');
|
|
1153
|
-
}
|
|
1154
|
-
onAfterContentInit() {
|
|
1155
|
-
this.templates()?.forEach((item) => {
|
|
1156
|
-
switch (item.getType()) {
|
|
1157
|
-
case 'submenuicon':
|
|
1158
|
-
this._submenuIconTemplate = item.template;
|
|
1159
|
-
break;
|
|
1160
|
-
case 'headericon':
|
|
1161
|
-
this._headerIconTemplate = item.template;
|
|
1162
|
-
break;
|
|
1163
|
-
case 'item':
|
|
1164
|
-
this._itemTemplate = item.template;
|
|
1165
|
-
break;
|
|
1166
|
-
default:
|
|
1167
|
-
this._itemTemplate = item.template;
|
|
1168
|
-
break;
|
|
1169
|
-
}
|
|
1170
|
-
});
|
|
1171
|
-
}
|
|
1172
1081
|
/**
|
|
1173
1082
|
* Collapses open panels.
|
|
1174
1083
|
* @group Method
|
|
1175
1084
|
*/
|
|
1176
1085
|
collapseAll() {
|
|
1177
|
-
for (let item of this.model) {
|
|
1086
|
+
for (let item of this.model()) {
|
|
1178
1087
|
if (item.expanded) {
|
|
1179
1088
|
item.expanded = false;
|
|
1180
1089
|
}
|
|
@@ -1183,7 +1092,7 @@ class PanelMenu extends BaseComponent {
|
|
|
1183
1092
|
}
|
|
1184
1093
|
changeActiveItem(event, item, index, selfActive = false) {
|
|
1185
1094
|
if (!this.isItemDisabled(item)) {
|
|
1186
|
-
const activeItem = selfActive ? item : this.activeItem && equals(item, this.activeItem) ? null : item;
|
|
1095
|
+
const activeItem = selfActive ? item : this.activeItem() && equals(item, this.activeItem()) ? null : item;
|
|
1187
1096
|
this.activeItem.set(activeItem);
|
|
1188
1097
|
}
|
|
1189
1098
|
}
|
|
@@ -1206,7 +1115,7 @@ class PanelMenu extends BaseComponent {
|
|
|
1206
1115
|
return isNotEmpty(item.items);
|
|
1207
1116
|
}
|
|
1208
1117
|
getPanelId(index, item) {
|
|
1209
|
-
return item && item.id ? item.id : `${this.
|
|
1118
|
+
return item && item.id ? item.id : `${this._id()}_${index}`;
|
|
1210
1119
|
}
|
|
1211
1120
|
getHeaderId(item, index) {
|
|
1212
1121
|
return item.id ? item.id + '_header' : `${this.getPanelId(index)}_header`;
|
|
@@ -1234,12 +1143,13 @@ class PanelMenu extends BaseComponent {
|
|
|
1234
1143
|
return headerElement ? (getAttribute(headerElement, 'data-p-disabled') ? this.findPrevHeader(headerElement.parentElement) : headerElement) : null;
|
|
1235
1144
|
}
|
|
1236
1145
|
findFirstHeader() {
|
|
1237
|
-
|
|
1238
|
-
|
|
1146
|
+
// The panels are rendered directly inside the host element.
|
|
1147
|
+
const firstPanel = this.el.nativeElement.firstElementChild;
|
|
1148
|
+
return firstPanel ? this.findNextHeader(firstPanel, true) : null;
|
|
1239
1149
|
}
|
|
1240
1150
|
findLastHeader() {
|
|
1241
|
-
const
|
|
1242
|
-
return
|
|
1151
|
+
const lastPanel = this.el.nativeElement.lastElementChild;
|
|
1152
|
+
return lastPanel ? this.findPrevHeader(lastPanel, true) : null;
|
|
1243
1153
|
}
|
|
1244
1154
|
onHeaderClick(event, item, index) {
|
|
1245
1155
|
if (this.isItemDisabled(item)) {
|
|
@@ -1249,8 +1159,8 @@ class PanelMenu extends BaseComponent {
|
|
|
1249
1159
|
if (item.command) {
|
|
1250
1160
|
item.command({ originalEvent: event, item });
|
|
1251
1161
|
}
|
|
1252
|
-
if (!this.multiple) {
|
|
1253
|
-
for (let modelItem of this.model) {
|
|
1162
|
+
if (!this.multiple()) {
|
|
1163
|
+
for (let modelItem of this.model()) {
|
|
1254
1164
|
if (item !== modelItem && modelItem.expanded) {
|
|
1255
1165
|
modelItem.expanded = false;
|
|
1256
1166
|
}
|
|
@@ -1306,9 +1216,9 @@ class PanelMenu extends BaseComponent {
|
|
|
1306
1216
|
headerAction ? headerAction.click() : this.onHeaderClick(event, item, index);
|
|
1307
1217
|
event.preventDefault();
|
|
1308
1218
|
}
|
|
1309
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenu, deps:
|
|
1310
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: PanelMenu, isStandalone: true, selector: "p-panelMenu, p-panelmenu, p-panel-menu", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal:
|
|
1311
|
-
@for (item of model; track item; let f = $first; let l = $last; let i = $index) {
|
|
1219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1220
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: PanelMenu, isStandalone: true, selector: "p-panelMenu, p-panelmenu, p-panel-menu", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, motionOptions: { classPropertyName: "motionOptions", publicName: "motionOptions", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "cx('root')" } }, providers: [PanelMenuStyle, { provide: PANELMENU_INSTANCE, useExisting: PanelMenu }, { provide: PARENT_INSTANCE, useExisting: PanelMenu }], queries: [{ propertyName: "submenuIconTemplate", first: true, predicate: ["submenuicon"], isSignal: true }, { propertyName: "headerIconTemplate", first: true, predicate: ["headericon"], isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ["item"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
1221
|
+
@for (item of model(); track item; let f = $first; let l = $last; let i = $index) {
|
|
1312
1222
|
@if (isItemVisible(item)) {
|
|
1313
1223
|
<div [class]="cn(cx('panel'), getItemProp(item, 'headerClass'))" [ngStyle]="getItemProp(item, 'style')" [pBind]="ptm('panel')">
|
|
1314
1224
|
<div
|
|
@@ -1331,7 +1241,7 @@ class PanelMenu extends BaseComponent {
|
|
|
1331
1241
|
(keydown)="onHeaderKeyDown($event, item, i)"
|
|
1332
1242
|
>
|
|
1333
1243
|
<div [class]="cx('headerContent')" [pBind]="getPTOptions('headerContent', item, i)">
|
|
1334
|
-
@if (!itemTemplate() && !_itemTemplate) {
|
|
1244
|
+
@if (!itemTemplate() && !_itemTemplate()) {
|
|
1335
1245
|
@if (!getItemProp(item, 'routerLink')) {
|
|
1336
1246
|
<a
|
|
1337
1247
|
[attr.href]="getItemProp(item, 'url')"
|
|
@@ -1344,7 +1254,7 @@ class PanelMenu extends BaseComponent {
|
|
|
1344
1254
|
[pBind]="getPTOptions('headerLink', item, i)"
|
|
1345
1255
|
>
|
|
1346
1256
|
@if (isItemGroup(item)) {
|
|
1347
|
-
@if (!headerIconTemplate() && !_headerIconTemplate) {
|
|
1257
|
+
@if (!headerIconTemplate() && !_headerIconTemplate()) {
|
|
1348
1258
|
@if (isItemActive(item)) {
|
|
1349
1259
|
<svg data-p-icon="chevron-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1350
1260
|
}
|
|
@@ -1352,7 +1262,7 @@ class PanelMenu extends BaseComponent {
|
|
|
1352
1262
|
<svg data-p-icon="chevron-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1353
1263
|
}
|
|
1354
1264
|
}
|
|
1355
|
-
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate"></ng-template>
|
|
1265
|
+
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate()"></ng-template>
|
|
1356
1266
|
}
|
|
1357
1267
|
@if (item.icon) {
|
|
1358
1268
|
<span [class]="cn(cx('headerIcon'), item.icon, getItemProp(item, 'iconClass'))" [ngStyle]="getItemProp(item, 'iconStyle')" [pBind]="getPTOptions('headerIcon', item, i)"></span>
|
|
@@ -1395,7 +1305,7 @@ class PanelMenu extends BaseComponent {
|
|
|
1395
1305
|
[pBind]="getPTOptions('headerLink', item, i)"
|
|
1396
1306
|
>
|
|
1397
1307
|
@if (isItemGroup(item)) {
|
|
1398
|
-
@if (!headerIconTemplate() && !_headerIconTemplate) {
|
|
1308
|
+
@if (!headerIconTemplate() && !_headerIconTemplate()) {
|
|
1399
1309
|
@if (isItemActive(item)) {
|
|
1400
1310
|
<svg data-p-icon="chevron-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1401
1311
|
}
|
|
@@ -1403,7 +1313,7 @@ class PanelMenu extends BaseComponent {
|
|
|
1403
1313
|
<svg data-p-icon="chevron-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1404
1314
|
}
|
|
1405
1315
|
}
|
|
1406
|
-
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate"></ng-template>
|
|
1316
|
+
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate()"></ng-template>
|
|
1407
1317
|
}
|
|
1408
1318
|
@if (item.icon) {
|
|
1409
1319
|
<span [class]="cn(cx('headerIcon'), item.icon, getItemProp(item, 'iconClass'))" [ngStyle]="getItemProp(item, 'iconStyle')" [pBind]="getPTOptions('headerIcon', item, i)"></span>
|
|
@@ -1436,11 +1346,8 @@ class PanelMenu extends BaseComponent {
|
|
|
1436
1346
|
pPanelMenuList
|
|
1437
1347
|
[panelId]="getPanelId(i, item)"
|
|
1438
1348
|
[items]="getItemProp(item, 'items')"
|
|
1439
|
-
[itemTemplate]="itemTemplate() || _itemTemplate"
|
|
1440
|
-
[transitionOptions]="transitionOptions"
|
|
1349
|
+
[itemTemplate]="itemTemplate() || _itemTemplate()"
|
|
1441
1350
|
[root]="true"
|
|
1442
|
-
[activeItem]="activeItem()"
|
|
1443
|
-
[tabindex]="tabindex"
|
|
1444
1351
|
[parentExpanded]="isItemActive(item)"
|
|
1445
1352
|
(headerFocus)="updateFocusedHeader($event)"
|
|
1446
1353
|
[pt]="pt()"
|
|
@@ -1453,16 +1360,15 @@ class PanelMenu extends BaseComponent {
|
|
|
1453
1360
|
</div>
|
|
1454
1361
|
}
|
|
1455
1362
|
}
|
|
1456
|
-
`, isInline: true, dependencies: [{ 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: "component", type: PanelMenuList, selector: "ul[pPanelMenuList]", inputs: ["panelId", "
|
|
1363
|
+
`, isInline: true, dependencies: [{ 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: "component", type: PanelMenuList, selector: "ul[pPanelMenuList]", inputs: ["panelId", "items", "itemTemplate", "parentExpanded", "root", "motionOptions"], outputs: ["itemToggle", "headerFocus"] }, { 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: "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: ChevronDownIcon, selector: "[data-p-icon=\"chevron-down\"]" }, { kind: "component", type: ChevronRightIcon, selector: "[data-p-icon=\"chevron-right\"]" }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "ngmodule", type: MotionModule }, { kind: "directive", type: i5.MotionDirective, selector: "[pMotion]", inputs: ["pMotion", "pMotionName", "pMotionType", "pMotionSafe", "pMotionDisabled", "pMotionAppear", "pMotionEnter", "pMotionLeave", "pMotionDuration", "pMotionHideStrategy", "pMotionEnterFromClass", "pMotionEnterToClass", "pMotionEnterActiveClass", "pMotionLeaveFromClass", "pMotionLeaveToClass", "pMotionLeaveActiveClass", "pMotionOptions"], outputs: ["pMotionOnBeforeEnter", "pMotionOnEnter", "pMotionOnAfterEnter", "pMotionOnEnterCancelled", "pMotionOnBeforeLeave", "pMotionOnLeave", "pMotionOnAfterLeave", "pMotionOnLeaveCancelled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
1457
1364
|
}
|
|
1458
1365
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenu, decorators: [{
|
|
1459
1366
|
type: Component,
|
|
1460
1367
|
args: [{
|
|
1461
1368
|
selector: 'p-panelMenu, p-panelmenu, p-panel-menu',
|
|
1462
1369
|
imports: [CommonModule, PanelMenuList, RouterModule, TooltipModule, ChevronDownIcon, ChevronRightIcon, SharedModule, BindModule, MotionModule],
|
|
1463
|
-
standalone: true,
|
|
1464
1370
|
template: `
|
|
1465
|
-
@for (item of model; track item; let f = $first; let l = $last; let i = $index) {
|
|
1371
|
+
@for (item of model(); track item; let f = $first; let l = $last; let i = $index) {
|
|
1466
1372
|
@if (isItemVisible(item)) {
|
|
1467
1373
|
<div [class]="cn(cx('panel'), getItemProp(item, 'headerClass'))" [ngStyle]="getItemProp(item, 'style')" [pBind]="ptm('panel')">
|
|
1468
1374
|
<div
|
|
@@ -1485,7 +1391,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1485
1391
|
(keydown)="onHeaderKeyDown($event, item, i)"
|
|
1486
1392
|
>
|
|
1487
1393
|
<div [class]="cx('headerContent')" [pBind]="getPTOptions('headerContent', item, i)">
|
|
1488
|
-
@if (!itemTemplate() && !_itemTemplate) {
|
|
1394
|
+
@if (!itemTemplate() && !_itemTemplate()) {
|
|
1489
1395
|
@if (!getItemProp(item, 'routerLink')) {
|
|
1490
1396
|
<a
|
|
1491
1397
|
[attr.href]="getItemProp(item, 'url')"
|
|
@@ -1498,7 +1404,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1498
1404
|
[pBind]="getPTOptions('headerLink', item, i)"
|
|
1499
1405
|
>
|
|
1500
1406
|
@if (isItemGroup(item)) {
|
|
1501
|
-
@if (!headerIconTemplate() && !_headerIconTemplate) {
|
|
1407
|
+
@if (!headerIconTemplate() && !_headerIconTemplate()) {
|
|
1502
1408
|
@if (isItemActive(item)) {
|
|
1503
1409
|
<svg data-p-icon="chevron-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1504
1410
|
}
|
|
@@ -1506,7 +1412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1506
1412
|
<svg data-p-icon="chevron-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1507
1413
|
}
|
|
1508
1414
|
}
|
|
1509
|
-
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate"></ng-template>
|
|
1415
|
+
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate()"></ng-template>
|
|
1510
1416
|
}
|
|
1511
1417
|
@if (item.icon) {
|
|
1512
1418
|
<span [class]="cn(cx('headerIcon'), item.icon, getItemProp(item, 'iconClass'))" [ngStyle]="getItemProp(item, 'iconStyle')" [pBind]="getPTOptions('headerIcon', item, i)"></span>
|
|
@@ -1549,7 +1455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1549
1455
|
[pBind]="getPTOptions('headerLink', item, i)"
|
|
1550
1456
|
>
|
|
1551
1457
|
@if (isItemGroup(item)) {
|
|
1552
|
-
@if (!headerIconTemplate() && !_headerIconTemplate) {
|
|
1458
|
+
@if (!headerIconTemplate() && !_headerIconTemplate()) {
|
|
1553
1459
|
@if (isItemActive(item)) {
|
|
1554
1460
|
<svg data-p-icon="chevron-down" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1555
1461
|
}
|
|
@@ -1557,7 +1463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1557
1463
|
<svg data-p-icon="chevron-right" [class]="cx('submenuIcon')" [pBind]="getPTOptions('submenuIcon', item, i)" />
|
|
1558
1464
|
}
|
|
1559
1465
|
}
|
|
1560
|
-
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate"></ng-template>
|
|
1466
|
+
<ng-template *ngTemplateOutlet="headerIconTemplate() || _headerIconTemplate()"></ng-template>
|
|
1561
1467
|
}
|
|
1562
1468
|
@if (item.icon) {
|
|
1563
1469
|
<span [class]="cn(cx('headerIcon'), item.icon, getItemProp(item, 'iconClass'))" [ngStyle]="getItemProp(item, 'iconStyle')" [pBind]="getPTOptions('headerIcon', item, i)"></span>
|
|
@@ -1590,11 +1496,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1590
1496
|
pPanelMenuList
|
|
1591
1497
|
[panelId]="getPanelId(i, item)"
|
|
1592
1498
|
[items]="getItemProp(item, 'items')"
|
|
1593
|
-
[itemTemplate]="itemTemplate() || _itemTemplate"
|
|
1594
|
-
[transitionOptions]="transitionOptions"
|
|
1499
|
+
[itemTemplate]="itemTemplate() || _itemTemplate()"
|
|
1595
1500
|
[root]="true"
|
|
1596
|
-
[activeItem]="activeItem()"
|
|
1597
|
-
[tabindex]="tabindex"
|
|
1598
1501
|
[parentExpanded]="isItemActive(item)"
|
|
1599
1502
|
(headerFocus)="updateFocusedHeader($event)"
|
|
1600
1503
|
[pt]="pt()"
|
|
@@ -1612,25 +1515,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
|
|
|
1612
1515
|
encapsulation: ViewEncapsulation.None,
|
|
1613
1516
|
providers: [PanelMenuStyle, { provide: PANELMENU_INSTANCE, useExisting: PanelMenu }, { provide: PARENT_INSTANCE, useExisting: PanelMenu }],
|
|
1614
1517
|
host: {
|
|
1615
|
-
'[class]':
|
|
1518
|
+
'[class]': "cx('root')"
|
|
1616
1519
|
},
|
|
1617
1520
|
hostDirectives: [Bind]
|
|
1618
1521
|
}]
|
|
1619
|
-
}], propDecorators: { model: [{
|
|
1620
|
-
type: Input
|
|
1621
|
-
}], styleClass: [{
|
|
1622
|
-
type: Input
|
|
1623
|
-
}], multiple: [{
|
|
1624
|
-
type: Input,
|
|
1625
|
-
args: [{ transform: booleanAttribute }]
|
|
1626
|
-
}], transitionOptions: [{
|
|
1627
|
-
type: Input
|
|
1628
|
-
}], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], id: [{
|
|
1629
|
-
type: Input
|
|
1630
|
-
}], tabindex: [{
|
|
1631
|
-
type: Input,
|
|
1632
|
-
args: [{ transform: numberAttribute }]
|
|
1633
|
-
}], containerViewChild: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }], submenuIconTemplate: [{ type: i0.ContentChild, args: ['submenuicon', { ...{ descendants: false }, isSignal: true }] }], headerIconTemplate: [{ type: i0.ContentChild, args: ['headericon', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
1522
|
+
}], ctorParameters: () => [], propDecorators: { model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], motionOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "motionOptions", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], submenuIconTemplate: [{ type: i0.ContentChild, args: ['submenuicon', { ...{ descendants: false }, isSignal: true }] }], headerIconTemplate: [{ type: i0.ContentChild, args: ['headericon', { ...{ descendants: false }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: ['item', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
|
|
1634
1523
|
class PanelMenuModule {
|
|
1635
1524
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: PanelMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1636
1525
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: PanelMenuModule, imports: [PanelMenu, SharedModule], exports: [PanelMenu, SharedModule] });
|