UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

30 lines (28 loc) 81.7 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/cdk/overlay"),require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("ng-zorro-antd/button"),require("ng-zorro-antd/core/no-animation"),require("ng-zorro-antd/core/outlet"),require("ng-zorro-antd/core/overlay"),require("ng-zorro-antd/icon"),require("ng-zorro-antd/time-picker"),require("ng-zorro-antd/core/time"),require("ng-zorro-antd/core/util"),require("ng-zorro-antd/i18n"),require("ng-zorro-antd/core/logger"),require("rxjs"),require("rxjs/operators"),require("ng-zorro-antd/core/config"),require("ng-zorro-antd/core/animation")):"function"==typeof define&&define.amd?define("ng-zorro-antd/date-picker",["exports","@angular/cdk/overlay","@angular/common","@angular/core","@angular/forms","ng-zorro-antd/button","ng-zorro-antd/core/no-animation","ng-zorro-antd/core/outlet","ng-zorro-antd/core/overlay","ng-zorro-antd/icon","ng-zorro-antd/time-picker","ng-zorro-antd/core/time","ng-zorro-antd/core/util","ng-zorro-antd/i18n","ng-zorro-antd/core/logger","rxjs","rxjs/operators","ng-zorro-antd/core/config","ng-zorro-antd/core/animation"],t):t(((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.forms,e["ng-zorro-antd"].button,e["ng-zorro-antd"].core["no-animation"],e["ng-zorro-antd"].core.outlet,e["ng-zorro-antd"].core.overlay,e["ng-zorro-antd"].icon,e["ng-zorro-antd"]["time-picker"],e["ng-zorro-antd"].core.time,e["ng-zorro-antd"].core.util,e["ng-zorro-antd"].i18n,e["ng-zorro-antd"].core.logger,e.rxjs,e.rxjs.operators,e["ng-zorro-antd"].core.config,e["ng-zorro-antd"].core.animation)}(this,(function(e,t,n,i,a,r,o,l,s,c,p,u,d,h,g,v,y,f,m){"use strict"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var C=function(e,t){return(C=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function k(e,t){function n(){this.constructor=e}C(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var b=function(){return(b=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function w(e,t,n,i){var a,r=arguments.length,o=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function D(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function S(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,a,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(e){a={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o} /** * @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 P={nzDisabledHours:function(){return[]},nzDisabledMinutes:function(){return[]},nzDisabledSeconds:function(){return[]}};function x(e,t){var n=t?t(e&&e.nativeDate):{};return n=b(b({},P),n)}function O(e,t){var n=!1;if(e){var i=e.getHours(),a=e.getMinutes(),r=e.getSeconds();if(-1===t.nzDisabledHours().indexOf(i))if(-1===t.nzDisabledMinutes(i).indexOf(a))n=-1!==t.nzDisabledSeconds(i,a).indexOf(r);else n=!0;else n=!0}return!n}function z(e,t){return O(e,x(e,t))}function R(e,t,n){return!!e&&((!t||!t(e.nativeDate))&&!(n&&!z(e,n)))} /** * @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 */function T(e){return e&&e.replace(/Y/g,"y").replace(/D/g,"d")}var I=function(){function e(e){this.dateHelper=e,this.showToday=!1,this.hasTimePicker=!1,this.isRange=!1,this.okDisabled=!1,this.clickOk=new i.EventEmitter,this.clickToday=new i.EventEmitter,this.prefixCls="ant-picker",this.isTemplateRef=d.isTemplateRef,this.isNonEmptyString=d.isNonEmptyString,this.now=new u.CandyDate}return e.prototype.ngOnChanges=function(e){if(e.disabledDate&&(this.isTodayDisabled=this.disabledDate&&this.disabledDate(this.now.nativeDate)),e.locale){var t=T(this.locale.dateFormat);this.todayTitle=this.dateHelper.format(this.now.nativeDate,t)}},e.prototype.onClickToday=function(){this.clickToday.emit(this.now.clone())},e.decorators=[{type:i.Component,args:[{encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,selector:"calendar-footer",exportAs:"calendarFooter",template:'\n <div class="{{ prefixCls }}-footer">\n <div *ngIf="extraFooter" class="{{ prefixCls }}-footer-extra">\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 <a\n *ngIf="showToday && !hasTimePicker"\n class="{{ prefixCls }}-today-btn {{ isTodayDisabled ? prefixCls + \'-today-btn-disabled\' : \'\' }}"\n role="button"\n (click)="isTodayDisabled ? null : onClickToday()"\n title="{{ todayTitle }}"\n >\n {{ locale.today }}\n </a>\n <ul *ngIf="hasTimePicker || rangeQuickSelector" class="{{ prefixCls }}-ranges">\n <ng-container *ngTemplateOutlet="rangeQuickSelector"></ng-container>\n <li *ngIf="hasTimePicker && !isRange" class="{{ prefixCls }}-now">\n <a class="{{ prefixCls }}-now-btn" (click)="isTodayDisabled ? null : onClickToday()">\n {{ locale.now }}\n </a>\n </li>\n <li *ngIf="hasTimePicker" class="{{ prefixCls }}-ok">\n <button\n nz-button\n type="button"\n nzType="primary"\n nzSize="small"\n [disabled]="okDisabled"\n (click)="okDisabled ? null : clickOk.emit()"\n >\n {{ locale.ok }}\n </button>\n </li>\n </ul>\n </div>\n '}]}],e.ctorParameters=function(){return[{type:h.DateHelperService}]},e.propDecorators={locale:[{type:i.Input}],showToday:[{type:i.Input}],hasTimePicker:[{type:i.Input}],isRange:[{type:i.Input}],okDisabled:[{type:i.Input}],disabledDate:[{type:i.Input}],extraFooter:[{type:i.Input}],rangeQuickSelector:[{type:i.Input}],clickOk:[{type:i.Output}],clickToday:[{type:i.Output}]},e}();var M=function(){function e(){this.activeInput="left",this.arrowPositionStyle={},this.isRange=!1,this.valueChange$=new v.ReplaySubject(1),this.emitValue$=new v.Subject,this.inputPartChange$=new v.Subject}return e.prototype.initValue=function(){this.isRange?(this.setActiveDate([]),this.value=this.initialValue=[]):this.value=this.initialValue=null},e.prototype.hasValue=function(e){return void 0===e&&(e=this.value),Array.isArray(e)?!!e[0]&&!!e[1]:!!e},e.prototype.makeValue=function(e){return this.isRange?e?e.map((function(e){return new u.CandyDate(e)})):[]:e?new u.CandyDate(e):null},e.prototype.setActiveDate=function(e,t){void 0===t&&(t=!1),this.isRange?this.activeDate=t?u.normalizeRangeValue(e):e:this.activeDate=u.cloneDate(e)},e.prototype.setValue=function(e){this.value=e,this.valueChange$.next(this.value)},e.prototype.getActiveIndex=function(e){return void 0===e&&(e=this.activeInput),{left:0,right:1}[e]},e.prototype.ngOnDestroy=function(){this.valueChange$.complete(),this.emitValue$.complete(),this.inputPartChange$.complete()},e.decorators=[{type:i.Injectable}],e}();var V=function(){function e(e,t){var n=this;this.datePickerService=e,this.cdr=t,this.panelModeChange=new i.EventEmitter,this.calendarChange=new i.EventEmitter,this.resultOk=new i.EventEmitter,this.prefixCls="ant-picker",this.endPanelMode="date",this.hoverValue=[],this.destroy$=new v.Subject,this.disabledStartTime=function(e){return n.disabledTime&&n.disabledTime(e,"start")},this.disabledEndTime=function(e){return n.disabledTime&&n.disabledTime(e,"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.datePickerService.valueChange$.pipe(y.takeUntil(this.destroy$)).subscribe((function(){e.initActiveDate(),e.cdr.markForCheck()}))},e.prototype.ngOnChanges=function(e){(e.showTime||e.disabledTime)&&this.showTime&&this.buildTimeOptions(),e.panelMode&&(this.endPanelMode=this.panelMode)},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.initActiveDate=function(){var e=this.datePickerService.hasValue()?this.datePickerService.value:this.datePickerService.makeValue(this.defaultPickerValue);this.datePickerService.setActiveDate(e,!this.showTime)},e.prototype.onClickOk=function(){var e="left"===this.datePickerService.activeInput?"right":"left",t=this.datePickerService.value;this.isAllowed(t,!0)?this.resultOk.emit():this.isRange&&this.isOneAllowed(t)?this.datePickerService.inputPartChange$.next(e):this.datePickerService.inputPartChange$.next()},e.prototype.onClickToday=function(e){this.changeValueFromSelect(e,!this.showTime)},e.prototype.onDayHover=function(e){if(this.isRange){var t={left:1,right:0}[this.datePickerService.activeInput],n=this.datePickerService.value[t];n&&(n.isBeforeDay(e)?this.hoverValue=[n,e]:this.hoverValue=[e,n])}},e.prototype.onPanelModeChange=function(e,t){if(this.isRange){var n=this.datePickerService.getActiveIndex(t);this.panelMode=0===n?[e,this.panelMode[1]]:[this.panelMode[0],e]}else this.panelMode=e;this.panelModeChange.emit(this.panelMode)},e.prototype.onActiveDateChange=function(e,t){this.isRange?this.datePickerService.activeDate="left"===t?[e,e.addMonths(1)]:[e.addMonths(-1),e]:this.datePickerService.activeDate=e},e.prototype.onSelectTime=function(e,t){if(this.isRange){var n=u.cloneDate(this.datePickerService.value),i=this.datePickerService.getActiveIndex(t);n[i]=this.overrideHms(e,n[i]),this.datePickerService.setValue(n)}else{n=this.overrideHms(e,this.datePickerService.value);this.datePickerService.setValue(n)}this.datePickerService.inputPartChange$.next(),this.buildTimeOptions()},e.prototype.changeValueFromSelect=function(e,t){if(void 0===t&&(t=!0),this.isRange){var n=u.cloneDate(this.datePickerService.value),i=void 0;if("left"===this.datePickerService.activeInput?(i="right",n[0]=e):(i="left",n[1]=e),n=u.sortRangeValue(n),this.hoverValue=n,this.datePickerService.setValue(n),this.datePickerService.setActiveDate(n,!this.showTime),this.datePickerService.inputPartChange$.next(),!this.isAllowed(n))return;t&&(this.isBothAllowed(n)?(this.calendarChange.emit(n),this.clearHoverValue(),this.datePickerService.emitValue$.next()):(this.calendarChange.emit([e.clone()]),this.datePickerService.inputPartChange$.next(i)))}else{if(this.datePickerService.setValue(e),this.datePickerService.setActiveDate(e,!this.showTime),this.datePickerService.inputPartChange$.next(),!this.isAllowed(e))return;t&&this.datePickerService.emitValue$.next()}},e.prototype.getPanelMode=function(e,t){return this.isRange?e[this.datePickerService.getActiveIndex(t)]:e},e.prototype.getValue=function(e){return this.isRange?(this.datePickerService.value||[])[this.datePickerService.getActiveIndex(e)]:this.datePickerService.value},e.prototype.getActiveDate=function(e){return this.isRange?this.datePickerService.activeDate[this.datePickerService.getActiveIndex(e)]:this.datePickerService.activeDate},e.prototype.isOneAllowed=function(e){var t=this.datePickerService.getActiveIndex(),n=[this.disabledStartTime,this.disabledEndTime];return R(e[t],this.disabledDate,n[t])},e.prototype.isBothAllowed=function(e){return R(e[0],this.disabledDate,this.disabledStartTime)&&R(e[1],this.disabledDate,this.disabledEndTime)},e.prototype.isAllowed=function(e,t){return void 0===t&&(t=!1),this.isRange?t?this.isBothAllowed(e):this.isOneAllowed(e):R(e,this.disabledDate,this.disabledTime)},e.prototype.getTimeOptions=function(e){return this.showTime&&this.timeOptions?this.timeOptions instanceof Array?this.timeOptions[this.datePickerService.getActiveIndex(e)]:this.timeOptions:null},e.prototype.onClickPresetRange=function(e){var t="function"==typeof e?e():e;t&&(this.datePickerService.setValue([new u.CandyDate(t[0]),new u.CandyDate(t[1])]),this.resultOk.emit())},e.prototype.onPresetRangeMouseLeave=function(){this.clearHoverValue()},e.prototype.onHoverPresetRange=function(e){"function"!=typeof e&&(this.hoverValue=[new u.CandyDate(e[0]),new u.CandyDate(e[1])])},e.prototype.getObjectKeys=function(e){return e?Object.keys(e):[]},e.prototype.show=function(e){return!(this.showTime&&this.isRange&&this.datePickerService.activeInput!==e)},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 t=this.datePickerService.value;this.timeOptions=[this.overrideTimeOptions(e,t[0],"start"),this.overrideTimeOptions(e,t[1],"end")]}else this.timeOptions=this.overrideTimeOptions(e,this.datePickerService.value)}else this.timeOptions=null},e.prototype.overrideTimeOptions=function(e,t,n){var i;return i=n?"start"===n?this.disabledStartTime:this.disabledEndTime:this.disabledTime,b(b({},e),x(t,i))},e.prototype.overrideHms=function(e,t){return e=e||new u.CandyDate,(t=t||new u.CandyDate).setHms(e.getHours(),e.getMinutes(),e.getSeconds())},e.decorators=[{type:i.Component,args:[{encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,selector:"date-range-popup",exportAs:"dateRangePopup",template:'\n <ng-container *ngIf="isRange; else singlePanel">\n <div class="{{ prefixCls }}-range-wrapper {{ prefixCls }}-date-range-wrapper">\n <div class="{{ prefixCls }}-range-arrow" [ngStyle]="datePickerService?.arrowPositionStyle"></div>\n <div class="{{ prefixCls }}-panel-container">\n <div class="{{ prefixCls }}-panels">\n <ng-container *ngTemplateOutlet="tplRangePart; context: { partType: \'left\' }"></ng-container>\n <ng-container *ngTemplateOutlet="tplRangePart; context: { partType: \'right\' }"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet="tplFooter"></ng-container>\n </div>\n </div>\n </ng-container>\n <ng-template #singlePanel>\n <div\n class="{{ prefixCls }}-panel-container {{ showWeek ? prefixCls + \'-week-number\' : \'\' }} {{\n hasTimePicker ? prefixCls + \'-time\' : \'\'\n }} {{ isRange ? prefixCls + \'-range\' : \'\' }}"\n >\n <div class="{{ prefixCls }}-panel" tabindex="-1">\n \x3c!-- Single ONLY --\x3e\n <ng-container *ngTemplateOutlet="tplInnerPopup"></ng-container>\n <ng-container *ngTemplateOutlet="tplFooter"></ng-container>\n </div>\n </div>\n </ng-template>\n\n <ng-template #tplInnerPopup let-partType="partType">\n <inner-popup\n *ngIf="show(partType)"\n [showWeek]="showWeek"\n [endPanelMode]="getPanelMode(endPanelMode, partType)"\n [partType]="partType"\n [locale]="locale"\n [showTimePicker]="hasTimePicker"\n [timeOptions]="getTimeOptions(partType)"\n [panelMode]="getPanelMode(panelMode, partType)"\n (panelModeChange)="onPanelModeChange($event, partType)"\n [activeDate]="getActiveDate(partType)"\n [value]="getValue(partType)"\n [disabledDate]="disabledDate"\n [dateRender]="dateRender"\n [selectedValue]="datePickerService?.value"\n [hoverValue]="hoverValue"\n (dayHover)="onDayHover($event)"\n (selectDate)="changeValueFromSelect($event, !showTime)"\n (selectTime)="onSelectTime($event, partType)"\n (headerChange)="onActiveDateChange($event, partType)"\n ></inner-popup>\n </ng-template>\n\n <ng-template #tplFooter>\n <calendar-footer\n *ngIf="hasFooter"\n [locale]="locale"\n [isRange]="isRange"\n [showToday]="showToday"\n [hasTimePicker]="hasTimePicker"\n [okDisabled]="!isAllowed(datePickerService?.value)"\n [extraFooter]="extraFooter"\n [rangeQuickSelector]="ranges ? tplRangeQuickSelector : null"\n (clickOk)="onClickOk()"\n (clickToday)="onClickToday($event)"\n ></calendar-footer>\n </ng-template>\n\n <ng-template #tplRangePart let-partType="partType">\n <div class="{{ prefixCls }}-panel">\n <ng-container *ngTemplateOutlet="tplInnerPopup; context: { partType: partType }"></ng-container>\n </div>\n </ng-template>\n\n \x3c!-- Range ONLY: Range Quick Selector --\x3e\n <ng-template #tplRangeQuickSelector>\n <li\n *ngFor="let name of getObjectKeys(ranges)"\n class="{{ prefixCls }}-preset"\n (click)="onClickPresetRange(ranges[name])"\n (mouseenter)="onHoverPresetRange(ranges[name])"\n (mouseleave)="onPresetRangeMouseLeave()"\n >\n <span class="ant-tag ant-tag-blue">{{ name }}</span>\n </li>\n </ng-template>\n '}]}],e.ctorParameters=function(){return[{type:M},{type:i.ChangeDetectorRef}]},e.propDecorators={isRange:[{type:i.Input}],showWeek:[{type:i.Input}],locale:[{type:i.Input}],format:[{type:i.Input}],placeholder:[{type:i.Input}],disabledDate:[{type:i.Input}],disabledTime:[{type:i.Input}],showToday:[{type:i.Input}],showTime:[{type:i.Input}],extraFooter:[{type:i.Input}],ranges:[{type:i.Input}],dateRender:[{type:i.Input}],panelMode:[{type:i.Input}],defaultPickerValue:[{type:i.Input}],panelModeChange:[{type:i.Output}],calendarChange:[{type:i.Output}],resultOk:[{type:i.Output}]},e}();var E=function(){function e(e,n,a,r,o){this.elementRef=e,this.dateHelper=n,this.changeDetector=a,this.datePickerService=r,this.noAnimation=!1,this.isRange=!1,this.open=void 0,this.focusChange=new i.EventEmitter,this.valueChange=new i.EventEmitter,this.openChange=new i.EventEmitter,this.destroy$=new v.Subject,this.prefixCls="ant-picker",this.activeBarStyle={position:"absolute"},this.animationOpenState=!1,this.overlayOpen=!1,this.overlayPositions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}],this.currentPositionX="start",this.currentPositionY="bottom",this.document=o,this.origin=new t.CdkOverlayOrigin(this.elementRef),this.updateInputValue()}return Object.defineProperty(e.prototype,"realOpenState",{get:function(){return this.isOpenHandledByUser()?!!this.open:this.overlayOpen},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.inputSize=Math.max(10,this.format.length)+2,this.datePickerService.valueChange$.pipe(y.takeUntil(this.destroy$)).subscribe((function(){e.updateInputValue(),e.changeDetector.markForCheck()}))},e.prototype.ngAfterViewInit=function(){var e=this;this.autoFocus&&this.focus(),this.isRange&&(this.resetInputWidthAndArrowLeft(),v.fromEvent(window,"resize").pipe(y.takeUntil(this.destroy$)).subscribe((function(){e.resetInputWidthAndArrowLeft()}))),this.datePickerService.inputPartChange$.pipe(y.takeUntil(this.destroy$)).subscribe((function(t){var n;t&&(e.datePickerService.activeInput=t),e.datePickerService.arrowPositionStyle={left:"left"===e.datePickerService.activeInput?"0px":e.arrowLeft+"px"},e.activeBarStyle=b(b(b({},e.activeBarStyle),e.datePickerService.arrowPositionStyle),{width:e.inputWidth+"px"}),e.document.activeElement!==e.getInput(e.datePickerService.activeInput)&&e.focus(),null===(n=e.panel)||void 0===n||n.cdr.markForCheck(),e.changeDetector.markForCheck()}))},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.ngOnChanges=function(e){e.open&&this.animationStart()},e.prototype.resetInputWidthAndArrowLeft=function(){var e,t;this.inputWidth=(null===(e=this.rangePickerInputs)||void 0===e?void 0:e.first.nativeElement.offsetWidth)||0,this.arrowLeft=this.inputWidth+(null===(t=this.separatorElement)||void 0===t?void 0:t.nativeElement.offsetWidth)||0},e.prototype.getInput=function(e){return this.isRange?"left"===e?this.rangePickerInputs.first.nativeElement:this.rangePickerInputs.last.nativeElement:this.pickerInput.nativeElement},e.prototype.focus=function(){this.getInput(this.datePickerService.activeInput).focus()},e.prototype.onFocus=function(e){e&&this.datePickerService.inputPartChange$.next(e),this.focusChange.emit(!0)},e.prototype.onBlur=function(){this.focusChange.emit(!1)},e.prototype.showOverlay=function(){var e=this;this.realOpenState||(this.overlayOpen=!0,this.animationStart(),this.focus(),this.openChange.emit(!0),setTimeout((function(){e.cdkConnectedOverlay&&e.cdkConnectedOverlay.overlayRef&&e.cdkConnectedOverlay.overlayRef.updatePosition()})))},e.prototype.hideOverlay=function(){this.realOpenState&&(this.overlayOpen=!1,this.openChange.emit(!1),this.focus())},e.prototype.showClear=function(){return!this.disabled&&!this.isEmptyValue(this.datePickerService.value)&&this.allowClear},e.prototype.onClickInputBox=function(e,t){e.stopPropagation(),this.disabled||this.isOpenHandledByUser()||this.showOverlay(),this.onFocus(t)},e.prototype.onClickBackdrop=function(){this.panel.isAllowed(this.datePickerService.value,!0)?(this.updateInputValue(),this.datePickerService.emitValue$.next()):(this.datePickerService.setValue(this.datePickerService.initialValue),this.hideOverlay())},e.prototype.onOverlayDetach=function(){this.hideOverlay()},e.prototype.onOverlayKeydown=function(e){"Escape"===e.key&&this.datePickerService.setValue(this.datePickerService.initialValue)},e.prototype.onPositionChange=function(e){this.currentPositionX=e.connectionPair.originX,this.currentPositionY=e.connectionPair.originY,this.changeDetector.detectChanges()},e.prototype.onClickClear=function(e){e.preventDefault(),e.stopPropagation(),this.datePickerService.setValue(this.isRange?[]:null),this.datePickerService.emitValue$.next()},e.prototype.updateInputValue=function(){var e=this,t=this.datePickerService.value;this.isRange?this.inputValue=t?t.map((function(t){return e.formatValue(t)})):["",""]:this.inputValue=this.formatValue(t)},e.prototype.formatValue=function(e){return this.dateHelper.format(e&&e.nativeDate,this.format)},e.prototype.onInputKeyup=function(e,t){if(void 0===t&&(t=!1),!t||this.realOpenState){var n=this.checkValidInputDate(e.target);this.panel&&n&&this.panel.changeValueFromSelect(n,t)}else this.showOverlay()},e.prototype.checkValidInputDate=function(e){var t=e.value,n=new u.CandyDate(this.dateHelper.parseDate(t,this.format));return n.isValid()&&t===this.dateHelper.format(n.nativeDate,this.format)?n:null},e.prototype.getPlaceholder=function(e){return this.isRange?this.placeholder[this.datePickerService.getActiveIndex(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.realOpenState||(this.animationOpenState=!1,this.changeDetector.markForCheck())},e.decorators=[{type:i.Component,args:[{encapsulation:i.ViewEncapsulation.None,selector:"[nz-picker]",exportAs:"nzPicker",template:'\n \x3c!-- Content of single picker --\x3e\n <div *ngIf="!isRange" class="{{ prefixCls }}-input">\n <input\n #pickerInput\n [class.ant-input-disabled]="disabled"\n [disabled]="disabled"\n [(ngModel)]="inputValue"\n placeholder="{{ getPlaceholder() }}"\n [size]="inputSize"\n (focus)="onFocus()"\n (blur)="onBlur()"\n (input)="onInputKeyup($event)"\n (keyup.enter)="onInputKeyup($event, true)"\n />\n <ng-container *ngTemplateOutlet="tplRightRest"></ng-container>\n </div>\n\n \x3c!-- Content of range picker --\x3e\n <ng-container *ngIf="isRange">\n <div class="{{ prefixCls }}-input">\n <ng-container *ngTemplateOutlet="tplRangeInput; context: { partType: \'left\' }"></ng-container>\n </div>\n <div #separatorElement class="{{ prefixCls }}-range-separator">\n <span class="{{ prefixCls }}-separator">\n <ng-container *ngIf="separator; else defaultSeparator">{{ separator }}</ng-container>\n </span>\n <ng-template #defaultSeparator>\n <i nz-icon nzType="swap-right" nzTheme="outline"></i>\n </ng-template>\n </div>\n <div class="{{ prefixCls }}-input">\n <ng-container *ngTemplateOutlet="tplRangeInput; context: { partType: \'right\' }"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet="tplRightRest"></ng-container>\n </ng-container>\n \x3c!-- Input for Range ONLY --\x3e\n <ng-template #tplRangeInput let-partType="partType">\n <input\n #rangePickerInput\n [disabled]="disabled"\n [size]="inputSize"\n (click)="onClickInputBox($event, partType)"\n (blur)="onBlur()"\n (input)="onInputKeyup($event, false)"\n (focus)="onFocus(partType)"\n (keyup.enter)="onInputKeyup($event, true)"\n [(ngModel)]="inputValue[datePickerService?.getActiveIndex(partType)]"\n placeholder="{{ getPlaceholder(partType) }}"\n />\n </ng-template>\n\n \x3c!-- Right operator icons --\x3e\n <ng-template #tplRightRest>\n <div class="{{ prefixCls }}-active-bar" [ngStyle]="activeBarStyle"></div>\n <span *ngIf="showClear()" class="{{ prefixCls }}-clear" (click)="onClickClear($event)">\n <i nz-icon nzType="close-circle" nzTheme="fill"></i>\n </span>\n <span class="{{ prefixCls }}-suffix">\n <ng-container *nzStringTemplateOutlet="suffixIcon">\n <i nz-icon [nzType]="suffixIcon"></i>\n </ng-container>\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 (overlayKeydown)="onOverlayKeydown($event)"\n >\n <div\n [nzNoAnimation]="noAnimation"\n [@slideMotion]="currentPositionY"\n (@slideMotion.done)="animationDone()"\n style="position: relative;"\n [style.left]="currentPositionX === \'start\' ? \'-12px\' : \'12px\'"\n [style.top]="currentPositionY === \'top\' ? \'-8px\' : \'8px\'"\n >\n <div\n class="{{ prefixCls }}-dropdown {{ dropdownClassName }}"\n [class.ant-picker-dropdown-placement-bottomLeft]="currentPositionY === \'bottom\' && currentPositionX === \'start\'"\n [class.ant-picker-dropdown-placement-topLeft]="currentPositionY === \'top\' && currentPositionX === \'start\'"\n [class.ant-picker-dropdown-placement-bottomRight]="currentPositionY === \'bottom\' && currentPositionX === \'end\'"\n [class.ant-picker-dropdown-placement-topRight]="currentPositionY === \'top\' && currentPositionX === \'end\'"\n [class.ant-picker-dropdown-range]="isRange"\n [ngStyle]="popupStyle"\n >\n \x3c!-- Compatible for overlay that not support offset dynamically and immediately --\x3e\n <ng-content></ng-content>\n </div>\n </div>\n </ng-template>\n ',animations:[m.slideMotion],changeDetection:i.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:i.ElementRef},{type:h.DateHelperService},{type:i.ChangeDetectorRef},{type:M},{type:void 0,decorators:[{type:i.Inject,args:[n.DOCUMENT]}]}]},e.propDecorators={noAnimation:[{type:i.Input}],isRange:[{type:i.Input}],open:[{type:i.Input}],disabled:[{type:i.Input}],placeholder:[{type:i.Input}],allowClear:[{type:i.Input}],autoFocus:[{type:i.Input}],format:[{type:i.Input}],separator:[{type:i.Input}],popupStyle:[{type:i.Input}],dropdownClassName:[{type:i.Input}],suffixIcon:[{type:i.Input}],focusChange:[{type:i.Output}],valueChange:[{type:i.Output}],openChange:[{type:i.Output}],cdkConnectedOverlay:[{type:i.ViewChild,args:[t.CdkConnectedOverlay,{static:!1}]}],separatorElement:[{type:i.ViewChild,args:["separatorElement",{static:!1}]}],pickerInput:[{type:i.ViewChild,args:["pickerInput",{static:!1}]}],rangePickerInputs:[{type:i.ViewChildren,args:["rangePickerInput"]}],panel:[{type:i.ContentChild,args:[V]}]},e}();var N={position:"relative"},H=function(){function e(e,t,n,a,r,o,l,s){this.nzConfigService=e,this.datePickerService=t,this.i18n=n,this.cdr=a,this.renderer=r,this.elementRef=o,this.dateHelper=l,this.noAnimation=s,this.isRange=!1,this.showWeek=!1,this.focused=!1,this.destroyed$=new v.Subject,this.isCustomPlaceHolder=!1,this.nzAllowClear=!0,this.nzAutoFocus=!1,this.nzDisabled=!1,this.nzPopupStyle=N,this.nzShowToday=!0,this.nzMode="date",this.nzDefaultPickerValue=null,this.nzOnPanelChange=new i.EventEmitter,this.nzOnCalendarChange=new i.EventEmitter,this.nzOnOk=new i.EventEmitter,this.nzOnOpenChange=new i.EventEmitter,this.onChangeFn=function(){},this.onTouchedFn=function(){}}return Object.defineProperty(e.prototype,"nzShowTime",{get:function(){return this.showTime},set:function(e){this.showTime="object"==typeof e?e:d.toBoolean(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"realOpenState",{get:function(){return this.picker.animationOpenState},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.nzLocale||this.i18n.localeChange.pipe(y.takeUntil(this.destroyed$)).subscribe((function(){return e.setLocale()})),this.datePickerService.isRange=this.isRange,this.datePickerService.initValue(),this.datePickerService.emitValue$.pipe(y.takeUntil(this.destroyed$)).subscribe((function(t){var n=e.datePickerService.value;if(e.datePickerService.initialValue=u.cloneDate(n),e.isRange){var i=n;i.length?e.onChangeFn([i[0].nativeDate,i[1].nativeDate]):e.onChangeFn([])}else n?e.onChangeFn(n.nativeDate):e.onChangeFn(null);e.onTouchedFn(),e.picker.hideOverlay()})),this.nzFormat||(this.showWeek?this.nzFormat="yyyy-ww":this.nzFormat=this.nzShowTime?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd")},e.prototype.ngOnChanges=function(e){e.nzPopupStyle&&(this.nzPopupStyle=this.nzPopupStyle?b(b({},this.nzPopupStyle),N):N),e.nzPlaceHolder&&e.nzPlaceHolder.firstChange&&void 0!==this.nzPlaceHolder&&(this.isCustomPlaceHolder=!0),e.nzLocale&&this.setDefaultPlaceHolder(),e.nzRenderExtraFooter&&(this.extraFooter=d.valueFunctionProp(this.nzRenderExtraFooter)),e.nzStyle&&g.warnDeprecation("'nzStyle' in DatePicker is going to be removed in 10.0.0. Please use CSS style attribute like <nz-date-picker style=\"...\"></nz-date-picker> instead."),e.nzClassName&&g.warnDeprecation("'nzClassName' in DatePicker is going to be removed in 10.0.0. Please use CSS class attribute like <nz-date-picker class=\"...\"></nz-date-picker> instead."),e.nzMode&&this.setPanelMode()},e.prototype.ngOnDestroy=function(){this.destroyed$.next(),this.destroyed$.complete()},e.prototype.setPanelMode=function(){this.nzMode||(this.nzMode=this.isRange?["date","date"]:"date")},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){var t=this.datePickerService.makeValue(e);this.datePickerService.setValue(t),this.datePickerService.initialValue=t},Object.defineProperty(e.prototype,"realShowToday",{get:function(){return"date"===this.nzMode&&this.nzShowToday},enumerable:!0,configurable:!0}),e.prototype.onFocusChange=function(e){this.focused=e,this.focused?this.renderer.addClass(this.elementRef.nativeElement,"ant-picker-focused"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-picker-focused")},e.prototype.onPanelModeChange=function(e){this.nzOnPanelChange.emit(e)},e.prototype.onCalendarChange=function(e){if(this.isRange){var t=e.filter((function(e){return e instanceof u.CandyDate})).map((function(e){return e.nativeDate}));this.nzOnCalendarChange.emit(t)}},e.prototype.onResultOk=function(){if(this.isRange){var e=this.datePickerService.value;e.length?this.nzOnOk.emit([e[0].nativeDate,e[1].nativeDate]):this.nzOnOk.emit([])}else this.datePickerService.value?this.nzOnOk.emit(this.datePickerService.value.nativeDate):this.nzOnOk.emit(null);this.datePickerService.emitValue$.next()},e.decorators=[{type:i.Component,args:[{encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,selector:"nz-date-picker,nz-week-picker,nz-month-picker,nz-year-picker,nz-range-picker",exportAs:"nzDatePicker",template:'\n <div\n nz-picker\n [isRange]="isRange"\n [open]="nzOpen"\n [separator]="nzSeparator"\n [disabled]="nzDisabled"\n [format]="nzFormat"\n [allowClear]="nzAllowClear"\n [autoFocus]="nzAutoFocus"\n [placeholder]="nzPlaceHolder"\n [ngClass]="nzClassName"\n style="display: inherit; align-items: center; width: 100%;"\n [ngStyle]="nzStyle"\n [dropdownClassName]="nzDropdownClassName"\n [popupStyle]="nzPopupStyle"\n [noAnimation]="noAnimation?.nzNoAnimation"\n [suffixIcon]="nzSuffixIcon"\n (openChange)="onOpenChange($event)"\n (focusChange)="onFocusChange($event)"\n >\n <date-range-popup\n *ngIf="realOpenState"\n [isRange]="isRange"\n [defaultPickerValue]="nzDefaultPickerValue"\n [showWeek]="showWeek"\n [panelMode]="nzMode"\n (panelModeChange)="onPanelModeChange($event)"\n (calendarChange)="onCalendarChange($event)"\n [locale]="nzLocale?.lang"\n [showToday]="realShowToday"\n [showTime]="nzShowTime"\n [format]="nzFormat"\n [dateRender]="nzDateRender"\n [disabledDate]="nzDisabledDate"\n [disabledTime]="nzDisabledTime"\n [placeholder]="nzPlaceHolder"\n [extraFooter]="extraFooter"\n [ranges]="nzRanges"\n (resultOk)="onResultOk()"\n ></date-range-popup>\n </div>\n ',host:{"[class.ant-picker]":"true","[class.ant-picker-range]":"isRange","[class.ant-picker-large]":"nzSize === 'large'","[class.ant-picker-small]":"nzSize === 'small'","[class.ant-picker-disabled]":"nzDisabled","(click)":"picker.onClickInputBox($event)"},providers:[M,{provide:a.NG_VALUE_ACCESSOR,multi:!0,useExisting:i.forwardRef((function(){return e}))}]}]}],e.ctorParameters=function(){return[{type:f.NzConfigService},{type:M},{type:h.NzI18nService},{type:i.ChangeDetectorRef},{type:i.Renderer2},{type:i.ElementRef},{type:h.DateHelperService},{type:o.NzNoAnimationDirective,decorators:[{type:i.Host},{type:i.Optional}]}]},e.propDecorators={nzAllowClear:[{type:i.Input}],nzAutoFocus:[{type:i.Input}],nzDisabled:[{type:i.Input}],nzOpen:[{type:i.Input}],nzClassName:[{type:i.Input}],nzDisabledDate:[{type:i.Input}],nzLocale:[{type:i.Input}],nzPlaceHolder:[{type:i.Input}],nzPopupStyle:[{type:i.Input}],nzDropdownClassName:[{type:i.Input}],nzSize:[{type:i.Input}],nzStyle:[{type:i.Input}],nzFormat:[{type:i.Input}],nzDateRender:[{type:i.Input}],nzDisabledTime:[{type:i.Input}],nzRenderExtraFooter:[{type:i.Input}],nzShowToday:[{type:i.Input}],nzMode:[{type:i.Input}],nzRanges:[{type:i.Input}],nzDefaultPickerValue:[{type:i.Input}],nzSeparator:[{type:i.Input}],nzSuffixIcon:[{type:i.Input}],nzOnPanelChange:[{type:i.Output}],nzOnCalendarChange:[{type:i.Output}],nzOnOk:[{type:i.Output}],nzOnOpenChange:[{type:i.Output}],picker:[{type:i.ViewChild,args:[E,{static:!0}]}],nzShowTime:[{type:i.Input}]},w([d.InputBoolean(),D("design:type",Boolean)],e.prototype,"nzAllowClear",void 0),w([d.InputBoolean(),D("design:type",Boolean)],e.prototype,"nzAutoFocus",void 0),w([d.InputBoolean(),D("design:type",Boolean)],e.prototype,"nzDisabled",void 0),w([d.InputBoolean(),D("design:type",Boolean)],e.prototype,"nzOpen",void 0),w([d.InputBoolean(),D("design:type",Boolean)],e.prototype,"nzShowToday",void 0),w([f.WithConfig("datePicker"),D("design:type",String)],e.prototype,"nzSeparator",void 0),w([f.WithConfig("datePicker","calendar"),D("design:type",Object)],e.prototype,"nzSuffixIcon",void 0),e}();var A=function(){function e(){this.panelModeChange=new i.EventEmitter,this.headerChange=new i.EventEmitter,this.selectDate=new i.EventEmitter,this.selectTime=new i.EventEmitter,this.dayHover=new i.EventEmitter,this.prefixCls="ant-picker"}return e.prototype.enablePrevNext=function(e,t){return!(!this.showTimePicker&&t===this.endPanelMode&&("left"===this.partType&&"next"===e||"right"===this.partType&&"prev"===e))},e.prototype.onSelectTime=function(e){this.selectTime.emit(new u.CandyDate(e))},e.prototype.onSelectDate=function(e){var t=e instanceof u.CandyDate?e:new u.CandyDate(e),n=this.timeOptions&&this.timeOptions.nzDefaultOpenValue;!this.value&&n&&t.setHms(n.getHours(),n.getMinutes(),n.getSeconds()),this.selectDate.emit(t)},e.prototype.onChooseMonth=function(e){this.activeDate=this.activeDate.setMonth(e.getMonth()),"month"===this.endPanelMode?(this.value=e,this.selectDate.emit(e)):(this.headerChange.emit(e),this.panelModeChange.emit(this.endPanelMode))},e.prototype.onChooseYear=function(e){this.activeDate=this.activeDate.setYear(e.getYear()),"year"===this.endPanelMode?(this.value=e,this.selectDate.emit(e)):(this.headerChange.emit(e),this.panelModeChange.emit(this.endPanelMode))},e.prototype.onChooseDecade=function(e){this.activeDate=this.activeDate.setYear(e.getYear()),"decade"===this.endPanelMode?(this.value=e,this.selectDate.emit(e)):(this.headerChange.emit(e),this.panelModeChange.emit("year"))},e.prototype.ngOnChanges=function(e){e.activeDate&&!e.activeDate.currentValue&&(this.activeDate=new u.CandyDate),e.panelMode&&"time"===e.panelMode.currentValue&&(this.panelMode="date")},e.decorators=[{type:i.Component,args:[{encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,selector:"inner-popup",exportAs:"innerPopup",template:'\n <div [class.ant-picker-datetime-panel]="showTimePicker">\n <div class="{{ prefixCls }}-{{ panelMode }}-panel">\n <ng-container [ngSwitch]="panelMode">\n <ng-container *ngSwitchCase="\'decade\'">\n <decade-header\n [(value)]="activeDate"\n [locale]="locale"\n [showSuperPreBtn]="enablePrevNext(\'prev\', \'decade\')"\n [showSuperNextBtn]="enablePrevNext(\'next\', \'decade\')"\n [showNextBtn]="false"\n [showPreBtn]="false"\n (panelModeChange)="panelModeChange.emit($event)"\n (valueChange)="headerChange.emit($event)"\n >\n </decade-header>\n <div class="{{ prefixCls }}-body">\n <decade-table\n [showWeek]="showWeek"\n [activeDate]="activeDate"\n [value]="value"\n (valueChange)="onChooseDecade($event)"\n [disabledDate]="disabledDate"\n [cellRender]="dateRender"\n ></decade-table>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'year\'">\n <year-header\n [(value)]="activeDate"\n [locale]="locale"\n [showSuperPreBtn]="enablePrevNext(\'prev\', \'year\')"\n [showSuperNextBtn]="enablePrevNext(\'next\', \'year\')"\n [showNextBtn]="false"\n [showPreBtn]="false"\n (panelModeChange)="panelModeChange.emit($event)"\n (valueChange)="headerChange.emit($event)"\n >\n </year-header>\n <div class="{{ prefixCls }}-body">\n <year-table\n [showWeek]="showWeek"\n [activeDate]="activeDate"\n [value]="value"\n (valueChange)="onChooseYear($event)"\n [disabledDate]="disabledDate"\n [cellRender]="dateRender"\n ></year-table>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase="\'month\'">\n <month-header\n [(value)]="activeDate"\n [locale]="locale"\n [showNextBtn]="false"\n [showPreBtn]="false"\n (panelModeChange)="panelModeChange.emit($event)"\n (valueChange)="headerChange.emit($event)"\n >\n </month-header>\n <div class="{{ prefixCls }}-body">\n <month-table\n [showWeek]="showWeek"\n [value]="value"\n [activeDate]="activeDate"\n [disabledDate]="disabledDate"\n [cellRender]="dateRender"\n (dayHover)="dayHover.emit($event)"\n (valueChange)="onChooseMonth($event)"\n ></month-table>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <date-header\n [(value)]="activeDate"\n [locale]="locale"\n [showSuperPreBtn]="enablePrevNext(\'prev\', \'date\')"\n [showSuperNextBtn]="enablePrevNext(\'next\', \'date\')"\n [showPreBtn]="enablePrevNext(\'prev\', \'date\')"\n [showNextBtn]="enablePrevNext(\'next\', \'date\')"\n (panelModeChange)="panelModeChange.emit($event)"\n (valueChange)="headerChange.emit($event)"\n >\n </date-header>\n <div class="{{ prefixCls }}-body">\n <date-table\n [locale]="locale"\n [showWeek]="showWeek"\n [value]="value"\n [activeDate]="activeDate"\n (valueChange)="onSelectDate($event)"\n [disabledDate]="disabledDate"\n [cellRender]="dateRender"\n [selectedValue]="selectedValue"\n [hoverValue]="hoverValue"\n (dayHover)="dayHover.emit($event)"\n ></date-table>\n </div>\n </ng-container>\n </ng-container>\n </div>\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 \x3c!-- use [opened] to trigger time panel `initPosition()` --\x3e\n </ng-container>\n </div>\n '}]}],e.propDecorators={activeDate:[{type:i.Input}],endPanelMode:[{type:i.Input}],panelMode:[{type:i.Input}],showWeek:[{type:i.Input}],locale:[{type:i.Input}],showTimePicker:[{type:i.Input}],timeOptions:[{type:i.Input}],disabledDate:[{type:i.Input}],dateRender:[{type:i.Input}],selectedValue:[{type:i.Input}],hoverValue:[{type:i.Input}],value:[{type:i.Input}],partType:[{type:i.Input}],panelModeChange:[{type:i.Output}],headerChange:[{type:i.Output}],selectDate:[{type:i.Output}],selectTime:[{type:i.Output}],dayHover:[{type:i.Output}]},e}();var B=function(){function e(){this.prefixCls="ant-picker-header",this.selectors=[],this.showSuperPreBtn=!0,this.showSuperNextBtn=!0,this.showPreBtn=!0,this.showNextBtn=!0,this.panelModeChange=new i.EventEmitter,this.valueChange=new i.EventEmitter}return e.prototype.superPreviousTitle=function(){return this.locale.previousYear},e.prototype.previousTitle=function(){return this.locale.previousMonth},e.prototype.superNextTitle=function(){return this.locale.nextYear},e.prototype.nextTitle=function(){return this.locale.nextMonth},e.prototype.superPrevious=function(){this.changeValue(this.value.addYears(-1))},e.prototype.superNext=function(){this.changeValue(this.value.addYears(1))},e.prototype.previous=function(){this.changeValue(this.value.addMonths(-1))},e.prototype.next=function(){this.changeValue(this.value.addMonths(1))},e.prototype.changeValue=function(e){this.value!==e&&(this.value=e,this.valueChange.emit(this.value),this.render())},e.prototype.changeMode=function(e){this.panelModeChange.emit(e)},e.prototype.render=function(){this.value&&(this.selectors=this.getSelectors())},e.prototype.ngOnInit=function(){this.value||(this.value=new u.CandyDate),this.selectors=this.getSelectors()},e.prototype.ngOnChanges=function(e){(e.value||e.locale)&&this.render()},e.propDecorators={value:[{type:i.Input}],locale:[{type:i.Input}],showSuperPreBtn:[{type:i.Input}],showSuperNextBtn:[{type:i.Input}],showPreBtn:[{type:i.Input}],showNextBtn:[{type:i.Input}],panelModeChange:[{type:i.Output}],valueChange:[{type:i.Output}]},e}();var F=function(e){function t(t){var n=e.call(this)||this;return n.dateHelper=t,n}return k(t,e),t.prototype.getSelectors=function(){var e=this;return[{className:this.prefixCls+"-year-btn",title:this.locale.yearSelect,onClick:function(){return e.changeMode("year")},label:this.dateHelper.format(this.value.nativeDate,T(this.locale.yearFormat))},{className:this.prefixCls+"-month-btn",title:this.locale.monthSelect,onClick:function(){return e.changeMode("month")},label:this.dateHelper.format(this.value.nativeDate,this.locale.monthFormat||"MMM")}]},t.decorators=[{type:i.Component,args:[{encapsulation:i.ViewEncapsulation.None,changeDetection:i.ChangeDetectionStrategy.OnPush,selector:"date-header",exportAs:"dateHeader",template:'<div class="{{ prefixCls }}">\n <button\n [style.visibility]="showSuperPreBtn ? \'visible\' : \'hidden\'"\n class="{{ prefixCls }}-super-prev-btn"\n role="button"\n tabindex="-1"\n title="{{ superPreviousTitle() }}"\n (click)="superPrevious()"\n >\n <span class="ant-picker-super-prev-icon"></span>\n </button>\n <button\n [style.visibility]="showPreBtn ? \'visible\' : \'hidden\'"\n class="{{ prefixCls }}-prev-btn"\n role="button"\n title="{{ previousTitle() }}"\n tabindex="-1"\n (click)="previous()"\n >\n <span class="ant-picker-prev-icon"></span>\n </button>\n\n <div class="{{ prefixCls }}-view">\n <ng-container *ngFor="let selector of selectors">\n <button\n class="{{ selector.className }}"\n role="button"\n type="button"\n title="{{ selector.title || null }}"\n (click)="selector.onClick()"\n >\n {{ selector.label }}\n </button>\n </ng-container>\n </div>\n <button\n [style.visibility]="showNextBtn ? \'visible\' : \'hidden\'"\n class="{{ prefixCls }}-next-btn"\n role="button"\n tabindex="-1"\n title="{{ nextTitle() }}"\n (click)="next()"\n >\n <span class="ant-picker-next-icon"></span>\n </button>\n <button\n [style.visibility]="showSuperNextBtn ? \'visible\' : \'hidden\'"\n class="{{ prefixCls }}-super-next-btn"\n role="button"\n tabindex="-1"\n title="{{ superNextTitle() }}"\n (click)="superNext()"\n >\n <span class="ant-picker-super-next-icon"></span>\n </button>\n</div>\n'}]}],t.ctorParameters=function(){return[{type:h.DateHelperService}]},t}(B);var $=function(){function e(){this.isTemplateRef=d.isTemplateRef,this.isNonEmptyString=d.isNonEmptyString,this.headRow=[],this.bodyRows=[],this.MAX_ROW=6,this.MAX_COL=7,this.prefixCls="ant-picker",this.activeDa