ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
9 lines • 63.7 kB
JavaScript
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/cdk/overlay"),require("@angular/common"),require("@angular/core"),require("ng-zorro-antd/core"),require("ng-zorro-antd/icon"),require("@angular/forms"),require("ng-zorro-antd/i18n"),require("ng-zorro-antd/time-picker"),require("ng-zorro-antd/calendar"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("ng-zorro-antd/date-picker",["exports","@angular/cdk/overlay","@angular/common","@angular/core","ng-zorro-antd/core","ng-zorro-antd/icon","@angular/forms","ng-zorro-antd/i18n","ng-zorro-antd/time-picker","ng-zorro-antd/calendar","rxjs","rxjs/operators"],n):n(((e=e||self)["ng-zorro-antd"]=e["ng-zorro-antd"]||{},e["ng-zorro-antd"]["date-picker"]={}),e.ng.cdk.overlay,e.ng.common,e.ng.core,e["ng-zorro-antd"].core,e["ng-zorro-antd"].icon,e.ng.forms,e["ng-zorro-antd"].i18n,e["ng-zorro-antd"]["time-picker"],e["ng-zorro-antd"].calendar,e.rxjs,e.rxjs.operators)}(this,function(e,n,t,a,o,i,r,l,s,p,c,u){"use strict";var h=function(e,n){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])})(e,n)};function d(e,n){function t(){this.constructor=e}h(e,n),e.prototype=null===n?Object.create(n):(t.prototype=n.prototype,new t)}var y=function(){return(y=Object.assign||function(e){for(var n,t=1,a=arguments.length;t<a;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function g(e,n,t,a){var o,i=arguments.length,r=i<3?n:null===a?a=Object.getOwnPropertyDescriptor(n,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,n,t,a);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(r=(i<3?o(r):i>3?o(n,t,r):o(n,t))||r);return i>3&&r&&Object.defineProperty(n,t,r),r}function m(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function v(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var a,o,i=t.call(e),r=[];try{for(;(void 0===n||n-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(e){o={error:e}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return r}var f=function(){function e(){this.showToday=!1,this.hasTimePicker=!1,this.isRange=!1,this.showTimePicker=!1,this.showTimePickerChange=new a.EventEmitter,this.timePickerDisabled=!1,this.okDisabled=!1,this.clickOk=new a.EventEmitter,this.clickToday=new a.EventEmitter,this.prefixCls="ant-calendar",this.isTemplateRef=o.isTemplateRef,this.isNonEmptyString=o.isNonEmptyString}return e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"calendar-footer",exportAs:"calendarFooter",template:'<div class="{{ prefixCls }}-footer {{ isRange ? prefixCls + \'-range-bottom\' : \'\' }} {{ hasTimePicker ? prefixCls + \'-footer-show-ok\' : \'\' }}">\n <div *ngIf="rangeQuickSelector" class="{{ prefixCls }}-footer-extra {{ prefixCls }}-range-quick-selector">\n <ng-container *ngTemplateOutlet="rangeQuickSelector"></ng-container>\n </div>\n <div *ngIf="extraFooter" class="{{ prefixCls }}-footer-extra {{ isRange ? prefixCls + \'-range-quick-selector\' : \'\' }}">\n <ng-container [ngSwitch]="true">\n <ng-container *ngSwitchCase="isTemplateRef(extraFooter)">\n <ng-container *ngTemplateOutlet="extraFooter"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase="isNonEmptyString(extraFooter)">\n <span [innerHTML]="extraFooter"></span>\n </ng-container>\n </ng-container>\n </div>\n <span *ngIf="showToday || hasTimePicker" class="{{ prefixCls }}-footer-btn">\n <today-button\n *ngIf="showToday"\n [locale]="locale"\n [disabledDate]="disabledDate"\n [hasTimePicker]="hasTimePicker"\n (clickToday)="clickToday.emit($event)"\n ></today-button>\n <time-picker-button\n *ngIf="hasTimePicker"\n [locale]="locale"\n [timePickerDisabled]="timePickerDisabled"\n [showTimePicker]="showTimePicker"\n (showTimePickerChange)="showTimePickerChange.emit($event)"\n ></time-picker-button>\n <ok-button\n *ngIf="hasTimePicker"\n [okDisabled]="okDisabled"\n [locale]="locale"\n (clickOk)="clickOk.emit()"\n ></ok-button>\n </span>\n</div>'}]}],e.propDecorators={locale:[{type:a.Input}],showToday:[{type:a.Input}],hasTimePicker:[{type:a.Input}],isRange:[{type:a.Input}],showTimePicker:[{type:a.Input}],showTimePickerChange:[{type:a.Output}],timePickerDisabled:[{type:a.Input}],okDisabled:[{type:a.Input}],disabledDate:[{type:a.Input}],extraFooter:[{type:a.Input}],rangeQuickSelector:[{type:a.Input}],clickOk:[{type:a.Output}],clickToday:[{type:a.Output}]},e}();var C=function(){function e(e){this.dateHelper=e,this.enablePrev=!0,this.enableNext=!0,this.showTimePicker=!1,this.valueChange=new a.EventEmitter,this.panelModeChange=new a.EventEmitter,this.chooseDecade=new a.EventEmitter,this.chooseYear=new a.EventEmitter,this.chooseMonth=new a.EventEmitter,this.prefixCls="ant-calendar",this.yearToMonth=!1}return e.prototype.ngOnInit=function(){this.value||(this.value=new o.CandyDate)},e.prototype.ngOnChanges=function(e){(e.value||e.showTimePicker||e.panelMode)&&this.render()},e.prototype.previousYear=function(){this.gotoYear(-1)},e.prototype.nextYear=function(){this.gotoYear(1)},e.prototype.previousMonth=function(){this.gotoMonth(-1)},e.prototype.nextMonth=function(){this.gotoMonth(1)},e.prototype.changePanel=function(e,n){this.panelModeChange.emit(e),n&&this.changeValueFromInside(n)},e.prototype.onChooseDecade=function(e){this.changePanel("year",e),this.chooseDecade.emit(e)},e.prototype.onChooseYear=function(e){this.changePanel(this.yearToMonth?"month":"date",e),this.yearToMonth=!1,this.chooseYear.emit(e)},e.prototype.onChooseMonth=function(e){this.changePanel("date",e),this.yearToMonth=!1,this.chooseMonth.emit(e)},e.prototype.changeToMonthPanel=function(){this.changePanel("month"),this.yearToMonth=!0},e.prototype.render=function(){this.value&&(this.yearMonthDaySelectors=this.createYearMonthDaySelectors())},e.prototype.gotoMonth=function(e){this.changeValueFromInside(this.value.addMonths(e))},e.prototype.gotoYear=function(e){this.changeValueFromInside(this.value.addYears(e))},e.prototype.changeValueFromInside=function(e){this.value!==e&&(this.value=e,this.valueChange.emit(this.value),this.render())},e.prototype.formatDateTime=function(e){return this.dateHelper.format(this.value.nativeDate,e)},e.prototype.createYearMonthDaySelectors=function(){var e,n,t,a=this,o=this.locale.yearFormat;this.dateHelper.relyOnDatePipe&&(o=this.dateHelper.transCompatFormat(o)),e={className:this.prefixCls+"-year-select",title:this.locale.yearSelect,onClick:function(){return a.showTimePicker?null:a.changePanel("year")},label:this.formatDateTime(o)},n={className:this.prefixCls+"-month-select",title:this.locale.monthSelect,onClick:function(){return a.showTimePicker?null:a.changeToMonthPanel()},label:this.formatDateTime(this.locale.monthFormat||"MMM")};var i=this.locale.dayFormat;return this.dateHelper.relyOnDatePipe&&(i=this.dateHelper.transCompatFormat(i)),this.showTimePicker&&(t={className:this.prefixCls+"-day-select",label:this.formatDateTime(i)}),(this.locale.monthBeforeYear?[n,t,e]:[e,n,t]).filter(function(e){return!!e})},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"calendar-header",exportAs:"calendarHeader",template:'<div class="{{ prefixCls }}-header">\n <div style="position: relative;">\n <a *ngIf="enablePrev && !showTimePicker"\n class="{{ prefixCls }}-prev-year-btn"\n role="button"\n (click)="previousYear()"\n title="{{ locale.previousYear }}"\n ></a>\n <a *ngIf="enablePrev && !showTimePicker"\n class="{{ prefixCls }}-prev-month-btn"\n role="button"\n (click)="previousMonth()"\n title="{{ locale.previousMonth }}"\n ></a>\n\n <span class="{{ prefixCls }}-{{ locale.monthBeforeYear ? \'my-select\' : \'ym-select\' }}">\n <ng-container *ngFor="let selector of yearMonthDaySelectors">\n <a class="{{ selector.className }}"\n role="button"\n (click)="selector.onClick ? selector.onClick() : null"\n title="{{ selector.title || null }}"\n >\n {{ selector.label }}\n </a>\n </ng-container>\n </span>\n\n <a *ngIf="enableNext && !showTimePicker"\n class="{{ prefixCls }}-next-month-btn"\n role="button"\n (click)="nextMonth()"\n title="{{ locale.nextMonth }}"\n ></a>\n <a *ngIf="enableNext && !showTimePicker"\n class="{{ prefixCls }}-next-year-btn"\n role="button"\n (click)="nextYear()"\n title="{{ locale.nextYear }}"\n ></a>\n </div>\n\n <ng-container [ngSwitch]="panelMode">\n <ng-container *ngSwitchCase="\'decade\'">\n <decade-panel\n [locale]="locale"\n [value]="value"\n (valueChange)="onChooseDecade($event)"\n ></decade-panel>\n </ng-container>\n <ng-container *ngSwitchCase="\'year\'">\n <year-panel\n [locale]="locale"\n [value]="value"\n [disabledDate]="disabledYear"\n (valueChange)="onChooseYear($event)"\n (decadePanelShow)="changePanel(\'decade\')"\n ></year-panel>\n </ng-container>\n <ng-container *ngSwitchCase="\'month\'">\n <month-panel\n [locale]="locale"\n [value]="value"\n [disabledDate]="disabledMonth"\n (valueChange)="onChooseMonth($event)"\n (yearPanelShow)="changePanel(\'year\')"\n ></month-panel>\n </ng-container>\n </ng-container>\n</div>'}]}],e.ctorParameters=function(){return[{type:l.DateHelperService}]},e.propDecorators={locale:[{type:a.Input}],enablePrev:[{type:a.Input}],enableNext:[{type:a.Input}],disabledMonth:[{type:a.Input}],disabledYear:[{type:a.Input}],showTimePicker:[{type:a.Input}],value:[{type:a.Input}],valueChange:[{type:a.Output}],panelMode:[{type:a.Input}],panelModeChange:[{type:a.Output}],chooseDecade:[{type:a.Output}],chooseYear:[{type:a.Output}],chooseMonth:[{type:a.Output}]},e}();var k=function(){function e(e){this.dateHelper=e,this.valueChange=new a.EventEmitter,this.prefixCls="ant-calendar",this.invalidInputClass=""}return e.prototype.ngOnInit=function(){this.autoFocus&&this.inputRef.nativeElement.focus()},e.prototype.onInputKeyup=function(e,n){void 0===n&&(n=!1);var t=this.checkValidInputDate(e);!t||this.disabledDate&&this.disabledDate(t.nativeDate)||(this.value=t,this.valueChange.emit({date:t,isEnter:n}))},e.prototype.toReadableInput=function(e){return e?this.dateHelper.format(e.nativeDate,this.format):""},e.prototype.checkValidInputDate=function(e){var n=e.target.value,t=new o.CandyDate(n);return this.invalidInputClass="",t.isValid()&&n===this.toReadableInput(t)?t:(this.invalidInputClass=this.prefixCls+"-input-invalid",null)},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"calendar-input",exportAs:"calendarInput",template:'<div class="{{ prefixCls }}-input-wrap">\n <div class="{{ prefixCls }}-date-input-wrap">\n <input\n class="{{ prefixCls }}-input {{ invalidInputClass }}"\n placeholder="{{ placeholder || locale.dateSelect }}"\n value="{{ toReadableInput(value) }}"\n (input)="onInputKeyup($event)"\n (keyup.enter)="onInputKeyup($event, true)"\n #inputElement\n />\n </div>\n <a class="{{ prefixCls }}-clear-btn" role="button" title="{{ locale.clear }}"></a>\n</div>\n'}]}],e.ctorParameters=function(){return[{type:l.DateHelperService}]},e.propDecorators={locale:[{type:a.Input}],format:[{type:a.Input}],placeholder:[{type:a.Input}],disabledDate:[{type:a.Input}],value:[{type:a.Input}],autoFocus:[{type:a.Input}],inputRef:[{type:a.ViewChild,args:["inputElement",{static:!0}]}],valueChange:[{type:a.Output}]},e}();var z=function(){function e(){this.okDisabled=!1,this.clickOk=new a.EventEmitter,this.prefixCls="ant-calendar"}return e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"ok-button",exportAs:"okButton",template:'<a\n class="{{ prefixCls }}-ok-btn {{ okDisabled ? prefixCls + \'-ok-btn-disabled\' : \'\' }}"\n role="button"\n (click)="okDisabled ? null : clickOk.emit()"\n >\n {{ locale.ok }}\n </a>'}]}],e.propDecorators={locale:[{type:a.Input}],okDisabled:[{type:a.Input}],clickOk:[{type:a.Output}]},e}();var b=function(){function e(){this.timePickerDisabled=!1,this.showTimePicker=!1,this.showTimePickerChange=new a.EventEmitter,this.prefixCls="ant-calendar"}return e.prototype.onClick=function(){this.showTimePicker=!this.showTimePicker,this.showTimePickerChange.emit(this.showTimePicker)},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"time-picker-button",exportAs:"timePickerButton",template:'<a\n class="{{ prefixCls }}-time-picker-btn {{ timePickerDisabled ? prefixCls + \'-time-picker-btn-disabled\' : \'\' }}"\n role="button"\n (click)="timePickerDisabled ? null : onClick()"\n>\n {{ showTimePicker ? locale.dateSelect : locale.timeSelect }}\n</a>'}]}],e.propDecorators={locale:[{type:a.Input}],timePickerDisabled:[{type:a.Input}],showTimePicker:[{type:a.Input}],showTimePickerChange:[{type:a.Output}]},e}();var O=function(){function e(e){this.dateHelper=e,this.hasTimePicker=!1,this.clickToday=new a.EventEmitter,this.prefixCls="ant-calendar",this.isDisabled=!1,this.now=new o.CandyDate}return e.prototype.ngOnChanges=function(e){if(e.disabledDate&&(this.isDisabled=this.disabledDate&&this.disabledDate(this.now.nativeDate)),e.locale){var n=this.locale.dateFormat;this.dateHelper.relyOnDatePipe&&(n=this.dateHelper.transCompatFormat(n)),this.title=this.dateHelper.format(this.now.nativeDate,n)}},e.prototype.onClickToday=function(){this.clickToday.emit(this.now.clone())},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"today-button",exportAs:"todayButton",template:'<a\n class="{{ prefixCls }}-today-btn {{ isDisabled ? prefixCls + \'-today-btn-disabled\' : \'\' }}"\n role="button"\n (click)="isDisabled ? null : onClickToday()"\n title="{{ title }}"\n>\n {{ hasTimePicker ? locale.now : locale.today }}\n</a>'}]}],e.ctorParameters=function(){return[{type:l.DateHelperService}]},e.propDecorators={locale:[{type:a.Input}],hasTimePicker:[{type:a.Input}],disabledDate:[{type:a.Input}],clickToday:[{type:a.Output}]},e}();var P=function(){function e(){this.valueChange=new a.EventEmitter,this.prefixCls="ant-calendar-decade-panel"}return Object.defineProperty(e.prototype,"startYear",{get:function(){return 100*parseInt(""+this.value.getYear()/100,10)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endYear",{get:function(){return this.startYear+99},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){e.value&&this.render()},e.prototype.previousCentury=function(){this.gotoYear(-100)},e.prototype.nextCentury=function(){this.gotoYear(100)},e.prototype.trackPanelDecade=function(e,n){return n.content},e.prototype.render=function(){this.value&&(this.panelDecades=this.makePanelDecades())},e.prototype.gotoYear=function(e){this.value=this.value.addYears(e),this.render()},e.prototype.chooseDecade=function(e){this.value=this.value.setYear(e),this.valueChange.emit(this.value)},e.prototype.makePanelDecades=function(){for(var e=this,n=[],t=this.value.getYear(),a=this.startYear,o=this.endYear,i=a-10,r=0,l=0;l<4;l++){n[l]=[];for(var s=function(s){var c,u=i+10*r,h=i+10*r+9,d=u+"-"+h,y=n[l][s]={content:d,title:d,isCurrent:t>=u&&t<=h,isLowerThanStart:h<a,isBiggerThanEnd:u>o,classMap:null,onClick:null};y.classMap=((c={})[p.prefixCls+"-cell"]=!0,c[p.prefixCls+"-selected-cell"]=y.isCurrent,c[p.prefixCls+"-last-century-cell"]=y.isLowerThanStart,c[p.prefixCls+"-next-century-cell"]=y.isBiggerThanEnd,c),y.isLowerThanStart?y.onClick=function(){return e.previousCentury()}:y.isBiggerThanEnd?y.onClick=function(){return e.nextCentury()}:y.onClick=function(){return e.chooseDecade(u)},r++},p=this,c=0;c<3;c++)s(c)}return n},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"decade-panel",exportAs:"decadePanel",template:'<div class="{{ prefixCls }}">\n <div class="{{ prefixCls }}-header">\n <a\n class="{{ prefixCls }}-prev-century-btn"\n role="button"\n (click)="previousCentury()"\n title="{{ locale.previousCentury }}"\n ></a>\n\n <div class="{{ prefixCls }}-century">\n {{ startYear }}-{{ endYear }}\n </div>\n <a\n class="{{ prefixCls }}-next-century-btn"\n role="button"\n (click)="nextCentury()"\n title="{{ locale.nextCentury }}"\n ></a>\n </div>\n <div class="{{ prefixCls }}-body">\n <table class="{{ prefixCls }}-table" cellSpacing="0" role="grid">\n <tbody class="{{ prefixCls }}-tbody">\n <tr *ngFor="let row of panelDecades" role="row">\n <td *ngFor="let cell of row; trackBy: trackPanelDecade"\n role="gridcell"\n title="{{ cell.title }}"\n (click)="cell.onClick()"\n [ngClass]="cell.classMap"\n >\n <a class="{{ prefixCls }}-decade">{{ cell.content }}</a>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>'}]}],e.ctorParameters=function(){return[]},e.propDecorators={locale:[{type:a.Input}],value:[{type:a.Input}],valueChange:[{type:a.Output}]},e}();var D=function(){function e(){this.valueChange=new a.EventEmitter,this.yearPanelShow=new a.EventEmitter,this.prefixCls="ant-calendar-month-panel"}return e.prototype.previousYear=function(){this.gotoYear(-1)},e.prototype.nextYear=function(){this.gotoYear(1)},e.prototype.gotoYear=function(e){this.value=this.value.addYears(e)},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"month-panel",exportAs:"monthPanel",template:'<div class="{{ prefixCls }}">\n <div>\n <div class="{{ prefixCls }}-header">\n <a\n class="{{ prefixCls }}-prev-year-btn"\n role="button"\n (click)="previousYear()"\n title="{{ locale.previousYear }}"\n ></a>\n\n <a\n class="{{ prefixCls }}-year-select"\n role="button"\n (click)="yearPanelShow.emit()"\n title="{{ locale.yearSelect }}"\n >\n <span class="{{ prefixCls }}-year-select-content">{{ value.getYear() }}</span>\n <span class="{{ prefixCls }}-year-select-arrow">x</span>\n </a>\n\n <a\n class="{{ prefixCls }}-next-year-btn"\n role="button"\n (click)="nextYear()"\n title="{{ locale.nextYear }}"\n ></a>\n </div>\n <div class="{{ prefixCls }}-body">\n <month-table [prefixCls]="\'ant-calendar\'" [disabledDate]="disabledDate" [value]="value" (valueChange)="valueChange.emit($event)"></month-table>\n </div>\n </div>\n</div>'}]}],e.propDecorators={locale:[{type:a.Input}],value:[{type:a.Input}],disabledDate:[{type:a.Input}],valueChange:[{type:a.Output}],yearPanelShow:[{type:a.Output}]},e}();
/**
* @license
* Copyright Alibaba.com All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/
var x={nzDisabledHours:function(){return[]},nzDisabledMinutes:function(){return[]},nzDisabledSeconds:function(){return[]}};function w(e,n){var t=n?n(e&&e.nativeDate):{};return t=y({},x,t)}function T(e,n,t){return(!n||!n(e.nativeDate))&&!(t&&!function(e,n){return function(e,n){var t=!1;if(e){var a=e.getHours(),o=e.getMinutes(),i=e.getSeconds();if(-1===n.nzDisabledHours().indexOf(a))if(-1===n.nzDisabledMinutes(a).indexOf(o))t=-1!==n.nzDisabledSeconds(a,o).indexOf(i);else t=!0;else t=!0}return!t}(e,w(e,n))}(e,t))}var S=function(){function e(){var e=this;this.panelModeChange=new a.EventEmitter,this.calendarChange=new a.EventEmitter,this.valueChange=new a.EventEmitter,this.inputChange=new a.EventEmitter,this.resultOk=new a.EventEmitter,this.closePicker=new a.EventEmitter,this.prefixCls="ant-calendar",this.showTimePicker=!1,this.partTypeMap={left:0,right:1},this.disabledStartTime=function(n){return e.disabledTime&&e.disabledTime(n,"start")},this.disabledEndTime=function(n){return e.disabledTime&&e.disabledTime(n,"end")}}return Object.defineProperty(e.prototype,"hasTimePicker",{get:function(){return!!this.showTime},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasFooter",{get:function(){return this.showToday||this.hasTimePicker||!!this.extraFooter||!!this.ranges},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.isRange&&["placeholder","panelMode","selectedValue","hoverValue"].forEach(function(n){return e.initialArray(n)})},e.prototype.ngOnChanges=function(e){this.isRange&&e.value&&(this.clearHoverValue(),this.selectedValue=this.value,this.valueForRangeShow=this.normalizeRangeValue(this.value)),(e.showTime||e.disabledTime)&&this.showTime&&this.buildTimeOptions(),e.panelMode&&this.hasTimePicker&&(this.showTimePicker="time"===this.panelMode)},e.prototype.onShowTimePickerChange=function(e){this.panelModeChange.emit(e?"time":"date")},e.prototype.onClickOk=function(){this.setValue(this.value),this.resultOk.emit()},e.prototype.onClickToday=function(e){this.isRange||(this.value=null,this.changeValueFromSelect(e)),this.closePickerPanel()},e.prototype.onDayHover=function(e){if(this.isRange&&this.selectedValue[0]&&!this.selectedValue[1]){var n=this.selectedValue[0];n.isBeforeDay(e)?this.hoverValue=[n,e]:this.hoverValue=[e,n]}},e.prototype.onPanelModeChange=function(e,n){this.isRange?this.panelMode[this.getPartTypeIndex(n)]=e:this.panelMode=e,this.panelModeChange.emit(this.panelMode)},e.prototype.onHeaderChange=function(e,n){this.isRange&&(this.valueForRangeShow[this.getPartTypeIndex(n)]=e,this.valueForRangeShow=this.normalizeRangeValue(this.valueForRangeShow))},e.prototype.onSelectTime=function(e,n){if(this.isRange){var t=this.cloneRangeDate(this.value),a=this.getPartTypeIndex(n);t[a]=this.overrideHms(e,t[a]),this.setValue(t)}else this.setValue(this.overrideHms(e,this.value||new o.CandyDate))},e.prototype.changeValueFromInput=function(e,n){var t=e.date,a=e.isEnter;if(this.isRange){var i="left"===n?[t,this.selectedValue[1]]:[this.selectedValue[0],t],r=this.isValidRange(i);r&&(i=o.sortRangeValue(i),this.valueForRangeShow=this.normalizeRangeValue(i)),this.selectedValue=this.cloneRangeDate(i),this.setValueFromInput(this.cloneRangeDate(i),a&&r)}else this.setValueFromInput(t,a)},e.prototype.changeValueFromSelect=function(e){if(this.isRange){var n=v(this.selectedValue,2),t=n[0],a=n[1];!t&&!a||t&&a?(this.hoverValue=this.selectedValue=[e],this.calendarChange.emit([e.clone()])):t&&!a&&(this.clearHoverValue(),this.setRangeValue("right",e),this.selectedValue=o.sortRangeValue(this.selectedValue),this.valueForRangeShow=this.normalizeRangeValue(this.selectedValue),this.setValue(this.cloneRangeDate(this.selectedValue)),this.calendarChange.emit(this.cloneRangeDate(this.selectedValue)))}else this.setValue(e)},e.prototype.enablePrevNext=function(e,n){if(this.isRange){var t=v(this.valueForRangeShow,2),a=t[0],o=t[1],i=!a.addMonths(1).isSame(o,"month");return!("left"===n&&"next"===e||"right"===n&&"prev"===e)||i}return!0},e.prototype.getPanelMode=function(e){return this.isRange?this.panelMode[this.getPartTypeIndex(e)]:this.panelMode},e.prototype.getValue=function(e){return this.isRange?this.value[this.getPartTypeIndex(e)]:this.value},e.prototype.getValueBySelector=function(e){return this.isRange?(this.showTimePicker?this.value:this.valueForRangeShow)[this.getPartTypeIndex(e)]:this.value},e.prototype.getPartTypeIndex=function(e){return this.partTypeMap[e]},e.prototype.getPlaceholder=function(e){return this.isRange?this.placeholder[this.getPartTypeIndex(e)]:this.placeholder},e.prototype.hasSelectedValue=function(){return this.selectedValue&&!!this.selectedValue[1]&&!!this.selectedValue[0]},e.prototype.isAllowedSelectedValue=function(){var e=this.selectedValue;return!!(e&&e[0]&&e[1])&&(T(e[0],this.disabledDate,this.disabledStartTime)&&T(e[1],this.disabledDate,this.disabledEndTime))},e.prototype.timePickerDisabled=function(){return!this.hasTimePicker||!!this.isRange&&(!this.hasSelectedValue()||!!this.hoverValue.length)},e.prototype.okDisabled=function(){return!this.hasTimePicker||(this.isRange?!this.isAllowedSelectedValue()||!this.hasSelectedValue()||!!this.hoverValue.length:!!this.value&&!T(this.value,this.disabledDate,this.disabledTime))},e.prototype.getTimeOptions=function(e){return this.showTime&&this.timeOptions?this.timeOptions instanceof Array?this.timeOptions[this.getPartTypeIndex(e)]:this.timeOptions:null},e.prototype.onClickPresetRange=function(e){var n="function"==typeof e?e():e;n&&(this.setValue([new o.CandyDate(n[0]),new o.CandyDate(n[1])]),this.resultOk.emit())},e.prototype.onPresetRangeMouseLeave=function(){this.clearHoverValue()},e.prototype.onHoverPresetRange=function(e){"function"!=typeof e&&(this.hoverValue=[new o.CandyDate(e[0]),new o.CandyDate(e[1])])},e.prototype.getObjectKeys=function(e){return e?Object.keys(e):[]},e.prototype.closePickerPanel=function(){this.closePicker.emit()},e.prototype.clearHoverValue=function(){this.hoverValue=[]},e.prototype.buildTimeOptions=function(){if(this.showTime){var e="object"==typeof this.showTime?this.showTime:{};if(this.isRange){var n=this.value;this.timeOptions=[this.overrideTimeOptions(e,n[0],"start"),this.overrideTimeOptions(e,n[1],"end")]}else this.timeOptions=this.overrideTimeOptions(e,this.value)}else this.timeOptions=null},e.prototype.overrideTimeOptions=function(e,n,t){var a;return a=t?"start"===t?this.disabledStartTime:this.disabledEndTime:this.disabledTime,y({},e,w(n,a))},e.prototype.setValueFromInput=function(e,n){void 0===n&&(n=!0),this.value=e,n&&this.inputChange.emit(this.value),this.buildTimeOptions()},e.prototype.setValue=function(e){this.value=e,this.valueChange.emit(this.value),this.buildTimeOptions()},e.prototype.overrideHms=function(e,n){return e&&n?n.setHms(e.getHours(),e.getMinutes(),e.getSeconds()):null},e.prototype.isValidRange=function(e){if(Array.isArray(e)){var n=v(e,2),t=n[0],a=n[1];return!(!t||!a)}return!1},e.prototype.normalizeRangeValue=function(e){var n=v(e,2),t=n[0],a=n[1],i=t||new o.CandyDate,r=a&&a.isSameMonth(i)?a.addMonths(1):a||i.addMonths(1);return[i,r]},e.prototype.setRangeValue=function(e,n){(this.selectedValue=this.cloneRangeDate(this.selectedValue))[this.getPartTypeIndex(e)]=n},e.prototype.cloneRangeDate=function(e){return[e[0]&&e[0].clone(),e[1]&&e[1].clone()]},e.prototype.initialArray=function(e){this[e]&&Array.isArray(this[e])||(this[e]=[])},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"date-range-popup",exportAs:"dateRangePopup",template:'<div\n class="{{ prefixCls }}-picker-container {{ dropdownClassName }} {{ prefixCls }}-picker-container-placement-bottomLeft"\n [ngStyle]="popupStyle">\n\n <div class="{{ prefixCls }} {{ showWeek ? prefixCls + \'-week-number\': \'\' }} {{ hasTimePicker ? prefixCls + \'-time\' : \'\' }} {{ isRange ? prefixCls + \'-range\' : \'\' }}" tabindex="0">\n <div class="{{ prefixCls }}-panel">\n <ng-container *ngIf="!isRange"> \x3c!-- Single ONLY --\x3e\n <ng-container *ngTemplateOutlet="tplCalendarInput"></ng-container>\n </ng-container>\n <div class="{{ prefixCls }}-date-panel">\n <ng-container *ngIf="isRange; else tplSinglePart">\n \x3c!-- Range Selectors --\x3e\n <ng-container *ngTemplateOutlet="tplRangePart; context: { partType: \'left\' }"></ng-container>\n <div class="ant-calendar-range-middle">~</div>\n <ng-container *ngTemplateOutlet="tplRangePart; context: { partType: \'right\' }"></ng-container>\n </ng-container>\n\n <ng-container *ngIf="!isRange"> \x3c!-- Single ONLY --\x3e\n <ng-container *ngTemplateOutlet="tplFooter"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf="isRange"> \x3c!-- Range ONLY --\x3e\n <ng-container *ngTemplateOutlet="tplFooter"></ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #tplCalendarInput let-partType="partType">\n <calendar-input\n [value]="getValue(partType)"\n (valueChange)="changeValueFromInput($event, partType)"\n [locale]="locale"\n [disabledDate]="disabledDate"\n [format]="format"\n [autoFocus]="partType !== \'right\'"\n [placeholder]="getPlaceholder(partType)"\n ></calendar-input>\n</ng-template>\n\n<ng-template #tplInnerPopup let-partType="partType">\n <inner-popup\n [showWeek]="showWeek"\n [locale]="locale"\n [showTimePicker]="hasTimePicker && showTimePicker"\n [timeOptions]="getTimeOptions(partType)"\n [panelMode]="getPanelMode(partType)"\n (panelModeChange)="onPanelModeChange($event, partType)"\n [value]="getValueBySelector(partType)"\n [disabledDate]="disabledDate"\n [dateRender]="dateRender"\n [selectedValue]="selectedValue"\n [hoverValue]="hoverValue"\n [enablePrev]="enablePrevNext(\'prev\', partType)"\n [enableNext]="enablePrevNext(\'next\', partType)"\n (dayHover)="onDayHover($event)"\n (selectDate)="changeValueFromSelect($event)"\n (selectTime)="onSelectTime($event, partType)"\n (headerChange)="onHeaderChange($event, partType)"\n ></inner-popup>\n</ng-template>\n\n<ng-template #tplFooter>\n <calendar-footer\n *ngIf="hasFooter"\n [locale]="locale"\n [showToday]="showToday"\n [hasTimePicker]="hasTimePicker"\n [timePickerDisabled]="timePickerDisabled()"\n [okDisabled]="okDisabled()"\n [extraFooter]="extraFooter"\n [rangeQuickSelector]="ranges ? tplRangeQuickSelector : null"\n [(showTimePicker)]="showTimePicker"\n (showTimePickerChange)="onShowTimePickerChange($event)"\n (clickOk)="onClickOk()"\n (clickToday)="onClickToday($event)"\n ></calendar-footer>\n</ng-template>\n\n\x3c!-- Single ONLY --\x3e\n<ng-template #tplSinglePart>\n <ng-container *ngTemplateOutlet="tplInnerPopup"></ng-container>\n</ng-template>\n\n\x3c!-- Range ONLY --\x3e\n<ng-template #tplRangePart let-partType="partType">\n <div class="{{ prefixCls }}-range-part {{ prefixCls }}-range-{{ partType }}">\n <ng-container *ngTemplateOutlet="tplCalendarInput; context: { partType: partType }"></ng-container>\n <div style="outline: none;">\n <ng-container *ngTemplateOutlet="tplInnerPopup; context: { partType: partType }"></ng-container>\n </div>\n </div>\n</ng-template>\n\n\x3c!-- Range ONLY: Range Quick Selector --\x3e\n<ng-template #tplRangeQuickSelector>\n <a *ngFor="let name of getObjectKeys(ranges)"\n (click)="onClickPresetRange(ranges[name])"\n (mouseenter)="onHoverPresetRange(ranges[name])"\n (mouseleave)="onPresetRangeMouseLeave()"\n >{{ name }}</a>\n</ng-template>'}]}],e.propDecorators={isRange:[{type:a.Input}],showWeek:[{type:a.Input}],locale:[{type:a.Input}],format:[{type:a.Input}],placeholder:[{type:a.Input}],disabledDate:[{type:a.Input}],disabledTime:[{type:a.Input}],showToday:[{type:a.Input}],showTime:[{type:a.Input}],extraFooter:[{type:a.Input}],ranges:[{type:a.Input}],dateRender:[{type:a.Input}],popupStyle:[{type:a.Input}],dropdownClassName:[{type:a.Input}],panelMode:[{type:a.Input}],value:[{type:a.Input}],panelModeChange:[{type:a.Output}],calendarChange:[{type:a.Output}],valueChange:[{type:a.Output}],inputChange:[{type:a.Output}],resultOk:[{type:a.Output}],closePicker:[{type:a.Output}]},e}();var I=function(){function e(){this.panelModeChange=new a.EventEmitter,this.headerChange=new a.EventEmitter,this.selectDate=new a.EventEmitter,this.selectTime=new a.EventEmitter,this.dayHover=new a.EventEmitter,this.prefixCls="ant-calendar"}return e.prototype.ngOnChanges=function(e){e.value&&!this.value&&(this.value=new o.CandyDate)},e.prototype.onSelectTime=function(e){this.selectTime.emit(new o.CandyDate(e))},e.prototype.onSelectDate=function(e){var n=e instanceof o.CandyDate?e:new o.CandyDate(e);this.selectDate.emit(n)},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"inner-popup",exportAs:"innerPopup",template:'<calendar-header\n [(panelMode)]="panelMode"\n (panelModeChange)="panelModeChange.emit($event)"\n [(value)]="value"\n (valueChange)="headerChange.emit($event)"\n [locale]="locale"\n [showTimePicker]="showTimePicker"\n [enablePrev]="enablePrev"\n [enableNext]="enableNext"\n></calendar-header>\n\n<ng-container *ngIf="showTimePicker && timeOptions">\n <nz-time-picker-panel\n [nzInDatePicker]="true"\n [ngModel]="value.nativeDate"\n (ngModelChange)="onSelectTime($event)"\n [format]="timeOptions.nzFormat"\n [nzHourStep]="timeOptions.nzHourStep"\n [nzMinuteStep]="timeOptions.nzMinuteStep"\n [nzSecondStep]="timeOptions.nzSecondStep"\n [nzDisabledHours]="timeOptions.nzDisabledHours"\n [nzDisabledMinutes]="timeOptions.nzDisabledMinutes"\n [nzDisabledSeconds]="timeOptions.nzDisabledSeconds"\n [nzHideDisabledOptions]="timeOptions.nzHideDisabledOptions"\n [nzDefaultOpenValue]="timeOptions.nzDefaultOpenValue"\n [nzUse12Hours]="timeOptions.nzUse12Hours"\n [nzAddOn]="timeOptions.nzAddOn"\n ></nz-time-picker-panel>\n</ng-container>\n\n<div class="{{ prefixCls }}-body">\n <date-table\n [locale]="locale"\n [showWeek]="showWeek"\n [value]="value"\n (valueChange)="onSelectDate($event)"\n showWeekNumber="false"\n [disabledDate]="disabledDate"\n [dateCellRender]="dateRender"\n [selectedValue]="selectedValue"\n [hoverValue]="hoverValue"\n (dayHover)="dayHover.emit($event)"\n ></date-table>\n</div>'}]}],e.ctorParameters=function(){return[]},e.propDecorators={showWeek:[{type:a.Input}],locale:[{type:a.Input}],showTimePicker:[{type:a.Input}],timeOptions:[{type:a.Input}],enablePrev:[{type:a.Input}],enableNext:[{type:a.Input}],disabledDate:[{type:a.Input}],dateRender:[{type:a.Input}],selectedValue:[{type:a.Input}],hoverValue:[{type:a.Input}],panelMode:[{type:a.Input}],panelModeChange:[{type:a.Output}],value:[{type:a.Input}],headerChange:[{type:a.Output}],selectDate:[{type:a.Output}],selectTime:[{type:a.Output}],dayHover:[{type:a.Output}]},e}();var R=function(){function e(){this.valueChange=new a.EventEmitter,this.decadePanelShow=new a.EventEmitter,this.prefixCls="ant-calendar-year-panel"}return Object.defineProperty(e.prototype,"currentYear",{get:function(){return this.value.getYear()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startYear",{get:function(){return 10*parseInt(""+this.currentYear/10,10)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endYear",{get:function(){return this.startYear+9},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(e){(e.value||e.disabledDate)&&this.render()},e.prototype.previousDecade=function(){this.gotoYear(-10)},e.prototype.nextDecade=function(){this.gotoYear(10)},e.prototype.trackPanelYear=function(e,n){return n.content},e.prototype.render=function(){this.value&&(this.panelYears=this.makePanelYears())},e.prototype.gotoYear=function(e){this.value=this.value.addYears(e),this.render()},e.prototype.chooseYear=function(e){this.value=this.value.setYear(e),this.valueChange.emit(this.value),this.render()},e.prototype.makePanelYears=function(){for(var e=this,n=[],t=this.currentYear,a=this.startYear,o=this.endYear,i=a-1,r=0,l=0;l<4;l++){n[l]=[];for(var s=function(s){var c,u=i+r,h=String(u),d=!!p.disabledDate&&p.disabledDate(p.value.setYear(u).nativeDate),y=n[l][s]={disabled:d,content:h,year:u,title:h,isCurrent:u===t,isLowerThanStart:u<a,isBiggerThanEnd:u>o,classMap:null,onClick:null};y.classMap=((c={})[p.prefixCls+"-cell"]=!0,c[p.prefixCls+"-selected-cell"]=y.isCurrent,c[p.prefixCls+"-cell-disabled"]=d,c[p.prefixCls+"-last-decade-cell"]=y.isLowerThanStart,c[p.prefixCls+"-next-decade-cell"]=y.isBiggerThanEnd,c),y.isLowerThanStart?y.onClick=function(){return e.previousDecade()}:y.isBiggerThanEnd?y.onClick=function(){return e.nextDecade()}:y.onClick=function(){return e.chooseYear(y.year)},r++},p=this,c=0;c<3;c++)s(c)}return n},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,selector:"year-panel",exportAs:"yearPanel",template:'<div class="{{ prefixCls }}">\n <div>\n <div class="{{ prefixCls }}-header">\n <a\n class="{{ prefixCls }}-prev-decade-btn"\n role="button"\n (click)="previousDecade()"\n title="{{ locale.previousDecade }}"\n ></a>\n <a\n class="{{ prefixCls }}-decade-select"\n role="button"\n (click)="decadePanelShow.emit()"\n title="{{ locale.decadeSelect }}"\n >\n <span class="{{ prefixCls }}-decade-select-content">\n {{ startYear }}-{{ endYear }}\n </span>\n <span class="{{ prefixCls }}-decade-select-arrow">x</span>\n </a>\n\n <a class="{{ prefixCls }}-next-decade-btn" (click)="nextDecade()" title="{{ locale.nextDecade }}" role="button"></a>\n </div>\n <div class="{{ prefixCls }}-body">\n <table class="{{ prefixCls }}-table" cellSpacing="0" role="grid">\n <tbody class="{{ prefixCls }}-tbody">\n <tr *ngFor="let row of panelYears" role="row">\n <td *ngFor="let yearCell of row; trackBy: trackPanelYear"\n role="gridcell"\n title="{{ yearCell.title }}"\n (click)="yearCell.disabled ? null : yearCell.onClick()"\n [ngClass]="yearCell.classMap"\n >\n <a class="{{ prefixCls }}-year">{{ yearCell.content }}</a>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</div>',styles:["\n .ant-calendar-year-panel-cell-disabled .ant-calendar-year-panel-year,\n .ant-calendar-year-panel-cell-disabled .ant-calendar-year-panel-year:hover {\n color: rgba(0, 0, 0, 0.25);\n background: #f5f5f5;\n cursor: not-allowed;\n }\n "]}]}],e.ctorParameters=function(){return[]},e.propDecorators={locale:[{type:a.Input}],value:[{type:a.Input}],valueChange:[{type:a.Output}],disabledDate:[{type:a.Input}],decadePanelShow:[{type:a.Output}]},e}();var V=function(){function e(){}return e.decorators=[{type:a.NgModule,args:[{imports:[t.CommonModule,r.FormsModule,l.NzI18nModule,s.NzTimePickerModule,p.NzCalendarModule],exports:[C,k,f,z,b,O,R,D,P,I,S],declarations:[C,k,f,z,b,O,R,D,P,I,S]}]}],e}(),M=function(){function e(e,n){this.dateHelper=e,this.changeDetector=n,this.noAnimation=!1,this.isRange=!1,this.open=void 0,this.valueChange=new a.EventEmitter,this.openChange=new a.EventEmitter,this.prefixCls="ant-calendar",this.animationOpenState=!1,this.overlayOpen=!1,this.overlayOffsetY=0,this.overlayOffsetX=-2,this.overlayPositions=[{originX:"start",originY:"top",overlayX:"start",overlayY:"top"},{originX:"start",originY:"bottom",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"bottom"}],this.dropdownAnimation="bottom",this.currentPositionX="start",this.currentPositionY="top"}return Object.defineProperty(e.prototype,"realOpenState",{get:function(){return this.isOpenHandledByUser()?!!this.open:this.overlayOpen},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.autoFocus&&this.focus()},e.prototype.focus=function(){this.isRange?this.pickerInput.nativeElement.querySelector("input:first-child").focus():this.pickerInput.nativeElement.focus()},e.prototype.showOverlay=function(){var e=this;this.realOpenState||(this.overlayOpen=!0,this.openChange.emit(this.overlayOpen),setTimeout(function(){e.cdkConnectedOverlay&&e.cdkConnectedOverlay.overlayRef&&e.cdkConnectedOverlay.overlayRef.updatePosition()}))},e.prototype.hideOverlay=function(){this.realOpenState&&(this.overlayOpen=!1,this.openChange.emit(this.overlayOpen),this.focus())},e.prototype.onClickInputBox=function(){this.disabled||this.isOpenHandledByUser()||this.showOverlay()},e.prototype.onClickBackdrop=function(){this.hideOverlay()},e.prototype.onOverlayDetach=function(){this.hideOverlay()},e.prototype.onPositionChange=function(e){this.dropdownAnimation="top"===e.connectionPair.originY?"bottom":"top",this.currentPositionX=e.connectionPair.originX,this.currentPositionY=e.connectionPair.originY,this.changeDetector.detectChanges()},e.prototype.onClickClear=function(e){e.preventDefault(),e.stopPropagation(),this.value=this.isRange?[]:null,this.valueChange.emit(this.value)},e.prototype.getReadableValue=function(e){var n;return(n=this.isRange?this.value[this.getPartTypeIndex(e)]:this.value)?this.dateHelper.format(n.nativeDate,this.format):null},e.prototype.getPartTypeIndex=function(e){return{left:0,right:1}[e]},e.prototype.getPlaceholder=function(e){return this.isRange?this.placeholder[this.getPartTypeIndex(e)]:this.placeholder},e.prototype.isEmptyValue=function(e){return null===e||(this.isRange?!e||!Array.isArray(e)||e.every(function(e){return!e}):!e)},e.prototype.isOpenHandledByUser=function(){return void 0!==this.open},e.prototype.animationStart=function(){this.realOpenState&&(this.animationOpenState=!0)},e.prototype.animationDone=function(){this.animationOpenState=this.realOpenState},e.decorators=[{type:a.Component,args:[{encapsulation:a.ViewEncapsulation.None,selector:"nz-picker",exportAs:"nzPicker",template:'<span\n cdkOverlayOrigin\n #origin="cdkOverlayOrigin"\n class="{{ prefixCls }}-picker {{ size ? prefixCls + \'-picker-\' + size : \'\' }} {{ className }}"\n [ngStyle]="style"\n tabindex="0"\n (click)="onClickInputBox()"\n (keyup.enter)="onClickInputBox()"\n>\n \x3c!-- Content of single picker --\x3e\n <ng-container *ngIf="!isRange">\n <input\n #pickerInput\n class="{{ prefixCls }}-picker-input ant-input"\n [class.ant-input-lg]="size === \'large\'"\n [class.ant-input-sm]="size === \'small\'"\n [class.ant-input-disabled]="disabled"\n\n [disabled]="disabled"\n readonly\n value="{{ getReadableValue() }}"\n placeholder="{{ getPlaceholder() }}"\n />\n <ng-container *ngTemplateOutlet="tplRightRest"></ng-container>\n </ng-container>\n\n \x3c!-- Content of range picker --\x3e\n <ng-container *ngIf="isRange">\n <span\n #pickerInput\n class="{{ prefixCls }}-picker-input ant-input"\n [class.ant-input-lg]="size === \'large\'"\n [class.ant-input-sm]="size === \'small\'"\n [class.ant-input-disabled]="disabled"\n >\n <ng-container *ngTemplateOutlet="tplRangeInput; context: { partType: \'left\' }"></ng-container>\n <span class="{{ prefixCls }}-range-picker-separator"> ~ </span>\n <ng-container *ngTemplateOutlet="tplRangeInput; context: { partType: \'right\' }"></ng-container>\n <ng-container *ngTemplateOutlet="tplRightRest"></ng-container>\n </span>\n </ng-container>\n</span>\n\n\x3c!-- Input for Range ONLY --\x3e\n<ng-template #tplRangeInput let-partType="partType">\n <input\n class="{{ prefixCls }}-range-picker-input"\n [disabled]="disabled"\n readonly\n value="{{ getReadableValue(partType) }}"\n placeholder="{{ getPlaceholder(partType) }}"\n />\n</ng-template>\n\n\x3c!-- Right operator icons --\x3e\n<ng-template #tplRightRest>\n <i\n nz-icon\n nzType="close-circle"\n nzTheme="fill"\n *ngIf="!disabled && !isEmptyValue(value) && allowClear"\n class="{{ prefixCls }}-picker-clear"\n (click)="onClickClear($event)"\n ></i>\n <span class="{{ prefixCls }}-picker-icon">\n <i nz-icon nzType="calendar"></i>\n </span>\n</ng-template>\n\n\x3c!-- Overlay --\x3e\n<ng-template\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]="origin"\n [cdkConnectedOverlayOpen]="realOpenState"\n [cdkConnectedOverlayHasBackdrop]="!isOpenHandledByUser()"\n [cdkConnectedOverlayPositions]="overlayPositions"\n (positionChange)="onPositionChange($event)"\n (backdropClick)="onClickBackdrop()"\n (detach)="onOverlayDetach()"\n>\n <div\n [nzNoAnimation]="noAnimation"\n [@slideMotion]="dropdownAnimation"\n (@slideMotion.start)="animationStart()"\n (@slideMotion.done)="animationDone()"\n style="position: relative;"\n [style.left]="currentPositionX === \'start\' ? \'-2px\' : \'2px\'"\n [style.top]="currentPositionY === \'top\' ? \'-2px\' : \'2px\'"\n > \x3c!-- Compatible for overlay that not support offset dynamically and immediately --\x3e\n <ng-content></ng-content>\n </div>\n</ng-template>\n',animations:[o.slideMotion],changeDetection:a.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:l.DateHelperService},{type:a.ChangeDetectorRef}]},e.propDecorators={noAnimation:[{type:a.Input}],isRange:[{type:a.Input}],open:[{type:a.Input}],disabled:[{type:a.Input}],placeholder:[{type:a.Input}],allowClear:[{type:a.Input}],autoFocus:[{type:a.Input}],className:[{type:a.Input}],format:[{type:a.Input}],size:[{type:a.Input}],style:[{type:a.Input}],value:[{type:a.Input}],valueChange:[{type:a.Output}],openChange:[{type:a.Output}],origin:[{type:a.ViewChild,args:["origin",{static:!1}]}],cdkConnectedOverlay:[{type:a.ViewChild,args:[n.CdkConnectedOverlay,{static:!1}]}],pickerInput:[{type:a.ViewChild,args:["pickerInput",{static:!1}]}]},e}();var E={position:"relative"},F=function(){function e(e,n,t,o){this.i18n=e,this.cdr=n,this.dateHelper=t,this.noAnimation=o,this.nzAllowClear=!0,this.nzAutoFocus=!1,this.nzDisabled=!1,this.nzPopupStyle=E,this.nzOnOpenChange=new a.EventEmitter,this.isRange=!1,this.destroyed$=new c.Subject,this.isCustomPlaceHolder=!1,this.onChangeFn=function(){},this.onTouchedFn=function(){}}return Object.defineProperty(e.prototype,"realOpenState",{get:function(){return this.picker.animationOpenState},enumerable:!0,configurable:!0}),e.prototype.initValue=function(){this.nzValue=this.isRange?[]:null},e.prototype.ngOnInit=function(){var e=this;this.nzLocale||this.i18n.localeChange.pipe(u.takeUntil(this.destroyed$)).subscribe(function(){return e.setLocale()}),this.initValue()},e.prototype.ngOnChanges=function(e){e.nzPopupStyle&&(this.nzPopupStyle=this.nzPopupStyle?y({},this.nzPopupStyle,E):E),e.nzPlaceHolder&&e.nzPlaceHolder.firstChange&&void 0!==this.nzPlaceHolder&&(this.isCustomPlaceHolder=!0),e.nzLocale&&this.setDefaultPlaceHolder()},e.prototype.ngOnDestroy=function(){this.destroyed$.next(),this.destroyed$.complete()},e.prototype.closeOverlay=function(){this.picker.hideOverlay()},e.prototype.onValueChange=function(e){if(this.nzValue=e,this.isRange){var n=this.nzValue;n.length?this.onChangeFn([n[0].nativeDate,n[1].nativeDate]):this.onChangeFn([])}else this.nzValue?this.onChangeFn(this.nzValue.nativeDate):this.onChangeFn(null);this.onTouchedFn()},e.prototype.onOpenChange=function(e){this.nzOnOpenChange.emit(e)},e.prototype.writeValue=function(e){this.setValue(e),this.cdr.markForCheck()},e.prototype.registerOnChange=function(e){this.onChangeFn=e},e.prototype.registerOnTouched=function(e){this.onTouchedFn=e},e.prototype.setDisabledState=function(e){this.nzDisabled=e,this.cdr.markForCheck()},e.prototype.setLocale=function(){this.nzLocale=this.i18n.getLocaleData("DatePicker",{}),this.setDefaultPlaceHolder(),this.cdr.markForCheck()},e.prototype.setDefaultPlaceHolder=function(){!this.isCustomPlaceHolder&&this.nzLocale&&(this.nzPlaceHolder=this.isRange?this.nzLocale.lang.rangePlaceholder:this.nzLocale.lang.placeholder)},e.prototype.setValue=function(e){this.isRange?this.nzValue=e?e.map(function(e){return new o.CandyDate(e)}):[]:this.nzValue=e?new o.CandyDate(e):null},e.propDecorators={nzAllowClear:[{type:a.Input}],nzAutoFocus:[{type:a.Input}],nzDisabled:[{type:a.Input}],nzOpen:[{type:a.Input}],nzClassName:[{type:a.Input}],nzDisabledDate:[{type:a.Input}],nzLocale:[{type:a.Input}],nzPlaceHolder:[{type:a.Input}],nzPopupStyle:[{type:a.Input}],nzDropdownClassName:[{type:a.Input}],nzSize:[{type:a.Input}],nzStyle:[{type:a.Input}],nzFormat:[{type:a.Input}],nzValue:[{type:a.Input}],nzOnOpenChange:[{type:a.Output}],picker:[{type:a.ViewChild,args:[M,{static:!0}]}]},g([o.InputBoolean(),m("design:type",Boolean)],e.prototype,"nzAllowClear",void 0),g([o.InputBoolean(),m("design:type",Boolean)],e.prototype,"nzAutoFocus",void 0),g([o.InputBoolean(),m("design:type",Boolean)],e.prototype,"nzDisabled",void 0),g([o.InputBoolean(),m("design:type",Boolean)],e.prototype,"nzOpen",void 0),e}();var N=function(e){function n(n,t,o,i){var r=e.call(this,n,t,o,i)||this;return r.showWeek=!1,r.nzShowToday=!0,r.nzOnPanelChange=new a.EventEmitter,r.nzOnCalendarChange=new a.EventEmitter,r.nzOnOk=new a.EventEmitter,r}return d(n,e),Object.defineProperty(n.prototype,"nzShowTime",{get:function(){return this._showTime},set:function(e){this._showTime="object"==typeof e?e:o.toBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"realShowToday",{get:function(){return!this.isRange&&this.nzShowToday},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){e.prototype.ngOnInit.call(this),this.nzFormat||(this.showWeek?this.nzFormat=this.dateHelper.relyOnDatePipe?"yyyy-ww":"YYYY-WW":this.dateHelper.relyOnDatePipe?this.nzFormat=this.nzShowTime?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd":this.nzFormat=this.nzShowTime?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD")},n.prototype.ngOnChanges=function(n){e.prototype.ngOnChanges.call(this,n),n.nzRenderExtraFooter&&(this.extraFooter=o.valueFunctionProp(this.nzRenderExtraFooter)),(n.nzShowTime||n.nzStyle)&&thi