{"version":3,"file":"primeng-timeline.umd.js","sources":["../../src/app/components/timeline/timeline.ts","../../src/app/components/timeline/primeng-timeline.ts"],"sourcesContent":["import {NgModule ,Component, Input, ElementRef, ChangeDetectionStrategy, ViewEncapsulation, AfterContentInit, ContentChildren, QueryList, TemplateRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {BlockableUI, PrimeTemplate, SharedModule} from 'primeng/api';\n\n@Component({\n selector: 'p-timeline',\n template: `\n <div [class]=\"styleClass\" [ngStyle]=\"style\" [ngClass]=\"{'p-timeline p-component': true, \n 'p-timeline-left': align === 'left',\n 'p-timeline-right': align === 'right',\n 'p-timeline-top': align === 'top',\n 'p-timeline-bottom': align === 'bottom',\n 'p-timeline-alternate': align === 'alternate',\n 'p-timeline-vertical': layout === 'vertical',\n 'p-timeline-horizontal': layout === 'horizontal'}\">\n <div *ngFor=\"let event of value; let last=last\" class=\"p-timeline-event\">\n <div class=\"p-timeline-event-opposite\">\n <ng-container *ngTemplateOutlet=\"oppositeTemplate; context: {$implicit: event}\"></ng-container>\n </div>\n <div class=\"p-timeline-event-separator\">\n <ng-container *ngIf=\"markerTemplate; else marker\">\n <ng-container *ngTemplateOutlet=\"markerTemplate; context: {$implicit: event}\"></ng-container>\n </ng-container>\n <ng-template #marker>\n <div class=\"p-timeline-event-marker\"></div>\n </ng-template>\n <div *ngIf=\"!last\" class=\"p-timeline-event-connector\"></div>\n </div>\n <div class=\"p-timeline-event-content\">\n <ng-container *ngTemplateOutlet=\"contentTemplate; context: {$implicit: event}\"></ng-container>\n </div>\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./timeline.css']\n})\nexport class Timeline implements AfterContentInit, BlockableUI {\n\n @Input() value: any[];\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @Input() align: string = 'left';\n\n @Input() layout: string = 'vertical';\n\n @ContentChildren(PrimeTemplate) templates: QueryList<any>;\n\n contentTemplate: TemplateRef<any>;\n\n oppositeTemplate: TemplateRef<any>;\n\n markerTemplate: TemplateRef<any>;\n\n constructor(private el: ElementRef) {}\n\n getBlockableElement(): HTMLElement {\n return this.el.nativeElement.children[0];\n }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n case 'opposite':\n this.oppositeTemplate = item.template;\n break;\n\n case 'marker':\n this.markerTemplate = item.template;\n break;\n }\n });\n }\n\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [Timeline, SharedModule],\n declarations: [Timeline]\n})\nexport class TimelineModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["PrimeTemplate","Component","ChangeDetectionStrategy","ViewEncapsulation","Input","ContentChildren","CommonModule","SharedModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA0DI,kBAAoB,EAAc;YAAd,OAAE,GAAF,EAAE,CAAY;YAZzB,UAAK,GAAW,MAAM,CAAC;YAEvB,WAAM,GAAW,UAAU,CAAC;SAUC;QAEtC,sCAAmB,GAAnB;YACI,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SAC5C;QAED,qCAAkB,GAAlB;YAAA,iBAgBC;YAfG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAC,IAAI;gBACxB,QAAO,IAAI,CAAC,OAAO,EAAE;oBACjB,KAAK,SAAS;wBACV,KAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC;wBACzC,MAAM;oBAEN,KAAK,UAAU;wBACX,KAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC;wBAC1C,MAAM;oBAEN,KAAK,QAAQ;wBACT,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC;wBACxC,MAAM;iBACT;aACJ,CAAC,CAAC;SACN;;;+HA1CQ,QAAQ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