{"version":3,"file":"primeng-card.umd.js","sources":["../../src/app/components/card/card.ts","../../src/app/components/card/primeng-card.ts"],"sourcesContent":["import { NgModule, Component, Input, ElementRef, ContentChild, ChangeDetectionStrategy, ViewEncapsulation, TemplateRef, AfterContentInit, ContentChildren, QueryList } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SharedModule, Header, Footer, PrimeTemplate } from 'primeng/api';\nimport { BlockableUI } from 'primeng/api';\n\n@Component({\n selector: 'p-card',\n template: `\n
\n
\n \n \n
\n
\n
\n {{header}}\n \n
\n
\n {{subheader}}\n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./card.css']\n})\nexport class Card implements AfterContentInit,BlockableUI {\n\n @Input() header: string;\n\n @Input() subheader: string;\n\n @Input() style: any;\n\n @Input() styleClass: string;\n\n @ContentChild(Header) headerFacet;\n\n @ContentChild(Footer) footerFacet;\n\n @ContentChildren(PrimeTemplate) templates: QueryList;\n\n headerTemplate: TemplateRef;\n \n titleTemplate: TemplateRef;\n \n subtitleTemplate: TemplateRef;\n \n contentTemplate: TemplateRef;\n \n footerTemplate: TemplateRef;\n\n constructor(private el: ElementRef) { }\n\n ngAfterContentInit() {\n this.templates.forEach((item) => {\n switch(item.getType()) {\n case 'header':\n this.headerTemplate = item.template;\n break;\n\n case 'title':\n this.titleTemplate = item.template;\n break;\n\n case 'subtitle':\n this.subtitleTemplate = item.template;\n break;\n\n case 'content':\n this.contentTemplate = item.template;\n break;\n\n case 'footer':\n this.footerTemplate = item.template;\n break;\n \n default:\n this.contentTemplate = item.template;\n break;\n }\n });\n }\n\n getBlockableElement(): HTMLElement  {\n return this.el.nativeElement.children[0];\n }\n\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [Card, SharedModule],\n declarations: [Card]\n})\nexport class CardModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["Component","ChangeDetectionStrategy","ViewEncapsulation","ElementRef","Input","ContentChild","Header","Footer","ContentChildren","PrimeTemplate","NgModule","CommonModule","SharedModule"],"mappings":";;;;;;;QA+DI,cAAoB,EAAc;YAAd,OAAE,GAAF,EAAE,CAAY;SAAK;QAEvC,iCAAkB,GAAlB;YAAA,iBA4BC;YA3BG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAC,IAAI;gBACxB,QAAO,IAAI,CAAC,OAAO,EAAE;oBACjB,KAAK,QAAQ;wBACT,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC;wBACxC,MAAM;oBAEN,KAAK,OAAO;wBACR,KAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC;wBACvC,MAAM;oBAEN,KAAK,UAAU;wBACX,KAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC;wBAC1C,MAAM;oBAEN,KAAK,SAAS;wBACV,KAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC;wBACzC,MAAM;oBAEN,KAAK,QAAQ;wBACT,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC;wBACxC,MAAM;oBAEN;wBACI,KAAI,CAAC,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC;wBACzC,MAAM;iBACT;aACJ,CAAC,CAAC;SACN;QAED,kCAAmB,GAAnB;YACI,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;SAC5C;;;;gBA5FJA,cAAS,SAAC;oBACP,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,m1CAyBT;oBACF,eAAe,EAAEC,4BAAuB,CAAC,MAAM;oBAC9C,aAAa,EAAEC,sBAAiB,CAAC,IAAI;;iBAExC;;;gBApCoCC,eAAU;;;yBAuC1CC,UAAK;4BAELA,UAAK;wBAELA,UAAK;6BAELA,UAAK;8BAELC,iBAAY,SAACC,UAAM;8BAEnBD,iBAAY,SAACE,UAAM;4BAEnBC,oBAAe,SAACC,iBAAa;;;QAuDlC;;;;;gBALCC,aAAQ,SAAC;oBACN,OAAO,EAAE,CAACC,mBAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,IAAI,EAAEC,gBAAY,CAAC;oBAC7B,YAAY,EAAE,CAAC,IAAI,CAAC;iBACvB;;;ICzGD;;;;;;;;;;;;;"}