UNPKG

ng-zorro-antd-yj

Version:

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

57 lines 7.3 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 { NzI18nService } from '../i18n/nz-i18n.service'; import { DateHelperService } from '../i18n/date-helper.service'; import { DateRangePickerComponent } from './date-range-picker.component'; var NzRangePickerComponent = /** @class */ (function (_super) { tslib_1.__extends(NzRangePickerComponent, _super); function NzRangePickerComponent(i18n, cdr, dateHelper, renderer, elementRef, noAnimation) { var _this = _super.call(this, i18n, cdr, dateHelper, noAnimation) || this; _this.noAnimation = noAnimation; _this.isRange = true; renderer.addClass(elementRef.nativeElement, 'ant-calendar-picker'); return _this; } NzRangePickerComponent.decorators = [ { type: Component, args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, selector: 'nz-range-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 NzRangePickerComponent; })) } ] }] } ]; /** @nocollapse */ NzRangePickerComponent.ctorParameters = function () { return [ { type: NzI18nService }, { type: ChangeDetectorRef }, { type: DateHelperService }, { type: Renderer2 }, { type: ElementRef }, { type: NzNoAnimationDirective, decorators: [{ type: Host }, { type: Optional }] } ]; }; return NzRangePickerComponent; }(DateRangePickerComponent)); export { NzRangePickerComponent }; if (false) { /** @type {?} */ NzRangePickerComponent.prototype.isRange; /** @type {?} */ NzRangePickerComponent.prototype.noAnimation; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFuZ2UtcGlja2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLXpvcnJvLWFudGQteWovIiwic291cmNlcyI6WyJkYXRlLXBpY2tlci9yYW5nZS1waWNrZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUNMLFVBQVUsRUFDVix1QkFBdUIsRUFDdkIsaUJBQWlCLEVBQ2pCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsSUFBSSxFQUNKLFFBQVEsRUFDUixTQUFTLEVBQ1QsaUJBQWlCLEVBQ2xCLE1BQU0sZUFBZSxDQUFDO0FB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