UNPKG

ng-zorro-antd-yj

Version:

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

57 lines 7.29 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import * as tslib_1 from "tslib"; import { forwardRef, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Host, Optional, Renderer2, ViewEncapsulation } from '@angular/core'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; import { NzNoAnimationDirective } from '../core/no-animation/nz-no-animation.directive'; import { DateHelperService } from '../i18n/date-helper.service'; import { NzI18nService } from '../i18n/nz-i18n.service'; import { DateRangePickerComponent } from './date-range-picker.component'; var NzDatePickerComponent = /** @class */ (function (_super) { tslib_1.__extends(NzDatePickerComponent, _super); function NzDatePickerComponent(i18n, cdr, dateHelper, renderer, elementRef, noAnimation) { var _this = _super.call(this, i18n, cdr, dateHelper, noAnimation) || this; _this.noAnimation = noAnimation; _this.isRange = false; renderer.addClass(elementRef.nativeElement, 'ant-calendar-picker'); return _this; } NzDatePickerComponent.decorators = [ { type: Component, args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, selector: 'nz-date-picker', template: "<nz-picker\n [isRange]=\"isRange\"\n [value]=\"nzValue\"\n (valueChange)=\"onValueChange($event)\"\n [open]=\"nzOpen\"\n [disabled]=\"nzDisabled\"\n [format]=\"nzFormat\"\n [allowClear]=\"nzAllowClear\"\n [autoFocus]=\"nzAutoFocus\"\n [className]=\"nzClassName\"\n [placeholder]=\"nzPlaceHolder\"\n [size]=\"nzSize\"\n [style]=\"pickerStyle\"\n [noAnimation]=\"noAnimation?.nzNoAnimation\"\n (openChange)=\"onOpenChange($event)\"\n>\n <date-range-popup *ngIf=\"realOpenState\"\n [isRange]=\"isRange\"\n [showWeek]=\"showWeek\"\n [panelMode]=\"nzMode\"\n (panelModeChange)=\"nzOnPanelChange.emit($event)\"\n [value]=\"nzValue\"\n (valueChange)=\"onValueChange($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 [dropdownClassName]=\"nzDropdownClassName\"\n [popupStyle]=\"nzPopupStyle\"\n [extraFooter]=\"extraFooter\"\n [ranges]=\"nzRanges\"\n (resultOk)=\"onResultOk()\"\n (closePicker)=\"closeOverlay()\"\n ></date-range-popup>\n</nz-picker>", providers: [ { provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef((/** * @return {?} */ function () { return NzDatePickerComponent; })) } ] }] } ]; /** @nocollapse */ NzDatePickerComponent.ctorParameters = function () { return [ { type: NzI18nService }, { type: ChangeDetectorRef }, { type: DateHelperService }, { type: Renderer2 }, { type: ElementRef }, { type: NzNoAnimationDirective, decorators: [{ type: Host }, { type: Optional }] } ]; }; return NzDatePickerComponent; }(DateRangePickerComponent)); export { NzDatePickerComponent }; if (false) { /** @type {?} */ NzDatePickerComponent.prototype.isRange; /** @type {?} */ NzDatePickerComponent.prototype.noAnimation; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZS1waWNrZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmctem9ycm8tYW50ZC15ai8iLCJzb3VyY2VzIjpbImRhdGUtcGlja2VyL2RhdGUtcGlja2VyLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFDTCxVQUFVLEVBQ1YsdUJBQXVCLEVBQ3ZCLGlCQUFpQixFQUNqQixTQUFTLEVBQ1QsVUFBVSxFQUNWLElBQUksRUFDSixRQUFRLEVBQ1IsU0FBUyxFQUNULGlCQUFpQixFQUNsQixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQU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