source: trip-planner-front/node_modules/primeng/fesm2015/primeng-slidemenu.mjs@ 76712b2

Last change on this file since 76712b2 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 29.3 KB
RevLine 
[59329aa]1import * as i0 from '@angular/core';
2import { forwardRef, Component, ViewEncapsulation, Inject, Input, ViewChild, EventEmitter, ChangeDetectionStrategy, Output, NgModule } from '@angular/core';
3import { trigger, transition, style, animate } from '@angular/animations';
4import * as i1 from '@angular/common';
5import { CommonModule } from '@angular/common';
6import { DomHandler, ConnectedOverlayScrollHandler } from 'primeng/dom';
7import * as i3 from '@angular/router';
8import { RouterModule } from '@angular/router';
9import { ZIndexUtils } from 'primeng/utils';
10import * as i2 from 'primeng/tooltip';
11import { TooltipModule } from 'primeng/tooltip';
12import * as i4 from 'primeng/api';
13
14class SlideMenuSub {
15 constructor(slideMenu) {
16 this.backLabel = 'Back';
17 this.easing = 'ease-out';
18 this.slideMenu = slideMenu;
19 }
20 itemClick(event, item, listitem) {
21 if (item.disabled) {
22 event.preventDefault();
23 return;
24 }
25 if (!item.url) {
26 event.preventDefault();
27 }
28 if (item.command) {
29 item.command({
30 originalEvent: event,
31 item: item
32 });
33 }
34 if (item.items && !this.slideMenu.animating) {
35 this.slideMenu.left -= this.slideMenu.menuWidth;
36 this.activeItem = listitem;
37 this.slideMenu.animating = true;
38 setTimeout(() => this.slideMenu.animating = false, this.effectDuration);
39 }
40 if (!item.items && this.slideMenu.popup) {
41 this.slideMenu.hide();
42 }
43 }
44 focusNextList(listitem) {
45 if (!this.slideMenu.animating) {
46 let focusableElements = DomHandler.getFocusableElements(listitem);
47 if (focusableElements && focusableElements.length > 0) {
48 focusableElements[0].focus();
49 }
50 this.unbindTransitionEndListener();
51 }
52 }
53 onItemKeyDown(event) {
54 let listItem = event.currentTarget.parentElement;
55 switch (event.code) {
56 case 'Space':
57 case 'Enter':
58 if (listItem && !DomHandler.hasClass(listItem, 'p-disabled')) {
59 listItem.children[0].click();
60 this.transitionEndListener = this.focusNextList.bind(this, listItem);
61 this.sublistViewChild.nativeElement.addEventListener('transitionend', this.transitionEndListener);
62 }
63 event.preventDefault();
64 break;
65 default:
66 break;
67 }
68 }
69 unbindTransitionEndListener() {
70 if (this.transitionEndListener && this.sublistViewChild) {
71 this.sublistViewChild.nativeElement.removeEventListener('transitionend', this.transitionEndListener);
72 this.transitionEndListener = null;
73 }
74 }
75 ngOnDestroy() {
76 this.activeItem = null;
77 this.unbindTransitionEndListener();
78 }
79 get isActive() {
80 return -this.slideMenu.left == (this.index * this.menuWidth);
81 }
82}
83SlideMenuSub.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenuSub, deps: [{ token: forwardRef(() => SlideMenu) }], target: i0.ɵɵFactoryTarget.Component });
84SlideMenuSub.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: SlideMenuSub, selector: "p-slideMenuSub", inputs: { item: "item", root: "root", backLabel: "backLabel", menuWidth: "menuWidth", effectDuration: "effectDuration", easing: "easing", index: "index" }, host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "sublistViewChild", first: true, predicate: ["sublist"], descendants: true }], ngImport: i0, template: `
85 <ul #sublist [ngClass]="{'p-slidemenu-rootlist':root, 'p-submenu-list':!root, 'p-active-submenu': isActive}"
86 [style.width.px]="menuWidth" [style.left.px]="root ? slideMenu.left : slideMenu.menuWidth"
87 [style.transitionProperty]="root ? 'left' : 'none'" [style.transitionDuration]="effectDuration + 'ms'" [style.transitionTimingFunction]="easing">
88 <ng-template ngFor let-child [ngForOf]="(root ? item : item.items)">
89 <li *ngIf="child.separator" class="p-menu-separator" [ngClass]="{'p-hidden': child.visible === false}">
90 <li *ngIf="!child.separator" #listitem [ngClass]="{'p-menuitem':true,'p-menuitem-active':listitem==activeItem,'p-hidden': child.visible === false}" pTooltip [tooltipOptions]="child.tooltipOptions"
91 [class]="child.styleClass" [ngStyle]="child.style">
92 <a *ngIf="!child.routerLink" (keydown)="onItemKeyDown($event)" [attr.href]="child.url" class="p-menuitem-link" [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id"
93 [ngClass]="{'p-disabled':child.disabled}" [attr.tabindex]="child.disabled || !isActive ? null : '0'"
94 (click)="itemClick($event, child, listitem)">
95 <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
96 <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
97 <ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
98 <span class="p-submenu-icon pi pi-fw pi-angle-right" *ngIf="child.items"></span>
99 </a>
100 <a *ngIf="child.routerLink" (keydown)="onItemKeyDown($event)" [routerLink]="child.routerLink" [queryParams]="child.queryParams" [routerLinkActive]="'p-menuitem-link-active'"
101 [routerLinkActiveOptions]="child.routerLinkActiveOptions||{exact:false}" [href]="child.url" class="p-menuitem-link"
102 [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id" [attr.tabindex]="child.disabled || !isActive ? null : '0'"
103 [ngClass]="{'p-disabled':child.disabled}"
104 (click)="itemClick($event, child, listitem)"
105 [fragment]="child.fragment" [queryParamsHandling]="child.queryParamsHandling" [preserveFragment]="child.preserveFragment" [skipLocationChange]="child.skipLocationChange" [replaceUrl]="child.replaceUrl" [state]="child.state">
106 <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
107 <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
108 <ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
109 <span class="p-submenu-icon pi pi-fw pi-caret-right" *ngIf="child.items"></span>
110 </a>
111 <p-slideMenuSub class="p-submenu" [item]="child" [index]="index + 1" [menuWidth]="menuWidth" *ngIf="child.items"></p-slideMenuSub>
112 </li>
113 </ng-template>
114 </ul>
115 `, isInline: true, components: [{ type: SlideMenuSub, selector: "p-slideMenuSub", inputs: ["item", "root", "backLabel", "menuWidth", "effectDuration", "easing", "index"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], encapsulation: i0.ViewEncapsulation.None });
116i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenuSub, decorators: [{
117 type: Component,
118 args: [{
119 selector: 'p-slideMenuSub',
120 template: `
121 <ul #sublist [ngClass]="{'p-slidemenu-rootlist':root, 'p-submenu-list':!root, 'p-active-submenu': isActive}"
122 [style.width.px]="menuWidth" [style.left.px]="root ? slideMenu.left : slideMenu.menuWidth"
123 [style.transitionProperty]="root ? 'left' : 'none'" [style.transitionDuration]="effectDuration + 'ms'" [style.transitionTimingFunction]="easing">
124 <ng-template ngFor let-child [ngForOf]="(root ? item : item.items)">
125 <li *ngIf="child.separator" class="p-menu-separator" [ngClass]="{'p-hidden': child.visible === false}">
126 <li *ngIf="!child.separator" #listitem [ngClass]="{'p-menuitem':true,'p-menuitem-active':listitem==activeItem,'p-hidden': child.visible === false}" pTooltip [tooltipOptions]="child.tooltipOptions"
127 [class]="child.styleClass" [ngStyle]="child.style">
128 <a *ngIf="!child.routerLink" (keydown)="onItemKeyDown($event)" [attr.href]="child.url" class="p-menuitem-link" [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id"
129 [ngClass]="{'p-disabled':child.disabled}" [attr.tabindex]="child.disabled || !isActive ? null : '0'"
130 (click)="itemClick($event, child, listitem)">
131 <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
132 <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
133 <ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
134 <span class="p-submenu-icon pi pi-fw pi-angle-right" *ngIf="child.items"></span>
135 </a>
136 <a *ngIf="child.routerLink" (keydown)="onItemKeyDown($event)" [routerLink]="child.routerLink" [queryParams]="child.queryParams" [routerLinkActive]="'p-menuitem-link-active'"
137 [routerLinkActiveOptions]="child.routerLinkActiveOptions||{exact:false}" [href]="child.url" class="p-menuitem-link"
138 [attr.target]="child.target" [attr.title]="child.title" [attr.id]="child.id" [attr.tabindex]="child.disabled || !isActive ? null : '0'"
139 [ngClass]="{'p-disabled':child.disabled}"
140 (click)="itemClick($event, child, listitem)"
141 [fragment]="child.fragment" [queryParamsHandling]="child.queryParamsHandling" [preserveFragment]="child.preserveFragment" [skipLocationChange]="child.skipLocationChange" [replaceUrl]="child.replaceUrl" [state]="child.state">
142 <span class="p-menuitem-icon" *ngIf="child.icon" [ngClass]="child.icon"></span>
143 <span class="p-menuitem-text" *ngIf="child.escape !== false; else htmlRouteLabel">{{child.label}}</span>
144 <ng-template #htmlRouteLabel><span class="p-menuitem-text" [innerHTML]="child.label"></span></ng-template>
145 <span class="p-submenu-icon pi pi-fw pi-caret-right" *ngIf="child.items"></span>
146 </a>
147 <p-slideMenuSub class="p-submenu" [item]="child" [index]="index + 1" [menuWidth]="menuWidth" *ngIf="child.items"></p-slideMenuSub>
148 </li>
149 </ng-template>
150 </ul>
151 `,
152 encapsulation: ViewEncapsulation.None,
153 host: {
154 'class': 'p-element'
155 }
156 }]
157 }], ctorParameters: function () {
158 return [{ type: undefined, decorators: [{
159 type: Inject,
160 args: [forwardRef(() => SlideMenu)]
161 }] }];
162 }, propDecorators: { item: [{
163 type: Input
164 }], root: [{
165 type: Input
166 }], backLabel: [{
167 type: Input
168 }], menuWidth: [{
169 type: Input
170 }], effectDuration: [{
171 type: Input
172 }], easing: [{
173 type: Input
174 }], index: [{
175 type: Input
176 }], sublistViewChild: [{
177 type: ViewChild,
178 args: ['sublist']
179 }] } });
180class SlideMenu {
181 constructor(el, renderer, cd, config, overlayService) {
182 this.el = el;
183 this.renderer = renderer;
184 this.cd = cd;
185 this.config = config;
186 this.overlayService = overlayService;
187 this.menuWidth = 190;
188 this.viewportHeight = 180;
189 this.effectDuration = 250;
190 this.easing = 'ease-out';
191 this.backLabel = 'Back';
192 this.autoZIndex = true;
193 this.baseZIndex = 0;
194 this.showTransitionOptions = '.12s cubic-bezier(0, 0, 0.2, 1)';
195 this.hideTransitionOptions = '.1s linear';
196 this.onShow = new EventEmitter();
197 this.onHide = new EventEmitter();
198 this.left = 0;
199 this.animating = false;
200 }
201 ngAfterViewChecked() {
202 if (!this.viewportUpdated && !this.popup && this.containerViewChild) {
203 this.updateViewPort();
204 this.viewportUpdated = true;
205 }
206 }
207 set container(element) {
208 this.containerViewChild = element;
209 }
210 set backward(element) {
211 this.backwardViewChild = element;
212 }
213 set slideMenuContent(element) {
214 this.slideMenuContentViewChild = element;
215 }
216 updateViewPort() {
217 this.slideMenuContentViewChild.nativeElement.style.height = this.viewportHeight - DomHandler.getHiddenElementOuterHeight(this.backwardViewChild.nativeElement) + 'px';
218 }
219 toggle(event) {
220 if (this.visible)
221 this.hide();
222 else
223 this.show(event);
224 this.preventDocumentDefault = true;
225 }
226 show(event) {
227 this.target = event.currentTarget;
228 this.visible = true;
229 this.preventDocumentDefault = true;
230 this.cd.markForCheck();
231 }
232 onOverlayClick(event) {
233 if (this.popup) {
234 this.overlayService.add({
235 originalEvent: event,
236 target: this.el.nativeElement
237 });
238 }
239 this.preventDocumentDefault = true;
240 }
241 onOverlayAnimationStart(event) {
242 switch (event.toState) {
243 case 'visible':
244 if (this.popup) {
245 this.updateViewPort();
246 this.moveOnTop();
247 this.onShow.emit({});
248 this.appendOverlay();
249 DomHandler.absolutePosition(this.containerViewChild.nativeElement, this.target);
250 this.bindDocumentClickListener();
251 this.bindDocumentResizeListener();
252 this.bindScrollListener();
253 }
254 break;
255 case 'void':
256 this.onOverlayHide();
257 this.onHide.emit({});
258 break;
259 }
260 }
261 onOverlayAnimationEnd(event) {
262 switch (event.toState) {
263 case 'void':
264 ZIndexUtils.clear(event.element);
265 break;
266 }
267 }
268 appendOverlay() {
269 if (this.appendTo) {
270 if (this.appendTo === 'body')
271 document.body.appendChild(this.containerViewChild.nativeElement);
272 else
273 DomHandler.appendChild(this.containerViewChild.nativeElement, this.appendTo);
274 }
275 }
276 restoreOverlayAppend() {
277 if (this.container && this.appendTo) {
278 this.el.nativeElement.appendChild(this.containerViewChild.nativeElement);
279 }
280 }
281 moveOnTop() {
282 if (this.autoZIndex) {
283 ZIndexUtils.set('menu', this.containerViewChild.nativeElement, this.baseZIndex + this.config.zIndex.menu);
284 }
285 }
286 hide() {
287 this.visible = false;
288 this.cd.markForCheck();
289 }
290 onWindowResize() {
291 this.hide();
292 }
293 goBack() {
294 this.left += this.menuWidth;
295 }
296 onBackwardKeydown(event) {
297 this.goBack();
298 if (!this.left) {
299 setTimeout(() => {
300 let focusableElements = DomHandler.getFocusableElements(this.el.nativeElement);
301 if (focusableElements && focusableElements.length > 0) {
302 focusableElements[0].focus();
303 }
304 }, 1);
305 }
306 event.preventDefault();
307 }
308 bindDocumentClickListener() {
309 if (!this.documentClickListener) {
310 const documentTarget = this.el ? this.el.nativeElement.ownerDocument : 'document';
311 this.documentClickListener = this.renderer.listen(documentTarget, 'click', () => {
312 if (!this.preventDocumentDefault) {
313 this.hide();
314 this.cd.detectChanges();
315 }
316 this.preventDocumentDefault = false;
317 });
318 }
319 }
320 unbindDocumentClickListener() {
321 if (this.documentClickListener) {
322 this.documentClickListener();
323 this.documentClickListener = null;
324 }
325 }
326 bindDocumentResizeListener() {
327 this.documentResizeListener = this.onWindowResize.bind(this);
328 window.addEventListener('resize', this.documentResizeListener);
329 }
330 unbindDocumentResizeListener() {
331 if (this.documentResizeListener) {
332 window.removeEventListener('resize', this.documentResizeListener);
333 this.documentResizeListener = null;
334 }
335 }
336 bindScrollListener() {
337 if (!this.scrollHandler) {
338 this.scrollHandler = new ConnectedOverlayScrollHandler(this.target, () => {
339 if (this.visible) {
340 this.hide();
341 }
342 });
343 }
344 this.scrollHandler.bindScrollListener();
345 }
346 unbindScrollListener() {
347 if (this.scrollHandler) {
348 this.scrollHandler.unbindScrollListener();
349 }
350 }
351 onOverlayHide() {
352 this.unbindDocumentClickListener();
353 this.unbindDocumentResizeListener();
354 this.unbindScrollListener();
355 this.preventDocumentDefault = false;
356 this.target = null;
357 this.left = 0;
358 }
359 ngOnDestroy() {
360 if (this.popup) {
361 if (this.scrollHandler) {
362 this.scrollHandler.destroy();
363 this.scrollHandler = null;
364 }
365 this.restoreOverlayAppend();
366 this.onOverlayHide();
367 }
368 }
369}
370SlideMenu.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenu, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i4.PrimeNGConfig }, { token: i4.OverlayService }], target: i0.ɵɵFactoryTarget.Component });
371SlideMenu.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.0", type: SlideMenu, selector: "p-slideMenu", inputs: { model: "model", popup: "popup", style: "style", styleClass: "styleClass", menuWidth: "menuWidth", viewportHeight: "viewportHeight", effectDuration: "effectDuration", easing: "easing", backLabel: "backLabel", appendTo: "appendTo", autoZIndex: "autoZIndex", baseZIndex: "baseZIndex", showTransitionOptions: "showTransitionOptions", hideTransitionOptions: "hideTransitionOptions" }, outputs: { onShow: "onShow", onHide: "onHide" }, host: { classAttribute: "p-element" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }, { propertyName: "backward", first: true, predicate: ["backward"], descendants: true }, { propertyName: "slideMenuContent", first: true, predicate: ["slideMenuContent"], descendants: true }], ngImport: i0, template: `
372 <div #container [ngClass]="{'p-slidemenu p-component':true, 'p-slidemenu-overlay':popup}"
373 [class]="styleClass" [ngStyle]="style" (click)="onOverlayClick($event)"
374 [@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" [@.disabled]="popup !== true"
375 (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationEnd($event)" *ngIf="!popup || visible">
376 <div class="p-slidemenu-wrapper" [style.height]="left ? viewportHeight + 'px' : 'auto'" [style.width]="menuWidth + 'px'">
377 <div #slideMenuContent class="p-slidemenu-content">
378 <p-slideMenuSub [item]="model" root="root" [index]="0" [menuWidth]="menuWidth" [effectDuration]="effectDuration" [easing]="easing"></p-slideMenuSub>
379 </div>
380 <a #backward (keydown.enter)="onBackwardKeydown($event)" (keydown.space)="onBackwardKeydown($event)" class="p-slidemenu-backward p-menuitem-link" tabindex="0" [style.display]="left ? 'block' : 'none'" (click)="goBack()">
381 <span class="p-slidemenu-backward-icon pi pi-fw pi-caret-left"></span><span>{{backLabel}}</span>
382 </a>
383 </div>
384 </div>
385 `, isInline: true, styles: [".p-slidemenu{width:12.5rem}.p-slidemenu.p-slidemenu-overlay{position:absolute;top:0;left:0}.p-slidemenu ul{list-style:none;margin:0;padding:0}.p-slidemenu .p-slidemenu-rootlist{position:absolute;top:0}.p-slidemenu .p-submenu-list{display:none;position:absolute;top:0;width:12.5rem}.p-slidemenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden}.p-slidemenu .p-menuitem-icon,.p-slidemenu .p-menuitem-text{vertical-align:middle}.p-slidemenu .p-menuitem{position:relative}.p-slidemenu .p-menuitem-link .p-submenu-icon{margin-left:auto}.p-slidemenu .p-slidemenu-wrapper{position:relative}.p-slidemenu .p-slidemenu-content{overflow-x:hidden;overflow-y:auto;position:relative}.p-slidemenu-backward{position:absolute;bottom:0;width:100%;cursor:pointer;display:none}.p-slidemenu-backward .p-slidemenu-backward-icon,.p-slidemenu-backward span{vertical-align:middle}.p-slidemenu .p-menuitem-active{position:static}.p-slidemenu .p-menuitem-active>.p-submenu>.p-submenu-list{display:block}.p-slidemenu ul:not(.p-active-submenu)>.p-menuitem:not(.p-menuitem-active),.p-slidemenu .p-active-submenu>.p-menuitem-active>.p-submenu>.p-submenu-list{display:none}.p-slidemenu .p-active-submenu>.p-menuitem-active~.p-menuitem{display:block}\n"], components: [{ type: SlideMenuSub, selector: "p-slideMenuSub", inputs: ["item", "root", "backLabel", "menuWidth", "effectDuration", "easing", "index"] }], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], animations: [
386 trigger('overlayAnimation', [
387 transition(':enter', [
388 style({ opacity: 0, transform: 'scaleY(0.8)' }),
389 animate('{{showTransitionParams}}')
390 ]),
391 transition(':leave', [
392 animate('{{hideTransitionParams}}', style({ opacity: 0 }))
393 ])
394 ])
395 ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
396i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenu, decorators: [{
397 type: Component,
398 args: [{ selector: 'p-slideMenu', template: `
399 <div #container [ngClass]="{'p-slidemenu p-component':true, 'p-slidemenu-overlay':popup}"
400 [class]="styleClass" [ngStyle]="style" (click)="onOverlayClick($event)"
401 [@overlayAnimation]="{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}" [@.disabled]="popup !== true"
402 (@overlayAnimation.start)="onOverlayAnimationStart($event)" (@overlayAnimation.done)="onOverlayAnimationEnd($event)" *ngIf="!popup || visible">
403 <div class="p-slidemenu-wrapper" [style.height]="left ? viewportHeight + 'px' : 'auto'" [style.width]="menuWidth + 'px'">
404 <div #slideMenuContent class="p-slidemenu-content">
405 <p-slideMenuSub [item]="model" root="root" [index]="0" [menuWidth]="menuWidth" [effectDuration]="effectDuration" [easing]="easing"></p-slideMenuSub>
406 </div>
407 <a #backward (keydown.enter)="onBackwardKeydown($event)" (keydown.space)="onBackwardKeydown($event)" class="p-slidemenu-backward p-menuitem-link" tabindex="0" [style.display]="left ? 'block' : 'none'" (click)="goBack()">
408 <span class="p-slidemenu-backward-icon pi pi-fw pi-caret-left"></span><span>{{backLabel}}</span>
409 </a>
410 </div>
411 </div>
412 `, animations: [
413 trigger('overlayAnimation', [
414 transition(':enter', [
415 style({ opacity: 0, transform: 'scaleY(0.8)' }),
416 animate('{{showTransitionParams}}')
417 ]),
418 transition(':leave', [
419 animate('{{hideTransitionParams}}', style({ opacity: 0 }))
420 ])
421 ])
422 ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
423 'class': 'p-element'
424 }, styles: [".p-slidemenu{width:12.5rem}.p-slidemenu.p-slidemenu-overlay{position:absolute;top:0;left:0}.p-slidemenu ul{list-style:none;margin:0;padding:0}.p-slidemenu .p-slidemenu-rootlist{position:absolute;top:0}.p-slidemenu .p-submenu-list{display:none;position:absolute;top:0;width:12.5rem}.p-slidemenu .p-menuitem-link{cursor:pointer;display:flex;align-items:center;text-decoration:none;overflow:hidden}.p-slidemenu .p-menuitem-icon,.p-slidemenu .p-menuitem-text{vertical-align:middle}.p-slidemenu .p-menuitem{position:relative}.p-slidemenu .p-menuitem-link .p-submenu-icon{margin-left:auto}.p-slidemenu .p-slidemenu-wrapper{position:relative}.p-slidemenu .p-slidemenu-content{overflow-x:hidden;overflow-y:auto;position:relative}.p-slidemenu-backward{position:absolute;bottom:0;width:100%;cursor:pointer;display:none}.p-slidemenu-backward .p-slidemenu-backward-icon,.p-slidemenu-backward span{vertical-align:middle}.p-slidemenu .p-menuitem-active{position:static}.p-slidemenu .p-menuitem-active>.p-submenu>.p-submenu-list{display:block}.p-slidemenu ul:not(.p-active-submenu)>.p-menuitem:not(.p-menuitem-active),.p-slidemenu .p-active-submenu>.p-menuitem-active>.p-submenu>.p-submenu-list{display:none}.p-slidemenu .p-active-submenu>.p-menuitem-active~.p-menuitem{display:block}\n"] }]
425 }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i4.PrimeNGConfig }, { type: i4.OverlayService }]; }, propDecorators: { model: [{
426 type: Input
427 }], popup: [{
428 type: Input
429 }], style: [{
430 type: Input
431 }], styleClass: [{
432 type: Input
433 }], menuWidth: [{
434 type: Input
435 }], viewportHeight: [{
436 type: Input
437 }], effectDuration: [{
438 type: Input
439 }], easing: [{
440 type: Input
441 }], backLabel: [{
442 type: Input
443 }], appendTo: [{
444 type: Input
445 }], autoZIndex: [{
446 type: Input
447 }], baseZIndex: [{
448 type: Input
449 }], showTransitionOptions: [{
450 type: Input
451 }], hideTransitionOptions: [{
452 type: Input
453 }], onShow: [{
454 type: Output
455 }], onHide: [{
456 type: Output
457 }], container: [{
458 type: ViewChild,
459 args: ['container']
460 }], backward: [{
461 type: ViewChild,
462 args: ['backward']
463 }], slideMenuContent: [{
464 type: ViewChild,
465 args: ['slideMenuContent']
466 }] } });
467class SlideMenuModule {
468}
469SlideMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
470SlideMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenuModule, declarations: [SlideMenu, SlideMenuSub], imports: [CommonModule, RouterModule, TooltipModule], exports: [SlideMenu, RouterModule, TooltipModule] });
471SlideMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenuModule, imports: [[CommonModule, RouterModule, TooltipModule], RouterModule, TooltipModule] });
472i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.0", ngImport: i0, type: SlideMenuModule, decorators: [{
473 type: NgModule,
474 args: [{
475 imports: [CommonModule, RouterModule, TooltipModule],
476 exports: [SlideMenu, RouterModule, TooltipModule],
477 declarations: [SlideMenu, SlideMenuSub]
478 }]
479 }] });
480
481/**
482 * Generated bundle index. Do not edit.
483 */
484
485export { SlideMenu, SlideMenuModule, SlideMenuSub };
Note: See TracBrowser for help on using the repository browser.