source: trip-planner-front/node_modules/primeng/fesm2015/primeng-messages.mjs.map@ 6fe77af

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

adding photos

  • Property mode set to 100644
File size: 12.0 KB
Line 
1{"version":3,"file":"primeng-messages.mjs","sources":["../../src/app/components/messages/messages.ts","../../src/app/components/messages/primeng-messages.ts"],"sourcesContent":["import {NgModule,Component,OnDestroy,Input,Output,EventEmitter,AfterContentInit,Optional,ElementRef,ChangeDetectionStrategy,ContentChildren,QueryList,TemplateRef, ViewEncapsulation, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {trigger,state,style,transition,animate} from '@angular/animations';\nimport {Message,PrimeTemplate,MessageService} from 'primeng/api';\nimport {Subscription} from 'rxjs';\nimport {RippleModule} from 'primeng/ripple';\n\n@Component({\n selector: 'p-messages',\n template: `\n <div class=\"p-messages p-component\" role=\"alert\" [ngStyle]=\"style\" [class]=\"styleClass\">\n <ng-container *ngIf=\"!contentTemplate; else staticMessage\">\n <div *ngFor=\"let msg of value; let i=index\" [ngClass]=\"'p-message p-message-' + msg.severity\" role=\"alert\"\n [@messageAnimation]=\"{value: 'visible', params: {showTransitionParams: showTransitionOptions, hideTransitionParams: hideTransitionOptions}}\">\n <div class=\"p-message-wrapper\">\n <span [class]=\"'p-message-icon pi' + (msg.icon ? ' ' + msg.icon : '')\" [ngClass]=\"{'pi-info-circle': msg.severity === 'info',\n 'pi-check': msg.severity === 'success',\n 'pi-exclamation-triangle': msg.severity === 'warn',\n 'pi-times-circle': msg.severity === 'error'}\"></span>\n <ng-container *ngIf=\"!escape; else escapeOut\">\n <span *ngIf=\"msg.summary\" class=\"p-message-summary\" [innerHTML]=\"msg.summary\"></span>\n <span *ngIf=\"msg.detail\" class=\"p-message-detail\" [innerHTML]=\"msg.detail\"></span>\n </ng-container>\n <ng-template #escapeOut>\n <span *ngIf=\"msg.summary\" class=\"p-message-summary\">{{msg.summary}}</span>\n <span *ngIf=\"msg.detail\" class=\"p-message-detail\">{{msg.detail}}</span>\n </ng-template>\n <button class=\"p-message-close p-link\" (click)=\"removeMessage(i)\" *ngIf=\"closable\" type=\"button\" pRipple>\n <i class=\"p-message-close-icon pi pi-times\"></i>\n </button>\n </div>\n </div>\n </ng-container>\n <ng-template #staticMessage>\n <div [ngClass]=\"'p-message p-message-' + severity\" role=\"alert\">\n <div class=\"p-message-wrapper\">\n <ng-container *ngTemplateOutlet=\"contentTemplate\"></ng-container>\n </div>\n </div>\n </ng-template>\n </div>\n `,\n animations: [\n trigger('messageAnimation', [\n transition(':enter', [\n style({opacity: 0, transform: 'translateY(-25%)'}),\n animate('{{showTransitionParams}}')\n ]),\n transition(':leave', [\n animate('{{hideTransitionParams}}', style({ height: 0, marginTop: 0, marginBottom: 0, marginLeft: 0, marginRight: 0, overflow: 'hidden', opacity: 0 }))\n ])\n ])\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./messages.css'],\n host: {\n 'class': 'p-element'\n }\n})\nexport class Messages implements AfterContentInit, OnDestroy {\n\n @Input() value: Message[];\n\n @Input() closable: boolean = true;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() enableService: boolean = true;\n\n @Input() key: string;\n\n @Input() escape: boolean = true;\n\n @Input() severity: string;\n\n @Input() showTransitionOptions: string = '300ms ease-out';\n\n @Input() hideTransitionOptions: string = '200ms cubic-bezier(0.86, 0, 0.07, 1)';\n\n @ContentChildren(PrimeTemplate) templates: QueryList<any>;\n\n @Output() valueChange: EventEmitter<Message[]> = new EventEmitter<Message[]>();\n\n messageSubscription: Subscription;\n\n clearSubscription: Subscription;\n\n contentTemplate: TemplateRef<any>;\n\n constructor(@Optional() public messageService: MessageService, public el: ElementRef, public cd: ChangeDetectorRef) {}\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n default:\n this.contentTemplate = item.template;\n break;\n }\n });\n\n if (this.messageService && this.enableService && !this.contentTemplate) {\n this.messageSubscription = this.messageService.messageObserver.subscribe((messages: any) => {\n if (messages) {\n if (messages instanceof Array) {\n let filteredMessages = messages.filter(m => this.key === m.key);\n this.value = this.value ? [...this.value, ...filteredMessages] : [...filteredMessages];\n }\n else if (this.key === messages.key) {\n this.value = this.value ? [...this.value, ...[messages]] : [messages];\n }\n\n this.cd.markForCheck();\n }\n });\n\n this.clearSubscription = this.messageService.clearObserver.subscribe(key => {\n if (key) {\n if (this.key === key) {\n this.value = null;\n }\n }\n else {\n this.value = null;\n }\n\n this.cd.markForCheck();\n });\n }\n }\n\n hasMessages() {\n let parentEl = this.el.nativeElement.parentElement;\n if (parentEl && parentEl.offsetParent) {\n return this.contentTemplate != null || this.value && this.value.length > 0;\n }\n\n return false;\n }\n\n clear() {\n this.value = [];\n this.valueChange.emit(this.value);\n }\n\n removeMessage(i: number) {\n this.value = this.value.filter((msg, index) => index !== i);\n this.valueChange.emit(this.value);\n }\n\n get icon(): string {\n const severity = this.severity || (this.hasMessages() ? this.value[0].severity : null);\n\n if (this.hasMessages()) {\n switch(severity) {\n case 'success':\n return 'pi-check';\n break;\n\n case 'info':\n return 'pi-info-circle';\n break;\n\n case 'error':\n return 'pi-times';\n break;\n\n case 'warn':\n return 'pi-exclamation-triangle';\n break;\n\n default:\n return 'pi-info-circle';\n break;\n }\n }\n\n return null;\n }\n\n ngOnDestroy() {\n if (this.messageSubscription) {\n this.messageSubscription.unsubscribe();\n }\n\n if (this.clearSubscription) {\n this.clearSubscription.unsubscribe();\n }\n }\n}\n\n@NgModule({\n imports: [CommonModule,RippleModule],\n exports: [Messages],\n declarations: [Messages]\n})\nexport class MessagesModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MA4Da,QAAQ;IAgCjB,YAA+B,cAA8B,EAAS,EAAc,EAAS,EAAqB;QAAnF,mBAAc,GAAd,cAAc,CA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