@lidorsystems/integralui-web
Version:
IntegralUI Web - Advanced UI Components for Angular
15 lines (12 loc) • 40.3 kB
JavaScript
/*
filename: integralui.calendar.js
version : 20.2.0
Copyright © 2016-2020 Lidor Systems. All rights reserved.
This file is part of the "IntegralUI Web" Library.
The contents of this file are subject to the IntegralUI Web License, and may not be used except in compliance with the License.
A copy of the License should have been installed in the product's root installation directory or it can be found at
http://www.lidorsystems.com/products/web/studio/license-agreement.aspx.
This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language
governing rights and limitations under the License. Any infringement will be prosecuted under applicable laws.
*/
"use strict";var __extends=this&&this.__extends||function(){var e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(t.hasOwnProperty(i))e[i]=t[i]})(t,i)};return function(t,i){e(t,i);function a(){this.constructor=t}t.prototype=null===i?Object.create(i):(a.prototype=i.prototype,new a)}}();Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@angular/core"),integralui_core_1=require("./integralui.core"),integralui_common_service_1=require("../services/integralui.common.service"),i0=require("@angular/core"),i1=require("../services/integralui.common.service"),i2=require("@angular/common"),_c0=["header"],_c1=["headerButton"],_c2=["headerTitle"];function IntegralUICalendar_span_13_tr_3_td_1_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"td",15);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵproperty("ngClass",i.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.value)}}function IntegralUICalendar_span_13_tr_3_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_13_tr_3_td_1_Template,3,2,"td",14);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.years)}}function IntegralUICalendar_span_13_tr_6_td_1_Template(e,t){if(1&e){var i=i0.ɵɵgetCurrentView();i0.ɵɵelementStart(0,"td",17);i0.ɵɵlistener("mouseenter",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).yearEnter(e,a)})("mousedown",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).yearClicked(e,a)})("mouseleave",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).yearLeave(e,a)})("touchend",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).yearTouchEnd(e,a)});i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var a=t.$implicit;i0.ɵɵproperty("ngClass",a.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(a.value)}}function IntegralUICalendar_span_13_tr_6_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_13_tr_6_td_1_Template,3,2,"td",16);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.years)}}function IntegralUICalendar_span_13_tr_9_td_1_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"td",15);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵproperty("ngClass",i.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.value)}}function IntegralUICalendar_span_13_tr_9_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_13_tr_9_td_1_Template,3,2,"td",14);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.years)}}var _c3=function(e){return{opacity:e}},_c4=function(e,t){return{height:e,left:t}};function IntegralUICalendar_span_13_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"span",10);i0.ɵɵelementStart(1,"table",11,12);i0.ɵɵtemplate(3,IntegralUICalendar_span_13_tr_3_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementStart(4,"table",11,12);i0.ɵɵtemplate(6,IntegralUICalendar_span_13_tr_6_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementStart(7,"table",11,12);i0.ɵɵtemplate(9,IntegralUICalendar_span_13_tr_9_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction1(7,_c3,i.decadeOpacity));i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(9,_c4,i.contentSize.height+"px",i.animatePrevPos+"px"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",i.prevListYears);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(12,_c4,i.contentSize.height+"px",i.animateCurrentPos+"px"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",i.listYears);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(15,_c4,i.contentSize.height+"px",i.animateNextPos+"px"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",i.nextListYears)}}function IntegralUICalendar_span_14_tr_3_td_1_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"td",15);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵproperty("ngClass",i.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.text)}}function IntegralUICalendar_span_14_tr_3_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_14_tr_3_td_1_Template,3,2,"td",14);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.months)}}function IntegralUICalendar_span_14_tr_6_td_1_Template(e,t){if(1&e){var i=i0.ɵɵgetCurrentView();i0.ɵɵelementStart(0,"td",17);i0.ɵɵlistener("mouseenter",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).monthEnter(e,a)})("mousedown",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).monthClicked(e,a)})("mouseleave",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).monthLeave(e,a)})("touchend",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).monthTouchEnd(e,a)});i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var a=t.$implicit;i0.ɵɵproperty("ngClass",a.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(a.text)}}function IntegralUICalendar_span_14_tr_6_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_14_tr_6_td_1_Template,3,2,"td",16);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.months)}}function IntegralUICalendar_span_14_tr_9_td_1_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"td",15);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵproperty("ngClass",i.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.text)}}function IntegralUICalendar_span_14_tr_9_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_14_tr_9_td_1_Template,3,2,"td",14);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.months)}}function IntegralUICalendar_span_14_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"span",10);i0.ɵɵelementStart(1,"table",11,12);i0.ɵɵtemplate(3,IntegralUICalendar_span_14_tr_3_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementStart(4,"table",11,12);i0.ɵɵtemplate(6,IntegralUICalendar_span_14_tr_6_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementStart(7,"table",11,12);i0.ɵɵtemplate(9,IntegralUICalendar_span_14_tr_9_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction1(7,_c3,i.yearOpacity));i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(9,_c4,i.contentSize.height+"px",i.animatePrevPos+"px"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",i.prevListMonths);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(12,_c4,i.contentSize.height+"px",i.animateCurrentPos+"px"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",i.listMonths);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(15,_c4,i.contentSize.height+"px",i.animateNextPos+"px"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngForOf",i.nextListMonths)}}function IntegralUICalendar_span_15_th_4_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"th",19);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.text)}}function IntegralUICalendar_span_15_tr_5_td_1_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"td",21);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵproperty("ngClass",i.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.value)}}function IntegralUICalendar_span_15_tr_5_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_15_tr_5_td_1_Template,3,2,"td",20);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.days)}}function IntegralUICalendar_span_15_th_9_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"th",19);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.text)}}function IntegralUICalendar_span_15_tr_10_td_1_Template(e,t){if(1&e){var i=i0.ɵɵgetCurrentView();i0.ɵɵelementStart(0,"td",23);i0.ɵɵlistener("mouseenter",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).dayEnter(e,a)})("mousedown",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).dayClicked(e,a)})("mouseleave",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).dayLeave(e,a)})("touchend",function(e){i0.ɵɵrestoreView(i);var a=t.$implicit;return i0.ɵɵnextContext(3).dayTouchEnd(e,a)});i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var a=t.$implicit;i0.ɵɵproperty("ngClass",a.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(a.value)}}function IntegralUICalendar_span_15_tr_10_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_15_tr_10_td_1_Template,3,2,"td",22);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.days)}}function IntegralUICalendar_span_15_th_14_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"th",19);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.text)}}function IntegralUICalendar_span_15_tr_15_td_1_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"td",21);i0.ɵɵelementStart(1,"span");i0.ɵɵtext(2);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵproperty("ngClass",i.style);i0.ɵɵadvance(2);i0.ɵɵtextInterpolate(i.value)}}function IntegralUICalendar_span_15_tr_15_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"tr");i0.ɵɵtemplate(1,IntegralUICalendar_span_15_tr_15_td_1_Template,3,2,"td",20);i0.ɵɵelementEnd()}if(2&e){var i=t.$implicit;i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.days)}}var _c5=function(e,t){return{height:e,left:t,opacity:1}};function IntegralUICalendar_span_15_Template(e,t){if(1&e){i0.ɵɵelementStart(0,"span",10);i0.ɵɵelementStart(1,"table",11,12);i0.ɵɵelementStart(3,"tr");i0.ɵɵtemplate(4,IntegralUICalendar_span_15_th_4_Template,3,1,"th",18);i0.ɵɵelementEnd();i0.ɵɵtemplate(5,IntegralUICalendar_span_15_tr_5_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementStart(6,"table",11,12);i0.ɵɵelementStart(8,"tr");i0.ɵɵtemplate(9,IntegralUICalendar_span_15_th_9_Template,3,1,"th",18);i0.ɵɵelementEnd();i0.ɵɵtemplate(10,IntegralUICalendar_span_15_tr_10_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementStart(11,"table",11,12);i0.ɵɵelementStart(13,"tr");i0.ɵɵtemplate(14,IntegralUICalendar_span_15_th_14_Template,3,1,"th",18);i0.ɵɵelementEnd();i0.ɵɵtemplate(15,IntegralUICalendar_span_15_tr_15_Template,2,1,"tr",13);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){var i=i0.ɵɵnextContext();i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction1(10,_c3,i.monthOpacity));i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(12,_c5,i.contentSize.height+"px",i.animatePrevPos+"px"));i0.ɵɵadvance(3);i0.ɵɵproperty("ngForOf",i.listDayWeek);i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.prevListDaysInMonth);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(15,_c5,i.contentSize.height+"px",i.animateCurrentPos+"px"));i0.ɵɵadvance(3);i0.ɵɵproperty("ngForOf",i.listDayWeek);i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.listDaysInMonth);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(18,_c5,i.contentSize.height+"px",i.animateNextPos+"px"));i0.ɵɵadvance(3);i0.ɵɵproperty("ngForOf",i.listDayWeek);i0.ɵɵadvance(1);i0.ɵɵproperty("ngForOf",i.nextListDaysInMonth)}}var _c6=function(e,t){return{"margin-top":e,"margin-left":t}},_c7=function(e,t,i){return{"margin-top":e,"margin-left":t,width:i}},_c8=function(e,t){return{"margin-top":e,"margin-right":t}},_c9=function(e){return{height:e}},IntegralUICalendar=function(e){__extends(t,e);function t(t,i){var a=e.call(this,i)||this;a.elemRef=t;a.commonService=i;a.animateCurrentPos=0;a.animateNextPos=0;a.animatePrevPos=0;a.animateCurrentOpacity=1;a.animateNextOpacity=0;a.animatePrevOpacity=0;a.decadeOpacity=0;a.monthOpacity=1;a.yearOpacity=0;a.isDecadeAnimated=!1;a.isMonthAnimated=!1;a.isYearAnimated=!1;a.listDayWeek=[];a.title="";a.listYears=[];a.nextListYears=[];a.prevListYears=[];a.listMonths=[];a.nextListMonths=[];a.prevListMonths=[];a.listDaysInMonth=[];a.nextListDaysInMonth=[];a.prevListDaysInMonth=[];a.buttonMargin={top:2,right:2,bottom:2,left:2};a.ctrlOpacity=1;a.contentSize={width:0,height:0};a.displayMode=0;a.headerSize={width:0,height:0};a.prevDisplayMode=0;a.titleMargin={top:2,right:2,bottom:2,left:2};a.titleSize={width:0,height:0};a.updateTimer=null;a.contentCellClass=[];a.ctrlClassObj="";a.firstDayOfWeek=integralui_core_1.IntegralUIWeekDays.Sunday;a.locales="en-us";a.showToday=!0;a.dateChanged=new core_1.EventEmitter;a.isNavigationActive=!1;a.navTimer=null;for(var n=0;n<7;n++)a.listDayWeek.push({});return a}Object.defineProperty(t.prototype,"controlStyle",{get:function(){return this.currentControlStyle},set:function(e){if(e){this.currentControlStyle=e;this.initDefaultStyle();this.updateStyle(e);this.updateControlClass()}},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"selectedDate",{get:function(){return this.currentSelectedDate},set:function(e){if(this.currentSelectedDate!=e){this.currentSelectedDate=e;this.currentDate=new Date(e.getFullYear(),e.getMonth(),e.getDate())}},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"todayDate",{get:function(){return this.currentTodayDate},set:function(e){if(this.currentTodayDate!=e){this.currentTodayDate=e;this.updateLayout()}},enumerable:!0,configurable:!0});t.prototype.ngOnInit=function(){this.generalClassName="iui-calendar";this.cellClassName=this.generalClassName+"-cell";this.initStyle()};t.prototype.initDefaultStyle=function(){this.defaultStyle={general:{disabled:this.generalClassName+"-disabled",focused:this.generalClassName+"-focused",normal:this.generalClassName,hovered:this.generalClassName+"-hovered",selected:this.generalClassName+"-selected"},cell:{disabled:this.cellClassName+"-disabled",focused:this.cellClassName+"-focused",grayed:this.cellClassName+"-grayed",normal:this.cellClassName,hovered:this.cellClassName+"-hovered",selected:this.cellClassName+"-selected",today:this.cellClassName+"-today"}}};t.prototype.initStyle=function(){this.initDefaultStyle();this.updateStyle(this.controlStyle);this.refresh()};t.prototype.ngAfterViewInit=function(){var e=this;e.ctrlOpacity=0;if(!e.currentTodayDate)e.currentTodayDate=new Date;if(!e.currentSelectedDate)e.currentSelectedDate=new Date;var t=e.currentSelectedDate.getDate(),i=e.currentSelectedDate.getMonth(),a=e.currentSelectedDate.getFullYear();e.currentDate=new Date(a,i,t);e.updateLayout();var n=setTimeout(function(){e.ctrlOpacity=1;clearTimeout(n)},5)};t.prototype.ngOnDestroy=function(){this.removeNavigationTimer()};t.prototype.ngAfterContentChecked=function(){this.clientRect={width:this.elemRef.nativeElement.firstElementChild.clientWidth,height:this.elemRef.nativeElement.firstElementChild.clientHeight};if(this.clientRect.width!=this.prevClientRect.width){this.updateLayout();this.prevClientRect.width=this.clientRect.width}else if(this.clientRect.height!=this.prevClientRect.height){this.updateLayout();this.prevClientRect.height=this.clientRect.height}};t.prototype.clearDisplayAnimation=function(){this.isMonthAnimated=!1;this.isDecadeAnimated=!1;this.isYearAnimated=!1};t.prototype.animateDisplayChanges=function(e){var t=this;if(!e)t.updateLayout();else{var i=t.currentDate.getDate(),a=t.currentDate.getMonth(),n=t.currentDate.getFullYear();t.updateHeaderTitle(new Date(n,a,i))}if(t.allowAnimation){t.isMonthAnimated=0==t.prevDisplayMode?!0:!1;t.isDecadeAnimated=2==t.prevDisplayMode?!0:!1;t.isYearAnimated=1==t.prevDisplayMode?!0:!1;var r=setInterval(function(){switch(t.displayMode){case 1:if(t.yearOpacity<1){t.yearOpacity+=.03;t.decadeOpacity=t.decadeOpacity>0?t.decadeOpacity-.03:0;t.monthOpacity=t.monthOpacity>0?t.monthOpacity-.03:0}else{t.decadeOpacity=0;t.monthOpacity=0;t.yearOpacity=1;t.clearDisplayAnimation();t.refresh();clearInterval(r)}break;case 2:if(t.decadeOpacity<1){t.decadeOpacity+=.03;t.monthOpacity=t.monthOpacity>0?t.monthOpacity-.03:0;t.yearOpacity=t.yearOpacity>0?t.yearOpacity-.03:0}else{t.decadeOpacity=1;t.monthOpacity=0;t.yearOpacity=0;t.clearDisplayAnimation();t.refresh();clearInterval(r)}break;default:if(t.monthOpacity<1){t.monthOpacity+=.03;t.decadeOpacity=t.decadeOpacity>0?t.decadeOpacity-.03:0;t.yearOpacity=t.yearOpacity>0?t.yearOpacity-.03:0}else{t.decadeOpacity=0;t.monthOpacity=1;t.yearOpacity=0;t.clearDisplayAnimation();t.refresh();clearInterval(r)}}},5)}else{t.isMonthAnimated=!1;t.isDecadeAnimated=!1;t.isYearAnimated=!1;switch(t.displayMode){case 1:t.decadeOpacity=0;t.monthOpacity=0;t.yearOpacity=1;t.refresh();break;case 2:t.decadeOpacity=1;t.monthOpacity=0;t.yearOpacity=0;t.refresh();break;default:t.decadeOpacity=0;t.monthOpacity=1;t.yearOpacity=0;t.refresh()}}};t.prototype.getCorrectDayInMonth=function(e,t,i){var a=this.getLastDayFromMonth(t,e);return i<=a?i:a};t.prototype.getLastDayFromMonth=function(e,t){if(1==e)return t%4==0?29:28;else if(3==e||5==e||8==e||10==e)return 30;else return 31};t.prototype.getPrevMonth=function(e){var t=e.getMonth();return 0==t?11:t-1};t.prototype.getPrevYear=function(e){var t=e.getMonth(),i=e.getFullYear();return 1==this.displayMode?i-1:0==t?i-1:i};t.prototype.getNextMonth=function(e){var t=e.getMonth();return 11==t?0:t+1};t.prototype.getNextYear=function(e){var t=e.getMonth(),i=e.getFullYear();return 1==this.displayMode?i+1:11==t?i+1:i};t.prototype.getWeekNames=function(){for(var e=new Date(2017,0,2),t=[],i=0;i<7;i++){t.push(e.toLocaleString(this.locales,{weekday:"long"}));e.setDate(e.getDate()+1)}return t};t.prototype.isDateEqual=function(e,t){return this.isYearEqual(e,t)&&this.isMonthEqual(e,t)&&e.getDate()==t.getDate()};t.prototype.isMonthEqual=function(e,t){return e.getMonth()==t.getMonth()};t.prototype.isYearEqual=function(e,t){return e.getFullYear()==t.getFullYear()};t.prototype.reset=function(){this.displayMode=0;this.decadeOpacity=0;this.monthOpacity=1;this.yearOpacity=0};t.prototype.refresh=function(){this.updateControlClass();if(this.currentDate){for(var e=this.currentDate.getDate(),t=this.currentDate.getMonth(),i=this.currentDate.getFullYear(),a=new Date(i,t,e),n=null,r=0;r<this.listDaysInMonth.length;r++)for(var l=this.listDaysInMonth[r],o=0;o<l.days.length;o++)(n=l.days[o]).style=this.getDayObjectStyle(a,n.value,n.grayed);for(r=0;r<this.listMonths.length;r++){var s=this.listMonths[r];for(o=0;o<s.months.length;o++)(n=s.months[o]).style=this.getMonthObjectStyle(a,n.value,!1)}for(r=0;r<this.listYears.length;r++)for(s=this.listYears[r],o=0;o<s.years.length;o++)(n=s.years[o]).style=this.getYearObjectStyle(a,n.value,n.grayed)}};t.prototype.updateLayout=function(){var e=this;e.updateTimer=setTimeout(function(){e.clientRect={width:e.elemRef.nativeElement.firstElementChild.clientWidth,height:e.elemRef.nativeElement.firstElementChild.clientHeight};e.headerSize={width:e.clientRect.width-4,height:e.headerElem.nativeElement.offsetHeight};e.contentSize={width:e.clientRect.width,height:e.clientRect.height-e.headerSize.height};e.listYears.length=0;e.nextListYears.length=0;e.prevListYears.length=0;e.listMonths.length=0;e.nextListMonths.length=0;e.prevListMonths.length=0;e.listDaysInMonth.length=0;e.nextListDaysInMonth.length=0;e.prevListDaysInMonth.length=0;var t=e.currentDate.getDate(),i=e.currentDate.getMonth(),a=e.currentDate.getFullYear(),n=new Date(a,i,t);n.setFullYear(a-10);e.updateDecadeLayout(e.prevListYears,n);n.setFullYear(a+10);e.updateDecadeLayout(e.nextListYears,n);n.setFullYear(a);e.updateDecadeLayout(e.listYears,n);n.setFullYear(a-1);e.updateYearLayout(e.prevListMonths,n);n.setFullYear(a+1);e.updateYearLayout(e.nextListMonths,n);n.setFullYear(a);e.updateYearLayout(e.listMonths,n);n=new Date(e.getPrevYear(e.currentDate),e.getPrevMonth(e.currentDate),1);e.updateMonthLayout(e.prevListDaysInMonth,n);n=new Date(e.getNextYear(e.currentDate),e.getNextMonth(e.currentDate),1);e.updateMonthLayout(e.nextListDaysInMonth,n);n=new Date(a,i,t);e.updateMonthLayout(e.listDaysInMonth,n);e.updateHeaderTitle(n);e.updateHeaderLayout();e.updateHeaderLayout();e.animatePrevPos=-e.contentSize.width;e.animateCurrentPos=0;e.animateNextPos=e.contentSize.width;e.animatePrevOpacity=0;e.animateCurrentOpacity=1;e.animateNextOpacity=0;clearTimeout(e.updateTimer)},1)};t.prototype.updateHeaderLayout=function(){var e=this,t=setTimeout(function(){e.buttonMargin={top:(e.headerSize.height-e.headerButtonElem.nativeElement.offsetHeight)/2,right:2,bottom:2,left:2};e.titleMargin={top:(e.headerSize.height-e.headerTitleElem.nativeElement.offsetHeight)/2,right:2,bottom:2,left:2};e.titleSize={width:e.headerSize.width-2*(e.headerButtonElem.nativeElement.offsetWidth+e.buttonMargin.left+e.buttonMargin.right)-(e.titleMargin.left+e.titleMargin.right),height:e.headerSize.height};clearTimeout(t)},1)};t.prototype.updateHeaderTitle=function(e){switch(this.displayMode){case 1:this.title=e.getFullYear().toString();break;case 2:var t=10*Math.floor(e.getFullYear()/10);this.title=t.toString()+" - "+(t+9).toString();break;default:var i=e.toLocaleString(this.locales,{month:"long"}),a=e.getFullYear().toString();this.title=i+", "+a}};t.prototype.updateDecadeLayout=function(e,t){for(var i=10*Math.floor(t.getFullYear()/10)-1,a=!1,n=0;n<3;n++){for(var r={years:[]},l=0;l<4;l++){a=0==n&&0==l||2==n&&3==l?!0:!1;r.years.push({grayed:a,style:this.getYearObjectStyle(t,i,a),value:i});i++}e.push(r)}};t.prototype.updateMonthLayout=function(e,t){var i=this.getWeekNames(),a=this.firstDayOfWeek;this.listDayWeek.length=0;for(var n=0;n<7&&a<i.length;n++){this.listDayWeek.push({text:i[a].substring(0,2)});a=a<6?a+1:0}var r=t.getFullYear(),l=t.getMonth(),o=this.getLastDayFromMonth(l,r),s=new Date(r,l,1).getDay();a=this.firstDayOfWeek+1;s=(s=s>this.firstDayOfWeek?s-a:s-a+7)>0?s:7;var c=l>0?l-1:11,h=this.getLastDayFromMonth(c,r),p=!1,d=0;for(n=0;n<6;n++){var u={days:[]};if(0==n){for(var y=0;y<s;y++){var m=h-s+1+y,g={grayed:!0,isPrev:!0,style:this.getDayObjectStyle(t,m,!0),value:m};u.days.push(g)}for(y=s;y<7;y++){d++;g={grayed:!1,style:this.getDayObjectStyle(t,d,!1),value:d};u.days.push(g)}}else for(y=0;y<7;y++){if(!p&&d>=o)p=!0;d=d<o?d+1:1;g={grayed:p,isNext:p,style:this.getDayObjectStyle(t,d,p),value:d};u.days.push(g)}e.push(u)}};t.prototype.updateYearLayout=function(e,t){for(var i=0,a=0;a<3;a++){for(var n={months:[]},r=0;r<4;r++){var l=new Date;l.setMonth(i);n.months.push({text:l.toLocaleString(this.locales,{month:"long"}).substring(0,3),style:this.getMonthObjectStyle(t,i,!1),value:i});i++}e.push(n)}};t.prototype.updateCurrentDate=function(e,t){if(e)this.currentDate=new Date(e.getFullYear(),e.getMonth(),e.getDate());else{this.currentDate.getDate(),this.currentDate.getMonth();var i=this.currentDate.getFullYear();switch(this.displayMode){case 1:this.currentDate=new Date(t?this.getPrevYear(this.currentDate):this.getNextYear(this.currentDate),this.currentDate.getMonth(),1);break;case 2:this.currentDate.setFullYear(t?i-10:i+10);break;default:this.currentDate=new Date(t?this.getPrevYear(this.currentDate):this.getNextYear(this.currentDate),t?this.getPrevMonth(this.currentDate):this.getNextMonth(this.currentDate),1)}}this.updateLayout()};t.prototype.btnNextClicked=function(e){var t=this;t.next(e);t.removeNavigationTimer();t.isNavigationActive=!0;t.navTimer=setInterval(function(){if(t.isNavigationActive)t.next(e);else t.removeNavigationTimer()},500);e.stopPropagation()};t.prototype.btnPrevClicked=function(e){var t=this;t.prev(e);t.removeNavigationTimer();t.isNavigationActive=!0;t.navTimer=setInterval(function(){if(t.isNavigationActive)t.prev(e);else t.removeNavigationTimer()},500);e.stopPropagation()};t.prototype.ctrlClick=function(e){e.stopPropagation()};t.prototype.ctrlMouseDown=function(e){e.stopPropagation()};t.prototype.ctrlMouseEnter=function(e){this.state|=integralui_core_1.IntegralUIObjectState.hovered};t.prototype.ctrlMouseLeave=function(e){this.state&=~integralui_core_1.IntegralUIObjectState.hovered};t.prototype.ctrlMouseUp=function(e){this.removeNavigationTimer();e.stopPropagation()};t.prototype.ctrlTouchEnd=function(e){e.stopPropagation()};t.prototype.dayClicked=function(e,t){if(1==e.which&&this.isEnabled)this.processDayClicked(e,t);e.stopPropagation()};t.prototype.dayTouchEnd=function(e,t){if(this.isEnabled)this.processDayClicked(e,t);e.stopPropagation()};t.prototype.dayEnter=function(e,t){if(this.isEnabled){var i=t.isPrev?this.getPrevYear(this.currentDate):t.isNext?this.getNextYear(this.currentDate):this.currentDate.getFullYear(),a=t.isPrev?this.getPrevMonth(this.currentDate):t.isNext?this.getNextMonth(this.currentDate):this.currentDate.getMonth(),n=t.value;this.hoverDate=new Date(i,a,n);this.refresh()}e.stopPropagation()};t.prototype.dayLeave=function(e,t){if(this.isEnabled){this.prevHoverDate=this.hoverDate;this.hoverDate=null;this.refresh()}e.stopPropagation()};t.prototype.headerClicked=function(e,t){if((t||1==e.which)&&this.isEnabled&&this.displayMode<2){this.prevDisplayMode=this.prevDisplayMode!=this.displayMode?this.displayMode:this.prevDisplayMode;this.displayMode=this.displayMode<2?this.displayMode+1:2;this.animateDisplayChanges(!0)}this.hoverDate=null;e.stopPropagation()};t.prototype.monthClicked=function(e,t){if(1==e.which&&this.isEnabled)this.processMonthClicked(t);e.stopPropagation()};t.prototype.monthTouchEnd=function(e,t){if(this.isEnabled)this.processMonthClicked(t);e.stopPropagation()};t.prototype.monthEnter=function(e,t){if(this.isEnabled){var i=this.currentSelectedDate.getFullYear(),a=t.value,n=this.getCorrectDayInMonth(i,a,this.currentSelectedDate.getDate());this.hoverDate=new Date(i,a,n);this.refresh()}e.stopPropagation()};t.prototype.monthLeave=function(e,t){if(this.isEnabled){this.prevHoverDate=this.hoverDate;this.hoverDate=null;this.refresh()}e.stopPropagation()};t.prototype.yearClicked=function(e,t){if(1==e.which&&this.isEnabled)this.processYearClicked(t);e.stopPropagation()};t.prototype.yearTouchEnd=function(e,t){if(this.isEnabled)this.processYearClicked(t);e.stopPropagation()};t.prototype.yearEnter=function(e,t){if(this.isEnabled){var i=t.value,a=this.currentSelectedDate.getMonth(),n=this.currentSelectedDate.getDate();this.hoverDate=new Date(i,a,n);this.refresh()}e.stopPropagation()};t.prototype.yearLeave=function(e,t){if(this.isEnabled){this.prevHoverDate=this.hoverDate;this.hoverDate=null;this.refresh()}e.stopPropagation()};t.prototype.next=function(e,t){var i=this;if(i.allowAnimation)var a=setInterval(function(){if(i.animateNextPos>0){i.animateCurrentPos-=5;i.animateNextPos-=5;i.animateCurrentOpacity=i.animateCurrentOpacity>0?i.animateCurrentOpacity-.01:0;i.animateNextOpacity=i.animateNextOpacity<1?i.animateNextOpacity+.01:1}else{i.animateCurrentPos=-i.contentSize.width;i.animateNextPos=0;i.animateCurrentOpacity=0;i.animateNextOpacity=1;i.updateCurrentDate(t);i.prevHoverDate=null;i.hoverDate=null;clearInterval(a)}},5);else{i.updateCurrentDate(t);i.prevHoverDate=null;i.hoverDate=null}e.stopPropagation()};t.prototype.prev=function(e,t){var i=this;if(i.allowAnimation)var a=setInterval(function(){if(i.animatePrevPos<0){i.animateCurrentPos+=5;i.animatePrevPos+=5;i.animateCurrentOpacity=i.animateCurrentOpacity>0?i.animateCurrentOpacity-.01:0;i.animatePrevOpacity=i.animatePrevOpacity<1?i.animatePrevOpacity+.01:1}else{i.animateCurrentPos=i.contentSize.width;i.animatePrevPos=0;i.animateCurrentOpacity=0;i.animatePrevOpacity=1;i.updateCurrentDate(t,!0);i.prevHoverDate=null;i.hoverDate=null;clearInterval(a)}},5);else{i.updateCurrentDate(t,!0);i.prevHoverDate=null;i.hoverDate=null}e.stopPropagation()};t.prototype.removeNavigationTimer=function(){this.isNavigationActive=!1;if(this.navTimer)clearInterval(this.navTimer);this.navTimer=null};t.prototype.processDayClicked=function(e,t){var i=t.isPrev?this.getPrevYear(this.currentDate):t.isNext?this.getNextYear(this.currentDate):this.currentDate.getFullYear(),a=t.isPrev?this.getPrevMonth(this.currentDate):t.isNext?this.getNextMonth(this.currentDate):this.currentDate.getMonth(),n=t.value;this.selectedDate=new Date(i,a,n);t.isPrev?this.prev(e,this.selectedDate):t.isNext?this.next(e,this.selectedDate):this.refresh();this.dateChanged.emit({date:this.currentSelectedDate})};t.prototype.processMonthClicked=function(e){var t=this.currentDate.getFullYear(),i=e.value,a=this.getCorrectDayInMonth(t,i,this.currentSelectedDate.getDate());this.selectedDate=new Date(t,i,a);this.prevDisplayMode=this.displayMode;this.displayMode=0;this.animateDisplayChanges()};t.prototype.processYearClicked=function(e){var t=e.value,i=this.currentDate.getMonth(),a=this.currentSelectedDate.getDate();this.selectedDate=new Date(t,i,a);this.prevDisplayMode=this.displayMode;this.displayMode=1;this.animateDisplayChanges()};t.prototype.onWindowMouseUp=function(e){this.removeNavigationTimer()};t.prototype.getDayObjectStyle=function(e,t,i){return this.getCellObjectStyle(e,new Date(e.getFullYear(),e.getMonth(),t),i)};t.prototype.getMonthObjectStyle=function(e,t,i){return this.getCellObjectStyle(e,new Date(e.getFullYear(),t,1),i)};t.prototype.getYearObjectStyle=function(e,t,i){return this.getCellObjectStyle(e,new Date(t,0,1),i)};t.prototype.getCellObjectStyle=function(e,t,i){var a=[];a.push(this.cellClassName);switch(this.displayMode){case 1:if(!i)if(this.isMonthEqual(t,this.currentDate))a.push(this.options.currentStyle.cell.selected);else if(this.hoverDate&&this.isMonthEqual(t,this.hoverDate)){a.push(this.options.currentStyle.cell.hovered);if(this.allowAnimation)a.push(this.cellClassName+"-enter")}else if(this.prevHoverDate&&this.isMonthEqual(t,this.prevHoverDate)){a.push(this.options.currentStyle.cell.normal);if(this.allowAnimation)a.push(this.cellClassName+"-leave")}else a.push(this.options.currentStyle.cell.normal);else a.push(this.options.currentStyle.cell.grayed);break;case 2:if(this.isYearEqual(t,this.currentDate))a.push(this.options.currentStyle.cell.selected);else if(this.hoverDate&&this.isYearEqual(t,this.hoverDate)){a.push(this.options.currentStyle.cell.hovered);if(this.allowAnimation)a.push(this.cellClassName+"-enter")}else if(this.prevHoverDate&&this.isYearEqual(t,this.prevHoverDate)){a.push(this.options.currentStyle.cell.normal);if(this.allowAnimation)a.push(this.cellClassName+"-leave")}else a.push(this.options.currentStyle.cell.normal);break;default:if(!i){if(this.isDateEqual(t,this.currentSelectedDate))a.push(this.options.currentStyle.cell.selected);else if(this.hoverDate&&this.isDateEqual(t,this.hoverDate)){a.push(this.options.currentStyle.cell.hovered);if(this.allowAnimation&&(!this.showToday||!this.isDateEqual(t,this.currentTodayDate)))a.push(this.cellClassName+"-enter")}else if(this.prevHoverDate&&this.isDateEqual(t,this.prevHoverDate)){a.push(this.options.currentStyle.cell.normal);if(this.allowAnimation&&(!this.showToday||!this.isDateEqual(t,this.currentTodayDate)))a.push(this.cellClassName+"-leave")}else a.push(this.options.currentStyle.cell.normal);if(this.showToday&&this.isDateEqual(t,this.currentTodayDate))a.push(this.options.currentStyle.cell.today)}else a.push(this.options.currentStyle.cell.grayed)}return a};t.prototype.getControlStyle=function(){var e={opacity:this.ctrlOpacity};if(this.ctrlSize.width>0)e.width=this.ctrlSize.width+"px";if(this.ctrlSize.height>0)e.height=this.ctrlSize.height+"px";return e};t.prototype.getCellStyle=function(e){if(this.commonService.isString(e))return e;else if(e)return{disabled:this.commonService.isFieldAvailable(e.disabled,this.cellClassName+"-disabled"),focused:this.commonService.isFieldAvailable(e.focused,this.cellClassName+"-focused"),grayed:this.commonService.isFieldAvailable(e.grayed,this.cellClassName+"-grayed"),hovered:this.commonService.isFieldAvailable(e.hovered,this.cellClassName+"-hovered"),normal:this.commonService.isFieldAvailable(e.normal,this.cellClassName),selected:this.commonService.isFieldAvailable(e.selected,this.cellClassName+"-selected"),today:this.commonService.isFieldAvailable(e.grayed,this.cellClassName+"-today")};else return{disabled:this.defaultStyle.cell.disabled,focused:this.defaultStyle.cell.focused,grayed:this.defaultStyle.cell.grayed,hovered:this.defaultStyle.cell.hovered,normal:this.defaultStyle.cell.normal,selected:this.defaultStyle.cell.selected,today:this.defaultStyle.cell.today}};t.prototype.updateControlClass=function(){var e=this.generalClassName;if(this.options.currentStyle){e+=" "+this.options.currentStyle.general.normal;if(this.state&integralui_core_1.IntegralUIObjectState.disabled)e+=" "+this.options.currentStyle.general.disabled;else if(this.state&integralui_core_1.IntegralUIObjectState.focused)e+=" "+this.options.currentStyle.general.focused;else if(this.state&integralui_core_1.IntegralUIObjectState.selected)e+=" "+this.options.currentStyle.general.selected;else if(this.state&integralui_core_1.IntegralUIObjectState.hovered)e+=" "+this.options.currentStyle.general.hovered}this.ctrlClassObj=e};t.prototype.updateStyle=function(e){if(e)this.options.currentStyle={general:this.getGeneralStyle(e.general),cell:this.getCellStyle(e.cell)};else this.options.currentStyle={general:{disabled:this.defaultStyle.general.disabled,focused:this.defaultStyle.general.focused,hovered:this.defaultStyle.general.hovered,normal:this.defaultStyle.general.normal,selected:this.defaultStyle.general.selected},cell:{disabled:this.defaultStyle.cell.disabled,focused:this.defaultStyle.cell.focused,grayed:this.defaultStyle.cell.grayed,hovered:this.defaultStyle.cell.hovered,normal:this.defaultStyle.cell.normal,selected:this.defaultStyle.cell.selected,today:this.defaultStyle.cell.today}}};t.ɵfac=function(e){return new(e||t)(i0.ɵɵdirectiveInject(i0.ElementRef),i0.ɵɵdirectiveInject(i1.IntegralUICommonService))};t.ɵcmp=i0.ɵɵdefineComponent({type:t,selectors:[["iui-calendar"]],viewQuery:function(e,t){if(1&e){i0.ɵɵviewQuery(_c0,!0,core_1.ElementRef);i0.ɵɵviewQuery(_c1,!0,core_1.ElementRef);i0.ɵɵviewQuery(_c2,!0,core_1.ElementRef)}if(2&e){var i;i0.ɵɵqueryRefresh(i=i0.ɵɵloadQuery())&&(t.headerElem=i.first);i0.ɵɵqueryRefresh(i=i0.ɵɵloadQuery())&&(t.headerButtonElem=i.first);i0.ɵɵqueryRefresh(i=i0.ɵɵloadQuery())&&(t.headerTitleElem=i.first)}},hostBindings:function(e,t){if(1&e)i0.ɵɵlistener("mouseup",function(e){return t.onWindowMouseUp(e)},!1,i0.ɵɵresolveDocument)},inputs:{controlStyle:"controlStyle",data:"data",enabled:"enabled",name:"name",size:"size",state:"state",firstDayOfWeek:"firstDayOfWeek",locales:"locales",selectedDate:"selectedDate",showToday:"showToday",todayDate:"todayDate"},outputs:{dateChanged:"dateChanged"},features:[i0.ɵɵInheritDefinitionFeature],decls:16,vars:24,consts:[[3,"ngStyle","click","mouseenter","mouseleave","mousedown","mouseup","touchend"],[2,"height","14%","margin","0 2px"],["header",""],[1,"iui-calendar-header-button","iui-calendar-header-button-prev",3,"ngStyle","mousedown","touchend"],["headerButton",""],[1,"iui-calendar-header-title",3,"ngStyle","click","touchend"],["headerTitle",""],[1,"iui-calendar-header-button","iui-calendar-header-button-next",3,"ngStyle","mousedown","touchend"],[2,"position","relative","overflow","hidden",3,"ngStyle"],[3,"ngStyle",4,"ngIf"],[3,"ngStyle"],["cellspacing","2","cellpadding","1",2,"position","absolute","width","100%",3,"ngStyle"],["content",""],[4,"ngFor","ngForOf"],["style","width:25%;height:33%;text-align:center;",3,"ngClass",4,"ngFor","ngForOf"],[2,"width","25%","height","33%","text-align","center",3,"ngClass"],["style","width:25%;height:33%;text-align:center;",3,"ngClass","mouseenter","mousedown","mouseleave","touchend",4,"ngFor","ngForOf"],[2,"width","25%","height","33%","text-align","center",3,"ngClass","mouseenter","mousedown","mouseleave","touchend"],["class","iui-calendar-cell-header","style","width:14.2857%;height:14.2857%;",4,"ngFor","ngForOf"],[1,"iui-calendar-cell-header",2,"width","14.2857%","height","14.2857%"],["style","width:14.2857%;height:14.2857%;",3,"ngClass",4,"ngFor","ngForOf"],[2,"width","14.2857%","height","14.2857%",3,"ngClass"],["style","width:14.2857%;height:14.2857%;",3,"ngClass","mouseenter","mousedown","mouseleave","touchend",4,"ngFor","ngForOf"],[2,"width","14.2857%","height","14.2857%",3,"ngClass","mouseenter","mousedown","mouseleave","touchend"]],template:function(e,t){if(1&e){i0.ɵɵelementStart(0,"div",0);i0.ɵɵlistener("click",function(e){return t.ctrlClick(e)})("mouseenter",function(e){return t.ctrlMouseEnter(e)})("mouseleave",function(e){return t.ctrlMouseLeave(e)})("mousedown",function(e){return t.ctrlMouseDown(e)})("mouseup",function(e){return t.ctrlMouseUp(e)})("touchend",function(e){return t.ctrlTouchEnd(e)});i0.ɵɵelementStart(1,"div",1,2);i0.ɵɵelementStart(3,"div",3,4);i0.ɵɵlistener("mousedown",function(e){return t.btnPrevClicked(e)})("touchend",function(e){return t.btnPrevClicked(e)});i0.ɵɵelement(5,"span");i0.ɵɵelementEnd();i0.ɵɵelementStart(6,"div",5,6);i0.ɵɵlistener("click",function(e){return t.headerClicked(e)})("touchend",function(e){return t.headerClicked(e,!0)});i0.ɵɵelementStart(8,"span");i0.ɵɵtext(9);i0.ɵɵelementEnd();i0.ɵɵelementEnd();i0.ɵɵelementStart(10,"div",7);i0.ɵɵlistener("mousedown",function(e){return t.btnNextClicked(e)})("touchend",function(e){return t.btnNextClicked(e)});i0.ɵɵelement(11,"span");i0.ɵɵelementEnd();i0.ɵɵelementEnd();i0.ɵɵelementStart(12,"div",8);i0.ɵɵtemplate(13,IntegralUICalendar_span_13_Template,10,18,"span",9);i0.ɵɵtemplate(14,IntegralUICalendar_span_14_Template,10,18,"span",9);i0.ɵɵtemplate(15,IntegralUICalendar_span_15_Template,16,21,"span",9);i0.ɵɵelementEnd();i0.ɵɵelementEnd()}if(2&e){i0.ɵɵclassMap(t.ctrlClassObj);i0.ɵɵproperty("ngStyle",t.getControlStyle());i0.ɵɵadvance(3);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(12,_c6,t.buttonMargin.top+"px",t.buttonMargin.left+"px"));i0.ɵɵadvance(3);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction3(15,_c7,t.titleMargin.top+"px",t.titleMargin.left+"px",t.titleSize.width+"px"));i0.ɵɵadvance(3);i0.ɵɵtextInterpolate(t.title);i0.ɵɵadvance(1);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction2(19,_c8,t.buttonMargin.top+"px",t.buttonMargin.right+"px"));i0.ɵɵadvance(2);i0.ɵɵproperty("ngStyle",i0.ɵɵpureFunction1(22,_c9,t.contentSize.height+"px"));i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",2==t.displayMode||t.isDecadeAnimated);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",1==t.displayMode||t.isYearAnimated);i0.ɵɵadvance(1);i0.ɵɵproperty("ngIf",0==t.displayMode||t.isMonthAnimated)}},directives:[i2.NgStyle,i2.NgIf,i2.NgForOf,i2.NgClass],encapsulation:2});return t}(integralui_core_1.IntegralUIBaseComponent);exports.IntegralUICalendar=IntegralUICalendar;