{"version":3,"file":"primeng-fullcalendar.umd.js","sources":["../../src/app/components/fullcalendar/fullcalendar.ts","../../src/app/components/fullcalendar/primeng-fullcalendar.ts"],"sourcesContent":["import {NgModule,Component,ElementRef,OnDestroy,Input,OnInit,AfterViewChecked,ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {Calendar} from '@fullcalendar/core';\n\n@Component({\n selector: 'p-fullCalendar',\n template: '<div [ngStyle]=\"style\" [class]=\"styleClass\"></div>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None\n})\nexport class FullCalendar implements OnDestroy,OnInit,AfterViewChecked {\n \n @Input() style: any;\n\n @Input() styleClass: string;\n \n initialized: boolean;\n \n calendar: any;\n \n config: any;\n\n _options: any;\n\n _events: any[];\n\n constructor(public el: ElementRef) {}\n \n ngOnInit() {\n this.config = {\n theme: true\n };\n\n if (this.options) {\n for (let prop in this.options) {\n this.config[prop] = this.options[prop];\n }\n }\n }\n \n ngAfterViewChecked() {\n if (!this.initialized && this.el.nativeElement.offsetParent) {\n this.initialize();\n }\n }\n \n @Input() get events(): any {\n return this._events;\n }\n\n set events(value: any) {\n this._events = value;\n\n if (this._events && this.calendar) {\n this.calendar.removeAllEventSources();\n this.calendar.addEventSource(this._events);\n }\n }\n\n @Input() get options(): any {\n return this._options;\n }\n\n set options(value: any) {\n this._options = value;\n\n if (this._options && this.calendar) {\n for (let prop in this._options) {\n let optionValue = this._options[prop];\n this.config[prop] = optionValue;\n this.calendar.setOption(prop, optionValue);\n }\n }\n }\n\n initialize() {\n this.calendar = new Calendar(this.el.nativeElement.children[0], this.config);\n this.calendar.render();\n this.initialized = true;\n \n if (this.events) {\n this.calendar.removeAllEventSources();\n this.calendar.addEventSource(this.events);\n }\n }\n\n getCalendar() {\n return this.calendar;\n }\n \n ngOnDestroy() {\n if (this.calendar) {\n this.calendar.destroy();\n this.initialized = false;\n this.calendar = null;\n } \n }\n}\n\n@NgModule({\n imports: [CommonModule],\n exports: [FullCalendar],\n declarations: [FullCalendar]\n})\nexport class FullCalendarModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["Calendar","Component","ChangeDetectionStrategy","ViewEncapsulation","ElementRef","Input","NgModule","CommonModule"],"mappings":";;;;;;;QA0BI,sBAAmB,EAAc;YAAd,OAAE,GAAF,EAAE,CAAY;SAAI;QAErC,+BAAQ,GAAR;YACI,IAAI,CAAC,MAAM,GAAG;gBACV,KAAK,EAAE,IAAI;aACd,CAAC;YAEF,IAAI,IAAI,CAAC,OAAO,EAAE;gBACd,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;oBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iBAC1C;aACJ;SACJ;QAED,yCAAkB,GAAlB;YACI,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE;gBACzD,IAAI,CAAC,UAAU,EAAE,CAAC;aACrB;SACJ;QAED,sBAAa,gCAAM;iBAAnB;gBACI,OAAO,IAAI,CAAC,OAAO,CAAC;aACvB;iBAED,UAAW,KAAU;gBACjB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;gBAErB,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;oBAC/B,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;oBACtC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;iBAC9C;aACJ;;;WATA;QAWD,sBAAa,iCAAO;iBAApB;gBACI,OAAO,IAAI,CAAC,QAAQ,CAAC;aACxB;iBAED,UAAY,KAAU;gBAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAEtB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,C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