UNPKG

5.03 kBSource Map (JSON)View Raw
1{"version":3,"file":"primeng-fullcalendar.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":[],"mappings":";;;;MAUa,YAAY;IAgBrB,YAAmB,EAAc;QAAd,OAAE,GAAF,EAAE,CAAY;KAAI;IAErC,QAAQ;QACJ,IAAI,CAAC,MAAM,GAAG;YACV,KAAK,EAAE,IAAI;SACd,CAAC;QAEF,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;gBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aAC1C;SACJ;KACJ;IAED,kBAAkB;QACd,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE;YACzD,IAAI,CAAC,UAAU,EAAE,CAAC;SACrB;KACJ;IAED,IAAa,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;KACvB;IAED,IAAI,MAAM,CAAC,KAAU;QACjB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QAErB,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC/B,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YACtC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SAC9C;KACJ;IAED,IAAa,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;KACxB;IAED,IAAI,OAAO,CAAC,KAAU;QAClB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QAEtB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE;YAChC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC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