{"version":3,"sources":["../../src/app/components/timeline/timeline.ts"],"names":["Timeline","el","this","align","layout","prototype","getBlockableElement","nativeElement","children","ngAfterContentInit","_this","templates","forEach","item","getType","contentTemplate","template","oppositeTemplate","markerTemplate","Component","args","selector","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","ElementRef","Input","ContentChildren","PrimeTemplate","NgModule","imports","CommonModule","exports","declarations"],"mappings":"2dA0DI,SAAAA,EAAoBC,GAAAC,KAAAD,GAAAA,EAZXC,KAAAC,MAAgB,OAEhBD,KAAAE,OAAiB,kBAY1BJ,EAAAK,UAAAC,oBAAA,WACI,OAAOJ,KAAKD,GAAGM,cAAcC,SAAS,IAG1CR,EAAAK,UAAAI,mBAAA,WAAA,IAAAC,EAAAR,KACIA,KAAKS,UAAUC,SAAQ,SAACC,GACpB,OAAOA,EAAKC,WACR,IAAK,UACDJ,EAAKK,gBAAkBF,EAAKG,SAChC,MAEA,IAAK,WACDN,EAAKO,iBAAmBJ,EAAKG,SACjC,MAEA,IAAK,SACDN,EAAKQ,eAAiBL,EAAKG,uCAxE9CG,EAAAA,UAASC,KAAA,CAAC,CACPC,SAAU,aACVL,SAAU,0kDA4BVM,gBAAiBC,EAAAA,wBAAwBC,OACzCC,cAAeC,EAAAA,kBAAkBC,owDAnCDC,EAAAA,6CAwC/BC,EAAAA,qBAEAA,EAAAA,0BAEAA,EAAAA,qBAEAA,EAAAA,sBAEAA,EAAAA,yBAEAC,EAAAA,gBAAeV,KAAA,CAACW,EAAAA,wBAuCrB,iCALCC,EAAAA,SAAQZ,KAAA,CAAC,CACNa,QAAS,CAACC,EAAAA,cACVC,QAAS,CAACnC,GACVoC,aAAc,CAACpC","sourcesContent":["import {NgModule ,Component, Input, ElementRef, ChangeDetectionStrategy, ViewEncapsulation, AfterContentInit, ContentChildren, QueryList, TemplateRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {BlockableUI, PrimeTemplate} from 'primeng/api';\n\n@Component({\n selector: 'p-timeline',\n template: `\n
\n
\n
\n \n
\n
\n \n \n \n \n
\n
\n
\n
\n
\n \n
\n
\n
\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;\n\n contentTemplate: TemplateRef;\n\n oppositeTemplate: TemplateRef;\n\n markerTemplate: TemplateRef;\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],\n declarations: [Timeline]\n})\nexport class TimelineModule { }\n"]}