primeng 16.5.1 → 16.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/menuitem.d.ts +5 -1
- package/breadcrumb/breadcrumb.d.ts +1 -0
- package/contextmenu/contextmenu.d.ts +3 -1
- package/esm2022/api/menuitem.mjs +1 -1
- package/esm2022/breadcrumb/breadcrumb.mjs +44 -17
- package/esm2022/button/button.mjs +2 -2
- package/esm2022/carousel/carousel.mjs +2 -1
- package/esm2022/contextmenu/contextmenu.mjs +168 -144
- package/esm2022/galleria/galleria.mjs +3 -3
- package/esm2022/image/image.mjs +11 -4
- package/esm2022/megamenu/megamenu.mjs +168 -144
- package/esm2022/menu/menu.mjs +146 -94
- package/esm2022/menubar/menubar.mjs +168 -144
- package/esm2022/multiselect/multiselect.mjs +2 -1
- package/esm2022/overlaypanel/overlaypanel.mjs +9 -3
- package/esm2022/panelmenu/panelmenu.mjs +135 -106
- package/esm2022/splitbutton/splitbutton.interface.mjs +1 -1
- package/esm2022/splitbutton/splitbutton.mjs +70 -14
- package/esm2022/tabmenu/tabmenu.mjs +17 -25
- package/esm2022/tabview/tabview.mjs +3 -3
- package/esm2022/tieredmenu/tieredmenu.mjs +168 -144
- package/esm2022/treetable/treetable.mjs +1 -1
- package/fesm2022/primeng-breadcrumb.mjs +43 -16
- package/fesm2022/primeng-breadcrumb.mjs.map +1 -1
- package/fesm2022/primeng-button.mjs +1 -1
- package/fesm2022/primeng-button.mjs.map +1 -1
- package/fesm2022/primeng-carousel.mjs +1 -0
- package/fesm2022/primeng-carousel.mjs.map +1 -1
- package/fesm2022/primeng-contextmenu.mjs +167 -143
- package/fesm2022/primeng-contextmenu.mjs.map +1 -1
- package/fesm2022/primeng-galleria.mjs +2 -2
- package/fesm2022/primeng-galleria.mjs.map +1 -1
- package/fesm2022/primeng-image.mjs +10 -3
- package/fesm2022/primeng-image.mjs.map +1 -1
- package/fesm2022/primeng-megamenu.mjs +167 -143
- package/fesm2022/primeng-megamenu.mjs.map +1 -1
- package/fesm2022/primeng-menu.mjs +146 -94
- package/fesm2022/primeng-menu.mjs.map +1 -1
- package/fesm2022/primeng-menubar.mjs +167 -143
- package/fesm2022/primeng-menubar.mjs.map +1 -1
- package/fesm2022/primeng-multiselect.mjs +1 -0
- package/fesm2022/primeng-multiselect.mjs.map +1 -1
- package/fesm2022/primeng-overlaypanel.mjs +8 -2
- package/fesm2022/primeng-overlaypanel.mjs.map +1 -1
- package/fesm2022/primeng-panelmenu.mjs +134 -105
- package/fesm2022/primeng-panelmenu.mjs.map +1 -1
- package/fesm2022/primeng-splitbutton.mjs +69 -13
- package/fesm2022/primeng-splitbutton.mjs.map +1 -1
- package/fesm2022/primeng-tabmenu.mjs +16 -24
- package/fesm2022/primeng-tabmenu.mjs.map +1 -1
- package/fesm2022/primeng-tabview.mjs +2 -2
- package/fesm2022/primeng-tabview.mjs.map +1 -1
- package/fesm2022/primeng-tieredmenu.mjs +167 -143
- package/fesm2022/primeng-tieredmenu.mjs.map +1 -1
- package/fesm2022/primeng-treetable.mjs.map +1 -1
- package/image/image.d.ts +6 -1
- package/megamenu/megamenu.d.ts +3 -1
- package/menu/menu.d.ts +11 -5
- package/menubar/menubar.d.ts +3 -1
- package/overlaypanel/overlaypanel.d.ts +1 -0
- package/package.json +90 -90
- package/panelmenu/panelmenu.d.ts +5 -2
- package/splitbutton/splitbutton.d.ts +10 -1
- package/splitbutton/splitbutton.interface.d.ts +15 -0
- package/tabmenu/tabmenu.d.ts +2 -2
- package/tieredmenu/tieredmenu.d.ts +3 -1
- package/treetable/treetable.d.ts +1 -1
@@ -1,18 +1,19 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { PLATFORM_ID, Pipe, Inject, EventEmitter, forwardRef, Component, ViewEncapsulation, Input, Output, computed, signal, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
|
3
1
|
import { trigger, transition, style, animate } from '@angular/animations';
|
4
2
|
import * as i2 from '@angular/common';
|
5
3
|
import { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';
|
6
|
-
import
|
7
|
-
import {
|
4
|
+
import * as i0 from '@angular/core';
|
5
|
+
import { PLATFORM_ID, Pipe, Inject, EventEmitter, forwardRef, Component, ViewEncapsulation, Input, Output, computed, signal, ChangeDetectionStrategy, ViewChild, ContentChildren, NgModule } from '@angular/core';
|
8
6
|
import * as i3 from '@angular/router';
|
9
7
|
import { RouterModule } from '@angular/router';
|
8
|
+
import * as i5 from 'primeng/api';
|
9
|
+
import { PrimeTemplate } from 'primeng/api';
|
10
|
+
import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
|
10
11
|
import * as i4 from 'primeng/ripple';
|
11
12
|
import { RippleModule } from 'primeng/ripple';
|
12
13
|
import * as i6 from 'primeng/tooltip';
|
13
14
|
import { TooltipModule } from 'primeng/tooltip';
|
15
|
+
import { UniqueComponentId, ZIndexUtils } from 'primeng/utils';
|
14
16
|
import * as i1 from '@angular/platform-browser';
|
15
|
-
import * as i5 from 'primeng/api';
|
16
17
|
|
17
18
|
class SafeHtmlPipe {
|
18
19
|
platformId;
|
@@ -41,6 +42,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
41
42
|
}] }, { type: i1.DomSanitizer }]; } });
|
42
43
|
class MenuItemContent {
|
43
44
|
item;
|
45
|
+
itemTemplate;
|
44
46
|
id;
|
45
47
|
onMenuItemClick = new EventEmitter();
|
46
48
|
menu;
|
@@ -51,49 +53,53 @@ class MenuItemContent {
|
|
51
53
|
this.onMenuItemClick.emit({ originalEvent: event, item: { ...item, id: this.id } });
|
52
54
|
}
|
53
55
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: MenuItemContent, deps: [{ token: forwardRef(() => Menu) }], target: i0.ɵɵFactoryTarget.Component });
|
54
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: MenuItemContent, selector: "[pMenuItemContent]", inputs: { item: ["pMenuItemContent", "item"], id: "id" }, outputs: { onMenuItemClick: "onMenuItemClick" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
55
|
-
<div [attr.data-pc-section]="'content'" class="p-menuitem-content">
|
56
|
-
<
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
</
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: MenuItemContent, selector: "[pMenuItemContent]", inputs: { item: ["pMenuItemContent", "item"], itemTemplate: "itemTemplate", id: "id" }, outputs: { onMenuItemClick: "onMenuItemClick" }, host: { classAttribute: "p-element" }, ngImport: i0, template: `
|
57
|
+
<div [attr.data-pc-section]="'content'" class="p-menuitem-content" (click)="onItemClick($event, item)">
|
58
|
+
<ng-container *ngIf="!itemTemplate">
|
59
|
+
<a
|
60
|
+
*ngIf="!item?.routerLink"
|
61
|
+
[attr.title]="item.title"
|
62
|
+
[attr.href]="item.url || null"
|
63
|
+
[attr.data-automationid]="item.automationId"
|
64
|
+
[attr.tabindex]="-1"
|
65
|
+
[attr.data-pc-section]="'action'"
|
66
|
+
[attr.aria-hidden]="true"
|
67
|
+
class="p-menuitem-link"
|
68
|
+
[target]="item.target"
|
69
|
+
[ngClass]="{ 'p-disabled': item.disabled }"
|
70
|
+
pRipple
|
71
|
+
>
|
72
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
73
|
+
</a>
|
74
|
+
<a
|
75
|
+
*ngIf="item?.routerLink"
|
76
|
+
[routerLink]="item.routerLink"
|
77
|
+
[attr.data-automationid]="item.automationId"
|
78
|
+
[attr.tabindex]="-1"
|
79
|
+
[attr.data-pc-section]="'action'"
|
80
|
+
[attr.aria-hidden]="true"
|
81
|
+
[attr.title]="item.title"
|
82
|
+
[queryParams]="item.queryParams"
|
83
|
+
routerLinkActive="p-menuitem-link-active"
|
84
|
+
[routerLinkActiveOptions]="item.routerLinkActiveOptions || { exact: false }"
|
85
|
+
class="p-menuitem-link"
|
86
|
+
[target]="item.target"
|
87
|
+
[ngClass]="{ 'p-disabled': item.disabled }"
|
88
|
+
[fragment]="item.fragment"
|
89
|
+
[queryParamsHandling]="item.queryParamsHandling"
|
90
|
+
[preserveFragment]="item.preserveFragment"
|
91
|
+
[skipLocationChange]="item.skipLocationChange"
|
92
|
+
[replaceUrl]="item.replaceUrl"
|
93
|
+
[state]="item.state"
|
94
|
+
pRipple
|
95
|
+
>
|
96
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
97
|
+
</a>
|
98
|
+
</ng-container>
|
99
|
+
|
100
|
+
<ng-container *ngIf="itemTemplate">
|
101
|
+
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-template>
|
102
|
+
</ng-container>
|
97
103
|
|
98
104
|
<ng-template #itemContent>
|
99
105
|
<span class="p-menuitem-icon" *ngIf="item.icon" [ngClass]="item.icon" [class]="item.iconClass" [ngStyle]="item.iconStyle"></span>
|
@@ -109,48 +115,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
109
115
|
args: [{
|
110
116
|
selector: '[pMenuItemContent]',
|
111
117
|
template: `
|
112
|
-
<div [attr.data-pc-section]="'content'" class="p-menuitem-content">
|
113
|
-
<
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
</
|
118
|
+
<div [attr.data-pc-section]="'content'" class="p-menuitem-content" (click)="onItemClick($event, item)">
|
119
|
+
<ng-container *ngIf="!itemTemplate">
|
120
|
+
<a
|
121
|
+
*ngIf="!item?.routerLink"
|
122
|
+
[attr.title]="item.title"
|
123
|
+
[attr.href]="item.url || null"
|
124
|
+
[attr.data-automationid]="item.automationId"
|
125
|
+
[attr.tabindex]="-1"
|
126
|
+
[attr.data-pc-section]="'action'"
|
127
|
+
[attr.aria-hidden]="true"
|
128
|
+
class="p-menuitem-link"
|
129
|
+
[target]="item.target"
|
130
|
+
[ngClass]="{ 'p-disabled': item.disabled }"
|
131
|
+
pRipple
|
132
|
+
>
|
133
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
134
|
+
</a>
|
135
|
+
<a
|
136
|
+
*ngIf="item?.routerLink"
|
137
|
+
[routerLink]="item.routerLink"
|
138
|
+
[attr.data-automationid]="item.automationId"
|
139
|
+
[attr.tabindex]="-1"
|
140
|
+
[attr.data-pc-section]="'action'"
|
141
|
+
[attr.aria-hidden]="true"
|
142
|
+
[attr.title]="item.title"
|
143
|
+
[queryParams]="item.queryParams"
|
144
|
+
routerLinkActive="p-menuitem-link-active"
|
145
|
+
[routerLinkActiveOptions]="item.routerLinkActiveOptions || { exact: false }"
|
146
|
+
class="p-menuitem-link"
|
147
|
+
[target]="item.target"
|
148
|
+
[ngClass]="{ 'p-disabled': item.disabled }"
|
149
|
+
[fragment]="item.fragment"
|
150
|
+
[queryParamsHandling]="item.queryParamsHandling"
|
151
|
+
[preserveFragment]="item.preserveFragment"
|
152
|
+
[skipLocationChange]="item.skipLocationChange"
|
153
|
+
[replaceUrl]="item.replaceUrl"
|
154
|
+
[state]="item.state"
|
155
|
+
pRipple
|
156
|
+
>
|
157
|
+
<ng-container *ngTemplateOutlet="itemContent; context: { $implicit: item }"></ng-container>
|
158
|
+
</a>
|
159
|
+
</ng-container>
|
160
|
+
|
161
|
+
<ng-container *ngIf="itemTemplate">
|
162
|
+
<ng-template *ngTemplateOutlet="itemTemplate; context: { $implicit: item }"></ng-template>
|
163
|
+
</ng-container>
|
154
164
|
|
155
165
|
<ng-template #itemContent>
|
156
166
|
<span class="p-menuitem-icon" *ngIf="item.icon" [ngClass]="item.icon" [class]="item.iconClass" [ngStyle]="item.iconStyle"></span>
|
@@ -171,9 +181,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
171
181
|
}] }]; }, propDecorators: { item: [{
|
172
182
|
type: Input,
|
173
183
|
args: ['pMenuItemContent']
|
184
|
+
}], itemTemplate: [{
|
185
|
+
type: Input
|
174
186
|
}], id: [{
|
175
|
-
type: Input
|
176
|
-
args: ['id']
|
187
|
+
type: Input
|
177
188
|
}], onMenuItemClick: [{
|
178
189
|
type: Output
|
179
190
|
}] } });
|
@@ -278,6 +289,10 @@ class Menu {
|
|
278
289
|
onFocus = new EventEmitter();
|
279
290
|
listViewChild;
|
280
291
|
containerViewChild;
|
292
|
+
templates;
|
293
|
+
startTemplate;
|
294
|
+
endTemplate;
|
295
|
+
itemTemplate;
|
281
296
|
container;
|
282
297
|
scrollHandler;
|
283
298
|
documentClickListener;
|
@@ -333,6 +348,24 @@ class Menu {
|
|
333
348
|
this.bindDocumentClickListener();
|
334
349
|
}
|
335
350
|
}
|
351
|
+
ngAfterContentInit() {
|
352
|
+
this.templates?.forEach((item) => {
|
353
|
+
switch (item.getType()) {
|
354
|
+
case 'start':
|
355
|
+
this.startTemplate = item.template;
|
356
|
+
break;
|
357
|
+
case 'end':
|
358
|
+
this.endTemplate = item.template;
|
359
|
+
break;
|
360
|
+
case 'itemTemplate':
|
361
|
+
this.itemTemplate = item.template;
|
362
|
+
break;
|
363
|
+
default:
|
364
|
+
this.itemTemplate = item.template;
|
365
|
+
break;
|
366
|
+
}
|
367
|
+
});
|
368
|
+
}
|
336
369
|
onOverlayAnimationStart(event) {
|
337
370
|
switch (event.toState) {
|
338
371
|
case 'visible':
|
@@ -644,7 +677,7 @@ class Menu {
|
|
644
677
|
return item.visible === false;
|
645
678
|
}
|
646
679
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: Menu, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i5.PrimeNGConfig }, { token: i5.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
|
647
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: Menu, selector: "p-menu", inputs: { model: "model", popup: "popup", style: "style", styleClass: "styleClass", appendTo: "appendTo", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", id: "id", tabindex: "tabindex" }, outputs: { onShow: "onShow", onHide: "onHide", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "listViewChild", first: true, predicate: ["list"], descendants: true }, { propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: `
|
680
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.2", type: Menu, selector: "p-menu", inputs: { model: "model", popup: "popup", style: "style", styleClass: "styleClass", appendTo: "appendTo", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", id: "id", tabindex: "tabindex" }, outputs: { onShow: "onShow", onHide: "onHide", onBlur: "onBlur", onFocus: "onFocus" }, host: { classAttribute: "p-element" }, queries: [{ propertyName: "templates", predicate: PrimeTemplate }], viewQueries: [{ propertyName: "listViewChild", first: true, predicate: ["list"], descendants: true }, { propertyName: "containerViewChild", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: `
|
648
681
|
<div
|
649
682
|
#container
|
650
683
|
[ngClass]="{ 'p-menu p-component': true, 'p-menu-overlay': popup }"
|
@@ -659,6 +692,9 @@ class Menu {
|
|
659
692
|
[attr.data-pc-name]="'menu'"
|
660
693
|
[attr.id]="id"
|
661
694
|
>
|
695
|
+
<div *ngIf="startTemplate" class="p-menu-start" [attr.data-pc-section]="'start'">
|
696
|
+
<ng-container *ngTemplateOutlet="startTemplate"></ng-container>
|
697
|
+
</div>
|
662
698
|
<ul
|
663
699
|
#list
|
664
700
|
class="p-menu-list p-reset"
|
@@ -694,6 +730,7 @@ class Menu {
|
|
694
730
|
class="p-menuitem"
|
695
731
|
*ngIf="!item.separator"
|
696
732
|
[pMenuItemContent]="item"
|
733
|
+
[itemTemplate]="itemTemplate"
|
697
734
|
[ngClass]="{ 'p-hidden': item.visible === false || submenu.visible === false, 'p-focus': focusedOptionId() && menuitemId(item, id, i, j) === focusedOptionId(), 'p-disabled': disabled(item.disabled) }"
|
698
735
|
[ngStyle]="item.style"
|
699
736
|
[class]="item.styleClass"
|
@@ -716,6 +753,7 @@ class Menu {
|
|
716
753
|
class="p-menuitem"
|
717
754
|
*ngIf="!item.separator"
|
718
755
|
[pMenuItemContent]="item"
|
756
|
+
[itemTemplate]="itemTemplate"
|
719
757
|
[ngClass]="{ 'p-hidden': item.visible === false, 'p-focus': focusedOptionId() && menuitemId(item, id, i, j) === focusedOptionId(), 'p-disabled': disabled(item.disabled) }"
|
720
758
|
[ngStyle]="item.style"
|
721
759
|
[class]="item.styleClass"
|
@@ -732,8 +770,11 @@ class Menu {
|
|
732
770
|
></li>
|
733
771
|
</ng-template>
|
734
772
|
</ul>
|
773
|
+
<div *ngIf="endTemplate" class="p-menu-end" [attr.data-pc-section]="'end'">
|
774
|
+
<ng-container *ngTemplateOutlet="endTemplate"></ng-container>
|
775
|
+
</div>
|
735
776
|
</div>
|
736
|
-
`, isInline: true, styles: ["@layer primeng{.p-menu-overlay{position:absolute;top:0;left:0}.p-menu ul{margin:0;padding:0;list-style:none}.p-menu .p-submenu-header{align-items:center}.p-menu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-menu .p-menuitem-text{line-height:1}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: MenuItemContent, selector: "[pMenuItemContent]", inputs: ["pMenuItemContent", "id"], outputs: ["onMenuItemClick"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('{{showTransitionParams}}')]), transition(':leave', [animate('{{hideTransitionParams}}', style({ opacity: 0 }))])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
777
|
+
`, isInline: true, styles: ["@layer primeng{.p-menu-overlay{position:absolute;top:0;left:0}.p-menu ul{margin:0;padding:0;list-style:none}.p-menu .p-submenu-header{align-items:center}.p-menu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden;position:relative}.p-menu .p-menuitem-text{line-height:1}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i6.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: MenuItemContent, selector: "[pMenuItemContent]", inputs: ["pMenuItemContent", "itemTemplate", "id"], outputs: ["onMenuItemClick"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('{{showTransitionParams}}')]), transition(':leave', [animate('{{hideTransitionParams}}', style({ opacity: 0 }))])])], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
737
778
|
}
|
738
779
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: Menu, decorators: [{
|
739
780
|
type: Component,
|
@@ -752,6 +793,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
752
793
|
[attr.data-pc-name]="'menu'"
|
753
794
|
[attr.id]="id"
|
754
795
|
>
|
796
|
+
<div *ngIf="startTemplate" class="p-menu-start" [attr.data-pc-section]="'start'">
|
797
|
+
<ng-container *ngTemplateOutlet="startTemplate"></ng-container>
|
798
|
+
</div>
|
755
799
|
<ul
|
756
800
|
#list
|
757
801
|
class="p-menu-list p-reset"
|
@@ -787,6 +831,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
787
831
|
class="p-menuitem"
|
788
832
|
*ngIf="!item.separator"
|
789
833
|
[pMenuItemContent]="item"
|
834
|
+
[itemTemplate]="itemTemplate"
|
790
835
|
[ngClass]="{ 'p-hidden': item.visible === false || submenu.visible === false, 'p-focus': focusedOptionId() && menuitemId(item, id, i, j) === focusedOptionId(), 'p-disabled': disabled(item.disabled) }"
|
791
836
|
[ngStyle]="item.style"
|
792
837
|
[class]="item.styleClass"
|
@@ -809,6 +854,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
809
854
|
class="p-menuitem"
|
810
855
|
*ngIf="!item.separator"
|
811
856
|
[pMenuItemContent]="item"
|
857
|
+
[itemTemplate]="itemTemplate"
|
812
858
|
[ngClass]="{ 'p-hidden': item.visible === false, 'p-focus': focusedOptionId() && menuitemId(item, id, i, j) === focusedOptionId(), 'p-disabled': disabled(item.disabled) }"
|
813
859
|
[ngStyle]="item.style"
|
814
860
|
[class]="item.styleClass"
|
@@ -825,6 +871,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
825
871
|
></li>
|
826
872
|
</ng-template>
|
827
873
|
</ul>
|
874
|
+
<div *ngIf="endTemplate" class="p-menu-end" [attr.data-pc-section]="'end'">
|
875
|
+
<ng-container *ngTemplateOutlet="endTemplate"></ng-container>
|
876
|
+
</div>
|
828
877
|
</div>
|
829
878
|
`, animations: [trigger('overlayAnimation', [transition(':enter', [style({ opacity: 0, transform: 'scaleY(0.8)' }), animate('{{showTransitionParams}}')]), transition(':leave', [animate('{{hideTransitionParams}}', style({ opacity: 0 }))])])], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
830
879
|
class: 'p-element'
|
@@ -875,6 +924,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.2", ngImpor
|
|
875
924
|
}], containerViewChild: [{
|
876
925
|
type: ViewChild,
|
877
926
|
args: ['container']
|
927
|
+
}], templates: [{
|
928
|
+
type: ContentChildren,
|
929
|
+
args: [PrimeTemplate]
|
878
930
|
}] } });
|
879
931
|
class MenuModule {
|
880
932
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.2", ngImport: i0, type: MenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|