ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
805 lines (799 loc) • 30.2 kB
JavaScript
import { CommonModule } from '@angular/common';
import { Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, EventEmitter, forwardRef, ChangeDetectorRef, ContentChild, TemplateRef, HostBinding, NgModule } from '@angular/core';
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
import { NzI18nService, DateHelperService, NzI18nModule } from 'ng-zorro-antd/i18n';
import { NzRadioModule } from 'ng-zorro-antd/radio';
import { NzSelectModule } from 'ng-zorro-antd/select';
import setMonth from 'date-fns/set_month';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import addDays from 'date-fns/add_days';
import differenceInCalendarDays from 'date-fns/difference_in_calendar_days';
import differenceInCalendarMonths from 'date-fns/difference_in_calendar_months';
import differenceInCalendarWeeks from 'date-fns/difference_in_calendar_weeks';
import endOfMonth from 'date-fns/end_of_month';
import isSameDay from 'date-fns/is_same_day';
import isSameMonth from 'date-fns/is_same_month';
import isSameYear from 'date-fns/is_same_year';
import isThisMonth from 'date-fns/is_this_month';
import isThisYear from 'date-fns/is_this_year';
import setYear from 'date-fns/set_year';
import startOfMonth from 'date-fns/start_of_month';
import startOfWeek from 'date-fns/start_of_week';
import startOfYear from 'date-fns/start_of_year';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDateCellDirective = /** @class */ (function () {
function NzDateCellDirective() {
}
NzDateCellDirective.decorators = [
{ type: Directive, args: [{
selector: '[nzDateCell]',
exportAs: 'nzDateCell'
},] }
];
return NzDateCellDirective;
}());
var NzMonthCellDirective = /** @class */ (function () {
function NzMonthCellDirective() {
}
NzMonthCellDirective.decorators = [
{ type: Directive, args: [{
selector: '[nzMonthCell]',
exportAs: 'nzMonthCell'
},] }
];
return NzMonthCellDirective;
}());
var NzDateFullCellDirective = /** @class */ (function () {
function NzDateFullCellDirective() {
}
NzDateFullCellDirective.decorators = [
{ type: Directive, args: [{
selector: '[nzDateFullCell]',
exportAs: 'nzDateFullCell'
},] }
];
return NzDateFullCellDirective;
}());
var NzMonthFullCellDirective = /** @class */ (function () {
function NzMonthFullCellDirective() {
}
NzMonthFullCellDirective.decorators = [
{ type: Directive, args: [{
selector: '[nzMonthFullCell]',
exportAs: 'nzMonthFullCell'
},] }
];
return NzMonthFullCellDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCalendarHeaderComponent = /** @class */ (function () {
function NzCalendarHeaderComponent(i18n, dateHelper) {
this.i18n = i18n;
this.dateHelper = dateHelper;
this.mode = 'month';
this.modeChange = new EventEmitter();
this.fullscreen = true;
this.yearChange = new EventEmitter();
this.monthChange = new EventEmitter();
this._activeDate = new Date();
this.yearOffset = 10;
this.yearTotal = 20;
}
Object.defineProperty(NzCalendarHeaderComponent.prototype, "activeDate", {
get: /**
* @return {?}
*/
function () {
return this._activeDate;
},
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this._activeDate = value;
this.setUpYears();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarHeaderComponent.prototype, "activeYear", {
get: /**
* @return {?}
*/
function () {
return this.activeDate.getFullYear();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarHeaderComponent.prototype, "activeMonth", {
get: /**
* @return {?}
*/
function () {
return this.activeDate.getMonth();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarHeaderComponent.prototype, "size", {
get: /**
* @return {?}
*/
function () {
return this.fullscreen ? 'default' : 'small';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarHeaderComponent.prototype, "yearTypeText", {
get: /**
* @return {?}
*/
function () {
return this.i18n.getLocale().Calendar.year;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarHeaderComponent.prototype, "monthTypeText", {
get: /**
* @return {?}
*/
function () {
return this.i18n.getLocale().Calendar.month;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzCalendarHeaderComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setUpYears();
this.setUpMonths();
};
/**
* @param {?} year
* @return {?}
*/
NzCalendarHeaderComponent.prototype.updateYear = /**
* @param {?} year
* @return {?}
*/
function (year) {
this.yearChange.emit(year);
this.setUpYears(year);
};
/**
* @private
* @param {?=} year
* @return {?}
*/
NzCalendarHeaderComponent.prototype.setUpYears = /**
* @private
* @param {?=} year
* @return {?}
*/
function (year) {
/** @type {?} */
var start = (year || this.activeYear) - this.yearOffset;
/** @type {?} */
var end = start + this.yearTotal;
this.years = [];
for (var i = start; i < end; i++) {
this.years.push({ label: "" + i, value: i });
}
};
/**
* @private
* @return {?}
*/
NzCalendarHeaderComponent.prototype.setUpMonths = /**
* @private
* @return {?}
*/
function () {
this.months = [];
for (var i = 0; i < 12; i++) {
/** @type {?} */
var dateInMonth = setMonth(this.activeDate, i);
/** @type {?} */
var monthText = this.dateHelper.format(dateInMonth, 'MMM');
this.months.push({ label: monthText, value: i });
}
};
NzCalendarHeaderComponent.decorators = [
{ type: Component, args: [{
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'nz-calendar-header',
exportAs: 'nzCalendarHeader',
template: "<nz-select class=\"ant-fullcalendar-year-select\" [nzSize]=\"size\" [nzDropdownMatchSelectWidth]=\"false\"\n [ngModel]=\"activeYear\" (ngModelChange)=\"updateYear($event)\">\n <nz-option *ngFor=\"let year of years\" [nzLabel]=\"year.label\" [nzValue]=\"year.value\"></nz-option>\n</nz-select>\n\n<nz-select *ngIf=\"mode === 'month'\" class=\"ant-fullcalendar-month-select\" [nzSize]=\"size\" [nzDropdownMatchSelectWidth]=\"false\"\n [ngModel]=\"activeMonth\" (ngModelChange)=\"monthChange.emit($event)\">\n <nz-option *ngFor=\"let month of months\" [nzLabel]=\"month.label\" [nzValue]=\"month.value\"></nz-option>\n</nz-select>\n\n<nz-radio-group [(ngModel)]=\"mode\" (ngModelChange)=\"modeChange.emit($event)\" [nzSize]=\"size\">\n <label nz-radio-button nzValue=\"month\">{{ monthTypeText }}</label>\n <label nz-radio-button nzValue=\"year\">{{ yearTypeText }}</label>\n</nz-radio-group>\n",
host: {
'[style.display]': "'block'",
'[class.ant-fullcalendar-header]': "true"
}
}] }
];
/** @nocollapse */
NzCalendarHeaderComponent.ctorParameters = function () { return [
{ type: NzI18nService },
{ type: DateHelperService }
]; };
NzCalendarHeaderComponent.propDecorators = {
mode: [{ type: Input }],
modeChange: [{ type: Output }],
fullscreen: [{ type: Input }],
activeDate: [{ type: Input }],
yearChange: [{ type: Output }],
monthChange: [{ type: Output }]
};
return NzCalendarHeaderComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCalendarComponent = /** @class */ (function () {
function NzCalendarComponent(i18n, cdr, dateHelper) {
this.i18n = i18n;
this.cdr = cdr;
this.dateHelper = dateHelper;
this.nzMode = 'month';
this.nzModeChange = new EventEmitter();
this.nzPanelChange = new EventEmitter();
this.nzSelectChange = new EventEmitter();
this.nzValueChange = new EventEmitter();
this.fullscreen = true;
this.daysInWeek = [];
this.monthsInYear = [];
this.dateMatrix = [];
this.activeDate = new Date();
this.currentDateRow = -1;
this.currentDateCol = -1;
this.activeDateRow = -1;
this.activeDateCol = -1;
this.currentMonthRow = -1;
this.currentMonthCol = -1;
this.activeMonthRow = -1;
this.activeMonthCol = -1;
this.dateCell = null;
this.dateFullCell = null;
this.monthCell = null;
this.monthFullCell = null;
this.currentDate = new Date();
this.onChangeFn = (/**
* @return {?}
*/
function () { });
this.onTouchFn = (/**
* @return {?}
*/
function () { });
}
Object.defineProperty(NzCalendarComponent.prototype, "nzValue", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this.updateDate(value, false);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "nzDateCell", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this.dateCell = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "nzDateFullCell", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this.dateFullCell = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "nzMonthCell", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this.monthCell = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "nzMonthFullCell", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this.monthFullCell = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "nzFullscreen", {
get: /**
* @return {?}
*/
function () {
return this.fullscreen;
},
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this.fullscreen = coerceBooleanProperty(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "nzCard", {
get: /**
* @return {?}
*/
function () {
return !this.fullscreen;
},
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
this.fullscreen = !coerceBooleanProperty(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "dateCellChild", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
if (value) {
this.dateCell = value;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "dateFullCellChild", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
if (value) {
this.dateFullCell = value;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "monthCellChild", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
if (value) {
this.monthCell = value;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "monthFullCellChild", {
set: /**
* @param {?} value
* @return {?}
*/
function (value) {
if (value) {
this.monthFullCell = value;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCalendarComponent.prototype, "calendarStart", {
get: /**
* @private
* @return {?}
*/
function () {
return startOfWeek(startOfMonth(this.activeDate), { weekStartsOn: this.dateHelper.getFirstDayOfWeek() });
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzCalendarComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setUpDaysInWeek();
this.setUpMonthsInYear();
this.setUpDateMatrix();
this.calculateCurrentDate();
this.calculateActiveDate();
this.calculateCurrentMonth();
this.calculateActiveMonth();
};
/**
* @param {?} mode
* @return {?}
*/
NzCalendarComponent.prototype.onModeChange = /**
* @param {?} mode
* @return {?}
*/
function (mode) {
this.nzModeChange.emit(mode);
this.nzPanelChange.emit({ date: this.activeDate, mode: mode });
};
/**
* @param {?} date
* @return {?}
*/
NzCalendarComponent.prototype.onDateSelect = /**
* @param {?} date
* @return {?}
*/
function (date) {
this.updateDate(date);
this.nzSelectChange.emit(date);
};
/**
* @param {?} year
* @return {?}
*/
NzCalendarComponent.prototype.onYearSelect = /**
* @param {?} year
* @return {?}
*/
function (year) {
/** @type {?} */
var date = setYear(this.activeDate, year);
this.updateDate(date);
this.nzSelectChange.emit(date);
};
/**
* @param {?} month
* @return {?}
*/
NzCalendarComponent.prototype.onMonthSelect = /**
* @param {?} month
* @return {?}
*/
function (month) {
/** @type {?} */
var date = setMonth(this.activeDate, month);
this.updateDate(date);
this.nzSelectChange.emit(date);
};
/**
* @param {?} value
* @return {?}
*/
NzCalendarComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.updateDate(value || new Date(), false);
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzCalendarComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChangeFn = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzCalendarComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouchFn = fn;
};
/**
* @private
* @param {?} date
* @param {?=} touched
* @return {?}
*/
NzCalendarComponent.prototype.updateDate = /**
* @private
* @param {?} date
* @param {?=} touched
* @return {?}
*/
function (date, touched) {
if (touched === void 0) { touched = true; }
/** @type {?} */
var dayChanged = !isSameDay(date, this.activeDate);
/** @type {?} */
var monthChanged = !isSameMonth(date, this.activeDate);
/** @type {?} */
var yearChanged = !isSameYear(date, this.activeDate);
this.activeDate = date;
if (dayChanged) {
this.calculateActiveDate();
}
if (monthChanged) {
this.setUpDateMatrix();
this.calculateCurrentDate();
this.calculateActiveMonth();
}
if (yearChanged) {
this.calculateCurrentMonth();
}
if (touched) {
this.onChangeFn(date);
this.onTouchFn();
this.nzValueChange.emit(date);
}
};
/**
* @private
* @return {?}
*/
NzCalendarComponent.prototype.setUpDaysInWeek = /**
* @private
* @return {?}
*/
function () {
this.daysInWeek = [];
/** @type {?} */
var weekStart = startOfWeek(this.activeDate, { weekStartsOn: this.dateHelper.getFirstDayOfWeek() });
for (var i = 0; i < 7; i++) {
/** @type {?} */
var date = addDays(weekStart, i);
/** @type {?} */
var title = this.dateHelper.format(date, this.dateHelper.relyOnDatePipe ? 'E' : 'ddd');
/** @type {?} */
var label = this.dateHelper.format(date, this.dateHelper.relyOnDatePipe ? 'EEEEEE' : 'dd');
this.daysInWeek.push({ title: title, label: label });
}
};
/**
* @private
* @return {?}
*/
NzCalendarComponent.prototype.setUpMonthsInYear = /**
* @private
* @return {?}
*/
function () {
this.monthsInYear = [];
for (var i = 0; i < 12; i++) {
/** @type {?} */
var date = setMonth(this.activeDate, i);
/** @type {?} */
var title = this.dateHelper.format(date, 'MMM');
/** @type {?} */
var label = this.dateHelper.format(date, 'MMM');
/** @type {?} */
var start = startOfMonth(date);
this.monthsInYear.push({ title: title, label: label, start: start });
}
};
/**
* @private
* @return {?}
*/
NzCalendarComponent.prototype.setUpDateMatrix = /**
* @private
* @return {?}
*/
function () {
this.dateMatrix = [];
/** @type {?} */
var monthStart = startOfMonth(this.activeDate);
/** @type {?} */
var monthEnd = endOfMonth(this.activeDate);
/** @type {?} */
var weekDiff = differenceInCalendarWeeks(monthEnd, monthStart, { weekStartsOn: this.dateHelper.getFirstDayOfWeek() }) + 2;
for (var week = 0; week < weekDiff; week++) {
/** @type {?} */
var row = [];
/** @type {?} */
var weekStart = addDays(this.calendarStart, week * 7);
for (var day = 0; day < 7; day++) {
/** @type {?} */
var date = addDays(weekStart, day);
/** @type {?} */
var monthDiff = differenceInCalendarMonths(date, this.activeDate);
/** @type {?} */
var dateFormat = this.dateHelper.relyOnDatePipe
? 'longDate'
: this.i18n.getLocaleData('DatePicker.lang.dateFormat', 'YYYY-MM-DD');
/** @type {?} */
var title = this.dateHelper.format(date, dateFormat);
/** @type {?} */
var label = this.dateHelper.format(date, this.dateHelper.relyOnDatePipe ? 'dd' : 'DD');
/** @type {?} */
var rel = monthDiff === 0 ? 'current' : monthDiff < 0 ? 'last' : 'next';
row.push({ title: title, label: label, rel: rel, value: date });
}
this.dateMatrix.push(row);
}
};
/**
* @private
* @return {?}
*/
NzCalendarComponent.prototype.calculateCurrentDate = /**
* @private
* @return {?}
*/
function () {
if (isThisMonth(this.activeDate)) {
this.currentDateRow = differenceInCalendarWeeks(this.currentDate, this.calendarStart, {
weekStartsOn: this.dateHelper.getFirstDayOfWeek()
});
this.currentDateCol = differenceInCalendarDays(this.currentDate, addDays(this.calendarStart, this.currentDateRow * 7));
}
else {
this.currentDateRow = -1;
this.currentDateCol = -1;
}
};
/**
* @private
* @return {?}
*/
NzCalendarComponent.prototype.calculateActiveDate = /**
* @private
* @return {?}
*/
function () {
this.activeDateRow = differenceInCalendarWeeks(this.activeDate, this.calendarStart, {
weekStartsOn: this.dateHelper.getFirstDayOfWeek()
});
this.activeDateCol = differenceInCalendarDays(this.activeDate, addDays(this.calendarStart, this.activeDateRow * 7));
};
/**
* @private
* @return {?}
*/
NzCalendarComponent.prototype.calculateCurrentMonth = /**
* @private
* @return {?}
*/
function () {
if (isThisYear(this.activeDate)) {
/** @type {?} */
var yearStart = startOfYear(this.currentDate);
/** @type {?} */
var monthDiff = differenceInCalendarMonths(this.currentDate, yearStart);
this.currentMonthRow = Math.floor(monthDiff / 3);
this.currentMonthCol = monthDiff % 3;
}
else {
this.currentMonthRow = -1;
this.currentMonthCol = -1;
}
};
/**
* @private
* @return {?}
*/
NzCalendarComponent.prototype.calculateActiveMonth = /**
* @private
* @return {?}
*/
function () {
this.activeMonthRow = Math.floor(this.activeDate.getMonth() / 3);
this.activeMonthCol = this.activeDate.getMonth() % 3;
};
NzCalendarComponent.decorators = [
{ type: Component, args: [{
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'nz-calendar',
exportAs: 'nzCalendar',
template: "<nz-calendar-header [fullscreen]=\"fullscreen\" [activeDate]=\"activeDate\"\n [(mode)]=\"nzMode\" (modeChange)=\"onModeChange($event)\"\n (yearChange)=\"onYearSelect($event)\" (monthChange)=\"onMonthSelect($event)\">\n</nz-calendar-header>\n\n<div class=\"ant-fullcalendar ant-fullcalendar-full\" [ngClass]=\"fullscreen ? 'ant-fullcalendar-fullscreen' : ''\">\n <div class=\"ant-fullcalendar-calendar-body\">\n <ng-container *ngIf=\"nzMode === 'month' then monthModeTable else yearModeTable\"></ng-container>\n </div>\n</div>\n\n<ng-template #monthModeTable>\n <table class=\"ant-fullcalendar-table\" cellspacing=\"0\" role=\"grid\">\n <thead>\n <tr role=\"row\">\n <th *ngFor=\"let day of daysInWeek\" class=\"ant-fullcalendar-column-header\" role=\"columnheader\" [title]=\"day.title\">\n <span class=\"ant-fullcalendar-column-header-inner\">{{ day.label }}</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"ant-fullcalendar-tbody\">\n <tr *ngFor=\"let week of dateMatrix; index as row\"\n [class.ant-fullcalendar-current-week]=\"row === currentDateRow\"\n [class.ant-fullcalendar-active-week]=\"row === activeDateRow\">\n <td *ngFor=\"let day of week; index as col\" role=\"gridcell\" class=\"ant-fullcalendar-cell\" [title]=\"day.title\"\n [class.ant-fullcalendar-today]=\"row === currentDateRow && col === currentDateCol\"\n [class.ant-fullcalendar-selected-day]=\"row === activeDateRow && col === activeDateCol\"\n [class.ant-fullcalendar-last-month-cell]=\"day.rel === 'last'\"\n [class.ant-fullcalendar-next-month-btn-day]=\"day.rel === 'next'\"\n (click)=\"onDateSelect(day.value)\">\n <div class=\"ant-fullcalendar-date\">\n <ng-container *ngIf=\"dateFullCell else defaultCell\">\n <ng-container *ngTemplateOutlet=\"dateFullCell; context: {$implicit: day.value}\"></ng-container>\n </ng-container>\n <ng-template #defaultCell>\n <div class=\"ant-fullcalendar-value\">{{ day.label }}</div>\n <div *ngIf=\"dateCell\" class=\"ant-fullcalendar-content\">\n <ng-container *ngTemplateOutlet=\"dateCell; context: {$implicit: day.value}\"></ng-container>\n </div>\n </ng-template>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</ng-template>\n\n<ng-template #yearModeTable>\n <table class=\"ant-fullcalendar-month-panel-table\" cellspacing=\"0\" role=\"grid\">\n <tbody class=\"ant-fullcalendar-month-panel-tbody\">\n <tr *ngFor=\"let row of [0, 1, 2, 3]\" role=\"row\">\n <td *ngFor=\"let col of [0, 1, 2]\" role=\"gridcell\" [title]=\"monthsInYear[row * 3 + col].title\"\n class=\"ant-fullcalendar-month-panel-cell\"\n [class.ant-fullcalendar-month-panel-current-cell]=\"row === currentMonthRow && col === currentMonthCol\"\n [class.ant-fullcalendar-month-panel-selected-cell]=\"row === activeMonthRow && col === activeMonthCol\"\n (click)=\"onMonthSelect(row * 3 + col)\">\n <div class=\"ant-fullcalendar-month\">\n <ng-container *ngIf=\"monthFullCell else defaultCell\">\n <ng-container *ngTemplateOutlet=\"monthFullCell; context: {$implicit: monthsInYear[row * 3 + col].start}\"></ng-container>\n </ng-container>\n <ng-template #defaultCell>\n <div class=\"ant-fullcalendar-value\">{{ monthsInYear[row * 3 + col].label }}</div>\n <div *ngIf=\"monthCell\" class=\"ant-fullcalendar-content\">\n <ng-container *ngTemplateOutlet=\"monthCell; context: {$implicit: monthsInYear[row * 3 + col].start}\"></ng-container>\n </div>\n </ng-template>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</ng-template>\n",
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((/**
* @return {?}
*/
function () { return NzCalendarComponent; })), multi: true }]
}] }
];
/** @nocollapse */
NzCalendarComponent.ctorParameters = function () { return [
{ type: NzI18nService },
{ type: ChangeDetectorRef },
{ type: DateHelperService }
]; };
NzCalendarComponent.propDecorators = {
nzMode: [{ type: Input }],
nzModeChange: [{ type: Output }],
nzPanelChange: [{ type: Output }],
nzSelectChange: [{ type: Output }],
nzValue: [{ type: Input }],
nzValueChange: [{ type: Output }],
nzDateCell: [{ type: Input }],
nzDateFullCell: [{ type: Input }],
nzMonthCell: [{ type: Input }],
nzMonthFullCell: [{ type: Input }],
nzFullscreen: [{ type: Input }],
nzCard: [{ type: Input }],
dateCellChild: [{ type: ContentChild, args: [NzDateCellDirective, { static: false, read: TemplateRef },] }],
dateFullCellChild: [{ type: ContentChild, args: [NzDateFullCellDirective, { static: false, read: TemplateRef },] }],
monthCellChild: [{ type: ContentChild, args: [NzMonthCellDirective, { static: false, read: TemplateRef },] }],
monthFullCellChild: [{ type: ContentChild, args: [NzMonthFullCellDirective, { static: false, read: TemplateRef },] }],
fullscreen: [{ type: HostBinding, args: ['class.ant-fullcalendar--fullscreen',] }]
};
return NzCalendarComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCalendarModule = /** @class */ (function () {
function NzCalendarModule() {
}
NzCalendarModule.decorators = [
{ type: NgModule, args: [{
declarations: [
NzCalendarHeaderComponent,
NzCalendarComponent,
NzDateCellDirective,
NzDateFullCellDirective,
NzMonthCellDirective,
NzMonthFullCellDirective
],
exports: [
NzCalendarComponent,
NzDateCellDirective,
NzDateFullCellDirective,
NzMonthCellDirective,
NzMonthFullCellDirective
],
imports: [CommonModule, FormsModule, NzI18nModule, NzRadioModule, NzSelectModule]
},] }
];
return NzCalendarModule;
}());
export { NzCalendarComponent, NzCalendarHeaderComponent, NzCalendarModule, NzDateCellDirective, NzDateFullCellDirective, NzMonthCellDirective, NzMonthFullCellDirective };
//# sourceMappingURL=ng-zorro-antd-calendar.js.map