UNPKG

ng-zorro-antd-yj

Version:

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

63 lines 8.04 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, Input, 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 { HeaderPickerComponent } from './header-picker.component'; var NzMonthPickerComponent = /** @class */ (function (_super) { tslib_1.__extends(NzMonthPickerComponent, _super); function NzMonthPickerComponent(i18n, cdr, dateHelper, renderer, elementRef, noAnimation) { var _this = _super.call(this, i18n, cdr, dateHelper, noAnimation) || this; _this.noAnimation = noAnimation; _this.nzFormat = 'yyyy-MM'; _this.endPanelMode = 'month'; renderer.addClass(elementRef.nativeElement, 'ant-calendar-picker'); return _this; } NzMonthPickerComponent.decorators = [ { type: Component, args: [{ encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, selector: 'nz-month-picker', template: "<nz-picker\n [isRange]=\"false\"\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]=\"nzStyle\"\n [noAnimation]=\"noAnimation?.nzNoAnimation\"\n (openChange)=\"onOpenChange($event)\"\n>\n <div *ngIf=\"realOpenState\">\n <div class=\"ant-calendar-picker-container {{ nzDropdownClassName }} ant-calendar-picker-container-placement-bottomLeft\" [ngStyle]=\"nzPopupStyle\">\n <div class=\"ant-calendar ant-calendar-month ant-calendar-month-calendar\" tabindex=\"0\">\n <div class=\"ant-calendar-month-calendar-content\">\n <div class=\"ant-calendar-month-header-wrap\">\n <calendar-header\n [disabledMonth]=\"nzDisabledDate\"\n [disabledYear]=\"nzDisabledDate\"\n [panelMode]=\"panelMode\"\n (panelModeChange)=\"onPanelModeChange($event)\"\n [value]=\"nzValue\"\n (chooseYear)=\"onChooseValue('year', $event)\"\n (chooseMonth)=\"onChooseValue('month', $event)\"\n [locale]=\"nzLocale.lang\"\n [enablePrev]=\"true\"\n [enableNext]=\"true\"\n ></calendar-header>\n </div>\n <calendar-footer *ngIf=\"extraFooter\" [extraFooter]=\"extraFooter\"></calendar-footer>\n </div>\n </div>\n </div>\n </div>\n</nz-picker>", providers: [ { provide: NG_VALUE_ACCESSOR, multi: true, useExisting: forwardRef((/** * @return {?} */ function () { return NzMonthPickerComponent; })) } ] }] } ]; /** @nocollapse */ NzMonthPickerComponent.ctorParameters = function () { return [ { type: NzI18nService }, { type: ChangeDetectorRef }, { type: DateHelperService }, { type: Renderer2 }, { type: ElementRef }, { type: NzNoAnimationDirective, decorators: [{ type: Host }, { type: Optional }] } ]; }; NzMonthPickerComponent.propDecorators = { nzFormat: [{ type: Input }] }; return NzMonthPickerComponent; }(HeaderPickerComponent)); export { NzMonthPickerComponent }; if (false) { /** @type {?} */ NzMonthPickerComponent.prototype.nzFormat; /** @type {?} */ NzMonthPickerComponent.prototype.endPanelMode; /** @type {?} */ NzMonthPickerComponent.prototype.noAnimation; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9udGgtcGlja2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLXpvcnJvLWFudGQteWovIiwic291cmNlcyI6WyJkYXRlLXBpY2tlci9tb250aC1waWNrZXIuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUNM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