ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
45,283 lines • 1.83 MB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@ant-design/icons-angular'), require('@ant-design/icons-angular/icons'), require('@angular/router'), require('@angular/platform-browser/animations'), require('date-fns/format'), require('date-fns/get_iso_week'), require('date-fns/parse'), require('@angular/cdk/coercion'), require('date-fns/add_days'), require('date-fns/difference_in_calendar_days'), require('date-fns/difference_in_calendar_months'), require('date-fns/difference_in_calendar_weeks'), require('date-fns/is_same_day'), require('date-fns/is_same_month'), require('date-fns/is_same_year'), require('date-fns/is_this_month'), require('date-fns/is_this_year'), require('date-fns/set_year'), require('date-fns/start_of_month'), require('date-fns/start_of_week'), require('date-fns/start_of_year'), require('@angular/platform-browser'), require('date-fns/add_months'), require('date-fns/add_years'), require('date-fns/end_of_month'), require('date-fns/set_day'), require('date-fns/set_month'), require('@angular/cdk/layout'), require('@angular/cdk/platform'), require('@angular/cdk/a11y'), require('@angular/cdk/scrolling'), require('@angular/cdk/observers'), require('@angular/cdk/bidi'), require('@angular/common'), require('@angular/forms'), require('@angular/cdk/keycodes'), require('@angular/common/http'), require('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('rxjs'), require('rxjs/operators'), require('@angular/core')) :
typeof define === 'function' && define.amd ? define('ng-zorro-antd', ['exports', '@ant-design/icons-angular', '@ant-design/icons-angular/icons', '@angular/router', '@angular/platform-browser/animations', 'date-fns/format', 'date-fns/get_iso_week', 'date-fns/parse', '@angular/cdk/coercion', 'date-fns/add_days', 'date-fns/difference_in_calendar_days', 'date-fns/difference_in_calendar_months', 'date-fns/difference_in_calendar_weeks', 'date-fns/is_same_day', 'date-fns/is_same_month', 'date-fns/is_same_year', 'date-fns/is_this_month', 'date-fns/is_this_year', 'date-fns/set_year', 'date-fns/start_of_month', 'date-fns/start_of_week', 'date-fns/start_of_year', '@angular/platform-browser', 'date-fns/add_months', 'date-fns/add_years', 'date-fns/end_of_month', 'date-fns/set_day', 'date-fns/set_month', '@angular/cdk/layout', '@angular/cdk/platform', '@angular/cdk/a11y', '@angular/cdk/scrolling', '@angular/cdk/observers', '@angular/cdk/bidi', '@angular/common', '@angular/forms', '@angular/cdk/keycodes', '@angular/common/http', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', 'rxjs', 'rxjs/operators', '@angular/core'], factory) :
(factory((global['ng-zorro-antd'] = {}),global.iconsAngular,global.icons,global.ng.router,global.ng.platformBrowser.animations,global.fnsFormat,global.fnsGetISOWeek,global.fnsParse,global.ng.cdk.coercion,global.addDays,global.differenceInCalendarDays,global.differenceInCalendarMonths,global.differenceInCalendarWeeks,global.isSameDay,global.isSameMonth,global.isSameYear,global.isThisMonth,global.isThisYear,global.setYear,global.startOfMonth,global.startOfWeek,global.startOfYear,global.ng.platformBrowser,global.addMonths,global.addYears,global.endOfMonth,global.setDay,global.setMonth,global.ng.cdk.layout,global.ng.cdk.platform,global.ng.cdk.a11y,global.ng.cdk.scrolling,global.ng.cdk.observers,global.ng.cdk.bidi,global.ng.common,global.ng.forms,global.ng.cdk.keycodes,global.ng.common.http,global.ng.animations,global.ng.cdk.overlay,global.ng.cdk.portal,global.rxjs,global.rxjs.operators,global.ng.core));
}(this, (function (exports,iconsAngular,icons,router,animations,fnsFormat,fnsGetISOWeek,fnsParse,coercion,addDays,differenceInCalendarDays,differenceInCalendarMonths,differenceInCalendarWeeks,isSameDay,isSameMonth,isSameYear,isThisMonth,isThisYear,setYear,startOfMonth,startOfWeek,startOfYear,i2,addMonths,addYears,endOfMonth,setDay,setMonth,layout,platform,a11y,scrolling,observers,bidi,i2$1,forms,keycodes,i3,animations$1,i2$2,portal,rxjs,operators,i0) { 'use strict';
fnsFormat = fnsFormat && fnsFormat.hasOwnProperty('default') ? fnsFormat['default'] : fnsFormat;
fnsGetISOWeek = fnsGetISOWeek && fnsGetISOWeek.hasOwnProperty('default') ? fnsGetISOWeek['default'] : fnsGetISOWeek;
fnsParse = fnsParse && fnsParse.hasOwnProperty('default') ? fnsParse['default'] : fnsParse;
addDays = addDays && addDays.hasOwnProperty('default') ? addDays['default'] : addDays;
differenceInCalendarDays = differenceInCalendarDays && differenceInCalendarDays.hasOwnProperty('default') ? differenceInCalendarDays['default'] : differenceInCalendarDays;
differenceInCalendarMonths = differenceInCalendarMonths && differenceInCalendarMonths.hasOwnProperty('default') ? differenceInCalendarMonths['default'] : differenceInCalendarMonths;
differenceInCalendarWeeks = differenceInCalendarWeeks && differenceInCalendarWeeks.hasOwnProperty('default') ? differenceInCalendarWeeks['default'] : differenceInCalendarWeeks;
isSameDay = isSameDay && isSameDay.hasOwnProperty('default') ? isSameDay['default'] : isSameDay;
isSameMonth = isSameMonth && isSameMonth.hasOwnProperty('default') ? isSameMonth['default'] : isSameMonth;
isSameYear = isSameYear && isSameYear.hasOwnProperty('default') ? isSameYear['default'] : isSameYear;
isThisMonth = isThisMonth && isThisMonth.hasOwnProperty('default') ? isThisMonth['default'] : isThisMonth;
isThisYear = isThisYear && isThisYear.hasOwnProperty('default') ? isThisYear['default'] : isThisYear;
setYear = setYear && setYear.hasOwnProperty('default') ? setYear['default'] : setYear;
startOfMonth = startOfMonth && startOfMonth.hasOwnProperty('default') ? startOfMonth['default'] : startOfMonth;
startOfWeek = startOfWeek && startOfWeek.hasOwnProperty('default') ? startOfWeek['default'] : startOfWeek;
startOfYear = startOfYear && startOfYear.hasOwnProperty('default') ? startOfYear['default'] : startOfYear;
addMonths = addMonths && addMonths.hasOwnProperty('default') ? addMonths['default'] : addMonths;
addYears = addYears && addYears.hasOwnProperty('default') ? addYears['default'] : addYears;
endOfMonth = endOfMonth && endOfMonth.hasOwnProperty('default') ? endOfMonth['default'] : endOfMonth;
setDay = setDay && setDay.hasOwnProperty('default') ? setDay['default'] : setDay;
setMonth = setMonth && setMonth.hasOwnProperty('default') ? setMonth['default'] : setMonth;
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// tslint:disable:no-any typedef no-invalid-this
/** @type {?} */
var availablePrefixs = ['moz', 'ms', 'webkit'];
/**
* @return {?}
*/
function requestAnimationFramePolyfill() {
/** @type {?} */
var lastTime = 0;
return ( /**
* @param {?} callback
* @return {?}
*/function (callback) {
/** @type {?} */
var currTime = new Date().getTime();
/** @type {?} */
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
/** @type {?} */
var id = setTimeout(( /**
* @return {?}
*/function () {
callback(currTime + timeToCall);
}), timeToCall);
lastTime = currTime + timeToCall;
return id;
});
}
/**
* @return {?}
*/
function getRequestAnimationFrame() {
if (typeof window === 'undefined') {
return ( /**
* @return {?}
*/function () { return null; });
}
if (window.requestAnimationFrame) {
// https://github.com/vuejs/vue/issues/4465
return window.requestAnimationFrame.bind(window);
}
/** @type {?} */
var prefix = availablePrefixs.filter(( /**
* @param {?} key
* @return {?}
*/function (key) { return key + "RequestAnimationFrame" in window; }))[0];
return prefix
? window[prefix + "RequestAnimationFrame"]
: requestAnimationFramePolyfill();
}
/**
* @param {?} id
* @return {?}
*/
function cancelRequestAnimationFrame(id) {
if (typeof window === 'undefined') {
return null;
}
if (window.cancelAnimationFrame) {
return window.cancelAnimationFrame(id);
}
/** @type {?} */
var prefix = availablePrefixs.filter(( /**
* @param {?} key
* @return {?}
*/function (key) {
return key + "CancelAnimationFrame" in window || key + "CancelRequestAnimationFrame" in window;
}))[0];
return prefix ?
((( /** @type {?} */(window)))[prefix + "CancelAnimationFrame"] ||
(( /** @type {?} */(window)))[prefix + "CancelRequestAnimationFrame"]).call(this, id) : clearTimeout(id);
}
/** @type {?} */
var reqAnimFrame = getRequestAnimationFrame();
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} t
* @param {?} b
* @param {?} c
* @param {?} d
* @return {?}
*/
function easeInOutCubic(t, b, c, d) {
/** @type {?} */
var cc = c - b;
/** @type {?} */
var tt = t / (d / 2);
if (tt < 1) {
return cc / 2 * tt * tt * tt + b;
}
else {
return cc / 2 * ((tt -= 2) * tt * tt + 2) + b;
}
}
var NzScrollService = /** @class */ (function () {
/* tslint:disable-next-line:no-any */
function NzScrollService(doc) {
this.doc = doc;
}
/** 设置 `el` 滚动条位置 */
/**
* 设置 `el` 滚动条位置
* @param {?} el
* @param {?=} topValue
* @return {?}
*/
NzScrollService.prototype.setScrollTop = /**
* 设置 `el` 滚动条位置
* @param {?} el
* @param {?=} topValue
* @return {?}
*/
function (el, topValue) {
if (topValue === void 0) {
topValue = 0;
}
if (el === window) {
this.doc.body.scrollTop = topValue;
this.doc.documentElement.scrollTop = topValue;
}
else {
(( /** @type {?} */(el))).scrollTop = topValue;
}
};
/** 获取 `el` 相对于视窗距离 */
/**
* 获取 `el` 相对于视窗距离
* @param {?} el
* @return {?}
*/
NzScrollService.prototype.getOffset = /**
* 获取 `el` 相对于视窗距离
* @param {?} el
* @return {?}
*/
function (el) {
/** @type {?} */
var ret = {
top: 0,
left: 0
};
if (!el || !el.getClientRects().length)
return ret;
/** @type {?} */
var rect = el.getBoundingClientRect();
if (rect.width || rect.height) {
/** @type {?} */
var doc = el.ownerDocument.documentElement;
ret.top = rect.top - doc.clientTop;
ret.left = rect.left - doc.clientLeft;
}
else {
ret.top = rect.top;
ret.left = rect.left;
}
return ret;
};
/** 获取 `el` 滚动条位置 */
// TODO: remove '| Window' as the fallback already happens here
/**
* 获取 `el` 滚动条位置
* @param {?=} el
* @param {?=} top
* @return {?}
*/
// TODO: remove '| Window' as the fallback already happens here
NzScrollService.prototype.getScroll = /**
* 获取 `el` 滚动条位置
* @param {?=} el
* @param {?=} top
* @return {?}
*/
// TODO: remove '| Window' as the fallback already happens here
function (el, top) {
if (top === void 0) {
top = true;
}
/** @type {?} */
var target = el ? el : window;
/** @type {?} */
var prop = top ? 'pageYOffset' : 'pageXOffset';
/** @type {?} */
var method = top ? 'scrollTop' : 'scrollLeft';
/** @type {?} */
var isWindow = target === window;
/** @type {?} */
var ret = isWindow ? target[prop] : target[method];
if (isWindow && typeof ret !== 'number') {
ret = this.doc.documentElement[method];
}
return ret;
};
/**
* 使用动画形式将 `el` 滚动至某位置
*
* @param containerEl 容器,默认 `window`
* @param targetTopValue 滚动至目标 `top` 值,默认:0,相当于顶部
* @param easing 动作算法,默认:`easeInOutCubic`
* @param callback 动画结束后回调
*/
/**
* 使用动画形式将 `el` 滚动至某位置
*
* @param {?} containerEl 容器,默认 `window`
* @param {?=} targetTopValue 滚动至目标 `top` 值,默认:0,相当于顶部
* @param {?=} easing 动作算法,默认:`easeInOutCubic`
* @param {?=} callback 动画结束后回调
* @return {?}
*/
NzScrollService.prototype.scrollTo = /**
* 使用动画形式将 `el` 滚动至某位置
*
* @param {?} containerEl 容器,默认 `window`
* @param {?=} targetTopValue 滚动至目标 `top` 值,默认:0,相当于顶部
* @param {?=} easing 动作算法,默认:`easeInOutCubic`
* @param {?=} callback 动画结束后回调
* @return {?}
*/
function (containerEl, targetTopValue, easing, callback) {
var _this = this;
if (targetTopValue === void 0) {
targetTopValue = 0;
}
/** @type {?} */
var target = containerEl ? containerEl : window;
/** @type {?} */
var scrollTop = this.getScroll(target);
/** @type {?} */
var startTime = Date.now();
/** @type {?} */
var frameFunc = ( /**
* @return {?}
*/function () {
/** @type {?} */
var timestamp = Date.now();
/** @type {?} */
var time = timestamp - startTime;
_this.setScrollTop(target, (easing || easeInOutCubic)(time, scrollTop, targetTopValue, 450));
if (time < 450) {
reqAnimFrame(frameFunc);
}
else {
if (callback)
callback();
}
});
reqAnimFrame(frameFunc);
};
NzScrollService.decorators = [
{ type: i0.Injectable }
];
/** @nocollapse */
NzScrollService.ctorParameters = function () {
return [
{ type: undefined, decorators: [{ type: i0.Inject, args: [i2$1.DOCUMENT,] }] }
];
};
return NzScrollService;
}());
/**
* @param {?} doc
* @param {?} scrollService
* @return {?}
*/
function SCROLL_SERVICE_PROVIDER_FACTORY(doc, scrollService) {
return scrollService || new NzScrollService(doc);
}
/** @type {?} */
var SCROLL_SERVICE_PROVIDER = {
provide: NzScrollService,
useFactory: SCROLL_SERVICE_PROVIDER_FACTORY,
deps: [i2$1.DOCUMENT, [new i0.Optional(), new i0.SkipSelf(), NzScrollService]]
};
/*! *****************************************************************************
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.
***************************************************************************** */
/* global Reflect, Promise */
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p]; };
return extendStatics(d, b);
};
function __extends(d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function () {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s)
if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
r = Reflect.decorate(decorators, target, key, desc);
else
for (var i = decorators.length - 1; i >= 0; i--)
if (d = decorators[i])
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
return Reflect.metadata(metadataKey, metadataValue);
}
function __values(o) {
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
if (m)
return m.call(o);
return {
next: function () {
if (o && i >= o.length)
o = void 0;
return { value: o && o[i++], done: !o };
}
};
}
function __read(o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m)
return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
ar.push(r.value);
}
catch (error) {
e = { error: error };
}
finally {
try {
if (r && !r.done && (m = i["return"]))
m.call(i);
}
finally {
if (e)
throw e.error;
}
}
return ar;
}
function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @return {?}
*/
function isNotNil(value) {
return (typeof (value) !== 'undefined') && value !== null;
}
/**
* Examine if two objects are shallowly equaled.
* @param {?} objA
* @param {?} objB
* @return {?}
*/
function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) {
return false;
}
/** @type {?} */
var keysA = Object.keys(objA);
/** @type {?} */
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
/** @type {?} */
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
// tslint:disable-next-line:prefer-for-of
for (var idx = 0; idx < keysA.length; idx++) {
/** @type {?} */
var key = keysA[idx];
if (!bHasOwnProperty(key)) {
return false;
}
if (objA[key] !== objB[key]) {
return false;
}
}
return true;
}
/**
* @param {?} value
* @return {?}
*/
function isInteger(value) {
return typeof value === 'number' &&
isFinite(value) &&
Math.floor(value) === value;
}
/**
* @param {?} element
* @return {?}
*/
function isEmpty(element) {
/** @type {?} */
var nodes = element.childNodes;
for (var i = 0; i < nodes.length; i++) {
if (filterNotEmptyNode(nodes.item(i))) {
return false;
}
}
return true;
}
/**
* @param {?} node
* @return {?}
*/
function filterNotEmptyNode(node) {
if (node) {
if ((node.nodeType === 1) && ((( /** @type {?} */(node))).outerHTML.toString().trim().length !== 0)) {
// ELEMENT_NODE
return node;
}
else if ((node.nodeType === 3) && (node.textContent.toString().trim().length !== 0)) {
// TEXT_NODE
return node;
}
return null;
}
return null;
}
/**
* @param {?} value
* @return {?}
*/
function isNonEmptyString(value) {
return typeof value === 'string' && value !== '';
}
/**
* @param {?} value
* @return {?}
*/
function isTemplateRef(value) {
return value instanceof i0.TemplateRef;
}
/**
* @param {?} value
* @return {?}
*/
function isComponent(value) {
return value instanceof i0.Type;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} value
* @return {?}
*/
function toBoolean(value) {
return coercion.coerceBooleanProperty(value);
}
/**
* @param {?} value
* @param {?=} fallbackValue
* @return {?}
*/
function toNumber(value, fallbackValue) {
if (fallbackValue === void 0) {
fallbackValue = 0;
}
return coercion._isNumberValue(value) ? Number(value) : fallbackValue;
}
/**
* @param {?} value
* @return {?}
*/
function toCssPixel(value) {
return coercion.coerceCssPixelValue(value);
}
// Get the function-property type's value
/**
* @template T
* @param {?} prop
* @param {...?} args
* @return {?}
*/
function valueFunctionProp(prop) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
return typeof prop === 'function' ? prop.apply(void 0, __spread(args)) : prop;
}
// tslint:disable-next-line: no-any
/**
* @template T, D
* @param {?} name
* @param {?} fallback
* @return {?}
*/
function propDecoratorFactory(name, fallback) {
// tslint:disable-next-line: no-any
/**
* @param {?} target
* @param {?} propName
* @return {?}
*/
function propDecorator(target, propName) {
/** @type {?} */
var privatePropName = "$$__" + propName;
if (Object.prototype.hasOwnProperty.call(target, privatePropName)) {
console.warn("The prop \"" + privatePropName + "\" is already exist, it will be overrided by " + name + " decorator.");
}
Object.defineProperty(target, privatePropName, {
configurable: true,
writable: true
});
Object.defineProperty(target, propName, {
get: /**
* @return {?}
*/ function () {
return this[privatePropName]; // tslint:disable-line:no-invalid-this
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this[privatePropName] = fallback(value); // tslint:disable-line:no-invalid-this
}
});
}
return propDecorator;
}
/**
* Input decorator that handle a prop to do get/set automatically with toBoolean
*
* Why not using \@InputBoolean alone without \@Input? AOT needs \@Input to be visible
*
* \@howToUse
* ```
* \@Input() \@InputBoolean() visible: boolean = false;
*
* // Act as below:
* // \@Input()
* // get visible() { return this.__visibile; }
* // set visible(value) { this.__visible = value; }
* // __visible = false;
* ```
* @return {?}
*/
function InputBoolean() {
return propDecoratorFactory('InputBoolean', toBoolean);
}
/**
* @return {?}
*/
function InputCssPixel() {
return propDecoratorFactory('InputCssPixel', toCssPixel);
}
/**
* @return {?}
*/
function InputNumber() {
return propDecoratorFactory('InputNumber', toNumber);
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} fn
* @return {?}
*/
function throttleByAnimationFrame(fn) {
/** @type {?} */
var requestId;
/** @type {?} */
var later = ( /**
* @param {?} args
* @return {?}
*/function (args) {
return ( /**
* @return {?}
*/function () {
requestId = null;
fn.apply(void 0, __spread(args));
});
});
/** @type {?} */
var throttled = ( /**
* @param {...?} args
* @return {?}
*/function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (requestId == null) {
requestId = reqAnimFrame(later(args));
}
});
// tslint:disable-next-line:no-non-null-assertion
(( /** @type {?} */(throttled))).cancel = ( /**
* @return {?}
*/function () { return cancelRequestAnimationFrame(( /** @type {?} */(requestId))); });
return throttled;
}
/**
* @return {?}
*/
function throttleByAnimationFrameDecorator() {
return ( /**
* @param {?} target
* @param {?} key
* @param {?} descriptor
* @return {?}
*/function (target, key, descriptor) {
/** @type {?} */
var fn = descriptor.value;
/** @type {?} */
var definingProperty = false;
return {
configurable: true,
get: /**
* @return {?}
*/ function () {
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
return fn;
}
/** @type {?} */
var boundFn = throttleByAnimationFrame(fn.bind(this));
definingProperty = true;
Object.defineProperty(this, key, {
value: boundFn,
configurable: true,
writable: true
});
definingProperty = false;
return boundFn;
}
};
});
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAffixComponent = /** @class */ (function () {
// tslint:disable-next-line:no-any
function NzAffixComponent(_el, scrollSrv, doc) {
this.scrollSrv = scrollSrv;
this.doc = doc;
this.nzChange = new i0.EventEmitter();
this.events = [
'resize',
'scroll',
'touchstart',
'touchmove',
'touchend',
'pageshow',
'load'
];
this._target = window;
this.placeholderNode = _el.nativeElement;
}
Object.defineProperty(NzAffixComponent.prototype, "nzTarget", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.clearEventListeners();
this._target = typeof value === 'string' ? this.doc.querySelector(value) : value || window;
this.setTargetEventListeners();
this.updatePosition(( /** @type {?} */({})));
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzAffixComponent.prototype, "nzOffsetTop", {
get: /**
* @return {?}
*/ function () {
return this._offsetTop;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (typeof value === 'undefined') {
return;
}
this._offsetTop = toNumber(value, null);
this.updatePosition(( /** @type {?} */({})));
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzAffixComponent.prototype, "nzOffsetBottom", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (typeof value === 'undefined') {
return;
}
this._offsetBottom = toNumber(value, null);
this.updatePosition(( /** @type {?} */({})));
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzAffixComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.timeout = setTimeout(( /**
* @return {?}
*/function () {
_this.setTargetEventListeners();
_this.updatePosition(( /** @type {?} */({})));
}));
};
/**
* @return {?}
*/
NzAffixComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.clearEventListeners();
clearTimeout(this.timeout);
// tslint:disable-next-line:no-any
(( /** @type {?} */(this.updatePosition))).cancel();
};
/**
* @param {?} element
* @param {?} target
* @return {?}
*/
NzAffixComponent.prototype.getOffset = /**
* @param {?} element
* @param {?} target
* @return {?}
*/
function (element, target) {
/** @type {?} */
var elemRect = element.getBoundingClientRect();
/** @type {?} */
var targetRect = this.getTargetRect(target);
/** @type {?} */
var scrollTop = this.scrollSrv.getScroll(target, true);
/** @type {?} */
var scrollLeft = this.scrollSrv.getScroll(target, false);
/** @type {?} */
var docElem = this.doc.body;
/** @type {?} */
var clientTop = docElem.clientTop || 0;
/** @type {?} */
var clientLeft = docElem.clientLeft || 0;
return {
top: elemRect.top - targetRect.top + scrollTop - clientTop,
left: elemRect.left - targetRect.left + scrollLeft - clientLeft,
width: elemRect.width,
height: elemRect.height
};
};
/**
* @private
* @return {?}
*/
NzAffixComponent.prototype.setTargetEventListeners = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.clearEventListeners();
this.events.forEach(( /**
* @param {?} eventName
* @return {?}
*/function (eventName) {
_this._target.addEventListener(eventName, _this.updatePosition, false);
}));
};
/**
* @private
* @return {?}
*/
NzAffixComponent.prototype.clearEventListeners = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.events.forEach(( /**
* @param {?} eventName
* @return {?}
*/function (eventName) {
_this._target.removeEventListener(eventName, _this.updatePosition, false);
}));
};
/**
* @private
* @param {?} target
* @return {?}
*/
NzAffixComponent.prototype.getTargetRect = /**
* @private
* @param {?} target
* @return {?}
*/
function (target) {
return target !== window ?
(( /** @type {?} */(target))).getBoundingClientRect() :
( /** @type {?} */({ top: 0, left: 0, bottom: 0 }));
};
/**
* @private
* @param {?} affixStyle
* @return {?}
*/
NzAffixComponent.prototype.genStyle = /**
* @private
* @param {?} affixStyle
* @return {?}
*/
function (affixStyle) {
if (affixStyle == null) {
return '';
}
return Object.keys(affixStyle).map(( /**
* @param {?} key
* @return {?}
*/function (key) {
/** @type {?} */
var val = affixStyle[key];
return key + ":" + (typeof val === 'string' ? val : val + 'px');
})).join(';');
};
/**
* @private
* @param {?} e
* @param {?} affixStyle
* @return {?}
*/
NzAffixComponent.prototype.setAffixStyle = /**
* @private
* @param {?} e
* @param {?} affixStyle
* @return {?}
*/
function (e, affixStyle) {
/** @type {?} */
var originalAffixStyle = this.affixStyle;
/** @type {?} */
var isWindow = this._target === window;
if (e.type === 'scroll' && originalAffixStyle && affixStyle && isWindow) {
return;
}
if (shallowEqual(originalAffixStyle, affixStyle)) {
return;
}
/** @type {?} */
var fixed = !!affixStyle;
/** @type {?} */
var wrapEl = ( /** @type {?} */(this.fixedEl.nativeElement));
wrapEl.style.cssText = this.genStyle(affixStyle);
this.affixStyle = affixStyle;
/** @type {?} */
var cls = 'ant-affix';
if (fixed) {
wrapEl.classList.add(cls);
}
else {
wrapEl.classList.remove(cls);
}
if ((affixStyle && !originalAffixStyle) || (!affixStyle && originalAffixStyle)) {
this.nzChange.emit(fixed);
}
};
/**
* @private
* @param {?} placeholderStyle
* @return {?}
*/
NzAffixComponent.prototype.setPlaceholderStyle = /**
* @private
* @param {?} placeholderStyle
* @return {?}
*/
function (placeholderStyle) {
/** @type {?} */
var originalPlaceholderStyle = this.placeholderStyle;
if (shallowEqual(placeholderStyle, originalPlaceholderStyle)) {
return;
}
this.placeholderNode.style.cssText = this.genStyle(placeholderStyle);
this.placeholderStyle = placeholderStyle;
};
/**
* @private
* @param {?} e
* @return {?}
*/
NzAffixComponent.prototype.syncPlaceholderStyle = /**
* @private
* @param {?} e
* @return {?}
*/
function (e) {
if (!this.affixStyle) {
return;
}
this.placeholderNode.style.cssText = '';
/** @type {?} */
var widthObj = { width: this.placeholderNode.offsetWidth };
this.setAffixStyle(e, __assign({}, this.affixStyle, widthObj));
this.setPlaceholderStyle(widthObj);
};
/**
* @param {?} e
* @return {?}
*/
NzAffixComponent.prototype.updatePosition = /**
* @param {?} e
* @return {?}
*/
function (e) {
/** @type {?} */
var targetNode = this._target;
// Backwards support
/** @type {?} */
var offsetTop = this.nzOffsetTop;
/** @type {?} */
var scrollTop = this.scrollSrv.getScroll(targetNode, true);
/** @type {?} */
var elemOffset = this.getOffset(this.placeholderNode, targetNode);
/** @type {?} */
var fixedNode = ( /** @type {?} */(this.fixedEl.nativeElement));
/** @type {?} */
var elemSize = {
width: fixedNode.offsetWidth,
height: fixedNode.offsetHeight
};
/** @type {?} */
var offsetMode = {
top: false,
bottom: false
};
// Default to `offsetTop=0`.
if (typeof offsetTop !== 'number' && typeof this._offsetBottom !== 'number') {
offsetMode.top = true;
offsetTop = 0;
}
else {
offsetMode.top = typeof offsetTop === 'number';
offsetMode.bottom = typeof this._offsetBottom === 'number';
}
/** @type {?} */
var targetRect = this.getTargetRect(targetNode);
/** @type {?} */
var targetInnerHeight = (( /** @type {?} */(targetNode))).innerHeight || (( /** @type {?} */(targetNode))).clientHeight;
if (scrollTop >= elemOffset.top - (( /** @type {?} */(offsetTop))) && offsetMode.top) {
/** @type {?} */
var width = elemOffset.width;
/** @type {?} */
var top_1 = targetRect.top + (( /** @type {?} */(offsetTop)));
this.setAffixStyle(e, {
position: 'fixed',
top: top_1,
left: targetRect.left + elemOffset.left,
maxHeight: "calc(100vh - " + top_1 + "px)",
width: width
});
this.setPlaceholderStyle({
width: width,
height: elemSize.height
});
}
else if (scrollTop <= elemOffset.top + elemSize.height + (( /** @type {?} */(this._offsetBottom))) - targetInnerHeight &&
offsetMode.bottom) {
/** @type {?} */
var targetBottomOffet = targetNode === window ? 0 : (window.innerHeight - targetRect.bottom);
/** @type {?} */
var width = elemOffset.width;
this.setAffixStyle(e, {
position: 'fixed',
bottom: targetBottomOffet + (( /** @type {?} */(this._offsetBottom))),
left: targetRect.left + elemOffset.left,
width: width
});
this.setPlaceholderStyle({
width: width,
height: elemOffset.height
});
}
else {
if (e.type === 'resize' && this.affixStyle && this.affixStyle.position === 'fixed' && this.placeholderNode.offsetWidth) {
this.setAffixStyle(e, __assign({}, this.affixStyle, { width: this.placeholderNode.offsetWidth }));
}
else {
this.setAffixStyle(e, null);
}
this.setPlaceholderStyle(null);
}
if (e.type === 'resize') {
this.syncPlaceholderStyle(e);
}
};
NzAffixComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-affix',
template: "<div #fixedEl>\n <ng-content></ng-content>\n</div>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
styles: ["\n nz-affix {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzAffixComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzScrollService },
{ type: undefined, decorators: [{ type: i0.Inject, args: [i2$1.DOCUMENT,] }] }
];
};
NzAffixComponent.propDecorators = {
nzTarget: [{ type: i0.Input }],
nzOffsetTop: [{ type: i0.Input }],
nzOffsetBottom: [{ type: i0.Input }],
nzChange: [{ type: i0.Output }],
fixedEl: [{ type: i0.ViewChild, args: ['fixedEl',] }]
};
__decorate([
throttleByAnimationFrameDecorator(),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Event]),
__metadata("design:returntype", void 0)
], NzAffixComponent.prototype, "updatePosition", null);
return NzAffixComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAffixModule = /** @class */ (function () {
function NzAffixModule() {
}
NzAffixModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzAffixComponent],
exports: [NzAffixComponent],
imports: [i2$1.CommonModule],
providers: [SCROLL_SERVICE_PROVIDER]
},] }
];
return NzAffixModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzClassListAddDirective = /** @class */ (function () {
function NzClassListAddDirective(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.classList = [];
}
Object.defineProperty(NzClassListAddDirective.prototype, "nzClassListAdd", {
set: /**
* @param {?} list
* @return {?}
*/ function (list) {
var _this = this;
this.classList.forEach(( /**
* @param {?} name
* @return {?}
*/function (name) {
_this.renderer.removeClass(_this.elementRef.nativeElement, name);
}));
list.forEach(( /**
* @param {?} name
* @return {?}
*/function (name) {
_this.renderer.addClass(_this.elementRef.nativeElement, name);
}));
this.classList = list;
},
enumerable: true,
configurable: true
});
NzClassListAddDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzClassListAdd]'
},] }
];
/** @nocollapse */
NzClassListAddDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzClassListAddDirective.propDecorators = {
nzClassListAdd: [{ type: i0.Input }]
};
return NzClassListAddDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzStringTemplateOutletDirective = /** @class */ (function () {
function NzStringTemplateOutletDirective(viewContainer, defaultTemplate) {
this.viewContainer = viewContainer;
this.defaultTemplate = defaultTemplate;
this.inputTemplate = null;
this.inputViewRef = null;
this.defaultViewRef = null;
}
Object.defineProperty(NzStringTemplateOutletDirective.prototype, "nzStringTemplateOutlet", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value instanceof i0.TemplateRef) {
this.isTemplate = true;
this.inputTemplate = value;
}
else {
this.isTemplate = false;
}
this.updateView();
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzStringTemplateOutletDirective.prototype.updateView = /**
* @return {?}
*/
function () {
if (!this.isTemplate) {
/** use default template when input is string **/
if (!this.defaultViewRef) {
this.viewContainer.clear();
this.inputViewRef = null;
if (this.defaultTemplate) {
this.defaultViewRef = this.viewContainer.createEmbeddedView(this.defaultTemplate);
}
}
}
else {
/** use input template when input is templateRef **/
if (!this.inputViewRef) {
this.viewContainer.clear();
this.defaultViewRef = null;
if (this.inputTemplate) {
this.inputViewRef = this.viewContainer.createEmbeddedView(this.inputTemplate);
}
}
}
};
NzStringTemplateOutletDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzStringTemplateOutlet]'
},] }
];
/** @nocollapse */
NzStringTemplateOutletDirective.ctorParameters = function () {
return [
{ type: i0.ViewContainerRef },
{ type: i0.TemplateRef }
];
};
NzStringTemplateOutletDirective.propDecorators = {
nzStringTemplateOutlet: [{ type: i0.Input }]
};
return NzStringTemplateOutletDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAddOnModule = /** @class */ (function () {
function NzAddOnModule() {
}
NzAddOnModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule],
exports: [NzStringTemplateOutletDirective, NzClassListAddDirective],
declarations: [NzStringTemplateOutletDirective, NzClassListAddDirective]
},] }
];
return NzAddOnModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} prefix
* @return {?}
*/
function getRegExp(prefix) {
/** @type {?} */
var prefixArray = Array.isArray(prefix) ? prefix : [prefix];
/** @type {?} */
var prefixToken = prefixArray.join('').replace(/(\$|\^)/g, '\\$1');
if (prefixArray.length > 1) {
prefixToken = "[" + prefixToken + "]";
}
return new RegExp("(\\s|^)(" + prefixToken + ")[^\\s]*", 'g');
}
/**
* @param {?} value
* @param {?=} prefix
* @return {?}
*/
function getMentions(value, prefix) {
if (prefix === void 0) {
prefix = '@';
}
if (typeof value !== 'string') {
return [];
}
/** @type {?} */
var regex = getRegExp(prefix);
/** @type {?} */
var mentions = value.match(regex);
return mentions !== null ? mentions.map(( /**
* @param {?} e
* @return {?}
*/function (e) { return e.trim(); })) : [];
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Much like lodash.
* @param {?} toPad
* @param {?} length
* @param {?} element
* @return {?}
*/
function padStart(toPad, length, element) {
if (toPad.length > length) {
return toPad;
}
/** @type {?} */
var joined = "" + getRepeatedElement(length, element) + toPad;
return joined.slice(joined.length - length, joined.length);
}
/**
* @param {?} toPad
* @param {?} length
* @param {?} element
* @return {?}
*/
function padEnd(toPad, length, element) {
/** @type {?} */
var joined = "" + toPad + getRepeatedElement(length, element);
return joined.slice(0, length);
}
/**
* @param {?} length
* @param {?} element
* @return {?}
*/
function getRepeatedElement(length, element) {
return Array(length).fill(element).join('');
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// from https://github.com/component/textarea-caret-position
// We'll copy the properties below into the mirror div.
// Note that some browsers, such as Firefox, do not concatenate properties
// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),
// so we have to list every single property explicitly.
/** @type {?} */
var properties = [
'direction',
'boxSizing',
'width',
'height',
'overflowX',
'overflowY',
'borderTopWidth',
'borderRightWidth',
'borderBottomWidth',
'borderLeftWidth',
'borderStyle',
'paddingTop',
'paddingRight',
'paddingBottom',
'paddingLeft',
// https://developer.mozilla.org/en-US/docs/Web/CSS/font
'fontStyle',
'fontVariant',
'fontWeight',
'fontStretch',
'fontSize',
'fontSizeAdjust',
'lineHeight',
'fontFamily',
'textAlign',
'textTransform',
'textIndent',
'textDecoration',
'letterSpacing',
'wordSpacing',
'tabSize',
'MozTabSize'
];
/** @type {?} */
var isBrowser = (typeof window !== 'undefined');
// tslint:disable-next-line:no-any
/** @type {?} */
var isFirefox = (isBrowser && (( /** @type {?} */(window))).mozInnerScreenX != null);
/** @type {?} */
var _parseInt = ( /**
* @param {?} str
* @return {?}
*/function (str) { return parseInt(str, 10); });
/**
* @param {?} element
* @param {?} position
* @param {?=} options
* @return {?}
*/
function getCaretCoordinates(element, position, options) {
if (!isBrowser) {
throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');
}
/** @type {?} */
var debug = options && options.debug || false;
if (debug) {
/** @type {?} */
var el = document.querySelector('#input-textarea-caret-position-mirror-div');
if (el) {
el.parentNode.removeChild(el);
}
}
// The mirror div will replicate the textarea's style
/** @type {?} */
var div = document.createElement('div');
div.id = 'input-textarea-caret-position-mirror-div';
document.body.appendChild(div);
/** @type {?} */
var style = div.style;
// tslint:disable-next-line:no-any
/** @type {?} */
var computed = window.getComputedStyle ? window.getComputedStyle(element) : (( /** @type {?} */(element))).currentStyle;
// currentStyle for IE < 9
/** @type {?} */
var isInput = element.nodeName === 'INPUT';
// Default textarea styles
style.whiteSpace = 'pre-wrap';
if (!isInput) {
style.wordWrap = 'break-word'; // only for textarea-s
}
// Position off-screen
style.position = 'absolute'; // required to return coordinates properly
if (!debug) {
style.visibility = 'hidden';
} // not 'display: none' because we want rendering
// Transfer the element's properties to the div
properties.forEach(( /**
* @param {?} prop
* @return {?}
*/function (prop) {
if (isInput && prop === 'lineHeight') {
// Special case for <input>s because text is rendered centered and line height may be != height
style.lineHeight = computed.height;
}
else {
style[prop] = computed[prop];
}
}));
if (isFirefox) {
// Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275
if (element.scrollHeight > _parseInt(computed.height)) {
style.overflowY = 'scroll';
}
}
else {
style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'
}
div.textContent = element.value.substring(0, position);
// The second special handling for input type="text" vs textarea:
// spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037
if (isInput) {
div.textContent = div.textContent.replace(/\s/g, '\u00a0');
}
/** @type {?} */
var span = document.createElement('span');
// Wrapping must be replicated *exactly*, including when a long word gets
// onto the next line, with whitespace at the end of the line before (#7).
// The *only* reliable way to do that is to copy the *entire* rest of the
// textarea's content into the <span> created at the caret position.
// For inputs, just '.' would be enough, but no need to bother.
span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all
div.appendChild(span);
/** @type {?} */
var coordinates = {
top: span.offsetTop + _parseInt(computed.borderTopWidth),
left: span.offsetLeft + _parseInt(computed.borderLeftWidth),
height: _parseInt(computed.lineHeight)
};
if (debug) {
span.style.backgroundColor = '#eee';
createDebugEle(element, coordinates);
}
else {
document.body.removeChild(div);
}
return coordinates;
}
/**
* @param {?} element
* @param {?} coordinates
* @return {?}
*/
function createDebugEle(element, coordinates) {
/** @type {?} */
var fontSize = getComputedStyle(element).getPropertyValue('font-size');
/** @type {?} */
var rect = (( /** @type {?} */(document.querySelector('#DEBUG'))))
|| document.createElement('div');
document.body.appendChild(rect);
rect.id = 'DEBUG';
rect.style.position = 'absolute';
rect.style.backgroundColor = 'red';
rect.style.height = fontSize;
rect.style.width = '1px';
rect.style.top = element.getBoundingClientRect().top - element.scrollTop + window.pageYOffset + coordinates.top + "px";
rect.style.left = element.getBoundingClientRect().left - element.scrollLeft + window.pageXOffset + coordinates.left + "px";
console.log(rect.style.top);
console.log(rect.style.left);
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var timeUnits = [
['Y', 1000 * 60 * 60 * 24 * 365],
['M', 1000 * 60 * 60 * 24 * 30],
['D', 1000 * 60 * 60 * 24],
['H', 1000 * 60 * 60],
['m', 1000 * 60],
['s', 1000],
['S', 1] // million seconds
];
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_ICONS$$1 = new i0.InjectionToken('nz_icons');
/** @type {?} */
var NZ_ICON_DEFAULT_TWOTONE_COLOR$$1 = new i0.InjectionToken('nz_icon_default_twotone_color');
/** @type {?} */
var DEFAULT_TWOTONE_COLOR$$1 = '#1890ff';
/** @type {?} */
var NZ_ICONS_USED_BY_ZORRO$$1 = [
icons.BarsOutline,
icons.CalendarOutline,
icons.CaretUpFill,
icons.CaretUpOutline,
icons.CaretDownFill,
icons.CaretDownOutline,
icons.CheckCircleFill,
icons.CheckCircleOutline,
icons.CheckOutline,
icons.ClockCircleOutline,
icons.CloseCircleOutline,
icons.CloseCircleFill,
icons.CloseOutline,
icons.DoubleLeftOutline,
icons.DoubleRightOutline,
icons.DownOutline,
icons.EllipsisOutline,
icons.ExclamationCircleFill,
icons.ExclamationCircleOutline,
icons.EyeOutline,
icons.FileFill,
icons.FileOutline,
icons.FilterFill,
icons.InfoCircleFill,
icons.InfoCircleOutline,
icons.LeftOutline,
icons.LoadingOutline,
icons.PaperClipOutline,
icons.QuestionCircleOutline,
icons.RightOutline,
icons.StarFill,
icons.SearchOutline,
icons.StarFill,
icons.UploadOutline,
icons.UpOutline
];
/**
* It should be a global singleton, otherwise registered icons could not be found.
*/
var NzIconService$$1 = /** @class */ (function (_super) {
__extends(NzIconService$$1, _super);
function NzIconService$$1(rendererFactory, sanitizer, handler, document, icons$$1, defaultColor) {
var _this = _super.call(this, rendererFactory, handler, document, sanitizer) || this;
_this.rendererFactory = rendererFactory;
_this.sanitizer = sanitizer;
_this.handler = handler;
_this.document = document;
_this.icons = icons$$1;
_this.defaultColor = defaultColor;
_this.iconfontCache = new Set();
_this.warnedAboutAPI = false;
_this.warnedAboutCross = false;
_this.warnedAboutVertical = false;
_this.addIcon.apply(_this, __spread(NZ_ICONS_USED_BY_ZORRO$$1, (_this.icons || [])));
/** @type {?} */
var primaryColor = DEFAULT_TWOTONE_COLOR$$1;
if (_this.defaultColor) {
if (_this.defaultColor.startsWith('#')) {
primaryColor = _this.defaultColor;
}
else {
console.warn('[NG-ZORRO]: twotone color must be a hex color!');
}
}
_this.twoToneColor = { primaryColor: primaryColor };
return _this;
}
/**
* @param {?} type
* @return {?}
*/
NzIconService$$1.prototype.warnAPI = /**
* @param {?} type
* @return {?}
*/
function (type) {
if (type === 'old' && !this.warnedAboutAPI) {
console.warn("<i class=\"anticon\"></i> would be deprecated soon. Please use <i nz-icon type=\"\"></i> API.");
this.warnedAboutAPI = true;
}
if (type === 'cross' && !this.warnedAboutCross) {
console.warn("'cross' icon is replaced by 'close' icon.");
this.warnedAboutCross = true;
}
if (type === 'vertical' && !this.warnedAboutVertical) {
console.warn("'verticle' is misspelled, would be corrected in the next major version.");
this.warnedAboutVertical = true;
}
};
/**
* @param {?} svg
* @return {?}
*/
NzIconService$$1.prototype.normalizeSvgElement = /**
* @param {?} svg
* @return {?}
*/
function (svg) {
if (!svg.getAttribute('viewBox')) {
this._renderer.setAttribute(svg, 'viewBox', '0 0 1024 1024');
}
if (!svg.getAttribute('width') || !svg.getAttribute('height')) {
this._renderer.setAttribute(svg, 'width', '1em');
this._renderer.setAttribute(svg, 'height', '1em');
}
if (!svg.getAttribute('fill')) {
this._renderer.setAttribute(svg, 'fill', 'currentColor');
}
};
/**
* @param {?} opt
* @return {?}
*/
NzIconService$$1.prototype.fetchFromIconfont = /**
* @param {?} opt
* @return {?}
*/
function (opt) {
var scriptUrl = opt.scriptUrl;
if (this.document && !this.iconfontCache.has(scriptUrl)) {
/** @type {?} */
var script = this._renderer.createElement('script');
this._renderer.setAttribute(script, 'src', scriptUrl);
this._renderer.setAttribute(script, 'data-namespace', scriptUrl.replace(/^(https?|http):/g, ''));
this._renderer.appendChild(this.document.body, script);
this.iconfontCache.add(scriptUrl);
}
};
/**
* @param {?} type
* @return {?}
*/
NzIconService$$1.prototype.createIconfontIcon = /**
* @param {?} type
* @return {?}
*/
function (type) {
return this._createSVGElementFromString("<svg><use xlink:href=\"" + type + "\"></svg>");
};
NzIconService$$1.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
NzIconService$$1.ctorParameters = function () {
return [
{ type: i0.RendererFactory2 },
{ type: i2.DomSanitizer },
{ type: i3.HttpBackend, decorators: [{ type: i0.Optional }] },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2$1.DOCUMENT,] }] },
{ type: Array, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_ICONS$$1,] }] },
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_ICON_DEFAULT_TWOTONE_COLOR$$1,] }] }
];
};
/** @nocollapse */ NzIconService$$1.ngInjectableDef = i0.defineInjectable({ factory: function NzIconService_Factory() { return new NzIconService$$1(i0.inject(i0.RendererFactory2), i0.inject(i2.DomSanitizer), i0.inject(i3.HttpBackend, 8), i0.inject(i2$1.DOCUMENT, 8), i0.inject(NZ_ICONS$$1, 8), i0.inject(NZ_ICON_DEFAULT_TWOTONE_COLOR$$1, 8)); }, token: NzIconService$$1, providedIn: "root" });
return NzIconService$$1;
}(iconsAngular.IconService));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var iconTypeRE = /^anticon\-\w/;
/** @type {?} */
var getIconTypeClass = ( /**
* @param {?} className
* @return {?}
*/function (className) {
if (!className) {
return undefined;
}
else {
/** @type {?} */
var classArr = className.split(/\s/);
/** @type {?} */
var index = classArr.findIndex((( /**
* @param {?} cls
* @return {?}
*/function (cls) { return cls !== 'anticon' && cls !== 'anticon-spin' && !!cls.match(iconTypeRE); })));
return index === -1 ? undefined : { name: classArr[index], index: index };
}
});
/** @type {?} */
var normalizeType = ( /**
* @param {?} rawType
* @return {?}
*/function (rawType) {
/** @type {?} */
var ret = { type: rawType, crossError: false, verticalError: false };
ret.type = rawType ? rawType.replace('anticon-', '') : '';
if (ret.type.includes('verticle')) {
ret.type = 'up';
ret.verticalError = true;
}
if (ret.type.startsWith('cross')) {
ret.type = 'close';
ret.crossError = true;
}
return ret;
});
/**
* This directive extends IconDirective to provide:
*
* - IconFont support
* - spinning
* - old API compatibility
*
* \@break-changes
*
* - old API compatibility, icon class names would not be supported.
* - properties that not started with `nz`.
*/
var NzIconDirective = /** @class */ (function (_super) {
__extends(NzIconDirective, _super);
function NzIconDirective(iconService, elementRef, renderer) {
var _this = _super.call(this, iconService, elementRef, renderer) || this;
_this.iconService = iconService;
_this.elementRef = elementRef;
_this.renderer = renderer;
_this.nzRotate = 0;
/**
* @deprecated 8.0.0 avoid exposing low layer API.
*/
_this.spin = false;
_this.el = _this.elementRef.nativeElement;
return _this;
}
Object.defineProperty(NzIconDirective.prototype, "nzSpin", {
/** Properties with `nz` prefix. */
set: /**
* Properties with `nz` prefix.
* @param {?} value
* @return {?}
*/ function (value) { this.spin = value; },
enumerable: true,
configurable: true
});
Object.defineProperty(NzIconDirective.prototype, "nzType", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) { this.type = value; },
enumerable: true,
configurable: true
});
Object.defineProperty(NzIconDirective.prototype, "nzTheme", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) { this.theme = value; },
enumerable: true,
configurable: true
});
Object.defineProperty(NzIconDirective.prototype, "nzTwotoneColor", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) { this.twoToneColor = value; },
enumerable: true,
configurable: true
});
Object.defineProperty(NzIconDirective.prototype, "nzIconfont", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) { this.iconfont = value; },
enumerable: true,
configurable: true
});
Object.defineProperty(NzIconDirective.prototype, "type", {
get: /**
* @return {?}
*/ function () {
return this._type;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value && value.startsWith('anticon')) {
/** @type {?} */
var rawClass = getIconTypeClass(value);
/** @type {?} */
var type = rawClass ? normalizeType(rawClass.name).type : '';
if (type && this.type !== type) {
this._type = type;
}
}
else {
this._type = value;
}
},
enumerable: true,
configurable: true
});
/**
* Replacement of `changeIcon` for more modifications.
* @param oldAPI
*/
/**
* Replacement of `changeIcon` for more modifications.
* @private
* @param {?=} oldAPI
* @return {?}
*/
NzIconDirective.prototype.changeIcon2 = /**
* Replacement of `changeIcon` for more modifications.
* @private
* @param {?=} oldAPI
* @return {?}
*/
function (oldAPI) {
var _this = this;
if (oldAPI === void 0) {
oldAPI = false;
}
if (!oldAPI) {
this.setClassName();
}
this._changeIcon()
.then(( /**
* @param {?} svg
* @return {?}
*/function (svg) {
_this.setSVGData(svg);
if (!oldAPI && svg) {
_this.handleSpin(svg);
_this.handleRotate(svg);
}
}));
};
/**
* @private
* @param {?} className
* @return {?}
*/
NzIconDirective.prototype.classChangeHandler = /**
* @private
* @param {?} className
* @return {?}
*/
function (className) {
/** @type {?} */
var ret = getIconTypeClass(className);
if (ret) {
var _a = normalizeType(ret.name), type = _a.type, crossError = _a.crossError, verticalError = _a.verticalError;
if (crossError) {
this.iconService.warnAPI('cross');
}
if (verticalError) {
this.iconService.warnAPI('vertical');
}
if (this.type !== type) {
this._type = type;
this.changeIcon2(true);
}
}
};
/**
* @private
* @param {?} svg
* @return {?}
*/
NzIconDirective.prototype.handleSpin = /**
* @private
* @param {?} svg
* @return {?}
*/
function (svg) {
if ((this.spin || this.type === 'loading') && !this.elementRef.nativeElement.classList.contains('anticon-spin')) {
this.renderer.addClass(svg, 'anticon-spin');
}
else {
this.renderer.removeClass(svg, 'anticon-spin');
}
};
/**
* @private
* @param {?} svg
* @return {?}
*/
NzIconDirective.prototype.handleRotate = /**
* @private
* @param {?} svg
* @return {?}
*/
function (svg) {
if (this.nzRotate) {
this.renderer.setAttribute(svg, 'style', "transform: rotate(" + this.nzRotate + "deg)");
}
else {
this.renderer.removeAttribute(svg, 'style');
}
};
/**
* @private
* @return {?}
*/
NzIconDirective.prototype.setClassName = /**
* @private
* @return {?}
*/
function () {
if (typeof this.type === 'string') {
/** @type {?} */
var iconClassNameArr = this.el.className.split(/\s/);
/** @type {?} */
var ret = getIconTypeClass(this.el.className);
if (ret) {
iconClassNameArr.splice(ret.index, 1, "anticon-" + this.type);
this.renderer.setAttribute(this.el, 'class', iconClassNameArr.join(' '));
}
else {
this.renderer.addClass(this.el, "anticon-" + this.type);
}
}
};
/**
* @private
* @param {?} svg
* @return {?}
*/
NzIconDirective.prototype.setSVGData = /**
* @private
* @param {?} svg
* @return {?}
*/
function (svg) {
if (typeof this.type === 'string' && svg) {
this.renderer.setAttribute(svg, 'data-icon', this.type);
this.renderer.setAttribute(svg, 'aria-hidden', 'true');
}
};
/**
* @param {?} changes
* @return {?}
*/
NzIconDirective.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var type = changes.type, nzType = changes.nzType, nzTwotoneColor = changes.nzTwotoneColor, twoToneColor = changes.twoToneColor, spin = changes.spin, nzSpin = changes.nzSpin, theme = changes.theme, nzTheme = changes.nzTheme, nzRotate = changes.nzRotate;
if (type || nzType || nzTwotoneColor || twoToneColor || spin || nzSpin || theme || nzTheme) {
this.changeIcon2();
}
else if (nzRotate) {
this.handleRotate(this.el.firstChild);
}
else {
this._setSVGElement(this.iconService.createIconfontIcon("#" + this.iconfont));
}
};
/**
* @return {?}
*/
NzIconDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
// If `this.type` is not specified and `classList` contains `anticon`, it should be an icon using old API.
if (!this.type && this.el.classList.contains('anticon')) {
this.iconService.warnAPI('old');
// Get `type` from `className`. If not, initial rendering would be missed.
this.classChangeHandler(this.el.className);
// Add `class` mutation observer.
this.classNameObserver = new MutationObserver(( /**
* @param {?} mutations
* @return {?}
*/function (mutations) {
mutations
.filter(( /**
* @param {?} mutation
* @return {?}
*/function (mutation) { return mutation.attributeName === 'class'; }))
.forEach(( /**
* @param {?} mutation
* @return {?}
*/function (mutation) { return _this.classChangeHandler((( /** @type {?} */(mutation.target))).className); }));
}));
this.classNameObserver.observe(this.el, { attributes: true });
}
// If `classList` does not contain `anticon`, add it before other class names.
if (!this.el.classList.contains('anticon')) {
this.renderer.setAttribute(this.el, 'class', ("anticon " + this.el.className).trim());
}
};
/**
* @return {?}
*/
NzIconDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
if (this.classNameObserver) {
this.classNameObserver.disconnect();
}
};
/**
* If custom content is provided, try to normalize SVG elements.
*/
/**
* If custom content is provided, try to normalize SVG elements.
* @return {?}
*/
NzIconDirective.prototype.ngAfterContentChecked = /**
* If custom content is provided, try to normalize SVG elements.
* @return {?}
*/
function () {
/** @type {?} */
var children = this.el.children;
/** @type {?} */
var length = children.length;
if (!this.type && children.length) {
while (length--) {
/** @type {?} */
var child = children[length];
if (child.tagName.toLowerCase() === 'svg') {
this.iconService.normalizeSvgElement(( /** @type {?} */(child)));
}
}
}
};
NzIconDirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'i.anticon, [nz-icon]'
},] }
];
/** @nocollapse */
NzIconDirective.ctorParameters = function () {
return [
{ type: NzIconService$$1 },
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzIconDirective.propDecorators = {
nzSpin: [{ type: i0.Input }],
nzRotate: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzTheme: [{ type: i0.Input }],
nzTwotoneColor: [{ type: i0.Input }],
nzIconfont: [{ type: i0.Input }],
spin: [{ type: i0.Input }],
iconfont: [{ type: i0.Input }],
type: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], NzIconDirective.prototype, "nzSpin", null);
return NzIconDirective;
}(iconsAngular.IconDirective));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzIconModule = /** @class */ (function () {
function NzIconModule() {
}
NzIconModule.decorators = [
{ type: i0.NgModule, args: [{
exports: [NzIconDirective],
declarations: [NzIconDirective]
},] }
];
return NzIconModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var AnimationDuration = /** @class */ (function () {
function AnimationDuration() {
}
AnimationDuration.SLOW = '0.3s'; // Modal
// Modal
AnimationDuration.BASE = '0.2s';
AnimationDuration.FAST = '0.1s'; // Tooltip
return AnimationDuration;
}());
var AnimationCurves = /** @class */ (function () {
function AnimationCurves() {
}
AnimationCurves.EASE_BASE_OUT = 'cubic-bezier(0.7, 0.3, 0.1, 1)';
AnimationCurves.EASE_BASE_IN = 'cubic-bezier(0.9, 0, 0.3, 0.7)';
AnimationCurves.EASE_OUT = 'cubic-bezier(0.215, 0.61, 0.355, 1)';
AnimationCurves.EASE_IN = 'cubic-bezier(0.55, 0.055, 0.675, 0.19)';
AnimationCurves.EASE_IN_OUT = 'cubic-bezier(0.645, 0.045, 0.355, 1)';
AnimationCurves.EASE_OUT_BACK = 'cubic-bezier(0.12, 0.4, 0.29, 1.46)';
AnimationCurves.EASE_IN_BACK = 'cubic-bezier(0.71, -0.46, 0.88, 0.6)';
AnimationCurves.EASE_IN_OUT_BACK = 'cubic-bezier(0.71, -0.46, 0.29, 1.46)';
AnimationCurves.EASE_OUT_CIRC = 'cubic-bezier(0.08, 0.82, 0.17, 1)';
AnimationCurves.EASE_IN_CIRC = 'cubic-bezier(0.6, 0.04, 0.98, 0.34)';
AnimationCurves.EASE_IN_OUT_CIRC = 'cubic-bezier(0.78, 0.14, 0.15, 0.86)';
AnimationCurves.EASE_OUT_QUINT = 'cubic-bezier(0.23, 1, 0.32, 1)';
AnimationCurves.EASE_IN_QUINT = 'cubic-bezier(0.755, 0.05, 0.855, 0.06)';
AnimationCurves.EASE_IN_OUT_QUINT = 'cubic-bezier(0.86, 0, 0.07, 1)';
return AnimationCurves;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var ANIMATION_TRANSITION_IN = AnimationDuration.BASE + " " + AnimationCurves.EASE_OUT_QUINT;
/** @type {?} */
var ANIMATION_TRANSITION_OUT = AnimationDuration.BASE + " " + AnimationCurves.EASE_IN_QUINT;
/** @type {?} */
var slideMotion = animations$1.trigger('slideMotion', [
animations$1.state('bottom', animations$1.style({
opacity: 1,
transform: 'scaleY(1)',
transformOrigin: '0% 0%'
})),
animations$1.state('top', animations$1.style({
opacity: 1,
transform: 'scaleY(1)',
transformOrigin: '0% 100%'
})),
animations$1.transition('void => bottom', [
animations$1.style({
opacity: 0,
transform: 'scaleY(0.8)',
transformOrigin: '0% 0%'
}),
animations$1.animate(ANIMATION_TRANSITION_IN)
]),
animations$1.transition('bottom => void', [
animations$1.animate(ANIMATION_TRANSITION_OUT, animations$1.style({
opacity: 0,
transform: 'scaleY(0.8)',
transformOrigin: '0% 0%'
}))
]),
animations$1.transition('void => top', [
animations$1.style({
opacity: 0,
transform: 'scaleY(0.8)',
transformOrigin: '0% 100%'
}),
animations$1.animate(ANIMATION_TRANSITION_IN)
]),
animations$1.transition('top => void', [
animations$1.animate(ANIMATION_TRANSITION_OUT, animations$1.style({
opacity: 0,
transform: 'scaleY(0.8)',
transformOrigin: '0% 100%'
}))
])
]);
/** @type {?} */
var slideAlertMotion = animations$1.trigger('slideAlertMotion', [
animations$1.transition(':leave', [
animations$1.style({ opacity: 1, transform: 'scaleY(1)', transformOrigin: '0% 0%' }),
animations$1.animate(AnimationDuration.SLOW + " " + AnimationCurves.EASE_IN_OUT_CIRC, animations$1.style({
opacity: 0,
transform: 'scaleY(0)',
transformOrigin: '0% 0%'
}))
])
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAlertComponent = /** @class */ (function () {
function NzAlertComponent() {
this.destroy = false;
this.iconType = 'info-circle';
this.iconTheme = 'fill';
this.isTypeSet = false;
this.isShowIconSet = false;
this.nzType = 'info';
this.nzCloseable = false;
this.nzShowIcon = false;
this.nzBanner = false;
this.nzOnClose = new i0.EventEmitter();
}
/**
* @return {?}
*/
NzAlertComponent.prototype.closeAlert = /**
* @return {?}
*/
function () {
this.destroy = true;
};
/**
* @return {?}
*/
NzAlertComponent.prototype.onFadeAnimationDone = /**
* @return {?}
*/
function () {
if (this.destroy) {
this.nzOnClose.emit(true);
}
};
/**
* @return {?}
*/
NzAlertComponent.prototype.updateIconClassMap = /**
* @return {?}
*/
function () {
switch (this.nzType) {
case 'error':
this.iconType = 'close-circle';
break;
case 'success':
this.iconType = 'check-circle';
break;
case 'info':
this.iconType = 'info-circle';
break;
case 'warning':
this.iconType = 'exclamation-circle';
break;
}
this.iconTheme = this.nzDescription ? 'outline' : 'fill';
};
/**
* @param {?} changes
* @return {?}
*/
NzAlertComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var nzShowIcon = changes.nzShowIcon, nzDescription = changes.nzDescription, nzType = changes.nzType, nzBanner = changes.nzBanner;
if (nzShowIcon) {
this.isShowIconSet = true;
}
if (nzDescription || nzType) {
this.updateIconClassMap();
}
if (nzType) {
this.isTypeSet = true;
}
if (nzBanner) {
if (!this.isTypeSet) {
this.nzType = 'warning';
}
if (!this.isShowIconSet) {
this.nzShowIcon = true;
}
}
};
NzAlertComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-alert',
animations: [slideAlertMotion],
template: "<div *ngIf=\"!destroy\"\n class=\"ant-alert\"\n [class.ant-alert-success]=\"nzType === 'success'\"\n [class.ant-alert-info]=\"nzType === 'info'\"\n [class.ant-alert-warning]=\"nzType === 'warning'\"\n [class.ant-alert-error]=\"nzType === 'error'\"\n [class.ant-alert-no-icon]=\"!nzShowIcon\"\n [class.ant-alert-banner]=\"nzBanner\"\n [class.ant-alert-closable]=\"nzCloseable\"\n [class.ant-alert-with-description]=\"!!nzDescription\"\n [@slideAlertMotion]\n (@slideAlertMotion.done)=\"onFadeAnimationDone()\">\n <ng-container *ngIf=\"nzShowIcon\">\n <i class=\"ant-alert-icon\" [ngClass]=\"nzIconType\" *ngIf=\"nzIconType; else iconTemplate\"></i>\n <ng-template #iconTemplate>\n <i nz-icon class=\"ant-alert-icon\" [type]=\"iconType\" [theme]=\"iconTheme\"></i>\n </ng-template>\n </ng-container>\n <span class=\"ant-alert-message\" *ngIf=\"nzMessage\">\n <ng-container *nzStringTemplateOutlet=\"nzMessage\">{{ nzMessage }}</ng-container>\n </span>\n <span class=\"ant-alert-description\" *ngIf=\"nzDescription\">\n <ng-container *nzStringTemplateOutlet=\"nzDescription\">{{ nzDescription }}</ng-container>\n </span>\n <a *ngIf=\"nzCloseable || nzCloseText\"\n class=\"ant-alert-close-icon\"\n (click)=\"closeAlert()\">\n <ng-template #closeDefaultTemplate>\n <i nz-icon type=\"close\" class=\"anticon-close\"></i>\n </ng-template>\n <ng-container *ngIf=\"nzCloseText; else closeDefaultTemplate\">\n <ng-container *nzStringTemplateOutlet=\"nzCloseText\">{{ nzCloseText }}</ng-container>\n </ng-container>\n </a>\n</div>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
styles: ["nz-alert {\n display: block;\n }"]
}] }
];
NzAlertComponent.propDecorators = {
nzCloseText: [{ type: i0.Input }],
nzIconType: [{ type: i0.Input }],
nzMessage: [{ type: i0.Input }],
nzDescription: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzCloseable: [{ type: i0.Input }],
nzShowIcon: [{ type: i0.Input }],
nzBanner: [{ type: i0.Input }],
nzOnClose: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzAlertComponent.prototype, "nzCloseable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzAlertComponent.prototype, "nzShowIcon", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzAlertComponent.prototype, "nzBanner", void 0);
return NzAlertComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAlertModule = /** @class */ (function () {
function NzAlertModule() {
}
NzAlertModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzAlertComponent],
exports: [NzAlertComponent],
imports: [i2$1.CommonModule, NzIconModule, NzAddOnModule]
},] }
];
return NzAlertModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var sharpMatcherRegx = /#([^#]+)$/;
var NzAnchorComponent = /** @class */ (function () {
// endregion
/* tslint:disable-next-line:no-any */
function NzAnchorComponent(scrollSrv, doc, cdr) {
this.scrollSrv = scrollSrv;
this.doc = doc;
this.cdr = cdr;
this.links = [];
this.animating = false;
this.target = null;
this.scroll$ = null;
this.destroyed = false;
this.visible = false;
this.wrapperStyle = { 'max-height': '100vh' };
// region: fields
this._affix = true;
this._bounds = 5;
this._showInkInFixed = false;
this.nzClick = new i0.EventEmitter();
this.nzScroll = new i0.EventEmitter();
}
Object.defineProperty(NzAnchorComponent.prototype, "nzAffix", {
get: /**
* @return {?}
*/ function () {
return this._affix;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._affix = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzAnchorComponent.prototype, "nzBounds", {
get: /**
* @return {?}
*/ function () {
return this._bounds;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._bounds = toNumber(value, 5);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzAnchorComponent.prototype, "nzOffsetTop", {
get: /**
* @return {?}
*/ function () {
return this._offsetTop;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._offsetTop = toNumber(value, 0);
this.wrapperStyle = {
'max-height': "calc(100vh - " + this._offsetTop + "px)"
};
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzAnchorComponent.prototype, "nzShowInkInFixed", {
get: /**
* @return {?}
*/ function () {
return this._showInkInFixed;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._showInkInFixed = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzAnchorComponent.prototype, "nzTarget", {
set: /**
* @param {?} el
* @return {?}
*/ function (el) {
this.target = typeof el === 'string' ? this.doc.querySelector(el) : el;
this.registerScrollEvent();
},
enumerable: true,
configurable: true
});
/**
* @param {?} link
* @return {?}
*/
NzAnchorComponent.prototype.registerLink = /**
* @param {?} link
* @return {?}
*/
function (link) {
this.links.push(link);
};
/**
* @param {?} link
* @return {?}
*/
NzAnchorComponent.prototype.unregisterLink = /**
* @param {?} link
* @return {?}
*/
function (link) {
this.links.splice(this.links.indexOf(link), 1);
};
/**
* @private
* @return {?}
*/
NzAnchorComponent.prototype.getTarget = /**
* @private
* @return {?}
*/
function () {
return this.target || window;
};
/**
* @return {?}
*/
NzAnchorComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.registerScrollEvent();
};
/**
* @return {?}
*/
NzAnchorComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroyed = true;
this.removeListen();
};
/**
* @private
* @return {?}
*/
NzAnchorComponent.prototype.registerScrollEvent = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.removeListen();
this.scroll$ = rxjs.fromEvent(this.getTarget(), 'scroll')
.pipe(operators.throttleTime(50), operators.distinctUntilChanged())
.subscribe(( /**
* @return {?}
*/function () { return _this.handleScroll(); }));
// 浏览器在刷新时保持滚动位置,会倒置在dom未渲染完成时计算不正确,因此延迟重新计算
// 与之相对应可能会引起组件移除后依然触发 `handleScroll` 的 `detectChanges`
setTimeout(( /**
* @return {?}
*/function () { return _this.handleScroll(); }));
};
/**
* @private
* @return {?}
*/
NzAnchorComponent.prototype.removeListen = /**
* @private
* @return {?}
*/
function () {
if (this.scroll$) {
this.scroll$.unsubscribe();
}
};
/**
* @private
* @param {?} element
* @return {?}
*/
NzAnchorComponent.prototype.getOffsetTop = /**
* @private
* @param {?} element
* @return {?}
*/
function (element) {
if (!element || !element.getClientRects().length) {
return 0;
}
/** @type {?} */
var rect = element.getBoundingClientRect();
if (!rect.width && !rect.height) {
return rect.top;
}
return rect.top - element.ownerDocument.documentElement.clientTop;
};
/**
* @return {?}
*/
NzAnchorComponent.prototype.handleScroll = /**
* @return {?}
*/
function () {
var _this = this;
if (this.destroyed || this.animating) {
return;
}
/** @type {?} */
var sections = [];
/** @type {?} */
var scope = (this.nzOffsetTop || 0) + this.nzBounds;
this.links.forEach(( /**
* @param {?} comp
* @return {?}
*/function (comp) {
/** @type {?} */
var sharpLinkMatch = sharpMatcherRegx.exec(comp.nzHref.toString());
if (!sharpLinkMatch) {
return;
}
/** @type {?} */
var target = _this.doc.getElementById(sharpLinkMatch[1]);
if (target && _this.getOffsetTop(target) < scope) {
/** @type {?} */
var top_1 = _this.getOffsetTop(target);
sections.push({
top: top_1,
comp: comp
});
}
}));
this.visible = !!sections.length;
if (!this.visible) {
this.clearActive();
this.cdr.detectChanges();
}
else {
/** @type {?} */
var maxSection = sections.reduce(( /**
* @param {?} prev
* @param {?} curr
* @return {?}
*/function (prev, curr) { return curr.top > prev.top ? curr : prev; }));
this.handleActive(maxSection.comp);
}
};
/**
* @private
* @return {?}
*/
NzAnchorComponent.prototype.clearActive = /**
* @private
* @return {?}
*/
function () {
this.links.forEach(( /**
* @param {?} i
* @return {?}
*/function (i) {
i.active = false;
i.markForCheck();
}));
};
/**
* @private
* @param {?} comp
* @return {?}
*/
NzAnchorComponent.prototype.handleActive = /**
* @private
* @param {?} comp
* @return {?}
*/
function (comp) {
this.clearActive();
comp.active = true;
comp.markForCheck();
/** @type {?} */
var linkNode = ( /** @type {?} */((( /** @type {?} */(comp.elementRef.nativeElement))).querySelector('.ant-anchor-link-title')));
this.ink.nativeElement.style.top = linkNode.offsetTop + linkNode.clientHeight / 2 - 4.5 + "px";
this.cdr.detectChanges();
this.nzScroll.emit(comp);
};
/**
* @param {?} linkComp
* @return {?}
*/
NzAnchorComponent.prototype.handleScrollTo = /**
* @param {?} linkComp
* @return {?}
*/
function (linkComp) {
var _this = this;
/** @type {?} */
var el = this.doc.querySelector(linkComp.nzHref);
if (!el) {
return;
}
this.animating = true;
/** @type {?} */
var containerScrollTop = this.scrollSrv.getScroll(this.getTarget());
/** @type {?} */
var elOffsetTop = this.scrollSrv.getOffset(el).top;
/** @type {?} */
var targetScrollTop = containerScrollTop + elOffsetTop - (this.nzOffsetTop || 0);
this.scrollSrv.scrollTo(this.getTarget(), targetScrollTop, null, ( /**
* @return {?}
*/function () {
_this.animating = false;
_this.handleActive(linkComp);
}));
this.nzClick.emit(linkComp.nzHref);
};
NzAnchorComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-anchor',
preserveWhitespaces: false,
template: "<nz-affix *ngIf=\"nzAffix;else content\" [nzOffsetTop]=\"nzOffsetTop\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n</nz-affix>\n<ng-template #content>\n <div class=\"ant-anchor-wrapper\" [ngStyle]=\"wrapperStyle\">\n <div class=\"ant-anchor\" [ngClass]=\"{'fixed': !nzAffix && !nzShowInkInFixed}\">\n <div class=\"ant-anchor-ink\">\n <div class=\"ant-anchor-ink-ball\" [class.visible]=\"visible\" #ink></div>\n </div>\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>",
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzAnchorComponent.ctorParameters = function () {
return [
{ type: NzScrollService },
{ type: undefined, decorators: [{ type: i0.Inject, args: [i2$1.DOCUMENT,] }] },
{ type: i0.ChangeDetectorRef }
];
};
NzAnchorComponent.propDecorators = {
ink: [{ type: i0.ViewChild, args: ['ink',] }],
nzAffix: [{ type: i0.Input }],
nzBounds: [{ type: i0.Input }],
nzOffsetTop: [{ type: i0.Input }],
nzShowInkInFixed: [{ type: i0.Input }],
nzTarget: [{ type: i0.Input }],
nzClick: [{ type: i0.Output }],
nzScroll: [{ type: i0.Output }]
};
return NzAnchorComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAnchorLinkComponent = /** @class */ (function () {
function NzAnchorLinkComponent(elementRef, anchorComp, cdr, renderer) {
this.elementRef = elementRef;
this.anchorComp = anchorComp;
this.cdr = cdr;
this.nzHref = '#';
this.titleStr = '';
this.active = false;
renderer.addClass(elementRef.nativeElement, 'ant-anchor-link');
}
Object.defineProperty(NzAnchorLinkComponent.prototype, "nzTitle", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value instanceof i0.TemplateRef) {
this.titleStr = null;
this.titleTpl = value;
}
else {
this.titleStr = value;
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzAnchorLinkComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.anchorComp.registerLink(this);
};
/**
* @param {?} e
* @return {?}
*/
NzAnchorLinkComponent.prototype.goToClick = /**
* @param {?} e
* @return {?}
*/
function (e) {
e.preventDefault();
e.stopPropagation();
this.anchorComp.handleScrollTo(this);
};
/**
* @return {?}
*/
NzAnchorLinkComponent.prototype.markForCheck = /**
* @return {?}
*/
function () {
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzAnchorLinkComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.anchorComp.unregisterLink(this);
};
NzAnchorLinkComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-link',
preserveWhitespaces: false,
template: "<a (click)=\"goToClick($event)\" href=\"{{nzHref}}\" class=\"ant-anchor-link-title\" title=\"{{titleStr}}\">\n <span *ngIf=\"titleStr; else (titleTpl || nzTemplate)\">{{ titleStr }}</span>\n</a>\n<ng-content></ng-content>",
host: {
'[class.ant-anchor-link-active]': 'active'
},
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
styles: ["\n nz-link {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzAnchorLinkComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzAnchorComponent },
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 }
];
};
NzAnchorLinkComponent.propDecorators = {
nzHref: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzTemplate: [{ type: i0.ContentChild, args: ['nzTemplate',] }]
};
return NzAnchorLinkComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAnchorModule = /** @class */ (function () {
function NzAnchorModule() {
}
NzAnchorModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzAnchorComponent, NzAnchorLinkComponent],
exports: [NzAnchorComponent, NzAnchorLinkComponent],
imports: [i2$1.CommonModule, NzAffixModule],
providers: [SCROLL_SERVICE_PROVIDER]
},] }
];
return NzAnchorModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var DISABLED_CLASSNAME = 'nz-animate-disabled';
var NzNoAnimationDirective = /** @class */ (function () {
function NzNoAnimationDirective(element, renderer, animationType) {
this.element = element;
this.renderer = renderer;
this.animationType = animationType;
this.nzNoAnimation = false;
}
/**
* @return {?}
*/
NzNoAnimationDirective.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.updateClass();
};
/**
* @return {?}
*/
NzNoAnimationDirective.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.updateClass();
};
/**
* @private
* @return {?}
*/
NzNoAnimationDirective.prototype.updateClass = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var element = coercion.coerceElement(this.element);
if (!element) {
return;
}
if (this.nzNoAnimation || this.animationType === 'NoopAnimations') {
this.renderer.addClass(element, DISABLED_CLASSNAME);
}
else {
this.renderer.removeClass(element, DISABLED_CLASSNAME);
}
};
NzNoAnimationDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzNoAnimation]',
host: {
'[@.disabled]': 'nzNoAnimation'
}
},] }
];
/** @nocollapse */
NzNoAnimationDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
];
};
NzNoAnimationDirective.propDecorators = {
nzNoAnimation: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzNoAnimationDirective.prototype, "nzNoAnimation", void 0);
return NzNoAnimationDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzNoAnimationModule = /** @class */ (function () {
function NzNoAnimationModule() {
}
NzNoAnimationModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzNoAnimationDirective],
exports: [NzNoAnimationDirective],
imports: [i2$1.CommonModule]
},] }
];
return NzNoAnimationModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAutocompleteOptgroupComponent = /** @class */ (function () {
function NzAutocompleteOptgroupComponent() {
}
NzAutocompleteOptgroupComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-auto-optgroup',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<div class=\"ant-select-dropdown-menu-item-group-title\">\n <ng-container *nzStringTemplateOutlet=\"nzLabel\">{{nzLabel}}</ng-container>\n</div>\n<ul class=\"ant-select-dropdown-menu-item-group-list\">\n <ng-content select=\"nz-auto-option\"></ng-content>\n</ul>\n",
host: {
'role': 'group',
'class': 'ant-select-dropdown-menu-item-group'
}
}] }
];
/** @nocollapse */
NzAutocompleteOptgroupComponent.ctorParameters = function () { return []; };
NzAutocompleteOptgroupComponent.propDecorators = {
nzLabel: [{ type: i0.Input }]
};
return NzAutocompleteOptgroupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} node
* @return {?}
*/
function scrollIntoView(node) {
// Non-standard
/* tslint:disable-next-line:no-string-literal */
if (node['scrollIntoViewIfNeeded']) {
/* tslint:disable-next-line:no-string-literal */
node['scrollIntoViewIfNeeded'](false);
return;
}
if (node.scrollIntoView) {
node.scrollIntoView(false);
return;
}
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzOptionSelectionChange = /** @class */ (function () {
function NzOptionSelectionChange(source, isUserInput) {
if (isUserInput === void 0) {
isUserInput = false;
}
this.source = source;
this.isUserInput = isUserInput;
}
return NzOptionSelectionChange;
}());
var NzAutocompleteOptionComponent = /** @class */ (function () {
function NzAutocompleteOptionComponent(changeDetectorRef, element) {
this.changeDetectorRef = changeDetectorRef;
this.element = element;
this.nzDisabled = false;
this.selectionChange = new i0.EventEmitter();
this.active = false;
this.selected = false;
}
/**
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.select = /**
* @return {?}
*/
function () {
this.selected = true;
this.changeDetectorRef.markForCheck();
this.emitSelectionChangeEvent();
};
/**
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.deselect = /**
* @return {?}
*/
function () {
this.selected = false;
this.changeDetectorRef.markForCheck();
this.emitSelectionChangeEvent();
};
/** Git display label */
/**
* Git display label
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.getLabel = /**
* Git display label
* @return {?}
*/
function () {
return this.nzLabel || this.nzValue.toString();
};
/** Set active (only styles) */
/**
* Set active (only styles)
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.setActiveStyles = /**
* Set active (only styles)
* @return {?}
*/
function () {
if (!this.active) {
this.active = true;
this.changeDetectorRef.markForCheck();
}
};
/** Unset active (only styles) */
/**
* Unset active (only styles)
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.setInactiveStyles = /**
* Unset active (only styles)
* @return {?}
*/
function () {
if (this.active) {
this.active = false;
this.changeDetectorRef.markForCheck();
}
};
/**
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.scrollIntoViewIfNeeded = /**
* @return {?}
*/
function () {
scrollIntoView(this.element.nativeElement);
};
/**
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.selectViaInteraction = /**
* @return {?}
*/
function () {
if (!this.nzDisabled) {
this.selected = !this.selected;
if (this.selected) {
this.setActiveStyles();
}
else {
this.setInactiveStyles();
}
this.emitSelectionChangeEvent(true);
this.changeDetectorRef.markForCheck();
}
};
/**
* @private
* @param {?=} isUserInput
* @return {?}
*/
NzAutocompleteOptionComponent.prototype.emitSelectionChangeEvent = /**
* @private
* @param {?=} isUserInput
* @return {?}
*/
function (isUserInput) {
if (isUserInput === void 0) {
isUserInput = false;
}
this.selectionChange.emit(new NzOptionSelectionChange(this, isUserInput));
};
NzAutocompleteOptionComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-auto-option',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-content></ng-content>",
host: {
'role': 'menuitem',
'class': 'ant-select-dropdown-menu-item',
'[class.ant-select-dropdown-menu-item-selected]': 'selected',
'[class.ant-select-dropdown-menu-item-active]': 'active',
'[class.ant-select-dropdown-menu-item-disabled]': 'nzDisabled',
'[attr.aria-selected]': 'selected.toString()',
'[attr.aria-disabled]': 'nzDisabled.toString()',
'(click)': 'selectViaInteraction()',
'(mousedown)': '$event.preventDefault()'
}
}] }
];
/** @nocollapse */
NzAutocompleteOptionComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: i0.ElementRef }
];
};
NzAutocompleteOptionComponent.propDecorators = {
nzValue: [{ type: i0.Input }],
nzLabel: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
selectionChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzAutocompleteOptionComponent.prototype, "nzDisabled", void 0);
return NzAutocompleteOptionComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_AUTOCOMPLETE_VALUE_ACCESSOR = {
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzAutocompleteTriggerDirective; })),
multi: true
};
/**
* @return {?}
*/
function getNzAutocompleteMissingPanelError() {
return Error('Attempting to open an undefined instance of `nz-autocomplete`. ' +
'Make sure that the id passed to the `nzAutocomplete` is correct and that ' +
'you\'re attempting to open it after the ngAfterContentInit hook.');
}
var NzAutocompleteTriggerDirective = /** @class */ (function () {
function NzAutocompleteTriggerDirective(elementRef, _overlay, viewContainerRef, document) {
this.elementRef = elementRef;
this._overlay = _overlay;
this.viewContainerRef = viewContainerRef;
this.document = document;
this._onChange = ( /**
* @return {?}
*/function () { });
this._onTouched = ( /**
* @return {?}
*/function () { });
this.panelOpen = false;
}
Object.defineProperty(NzAutocompleteTriggerDirective.prototype, "activeOption", {
/** Current active option */
get: /**
* Current active option
* @return {?}
*/ function () {
if (this.nzAutocomplete && this.nzAutocomplete.options.length) {
return this.nzAutocomplete.activeItem;
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroyPanel();
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.writeValue =
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @return {?}
*/
function (value) {
this.setTriggerValue(value);
};
/**
* @param {?} fn
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
/** @type {?} */
var element = this.elementRef.nativeElement;
element.disabled = isDisabled;
this.closePanel();
};
/**
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.openPanel = /**
* @return {?}
*/
function () {
this.attachOverlay();
};
/**
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.closePanel = /**
* @return {?}
*/
function () {
if (this.panelOpen) {
this.nzAutocomplete.isOpen = this.panelOpen = false;
if (this.overlayRef && this.overlayRef.hasAttached()) {
this.selectionChangeSubscription.unsubscribe();
this.overlayBackdropClickSubscription.unsubscribe();
this.overlayPositionChangeSubscription.unsubscribe();
this.optionsChangeSubscription.unsubscribe();
this.overlayRef.detach();
this.overlayRef = null;
this.portal = null;
}
}
};
/**
* @param {?} event
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.handleKeydown = /**
* @param {?} event
* @return {?}
*/
function (event) {
/** @type {?} */
var keyCode = event.keyCode;
/** @type {?} */
var isArrowKey = keyCode === keycodes.UP_ARROW || keyCode === keycodes.DOWN_ARROW;
if (keyCode === keycodes.ESCAPE) {
event.preventDefault();
}
if (this.panelOpen && (keyCode === keycodes.ESCAPE || keyCode === keycodes.TAB)) {
// Reset value when tab / ESC close
if (this.activeOption && this.activeOption.getLabel() !== this.previousValue) {
this.setTriggerValue(this.previousValue);
}
this.closePanel();
}
else if (this.panelOpen && keyCode === keycodes.ENTER) {
event.preventDefault();
if (this.nzAutocomplete.showPanel && this.activeOption) {
this.activeOption.selectViaInteraction();
}
}
else if (this.panelOpen && isArrowKey && this.nzAutocomplete.showPanel) {
event.stopPropagation();
if (keyCode === keycodes.UP_ARROW) {
this.nzAutocomplete.setPreviousItemActive();
}
else {
this.nzAutocomplete.setNextItemActive();
}
if (this.activeOption) {
this.activeOption.scrollIntoViewIfNeeded();
}
this.doBackfill();
}
};
/**
* @param {?} event
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.handleInput = /**
* @param {?} event
* @return {?}
*/
function (event) {
/** @type {?} */
var target = ( /** @type {?} */(event.target));
/** @type {?} */
var value = target.value;
if (target.type === 'number') {
value = value === '' ? null : parseFloat(value);
}
if (this.canOpen() && document.activeElement === event.target &&
this.previousValue !== value) {
this.previousValue = value;
this._onChange(value);
this.openPanel();
}
};
/**
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.handleFocus = /**
* @return {?}
*/
function () {
if (this.canOpen()) {
this.previousValue = this.elementRef.nativeElement.value;
this.openPanel();
}
};
/**
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.handleBlur = /**
* @return {?}
*/
function () {
this.closePanel();
this._onTouched();
};
/**
* Subscription data source changes event
*/
/**
* Subscription data source changes event
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.subscribeOptionsChange = /**
* Subscription data source changes event
* @private
* @return {?}
*/
function () {
var _this = this;
return this.nzAutocomplete.options.changes.pipe(operators.delay(0)).subscribe(( /**
* @return {?}
*/function () {
_this.resetActiveItem();
}));
};
/**
* Subscription option changes event and set the value
*/
/**
* Subscription option changes event and set the value
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.subscribeSelectionChange = /**
* Subscription option changes event and set the value
* @private
* @return {?}
*/
function () {
var _this = this;
return this.nzAutocomplete.selectionChange
.subscribe(( /**
* @param {?} option
* @return {?}
*/function (option) {
_this.setValueAndClose(option);
}));
};
/**
* Subscription external click and close panel
*/
/**
* Subscription external click and close panel
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.subscribeOverlayBackdropClick = /**
* Subscription external click and close panel
* @private
* @return {?}
*/
function () {
var _this = this;
return rxjs.merge(rxjs.fromEvent(this.document, 'click'), rxjs.fromEvent(this.document, 'touchend'))
.subscribe(( /**
* @param {?} event
* @return {?}
*/function (event) {
/** @type {?} */
var clickTarget = ( /** @type {?} */(event.target));
// Make sure is not self
if (clickTarget !== _this.elementRef.nativeElement && !_this.overlayRef.overlayElement.contains(clickTarget) && _this.panelOpen) {
_this.closePanel();
}
}));
};
/**
* Subscription overlay position changes and reset dropdown position
*/
/**
* Subscription overlay position changes and reset dropdown position
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.subscribeOverlayPositionChange = /**
* Subscription overlay position changes and reset dropdown position
* @private
* @return {?}
*/
function () {
var _this = this;
return this.positionStrategy.positionChanges
.pipe(operators.map(( /**
* @param {?} position
* @return {?}
*/function (position) { return position.connectionPair.originY; })), operators.distinct())
.subscribe(( /**
* @param {?} position
* @return {?}
*/function (position) {
_this.nzAutocomplete.dropDownPosition = position;
}));
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.attachOverlay = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (!this.nzAutocomplete) {
throw getNzAutocompleteMissingPanelError();
}
if (!this.portal) {
this.portal = new portal.TemplatePortal(this.nzAutocomplete.template, this.viewContainerRef);
}
if (!this.overlayRef) {
this.overlayRef = this._overlay.create(this.getOverlayConfig());
}
if (this.overlayRef && !this.overlayRef.hasAttached()) {
this.overlayRef.attach(this.portal);
this.overlayPositionChangeSubscription = this.subscribeOverlayPositionChange();
this.selectionChangeSubscription = this.subscribeSelectionChange();
this.overlayBackdropClickSubscription = this.subscribeOverlayBackdropClick();
this.optionsChangeSubscription = this.subscribeOptionsChange();
}
this.nzAutocomplete.isOpen = this.panelOpen = true;
this.nzAutocomplete.setVisibility();
this.overlayRef.updateSize({ width: this.nzAutocomplete.nzWidth || this.getHostWidth() });
setTimeout(( /**
* @return {?}
*/function () {
if (_this.overlayRef) {
_this.overlayRef.updatePosition();
}
}), 150);
this.resetActiveItem();
if (this.activeOption) {
this.activeOption.scrollIntoViewIfNeeded();
}
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.destroyPanel = /**
* @private
* @return {?}
*/
function () {
if (this.overlayRef) {
this.closePanel();
}
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.getOverlayConfig = /**
* @private
* @return {?}
*/
function () {
return new i2$2.OverlayConfig({
positionStrategy: this.getOverlayPosition(),
scrollStrategy: this._overlay.scrollStrategies.reposition(),
// default host element width
width: this.nzAutocomplete.nzWidth || this.getHostWidth()
});
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.getConnectedElement = /**
* @private
* @return {?}
*/
function () {
return this.elementRef;
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.getHostWidth = /**
* @private
* @return {?}
*/
function () {
return this.getConnectedElement().nativeElement.getBoundingClientRect().width;
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.getOverlayPosition = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var positions = [
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' })
];
this.positionStrategy = this._overlay.position()
.flexibleConnectedTo(this.getConnectedElement())
.withPositions(positions)
.withFlexibleDimensions(false)
.withPush(false);
return this.positionStrategy;
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.resetActiveItem = /**
* @private
* @return {?}
*/
function () {
if (this.nzAutocomplete.activeItem && this.nzAutocomplete.getOptionIndex(this.nzAutocomplete.activeItem)) {
this.nzAutocomplete.setActiveItem(this.nzAutocomplete.getOptionIndex(this.nzAutocomplete.activeItem));
}
else {
this.nzAutocomplete.setActiveItem(this.nzAutocomplete.nzDefaultActiveFirstOption ? 0 : -1);
}
};
/**
* @private
* @param {?} option
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.setValueAndClose = /**
* @private
* @param {?} option
* @return {?}
*/
function (option) {
/** @type {?} */
var value = option.nzValue;
this.setTriggerValue(option.getLabel());
this._onChange(value);
this.elementRef.nativeElement.focus();
this.closePanel();
};
/**
* @private
* @param {?} value
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.setTriggerValue = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
this.elementRef.nativeElement.value = value || '';
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.doBackfill = /**
* @private
* @return {?}
*/
function () {
if (this.nzAutocomplete.nzBackfill && this.nzAutocomplete.activeItem) {
this.setTriggerValue(this.nzAutocomplete.activeItem.getLabel());
}
};
/**
* @private
* @return {?}
*/
NzAutocompleteTriggerDirective.prototype.canOpen = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var element = this.elementRef.nativeElement;
return !element.readOnly && !element.disabled;
};
NzAutocompleteTriggerDirective.decorators = [
{ type: i0.Directive, args: [{
selector: "input[nzAutocomplete], textarea[nzAutocomplete]",
providers: [NZ_AUTOCOMPLETE_VALUE_ACCESSOR],
host: {
'autocomplete': 'off',
'aria-autocomplete': 'list',
'(focusin)': 'handleFocus()',
'(blur)': 'handleBlur()',
'(input)': 'handleInput($event)',
'(keydown)': 'handleKeydown($event)'
}
},] }
];
/** @nocollapse */
NzAutocompleteTriggerDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i2$2.Overlay },
{ type: i0.ViewContainerRef },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2$1.DOCUMENT,] }] }
];
};
NzAutocompleteTriggerDirective.propDecorators = {
nzAutocomplete: [{ type: i0.Input }]
};
return NzAutocompleteTriggerDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAutocompleteComponent = /** @class */ (function () {
function NzAutocompleteComponent(changeDetectorRef, ngZone, noAnimation) {
var _this = this;
this.changeDetectorRef = changeDetectorRef;
this.ngZone = ngZone;
this.noAnimation = noAnimation;
this.nzOverlayClassName = '';
this.nzOverlayStyle = {};
this.nzDefaultActiveFirstOption = true;
this.nzBackfill = false;
this.selectionChange = new i0.EventEmitter();
this.showPanel = false;
this.isOpen = false;
this.dropDownPosition = 'bottom';
this.activeItemIndex = -1;
this.selectionChangeSubscription = rxjs.Subscription.EMPTY;
this.dataSourceChangeSubscription = rxjs.Subscription.EMPTY;
/**
* Options changes listener
*/
this.optionSelectionChanges = rxjs.defer(( /**
* @return {?}
*/function () {
if (_this.options) {
return rxjs.merge.apply(void 0, __spread(_this.options.map(( /**
* @param {?} option
* @return {?}
*/function (option) { return option.selectionChange; }))));
}
return _this.ngZone.onStable
.asObservable()
.pipe(operators.take(1), operators.switchMap(( /**
* @return {?}
*/function () { return _this.optionSelectionChanges; })));
}));
}
Object.defineProperty(NzAutocompleteComponent.prototype, "options", {
/**
* Options accessor, its source may be content or dataSource
*/
get: /**
* Options accessor, its source may be content or dataSource
* @return {?}
*/ function () {
// first dataSource
if (this.nzDataSource) {
return this.fromDataSourceOptions;
}
else {
return this.fromContentOptions;
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzAutocompleteComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.optionsInit();
};
/**
* @return {?}
*/
NzAutocompleteComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.dataSourceChangeSubscription.unsubscribe();
this.selectionChangeSubscription.unsubscribe();
};
/**
* @return {?}
*/
NzAutocompleteComponent.prototype.setVisibility = /**
* @return {?}
*/
function () {
this.showPanel = !!this.options.length;
this.changeDetectorRef.markForCheck();
};
/**
* @param {?} index
* @return {?}
*/
NzAutocompleteComponent.prototype.setActiveItem = /**
* @param {?} index
* @return {?}
*/
function (index) {
/** @type {?} */
var activeItem = this.options.toArray()[index];
if (activeItem && !activeItem.active) {
this.activeItem = activeItem;
this.activeItemIndex = index;
this.clearSelectedOptions(this.activeItem);
this.activeItem.setActiveStyles();
this.changeDetectorRef.markForCheck();
}
};
/**
* @return {?}
*/
NzAutocompleteComponent.prototype.setNextItemActive = /**
* @return {?}
*/
function () {
/** @type {?} */
var nextIndex = this.activeItemIndex + 1 <= this.options.length - 1 ? this.activeItemIndex + 1 : 0;
this.setActiveItem(nextIndex);
};
/**
* @return {?}
*/
NzAutocompleteComponent.prototype.setPreviousItemActive = /**
* @return {?}
*/
function () {
/** @type {?} */
var previousIndex = this.activeItemIndex - 1 < 0 ? this.options.length - 1 : this.activeItemIndex - 1;
this.setActiveItem(previousIndex);
};
/**
* @param {?} option
* @return {?}
*/
NzAutocompleteComponent.prototype.getOptionIndex = /**
* @param {?} option
* @return {?}
*/
function (option) {
return this.options.reduce(( /**
* @param {?} result
* @param {?} current
* @param {?} index
* @return {?}
*/function (result, current, index) {
return result === undefined ? (option === current ? index : undefined) : result;
}), undefined);
};
/**
* @private
* @return {?}
*/
NzAutocompleteComponent.prototype.optionsInit = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.setVisibility();
this.subscribeOptionChanges();
/** @type {?} */
var changes = this.nzDataSource ? this.fromDataSourceOptions.changes : this.fromContentOptions.changes;
// async
this.dataSourceChangeSubscription = changes.subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) {
if (!e.dirty && _this.isOpen) {
setTimeout(( /**
* @return {?}
*/function () { return _this.setVisibility(); }));
}
_this.subscribeOptionChanges();
}));
};
/**
* Clear the status of options
*/
/**
* Clear the status of options
* @private
* @param {?=} skip
* @param {?=} deselect
* @return {?}
*/
NzAutocompleteComponent.prototype.clearSelectedOptions = /**
* Clear the status of options
* @private
* @param {?=} skip
* @param {?=} deselect
* @return {?}
*/
function (skip, deselect) {
if (deselect === void 0) {
deselect = false;
}
this.options.forEach(( /**
* @param {?} option
* @return {?}
*/function (option) {
if (option !== skip) {
if (deselect) {
option.deselect();
}
option.setInactiveStyles();
}
}));
};
/**
* @private
* @return {?}
*/
NzAutocompleteComponent.prototype.subscribeOptionChanges = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.selectionChangeSubscription.unsubscribe();
this.selectionChangeSubscription = this.optionSelectionChanges
.pipe(operators.filter(( /**
* @param {?} event
* @return {?}
*/function (event) { return event.isUserInput; })))
.subscribe(( /**
* @param {?} event
* @return {?}
*/function (event) {
event.source.select();
event.source.setActiveStyles();
_this.activeItem = event.source;
_this.activeItemIndex = _this.getOptionIndex(_this.activeItem);
_this.clearSelectedOptions(event.source, true);
_this.selectionChange.emit(event.source);
}));
};
NzAutocompleteComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-autocomplete',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-template>\n <div class=\"ant-select-dropdown ant-select-dropdown--single ant-select-dropdown-placement-bottomLeft\"\n #panel\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [@slideMotion]=\"dropDownPosition\"\n [class.ant-select-dropdown-hidden]=\"!showPanel\" [ngClass]=\"nzOverlayClassName\" [ngStyle]=\"nzOverlayStyle\">\n <div style=\"overflow: auto;\">\n <ul class=\"ant-select-dropdown-menu ant-select-dropdown-menu-root ant-select-dropdown-menu-vertical\"\n role=\"menu\"\n aria-activedescendant>\n <ng-template *ngTemplateOutlet=\"nzDataSource ? optionsTemplate : contentTemplate\"></ng-template>\n </ul>\n </div>\n </div>\n <ng-template #contentTemplate>\n <ng-content></ng-content>\n </ng-template>\n <ng-template #optionsTemplate>\n <nz-auto-option *ngFor=\"let option of nzDataSource\" [nzValue]=\"option\">{{option}}</nz-auto-option>\n </ng-template>\n</ng-template>",
animations: [
slideMotion
],
styles: ["\n .ant-select-dropdown {\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n margin-top: 4px;\n margin-bottom: 4px;\n }\n "]
}] }
];
/** @nocollapse */
NzAutocompleteComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: i0.NgZone },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzAutocompleteComponent.propDecorators = {
nzWidth: [{ type: i0.Input }],
nzOverlayClassName: [{ type: i0.Input }],
nzOverlayStyle: [{ type: i0.Input }],
nzDefaultActiveFirstOption: [{ type: i0.Input }],
nzBackfill: [{ type: i0.Input }],
nzDataSource: [{ type: i0.Input }],
selectionChange: [{ type: i0.Output }],
fromContentOptions: [{ type: i0.ContentChildren, args: [NzAutocompleteOptionComponent, { descendants: true },] }],
fromDataSourceOptions: [{ type: i0.ViewChildren, args: [NzAutocompleteOptionComponent,] }],
template: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }],
panel: [{ type: i0.ViewChild, args: ['panel',] }],
content: [{ type: i0.ViewChild, args: ['content',] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzAutocompleteComponent.prototype, "nzDefaultActiveFirstOption", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzAutocompleteComponent.prototype, "nzBackfill", void 0);
return NzAutocompleteComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAutocompleteModule = /** @class */ (function () {
function NzAutocompleteModule() {
}
NzAutocompleteModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzAutocompleteComponent, NzAutocompleteOptionComponent, NzAutocompleteTriggerDirective, NzAutocompleteOptgroupComponent],
exports: [NzAutocompleteComponent, NzAutocompleteOptionComponent, NzAutocompleteTriggerDirective, NzAutocompleteOptgroupComponent],
imports: [i2$1.CommonModule, i2$2.OverlayModule, forms.FormsModule, NzAddOnModule, NzNoAnimationModule]
},] }
];
return NzAutocompleteModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzUpdateHostClassService = /** @class */ (function () {
function NzUpdateHostClassService(rendererFactory2) {
this.classMap = {};
this.renderer = rendererFactory2.createRenderer(null, null);
}
/**
* @param {?} el
* @param {?} classMap
* @return {?}
*/
NzUpdateHostClassService.prototype.updateHostClass = /**
* @param {?} el
* @param {?} classMap
* @return {?}
*/
function (el, classMap) {
this.removeClass(el, this.classMap, this.renderer);
this.classMap = __assign({}, classMap);
this.addClass(el, this.classMap, this.renderer);
};
/**
* @private
* @param {?} el
* @param {?} classMap
* @param {?} renderer
* @return {?}
*/
NzUpdateHostClassService.prototype.removeClass = /**
* @private
* @param {?} el
* @param {?} classMap
* @param {?} renderer
* @return {?}
*/
function (el, classMap, renderer) {
for (var i in classMap) {
if (classMap.hasOwnProperty(i)) {
renderer.removeClass(el, i);
}
}
};
/**
* @private
* @param {?} el
* @param {?} classMap
* @param {?} renderer
* @return {?}
*/
NzUpdateHostClassService.prototype.addClass = /**
* @private
* @param {?} el
* @param {?} classMap
* @param {?} renderer
* @return {?}
*/
function (el, classMap, renderer) {
for (var i in classMap) {
if (classMap.hasOwnProperty(i)) {
if (classMap[i]) {
renderer.addClass(el, i);
}
}
}
};
NzUpdateHostClassService.decorators = [
{ type: i0.Injectable }
];
/** @nocollapse */
NzUpdateHostClassService.ctorParameters = function () {
return [
{ type: i0.RendererFactory2 }
];
};
return NzUpdateHostClassService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAvatarComponent = /** @class */ (function () {
function NzAvatarComponent(elementRef, cd, updateHostClassService, renderer) {
this.elementRef = elementRef;
this.cd = cd;
this.updateHostClassService = updateHostClassService;
this.renderer = renderer;
this.nzShape = 'circle';
this.nzSize = 'default';
this.oldAPIIcon = true; // Make the user defined icon compatible to old API. Should be removed in 2.0.
// Make the user defined icon compatible to old API. Should be removed in 2.0.
this.hasText = false;
this.hasSrc = true;
this.hasIcon = false;
this.el = this.elementRef.nativeElement;
this.prefixCls = 'ant-avatar';
this.sizeMap = { large: 'lg', small: 'sm' };
}
/**
* @template THIS
* @this {THIS}
* @return {THIS}
*/
NzAvatarComponent.prototype.setClass = /**
* @template THIS
* @this {THIS}
* @return {THIS}
*/
function () {
var _a;
/** @type {?} */
var classMap = (_a = {},
_a[( /** @type {?} */(this)).prefixCls] = true,
_a[( /** @type {?} */(this)).prefixCls + "-" + ( /** @type {?} */(this)).sizeMap[( /** @type {?} */(this)).nzSize]] = ( /** @type {?} */(this)).sizeMap[( /** @type {?} */(this)).nzSize],
_a[( /** @type {?} */(this)).prefixCls + "-" + ( /** @type {?} */(this)).nzShape] = ( /** @type {?} */(this)).nzShape,
_a[( /** @type {?} */(this)).prefixCls + "-icon"] = ( /** @type {?} */(this)).nzIcon,
_a[( /** @type {?} */(this)).prefixCls + "-image"] = ( /** @type {?} */(this)).hasSrc // downgrade after image error
,
_a);
( /** @type {?} */(this)).updateHostClassService.updateHostClass(( /** @type {?} */(this)).el, classMap);
( /** @type {?} */(this)).cd.detectChanges();
return ( /** @type {?} */(this));
};
/**
* @return {?}
*/
NzAvatarComponent.prototype.imgError = /**
* @return {?}
*/
function () {
this.hasSrc = false;
this.hasIcon = false;
this.hasText = false;
if (this.nzIcon) {
this.hasIcon = true;
}
else if (this.nzText) {
this.hasText = true;
}
this.setClass().notifyCalc();
this.setSizeStyle();
};
/**
* @param {?} changes
* @return {?}
*/
NzAvatarComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.hasOwnProperty('nzIcon') && changes.nzIcon.currentValue) {
this.oldAPIIcon = changes.nzIcon.currentValue.indexOf('anticon') > -1;
}
this.hasText = !this.nzSrc && !!this.nzText;
this.hasIcon = !this.nzSrc && !!this.nzIcon;
this.hasSrc = !!this.nzSrc;
this.setClass().notifyCalc();
this.setSizeStyle();
};
/**
* @private
* @return {?}
*/
NzAvatarComponent.prototype.calcStringSize = /**
* @private
* @return {?}
*/
function () {
if (!this.hasText) {
return;
}
/** @type {?} */
var childrenWidth = this.textEl.nativeElement.offsetWidth;
/** @type {?} */
var avatarWidth = this.el.getBoundingClientRect().width;
/** @type {?} */
var scale = avatarWidth - 8 < childrenWidth ? (avatarWidth - 8) / childrenWidth : 1;
this.textStyles = {
transform: "scale(" + scale + ") translateX(-50%)"
};
if (typeof this.nzSize === 'number') {
Object.assign(this.textStyles, {
lineHeight: this.nzSize + "px"
});
}
this.cd.detectChanges();
};
/**
* @private
* @template THIS
* @this {THIS}
* @return {THIS}
*/
NzAvatarComponent.prototype.notifyCalc = /**
* @private
* @template THIS
* @this {THIS}
* @return {THIS}
*/
function () {
var _this = this;
// If use ngAfterViewChecked, always demands more computations, so......
setTimeout(( /**
* @return {?}
*/function () {
( /** @type {?} */(_this)).calcStringSize();
}));
return ( /** @type {?} */(this));
};
/**
* @private
* @return {?}
*/
NzAvatarComponent.prototype.setSizeStyle = /**
* @private
* @return {?}
*/
function () {
if (typeof this.nzSize === 'string') {
return;
}
this.renderer.setStyle(this.el, 'width', this.nzSize + "px");
this.renderer.setStyle(this.el, 'height', this.nzSize + "px");
this.renderer.setStyle(this.el, 'line-height', this.nzSize + "px");
if (this.hasIcon) {
this.renderer.setStyle(this.el, 'font-size', this.nzSize / 2 + "px");
}
};
NzAvatarComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-avatar',
template: "<i nz-icon *ngIf=\"nzIcon && hasIcon\" [type]=\"!oldAPIIcon && nzIcon\" [ngClass]=\"oldAPIIcon && nzIcon\"></i>\n<img [src]=\"nzSrc\" *ngIf=\"nzSrc && hasSrc\" (error)=\"imgError()\"/>\n<span class=\"ant-avatar-string\" #textEl [ngStyle]=\"textStyles\" *ngIf=\"nzText && hasText\">{{ nzText }}</span>",
providers: [NzUpdateHostClassService],
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None
}] }
];
/** @nocollapse */
NzAvatarComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.ChangeDetectorRef },
{ type: NzUpdateHostClassService },
{ type: i0.Renderer2 }
];
};
NzAvatarComponent.propDecorators = {
nzShape: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzText: [{ type: i0.Input }],
nzSrc: [{ type: i0.Input }],
nzIcon: [{ type: i0.Input }],
textEl: [{ type: i0.ViewChild, args: ['textEl',] }]
};
return NzAvatarComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAvatarModule = /** @class */ (function () {
function NzAvatarModule() {
}
NzAvatarModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzAvatarComponent],
exports: [NzAvatarComponent],
imports: [i2$1.CommonModule, NzIconModule]
},] }
];
return NzAvatarModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var fadeMotion = animations$1.trigger('fadeMotion', [
animations$1.transition(':enter', [
animations$1.style({ opacity: 0 }),
animations$1.animate("" + AnimationDuration.BASE, animations$1.style({ opacity: 1 }))
]),
animations$1.transition(':leave', [
animations$1.style({ opacity: 1 }),
animations$1.animate("" + AnimationDuration.BASE, animations$1.style({ opacity: 0 }))
])
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzBackTopComponent = /** @class */ (function () {
// tslint:disable-next-line:no-any
function NzBackTopComponent(scrollSrv, doc, cd) {
this.scrollSrv = scrollSrv;
this.doc = doc;
this.cd = cd;
this.scroll$ = null;
this.target = null;
this.visible = false;
this._visibilityHeight = 400;
this.nzClick = new i0.EventEmitter();
}
Object.defineProperty(NzBackTopComponent.prototype, "nzVisibilityHeight", {
get: /**
* @return {?}
*/ function () {
return this._visibilityHeight;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._visibilityHeight = toNumber(value, 400);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzBackTopComponent.prototype, "nzTarget", {
set: /**
* @param {?} el
* @return {?}
*/ function (el) {
this.target = typeof el === 'string' ? this.doc.querySelector(el) : el;
this.registerScrollEvent();
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzBackTopComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
if (!this.scroll$) {
this.registerScrollEvent();
}
};
/**
* @return {?}
*/
NzBackTopComponent.prototype.clickBackTop = /**
* @return {?}
*/
function () {
this.scrollSrv.scrollTo(this.getTarget(), 0);
this.nzClick.emit(true);
};
/**
* @private
* @return {?}
*/
NzBackTopComponent.prototype.getTarget = /**
* @private
* @return {?}
*/
function () {
return this.target || window;
};
/**
* @private
* @return {?}
*/
NzBackTopComponent.prototype.handleScroll = /**
* @private
* @return {?}
*/
function () {
if (this.visible === this.scrollSrv.getScroll(this.getTarget()) > this.nzVisibilityHeight) {
return;
}
this.visible = !this.visible;
this.cd.markForCheck();
};
/**
* @private
* @return {?}
*/
NzBackTopComponent.prototype.removeListen = /**
* @private
* @return {?}
*/
function () {
if (this.scroll$) {
this.scroll$.unsubscribe();
}
};
/**
* @private
* @return {?}
*/
NzBackTopComponent.prototype.registerScrollEvent = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.removeListen();
this.handleScroll();
this.scroll$ = rxjs.fromEvent(this.getTarget(), 'scroll').pipe(operators.throttleTime(50), operators.distinctUntilChanged())
.subscribe(( /**
* @return {?}
*/function () { return _this.handleScroll(); }));
};
/**
* @return {?}
*/
NzBackTopComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.removeListen();
};
NzBackTopComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-back-top',
animations: [fadeMotion],
template: "<div class=\"ant-back-top\" (click)=\"clickBackTop()\" @fadeMotion *ngIf=\"visible\">\n <ng-template #defaultContent>\n <div class=\"ant-back-top-content\">\n <div class=\"ant-back-top-icon\"></div>\n </div>\n </ng-template>\n <ng-template [ngTemplateOutlet]=\"nzTemplate || defaultContent\"></ng-template>\n</div>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false
}] }
];
/** @nocollapse */
NzBackTopComponent.ctorParameters = function () {
return [
{ type: NzScrollService },
{ type: undefined, decorators: [{ type: i0.Inject, args: [i2$1.DOCUMENT,] }] },
{ type: i0.ChangeDetectorRef }
];
};
NzBackTopComponent.propDecorators = {
nzTemplate: [{ type: i0.Input }],
nzVisibilityHeight: [{ type: i0.Input }],
nzTarget: [{ type: i0.Input }],
nzClick: [{ type: i0.Output }]
};
return NzBackTopComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzBackTopModule = /** @class */ (function () {
function NzBackTopModule() {
}
NzBackTopModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzBackTopComponent],
exports: [NzBackTopComponent],
imports: [i2$1.CommonModule],
providers: [SCROLL_SERVICE_PROVIDER]
},] }
];
return NzBackTopModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var zoomMotion = animations$1.trigger('zoomMotion', [
animations$1.transition(':enter', [
animations$1.style({ opacity: 0, transform: 'scale(0.2)' }),
animations$1.animate(AnimationDuration.BASE + " " + AnimationCurves.EASE_OUT_CIRC, animations$1.style({
opacity: 1,
transform: 'scale(1)'
}))
]),
animations$1.transition(':leave', [
animations$1.style({ opacity: 1, transform: 'scale(1)' }),
animations$1.animate(AnimationDuration.BASE + " " + AnimationCurves.EASE_IN_OUT_CIRC, animations$1.style({
opacity: 0,
transform: 'scale(0.2)'
}))
])
]);
/** @type {?} */
var zoomBigMotion = animations$1.trigger('zoomBigMotion', [
animations$1.transition('void => active', [
animations$1.style({ opacity: 0, transform: 'scale(0.8)' }),
animations$1.animate(AnimationDuration.BASE + " " + AnimationCurves.EASE_OUT_CIRC, animations$1.style({
opacity: 1,
transform: 'scale(1)'
}))
]),
animations$1.transition('active => void', [
animations$1.style({ opacity: 1, transform: 'scale(1)' }),
animations$1.animate(AnimationDuration.BASE + " " + AnimationCurves.EASE_IN_OUT_CIRC, animations$1.style({
opacity: 0,
transform: 'scale(0.8)'
}))
])
]);
/** @type {?} */
var zoomBadgeMotion = animations$1.trigger('zoomBadgeMotion', [
animations$1.transition(':enter', [
animations$1.style({ opacity: 0, transform: 'scale(0) translate(50%, -50%)' }),
animations$1.animate(AnimationDuration.SLOW + " " + AnimationCurves.EASE_OUT_BACK, animations$1.style({
opacity: 1,
transform: 'scale(1) translate(50%, -50%)'
}))
]),
animations$1.transition(':leave', [
animations$1.style({ opacity: 1, transform: 'scale(1) translate(50%, -50%)' }),
animations$1.animate(AnimationDuration.SLOW + " " + AnimationCurves.EASE_IN_BACK, animations$1.style({
opacity: 0,
transform: 'scale(0) translate(50%, -50%)'
}))
])
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzBadgeComponent = /** @class */ (function () {
function NzBadgeComponent(renderer, elementRef) {
this.renderer = renderer;
this.elementRef = elementRef;
this.maxNumberArray = [];
this.countArray = [];
this.countSingleArray = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
this.nzShowZero = false;
this.nzShowDot = true;
this.nzDot = false;
this.nzOverflowCount = 99;
renderer.addClass(elementRef.nativeElement, 'ant-badge');
}
/**
* @return {?}
*/
NzBadgeComponent.prototype.checkContent = /**
* @return {?}
*/
function () {
if (isEmpty(this.contentElement.nativeElement)) {
this.renderer.addClass(this.elementRef.nativeElement, 'ant-badge-not-a-wrapper');
}
else {
this.renderer.removeClass(this.elementRef.nativeElement, 'ant-badge-not-a-wrapper');
}
};
Object.defineProperty(NzBadgeComponent.prototype, "showSup", {
get: /**
* @return {?}
*/ function () {
return (this.nzShowDot && this.nzDot) || this.count > 0 || (this.count === 0 && this.nzShowZero);
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzBadgeComponent.prototype.generateMaxNumberArray = /**
* @return {?}
*/
function () {
this.maxNumberArray = this.nzOverflowCount.toString().split('');
};
/**
* @return {?}
*/
NzBadgeComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.generateMaxNumberArray();
};
/**
* @return {?}
*/
NzBadgeComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.checkContent();
};
/**
* @param {?} changes
* @return {?}
*/
NzBadgeComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var nzOverflowCount = changes.nzOverflowCount, nzCount = changes.nzCount;
if (nzCount && !(nzCount.currentValue instanceof i0.TemplateRef)) {
this.count = Math.max(0, nzCount.currentValue);
this.countArray = this.count.toString().split('').map(( /**
* @param {?} item
* @return {?}
*/function (item) { return +item; }));
}
if (nzOverflowCount) {
this.generateMaxNumberArray();
}
};
NzBadgeComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-badge',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
animations: [zoomBadgeMotion],
template: "<span (cdkObserveContent)=\"checkContent()\" #contentElement><ng-content></ng-content></span>\n<span class=\"ant-badge-status-dot ant-badge-status-{{nzStatus}}\" *ngIf=\"nzStatus\" [ngStyle]=\"nzStyle\"></span>\n<span class=\"ant-badge-status-text\" *ngIf=\"nzStatus\">{{ nzText }}</span>\n<ng-container *nzStringTemplateOutlet=\"nzCount\">\n <sup class=\"ant-scroll-number\"\n *ngIf=\"showSup\"\n @zoomBadgeMotion\n [ngStyle]=\"nzStyle\"\n [class.ant-badge-count]=\"!nzDot\"\n [class.ant-badge-dot]=\"nzDot\"\n [class.ant-badge-multiple-words]=\"countArray.length>=2\">\n <ng-container *ngFor=\"let n of maxNumberArray;let i = index;\">\n <span class=\"ant-scroll-number-only\"\n *ngIf=\"count <= nzOverflowCount\"\n [style.transform]=\"'translateY(' + (-countArray[i] * 100) + '%)'\">\n <ng-container *ngIf=\"(!nzDot)&&(countArray[i]!=null)\">\n <p *ngFor=\"let p of countSingleArray\" [class.current]=\"p === countArray[i]\">{{ p }}</p>\n </ng-container>\n </span>\n </ng-container>\n <ng-container *ngIf=\"count > nzOverflowCount\">{{ nzOverflowCount }}+</ng-container>\n </sup>\n</ng-container>",
host: {
'[class.ant-badge-status]': 'nzStatus'
}
}] }
];
/** @nocollapse */
NzBadgeComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzBadgeComponent.propDecorators = {
contentElement: [{ type: i0.ViewChild, args: ['contentElement',] }],
nzShowZero: [{ type: i0.Input }],
nzShowDot: [{ type: i0.Input }],
nzDot: [{ type: i0.Input }],
nzOverflowCount: [{ type: i0.Input }],
nzText: [{ type: i0.Input }],
nzStyle: [{ type: i0.Input }],
nzStatus: [{ type: i0.Input }],
nzCount: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzBadgeComponent.prototype, "nzShowZero", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzBadgeComponent.prototype, "nzShowDot", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzBadgeComponent.prototype, "nzDot", void 0);
return NzBadgeComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzBadgeModule = /** @class */ (function () {
function NzBadgeModule() {
}
NzBadgeModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzBadgeComponent],
exports: [NzBadgeComponent],
imports: [i2$1.CommonModule, observers.ObserversModule, NzAddOnModule]
},] }
];
return NzBadgeModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_ROUTE_DATA_BREADCRUMB = 'breadcrumb';
var NzBreadCrumbComponent = /** @class */ (function () {
function NzBreadCrumbComponent(injector, ngZone, cd, elementRef, renderer) {
this.injector = injector;
this.ngZone = ngZone;
this.cd = cd;
this.nzAutoGenerate = false;
this.nzSeparator = '/';
this.breadcrumbs = [];
this.destroy$ = new rxjs.Subject();
renderer.addClass(elementRef.nativeElement, 'ant-breadcrumb');
}
/**
* @return {?}
*/
NzBreadCrumbComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.nzAutoGenerate) {
try {
/** @type {?} */
var activatedRoute_1 = this.injector.get(router.ActivatedRoute);
/** @type {?} */
var router$$1 = this.injector.get(router.Router);
router$$1.events.pipe(operators.filter(( /**
* @param {?} e
* @return {?}
*/function (e) { return e instanceof router.NavigationEnd; })), operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.breadcrumbs = _this.getBreadcrumbs(activatedRoute_1.root);
_this.cd.markForCheck();
}));
}
catch (e) {
throw new Error('[NG-ZORRO] You should import RouterModule if you want to use NzAutoGenerate');
}
}
};
/**
* @return {?}
*/
NzBreadCrumbComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
/**
* @param {?} url
* @param {?} e
* @return {?}
*/
NzBreadCrumbComponent.prototype.navigate = /**
* @param {?} url
* @param {?} e
* @return {?}
*/
function (url, e) {
var _this = this;
e.preventDefault();
this.ngZone.run(( /**
* @return {?}
*/function () { return _this.injector.get(router.Router).navigateByUrl(url).then(); })).then();
};
/**
* @private
* @param {?} route
* @param {?=} url
* @param {?=} breadcrumbs
* @return {?}
*/
NzBreadCrumbComponent.prototype.getBreadcrumbs = /**
* @private
* @param {?} route
* @param {?=} url
* @param {?=} breadcrumbs
* @return {?}
*/
function (route, url, breadcrumbs) {
if (url === void 0) {
url = '';
}
if (breadcrumbs === void 0) {
breadcrumbs = [];
}
var e_1, _a;
/** @type {?} */
var children = route.children;
// If there's no sub root, then stop the recurse and returns the generated breadcrumbs.
if (children.length === 0) {
return breadcrumbs;
}
try {
for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {
var child = children_1_1.value;
if (child.outlet === router.PRIMARY_OUTLET) {
// Only parse components in primary router-outlet (in another word, router-outlet without a specific name).
// Parse this layer and generate a breadcrumb item.
/** @type {?} */
var routeURL = child.snapshot.url.map(( /**
* @param {?} segment
* @return {?}
*/function (segment) { return segment.path; })).join('/');
/** @type {?} */
var nextUrl = url + ("/" + routeURL);
// If have data, go to generate a breadcrumb for it.
if (child.snapshot.data.hasOwnProperty(NZ_ROUTE_DATA_BREADCRUMB)) {
/** @type {?} */
var breadcrumb = {
label: child.snapshot.data[NZ_ROUTE_DATA_BREADCRUMB] || 'Breadcrumb',
params: child.snapshot.params,
url: nextUrl
};
breadcrumbs.push(breadcrumb);
}
return this.getBreadcrumbs(child, nextUrl, breadcrumbs);
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (children_1_1 && !children_1_1.done && (_a = children_1.return))
_a.call(children_1);
}
finally {
if (e_1)
throw e_1.error;
}
}
};
NzBreadCrumbComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-breadcrumb',
preserveWhitespaces: false,
template: "<ng-content></ng-content>\n<ng-container *ngIf=\"nzAutoGenerate\">\n <nz-breadcrumb-item *ngFor=\"let breadcrumb of breadcrumbs\">\n <a [attr.href]=\"breadcrumb.url\" (click)=\"navigate(breadcrumb.url, $event)\">{{ breadcrumb.label }}</a>\n </nz-breadcrumb-item>\n</ng-container>",
styles: ["\n nz-breadcrumb {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzBreadCrumbComponent.ctorParameters = function () {
return [
{ type: i0.Injector },
{ type: i0.NgZone },
{ type: i0.ChangeDetectorRef },
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzBreadCrumbComponent.propDecorators = {
nzAutoGenerate: [{ type: i0.Input }],
nzSeparator: [{ type: i0.Input }]
};
return NzBreadCrumbComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzBreadCrumbItemComponent = /** @class */ (function () {
function NzBreadCrumbItemComponent(nzBreadCrumbComponent) {
this.nzBreadCrumbComponent = nzBreadCrumbComponent;
}
NzBreadCrumbItemComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-breadcrumb-item',
preserveWhitespaces: false,
template: "<span class=\"ant-breadcrumb-link\">\n <ng-content></ng-content>\n</span>\n<span class=\"ant-breadcrumb-separator\">\n <ng-container *nzStringTemplateOutlet=\"nzBreadCrumbComponent.nzSeparator\">\n {{ nzBreadCrumbComponent.nzSeparator }}\n </ng-container>\n</span>",
styles: ["\n nz-breadcrumb-item:last-child {\n color: rgba(0, 0, 0, 0.65);\n }\n\n nz-breadcrumb-item:last-child .ant-breadcrumb-separator {\n display: none;\n }\n "]
}] }
];
/** @nocollapse */
NzBreadCrumbItemComponent.ctorParameters = function () {
return [
{ type: NzBreadCrumbComponent }
];
};
return NzBreadCrumbItemComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzBreadCrumbModule = /** @class */ (function () {
function NzBreadCrumbModule() {
}
NzBreadCrumbModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, NzAddOnModule],
declarations: [NzBreadCrumbComponent, NzBreadCrumbItemComponent],
exports: [NzBreadCrumbComponent, NzBreadCrumbItemComponent]
},] }
];
return NzBreadCrumbModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzWaveRenderer = /** @class */ (function () {
function NzWaveRenderer(triggerElement, ngZone, insertExtraNode) {
var _this = this;
this.triggerElement = triggerElement;
this.ngZone = ngZone;
this.insertExtraNode = insertExtraNode;
this.waveTransitionDuration = 400;
this.lastTime = 0;
this.onClick = ( /**
* @param {?} event
* @return {?}
*/function (event) {
if (!_this.triggerElement ||
!_this.triggerElement.getAttribute ||
_this.triggerElement.getAttribute('disabled') ||
(( /** @type {?} */(event.target))).tagName === 'INPUT' ||
_this.triggerElement.className.indexOf('disabled') >= 0) {
return;
}
_this.fadeOutWave();
});
/** @type {?} */
var platform$$1 = new platform.Platform();
if (platform$$1.isBrowser) {
this.bindTriggerEvent();
}
}
Object.defineProperty(NzWaveRenderer.prototype, "waveAttributeName", {
get: /**
* @return {?}
*/ function () {
return this.insertExtraNode ? 'ant-click-animating' : 'ant-click-animating-without-extra-node';
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzWaveRenderer.prototype.bindTriggerEvent = /**
* @return {?}
*/
function () {
var _this = this;
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
if (_this.triggerElement) {
_this.triggerElement.addEventListener('click', _this.onClick, true);
}
}));
};
/**
* @return {?}
*/
NzWaveRenderer.prototype.removeTriggerEvent = /**
* @return {?}
*/
function () {
if (this.triggerElement) {
this.triggerElement.removeEventListener('click', this.onClick, true);
}
};
/**
* @return {?}
*/
NzWaveRenderer.prototype.removeStyleAndExtraNode = /**
* @return {?}
*/
function () {
if (this.styleForPseudo && document.body.contains(this.styleForPseudo)) {
document.body.removeChild(this.styleForPseudo);
this.styleForPseudo = null;
}
if (this.insertExtraNode && this.triggerElement.contains(this.extraNode)) {
this.triggerElement.removeChild(this.extraNode);
}
};
/**
* @return {?}
*/
NzWaveRenderer.prototype.destroy = /**
* @return {?}
*/
function () {
this.removeTriggerEvent();
this.removeStyleAndExtraNode();
};
/**
* @private
* @return {?}
*/
NzWaveRenderer.prototype.fadeOutWave = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var node = this.triggerElement;
/** @type {?} */
var waveColor = this.getWaveColor(node);
node.setAttribute(this.waveAttributeName, 'true');
if (Date.now() < this.lastTime + this.waveTransitionDuration) {
return;
}
if (this.isValidColor(waveColor)) {
if (!this.styleForPseudo) {
this.styleForPseudo = document.createElement('style');
}
this.styleForPseudo.innerHTML =
"[ant-click-animating-without-extra-node]:after { border-color: " + waveColor + "; }";
document.body.appendChild(this.styleForPseudo);
}
if (this.insertExtraNode) {
if (!this.extraNode) {
this.extraNode = document.createElement('div');
}
this.extraNode.className = 'ant-click-animating-node';
node.appendChild(this.extraNode);
}
this.lastTime = Date.now();
this.runTimeoutOutsideZone(( /**
* @return {?}
*/function () {
node.removeAttribute(_this.waveAttributeName);
_this.removeStyleAndExtraNode();
}), this.waveTransitionDuration);
};
/**
* @private
* @param {?} color
* @return {?}
*/
NzWaveRenderer.prototype.isValidColor = /**
* @private
* @param {?} color
* @return {?}
*/
function (color) {
return color
&& color !== '#ffffff'
&& color !== 'rgb(255, 255, 255)'
&& this.isNotGrey(color)
&& !/rgba\(\d*, \d*, \d*, 0\)/.test(color)
&& color !== 'transparent';
};
/**
* @private
* @param {?} color
* @return {?}
*/
NzWaveRenderer.prototype.isNotGrey = /**
* @private
* @param {?} color
* @return {?}
*/
function (color) {
/** @type {?} */
var match = color.match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);
if (match && match[1] && match[2] && match[3]) {
return !(match[1] === match[2] && match[2] === match[3]);
}
return true;
};
/**
* @private
* @param {?} node
* @return {?}
*/
NzWaveRenderer.prototype.getWaveColor = /**
* @private
* @param {?} node
* @return {?}
*/
function (node) {
/** @type {?} */
var nodeStyle = getComputedStyle(node);
return nodeStyle.getPropertyValue('border-top-color') || // Firefox Compatible
nodeStyle.getPropertyValue('border-color') ||
nodeStyle.getPropertyValue('background-color');
};
/**
* @private
* @param {?} fn
* @param {?} delay
* @return {?}
*/
NzWaveRenderer.prototype.runTimeoutOutsideZone = /**
* @private
* @param {?} fn
* @param {?} delay
* @return {?}
*/
function (fn, delay) {
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () { return setTimeout(fn, delay); }));
};
return NzWaveRenderer;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_WAVE_GLOBAL_DEFAULT_CONFIG = {
disabled: false
};
/** @type {?} */
var NZ_WAVE_GLOBAL_CONFIG = new i0.InjectionToken('nz-wave-global-options', {
providedIn: 'root',
factory: NZ_WAVE_GLOBAL_CONFIG_FACTORY
});
/**
* @return {?}
*/
function NZ_WAVE_GLOBAL_CONFIG_FACTORY() {
return NZ_WAVE_GLOBAL_DEFAULT_CONFIG;
}
var NzWaveDirective = /** @class */ (function () {
function NzWaveDirective(ngZone, elementRef, config, animationType) {
this.ngZone = ngZone;
this.elementRef = elementRef;
this.animationType = animationType;
this.nzWaveExtraNode = false;
this.waveDisabled = false;
if (config && typeof config.disabled === 'boolean') {
this.waveDisabled = config.disabled;
}
if (this.animationType === 'NoopAnimations') {
this.waveDisabled = true;
}
}
/**
* @return {?}
*/
NzWaveDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
if (this.waveRenderer) {
this.waveRenderer.destroy();
}
};
/**
* @return {?}
*/
NzWaveDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.renderWaveIfEnabled();
};
/**
* @return {?}
*/
NzWaveDirective.prototype.renderWaveIfEnabled = /**
* @return {?}
*/
function () {
if (!this.waveDisabled && this.elementRef.nativeElement) {
this.waveRenderer = new NzWaveRenderer(this.elementRef.nativeElement, this.ngZone, this.nzWaveExtraNode);
}
};
NzWaveDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-wave]'
},] }
];
/** @nocollapse */
NzWaveDirective.ctorParameters = function () {
return [
{ type: i0.NgZone },
{ type: i0.ElementRef },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_WAVE_GLOBAL_CONFIG,] }] },
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
];
};
NzWaveDirective.propDecorators = {
nzWaveExtraNode: [{ type: i0.Input }]
};
return NzWaveDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzWaveModule = /** @class */ (function () {
function NzWaveModule() {
}
NzWaveModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [platform.PlatformModule],
exports: [NzWaveDirective],
declarations: [NzWaveDirective]
},] }
];
return NzWaveModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzButtonGroupComponent = /** @class */ (function () {
function NzButtonGroupComponent(nzUpdateHostClassService, elementRef) {
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.elementRef = elementRef;
this.prefixCls = 'ant-btn-group';
}
Object.defineProperty(NzButtonGroupComponent.prototype, "nzSize", {
get: /**
* @return {?}
*/ function () {
return this._size;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._size = value;
this.setClassMap();
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzButtonGroupComponent.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var classMap = (_a = {},
_a[this.prefixCls] = true,
_a[this.prefixCls + "-lg"] = this.nzSize === 'large',
_a[this.prefixCls + "-sm"] = this.nzSize === 'small',
_a);
this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, classMap);
};
/**
* @return {?}
*/
NzButtonGroupComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
};
NzButtonGroupComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-button-group',
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
providers: [NzUpdateHostClassService],
template: "<ng-content></ng-content>\n"
}] }
];
/** @nocollapse */
NzButtonGroupComponent.ctorParameters = function () {
return [
{ type: NzUpdateHostClassService },
{ type: i0.ElementRef }
];
};
NzButtonGroupComponent.propDecorators = {
nzSize: [{ type: i0.Input }]
};
return NzButtonGroupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Silent an event by stopping and preventing it.
* @param {?} e
* @return {?}
*/
function silentEvent(e) {
e.stopPropagation();
e.preventDefault();
}
/**
* @param {?} elem
* @return {?}
*/
function getElementOffset(elem) {
if (!elem.getClientRects().length) {
return { top: 0, left: 0 };
}
/** @type {?} */
var rect = elem.getBoundingClientRect();
/** @type {?} */
var win = elem.ownerDocument.defaultView;
return {
top: rect.top + win.pageYOffset,
left: rect.left + win.pageXOffset
};
}
/**
* @param {?} element
* @return {?}
*/
function findFirstNotEmptyNode(element) {
/** @type {?} */
var children = element.childNodes;
for (var i = 0; i < children.length; i++) {
/** @type {?} */
var node = children.item(i);
if (filterNotEmptyNode(node)) {
return node;
}
}
return null;
}
/**
* @param {?} element
* @return {?}
*/
function findLastNotEmptyNode(element) {
/** @type {?} */
var children = element.childNodes;
for (var i = children.length - 1; i >= 0; i--) {
/** @type {?} */
var node = children.item(i);
if (filterNotEmptyNode(node)) {
return node;
}
}
return null;
}
/**
* @param {?} parent
* @return {?}
*/
function reverseChildNodes(parent) {
/** @type {?} */
var children = parent.childNodes;
/** @type {?} */
var length = children.length;
if (length) {
/** @type {?} */
var nodes_1 = [];
children.forEach(( /**
* @param {?} node
* @param {?} i
* @return {?}
*/function (node, i) { return nodes_1[i] = node; }));
while (length--) {
parent.appendChild(nodes_1[length]);
}
}
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzButtonComponent = /** @class */ (function () {
function NzButtonComponent(elementRef, cdr, renderer, nzUpdateHostClassService, ngZone, waveConfig, animationType) {
this.elementRef = elementRef;
this.cdr = cdr;
this.renderer = renderer;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.ngZone = ngZone;
this.waveConfig = waveConfig;
this.animationType = animationType;
this.el = this.elementRef.nativeElement;
this.iconOnly = false;
this.nzWave = new NzWaveDirective(this.ngZone, this.elementRef, this.waveConfig, this.animationType);
this.nzBlock = false;
this.nzGhost = false;
this.nzSearch = false;
this.nzLoading = false;
this.nzType = 'default';
this.nzShape = null;
this.nzSize = 'default';
}
/** temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289 */
/**
* temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289
* @return {?}
*/
NzButtonComponent.prototype.setClassMap = /**
* temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var prefixCls = 'ant-btn';
/** @type {?} */
var sizeMap = { large: 'lg', small: 'sm' };
this.nzUpdateHostClassService.updateHostClass(this.el, (_a = {},
_a["" + prefixCls] = true,
_a[prefixCls + "-" + this.nzType] = this.nzType,
_a[prefixCls + "-" + this.nzShape] = this.nzShape,
_a[prefixCls + "-" + sizeMap[this.nzSize]] = sizeMap[this.nzSize],
_a[prefixCls + "-loading"] = this.nzLoading,
_a[prefixCls + "-icon-only"] = this.iconOnly,
_a[prefixCls + "-background-ghost"] = this.nzGhost,
_a[prefixCls + "-block"] = this.nzBlock,
_a["ant-input-search-button"] = this.nzSearch,
_a));
};
/**
* @param {?} value
* @return {?}
*/
NzButtonComponent.prototype.updateIconDisplay = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.iconElement) {
this.renderer.setStyle(this.iconElement, 'display', value ? 'none' : 'inline-block');
}
};
/**
* @return {?}
*/
NzButtonComponent.prototype.checkContent = /**
* @return {?}
*/
function () {
/** @type {?} */
var hasIcon = this.listOfIconElement && this.listOfIconElement.length;
if (hasIcon) {
this.moveIcon();
}
this.renderer.removeStyle(this.contentElement.nativeElement, 'display');
/** https://github.com/angular/angular/issues/12530 **/
if (isEmpty(this.contentElement.nativeElement)) {
this.renderer.setStyle(this.contentElement.nativeElement, 'display', 'none');
this.iconOnly = !!hasIcon;
}
else {
this.renderer.removeStyle(this.contentElement.nativeElement, 'display');
this.iconOnly = false;
}
this.setClassMap();
this.updateIconDisplay(this.nzLoading);
this.cdr.detectChanges();
};
/**
* @return {?}
*/
NzButtonComponent.prototype.moveIcon = /**
* @return {?}
*/
function () {
if (this.listOfIconElement && this.listOfIconElement.length) {
/** @type {?} */
var firstChildElement = findFirstNotEmptyNode(this.contentElement.nativeElement);
/** @type {?} */
var lastChildElement = findLastNotEmptyNode(this.contentElement.nativeElement);
if (firstChildElement && (firstChildElement === this.listOfIconElement.first.nativeElement)) {
this.renderer.insertBefore(this.el, firstChildElement, this.contentElement.nativeElement);
this.iconElement = ( /** @type {?} */(firstChildElement));
}
else if (lastChildElement && (lastChildElement === this.listOfIconElement.last.nativeElement)) {
this.renderer.appendChild(this.el, lastChildElement);
}
}
};
/**
* @return {?}
*/
NzButtonComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
this.checkContent();
};
/**
* @return {?}
*/
NzButtonComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
this.nzWave.ngOnInit();
};
/**
* @return {?}
*/
NzButtonComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.nzWave.ngOnDestroy();
};
/**
* @param {?} changes
* @return {?}
*/
NzButtonComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzBlock || changes.nzGhost || changes.nzSearch || changes.nzType || changes.nzShape || changes.nzSize || changes.nzLoading) {
this.setClassMap();
}
if (changes.nzLoading) {
this.updateIconDisplay(this.nzLoading);
}
};
NzButtonComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-button]',
providers: [NzUpdateHostClassService],
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<i nz-icon type=\"loading\" *ngIf=\"nzLoading\"></i>\n<span (cdkObserveContent)=\"checkContent()\" #contentElement><ng-content></ng-content></span>"
}] }
];
/** @nocollapse */
NzButtonComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 },
{ type: NzUpdateHostClassService },
{ type: i0.NgZone },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_WAVE_GLOBAL_CONFIG,] }] },
{ type: String, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [animations.ANIMATION_MODULE_TYPE,] }] }
];
};
NzButtonComponent.propDecorators = {
contentElement: [{ type: i0.ViewChild, args: ['contentElement',] }],
listOfIconElement: [{ type: i0.ContentChildren, args: [NzIconDirective, { read: i0.ElementRef },] }],
nzWave: [{ type: i0.HostBinding, args: ['attr.nz-wave',] }],
nzBlock: [{ type: i0.Input }],
nzGhost: [{ type: i0.Input }],
nzSearch: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzShape: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzButtonComponent.prototype, "nzBlock", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzButtonComponent.prototype, "nzGhost", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzButtonComponent.prototype, "nzSearch", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzButtonComponent.prototype, "nzLoading", void 0);
return NzButtonComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzButtonModule = /** @class */ (function () {
function NzButtonModule() {
}
NzButtonModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzButtonComponent, NzButtonGroupComponent],
exports: [NzButtonComponent, NzButtonGroupComponent],
imports: [i2$1.CommonModule, observers.ObserversModule, NzWaveModule, NzIconModule]
},] }
];
return NzButtonModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_LOGGER_STATE = new i0.InjectionToken('nz-logger-state');
// Whether print the log
var LoggerService = /** @class */ (function () {
function LoggerService(_loggerState) {
this._loggerState = _loggerState;
}
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
LoggerService.prototype.log =
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this._loggerState) {
console.log.apply(console, __spread(args));
}
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
LoggerService.prototype.warn =
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this._loggerState) {
console.warn.apply(console, __spread(args));
}
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
LoggerService.prototype.error =
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this._loggerState) {
console.error.apply(console, __spread(args));
}
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
LoggerService.prototype.info =
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this._loggerState) {
console.log.apply(console, __spread(args));
}
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
LoggerService.prototype.debug =
// tslint:disable-next-line:no-any
/**
* @param {...?} args
* @return {?}
*/
function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this._loggerState) {
console.log.apply(console, __spread(['[NG-ZORRO-DEBUG]'], args));
}
};
LoggerService.decorators = [
{ type: i0.Injectable }
];
/** @nocollapse */
LoggerService.ctorParameters = function () {
return [
{ type: Boolean, decorators: [{ type: i0.Inject, args: [NZ_LOGGER_STATE,] }] }
];
};
return LoggerService;
}());
/**
* @param {?} exist
* @param {?} loggerState
* @return {?}
*/
function LOGGER_SERVICE_PROVIDER_FACTORY(exist, loggerState) { return exist || new LoggerService(loggerState); }
/** @type {?} */
var LOGGER_SERVICE_PROVIDER = {
provide: LoggerService,
useFactory: LOGGER_SERVICE_PROVIDER_FACTORY,
deps: [[new i0.Optional(), new i0.SkipSelf(), LoggerService], NZ_LOGGER_STATE]
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var LoggerModule = /** @class */ (function () {
function LoggerModule() {
}
LoggerModule.decorators = [
{ type: i0.NgModule, args: [{
providers: [
{ provide: NZ_LOGGER_STATE, useValue: false },
LOGGER_SERVICE_PROVIDER
]
},] }
];
return LoggerModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale = {
today: '今天',
now: '此刻',
backToToday: '返回今天',
ok: '确定',
timeSelect: '选择时间',
dateSelect: '选择日期',
clear: '清除',
month: '月',
year: '年',
previousMonth: '上个月 (翻页上键)',
nextMonth: '下个月 (翻页下键)',
monthSelect: '选择月份',
yearSelect: '选择年份',
decadeSelect: '选择年代',
yearFormat: 'YYYY年',
dayFormat: 'D日',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
previousYear: '上一年 (Control键加左方向键)',
nextYear: '下一年 (Control键加右方向键)',
previousDecade: '上一年代',
nextDecade: '下一年代',
previousCentury: '上一世纪',
nextCentury: '下一世纪',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale = {
placeholder: '请选择时间',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$1 = {
lang: __assign({ placeholder: '请选择日期', rangePlaceholder: ['开始日期', '结束日期'] }, CalendarLocale),
timePickerLocale: __assign({}, locale),
};
// should add whitespace between char in Button
locale$1.lang.ok = '确 定';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination = {
// Options.jsx
items_per_page: '条/页',
jump_to: '跳至',
jump_to_confirm: '确定',
page: '页',
// Pagination.jsx
prev_page: '上一页',
next_page: '下一页',
prev_5: '向前 5 页',
next_5: '向后 5 页',
prev_3: '向前 3 页',
next_3: '向后 3 页',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var zh_CN = {
locale: 'zh-cn',
Pagination: Pagination,
DatePicker: locale$1,
TimePicker: locale,
Calendar: CalendarLocale,
// locales for all comoponents
global: {
placeholder: '请选择',
},
Table: {
filterTitle: '筛选',
filterConfirm: '确定',
filterReset: '重置',
selectAll: '全选当页',
selectInvert: '反选当页',
sortTitle: '排序',
},
Modal: {
okText: '确定',
cancelText: '取消',
justOkText: '知道了',
},
Popconfirm: {
cancelText: '取消',
okText: '确定',
},
Transfer: {
searchPlaceholder: '请输入搜索内容',
itemUnit: '项',
itemsUnit: '项',
},
Upload: {
uploading: '文件上传中',
removeFile: '删除文件',
uploadError: '上传错误',
previewFile: '预览文件',
},
Empty: {
description: '暂无数据',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_I18N = new i0.InjectionToken('nz-i18n');
/**
* Locale for date operations, should import from date-fns, see example: https://github.com/date-fns/date-fns/blob/v1.30.1/src/locale/zh_cn/index.js
* @type {?}
*/
var NZ_DATE_LOCALE = new i0.InjectionToken('nz-date-locale');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_DATE_CONFIG = new i0.InjectionToken('date-config');
/** @type {?} */
var NZ_DATE_CONFIG_DEFAULT = {
firstDayOfWeek: null
};
/**
* @param {?} config
* @return {?}
*/
function mergeDateConfig(config) {
return __assign({}, NZ_DATE_CONFIG_DEFAULT, config);
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} injector
* @param {?} config
* @param {?} datePipe
* @return {?}
*/
function DATE_HELPER_SERVICE_FACTORY(injector, config, datePipe) {
/** @type {?} */
var i18n = injector.get(NzI18nService$$1);
return i18n.getDateLocale() ? new DateHelperByDateFns(i18n, config) : new DateHelperByDatePipe(i18n, config, datePipe);
}
/**
* Abstract DateHelperService(Token via Class)
* Compatibility: compact for original usage by default which using DatePipe
* @abstract
*/
var DateHelperService$$1 = /** @class */ (function () {
function DateHelperService$$1(i18n, config) {
this.i18n = i18n;
this.config = config;
this.relyOnDatePipe = this instanceof DateHelperByDatePipe; // Indicate whether this service is rely on DatePipe
this.config = mergeDateConfig(this.config);
}
/**
* @param {?} text
* @return {?}
*/
DateHelperService$$1.prototype.parseDate = /**
* @param {?} text
* @return {?}
*/
function (text) {
if (!text) {
return;
}
return fnsParse(text);
};
/**
* @param {?} text
* @return {?}
*/
DateHelperService$$1.prototype.parseTime = /**
* @param {?} text
* @return {?}
*/
function (text) {
if (!text) {
return;
}
return fnsParse("1970-01-01 " + text);
};
DateHelperService$$1.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root',
useFactory: DATE_HELPER_SERVICE_FACTORY,
deps: [i0.Injector, [new i0.Optional(), NZ_DATE_CONFIG], i2$1.DatePipe]
},] }
];
/** @nocollapse */
DateHelperService$$1.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_DATE_CONFIG,] }] }
];
};
/** @nocollapse */ DateHelperService$$1.ngInjectableDef = i0.defineInjectable({ factory: function DateHelperService_Factory() { return DATE_HELPER_SERVICE_FACTORY(i0.inject(i0.INJECTOR), i0.inject(NZ_DATE_CONFIG, 8), i0.inject(i2$1.DatePipe)); }, token: DateHelperService$$1, providedIn: "root" });
return DateHelperService$$1;
}());
/**
* DateHelper that handles date formats with date-fns
*/
var DateHelperByDateFns = /** @class */ (function (_super) {
__extends(DateHelperByDateFns, _super);
function DateHelperByDateFns() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @param {?} date
* @return {?}
*/
DateHelperByDateFns.prototype.getISOWeek = /**
* @param {?} date
* @return {?}
*/
function (date) {
return fnsGetISOWeek(date);
};
// TODO: Use date-fns's "weekStartsOn" to support different locale when "config.firstDayOfWeek" is null
// when v2.0 is ready: https://github.com/date-fns/date-fns/blob/v2.0.0-alpha.27/src/locale/en-US/index.js#L23
// TODO: Use date-fns's "weekStartsOn" to support different locale when "config.firstDayOfWeek" is null
// when v2.0 is ready: https://github.com/date-fns/date-fns/blob/v2.0.0-alpha.27/src/locale/en-US/index.js#L23
/**
* @return {?}
*/
DateHelperByDateFns.prototype.getFirstDayOfWeek =
// TODO: Use date-fns's "weekStartsOn" to support different locale when "config.firstDayOfWeek" is null
// when v2.0 is ready: https://github.com/date-fns/date-fns/blob/v2.0.0-alpha.27/src/locale/en-US/index.js#L23
/**
* @return {?}
*/
function () {
return this.config.firstDayOfWeek == null ? 1 : this.config.firstDayOfWeek;
};
/**
* Format a date
* @see https://date-fns.org/docs/format#description
* @param date Date
* @param formatStr format string
*/
/**
* Format a date
* @see https://date-fns.org/docs/format#description
* @param {?} date Date
* @param {?} formatStr format string
* @return {?}
*/
DateHelperByDateFns.prototype.format = /**
* Format a date
* @see https://date-fns.org/docs/format#description
* @param {?} date Date
* @param {?} formatStr format string
* @return {?}
*/
function (date, formatStr) {
return fnsFormat(date, formatStr, { locale: this.i18n.getDateLocale() });
};
/** @nocollapse */ DateHelperByDateFns.ngInjectableDef = i0.defineInjectable({ factory: function DateHelperByDateFns_Factory() { return DATE_HELPER_SERVICE_FACTORY(i0.inject(i0.INJECTOR), i0.inject(NZ_DATE_CONFIG, 8), i0.inject(i2$1.DatePipe)); }, token: DateHelperByDateFns, providedIn: "root" });
return DateHelperByDateFns;
}(DateHelperService$$1));
/**
* DateHelper that handles date formats with angular's date-pipe
* [BUG] Use DatePipe may cause non-standard week bug, see: https://github.com/NG-ZORRO/ng-zorro-antd/issues/2406
*
* @deprecated Maybe removed in next major version due to this serious bug
*/
var DateHelperByDatePipe = /** @class */ (function (_super) {
__extends(DateHelperByDatePipe, _super);
function DateHelperByDatePipe(i18n, config, datePipe) {
var _this = _super.call(this, i18n, config) || this;
_this.datePipe = datePipe;
return _this;
}
/**
* @param {?} date
* @return {?}
*/
DateHelperByDatePipe.prototype.getISOWeek = /**
* @param {?} date
* @return {?}
*/
function (date) {
return +this.format(date, 'w');
};
/**
* @return {?}
*/
DateHelperByDatePipe.prototype.getFirstDayOfWeek = /**
* @return {?}
*/
function () {
if (this.config.firstDayOfWeek == null) {
/** @type {?} */
var locale = this.i18n.getLocaleId();
return locale && ['zh-cn', 'zh-tw'].indexOf(locale.toLowerCase()) > -1 ? 1 : 0;
}
return this.config.firstDayOfWeek;
};
/**
* @param {?} date
* @param {?} formatStr
* @return {?}
*/
DateHelperByDatePipe.prototype.format = /**
* @param {?} date
* @param {?} formatStr
* @return {?}
*/
function (date, formatStr) {
return date ? this.datePipe.transform(date, formatStr, null, this.i18n.getLocaleId()) : '';
};
/**
* Compatible translate the moment-like format pattern to angular's pattern
* Why? For now, we need to support the existing language formats in AntD, and AntD uses the default temporal syntax.
*
* TODO: compare and complete all format patterns
* Each format docs as below:
* @link https://momentjs.com/docs/#/displaying/format/
* @link https://angular.io/api/common/DatePipe#description
* @param format input format pattern
*/
/**
* Compatible translate the moment-like format pattern to angular's pattern
* Why? For now, we need to support the existing language formats in AntD, and AntD uses the default temporal syntax.
*
* TODO: compare and complete all format patterns
* Each format docs as below:
* @link https://momentjs.com/docs/#/displaying/format/ / https://angular.io/api/common/DatePipe#description
* @param {?} format input format pattern
* @return {?}
*/
DateHelperByDatePipe.prototype.transCompatFormat = /**
* Compatible translate the moment-like format pattern to angular's pattern
* Why? For now, we need to support the existing language formats in AntD, and AntD uses the default temporal syntax.
*
* TODO: compare and complete all format patterns
* Each format docs as below:
* @link https://momentjs.com/docs/#/displaying/format/ / https://angular.io/api/common/DatePipe#description
* @param {?} format input format pattern
* @return {?}
*/
function (format) {
return format && format
.replace(/Y/g, 'y') // only support y, yy, yyy, yyyy
.replace(/D/g, 'd'); // d, dd represent of D, DD for momentjs, others are not support
};
/** @nocollapse */
DateHelperByDatePipe.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_DATE_CONFIG,] }] },
{ type: i2$1.DatePipe }
];
};
/** @nocollapse */ DateHelperByDatePipe.ngInjectableDef = i0.defineInjectable({ factory: function DateHelperByDatePipe_Factory() { return DATE_HELPER_SERVICE_FACTORY(i0.inject(i0.INJECTOR), i0.inject(NZ_DATE_CONFIG, 8), i0.inject(i2$1.DatePipe)); }, token: DateHelperByDatePipe, providedIn: "root" });
return DateHelperByDatePipe;
}(DateHelperService$$1));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$1 = {
today: 'اليوم',
now: 'الأن',
backToToday: 'العودة إلى اليوم',
ok: 'تأكيد',
clear: 'مسح',
month: 'الشهر',
year: 'السنة',
timeSelect: 'اختيار الوقت',
dateSelect: 'اختيار التاريخ',
monthSelect: 'اختيار الشهر',
yearSelect: 'اختيار السنة',
decadeSelect: 'اختيار العقد',
yearFormat: 'YYYY',
dateFormat: 'M/D/YYYY',
dayFormat: 'D',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'الشهر السابق (PageUp)',
nextMonth: 'الشهر التالى(PageDown)',
previousYear: 'العام السابق (Control + left)',
nextYear: 'العام التالى (Control + right)',
previousDecade: 'العقد السابق',
nextDecade: 'العقد التالى',
previousCentury: 'القرن السابق',
nextCentury: 'القرن التالى',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$2 = {
placeholder: 'اختيار الوقت',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$3 = {
lang: __assign({ placeholder: 'اختيار التاريخ', rangePlaceholder: ['البداية', 'النهاية'] }, CalendarLocale$1),
timePickerLocale: __assign({}, locale$2),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$1 = {
// Options.jsx
items_per_page: '/ الصفحة',
jump_to: 'الذهاب إلى',
jump_to_confirm: 'تأكيد',
page: '',
// Pagination.jsx
prev_page: 'الصفحة السابقة',
next_page: 'الصفحة التالية',
prev_5: 'خمس صفحات سابقة',
next_5: 'خمس صفحات تالية',
prev_3: 'ثلاث صفحات سابقة',
next_3: 'ثلاث صفحات تالية',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ar_EG = {
locale: 'ar',
Pagination: Pagination$1,
DatePicker: locale$3,
TimePicker: locale$2,
Calendar: CalendarLocale$1,
Table: {
filterTitle: 'الفلاتر',
filterConfirm: 'تأكيد',
filterReset: 'إعادة ضبط',
selectAll: 'اختيار الكل',
selectInvert: 'إلغاء الاختيار',
},
Modal: {
okText: 'تأكيد',
cancelText: 'إلغاء',
justOkText: 'تأكيد',
},
Popconfirm: {
okText: 'تأكيد',
cancelText: 'إلغاء',
},
Transfer: {
searchPlaceholder: 'ابحث هنا',
itemUnit: 'عنصر',
itemsUnit: 'عناصر',
},
Upload: {
uploading: 'جاري الرفع...',
removeFile: 'احذف الملف',
uploadError: 'مشكلة فى الرفع',
previewFile: 'استعرض الملف',
},
Empty: {
description: 'لا توجد بيانات',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$2 = {
today: 'Днес',
now: 'Сега',
backToToday: 'Към днес',
ok: 'Добре',
clear: 'Изчистване',
month: 'Месец',
year: 'Година',
timeSelect: 'Избор на час',
dateSelect: 'Избор на дата',
monthSelect: 'Избор на месец',
yearSelect: 'Избор на година',
decadeSelect: 'Десетилетие',
yearFormat: 'YYYY',
dateFormat: 'D M YYYY',
dayFormat: 'D',
dateTimeFormat: 'D M YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Предишен месец (PageUp)',
nextMonth: 'Следващ месец (PageDown)',
previousYear: 'Последна година (Control + left)',
nextYear: 'Следваща година (Control + right)',
previousDecade: 'Предишно десетилетие',
nextDecade: 'Следващо десетилетие',
previousCentury: 'Последен век',
nextCentury: 'Следващ век',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$4 = {
placeholder: 'Избор на час',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$5 = {
lang: __assign({ placeholder: 'Избор на дата', rangePlaceholder: ['Начална', 'Крайна'] }, CalendarLocale$2),
timePickerLocale: __assign({}, locale$4),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$2 = {
// Options.jsx
items_per_page: '/ страница',
jump_to: 'Към',
jump_to_confirm: 'потвърждавам',
page: '',
// Pagination.jsx
prev_page: 'Предишна страница',
next_page: 'Следваща страница',
prev_5: 'Предишни 5 страници',
next_5: 'Следващи 5 страници',
prev_3: 'Предишни 3 страници',
next_3: 'Следващи 3 страници',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var bg_BG = {
locale: 'bg',
Pagination: Pagination$2,
DatePicker: locale$5,
TimePicker: locale$4,
Calendar: CalendarLocale$2,
Table: {
filterTitle: 'Филтриране',
filterConfirm: 'Добре',
filterReset: 'Нулриане',
selectAll: 'Избор на текуща страница',
selectInvert: 'Обръщане',
},
Modal: {
okText: 'Добре',
cancelText: 'Отказ',
justOkText: 'Добре',
},
Popconfirm: {
okText: 'Добре',
cancelText: 'Отказ',
},
Transfer: {
searchPlaceholder: 'Търсене',
itemUnit: 'избор',
itemsUnit: 'избори',
},
Upload: {
uploading: 'Качване...',
removeFile: 'Премахване',
uploadError: 'Грешка при качването',
previewFile: 'Преглед',
},
Empty: {
description: 'Няма данни',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$3 = {
today: 'Avui',
now: 'Ara',
backToToday: 'Tornar a avui',
ok: 'Acceptar',
clear: 'Netejar',
month: 'Mes',
year: 'Any',
timeSelect: 'Seleccionar hora',
dateSelect: 'Seleccionar data',
monthSelect: 'Escollir un mes',
yearSelect: 'Escollir un any',
decadeSelect: 'Escollir una dècada',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Mes anterior (PageUp)',
nextMonth: 'Mes següent (PageDown)',
previousYear: 'Any anterior (Control + left)',
nextYear: 'Mes següent (Control + right)',
previousDecade: 'Dècada anterior',
nextDecade: 'Dècada següent',
previousCentury: 'Segle anterior',
nextCentury: 'Segle següent',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$6 = {
placeholder: 'Seleccionar hora',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$7 = {
lang: __assign({ placeholder: 'Seleccionar data', rangePlaceholder: ['Data inicial', 'Data final'] }, CalendarLocale$3),
timePickerLocale: __assign({}, locale$6),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$3 = {
// Options.jsx
items_per_page: '/ pàgina',
jump_to: 'Anar a',
jump_to_confirm: 'Confirma',
page: '',
// Pagination.jsx
prev_page: 'Pàgina prèvia',
next_page: 'Pàgina següent',
prev_5: '5 pàgines prèvies',
next_5: '5 pàgines següents',
prev_3: '3 pàgines prèvies',
next_3: '3 pàgines següents',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ca_ES = {
locale: 'ca',
Pagination: Pagination$3,
DatePicker: locale$7,
TimePicker: locale$6,
Calendar: CalendarLocale$3,
Table: {
filterTitle: 'Filtrar Menu',
filterConfirm: 'OK',
filterReset: 'Restablir',
},
Modal: {
okText: 'OK',
cancelText: 'Cancel·lar',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel·lar',
},
Transfer: {
searchPlaceholder: 'Cercar aquí',
itemUnit: 'item',
itemsUnit: 'items',
},
Empty: {
description: 'Sense dades',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$4 = {
today: 'Dnes',
now: 'Nyní',
backToToday: 'Zpět na dnešek',
ok: 'Ok',
clear: 'Vymazat',
month: 'Měsíc',
year: 'Rok',
timeSelect: 'Vybrat čas',
dateSelect: 'Vybrat datum',
monthSelect: 'Vyberte měsíc',
yearSelect: 'Vyberte rok',
decadeSelect: 'Vyberte dekádu',
yearFormat: 'YYYY',
dateFormat: 'D.M.YYYY',
dayFormat: 'D',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Předchozí měsíc (PageUp)',
nextMonth: 'Následující (PageDown)',
previousYear: 'Předchozí rok (Control + left)',
nextYear: 'Následující rok (Control + right)',
previousDecade: 'Předchozí dekáda',
nextDecade: 'Následující dekáda',
previousCentury: 'Předchozí století',
nextCentury: 'Následující století',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$8 = {
placeholder: 'Vybrat čas',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$9 = {
lang: __assign({ placeholder: 'Vybrat datum', rangePlaceholder: ['Od', 'Do'] }, CalendarLocale$4),
timePickerLocale: __assign({}, locale$8),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$4 = {
// Options.jsx
items_per_page: '/ strana',
jump_to: 'Přejít',
jump_to_confirm: 'potvrdit',
page: '',
// Pagination.jsx
prev_page: 'Předchozí strana',
next_page: 'Následující strana',
prev_5: 'Předchozích 5 stran',
next_5: 'Následujících 5 stran',
prev_3: 'Předchozí 3 strany',
next_3: 'Následující 3 strany',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var cs_CZ = {
locale: 'cs',
Pagination: Pagination$4,
DatePicker: locale$9,
TimePicker: locale$8,
Calendar: CalendarLocale$4,
Table: {
filterTitle: 'Filtr',
filterConfirm: 'Potvrdit',
filterReset: 'Obnovit',
},
Modal: {
okText: 'Ok',
cancelText: 'Storno',
justOkText: 'Ok',
},
Popconfirm: {
okText: 'Ok',
cancelText: 'Storno',
},
Transfer: {
searchPlaceholder: 'Vyhledávání',
itemUnit: 'položka',
itemsUnit: 'položek',
},
Upload: {
uploading: 'Nahrávání...',
removeFile: 'Odstranit soubor',
uploadError: 'Chyba při nahrávání',
previewFile: 'Zobrazit soubor',
},
Empty: {
description: 'Žádná data',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$5 = {
today: 'I dag',
now: 'Nu',
backToToday: 'Gå til i dag',
ok: 'Ok',
clear: 'Annuller',
month: 'Måned',
year: 'År',
timeSelect: 'Vælg tidspunkt',
dateSelect: 'Vælg dato',
monthSelect: 'Vælg måned',
yearSelect: 'Vælg år',
decadeSelect: 'Vælg årti',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Forrige måned(PageUp)',
nextMonth: 'Næste måned (PageDown)',
previousYear: 'Forrige år (Control + left)',
nextYear: 'Næste r (Control + right)',
previousDecade: 'Forrige årti',
nextDecade: 'Næste årti',
previousCentury: 'Forrige århundrede',
nextCentury: 'Næste århundrede',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$a = {
placeholder: 'Vælg tid',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$b = {
lang: __assign({ placeholder: 'Vælg dato', rangePlaceholder: ['Startdato', 'Slutdato'] }, CalendarLocale$5),
timePickerLocale: __assign({}, locale$a),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$5 = {
// Options.jsx
items_per_page: '/ side',
jump_to: 'Gå til',
jump_to_confirm: 'bekræft',
page: '',
// Pagination.jsx
prev_page: 'Forrige Side',
next_page: 'Næste Side',
prev_5: 'Forrige 5 Sider',
next_5: 'Næste 5 Sider',
prev_3: 'Forrige 3 Sider',
next_3: 'Næste 3 Sider',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var da_DK = {
locale: 'da',
DatePicker: locale$b,
TimePicker: locale$a,
Calendar: CalendarLocale$5,
Pagination: Pagination$5,
Table: {
filterTitle: 'Filtermenu',
filterConfirm: 'OK',
filterReset: 'Nulstil',
selectAll: 'Vælg alle',
selectInvert: 'Inverter valg',
},
Modal: {
okText: 'OK',
cancelText: 'Afbryd',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Afbryd',
},
Transfer: {
searchPlaceholder: 'Søg her',
itemUnit: 'element',
itemsUnit: 'elementer',
},
Upload: {
uploading: 'Uploader...',
removeFile: 'Fjern fil',
uploadError: 'Fejl ved upload',
previewFile: 'Forhåndsvisning',
},
Empty: {
description: 'Ingen data',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$6 = {
today: 'Heute',
now: 'Jetzt',
backToToday: 'Zurück zu Heute',
ok: 'OK',
clear: 'Zurücksetzen',
month: 'Monat',
year: 'Jahr',
timeSelect: 'Zeit wählen',
dateSelect: 'Datum wählen',
monthSelect: 'Wähle einen Monat',
yearSelect: 'Wähle ein Jahr',
decadeSelect: 'Wähle ein Jahrzehnt',
yearFormat: 'YYYY',
dateFormat: 'D.M.YYYY',
dayFormat: 'D',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Vorheriger Monat (PageUp)',
nextMonth: 'Nächster Monat (PageDown)',
previousYear: 'Vorheriges Jahr (Ctrl + left)',
nextYear: 'Nächstes Jahr (Ctrl + right)',
previousDecade: 'Vorheriges Jahrzehnt',
nextDecade: 'Nächstes Jahrzehnt',
previousCentury: 'Vorheriges Jahrhundert',
nextCentury: 'Nächstes Jahrhundert',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$c = {
placeholder: 'Zeit auswählen',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$d = {
lang: __assign({ placeholder: 'Datum auswählen', rangePlaceholder: ['Startdatum', 'Enddatum'] }, CalendarLocale$6),
timePickerLocale: __assign({}, locale$c),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$6 = {
// Options.jsx
items_per_page: '/ Seite',
jump_to: 'Gehe zu',
jump_to_confirm: 'bestätigen',
page: '',
// Pagination.jsx
prev_page: 'Vorherige Seite',
next_page: 'Nächste Seite',
prev_5: '5 Seiten zurück',
next_5: '5 Seiten vor',
prev_3: '3 Seiten zurück',
next_3: '3 Seiten vor',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var de_DE = {
locale: 'de',
Pagination: Pagination$6,
DatePicker: locale$d,
TimePicker: locale$c,
Calendar: CalendarLocale$6,
Table: {
filterTitle: 'Filter-Menü',
filterConfirm: 'OK',
filterReset: 'Zurücksetzen',
selectAll: 'Selektiere Alle',
selectInvert: 'Selektion Invertieren',
},
Modal: {
okText: 'OK',
cancelText: 'Abbrechen',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Abbrechen',
},
Transfer: {
searchPlaceholder: 'Suchen',
itemUnit: 'Eintrag',
itemsUnit: 'Einträge',
},
Upload: {
uploading: 'Hochladen...',
removeFile: 'Datei entfernen',
uploadError: 'Fehler beim Hochladen',
previewFile: 'Dateivorschau',
},
Empty: {
description: 'Keine Daten',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$7 = {
today: 'Σήμερα',
now: 'Τώρα',
backToToday: 'Πίσω στη σημερινή μέρα',
ok: 'Ok',
clear: 'Καθαρισμός',
month: 'Μήνας',
year: 'Έτος',
timeSelect: 'Επιλογή ώρας',
dateSelect: 'Επιλογή ημερομηνίας',
monthSelect: 'Επιλογή μήνα',
yearSelect: 'Επιλογή έτους',
decadeSelect: 'Επιλογή δεκαετίας',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Προηγούμενος μήνας (PageUp)',
nextMonth: 'Επόμενος μήνας (PageDown)',
previousYear: 'Προηγούμενο έτος (Control + αριστερά)',
nextYear: 'Επόμενο έτος (Control + δεξιά)',
previousDecade: 'Προηγούμενη δεκαετία',
nextDecade: 'Επόμενη δεκαετία',
previousCentury: 'Προηγούμενος αιώνας',
nextCentury: 'Επόμενος αιώνας',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$e = {
placeholder: 'Επιλέξτε ώρα',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$f = {
lang: __assign({ placeholder: 'Επιλέξτε ημερομηνία', rangePlaceholder: ['Αρχική ημερομηνία', 'Τελική ημερομηνία'] }, CalendarLocale$7),
timePickerLocale: __assign({}, locale$e),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$7 = {
// Options.jsx
items_per_page: '/ σελίδα',
jump_to: 'Μετάβαση',
jump_to_confirm: 'επιβεβαιώνω',
page: '',
// Pagination.jsx
prev_page: 'Προηγούμενη Σελίδα',
next_page: 'Επόμενη Σελίδα',
prev_5: 'Προηγούμενες 5 Σελίδες',
next_5: 'Επόμενες 5 σελίδες',
prev_3: 'Προηγούμενες 3 Σελίδες',
next_3: 'Επόμενες 3 Σελίδες',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var el_GR = {
locale: 'el',
Pagination: Pagination$7,
DatePicker: locale$f,
TimePicker: locale$e,
Calendar: CalendarLocale$7,
Table: {
filterTitle: 'Μενού φίλτρων',
filterConfirm: 'ΟΚ',
filterReset: 'Επαναφορά',
selectAll: 'Επιλογή τρέχουσας σελίδας',
selectInvert: 'Αντιστροφή τρέχουσας σελίδας',
},
Modal: {
okText: 'ΟΚ',
cancelText: 'Άκυρο',
justOkText: 'ΟΚ',
},
Popconfirm: {
okText: 'ΟΚ',
cancelText: 'Άκυρο',
},
Transfer: {
searchPlaceholder: 'Αναζήτηση',
itemUnit: 'αντικείμενο',
itemsUnit: 'αντικείμενα',
},
Upload: {
uploading: 'Μεταφόρτωση...',
removeFile: 'Αφαίρεση αρχείου',
uploadError: 'Σφάλμα μεταφόρτωσης',
previewFile: 'Προεπισκόπηση αρχείου',
},
Empty: {
description: 'Δεν υπάρχουν δεδομένα',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$8 = {
today: 'Today',
now: 'Now',
backToToday: 'Back to today',
ok: 'Ok',
clear: 'Clear',
month: 'Month',
year: 'Year',
timeSelect: 'Select time',
dateSelect: 'Select date',
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
nextYear: 'Next year (Control + right)',
previousDecade: 'Last decade',
nextDecade: 'Next decade',
previousCentury: 'Last century',
nextCentury: 'Next century',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$g = {
placeholder: 'Select time',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$h = {
lang: __assign({ placeholder: 'Select date', rangePlaceholder: ['Start date', 'End date'] }, CalendarLocale$8),
timePickerLocale: __assign({}, locale$g),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$8 = {
// Options.jsx
items_per_page: '/ page',
jump_to: 'Goto',
jump_to_confirm: 'confirm',
page: '',
// Pagination.jsx
prev_page: 'Previous Page',
next_page: 'Next Page',
prev_5: 'Previous 5 Pages',
next_5: 'Next 5 Pages',
prev_3: 'Previous 3 Pages',
next_3: 'Next 3 Pages',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var en_GB = {
locale: 'en-gb',
Pagination: Pagination$8,
DatePicker: locale$h,
TimePicker: locale$g,
Calendar: CalendarLocale$8,
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
},
Modal: {
okText: 'OK',
cancelText: 'Cancel',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel',
},
Transfer: {
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
},
Upload: {
uploading: 'Uploading...',
removeFile: 'Remove file',
uploadError: 'Upload error',
previewFile: 'Preview file',
},
Empty: {
description: 'No data',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$9 = {
today: 'Today',
now: 'Now',
backToToday: 'Back to today',
ok: 'Ok',
clear: 'Clear',
month: 'Month',
year: 'Year',
timeSelect: 'Select time',
dateSelect: 'Select date',
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
yearFormat: 'YYYY',
dateFormat: 'M/D/YYYY',
dayFormat: 'D',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
nextYear: 'Next year (Control + right)',
previousDecade: 'Last decade',
nextDecade: 'Next decade',
previousCentury: 'Last century',
nextCentury: 'Next century',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$i = {
placeholder: 'Select time',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$j = {
lang: __assign({ placeholder: 'Select date', rangePlaceholder: ['Start date', 'End date'] }, CalendarLocale$9),
timePickerLocale: __assign({}, locale$i),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$9 = {
// Options.jsx
items_per_page: '/ page',
jump_to: 'Goto',
jump_to_confirm: 'confirm',
page: '',
// Pagination.jsx
prev_page: 'Previous Page',
next_page: 'Next Page',
prev_5: 'Previous 5 Pages',
next_5: 'Next 5 Pages',
prev_3: 'Previous 3 Pages',
next_3: 'Next 3 Pages',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var en_US = {
locale: 'en',
Pagination: Pagination$9,
DatePicker: locale$j,
TimePicker: locale$i,
Calendar: CalendarLocale$9,
global: {
placeholder: 'Please select',
},
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
sortTitle: 'Sort',
},
Modal: {
okText: 'OK',
cancelText: 'Cancel',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel',
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
},
Upload: {
uploading: 'Uploading...',
removeFile: 'Remove file',
uploadError: 'Upload error',
previewFile: 'Preview file',
},
Empty: {
description: 'No Data',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$a = {
today: 'Hoy',
now: 'Ahora',
backToToday: 'Volver a hoy',
ok: 'Aceptar',
clear: 'Limpiar',
month: 'Mes',
year: 'Año',
timeSelect: 'Seleccionar hora',
dateSelect: 'Seleccionar fecha',
monthSelect: 'Elegir un mes',
yearSelect: 'Elegir un año',
decadeSelect: 'Elegir una década',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Mes anterior (PageUp)',
nextMonth: 'Mes siguiente (PageDown)',
previousYear: 'Año anterior (Control + left)',
nextYear: 'Año siguiente (Control + right)',
previousDecade: 'Década anterior',
nextDecade: 'Década siguiente',
previousCentury: 'Siglo anterior',
nextCentury: 'Siglo siguiente',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$k = {
placeholder: 'Seleccionar hora',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$l = {
lang: __assign({ placeholder: 'Seleccionar fecha', rangePlaceholder: ['Fecha inicial', 'Fecha final'] }, CalendarLocale$a),
timePickerLocale: __assign({}, locale$k),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$a = {
// Options.jsx
items_per_page: '/ página',
jump_to: 'Ir a',
jump_to_confirm: 'confirmar',
page: '',
// Pagination.jsx
prev_page: 'Página anterior',
next_page: 'Página siguiente',
prev_5: '5 páginas previas',
next_5: '5 páginas siguientes',
prev_3: '3 páginas previas',
next_3: '3 páginas siguientes',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var es_ES = {
locale: 'es',
Pagination: Pagination$a,
DatePicker: locale$l,
TimePicker: locale$k,
Calendar: CalendarLocale$a,
Table: {
filterTitle: 'Filtrar menú',
filterConfirm: 'Aceptar',
filterReset: 'Reiniciar',
selectAll: 'Seleccionar todo',
selectInvert: 'Invertir selección',
},
Modal: {
okText: 'Aceptar',
cancelText: 'Cancelar',
justOkText: 'Aceptar',
},
Popconfirm: {
okText: 'Aceptar',
cancelText: 'Cancelar',
},
Transfer: {
searchPlaceholder: 'Buscar aquí',
itemUnit: 'elemento',
itemsUnit: 'elementos',
},
Upload: {
uploading: 'Subiendo...',
removeFile: 'Eliminar archivo',
uploadError: 'Error al subir el archivo',
previewFile: 'Vista previa',
},
Empty: {
description: 'No hay datos',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$b = {
today: 'Täna',
now: 'Praegu',
backToToday: 'Tagasi tänase juurde',
ok: 'Ok',
clear: 'Tühista',
month: 'Kuu',
year: 'Aasta',
timeSelect: 'Vali aeg',
dateSelect: 'Vali kuupäev',
monthSelect: 'Vali kuu',
yearSelect: 'Vali aasta',
decadeSelect: 'Vali dekaad',
yearFormat: 'YYYY',
dateFormat: 'D.M.YYYY',
dayFormat: 'D',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Eelmine kuu (PageUp)',
nextMonth: 'Järgmine kuu (PageDown)',
previousYear: 'Eelmine aasta (Control + left)',
nextYear: 'Järgmine aasta (Control + right)',
previousDecade: 'Eelmine dekaad',
nextDecade: 'Järgmine dekaad',
previousCentury: 'Eelmine sajand',
nextCentury: 'Järgmine sajand',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$m = {
placeholder: 'Vali aeg',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// 统一合并为完整的 Locale
/** @type {?} */
var locale$n = {
lang: __assign({ placeholder: 'Vali kuupäev', rangePlaceholder: ['Algus kuupäev', 'Lõpu kuupäev'] }, CalendarLocale$b),
timePickerLocale: __assign({}, locale$m),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$b = {
// Options.jsx
items_per_page: '/ leheküljel',
jump_to: 'Hüppa',
jump_to_confirm: 'Kinnitage',
page: '',
// Pagination.jsx
prev_page: 'Eelmine leht',
next_page: 'Järgmine leht',
prev_5: 'Eelmised 5 lehekülge',
next_5: 'Järgmised 5 lehekülge',
prev_3: 'Eelmised 3 lehekülge',
next_3: 'Järgmised 3 lehekülge',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var et_EE = {
locale: 'et',
Pagination: Pagination$b,
DatePicker: locale$n,
TimePicker: locale$m,
Calendar: CalendarLocale$b,
Table: {
filterTitle: 'Filtri menüü',
filterConfirm: 'OK',
filterReset: 'Nulli',
selectAll: 'Vali kõik',
selectInvert: 'Inverteeri valik',
},
Modal: {
okText: 'OK',
cancelText: 'Tühista',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Tühista',
},
Transfer: {
searchPlaceholder: 'Otsi siit',
itemUnit: 'kogus',
itemsUnit: 'kogus',
},
Upload: {
uploading: 'Üleslaadimine...',
removeFile: 'Eemalda fail',
uploadError: 'Üleslaadimise tõrge',
previewFile: 'Faili eelvaade',
},
Empty: {
description: 'Andmed puuduvad',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$c = {
today: 'امروز',
now: 'اکنون',
backToToday: 'بازگشت به روز',
ok: 'باشه',
clear: 'پاک کردن',
month: 'ماه',
year: 'سال',
timeSelect: 'انتخاب زمان',
dateSelect: 'انتخاب تاریخ',
monthSelect: 'یک ماه را انتخاب کنید',
yearSelect: 'یک سال را انتخاب کنید',
decadeSelect: 'یک دهه را انتخاب کنید',
yearFormat: 'YYYY',
dateFormat: 'M/D/YYYY',
dayFormat: 'D',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'ماه قبل (PageUp)',
nextMonth: 'ماه بعد (PageDown)',
previousYear: 'سال قبل (Control + left)',
nextYear: 'سال بعد (Control + right)',
previousDecade: 'دهه قبل',
nextDecade: 'دهه بعد',
previousCentury: 'قرن قبل',
nextCentury: 'قرن بعد',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$o = {
placeholder: 'انتخاب زمان',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$p = {
lang: __assign({ placeholder: 'انتخاب تاریخ', rangePlaceholder: ['تاریخ شروع', 'تاریخ پایان'] }, CalendarLocale$c),
timePickerLocale: __assign({}, locale$o),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$c = {
// Options.jsx
items_per_page: '/ صفحه',
jump_to: 'برو به',
jump_to_confirm: 'تایید',
page: '',
// Pagination.jsx
prev_page: 'صفحه قبلی',
next_page: 'صفحه بعدی',
prev_5: '۵ صفحه قبلی',
next_5: '۵ صفحه بعدی',
prev_3: '۳ صفحه قبلی',
next_3: '۳ صفحه بعدی',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var fa_IR = {
locale: 'fa',
Pagination: Pagination$c,
DatePicker: locale$p,
TimePicker: locale$o,
Calendar: CalendarLocale$c,
Table: {
filterTitle: 'منوی فیلتر',
filterConfirm: 'تایید',
filterReset: 'پاک کردن',
selectAll: 'انتخاب صفحهی کنونی',
selectInvert: 'معکوس کردن انتخابها در صفحه ی کنونی',
},
Modal: {
okText: 'تایید',
cancelText: 'لغو',
justOkText: 'تایید',
},
Popconfirm: {
okText: 'تایید',
cancelText: 'لغو',
},
Transfer: {
searchPlaceholder: 'جستجو',
itemUnit: '',
itemsUnit: '',
},
Upload: {
uploading: 'در حال آپلود...',
removeFile: 'حذف فایل',
uploadError: 'خطا در آپلود',
previewFile: 'مشاهدهی فایل',
},
Empty: {
description: 'دادهای موجود نیست',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$d = {
today: 'Tänään',
now: 'Nyt',
backToToday: 'Tämä päivä',
ok: 'Ok',
clear: 'Tyhjennä',
month: 'Kuukausi',
year: 'Vuosi',
timeSelect: 'Valise aika',
dateSelect: 'Valitse päivä',
monthSelect: 'Valitse kuukausi',
yearSelect: 'Valitse vuosi',
decadeSelect: 'Valitse vuosikymmen',
yearFormat: 'YYYY',
dateFormat: 'D.M.YYYY',
dayFormat: 'D',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Edellinen kuukausi (PageUp)',
nextMonth: 'Seuraava kuukausi (PageDown)',
previousYear: 'Edellinen vuosi (Control + left)',
nextYear: 'Seuraava vuosi (Control + right)',
previousDecade: 'Edellinen vuosikymmen',
nextDecade: 'Seuraava vuosikymmen',
previousCentury: 'Edellinen vuosisata',
nextCentury: 'Seuraava vuosisata',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$q = {
placeholder: 'Valitse aika',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$r = {
lang: __assign({ placeholder: 'Valitse päivä', rangePlaceholder: ['Alku päivä', 'Loppu päivä'] }, CalendarLocale$d),
timePickerLocale: __assign({}, locale$q),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$d = {
// Options.jsx
items_per_page: '/ sivu',
jump_to: 'Mene',
jump_to_confirm: 'Potvrdite',
page: '',
// Pagination.jsx
prev_page: 'Edellinen sivu',
next_page: 'Seuraava sivu',
prev_5: 'Edelliset 5 sivua',
next_5: 'Seuraavat 5 sivua',
prev_3: 'Edelliset 3 sivua',
next_3: 'Seuraavat 3 sivua',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var fi_FI = {
locale: 'fi',
Pagination: Pagination$d,
DatePicker: locale$r,
TimePicker: locale$q,
Calendar: CalendarLocale$d,
Table: {
filterTitle: 'Suodatus valikko',
filterConfirm: 'OK',
filterReset: 'Tyhjennä',
selectAll: 'Valitse kaikki',
selectInvert: 'Valitse päinvastoin',
sortTitle: 'Lajittele',
},
Modal: {
okText: 'OK',
cancelText: 'Peruuta',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Peruuta',
},
Transfer: {
searchPlaceholder: 'Etsi täältä',
itemUnit: 'kohde',
itemsUnit: 'kohdetta',
},
Upload: {
uploading: 'Lähetetään...',
removeFile: 'Poista tiedosto',
uploadError: 'Virhe lähetyksessä',
previewFile: 'Esikatsele tiedostoa',
},
Empty: {
description: 'Ei kohteita',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$e = {
today: 'Aujourd\'hui',
now: 'Maintenant',
backToToday: 'Aujourd\'hui',
ok: 'Ok',
clear: 'Rétablir',
month: 'Mois',
year: 'Année',
timeSelect: 'Sélectionner l\'heure',
dateSelect: 'Sélectionner l\'heure',
monthSelect: 'Choisissez un mois',
yearSelect: 'Choisissez une année',
decadeSelect: 'Choisissez une décennie',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Mois précédent (PageUp)',
nextMonth: 'Mois suivant (PageDown)',
previousYear: 'Année précédente (Ctrl + gauche)',
nextYear: 'Année prochaine (Ctrl + droite)',
previousDecade: 'Décennie précédente',
nextDecade: 'Décennie suivante',
previousCentury: 'Siècle précédent',
nextCentury: 'Siècle suivant',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$s = {
placeholder: 'Sélectionner l\'heure',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$t = {
lang: __assign({ placeholder: 'Sélectionner une date', rangePlaceholder: ['Date de début', 'Date de fin'] }, CalendarLocale$e),
timePickerLocale: __assign({}, locale$s),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$e = {
// Options.jsx
items_per_page: '/ page',
jump_to: 'Aller à',
jump_to_confirm: 'confirmer',
page: '',
// Pagination.jsx
prev_page: 'Page précédente',
next_page: 'Page suivante',
prev_5: '5 Pages précédentes',
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var fr_BE = {
locale: 'fr',
Pagination: Pagination$e,
DatePicker: locale$t,
TimePicker: locale$s,
Calendar: CalendarLocale$e,
Table: {
filterTitle: 'Filtrer',
filterConfirm: 'OK',
filterReset: 'Réinitialiser',
},
Modal: {
okText: 'OK',
cancelText: 'Annuler',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuler',
},
Transfer: {
searchPlaceholder: 'Recherche',
itemUnit: 'élément',
itemsUnit: 'éléments',
},
Empty: {
description: 'Aucune donnée',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$f = {
today: 'Aujourd\'hui',
now: 'Maintenant',
backToToday: 'Aujourd\'hui',
ok: 'Ok',
clear: 'Rétablir',
month: 'Mois',
year: 'Année',
timeSelect: 'Sélectionner l\'heure',
dateSelect: 'Sélectionner l\'heure',
monthSelect: 'Choisissez un mois',
yearSelect: 'Choisissez une année',
decadeSelect: 'Choisissez une décennie',
yearFormat: 'YYYY',
dateFormat: 'DD/MM/YYYY',
dayFormat: 'DD',
dateTimeFormat: 'DD/MM/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Mois précédent (PageUp)',
nextMonth: 'Mois suivant (PageDown)',
previousYear: 'Année précédente (Ctrl + gauche)',
nextYear: 'Année prochaine (Ctrl + droite)',
previousDecade: 'Décennie précédente',
nextDecade: 'Décennie suivante',
previousCentury: 'Siècle précédent',
nextCentury: 'Siècle suivant',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$u = {
placeholder: 'Sélectionner l\'heure',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$v = {
lang: __assign({ placeholder: 'Sélectionner une date', rangePlaceholder: ['Date de début', 'Date de fin'] }, CalendarLocale$f),
timePickerLocale: __assign({}, locale$u),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$f = {
// Options.jsx
items_per_page: '/ page',
jump_to: 'Aller à',
jump_to_confirm: 'confirmer',
page: '',
// Pagination.jsx
prev_page: 'Page précédente',
next_page: 'Page suivante',
prev_5: '5 Pages précédentes',
next_5: '5 Pages suivantes',
prev_3: '3 Pages précédentes',
next_3: '3 Pages suivantes',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var fr_FR = {
locale: 'fr',
Pagination: Pagination$f,
DatePicker: locale$v,
TimePicker: locale$u,
Calendar: CalendarLocale$f,
Table: {
filterTitle: 'Filtrer',
filterConfirm: 'OK',
filterReset: 'Réinitialiser',
selectAll: 'Tout sélectionner',
selectInvert: 'Inverser la sélection',
},
Modal: {
okText: 'OK',
cancelText: 'Annuler',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuler',
},
Transfer: {
searchPlaceholder: 'Recherche',
itemUnit: 'élément',
itemsUnit: 'éléments',
},
Upload: {
uploading: 'Téléversement en cours...',
removeFile: 'Supprimer',
uploadError: 'Erreur de téléversement',
previewFile: 'Afficher l\'aperçu du fichier',
},
Empty: {
description: 'Aucune donnée',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$g = {
today: 'Í dag',
now: 'Núna',
backToToday: 'Til baka til dagsins í dag',
ok: 'Í lagi',
clear: 'Hreinsa',
month: 'Mánuður',
year: 'Ár',
timeSelect: 'Velja tíma',
dateSelect: 'Velja dag',
monthSelect: 'Velja mánuð',
yearSelect: 'Velja ár',
decadeSelect: 'Velja áratug',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Fyrri mánuður (PageUp)',
nextMonth: 'Næsti mánuður (PageDown)',
previousYear: 'Fyrra ár (Control + left)',
nextYear: 'Næsta ár (Control + right)',
previousDecade: 'Fyrri áratugur',
nextDecade: 'Næsti áratugur',
previousCentury: 'Fyrri öld',
nextCentury: 'Næsta öld',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$w = {
placeholder: 'Velja tíma',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$x = {
lang: __assign({ placeholder: 'Veldu dag', rangePlaceholder: ['Upphafsdagur', 'Lokadagur'] }, CalendarLocale$g),
timePickerLocale: __assign({}, locale$w),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$g = {
// Options.jsx
items_per_page: '/ síðu',
jump_to: 'Síða',
jump_to_confirm: 'staðfest',
page: '',
// Pagination.jsx
prev_page: 'Fyrri síða',
next_page: 'Næsta síða',
prev_5: 'Til baka 5 síður',
next_5: 'Áfram 5 síður',
prev_3: 'Til baka 3 síður',
next_3: 'Áfram 3 síður',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var is_IS = {
locale: 'is',
Pagination: Pagination$g,
DatePicker: locale$x,
TimePicker: locale$w,
Calendar: CalendarLocale$g,
Table: {
filterTitle: 'Afmarkanir',
filterConfirm: 'Staðfesta',
filterReset: 'Núllstilla',
selectAll: 'Velja allt',
selectInvert: 'Viðsnúa vali',
},
Modal: {
okText: 'Áfram',
cancelText: 'Hætta við',
justOkText: 'Í lagi',
},
Popconfirm: {
okText: 'Áfram',
cancelText: 'Hætta við',
},
Transfer: {
searchPlaceholder: 'Leita hér',
itemUnit: 'færsla',
itemsUnit: 'færslur',
},
Upload: {
uploading: 'Hleð upp...',
removeFile: 'Fjarlægja skrá',
uploadError: 'Villa við að hlaða upp',
previewFile: 'Forskoða skrá',
},
Empty: {
description: 'Engin gögn',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$h = {
today: 'Oggi',
now: 'adesso',
backToToday: 'Torna ad oggi',
ok: 'Ok',
clear: 'Chiaro',
month: 'Mese',
year: 'Anno',
timeSelect: 'Seleziona il tempo',
dateSelect: 'Select date',
monthSelect: 'Seleziona la data',
yearSelect: 'Scegli un anno',
decadeSelect: 'Scegli un decennio',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Il mese scorso (PageUp)',
nextMonth: 'Il prossimo mese (PageDown)',
previousYear: 'L\'anno scorso (Control + sinistra)',
nextYear: 'L\'anno prossimo (Control + destra)',
previousDecade: 'Ultimo decennio',
nextDecade: 'Prossimo decennio',
previousCentury: 'Secolo precedente',
nextCentury: 'Prossimo secolo',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$y = {
placeholder: 'Selezionare il tempo',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$z = {
lang: __assign({ placeholder: 'Selezionare la data', rangePlaceholder: ['Data d\'inizio', 'Data di fine'] }, CalendarLocale$h),
timePickerLocale: __assign({}, locale$y),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$h = {
// Options.jsx
items_per_page: '/ pagina',
jump_to: 'vai a',
jump_to_confirm: 'Conferma',
page: '',
// Pagination.jsx
prev_page: 'Pagina precedente',
next_page: 'Pagina successiva',
prev_5: 'Precedente 5 pagine',
next_5: 'Prossime 5 pagine',
prev_3: 'Precedente 3 pagine',
next_3: 'Prossime 3 pagine',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var it_IT = {
locale: 'it',
Pagination: Pagination$h,
DatePicker: locale$z,
TimePicker: locale$y,
Calendar: CalendarLocale$h,
Table: {
filterTitle: 'Menù Filtro',
filterConfirm: 'OK',
filterReset: 'Reset',
selectAll: 'Seleziona pagina corrente',
selectInvert: 'Inverti selezione nella pagina corrente',
sortTitle: 'Ordina',
},
Modal: {
okText: 'OK',
cancelText: 'Annulla',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annulla',
},
Transfer: {
searchPlaceholder: 'Cerca qui',
itemUnit: 'articolo',
itemsUnit: 'elementi',
},
Upload: {
uploading: 'Caricamento...',
removeFile: 'Rimuovi il file',
uploadError: 'Errore di caricamento',
previewFile: 'Anteprima file',
},
Empty: {
description: 'Nessun dato',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$i = {
today: '今日',
now: '現在時刻',
backToToday: '今日に戻る',
ok: '決定',
timeSelect: '時間を選択',
dateSelect: '日時を選択',
clear: 'クリア',
month: '月',
year: '年',
previousMonth: '前月 (ページアップキー)',
nextMonth: '翌月 (ページダウンキー)',
monthSelect: '月を選択',
yearSelect: '年を選択',
decadeSelect: '年代を選択',
yearFormat: 'YYYY年',
dayFormat: 'D日',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒',
previousYear: '前年 (Controlを押しながら左キー)',
nextYear: '翌年 (Controlを押しながら右キー)',
previousDecade: '前の年代',
nextDecade: '次の年代',
previousCentury: '前の世紀',
nextCentury: '次の世紀',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$A = {
placeholder: '時刻を選択',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$B = {
lang: __assign({ placeholder: '日付を選択', rangePlaceholder: ['開始日付', '終了日付'] }, CalendarLocale$i),
timePickerLocale: __assign({}, locale$A),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$i = {
// Options.jsx
items_per_page: '/ ページ',
jump_to: '移動',
jump_to_confirm: '確認する',
page: 'ページ',
// Pagination.jsx
prev_page: '前のページ',
next_page: '次のページ',
prev_5: '前 5ページ',
next_5: '次 5ページ',
prev_3: '前 3ページ',
next_3: '次 3ページ',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ja_JP = {
locale: 'ja',
Pagination: Pagination$i,
DatePicker: locale$B,
TimePicker: locale$A,
Calendar: CalendarLocale$i,
Table: {
filterTitle: 'メニューをフィルター',
filterConfirm: 'OK',
filterReset: 'リセット',
selectAll: 'すべてを選択',
selectInvert: '選択を反転',
},
Modal: {
okText: 'OK',
cancelText: 'キャンセル',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'キャンセル',
},
Transfer: {
searchPlaceholder: 'ここを検索',
itemUnit: 'アイテム',
itemsUnit: 'アイテム',
},
Upload: {
uploading: 'アップロード中...',
removeFile: 'ファイルを削除',
uploadError: 'アップロードエラー',
previewFile: 'ファイルをプレビュー',
},
Empty: {
description: 'データがありません',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$j = {
today: '오늘',
now: '현재 시각',
backToToday: '오늘로 돌아가기',
ok: '확인',
clear: '지우기',
month: '월',
year: '년',
timeSelect: '시간 선택',
dateSelect: '날짜 선택',
monthSelect: '달 선택',
yearSelect: '연 선택',
decadeSelect: '연대 선택',
yearFormat: 'YYYY년',
dateFormat: 'YYYY-MM-DD',
dayFormat: 'Do',
dateTimeFormat: 'YYYY-MM-DD HH:mm:ss',
monthBeforeYear: false,
previousMonth: '이전 달 (PageUp)',
nextMonth: '다음 달 (PageDown)',
previousYear: '이전 해 (Control + left)',
nextYear: '다음 해 (Control + right)',
previousDecade: '이전 연대',
nextDecade: '다음 연대',
previousCentury: '이전 세기',
nextCentury: '다음 세기',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$C = {
placeholder: '날짜 선택',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$D = {
lang: __assign({ placeholder: '날짜 선택', rangePlaceholder: ['시작일', '종료일'] }, CalendarLocale$j),
timePickerLocale: __assign({}, locale$C),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$j = {
// Options.jsx
items_per_page: '/ 쪽',
jump_to: '이동하기',
jump_to_confirm: '확인하다',
page: '',
// Pagination.jsx
prev_page: '이전 페이지',
next_page: '다음 페이지',
prev_5: '이전 5 페이지',
next_5: '다음 5 페이지',
prev_3: '이전 3 페이지',
next_3: '다음 3 페이지',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ko_KR = {
locale: 'ko',
Pagination: Pagination$j,
DatePicker: locale$D,
TimePicker: locale$C,
Calendar: CalendarLocale$j,
Table: {
filterTitle: '필터 메뉴',
filterConfirm: '확인',
filterReset: '초기화',
selectAll: '모두 선택',
selectInvert: '선택 반전',
},
Modal: {
okText: '확인',
cancelText: '취소',
justOkText: '확인',
},
Popconfirm: {
okText: '확인',
cancelText: '취소',
},
Transfer: {
searchPlaceholder: '여기에 검색하세요',
itemUnit: '개',
itemsUnit: '개',
},
Upload: {
uploading: '업로드 중...',
removeFile: '파일 삭제',
uploadError: '업로드 실패',
previewFile: '파일 미리보기',
},
Empty: {
description: '데이터 없음',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$k = {
today: 'I dag',
now: 'Nå',
backToToday: 'Gå til i dag',
ok: 'Ok',
clear: 'Annuller',
month: 'Måned',
year: 'År',
timeSelect: 'Velg tidspunkt',
dateSelect: 'Velg dato',
monthSelect: 'Velg måned',
yearSelect: 'Velg år',
decadeSelect: 'Velg årti',
yearFormat: 'YYYY',
dateFormat: 'DD.MM.YYYY',
dayFormat: 'DD',
dateTimeFormat: 'DD.MM.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Forrige måned(PageUp)',
nextMonth: 'Neste måned (PageDown)',
previousYear: 'Forrige år (Control + left)',
nextYear: 'Neste år (Control + right)',
previousDecade: 'Forrige tiår',
nextDecade: 'Neste tiår',
previousCentury: 'Forrige århundre',
nextCentury: 'Neste århundre',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$E = {
placeholder: 'Velg tid',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$F = {
lang: __assign({ placeholder: 'Velg dato', rangePlaceholder: ['Startdato', 'Sluttdato'] }, CalendarLocale$k),
timePickerLocale: __assign({}, locale$E),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$k = {
// Options.jsx
items_per_page: '/ side',
jump_to: 'Gå til side',
page: '',
// Pagination.jsx
prev_page: 'Forrige side',
next_page: 'Neste side',
prev_5: '5 forrige',
next_5: '5 neste',
prev_3: '3 forrige',
next_3: '3 neste',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var nb_NO = {
locale: 'nb',
DatePicker: locale$F,
TimePicker: locale$E,
Calendar: CalendarLocale$k,
Pagination: Pagination$k,
Table: {
filterTitle: 'Filtermeny',
filterConfirm: 'OK',
filterReset: 'Nullstill',
selectAll: 'Velg alle',
selectInvert: 'Inverter valg',
},
Modal: {
okText: 'OK',
cancelText: 'Avbryt',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Avbryt',
},
Transfer: {
searchPlaceholder: 'Søk her',
itemUnit: 'element',
itemsUnit: 'elementer',
},
Upload: {
uploading: 'Laster opp...',
removeFile: 'Fjern fil',
uploadError: 'Feil ved opplastning',
previewFile: 'Forhåndsvisning',
},
Empty: {
description: 'Ingen data',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$l = {
today: 'Vandaag',
now: 'Nu',
backToToday: 'Terug naar vandaag',
ok: 'Ok',
clear: 'Reset',
month: 'Maand',
year: 'Jaar',
timeSelect: 'Selecteer tijd',
dateSelect: 'Selecteer datum',
monthSelect: 'Kies een maand',
yearSelect: 'Kies een jaar',
decadeSelect: 'Kies een decennium',
yearFormat: 'YYYY',
dateFormat: 'D-M-YYYY',
dayFormat: 'D',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Vorige maand (PageUp)',
nextMonth: 'Volgende maand (PageDown)',
previousYear: 'Vorig jaar (Control + left)',
nextYear: 'Volgend jaar (Control + right)',
previousDecade: 'Vorig decennium',
nextDecade: 'Volgend decennium',
previousCentury: 'Vorige eeuw',
nextCentury: 'Volgende eeuw',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$G = {
placeholder: 'Selecteer tijd',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$H = {
lang: __assign({ placeholder: 'Selecteer datum', rangePlaceholder: ['Begin datum', 'Eind datum'] }, CalendarLocale$l),
timePickerLocale: __assign({}, locale$G),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$l = {
// Options.jsx
items_per_page: '/ pagina',
jump_to: 'Ga naar',
jump_to_confirm: 'bevestigen',
page: '',
// Pagination.jsx
prev_page: 'Vorige pagina',
next_page: 'Volgende pagina',
prev_5: 'Vorige 5 pagina\'s',
next_5: 'Volgende 5 pagina\'s',
prev_3: 'Vorige 3 pagina\'s',
next_3: 'Volgende 3 pagina\'s',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var nl_BE = {
locale: 'nl-be',
Pagination: Pagination$l,
DatePicker: locale$H,
TimePicker: locale$G,
Calendar: CalendarLocale$l,
Table: {
filterTitle: 'FilterMenu',
filterConfirm: 'OK',
filterReset: 'Reset',
selectAll: 'Selecteer huidige pagina',
selectInvert: 'Selecteer huidige pagina',
},
Modal: {
okText: 'OK',
cancelText: 'Annuleer',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuleer',
},
Transfer: {
searchPlaceholder: 'Zoek hier',
itemUnit: 'item',
itemsUnit: 'items',
},
Upload: {
uploading: 'Uploaden...',
removeFile: 'Bestand verwijderen',
uploadError: 'Upload fout',
previewFile: 'Preview bestand',
},
Empty: {
description: 'Geen gegevens',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$m = {
today: 'Vandaag',
now: 'Nu',
backToToday: 'Terug naar vandaag',
ok: 'Ok',
clear: 'Reset',
month: 'Maand',
year: 'Jaar',
timeSelect: 'Selecteer tijd',
dateSelect: 'Selecteer datum',
monthSelect: 'Kies een maand',
yearSelect: 'Kies een jaar',
decadeSelect: 'Kies een decennium',
yearFormat: 'YYYY',
dateFormat: 'D-M-YYYY',
dayFormat: 'D',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Vorige maand (PageUp)',
nextMonth: 'Volgende maand (PageDown)',
previousYear: 'Vorig jaar (Control + left)',
nextYear: 'Volgend jaar (Control + right)',
previousDecade: 'Vorig decennium',
nextDecade: 'Volgend decennium',
previousCentury: 'Vorige eeuw',
nextCentury: 'Volgende eeuw',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$I = {
placeholder: 'Selecteer tijd',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$J = {
lang: __assign({ placeholder: 'Selecteer datum', rangePlaceholder: ['Begin datum', 'Eind datum'] }, CalendarLocale$m),
timePickerLocale: __assign({}, locale$I),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$m = {
// Options.jsx
items_per_page: '/ pagina',
jump_to: 'Ga naar',
jump_to_confirm: 'bevestigen',
page: '',
// Pagination.jsx
prev_page: 'Vorige pagina',
next_page: 'Volgende pagina',
prev_5: 'Vorige 5 pagina\'s',
next_5: 'Volgende 5 pagina\'s',
prev_3: 'Vorige 3 pagina\'s',
next_3: 'Volgende 3 pagina\'s',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var nl_NL = {
locale: 'nl',
Pagination: Pagination$m,
DatePicker: locale$J,
TimePicker: locale$I,
Calendar: CalendarLocale$m,
Table: {
filterTitle: 'Filteren',
filterConfirm: 'OK',
filterReset: 'Reset',
selectAll: 'Selecteer huidige pagina',
selectInvert: 'Deselecteer huidige pagina',
},
Modal: {
okText: 'OK',
cancelText: 'Annuleren',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Annuleren',
},
Transfer: {
searchPlaceholder: 'Zoeken',
itemUnit: 'item',
itemsUnit: 'items',
},
Upload: {
uploading: 'Uploaden...',
removeFile: 'Verwijder bestand',
uploadError: 'Fout tijdens uploaden',
previewFile: 'Bekijk bestand',
},
Empty: {
description: 'Geen gegevens',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$n = {
today: 'Dzisiaj',
now: 'Teraz',
backToToday: 'Ustaw dzisiaj',
ok: 'Ok',
clear: 'Wyczyść',
month: 'Miesiąc',
year: 'Rok',
timeSelect: 'Ustaw czas',
dateSelect: 'Ustaw datę',
monthSelect: 'Wybierz miesiąc',
yearSelect: 'Wybierz rok',
decadeSelect: 'Wybierz dekadę',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Poprzedni miesiąc (PageUp)',
nextMonth: 'Następny miesiąc (PageDown)',
previousYear: 'Ostatni rok (Ctrl + left)',
nextYear: 'Następny rok (Ctrl + right)',
previousDecade: 'Ostatnia dekada',
nextDecade: 'Następna dekada',
previousCentury: 'Ostatni wiek',
nextCentury: 'Następny wiek',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$K = {
placeholder: 'Wybierz godzinę',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$L = {
lang: __assign({ placeholder: 'Wybierz datę', rangePlaceholder: ['Data początkowa', 'Data końcowa'] }, CalendarLocale$n),
timePickerLocale: __assign({}, locale$K),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$n = {
// Options.jsx
items_per_page: '/ stronę',
jump_to: 'Idź do',
jump_to_confirm: 'potwierdzać',
page: '',
// Pagination.jsx
prev_page: 'Poprzednia strona',
next_page: 'Następna strona',
prev_5: 'Poprzednie 5 stron',
next_5: 'Następne 5 stron',
prev_3: 'Poprzednie 3 strony',
next_3: 'Następne 3 strony',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var pl_PL = {
locale: 'pl',
Pagination: Pagination$n,
DatePicker: locale$L,
TimePicker: locale$K,
Calendar: CalendarLocale$n,
Table: {
filterTitle: 'Menu filtra',
filterConfirm: 'OK',
filterReset: 'Wyczyść',
selectAll: 'Zaznacz bieżącą stronę',
selectInvert: 'Odwróć zaznaczenie',
},
Modal: {
okText: 'OK',
cancelText: 'Anuluj',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Anuluj',
},
Transfer: {
searchPlaceholder: 'Szukaj',
itemUnit: 'obiekt',
itemsUnit: 'obiekty',
},
Upload: {
uploading: 'Wysyłanie...',
removeFile: 'Usuń plik',
uploadError: 'Błąd wysyłania',
previewFile: 'Podejrzyj plik',
},
Empty: {
description: 'Brak danych',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$o = {
today: 'Hoje',
now: 'Agora',
backToToday: 'Voltar para hoje',
ok: 'Ok',
clear: 'Limpar',
month: 'Mês',
year: 'Ano',
timeSelect: 'Selecionar tempo',
dateSelect: 'Selecionar data',
monthSelect: 'Escolher mês',
yearSelect: 'Escolher ano',
decadeSelect: 'Escolher década',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: false,
previousMonth: 'Mês anterior (PageUp)',
nextMonth: 'Próximo mês (PageDown)',
previousYear: 'Ano anterior (Control + esquerda)',
nextYear: 'Próximo ano (Control + direita)',
previousDecade: 'Década anterior',
nextDecade: 'Próxima década',
previousCentury: 'Século anterior',
nextCentury: 'Próximo século',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$M = {
placeholder: 'Hora',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$N = {
lang: __assign({ placeholder: 'Selecionar data', rangePlaceholder: ['Data de início', 'Data de fim'] }, CalendarLocale$o),
timePickerLocale: __assign({}, locale$M),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$o = {
// Options.jsx
items_per_page: '/ páginas',
jump_to: 'Vá até',
jump_to_confirm: 'confirme',
page: '',
// Pagination.jsx
prev_page: 'Página anterior',
next_page: 'Próxima página',
prev_5: '5 páginas anteriores',
next_5: '5 próximas páginas',
prev_3: '3 páginas anteriores',
next_3: '3 próximas páginas',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var pt_BR = {
locale: 'pt-br',
Pagination: Pagination$o,
DatePicker: locale$N,
TimePicker: locale$M,
Calendar: CalendarLocale$o,
Table: {
filterTitle: 'Filtro',
filterConfirm: 'OK',
filterReset: 'Resetar',
selectAll: 'Selecionar página atual',
selectInvert: 'Inverter seleção',
},
Modal: {
okText: 'OK',
cancelText: 'Cancelar',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancelar',
},
Transfer: {
searchPlaceholder: 'Procurar',
itemUnit: 'item',
itemsUnit: 'items',
},
Upload: {
uploading: 'Enviando...',
removeFile: 'Remover arquivo',
uploadError: 'Erro no envio',
previewFile: 'Visualizar arquivo',
},
Empty: {
description: 'Não há dados',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$p = {
today: 'Hoje',
now: 'Agora',
backToToday: 'Hoje',
ok: 'Ok',
clear: 'Limpar',
month: 'Mês',
year: 'Ano',
timeSelect: 'Selecionar hora',
dateSelect: 'Selecionar data',
monthSelect: 'Selecionar mês',
yearSelect: 'Selecionar ano',
decadeSelect: 'Selecionar década',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Mês anterior (PageUp)',
nextMonth: 'Mês seguinte (PageDown)',
previousYear: 'Ano anterior (Control + left)',
nextYear: 'Ano seguinte (Control + right)',
previousDecade: 'Década anterior',
nextDecade: 'Década seguinte',
previousCentury: 'Século anterior',
nextCentury: 'Século seguinte',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$O = {
placeholder: 'Hora',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$P = {
lang: __assign({}, CalendarLocale$p, { placeholder: 'Data', rangePlaceholder: ['Data inicial', 'Data final'], today: 'Hoje', now: 'Agora', backToToday: 'Hoje', ok: 'Ok', clear: 'Limpar', month: 'Mês', year: 'Ano', timeSelect: 'Hora', dateSelect: 'Selecionar data', monthSelect: 'Selecionar mês', yearSelect: 'Selecionar ano', decadeSelect: 'Selecionar década', yearFormat: 'YYYY', dateFormat: 'D/M/YYYY', dayFormat: 'D', dateTimeFormat: 'D/M/YYYY HH:mm:ss', monthFormat: 'MMMM', monthBeforeYear: false, previousMonth: 'Mês anterior (PageUp)', nextMonth: 'Mês seguinte (PageDown)', previousYear: 'Ano anterior (Control + left)', nextYear: 'Ano seguinte (Control + right)', previousDecade: 'Última década', nextDecade: 'Próxima década', previousCentury: 'Último século', nextCentury: 'Próximo século' }),
timePickerLocale: __assign({}, locale$O, { placeholder: 'Hora' }),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$p = {
// Options.jsx
items_per_page: '/ página',
jump_to: 'Saltar',
jump_to_confirm: 'confirmar',
page: '',
// Pagination.jsx
prev_page: 'Página Anterior',
next_page: 'Página Seguinte',
prev_5: 'Recuar 5 Páginas',
next_5: 'Avançar 5 Páginas',
prev_3: 'Recuar 3 Páginas',
next_3: 'Avançar 3 Páginas',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var pt_PT = {
locale: 'pt',
Pagination: Pagination$p,
DatePicker: locale$P,
TimePicker: locale$O,
Calendar: CalendarLocale$p,
Table: {
filterTitle: 'Filtro',
filterConfirm: 'Aplicar',
filterReset: 'Reiniciar',
selectAll: 'Selecionar página atual',
selectInvert: 'Inverter seleção',
},
Modal: {
okText: 'OK',
cancelText: 'Cancelar',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancelar',
},
Transfer: {
searchPlaceholder: 'Procurar...',
itemUnit: 'item',
itemsUnit: 'itens',
},
Upload: {
uploading: 'A carregar...',
removeFile: 'Remover',
uploadError: 'Erro ao carregar',
previewFile: 'Pré-visualizar',
},
Empty: {
description: 'Sem resultados',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$q = {
today: 'Сегодня',
now: 'Сейчас',
backToToday: 'Текущая дата',
ok: 'Ok',
clear: 'Очистить',
month: 'Месяц',
year: 'Год',
timeSelect: 'Выбрать время',
dateSelect: 'Выбрать дату',
monthSelect: 'Выбрать месяц',
yearSelect: 'Выбрать год',
decadeSelect: 'Выбрать десятилетие',
yearFormat: 'YYYY',
dateFormat: 'D-M-YYYY',
dayFormat: 'D',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Предыдущий месяц (PageUp)',
nextMonth: 'Следующий месяц (PageDown)',
previousYear: 'Предыдущий год (Control + left)',
nextYear: 'Следующий год (Control + right)',
previousDecade: 'Предыдущее десятилетие',
nextDecade: 'Следущее десятилетие',
previousCentury: 'Предыдущий век',
nextCentury: 'Следующий век',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Created by Andrey Gayvoronsky on 13/04/16.
* @type {?}
*/
var locale$Q = {
placeholder: 'Выберите время',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$R = {
lang: __assign({ placeholder: 'Выберите дату', rangePlaceholder: ['Начальная дата', 'Конечная дата'] }, CalendarLocale$q),
timePickerLocale: __assign({}, locale$Q),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$q = {
// Options.jsx
items_per_page: '/странице',
jump_to: 'Перейти',
jump_to_confirm: 'подтвердить',
page: '',
// Pagination.jsx
prev_page: 'Назад',
next_page: 'Вперед',
prev_5: 'Предыдущие 5',
next_5: 'Следующие 5',
prev_3: 'Предыдущие 3',
next_3: 'Следующие 3',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ru_RU = {
locale: 'ru',
Pagination: Pagination$q,
DatePicker: locale$R,
TimePicker: locale$Q,
Calendar: CalendarLocale$q,
Table: {
filterTitle: 'Фильтр',
filterConfirm: 'OK',
filterReset: 'Сбросить',
selectAll: 'Выбрать всё',
selectInvert: 'Инвертировать выбор',
},
Modal: {
okText: 'OK',
cancelText: 'Отмена',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Отмена',
},
Transfer: {
searchPlaceholder: 'Поиск',
itemUnit: 'элем.',
itemsUnit: 'элем.',
},
Upload: {
uploading: 'Загрузка...',
removeFile: 'Удалить файл',
uploadError: 'При загрузке произошла ошибка',
previewFile: 'Предпросмотр файла',
},
Empty: {
description: 'Нет данных',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$r = {
today: 'Dnes',
now: 'Teraz',
backToToday: 'Späť na dnes',
ok: 'Ok',
clear: 'Vymazať',
month: 'Mesiac',
year: 'Rok',
timeSelect: 'Vybrať čas',
dateSelect: 'Vybrať dátum',
monthSelect: 'Vybrať mesiac',
yearSelect: 'Vybrať rok',
decadeSelect: 'Vybrať dekádu',
yearFormat: 'YYYY',
dateFormat: 'D.M.YYYY',
dayFormat: 'D',
dateTimeFormat: 'D.M.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Predchádzajúci mesiac (PageUp)',
nextMonth: 'Nasledujúci mesiac (PageDown)',
previousYear: 'Predchádzajúci rok (Control + left)',
nextYear: 'Nasledujúci rok (Control + right)',
previousDecade: 'Predchádzajúca dekáda',
nextDecade: 'Nasledujúca dekáda',
previousCentury: 'Predchádzajúce storočie',
nextCentury: 'Nasledujúce storočie',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$S = {
placeholder: 'Vybrať čas',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// 统一合并为完整的 Locale
/** @type {?} */
var locale$T = {
lang: __assign({ placeholder: 'Vybrať dátum', rangePlaceholder: ['Od', 'Do'] }, CalendarLocale$r),
timePickerLocale: __assign({}, locale$S),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$r = {
// Options.jsx
items_per_page: '/ strana',
jump_to: 'Choď na',
jump_to_confirm: 'potvrdit',
page: '',
// Pagination.jsx
prev_page: 'Predchádzajúca strana',
next_page: 'Nasledujúca strana',
prev_5: 'Predchádzajúcich 5 strán',
next_5: 'Nasledujúcich 5 strán',
prev_3: 'Predchádzajúce 3 strany',
next_3: 'Nasledujúce 3 strany',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var sk_SK = {
locale: 'sk',
Pagination: Pagination$r,
DatePicker: locale$T,
TimePicker: locale$S,
Calendar: CalendarLocale$r,
Table: {
filterTitle: 'Filter',
filterConfirm: 'OK',
filterReset: 'Obnoviť',
selectAll: 'Vybrať všetko',
selectInvert: 'Vybrať opačné',
},
Modal: {
okText: 'OK',
cancelText: 'Zrušiť',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Zrušiť',
},
Transfer: {
searchPlaceholder: 'Vyhľadávanie',
itemUnit: 'položka',
itemsUnit: 'položiek',
},
Upload: {
uploading: 'Nahrávanie...',
removeFile: 'Odstrániť súbor',
uploadError: 'Chyba pri nahrávaní',
previewFile: 'Zobraziť súbor',
},
Empty: {
description: 'Žiadne dáta',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$s = {
today: 'Danes',
now: 'Zdaj',
backToToday: 'Nazaj na danes',
ok: 'V redu',
clear: 'Počisti',
month: 'Mesec',
year: 'Leto',
timeSelect: 'Izberi čas',
dateSelect: 'Izberi datum',
monthSelect: 'Izberi mesec',
yearSelect: 'Izberi leto',
decadeSelect: 'Izberi desetletje',
yearFormat: 'YYYY',
dateFormat: 'DD.MM.YYYY',
dayFormat: 'D',
dateTimeFormat: 'DD.MM.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Predhodnji mesec (PageUp)',
nextMonth: 'Naslednji mesec (PageDown)',
previousYear: 'Prejšnje leto (Control + left)',
nextYear: 'Naslednje leto (Control + right)',
previousDecade: 'Prejšnje desetletje',
nextDecade: 'Naslednje desetletje',
previousCentury: 'Prejšnje stoletje',
nextCentury: 'Naslednje stoletje',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$U = {
placeholder: 'Izberite čas',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$V = {
lang: __assign({ placeholder: 'Izberite datum', rangePlaceholder: ['Začetni datum', 'Končni datum'] }, CalendarLocale$s),
timePickerLocale: __assign({}, locale$U),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$s = {
// Options.jsx
items_per_page: '/ stran',
jump_to: 'Pojdi na',
jump_to_confirm: 'potrdi',
page: '',
// Pagination.jsx
prev_page: 'Prejšnja stran',
next_page: 'Naslednja stran',
prev_5: 'Prejšnjih 5 Strani',
next_5: 'Naslednjih 5 Strani',
prev_3: 'Prejšnje 3 Strani',
next_3: 'Naslednje 3 Strani',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var sl_SI = {
locale: 'sl',
Pagination: Pagination$s,
DatePicker: locale$V,
TimePicker: locale$U,
Calendar: CalendarLocale$s,
Table: {
filterTitle: 'Filter',
filterConfirm: 'Filtriraj',
filterReset: 'Pobriši filter',
selectAll: 'Izberi vse na trenutni strani',
selectInvert: 'Obrni izbor na trenutni strani',
},
Modal: {
okText: 'V redu',
cancelText: 'Prekliči',
justOkText: 'V redu',
},
Popconfirm: {
okText: 'v redu',
cancelText: 'Prekliči',
},
Transfer: {
searchPlaceholder: 'Išči tukaj',
itemUnit: 'Objekt',
itemsUnit: 'Objektov',
},
Upload: {
uploading: 'Nalaganje...',
removeFile: 'Odstrani datoteko',
uploadError: 'Napaka pri nalaganju',
previewFile: 'Predogled datoteke',
},
Empty: {
description: 'Ni podatkov',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$t = {
today: 'Danas',
now: 'Sada',
backToToday: 'Vrati se na danas',
ok: 'U redu',
clear: 'Obriši',
month: 'Mesec',
year: 'Godina',
timeSelect: 'Izaberi vreme',
dateSelect: 'Izaberi datum',
monthSelect: 'Izaberi mesec',
yearSelect: 'Izaberi godinu',
decadeSelect: 'Izaberi deceniju',
yearFormat: 'YYYY',
dateFormat: 'DD.MM.YYYY',
dayFormat: 'D',
dateTimeFormat: 'DD.MM.YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Prethodni mesec (PageUp)',
nextMonth: 'Sledeći mesec (PageDown)',
previousYear: 'Prethodna godina (Control + left)',
nextYear: 'Sledeća godina (Control + right)',
previousDecade: 'Prethodna decenija',
nextDecade: 'Sledeća decenija',
previousCentury: 'Prethodni vek',
nextCentury: 'Sledeći vek',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$W = {
placeholder: 'Izaberite vreme',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$X = {
lang: __assign({ placeholder: 'Izaberite datum', rangePlaceholder: ['Početni datum', 'Krajnji datum'] }, CalendarLocale$t),
timePickerLocale: __assign({}, locale$W),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$t = {
// Options.jsx
items_per_page: '/ strani',
jump_to: 'Idi na',
page: '',
// Pagination.jsx
prev_page: 'Prethodna strana',
next_page: 'Sledeća strana',
prev_5: 'Prethodnih 5 Strana',
next_5: 'Sledećih 5 Strana',
prev_3: 'Prethodnih 3 Strane',
next_3: 'Sledećih 3 Strane',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var sr_RS = {
locale: 'sr',
Pagination: Pagination$t,
DatePicker: locale$X,
TimePicker: locale$W,
Calendar: CalendarLocale$t,
Table: {
filterTitle: 'Filter',
filterConfirm: 'Primeni filter',
filterReset: 'Resetuj filter',
selectAll: 'Obeleži sve na trenutnoj strani',
selectInvert: 'Obrni selekciju na trenutnoj stranici',
},
Modal: {
okText: 'U redu',
cancelText: 'Otkaži',
justOkText: 'U redu',
},
Popconfirm: {
okText: 'U redu',
cancelText: 'Otkaži',
},
Transfer: {
searchPlaceholder: 'Pretražite ovde',
itemUnit: 'stavka',
itemsUnit: 'stavki',
},
Upload: {
uploading: 'Slanje...',
removeFile: 'Ukloni fajl',
uploadError: 'Greška prilikom slanja',
previewFile: 'Pogledaj fajl',
},
Empty: {
description: 'Nema podataka',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$u = {
today: 'I dag',
now: 'Nu',
backToToday: 'Till idag',
ok: 'Ok',
clear: 'Avbryt',
month: 'Månad',
year: 'År',
timeSelect: 'Välj tidpunkt',
dateSelect: 'Välj datum',
monthSelect: 'Välj månad',
yearSelect: 'Välj år',
decadeSelect: 'Välj årtionde',
yearFormat: 'YYYY',
dateFormat: 'YYYY-MM-DD',
dayFormat: 'D',
dateTimeFormat: 'YYYY-MM-DD H:mm:ss',
monthBeforeYear: true,
previousMonth: 'Förra månaden (PageUp)',
nextMonth: 'Nästa månad (PageDown)',
previousYear: 'Föreg år (Control + left)',
nextYear: 'Nästa år (Control + right)',
previousDecade: 'Föreg årtionde',
nextDecade: 'Nästa årtionde',
previousCentury: 'Föreg århundrade',
nextCentury: 'Nästa århundrade',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$Y = {
placeholder: 'Välj tid',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$Z = {
lang: __assign({ placeholder: 'Välj datum', rangePlaceholder: ['Startdatum', 'Slutdatum'] }, CalendarLocale$u),
timePickerLocale: __assign({}, locale$Y),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$u = {
// Options.jsx
items_per_page: '/ sida',
jump_to: 'Gå till',
jump_to_confirm: 'bekräfta',
page: '',
// Pagination.jsx
prev_page: 'Föreg sida',
next_page: 'Nästa sida',
prev_5: 'Föreg 5 sidor',
next_5: 'Nästa 5 sidor',
prev_3: 'Föreg 3 sidor',
next_3: 'Nästa 3 sidor',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var sv_SE = {
locale: 'sv',
Pagination: Pagination$u,
DatePicker: locale$Z,
TimePicker: locale$Y,
Calendar: CalendarLocale$u,
Table: {
filterTitle: 'Filtermeny',
filterConfirm: 'OK',
filterReset: 'Rensa',
},
Modal: {
okText: 'OK',
cancelText: 'Avbryt',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Avbryt',
},
Transfer: {
searchPlaceholder: 'Sök',
itemUnit: 'element',
itemsUnit: 'element',
},
Empty: {
description: 'Ingen information',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$v = {
today: 'วันนี้',
now: 'ตอนนี้',
backToToday: 'กลับไปยังวันนี้',
ok: 'ตกลง',
clear: 'ลบล้าง',
month: 'เดือน',
year: 'ปี',
timeSelect: 'เลือกเวลา',
dateSelect: 'เลือกวัน',
monthSelect: 'เลือกเดือน',
yearSelect: 'เลือกปี',
decadeSelect: 'เลือกทศวรรษ',
yearFormat: 'YYYY',
dateFormat: 'D/M/YYYY',
dayFormat: 'D',
dateTimeFormat: 'D/M/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'เดือนก่อนหน้า (PageUp)',
nextMonth: 'เดือนถัดไป (PageDown)',
previousYear: 'ปีก่อนหน้า (Control + left)',
nextYear: 'ปีถัดไป (Control + right)',
previousDecade: 'ทศวรรษก่อนหน้า',
nextDecade: 'ทศวรรษถัดไป',
previousCentury: 'ศตวรรษก่อนหน้า',
nextCentury: 'ศตวรรษถัดไป',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$_ = {
placeholder: 'เลือกเวลา',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$10 = {
lang: __assign({ placeholder: 'เลือกวันที่', rangePlaceholder: ['วันเริ่มต้น', 'วันสิ้นสุด'] }, CalendarLocale$v),
timePickerLocale: __assign({}, locale$_)
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$v = {
// Options.jsx
items_per_page: '/ หน้า',
jump_to: 'ไปยัง',
jump_to_confirm: 'ยืนยัน',
page: '',
// Pagination.jsx
prev_page: 'หน้าก่อนหน้า',
next_page: 'หน้าถัดไป',
prev_5: 'ย้อนกลับ 5 หน้า',
next_5: 'ถัดไป 5 หน้า',
prev_3: 'ย้อนกลับ 3 หน้า',
next_3: 'ถัดไป 3 หน้า',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var th_TH = {
locale: 'th',
Pagination: Pagination$v,
DatePicker: locale$10,
TimePicker: locale$_,
Calendar: CalendarLocale$v,
Table: {
filterTitle: 'ตัวกรอง',
filterConfirm: 'ยืนยัน',
filterReset: 'รีเซ็ต',
selectAll: 'เลือกทั้งหมดในหน้านี้',
selectInvert: 'เลือกสถานะตรงกันข้าม',
},
Modal: {
okText: 'ตกลง',
cancelText: 'ยกเลิก',
justOkText: 'ตกลง',
},
Popconfirm: {
okText: 'ตกลง',
cancelText: 'ยกเลิก',
},
Transfer: {
searchPlaceholder: 'ค้นหา',
itemUnit: 'ชิ้น',
itemsUnit: 'ชิ้น',
},
Upload: {
uploading: 'กำลังอัปโหลด...',
removeFile: 'ลบไฟล์',
uploadError: 'เกิดข้อผิดพลาดในการอัปโหลด',
previewFile: 'ดูตัวอย่างไฟล์',
},
Empty: {
description: 'ไม่มีข้อมูล',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$11 = {
placeholder: 'Zaman Seç',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$12 = {
lang: __assign({ placeholder: 'Tarih Seç', rangePlaceholder: ['Başlangıç Tarihi', 'Bitiş Tarihi'] }, CalendarLocale$9),
timePickerLocale: __assign({}, locale$11),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var tr_TR = {
locale: 'tr',
Pagination: Pagination$9,
DatePicker: locale$12,
TimePicker: locale$11,
Calendar: CalendarLocale$9,
Table: {
filterTitle: 'Menü Filtrele',
filterConfirm: 'Tamam',
filterReset: 'Sıfırla',
selectAll: 'Hepsini Seç',
selectInvert: 'Tersini Seç',
},
Modal: {
okText: 'Tamam',
cancelText: 'İptal',
justOkText: 'Tamam',
},
Popconfirm: {
okText: 'Tamam',
cancelText: 'İptal',
},
Transfer: {
searchPlaceholder: 'Arama',
itemUnit: 'Öğe',
itemsUnit: 'Öğeler',
},
Upload: {
uploading: 'Yükleniyor...',
removeFile: "Dosyay\u0131 kald\u0131r",
uploadError: 'Yükleme Hatası',
previewFile: "Dosyay\u0131 \u00D6nizle",
},
Empty: {
description: 'Veri Yok',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$w = {
today: 'Сьогодні',
now: 'Зараз',
backToToday: 'Поточна дата',
ok: 'Ok',
clear: 'Очистити',
month: 'Місяць',
year: 'Рік',
timeSelect: 'Обрати час',
dateSelect: 'Обрати дату',
monthSelect: 'Обрати місяць',
yearSelect: 'Обрати рік',
decadeSelect: 'Обрати десятиріччя',
yearFormat: 'YYYY',
dateFormat: 'D-M-YYYY',
dayFormat: 'D',
dateTimeFormat: 'D-M-YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Попередній місяць (PageUp)',
nextMonth: 'Наступний місяць (PageDown)',
previousYear: 'Попередній рік (Control + left)',
nextYear: 'Наступний рік (Control + right)',
previousDecade: 'Попереднє десятиріччя',
nextDecade: 'Наступне десятиріччя',
previousCentury: 'Попереднє століття',
nextCentury: 'Наступне століття',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$13 = {
placeholder: 'Оберіть час',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$14 = {
lang: __assign({ placeholder: 'Оберіть дату', rangePlaceholder: ['Початкова дата', 'Кінцева дата'] }, CalendarLocale$w),
timePickerLocale: __assign({}, locale$13),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$w = {
// Options.jsx
items_per_page: '/ сторінці',
jump_to: 'Перейти',
jump_to_confirm: 'підтвердити',
page: '',
// Pagination.jsx
prev_page: 'Попередня сторінка',
next_page: 'Наступна сторінка',
prev_5: 'Попередні 5 сторінок',
next_5: 'Наступні 5 сторінок',
prev_3: 'Попередні 3 сторінки',
next_3: 'Наступні 3 сторінки',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var uk_UA = {
locale: 'uk',
Pagination: Pagination$w,
DatePicker: locale$14,
TimePicker: locale$13,
Calendar: CalendarLocale$w,
Table: {
filterTitle: 'Фільтрувати',
filterConfirm: 'OK',
filterReset: 'Скинути',
selectAll: 'Обрати всі',
selectInvert: 'Інвертувати вибір',
},
Modal: {
okText: 'Гаразд',
cancelText: 'Скасувати',
justOkText: 'Гаразд',
},
Popconfirm: {
okText: 'Гаразд',
cancelText: 'Скасувати',
},
Transfer: {
searchPlaceholder: 'Введіть текст для пошуку',
itemUnit: 'item',
itemsUnit: 'items',
},
Upload: {
uploading: 'Завантаження ...',
removeFile: 'Видалити файл',
uploadError: 'Помилка завантаження',
previewFile: 'Попередній перегляд файлу',
},
Empty: {
description: 'Даних немає',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// Merge into a locale object
/** @type {?} */
var locale$15 = {
lang: __assign({ placeholder: 'Chọn thời điểm', rangePlaceholder: ['Ngày bắt đầu', 'Ngày kết thúc'] }, CalendarLocale$9),
timePickerLocale: __assign({}, locale$i),
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$x = {
// Options.jsx
items_per_page: '/ trang',
jump_to: 'Đến',
jump_to_confirm: 'xác nhận',
page: '',
// Pagination.jsx
prev_page: 'Trang Trước',
next_page: 'Trang Kế',
prev_5: 'Về 5 Trang Trước',
next_5: 'Đến 5 Trang Kế',
prev_3: 'Về 3 Trang Trước',
next_3: 'Đến 3 Trang Kế',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$16 = {
placeholder: 'Chọn thời gian',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var vi_VN = {
locale: 'vi',
Pagination: Pagination$x,
DatePicker: locale$15,
TimePicker: locale$16,
Calendar: locale$15,
Table: {
filterTitle: 'Bộ ',
filterConfirm: 'OK',
filterReset: 'Tạo Lại',
selectAll: 'Chọn Tất Cả',
selectInvert: 'Chọn Ngược Lại',
},
Modal: {
okText: 'OK',
cancelText: 'Huỷ',
justOkText: 'OK',
},
Popconfirm: {
okText: 'OK',
cancelText: 'Huỷ',
},
Transfer: {
searchPlaceholder: 'Tìm ở đây',
itemUnit: 'mục',
itemsUnit: 'mục',
},
Upload: {
uploading: 'Đang tải lên...',
removeFile: 'Gỡ bỏ tập tin',
uploadError: 'Lỗi tải lên',
previewFile: 'Xem thử tập tin',
},
Empty: {
description: 'Trống',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarLocale$x = {
today: '今天',
now: '此刻',
backToToday: '返回今天',
ok: '確定',
timeSelect: '選擇時間',
dateSelect: '選擇日期',
clear: '清除',
month: '月',
year: '年',
previousMonth: '上個月 (翻頁上鍵)',
nextMonth: '下個月 (翻頁下鍵)',
monthSelect: '選擇月份',
yearSelect: '選擇年份',
decadeSelect: '選擇年代',
yearFormat: 'YYYY年',
dayFormat: 'D日',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH時mm分ss秒',
previousYear: '上一年 (Control鍵加左方向鍵)',
nextYear: '下一年 (Control鍵加右方向鍵)',
previousDecade: '上一年代',
nextDecade: '下一年代',
previousCentury: '上一世紀',
nextCentury: '下一世紀',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$17 = {
placeholder: '請選擇時間',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var locale$18 = {
lang: __assign({ placeholder: '請選擇日期', rangePlaceholder: ['開始日期', '結束日期'] }, CalendarLocale$x),
timePickerLocale: __assign({}, locale$17),
};
locale$18.lang.ok = '確 定';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Pagination$y = {
// Options.jsx
items_per_page: '條/頁',
jump_to: '跳至',
jump_to_confirm: '確定',
page: '頁',
// Pagination.jsx
prev_page: '上一頁',
next_page: '下一頁',
prev_5: '向前 5 頁',
next_5: '向後 5 頁',
prev_3: '向前 3 頁',
next_3: '向後 3 頁',
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var zh_TW = {
locale: 'zh-tw',
Pagination: Pagination$y,
DatePicker: locale$18,
TimePicker: locale$17,
Calendar: CalendarLocale$x,
Table: {
filterTitle: '篩選器',
filterConfirm: '確 定',
filterReset: '重 置',
selectAll: '全部選取',
selectInvert: '反向選取',
},
Modal: {
okText: '確 定',
cancelText: '取 消',
justOkText: 'OK',
},
Popconfirm: {
okText: '確 定',
cancelText: '取 消',
},
Transfer: {
searchPlaceholder: '搜尋資料',
itemUnit: '項目',
itemsUnit: '項目',
},
Upload: {
uploading: '正在上傳...',
removeFile: '刪除檔案',
uploadError: '上傳失敗',
previewFile: '檔案預覽',
},
Empty: {
description: '無此資料',
},
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzI18nService$$1 = /** @class */ (function () {
function NzI18nService$$1(locale, dateLocale) {
this._change = new rxjs.BehaviorSubject(this._locale);
this.setLocale(locale || zh_CN);
this.setDateLocale(dateLocale || null);
}
Object.defineProperty(NzI18nService$$1.prototype, "localeChange", {
get: /**
* @return {?}
*/ function () {
return this._change.asObservable();
},
enumerable: true,
configurable: true
});
// [NOTE] Performance issue: this method may called by every change detections
// TODO: cache more deeply paths for performance
/* tslint:disable-next-line:no-any */
// [NOTE] Performance issue: this method may called by every change detections
// TODO: cache more deeply paths for performance
/* tslint:disable-next-line:no-any */
/**
* @param {?} path
* @param {?=} data
* @return {?}
*/
NzI18nService$$1.prototype.translate =
// [NOTE] Performance issue: this method may called by every change detections
// TODO: cache more deeply paths for performance
/* tslint:disable-next-line:no-any */
/**
* @param {?} path
* @param {?=} data
* @return {?}
*/
function (path, data) {
// this._logger.debug(`[NzI18nService] Translating(${this._locale.locale}): ${path}`);
/** @type {?} */
var content = ( /** @type {?} */(this._getObjectPath(this._locale, path)));
if (typeof content === 'string') {
if (data) {
Object.keys(data).forEach(( /**
* @param {?} key
* @return {?}
*/function (key) { return content = content.replace(new RegExp("%" + key + "%", 'g'), data[key]); }));
}
return content;
}
return path;
};
/**
* Set/Change current locale globally throughout the WHOLE application
* [NOTE] If called at runtime, rendered interface may not change along with the locale change (because this do not trigger another render schedule)
* @param locale The translating letters
*/
/**
* Set/Change current locale globally throughout the WHOLE application
* [NOTE] If called at runtime, rendered interface may not change along with the locale change (because this do not trigger another render schedule)
* @param {?} locale The translating letters
* @return {?}
*/
NzI18nService$$1.prototype.setLocale = /**
* Set/Change current locale globally throughout the WHOLE application
* [NOTE] If called at runtime, rendered interface may not change along with the locale change (because this do not trigger another render schedule)
* @param {?} locale The translating letters
* @return {?}
*/
function (locale) {
if (this._locale && this._locale.locale === locale.locale) {
return;
}
this._locale = locale;
this._change.next(locale);
};
/**
* @return {?}
*/
NzI18nService$$1.prototype.getLocale = /**
* @return {?}
*/
function () {
return this._locale;
};
/**
* @return {?}
*/
NzI18nService$$1.prototype.getLocaleId = /**
* @return {?}
*/
function () {
return this._locale ? this._locale.locale : '';
};
/**
* @param {?} dateLocale
* @return {?}
*/
NzI18nService$$1.prototype.setDateLocale = /**
* @param {?} dateLocale
* @return {?}
*/
function (dateLocale) {
this.dateLocale = dateLocale;
};
/**
* @return {?}
*/
NzI18nService$$1.prototype.getDateLocale = /**
* @return {?}
*/
function () {
return this.dateLocale;
};
/**
* Get locale data
* @param path dot paths for finding exist value from locale data, eg. "a.b.c"
* @param defaultValue default value if the result is not "truthy"
*/
/**
* Get locale data
* @param {?=} path dot paths for finding exist value from locale data, eg. "a.b.c"
* @param {?=} defaultValue default value if the result is not "truthy"
* @return {?}
*/
NzI18nService$$1.prototype.getLocaleData = /**
* Get locale data
* @param {?=} path dot paths for finding exist value from locale data, eg. "a.b.c"
* @param {?=} defaultValue default value if the result is not "truthy"
* @return {?}
*/
function (path, defaultValue) {
// tslint:disable-line:no-any
/** @type {?} */
var result = path ? this._getObjectPath(this._locale, path) : this._locale;
return result || defaultValue;
};
/**
* @private
* @param {?} obj
* @param {?} path
* @return {?}
*/
NzI18nService$$1.prototype._getObjectPath = /**
* @private
* @param {?} obj
* @param {?} path
* @return {?}
*/
function (obj, path) {
// tslint:disable-line:no-any
/** @type {?} */
var res = obj;
/** @type {?} */
var paths = path.split('.');
/** @type {?} */
var depth = paths.length;
/** @type {?} */
var index = 0;
while (res && index < depth) {
res = res[paths[index++]];
}
return index === depth ? res : null;
};
NzI18nService$$1.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
NzI18nService$$1.ctorParameters = function () {
return [
{ type: undefined, decorators: [{ type: i0.Inject, args: [NZ_I18N,] }] },
{ type: undefined, decorators: [{ type: i0.Inject, args: [NZ_DATE_LOCALE,] }] }
];
};
/** @nocollapse */ NzI18nService$$1.ngInjectableDef = i0.defineInjectable({ factory: function NzI18nService_Factory() { return new NzI18nService$$1(i0.inject(NZ_I18N), i0.inject(NZ_DATE_LOCALE)); }, token: NzI18nService$$1, providedIn: "root" });
return NzI18nService$$1;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzI18nPipe = /** @class */ (function () {
function NzI18nPipe(_locale) {
this._locale = _locale;
}
/**
* @param {?} path
* @param {?=} keyValue
* @return {?}
*/
NzI18nPipe.prototype.transform = /**
* @param {?} path
* @param {?=} keyValue
* @return {?}
*/
function (path, keyValue) {
return this._locale.translate(path, keyValue);
};
NzI18nPipe.decorators = [
{ type: i0.Pipe, args: [{
name: 'nzI18n'
},] }
];
/** @nocollapse */
NzI18nPipe.ctorParameters = function () {
return [
{ type: NzI18nService$$1 }
];
};
return NzI18nPipe;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzI18nModule = /** @class */ (function () {
function NzI18nModule() {
}
NzI18nModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [LoggerModule],
declarations: [NzI18nPipe],
exports: [NzI18nPipe],
providers: [
i2$1.DatePipe,
{ provide: NZ_I18N, useValue: null },
{ provide: NZ_DATE_LOCALE, useValue: null }
]
},] }
];
return NzI18nModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRadioComponent = /** @class */ (function () {
/* tslint:disable-next-line:no-any */
function NzRadioComponent(elementRef, renderer, cdr, focusMonitor) {
this.elementRef = elementRef;
this.renderer = renderer;
this.cdr = cdr;
this.focusMonitor = focusMonitor;
this.select$ = new rxjs.Subject();
this.touched$ = new rxjs.Subject();
this.checked = false;
this.isNgModel = false;
this.onChange = ( /**
* @return {?}
*/function () { return null; });
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.nzDisabled = false;
this.nzAutoFocus = false;
this.renderer.addClass(elementRef.nativeElement, 'ant-radio-wrapper');
}
/**
* @return {?}
*/
NzRadioComponent.prototype.updateAutoFocus = /**
* @return {?}
*/
function () {
if (this.inputElement) {
if (this.nzAutoFocus) {
this.renderer.setAttribute(this.inputElement.nativeElement, 'autofocus', 'autofocus');
}
else {
this.renderer.removeAttribute(this.inputElement.nativeElement, 'autofocus');
}
}
};
/**
* @param {?} event
* @return {?}
*/
NzRadioComponent.prototype.onClick = /**
* @param {?} event
* @return {?}
*/
function (event) {
// Prevent label click triggered twice.
event.stopPropagation();
event.preventDefault();
if (!this.nzDisabled && !this.checked) {
this.select$.next(this);
if (this.isNgModel) {
this.checked = true;
this.onChange(true);
}
}
};
/**
* @return {?}
*/
NzRadioComponent.prototype.focus = /**
* @return {?}
*/
function () {
this.focusMonitor.focusVia(this.inputElement, 'keyboard');
};
/**
* @return {?}
*/
NzRadioComponent.prototype.blur = /**
* @return {?}
*/
function () {
this.inputElement.nativeElement.blur();
};
/**
* @return {?}
*/
NzRadioComponent.prototype.markForCheck = /**
* @return {?}
*/
function () {
this.cdr.markForCheck();
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzRadioComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
/**
* @param {?} value
* @return {?}
*/
NzRadioComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.checked = value;
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzRadioComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.isNgModel = true;
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzRadioComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @return {?}
*/
NzRadioComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
this.focusMonitor.monitor(this.elementRef, true).subscribe(( /**
* @param {?} focusOrigin
* @return {?}
*/function (focusOrigin) {
if (!focusOrigin) {
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.onTouched(); }));
_this.touched$.next();
}
}));
this.updateAutoFocus();
};
/**
* @param {?} changes
* @return {?}
*/
NzRadioComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzAutoFocus) {
this.updateAutoFocus();
}
};
NzRadioComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-radio]',
preserveWhitespaces: false,
template: "<span class=\"ant-radio\" [class.ant-radio-checked]=\"checked\" [class.ant-radio-disabled]=\"nzDisabled\">\n <input #inputElement type=\"radio\" class=\"ant-radio-input\" [disabled]=\"nzDisabled\" [checked]=\"checked\" [attr.name]=\"name\">\n <span class=\"ant-radio-inner\"></span>\n</span>\n<span><ng-content></ng-content></span>",
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzRadioComponent; })),
multi: true
}
],
host: {
'[class.ant-radio-wrapper-checked]': 'checked',
'[class.ant-radio-wrapper-disabled]': 'nzDisabled'
}
}] }
];
/** @nocollapse */
NzRadioComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef },
{ type: a11y.FocusMonitor }
];
};
NzRadioComponent.propDecorators = {
inputElement: [{ type: i0.ViewChild, args: ['inputElement',] }],
nzValue: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
onClick: [{ type: i0.HostListener, args: ['click', ['$event'],] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzRadioComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzRadioComponent.prototype, "nzAutoFocus", void 0);
return NzRadioComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRadioButtonComponent = /** @class */ (function (_super) {
__extends(NzRadioButtonComponent, _super);
/* tslint:disable-next-line:no-any */
function NzRadioButtonComponent(elementRef, renderer, cdr, focusMonitor) {
var _this = _super.call(this, elementRef, renderer, cdr, focusMonitor) || this;
renderer.removeClass(elementRef.nativeElement, 'ant-radio-wrapper');
renderer.addClass(elementRef.nativeElement, 'ant-radio-button-wrapper');
return _this;
}
NzRadioButtonComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-radio-button]',
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzRadioComponent; })),
multi: true
},
{
provide: NzRadioComponent,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzRadioButtonComponent; }))
}
],
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
preserveWhitespaces: false,
template: "<span class=\"ant-radio-button\" [class.ant-radio-button-checked]=\"checked\" [class.ant-radio-button-disabled]=\"nzDisabled\">\n <input type=\"radio\" #inputElement class=\"ant-radio-button-input\" [disabled]=\"nzDisabled\" [checked]=\"checked\" [attr.name]=\"name\">\n <span class=\"ant-radio-button-inner\"></span>\n</span>\n<span><ng-content></ng-content></span>",
host: {
'[class.ant-radio-button-wrapper-checked]': 'checked',
'[class.ant-radio-button-wrapper-disabled]': 'nzDisabled'
}
}] }
];
/** @nocollapse */
NzRadioButtonComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef },
{ type: a11y.FocusMonitor }
];
};
return NzRadioButtonComponent;
}(NzRadioComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRadioGroupComponent = /** @class */ (function () {
function NzRadioGroupComponent(cdr, renderer, elementRef) {
this.cdr = cdr;
this.destroy$ = new rxjs.Subject();
this.onChange = ( /**
* @return {?}
*/function () { return null; });
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.nzButtonStyle = 'outline';
this.nzSize = 'default';
renderer.addClass(elementRef.nativeElement, 'ant-radio-group');
}
/**
* @return {?}
*/
NzRadioGroupComponent.prototype.updateChildrenStatus = /**
* @return {?}
*/
function () {
var _this = this;
if (this.radios) {
Promise.resolve().then(( /**
* @return {?}
*/function () {
_this.radios.forEach(( /**
* @param {?} radio
* @return {?}
*/function (radio) {
radio.checked = radio.nzValue === _this.value;
if (isNotNil(_this.nzDisabled)) {
radio.nzDisabled = _this.nzDisabled;
}
if (_this.nzName) {
radio.name = _this.nzName;
}
radio.markForCheck();
}));
}));
}
};
/**
* @return {?}
*/
NzRadioGroupComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.radios.changes.pipe(operators.startWith(null), operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.updateChildrenStatus();
if (_this.selectSubscription) {
_this.selectSubscription.unsubscribe();
}
_this.selectSubscription = rxjs.merge.apply(void 0, __spread(_this.radios.map(( /**
* @param {?} radio
* @return {?}
*/function (radio) { return radio.select$; })))).pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} radio
* @return {?}
*/function (radio) {
if (_this.value !== radio.nzValue) {
_this.value = radio.nzValue;
_this.updateChildrenStatus();
_this.onChange(_this.value);
}
}));
if (_this.touchedSubscription) {
_this.touchedSubscription.unsubscribe();
}
_this.touchedSubscription = rxjs.merge.apply(void 0, __spread(_this.radios.map(( /**
* @param {?} radio
* @return {?}
*/function (radio) { return radio.touched$; })))).pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.onTouched(); }));
}));
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzRadioGroupComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzDisabled || changes.nzName) {
this.updateChildrenStatus();
}
};
/**
* @return {?}
*/
NzRadioGroupComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
/* tslint:disable-next-line:no-any */
/* tslint:disable-next-line:no-any */
/**
* @param {?} value
* @return {?}
*/
NzRadioGroupComponent.prototype.writeValue = /* tslint:disable-next-line:no-any */
/**
* @param {?} value
* @return {?}
*/
function (value) {
this.value = value;
this.updateChildrenStatus();
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzRadioGroupComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzRadioGroupComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzRadioGroupComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
NzRadioGroupComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-radio-group',
preserveWhitespaces: false,
template: "<ng-content></ng-content>",
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzRadioGroupComponent; })),
multi: true
}
],
host: {
'[class.ant-radio-group-large]': "nzSize === 'large'",
'[class.ant-radio-group-small]': "nzSize === 'small'",
'[class.ant-radio-group-solid]': "nzButtonStyle === 'solid'"
}
}] }
];
/** @nocollapse */
NzRadioGroupComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzRadioGroupComponent.propDecorators = {
radios: [{ type: i0.ContentChildren, args: [i0.forwardRef(( /**
* @return {?}
*/function () { return NzRadioComponent; })), { descendants: true },] }],
nzDisabled: [{ type: i0.Input }],
nzButtonStyle: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzName: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzRadioGroupComponent.prototype, "nzDisabled", void 0);
return NzRadioGroupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRadioModule = /** @class */ (function () {
function NzRadioModule() {
}
NzRadioModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule],
exports: [NzRadioComponent, NzRadioButtonComponent, NzRadioGroupComponent],
declarations: [NzRadioComponent, NzRadioButtonComponent, NzRadioGroupComponent]
},] }
];
return NzRadioModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzConnectedOverlayDirective = /** @class */ (function () {
function NzConnectedOverlayDirective(cdkConnectedOverlay) {
this.cdkConnectedOverlay = cdkConnectedOverlay;
this.cdkConnectedOverlay.backdropClass = 'nz-overlay-transparent-backdrop';
}
NzConnectedOverlayDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[cdkConnectedOverlay][nzConnectedOverlay]'
},] }
];
/** @nocollapse */
NzConnectedOverlayDirective.ctorParameters = function () {
return [
{ type: i2$2.CdkConnectedOverlay }
];
};
return NzConnectedOverlayDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzOverlayModule = /** @class */ (function () {
function NzOverlayModule() {
}
NzOverlayModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzConnectedOverlayDirective],
exports: [NzConnectedOverlayDirective]
},] }
];
return NzOverlayModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// tslint:disable-next-line:no-any
/** @type {?} */
var NZ_DEFAULT_EMPTY_CONTENT = new i0.InjectionToken('nz-empty-content');
/** @type {?} */
var NZ_EMPTY_COMPONENT_NAME = new i0.InjectionToken('nz-empty-component-name');
/** @type {?} */
var emptyImage = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjE1MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI0IDMxLjY3KSI+PGVsbGlwc2UgZmlsbC1vcGFjaXR5PSIuOCIgZmlsbD0iI0Y1RjVGNyIgY3g9IjY3Ljc5NyIgY3k9IjEwNi44OSIgcng9IjY3Ljc5NyIgcnk9IjEyLjY2OCIvPjxwYXRoIGQ9Ik0xMjIuMDM0IDY5LjY3NEw5OC4xMDkgNDAuMjI5Yy0xLjE0OC0xLjM4Ni0yLjgyNi0yLjIyNS00LjU5My0yLjIyNWgtNTEuNDRjLTEuNzY2IDAtMy40NDQuODM5LTQuNTkyIDIuMjI1TDEzLjU2IDY5LjY3NHYxNS4zODNoMTA4LjQ3NVY2OS42NzR6IiBmaWxsPSIjQUVCOEMyIi8+PHBhdGggZD0iTTEwMS41MzcgODYuMjE0TDgwLjYzIDYxLjEwMmMtMS4wMDEtMS4yMDctMi41MDctMS44NjctNC4wNDgtMS44NjdIMzEuNzI0Yy0xLjU0IDAtMy4wNDcuNjYtNC4wNDggMS44NjdMNi43NjkgODYuMjE0djEzLjc5Mmg5NC43NjhWODYuMjE0eiIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudC0xKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTMuNTYpIi8+PHBhdGggZD0iTTMzLjgzIDBoNjcuOTMzYTQgNCAwIDAgMSA0IDR2OTMuMzQ0YTQgNCAwIDAgMS00IDRIMzMuODNhNCA0IDAgMCAxLTQtNFY0YTQgNCAwIDAgMSA0LTR6IiBmaWxsPSIjRjVGNUY3Ii8+PHBhdGggZD0iTTQyLjY3OCA5Ljk1M2g1MC4yMzdhMiAyIDAgMCAxIDIgMlYzNi45MWEyIDIgMCAwIDEtMiAySDQyLjY3OGEyIDIgMCAwIDEtMi0yVjExLjk1M2EyIDIgMCAwIDEgMi0yek00Mi45NCA0OS43NjdoNDkuNzEzYTIuMjYyIDIuMjYyIDAgMSAxIDAgNC41MjRINDIuOTRhMi4yNjIgMi4yNjIgMCAwIDEgMC00LjUyNHpNNDIuOTQgNjEuNTNoNDkuNzEzYTIuMjYyIDIuMjYyIDAgMSAxIDAgNC41MjVINDIuOTRhMi4yNjIgMi4yNjIgMCAwIDEgMC00LjUyNXpNMTIxLjgxMyAxMDUuMDMyYy0uNzc1IDMuMDcxLTMuNDk3IDUuMzYtNi43MzUgNS4zNkgyMC41MTVjLTMuMjM4IDAtNS45Ni0yLjI5LTYuNzM0LTUuMzZhNy4zMDkgNy4zMDkgMCAwIDEtLjIyMi0xLjc5VjY5LjY3NWgyNi4zMThjMi45MDcgMCA1LjI1IDIuNDQ4IDUuMjUgNS40MnYuMDRjMCAyLjk3MSAyLjM3IDUuMzcgNS4yNzcgNS4zN2gzNC43ODVjMi45MDcgMCA1LjI3Ny0yLjQyMSA1LjI3Ny01LjM5M1Y3NS4xYzAtMi45NzIgMi4zNDMtNS40MjYgNS4yNS01LjQyNmgyNi4zMTh2MzMuNTY5YzAgLjYxNy0uMDc3IDEuMjE2LS4yMjEgMS43ODl6IiBmaWxsPSIjRENFMEU2Ii8+PC9nPjxwYXRoIGQ9Ik0xNDkuMTIxIDMzLjI5MmwtNi44MyAyLjY1YTEgMSAwIDAgMS0xLjMxNy0xLjIzbDEuOTM3LTYuMjA3Yy0yLjU4OS0yLjk0NC00LjEwOS02LjUzNC00LjEwOS0xMC40MDhDMTM4LjgwMiA4LjEwMiAxNDguOTIgMCAxNjEuNDAyIDAgMTczLjg4MSAwIDE4NCA4LjEwMiAxODQgMTguMDk3YzAgOS45OTUtMTAuMTE4IDE4LjA5Ny0yMi41OTkgMTguMDk3LTQuNTI4IDAtOC43NDQtMS4wNjYtMTIuMjgtMi45MDJ6IiBmaWxsPSIjRENFMEU2Ii8+PGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTQ5LjY1IDE1LjM4MykiIGZpbGw9IiNGRkYiPjxlbGxpcHNlIGN4PSIyMC42NTQiIGN5PSIzLjE2NyIgcng9IjIuODQ5IiByeT0iMi44MTUiLz48cGF0aCBkPSJNNS42OTggNS42M0gwTDIuODk4LjcwNHpNOS4yNTkuNzA0aDQuOTg1VjUuNjNIOS4yNTl6Ii8+PC9nPjwvZz48L3N2Zz4=';
/** @type {?} */
var simpleEmptyImage = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNjRweCIgaGVpZ2h0PSI0MXB4IiB2aWV3Qm94PSIwIDAgNjQgNDEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDUyLjUgKDY3NDY5KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDxnIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00NzIuMDAwMDAwLCAtMTMzNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgIHRyYW5zZm9ybT0idHJhbnNsYXRlKDY0LjAwMDAwMCwgMTExNC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg0MC4wMDAwMDAsIDc4LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgICAgIDxnICB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjguMDAwMDAwLCAxNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxnID4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxlbGxpcHNlICBmaWxsPSIjRjVGNUY1IiBjeD0iMzIiIGN5PSIzMyIgcng9IjMyIiByeT0iNyI+PC9lbGxpcHNlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGcgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5LjAwMDAwMCwgMC4wMDAwMDApIiBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0iI0Q5RDlEOSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ2LDEyLjc2MDU2MDQgTDM1Ljg1NDMwNDcsMS4yNTczOTYzMyBDMzUuMzY3NDQxNCwwLjQ3MzgyNjYwNSAzNC42NTU4Nzg5LDAgMzMuOTA2NzYxNywwIEwxMi4wOTMyMzgzLDAgQzExLjM0NDEyMTEsMCAxMC42MzI1NTg2LDAuNDczOTUwMjU1IDEwLjE0NTY5NTMsMS4yNTczOTYzMyBMMi42MTQ3OTcyN2UtMTIsMTIuNzYwNTYwNCBMMCwyMiBMNDYsMjIgTDQ2LDEyLjc2MDU2MDQgWiIgID48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTMyLjYxMzI4MTMsMTUuOTMxNSBDMzIuNjEzMjgxMywxNC4zMjU4NTExIDMzLjYwNjk1MzEsMTMuMDAwMjM0IDM0LjgzOTY5OTIsMTMgTDQ2LDEzIEw0NiwzMS4xMzcxMjc3IEM0NiwzMy4yNTg5NTc0IDQ0LjY3OTM4NjcsMzUgNDMuMDUwNDI5NywzNSBMMi45NDk1NzAzMSwzNSBDMS4zMjA1MjM0NCwzNSAwLDMzLjI1ODg0MDQgMCwzMS4xMzcxMjc3IEwwLDEzIEwxMS4xNjAzMDA4LDEzIEMxMi4zOTMwNDY5LDEzIDEzLjM4NjcxODgsMTQuMzIyODA4NSAxMy4zODY3MTg4LDE1LjkyODQ1NzQgTDEzLjM4NjcxODgsMTUuOTQ5NjM4MyBDMTMuMzg2NzE4OCwxNy41NTUyODcyIDE0LjM5MTcxMDksMTguODUxMTgwOSAxNS42MjQ0NTcsMTguODUxMTgwOSBMMzAuMzc1NTQzLDE4Ljg1MTE4MDkgQzMxLjYwODI4OTEsMTguODUxMTgwOSAzMi42MTMyODEzLDE3LjU0MzM1MTEgMzIuNjEzMjgxMywxNS45Mzc3MDIxIEwzMi42MTMyODEzLDE1LjkzMTUgWiIgIGZpbGw9IiNGQUZBRkEiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+';
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} content
* @return {?}
*/
function getEmptyContentTypeError(content) {
return TypeError("[NG-ZORRO]: useDefaultContent expect 'string', 'templateRef' or 'component' but get " + content);
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzEmptyComponent = /** @class */ (function () {
function NzEmptyComponent(sanitizer, i18n, cdr) {
this.sanitizer = sanitizer;
this.i18n = i18n;
this.cdr = cdr;
// NOTE: It would be very hack to use `ContentChild`, because Angular could
// tell if user actually pass something to <ng-content>.
// See: https://github.com/angular/angular/issues/12530.
// I can use a directive but this would expose the name `footer`.
// @ContentChild(TemplateRef) nzNotFoundFooter: TemplateRef<void>;
this.defaultSvg = this.sanitizer.bypassSecurityTrustResourceUrl(emptyImage);
this.isContentString = false;
this.locale = {};
this.destroy$ = new rxjs.Subject();
}
Object.defineProperty(NzEmptyComponent.prototype, "shouldRenderContent", {
get: /**
* @return {?}
*/ function () {
/** @type {?} */
var content = this.nzNotFoundContent;
return !!(content || typeof content === 'string');
},
enumerable: true,
configurable: true
});
/**
* @param {?} changes
* @return {?}
*/
NzEmptyComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var nzNotFoundContent = changes.nzNotFoundContent;
if (nzNotFoundContent) {
this.isContentString = typeof nzNotFoundContent.currentValue === 'string';
}
};
/**
* @return {?}
*/
NzEmptyComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.i18n.localeChange.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.locale = _this.i18n.getLocaleData('Empty');
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzEmptyComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzEmptyComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-empty',
template: "<div class=\"ant-empty-image\">\n <ng-container *nzStringTemplateOutlet=\"nzNotFoundImage\">\n <img [src]=\"nzNotFoundImage || defaultSvg\" [alt]=\"isContentString ? nzNotFoundContent : 'empty'\">\n </ng-container>\n</div>\n<p class=\"ant-empty-description\">\n <ng-container *nzStringTemplateOutlet=\"nzNotFoundContent\">\n {{ shouldRenderContent ? nzNotFoundContent : locale['description'] }}\n </ng-container>\n</p>\n<div class=\"ant-empty-footer\" *ngIf=\"nzNotFoundFooter\">\n <ng-container *nzStringTemplateOutlet=\"nzNotFoundFooter\">\n {{ nzNotFoundFooter }}\n </ng-container>\n</div>\n",
host: {
'class': 'ant-empty'
},
styles: ['nz-empty { display: block; }']
}] }
];
/** @nocollapse */
NzEmptyComponent.ctorParameters = function () {
return [
{ type: i2.DomSanitizer },
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef }
];
};
NzEmptyComponent.propDecorators = {
nzNotFoundImage: [{ type: i0.Input }],
nzNotFoundContent: [{ type: i0.Input }],
nzNotFoundFooter: [{ type: i0.Input }]
};
return NzEmptyComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @template T
*/
var NzEmptyService$$1 = /** @class */ (function () {
function NzEmptyService$$1(defaultEmptyContent) {
this.defaultEmptyContent = defaultEmptyContent;
// tslint:disable-line:no-any
this.userDefaultContent$ = new rxjs.BehaviorSubject(undefined);
if (this.defaultEmptyContent) {
this.userDefaultContent$.next(this.defaultEmptyContent);
}
}
/**
* @param {?=} content
* @return {?}
*/
NzEmptyService$$1.prototype.setDefaultContent = /**
* @param {?=} content
* @return {?}
*/
function (content) {
if (typeof content === 'string'
|| content === undefined
|| content === null
|| content instanceof i0.TemplateRef
|| content instanceof i0.Type) {
this.userDefaultContent$.next(content);
}
else {
throw getEmptyContentTypeError(content);
}
};
/**
* @return {?}
*/
NzEmptyService$$1.prototype.resetDefault = /**
* @return {?}
*/
function () {
this.userDefaultContent$.next(undefined);
};
NzEmptyService$$1.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
NzEmptyService$$1.ctorParameters = function () {
return [
{ type: i0.Type, decorators: [{ type: i0.Inject, args: [NZ_DEFAULT_EMPTY_CONTENT,] }, { type: i0.Optional }] }
];
};
/** @nocollapse */ NzEmptyService$$1.ngInjectableDef = i0.defineInjectable({ factory: function NzEmptyService_Factory() { return new NzEmptyService$$1(i0.inject(NZ_DEFAULT_EMPTY_CONTENT, 8)); }, token: NzEmptyService$$1, providedIn: "root" });
return NzEmptyService$$1;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzEmbedEmptyComponent = /** @class */ (function () {
function NzEmbedEmptyComponent(emptyService, sanitizer, viewContainerRef, cdr, injector) {
this.emptyService = emptyService;
this.sanitizer = sanitizer;
this.viewContainerRef = viewContainerRef;
this.cdr = cdr;
this.injector = injector;
this.contentType = 'string';
this.defaultSvg = this.sanitizer.bypassSecurityTrustResourceUrl(simpleEmptyImage);
this.size = '';
this.subs_ = new rxjs.Subscription();
}
/**
* @param {?} changes
* @return {?}
*/
NzEmbedEmptyComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzComponentName) {
this.size = this.getEmptySize(changes.nzComponentName.currentValue);
}
if (changes.specificContent && !changes.specificContent.isFirstChange()) {
this.content = changes.specificContent.currentValue;
this.renderEmpty();
}
};
/**
* @return {?}
*/
NzEmbedEmptyComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var userContent_ = this.emptyService.userDefaultContent$.subscribe(( /**
* @param {?} content
* @return {?}
*/function (content) {
_this.content = _this.specificContent || content;
_this.renderEmpty();
}));
this.subs_.add(userContent_);
};
/**
* @return {?}
*/
NzEmbedEmptyComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.subs_.unsubscribe();
};
/**
* @private
* @param {?} componentName
* @return {?}
*/
NzEmbedEmptyComponent.prototype.getEmptySize = /**
* @private
* @param {?} componentName
* @return {?}
*/
function (componentName) {
switch (componentName) {
case 'table':
case 'list':
return 'normal';
case 'select':
case 'tree-select':
case 'cascader':
case 'transfer':
return 'small';
default:
return '';
}
};
/**
* @private
* @return {?}
*/
NzEmbedEmptyComponent.prototype.renderEmpty = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var content = this.content;
if (typeof content === 'string') {
this.contentType = 'string';
}
else if (content instanceof i0.TemplateRef) {
/** @type {?} */
var context = ( /** @type {?} */({ $implicit: this.nzComponentName }));
this.contentType = 'template';
this.contentPortal = new portal.TemplatePortal(content, this.viewContainerRef, context);
}
else if (content instanceof i0.Type) {
/** @type {?} */
var context = new WeakMap([[NZ_EMPTY_COMPONENT_NAME, this.nzComponentName]]);
/** @type {?} */
var injector = new portal.PortalInjector(this.injector, context);
this.contentType = 'component';
this.contentPortal = new portal.ComponentPortal(content, this.viewContainerRef, injector);
}
else {
this.contentType = 'string';
this.contentPortal = undefined;
}
this.cdr.markForCheck();
};
NzEmbedEmptyComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-embed-empty',
template: "<ng-container *ngIf=\"!content && specificContent !== null\" [ngSwitch]=\"size\">\n <nz-empty *ngSwitchCase=\"'normal'\" class=\"ant-empty-normal\" [nzNotFoundImage]=\"defaultSvg\"></nz-empty>\n <nz-empty *ngSwitchCase=\"'small'\" class=\"ant-empty-small\" [nzNotFoundImage]=\"defaultSvg\"></nz-empty>\n <nz-empty *ngSwitchDefault></nz-empty>\n</ng-container>\n<ng-container *ngIf=\"content\">\n <ng-template *ngIf=\"contentType !== 'string'\" [cdkPortalOutlet]=\"contentPortal\"></ng-template>\n <ng-container *ngIf=\"contentType === 'string'\">\n {{ content }}\n </ng-container>\n</ng-container>\n"
}] }
];
/** @nocollapse */
NzEmbedEmptyComponent.ctorParameters = function () {
return [
{ type: NzEmptyService$$1 },
{ type: i2.DomSanitizer },
{ type: i0.ViewContainerRef },
{ type: i0.ChangeDetectorRef },
{ type: i0.Injector }
];
};
NzEmbedEmptyComponent.propDecorators = {
nzComponentName: [{ type: i0.Input }],
specificContent: [{ type: i0.Input }]
};
return NzEmbedEmptyComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzEmptyModule = /** @class */ (function () {
function NzEmptyModule() {
}
NzEmptyModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, portal.PortalModule, NzAddOnModule, NzI18nModule],
declarations: [NzEmptyComponent, NzEmbedEmptyComponent],
exports: [NzEmptyComponent, NzEmbedEmptyComponent]
},] }
];
return NzEmptyModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzOptionComponent = /** @class */ (function () {
function NzOptionComponent() {
this.nzDisabled = false;
this.nzCustomContent = false;
}
NzOptionComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-option',
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>"
}] }
];
NzOptionComponent.propDecorators = {
template: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }],
nzLabel: [{ type: i0.Input }],
nzValue: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzCustomContent: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzOptionComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzOptionComponent.prototype, "nzCustomContent", void 0);
return NzOptionComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFilterOptionPipe = /** @class */ (function () {
function NzFilterOptionPipe() {
}
/**
* @param {?} options
* @param {?} searchValue
* @param {?} filterOption
* @param {?} serverSearch
* @return {?}
*/
NzFilterOptionPipe.prototype.transform = /**
* @param {?} options
* @param {?} searchValue
* @param {?} filterOption
* @param {?} serverSearch
* @return {?}
*/
function (options, searchValue, filterOption, serverSearch) {
if (serverSearch || !searchValue) {
return options;
}
else {
return (( /** @type {?} */(options))).filter(( /**
* @param {?} o
* @return {?}
*/function (o) { return filterOption(searchValue, o); }));
}
};
NzFilterOptionPipe.decorators = [
{ type: i0.Pipe, args: [{ name: 'nzFilterOption' },] }
];
return NzFilterOptionPipe;
}());
var NzFilterGroupOptionPipe = /** @class */ (function () {
function NzFilterGroupOptionPipe() {
}
/**
* @param {?} groups
* @param {?} searchValue
* @param {?} filterOption
* @param {?} serverSearch
* @return {?}
*/
NzFilterGroupOptionPipe.prototype.transform = /**
* @param {?} groups
* @param {?} searchValue
* @param {?} filterOption
* @param {?} serverSearch
* @return {?}
*/
function (groups, searchValue, filterOption, serverSearch) {
if (serverSearch || !searchValue) {
return groups;
}
else {
return (( /** @type {?} */(groups))).filter(( /**
* @param {?} g
* @return {?}
*/function (g) {
return g.listOfNzOptionComponent.some(( /**
* @param {?} o
* @return {?}
*/function (o) { return filterOption(searchValue, o); }));
}));
}
};
NzFilterGroupOptionPipe.decorators = [
{ type: i0.Pipe, args: [{ name: 'nzFilterGroupOption' },] }
];
return NzFilterGroupOptionPipe;
}());
/**
* @param {?} searchValue
* @param {?} option
* @return {?}
*/
function defaultFilterOption(searchValue, option) {
if (option && option.nzLabel) {
return option.nzLabel.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
}
else {
return false;
}
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSelectService = /** @class */ (function () {
function NzSelectService() {
var _this = this;
// Input params
this.autoClearSearchValue = true;
this.serverSearch = false;
this.filterOption = defaultFilterOption;
this.mode = 'default';
this.maxMultipleCount = Infinity;
this.disabled = false;
// tslint:disable-next-line:no-any
this.compareWith = ( /**
* @param {?} o1
* @param {?} o2
* @return {?}
*/function (o1, o2) { return o1 === o2; });
// selectedValueChanged should emit ngModelChange or not
// tslint:disable-next-line:no-any
this.listOfSelectedValueWithEmit$ = new rxjs.BehaviorSubject({
value: [],
emit: false
});
// ContentChildren Change
this.mapOfTemplateOption$ = new rxjs.BehaviorSubject({
listOfNzOptionComponent: [],
listOfNzOptionGroupComponent: []
});
// searchValue Change
this.searchValueRaw$ = new rxjs.BehaviorSubject('');
this.listOfFilteredOption = [];
this.openRaw$ = new rxjs.Subject();
this.checkRaw$ = new rxjs.Subject();
this.open = false;
this.clearInput$ = new rxjs.Subject();
this.searchValue = '';
this.isShowNotFound = false;
// open
this.open$ = this.openRaw$.pipe(operators.distinctUntilChanged(), operators.share(), operators.tap(( /**
* @return {?}
*/function () { return _this.clearInput(); })));
this.activatedOption$ = new rxjs.ReplaySubject(1);
this.listOfSelectedValue$ = this.listOfSelectedValueWithEmit$.pipe(operators.map(( /**
* @param {?} data
* @return {?}
*/function (data) { return data.value; })));
this.modelChange$ = this.listOfSelectedValueWithEmit$.pipe(operators.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.emit; })), operators.map(( /**
* @param {?} data
* @return {?}
*/function (data) {
/** @type {?} */
var selectedList = data.value;
/** @type {?} */
var modelValue = null;
if (_this.isSingleMode) {
if (selectedList.length) {
modelValue = selectedList[0];
}
}
else {
modelValue = selectedList;
}
return modelValue;
})));
this.searchValue$ = this.searchValueRaw$.pipe(operators.distinctUntilChanged(), operators.skip(1), operators.share(), operators.tap(( /**
* @param {?} value
* @return {?}
*/function (value) {
_this.searchValue = value;
if (value) {
_this.updateActivatedOption(_this.listOfFilteredOption[0]);
}
_this.updateListOfFilteredOption();
})));
// tslint:disable-next-line:no-any
this.listOfSelectedValue = [];
// flat ViewChildren
this.listOfTemplateOption = [];
// tag option
this.listOfTagOption = [];
// tag option concat template option
this.listOfTagAndTemplateOption = [];
// ViewChildren
this.listOfNzOptionComponent = [];
this.listOfNzOptionGroupComponent = [];
// display in top control
this.listOfCachedSelectedOption = [];
// selected value or ViewChildren change
this.valueOrOption$ = rxjs.combineLatest(this.listOfSelectedValue$, this.mapOfTemplateOption$).pipe(operators.tap(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.listOfSelectedValue = data[0];
_this.listOfNzOptionComponent = data[1].listOfNzOptionComponent;
_this.listOfNzOptionGroupComponent = data[1].listOfNzOptionGroupComponent;
_this.listOfTemplateOption = _this.listOfNzOptionComponent.concat(_this.listOfNzOptionGroupComponent.reduce(( /**
* @param {?} pre
* @param {?} cur
* @return {?}
*/function (pre, cur) { return __spread(pre, cur.listOfNzOptionComponent.toArray()); }), []));
_this.updateListOfTagOption();
_this.updateListOfFilteredOption();
_this.resetActivatedOptionIfNeeded();
_this.updateListOfCachedOption();
})), operators.share());
this.check$ = rxjs.merge(this.checkRaw$, this.valueOrOption$, this.searchValue$, this.activatedOption$, this.open$, this.modelChange$).pipe(operators.share());
}
/**
* @param {?} option
* @return {?}
*/
NzSelectService.prototype.clickOption = /**
* @param {?} option
* @return {?}
*/
function (option) {
var _this = this;
/** update listOfSelectedOption -> update listOfSelectedValue -> next listOfSelectedValue$ **/
if (!option.nzDisabled) {
this.updateActivatedOption(option);
/** @type {?} */
var listOfSelectedValue = __spread(this.listOfSelectedValue);
if (this.isMultipleOrTags) {
/** @type {?} */
var targetValue = listOfSelectedValue.find(( /**
* @param {?} o
* @return {?}
*/function (o) { return _this.compareWith(o, option.nzValue); }));
if (isNotNil(targetValue)) {
listOfSelectedValue.splice(listOfSelectedValue.indexOf(targetValue), 1);
this.updateListOfSelectedValue(listOfSelectedValue, true);
}
else if (listOfSelectedValue.length < this.maxMultipleCount) {
listOfSelectedValue.push(option.nzValue);
this.updateListOfSelectedValue(listOfSelectedValue, true);
}
}
else if (!this.compareWith(listOfSelectedValue[0], option.nzValue)) {
listOfSelectedValue = [option.nzValue];
this.updateListOfSelectedValue(listOfSelectedValue, true);
}
if (this.isSingleMode) {
this.setOpenState(false);
}
else if (this.autoClearSearchValue) {
this.clearInput();
}
}
};
/**
* @return {?}
*/
NzSelectService.prototype.updateListOfCachedOption = /**
* @return {?}
*/
function () {
var _this = this;
if (this.isSingleMode) {
/** @type {?} */
var selectedOption = this.listOfTemplateOption.find(( /**
* @param {?} o
* @return {?}
*/function (o) { return _this.compareWith(o.nzValue, _this.listOfSelectedValue[0]); }));
if (isNotNil(selectedOption)) {
this.listOfCachedSelectedOption = [selectedOption];
}
}
else {
/** @type {?} */
var listOfCachedSelectedOption_1 = [];
this.listOfSelectedValue.forEach(( /**
* @param {?} v
* @return {?}
*/function (v) {
/** @type {?} */
var listOfMixedOption = __spread(_this.listOfTagAndTemplateOption, _this.listOfCachedSelectedOption);
/** @type {?} */
var option = listOfMixedOption.find(( /**
* @param {?} o
* @return {?}
*/function (o) { return _this.compareWith(o.nzValue, v); }));
if (option) {
listOfCachedSelectedOption_1.push(option);
}
}));
this.listOfCachedSelectedOption = listOfCachedSelectedOption_1;
}
};
/**
* @return {?}
*/
NzSelectService.prototype.updateListOfTagOption = /**
* @return {?}
*/
function () {
var _this = this;
if (this.isTagsMode) {
/** @type {?} */
var listOfMissValue = this.listOfSelectedValue.filter(( /**
* @param {?} value
* @return {?}
*/function (value) {
return !_this.listOfTemplateOption.find(( /**
* @param {?} o
* @return {?}
*/function (o) { return _this.compareWith(o.nzValue, value); }));
}));
this.listOfTagOption = listOfMissValue.map(( /**
* @param {?} value
* @return {?}
*/function (value) {
/** @type {?} */
var nzOptionComponent = new NzOptionComponent();
nzOptionComponent.nzValue = value;
nzOptionComponent.nzLabel = value;
return nzOptionComponent;
}));
this.listOfTagAndTemplateOption = __spread(this.listOfTemplateOption.concat(this.listOfTagOption));
}
else {
this.listOfTagAndTemplateOption = __spread(this.listOfTemplateOption);
}
};
/**
* @return {?}
*/
NzSelectService.prototype.updateAddTagOption = /**
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var isMatch = this.listOfTagAndTemplateOption.find(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.nzLabel === _this.searchValue; }));
if (this.isTagsMode && this.searchValue && !isMatch) {
/** @type {?} */
var option = new NzOptionComponent();
option.nzValue = this.searchValue;
option.nzLabel = this.searchValue;
this.addedTagOption = option;
this.updateActivatedOption(option);
}
else {
this.addedTagOption = null;
}
};
/**
* @return {?}
*/
NzSelectService.prototype.updateListOfFilteredOption = /**
* @return {?}
*/
function () {
this.updateAddTagOption();
/** @type {?} */
var listOfFilteredOption = new NzFilterOptionPipe().transform(this.listOfTagAndTemplateOption, this.searchValue, this.filterOption, this.serverSearch);
this.listOfFilteredOption = this.addedTagOption ? __spread([this.addedTagOption], listOfFilteredOption) : __spread(listOfFilteredOption);
this.isShowNotFound = !this.isTagsMode && !this.listOfFilteredOption.length;
};
/**
* @return {?}
*/
NzSelectService.prototype.clearInput = /**
* @return {?}
*/
function () {
this.clearInput$.next();
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @param {?} emit
* @return {?}
*/
NzSelectService.prototype.updateListOfSelectedValue =
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @param {?} emit
* @return {?}
*/
function (value, emit) {
this.listOfSelectedValueWithEmit$.next({ value: value, emit: emit });
};
/**
* @param {?} option
* @return {?}
*/
NzSelectService.prototype.updateActivatedOption = /**
* @param {?} option
* @return {?}
*/
function (option) {
this.activatedOption$.next(option);
this.activatedOption = option;
};
/**
* @param {?} inputValue
* @param {?} tokenSeparators
* @return {?}
*/
NzSelectService.prototype.tokenSeparate = /**
* @param {?} inputValue
* @param {?} tokenSeparators
* @return {?}
*/
function (inputValue, tokenSeparators) {
// auto tokenSeparators
if (inputValue &&
inputValue.length &&
tokenSeparators.length &&
this.isMultipleOrTags &&
this.includesSeparators(inputValue, tokenSeparators)) {
/** @type {?} */
var listOfLabel = this.splitBySeparators(inputValue, tokenSeparators);
this.updateSelectedValueByLabelList(listOfLabel);
this.clearInput();
}
};
/**
* @param {?} str
* @param {?} separators
* @return {?}
*/
NzSelectService.prototype.includesSeparators = /**
* @param {?} str
* @param {?} separators
* @return {?}
*/
function (str, separators) {
// tslint:disable-next-line:prefer-for-of
for (var i = 0; i < separators.length; ++i) {
if (str.lastIndexOf(separators[i]) > 0) {
return true;
}
}
return false;
};
/**
* @param {?} str
* @param {?} separators
* @return {?}
*/
NzSelectService.prototype.splitBySeparators = /**
* @param {?} str
* @param {?} separators
* @return {?}
*/
function (str, separators) {
/** @type {?} */
var reg = new RegExp("[" + separators.join() + "]");
/** @type {?} */
var array = (( /** @type {?} */(str))).split(reg).filter(( /**
* @param {?} token
* @return {?}
*/function (token) { return token; }));
return Array.from(new Set(array));
};
/**
* @return {?}
*/
NzSelectService.prototype.resetActivatedOptionIfNeeded = /**
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var resetActivatedOption = ( /**
* @return {?}
*/function () {
/** @type {?} */
var activatedOption = _this.listOfFilteredOption.find(( /**
* @param {?} item
* @return {?}
*/function (item) { return _this.compareWith(item.nzValue, _this.listOfSelectedValue[0]); }));
_this.updateActivatedOption(activatedOption || null);
});
if (this.activatedOption) {
if (!this.listOfFilteredOption.find(( /**
* @param {?} item
* @return {?}
*/function (item) { return _this.compareWith(item.nzValue, _this.activatedOption.nzValue); })) ||
!this.listOfSelectedValue.find(( /**
* @param {?} item
* @return {?}
*/function (item) { return _this.compareWith(item, _this.activatedOption.nzValue); }))) {
resetActivatedOption();
}
}
else {
resetActivatedOption();
}
};
/**
* @param {?} listOfNzOptionComponent
* @param {?} listOfNzOptionGroupComponent
* @return {?}
*/
NzSelectService.prototype.updateTemplateOption = /**
* @param {?} listOfNzOptionComponent
* @param {?} listOfNzOptionGroupComponent
* @return {?}
*/
function (listOfNzOptionComponent, listOfNzOptionGroupComponent) {
this.mapOfTemplateOption$.next({ listOfNzOptionComponent: listOfNzOptionComponent, listOfNzOptionGroupComponent: listOfNzOptionGroupComponent });
};
/**
* @param {?} value
* @return {?}
*/
NzSelectService.prototype.updateSearchValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.searchValueRaw$.next(value);
};
/**
* @param {?} listOfLabel
* @return {?}
*/
NzSelectService.prototype.updateSelectedValueByLabelList = /**
* @param {?} listOfLabel
* @return {?}
*/
function (listOfLabel) {
var _this = this;
/** @type {?} */
var listOfSelectedValue = __spread(this.listOfSelectedValue);
/** @type {?} */
var listOfMatchOptionValue = this.listOfTagAndTemplateOption
.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return listOfLabel.indexOf(item.nzLabel) !== -1; }))
.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.nzValue; }))
.filter(( /**
* @param {?} item
* @return {?}
*/function (item) {
return !isNotNil(_this.listOfSelectedValue.find(( /**
* @param {?} v
* @return {?}
*/function (v) { return _this.compareWith(v, item); })));
}));
if (this.isMultipleMode) {
this.updateListOfSelectedValue(__spread(listOfSelectedValue, listOfMatchOptionValue), true);
}
else {
/** @type {?} */
var listOfUnMatchOptionValue = listOfLabel
.filter(( /**
* @param {?} label
* @return {?}
*/function (label) {
return _this.listOfTagAndTemplateOption
.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.nzLabel; })).indexOf(label) === -1;
}));
this.updateListOfSelectedValue(__spread(listOfSelectedValue, listOfMatchOptionValue, listOfUnMatchOptionValue), true);
}
};
/**
* @param {?} e
* @return {?}
*/
NzSelectService.prototype.onKeyDown = /**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
/** @type {?} */
var keyCode = e.keyCode;
/** @type {?} */
var eventTarget = ( /** @type {?} */(e.target));
/** @type {?} */
var listOfFilteredOptionWithoutDisabled = this.listOfFilteredOption.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return !item.nzDisabled; }));
/** @type {?} */
var activatedIndex = listOfFilteredOptionWithoutDisabled.findIndex(( /**
* @param {?} item
* @return {?}
*/function (item) { return item === _this.activatedOption; }));
switch (keyCode) {
case keycodes.UP_ARROW:
e.preventDefault();
/** @type {?} */
var preIndex = activatedIndex > 0 ? (activatedIndex - 1) : (listOfFilteredOptionWithoutDisabled.length - 1);
this.updateActivatedOption(listOfFilteredOptionWithoutDisabled[preIndex]);
break;
case keycodes.DOWN_ARROW:
e.preventDefault();
/** @type {?} */
var nextIndex = activatedIndex < listOfFilteredOptionWithoutDisabled.length - 1 ? (activatedIndex + 1) : 0;
this.updateActivatedOption(listOfFilteredOptionWithoutDisabled[nextIndex]);
if (!this.disabled && !this.open) {
this.setOpenState(true);
}
break;
case keycodes.ENTER:
e.preventDefault();
if (this.open) {
if (this.activatedOption && !this.activatedOption.nzDisabled) {
this.clickOption(this.activatedOption);
}
}
else {
this.setOpenState(true);
}
break;
case keycodes.BACKSPACE:
if (this.isMultipleOrTags && !eventTarget.value && this.listOfCachedSelectedOption.length) {
e.preventDefault();
this.removeValueFormSelected(this.listOfCachedSelectedOption[this.listOfCachedSelectedOption.length - 1]);
}
break;
case keycodes.SPACE:
if (!this.disabled && !this.open) {
this.setOpenState(true);
event.preventDefault();
}
break;
case keycodes.TAB:
this.setOpenState(false);
break;
}
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} option
* @return {?}
*/
NzSelectService.prototype.removeValueFormSelected =
// tslint:disable-next-line:no-any
/**
* @param {?} option
* @return {?}
*/
function (option) {
var _this = this;
if (this.disabled || option.nzDisabled) {
return;
}
/** @type {?} */
var listOfSelectedValue = this.listOfSelectedValue.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return !_this.compareWith(item, option.nzValue); }));
this.updateListOfSelectedValue(listOfSelectedValue, true);
this.clearInput();
};
/**
* @param {?} value
* @return {?}
*/
NzSelectService.prototype.setOpenState = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.openRaw$.next(value);
this.open = value;
};
/**
* @return {?}
*/
NzSelectService.prototype.check = /**
* @return {?}
*/
function () {
this.checkRaw$.next();
};
Object.defineProperty(NzSelectService.prototype, "isSingleMode", {
get: /**
* @return {?}
*/ function () {
return this.mode === 'default';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectService.prototype, "isTagsMode", {
get: /**
* @return {?}
*/ function () {
return this.mode === 'tags';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectService.prototype, "isMultipleMode", {
get: /**
* @return {?}
*/ function () {
return this.mode === 'multiple';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectService.prototype, "isMultipleOrTags", {
get: /**
* @return {?}
*/ function () {
return this.mode === 'tags' || this.mode === 'multiple';
},
enumerable: true,
configurable: true
});
NzSelectService.decorators = [
{ type: i0.Injectable }
];
return NzSelectService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzOptionLiComponent = /** @class */ (function () {
function NzOptionLiComponent(elementRef, nzSelectService, cdr, renderer) {
this.elementRef = elementRef;
this.nzSelectService = nzSelectService;
this.cdr = cdr;
this.el = this.elementRef.nativeElement;
this.selected = false;
this.active = false;
this.destroy$ = new rxjs.Subject();
renderer.addClass(elementRef.nativeElement, 'ant-select-dropdown-menu-item');
}
/**
* @return {?}
*/
NzOptionLiComponent.prototype.clickOption = /**
* @return {?}
*/
function () {
this.nzSelectService.clickOption(this.nzOption);
};
/**
* @return {?}
*/
NzOptionLiComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.nzSelectService.listOfSelectedValue$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} list
* @return {?}
*/function (list) {
_this.selected = isNotNil(list.find(( /**
* @param {?} v
* @return {?}
*/function (v) { return _this.nzSelectService.compareWith(v, _this.nzOption.nzValue); })));
_this.cdr.markForCheck();
}));
this.nzSelectService.activatedOption$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} option
* @return {?}
*/function (option) {
if (option) {
_this.active = _this.nzSelectService.compareWith(option.nzValue, _this.nzOption.nzValue);
}
else {
_this.active = false;
}
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzOptionLiComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzOptionLiComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-option-li]',
template: "<ng-container *ngIf=\"!nzOption.nzCustomContent; else nzOption.template\">\n {{nzOption.nzLabel}}\n</ng-container>\n<ng-container *ngIf=\"nzSelectService.isMultipleOrTags\">\n <i nz-icon type=\"check\" class=\"ant-select-selected-icon\" *ngIf=\"!nzMenuItemSelectedIcon; else nzMenuItemSelectedIcon\"></i>\n</ng-container>\n",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
host: {
'[class.ant-select-dropdown-menu-item-selected]': 'selected && !nzOption.nzDisabled',
'[class.ant-select-dropdown-menu-item-disabled]': 'nzOption.nzDisabled',
'[class.ant-select-dropdown-menu-item-active]': 'active && !nzOption.nzDisabled',
'[attr.unselectable]': '"unselectable"',
'[style.user-select]': '"none"',
'(click)': 'clickOption()',
'(mousedown)': '$event.preventDefault()'
}
}] }
];
/** @nocollapse */
NzOptionLiComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzSelectService },
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 }
];
};
NzOptionLiComponent.propDecorators = {
nzOption: [{ type: i0.Input }],
nzMenuItemSelectedIcon: [{ type: i0.Input }]
};
return NzOptionLiComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzOptionContainerComponent = /** @class */ (function () {
function NzOptionContainerComponent(nzSelectService, cdr, ngZone) {
this.nzSelectService = nzSelectService;
this.cdr = cdr;
this.ngZone = ngZone;
this.destroy$ = new rxjs.Subject();
this.nzScrollToBottom = new i0.EventEmitter();
}
/**
* @param {?} option
* @return {?}
*/
NzOptionContainerComponent.prototype.scrollIntoViewIfNeeded = /**
* @param {?} option
* @return {?}
*/
function (option) {
var _this = this;
// delay after open
setTimeout(( /**
* @return {?}
*/function () {
if (_this.listOfNzOptionLiComponent && _this.listOfNzOptionLiComponent.length && option) {
/** @type {?} */
var targetOption = _this.listOfNzOptionLiComponent.find(( /**
* @param {?} o
* @return {?}
*/function (o) { return _this.nzSelectService.compareWith(o.nzOption.nzValue, option.nzValue); }));
/* tslint:disable-next-line:no-string-literal */
if (targetOption && targetOption.el && targetOption.el['scrollIntoViewIfNeeded']) {
/* tslint:disable-next-line:no-string-literal */
targetOption.el['scrollIntoViewIfNeeded'](false);
}
}
}));
};
/**
* @param {?} _index
* @param {?} option
* @return {?}
*/
NzOptionContainerComponent.prototype.trackLabel = /**
* @param {?} _index
* @param {?} option
* @return {?}
*/
function (_index, option) {
return option.nzLabel;
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} _index
* @param {?} option
* @return {?}
*/
NzOptionContainerComponent.prototype.trackValue =
// tslint:disable-next-line:no-any
/**
* @param {?} _index
* @param {?} option
* @return {?}
*/
function (_index, option) {
return option.nzValue;
};
/**
* @return {?}
*/
NzOptionContainerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.nzSelectService.activatedOption$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} option
* @return {?}
*/function (option) {
_this.scrollIntoViewIfNeeded(option);
}));
this.nzSelectService.check$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.cdr.markForCheck();
}));
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
/** @type {?} */
var ul = _this.dropdownUl.nativeElement;
rxjs.fromEvent(ul, 'scroll').pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) {
e.preventDefault();
e.stopPropagation();
if (ul && (ul.scrollHeight < (ul.clientHeight + ul.scrollTop + 10))) {
_this.ngZone.run(( /**
* @return {?}
*/function () {
_this.nzScrollToBottom.emit();
}));
}
}));
}));
};
/**
* @return {?}
*/
NzOptionContainerComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzOptionContainerComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-option-container]',
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
template: "<ul #dropdownUl\n class=\"ant-select-dropdown-menu ant-select-dropdown-menu-root ant-select-dropdown-menu-vertical\"\n role=\"menu\"\n tabindex=\"0\">\n <li *ngIf=\"nzSelectService.isShowNotFound\"\n nz-select-unselectable\n class=\"ant-select-dropdown-menu-item ant-select-dropdown-menu-item-disabled\">\n <nz-embed-empty [nzComponentName]=\"'select'\" [specificContent]=\"nzNotFoundContent\"></nz-embed-empty>\n </li>\n <li nz-option-li\n *ngIf=\"nzSelectService.addedTagOption\"\n [nzMenuItemSelectedIcon]=\"nzMenuItemSelectedIcon\"\n [nzOption]=\"nzSelectService.addedTagOption\">\n </li>\n <li nz-option-li\n *ngFor=\"let option of nzSelectService.listOfNzOptionComponent | nzFilterOption : nzSelectService.searchValue : nzSelectService.filterOption : nzSelectService.serverSearch; trackBy: trackValue\"\n [nzMenuItemSelectedIcon]=\"nzMenuItemSelectedIcon\"\n [nzOption]=\"option\">\n </li>\n <li class=\"ant-select-dropdown-menu-item-group\"\n *ngFor=\"let group of nzSelectService.listOfNzOptionGroupComponent | nzFilterGroupOption : nzSelectService.searchValue : nzSelectService.filterOption :nzSelectService.serverSearch; trackBy: trackLabel\">\n <div class=\"ant-select-dropdown-menu-item-group-title\"\n [attr.title]=\"group.isLabelString ? group.nzLabel : ''\">\n <ng-container *nzStringTemplateOutlet=\"group.nzLabel\"> {{group.nzLabel}} </ng-container>\n </div>\n <ul class=\"ant-select-dropdown-menu-item-group-list\">\n <li nz-option-li\n *ngFor=\"let option of group.listOfNzOptionComponent | nzFilterOption : nzSelectService.searchValue : nzSelectService.filterOption :nzSelectService.serverSearch; trackBy: trackValue\"\n [nzMenuItemSelectedIcon]=\"nzMenuItemSelectedIcon\"\n [nzOption]=\"option\">\n </li>\n </ul>\n </li>\n <li nz-option-li\n *ngFor=\"let option of nzSelectService.listOfTagOption | nzFilterOption : nzSelectService.searchValue : nzSelectService.filterOption : nzSelectService.serverSearch; trackBy: trackValue \"\n [nzMenuItemSelectedIcon]=\"nzMenuItemSelectedIcon\"\n [nzOption]=\"option\">\n </li>\n</ul>\n"
}] }
];
/** @nocollapse */
NzOptionContainerComponent.ctorParameters = function () {
return [
{ type: NzSelectService },
{ type: i0.ChangeDetectorRef },
{ type: i0.NgZone }
];
};
NzOptionContainerComponent.propDecorators = {
listOfNzOptionLiComponent: [{ type: i0.ViewChildren, args: [NzOptionLiComponent,] }],
dropdownUl: [{ type: i0.ViewChild, args: ['dropdownUl',] }],
nzNotFoundContent: [{ type: i0.Input }],
nzMenuItemSelectedIcon: [{ type: i0.Input }],
nzScrollToBottom: [{ type: i0.Output }]
};
return NzOptionContainerComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzOptionGroupComponent = /** @class */ (function () {
function NzOptionGroupComponent() {
this.isLabelString = false;
}
Object.defineProperty(NzOptionGroupComponent.prototype, "nzLabel", {
get: /**
* @return {?}
*/ function () {
return this.label;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.label = value;
this.isLabelString = !(this.nzLabel instanceof i0.TemplateRef);
},
enumerable: true,
configurable: true
});
NzOptionGroupComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-option-group',
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-content></ng-content>"
}] }
];
NzOptionGroupComponent.propDecorators = {
listOfNzOptionComponent: [{ type: i0.ContentChildren, args: [NzOptionComponent,] }],
nzLabel: [{ type: i0.Input }]
};
return NzOptionGroupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSelectTopControlComponent = /** @class */ (function () {
function NzSelectTopControlComponent(renderer, nzSelectService, cdr, noAnimation) {
this.renderer = renderer;
this.nzSelectService = nzSelectService;
this.cdr = cdr;
this.noAnimation = noAnimation;
this.isComposing = false;
this.destroy$ = new rxjs.Subject();
this.nzShowSearch = false;
this.nzOpen = false;
this.nzAllowClear = false;
this.nzShowArrow = true;
this.nzLoading = false;
this.nzTokenSeparators = [];
}
/**
* @param {?} e
* @return {?}
*/
NzSelectTopControlComponent.prototype.onClearSelection = /**
* @param {?} e
* @return {?}
*/
function (e) {
e.stopPropagation();
this.nzSelectService.updateListOfSelectedValue([], true);
};
/**
* @param {?} value
* @return {?}
*/
NzSelectTopControlComponent.prototype.setInputValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.inputElement) {
this.inputElement.nativeElement.value = value;
}
this.inputValue = value;
this.updateWidth();
this.nzSelectService.updateSearchValue(value);
this.nzSelectService.tokenSeparate(this.inputValue, this.nzTokenSeparators);
};
Object.defineProperty(NzSelectTopControlComponent.prototype, "placeHolderDisplay", {
get: /**
* @return {?}
*/ function () {
return this.inputValue || this.isComposing || this.nzSelectService.listOfSelectedValue.length ? 'none' : 'block';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectTopControlComponent.prototype, "selectedValueStyle", {
get: /**
* @return {?}
*/ function () {
/** @type {?} */
var showSelectedValue = false;
/** @type {?} */
var opacity = 1;
if (!this.nzShowSearch) {
showSelectedValue = true;
}
else {
if (this.nzOpen) {
showSelectedValue = !(this.inputValue || this.isComposing);
if (showSelectedValue) {
opacity = 0.4;
}
}
else {
showSelectedValue = true;
}
}
return {
display: showSelectedValue ? 'block' : 'none',
opacity: "" + opacity
};
},
enumerable: true,
configurable: true
});
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} _index
* @param {?} option
* @return {?}
*/
NzSelectTopControlComponent.prototype.trackValue =
// tslint:disable-next-line:no-any
/**
* @param {?} _index
* @param {?} option
* @return {?}
*/
function (_index, option) {
return option.nzValue;
};
/**
* @return {?}
*/
NzSelectTopControlComponent.prototype.updateWidth = /**
* @return {?}
*/
function () {
if (this.nzSelectService.isMultipleOrTags && this.inputElement) {
if (this.inputValue || this.isComposing) {
this.renderer.setStyle(this.inputElement.nativeElement, 'width', this.inputElement.nativeElement.scrollWidth + "px");
}
else {
this.renderer.removeStyle(this.inputElement.nativeElement, 'width');
}
}
};
/**
* @param {?} option
* @param {?} e
* @return {?}
*/
NzSelectTopControlComponent.prototype.removeSelectedValue = /**
* @param {?} option
* @param {?} e
* @return {?}
*/
function (option, e) {
this.nzSelectService.removeValueFormSelected(option);
e.stopPropagation();
};
/**
* @return {?}
*/
NzSelectTopControlComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.nzSelectService.open$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} open
* @return {?}
*/function (open) {
if (_this.inputElement && open) {
_this.inputElement.nativeElement.focus();
}
}));
this.nzSelectService.clearInput$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.setInputValue('');
}));
this.nzSelectService.check$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzSelectTopControlComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzSelectTopControlComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-select-top-control]',
preserveWhitespaces: false,
animations: [zoomMotion],
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-template #inputTemplate>\n <input #inputElement\n autocomplete=\"something-new\"\n class=\"ant-select-search__field\"\n (compositionstart)=\"isComposing = true\"\n (compositionend)=\"isComposing = false\"\n (input)=\"updateWidth()\"\n [ngModel]=\"inputValue\"\n (ngModelChange)=\"setInputValue($event)\"\n [disabled]=\"nzSelectService.disabled\">\n</ng-template>\n<div class=\"ant-select-selection__rendered\">\n <div *ngIf=\"nzPlaceHolder\"\n nz-select-unselectable\n [style.display]=\"placeHolderDisplay\"\n class=\"ant-select-selection__placeholder\">{{ nzPlaceHolder }}</div>\n <!--single mode-->\n <ng-container *ngIf=\"nzSelectService.isSingleMode\">\n <!--selected label-->\n <div *ngIf=\"nzSelectService.listOfCachedSelectedOption.length && nzSelectService.listOfSelectedValue.length\"\n class=\"ant-select-selection-selected-value\"\n [attr.title]=\"nzSelectService.listOfCachedSelectedOption[0]?.nzLabel\"\n [ngStyle]=\"selectedValueStyle\">\n {{ nzSelectService.listOfCachedSelectedOption[0]?.nzLabel }}\n </div>\n <!--show search-->\n <div *ngIf=\"nzShowSearch\"\n class=\"ant-select-search ant-select-search--inline\">\n <div class=\"ant-select-search__field__wrap\">\n <ng-template [ngTemplateOutlet]=\"inputTemplate\"></ng-template>\n <span class=\"ant-select-search__field__mirror\">{{inputValue}} </span>\n </div>\n </div>\n </ng-container>\n <!--multiple or tags mode-->\n <ul *ngIf=\"nzSelectService.isMultipleOrTags\">\n <ng-container *ngFor=\"let option of nzSelectService.listOfCachedSelectedOption | slice: 0 : nzMaxTagCount;trackBy:trackValue;\">\n <li [@zoomMotion]\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [attr.title]=\"option.nzLabel\"\n [class.ant-select-selection__choice__disabled]=\"option.nzDisabled\"\n class=\"ant-select-selection__choice\">\n <div class=\"ant-select-selection__choice__content\">{{ option.nzLabel }}</div>\n <span *ngIf=\"!option.nzDisabled\"\n class=\"ant-select-selection__choice__remove\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"removeSelectedValue(option, $event)\">\n <i nz-icon type=\"close\" class=\"ant-select-remove-icon\" *ngIf=\"!nzRemoveIcon; else nzRemoveIcon\"></i>\n </span>\n </li>\n </ng-container>\n <li *ngIf=\"nzSelectService.listOfCachedSelectedOption.length > nzMaxTagCount\"\n [@zoomMotion]\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n class=\"ant-select-selection__choice\">\n <div class=\"ant-select-selection__choice__content\">\n <ng-container *ngIf=\"nzMaxTagPlaceholder\">\n <ng-template\n [ngTemplateOutlet]=\"nzMaxTagPlaceholder\"\n [ngTemplateOutletContext]=\"{ $implicit: nzSelectService.listOfSelectedValue | slice: nzMaxTagCount}\">\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!nzMaxTagPlaceholder\">\n + {{ nzSelectService.listOfCachedSelectedOption.length - nzMaxTagCount }} ...\n </ng-container>\n </div>\n </li>\n <li class=\"ant-select-search ant-select-search--inline\">\n <ng-template [ngTemplateOutlet]=\"inputTemplate\"></ng-template>\n </li>\n </ul>\n</div>\n<span *ngIf=\"nzAllowClear && nzSelectService.listOfSelectedValue.length\"\n class=\"ant-select-selection__clear\"\n nz-select-unselectable\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClearSelection($event)\">\n <i nz-icon type=\"close-circle\" theme=\"fill\" *ngIf=\"!nzClearIcon; else nzClearIcon\" class=\"ant-select-close-icon\"></i>\n </span>\n<span class=\"ant-select-arrow\" nz-select-unselectable *ngIf=\"nzShowArrow\">\n <i nz-icon type=\"loading\" *ngIf=\"nzLoading; else defaultArrow\"></i>\n <ng-template #defaultArrow>\n <i nz-icon type=\"down\" class=\"ant-select-arrow-icon\" *ngIf=\"!nzSuffixIcon; else nzSuffixIcon\"></i>\n </ng-template>\n</span>"
}] }
];
/** @nocollapse */
NzSelectTopControlComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: NzSelectService },
{ type: i0.ChangeDetectorRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzSelectTopControlComponent.propDecorators = {
inputElement: [{ type: i0.ViewChild, args: ['inputElement',] }],
nzShowSearch: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzOpen: [{ type: i0.Input }],
nzMaxTagCount: [{ type: i0.Input }],
nzAllowClear: [{ type: i0.Input }],
nzShowArrow: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzSuffixIcon: [{ type: i0.Input }],
nzClearIcon: [{ type: i0.Input }],
nzRemoveIcon: [{ type: i0.Input }],
nzMaxTagPlaceholder: [{ type: i0.Input }],
nzTokenSeparators: [{ type: i0.Input }]
};
return NzSelectTopControlComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSelectUnselectableDirective = /** @class */ (function () {
function NzSelectUnselectableDirective() {
}
NzSelectUnselectableDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-select-unselectable]',
host: {
'[attr.unselectable]': '"unselectable"',
'[style.user-select]': '"none"'
}
},] }
];
return NzSelectUnselectableDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSelectComponent = /** @class */ (function () {
function NzSelectComponent(renderer, nzSelectService, cdr, focusMonitor, elementRef, noAnimation) {
this.renderer = renderer;
this.nzSelectService = nzSelectService;
this.cdr = cdr;
this.focusMonitor = focusMonitor;
this.noAnimation = noAnimation;
this.open = false;
this.onChange = ( /**
* @return {?}
*/function () { return null; });
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.dropDownPosition = 'bottom';
this._disabled = false;
this._autoFocus = false;
this.destroy$ = new rxjs.Subject();
this.nzOnSearch = new i0.EventEmitter();
this.nzScrollToBottom = new i0.EventEmitter();
this.nzOpenChange = new i0.EventEmitter();
this.nzBlur = new i0.EventEmitter();
this.nzFocus = new i0.EventEmitter();
this.nzSize = 'default';
this.nzDropdownMatchSelectWidth = true;
this.nzAllowClear = false;
this.nzShowSearch = false;
this.nzLoading = false;
this.nzShowArrow = true;
this.nzTokenSeparators = [];
renderer.addClass(elementRef.nativeElement, 'ant-select');
}
Object.defineProperty(NzSelectComponent.prototype, "nzAutoClearSearchValue", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzSelectService.autoClearSearchValue = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "nzMaxMultipleCount", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzSelectService.maxMultipleCount = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "nzServerSearch", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzSelectService.serverSearch = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "nzMode", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzSelectService.mode = value;
this.nzSelectService.check();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "nzFilterOption", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzSelectService.filterOption = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "compareWith", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzSelectService.compareWith = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "nzAutoFocus", {
get: /**
* @return {?}
*/ function () {
return this._autoFocus;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._autoFocus = toBoolean(value);
this.updateAutoFocus();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "nzOpen", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.open = value;
this.nzSelectService.setOpenState(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSelectComponent.prototype, "nzDisabled", {
get: /**
* @return {?}
*/ function () {
return this._disabled;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._disabled = toBoolean(value);
this.nzSelectService.disabled = this._disabled;
this.nzSelectService.check();
if (this.nzDisabled) {
this.closeDropDown();
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzSelectComponent.prototype.updateAutoFocus = /**
* @return {?}
*/
function () {
if (this.nzSelectTopControlComponent.inputElement) {
if (this.nzAutoFocus) {
this.renderer.setAttribute(this.nzSelectTopControlComponent.inputElement.nativeElement, 'autofocus', 'autofocus');
}
else {
this.renderer.removeAttribute(this.nzSelectTopControlComponent.inputElement.nativeElement, 'autofocus');
}
}
};
/**
* @return {?}
*/
NzSelectComponent.prototype.focus = /**
* @return {?}
*/
function () {
if (this.nzSelectTopControlComponent.inputElement) {
this.focusMonitor.focusVia(this.nzSelectTopControlComponent.inputElement, 'keyboard');
this.nzFocus.emit();
}
};
/**
* @return {?}
*/
NzSelectComponent.prototype.blur = /**
* @return {?}
*/
function () {
if (this.nzSelectTopControlComponent.inputElement) {
this.nzSelectTopControlComponent.inputElement.nativeElement.blur();
this.nzBlur.emit();
}
};
/**
* @param {?} event
* @return {?}
*/
NzSelectComponent.prototype.onKeyDown = /**
* @param {?} event
* @return {?}
*/
function (event) {
this.nzSelectService.onKeyDown(event);
};
/**
* @return {?}
*/
NzSelectComponent.prototype.toggleDropDown = /**
* @return {?}
*/
function () {
if (!this.nzDisabled) {
this.nzSelectService.setOpenState(!this.open);
}
};
/**
* @return {?}
*/
NzSelectComponent.prototype.closeDropDown = /**
* @return {?}
*/
function () {
this.nzSelectService.setOpenState(false);
};
/**
* @param {?} position
* @return {?}
*/
NzSelectComponent.prototype.onPositionChange = /**
* @param {?} position
* @return {?}
*/
function (position) {
this.dropDownPosition = position.connectionPair.originY;
};
/**
* @return {?}
*/
NzSelectComponent.prototype.updateCdkConnectedOverlayStatus = /**
* @return {?}
*/
function () {
this.triggerWidth = this.cdkOverlayOrigin.elementRef.nativeElement.getBoundingClientRect().width;
};
/**
* @return {?}
*/
NzSelectComponent.prototype.updateCdkConnectedOverlayPositions = /**
* @return {?}
*/
function () {
var _this = this;
setTimeout(( /**
* @return {?}
*/function () {
if (_this.cdkConnectedOverlay && _this.cdkConnectedOverlay.overlayRef) {
_this.cdkConnectedOverlay.overlayRef.updatePosition();
}
}));
};
/** update ngModel -> update listOfSelectedValue **/
// tslint:disable-next-line:no-any
/**
* update ngModel -> update listOfSelectedValue *
* @param {?} value
* @return {?}
*/
// tslint:disable-next-line:no-any
NzSelectComponent.prototype.writeValue = /**
* update ngModel -> update listOfSelectedValue *
* @param {?} value
* @return {?}
*/
// tslint:disable-next-line:no-any
function (value) {
this.value = value;
/** @type {?} */
var listValue = [];
if (isNotNil(value)) {
if (Array.isArray(value)) {
listValue = value;
}
else {
listValue = [value];
}
}
this.nzSelectService.updateListOfSelectedValue(listValue, false);
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzSelectComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzSelectComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzSelectComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzSelectComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.nzSelectService.searchValue$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.nzOnSearch.emit(data);
_this.updateCdkConnectedOverlayPositions();
}));
this.nzSelectService.modelChange$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} modelValue
* @return {?}
*/function (modelValue) {
if (_this.value !== modelValue) {
_this.value = modelValue;
_this.onChange(_this.value);
_this.updateCdkConnectedOverlayPositions();
}
}));
this.nzSelectService.open$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} value
* @return {?}
*/function (value) {
if (_this.open !== value) {
_this.nzOpenChange.emit(value);
}
if (value) {
_this.focus();
_this.updateCdkConnectedOverlayStatus();
}
else {
_this.blur();
_this.onTouched();
}
_this.open = value;
}));
this.nzSelectService.check$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzSelectComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.updateCdkConnectedOverlayStatus();
};
/**
* @return {?}
*/
NzSelectComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.listOfNzOptionGroupComponent.changes.pipe(operators.startWith(true), operators.flatMap(( /**
* @return {?}
*/function () {
return rxjs.merge.apply(void 0, __spread([_this.listOfNzOptionGroupComponent.changes,
_this.listOfNzOptionComponent.changes], _this.listOfNzOptionGroupComponent.map(( /**
* @param {?} group
* @return {?}
*/function (group) { return group.listOfNzOptionComponent ? group.listOfNzOptionComponent.changes : rxjs.EMPTY; })))).pipe(operators.startWith(true));
}))).subscribe(( /**
* @return {?}
*/function () {
_this.nzSelectService.updateTemplateOption(_this.listOfNzOptionComponent.toArray(), _this.listOfNzOptionGroupComponent.toArray());
}));
};
/**
* @return {?}
*/
NzSelectComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzSelectComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-select',
preserveWhitespaces: false,
providers: [
NzSelectService,
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzSelectComponent; })),
multi: true
}
],
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
animations: [slideMotion],
template: "<div cdkOverlayOrigin\n nz-select-top-control\n tabindex=\"0\"\n class=\"ant-select-selection\"\n [nzOpen]=\"open\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [nzMaxTagPlaceholder]=\"nzMaxTagPlaceholder\"\n [nzPlaceHolder]=\"nzPlaceHolder\"\n [nzAllowClear]=\"nzAllowClear\"\n [nzMaxTagCount]=\"nzMaxTagCount\"\n [nzShowArrow]=\"nzShowArrow\"\n [nzLoading]=\"nzLoading\"\n [nzSuffixIcon]=\"nzSuffixIcon\"\n [nzClearIcon]=\"nzClearIcon\"\n [nzRemoveIcon]=\"nzRemoveIcon\"\n [nzShowSearch]=\"nzShowSearch\"\n [nzTokenSeparators]=\"nzTokenSeparators\"\n [class.ant-select-selection--single]=\"nzSelectService.isSingleMode\"\n [class.ant-select-selection--multiple]=\"nzSelectService.isMultipleOrTags\"\n (keydown)=\"onKeyDown($event)\">\n</div>\n<ng-template\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayMinWidth]=\"nzDropdownMatchSelectWidth? null : triggerWidth\"\n [cdkConnectedOverlayWidth]=\"nzDropdownMatchSelectWidth? triggerWidth : null\"\n [cdkConnectedOverlayOrigin]=\"cdkOverlayOrigin\"\n (backdropClick)=\"closeDropDown()\"\n (detach)=\"closeDropDown();\"\n (positionChange)=\"onPositionChange($event)\"\n [cdkConnectedOverlayOpen]=\"open\">\n <div\n class=\"ant-select-dropdown\"\n [class.ant-select-dropdown--single]=\"nzSelectService.isSingleMode\"\n [class.ant-select-dropdown--multiple]=\"nzSelectService.isMultipleOrTags\"\n [class.ant-select-dropdown-placement-bottomLeft]=\"dropDownPosition === 'bottom'\"\n [class.ant-select-dropdown-placement-topLeft]=\"dropDownPosition === 'top'\"\n [nzClassListAdd]=\"[nzDropdownClassName]\"\n [@slideMotion]=\"dropDownPosition\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [ngStyle]=\"nzDropdownStyle\">\n <div nz-option-container\n style=\"overflow: auto;transform: translateZ(0px);\"\n (keydown)=\"onKeyDown($event)\"\n [nzMenuItemSelectedIcon]=\"nzMenuItemSelectedIcon\"\n [nzNotFoundContent]=\"nzNotFoundContent\"\n (nzScrollToBottom)=\"nzScrollToBottom.emit()\">\n </div>\n <ng-template [ngTemplateOutlet]=\"nzDropdownRender\"></ng-template>\n </div>\n</ng-template>\n<!--can not use ViewChild since it will match sub options in option group -->\n<ng-template>\n <ng-content></ng-content>\n</ng-template>",
host: {
'[class.ant-select-lg]': 'nzSize==="large"',
'[class.ant-select-sm]': 'nzSize==="small"',
'[class.ant-select-enabled]': '!nzDisabled',
'[class.ant-select-no-arrow]': '!nzShowArrow',
'[class.ant-select-disabled]': 'nzDisabled',
'[class.ant-select-allow-clear]': 'nzAllowClear',
'[class.ant-select-open]': 'open',
'(click)': 'toggleDropDown()'
},
styles: ["\n .ant-select-dropdown {\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n margin-top: 4px;\n margin-bottom: 4px;\n }\n "]
}] }
];
/** @nocollapse */
NzSelectComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: NzSelectService },
{ type: i0.ChangeDetectorRef },
{ type: a11y.FocusMonitor },
{ type: i0.ElementRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzSelectComponent.propDecorators = {
cdkOverlayOrigin: [{ type: i0.ViewChild, args: [i2$2.CdkOverlayOrigin,] }],
cdkConnectedOverlay: [{ type: i0.ViewChild, args: [i2$2.CdkConnectedOverlay,] }],
nzSelectTopControlComponent: [{ type: i0.ViewChild, args: [NzSelectTopControlComponent,] }],
listOfNzOptionComponent: [{ type: i0.ContentChildren, args: [NzOptionComponent,] }],
listOfNzOptionGroupComponent: [{ type: i0.ContentChildren, args: [NzOptionGroupComponent,] }],
nzOnSearch: [{ type: i0.Output }],
nzScrollToBottom: [{ type: i0.Output }],
nzOpenChange: [{ type: i0.Output }],
nzBlur: [{ type: i0.Output }],
nzFocus: [{ type: i0.Output }],
nzSize: [{ type: i0.Input }],
nzDropdownClassName: [{ type: i0.Input }],
nzDropdownMatchSelectWidth: [{ type: i0.Input }],
nzDropdownStyle: [{ type: i0.Input }],
nzNotFoundContent: [{ type: i0.Input }],
nzAllowClear: [{ type: i0.Input }],
nzShowSearch: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzMaxTagCount: [{ type: i0.Input }],
nzDropdownRender: [{ type: i0.Input }],
nzSuffixIcon: [{ type: i0.Input }],
nzClearIcon: [{ type: i0.Input }],
nzRemoveIcon: [{ type: i0.Input }],
nzMenuItemSelectedIcon: [{ type: i0.Input }],
nzShowArrow: [{ type: i0.Input }],
nzTokenSeparators: [{ type: i0.Input }],
nzMaxTagPlaceholder: [{ type: i0.Input }],
nzAutoClearSearchValue: [{ type: i0.Input }],
nzMaxMultipleCount: [{ type: i0.Input }],
nzServerSearch: [{ type: i0.Input }],
nzMode: [{ type: i0.Input }],
nzFilterOption: [{ type: i0.Input }],
compareWith: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
nzOpen: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSelectComponent.prototype, "nzAllowClear", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSelectComponent.prototype, "nzShowSearch", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSelectComponent.prototype, "nzLoading", void 0);
return NzSelectComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSelectModule = /** @class */ (function () {
function NzSelectModule() {
}
NzSelectModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [
i2$1.CommonModule,
NzI18nModule,
forms.FormsModule,
i2$2.OverlayModule,
NzIconModule,
NzAddOnModule,
NzEmptyModule,
NzOverlayModule,
NzNoAnimationModule
],
declarations: [
NzFilterGroupOptionPipe,
NzFilterOptionPipe,
NzOptionComponent,
NzSelectComponent,
NzOptionContainerComponent,
NzOptionGroupComponent,
NzOptionLiComponent,
NzSelectTopControlComponent,
NzSelectUnselectableDirective
],
exports: [
NzOptionComponent,
NzSelectComponent,
NzOptionContainerComponent,
NzOptionGroupComponent,
NzSelectTopControlComponent
]
},] }
];
return NzSelectModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDateCellDirective = /** @class */ (function () {
function NzDateCellDirective() {
}
NzDateCellDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzDateCell]'
},] }
];
return NzDateCellDirective;
}());
var NzMonthCellDirective = /** @class */ (function () {
function NzMonthCellDirective() {
}
NzMonthCellDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzMonthCell]'
},] }
];
return NzMonthCellDirective;
}());
var NzDateFullCellDirective = /** @class */ (function () {
function NzDateFullCellDirective() {
}
NzDateFullCellDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzDateFullCell]'
},] }
];
return NzDateFullCellDirective;
}());
var NzMonthFullCellDirective = /** @class */ (function () {
function NzMonthFullCellDirective() {
}
NzMonthFullCellDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[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 i0.EventEmitter();
this.fullscreen = true;
this.yearChange = new i0.EventEmitter();
this.monthChange = new i0.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: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
selector: 'nz-calendar-header',
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$$1 },
{ type: DateHelperService$$1 }
];
};
NzCalendarHeaderComponent.propDecorators = {
mode: [{ type: i0.Input }],
modeChange: [{ type: i0.Output }],
fullscreen: [{ type: i0.Input }],
activeDate: [{ type: i0.Input }],
yearChange: [{ type: i0.Output }],
monthChange: [{ type: i0.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 i0.EventEmitter();
this.nzPanelChange = new i0.EventEmitter();
this.nzSelectChange = new i0.EventEmitter();
this.nzValueChange = new i0.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 = coercion.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 = !coercion.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: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
selector: 'nz-calendar',
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: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzCalendarComponent; })), multi: true }
]
}] }
];
/** @nocollapse */
NzCalendarComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 }
];
};
NzCalendarComponent.propDecorators = {
nzMode: [{ type: i0.Input }],
nzModeChange: [{ type: i0.Output }],
nzPanelChange: [{ type: i0.Output }],
nzSelectChange: [{ type: i0.Output }],
nzValue: [{ type: i0.Input }],
nzValueChange: [{ type: i0.Output }],
nzDateCell: [{ type: i0.Input }],
nzDateFullCell: [{ type: i0.Input }],
nzMonthCell: [{ type: i0.Input }],
nzMonthFullCell: [{ type: i0.Input }],
nzFullscreen: [{ type: i0.Input }],
nzCard: [{ type: i0.Input }],
dateCellChild: [{ type: i0.ContentChild, args: [NzDateCellDirective, { read: i0.TemplateRef },] }],
dateFullCellChild: [{ type: i0.ContentChild, args: [NzDateFullCellDirective, { read: i0.TemplateRef },] }],
monthCellChild: [{ type: i0.ContentChild, args: [NzMonthCellDirective, { read: i0.TemplateRef },] }],
monthFullCellChild: [{ type: i0.ContentChild, args: [NzMonthFullCellDirective, { read: i0.TemplateRef },] }],
fullscreen: [{ type: i0.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: i0.NgModule, args: [{
declarations: [
NzCalendarHeaderComponent,
NzCalendarComponent,
NzDateCellDirective,
NzDateFullCellDirective,
NzMonthCellDirective,
NzMonthFullCellDirective
],
exports: [
NzCalendarComponent,
NzDateCellDirective,
NzDateFullCellDirective,
NzMonthCellDirective,
NzMonthFullCellDirective
],
imports: [i2$1.CommonModule, forms.FormsModule, NzI18nModule, NzRadioModule, NzSelectModule]
},] }
];
return NzCalendarModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardGridDirective = /** @class */ (function () {
function NzCardGridDirective(elementRef, renderer) {
renderer.addClass(elementRef.nativeElement, 'ant-card-grid');
}
NzCardGridDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-card-grid]'
},] }
];
/** @nocollapse */
NzCardGridDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzCardGridDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardLoadingComponent = /** @class */ (function () {
function NzCardLoadingComponent(elementRef, renderer) {
renderer.addClass(elementRef.nativeElement, 'ant-card-loading-content');
}
NzCardLoadingComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-card-loading',
template: "<div class=\"ant-card-loading-content\">\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-22\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-8\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-15\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-6\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-18\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-13\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-9\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-4\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-3\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-16\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n <div class=\"ant-row\" style=\"margin-left: -4px; margin-right: -4px;\">\n <div class=\"ant-col-8\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-6\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n <div class=\"ant-col-8\" style=\"padding-left: 4px; padding-right: 4px;\">\n <div class=\"ant-card-loading-block\"></div>\n </div>\n </div>\n</div>",
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
styles: ["\n nz-card-loading {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzCardLoadingComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzCardLoadingComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardMetaComponent = /** @class */ (function () {
function NzCardMetaComponent(elementRef, renderer) {
renderer.addClass(elementRef.nativeElement, 'ant-card-meta');
}
NzCardMetaComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-card-meta',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<div class=\"ant-card-meta-avatar\" *ngIf=\"nzAvatar\">\n <ng-template [ngTemplateOutlet]=\"nzAvatar\"></ng-template>\n</div>\n<div class=\"ant-card-meta-detail\" *ngIf=\"nzTitle || nzDescription\">\n <div class=\"ant-card-meta-title\" *ngIf=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n <div class=\"ant-card-meta-description\" *ngIf=\"nzDescription\">\n <ng-container *nzStringTemplateOutlet=\"nzDescription\">{{ nzDescription }}</ng-container>\n </div>\n</div>",
styles: ["\n nz-card-meta {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzCardMetaComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzCardMetaComponent.propDecorators = {
nzTitle: [{ type: i0.Input }],
nzDescription: [{ type: i0.Input }],
nzAvatar: [{ type: i0.Input }]
};
return NzCardMetaComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardTabComponent = /** @class */ (function () {
function NzCardTabComponent() {
}
NzCardTabComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-card-tab',
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>"
}] }
];
NzCardTabComponent.propDecorators = {
template: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }]
};
return NzCardTabComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardComponent = /** @class */ (function () {
function NzCardComponent(renderer, elementRef) {
this.nzBordered = true;
this.nzLoading = false;
this.nzHoverable = false;
this.nzActions = [];
renderer.addClass(elementRef.nativeElement, 'ant-card');
}
NzCardComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-card',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<div class=\"ant-card-head\" *ngIf=\"nzTitle || nzExtra || tab\">\n <div class=\"ant-card-head-wrapper\">\n <div class=\"ant-card-head-title\" *ngIf=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n <div class=\"ant-card-extra\" *ngIf=\"nzExtra\">\n <ng-container *nzStringTemplateOutlet=\"nzExtra\">{{ nzExtra }}</ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"tab\">\n <ng-template [ngTemplateOutlet]=\"tab.template\"></ng-template>\n </ng-container>\n</div>\n<div class=\"ant-card-cover\" *ngIf=\"nzCover\">\n <ng-template [ngTemplateOutlet]=\"nzCover\"></ng-template>\n</div>\n<div class=\"ant-card-body\" [ngStyle]=\"nzBodyStyle\">\n <ng-container *ngIf=\"!nzLoading\">\n <ng-content></ng-content>\n </ng-container>\n <nz-card-loading *ngIf=\"nzLoading\"></nz-card-loading>\n</div>\n<ul class=\"ant-card-actions\" *ngIf=\"nzActions.length\">\n <li *ngFor=\"let action of nzActions\" [style.width.%]=\"100 / nzActions.length\">\n <span><ng-template [ngTemplateOutlet]=\"action\"></ng-template></span>\n </li>\n</ul>",
host: {
'[class.ant-card-loading]': 'nzLoading',
'[class.ant-card-bordered]': 'nzBordered',
'[class.ant-card-hoverable]': 'nzHoverable',
'[class.ant-card-type-inner]': "nzType === 'inner'",
'[class.ant-card-contain-tabs]': '!!tab'
},
styles: ["\n nz-card {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzCardComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzCardComponent.propDecorators = {
nzBordered: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzHoverable: [{ type: i0.Input }],
nzBodyStyle: [{ type: i0.Input }],
nzCover: [{ type: i0.Input }],
nzActions: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzExtra: [{ type: i0.Input }],
tab: [{ type: i0.ContentChild, args: [NzCardTabComponent,] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCardComponent.prototype, "nzBordered", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCardComponent.prototype, "nzLoading", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCardComponent.prototype, "nzHoverable", void 0);
return NzCardComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCardModule = /** @class */ (function () {
function NzCardModule() {
}
NzCardModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, NzAddOnModule],
declarations: [NzCardComponent, NzCardGridDirective, NzCardMetaComponent, NzCardLoadingComponent, NzCardTabComponent],
exports: [NzCardComponent, NzCardGridDirective, NzCardMetaComponent, NzCardLoadingComponent, NzCardTabComponent]
},] }
];
return NzCardModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCarouselContentDirective = /** @class */ (function () {
function NzCarouselContentDirective(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this._active = false;
this._width = 0;
this._fadeMode = false;
this.el = this.elementRef.nativeElement;
renderer.addClass(elementRef.nativeElement, 'slick-slide');
}
Object.defineProperty(NzCarouselContentDirective.prototype, "width", {
get: /**
* @return {?}
*/ function () {
return this._width;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._width = value;
this.renderer.setStyle(this.el, 'width', this.width + "px");
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCarouselContentDirective.prototype, "left", {
get: /**
* @return {?}
*/ function () {
return this._left;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._left = value;
if (isNotNil(this.left)) {
this.renderer.setStyle(this.el, 'left', this.left + "px");
}
else {
this.renderer.removeStyle(this.el, 'left');
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCarouselContentDirective.prototype, "top", {
get: /**
* @return {?}
*/ function () {
return this._top;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._top = value;
if (isNotNil(this.top)) {
this.renderer.setStyle(this.el, 'top', this.top + "px");
}
else {
this.renderer.removeStyle(this.el, 'top');
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCarouselContentDirective.prototype, "isActive", {
get: /**
* @return {?}
*/ function () {
return this._active;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._active = value;
this.updateOpacity();
if (this.isActive) {
this.renderer.addClass(this.el, 'slick-active');
}
else {
this.renderer.removeClass(this.el, 'slick-active');
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCarouselContentDirective.prototype, "fadeMode", {
get: /**
* @return {?}
*/ function () {
return this._fadeMode;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._fadeMode = value;
if (this.fadeMode) {
this.renderer.setStyle(this.el, 'position', 'relative');
}
else {
this.renderer.removeStyle(this.el, 'position');
}
this.updateOpacity();
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzCarouselContentDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.renderer.setStyle(this.el, 'transition', 'opacity 500ms ease');
};
/**
* @private
* @return {?}
*/
NzCarouselContentDirective.prototype.updateOpacity = /**
* @private
* @return {?}
*/
function () {
if (this.fadeMode) {
this.renderer.setStyle(this.el, 'opacity', this.isActive ? 1 : 0);
}
};
NzCarouselContentDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-carousel-content]'
},] }
];
/** @nocollapse */
NzCarouselContentDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzCarouselContentDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCarouselComponent = /** @class */ (function () {
function NzCarouselComponent(elementRef, renderer, cdr, ngZone) {
this.elementRef = elementRef;
this.renderer = renderer;
this.cdr = cdr;
this.ngZone = ngZone;
this.nzTransitionSpeed = 500; // Not exposed.
this.nzEffect = 'scrollx';
this.nzEnableSwipe = true;
this.nzDots = true;
this.nzVertical = false;
this.nzAutoPlay = false;
this.nzAutoPlaySpeed = 3000; // Should be nzAutoPlayDuration, but changing this is breaking.
// Should be nzAutoPlayDuration, but changing this is breaking.
this.nzAfterChange = new i0.EventEmitter();
this.nzBeforeChange = new i0.EventEmitter();
this.activeIndex = 0;
this.transform = 'translate3d(0px, 0px, 0px)';
this.el = this.elementRef.nativeElement;
this.subs_ = new rxjs.Subscription();
renderer.addClass(elementRef.nativeElement, 'ant-carousel');
}
Object.defineProperty(NzCarouselComponent.prototype, "nextIndex", {
get: /**
* @return {?}
*/ function () {
return this.activeIndex < this.slideContents.length - 1 ? (this.activeIndex + 1) : 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCarouselComponent.prototype, "prevIndex", {
get: /**
* @return {?}
*/ function () {
return this.activeIndex > 0 ? (this.activeIndex - 1) : (this.slideContents.length - 1);
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzCarouselComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
if (this.slideContents && this.slideContents.length) {
this.slideContents.first.isActive = true;
}
};
/**
* @return {?}
*/
NzCarouselComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
// Re-render when content changes.
this.subs_.add(this.slideContents.changes.subscribe(( /**
* @return {?}
*/function () {
_this.renderContent();
})));
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
_this.subs_.add(rxjs.fromEvent(window, 'resize').pipe(operators.debounceTime(50)).subscribe(( /**
* @return {?}
*/function () {
_this.renderContent();
_this.setTransition();
})));
}));
// When used in modals (drawers maybe too), it should render itself asynchronously.
// Refer to https://github.com/NG-ZORRO/ng-zorro-antd/issues/2387
Promise.resolve().then(( /**
* @return {?}
*/function () {
_this.renderContent();
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzCarouselComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzAutoPlay || changes.nzAutoPlaySpeed) {
this.setUpNextScroll();
}
if (changes.nzEffect) {
this.updateMode();
}
};
/**
* @return {?}
*/
NzCarouselComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.subs_.unsubscribe();
this.clearTimeout();
};
/**
* @param {?} index
* @return {?}
*/
NzCarouselComponent.prototype.setContentActive = /**
* @param {?} index
* @return {?}
*/
function (index) {
var _this = this;
if (this.slideContents && this.slideContents.length) {
this.nzBeforeChange.emit({ from: this.slideContents.toArray().findIndex(( /**
* @param {?} slide
* @return {?}
*/function (slide) { return slide.isActive; })), to: index });
this.activeIndex = index;
this.setTransition();
this.slideContents.forEach(( /**
* @param {?} slide
* @param {?} i
* @return {?}
*/function (slide, i) { return slide.isActive = index === i; }));
this.setUpNextScroll();
this.cdr.markForCheck();
// Should trigger the following when animation is done. The transition takes 0.5 seconds according to the CSS.
setTimeout(( /**
* @return {?}
*/function () { return _this.nzAfterChange.emit(index); }), this.nzTransitionSpeed);
}
};
/**
* @private
* @return {?}
*/
NzCarouselComponent.prototype.setTransition = /**
* @private
* @return {?}
*/
function () {
this.transform = this.nzEffect === 'fade'
? 'translate3d(0px, 0px, 0px)'
: this.nzVertical
// `Scrollx` mode.
? "translate3d(0px, " + -this.activeIndex * this.el.offsetHeight + "px, 0px)"
: "translate3d(" + -this.activeIndex * this.el.offsetWidth + "px, 0px, 0px)";
if (this.slickTrack) {
this.renderer.setStyle(this.slickTrack.nativeElement, 'transform', this.transform);
}
};
/**
* @return {?}
*/
NzCarouselComponent.prototype.next = /**
* @return {?}
*/
function () {
this.setContentActive(this.nextIndex);
};
/**
* @return {?}
*/
NzCarouselComponent.prototype.pre = /**
* @return {?}
*/
function () {
this.setContentActive(this.prevIndex);
};
/**
* @param {?} index
* @return {?}
*/
NzCarouselComponent.prototype.goTo = /**
* @param {?} index
* @return {?}
*/
function (index) {
if (index >= 0 && index <= this.slideContents.length - 1) {
this.setContentActive(index);
}
};
/**
* @param {?} e
* @return {?}
*/
NzCarouselComponent.prototype.onKeyDown = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (e.keyCode === keycodes.LEFT_ARROW) { // Left
this.pre();
e.preventDefault();
}
else if (e.keyCode === keycodes.RIGHT_ARROW) { // Right
this.next();
e.preventDefault();
}
};
/**
* @param {?=} action
* @return {?}
*/
NzCarouselComponent.prototype.swipe = /**
* @param {?=} action
* @return {?}
*/
function (action) {
if (action === void 0) {
action = 'swipeleft';
}
if (!this.nzEnableSwipe) {
return;
}
if (action === 'swipeleft') {
this.next();
}
if (action === 'swiperight') {
this.pre();
}
};
/* tslint:disable-next-line:no-any */
/* tslint:disable-next-line:no-any */
/**
* @param {?} e
* @return {?}
*/
NzCarouselComponent.prototype.swipeInProgress = /* tslint:disable-next-line:no-any */
/**
* @param {?} e
* @return {?}
*/
function (e) {
if (this.nzEffect === 'scrollx') {
/** @type {?} */
var final = e.isFinal;
/** @type {?} */
var scrollWidth = final ? 0 : e.deltaX * 1.2;
/** @type {?} */
var totalWidth = this.el.offsetWidth;
if (this.nzVertical) {
/** @type {?} */
var totalHeight = this.el.offsetHeight;
/** @type {?} */
var scrollPercent = scrollWidth / totalWidth;
/** @type {?} */
var scrollHeight = scrollPercent * totalHeight;
this.transform = "translate3d(0px, " + (-this.activeIndex * totalHeight + scrollHeight) + "px, 0px)";
}
else {
this.transform = "translate3d(" + (-this.activeIndex * totalWidth + scrollWidth) + "px, 0px, 0px)";
}
if (this.slickTrack) {
this.renderer.setStyle(this.slickTrack.nativeElement, 'transform', this.transform);
}
}
if (e.isFinal) {
this.setUpNextScroll();
}
else {
this.clearTimeout();
}
};
/**
* @return {?}
*/
NzCarouselComponent.prototype.clearTimeout = /**
* @return {?}
*/
function () {
if (this.transitionAction) {
clearTimeout(this.transitionAction);
this.transitionAction = null;
}
};
/**
* Make a carousel scroll to `this.nextIndex` after `this.nzAutoPlaySpeed` milliseconds.
*/
/**
* Make a carousel scroll to `this.nextIndex` after `this.nzAutoPlaySpeed` milliseconds.
* @private
* @return {?}
*/
NzCarouselComponent.prototype.setUpNextScroll = /**
* Make a carousel scroll to `this.nextIndex` after `this.nzAutoPlaySpeed` milliseconds.
* @private
* @return {?}
*/
function () {
var _this = this;
this.clearTimeout();
if (this.nzAutoPlay && this.nzAutoPlaySpeed > 0) {
this.transitionAction = setTimeout(( /**
* @return {?}
*/function () {
_this.setContentActive(_this.nextIndex);
}), this.nzAutoPlaySpeed);
}
};
/**
* @private
* @return {?}
*/
NzCarouselComponent.prototype.updateMode = /**
* @private
* @return {?}
*/
function () {
if (this.slideContents && this.slideContents.length) {
this.renderContent();
this.setContentActive(0);
}
};
/**
* @private
* @return {?}
*/
NzCarouselComponent.prototype.renderContent = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var slickTrackElement = this.slickTrack.nativeElement;
/** @type {?} */
var slickListElement = this.slickList.nativeElement;
if (this.slideContents && this.slideContents.length) {
this.slideContents.forEach(( /**
* @param {?} content
* @param {?} i
* @return {?}
*/function (content, i) {
content.width = _this.el.offsetWidth;
if (_this.nzEffect === 'fade') {
content.fadeMode = true;
if (_this.nzVertical) {
content.top = -i * _this.el.offsetHeight;
}
else {
content.left = -i * content.width;
}
}
else {
content.fadeMode = false;
content.left = null;
content.top = null;
}
}));
if (this.nzVertical) {
this.renderer.removeStyle(slickTrackElement, 'width');
this.renderer.removeStyle(slickListElement, 'width');
this.renderer.setStyle(slickListElement, 'height', this.slideContents.first.el.offsetHeight + "px");
this.renderer.setStyle(slickTrackElement, 'height', this.slideContents.length * this.el.offsetHeight + "px");
}
else {
this.renderer.removeStyle(slickTrackElement, 'height');
this.renderer.removeStyle(slickListElement, 'height');
this.renderer.removeStyle(slickTrackElement, 'width'); // This is necessary to prevent carousel items to overflow.
this.renderer.setStyle(slickTrackElement, 'width', this.slideContents.length * this.el.offsetWidth + "px");
}
this.setUpNextScroll();
this.cdr.markForCheck();
}
};
NzCarouselComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-carousel',
preserveWhitespaces: false,
template: "<div class=\"slick-initialized slick-slider\" [class.slick-vertical]=\"nzVertical\">\n <div\n class=\"slick-list\"\n #slickList\n tabindex=\"-1\"\n (keydown)=\"onKeyDown($event)\"\n (swipeleft)=\"swipe('swipeleft')\"\n (swiperight)=\"swipe('swiperight')\"\n (pan)=\"swipeInProgress($event);\">\n <div class=\"slick-track\" #slickTrack>\n <ng-content></ng-content>\n </div>\n </div>\n <ul class=\"slick-dots\" *ngIf=\"nzDots\">\n <li *ngFor=\"let content of slideContents; let i = index\" [class.slick-active]=\"content.isActive\" (click)=\"goTo(i)\">\n <ng-template [ngTemplateOutlet]=\"nzDotRender || renderDotTemplate\" [ngTemplateOutletContext]=\"{ $implicit: i }\"></ng-template>\n </li>\n </ul>\n</div>\n\n<ng-template #renderDotTemplate let-index>\n <button>{{index + 1}}</button>\n</ng-template>\n",
host: {
'[class.ant-carousel-vertical]': 'nzVertical'
},
styles: ["\n nz-carousel {\n display: block;\n position: relative;\n overflow: hidden;\n width: 100%;\n height: 100%;\n }\n\n .slick-dots {\n display: block;\n }\n\n .slick-track {\n opacity: 1;\n transition: all 0.5s ease;\n }\n\n .slick-slide {\n transition: opacity 500ms ease;\n }\n "]
}] }
];
/** @nocollapse */
NzCarouselComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef },
{ type: i0.NgZone }
];
};
NzCarouselComponent.propDecorators = {
slideContents: [{ type: i0.ContentChildren, args: [NzCarouselContentDirective,] }],
slickList: [{ type: i0.ViewChild, args: ['slickList',] }],
slickTrack: [{ type: i0.ViewChild, args: ['slickTrack',] }],
nzTransitionSpeed: [{ type: i0.Input }],
nzDotRender: [{ type: i0.Input }],
nzEffect: [{ type: i0.Input }],
nzEnableSwipe: [{ type: i0.Input }],
nzDots: [{ type: i0.Input }],
nzVertical: [{ type: i0.Input }],
nzAutoPlay: [{ type: i0.Input }],
nzAutoPlaySpeed: [{ type: i0.Input }],
nzAfterChange: [{ type: i0.Output }],
nzBeforeChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCarouselComponent.prototype, "nzEnableSwipe", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzCarouselComponent.prototype, "nzDots", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzCarouselComponent.prototype, "nzVertical", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCarouselComponent.prototype, "nzAutoPlay", void 0);
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzCarouselComponent.prototype, "nzAutoPlaySpeed", void 0);
return NzCarouselComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCarouselModule = /** @class */ (function () {
function NzCarouselModule() {
}
NzCarouselModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzCarouselComponent, NzCarouselContentDirective],
exports: [NzCarouselComponent, NzCarouselContentDirective],
imports: [i2$1.CommonModule]
},] }
];
return NzCarouselModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzAutoResizeDirective = /** @class */ (function () {
function NzAutoResizeDirective(elementRef, ngZone, ngControl, platform$$1) {
this.elementRef = elementRef;
this.ngZone = ngZone;
this.ngControl = ngControl;
this.platform = platform$$1;
this._autosize = false;
this.el = this.elementRef.nativeElement;
this.destroy$ = new rxjs.Subject();
this.inputGap = 10;
}
Object.defineProperty(NzAutoResizeDirective.prototype, "nzAutosize", {
get: /**
* @return {?}
*/ function () {
return this._autosize;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (typeof value === 'string') {
this._autosize = true;
}
else if (typeof value !== 'boolean') {
this._autosize = value;
this.minRows = value.minRows;
this.maxRows = value.maxRows;
this.setMaxHeight();
this.setMinHeight();
}
},
enumerable: true,
configurable: true
});
/**
* @param {?=} force
* @return {?}
*/
NzAutoResizeDirective.prototype.resizeToFitContent = /**
* @param {?=} force
* @return {?}
*/
function (force) {
var _this = this;
if (force === void 0) {
force = false;
}
this.cacheTextareaLineHeight();
// If we haven't determined the line-height yet, we know we're still hidden and there's no point
// in checking the height of the textarea.
if (!this.cachedLineHeight) {
return;
}
/** @type {?} */
var textarea = ( /** @type {?} */(this.el));
/** @type {?} */
var value = textarea.value;
// Only resize if the value or minRows have changed since these calculations can be expensive.
if (!force && this.minRows === this.previousMinRows && value === this.previousValue) {
return;
}
/** @type {?} */
var placeholderText = textarea.placeholder;
// Reset the textarea height to auto in order to shrink back to its default size.
// Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.
// Long placeholders that are wider than the textarea width may lead to a bigger scrollHeight
// value. To ensure that the scrollHeight is not bigger than the content, the placeholders
// need to be removed temporarily.
textarea.classList.add('cdk-textarea-autosize-measuring');
textarea.placeholder = '';
/** @type {?} */
var height = Math.round((textarea.scrollHeight - this.inputGap) / this.cachedLineHeight) * this.cachedLineHeight + this.inputGap;
// Use the scrollHeight to know how large the textarea *would* be if fit its entire value.
textarea.style.height = height + "px";
textarea.classList.remove('cdk-textarea-autosize-measuring');
textarea.placeholder = placeholderText;
// On Firefox resizing the textarea will prevent it from scrolling to the caret position.
// We need to re-set the selection in order for it to scroll to the proper position.
if (typeof requestAnimationFrame !== 'undefined') {
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
return requestAnimationFrame(( /**
* @return {?}
*/function () {
var selectionStart = textarea.selectionStart, selectionEnd = textarea.selectionEnd;
// IE will throw an "Unspecified error" if we try to set the selection range after the
// element has been removed from the DOM. Assert that the directive hasn't been destroyed
// between the time we requested the animation frame and when it was executed.
// Also note that we have to assert that the textarea is focused before we set the
// selection range. Setting the selection range on a non-focused textarea will cause
// it to receive focus on IE and Edge.
if (!_this.destroy$.isStopped && document.activeElement === textarea) {
textarea.setSelectionRange(selectionStart, selectionEnd);
}
}));
}));
}
this.previousValue = value;
this.previousMinRows = this.minRows;
};
/**
* @private
* @return {?}
*/
NzAutoResizeDirective.prototype.cacheTextareaLineHeight = /**
* @private
* @return {?}
*/
function () {
if (this.cachedLineHeight) {
return;
}
// Use a clone element because we have to override some styles.
/** @type {?} */
var textareaClone = ( /** @type {?} */(this.el.cloneNode(false)));
textareaClone.rows = 1;
// Use `position: absolute` so that this doesn't cause a browser layout and use
// `visibility: hidden` so that nothing is rendered. Clear any other styles that
// would affect the height.
textareaClone.style.position = 'absolute';
textareaClone.style.visibility = 'hidden';
textareaClone.style.border = 'none';
textareaClone.style.padding = '0';
textareaClone.style.height = '';
textareaClone.style.minHeight = '';
textareaClone.style.maxHeight = '';
// In Firefox it happens that textarea elements are always bigger than the specified amount
// of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.
// As a workaround that removes the extra space for the scrollbar, we can just set overflow
// to hidden. This ensures that there is no invalid calculation of the line height.
// See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654
textareaClone.style.overflow = 'hidden';
this.el.parentNode.appendChild(textareaClone);
this.cachedLineHeight = textareaClone.clientHeight - this.inputGap - 1;
this.el.parentNode.removeChild(textareaClone);
// Min and max heights have to be re-calculated if the cached line height changes
this.setMinHeight();
this.setMaxHeight();
};
/**
* @return {?}
*/
NzAutoResizeDirective.prototype.setMinHeight = /**
* @return {?}
*/
function () {
/** @type {?} */
var minHeight = this.minRows && this.cachedLineHeight ?
this.minRows * this.cachedLineHeight + this.inputGap + "px" : null;
if (minHeight) {
this.el.style.minHeight = minHeight;
}
};
/**
* @return {?}
*/
NzAutoResizeDirective.prototype.setMaxHeight = /**
* @return {?}
*/
function () {
/** @type {?} */
var maxHeight = this.maxRows && this.cachedLineHeight ?
this.maxRows * this.cachedLineHeight + this.inputGap + "px" : null;
if (maxHeight) {
this.el.style.maxHeight = maxHeight;
}
};
/**
* @return {?}
*/
NzAutoResizeDirective.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.nzAutosize && this.platform.isBrowser) {
if (this.ngControl) {
this.resizeToFitContent();
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
rxjs.fromEvent(window, 'resize')
.pipe(operators.auditTime(16), operators.takeUntil(_this.destroy$))
.subscribe(( /**
* @return {?}
*/function () { return _this.resizeToFitContent(true); }));
}));
this.ngControl.control.valueChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () { return _this.resizeToFitContent(); }));
}
else {
console.warn('nzAutosize must work with ngModel or ReactiveForm');
}
}
};
/**
* @return {?}
*/
NzAutoResizeDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzAutoResizeDirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'textarea[nzAutosize]',
host: {
// Textarea elements that have the directive applied should have a single row by default.
// Browsers normally show two rows by default and therefore this limits the minRows binding.
rows: '1'
}
},] }
];
/** @nocollapse */
NzAutoResizeDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.NgZone },
{ type: forms.NgControl, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
{ type: platform.Platform }
];
};
NzAutoResizeDirective.propDecorators = {
nzAutosize: [{ type: i0.Input }]
};
return NzAutoResizeDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzInputDirective = /** @class */ (function () {
function NzInputDirective(ngControl, renderer, elementRef) {
this.ngControl = ngControl;
this._disabled = false;
this.nzSize = 'default';
renderer.addClass(elementRef.nativeElement, 'ant-input');
}
Object.defineProperty(NzInputDirective.prototype, "disabled", {
get: /**
* @return {?}
*/ function () {
if (this.ngControl && this.ngControl.disabled !== null) {
return this.ngControl.disabled;
}
return this._disabled;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._disabled = toBoolean(value);
},
enumerable: true,
configurable: true
});
NzInputDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-input]',
host: {
'[class.ant-input-disabled]': 'disabled',
'[class.ant-input-lg]': "nzSize === 'large'",
'[class.ant-input-sm]': "nzSize === 'small'"
}
},] }
];
/** @nocollapse */
NzInputDirective.ctorParameters = function () {
return [
{ type: forms.NgControl, decorators: [{ type: i0.Optional }, { type: i0.Self }] },
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzInputDirective.propDecorators = {
nzSize: [{ type: i0.Input }],
disabled: [{ type: i0.Input }]
};
return NzInputDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzInputGroupComponent = /** @class */ (function () {
function NzInputGroupComponent() {
this._size = 'default';
this.nzSearch = false;
this.nzCompact = false;
}
Object.defineProperty(NzInputGroupComponent.prototype, "nzSize", {
get: /**
* @return {?}
*/ function () {
return this._size;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._size = value;
this.updateChildrenInputSize();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isLarge", {
get: /**
* @return {?}
*/ function () {
return this.nzSize === 'large';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isSmall", {
get: /**
* @return {?}
*/ function () {
return this.nzSize === 'small';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isAffix", {
get: /**
* @return {?}
*/ function () {
return (!!(this.nzSuffix || this.nzPrefix || this.nzPrefixIcon || this.nzSuffixIcon));
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isAddOn", {
get: /**
* @return {?}
*/ function () {
return !!(this.nzAddOnAfter || this.nzAddOnBefore || this.nzAddOnAfterIcon || this.nzAddOnBeforeIcon);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isAffixWrapper", {
get: /**
* @return {?}
*/ function () {
return this.isAffix && !this.isAddOn;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isGroup", {
get: /**
* @return {?}
*/ function () {
return (!this.isAffix) && (!this.isAddOn);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isLargeGroup", {
get: /**
* @return {?}
*/ function () {
return this.isGroup && this.isLarge;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isLargeGroupWrapper", {
get: /**
* @return {?}
*/ function () {
return this.isAddOn && this.isLarge;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isLargeAffix", {
get: /**
* @return {?}
*/ function () {
return this.isAffixWrapper && this.isLarge;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isLargeSearch", {
get: /**
* @return {?}
*/ function () {
return this.nzSearch && this.isLarge;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isSmallGroup", {
get: /**
* @return {?}
*/ function () {
return this.isGroup && this.isSmall;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isSmallAffix", {
get: /**
* @return {?}
*/ function () {
return this.isAffixWrapper && this.isSmall;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isSmallGroupWrapper", {
get: /**
* @return {?}
*/ function () {
return this.isAddOn && this.isSmall;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzInputGroupComponent.prototype, "isSmallSearch", {
get: /**
* @return {?}
*/ function () {
return this.nzSearch && this.isSmall;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzInputGroupComponent.prototype.updateChildrenInputSize = /**
* @return {?}
*/
function () {
var _this = this;
if (this.listOfNzInputDirective) {
this.listOfNzInputDirective.forEach(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.nzSize = _this.nzSize; }));
}
};
/**
* @return {?}
*/
NzInputGroupComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
this.updateChildrenInputSize();
};
NzInputGroupComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-input-group',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<span class=\"ant-input-wrapper ant-input-group\" *ngIf=\"isAddOn\">\n <span class=\"ant-input-group-addon\" *ngIf=\"nzAddOnBefore || nzAddOnBeforeIcon\">\n <i nz-icon [type]=\"nzAddOnBeforeIcon\" *ngIf=\"nzAddOnBeforeIcon\"></i>\n <ng-container *nzStringTemplateOutlet=\"nzAddOnBefore\">{{ nzAddOnBefore }}</ng-container>\n </span>\n <ng-template [ngIf]=\"!isAffix\" *ngTemplateOutlet=\"contentTemplate\"></ng-template>\n <span class=\"ant-input-affix-wrapper\" [class.ant-input-affix-wrapper-sm]=\"isSmall\" [class.ant-input-affix-wrapper-lg]=\"isLarge\" *ngIf=\"isAffix\">\n <ng-template *ngTemplateOutlet=\"affixTemplate\"></ng-template>\n </span>\n <span class=\"ant-input-group-addon\" *ngIf=\"nzAddOnAfter || nzAddOnAfterIcon\">\n <i nz-icon [type]=\"nzAddOnAfterIcon\" *ngIf=\"nzAddOnAfterIcon\"></i>\n <ng-container *nzStringTemplateOutlet=\"nzAddOnAfter\">{{ nzAddOnAfter }}</ng-container>\n </span>\n</span>\n<ng-container *ngIf=\"isAffix && !isAddOn\">\n <ng-template *ngTemplateOutlet=\"affixTemplate\"></ng-template>\n</ng-container>\n<ng-template #affixTemplate>\n <span class=\"ant-input-prefix\" *ngIf=\"nzPrefix || nzPrefixIcon\">\n <!-- TODO: should have a class to set its color, cc: antd-->\n <i nz-icon [type]=\"nzPrefixIcon\" *ngIf=\"nzPrefixIcon\" style=\"color: rgba(0, 0, 0, 0.25)\"></i>\n <ng-container *nzStringTemplateOutlet=\"nzPrefix\">{{ nzPrefix }}</ng-container>\n </span>\n <ng-template *ngTemplateOutlet=\"contentTemplate\"></ng-template>\n <span class=\"ant-input-suffix\" *ngIf=\"nzSuffix || nzSuffixIcon\">\n <i nz-icon [type]=\"nzSuffixIcon\" *ngIf=\"nzSuffixIcon\"></i>\n <ng-container *nzStringTemplateOutlet=\"nzSuffix\">{{ nzSuffix }}</ng-container>\n </span>\n</ng-template>\n<ng-template [ngIf]=\"isGroup\" *ngTemplateOutlet=\"contentTemplate\"></ng-template>\n<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>",
host: {
'[class.ant-input-group-compact]': 'nzCompact',
'[class.ant-input-search-enter-button]': 'nzSearch',
'[class.ant-input-search]': 'nzSearch',
'[class.ant-input-search-sm]': 'isSmallSearch',
'[class.ant-input-affix-wrapper]': 'isAffixWrapper',
'[class.ant-input-group-wrapper]': 'isAddOn',
'[class.ant-input-group]': 'isGroup',
'[class.ant-input-group-lg]': 'isLargeGroup',
'[class.ant-input-group-wrapper-lg]': 'isLargeGroupWrapper',
'[class.ant-input-affix-wrapper-lg]': 'isLargeAffix',
'[class.ant-input-search-lg]': 'isLargeSearch',
'[class.ant-input-group-sm]': 'isSmallGroup',
'[class.ant-input-affix-wrapper-sm]': 'isSmallAffix',
'[class.ant-input-group-wrapper-sm]': 'isSmallGroupWrapper'
}
}] }
];
NzInputGroupComponent.propDecorators = {
listOfNzInputDirective: [{ type: i0.ContentChildren, args: [NzInputDirective,] }],
nzAddOnBeforeIcon: [{ type: i0.Input }],
nzAddOnAfterIcon: [{ type: i0.Input }],
nzPrefixIcon: [{ type: i0.Input }],
nzSuffixIcon: [{ type: i0.Input }],
nzAddOnBefore: [{ type: i0.Input }],
nzAddOnAfter: [{ type: i0.Input }],
nzPrefix: [{ type: i0.Input }],
nzSuffix: [{ type: i0.Input }],
nzSearch: [{ type: i0.Input }],
nzCompact: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzInputGroupComponent.prototype, "nzSearch", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzInputGroupComponent.prototype, "nzCompact", void 0);
return NzInputGroupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzInputModule = /** @class */ (function () {
function NzInputModule() {
}
NzInputModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzInputDirective, NzInputGroupComponent, NzAutoResizeDirective],
exports: [NzInputDirective, NzInputGroupComponent, NzAutoResizeDirective],
imports: [i2$1.CommonModule, forms.FormsModule, NzIconModule, platform.PlatformModule, NzAddOnModule]
},] }
];
return NzInputModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCascaderOptionComponent = /** @class */ (function () {
function NzCascaderOptionComponent(sanitizer, cdr, elementRef, renderer) {
this.sanitizer = sanitizer;
this.cdr = cdr;
this.activated = false;
this.nzLabelProperty = 'label';
renderer.addClass(elementRef.nativeElement, 'ant-cascader-menu-item');
}
/**
* @return {?}
*/
NzCascaderOptionComponent.prototype.getOptionLabel = /**
* @return {?}
*/
function () {
return this.option ? this.option[this.nzLabelProperty] : '';
};
/**
* @param {?} str
* @return {?}
*/
NzCascaderOptionComponent.prototype.renderHighlightString = /**
* @param {?} str
* @return {?}
*/
function (str) {
/** @type {?} */
var safeHtml = this.sanitizer.sanitize(i0.SecurityContext.HTML, "<span class=\"ant-cascader-menu-item-keyword\">" + this.highlightText + "</span>");
if (!safeHtml) {
throw new Error("[NG-ZORRO] Input value \"" + this.highlightText + "\" is not considered security.");
}
return str.replace(new RegExp(this.highlightText, 'g'), safeHtml);
};
/**
* @return {?}
*/
NzCascaderOptionComponent.prototype.markForCheck = /**
* @return {?}
*/
function () {
this.cdr.markForCheck();
};
NzCascaderOptionComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: '[nz-cascader-option]',
template: "<ng-container *ngIf=\"highlightText\"><span [innerHTML]=\"renderHighlightString(getOptionLabel())\"></span></ng-container>\n<ng-container *ngIf=\"!highlightText\">{{ getOptionLabel() }}</ng-container>\n<span *ngIf=\"!option.isLeaf || option.children && option.children.length || option.loading\" class=\"ant-cascader-menu-item-expand-icon\">\n <i nz-icon [type]=\"option.loading ? 'loading' : 'right'\"></i>\n</span>",
host: {
'[attr.title]': 'option.title || getOptionLabel()',
'[class.ant-cascader-menu-item-active]': 'activated',
'[class.ant-cascader-menu-item-expand]': '!option.isLeaf',
'[class.ant-cascader-menu-item-disabled]': 'option.disabled'
}
}] }
];
/** @nocollapse */
NzCascaderOptionComponent.ctorParameters = function () {
return [
{ type: i2.DomSanitizer },
{ type: i0.ChangeDetectorRef },
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzCascaderOptionComponent.propDecorators = {
option: [{ type: i0.Input }],
activated: [{ type: i0.Input }],
highlightText: [{ type: i0.Input }],
nzLabelProperty: [{ type: i0.Input }]
};
return NzCascaderOptionComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var POSITION_MAP = {
'top': new i2$2.ConnectionPositionPair({ originX: 'center', originY: 'top' }, { overlayX: 'center', overlayY: 'bottom' }),
'topCenter': new i2$2.ConnectionPositionPair({ originX: 'center', originY: 'top' }, { overlayX: 'center', overlayY: 'bottom' }),
'topLeft': new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
'topRight': new i2$2.ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'end', overlayY: 'bottom' }),
'right': new i2$2.ConnectionPositionPair({ originX: 'end', originY: 'center' }, { overlayX: 'start', overlayY: 'center' }),
'rightTop': new i2$2.ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'start', overlayY: 'top' }),
'rightBottom': new i2$2.ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'start', overlayY: 'bottom' }),
'bottom': new i2$2.ConnectionPositionPair({ originX: 'center', originY: 'bottom' }, { overlayX: 'center', overlayY: 'top' }),
'bottomCenter': new i2$2.ConnectionPositionPair({ originX: 'center', originY: 'bottom' }, { overlayX: 'center', overlayY: 'top' }),
'bottomLeft': new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
'bottomRight': new i2$2.ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'end', overlayY: 'top' }),
'left': new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'center' }, { overlayX: 'end', overlayY: 'center' }),
'leftTop': new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'end', overlayY: 'top' }),
'leftBottom': new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'end', overlayY: 'bottom' })
};
/** @type {?} */
var DEFAULT_TOOLTIP_POSITIONS = [POSITION_MAP.top, POSITION_MAP.right, POSITION_MAP.bottom, POSITION_MAP.left];
/** @type {?} */
var DEFAULT_DROPDOWN_POSITIONS = [POSITION_MAP.bottomLeft, POSITION_MAP.topLeft];
/** @type {?} */
var DEFAULT_SUBMENU_POSITIONS = [POSITION_MAP.rightTop, POSITION_MAP.leftTop];
/** @type {?} */
var DEFAULT_CASCADER_POSITIONS = [POSITION_MAP.bottomLeft, POSITION_MAP.bottomRight, POSITION_MAP.topLeft, POSITION_MAP.topRight];
/** @type {?} */
var DEFAULT_MENTION_POSITIONS = [POSITION_MAP.bottomLeft, new i2$2.ConnectionPositionPair({
originX: 'start',
originY: 'bottom'
}, { overlayX: 'start', overlayY: 'bottom' })];
/**
* @param {?} position
* @return {?}
*/
function getPlacementName(position) {
/** @type {?} */
var keyList = ['originX', 'originY', 'overlayX', 'overlayY'];
var _loop_1 = function (placement) {
if (keyList.every(( /**
* @param {?} key
* @return {?}
*/function (key) { return position.connectionPair[key] === POSITION_MAP[placement][key]; }))) {
return { value: placement };
}
};
for (var placement in POSITION_MAP) {
var state_1 = _loop_1(placement);
if (typeof state_1 === "object")
return state_1.value;
}
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @template T
* @param {?} value
* @return {?}
*/
function toArray(value) {
/** @type {?} */
var ret;
if (value == null) {
ret = [];
}
else if (!Array.isArray(value)) {
ret = [value];
}
else {
ret = value;
}
return ret;
}
/**
* @template T
* @param {?} array1
* @param {?} array2
* @return {?}
*/
function arraysEqual(array1, array2) {
if (!array1 || !array2 || array1.length !== array2.length) {
return false;
}
/** @type {?} */
var len = array1.length;
for (var i = 0; i < len; i++) {
if (array1[i] !== array2[i]) {
return false;
}
}
return true;
}
/**
* @template T
* @param {?} source
* @return {?}
*/
function shallowCopyArray(source) {
return source.slice();
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var defaultDisplayRender = ( /**
* @param {?} label
* @return {?}
*/function (label) { return label.join(' / '); });
var NzCascaderComponent = /** @class */ (function () {
function NzCascaderComponent(elementRef, cdr, renderer, noAnimation) {
this.elementRef = elementRef;
this.cdr = cdr;
this.noAnimation = noAnimation;
this.nzShowInput = true;
this.nzShowArrow = true;
this.nzAllowClear = true;
this.nzAutoFocus = false;
this.nzChangeOnSelect = false;
this.nzDisabled = false;
this.nzExpandTrigger = 'click';
this.nzValueProperty = 'value';
this.nzLabelProperty = 'label';
this.nzSize = 'default';
this.nzPlaceHolder = 'Please select';
this.nzMouseEnterDelay = 150; // ms
// ms
this.nzMouseLeaveDelay = 150; // ms
// ms
this.nzTriggerAction = ( /** @type {?} */(['click']));
this.nzSelectionChange = new i0.EventEmitter();
this.nzSelect = new i0.EventEmitter();
this.nzClear = new i0.EventEmitter();
this.nzVisibleChange = new i0.EventEmitter(); // Not exposed, only for test
// Not exposed, only for test
this.nzChange = new i0.EventEmitter(); // Not exposed, only for test
// Not exposed, only for test
this.el = this.elementRef.nativeElement;
this.dropDownPosition = 'bottom';
this.menuVisible = false;
this.isLoading = false;
this.labelRenderContext = {};
this.columns = [];
this.onChange = Function.prototype;
this.onTouched = Function.prototype;
this.positions = __spread(DEFAULT_CASCADER_POSITIONS);
this.isSearching = false;
this.isFocused = false;
this.isOpening = false;
this.selectedOptions = [];
this.activatedOptions = [];
this._inputValue = '';
renderer.addClass(elementRef.nativeElement, 'ant-cascader');
renderer.addClass(elementRef.nativeElement, 'ant-cascader-picker');
}
Object.defineProperty(NzCascaderComponent.prototype, "nzOptions", {
get: /**
* @return {?}
*/ function () {
return this.columns[0];
},
set: /**
* @param {?} options
* @return {?}
*/ function (options) {
this.columnsSnapshot = this.columns = options && options.length ? [options] : [];
if (!this.isSearching) {
if (this.defaultValue && this.columns.length) {
this.initOptions(0);
}
}
else {
this.prepareSearchValue();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCascaderComponent.prototype, "inputValue", {
get: /**
* @return {?}
*/ function () {
return this._inputValue;
},
set: /**
* @param {?} inputValue
* @return {?}
*/ function (inputValue) {
this._inputValue = inputValue;
this.toggleSearchMode();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCascaderComponent.prototype, "menuCls", {
get: /**
* @return {?}
*/ function () {
var _a;
return _a = {},
_a["" + this.nzMenuClassName] = !!this.nzMenuClassName,
_a;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCascaderComponent.prototype, "menuColumnCls", {
get: /**
* @return {?}
*/ function () {
var _a;
return _a = {},
_a["" + this.nzColumnClassName] = !!this.nzColumnClassName,
_a;
},
enumerable: true,
configurable: true
});
//#region Menu
//#region Menu
/**
* @param {?} visible
* @param {?} delay
* @param {?=} setOpening
* @return {?}
*/
NzCascaderComponent.prototype.delaySetMenuVisible =
//#region Menu
/**
* @param {?} visible
* @param {?} delay
* @param {?=} setOpening
* @return {?}
*/
function (visible, delay, setOpening) {
var _this = this;
if (setOpening === void 0) {
setOpening = false;
}
this.clearDelayMenuTimer();
if (delay) {
if (visible && setOpening) {
this.isOpening = true;
}
this.delayMenuTimer = setTimeout(( /**
* @return {?}
*/function () {
_this.setMenuVisible(visible);
_this.cdr.detectChanges();
_this.clearDelayMenuTimer();
if (visible) {
setTimeout(( /**
* @return {?}
*/function () {
_this.isOpening = false;
}), 100);
}
}), delay);
}
else {
this.setMenuVisible(visible);
}
};
/**
* @param {?} visible
* @return {?}
*/
NzCascaderComponent.prototype.setMenuVisible = /**
* @param {?} visible
* @return {?}
*/
function (visible) {
if (this.nzDisabled) {
return;
}
if (this.menuVisible !== visible) {
this.menuVisible = visible;
this.cdr.detectChanges();
if (visible) {
this.loadRootOptions();
}
this.nzVisibleChange.emit(visible);
}
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.clearDelayMenuTimer = /**
* @private
* @return {?}
*/
function () {
if (this.delayMenuTimer) {
clearTimeout(this.delayMenuTimer);
this.delayMenuTimer = null;
}
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.loadRootOptions = /**
* @private
* @return {?}
*/
function () {
if (!this.columns.length) {
/** @type {?} */
var root = {};
this.loadChildrenAsync(root, -1);
}
};
//#endregion
//#region Init
//#endregion
//#region Init
/**
* @private
* @param {?} index
* @return {?}
*/
NzCascaderComponent.prototype.isLoaded =
//#endregion
//#region Init
/**
* @private
* @param {?} index
* @return {?}
*/
function (index) {
return this.columns[index] && this.columns[index].length > 0;
};
/**
* @private
* @param {?} option
* @param {?} index
* @return {?}
*/
NzCascaderComponent.prototype.findOption = /**
* @private
* @param {?} option
* @param {?} index
* @return {?}
*/
function (option, index) {
var _this = this;
/** @type {?} */
var options = this.columns[index];
if (options) {
/** @type {?} */
var value_1 = typeof option === 'object' ? this.getOptionValue(option) : option;
return options.find(( /**
* @param {?} o
* @return {?}
*/function (o) { return value_1 === _this.getOptionValue(o); }));
}
return null;
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @private
* @param {?} index
* @param {?} value
* @return {?}
*/
NzCascaderComponent.prototype.activateOnInit =
// tslint:disable-next-line:no-any
/**
* @private
* @param {?} index
* @param {?} value
* @return {?}
*/
function (index, value) {
var _a;
/** @type {?} */
var option = this.findOption(value, index);
if (!option) {
option = typeof value === 'object' ? value : (_a = {},
_a["" + this.nzValueProperty] = value,
_a["" + this.nzLabelProperty] = value,
_a);
}
this.setOptionActivated(option, index, false, false);
};
/**
* @private
* @param {?} index
* @return {?}
*/
NzCascaderComponent.prototype.initOptions = /**
* @private
* @param {?} index
* @return {?}
*/
function (index) {
var _this = this;
/** @type {?} */
var vs = this.defaultValue;
/** @type {?} */
var lastIndex = vs.length - 1;
/** @type {?} */
var load = ( /**
* @return {?}
*/function () {
_this.activateOnInit(index, vs[index]);
if (index < lastIndex) {
_this.initOptions(index + 1);
}
if (index === lastIndex) {
_this.afterWriteValue();
}
});
if (this.isLoaded(index) || !this.nzLoadData) {
load();
}
else {
/** @type {?} */
var node = this.activatedOptions[index - 1] || {};
this.loadChildrenAsync(node, index - 1, load, this.afterWriteValue);
}
};
//#endregion
//#region Mutating data
//#endregion
//#region Mutating data
/**
* @private
* @param {?} option
* @param {?} columnIndex
* @param {?=} select
* @param {?=} loadChildren
* @return {?}
*/
NzCascaderComponent.prototype.setOptionActivated =
//#endregion
//#region Mutating data
/**
* @private
* @param {?} option
* @param {?} columnIndex
* @param {?=} select
* @param {?=} loadChildren
* @return {?}
*/
function (option, columnIndex, select, loadChildren) {
if (select === void 0) {
select = false;
}
if (loadChildren === void 0) {
loadChildren = true;
}
if (!option || option.disabled) {
return;
}
this.activatedOptions[columnIndex] = option;
// Set parent option and all ancestor options as active.
for (var i = columnIndex - 1; i >= 0; i--) {
if (!this.activatedOptions[i]) {
this.activatedOptions[i] = this.activatedOptions[i + 1].parent;
}
}
// Set child options and all success options as inactive.
if (columnIndex < this.activatedOptions.length - 1) {
this.activatedOptions = this.activatedOptions.slice(0, columnIndex + 1);
}
// Load child options.
if (option.children && option.children.length && !option.isLeaf) {
option.children.forEach(( /**
* @param {?} child
* @return {?}
*/function (child) { return child.parent = option; }));
this.setColumnData(option.children, columnIndex + 1);
}
else if (!option.isLeaf && loadChildren) {
this.loadChildrenAsync(option, columnIndex);
}
if (select) {
this.setOptionSelected(option, columnIndex);
}
this.cdr.detectChanges();
this.reposition();
};
/**
* @private
* @param {?} option
* @param {?} columnIndex
* @param {?=} success
* @param {?=} failure
* @return {?}
*/
NzCascaderComponent.prototype.loadChildrenAsync = /**
* @private
* @param {?} option
* @param {?} columnIndex
* @param {?=} success
* @param {?=} failure
* @return {?}
*/
function (option, columnIndex, success, failure) {
var _this = this;
if (this.nzLoadData) {
this.isLoading = columnIndex < 0;
option.loading = true;
this.nzLoadData(option, columnIndex).then(( /**
* @return {?}
*/function () {
if (option.children) {
option.children.forEach(( /**
* @param {?} child
* @return {?}
*/function (child) { return child.parent = columnIndex < 0 ? undefined : option; }));
_this.setColumnData(option.children, columnIndex + 1);
}
if (success) {
success();
}
option.loading = _this.isLoading = false; // Need to check children.
_this.checkChildren();
// Reposition in the next tick, because we use markForCheck above.
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.reposition(); }));
}), ( /**
* @return {?}
*/function () {
option.loading = _this.isLoading = false;
option.isLeaf = true;
_this.cdr.detectChanges();
if (failure) {
failure();
}
}));
}
};
/**
* @private
* @param {?} option
* @param {?} columnIndex
* @return {?}
*/
NzCascaderComponent.prototype.setOptionSelected = /**
* @private
* @param {?} option
* @param {?} columnIndex
* @return {?}
*/
function (option, columnIndex) {
var _this = this;
/** @type {?} */
var shouldPerformSelection = ( /**
* @param {?} o
* @param {?} i
* @return {?}
*/function (o, i) {
return typeof _this.nzChangeOn === 'function' ? _this.nzChangeOn(o, i) === true : false;
});
this.nzSelect.emit({ option: option, index: columnIndex });
if (option.isLeaf || this.nzChangeOnSelect || shouldPerformSelection(option, columnIndex)) {
this.selectedOptions = this.activatedOptions;
this.buildDisplayLabel();
this.onValueChange();
}
if (option.isLeaf) {
this.delaySetMenuVisible(false, this.nzMouseLeaveDelay);
}
};
/**
* @private
* @param {?} options
* @param {?} columnIndex
* @return {?}
*/
NzCascaderComponent.prototype.setColumnData = /**
* @private
* @param {?} options
* @param {?} columnIndex
* @return {?}
*/
function (options, columnIndex) {
if (!arraysEqual(this.columns[columnIndex], options)) {
this.columns[columnIndex] = options;
if (columnIndex < this.columns.length - 1) {
this.columns = this.columns.slice(0, columnIndex + 1);
}
}
};
/**
* @param {?=} event
* @return {?}
*/
NzCascaderComponent.prototype.clearSelection = /**
* @param {?=} event
* @return {?}
*/
function (event) {
if (event) {
event.preventDefault();
event.stopPropagation();
}
this.labelRenderText = '';
this.labelRenderContext = {};
this.selectedOptions = [];
this.activatedOptions = [];
this.inputValue = '';
this.setMenuVisible(false);
this.onValueChange();
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @return {?}
*/
NzCascaderComponent.prototype.getSubmitValue =
// tslint:disable-next-line:no-any
/**
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var values = [];
this.selectedOptions.forEach(( /**
* @param {?} option
* @return {?}
*/function (option) {
values.push(_this.getOptionValue(option));
}));
return values;
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.onValueChange = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var value = this.getSubmitValue();
if (!arraysEqual(this.value, value)) {
this.defaultValue = null;
this.value = value;
this.onChange(value);
if (value.length === 0) {
this.nzClear.emit();
}
this.nzSelectionChange.emit(this.selectedOptions);
this.nzChange.emit(value);
}
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.afterWriteValue = /**
* @return {?}
*/
function () {
this.selectedOptions = this.activatedOptions;
this.value = this.getSubmitValue();
this.buildDisplayLabel();
};
//#endregion
//#region Mouse and keyboard event handles, view children
//#endregion
//#region Mouse and keyboard event handles, view children
/**
* @return {?}
*/
NzCascaderComponent.prototype.focus =
//#endregion
//#region Mouse and keyboard event handles, view children
/**
* @return {?}
*/
function () {
if (!this.isFocused) {
(this.input ? this.input.nativeElement : this.el).focus();
this.isFocused = true;
}
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.blur = /**
* @return {?}
*/
function () {
if (this.isFocused) {
(this.input ? this.input.nativeElement : this.el).blur();
this.isFocused = false;
}
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.handleInputBlur = /**
* @return {?}
*/
function () {
this.menuVisible ? this.focus() : this.blur();
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.handleInputFocus = /**
* @return {?}
*/
function () {
this.focus();
};
/**
* @param {?} event
* @return {?}
*/
NzCascaderComponent.prototype.onKeyDown = /**
* @param {?} event
* @return {?}
*/
function (event) {
/** @type {?} */
var keyCode = event.keyCode;
if (keyCode !== keycodes.DOWN_ARROW &&
keyCode !== keycodes.UP_ARROW &&
keyCode !== keycodes.LEFT_ARROW &&
keyCode !== keycodes.RIGHT_ARROW &&
keyCode !== keycodes.ENTER &&
keyCode !== keycodes.BACKSPACE &&
keyCode !== keycodes.ESCAPE) {
return;
}
// Press any keys above to reopen menu.
if (!this.menuVisible && keyCode !== keycodes.BACKSPACE && keyCode !== keycodes.ESCAPE) {
return this.setMenuVisible(true);
}
// Make these keys work as default in searching mode.
if (this.isSearching && (keyCode === keycodes.BACKSPACE || keyCode === keycodes.LEFT_ARROW || keyCode === keycodes.RIGHT_ARROW)) {
return;
}
// Interact with the component.
if (this.menuVisible) {
event.preventDefault();
if (keyCode === keycodes.DOWN_ARROW) {
this.moveUpOrDown(false);
}
else if (keyCode === keycodes.UP_ARROW) {
this.moveUpOrDown(true);
}
else if (keyCode === keycodes.LEFT_ARROW) {
this.moveLeft();
}
else if (keyCode === keycodes.RIGHT_ARROW) {
this.moveRight();
}
else if (keyCode === keycodes.ENTER) {
this.onEnter();
}
}
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.onTriggerClick = /**
* @return {?}
*/
function () {
if (this.nzDisabled) {
return;
}
if (this.nzShowSearch) {
this.focus();
}
if (this.isActionTrigger('click')) {
this.delaySetMenuVisible(!this.menuVisible, 100);
}
this.onTouched();
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.onTriggerMouseEnter = /**
* @return {?}
*/
function () {
if (this.nzDisabled) {
return;
}
if (this.isActionTrigger('hover')) {
this.delaySetMenuVisible(true, this.nzMouseEnterDelay, true);
}
};
/**
* @param {?} event
* @return {?}
*/
NzCascaderComponent.prototype.onTriggerMouseLeave = /**
* @param {?} event
* @return {?}
*/
function (event) {
if (this.nzDisabled) {
return;
}
if (!this.menuVisible || this.isOpening) {
event.preventDefault();
return;
}
if (this.isActionTrigger('hover')) {
/** @type {?} */
var mouseTarget = ( /** @type {?} */(event.relatedTarget));
/** @type {?} */
var hostEl = this.el;
/** @type {?} */
var menuEl = this.menu && ( /** @type {?} */(this.menu.nativeElement));
if (hostEl.contains(mouseTarget) || (menuEl && menuEl.contains(mouseTarget))) {
return;
}
this.delaySetMenuVisible(false, this.nzMouseLeaveDelay);
}
};
/**
* @private
* @param {?} action
* @return {?}
*/
NzCascaderComponent.prototype.isActionTrigger = /**
* @private
* @param {?} action
* @return {?}
*/
function (action) {
return typeof this.nzTriggerAction === 'string'
? this.nzTriggerAction === action
: this.nzTriggerAction.indexOf(action) !== -1;
};
/**
* @param {?} option
* @param {?} columnIndex
* @param {?} event
* @return {?}
*/
NzCascaderComponent.prototype.onOptionClick = /**
* @param {?} option
* @param {?} columnIndex
* @param {?} event
* @return {?}
*/
function (option, columnIndex, event) {
if (event) {
event.preventDefault();
}
if (option && option.disabled) {
return;
}
this.el.focus();
this.isSearching
? this.setSearchOptionActivated(( /** @type {?} */(option)), event)
: this.setOptionActivated(option, columnIndex, true);
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.onEnter = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var columnIndex = Math.max(this.activatedOptions.length - 1, 0);
/** @type {?} */
var option = this.activatedOptions[columnIndex];
if (option && !option.disabled) {
this.isSearching
? this.setSearchOptionActivated(( /** @type {?} */(option)), null)
: this.setOptionSelected(option, columnIndex);
}
};
/**
* @private
* @param {?} isUp
* @return {?}
*/
NzCascaderComponent.prototype.moveUpOrDown = /**
* @private
* @param {?} isUp
* @return {?}
*/
function (isUp) {
/** @type {?} */
var columnIndex = Math.max(this.activatedOptions.length - 1, 0);
/** @type {?} */
var activeOption = this.activatedOptions[columnIndex];
/** @type {?} */
var options = this.columns[columnIndex] || [];
/** @type {?} */
var length = options.length;
/** @type {?} */
var nextIndex = -1;
if (!activeOption) { // Not selected options in this column
nextIndex = isUp ? length : -1;
}
else {
nextIndex = options.indexOf(activeOption);
}
while (true) {
nextIndex = isUp ? nextIndex - 1 : nextIndex + 1;
if (nextIndex < 0 || nextIndex >= length) {
break;
}
/** @type {?} */
var nextOption = options[nextIndex];
if (!nextOption || nextOption.disabled) {
continue;
}
this.setOptionActivated(nextOption, columnIndex);
break;
}
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.moveLeft = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var options = this.activatedOptions;
if (options.length) {
options.pop(); // Remove the last one
}
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.moveRight = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var length = this.activatedOptions.length;
/** @type {?} */
var options = this.columns[length];
if (options && options.length) {
/** @type {?} */
var nextOpt = options.find(( /**
* @param {?} o
* @return {?}
*/function (o) { return !o.disabled; }));
if (nextOpt) {
this.setOptionActivated(nextOpt, length);
}
}
};
/**
* @param {?} option
* @param {?} columnIndex
* @param {?} event
* @return {?}
*/
NzCascaderComponent.prototype.onOptionMouseEnter = /**
* @param {?} option
* @param {?} columnIndex
* @param {?} event
* @return {?}
*/
function (option, columnIndex, event) {
event.preventDefault();
if (this.nzExpandTrigger === 'hover' && !option.isLeaf) {
this.delaySelectOption(option, columnIndex, true);
}
};
/**
* @param {?} option
* @param {?} columnIndex
* @param {?} event
* @return {?}
*/
NzCascaderComponent.prototype.onOptionMouseLeave = /**
* @param {?} option
* @param {?} columnIndex
* @param {?} event
* @return {?}
*/
function (option, columnIndex, event) {
event.preventDefault();
if (this.nzExpandTrigger === 'hover' && !option.isLeaf) {
this.delaySelectOption(option, columnIndex, false);
}
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.clearDelaySelectTimer = /**
* @private
* @return {?}
*/
function () {
if (this.delaySelectTimer) {
clearTimeout(this.delaySelectTimer);
this.delaySelectTimer = null;
}
};
/**
* @private
* @param {?} option
* @param {?} index
* @param {?} doSelect
* @return {?}
*/
NzCascaderComponent.prototype.delaySelectOption = /**
* @private
* @param {?} option
* @param {?} index
* @param {?} doSelect
* @return {?}
*/
function (option, index, doSelect) {
var _this = this;
this.clearDelaySelectTimer();
if (doSelect) {
this.delaySelectTimer = setTimeout(( /**
* @return {?}
*/function () {
_this.setOptionActivated(option, index);
_this.delaySelectTimer = null;
}), 150);
}
};
//#endregion
//#region Search
//#endregion
//#region Search
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.toggleSearchMode =
//#endregion
//#region Search
/**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var willBeInSearch = !!this._inputValue;
// Take a snapshot before entering search mode.
if (!this.isSearching && willBeInSearch) {
this.isSearching = true;
this.activatedOptionsSnapshot = this.activatedOptions;
this.activatedOptions = [];
this.labelRenderText = '';
if (this.input) {
/** @type {?} */
var width = this.input.nativeElement.offsetWidth;
this.dropdownWidthStyle = width + "px";
}
}
// Restore the snapshot after leaving search mode.
if (this.isSearching && !willBeInSearch) {
this.isSearching = false;
this.activatedOptions = this.activatedOptionsSnapshot;
this.columns = this.columnsSnapshot;
this.dropdownWidthStyle = '';
if (this.activatedOptions) {
this.buildDisplayLabel();
}
}
if (this.isSearching) {
this.prepareSearchValue();
}
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.prepareSearchValue = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var results = [];
/** @type {?} */
var path = [];
/** @type {?} */
var defaultFilter = ( /**
* @param {?} inputValue
* @param {?} p
* @return {?}
*/function (inputValue, p) {
return p.some(( /**
* @param {?} n
* @return {?}
*/function (n) {
/** @type {?} */
var label = _this.getOptionLabel(n);
return label && label.indexOf(inputValue) !== -1;
}));
});
/** @type {?} */
var filter = this.nzShowSearch instanceof Object && (( /** @type {?} */(this.nzShowSearch))).filter
? (( /** @type {?} */(this.nzShowSearch))).filter
: defaultFilter;
/** @type {?} */
var sorter = this.nzShowSearch instanceof Object && (( /** @type {?} */(this.nzShowSearch))).sorter;
/** @type {?} */
var loopParent = ( /**
* @param {?} node
* @param {?=} forceDisabled
* @return {?}
*/function (node, forceDisabled) {
if (forceDisabled === void 0) {
forceDisabled = false;
}
/** @type {?} */
var disabled = forceDisabled || node.disabled;
path.push(node);
node.children.forEach(( /**
* @param {?} sNode
* @return {?}
*/function (sNode) {
if (!sNode.parent) {
sNode.parent = node;
} // Build parent reference when doing searching
if (!sNode.isLeaf) {
loopParent(sNode, disabled);
}
if (sNode.isLeaf || !sNode.children || !sNode.children.length) {
loopChild(sNode, disabled);
}
}));
path.pop();
});
/** @type {?} */
var loopChild = ( /**
* @param {?} node
* @param {?=} forceDisabled
* @return {?}
*/function (node, forceDisabled) {
if (forceDisabled === void 0) {
forceDisabled = false;
}
var _a;
path.push(node);
/** @type {?} */
var cPath = Array.from(path);
if (filter(_this._inputValue, cPath)) {
/** @type {?} */
var disabled = forceDisabled || node.disabled;
/** @type {?} */
var option = (_a = {
disabled: disabled,
isLeaf: true,
path: cPath
},
_a[_this.nzLabelProperty] = cPath.map(( /**
* @param {?} p
* @return {?}
*/function (p) { return _this.getOptionLabel(p); })).join(' / '),
_a);
results.push(option);
}
path.pop();
});
if (!this.columnsSnapshot.length) {
this.columns = [[]];
return;
}
this.columnsSnapshot[0].forEach(( /**
* @param {?} node
* @return {?}
*/function (node) {
return (node.isLeaf || !node.children || !node.children.length)
? loopChild(node)
: loopParent(node);
}));
if (sorter) {
results.sort(( /**
* @param {?} a
* @param {?} b
* @return {?}
*/function (a, b) { return sorter(a.path, b.path, _this._inputValue); }));
}
this.columns = [results];
};
/**
* @param {?} result
* @param {?} event
* @return {?}
*/
NzCascaderComponent.prototype.setSearchOptionActivated = /**
* @param {?} result
* @param {?} event
* @return {?}
*/
function (result, event) {
var _this = this;
this.activatedOptions = [result];
this.delaySetMenuVisible(false, 200);
setTimeout(( /**
* @return {?}
*/function () {
_this.inputValue = '';
/** @type {?} */
var index = result.path.length - 1;
/** @type {?} */
var destinationNode = result.path[index];
// NOTE: optimize this.
/** @type {?} */
var mockClickParent = ( /**
* @param {?} node
* @param {?} columnIndex
* @return {?}
*/function (node, columnIndex) {
if (node && node.parent) {
mockClickParent(node.parent, columnIndex - 1);
}
_this.onOptionClick(node, columnIndex, event);
});
mockClickParent(destinationNode, index);
}), 300);
};
Object.defineProperty(NzCascaderComponent.prototype, "hasInput", {
//#endregion
//#region Helpers
get:
//#endregion
//#region Helpers
/**
* @private
* @return {?}
*/
function () {
return !!this.inputValue;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCascaderComponent.prototype, "hasValue", {
get: /**
* @private
* @return {?}
*/ function () {
return !!this.value && !!this.value.length;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCascaderComponent.prototype, "showPlaceholder", {
get: /**
* @return {?}
*/ function () {
return !(this.hasInput || this.hasValue);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCascaderComponent.prototype, "clearIconVisible", {
get: /**
* @return {?}
*/ function () {
return this.nzAllowClear && !this.nzDisabled && (this.hasValue || this.hasInput);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzCascaderComponent.prototype, "isLabelRenderTemplate", {
get: /**
* @return {?}
*/ function () {
return !!this.nzLabelRender;
},
enumerable: true,
configurable: true
});
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} option
* @return {?}
*/
NzCascaderComponent.prototype.getOptionLabel =
// tslint:disable-next-line:no-any
/**
* @param {?} option
* @return {?}
*/
function (option) {
return option[this.nzLabelProperty || 'label'];
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} option
* @return {?}
*/
NzCascaderComponent.prototype.getOptionValue =
// tslint:disable-next-line:no-any
/**
* @param {?} option
* @return {?}
*/
function (option) {
return option[this.nzValueProperty || 'value'];
};
/**
* @param {?} option
* @param {?} index
* @return {?}
*/
NzCascaderComponent.prototype.isOptionActivated = /**
* @param {?} option
* @param {?} index
* @return {?}
*/
function (option, index) {
/** @type {?} */
var activeOpt = this.activatedOptions[index];
return activeOpt === option;
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.buildDisplayLabel = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var selectedOptions = this.selectedOptions;
/** @type {?} */
var labels = selectedOptions.map(( /**
* @param {?} o
* @return {?}
*/function (o) { return _this.getOptionLabel(o); }));
if (this.isLabelRenderTemplate) {
this.labelRenderContext = { labels: labels, selectedOptions: selectedOptions };
}
else {
this.labelRenderText = defaultDisplayRender.call(this, labels, selectedOptions);
}
// When components inits with default value, this would make display label appear correctly.
this.cdr.detectChanges();
};
//#endregion
//#endregion
/**
* @param {?} isDisabled
* @return {?}
*/
NzCascaderComponent.prototype.setDisabledState =
//#endregion
/**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
if (isDisabled) {
this.closeMenu();
}
this.nzDisabled = isDisabled;
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.closeMenu = /**
* @return {?}
*/
function () {
this.blur();
this.clearDelayMenuTimer();
this.setMenuVisible(false);
};
/**
* @return {?}
*/
NzCascaderComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.clearDelayMenuTimer();
this.clearDelaySelectTimer();
};
/**
* @param {?} fn
* @return {?}
*/
NzCascaderComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzCascaderComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @return {?}
*/
NzCascaderComponent.prototype.writeValue =
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @return {?}
*/
function (value) {
/** @type {?} */
var vs = this.defaultValue = toArray(value);
if (vs.length) {
this.initOptions(0);
}
else {
this.value = vs;
this.activatedOptions = [];
this.afterWriteValue();
}
};
/**
* @param {?} position
* @return {?}
*/
NzCascaderComponent.prototype.onPositionChange = /**
* @param {?} position
* @return {?}
*/
function (position) {
/** @type {?} */
var newValue = position.connectionPair.originY === 'bottom' ? 'bottom' : 'top';
if (this.dropDownPosition !== newValue) {
this.dropDownPosition = newValue;
this.cdr.detectChanges();
}
};
/**
* Reposition the cascader panel. When a menu opens, the cascader expands
* and may exceed the browser boundary.
*/
/**
* Reposition the cascader panel. When a menu opens, the cascader expands
* and may exceed the browser boundary.
* @private
* @return {?}
*/
NzCascaderComponent.prototype.reposition = /**
* Reposition the cascader panel. When a menu opens, the cascader expands
* and may exceed the browser boundary.
* @private
* @return {?}
*/
function () {
var _this = this;
if (this.overlay && this.overlay.overlayRef && this.menuVisible) {
Promise.resolve().then(( /**
* @return {?}
*/function () {
_this.overlay.overlayRef.updatePosition();
}));
}
};
/**
* @private
* @return {?}
*/
NzCascaderComponent.prototype.checkChildren = /**
* @private
* @return {?}
*/
function () {
this.cascaderItems.forEach(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.markForCheck(); }));
};
NzCascaderComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-cascader,[nz-cascader]',
preserveWhitespaces: false,
template: "<div\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n #trigger>\n <div *ngIf=\"nzShowInput\">\n <input\n #input\n nz-input\n class=\"ant-cascader-input\"\n [class.ant-cascader-input-disabled]=\"nzDisabled\"\n [class.ant-cascader-input-lg]=\"nzSize === 'large'\"\n [class.ant-cascader-input-sm]=\"nzSize === 'small'\"\n [attr.autoComplete]=\"'off'\"\n [attr.placeholder]=\"showPlaceholder ? nzPlaceHolder : null\"\n [attr.autofocus]=\"nzAutoFocus ? 'autofocus' : null\"\n [readonly]=\"!nzShowSearch\"\n [disabled]=\"nzDisabled\"\n [nzSize]=\"nzSize\"\n [(ngModel)]=\"inputValue\"\n (blur)=\"handleInputBlur()\"\n (focus)=\"handleInputFocus()\"\n (change)=\"$event.stopPropagation()\">\n <i *ngIf=\"clearIconVisible\"\n nz-icon\n type=\"close-circle\"\n theme=\"fill\"\n class=\"ant-cascader-picker-clear\"\n (click)=\"clearSelection($event)\"></i>\n <i *ngIf=\"nzShowArrow && !isLoading\"\n nz-icon\n type=\"down\"\n class=\"ant-cascader-picker-arrow\"\n [class.ant-cascader-picker-arrow-expand]=\"menuVisible\">\n </i>\n <i *ngIf=\"isLoading\" nz-icon type=\"loading\" class=\"ant-cascader-picker-arrow\"></i>\n <span\n class=\"ant-cascader-picker-label\"\n [class.ant-cascader-show-search]=\"!!nzShowSearch\"\n [class.ant-focusd]=\"!!nzShowSearch && isFocused && !inputValue\">\n <ng-container *ngIf=\"!isLabelRenderTemplate; else labelTemplate\">{{ labelRenderText }}</ng-container>\n <ng-template #labelTemplate>\n <ng-template [ngTemplateOutlet]=\"nzLabelRender\" [ngTemplateOutletContext]=\"labelRenderContext\"></ng-template>\n </ng-template>\n </span>\n </div>\n <ng-content></ng-content>\n</div>\n<ng-template\n cdkConnectedOverlay\n nzConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayPositions]=\"positions\"\n (backdropClick)=\"closeMenu()\"\n (detach)=\"closeMenu()\"\n (positionChange)=\"onPositionChange($event)\"\n [cdkConnectedOverlayOpen]=\"menuVisible\">\n <div\n #menu\n class=\"ant-cascader-menus\"\n *ngIf=\"nzOptions && nzOptions.length || isSearching\"\n [class.ant-cascader-menus-hidden]=\"!menuVisible\"\n [ngClass]=\"menuCls\"\n [ngStyle]=\"nzMenuStyle\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [@slideMotion]=\"dropDownPosition\"\n (mouseleave)=\"onTriggerMouseLeave($event)\">\n <ul *ngFor=\"let options of columns; let i = index;\" class=\"ant-cascader-menu\"\n [ngClass]=\"menuColumnCls\"\n [style.height]=\"isSearching && !columns[0].length ? 'auto': ''\"\n [style.width]=\"dropdownWidthStyle\">\n <li\n nz-cascader-option\n *ngFor=\"let option of options\"\n [nzLabelProperty]=\"nzLabelProperty\"\n [activated]=\"isOptionActivated(option, i)\"\n [highlightText]=\"isSearching ? inputValue : ''\"\n [option]=\"option\"\n (mouseenter)=\"onOptionMouseEnter(option, i, $event)\"\n (mouseleave)=\"onOptionMouseLeave(option, i, $event)\"\n (click)=\"onOptionClick(option, i, $event)\">\n </li>\n <li *ngIf=\"isSearching && !columns[0].length\"\n class=\"ant-cascader-menu-item ant-cascader-menu-item-expanded ant-cascader-menu-item-disabled\">\n <nz-embed-empty [nzComponentName]=\"'cascader'\" [specificContent]=\"nzNotFoundContent\"></nz-embed-empty>\n </li>\n </ul>\n </div>\n</ng-template>\n",
animations: [slideMotion],
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzCascaderComponent; })),
multi: true
}
],
host: {
'[attr.tabIndex]': '"0"',
'[class.ant-cascader-lg]': 'nzSize === "large"',
'[class.ant-cascader-sm]': 'nzSize === "small"',
'[class.ant-cascader-picker-disabled]': 'nzDisabled',
'[class.ant-cascader-picker-open]': 'menuVisible',
'[class.ant-cascader-picker-with-value]': '!!inputValue',
'[class.ant-cascader-focused]': 'isFocused'
},
styles: ["\n .ant-cascader-menus {\n margin-top: 4px;\n margin-bottom: 4px;\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n }\n "]
}] }
];
/** @nocollapse */
NzCascaderComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzCascaderComponent.propDecorators = {
input: [{ type: i0.ViewChild, args: ['input',] }],
menu: [{ type: i0.ViewChild, args: ['menu',] }],
overlay: [{ type: i0.ViewChild, args: [i2$2.CdkConnectedOverlay,] }],
cascaderItems: [{ type: i0.ViewChildren, args: [NzCascaderOptionComponent,] }],
nzShowInput: [{ type: i0.Input }],
nzShowArrow: [{ type: i0.Input }],
nzAllowClear: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
nzChangeOnSelect: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzColumnClassName: [{ type: i0.Input }],
nzExpandTrigger: [{ type: i0.Input }],
nzValueProperty: [{ type: i0.Input }],
nzLabelRender: [{ type: i0.Input }],
nzLabelProperty: [{ type: i0.Input }],
nzNotFoundContent: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzShowSearch: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzMenuClassName: [{ type: i0.Input }],
nzMenuStyle: [{ type: i0.Input }],
nzMouseEnterDelay: [{ type: i0.Input }],
nzMouseLeaveDelay: [{ type: i0.Input }],
nzTriggerAction: [{ type: i0.Input }],
nzChangeOn: [{ type: i0.Input }],
nzLoadData: [{ type: i0.Input }],
nzOptions: [{ type: i0.Input }],
nzSelectionChange: [{ type: i0.Output }],
nzSelect: [{ type: i0.Output }],
nzClear: [{ type: i0.Output }],
nzVisibleChange: [{ type: i0.Output }],
nzChange: [{ type: i0.Output }],
onKeyDown: [{ type: i0.HostListener, args: ['keydown', ['$event'],] }],
onTriggerClick: [{ type: i0.HostListener, args: ['click',] }],
onTriggerMouseEnter: [{ type: i0.HostListener, args: ['mouseenter',] }],
onTriggerMouseLeave: [{ type: i0.HostListener, args: ['mouseleave', ['$event'],] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCascaderComponent.prototype, "nzShowInput", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCascaderComponent.prototype, "nzShowArrow", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCascaderComponent.prototype, "nzAllowClear", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCascaderComponent.prototype, "nzAutoFocus", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCascaderComponent.prototype, "nzChangeOnSelect", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCascaderComponent.prototype, "nzDisabled", void 0);
return NzCascaderComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCascaderModule = /** @class */ (function () {
function NzCascaderModule() {
}
NzCascaderModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, i2$2.OverlayModule, NzInputModule, NzIconModule, NzEmptyModule, NzOverlayModule, NzNoAnimationModule],
declarations: [
NzCascaderComponent,
NzCascaderOptionComponent
],
exports: [
NzCascaderComponent
]
},] }
];
return NzCascaderModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCheckboxGroupComponent = /** @class */ (function () {
function NzCheckboxGroupComponent(elementRef, focusMonitor, cdr, renderer) {
this.elementRef = elementRef;
this.focusMonitor = focusMonitor;
this.cdr = cdr;
// tslint:disable-next-line:no-any
this.onChange = ( /**
* @return {?}
*/function () { return null; });
// tslint:disable-next-line:no-any
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.options = [];
this.nzDisabled = false;
renderer.addClass(elementRef.nativeElement, 'ant-checkbox-group');
}
/**
* @return {?}
*/
NzCheckboxGroupComponent.prototype.onOptionChange = /**
* @return {?}
*/
function () {
this.onChange(this.options);
};
/**
* @param {?} _index
* @param {?} option
* @return {?}
*/
NzCheckboxGroupComponent.prototype.trackByOption = /**
* @param {?} _index
* @param {?} option
* @return {?}
*/
function (_index, option) {
return option.value;
};
/**
* @return {?}
*/
NzCheckboxGroupComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.focusMonitor.monitor(this.elementRef, true).subscribe(( /**
* @param {?} focusOrigin
* @return {?}
*/function (focusOrigin) {
if (!focusOrigin) {
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.onTouched(); }));
}
}));
};
/**
* @param {?} value
* @return {?}
*/
NzCheckboxGroupComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.options = value;
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzCheckboxGroupComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzCheckboxGroupComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzCheckboxGroupComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
NzCheckboxGroupComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-checkbox-group',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
template: "<label nz-checkbox\n *ngFor=\"let option of options; trackBy:trackByOption\"\n [nzDisabled]=\"option.disabled || nzDisabled\"\n [(nzChecked)]=\"option.checked\"\n (nzCheckedChange)=\"onOptionChange()\">\n <span>{{ option.label }}</span>\n</label>",
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzCheckboxGroupComponent; })),
multi: true
}
]
}] }
];
/** @nocollapse */
NzCheckboxGroupComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: a11y.FocusMonitor },
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 }
];
};
NzCheckboxGroupComponent.propDecorators = {
nzDisabled: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCheckboxGroupComponent.prototype, "nzDisabled", void 0);
return NzCheckboxGroupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCheckboxWrapperComponent = /** @class */ (function () {
function NzCheckboxWrapperComponent(renderer, elementRef) {
this.nzOnChange = new i0.EventEmitter();
this.checkboxList = [];
renderer.addClass(elementRef.nativeElement, 'ant-checkbox-group');
}
/**
* @param {?} value
* @return {?}
*/
NzCheckboxWrapperComponent.prototype.addCheckbox = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.checkboxList.push(value);
};
/**
* @param {?} value
* @return {?}
*/
NzCheckboxWrapperComponent.prototype.removeCheckbox = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.checkboxList.splice(this.checkboxList.indexOf(value), 1);
};
/**
* @return {?}
*/
NzCheckboxWrapperComponent.prototype.outputValue = /**
* @return {?}
*/
function () {
/** @type {?} */
var checkedList = this.checkboxList.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.nzChecked; }));
return checkedList.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.nzValue; }));
};
/**
* @return {?}
*/
NzCheckboxWrapperComponent.prototype.onChange = /**
* @return {?}
*/
function () {
this.nzOnChange.emit(this.outputValue());
};
NzCheckboxWrapperComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-checkbox-wrapper',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-content></ng-content>"
}] }
];
/** @nocollapse */
NzCheckboxWrapperComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzCheckboxWrapperComponent.propDecorators = {
nzOnChange: [{ type: i0.Output }]
};
return NzCheckboxWrapperComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCheckboxComponent = /** @class */ (function () {
function NzCheckboxComponent(elementRef, renderer, nzCheckboxWrapperComponent, cdr, focusMonitor) {
this.elementRef = elementRef;
this.renderer = renderer;
this.nzCheckboxWrapperComponent = nzCheckboxWrapperComponent;
this.cdr = cdr;
this.focusMonitor = focusMonitor;
// tslint:disable-next-line:no-any
this.onChange = ( /**
* @return {?}
*/function () { return null; });
// tslint:disable-next-line:no-any
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.nzCheckedChange = new i0.EventEmitter();
this.nzAutoFocus = false;
this.nzDisabled = false;
this.nzIndeterminate = false;
this.nzChecked = false;
renderer.addClass(elementRef.nativeElement, 'ant-checkbox-wrapper');
}
/**
* @param {?} e
* @return {?}
*/
NzCheckboxComponent.prototype.hostClick = /**
* @param {?} e
* @return {?}
*/
function (e) {
e.preventDefault();
this.focus();
this.innerCheckedChange(!this.nzChecked);
};
/**
* @param {?} checked
* @return {?}
*/
NzCheckboxComponent.prototype.innerCheckedChange = /**
* @param {?} checked
* @return {?}
*/
function (checked) {
if (!this.nzDisabled) {
this.nzChecked = checked;
this.onChange(this.nzChecked);
this.nzCheckedChange.emit(this.nzChecked);
if (this.nzCheckboxWrapperComponent) {
this.nzCheckboxWrapperComponent.onChange();
}
}
};
/**
* @return {?}
*/
NzCheckboxComponent.prototype.updateAutoFocus = /**
* @return {?}
*/
function () {
if (this.inputElement && this.nzAutoFocus) {
this.renderer.setAttribute(this.inputElement.nativeElement, 'autofocus', 'autofocus');
}
else {
this.renderer.removeAttribute(this.inputElement.nativeElement, 'autofocus');
}
};
/**
* @param {?} value
* @return {?}
*/
NzCheckboxComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.nzChecked = value;
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzCheckboxComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzCheckboxComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzCheckboxComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzCheckboxComponent.prototype.focus = /**
* @return {?}
*/
function () {
this.focusMonitor.focusVia(this.inputElement, 'keyboard');
};
/**
* @return {?}
*/
NzCheckboxComponent.prototype.blur = /**
* @return {?}
*/
function () {
this.inputElement.nativeElement.blur();
};
/**
* @return {?}
*/
NzCheckboxComponent.prototype.checkContent = /**
* @return {?}
*/
function () {
if (isEmpty(this.contentElement.nativeElement)) {
this.renderer.setStyle(this.contentElement.nativeElement, 'display', 'none');
}
else {
this.renderer.removeStyle(this.contentElement.nativeElement, 'display');
}
};
/**
* @return {?}
*/
NzCheckboxComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.focusMonitor.monitor(this.elementRef, true).subscribe(( /**
* @param {?} focusOrigin
* @return {?}
*/function (focusOrigin) {
if (!focusOrigin) {
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.onTouched(); }));
}
}));
if (this.nzCheckboxWrapperComponent) {
this.nzCheckboxWrapperComponent.addCheckbox(this);
}
};
/**
* @param {?} changes
* @return {?}
*/
NzCheckboxComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzAutoFocus) {
this.updateAutoFocus();
}
};
/**
* @return {?}
*/
NzCheckboxComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.updateAutoFocus();
this.checkContent();
};
/**
* @return {?}
*/
NzCheckboxComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.focusMonitor.stopMonitoring(this.elementRef);
if (this.nzCheckboxWrapperComponent) {
this.nzCheckboxWrapperComponent.removeCheckbox(this);
}
};
NzCheckboxComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-checkbox]',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<span class=\"ant-checkbox\"\n [class.ant-checkbox-checked]=\"nzChecked && !nzIndeterminate\"\n [class.ant-checkbox-disabled]=\"nzDisabled\"\n [class.ant-checkbox-indeterminate]=\"nzIndeterminate\">\n <input #inputElement [checked]=\"nzChecked\" [ngModel]=\"nzChecked\" [disabled]=\"nzDisabled\" (ngModelChange)=\"innerCheckedChange($event)\" (click)=\"$event.stopPropagation();\" type=\"checkbox\" class=\"ant-checkbox-input\">\n <span class=\"ant-checkbox-inner\"></span>\n</span>\n<span #contentElement (cdkObserveContent)=\"checkContent()\"><ng-content></ng-content></span>",
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzCheckboxComponent; })),
multi: true
}
],
host: {
'(click)': 'hostClick($event)'
}
}] }
];
/** @nocollapse */
NzCheckboxComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: NzCheckboxWrapperComponent, decorators: [{ type: i0.Optional }] },
{ type: i0.ChangeDetectorRef },
{ type: a11y.FocusMonitor }
];
};
NzCheckboxComponent.propDecorators = {
inputElement: [{ type: i0.ViewChild, args: ['inputElement',] }],
contentElement: [{ type: i0.ViewChild, args: ['contentElement',] }],
nzCheckedChange: [{ type: i0.Output }],
nzValue: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzIndeterminate: [{ type: i0.Input }],
nzChecked: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCheckboxComponent.prototype, "nzAutoFocus", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCheckboxComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCheckboxComponent.prototype, "nzIndeterminate", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCheckboxComponent.prototype, "nzChecked", void 0);
return NzCheckboxComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCheckboxModule = /** @class */ (function () {
function NzCheckboxModule() {
}
NzCheckboxModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, observers.ObserversModule],
declarations: [
NzCheckboxComponent,
NzCheckboxGroupComponent,
NzCheckboxWrapperComponent
],
exports: [
NzCheckboxComponent,
NzCheckboxGroupComponent,
NzCheckboxWrapperComponent
]
},] }
];
return NzCheckboxModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var collapseMotion = animations$1.trigger('collapseMotion', [
animations$1.state('expanded', animations$1.style({ height: '*' })),
animations$1.state('collapsed', animations$1.style({ height: 0, overflow: 'hidden' })),
animations$1.state('hidden', animations$1.style({ height: 0, display: 'none' })),
animations$1.transition('expanded => collapsed', animations$1.animate("150ms " + AnimationCurves.EASE_IN_OUT)),
animations$1.transition('expanded => hidden', animations$1.animate("150ms " + AnimationCurves.EASE_IN_OUT)),
animations$1.transition('collapsed => expanded', animations$1.animate("150ms " + AnimationCurves.EASE_IN_OUT)),
animations$1.transition('hidden => expanded', animations$1.animate("150ms " + AnimationCurves.EASE_IN_OUT))
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCollapseComponent = /** @class */ (function () {
function NzCollapseComponent() {
this.listOfNzCollapsePanelComponent = [];
this.nzAccordion = false;
this.nzBordered = true;
}
/**
* @param {?} value
* @return {?}
*/
NzCollapseComponent.prototype.addPanel = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.listOfNzCollapsePanelComponent.push(value);
};
/**
* @param {?} value
* @return {?}
*/
NzCollapseComponent.prototype.removePanel = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.listOfNzCollapsePanelComponent.splice(this.listOfNzCollapsePanelComponent.indexOf(value), 1);
};
/**
* @param {?} collapse
* @return {?}
*/
NzCollapseComponent.prototype.click = /**
* @param {?} collapse
* @return {?}
*/
function (collapse) {
if (this.nzAccordion && !collapse.nzActive) {
this.listOfNzCollapsePanelComponent.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return item !== collapse; })).forEach(( /**
* @param {?} item
* @return {?}
*/function (item) {
if (item.nzActive) {
item.nzActive = false;
item.nzActiveChange.emit(item.nzActive);
item.markForCheck();
}
}));
}
collapse.nzActive = !collapse.nzActive;
collapse.nzActiveChange.emit(collapse.nzActive);
};
NzCollapseComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-collapse',
template: "<div class=\"ant-collapse\" [class.ant-collapse-borderless]=\"!nzBordered\">\n <ng-content></ng-content>\n</div>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
styles: ["nz-collapse {\n display: block;\n }"]
}] }
];
NzCollapseComponent.propDecorators = {
nzAccordion: [{ type: i0.Input }],
nzBordered: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCollapseComponent.prototype, "nzAccordion", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCollapseComponent.prototype, "nzBordered", void 0);
return NzCollapseComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCollapsePanelComponent = /** @class */ (function () {
function NzCollapsePanelComponent(cdr, nzCollapseComponent, elementRef, renderer) {
this.cdr = cdr;
this.nzCollapseComponent = nzCollapseComponent;
this.nzActive = false;
this.nzDisabled = false;
this.nzShowArrow = true;
this.nzActiveChange = new i0.EventEmitter();
renderer.addClass(elementRef.nativeElement, 'ant-collapse-item');
}
/**
* @return {?}
*/
NzCollapsePanelComponent.prototype.clickHeader = /**
* @return {?}
*/
function () {
if (!this.nzDisabled) {
this.nzCollapseComponent.click(this);
}
};
/**
* @return {?}
*/
NzCollapsePanelComponent.prototype.markForCheck = /**
* @return {?}
*/
function () {
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzCollapsePanelComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.nzCollapseComponent.addPanel(this);
};
/**
* @return {?}
*/
NzCollapsePanelComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.nzCollapseComponent.removePanel(this);
};
NzCollapsePanelComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-collapse-panel',
template: "<div role=\"tab\" [attr.aria-expanded]=\"nzActive\" class=\"ant-collapse-header\" (click)=\"clickHeader()\">\n <ng-container *ngIf=\"nzShowArrow\">\n <ng-container *nzStringTemplateOutlet=\"nzExpandedIcon\">\n <i nz-icon [type]=\"nzExpandedIcon || 'right'\" class=\"ant-collapse-arrow\" [nzRotate]=\"nzActive ? 90 : 0\"></i>\n </ng-container>\n </ng-container>\n <ng-container *nzStringTemplateOutlet=\"nzHeader\">{{ nzHeader }}</ng-container>\n</div>\n<div class=\"ant-collapse-content\"\n [class.ant-collapse-content-active]=\"nzActive\"\n [@collapseMotion]=\"nzActive ? 'expanded' : 'hidden' \">\n <div class=\"ant-collapse-content-box\">\n <ng-content></ng-content>\n </div>\n</div>\n",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
animations: [collapseMotion],
host: {
'[class.ant-collapse-no-arrow]': '!nzShowArrow'
},
styles: [" nz-collapse-panel {\n display: block\n }"]
}] }
];
/** @nocollapse */
NzCollapsePanelComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzCollapseComponent, decorators: [{ type: i0.Host }] },
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzCollapsePanelComponent.propDecorators = {
nzActive: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.ant-collapse-item-active',] }],
nzDisabled: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.ant-collapse-item-disabled',] }],
nzShowArrow: [{ type: i0.Input }],
nzHeader: [{ type: i0.Input }],
nzExpandedIcon: [{ type: i0.Input }],
nzActiveChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCollapsePanelComponent.prototype, "nzActive", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCollapsePanelComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzCollapsePanelComponent.prototype, "nzShowArrow", void 0);
return NzCollapsePanelComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCollapseModule = /** @class */ (function () {
function NzCollapseModule() {
}
NzCollapseModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzCollapsePanelComponent, NzCollapseComponent],
exports: [NzCollapsePanelComponent, NzCollapseComponent],
imports: [i2$1.CommonModule, NzIconModule, NzAddOnModule]
},] }
];
return NzCollapseModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCommentAvatarDirective = /** @class */ (function () {
function NzCommentAvatarDirective() {
}
NzCommentAvatarDirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'nz-avatar[nz-comment-avatar]'
},] }
];
return NzCommentAvatarDirective;
}());
var NzCommentContentDirective = /** @class */ (function () {
function NzCommentContentDirective() {
}
NzCommentContentDirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'nz-comment-content, [nz-comment-content]',
host: { 'class': 'ant-comment-content-detail' }
},] }
];
return NzCommentContentDirective;
}());
var NzCommentActionHostDirective = /** @class */ (function (_super) {
__extends(NzCommentActionHostDirective, _super);
function NzCommentActionHostDirective(componentFactoryResolver, viewContainerRef) {
return _super.call(this, componentFactoryResolver, viewContainerRef) || this;
}
/**
* @return {?}
*/
NzCommentActionHostDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
_super.prototype.ngOnInit.call(this);
this.attach(this.nzCommentActionHost);
};
/**
* @return {?}
*/
NzCommentActionHostDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
_super.prototype.ngOnDestroy.call(this);
};
NzCommentActionHostDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzCommentActionHost]'
},] }
];
/** @nocollapse */
NzCommentActionHostDirective.ctorParameters = function () {
return [
{ type: i0.ComponentFactoryResolver },
{ type: i0.ViewContainerRef }
];
};
NzCommentActionHostDirective.propDecorators = {
nzCommentActionHost: [{ type: i0.Input }]
};
return NzCommentActionHostDirective;
}(portal.CdkPortalOutlet));
var NzCommentActionComponent = /** @class */ (function () {
function NzCommentActionComponent(viewContainerRef) {
this.viewContainerRef = viewContainerRef;
this.contentPortal = null;
}
Object.defineProperty(NzCommentActionComponent.prototype, "content", {
get: /**
* @return {?}
*/ function () {
return this.contentPortal;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzCommentActionComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.contentPortal = new portal.TemplatePortal(this.implicitContent, this.viewContainerRef);
};
NzCommentActionComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-comment-action',
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: '<ng-template><ng-content></ng-content></ng-template>'
}] }
];
/** @nocollapse */
NzCommentActionComponent.ctorParameters = function () {
return [
{ type: i0.ViewContainerRef }
];
};
NzCommentActionComponent.propDecorators = {
implicitContent: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }]
};
return NzCommentActionComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCommentComponent = /** @class */ (function () {
function NzCommentComponent() {
}
NzCommentComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-comment',
template: "<div class=\"ant-comment-inner\">\n <div class=\"ant-comment-avatar\">\n <ng-content select=\"nz-avatar[nz-comment-avatar]\"></ng-content>\n </div>\n <div class=\"ant-comment-content\">\n <div class=\"ant-comment-content-author\">\n <span *ngIf=\"nzAuthor\" class=\"ant-comment-content-author-name\">\n <ng-container *nzStringTemplateOutlet=\"nzAuthor\">{{ nzAuthor }}</ng-container>\n </span>\n <span *ngIf=\"nzDatetime\" class=\"ant-comment-content-author-time\">\n <ng-container *nzStringTemplateOutlet=\"nzDatetime\">{{ nzDatetime }}</ng-container>\n </span>\n </div>\n <ng-content select=\"nz-comment-content\"></ng-content>\n <ul class=\"ant-comment-actions\" *ngIf=\"actions?.length\">\n <li *ngFor=\"let action of actions\">\n <span><ng-template [nzCommentActionHost]=\"action.content\"></ng-template></span>\n </li>\n </ul>\n </div>\n</div>\n<div class=\"ant-comment-nested\">\n <ng-content></ng-content>\n</div>",
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
host: {
'class': 'ant-comment'
},
styles: ["\n nz-comment {\n display: block;\n }\n\n nz-comment-content {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzCommentComponent.ctorParameters = function () { return []; };
NzCommentComponent.propDecorators = {
nzAuthor: [{ type: i0.Input }],
nzDatetime: [{ type: i0.Input }],
actions: [{ type: i0.ContentChildren, args: [NzCommentActionComponent,] }]
};
return NzCommentComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_COMMENT_CELLS = [
NzCommentAvatarDirective,
NzCommentContentDirective,
NzCommentActionComponent,
NzCommentActionHostDirective
];
var NzCommentModule = /** @class */ (function () {
function NzCommentModule() {
}
NzCommentModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [
i2$1.CommonModule,
NzAddOnModule
],
exports: __spread([NzCommentComponent], NZ_COMMENT_CELLS),
declarations: __spread([NzCommentComponent], NZ_COMMENT_CELLS)
},] }
];
return NzCommentModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTimeValueAccessorDirective = /** @class */ (function () {
function NzTimeValueAccessorDirective(dateHelper, elementRef) {
this.dateHelper = dateHelper;
this.elementRef = elementRef;
}
/**
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.keyup = /**
* @return {?}
*/
function () {
this.changed();
};
/**
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.blur = /**
* @return {?}
*/
function () {
this.touched();
};
/**
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.changed = /**
* @return {?}
*/
function () {
if (this._onChange) {
/** @type {?} */
var value = this.dateHelper.parseTime(this.elementRef.nativeElement.value);
this._onChange(value);
}
};
/**
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.touched = /**
* @return {?}
*/
function () {
if (this._onTouch) {
this._onTouch();
}
};
/**
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.setRange = /**
* @return {?}
*/
function () {
this.elementRef.nativeElement.focus();
this.elementRef.nativeElement.setSelectionRange(0, this.elementRef.nativeElement.value.length);
};
/**
* @param {?} value
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.elementRef.nativeElement.value = this.dateHelper.format(value, this.nzTime);
};
/**
* @param {?} fn
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzTimeValueAccessorDirective.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._onTouch = fn;
};
NzTimeValueAccessorDirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'input[nzTime]',
providers: [
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: NzTimeValueAccessorDirective, multi: true }
]
},] }
];
/** @nocollapse */
NzTimeValueAccessorDirective.ctorParameters = function () {
return [
{ type: DateHelperService$$1 },
{ type: i0.ElementRef }
];
};
NzTimeValueAccessorDirective.propDecorators = {
nzTime: [{ type: i0.Input }],
keyup: [{ type: i0.HostListener, args: ['keyup',] }],
blur: [{ type: i0.HostListener, args: ['blur',] }]
};
return NzTimeValueAccessorDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var TimeHolder = /** @class */ (function () {
function TimeHolder() {
this._seconds = undefined;
this._hours = undefined;
this._minutes = undefined;
this._defaultOpenValue = new Date();
this._changes = new rxjs.Subject();
}
/**
* @return {?}
*/
TimeHolder.prototype.setDefaultValueIfNil = /**
* @return {?}
*/
function () {
if (!isNotNil(this._value)) {
this._value = new Date(this.defaultOpenValue);
}
};
/**
* @template THIS
* @this {THIS}
* @param {?} value
* @param {?} disabled
* @return {THIS}
*/
TimeHolder.prototype.setMinutes = /**
* @template THIS
* @this {THIS}
* @param {?} value
* @param {?} disabled
* @return {THIS}
*/
function (value, disabled) {
if (disabled) {
return ( /** @type {?} */(this));
}
( /** @type {?} */(this)).setDefaultValueIfNil();
( /** @type {?} */(this)).minutes = value;
return ( /** @type {?} */(this));
};
/**
* @template THIS
* @this {THIS}
* @param {?} value
* @param {?} disabled
* @return {THIS}
*/
TimeHolder.prototype.setHours = /**
* @template THIS
* @this {THIS}
* @param {?} value
* @param {?} disabled
* @return {THIS}
*/
function (value, disabled) {
if (disabled) {
return ( /** @type {?} */(this));
}
( /** @type {?} */(this)).setDefaultValueIfNil();
( /** @type {?} */(this)).hours = value;
return ( /** @type {?} */(this));
};
/**
* @template THIS
* @this {THIS}
* @param {?} value
* @param {?} disabled
* @return {THIS}
*/
TimeHolder.prototype.setSeconds = /**
* @template THIS
* @this {THIS}
* @param {?} value
* @param {?} disabled
* @return {THIS}
*/
function (value, disabled) {
if (disabled) {
return ( /** @type {?} */(this));
}
( /** @type {?} */(this)).setDefaultValueIfNil();
( /** @type {?} */(this)).seconds = value;
return ( /** @type {?} */(this));
};
Object.defineProperty(TimeHolder.prototype, "changes", {
get: /**
* @return {?}
*/ function () {
return this._changes.asObservable();
},
enumerable: true,
configurable: true
});
Object.defineProperty(TimeHolder.prototype, "value", {
get: /**
* @return {?}
*/ function () {
return this._value;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value !== this._value) {
this._value = value;
if (isNotNil(this._value)) {
this._hours = this._value.getHours();
this._minutes = this._value.getMinutes();
this._seconds = this._value.getSeconds();
}
else {
this._clear();
}
}
},
enumerable: true,
configurable: true
});
/**
* @template THIS
* @this {THIS}
* @param {?} value
* @return {THIS}
*/
TimeHolder.prototype.setValue = /**
* @template THIS
* @this {THIS}
* @param {?} value
* @return {THIS}
*/
function (value) {
( /** @type {?} */(this)).value = value;
return ( /** @type {?} */(this));
};
/**
* @return {?}
*/
TimeHolder.prototype.clear = /**
* @return {?}
*/
function () {
this._clear();
this.update();
};
Object.defineProperty(TimeHolder.prototype, "isEmpty", {
get: /**
* @return {?}
*/ function () {
return !(isNotNil(this._hours) || isNotNil(this._minutes) || isNotNil(this._seconds));
},
enumerable: true,
configurable: true
});
/**
* @private
* @return {?}
*/
TimeHolder.prototype._clear = /**
* @private
* @return {?}
*/
function () {
this._hours = undefined;
this._minutes = undefined;
this._seconds = undefined;
};
/**
* @private
* @return {?}
*/
TimeHolder.prototype.update = /**
* @private
* @return {?}
*/
function () {
if (this.isEmpty) {
this._value = undefined;
}
else {
if (!isNotNil(this._hours)) {
this._hours = this.defaultHours;
}
else {
this._value.setHours(this.hours);
}
if (!isNotNil(this._minutes)) {
this._minutes = this.defaultMinutes;
}
else {
this._value.setMinutes(this.minutes);
}
if (!isNotNil(this._seconds)) {
this._seconds = this.defaultSeconds;
}
else {
this._value.setSeconds(this.seconds);
}
this._value = new Date(this._value);
}
this.changed();
};
/**
* @return {?}
*/
TimeHolder.prototype.changed = /**
* @return {?}
*/
function () {
this._changes.next(this._value);
};
Object.defineProperty(TimeHolder.prototype, "hours", {
get: /**
* @return {?}
*/ function () {
return this._hours;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value !== this._hours) {
this._hours = value;
this.update();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(TimeHolder.prototype, "minutes", {
get: /**
* @return {?}
*/ function () {
return this._minutes;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value !== this._minutes) {
this._minutes = value;
this.update();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(TimeHolder.prototype, "seconds", {
get: /**
* @return {?}
*/ function () {
return this._seconds;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value !== this._seconds) {
this._seconds = value;
this.update();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(TimeHolder.prototype, "defaultOpenValue", {
get: /**
* @return {?}
*/ function () {
return this._defaultOpenValue;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (this._defaultOpenValue !== value) {
this._defaultOpenValue = value;
this.update();
}
},
enumerable: true,
configurable: true
});
/**
* @template THIS
* @this {THIS}
* @param {?} value
* @return {THIS}
*/
TimeHolder.prototype.setDefaultOpenValue = /**
* @template THIS
* @this {THIS}
* @param {?} value
* @return {THIS}
*/
function (value) {
( /** @type {?} */(this)).defaultOpenValue = value;
return ( /** @type {?} */(this));
};
Object.defineProperty(TimeHolder.prototype, "defaultHours", {
get: /**
* @return {?}
*/ function () {
return this._defaultOpenValue.getHours();
},
enumerable: true,
configurable: true
});
Object.defineProperty(TimeHolder.prototype, "defaultMinutes", {
get: /**
* @return {?}
*/ function () {
return this._defaultOpenValue.getMinutes();
},
enumerable: true,
configurable: true
});
Object.defineProperty(TimeHolder.prototype, "defaultSeconds", {
get: /**
* @return {?}
*/ function () {
return this._defaultOpenValue.getSeconds();
},
enumerable: true,
configurable: true
});
return TimeHolder;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} length
* @param {?=} step
* @return {?}
*/
function makeRange(length, step) {
if (step === void 0) {
step = 1;
}
return new Array(Math.ceil(length / step)).fill(0).map(( /**
* @param {?} _
* @param {?} i
* @return {?}
*/function (_, i) { return i * step; }));
}
var NzTimePickerPanelComponent = /** @class */ (function () {
function NzTimePickerPanelComponent(element, updateCls, cdr) {
this.element = element;
this.updateCls = updateCls;
this.cdr = cdr;
this._nzHourStep = 1;
this._nzMinuteStep = 1;
this._nzSecondStep = 1;
this.unsubscribe$ = new rxjs.Subject();
this._format = 'HH:mm:ss';
this._defaultOpenValue = new Date();
this._opened = false;
this._allowEmpty = true;
this.prefixCls = 'ant-time-picker-panel';
this.time = new TimeHolder();
this.hourEnabled = true;
this.minuteEnabled = true;
this.secondEnabled = true;
this.enabledColumns = 3;
this.nzInDatePicker = false; // If inside a date-picker, more diff works need to be done
this.nzHideDisabledOptions = false;
}
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzAllowEmpty", {
get: /**
* @return {?}
*/ function () {
return this._allowEmpty;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._allowEmpty = value;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "opened", {
get: /**
* @return {?}
*/ function () {
return this._opened;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._opened = value;
if (this.opened) {
this.initPosition();
this.selectInputRange();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzDefaultOpenValue", {
get: /**
* @return {?}
*/ function () {
return this._defaultOpenValue;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._defaultOpenValue = value;
this.time.setDefaultOpenValue(this.nzDefaultOpenValue);
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzDisabledHours", {
get: /**
* @return {?}
*/ function () {
return this._disabledHours;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._disabledHours = value;
if (this._disabledHours) {
this.buildHours();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzDisabledMinutes", {
get: /**
* @return {?}
*/ function () {
return this._disabledMinutes;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._disabledMinutes = value;
this.buildMinutes();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzDisabledSeconds", {
get: /**
* @return {?}
*/ function () {
return this._disabledSeconds;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._disabledSeconds = value;
this.buildSeconds();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "format", {
get: /**
* @return {?}
*/ function () {
return this._format;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._format = value;
this.enabledColumns = 0;
/** @type {?} */
var charSet = new Set(value);
this.hourEnabled = charSet.has('H') || charSet.has('h');
this.minuteEnabled = charSet.has('m');
this.secondEnabled = charSet.has('s');
if (this.hourEnabled) {
this.enabledColumns++;
}
if (this.minuteEnabled) {
this.enabledColumns++;
}
if (this.secondEnabled) {
this.enabledColumns++;
}
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzHourStep", {
get: /**
* @return {?}
*/ function () {
return this._nzHourStep;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._nzHourStep = value;
this.buildHours();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzMinuteStep", {
get: /**
* @return {?}
*/ function () {
return this._nzMinuteStep;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._nzMinuteStep = value;
this.buildMinutes();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerPanelComponent.prototype, "nzSecondStep", {
get: /**
* @return {?}
*/ function () {
return this._nzSecondStep;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._nzSecondStep = value;
this.buildSeconds();
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.selectInputRange = /**
* @return {?}
*/
function () {
var _this = this;
setTimeout(( /**
* @return {?}
*/function () {
if (_this.nzTimeValueAccessorDirective) {
_this.nzTimeValueAccessorDirective.setRange();
}
}));
};
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.buildHours = /**
* @return {?}
*/
function () {
var _this = this;
this.hourRange = makeRange(24, this.nzHourStep).map(( /**
* @param {?} r
* @return {?}
*/function (r) {
return {
index: r,
disabled: _this.nzDisabledHours && (_this.nzDisabledHours().indexOf(r) !== -1)
};
}));
};
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.buildMinutes = /**
* @return {?}
*/
function () {
var _this = this;
this.minuteRange = makeRange(60, this.nzMinuteStep).map(( /**
* @param {?} r
* @return {?}
*/function (r) {
return {
index: r,
disabled: _this.nzDisabledMinutes && (_this.nzDisabledMinutes(_this.time.hours).indexOf(r) !== -1)
};
}));
};
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.buildSeconds = /**
* @return {?}
*/
function () {
var _this = this;
this.secondRange = makeRange(60, this.nzSecondStep).map(( /**
* @param {?} r
* @return {?}
*/function (r) {
return {
index: r,
disabled: _this.nzDisabledSeconds && (_this.nzDisabledSeconds(_this.time.hours, _this.time.minutes).indexOf(r) !== -1)
};
}));
};
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.buildTimes = /**
* @return {?}
*/
function () {
this.buildHours();
this.buildMinutes();
this.buildSeconds();
};
/**
* @param {?} hour
* @return {?}
*/
NzTimePickerPanelComponent.prototype.selectHour = /**
* @param {?} hour
* @return {?}
*/
function (hour) {
this.time.setHours(hour.index, hour.disabled);
this.scrollToSelected(this.hourListElement.nativeElement, hour.index, 120, 'hour');
if (this._disabledMinutes) {
this.buildMinutes();
}
if (this._disabledSeconds || this._disabledMinutes) {
this.buildSeconds();
}
};
/**
* @param {?} minute
* @return {?}
*/
NzTimePickerPanelComponent.prototype.selectMinute = /**
* @param {?} minute
* @return {?}
*/
function (minute) {
this.time.setMinutes(minute.index, minute.disabled);
this.scrollToSelected(this.minuteListElement.nativeElement, minute.index, 120, 'minute');
if (this._disabledSeconds) {
this.buildSeconds();
}
};
/**
* @param {?} second
* @return {?}
*/
NzTimePickerPanelComponent.prototype.selectSecond = /**
* @param {?} second
* @return {?}
*/
function (second) {
this.time.setSeconds(second.index, second.disabled);
this.scrollToSelected(this.secondListElement.nativeElement, second.index, 120, 'second');
};
/**
* @param {?} instance
* @param {?} index
* @param {?=} duration
* @param {?=} unit
* @return {?}
*/
NzTimePickerPanelComponent.prototype.scrollToSelected = /**
* @param {?} instance
* @param {?} index
* @param {?=} duration
* @param {?=} unit
* @return {?}
*/
function (instance, index, duration, unit) {
if (duration === void 0) {
duration = 0;
}
/** @type {?} */
var transIndex = this.translateIndex(index, unit);
/** @type {?} */
var currentOption = ( /** @type {?} */((instance.children[0].children[transIndex] || instance.children[0].children[0])));
this.scrollTo(instance, currentOption.offsetTop, duration);
};
/**
* @param {?} index
* @param {?} unit
* @return {?}
*/
NzTimePickerPanelComponent.prototype.translateIndex = /**
* @param {?} index
* @param {?} unit
* @return {?}
*/
function (index, unit) {
if (unit === 'hour') {
/** @type {?} */
var disabledHours = this.nzDisabledHours && this.nzDisabledHours();
return this.calcIndex(disabledHours, this.hourRange.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.index; })).indexOf(index));
}
else if (unit === 'minute') {
/** @type {?} */
var disabledMinutes = this.nzDisabledMinutes && this.nzDisabledMinutes(this.time.hours);
return this.calcIndex(disabledMinutes, this.minuteRange.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.index; })).indexOf(index));
}
else if (unit === 'second') {
/** @type {?} */
var disabledSeconds = this.nzDisabledSeconds && this.nzDisabledSeconds(this.time.hours, this.time.minutes);
return this.calcIndex(disabledSeconds, this.secondRange.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.index; })).indexOf(index));
}
};
/**
* @param {?} element
* @param {?} to
* @param {?} duration
* @return {?}
*/
NzTimePickerPanelComponent.prototype.scrollTo = /**
* @param {?} element
* @param {?} to
* @param {?} duration
* @return {?}
*/
function (element, to, duration) {
var _this = this;
if (duration <= 0) {
element.scrollTop = to;
return;
}
/** @type {?} */
var difference = to - element.scrollTop;
/** @type {?} */
var perTick = difference / duration * 10;
reqAnimFrame(( /**
* @return {?}
*/function () {
element.scrollTop = element.scrollTop + perTick;
if (element.scrollTop === to) {
return;
}
_this.scrollTo(element, to, duration - 10);
}));
};
/**
* @param {?} array
* @param {?} index
* @return {?}
*/
NzTimePickerPanelComponent.prototype.calcIndex = /**
* @param {?} array
* @param {?} index
* @return {?}
*/
function (array, index) {
if (array && array.length && this.nzHideDisabledOptions) {
return index - array.reduce(( /**
* @param {?} pre
* @param {?} value
* @return {?}
*/function (pre, value) {
return pre + (value < index ? 1 : 0);
}), 0);
}
else {
return index;
}
};
/**
* @protected
* @return {?}
*/
NzTimePickerPanelComponent.prototype.changed = /**
* @protected
* @return {?}
*/
function () {
if (this.onChange) {
this.onChange(this.time.value);
}
};
/**
* @protected
* @return {?}
*/
NzTimePickerPanelComponent.prototype.touched = /**
* @protected
* @return {?}
*/
function () {
if (this.onTouch) {
this.onTouch();
}
};
/**
* @private
* @return {?}
*/
NzTimePickerPanelComponent.prototype.setClassMap = /**
* @private
* @return {?}
*/
function () {
var _a;
this.updateCls.updateHostClass(this.element.nativeElement, (_a = {},
_a["" + this.prefixCls] = true,
_a[this.prefixCls + "-column-" + this.enabledColumns] = this.nzInDatePicker ? false : true,
_a[this.prefixCls + "-narrow"] = this.enabledColumns < 3,
_a[this.prefixCls + "-placement-bottomLeft"] = this.nzInDatePicker ? false : true,
_a));
};
/**
* @param {?} hour
* @return {?}
*/
NzTimePickerPanelComponent.prototype.isSelectedHour = /**
* @param {?} hour
* @return {?}
*/
function (hour) {
return (hour.index === this.time.hours) || (!isNotNil(this.time.hours) && (hour.index === this.time.defaultHours));
};
/**
* @param {?} minute
* @return {?}
*/
NzTimePickerPanelComponent.prototype.isSelectedMinute = /**
* @param {?} minute
* @return {?}
*/
function (minute) {
return (minute.index === this.time.minutes) || (!isNotNil(this.time.minutes) && (minute.index === this.time.defaultMinutes));
};
/**
* @param {?} second
* @return {?}
*/
NzTimePickerPanelComponent.prototype.isSelectedSecond = /**
* @param {?} second
* @return {?}
*/
function (second) {
return (second.index === this.time.seconds) || (!isNotNil(this.time.seconds) && (second.index === this.time.defaultSeconds));
};
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.initPosition = /**
* @return {?}
*/
function () {
var _this = this;
setTimeout(( /**
* @return {?}
*/function () {
if (_this.hourEnabled && _this.hourListElement) {
if (isNotNil(_this.time.hours)) {
_this.scrollToSelected(_this.hourListElement.nativeElement, _this.time.hours, 0, 'hour');
}
else {
_this.scrollToSelected(_this.hourListElement.nativeElement, _this.time.defaultHours, 0, 'hour');
}
}
if (_this.minuteEnabled && _this.minuteListElement) {
if (isNotNil(_this.time.minutes)) {
_this.scrollToSelected(_this.minuteListElement.nativeElement, _this.time.minutes, 0, 'minute');
}
else {
_this.scrollToSelected(_this.minuteListElement.nativeElement, _this.time.defaultMinutes, 0, 'minute');
}
}
if (_this.secondEnabled && _this.secondListElement) {
if (isNotNil(_this.time.seconds)) {
_this.scrollToSelected(_this.secondListElement.nativeElement, _this.time.seconds, 0, 'second');
}
else {
_this.scrollToSelected(_this.secondListElement.nativeElement, _this.time.defaultSeconds, 0, 'second');
}
}
}));
};
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.nzInDatePicker) {
this.prefixCls = 'ant-calendar-time-picker';
}
this.time.changes.pipe(operators.takeUntil(this.unsubscribe$)).subscribe(( /**
* @return {?}
*/function () {
_this.changed();
_this.touched();
}));
this.buildTimes();
this.setClassMap();
};
/**
* @return {?}
*/
NzTimePickerPanelComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.unsubscribe$.next();
this.unsubscribe$.complete();
};
/**
* @param {?} value
* @return {?}
*/
NzTimePickerPanelComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.time.value = value;
this.buildTimes();
// Mark this component to be checked manually with internal properties changing (see: https://github.com/angular/angular/issues/10816)
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzTimePickerPanelComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzTimePickerPanelComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouch = fn;
};
NzTimePickerPanelComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
selector: 'nz-time-picker-panel',
template: "<div class=\"{{ nzInDatePicker ? prefixCls + '-panel' : '' }}\">\n <div\n class=\"{{ prefixCls }}-inner {{ nzInDatePicker ? prefixCls + '-column-' + enabledColumns : '' }}\"\n [style.width.px]=\"nzInDatePicker ? null : enabledColumns * 56\">\n <div class=\"{{ prefixCls }}-input-wrap\">\n <input\n type=\"text\"\n class=\"{{ prefixCls }}-input\"\n [placeholder]=\"nzPlaceHolder\"\n [nzTime]=\"format\"\n [(ngModel)]=\"time.value\"\n (blur)=\"time.changed()\">\n </div>\n <div class=\"{{ prefixCls }}-combobox\">\n <div\n *ngIf=\"hourEnabled\"\n #hourListElement\n class=\"{{ prefixCls }}-select\">\n <ul>\n <ng-container *ngFor=\"let hour of hourRange\">\n <li\n *ngIf=\"!(nzHideDisabledOptions && hour.disabled)\"\n (click)=\"selectHour(hour)\"\n class=\"\n {{ isSelectedHour(hour) ? prefixCls + '-select-option-selected' : '' }}\n {{ hour.disabled ? prefixCls + '-select-option-disabled' : '' }}\n \"\n >\n {{ hour.index | number:'2.0-0' }}\n </li>\n </ng-container>\n </ul>\n </div>\n <div\n *ngIf=\"minuteEnabled\"\n #minuteListElement\n class=\"{{ prefixCls }}-select\">\n <ul>\n <ng-container *ngFor=\"let minute of minuteRange\">\n <li\n *ngIf=\"!(nzHideDisabledOptions && minute.disabled)\"\n (click)=\"selectMinute(minute)\"\n class=\"\n {{ isSelectedMinute(minute) ? prefixCls + '-select-option-selected' : '' }}\n {{ minute.disabled ? prefixCls + '-select-option-disabled' : '' }}\n \"\n >\n {{ minute.index | number:'2.0-0' }}\n </li>\n </ng-container>\n </ul>\n </div>\n <div\n *ngIf=\"secondEnabled\"\n #secondListElement\n class=\"{{ prefixCls }}-select\">\n <ul>\n <ng-container *ngFor=\"let second of secondRange\">\n <li\n *ngIf=\"!(nzHideDisabledOptions && second.disabled)\"\n (click)=\"selectSecond(second)\"\n class=\"\n {{ isSelectedSecond(second) ? prefixCls + '-select-option-selected' : '' }}\n {{ second.disabled ? prefixCls + '-select-option-disabled' : '' }}\n \"\n >\n {{ second.index | number:'2.0-0' }}\n </li>\n </ng-container>\n </ul>\n </div>\n </div>\n <div class=\"{{ prefixCls }}-addon\" *ngIf=\"nzAddOn\">\n <ng-template [ngTemplateOutlet]=\"nzAddOn\"></ng-template>\n </div>\n </div>\n</div>",
providers: [
NzUpdateHostClassService,
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: NzTimePickerPanelComponent, multi: true }
]
}] }
];
/** @nocollapse */
NzTimePickerPanelComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzUpdateHostClassService },
{ type: i0.ChangeDetectorRef }
];
};
NzTimePickerPanelComponent.propDecorators = {
nzTimeValueAccessorDirective: [{ type: i0.ViewChild, args: [NzTimeValueAccessorDirective,] }],
hourListElement: [{ type: i0.ViewChild, args: ['hourListElement',] }],
minuteListElement: [{ type: i0.ViewChild, args: ['minuteListElement',] }],
secondListElement: [{ type: i0.ViewChild, args: ['secondListElement',] }],
nzInDatePicker: [{ type: i0.Input }],
nzAddOn: [{ type: i0.Input }],
nzHideDisabledOptions: [{ type: i0.Input }],
nzClearText: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzAllowEmpty: [{ type: i0.Input }],
opened: [{ type: i0.Input }],
nzDefaultOpenValue: [{ type: i0.Input }],
nzDisabledHours: [{ type: i0.Input }],
nzDisabledMinutes: [{ type: i0.Input }],
nzDisabledSeconds: [{ type: i0.Input }],
format: [{ type: i0.Input }],
nzHourStep: [{ type: i0.Input }],
nzMinuteStep: [{ type: i0.Input }],
nzSecondStep: [{ type: i0.Input }]
};
return NzTimePickerPanelComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTimePickerComponent = /** @class */ (function () {
function NzTimePickerComponent(element, renderer, updateCls, cdr) {
this.element = element;
this.renderer = renderer;
this.updateCls = updateCls;
this.cdr = cdr;
this._disabled = false;
this._value = null;
this._allowEmpty = true;
this._autoFocus = false;
this._hideDisabledOptions = false;
this.isInit = false;
this.overlayPositions = [{
originX: 'start',
originY: 'top',
overlayX: 'end',
overlayY: 'top',
offsetX: 0,
offsetY: 0
}];
this.nzSize = null;
this.nzHourStep = 1;
this.nzMinuteStep = 1;
this.nzSecondStep = 1;
this.nzClearText = 'clear';
this.nzPopupClassName = '';
this.nzPlaceHolder = '';
this.nzDefaultOpenValue = new Date();
this.nzFormat = 'HH:mm:ss';
this.nzOpen = false;
this.nzOpenChange = new i0.EventEmitter();
}
Object.defineProperty(NzTimePickerComponent.prototype, "nzHideDisabledOptions", {
get: /**
* @return {?}
*/ function () {
return this._hideDisabledOptions;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._hideDisabledOptions = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerComponent.prototype, "nzAllowEmpty", {
get: /**
* @return {?}
*/ function () {
return this._allowEmpty;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._allowEmpty = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerComponent.prototype, "nzAutoFocus", {
get: /**
* @return {?}
*/ function () {
return this._autoFocus;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._autoFocus = toBoolean(value);
this.updateAutoFocus();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerComponent.prototype, "nzDisabled", {
get: /**
* @return {?}
*/ function () {
return this._disabled;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._disabled = toBoolean(value);
/** @type {?} */
var input = ( /** @type {?} */(this.inputRef.nativeElement));
if (this._disabled) {
this.renderer.setAttribute(input, 'disabled', '');
}
else {
this.renderer.removeAttribute(input, 'disabled');
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTimePickerComponent.prototype, "value", {
get: /**
* @return {?}
*/ function () {
return this._value;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._value = value;
if (this._onChange) {
this._onChange(this.value);
}
if (this._onTouched) {
this._onTouched();
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzTimePickerComponent.prototype.open = /**
* @return {?}
*/
function () {
if (this.nzDisabled) {
return;
}
this.nzOpen = true;
this.nzOpenChange.emit(this.nzOpen);
};
/**
* @return {?}
*/
NzTimePickerComponent.prototype.close = /**
* @return {?}
*/
function () {
this.nzOpen = false;
this.nzOpenChange.emit(this.nzOpen);
};
/**
* @return {?}
*/
NzTimePickerComponent.prototype.updateAutoFocus = /**
* @return {?}
*/
function () {
if (this.isInit && !this.nzDisabled) {
if (this.nzAutoFocus) {
this.renderer.setAttribute(this.inputRef.nativeElement, 'autofocus', 'autofocus');
}
else {
this.renderer.removeAttribute(this.inputRef.nativeElement, 'autofocus');
}
}
};
/**
* @return {?}
*/
NzTimePickerComponent.prototype.onClickClearBtn = /**
* @return {?}
*/
function () {
this.value = null;
};
/**
* @private
* @return {?}
*/
NzTimePickerComponent.prototype.setClassMap = /**
* @private
* @return {?}
*/
function () {
var _a;
this.updateCls.updateHostClass(this.element.nativeElement, (_a = {},
_a["ant-time-picker"] = true,
_a["ant-time-picker-" + this.nzSize] = isNotNil(this.nzSize),
_a));
};
/**
* @return {?}
*/
NzTimePickerComponent.prototype.focus = /**
* @return {?}
*/
function () {
if (this.inputRef.nativeElement) {
this.inputRef.nativeElement.focus();
}
};
/**
* @return {?}
*/
NzTimePickerComponent.prototype.blur = /**
* @return {?}
*/
function () {
if (this.inputRef.nativeElement) {
this.inputRef.nativeElement.blur();
}
};
/**
* @return {?}
*/
NzTimePickerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
this.origin = new i2$2.CdkOverlayOrigin(this.element);
};
/**
* @return {?}
*/
NzTimePickerComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.isInit = true;
this.updateAutoFocus();
};
/**
* @param {?} time
* @return {?}
*/
NzTimePickerComponent.prototype.writeValue = /**
* @param {?} time
* @return {?}
*/
function (time) {
this._value = time;
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzTimePickerComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzTimePickerComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this._onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzTimePickerComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
NzTimePickerComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
selector: 'nz-time-picker',
template: "<input\n type=\"text\"\n [nzTime]=\"nzFormat\"\n class=\"ant-time-picker-input\"\n [placeholder]=\"nzPlaceHolder || ('TimePicker.placeholder' | nzI18n)\"\n [(ngModel)]=\"value\"\n readonly=\"readonly\"\n (click)=\"open()\"\n #inputElement>\n<span class=\"ant-time-picker-icon\">\n <i nz-icon type=\"clock-circle\"></i>\n</span>\n<i\n *ngIf=\"nzAllowEmpty && value\"\n nz-icon\n type=\"close-circle\"\n theme=\"fill\"\n class=\"anticon anticon-close-circle ant-time-picker-clear\"\n tabindex=\"-1\"\n [attr.aria-label]=\"nzClearText\"\n [attr.title]=\"nzClearText\"\n (click)=\"onClickClearBtn()\"\n></i>\n\n<ng-template\n cdkConnectedOverlay\n nzConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"nzOpen\"\n [cdkConnectedOverlayOffsetY]=\"-2\"\n (detach)=\"close()\"\n (backdropClick)=\"close()\">\n <nz-time-picker-panel\n [ngClass]=\"nzPopupClassName\"\n [@slideMotion]=\"'bottom'\"\n [format]=\"nzFormat\"\n [nzHourStep]=\"nzHourStep\"\n [nzMinuteStep]=\"nzMinuteStep\"\n [nzSecondStep]=\"nzSecondStep\"\n [nzDisabledHours]=\"nzDisabledHours\"\n [nzDisabledMinutes]=\"nzDisabledMinutes\"\n [nzDisabledSeconds]=\"nzDisabledSeconds\"\n [nzPlaceHolder]=\"nzPlaceHolder || ('TimePicker.placeholder' | nzI18n)\"\n [nzHideDisabledOptions]=\"nzHideDisabledOptions\"\n [nzDefaultOpenValue]=\"nzDefaultOpenValue\"\n [nzAddOn]=\"nzAddOn\"\n [opened]=\"nzOpen\"\n [nzClearText]=\"nzClearText\"\n [nzAllowEmpty]=\"nzAllowEmpty\"\n [(ngModel)]=\"value\">\n </nz-time-picker-panel>\n</ng-template>\n\n",
animations: [slideMotion],
providers: [
NzUpdateHostClassService,
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: NzTimePickerComponent, multi: true }
]
}] }
];
/** @nocollapse */
NzTimePickerComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: NzUpdateHostClassService },
{ type: i0.ChangeDetectorRef }
];
};
NzTimePickerComponent.propDecorators = {
inputRef: [{ type: i0.ViewChild, args: ['inputElement',] }],
nzSize: [{ type: i0.Input }],
nzHourStep: [{ type: i0.Input }],
nzMinuteStep: [{ type: i0.Input }],
nzSecondStep: [{ type: i0.Input }],
nzClearText: [{ type: i0.Input }],
nzPopupClassName: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzAddOn: [{ type: i0.Input }],
nzDefaultOpenValue: [{ type: i0.Input }],
nzDisabledHours: [{ type: i0.Input }],
nzDisabledMinutes: [{ type: i0.Input }],
nzDisabledSeconds: [{ type: i0.Input }],
nzFormat: [{ type: i0.Input }],
nzOpen: [{ type: i0.Input }],
nzOpenChange: [{ type: i0.Output }],
nzHideDisabledOptions: [{ type: i0.Input }],
nzAllowEmpty: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }]
};
return NzTimePickerComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTimePickerModule = /** @class */ (function () {
function NzTimePickerModule() {
}
NzTimePickerModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [
NzTimePickerComponent,
NzTimePickerPanelComponent,
NzTimeValueAccessorDirective
],
exports: [
NzTimePickerPanelComponent,
NzTimePickerComponent
],
imports: [i2$1.CommonModule, forms.FormsModule, NzI18nModule, i2$2.OverlayModule, NzIconModule, NzOverlayModule],
entryComponents: []
},] }
];
return NzTimePickerModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarFooterComponent = /** @class */ (function () {
function CalendarFooterComponent() {
this.showToday = false;
this.hasTimePicker = false;
this.isRange = false;
this.showTimePicker = false;
this.showTimePickerChange = new i0.EventEmitter();
this.timePickerDisabled = false;
this.okDisabled = false;
this.clickOk = new i0.EventEmitter();
this.clickToday = new i0.EventEmitter();
this.prefixCls = 'ant-calendar';
this.isTemplateRef = isTemplateRef;
this.isNonEmptyString = isNonEmptyString;
}
CalendarFooterComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'calendar-footer',
template: "<div class=\"{{ prefixCls }}-footer {{ isRange ? prefixCls + '-range-bottom' : '' }} {{ hasTimePicker ? prefixCls + '-footer-show-ok' : '' }}\">\n <div *ngIf=\"rangeQuickSelector\" class=\"{{ prefixCls }}-footer-extra {{ prefixCls }}-range-quick-selector\">\n <ng-container *ngTemplateOutlet=\"rangeQuickSelector\"></ng-container>\n </div>\n <div *ngIf=\"extraFooter\" class=\"{{ prefixCls }}-footer-extra {{ isRange ? prefixCls + '-range-quick-selector' : '' }}\">\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 <span *ngIf=\"showToday || hasTimePicker\" class=\"{{ prefixCls }}-footer-btn\">\n <today-button\n *ngIf=\"showToday\"\n [locale]=\"locale\"\n [disabledDate]=\"disabledDate\"\n [hasTimePicker]=\"hasTimePicker\"\n (clickToday)=\"clickToday.emit($event)\"\n ></today-button>\n <time-picker-button\n *ngIf=\"hasTimePicker\"\n [locale]=\"locale\"\n [timePickerDisabled]=\"timePickerDisabled\"\n [showTimePicker]=\"showTimePicker\"\n (showTimePickerChange)=\"showTimePickerChange.emit($event)\"\n ></time-picker-button>\n <ok-button\n *ngIf=\"hasTimePicker\"\n [okDisabled]=\"okDisabled\"\n [locale]=\"locale\"\n (clickOk)=\"clickOk.emit()\"\n ></ok-button>\n </span>\n</div>"
}] }
];
CalendarFooterComponent.propDecorators = {
locale: [{ type: i0.Input }],
showToday: [{ type: i0.Input }],
hasTimePicker: [{ type: i0.Input }],
isRange: [{ type: i0.Input }],
showTimePicker: [{ type: i0.Input }],
showTimePickerChange: [{ type: i0.Output }],
timePickerDisabled: [{ type: i0.Input }],
okDisabled: [{ type: i0.Input }],
disabledDate: [{ type: i0.Input }],
extraFooter: [{ type: i0.Input }],
rangeQuickSelector: [{ type: i0.Input }],
clickOk: [{ type: i0.Output }],
clickToday: [{ type: i0.Output }]
};
return CalendarFooterComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Wrapping kind APIs for date operating and unify
* NOTE: every new API return new CandyDate object without side effects to the former Date object
* NOTE: most APIs are based on local time other than customized locale id (this needs tobe support in future)
* TODO: support format() against to angular's core API
*/
var /**
* Wrapping kind APIs for date operating and unify
* NOTE: every new API return new CandyDate object without side effects to the former Date object
* NOTE: most APIs are based on local time other than customized locale id (this needs tobe support in future)
* TODO: support format() against to angular's core API
*/ CandyDate = /** @class */ (function () {
// locale: string; // Custom specified locale ID
function CandyDate(date) {
// if (!(this instanceof CandyDate)) {
// return new CandyDate(date);
// }
if (date) {
if (date instanceof Date) {
this.nativeDate = date;
}
else if (typeof date === 'string') {
this.nativeDate = new Date(date);
}
else {
throw new Error('The input date type is not supported ("Date" and "string" is now recommended)');
}
}
else {
this.nativeDate = new Date();
}
}
// getLocale(): string {
// return this.locale;
// }
// setLocale(locale: string): CandyDate {
// this.locale = locale;
// return this;
// }
// ---------------------------------------------------------------------
// | Native shortcuts
// ---------------------------------------------------------------------
// getLocale(): string {
// return this.locale;
// }
// setLocale(locale: string): CandyDate {
// this.locale = locale;
// return this;
// }
// ---------------------------------------------------------------------
// | Native shortcuts
// ---------------------------------------------------------------------
/**
* @return {?}
*/
CandyDate.prototype.getYear =
// getLocale(): string {
// return this.locale;
// }
// setLocale(locale: string): CandyDate {
// this.locale = locale;
// return this;
// }
// ---------------------------------------------------------------------
// | Native shortcuts
// ---------------------------------------------------------------------
/**
* @return {?}
*/
function () {
return this.nativeDate.getFullYear();
};
/**
* @return {?}
*/
CandyDate.prototype.getMonth = /**
* @return {?}
*/
function () {
return this.nativeDate.getMonth();
};
/**
* @return {?}
*/
CandyDate.prototype.getDay = /**
* @return {?}
*/
function () {
return this.nativeDate.getDay();
};
/**
* @return {?}
*/
CandyDate.prototype.getTime = /**
* @return {?}
*/
function () {
return this.nativeDate.getTime();
};
/**
* @return {?}
*/
CandyDate.prototype.getDate = /**
* @return {?}
*/
function () {
return this.nativeDate.getDate();
};
/**
* @return {?}
*/
CandyDate.prototype.getHours = /**
* @return {?}
*/
function () {
return this.nativeDate.getHours();
};
/**
* @return {?}
*/
CandyDate.prototype.getMinutes = /**
* @return {?}
*/
function () {
return this.nativeDate.getMinutes();
};
/**
* @return {?}
*/
CandyDate.prototype.getSeconds = /**
* @return {?}
*/
function () {
return this.nativeDate.getSeconds();
};
/**
* @return {?}
*/
CandyDate.prototype.getMilliseconds = /**
* @return {?}
*/
function () {
return this.nativeDate.getMilliseconds();
};
// ---------------------------------------------------------------------
// | New implementing APIs
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// | New implementing APIs
// ---------------------------------------------------------------------
/**
* @return {?}
*/
CandyDate.prototype.clone =
// ---------------------------------------------------------------------
// | New implementing APIs
// ---------------------------------------------------------------------
/**
* @return {?}
*/
function () {
return new CandyDate(new Date(this.nativeDate));
};
/**
* @param {?} hour
* @param {?} minute
* @param {?} second
* @return {?}
*/
CandyDate.prototype.setHms = /**
* @param {?} hour
* @param {?} minute
* @param {?} second
* @return {?}
*/
function (hour, minute, second) {
/** @type {?} */
var date = new Date(this.nativeDate);
date.setHours(hour, minute, second);
return new CandyDate(date);
};
/**
* @param {?} year
* @return {?}
*/
CandyDate.prototype.setYear = /**
* @param {?} year
* @return {?}
*/
function (year) {
// return new CandyDate(setYear(this.date, year));
/** @type {?} */
var date = new Date(this.nativeDate);
date.setFullYear(year);
return new CandyDate(date);
};
/**
* @param {?} amount
* @return {?}
*/
CandyDate.prototype.addYears = /**
* @param {?} amount
* @return {?}
*/
function (amount) {
return new CandyDate(addYears(this.nativeDate, amount));
};
// NOTE: month starts from 0
// NOTE: Don't use the native API for month manipulation as it not restrict the date when it overflows, eg. (new Date('2018-7-31')).setMonth(1) will be date of 2018-3-03 instead of 2018-2-28
// NOTE: month starts from 0
// NOTE: Don't use the native API for month manipulation as it not restrict the date when it overflows, eg. (new Date('2018-7-31')).setMonth(1) will be date of 2018-3-03 instead of 2018-2-28
/**
* @param {?} month
* @return {?}
*/
CandyDate.prototype.setMonth =
// NOTE: month starts from 0
// NOTE: Don't use the native API for month manipulation as it not restrict the date when it overflows, eg. (new Date('2018-7-31')).setMonth(1) will be date of 2018-3-03 instead of 2018-2-28
/**
* @param {?} month
* @return {?}
*/
function (month) {
// const date = new Date(this.nativeDate);
// date.setMonth(month);
// return new CandyDate(date);
return new CandyDate(setMonth(this.nativeDate, month));
};
/**
* @param {?} amount
* @return {?}
*/
CandyDate.prototype.addMonths = /**
* @param {?} amount
* @return {?}
*/
function (amount) {
return new CandyDate(addMonths(this.nativeDate, amount));
};
/**
* @param {?} day
* @param {?=} options
* @return {?}
*/
CandyDate.prototype.setDay = /**
* @param {?} day
* @param {?=} options
* @return {?}
*/
function (day, options) {
return new CandyDate(setDay(this.nativeDate, day, options));
};
/**
* @param {?} amount
* @return {?}
*/
CandyDate.prototype.setDate = /**
* @param {?} amount
* @return {?}
*/
function (amount) {
/** @type {?} */
var date = new Date(this.nativeDate);
date.setDate(amount);
return new CandyDate(date);
};
/**
* @param {?} amount
* @return {?}
*/
CandyDate.prototype.addDays = /**
* @param {?} amount
* @return {?}
*/
function (amount) {
return this.setDate(this.getDate() + amount);
};
/**
* @param {?} grain
* @return {?}
*/
CandyDate.prototype.endOf = /**
* @param {?} grain
* @return {?}
*/
function (grain) {
switch (grain) {
case 'month': return new CandyDate(endOfMonth(this.nativeDate));
}
return null;
};
/**
* @param {?} date
* @param {?} grain
* @return {?}
*/
CandyDate.prototype.isSame = /**
* @param {?} date
* @param {?} grain
* @return {?}
*/
function (date, grain) {
if (date) {
/** @type {?} */
var left = this.toNativeDate();
/** @type {?} */
var right = this.toNativeDate(date);
switch (grain) {
case 'year':
return left.getFullYear() === right.getFullYear();
case 'month':
return left.getFullYear() === right.getFullYear()
&& left.getMonth() === right.getMonth();
case 'day':
return left.getFullYear() === right.getFullYear()
&& left.getMonth() === right.getMonth()
&& left.getDate() === right.getDate();
case 'hour':
return left.getFullYear() === right.getFullYear()
&& left.getMonth() === right.getMonth()
&& left.getDate() === right.getDate()
&& left.getHours() === right.getHours();
case 'minute':
return left.getFullYear() === right.getFullYear()
&& left.getMonth() === right.getMonth()
&& left.getDate() === right.getDate()
&& left.getHours() === right.getHours()
&& left.getMinutes() === right.getMinutes();
case 'second':
return left.getFullYear() === right.getFullYear()
&& left.getMonth() === right.getMonth()
&& left.getDate() === right.getDate()
&& left.getHours() === right.getHours()
&& left.getMinutes() === right.getMinutes()
&& left.getSeconds() === right.getSeconds();
}
}
return false;
};
/**
* @param {?} date
* @param {?} grain
* @return {?}
*/
CandyDate.prototype.isAfter = /**
* @param {?} date
* @param {?} grain
* @return {?}
*/
function (date, grain) {
if (date) {
/** @type {?} */
var left = this.toNativeDate();
/** @type {?} */
var right = this.toNativeDate(date);
switch (grain) {
case 'year':
return left.getFullYear() > right.getFullYear();
case 'month':
return (left.getFullYear() > right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() > right.getMonth());
case 'day':
return (left.getFullYear() > right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() > right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() > right.getDate());
case 'hour':
return (left.getFullYear() > right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() > right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() > right.getDate())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() > right.getHours());
case 'minute':
return (left.getFullYear() > right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() > right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() > right.getDate())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() > right.getHours())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() === right.getHours() && left.getMinutes() > right.getMinutes());
case 'second':
return (left.getFullYear() > right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() > right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() > right.getDate())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() > right.getHours())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() === right.getHours() && left.getMinutes() > right.getMinutes())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() === right.getHours() && left.getMinutes() === right.getMinutes() && left.getSeconds() > right.getSeconds());
}
}
return false;
};
/**
* @param {?} date
* @param {?} grain
* @return {?}
*/
CandyDate.prototype.isBefore = /**
* @param {?} date
* @param {?} grain
* @return {?}
*/
function (date, grain) {
if (date) {
/** @type {?} */
var left = this.toNativeDate();
/** @type {?} */
var right = this.toNativeDate(date);
switch (grain) {
case 'year':
return left.getFullYear() < right.getFullYear();
case 'month':
return (left.getFullYear() < right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() < right.getMonth());
case 'day':
return (left.getFullYear() < right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() < right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() < right.getDate());
case 'hour':
return (left.getFullYear() < right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() < right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() < right.getDate())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() < right.getHours());
case 'minute':
return (left.getFullYear() < right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() < right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() < right.getDate())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() < right.getHours())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() === right.getHours() && left.getMinutes() < right.getMinutes());
case 'second':
return (left.getFullYear() < right.getFullYear())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() < right.getMonth())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() < right.getDate())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() < right.getHours())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() === right.getHours() && left.getMinutes() < right.getMinutes())
|| (left.getFullYear() === right.getFullYear() && left.getMonth() === right.getMonth() && left.getDate() === right.getDate() && left.getHours() === right.getHours() && left.getMinutes() === right.getMinutes() && left.getSeconds() < right.getSeconds());
}
}
return false;
};
// Equal to today accurate to "day"
// Equal to today accurate to "day"
/**
* @return {?}
*/
CandyDate.prototype.isToday =
// Equal to today accurate to "day"
/**
* @return {?}
*/
function () {
return this.isSame(new Date(), 'day');
};
/**
* @return {?}
*/
CandyDate.prototype.isInvalid = /**
* @return {?}
*/
function () {
return isNaN(this.nativeDate.valueOf());
};
/**
* @private
* @param {?=} date
* @return {?}
*/
CandyDate.prototype.toNativeDate = /**
* @private
* @param {?=} date
* @return {?}
*/
function (date) {
if (date === void 0) {
date = this;
}
return date instanceof CandyDate ? date.nativeDate : date;
};
return CandyDate;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarHeaderComponent = /** @class */ (function () {
function CalendarHeaderComponent(dateHelper) {
this.dateHelper = dateHelper;
this.enablePrev = true;
this.enableNext = true;
this.showTimePicker = false;
this.valueChange = new i0.EventEmitter();
this.panelModeChange = new i0.EventEmitter();
this.chooseDecade = new i0.EventEmitter();
this.chooseYear = new i0.EventEmitter();
this.chooseMonth = new i0.EventEmitter();
this.prefixCls = 'ant-calendar';
this.yearToMonth = false; // Indicate whether should change to month panel when current is year panel (if referer=month, it should show month panel when choosed a year)
}
/**
* @return {?}
*/
CalendarHeaderComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
if (!this.value) {
this.value = new CandyDate(); // Show today by default
}
};
/**
* @param {?} changes
* @return {?}
*/
CalendarHeaderComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.value || changes.showTimePicker || changes.panelMode) {
this.render();
}
};
/**
* @return {?}
*/
CalendarHeaderComponent.prototype.previousYear = /**
* @return {?}
*/
function () {
this.gotoYear(-1);
};
/**
* @return {?}
*/
CalendarHeaderComponent.prototype.nextYear = /**
* @return {?}
*/
function () {
this.gotoYear(1);
};
/**
* @return {?}
*/
CalendarHeaderComponent.prototype.previousMonth = /**
* @return {?}
*/
function () {
this.gotoMonth(-1);
};
/**
* @return {?}
*/
CalendarHeaderComponent.prototype.nextMonth = /**
* @return {?}
*/
function () {
this.gotoMonth(1);
};
/**
* @param {?} mode
* @param {?=} value
* @return {?}
*/
CalendarHeaderComponent.prototype.changePanel = /**
* @param {?} mode
* @param {?=} value
* @return {?}
*/
function (mode, value) {
this.panelModeChange.emit(mode);
if (value) {
this.changeValueFromInside(value);
}
};
/**
* @param {?} value
* @return {?}
*/
CalendarHeaderComponent.prototype.onChooseDecade = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.changePanel('year', value);
this.chooseDecade.emit(value);
};
/**
* @param {?} value
* @return {?}
*/
CalendarHeaderComponent.prototype.onChooseYear = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.changePanel(this.yearToMonth ? 'month' : 'date', value);
this.yearToMonth = false; // Clear
this.chooseYear.emit(value);
};
/**
* @param {?} value
* @return {?}
*/
CalendarHeaderComponent.prototype.onChooseMonth = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.changePanel('date', value);
this.yearToMonth = false; // Clear
this.chooseMonth.emit(value);
};
/**
* @return {?}
*/
CalendarHeaderComponent.prototype.changeToMonthPanel = /**
* @return {?}
*/
function () {
this.changePanel('month');
this.yearToMonth = true;
};
/**
* @private
* @return {?}
*/
CalendarHeaderComponent.prototype.render = /**
* @private
* @return {?}
*/
function () {
if (this.value) {
this.yearMonthDaySelectors = this.createYearMonthDaySelectors();
}
};
/**
* @private
* @param {?} amount
* @return {?}
*/
CalendarHeaderComponent.prototype.gotoMonth = /**
* @private
* @param {?} amount
* @return {?}
*/
function (amount) {
this.changeValueFromInside(this.value.addMonths(amount));
};
/**
* @private
* @param {?} amount
* @return {?}
*/
CalendarHeaderComponent.prototype.gotoYear = /**
* @private
* @param {?} amount
* @return {?}
*/
function (amount) {
this.changeValueFromInside(this.value.addYears(amount));
};
/**
* @private
* @param {?} value
* @return {?}
*/
CalendarHeaderComponent.prototype.changeValueFromInside = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
if (this.value !== value) {
this.value = value;
this.valueChange.emit(this.value);
this.render();
}
};
/**
* @private
* @param {?} localeFormat
* @return {?}
*/
CalendarHeaderComponent.prototype.formatDateTime = /**
* @private
* @param {?} localeFormat
* @return {?}
*/
function (localeFormat) {
return this.dateHelper.format(this.value.nativeDate, localeFormat);
};
/**
* @private
* @return {?}
*/
CalendarHeaderComponent.prototype.createYearMonthDaySelectors = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var year;
/** @type {?} */
var month;
/** @type {?} */
var day;
// NOTE: Compat for DatePipe formatting rules
/** @type {?} */
var yearFormat = this.locale.yearFormat;
if (this.dateHelper.relyOnDatePipe) {
yearFormat = (( /** @type {?} */(this.dateHelper))).transCompatFormat(yearFormat);
}
year = {
className: this.prefixCls + "-year-select",
title: this.locale.yearSelect,
onClick: ( /**
* @return {?}
*/function () { return _this.showTimePicker ? null : _this.changePanel('year'); }),
label: this.formatDateTime(yearFormat)
};
month = {
className: this.prefixCls + "-month-select",
title: this.locale.monthSelect,
onClick: ( /**
* @return {?}
*/function () { return _this.showTimePicker ? null : _this.changeToMonthPanel(); }),
label: this.formatDateTime(this.locale.monthFormat || 'MMM')
};
// NOTE: Compat for DatePipe formatting rules
/** @type {?} */
var dayFormat = this.locale.dayFormat;
if (this.dateHelper.relyOnDatePipe) {
dayFormat = (( /** @type {?} */(this.dateHelper))).transCompatFormat(dayFormat);
}
if (this.showTimePicker) {
day = {
className: this.prefixCls + "-day-select",
label: this.formatDateTime(dayFormat)
};
}
/** @type {?} */
var result;
if (this.locale.monthBeforeYear) {
result = [month, day, year];
}
else {
result = [year, month, day];
}
return result.filter(( /**
* @param {?} selector
* @return {?}
*/function (selector) { return !!selector; }));
};
CalendarHeaderComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'calendar-header',
template: "<div class=\"{{ prefixCls }}-header\">\n <div style=\"position: relative;\">\n <a *ngIf=\"enablePrev && !showTimePicker\"\n class=\"{{ prefixCls }}-prev-year-btn\"\n role=\"button\"\n (click)=\"previousYear()\"\n title=\"{{ locale.previousYear }}\"\n ></a>\n <a *ngIf=\"enablePrev && !showTimePicker\"\n class=\"{{ prefixCls }}-prev-month-btn\"\n role=\"button\"\n (click)=\"previousMonth()\"\n title=\"{{ locale.previousMonth }}\"\n ></a>\n\n <span class=\"{{ prefixCls }}-{{ locale.monthBeforeYear ? 'my-select' : 'ym-select' }}\">\n <ng-container *ngFor=\"let selector of yearMonthDaySelectors\">\n <a class=\"{{ selector.className }}\"\n role=\"button\"\n (click)=\"selector.onClick ? selector.onClick() : null\"\n title=\"{{ selector.title || null }}\"\n >\n {{ selector.label }}\n </a>\n </ng-container>\n </span>\n\n <a *ngIf=\"enableNext && !showTimePicker\"\n class=\"{{ prefixCls }}-next-month-btn\"\n role=\"button\"\n (click)=\"nextMonth()\"\n title=\"{{ locale.nextMonth }}\"\n ></a>\n <a *ngIf=\"enableNext && !showTimePicker\"\n class=\"{{ prefixCls }}-next-year-btn\"\n role=\"button\"\n (click)=\"nextYear()\"\n title=\"{{ locale.nextYear }}\"\n ></a>\n </div>\n\n <ng-container [ngSwitch]=\"panelMode\">\n <ng-container *ngSwitchCase=\"'decade'\">\n <decade-panel\n [locale]=\"locale\"\n [value]=\"value\"\n (valueChange)=\"onChooseDecade($event)\"\n ></decade-panel>\n </ng-container>\n <ng-container *ngSwitchCase=\"'year'\">\n <year-panel\n [locale]=\"locale\"\n [value]=\"value\"\n [disabledDate]=\"disabledYear\"\n (valueChange)=\"onChooseYear($event)\"\n (decadePanelShow)=\"changePanel('decade')\"\n ></year-panel>\n </ng-container>\n <ng-container *ngSwitchCase=\"'month'\">\n <month-panel\n [locale]=\"locale\"\n [value]=\"value\"\n [disabledDate]=\"disabledMonth\"\n (valueChange)=\"onChooseMonth($event)\"\n (yearPanelShow)=\"changePanel('year')\"\n ></month-panel>\n </ng-container>\n </ng-container>\n</div>"
}] }
];
/** @nocollapse */
CalendarHeaderComponent.ctorParameters = function () {
return [
{ type: DateHelperService$$1 }
];
};
CalendarHeaderComponent.propDecorators = {
locale: [{ type: i0.Input }],
enablePrev: [{ type: i0.Input }],
enableNext: [{ type: i0.Input }],
disabledMonth: [{ type: i0.Input }],
disabledYear: [{ type: i0.Input }],
showTimePicker: [{ type: i0.Input }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }],
panelMode: [{ type: i0.Input }],
panelModeChange: [{ type: i0.Output }],
chooseDecade: [{ type: i0.Output }],
chooseYear: [{ type: i0.Output }],
chooseMonth: [{ type: i0.Output }]
};
return CalendarHeaderComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CalendarInputComponent = /** @class */ (function () {
function CalendarInputComponent(dateHelper) {
this.dateHelper = dateHelper;
this.valueChange = new i0.EventEmitter();
this.prefixCls = 'ant-calendar';
this.invalidInputClass = '';
}
/**
* @return {?}
*/
CalendarInputComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} event
* @return {?}
*/
CalendarInputComponent.prototype.onInputKeyup = /**
* @param {?} event
* @return {?}
*/
function (event) {
/** @type {?} */
var date = this.checkValidInputDate(event);
if (!date || (this.disabledDate && this.disabledDate(date.nativeDate))) {
return;
}
if (!date.isSame(this.value, 'second')) { // Not same with original value
this.value = date;
this.valueChange.emit(this.value);
}
};
/**
* @param {?} value
* @return {?}
*/
CalendarInputComponent.prototype.toReadableInput = /**
* @param {?} value
* @return {?}
*/
function (value) {
return value ? this.dateHelper.format(value.nativeDate, this.format) : '';
};
/**
* @private
* @param {?} event
* @return {?}
*/
CalendarInputComponent.prototype.checkValidInputDate = /**
* @private
* @param {?} event
* @return {?}
*/
function (event) {
/** @type {?} */
var input = (( /** @type {?} */(event.target))).value;
/** @type {?} */
var date = new CandyDate(input);
this.invalidInputClass = '';
if (date.isInvalid() || input !== this.toReadableInput(date)) { // Should also match the input format exactly
this.invalidInputClass = this.prefixCls + "-input-invalid";
return null;
}
return date;
};
CalendarInputComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'calendar-input',
template: "<div class=\"{{ prefixCls }}-input-wrap\">\n <div class=\"{{ prefixCls }}-date-input-wrap\">\n <input\n class=\"{{ prefixCls }}-input {{ invalidInputClass }}\"\n placeholder=\"{{ placeholder || locale.dateSelect }}\"\n value=\"{{ toReadableInput(value) }}\"\n (keyup)=\"onInputKeyup($event)\"\n />\n </div>\n <a class=\"{{ prefixCls }}-clear-btn\" role=\"button\" title=\"{{ locale.clear }}\">\n <!--<i nz-icon type=\"close\"></i>-->\n </a>\n</div>"
}] }
];
/** @nocollapse */
CalendarInputComponent.ctorParameters = function () {
return [
{ type: DateHelperService$$1 }
];
};
CalendarInputComponent.propDecorators = {
locale: [{ type: i0.Input }],
format: [{ type: i0.Input }],
placeholder: [{ type: i0.Input }],
disabledDate: [{ type: i0.Input }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }]
};
return CalendarInputComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var OkButtonComponent = /** @class */ (function () {
function OkButtonComponent() {
this.okDisabled = false;
this.clickOk = new i0.EventEmitter();
this.prefixCls = 'ant-calendar';
}
OkButtonComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'ok-button',
template: "<a\n class=\"{{ prefixCls }}-ok-btn {{ okDisabled ? prefixCls + '-ok-btn-disabled' : '' }}\"\n role=\"button\"\n (click)=\"okDisabled ? null : clickOk.emit()\"\n >\n {{ locale.ok }}\n </a>"
}] }
];
OkButtonComponent.propDecorators = {
locale: [{ type: i0.Input }],
okDisabled: [{ type: i0.Input }],
clickOk: [{ type: i0.Output }]
};
return OkButtonComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var TimePickerButtonComponent = /** @class */ (function () {
function TimePickerButtonComponent() {
this.timePickerDisabled = false;
this.showTimePicker = false;
this.showTimePickerChange = new i0.EventEmitter();
this.prefixCls = 'ant-calendar';
}
/**
* @return {?}
*/
TimePickerButtonComponent.prototype.onClick = /**
* @return {?}
*/
function () {
this.showTimePicker = !this.showTimePicker;
this.showTimePickerChange.emit(this.showTimePicker);
};
TimePickerButtonComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'time-picker-button',
template: "<a\n class=\"{{ prefixCls }}-time-picker-btn {{ timePickerDisabled ? prefixCls + '-time-picker-btn-disabled' : '' }}\"\n role=\"button\"\n (click)=\"timePickerDisabled ? null : onClick()\"\n>\n {{ showTimePicker ? locale.dateSelect : locale.timeSelect }}\n</a>"
}] }
];
TimePickerButtonComponent.propDecorators = {
locale: [{ type: i0.Input }],
timePickerDisabled: [{ type: i0.Input }],
showTimePicker: [{ type: i0.Input }],
showTimePickerChange: [{ type: i0.Output }]
};
return TimePickerButtonComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var TodayButtonComponent = /** @class */ (function () {
function TodayButtonComponent(dateHelper) {
this.dateHelper = dateHelper;
this.hasTimePicker = false;
this.clickToday = new i0.EventEmitter();
this.prefixCls = 'ant-calendar';
this.isDisabled = false;
this.now = new CandyDate();
}
/**
* @return {?}
*/
TodayButtonComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} changes
* @return {?}
*/
TodayButtonComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.disabledDate) {
this.isDisabled = this.disabledDate && this.disabledDate(this.now.nativeDate);
}
if (changes.locale) {
// NOTE: Compat for DatePipe formatting rules
/** @type {?} */
var dateFormat = this.locale.dateFormat;
if (this.dateHelper.relyOnDatePipe) {
dateFormat = (( /** @type {?} */(this.dateHelper))).transCompatFormat(dateFormat);
}
this.title = this.dateHelper.format(this.now.nativeDate, dateFormat);
}
};
/**
* @return {?}
*/
TodayButtonComponent.prototype.onClickToday = /**
* @return {?}
*/
function () {
this.clickToday.emit(this.now.clone()); // To prevent the "now" being modified from outside, we use clone
};
TodayButtonComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'today-button',
template: "<a\n class=\"{{ prefixCls }}-today-btn {{ isDisabled ? prefixCls + '-today-btn-disabled' : '' }}\"\n role=\"button\"\n (click)=\"isDisabled ? null : onClickToday()\"\n title=\"{{ title }}\"\n>\n {{ hasTimePicker ? locale.now : locale.today }}\n</a>"
}] }
];
/** @nocollapse */
TodayButtonComponent.ctorParameters = function () {
return [
{ type: DateHelperService$$1 }
];
};
TodayButtonComponent.propDecorators = {
locale: [{ type: i0.Input }],
hasTimePicker: [{ type: i0.Input }],
disabledDate: [{ type: i0.Input }],
clickToday: [{ type: i0.Output }]
};
return TodayButtonComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var DATE_ROW_NUM = 6;
/** @type {?} */
var DATE_COL_NUM = 7;
var DateTableComponent = /** @class */ (function () {
function DateTableComponent(i18n, dateHelper) {
this.i18n = i18n;
this.dateHelper = dateHelper;
this.valueChange = new i0.EventEmitter();
// Customize date content while rendering
this.dayHover = new i0.EventEmitter(); // Emitted when hover on a day by mouse enter
// Emitted when hover on a day by mouse enter
this.prefixCls = 'ant-calendar';
this.isTemplateRef = isTemplateRef;
this.isNonEmptyString = isNonEmptyString;
}
/**
* @return {?}
*/
DateTableComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} changes
* @return {?}
*/
DateTableComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (this.isDateRealChange(changes.value) ||
this.isDateRealChange(changes.selectedValue) ||
this.isDateRealChange(changes.hoverValue)) {
this.render();
}
};
/**
* @private
* @param {?} change
* @return {?}
*/
DateTableComponent.prototype.isDateRealChange = /**
* @private
* @param {?} change
* @return {?}
*/
function (change) {
var _this = this;
if (change) {
/** @type {?} */
var previousValue_1 = change.previousValue;
/** @type {?} */
var currentValue = change.currentValue;
if (Array.isArray(currentValue)) {
return !Array.isArray(previousValue_1) ||
currentValue.length !== previousValue_1.length ||
currentValue.some(( /**
* @param {?} value
* @param {?} index
* @return {?}
*/function (value, index) { return !_this.isSameDate(previousValue_1[index], value); }));
}
else {
return !this.isSameDate(( /** @type {?} */(previousValue_1)), currentValue);
}
}
return false;
};
/**
* @private
* @param {?} left
* @param {?} right
* @return {?}
*/
DateTableComponent.prototype.isSameDate = /**
* @private
* @param {?} left
* @param {?} right
* @return {?}
*/
function (left, right) {
return (!left && !right) || (left && right && right.isSame(left, 'day'));
};
/**
* @private
* @return {?}
*/
DateTableComponent.prototype.render = /**
* @private
* @return {?}
*/
function () {
if (this.value) {
this.headWeekDays = this.makeHeadWeekDays();
this.weekRows = this.makeWeekRows();
}
};
/**
* @private
* @param {?} value
* @return {?}
*/
DateTableComponent.prototype.changeValueFromInside = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
if (this.value !== value) {
this.valueChange.emit(value);
}
};
/**
* @private
* @return {?}
*/
DateTableComponent.prototype.makeHeadWeekDays = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var weekDays = [];
/** @type {?} */
var firstDayOfWeek = this.dateHelper.getFirstDayOfWeek();
for (var colIndex = 0; colIndex < DATE_COL_NUM; colIndex++) {
/** @type {?} */
var day = (firstDayOfWeek + colIndex) % DATE_COL_NUM;
/** @type {?} */
var tempDate = this.value.setDay(day);
weekDays[colIndex] = {
short: this.dateHelper.format(tempDate.nativeDate, this.dateHelper.relyOnDatePipe ? 'E' : 'ddd'),
// eg. Tue
veryShort: this.dateHelper.format(tempDate.nativeDate, this.getVeryShortWeekFormat()) // eg. Tu
};
}
return weekDays;
};
/**
* @private
* @return {?}
*/
DateTableComponent.prototype.getVeryShortWeekFormat = /**
* @private
* @return {?}
*/
function () {
if (this.dateHelper.relyOnDatePipe) {
return this.i18n.getLocaleId().toLowerCase().indexOf('zh') === 0 ? 'EEEEE' : 'EEEEEE'; // Use extreme short for chinese
}
return 'dd';
};
/**
* @private
* @return {?}
*/
DateTableComponent.prototype.makeWeekRows = /**
* @private
* @return {?}
*/
function () {
var _this = this;
var _a;
/** @type {?} */
var weekRows = [];
/** @type {?} */
var firstDayOfWeek = this.dateHelper.getFirstDayOfWeek();
/** @type {?} */
var firstDateOfMonth = this.value.setDate(1);
/** @type {?} */
var firstDateOffset = (firstDateOfMonth.getDay() + 7 - firstDayOfWeek) % 7;
/** @type {?} */
var firstDateToShow = firstDateOfMonth.addDays(0 - firstDateOffset);
/** @type {?} */
var increased = 0;
for (var rowIndex = 0; rowIndex < DATE_ROW_NUM; rowIndex++) {
/** @type {?} */
var week = weekRows[rowIndex] = {
isActive: false,
isCurrent: false,
dateCells: []
};
var _loop_1 = function (colIndex) {
var _a;
/** @type {?} */
var current = firstDateToShow.addDays(increased++);
/** @type {?} */
var isBeforeMonthYear = this_1.isBeforeMonthYear(current, this_1.value);
/** @type {?} */
var isAfterMonthYear = this_1.isAfterMonthYear(current, this_1.value);
/** @type {?} */
var cell = {
value: current,
isSelected: false,
isDisabled: false,
isToday: false,
title: this_1.getDateTitle(current),
customContent: valueFunctionProp(this_1.dateRender, current),
// Customized content
content: "" + current.getDate(),
onClick: ( /**
* @return {?}
*/function () { return _this.changeValueFromInside(current); }),
onMouseEnter: ( /**
* @return {?}
*/function () { return _this.dayHover.emit(cell.value); })
};
if (this_1.showWeek && !week.weekNum) {
week.weekNum = this_1.getWeekNum(current);
}
if (current.isToday()) {
cell.isToday = true;
week.isCurrent = true;
}
if (Array.isArray(this_1.selectedValue) && !isBeforeMonthYear && !isAfterMonthYear) { // Range selections
// Range selections
/** @type {?} */
var rangeValue = this_1.hoverValue && this_1.hoverValue.length ? this_1.hoverValue : this_1.selectedValue;
/** @type {?} */
var start = rangeValue[0];
/** @type {?} */
var end = rangeValue[1];
if (start) {
if (current.isSame(start, 'day')) {
cell.isSelectedStartDate = true;
cell.isSelected = true;
week.isActive = true;
}
if (end) {
if (current.isSame(end, 'day')) {
cell.isSelectedEndDate = true;
cell.isSelected = true;
week.isActive = true;
}
else if (current.isAfter(start, 'day') && current.isBefore(end, 'day')) {
cell.isInRange = true;
}
}
}
}
else if (current.isSame(this_1.value, 'day')) {
cell.isSelected = true;
week.isActive = true;
}
if (this_1.disabledDate && this_1.disabledDate(current.nativeDate)) {
cell.isDisabled = true;
}
cell.classMap = (_a = {},
_a[this_1.prefixCls + "-cell"] = true,
// [`${this.prefixCls}-selected-date`]: false,
_a[this_1.prefixCls + "-today"] = cell.isToday,
_a[this_1.prefixCls + "-last-month-cell"] = isBeforeMonthYear,
_a[this_1.prefixCls + "-next-month-btn-day"] = isAfterMonthYear,
_a[this_1.prefixCls + "-selected-day"] = cell.isSelected,
_a[this_1.prefixCls + "-disabled-cell"] = cell.isDisabled,
_a[this_1.prefixCls + "-selected-start-date"] = !!cell.isSelectedStartDate,
_a[this_1.prefixCls + "-selected-end-date"] = !!cell.isSelectedEndDate,
_a[this_1.prefixCls + "-in-range-cell"] = !!cell.isInRange,
_a);
week.dateCells.push(cell);
};
var this_1 = this;
for (var colIndex = 0; colIndex < DATE_COL_NUM; colIndex++) {
_loop_1(colIndex);
}
week.classMap = (_a = {},
_a[this.prefixCls + "-current-week"] = week.isCurrent,
_a[this.prefixCls + "-active-week"] = week.isActive,
_a);
}
return weekRows;
};
/**
* @private
* @param {?} date
* @return {?}
*/
DateTableComponent.prototype.getDateTitle = /**
* @private
* @param {?} date
* @return {?}
*/
function (date) {
// NOTE: Compat for DatePipe formatting rules
/** @type {?} */
var dateFormat = (this.locale && this.locale.dateFormat) || 'YYYY-MM-DD';
if (this.dateHelper.relyOnDatePipe) {
dateFormat = (( /** @type {?} */(this.dateHelper))).transCompatFormat(dateFormat);
}
return this.dateHelper.format(date.nativeDate, dateFormat);
};
/**
* @private
* @param {?} date
* @return {?}
*/
DateTableComponent.prototype.getWeekNum = /**
* @private
* @param {?} date
* @return {?}
*/
function (date) {
return this.dateHelper.getISOWeek(date.nativeDate);
};
/**
* @private
* @param {?} current
* @param {?} target
* @return {?}
*/
DateTableComponent.prototype.isBeforeMonthYear = /**
* @private
* @param {?} current
* @param {?} target
* @return {?}
*/
function (current, target) {
if (current.getYear() < target.getYear()) {
return true;
}
return current.getYear() === target.getYear() && current.getMonth() < target.getMonth();
};
/**
* @private
* @param {?} current
* @param {?} target
* @return {?}
*/
DateTableComponent.prototype.isAfterMonthYear = /**
* @private
* @param {?} current
* @param {?} target
* @return {?}
*/
function (current, target) {
if (current.getYear() > target.getYear()) {
return true;
}
return current.getYear() === target.getYear() && current.getMonth() > target.getMonth();
};
DateTableComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'date-table',
template: "<table class=\"{{ prefixCls }}-table\" cellSpacing=\"0\" role=\"grid\">\n <thead>\n <tr role=\"row\">\n <th *ngIf=\"showWeek\" role=\"columnheader\" class=\"{{ prefixCls }}-column-header {{ prefixCls }}-week-number-header\">\n <span class=\"{{ prefixCls }}-column-header-inner\">x</span>\n </th>\n <th *ngFor=\"let cell of headWeekDays\"\n role=\"columnheader\"\n title=\"{{ cell.short }}\"\n class=\"{{ prefixCls }}-column-header\"\n >\n <span class=\"{{ prefixCls }}-column-header-inner\">{{ cell.veryShort }}</span>\n </th>\n </tr>\n </thead>\n <tbody class=\"{{ prefixCls }}-tbody\">\n <tr *ngFor=\"let row of weekRows\" [ngClass]=\"row.classMap\" role=\"row\">\n <td *ngIf=\"row.weekNum\" role=\"gridcell\" class=\"{{ prefixCls }}-week-number-cell\">\n {{ row.weekNum }}\n </td>\n <td\n *ngFor=\"let cell of row.dateCells\"\n (click)=\"cell.isDisabled ? null : cell.onClick()\"\n (mouseenter)=\"cell.isDisabled ? null : cell.onMouseEnter()\"\n title=\"{{ cell.title }}\"\n [ngClass]=\"cell.classMap\"\n role=\"gridcell\"\n >\n\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(cell.customContent)\">\n <ng-container *ngTemplateOutlet=\"cell.customContent; context: { $implicit: cell.value }\"></ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(cell.customContent)\">\n <span [innerHTML]=\"cell.customContent\"></span>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div\n class=\"{{ prefixCls }}-date\"\n [attr.aria-selected]=\"cell.isSelected\"\n [attr.aria-disabled]=\"cell.isDisabled\"\n >\n {{ cell.content }}\n </div>\n </ng-container>\n </ng-container>\n\n </td>\n </tr>\n </tbody>\n</table>"
}] }
];
/** @nocollapse */
DateTableComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: DateHelperService$$1 }
];
};
DateTableComponent.propDecorators = {
locale: [{ type: i0.Input }],
selectedValue: [{ type: i0.Input }],
hoverValue: [{ type: i0.Input }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }],
showWeek: [{ type: i0.Input }],
disabledDate: [{ type: i0.Input }],
dateRender: [{ type: i0.Input }],
dayHover: [{ type: i0.Output }]
};
return DateTableComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var MAX_ROW = 4;
/** @type {?} */
var MAX_COL = 3;
var DecadePanelComponent = /** @class */ (function () {
function DecadePanelComponent() {
this.valueChange = new i0.EventEmitter();
this.prefixCls = 'ant-calendar-decade-panel';
}
Object.defineProperty(DecadePanelComponent.prototype, "startYear", {
get: /**
* @return {?}
*/ function () {
return parseInt("" + this.value.getYear() / 100, 10) * 100;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DecadePanelComponent.prototype, "endYear", {
get: /**
* @return {?}
*/ function () {
return this.startYear + 99;
},
enumerable: true,
configurable: true
});
/**
* @param {?} changes
* @return {?}
*/
DecadePanelComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.value) {
this.render();
}
};
/**
* @return {?}
*/
DecadePanelComponent.prototype.previousCentury = /**
* @return {?}
*/
function () {
this.gotoYear(-100);
};
/**
* @return {?}
*/
DecadePanelComponent.prototype.nextCentury = /**
* @return {?}
*/
function () {
this.gotoYear(100);
};
/**
* @param {?} _index
* @param {?} decadeData
* @return {?}
*/
DecadePanelComponent.prototype.trackPanelDecade = /**
* @param {?} _index
* @param {?} decadeData
* @return {?}
*/
function (_index, decadeData) {
return decadeData.content;
};
/**
* @private
* @return {?}
*/
DecadePanelComponent.prototype.render = /**
* @private
* @return {?}
*/
function () {
if (this.value) {
this.panelDecades = this.makePanelDecades();
}
};
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
/**
* @private
* @param {?} amount
* @return {?}
*/
DecadePanelComponent.prototype.gotoYear =
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
/**
* @private
* @param {?} amount
* @return {?}
*/
function (amount) {
this.value = this.value.addYears(amount);
// this.valueChange.emit(this.value); // Do not try to trigger final value change
this.render();
};
/**
* @private
* @param {?} startYear
* @return {?}
*/
DecadePanelComponent.prototype.chooseDecade = /**
* @private
* @param {?} startYear
* @return {?}
*/
function (startYear) {
this.value = this.value.setYear(startYear);
this.valueChange.emit(this.value);
};
/**
* @private
* @return {?}
*/
DecadePanelComponent.prototype.makePanelDecades = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var decades = [];
/** @type {?} */
var currentYear = this.value.getYear();
/** @type {?} */
var startYear = this.startYear;
/** @type {?} */
var endYear = this.endYear;
/** @type {?} */
var previousYear = startYear - 10;
/** @type {?} */
var index = 0;
for (var rowIndex = 0; rowIndex < MAX_ROW; rowIndex++) {
decades[rowIndex] = [];
var _loop_1 = function (colIndex) {
var _a;
/** @type {?} */
var start = previousYear + index * 10;
/** @type {?} */
var end = previousYear + index * 10 + 9;
/** @type {?} */
var content = start + "-" + end;
/** @type {?} */
var cell = decades[rowIndex][colIndex] = {
content: content,
title: content,
isCurrent: currentYear >= start && currentYear <= end,
isLowerThanStart: end < startYear,
isBiggerThanEnd: start > endYear,
classMap: null,
onClick: null
};
cell.classMap = (_a = {},
_a[this_1.prefixCls + "-cell"] = true,
_a[this_1.prefixCls + "-selected-cell"] = cell.isCurrent,
_a[this_1.prefixCls + "-last-century-cell"] = cell.isLowerThanStart,
_a[this_1.prefixCls + "-next-century-cell"] = cell.isBiggerThanEnd,
_a);
if (cell.isLowerThanStart) {
cell.onClick = ( /**
* @return {?}
*/function () { return _this.previousCentury(); });
}
else if (cell.isBiggerThanEnd) {
cell.onClick = ( /**
* @return {?}
*/function () { return _this.nextCentury(); });
}
else {
cell.onClick = ( /**
* @return {?}
*/function () { return _this.chooseDecade(start); });
}
index++;
};
var this_1 = this;
for (var colIndex = 0; colIndex < MAX_COL; colIndex++) {
_loop_1(colIndex);
}
}
return decades;
};
DecadePanelComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'decade-panel',
template: "<div class=\"{{ prefixCls }}\">\n <div class=\"{{ prefixCls }}-header\">\n <a\n class=\"{{ prefixCls }}-prev-century-btn\"\n role=\"button\"\n (click)=\"previousCentury()\"\n title=\"{{ locale.previousCentury }}\"\n ></a>\n\n <div class=\"{{ prefixCls }}-century\">\n {{ startYear }}-{{ endYear }}\n </div>\n <a\n class=\"{{ prefixCls }}-next-century-btn\"\n role=\"button\"\n (click)=\"nextCentury()\"\n title=\"{{ locale.nextCentury }}\"\n ></a>\n </div>\n <div class=\"{{ prefixCls }}-body\">\n <table class=\"{{ prefixCls }}-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-tbody\">\n <tr *ngFor=\"let row of panelDecades\" role=\"row\">\n <td *ngFor=\"let cell of row; trackBy: trackPanelDecade\"\n role=\"gridcell\"\n title=\"{{ cell.title }}\"\n (click)=\"cell.onClick()\"\n [ngClass]=\"cell.classMap\"\n >\n <a class=\"{{ prefixCls }}-decade\">{{ cell.content }}</a>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n</div>"
}] }
];
/** @nocollapse */
DecadePanelComponent.ctorParameters = function () { return []; };
DecadePanelComponent.propDecorators = {
locale: [{ type: i0.Input }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }]
};
return DecadePanelComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var MonthPanelComponent = /** @class */ (function () {
function MonthPanelComponent() {
this.valueChange = new i0.EventEmitter();
this.yearPanelShow = new i0.EventEmitter();
this.prefixCls = 'ant-calendar-month-panel';
}
/**
* @return {?}
*/
MonthPanelComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @return {?}
*/
MonthPanelComponent.prototype.previousYear = /**
* @return {?}
*/
function () {
this.gotoYear(-1);
};
/**
* @return {?}
*/
MonthPanelComponent.prototype.nextYear = /**
* @return {?}
*/
function () {
this.gotoYear(1);
};
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
/**
* @private
* @param {?} amount
* @return {?}
*/
MonthPanelComponent.prototype.gotoYear =
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
/**
* @private
* @param {?} amount
* @return {?}
*/
function (amount) {
this.value = this.value.addYears(amount);
// this.valueChange.emit(this.value); // Do not try to trigger final value change
};
MonthPanelComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'month-panel',
template: "<div class=\"{{ prefixCls }}\">\n <div>\n <div class=\"{{ prefixCls }}-header\">\n <a\n class=\"{{ prefixCls }}-prev-year-btn\"\n role=\"button\"\n (click)=\"previousYear()\"\n title=\"{{ locale.previousYear }}\"\n ></a>\n\n <a\n class=\"{{ prefixCls }}-year-select\"\n role=\"button\"\n (click)=\"yearPanelShow.emit()\"\n title=\"{{ locale.yearSelect }}\"\n >\n <span class=\"{{ prefixCls }}-year-select-content\">{{ value.getYear() }}</span>\n <span class=\"{{ prefixCls }}-year-select-arrow\">x</span>\n </a>\n\n <a\n class=\"{{ prefixCls }}-next-year-btn\"\n role=\"button\"\n (click)=\"nextYear()\"\n title=\"{{ locale.nextYear }}\"\n ></a>\n </div>\n <div class=\"{{ prefixCls }}-body\">\n <month-table [disabledDate]=\"disabledDate\" [value]=\"value\" (valueChange)=\"valueChange.emit($event)\"></month-table>\n </div>\n </div>\n</div>"
}] }
];
/** @nocollapse */
MonthPanelComponent.ctorParameters = function () { return []; };
MonthPanelComponent.propDecorators = {
locale: [{ type: i0.Input }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }],
disabledDate: [{ type: i0.Input }],
yearPanelShow: [{ type: i0.Output }]
};
return MonthPanelComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var MAX_ROW$1 = 4;
/** @type {?} */
var MAX_COL$1 = 3;
var MonthTableComponent = /** @class */ (function () {
function MonthTableComponent(dateHelper) {
this.dateHelper = dateHelper;
this.valueChange = new i0.EventEmitter();
this.prefixCls = 'ant-calendar-month-panel';
}
/**
* @return {?}
*/
MonthTableComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} changes
* @return {?}
*/
MonthTableComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.value || changes.disabledDate) {
this.render();
}
};
/**
* @param {?} _index
* @param {?} monthData
* @return {?}
*/
MonthTableComponent.prototype.trackPanelMonth = /**
* @param {?} _index
* @param {?} monthData
* @return {?}
*/
function (_index, monthData) {
return monthData.month;
};
/**
* @private
* @return {?}
*/
MonthTableComponent.prototype.render = /**
* @private
* @return {?}
*/
function () {
if (this.value) {
this.panelMonths = this.makePanelMonths();
}
};
/**
* @private
* @return {?}
*/
MonthTableComponent.prototype.makePanelMonths = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var months = [];
/** @type {?} */
var currentMonth = this.value.getMonth();
/** @type {?} */
var today = new CandyDate();
/** @type {?} */
var monthValue = 0;
for (var rowIndex = 0; rowIndex < MAX_ROW$1; rowIndex++) {
months[rowIndex] = [];
var _loop_1 = function (colIndex) {
var _a;
/** @type {?} */
var month = this_1.value.setMonth(monthValue);
/** @type {?} */
var disabled = this_1.disabledDate ? this_1.disabledDate(this_1.value.setMonth(monthValue).nativeDate) : false;
/** @type {?} */
var content = this_1.dateHelper.format(month.nativeDate, 'MMM');
/** @type {?} */
var cell = months[rowIndex][colIndex] = {
disabled: disabled,
content: content,
month: monthValue,
title: content,
classMap: null,
onClick: ( /**
* @return {?}
*/function () { return _this.chooseMonth(cell.month); })
};
cell.classMap = (_a = {},
_a[this_1.prefixCls + "-cell"] = true,
_a[this_1.prefixCls + "-cell-disabled"] = disabled,
_a[this_1.prefixCls + "-selected-cell"] = cell.month === currentMonth,
_a[this_1.prefixCls + "-current-cell"] = today.getYear() === this_1.value.getYear() && cell.month === today.getMonth(),
_a);
monthValue++;
};
var this_1 = this;
for (var colIndex = 0; colIndex < MAX_COL$1; colIndex++) {
_loop_1(colIndex);
}
}
return months;
};
/**
* @private
* @param {?} month
* @return {?}
*/
MonthTableComponent.prototype.chooseMonth = /**
* @private
* @param {?} month
* @return {?}
*/
function (month) {
this.value = this.value.setMonth(month);
this.valueChange.emit(this.value);
this.render();
};
MonthTableComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'month-table',
template: "<table class=\"{{ prefixCls }}-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-tbody\">\n <tr *ngFor=\"let row of panelMonths\" role=\"row\">\n <td *ngFor=\"let monthCell of row; trackBy: trackPanelMonth\"\n role=\"gridcell\"\n title=\"{{ monthCell.title }}\"\n (click)=\"monthCell.disabled ? null : monthCell.onClick()\"\n [ngClass]=\"monthCell.classMap\"\n >\n <a class=\"{{ prefixCls }}-month\">{{ monthCell.content }}</a>\n </td>\n </tr>\n </tbody>\n</table>"
}] }
];
/** @nocollapse */
MonthTableComponent.ctorParameters = function () {
return [
{ type: DateHelperService$$1 }
];
};
MonthTableComponent.propDecorators = {
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }],
disabledDate: [{ type: i0.Input }]
};
return MonthTableComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var defaultDisabledTime = {
nzDisabledHours: /**
* @return {?}
*/ function () {
return [];
},
nzDisabledMinutes: /**
* @return {?}
*/ function () {
return [];
},
nzDisabledSeconds: /**
* @return {?}
*/ function () {
return [];
}
};
/**
* @param {?} value
* @param {?} disabledTime
* @return {?}
*/
function getTimeConfig(value, disabledTime) {
/** @type {?} */
var disabledTimeConfig = disabledTime ? disabledTime(value && value.nativeDate) : ( /** @type {?} */({}));
disabledTimeConfig = __assign({}, defaultDisabledTime, disabledTimeConfig);
return disabledTimeConfig;
}
/**
* @param {?} value
* @param {?} disabledTimeConfig
* @return {?}
*/
function isTimeValidByConfig(value, disabledTimeConfig) {
/** @type {?} */
var invalidTime = false;
if (value) {
/** @type {?} */
var hour = value.getHours();
/** @type {?} */
var minutes = value.getMinutes();
/** @type {?} */
var seconds = value.getSeconds();
/** @type {?} */
var disabledHours = disabledTimeConfig.nzDisabledHours();
if (disabledHours.indexOf(hour) === -1) {
/** @type {?} */
var disabledMinutes = disabledTimeConfig.nzDisabledMinutes(hour);
if (disabledMinutes.indexOf(minutes) === -1) {
/** @type {?} */
var disabledSeconds = disabledTimeConfig.nzDisabledSeconds(hour, minutes);
invalidTime = disabledSeconds.indexOf(seconds) !== -1;
}
else {
invalidTime = true;
}
}
else {
invalidTime = true;
}
}
return !invalidTime;
}
/**
* @param {?} value
* @param {?} disabledTime
* @return {?}
*/
function isTimeValid(value, disabledTime) {
/** @type {?} */
var disabledTimeConfig = getTimeConfig(value, disabledTime);
return isTimeValidByConfig(value, disabledTimeConfig);
}
/**
* @param {?} value
* @param {?=} disabledDate
* @param {?=} disabledTime
* @return {?}
*/
function isAllowedDate(value, disabledDate, disabledTime) {
if (disabledDate) {
if (disabledDate(value.nativeDate)) {
return false;
}
}
if (disabledTime) {
if (!isTimeValid(value, disabledTime)) {
return false;
}
}
return true;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var DateRangePopupComponent = /** @class */ (function () {
function DateRangePopupComponent() {
var _this = this;
this.panelModeChange = new i0.EventEmitter();
this.valueChange = new i0.EventEmitter();
this.resultOk = new i0.EventEmitter(); // Emitted when done with date selecting
// Emitted when done with date selecting
this.closePicker = new i0.EventEmitter(); // Notify outside to close the picker panel
// Notify outside to close the picker panel
this.prefixCls = 'ant-calendar';
this.showTimePicker = false;
this.partTypeMap = { 'left': 0, 'right': 1 };
this.disabledStartTime = ( /**
* @param {?} value
* @return {?}
*/function (value) {
return _this.disabledTime && _this.disabledTime(value, 'start');
});
this.disabledEndTime = ( /**
* @param {?} value
* @return {?}
*/function (value) {
return _this.disabledTime && _this.disabledTime(value, 'end');
});
}
Object.defineProperty(DateRangePopupComponent.prototype, "hasTimePicker", {
get:
// Range ONLY
/**
* @return {?}
*/
function () {
return !!this.showTime;
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateRangePopupComponent.prototype, "hasFooter", {
get: /**
* @return {?}
*/ function () {
return this.showToday || this.hasTimePicker || !!this.extraFooter || !!this.ranges;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
DateRangePopupComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
// Initialization for range properties to prevent errors while later assignment
if (this.isRange) {
['placeholder', 'panelMode', 'selectedValue', 'hoverValue'].forEach(( /**
* @param {?} prop
* @return {?}
*/function (prop) { return _this.initialArray(prop); }));
}
};
/**
* @param {?} changes
* @return {?}
*/
DateRangePopupComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (this.isRange) {
if (changes.value) { // Re-initialize all related values
this.clearHoverValue();
this.selectedValue = ( /** @type {?} */(this.value));
this.valueForRangeShow = this.normalizeRangeValue(( /** @type {?} */(this.value)));
}
}
// Parse showTime options
if (changes.showTime || changes.disabledTime) {
if (this.showTime) {
this.buildTimeOptions();
}
}
// Show time picker when assigned panel mode as "time"
if (changes.panelMode && this.hasTimePicker) {
this.showTimePicker = this.panelMode === 'time';
}
};
/**
* @param {?} show
* @return {?}
*/
DateRangePopupComponent.prototype.onShowTimePickerChange = /**
* @param {?} show
* @return {?}
*/
function (show) {
// this.panelMode = show ? 'time' : 'date';
// this.panelModeChange.emit(this.panelMode);
this.panelModeChange.emit(show ? 'time' : 'date');
};
/**
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.onClickToday = /**
* @param {?} value
* @return {?}
*/
function (value) {
// if (this.isRange) { // Show today is not support by range
// throw new Error('"nzShowToday" is not support for "RangePicker"!');
// } else {
if (!this.isRange) {
this.value = null; // Clear current value to not sync time by next step
this.changeValue(value);
}
this.closePickerPanel();
};
/**
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.onDayHover = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.isRange && this.selectedValue[0] && !this.selectedValue[1]) { // When right value is selected, don't do hover
// When right value is selected, don't do hover
/** @type {?} */
var base = this.selectedValue[0];
if (base.isBefore(value, 'day')) {
this.hoverValue = [base, value];
}
else {
this.hoverValue = [value, base];
}
}
};
/**
* @param {?} mode
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.onPanelModeChange = /**
* @param {?} mode
* @param {?=} partType
* @return {?}
*/
function (mode, partType) {
if (this.isRange) {
(( /** @type {?} */(this.panelMode)))[this.getPartTypeIndex(partType)] = mode;
}
else {
this.panelMode = mode;
}
this.panelModeChange.emit(this.panelMode);
};
/**
* @param {?} value
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.onHeaderChange = /**
* @param {?} value
* @param {?=} partType
* @return {?}
*/
function (value, partType) {
if (this.isRange) {
this.valueForRangeShow[this.getPartTypeIndex(partType)] = value;
this.valueForRangeShow = this.normalizeRangeValue(this.valueForRangeShow); // Should always take care of start/end
}
};
/**
* @param {?} value
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.onSelectTime = /**
* @param {?} value
* @param {?=} partType
* @return {?}
*/
function (value, partType) {
if (this.isRange) {
/** @type {?} */
var newValue = this.cloneRangeDate(( /** @type {?} */(this.value)));
/** @type {?} */
var index = this.getPartTypeIndex(partType);
newValue[index] = this.overrideHms(value, newValue[index]);
this.setValue(newValue);
}
else {
this.setValue(this.overrideHms(value, (( /** @type {?} */(this.value))) || new CandyDate())); // If not select a date currently, use today
}
};
/**
* @param {?} value
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.changeValue = /**
* @param {?} value
* @param {?=} partType
* @return {?}
*/
function (value, partType) {
if (this.isRange) {
/** @type {?} */
var index = this.getPartTypeIndex(partType);
this.selectedValue[index] = value;
if (this.isValidRange(this.selectedValue)) {
this.valueForRangeShow = this.normalizeRangeValue(this.selectedValue);
this.setValue(this.cloneRangeDate(this.selectedValue));
}
}
else {
this.setValue(value);
}
};
/**
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.changeValueFromSelect = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.isRange) {
var _a = __read(( /** @type {?} */(this.selectedValue)), 2), left = _a[0], right = _a[1];
if ((!left && !right) || (left && right)) { // If totally full or empty, clean up && re-assign left first
this.hoverValue = this.selectedValue = [value];
}
else if (left && !right) { // If one of them is empty, assign the other one and sort, then set the final values
this.clearHoverValue(); // Clean up
this.setRangeValue('selectedValue', 'right', value);
this.sortRangeValue('selectedValue'); // Sort
this.valueForRangeShow = this.normalizeRangeValue(this.selectedValue);
this.setValue(this.cloneRangeDate(this.selectedValue));
}
}
else {
this.setValue(value);
}
// this.selectDate.emit(value);
};
/**
* @param {?} direction
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.enablePrevNext = /**
* @param {?} direction
* @param {?=} partType
* @return {?}
*/
function (direction, partType) {
if (this.isRange) {
var _a = __read(this.valueForRangeShow, 2), start = _a[0], end = _a[1];
/** @type {?} */
var showMiddle = !start.addMonths(1).isSame(end, 'month');
if ((partType === 'left' && direction === 'next') || (partType === 'right' && direction === 'prev')) {
return showMiddle;
}
return true;
}
else {
return true;
}
};
/**
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.getPanelMode = /**
* @param {?=} partType
* @return {?}
*/
function (partType) {
if (this.isRange) {
return ( /** @type {?} */(this.panelMode[this.getPartTypeIndex(partType)]));
}
else {
return ( /** @type {?} */(this.panelMode));
}
};
// Get single value or part value of a range
// Get single value or part value of a range
/**
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.getValue =
// Get single value or part value of a range
/**
* @param {?=} partType
* @return {?}
*/
function (partType) {
if (this.isRange) {
return this.value[this.getPartTypeIndex(partType)];
}
else {
return ( /** @type {?} */(this.value));
}
};
/**
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.getValueBySelector = /**
* @param {?=} partType
* @return {?}
*/
function (partType) {
if (this.isRange) {
/** @type {?} */
var valueShow = this.showTimePicker ? this.value : this.valueForRangeShow;
return valueShow[this.getPartTypeIndex(partType)];
}
else {
return ( /** @type {?} */(this.value));
}
};
/**
* @param {?} partType
* @return {?}
*/
DateRangePopupComponent.prototype.getPartTypeIndex = /**
* @param {?} partType
* @return {?}
*/
function (partType) {
return this.partTypeMap[partType];
};
/**
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.getPlaceholder = /**
* @param {?=} partType
* @return {?}
*/
function (partType) {
return this.isRange ? this.placeholder[this.getPartTypeIndex(partType)] : ( /** @type {?} */(this.placeholder));
};
/**
* @return {?}
*/
DateRangePopupComponent.prototype.hasSelectedValue = /**
* @return {?}
*/
function () {
return this.selectedValue && !!this.selectedValue[1] && !!this.selectedValue[0];
};
/**
* @return {?}
*/
DateRangePopupComponent.prototype.isAllowedSelectedValue = /**
* @return {?}
*/
function () {
/** @type {?} */
var selectedValue = this.selectedValue;
if (selectedValue && selectedValue[0] && selectedValue[1]) {
return isAllowedDate(selectedValue[0], this.disabledDate, this.disabledStartTime) &&
isAllowedDate(selectedValue[1], this.disabledDate, this.disabledEndTime);
}
return false;
};
/**
* @return {?}
*/
DateRangePopupComponent.prototype.timePickerDisabled = /**
* @return {?}
*/
function () {
if (!this.hasTimePicker) {
return true;
}
if (this.isRange) {
return !this.hasSelectedValue() || !!this.hoverValue.length;
}
else {
return false;
}
};
/**
* @return {?}
*/
DateRangePopupComponent.prototype.okDisabled = /**
* @return {?}
*/
function () {
if (!this.hasTimePicker) {
return true;
}
if (this.isRange) {
return !this.isAllowedSelectedValue() || !this.hasSelectedValue() || !!this.hoverValue.length;
}
else {
return this.value ? !isAllowedDate(( /** @type {?} */(this.value)), this.disabledDate, this.disabledTime) : false;
}
};
/**
* @param {?=} partType
* @return {?}
*/
DateRangePopupComponent.prototype.getTimeOptions = /**
* @param {?=} partType
* @return {?}
*/
function (partType) {
if (this.showTime && this.timeOptions) {
return this.isRange ? this.timeOptions[this.getPartTypeIndex(partType)] : this.timeOptions;
}
return null;
};
/**
* @param {?} val
* @return {?}
*/
DateRangePopupComponent.prototype.onClickPresetRange = /**
* @param {?} val
* @return {?}
*/
function (val) {
/** @type {?} */
var value = val;
this.setValue([new CandyDate(value[0]), new CandyDate(value[1])]);
this.resultOk.emit();
};
/**
* @return {?}
*/
DateRangePopupComponent.prototype.onPresetRangeMouseLeave = /**
* @return {?}
*/
function () {
this.clearHoverValue();
};
/**
* @param {?} val
* @return {?}
*/
DateRangePopupComponent.prototype.onHoverPresetRange = /**
* @param {?} val
* @return {?}
*/
function (val) {
this.hoverValue = ([new CandyDate(val[0]), new CandyDate(val[1])]);
};
/**
* @param {?} obj
* @return {?}
*/
DateRangePopupComponent.prototype.getObjectKeys = /**
* @param {?} obj
* @return {?}
*/
function (obj) {
return obj ? Object.keys(obj) : [];
};
/**
* @private
* @return {?}
*/
DateRangePopupComponent.prototype.closePickerPanel = /**
* @private
* @return {?}
*/
function () {
this.closePicker.emit();
};
/**
* @private
* @return {?}
*/
DateRangePopupComponent.prototype.clearHoverValue = /**
* @private
* @return {?}
*/
function () {
this.hoverValue = [];
};
/**
* @private
* @return {?}
*/
DateRangePopupComponent.prototype.buildTimeOptions = /**
* @private
* @return {?}
*/
function () {
if (this.showTime) {
/** @type {?} */
var showTime = typeof this.showTime === 'object' ? this.showTime : {};
if (this.isRange) {
this.timeOptions = [this.overrideTimeOptions(showTime, this.value[0], 'start'), this.overrideTimeOptions(showTime, this.value[1], 'end')];
}
else {
this.timeOptions = this.overrideTimeOptions(showTime, ( /** @type {?} */(this.value)));
}
}
else {
this.timeOptions = null;
}
};
/**
* @private
* @param {?} origin
* @param {?} value
* @param {?=} partial
* @return {?}
*/
DateRangePopupComponent.prototype.overrideTimeOptions = /**
* @private
* @param {?} origin
* @param {?} value
* @param {?=} partial
* @return {?}
*/
function (origin, value, partial) {
/** @type {?} */
var disabledTimeFn;
if (partial) {
disabledTimeFn = partial === 'start' ? this.disabledStartTime : this.disabledEndTime;
}
else {
disabledTimeFn = this.disabledTime;
}
return __assign({}, origin, getTimeConfig(value, disabledTimeFn));
};
// Set value and trigger change event
// Set value and trigger change event
/**
* @private
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.setValue =
// Set value and trigger change event
/**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
/** @type {?} */
var newValue = value;
// TODO: Sync original time (NOTE: this should take more care of beacuse it may depend on many change sources)
// if (this.isRange) {
// // TODO: Sync time
// } else {
// if (this.value) { // Sync time from the original one if it's available
// newValue = this.overrideHms(this.value as CandyDate, newValue as CandyDate);
// }
// }
this.value = newValue;
this.valueChange.emit(this.value);
this.buildTimeOptions();
};
/**
* @private
* @param {?} from
* @param {?} to
* @return {?}
*/
DateRangePopupComponent.prototype.overrideHms = /**
* @private
* @param {?} from
* @param {?} to
* @return {?}
*/
function (from, to) {
if (!from || !to) {
return null;
}
return to.setHms(from.getHours(), from.getMinutes(), from.getSeconds());
};
// Check if it's a valid range value
// Check if it's a valid range value
/**
* @private
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.isValidRange =
// Check if it's a valid range value
/**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
if (Array.isArray(value)) {
var _a = __read(value, 2), start = _a[0], end = _a[1];
/** @type {?} */
var grain = this.hasTimePicker ? 'second' : 'day';
return start && end && (start.isBefore(end, grain) || start.isSame(end, grain));
}
return false;
};
/**
* @private
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.normalizeRangeValue = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
var _a = __read(value, 2), start = _a[0], end = _a[1];
/** @type {?} */
var newStart = start || new CandyDate();
/** @type {?} */
var newEnd = end && end.isSame(newStart, 'month') ? end.addMonths(1) : end || newStart.addMonths(1);
return [newStart, newEnd];
};
// private isEmptyRangeValue(value: CandyDate[]): boolean {
// return !value || !Array.isArray(value) || value.every((val) => !val);
// }
// Sort a range value (accurate to second)
// private isEmptyRangeValue(value: CandyDate[]): boolean {
// return !value || !Array.isArray(value) || value.every((val) => !val);
// }
// Sort a range value (accurate to second)
/**
* @private
* @param {?} key
* @return {?}
*/
DateRangePopupComponent.prototype.sortRangeValue =
// private isEmptyRangeValue(value: CandyDate[]): boolean {
// return !value || !Array.isArray(value) || value.every((val) => !val);
// }
// Sort a range value (accurate to second)
/**
* @private
* @param {?} key
* @return {?}
*/
function (key) {
if (Array.isArray(this[key])) {
var _a = __read(this[key], 2), start = _a[0], end = _a[1];
if (start && end && start.isAfter(end, 'day')) {
this[key] = [end, start];
}
}
};
// Renew and set a range value to trigger sub-component's change detection
// Renew and set a range value to trigger sub-component's change detection
/**
* @private
* @param {?} key
* @param {?} partType
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.setRangeValue =
// Renew and set a range value to trigger sub-component's change detection
/**
* @private
* @param {?} key
* @param {?} partType
* @param {?} value
* @return {?}
*/
function (key, partType, value) {
/** @type {?} */
var ref = this[key] = this.cloneRangeDate(( /** @type {?} */(this[key])));
ref[this.getPartTypeIndex(partType)] = value;
};
/**
* @private
* @param {?} value
* @return {?}
*/
DateRangePopupComponent.prototype.cloneRangeDate = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
return ( /** @type {?} */([value[0] && value[0].clone(), value[1] && value[1].clone()]));
};
/**
* @private
* @param {?} key
* @return {?}
*/
DateRangePopupComponent.prototype.initialArray = /**
* @private
* @param {?} key
* @return {?}
*/
function (key) {
if (!this[key] || !Array.isArray(this[key])) {
this[key] = [];
}
};
DateRangePopupComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'date-range-popup',
template: "<div\n class=\"{{ prefixCls }}-picker-container {{ dropdownClassName }} {{ prefixCls }}-picker-container-placement-bottomLeft\"\n [ngStyle]=\"popupStyle\">\n\n <div class=\"{{ prefixCls }} {{ showWeek ? prefixCls + '-week-number': '' }} {{ hasTimePicker ? prefixCls + '-time' : '' }} {{ isRange ? prefixCls + '-range' : '' }}\" tabindex=\"0\">\n <div class=\"{{ prefixCls }}-panel\">\n <ng-container *ngIf=\"!isRange\"> <!-- Single ONLY -->\n <ng-container *ngTemplateOutlet=\"tplCalendarInput\"></ng-container>\n </ng-container>\n <div class=\"{{ prefixCls }}-date-panel\">\n <ng-container *ngIf=\"isRange; else tplSinglePart\">\n <!-- Range Selectors -->\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'left' }\"></ng-container>\n <div class=\"ant-calendar-range-middle\">~</div>\n <ng-container *ngTemplateOutlet=\"tplRangePart; context: { partType: 'right' }\"></ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!isRange\"> <!-- Single ONLY -->\n <ng-container *ngTemplateOutlet=\"tplFooter\"></ng-container>\n </ng-container>\n </div>\n <ng-container *ngIf=\"isRange\"> <!-- Range ONLY -->\n <ng-container *ngTemplateOutlet=\"tplFooter\"></ng-container>\n </ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #tplCalendarInput let-partType=\"partType\">\n <calendar-input\n [value]=\"getValue(partType)\"\n (valueChange)=\"changeValue($event, partType)\"\n [locale]=\"locale\"\n [disabledDate]=\"disabledDate\"\n [format]=\"format\"\n [placeholder]=\"getPlaceholder(partType)\"\n ></calendar-input>\n</ng-template>\n\n<ng-template #tplInnerPopup let-partType=\"partType\">\n <inner-popup\n [showWeek]=\"showWeek\"\n [locale]=\"locale\"\n [showTimePicker]=\"hasTimePicker && showTimePicker\"\n [timeOptions]=\"getTimeOptions(partType)\"\n [panelMode]=\"getPanelMode(partType)\"\n (panelModeChange)=\"onPanelModeChange($event, partType)\"\n [value]=\"getValueBySelector(partType)\"\n [disabledDate]=\"disabledDate\"\n [dateRender]=\"dateRender\"\n [selectedValue]=\"selectedValue\"\n [hoverValue]=\"hoverValue\"\n [enablePrev]=\"enablePrevNext('prev', partType)\"\n [enableNext]=\"enablePrevNext('next', partType)\"\n (dayHover)=\"onDayHover($event)\"\n (selectDate)=\"changeValueFromSelect($event)\"\n (selectTime)=\"onSelectTime($event, partType)\"\n (headerChange)=\"onHeaderChange($event, partType)\"\n ></inner-popup>\n</ng-template>\n\n<ng-template #tplFooter>\n <calendar-footer\n *ngIf=\"hasFooter\"\n [locale]=\"locale\"\n [showToday]=\"showToday\"\n [hasTimePicker]=\"hasTimePicker\"\n [timePickerDisabled]=\"timePickerDisabled()\"\n [okDisabled]=\"okDisabled()\"\n [extraFooter]=\"extraFooter\"\n [rangeQuickSelector]=\"ranges ? tplRangeQuickSelector : null\"\n [(showTimePicker)]=\"showTimePicker\"\n (showTimePickerChange)=\"onShowTimePickerChange($event)\"\n (clickOk)=\"resultOk.emit()\"\n (clickToday)=\"onClickToday($event)\"\n ></calendar-footer>\n</ng-template>\n\n<!-- Single ONLY -->\n<ng-template #tplSinglePart>\n <ng-container *ngTemplateOutlet=\"tplInnerPopup\"></ng-container>\n</ng-template>\n\n<!-- Range ONLY -->\n<ng-template #tplRangePart let-partType=\"partType\">\n <div class=\"{{ prefixCls }}-range-part {{ prefixCls }}-range-{{ partType }}\">\n <ng-container *ngTemplateOutlet=\"tplCalendarInput; context: { partType: partType }\"></ng-container>\n <div style=\"outline: none;\">\n <ng-container *ngTemplateOutlet=\"tplInnerPopup; context: { partType: partType }\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<!-- Range ONLY: Range Quick Selector -->\n<ng-template #tplRangeQuickSelector>\n <a *ngFor=\"let name of getObjectKeys(ranges)\"\n (click)=\"onClickPresetRange(ranges[name])\"\n (mouseenter)=\"onHoverPresetRange(ranges[name])\"\n (mouseleave)=\"onPresetRangeMouseLeave()\"\n >{{ name }}</a>\n</ng-template>"
}] }
];
DateRangePopupComponent.propDecorators = {
isRange: [{ type: i0.Input }],
showWeek: [{ type: i0.Input }],
locale: [{ type: i0.Input }],
format: [{ type: i0.Input }],
placeholder: [{ type: i0.Input }],
disabledDate: [{ type: i0.Input }],
disabledTime: [{ type: i0.Input }],
showToday: [{ type: i0.Input }],
showTime: [{ type: i0.Input }],
extraFooter: [{ type: i0.Input }],
ranges: [{ type: i0.Input }],
dateRender: [{ type: i0.Input }],
popupStyle: [{ type: i0.Input }],
dropdownClassName: [{ type: i0.Input }],
panelMode: [{ type: i0.Input }],
panelModeChange: [{ type: i0.Output }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }],
resultOk: [{ type: i0.Output }],
closePicker: [{ type: i0.Output }]
};
return DateRangePopupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var InnerPopupComponent = /** @class */ (function () {
function InnerPopupComponent() {
this.panelModeChange = new i0.EventEmitter();
this.headerChange = new i0.EventEmitter(); // Emitted when user changed the header's value
// Emitted when user changed the header's value
this.selectDate = new i0.EventEmitter(); // Emitted when the date is selected by click the date panel
// Emitted when the date is selected by click the date panel
this.selectTime = new i0.EventEmitter();
this.dayHover = new i0.EventEmitter(); // Emitted when hover on a day by mouse enter
// Emitted when hover on a day by mouse enter
this.prefixCls = 'ant-calendar';
}
/**
* @return {?}
*/
InnerPopupComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () { };
/**
* @param {?} changes
* @return {?}
*/
InnerPopupComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.value && !this.value) {
this.value = new CandyDate();
}
};
/**
* @param {?} date
* @return {?}
*/
InnerPopupComponent.prototype.onSelectTime = /**
* @param {?} date
* @return {?}
*/
function (date) {
this.selectTime.emit(new CandyDate(date));
};
// The value real changed to outside
// The value real changed to outside
/**
* @param {?} date
* @return {?}
*/
InnerPopupComponent.prototype.onSelectDate =
// The value real changed to outside
/**
* @param {?} date
* @return {?}
*/
function (date) {
/** @type {?} */
var value = date instanceof CandyDate ? date : new CandyDate(date);
this.selectDate.emit(value);
};
InnerPopupComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'inner-popup',
template: "<calendar-header\n [(panelMode)]=\"panelMode\"\n (panelModeChange)=\"panelModeChange.emit($event)\"\n [(value)]=\"value\"\n (valueChange)=\"headerChange.emit($event)\"\n [locale]=\"locale\"\n [showTimePicker]=\"showTimePicker\"\n [enablePrev]=\"enablePrev\"\n [enableNext]=\"enableNext\"\n></calendar-header>\n\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 [nzAddOn]=\"timeOptions.nzAddOn\"\n ></nz-time-picker-panel>\n</ng-container>\n\n<div class=\"{{ prefixCls }}-body\">\n <date-table\n [locale]=\"locale\"\n [showWeek]=\"showWeek\"\n [value]=\"value\"\n (valueChange)=\"onSelectDate($event)\"\n showWeekNumber=\"false\"\n [disabledDate]=\"disabledDate\"\n [dateRender]=\"dateRender\"\n [selectedValue]=\"selectedValue\"\n [hoverValue]=\"hoverValue\"\n (dayHover)=\"dayHover.emit($event)\"\n ></date-table>\n</div>"
}] }
];
/** @nocollapse */
InnerPopupComponent.ctorParameters = function () { return []; };
InnerPopupComponent.propDecorators = {
showWeek: [{ type: i0.Input }],
locale: [{ type: i0.Input }],
showTimePicker: [{ type: i0.Input }],
timeOptions: [{ type: i0.Input }],
enablePrev: [{ type: i0.Input }],
enableNext: [{ type: i0.Input }],
disabledDate: [{ type: i0.Input }],
dateRender: [{ type: i0.Input }],
selectedValue: [{ type: i0.Input }],
hoverValue: [{ type: i0.Input }],
panelMode: [{ type: i0.Input }],
panelModeChange: [{ type: i0.Output }],
value: [{ type: i0.Input }],
headerChange: [{ type: i0.Output }],
selectDate: [{ type: i0.Output }],
selectTime: [{ type: i0.Output }],
dayHover: [{ type: i0.Output }]
};
return InnerPopupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var MAX_ROW$2 = 4;
/** @type {?} */
var MAX_COL$2 = 3;
var YearPanelComponent = /** @class */ (function () {
function YearPanelComponent() {
this.valueChange = new i0.EventEmitter();
this.decadePanelShow = new i0.EventEmitter();
this.prefixCls = 'ant-calendar-year-panel';
}
Object.defineProperty(YearPanelComponent.prototype, "currentYear", {
get: /**
* @return {?}
*/ function () {
return this.value.getYear();
},
enumerable: true,
configurable: true
});
Object.defineProperty(YearPanelComponent.prototype, "startYear", {
get: /**
* @return {?}
*/ function () {
return parseInt("" + this.currentYear / 10, 10) * 10;
},
enumerable: true,
configurable: true
});
Object.defineProperty(YearPanelComponent.prototype, "endYear", {
get: /**
* @return {?}
*/ function () {
return this.startYear + 9;
},
enumerable: true,
configurable: true
});
/**
* @param {?} changes
* @return {?}
*/
YearPanelComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.value || changes.disabledDate) {
this.render();
}
};
/**
* @return {?}
*/
YearPanelComponent.prototype.previousDecade = /**
* @return {?}
*/
function () {
this.gotoYear(-10);
};
/**
* @return {?}
*/
YearPanelComponent.prototype.nextDecade = /**
* @return {?}
*/
function () {
this.gotoYear(10);
};
/**
* @param {?} _index
* @param {?} yearData
* @return {?}
*/
YearPanelComponent.prototype.trackPanelYear = /**
* @param {?} _index
* @param {?} yearData
* @return {?}
*/
function (_index, yearData) {
return yearData.content;
};
/**
* @private
* @return {?}
*/
YearPanelComponent.prototype.render = /**
* @private
* @return {?}
*/
function () {
if (this.value) {
this.panelYears = this.makePanelYears();
}
};
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
/**
* @private
* @param {?} amount
* @return {?}
*/
YearPanelComponent.prototype.gotoYear =
// Re-render panel content by the header's buttons (NOTE: Do not try to trigger final value change)
/**
* @private
* @param {?} amount
* @return {?}
*/
function (amount) {
this.value = this.value.addYears(amount);
// this.valueChange.emit(this.value); // Do not trigger final value change
this.render();
};
/**
* @private
* @param {?} year
* @return {?}
*/
YearPanelComponent.prototype.chooseYear = /**
* @private
* @param {?} year
* @return {?}
*/
function (year) {
this.value = this.value.setYear(year);
this.valueChange.emit(this.value);
this.render();
};
/**
* @private
* @return {?}
*/
YearPanelComponent.prototype.makePanelYears = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var years = [];
/** @type {?} */
var currentYear = this.currentYear;
/** @type {?} */
var startYear = this.startYear;
/** @type {?} */
var endYear = this.endYear;
/** @type {?} */
var previousYear = startYear - 1;
/** @type {?} */
var index = 0;
for (var rowIndex = 0; rowIndex < MAX_ROW$2; rowIndex++) {
years[rowIndex] = [];
var _loop_1 = function (colIndex) {
var _a;
/** @type {?} */
var year = previousYear + index;
/** @type {?} */
var content = String(year);
/** @type {?} */
var disabled = this_1.disabledDate ? this_1.disabledDate(this_1.value.setYear(year).nativeDate) : false;
/** @type {?} */
var cell = years[rowIndex][colIndex] = {
disabled: disabled,
content: content,
year: year,
title: content,
isCurrent: year === currentYear,
isLowerThanStart: year < startYear,
isBiggerThanEnd: year > endYear,
classMap: null,
onClick: null
};
cell.classMap = (_a = {},
_a[this_1.prefixCls + "-cell"] = true,
_a[this_1.prefixCls + "-selected-cell"] = cell.isCurrent,
_a[this_1.prefixCls + "-cell-disabled"] = disabled,
_a[this_1.prefixCls + "-last-decade-cell"] = cell.isLowerThanStart,
_a[this_1.prefixCls + "-next-decade-cell"] = cell.isBiggerThanEnd,
_a);
if (cell.isLowerThanStart) {
cell.onClick = ( /**
* @return {?}
*/function () { return _this.previousDecade(); });
}
else if (cell.isBiggerThanEnd) {
cell.onClick = ( /**
* @return {?}
*/function () { return _this.nextDecade(); });
}
else {
cell.onClick = ( /**
* @return {?}
*/function () { return _this.chooseYear(cell.year); });
}
index++;
};
var this_1 = this;
for (var colIndex = 0; colIndex < MAX_COL$2; colIndex++) {
_loop_1(colIndex);
}
}
return years;
};
YearPanelComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:component-selector
selector: 'year-panel',
template: "<div class=\"{{ prefixCls }}\">\n <div>\n <div class=\"{{ prefixCls }}-header\">\n <a\n class=\"{{ prefixCls }}-prev-decade-btn\"\n role=\"button\"\n (click)=\"previousDecade()\"\n title=\"{{ locale.previousDecade }}\"\n ></a>\n <a\n class=\"{{ prefixCls }}-decade-select\"\n role=\"button\"\n (click)=\"decadePanelShow.emit()\"\n title=\"{{ locale.decadeSelect }}\"\n >\n <span class=\"{{ prefixCls }}-decade-select-content\">\n {{ startYear }}-{{ endYear }}\n </span>\n <span class=\"{{ prefixCls }}-decade-select-arrow\">x</span>\n </a>\n\n <a class=\"{{ prefixCls }}-next-decade-btn\" (click)=\"nextDecade()\" title=\"{{ locale.nextDecade }}\" role=\"button\"></a>\n </div>\n <div class=\"{{ prefixCls }}-body\">\n <table class=\"{{ prefixCls }}-table\" cellSpacing=\"0\" role=\"grid\">\n <tbody class=\"{{ prefixCls }}-tbody\">\n <tr *ngFor=\"let row of panelYears\" role=\"row\">\n <td *ngFor=\"let yearCell of row; trackBy: trackPanelYear\"\n role=\"gridcell\"\n title=\"{{ yearCell.title }}\"\n (click)=\"yearCell.disabled ? null : yearCell.onClick()\"\n [ngClass]=\"yearCell.classMap\"\n >\n <a class=\"{{ prefixCls }}-year\">{{ yearCell.content }}</a>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n</div>",
styles: [
// Support disabledDate
"\n .ant-calendar-year-panel-cell-disabled .ant-calendar-year-panel-year, .ant-calendar-year-panel-cell-disabled .ant-calendar-year-panel-year:hover {\n color: rgba(0,0,0,0.25);\n background: #f5f5f5;\n cursor: not-allowed;\n }\n "
]
}] }
];
/** @nocollapse */
YearPanelComponent.ctorParameters = function () { return []; };
YearPanelComponent.propDecorators = {
locale: [{ type: i0.Input }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }],
disabledDate: [{ type: i0.Input }],
decadePanelShow: [{ type: i0.Output }]
};
return YearPanelComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var LibPackerModule = /** @class */ (function () {
function LibPackerModule() {
}
LibPackerModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [
i2$1.CommonModule,
forms.FormsModule,
NzI18nModule,
NzTimePickerModule
],
exports: [
CalendarHeaderComponent,
CalendarInputComponent,
CalendarFooterComponent,
OkButtonComponent,
TimePickerButtonComponent,
TodayButtonComponent,
DateTableComponent,
YearPanelComponent,
MonthPanelComponent,
MonthTableComponent,
DecadePanelComponent,
InnerPopupComponent,
DateRangePopupComponent
],
declarations: [
CalendarHeaderComponent,
CalendarInputComponent,
CalendarFooterComponent,
OkButtonComponent,
TimePickerButtonComponent,
TodayButtonComponent,
DateTableComponent,
YearPanelComponent,
MonthPanelComponent,
MonthTableComponent,
DecadePanelComponent,
InnerPopupComponent,
DateRangePopupComponent
]
},] }
];
return LibPackerModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPickerComponent = /** @class */ (function () {
function NzPickerComponent(dateHelper, changeDetector) {
this.dateHelper = dateHelper;
this.changeDetector = changeDetector;
this.noAnimation = false;
this.isRange = false;
this.open = undefined; // "undefined" = this value will be not used
this.valueChange = new i0.EventEmitter();
this.openChange = new i0.EventEmitter(); // Emitted when overlay's open state change
this.prefixCls = 'ant-calendar';
this.animationOpenState = false;
this.overlayOpen = false; // Available when "open"=undefined
// Available when "open"=undefined
this.overlayOffsetY = 0;
this.overlayOffsetX = -2;
this.overlayPositions = ( /** @type {?} */([
{
// offsetX: -10, // TODO: What a pity, cdk/overlay current not support offset configs even though it already provide these properties
// offsetY: -10,
originX: 'start',
originY: 'top',
overlayX: 'start',
overlayY: 'top'
},
{
originX: 'start',
originY: 'bottom',
overlayX: 'start',
overlayY: 'bottom'
},
{
originX: 'end',
originY: 'top',
overlayX: 'end',
overlayY: 'top'
},
{
originX: 'end',
originY: 'bottom',
overlayX: 'end',
overlayY: 'bottom'
}
]));
this.dropdownAnimation = 'bottom';
this.currentPositionX = 'start';
this.currentPositionY = 'top';
}
Object.defineProperty(NzPickerComponent.prototype, "realOpenState", {
get: /**
* @return {?}
*/ function () {
return this.isOpenHandledByUser() ? this.open : this.overlayOpen;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzPickerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
};
/**
* @return {?}
*/
NzPickerComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
if (this.autoFocus) {
if (this.isRange) {
/** @type {?} */
var firstInput = ( /** @type {?} */((( /** @type {?} */(this.pickerInput.nativeElement))).querySelector('input:first-child')));
firstInput.focus(); // Focus on the first input
}
else {
this.pickerInput.nativeElement.focus();
}
}
};
// Show overlay content
// Show overlay content
/**
* @return {?}
*/
NzPickerComponent.prototype.showOverlay =
// Show overlay content
/**
* @return {?}
*/
function () {
var _this = this;
if (!this.realOpenState) {
this.overlayOpen = true;
this.openChange.emit(this.overlayOpen);
setTimeout(( /**
* @return {?}
*/function () {
if (_this.cdkConnectedOverlay && _this.cdkConnectedOverlay.overlayRef) {
_this.cdkConnectedOverlay.overlayRef.updatePosition();
}
}));
}
};
/**
* @return {?}
*/
NzPickerComponent.prototype.hideOverlay = /**
* @return {?}
*/
function () {
if (this.realOpenState) {
this.overlayOpen = false;
this.openChange.emit(this.overlayOpen);
}
};
/**
* @return {?}
*/
NzPickerComponent.prototype.onClickInputBox = /**
* @return {?}
*/
function () {
if (!this.disabled && !this.isOpenHandledByUser()) {
this.showOverlay();
}
};
/**
* @return {?}
*/
NzPickerComponent.prototype.onClickBackdrop = /**
* @return {?}
*/
function () {
this.hideOverlay();
};
/**
* @return {?}
*/
NzPickerComponent.prototype.onOverlayDetach = /**
* @return {?}
*/
function () {
this.hideOverlay();
};
// NOTE: A issue here, the first time position change, the animation will not be triggered.
// Because the overlay's "positionChange" event is emitted after the content's full shown up.
// All other components like "nz-dropdown" which depends on overlay also has the same issue.
// See: https://github.com/NG-ZORRO/ng-zorro-antd/issues/1429
// NOTE: A issue here, the first time position change, the animation will not be triggered.
// Because the overlay's "positionChange" event is emitted after the content's full shown up.
// All other components like "nz-dropdown" which depends on overlay also has the same issue.
// See: https://github.com/NG-ZORRO/ng-zorro-antd/issues/1429
/**
* @param {?} position
* @return {?}
*/
NzPickerComponent.prototype.onPositionChange =
// NOTE: A issue here, the first time position change, the animation will not be triggered.
// Because the overlay's "positionChange" event is emitted after the content's full shown up.
// All other components like "nz-dropdown" which depends on overlay also has the same issue.
// See: https://github.com/NG-ZORRO/ng-zorro-antd/issues/1429
/**
* @param {?} position
* @return {?}
*/
function (position) {
this.dropdownAnimation = position.connectionPair.originY === 'top' ? 'bottom' : 'top';
this.currentPositionX = ( /** @type {?} */(position.connectionPair.originX));
this.currentPositionY = ( /** @type {?} */(position.connectionPair.originY));
this.changeDetector.detectChanges(); // Take side-effects to position styles
};
/**
* @param {?} event
* @return {?}
*/
NzPickerComponent.prototype.onClickClear = /**
* @param {?} event
* @return {?}
*/
function (event) {
event.preventDefault();
event.stopPropagation();
this.value = this.isRange ? [] : null;
this.valueChange.emit(this.value);
};
/**
* @param {?=} partType
* @return {?}
*/
NzPickerComponent.prototype.getReadableValue = /**
* @param {?=} partType
* @return {?}
*/
function (partType) {
/** @type {?} */
var value;
if (this.isRange) {
value = this.value[this.getPartTypeIndex(partType)];
}
else {
value = ( /** @type {?} */(this.value));
}
return value ? this.dateHelper.format(value.nativeDate, this.format) : null;
};
/**
* @param {?} partType
* @return {?}
*/
NzPickerComponent.prototype.getPartTypeIndex = /**
* @param {?} partType
* @return {?}
*/
function (partType) {
return { 'left': 0, 'right': 1 }[partType];
};
/**
* @param {?=} partType
* @return {?}
*/
NzPickerComponent.prototype.getPlaceholder = /**
* @param {?=} partType
* @return {?}
*/
function (partType) {
return this.isRange ? this.placeholder[this.getPartTypeIndex(partType)] : ( /** @type {?} */(this.placeholder));
};
/**
* @param {?} value
* @return {?}
*/
NzPickerComponent.prototype.isEmptyValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.isRange) {
return !value || !Array.isArray(value) || value.every(( /**
* @param {?} val
* @return {?}
*/function (val) { return !val; }));
}
else {
return !value;
}
};
// Whether open state is permanently controlled by user himself
// Whether open state is permanently controlled by user himself
/**
* @return {?}
*/
NzPickerComponent.prototype.isOpenHandledByUser =
// Whether open state is permanently controlled by user himself
/**
* @return {?}
*/
function () {
return this.open !== undefined;
};
/**
* @return {?}
*/
NzPickerComponent.prototype.animationStart = /**
* @return {?}
*/
function () {
if (this.realOpenState) {
this.animationOpenState = true;
}
};
/**
* @return {?}
*/
NzPickerComponent.prototype.animationDone = /**
* @return {?}
*/
function () {
this.animationOpenState = this.realOpenState;
};
NzPickerComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-picker',
template: "<span\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n class=\"{{ prefixCls }}-picker {{ size ? prefixCls + '-picker-' + size : '' }} {{ className }}\"\n [ngStyle]=\"style\"\n tabindex=\"0\"\n (click)=\"onClickInputBox()\"\n>\n <!-- Content of single picker -->\n <ng-container *ngIf=\"!isRange\">\n <input\n #pickerInput\n class=\"{{ prefixCls }}-picker-input ant-input\"\n [class.ant-input-lg]=\"size === 'large'\"\n [class.ant-input-sm]=\"size === 'small'\"\n [class.ant-input-disabled]=\"disabled\"\n\n [disabled]=\"disabled\"\n readonly\n value=\"{{ getReadableValue() }}\"\n placeholder=\"{{ getPlaceholder() }}\"\n />\n <ng-container *ngTemplateOutlet=\"tplRightRest\"></ng-container>\n </ng-container>\n\n <!-- Content of range picker -->\n <ng-container *ngIf=\"isRange\">\n <span\n #pickerInput\n class=\"{{ prefixCls }}-picker-input ant-input\"\n [class.ant-input-lg]=\"size === 'large'\"\n [class.ant-input-sm]=\"size === 'small'\"\n [class.ant-input-disabled]=\"disabled\"\n >\n <ng-container *ngTemplateOutlet=\"tplRangeInput; context: { partType: 'left' }\"></ng-container>\n <span class=\"{{ prefixCls }}-range-picker-separator\"> ~ </span>\n <ng-container *ngTemplateOutlet=\"tplRangeInput; context: { partType: 'right' }\"></ng-container>\n <ng-container *ngTemplateOutlet=\"tplRightRest\"></ng-container>\n </span>\n </ng-container>\n</span>\n\n<!-- Input for Range ONLY -->\n<ng-template #tplRangeInput let-partType=\"partType\">\n <input\n class=\"{{ prefixCls }}-range-picker-input\"\n [disabled]=\"disabled\"\n readonly\n value=\"{{ getReadableValue(partType) }}\"\n placeholder=\"{{ getPlaceholder(partType) }}\"\n />\n</ng-template>\n\n<!-- Right operator icons -->\n<ng-template #tplRightRest>\n <i\n nz-icon\n type=\"close-circle\"\n theme=\"fill\"\n *ngIf=\"!disabled && !isEmptyValue(value) && allowClear\"\n class=\"{{ prefixCls }}-picker-clear\"\n (click)=\"onClickClear($event)\"\n ></i>\n <span class=\"{{ prefixCls }}-picker-icon\">\n <i nz-icon type=\"calendar\"></i>\n </span>\n</ng-template>\n\n<!-- Overlay -->\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>\n <div\n [nzNoAnimation]=\"noAnimation\"\n [@slideMotion]=\"dropdownAnimation\"\n (@slideMotion.start)=\"animationStart()\"\n (@slideMotion.done)=\"animationDone()\"\n style=\"position: relative;\"\n [style.left]=\"currentPositionX === 'start' ? '-2px' : '2px'\"\n [style.top]=\"currentPositionY === 'top' ? '-2px' : '2px'\"\n > <!-- Compatible for overlay that not support offset dynamically and immediately -->\n <ng-content></ng-content>\n </div>\n</ng-template>",
animations: [
slideMotion
],
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzPickerComponent.ctorParameters = function () {
return [
{ type: DateHelperService$$1 },
{ type: i0.ChangeDetectorRef }
];
};
NzPickerComponent.propDecorators = {
noAnimation: [{ type: i0.Input }],
isRange: [{ type: i0.Input }],
open: [{ type: i0.Input }],
disabled: [{ type: i0.Input }],
placeholder: [{ type: i0.Input }],
allowClear: [{ type: i0.Input }],
autoFocus: [{ type: i0.Input }],
className: [{ type: i0.Input }],
format: [{ type: i0.Input }],
size: [{ type: i0.Input }],
style: [{ type: i0.Input }],
value: [{ type: i0.Input }],
valueChange: [{ type: i0.Output }],
openChange: [{ type: i0.Output }],
origin: [{ type: i0.ViewChild, args: ['origin',] }],
cdkConnectedOverlay: [{ type: i0.ViewChild, args: [i2$2.CdkConnectedOverlay,] }],
pickerInput: [{ type: i0.ViewChild, args: ['pickerInput',] }]
};
return NzPickerComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var POPUP_STYLE_PATCH = { 'position': 'relative' };
// Aim to override antd's style to support overlay's position strategy (position:absolute will cause it not working beacuse the overlay can't get the height/width of it's content)
/**
* The base picker for all common APIs
* @abstract
*/
var AbstractPickerComponent = /** @class */ (function () {
function AbstractPickerComponent(i18n, cdr, dateHelper, noAnimation) {
this.i18n = i18n;
this.cdr = cdr;
this.dateHelper = dateHelper;
this.noAnimation = noAnimation;
// --- Common API
this.nzAllowClear = true;
this.nzAutoFocus = false;
this.nzDisabled = false;
this.nzPopupStyle = POPUP_STYLE_PATCH;
this.nzOnOpenChange = new i0.EventEmitter();
this.isRange = false; // Indicate whether the value is a range value
this.destroyed$ = new rxjs.Subject();
this.isCustomPlaceHolder = false;
// ------------------------------------------------------------------------
// | Control value accessor implements
// ------------------------------------------------------------------------
// NOTE: onChangeFn/onTouchedFn will not be assigned if user not use as ngModel
this.onChangeFn = ( /**
* @return {?}
*/function () { return void 0; });
this.onTouchedFn = ( /**
* @return {?}
*/function () { return void 0; });
}
Object.defineProperty(AbstractPickerComponent.prototype, "realOpenState", {
get:
// Indicate whether the value is a range value
/**
* @return {?}
*/
function () {
return this.picker.animationOpenState;
} // Use picker's real open state to let re-render the picker's content when shown up
,
enumerable: true,
configurable: true
});
// Use picker's real open state to let re-render the picker's content when shown up
/**
* @return {?}
*/
AbstractPickerComponent.prototype.initValue =
// Use picker's real open state to let re-render the picker's content when shown up
/**
* @return {?}
*/
function () {
this.nzValue = this.isRange ? [] : null;
};
/**
* @return {?}
*/
AbstractPickerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
// Subscribe the every locale change if the nzLocale is not handled by user
if (!this.nzLocale) {
this.i18n.localeChange
.pipe(operators.takeUntil(this.destroyed$))
.subscribe(( /**
* @return {?}
*/function () { return _this.setLocale(); }));
}
// Default value
this.initValue();
};
/**
* @param {?} changes
* @return {?}
*/
AbstractPickerComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzPopupStyle) { // Always assign the popup style patch
this.nzPopupStyle = this.nzPopupStyle ? __assign({}, this.nzPopupStyle, POPUP_STYLE_PATCH) : POPUP_STYLE_PATCH;
}
// Mark as customized placeholder by user once nzPlaceHolder assigned at the first time
if (changes.nzPlaceHolder && changes.nzPlaceHolder.firstChange && typeof this.nzPlaceHolder !== 'undefined') {
this.isCustomPlaceHolder = true;
}
if (changes.nzLocale) { // The nzLocale is currently handled by user
this.setDefaultPlaceHolder();
}
};
/**
* @return {?}
*/
AbstractPickerComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroyed$.next();
this.destroyed$.complete();
};
/**
* @return {?}
*/
AbstractPickerComponent.prototype.closeOverlay = /**
* @return {?}
*/
function () {
this.picker.hideOverlay();
};
/**
* Common handle for value changes
* @param value changed value
*/
/**
* Common handle for value changes
* @param {?} value changed value
* @return {?}
*/
AbstractPickerComponent.prototype.onValueChange = /**
* Common handle for value changes
* @param {?} value changed value
* @return {?}
*/
function (value) {
this.nzValue = value;
if (this.isRange) {
if ((( /** @type {?} */(this.nzValue))).length) {
this.onChangeFn([this.nzValue[0].nativeDate, this.nzValue[1].nativeDate]);
}
else {
this.onChangeFn([]);
}
}
else {
if (this.nzValue) {
this.onChangeFn((( /** @type {?} */(this.nzValue))).nativeDate);
}
else {
this.onChangeFn(null);
}
}
this.onTouchedFn();
};
/**
* Triggered when overlayOpen changes (different with realOpenState)
* @param open The overlayOpen in picker component
*/
/**
* Triggered when overlayOpen changes (different with realOpenState)
* @param {?} open The overlayOpen in picker component
* @return {?}
*/
AbstractPickerComponent.prototype.onOpenChange = /**
* Triggered when overlayOpen changes (different with realOpenState)
* @param {?} open The overlayOpen in picker component
* @return {?}
*/
function (open) {
this.nzOnOpenChange.emit(open);
};
/**
* @param {?} value
* @return {?}
*/
AbstractPickerComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.setValue(value);
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
AbstractPickerComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChangeFn = fn;
};
/**
* @param {?} fn
* @return {?}
*/
AbstractPickerComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouchedFn = fn;
};
/**
* @param {?} disabled
* @return {?}
*/
AbstractPickerComponent.prototype.setDisabledState = /**
* @param {?} disabled
* @return {?}
*/
function (disabled) {
this.nzDisabled = disabled;
this.cdr.markForCheck();
};
// ------------------------------------------------------------------------
// | Internal methods
// ------------------------------------------------------------------------
// Reload locale from i18n with side effects
// ------------------------------------------------------------------------
// | Internal methods
// ------------------------------------------------------------------------
// Reload locale from i18n with side effects
/**
* @private
* @return {?}
*/
AbstractPickerComponent.prototype.setLocale =
// ------------------------------------------------------------------------
// | Internal methods
// ------------------------------------------------------------------------
// Reload locale from i18n with side effects
/**
* @private
* @return {?}
*/
function () {
this.nzLocale = this.i18n.getLocaleData('DatePicker', {});
this.setDefaultPlaceHolder();
this.cdr.markForCheck();
};
/**
* @private
* @return {?}
*/
AbstractPickerComponent.prototype.setDefaultPlaceHolder = /**
* @private
* @return {?}
*/
function () {
if (!this.isCustomPlaceHolder && this.nzLocale) {
this.nzPlaceHolder = this.isRange ? this.nzLocale.lang.rangePlaceholder : this.nzLocale.lang.placeholder;
}
};
// Safe way of setting value with default
// Safe way of setting value with default
/**
* @private
* @param {?} value
* @return {?}
*/
AbstractPickerComponent.prototype.setValue =
// Safe way of setting value with default
/**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
if (this.isRange) {
this.nzValue = value ? (( /** @type {?} */(value))).map(( /**
* @param {?} val
* @return {?}
*/function (val) { return new CandyDate(val); })) : [];
}
else {
this.nzValue = value ? new CandyDate(( /** @type {?} */(value))) : null;
}
};
AbstractPickerComponent.propDecorators = {
nzAllowClear: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzOpen: [{ type: i0.Input }],
nzClassName: [{ type: i0.Input }],
nzDisabledDate: [{ type: i0.Input }],
nzLocale: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzPopupStyle: [{ type: i0.Input }],
nzDropdownClassName: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzStyle: [{ type: i0.Input }],
nzOnOpenChange: [{ type: i0.Output }],
nzFormat: [{ type: i0.Input }],
nzValue: [{ type: i0.Input }],
picker: [{ type: i0.ViewChild, args: [NzPickerComponent,] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], AbstractPickerComponent.prototype, "nzAllowClear", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], AbstractPickerComponent.prototype, "nzAutoFocus", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], AbstractPickerComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], AbstractPickerComponent.prototype, "nzOpen", void 0);
return AbstractPickerComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var DateRangePickerComponent = /** @class */ (function (_super) {
__extends(DateRangePickerComponent, _super);
function DateRangePickerComponent(i18n, cdr, dateHelper, noAnimation) {
var _this = _super.call(this, i18n, cdr, dateHelper, noAnimation) || this;
_this.showWeek = false; // Should show as week picker
_this.nzShowToday = true;
_this.nzOnPanelChange = new i0.EventEmitter();
_this.nzOnOk = new i0.EventEmitter();
return _this;
}
Object.defineProperty(DateRangePickerComponent.prototype, "nzShowTime", {
get: /**
* @return {?}
*/ function () { return this._showTime; },
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._showTime = typeof value === 'object' ? value : toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(DateRangePickerComponent.prototype, "realShowToday", {
get: /**
* @return {?}
*/ function () {
return !this.isRange && this.nzShowToday;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
DateRangePickerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
_super.prototype.ngOnInit.call(this);
// Default format when it's empty
if (!this.nzFormat) {
if (this.showWeek) {
this.nzFormat = this.dateHelper.relyOnDatePipe ? 'yyyy-ww' : 'YYYY-WW'; // Format for week
}
else {
if (this.dateHelper.relyOnDatePipe) {
this.nzFormat = this.nzShowTime ? 'yyyy-MM-dd HH:mm:ss' : 'yyyy-MM-dd';
}
else {
this.nzFormat = this.nzShowTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD';
}
}
}
};
/**
* @param {?} changes
* @return {?}
*/
DateRangePickerComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
_super.prototype.ngOnChanges.call(this, changes);
if (changes.nzRenderExtraFooter) {
this.extraFooter = valueFunctionProp(this.nzRenderExtraFooter);
}
if (changes.nzShowTime || changes.nzStyle) {
this.setFixedPickerStyle();
}
};
// If has no timepicker and the user select a date by date panel, then close picker
// If has no timepicker and the user select a date by date panel, then close picker
/**
* @param {?} value
* @return {?}
*/
DateRangePickerComponent.prototype.onValueChange =
// If has no timepicker and the user select a date by date panel, then close picker
/**
* @param {?} value
* @return {?}
*/
function (value) {
_super.prototype.onValueChange.call(this, value);
if (!this.nzShowTime) {
this.closeOverlay();
}
};
// Emitted when done with date selecting
// Emitted when done with date selecting
/**
* @return {?}
*/
DateRangePickerComponent.prototype.onResultOk =
// Emitted when done with date selecting
/**
* @return {?}
*/
function () {
if (this.isRange) {
if ((( /** @type {?} */(this.nzValue))).length) {
this.nzOnOk.emit([this.nzValue[0].nativeDate, this.nzValue[1].nativeDate]);
}
else {
this.nzOnOk.emit([]);
}
}
else {
if (this.nzValue) {
this.nzOnOk.emit((( /** @type {?} */(this.nzValue))).nativeDate);
}
else {
this.nzOnOk.emit(null);
}
}
this.closeOverlay();
};
/**
* @param {?} open
* @return {?}
*/
DateRangePickerComponent.prototype.onOpenChange = /**
* @param {?} open
* @return {?}
*/
function (open) {
this.nzOnOpenChange.emit(open);
};
// Setup fixed style for picker
// Setup fixed style for picker
/**
* @private
* @return {?}
*/
DateRangePickerComponent.prototype.setFixedPickerStyle =
// Setup fixed style for picker
/**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var showTimeFixes = {};
if (this.nzShowTime) {
showTimeFixes.width = this.isRange ? '350px' : '195px';
}
this.pickerStyle = __assign({}, showTimeFixes, this.nzStyle);
};
DateRangePickerComponent.decorators = [
{ type: i0.Component, args: [{
template: "" // Just for rollup
}] }
];
/** @nocollapse */
DateRangePickerComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 },
{ type: NzNoAnimationDirective }
];
};
DateRangePickerComponent.propDecorators = {
nzDateRender: [{ type: i0.Input }],
nzDisabledTime: [{ type: i0.Input }],
nzRenderExtraFooter: [{ type: i0.Input }],
nzShowToday: [{ type: i0.Input }],
nzMode: [{ type: i0.Input }],
nzRanges: [{ type: i0.Input }],
nzOnPanelChange: [{ type: i0.Output }],
nzShowTime: [{ type: i0.Input }],
nzOnOk: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], DateRangePickerComponent.prototype, "nzShowToday", void 0);
return DateRangePickerComponent;
}(AbstractPickerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDatePickerComponent = /** @class */ (function (_super) {
__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: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.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: forms.NG_VALUE_ACCESSOR,
multi: true,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzDatePickerComponent; }))
}]
}] }
];
/** @nocollapse */
NzDatePickerComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 },
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
return NzDatePickerComponent;
}(DateRangePickerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* The base picker for header panels, current support: Year/Month
*/
var HeaderPickerComponent = /** @class */ (function (_super) {
__extends(HeaderPickerComponent, _super);
function HeaderPickerComponent(i18n, cdr, dateHelper, noAnimation) {
return _super.call(this, i18n, cdr, dateHelper, noAnimation) || this;
}
/**
* @return {?}
*/
HeaderPickerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
_super.prototype.ngOnInit.call(this);
this.panelMode = this.endPanelMode;
/** @type {?} */
var allHeaderPanels = ['decade', 'year', 'month'];
this.supportPanels = allHeaderPanels.slice(0, allHeaderPanels.indexOf(this.endPanelMode) + 1);
};
/**
* @param {?} changes
* @return {?}
*/
HeaderPickerComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
_super.prototype.ngOnChanges.call(this, changes);
if (changes.nzRenderExtraFooter) {
this.extraFooter = valueFunctionProp(this.nzRenderExtraFooter);
}
};
/**
* @param {?} mode
* @return {?}
*/
HeaderPickerComponent.prototype.onPanelModeChange = /**
* @param {?} mode
* @return {?}
*/
function (mode) {
if (this.supportPanels.indexOf(mode) > -1) {
this.panelMode = mode;
}
else { // Since the default "click year" logic can be "year panel" -> "date panel", we need force to the end panel otherwise
this.panelMode = this.endPanelMode;
}
};
/**
* @param {?} mode
* @param {?} value
* @return {?}
*/
HeaderPickerComponent.prototype.onChooseValue = /**
* @param {?} mode
* @param {?} value
* @return {?}
*/
function (mode, value) {
if (this.endPanelMode === mode) {
_super.prototype.onValueChange.call(this, value);
this.closeOverlay();
}
};
/**
* @param {?} open
* @return {?}
*/
HeaderPickerComponent.prototype.onOpenChange = /**
* @param {?} open
* @return {?}
*/
function (open) {
if (!open) {
this.cleanUp();
}
this.nzOnOpenChange.emit(open);
};
// Restore some initial props to let open as new in next time
// Restore some initial props to let open as new in next time
/**
* @private
* @return {?}
*/
HeaderPickerComponent.prototype.cleanUp =
// Restore some initial props to let open as new in next time
/**
* @private
* @return {?}
*/
function () {
this.panelMode = this.endPanelMode;
};
HeaderPickerComponent.decorators = [
{ type: i0.Component, args: [{
template: ""
}] }
];
/** @nocollapse */
HeaderPickerComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 },
{ type: NzNoAnimationDirective }
];
};
HeaderPickerComponent.propDecorators = {
nzPlaceHolder: [{ type: i0.Input }],
nzRenderExtraFooter: [{ type: i0.Input }],
nzDefaultValue: [{ type: i0.Input }],
nzFormat: [{ type: i0.Input }]
};
return HeaderPickerComponent;
}(AbstractPickerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMonthPickerComponent = /** @class */ (function (_super) {
__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: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.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: forms.NG_VALUE_ACCESSOR,
multi: true,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzMonthPickerComponent; }))
}]
}] }
];
/** @nocollapse */
NzMonthPickerComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 },
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzMonthPickerComponent.propDecorators = {
nzFormat: [{ type: i0.Input }]
};
return NzMonthPickerComponent;
}(HeaderPickerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRangePickerComponent = /** @class */ (function (_super) {
__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: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.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: forms.NG_VALUE_ACCESSOR,
multi: true,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzRangePickerComponent; }))
}]
}] }
];
/** @nocollapse */
NzRangePickerComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 },
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
return NzRangePickerComponent;
}(DateRangePickerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzWeekPickerComponent = /** @class */ (function (_super) {
__extends(NzWeekPickerComponent, _super);
function NzWeekPickerComponent(i18n, cdr, dateHelper, renderer, elementRef, noAnimation) {
var _this = _super.call(this, i18n, cdr, dateHelper, noAnimation) || this;
_this.noAnimation = noAnimation;
_this.showWeek = true;
renderer.addClass(elementRef.nativeElement, 'ant-calendar-picker');
return _this;
}
NzWeekPickerComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
selector: 'nz-week-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: forms.NG_VALUE_ACCESSOR,
multi: true,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzWeekPickerComponent; }))
}]
}] }
];
/** @nocollapse */
NzWeekPickerComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 },
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
return NzWeekPickerComponent;
}(DateRangePickerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzYearPickerComponent = /** @class */ (function (_super) {
__extends(NzYearPickerComponent, _super);
function NzYearPickerComponent(i18n, cdr, dateHelper, renderer, elementRef, noAnimation) {
var _this = _super.call(this, i18n, cdr, dateHelper, noAnimation) || this;
_this.noAnimation = noAnimation;
_this.nzFormat = 'yyyy';
_this.endPanelMode = 'year';
renderer.addClass(elementRef.nativeElement, 'ant-calendar-picker');
return _this;
}
NzYearPickerComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
selector: 'nz-year-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: forms.NG_VALUE_ACCESSOR,
multi: true,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzYearPickerComponent; }))
}]
}] }
];
/** @nocollapse */
NzYearPickerComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef },
{ type: DateHelperService$$1 },
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzYearPickerComponent.propDecorators = {
nzFormat: [{ type: i0.Input }]
};
return NzYearPickerComponent;
}(HeaderPickerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDatePickerModule = /** @class */ (function () {
function NzDatePickerModule() {
}
NzDatePickerModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [
i2$1.CommonModule,
i2$2.OverlayModule,
LibPackerModule,
NzIconModule,
NzOverlayModule,
NzNoAnimationModule
],
exports: [
NzDatePickerComponent,
NzRangePickerComponent,
NzMonthPickerComponent,
NzYearPickerComponent,
NzWeekPickerComponent
],
declarations: [
HeaderPickerComponent,
DateRangePickerComponent,
NzPickerComponent,
NzDatePickerComponent,
NzMonthPickerComponent,
NzYearPickerComponent,
NzWeekPickerComponent,
NzRangePickerComponent
]
},] }
];
return NzDatePickerModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDividerComponent = /** @class */ (function () {
function NzDividerComponent(elementRef, nzUpdateHostClassService) {
this.elementRef = elementRef;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.nzType = 'horizontal';
this.nzOrientation = '';
this.nzDashed = false;
}
/**
* @private
* @return {?}
*/
NzDividerComponent.prototype.setClass = /**
* @private
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var orientationPrefix = (this.nzOrientation.length > 0) ? '-' + this.nzOrientation : this.nzOrientation;
this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, (_a = {},
_a['ant-divider'] = true,
_a["ant-divider-" + this.nzType] = true,
_a["ant-divider-with-text" + orientationPrefix] = this.nzText,
_a["ant-divider-dashed"] = this.nzDashed,
_a));
};
/**
* @return {?}
*/
NzDividerComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.setClass();
};
/**
* @return {?}
*/
NzDividerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClass();
};
NzDividerComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-divider',
template: "<span *ngIf=\"nzText\" class=\"ant-divider-inner-text\">\n <ng-container *nzStringTemplateOutlet=\"nzText\">{{ nzText }}</ng-container>\n</span>",
preserveWhitespaces: false,
providers: [NzUpdateHostClassService],
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzDividerComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzUpdateHostClassService }
];
};
NzDividerComponent.propDecorators = {
nzText: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzOrientation: [{ type: i0.Input }],
nzDashed: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDividerComponent.prototype, "nzDashed", void 0);
return NzDividerComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDividerModule = /** @class */ (function () {
function NzDividerModule() {
}
NzDividerModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, NzAddOnModule],
declarations: [NzDividerComponent],
exports: [NzDividerComponent]
},] }
];
return NzDividerModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// tslint:disable-next-line:no-any
/**
* @abstract
* @template R
*/
var
// tslint:disable-next-line:no-any
/**
* @abstract
* @template R
*/
NzDrawerRef = /** @class */ (function () {
function NzDrawerRef() {
}
return NzDrawerRef;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var DRAWER_ANIMATE_DURATION = 300;
/**
* @template T, R, D
*/
var NzDrawerComponent = /** @class */ (function (_super) {
__extends(NzDrawerComponent, _super);
function NzDrawerComponent(document, renderer, overlay, injector, changeDetectorRef, focusTrapFactory, viewContainerRef) {
var _this = _super.call(this) || this;
_this.document = document;
_this.renderer = renderer;
_this.overlay = overlay;
_this.injector = injector;
_this.changeDetectorRef = changeDetectorRef;
_this.focusTrapFactory = focusTrapFactory;
_this.viewContainerRef = viewContainerRef;
_this.nzClosable = true;
_this.nzMaskClosable = true;
_this.nzMask = true;
_this.nzNoAnimation = false;
_this.nzPlacement = 'right';
_this.nzMaskStyle = {};
_this.nzBodyStyle = {};
_this.nzWidth = 256;
_this.nzHeight = 256;
_this.nzZIndex = 1000;
_this.nzOffsetX = 0;
_this.nzOffsetY = 0;
_this.nzOnViewInit = new i0.EventEmitter();
_this.nzOnClose = new i0.EventEmitter();
_this.isOpen = false;
_this.templateContext = {
$implicit: undefined,
drawerRef: ( /** @type {?} */(_this))
};
_this.nzAfterOpen = new rxjs.Subject();
_this.nzAfterClose = new rxjs.Subject();
return _this;
}
Object.defineProperty(NzDrawerComponent.prototype, "nzVisible", {
get: /**
* @return {?}
*/ function () {
return this.isOpen;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.isOpen = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzDrawerComponent.prototype, "offsetTransform", {
get: /**
* @return {?}
*/ function () {
if (!this.isOpen || (this.nzOffsetX + this.nzOffsetY) === 0) {
return null;
}
switch (this.nzPlacement) {
case 'left':
return "translateX(" + this.nzOffsetX + "px)";
case 'right':
return "translateX(-" + this.nzOffsetX + "px)";
case 'top':
return "translateY(" + this.nzOffsetY + "px)";
case 'bottom':
return "translateY(-" + this.nzOffsetY + "px)";
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzDrawerComponent.prototype, "transform", {
get: /**
* @return {?}
*/ function () {
if (this.isOpen) {
return null;
}
switch (this.nzPlacement) {
case 'left':
return "translateX(-100%)";
case 'right':
return "translateX(100%)";
case 'top':
return "translateY(-100%)";
case 'bottom':
return "translateY(100%)";
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzDrawerComponent.prototype, "width", {
get: /**
* @return {?}
*/ function () {
return this.isLeftOrRight ? toCssPixel(this.nzWidth) : null;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzDrawerComponent.prototype, "height", {
get: /**
* @return {?}
*/ function () {
return !this.isLeftOrRight ? toCssPixel(this.nzHeight) : null;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzDrawerComponent.prototype, "isLeftOrRight", {
get: /**
* @return {?}
*/ function () {
return this.nzPlacement === 'left' || this.nzPlacement === 'right';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzDrawerComponent.prototype, "afterOpen", {
get: /**
* @return {?}
*/ function () {
return this.nzAfterOpen.asObservable();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzDrawerComponent.prototype, "afterClose", {
get: /**
* @return {?}
*/ function () {
return this.nzAfterClose.asObservable();
},
enumerable: true,
configurable: true
});
/**
* @param {?} value
* @return {?}
*/
NzDrawerComponent.prototype.isTemplateRef = /**
* @param {?} value
* @return {?}
*/
function (value) {
return value instanceof i0.TemplateRef;
};
/**
* @return {?}
*/
NzDrawerComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.attachOverlay();
this.updateOverlayStyle();
this.updateBodyOverflow();
this.templateContext = { $implicit: this.nzContentParams, drawerRef: ( /** @type {?} */(this)) };
this.changeDetectorRef.detectChanges();
};
/**
* @return {?}
*/
NzDrawerComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
this.attachBodyContent();
setTimeout(( /**
* @return {?}
*/function () {
_this.nzOnViewInit.emit();
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzDrawerComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var _this = this;
if (changes.hasOwnProperty('nzVisible')) {
/** @type {?} */
var value = changes.nzVisible.currentValue;
this.updateOverlayStyle();
if (value) {
this.updateBodyOverflow();
this.savePreviouslyFocusedElement();
this.trapFocus();
}
else {
setTimeout(( /**
* @return {?}
*/function () {
_this.updateBodyOverflow();
_this.restoreFocus();
}), this.getAnimationDuration());
}
}
};
/**
* @return {?}
*/
NzDrawerComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.disposeOverlay();
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.getAnimationDuration = /**
* @private
* @return {?}
*/
function () {
return this.nzNoAnimation ? 0 : DRAWER_ANIMATE_DURATION;
};
/**
* @param {?=} result
* @return {?}
*/
NzDrawerComponent.prototype.close = /**
* @param {?=} result
* @return {?}
*/
function (result) {
var _this = this;
this.isOpen = false;
this.updateOverlayStyle();
this.changeDetectorRef.detectChanges();
setTimeout(( /**
* @return {?}
*/function () {
_this.updateBodyOverflow();
_this.restoreFocus();
_this.nzAfterClose.next(result);
_this.nzAfterClose.complete();
}), this.getAnimationDuration());
};
/**
* @return {?}
*/
NzDrawerComponent.prototype.open = /**
* @return {?}
*/
function () {
var _this = this;
this.isOpen = true;
this.updateOverlayStyle();
this.updateBodyOverflow();
this.savePreviouslyFocusedElement();
this.trapFocus();
this.changeDetectorRef.detectChanges();
setTimeout(( /**
* @return {?}
*/function () {
_this.nzAfterOpen.next();
}), this.getAnimationDuration());
};
/**
* @return {?}
*/
NzDrawerComponent.prototype.closeClick = /**
* @return {?}
*/
function () {
this.nzOnClose.emit();
};
/**
* @return {?}
*/
NzDrawerComponent.prototype.maskClick = /**
* @return {?}
*/
function () {
if (this.nzMaskClosable && this.nzMask) {
this.nzOnClose.emit();
}
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.attachBodyContent = /**
* @private
* @return {?}
*/
function () {
this.bodyPortalOutlet.dispose();
if (this.nzContent instanceof i0.Type) {
/** @type {?} */
var childInjector = new portal.PortalInjector(this.injector, new WeakMap([[NzDrawerRef, this]]));
/** @type {?} */
var componentPortal = new portal.ComponentPortal(this.nzContent, null, childInjector);
/** @type {?} */
var componentRef = this.bodyPortalOutlet.attachComponentPortal(componentPortal);
Object.assign(componentRef.instance, this.nzContentParams);
componentRef.changeDetectorRef.detectChanges();
}
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.attachOverlay = /**
* @private
* @return {?}
*/
function () {
if (!this.overlayRef) {
this.portal = new portal.TemplatePortal(this.drawerTemplate, this.viewContainerRef);
this.overlayRef = this.overlay.create(this.getOverlayConfig());
}
if (this.overlayRef && !this.overlayRef.hasAttached()) {
this.overlayRef.attach(this.portal);
}
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.disposeOverlay = /**
* @private
* @return {?}
*/
function () {
if (this.overlayRef) {
this.overlayRef.dispose();
}
this.overlayRef = null;
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.getOverlayConfig = /**
* @private
* @return {?}
*/
function () {
return new i2$2.OverlayConfig({
positionStrategy: this.overlay.position().global(),
scrollStrategy: this.overlay.scrollStrategies.block()
});
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.updateOverlayStyle = /**
* @private
* @return {?}
*/
function () {
if (this.overlayRef && this.overlayRef.overlayElement) {
this.renderer.setStyle(this.overlayRef.overlayElement, 'pointer-events', this.isOpen ? 'auto' : 'none');
}
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.updateBodyOverflow = /**
* @private
* @return {?}
*/
function () {
if (this.overlayRef) {
if (this.isOpen) {
this.overlayRef.getConfig().scrollStrategy.enable();
}
else {
this.overlayRef.getConfig().scrollStrategy.disable();
}
}
};
/**
* @return {?}
*/
NzDrawerComponent.prototype.savePreviouslyFocusedElement = /**
* @return {?}
*/
function () {
if (this.document && !this.previouslyFocusedElement) {
this.previouslyFocusedElement = ( /** @type {?} */(this.document.activeElement));
// We need the extra check, because IE's svg element has no blur method.
if (this.previouslyFocusedElement && typeof this.previouslyFocusedElement.blur === 'function') {
this.previouslyFocusedElement.blur();
}
}
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.trapFocus = /**
* @private
* @return {?}
*/
function () {
if (!this.focusTrap) {
this.focusTrap = this.focusTrapFactory.create(this.overlayRef.overlayElement);
}
this.focusTrap.focusInitialElement();
};
/**
* @private
* @return {?}
*/
NzDrawerComponent.prototype.restoreFocus = /**
* @private
* @return {?}
*/
function () {
// We need the extra check, because IE can set the `activeElement` to null in some cases.
if (this.previouslyFocusedElement && typeof this.previouslyFocusedElement.focus === 'function') {
this.previouslyFocusedElement.focus();
}
if (this.focusTrap) {
this.focusTrap.destroy();
}
};
NzDrawerComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-drawer',
template: "<ng-template #drawerTemplate>\n <div\n class=\"ant-drawer\"\n [nzNoAnimation]=\"nzNoAnimation\"\n [class.ant-drawer-open]=\"isOpen\"\n [class.ant-drawer-top]=\"nzPlacement === 'top'\"\n [class.ant-drawer-bottom]=\"nzPlacement === 'bottom'\"\n [class.ant-drawer-right]=\"nzPlacement === 'right'\"\n [class.ant-drawer-left]=\"nzPlacement === 'left'\"\n [style.transform]=\"offsetTransform\">\n <div class=\"ant-drawer-mask\" (click)=\"maskClick()\" *ngIf=\"nzMask\" [style.zIndex]=\"nzZIndex\" [ngStyle]=\"nzMaskStyle\"></div>\n <div class=\"ant-drawer-content-wrapper {{ nzWrapClassName }}\"\n [style.zIndex]=\"nzZIndex\"\n [style.width]=\"width\"\n [style.height]=\"height\"\n [style.transform]=\"transform\">\n <div class=\"ant-drawer-content\">\n <div class=\"ant-drawer-wrapper-body\"\n [style.overflow]=\"isLeftOrRight ? 'auto' : null\"\n [style.height]=\"isLeftOrRight ? '100%' : null\">\n <div *ngIf=\"nzTitle\" class=\"ant-drawer-header\">\n <div class=\"ant-drawer-title\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\"><div [innerHTML]=\"nzTitle\"></div></ng-container>\n </div>\n </div>\n <button *ngIf=\"nzClosable\" (click)=\"closeClick()\" aria-label=\"Close\" class=\"ant-drawer-close\">\n <span class=\"ant-drawer-close-x\"><i nz-icon type=\"close\"></i></span>\n </button>\n <div class=\"ant-drawer-body\" [ngStyle]=\"nzBodyStyle\">\n <ng-template cdkPortalOutlet></ng-template>\n <ng-container *ngIf=\"isTemplateRef(nzContent)\">\n <ng-container *ngTemplateOutlet=\"nzContent; context: templateContext\"></ng-container>\n </ng-container>\n <ng-content *ngIf=\"!nzContent\"></ng-content>\n </div>\n </div>\n </div>\n </div>\n </div>\n</ng-template>",
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzDrawerComponent.ctorParameters = function () {
return [
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2$1.DOCUMENT,] }] },
{ type: i0.Renderer2 },
{ type: i2$2.Overlay },
{ type: i0.Injector },
{ type: i0.ChangeDetectorRef },
{ type: a11y.FocusTrapFactory },
{ type: i0.ViewContainerRef }
];
};
NzDrawerComponent.propDecorators = {
nzContent: [{ type: i0.Input }],
nzClosable: [{ type: i0.Input }],
nzMaskClosable: [{ type: i0.Input }],
nzMask: [{ type: i0.Input }],
nzNoAnimation: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzPlacement: [{ type: i0.Input }],
nzMaskStyle: [{ type: i0.Input }],
nzBodyStyle: [{ type: i0.Input }],
nzWrapClassName: [{ type: i0.Input }],
nzWidth: [{ type: i0.Input }],
nzHeight: [{ type: i0.Input }],
nzZIndex: [{ type: i0.Input }],
nzOffsetX: [{ type: i0.Input }],
nzOffsetY: [{ type: i0.Input }],
nzVisible: [{ type: i0.Input }],
nzOnViewInit: [{ type: i0.Output }],
nzOnClose: [{ type: i0.Output }],
drawerTemplate: [{ type: i0.ViewChild, args: ['drawerTemplate',] }],
contentTemplate: [{ type: i0.ViewChild, args: ['contentTemplate',] }],
bodyPortalOutlet: [{ type: i0.ViewChild, args: [portal.CdkPortalOutlet,] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDrawerComponent.prototype, "nzClosable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDrawerComponent.prototype, "nzMaskClosable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDrawerComponent.prototype, "nzMask", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDrawerComponent.prototype, "nzNoAnimation", void 0);
return NzDrawerComponent;
}(NzDrawerRef));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @template R
*/
var /**
* @template R
*/ DrawerBuilderForService$$1 = /** @class */ (function () {
function DrawerBuilderForService$$1(overlay, options) {
var _this = this;
this.overlay = overlay;
this.options = options;
this.unsubscribe$ = new rxjs.Subject();
this.createDrawer();
this.updateOptions(this.options);
// Prevent repeatedly open drawer when tap focus element.
this.drawerRef.instance.savePreviouslyFocusedElement();
this.drawerRef.instance.nzOnViewInit
.pipe(operators.takeUntil(this.unsubscribe$))
.subscribe(( /**
* @return {?}
*/function () {
_this.drawerRef.instance.open();
}));
this.drawerRef.instance.nzOnClose
.subscribe(( /**
* @return {?}
*/function () {
_this.drawerRef.instance.close();
}));
this.drawerRef.instance.afterClose
.pipe(operators.takeUntil(this.unsubscribe$))
.subscribe(( /**
* @return {?}
*/function () {
_this.overlayRef.dispose();
_this.drawerRef = null;
_this.unsubscribe$.next();
_this.unsubscribe$.complete();
}));
}
/**
* @return {?}
*/
DrawerBuilderForService$$1.prototype.getInstance = /**
* @return {?}
*/
function () {
return this.drawerRef && this.drawerRef.instance;
};
/**
* @return {?}
*/
DrawerBuilderForService$$1.prototype.createDrawer = /**
* @return {?}
*/
function () {
this.overlayRef = this.overlay.create();
this.drawerRef = this.overlayRef.attach(new portal.ComponentPortal(NzDrawerComponent));
};
/**
* @param {?} options
* @return {?}
*/
DrawerBuilderForService$$1.prototype.updateOptions = /**
* @param {?} options
* @return {?}
*/
function (options) {
Object.assign(this.drawerRef.instance, options);
};
return DrawerBuilderForService$$1;
}());
var NzDrawerService$$1 = /** @class */ (function () {
function NzDrawerService$$1(overlay) {
this.overlay = overlay;
}
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @template T, D, R
* @param {?} options
* @return {?}
*/
NzDrawerService$$1.prototype.create =
// tslint:disable-next-line:no-any
/**
* @template T, D, R
* @param {?} options
* @return {?}
*/
function (options) {
return new DrawerBuilderForService$$1(this.overlay, options).getInstance();
};
NzDrawerService$$1.decorators = [
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
];
/** @nocollapse */
NzDrawerService$$1.ctorParameters = function () {
return [
{ type: i2$2.Overlay }
];
};
/** @nocollapse */ NzDrawerService$$1.ngInjectableDef = i0.defineInjectable({ factory: function NzDrawerService_Factory() { return new NzDrawerService$$1(i0.inject(i2$2.Overlay)); }, token: NzDrawerService$$1, providedIn: "root" });
return NzDrawerService$$1;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDrawerModule = /** @class */ (function () {
function NzDrawerModule() {
}
NzDrawerModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, i2$2.OverlayModule, portal.PortalModule, NzIconModule, NzAddOnModule, NzNoAnimationModule],
exports: [NzDrawerComponent],
declarations: [NzDrawerComponent],
entryComponents: [NzDrawerComponent],
providers: [NzDrawerService$$1]
},] }
];
return NzDrawerModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMenuDividerDirective = /** @class */ (function () {
function NzMenuDividerDirective(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(elementRef.nativeElement, 'ant-dropdown-menu-item-divider');
}
NzMenuDividerDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-menu-divider]'
},] }
];
/** @nocollapse */
NzMenuDividerDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzMenuDividerDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMenuGroupComponent = /** @class */ (function () {
function NzMenuGroupComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(elementRef.nativeElement, 'ant-menu-item-group');
}
NzMenuGroupComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-menu-group]',
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<div class=\"ant-menu-item-group-title\">\n <ng-content select=\"[title]\"></ng-content>\n</div>\n<ul class=\"ant-menu-item-group-list\">\n <ng-content></ng-content>\n</ul>",
preserveWhitespaces: false
}] }
];
/** @nocollapse */
NzMenuGroupComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzMenuGroupComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMenuService = /** @class */ (function () {
function NzMenuService() {
this.menuItemClick$ = new rxjs.Subject();
this.theme$ = new rxjs.Subject();
this.mode$ = new rxjs.BehaviorSubject('vertical');
this.inlineIndent$ = new rxjs.BehaviorSubject(24);
this.check$ = rxjs.merge(this.theme$, this.mode$, this.inlineIndent$);
this.theme = 'light';
this.mode = 'vertical';
this.inlineIndent = 24;
this.menuOpen$ = new rxjs.BehaviorSubject(false);
}
/**
* @param {?} menu
* @return {?}
*/
NzMenuService.prototype.onMenuItemClick = /**
* @param {?} menu
* @return {?}
*/
function (menu) {
this.menuItemClick$.next(menu);
};
/**
* @param {?} mode
* @return {?}
*/
NzMenuService.prototype.setMode = /**
* @param {?} mode
* @return {?}
*/
function (mode) {
this.mode = mode;
this.mode$.next(mode);
};
/**
* @param {?} theme
* @return {?}
*/
NzMenuService.prototype.setTheme = /**
* @param {?} theme
* @return {?}
*/
function (theme) {
this.theme = theme;
this.theme$.next(theme);
};
/**
* @param {?} indent
* @return {?}
*/
NzMenuService.prototype.setInlineIndent = /**
* @param {?} indent
* @return {?}
*/
function (indent) {
this.inlineIndent = indent;
this.inlineIndent$.next(indent);
};
NzMenuService.decorators = [
{ type: i0.Injectable }
];
return NzMenuService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSubmenuService = /** @class */ (function () {
function NzSubmenuService(nzHostSubmenuService, nzMenuService) {
var _this = this;
this.nzHostSubmenuService = nzHostSubmenuService;
this.nzMenuService = nzMenuService;
this.disabled = false;
this.mode = 'vertical';
this.mode$ = this.nzMenuService.mode$.pipe(operators.map(( /**
* @param {?} mode
* @return {?}
*/function (mode) {
if (mode === 'inline') {
return 'inline';
}
else if (mode === 'vertical' || _this.nzHostSubmenuService) {
return 'vertical';
}
else {
return 'horizontal';
}
})), operators.tap(( /**
* @param {?} mode
* @return {?}
*/function (mode) { return _this.mode = ( /** @type {?} */(mode)); })));
this.level = 1;
this.level$ = new rxjs.BehaviorSubject(1);
this.subMenuOpen$ = new rxjs.BehaviorSubject(false);
this.open$ = new rxjs.BehaviorSubject(false);
this.mouseEnterLeave$ = new rxjs.Subject();
this.menuOpen$ = rxjs.combineLatest(this.subMenuOpen$, this.mouseEnterLeave$).pipe(operators.map(( /**
* @param {?} value
* @return {?}
*/function (value) { return value[0] || value[1]; })), operators.auditTime(150), operators.distinctUntilChanged(), operators.tap(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.setOpenState(data);
if (_this.nzHostSubmenuService) {
_this.nzHostSubmenuService.subMenuOpen$.next(data);
}
})));
if (this.nzHostSubmenuService) {
this.setLevel(this.nzHostSubmenuService.level + 1);
}
}
/**
* @param {?} value
* @return {?}
*/
NzSubmenuService.prototype.setOpenState = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.open$.next(value);
};
/**
* @return {?}
*/
NzSubmenuService.prototype.onMenuItemClick = /**
* @return {?}
*/
function () {
this.setMouseEnterState(false);
};
/**
* @param {?} value
* @return {?}
*/
NzSubmenuService.prototype.setLevel = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.level$.next(value);
this.level = value;
};
/**
* @param {?} value
* @return {?}
*/
NzSubmenuService.prototype.setMouseEnterState = /**
* @param {?} value
* @return {?}
*/
function (value) {
if ((this.mode === 'horizontal' || this.mode === 'vertical' || this.nzMenuService.isInDropDown) && !this.disabled) {
this.mouseEnterLeave$.next(value);
}
};
NzSubmenuService.decorators = [
{ type: i0.Injectable }
];
/** @nocollapse */
NzSubmenuService.ctorParameters = function () {
return [
{ type: NzSubmenuService, decorators: [{ type: i0.SkipSelf }, { type: i0.Optional }] },
{ type: NzMenuService }
];
};
return NzSubmenuService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMenuItemDirective = /** @class */ (function () {
function NzMenuItemDirective(nzUpdateHostClassService, nzMenuService, nzSubmenuService, renderer, elementRef) {
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.nzMenuService = nzMenuService;
this.nzSubmenuService = nzSubmenuService;
this.renderer = renderer;
this.elementRef = elementRef;
this.el = this.elementRef.nativeElement;
this.destroy$ = new rxjs.Subject();
this.originalPadding = null;
this.selected$ = new rxjs.Subject();
this.nzDisabled = false;
this.nzSelected = false;
}
/** clear all item selected status except this */
/**
* clear all item selected status except this
* @param {?} e
* @return {?}
*/
NzMenuItemDirective.prototype.clickMenuItem = /**
* clear all item selected status except this
* @param {?} e
* @return {?}
*/
function (e) {
if (this.nzDisabled) {
e.preventDefault();
e.stopPropagation();
return;
}
this.nzMenuService.onMenuItemClick(this);
if (this.nzSubmenuService) {
this.nzSubmenuService.onMenuItemClick();
}
};
/**
* @return {?}
*/
NzMenuItemDirective.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var prefixName = this.nzMenuService.isInDropDown ? 'ant-dropdown-menu-item' : 'ant-menu-item';
this.nzUpdateHostClassService.updateHostClass(this.el, (_a = {},
_a["" + prefixName] = true,
_a[prefixName + "-selected"] = this.nzSelected,
_a[prefixName + "-disabled"] = this.nzDisabled,
_a));
};
/**
* @param {?} value
* @return {?}
*/
NzMenuItemDirective.prototype.setSelectedState = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.nzSelected = value;
this.selected$.next(value);
this.setClassMap();
};
/**
* @return {?}
*/
NzMenuItemDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
/** store origin padding in padding */
if (this.el.style['padding-left']) {
this.originalPadding = parseInt(this.el.style['padding-left'], 10);
}
rxjs.merge(this.nzMenuService.mode$, this.nzMenuService.inlineIndent$, this.nzSubmenuService ? this.nzSubmenuService.level$ : rxjs.EMPTY).pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
/** @type {?} */
var padding = null;
if (_this.nzMenuService.mode === 'inline') {
if (isNotNil(_this.nzPaddingLeft)) {
padding = _this.nzPaddingLeft;
}
else {
/** @type {?} */
var level = _this.nzSubmenuService ? _this.nzSubmenuService.level + 1 : 1;
padding = level * _this.nzMenuService.inlineIndent;
}
}
else {
padding = _this.originalPadding;
}
if (padding) {
_this.renderer.setStyle(_this.el, 'padding-left', padding + "px");
}
else {
_this.renderer.removeStyle(_this.el, 'padding-left');
}
}));
this.setClassMap();
};
/**
* @param {?} changes
* @return {?}
*/
NzMenuItemDirective.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzSelected) {
this.setSelectedState(this.nzSelected);
}
if (changes.nzDisabled) {
this.setClassMap();
}
};
/**
* @return {?}
*/
NzMenuItemDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzMenuItemDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-menu-item]',
providers: [NzUpdateHostClassService],
host: {
'(click)': 'clickMenuItem($event)'
}
},] }
];
/** @nocollapse */
NzMenuItemDirective.ctorParameters = function () {
return [
{ type: NzUpdateHostClassService },
{ type: NzMenuService },
{ type: NzSubmenuService, decorators: [{ type: i0.Optional }] },
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzMenuItemDirective.propDecorators = {
nzPaddingLeft: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzSelected: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzMenuItemDirective.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzMenuItemDirective.prototype, "nzSelected", void 0);
return NzMenuItemDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMenuDropdownService = /** @class */ (function (_super) {
__extends(NzMenuDropdownService, _super);
function NzMenuDropdownService() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.isInDropDown = true;
return _this;
}
NzMenuDropdownService.decorators = [
{ type: i0.Injectable }
];
return NzMenuDropdownService;
}(NzMenuService));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMenuMenuService = /** @class */ (function (_super) {
__extends(NzMenuMenuService, _super);
function NzMenuMenuService() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.isInDropDown = false;
return _this;
}
NzMenuMenuService.decorators = [
{ type: i0.Injectable }
];
return NzMenuMenuService;
}(NzMenuService));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSubMenuComponent = /** @class */ (function () {
function NzSubMenuComponent(elementRef, nzMenuService, cdr, nzSubmenuService, nzUpdateHostClassService, noAnimation) {
this.elementRef = elementRef;
this.nzMenuService = nzMenuService;
this.cdr = cdr;
this.nzSubmenuService = nzSubmenuService;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.noAnimation = noAnimation;
this.placement = 'rightTop';
this.expandState = 'collapsed';
this.overlayPositions = __spread(DEFAULT_SUBMENU_POSITIONS);
this.destroy$ = new rxjs.Subject();
this.isChildMenuSelected = false;
this.nzOpen = false;
this.nzDisabled = false;
this.nzOpenChange = new i0.EventEmitter();
}
/**
* @param {?} open
* @return {?}
*/
NzSubMenuComponent.prototype.setOpenState = /**
* @param {?} open
* @return {?}
*/
function (open) {
this.nzSubmenuService.setOpenState(open);
};
/**
* @return {?}
*/
NzSubMenuComponent.prototype.clickSubMenuTitle = /**
* @return {?}
*/
function () {
if (this.nzSubmenuService.mode === 'inline' && !this.nzMenuService.isInDropDown && !this.nzDisabled) {
this.setOpenState(!this.nzOpen);
}
};
/**
* @param {?} value
* @return {?}
*/
NzSubMenuComponent.prototype.setMouseEnterState = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.nzSubmenuService.setMouseEnterState(value);
};
/**
* @return {?}
*/
NzSubMenuComponent.prototype.setTriggerWidth = /**
* @return {?}
*/
function () {
if (this.nzSubmenuService.mode === 'horizontal') {
this.triggerWidth = this.cdkOverlayOrigin.nativeElement.getBoundingClientRect().width;
}
};
/**
* @param {?} position
* @return {?}
*/
NzSubMenuComponent.prototype.onPositionChange = /**
* @param {?} position
* @return {?}
*/
function (position) {
this.placement = getPlacementName(position);
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzSubMenuComponent.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var prefixName = this.nzMenuService.isInDropDown ? 'ant-dropdown-menu-submenu' : 'ant-menu-submenu';
this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, (_a = {},
_a["" + prefixName] = true,
_a[prefixName + "-disabled"] = this.nzDisabled,
_a[prefixName + "-open"] = this.nzOpen,
_a[prefixName + "-selected"] = this.isChildMenuSelected,
_a[prefixName + "-" + this.nzSubmenuService.mode] = true,
_a));
};
/**
* @return {?}
*/
NzSubMenuComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
rxjs.combineLatest(this.nzSubmenuService.mode$, this.nzSubmenuService.open$).pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
/** @type {?} */
var mode = data[0];
/** @type {?} */
var open = data[1];
if (open && mode === 'inline') {
_this.expandState = 'expanded';
}
else if (open && mode === 'horizontal') {
_this.expandState = 'bottom';
}
else if (open && mode === 'vertical') {
_this.expandState = 'active';
}
else {
_this.expandState = 'collapsed';
}
_this.overlayPositions = mode === 'horizontal' ? [POSITION_MAP.bottomLeft] : [POSITION_MAP.rightTop, POSITION_MAP.leftTop];
if (open !== _this.nzOpen) {
_this.nzOpen = open;
_this.nzOpenChange.emit(_this.nzOpen);
}
_this.setClassMap();
_this.setTriggerWidth();
}));
this.nzSubmenuService.menuOpen$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.nzMenuService.menuOpen$.next(data);
}));
rxjs.merge(this.nzMenuService.mode$, this.nzMenuService.inlineIndent$, this.nzSubmenuService.level$, this.nzSubmenuService.open$, this.nzSubmenuService.mode$).pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzSubMenuComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.setTriggerWidth();
this.listOfNzMenuItemDirective.changes.pipe(operators.startWith(true), operators.flatMap(( /**
* @return {?}
*/function () {
return rxjs.merge.apply(void 0, __spread([_this.listOfNzMenuItemDirective.changes], _this.listOfNzMenuItemDirective.map(( /**
* @param {?} menu
* @return {?}
*/function (menu) { return menu.selected$; }))));
})), operators.map(( /**
* @return {?}
*/function () {
return _this.listOfNzMenuItemDirective.some(( /**
* @param {?} e
* @return {?}
*/function (e) { return e.nzSelected; }));
})), operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} selected
* @return {?}
*/function (selected) {
_this.isChildMenuSelected = selected;
_this.setClassMap();
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzSubMenuComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzOpen) {
this.nzSubmenuService.setOpenState(this.nzOpen);
}
if (changes.nzDisabled) {
this.nzSubmenuService.disabled = this.nzDisabled;
this.setClassMap();
}
};
/**
* @return {?}
*/
NzSubMenuComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzSubMenuComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-submenu]',
providers: [NzSubmenuService, NzUpdateHostClassService],
animations: [collapseMotion, zoomBigMotion, slideMotion],
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
preserveWhitespaces: false,
template: "<div cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n [class.ant-dropdown-menu-submenu-title]=\"nzMenuService.isInDropDown\"\n [class.ant-menu-submenu-title]=\"!nzMenuService.isInDropDown\"\n [style.paddingLeft.px]=\"nzMenuService.mode === 'inline'? (nzPaddingLeft ? nzPaddingLeft : nzSubmenuService.level * nzMenuService.inlineIndent) : null\"\n (mouseenter)=\"setMouseEnterState(true)\"\n (mouseleave)=\"setMouseEnterState(false)\"\n (click)=\"clickSubMenuTitle()\">\n <ng-content select=\"[title]\"></ng-content>\n <span *ngIf=\"nzMenuService.isInDropDown; else notDropdownTpl\" class=\"ant-dropdown-menu-submenu-arrow\">\n <i nz-icon type=\"right\" class=\"anticon-right ant-dropdown-menu-submenu-arrow-icon\"></i>\n </span>\n <ng-template #notDropdownTpl><i class=\"ant-menu-submenu-arrow\"></i></ng-template>\n</div>\n<ul *ngIf=\"nzMenuService.mode === 'inline'\" [@collapseMotion]=\"expandState\" [nzNoAnimation]=\"noAnimation?.nzNoAnimation\" class=\"ant-menu ant-menu-inline ant-menu-sub\">\n <ng-template [ngTemplateOutlet]=\"subMenuTemplate\"></ng-template>\n</ul>\n<ng-template cdkConnectedOverlay\n (positionChange)=\"onPositionChange($event)\"\n [cdkConnectedOverlayPositions]=\"overlayPositions\"\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayWidth]=\"triggerWidth\"\n [cdkConnectedOverlayOpen]=\"nzOpen && nzMenuService.mode !== 'inline'\">\n <div class=\"ant-menu-submenu ant-menu-submenu-popup\"\n [@slideMotion]=\"expandState\"\n [@zoomBigMotion]=\"expandState\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [class.ant-menu-light]=\"nzMenuService.theme === 'light'\"\n [class.ant-menu-dark]=\"nzMenuService.theme === 'dark'\"\n [class.ant-menu-submenu-placement-bottomLeft]=\"nzSubmenuService.mode === 'horizontal'\"\n [class.ant-menu-submenu-placement-rightTop]=\"nzSubmenuService.mode === 'vertical' && placement === 'rightTop'\"\n [class.ant-menu-submenu-placement-leftTop]=\"nzSubmenuService.mode === 'vertical' && placement === 'leftTop'\"\n (mouseleave)=\"setMouseEnterState(false)\"\n (mouseenter)=\"setMouseEnterState(true)\">\n <ul [class.ant-dropdown-menu]=\"nzMenuService.isInDropDown\"\n [class.ant-menu]=\"!nzMenuService.isInDropDown\"\n [class.ant-dropdown-menu-vertical]=\"nzMenuService.isInDropDown\"\n [class.ant-menu-vertical]=\"!nzMenuService.isInDropDown\"\n [class.ant-dropdown-menu-sub]=\"nzMenuService.isInDropDown\"\n [class.ant-menu-sub]=\"!nzMenuService.isInDropDown\">\n <ng-template [ngTemplateOutlet]=\"subMenuTemplate\"></ng-template>\n </ul>\n </div>\n</ng-template>\n\n<ng-template #subMenuTemplate>\n <ng-content></ng-content>\n</ng-template>",
styles: ["\n .ant-menu-submenu-placement-bottomLeft {\n top: 6px;\n position: relative;\n }\n\n .ant-menu-submenu-placement-rightTop {\n left: 4px;\n position: relative;\n }\n\n .ant-menu-submenu-placement-leftTop {\n right: 4px;\n position: relative;\n }\n "]
}] }
];
/** @nocollapse */
NzSubMenuComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzMenuService },
{ type: i0.ChangeDetectorRef },
{ type: NzSubmenuService },
{ type: NzUpdateHostClassService },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzSubMenuComponent.propDecorators = {
listOfNzSubMenuComponent: [{ type: i0.ContentChildren, args: [NzSubMenuComponent, { descendants: true },] }],
listOfNzMenuItemDirective: [{ type: i0.ContentChildren, args: [NzMenuItemDirective, { descendants: true },] }],
cdkConnectedOverlay: [{ type: i0.ViewChild, args: [i2$2.CdkConnectedOverlay,] }],
cdkOverlayOrigin: [{ type: i0.ViewChild, args: [i2$2.CdkOverlayOrigin, { read: i0.ElementRef },] }],
nzPaddingLeft: [{ type: i0.Input }],
nzOpen: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzOpenChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSubMenuComponent.prototype, "nzOpen", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSubMenuComponent.prototype, "nzDisabled", void 0);
return NzSubMenuComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} dropService
* @param {?} menuService
* @return {?}
*/
function NzMenuFactory(dropService, menuService) {
return dropService ? dropService : menuService;
}
var NzMenuDirective = /** @class */ (function () {
function NzMenuDirective(elementRef, nzMenuService, nzUpdateHostClassService) {
this.elementRef = elementRef;
this.nzMenuService = nzMenuService;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.destroy$ = new rxjs.Subject();
this.listOfOpenedNzSubMenuComponent = [];
this.nzInlineIndent = 24;
this.nzTheme = 'light';
this.nzMode = 'vertical';
this.nzInDropDown = false;
this.nzInlineCollapsed = false;
this.nzSelectable = !this.nzMenuService.isInDropDown;
this.nzClick = new i0.EventEmitter();
}
/**
* @return {?}
*/
NzMenuDirective.prototype.updateInlineCollapse = /**
* @return {?}
*/
function () {
if (this.listOfNzMenuItemDirective) {
if (this.nzInlineCollapsed) {
this.listOfOpenedNzSubMenuComponent = this.listOfNzSubMenuComponent.filter(( /**
* @param {?} submenu
* @return {?}
*/function (submenu) { return submenu.nzOpen; }));
this.listOfNzSubMenuComponent.forEach(( /**
* @param {?} submenu
* @return {?}
*/function (submenu) { return submenu.setOpenState(false); }));
this.nzMode = 'vertical';
}
else {
this.listOfOpenedNzSubMenuComponent.forEach(( /**
* @param {?} submenu
* @return {?}
*/function (submenu) { return submenu.setOpenState(true); }));
this.listOfOpenedNzSubMenuComponent = [];
this.nzMode = this.cacheMode;
}
this.nzMenuService.setMode(this.nzMode);
}
};
/**
* @return {?}
*/
NzMenuDirective.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var prefixName = this.nzMenuService.isInDropDown ? 'ant-dropdown-menu' : 'ant-menu';
this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, (_a = {},
_a["" + prefixName] = true,
_a[prefixName + "-root"] = true,
_a[prefixName + "-" + this.nzTheme] = true,
_a[prefixName + "-" + this.nzMode] = true,
_a[prefixName + "-inline-collapsed"] = this.nzInlineCollapsed,
_a));
};
/**
* @return {?}
*/
NzMenuDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.setClassMap();
this.nzMenuService.menuItemClick$.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} menu
* @return {?}
*/function (menu) {
_this.nzClick.emit(menu);
if (_this.nzSelectable) {
_this.listOfNzMenuItemDirective.forEach(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.setSelectedState(item === menu); }));
}
}));
};
/**
* @return {?}
*/
NzMenuDirective.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
this.cacheMode = this.nzMode;
this.updateInlineCollapse();
};
/**
* @param {?} changes
* @return {?}
*/
NzMenuDirective.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzInlineCollapsed) {
this.updateInlineCollapse();
}
if (changes.nzInlineIndent) {
this.nzMenuService.setInlineIndent(this.nzInlineIndent);
}
if (changes.nzInDropDown) {
this.nzMenuService.isInDropDown = this.nzInDropDown;
}
if (changes.nzTheme) {
this.nzMenuService.setTheme(this.nzTheme);
}
if (changes.nzMode) {
this.nzMenuService.setMode(this.nzMode);
if (!changes.nzMode.isFirstChange() && this.listOfNzSubMenuComponent) {
this.listOfNzSubMenuComponent.forEach(( /**
* @param {?} submenu
* @return {?}
*/function (submenu) { return submenu.setOpenState(false); }));
}
}
if (changes.nzTheme || changes.nzMode || changes.nzInlineCollapsed) {
this.setClassMap();
}
};
/**
* @return {?}
*/
NzMenuDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzMenuDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-menu]',
providers: [
NzUpdateHostClassService,
NzMenuMenuService,
{
provide: NzMenuService,
useFactory: NzMenuFactory,
deps: [
[
new i0.SkipSelf(),
new i0.Optional(),
NzMenuDropdownService
],
NzMenuMenuService
]
}
]
},] }
];
/** @nocollapse */
NzMenuDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzMenuService },
{ type: NzUpdateHostClassService }
];
};
NzMenuDirective.propDecorators = {
listOfNzMenuItemDirective: [{ type: i0.ContentChildren, args: [NzMenuItemDirective, { descendants: true },] }],
listOfNzSubMenuComponent: [{ type: i0.ContentChildren, args: [NzSubMenuComponent, { descendants: true },] }],
nzInlineIndent: [{ type: i0.Input }],
nzTheme: [{ type: i0.Input }],
nzMode: [{ type: i0.Input }],
nzInDropDown: [{ type: i0.Input }],
nzInlineCollapsed: [{ type: i0.Input }],
nzSelectable: [{ type: i0.Input }],
nzClick: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzMenuDirective.prototype, "nzInDropDown", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzMenuDirective.prototype, "nzInlineCollapsed", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzMenuDirective.prototype, "nzSelectable", void 0);
return NzMenuDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMenuModule = /** @class */ (function () {
function NzMenuModule() {
}
NzMenuModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, NzButtonModule, i2$2.OverlayModule, NzIconModule, NzNoAnimationModule],
declarations: [NzMenuDirective, NzMenuItemDirective, NzSubMenuComponent, NzMenuDividerDirective, NzMenuGroupComponent],
exports: [NzMenuDirective, NzMenuItemDirective, NzSubMenuComponent, NzMenuDividerDirective, NzMenuGroupComponent]
},] }
];
return NzMenuModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDropDownADirective = /** @class */ (function () {
function NzDropDownADirective(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-dropdown-link');
}
NzDropDownADirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'a[nz-dropdown]'
},] }
];
/** @nocollapse */
NzDropDownADirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzDropDownADirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDropDownDirective = /** @class */ (function () {
function NzDropDownDirective(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.el = this.elementRef.nativeElement;
this.hover$ = rxjs.merge(rxjs.fromEvent(this.el, 'mouseenter').pipe(operators.mapTo(true)), rxjs.fromEvent(this.el, 'mouseleave').pipe(operators.mapTo(false)));
this.$click = rxjs.fromEvent(this.el, 'click').pipe(operators.tap(( /**
* @param {?} e
* @return {?}
*/function (e) { return e.stopPropagation(); })), operators.mapTo(true));
renderer.addClass(elementRef.nativeElement, 'ant-dropdown-trigger');
}
/**
* @param {?} disabled
* @return {?}
*/
NzDropDownDirective.prototype.setDisabled = /**
* @param {?} disabled
* @return {?}
*/
function (disabled) {
if (disabled) {
this.renderer.setAttribute(this.el, 'disabled', '');
}
else {
this.renderer.removeAttribute(this.el, 'disabled');
}
};
NzDropDownDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-dropdown]'
},] }
];
/** @nocollapse */
NzDropDownDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzDropDownDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDropDownComponent = /** @class */ (function () {
function NzDropDownComponent(cdr, nzMenuDropdownService, noAnimation) {
this.cdr = cdr;
this.nzMenuDropdownService = nzMenuDropdownService;
this.noAnimation = noAnimation;
this.triggerWidth = 0;
this.dropDownPosition = 'bottom';
this.positions = __spread(DEFAULT_DROPDOWN_POSITIONS);
this.visible$ = new rxjs.Subject();
this.destroy$ = new rxjs.Subject();
this.nzTrigger = 'hover';
this.nzOverlayClassName = '';
this.nzOverlayStyle = {};
this.nzPlacement = 'bottomLeft';
this.nzClickHide = true;
this.nzDisabled = false;
this.nzVisible = false;
this.nzTableFilter = false;
this.nzVisibleChange = new i0.EventEmitter();
}
/**
* @param {?} visible
* @param {?=} trigger
* @return {?}
*/
NzDropDownComponent.prototype.setVisibleStateWhen = /**
* @param {?} visible
* @param {?=} trigger
* @return {?}
*/
function (visible, trigger) {
if (trigger === void 0) {
trigger = 'all';
}
if (this.nzTrigger === trigger || trigger === 'all') {
this.visible$.next(visible);
}
};
/**
* @param {?} position
* @return {?}
*/
NzDropDownComponent.prototype.onPositionChange = /**
* @param {?} position
* @return {?}
*/
function (position) {
this.dropDownPosition = position.connectionPair.originY;
this.cdr.markForCheck();
};
/**
* @param {?} observable$
* @return {?}
*/
NzDropDownComponent.prototype.startSubscribe = /**
* @param {?} observable$
* @return {?}
*/
function (observable$) {
var _this = this;
/** @type {?} */
var click$ = this.nzClickHide ? this.nzMenuDropdownService.menuItemClick$.pipe(operators.mapTo(false)) : rxjs.EMPTY;
rxjs.combineLatest(rxjs.merge(observable$, click$), this.nzMenuDropdownService.menuOpen$).pipe(operators.map(( /**
* @param {?} value
* @return {?}
*/function (value) { return value[0] || value[1]; })), operators.debounceTime(50), operators.distinctUntilChanged(), operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} visible
* @return {?}
*/function (visible) {
if (!_this.nzDisabled && _this.nzVisible !== visible) {
_this.nzVisible = visible;
_this.nzVisibleChange.emit(_this.nzVisible);
_this.triggerWidth = _this.nzDropDownDirective.elementRef.nativeElement.getBoundingClientRect().width;
_this.cdr.markForCheck();
}
}));
};
/**
* @return {?}
*/
NzDropDownComponent.prototype.updateDisabledState = /**
* @return {?}
*/
function () {
if (this.nzDropDownDirective) {
this.nzDropDownDirective.setDisabled(this.nzDisabled);
}
};
/**
* @return {?}
*/
NzDropDownComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
/**
* @return {?}
*/
NzDropDownComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
this.startSubscribe(rxjs.merge(this.visible$, this.nzTrigger === 'hover' ? this.nzDropDownDirective.hover$ : this.nzDropDownDirective.$click));
this.updateDisabledState();
};
/**
* @param {?} changes
* @return {?}
*/
NzDropDownComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzVisible) {
this.visible$.next(this.nzVisible);
}
if (changes.nzDisabled) {
this.updateDisabledState();
}
if (changes.nzPlacement) {
this.dropDownPosition = this.nzPlacement.indexOf('top') !== -1 ? 'top' : 'bottom';
this.positions = __spread([POSITION_MAP[this.nzPlacement]], this.positions);
}
};
NzDropDownComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-dropdown',
preserveWhitespaces: false,
providers: [NzMenuDropdownService],
animations: [slideMotion],
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-content select=\"[nz-dropdown]\"></ng-content>\n<ng-template cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"nzTrigger === 'click'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayOrigin]=\"nzDropDownDirective\"\n [cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n [cdkConnectedOverlayOpen]=\"nzVisible\"\n (backdropClick)=\"setVisibleStateWhen(false)\"\n (detach)=\"setVisibleStateWhen(false)\"\n (positionChange)=\"onPositionChange($event)\">\n <div class=\"{{'ant-dropdown ant-dropdown-placement-'+nzPlacement}}\"\n [ngClass]=\"nzOverlayClassName\"\n [ngStyle]=\"nzOverlayStyle\"\n [@slideMotion]=\"dropDownPosition\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [style.minWidth.px]=\"triggerWidth\"\n (mouseenter)=\"setVisibleStateWhen(true,'hover')\"\n (mouseleave)=\"setVisibleStateWhen(false,'hover')\">\n <div [class.ant-table-filter-dropdown]=\"nzTableFilter\">\n <ng-content select=\"[nz-menu]\"></ng-content>\n <ng-content></ng-content>\n </div>\n </div>\n</ng-template>",
styles: ["\n .ant-dropdown {\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n margin-top: 4px;\n margin-bottom: 4px;\n }\n "]
}] }
];
/** @nocollapse */
NzDropDownComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzMenuDropdownService },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzDropDownComponent.propDecorators = {
nzDropDownDirective: [{ type: i0.ContentChild, args: [NzDropDownDirective,] }],
nzMenuDirective: [{ type: i0.ContentChild, args: [NzMenuDirective,] }],
cdkConnectedOverlay: [{ type: i0.ViewChild, args: [i2$2.CdkConnectedOverlay,] }],
nzTrigger: [{ type: i0.Input }],
nzOverlayClassName: [{ type: i0.Input }],
nzOverlayStyle: [{ type: i0.Input }],
nzPlacement: [{ type: i0.Input }],
nzClickHide: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzVisible: [{ type: i0.Input }],
nzTableFilter: [{ type: i0.Input }],
nzVisibleChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDropDownComponent.prototype, "nzClickHide", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDropDownComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDropDownComponent.prototype, "nzVisible", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzDropDownComponent.prototype, "nzTableFilter", void 0);
return NzDropDownComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDropDownButtonComponent = /** @class */ (function (_super) {
__extends(NzDropDownButtonComponent, _super);
function NzDropDownButtonComponent(cdr, nzMenuDropdownService, noAnimation) {
var _this = _super.call(this, cdr, nzMenuDropdownService, noAnimation) || this;
_this.noAnimation = noAnimation;
_this.nzSize = 'default';
_this.nzType = 'default';
_this.nzClick = new i0.EventEmitter();
return _this;
}
/** rewrite afterViewInit hook */
/**
* rewrite afterViewInit hook
* @return {?}
*/
NzDropDownButtonComponent.prototype.ngAfterContentInit = /**
* rewrite afterViewInit hook
* @return {?}
*/
function () {
this.startSubscribe(this.visible$);
};
NzDropDownButtonComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-dropdown-button',
preserveWhitespaces: false,
animations: [slideMotion],
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [NzMenuDropdownService],
template: "<div class=\"ant-btn-group ant-dropdown-button\" nz-dropdown>\n <button nz-button\n type=\"button\"\n [disabled]=\"nzDisabled\"\n [nzType]=\"nzType\"\n [nzSize]=\"nzSize\"\n (click)=\"nzClick.emit($event)\">\n <span><ng-content></ng-content></span>\n </button>\n <button nz-button\n type=\"button\"\n class=\"ant-dropdown-trigger\"\n [nzType]=\"nzType\"\n [nzSize]=\"nzSize\"\n [disabled]=\"nzDisabled\"\n (click)=\"setVisibleStateWhen(true,'click')\"\n (mouseenter)=\"setVisibleStateWhen(true,'hover')\"\n (mouseleave)=\"setVisibleStateWhen(false,'hover')\">\n <i nz-icon type=\"ellipsis\"></i>\n </button>\n</div>\n<ng-template cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"nzTrigger === 'click'\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayOrigin]=\"nzDropDownDirective\"\n (backdropClick)=\"setVisibleStateWhen(false)\"\n (detach)=\"setVisibleStateWhen(false)\"\n [cdkConnectedOverlayMinWidth]=\"triggerWidth\"\n (positionChange)=\"onPositionChange($event)\"\n [cdkConnectedOverlayOpen]=\"nzVisible\">\n <div class=\"{{'ant-dropdown ant-dropdown-placement-'+nzPlacement}}\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [@slideMotion]=\"dropDownPosition\"\n (mouseenter)=\"setVisibleStateWhen(true,'hover')\"\n (mouseleave)=\"setVisibleStateWhen(false,'hover')\"\n [style.minWidth.px]=\"triggerWidth\">\n <ng-content select=\"[nz-menu]\"></ng-content>\n </div>\n</ng-template>",
styles: ["\n nz-dropdown-button {\n position: relative;\n display: inline-block;\n }\n\n .ant-dropdown {\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n margin-top: 4px;\n margin-bottom: 4px;\n }\n "]
}] }
];
/** @nocollapse */
NzDropDownButtonComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzMenuDropdownService },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzDropDownButtonComponent.propDecorators = {
nzSize: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzClick: [{ type: i0.Output }],
nzDropDownDirective: [{ type: i0.ViewChild, args: [NzDropDownDirective,] }]
};
return NzDropDownButtonComponent;
}(NzDropDownComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDropdownContextComponent = /** @class */ (function () {
function NzDropdownContextComponent(cdr) {
this.cdr = cdr;
this.open = true;
this.dropDownPosition = 'bottom';
this.destroy$ = new rxjs.Subject();
}
/**
* @param {?} open
* @param {?} templateRef
* @param {?} positionChanges
* @param {?} control
* @return {?}
*/
NzDropdownContextComponent.prototype.init = /**
* @param {?} open
* @param {?} templateRef
* @param {?} positionChanges
* @param {?} control
* @return {?}
*/
function (open, templateRef, positionChanges, control) {
var _this = this;
this.open = open;
this.templateRef = templateRef;
this.control = control;
positionChanges.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.dropDownPosition = data.connectionPair.overlayY === 'bottom' ? 'top' : 'bottom';
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzDropdownContextComponent.prototype.close = /**
* @return {?}
*/
function () {
this.open = false;
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzDropdownContextComponent.prototype.afterAnimation = /**
* @return {?}
*/
function () {
if (!this.open) {
this.control.dispose();
}
};
// TODO auto set dropdown class after the bug resolved
/** https://github.com/angular/angular/issues/14842 **/
// TODO auto set dropdown class after the bug resolved
/**
* https://github.com/angular/angular/issues/14842 *
* @return {?}
*/
NzDropdownContextComponent.prototype.ngOnDestroy =
// TODO auto set dropdown class after the bug resolved
/**
* https://github.com/angular/angular/issues/14842 *
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzDropdownContextComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-dropdown-context',
animations: [slideMotion],
preserveWhitespaces: false,
template: "<div *ngIf=\"open\"\n class=\"ant-dropdown ant-dropdown-placement-bottomLeft\"\n [@slideMotion]=\"dropDownPosition\"\n (@slideMotion.done)=\"afterAnimation()\">\n <ng-template [ngTemplateOutlet]=\"templateRef\"></ng-template>\n</div>",
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [NzMenuDropdownService],
styles: ["\n nz-dropdown-context {\n display: block;\n }\n\n .ant-dropdown {\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n margin-top: 4px;\n margin-bottom: 4px;\n }\n "]
}] }
];
/** @nocollapse */
NzDropdownContextComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef }
];
};
return NzDropdownContextComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDropDownModule = /** @class */ (function () {
function NzDropDownModule() {
}
NzDropDownModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, i2$2.OverlayModule, forms.FormsModule, NzButtonModule, NzMenuModule, NzIconModule, NzNoAnimationModule],
entryComponents: [NzDropdownContextComponent],
declarations: [NzDropDownComponent, NzDropDownButtonComponent, NzDropDownDirective, NzDropDownADirective, NzDropdownContextComponent],
exports: [NzDropDownComponent, NzDropDownButtonComponent, NzDropDownDirective, NzDropDownADirective]
},] }
];
return NzDropDownModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @enum {number} */
var Breakpoint = {
'xxl': 0,
'xl': 1,
'lg': 2,
'md': 3,
'sm': 4,
'xs': 5,
};
Breakpoint[Breakpoint['xxl']] = 'xxl';
Breakpoint[Breakpoint['xl']] = 'xl';
Breakpoint[Breakpoint['lg']] = 'lg';
Breakpoint[Breakpoint['md']] = 'md';
Breakpoint[Breakpoint['sm']] = 'sm';
Breakpoint[Breakpoint['xs']] = 'xs';
/** @type {?} */
var responsiveMap = {
xs: '(max-width: 575px)',
sm: '(min-width: 576px)',
md: '(min-width: 768px)',
lg: '(min-width: 992px)',
xl: '(min-width: 1200px)',
xxl: '(min-width: 1600px)'
};
var NzRowDirective = /** @class */ (function () {
function NzRowDirective(elementRef, renderer, nzUpdateHostClassService, mediaMatcher, ngZone, platform$$1) {
this.elementRef = elementRef;
this.renderer = renderer;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.mediaMatcher = mediaMatcher;
this.ngZone = ngZone;
this.platform = platform$$1;
this.nzAlign = 'top';
this.nzJustify = 'start';
this.el = this.elementRef.nativeElement;
this.prefixCls = 'ant-row';
this.actualGutter$ = new rxjs.Subject();
this.destroy$ = new rxjs.Subject();
}
/**
* @return {?}
*/
NzRowDirective.prototype.calculateGutter = /**
* @return {?}
*/
function () {
if (typeof this.nzGutter !== 'object') {
return this.nzGutter;
}
else if (this.breakPoint && this.nzGutter[this.breakPoint]) {
return this.nzGutter[this.breakPoint];
}
else {
return;
}
};
/**
* @return {?}
*/
NzRowDirective.prototype.updateGutter = /**
* @return {?}
*/
function () {
/** @type {?} */
var actualGutter = this.calculateGutter();
if (this.actualGutter !== actualGutter) {
this.actualGutter = actualGutter;
this.actualGutter$.next(this.actualGutter);
this.renderer.setStyle(this.el, 'margin-left', "-" + this.actualGutter / 2 + "px");
this.renderer.setStyle(this.el, 'margin-right', "-" + this.actualGutter / 2 + "px");
}
};
/**
* @return {?}
*/
NzRowDirective.prototype.watchMedia = /**
* @return {?}
*/
function () {
var _this = this;
// @ts-ignore
Object.keys(responsiveMap).map(( /**
* @param {?} screen
* @return {?}
*/function (screen) {
/** @type {?} */
var matchBelow = _this.mediaMatcher.matchMedia(responsiveMap[screen]).matches;
if (matchBelow) {
_this.breakPoint = screen;
}
}));
this.updateGutter();
};
/** temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289*/
/**
* temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289
* @return {?}
*/
NzRowDirective.prototype.setClassMap = /**
* temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var classMap = (_a = {},
_a["" + this.prefixCls] = !this.nzType,
_a[this.prefixCls + "-" + this.nzType] = this.nzType,
_a[this.prefixCls + "-" + this.nzType + "-" + this.nzAlign] = this.nzType && this.nzAlign,
_a[this.prefixCls + "-" + this.nzType + "-" + this.nzJustify] = this.nzType && this.nzJustify,
_a);
this.nzUpdateHostClassService.updateHostClass(this.el, classMap);
};
/**
* @return {?}
*/
NzRowDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
this.watchMedia();
};
/**
* @param {?} changes
* @return {?}
*/
NzRowDirective.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzType || changes.nzAlign || changes.nzJustify) {
this.setClassMap();
}
if (changes.nzGutter) {
this.updateGutter();
}
};
/**
* @return {?}
*/
NzRowDirective.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.platform.isBrowser) {
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
rxjs.fromEvent(window, 'resize')
.pipe(operators.auditTime(16), operators.takeUntil(_this.destroy$))
.subscribe(( /**
* @return {?}
*/function () { return _this.watchMedia(); }));
}));
}
};
/**
* @return {?}
*/
NzRowDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzRowDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-row],nz-row',
providers: [NzUpdateHostClassService]
},] }
];
/** @nocollapse */
NzRowDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: NzUpdateHostClassService },
{ type: layout.MediaMatcher },
{ type: i0.NgZone },
{ type: platform.Platform }
];
};
NzRowDirective.propDecorators = {
nzType: [{ type: i0.Input }],
nzAlign: [{ type: i0.Input }],
nzJustify: [{ type: i0.Input }],
nzGutter: [{ type: i0.Input }]
};
return NzRowDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzColDirective = /** @class */ (function () {
function NzColDirective(nzUpdateHostClassService, elementRef, nzRowDirective, renderer) {
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.elementRef = elementRef;
this.nzRowDirective = nzRowDirective;
this.renderer = renderer;
this.el = this.elementRef.nativeElement;
this.prefixCls = 'ant-col';
this.destroy$ = new rxjs.Subject();
}
/** temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289*/
/**
* temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289
* @return {?}
*/
NzColDirective.prototype.setClassMap = /**
* temp solution since no method add classMap to host https://github.com/angular/angular/issues/7289
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var classMap = __assign((_a = {}, _a[this.prefixCls + "-" + this.nzSpan] = isNotNil(this.nzSpan), _a[this.prefixCls + "-order-" + this.nzOrder] = isNotNil(this.nzOrder), _a[this.prefixCls + "-offset-" + this.nzOffset] = isNotNil(this.nzOffset), _a[this.prefixCls + "-pull-" + this.nzPull] = isNotNil(this.nzPull), _a[this.prefixCls + "-push-" + this.nzPush] = isNotNil(this.nzPush), _a), this.generateClass());
this.nzUpdateHostClassService.updateHostClass(this.el, classMap);
};
/**
* @return {?}
*/
NzColDirective.prototype.generateClass = /**
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var listOfSizeInputName = ['nzXs', 'nzSm', 'nzMd', 'nzLg', 'nzXl', 'nzXXl'];
/** @type {?} */
var listClassMap = {};
listOfSizeInputName.forEach(( /**
* @param {?} name
* @return {?}
*/function (name) {
/** @type {?} */
var sizeName = name.replace('nz', '').toLowerCase();
if (isNotNil(_this[name])) {
if ((typeof (_this[name]) === 'number') || (typeof (_this[name]) === 'string')) {
listClassMap[_this.prefixCls + "-" + sizeName + "-" + _this[name]] = true;
}
else {
listClassMap[_this.prefixCls + "-" + sizeName + "-" + _this[name].span] = _this[name] && isNotNil(_this[name].span);
listClassMap[_this.prefixCls + "-" + sizeName + "-pull-" + _this[name].pull] = _this[name] && isNotNil(_this[name].pull);
listClassMap[_this.prefixCls + "-" + sizeName + "-push-" + _this[name].push] = _this[name] && isNotNil(_this[name].push);
listClassMap[_this.prefixCls + "-" + sizeName + "-offset-" + _this[name].offset] = _this[name] && isNotNil(_this[name].offset);
listClassMap[_this.prefixCls + "-" + sizeName + "-order-" + _this[name].order] = _this[name] && isNotNil(_this[name].order);
}
}
}));
return listClassMap;
};
/**
* @return {?}
*/
NzColDirective.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.setClassMap();
};
/**
* @return {?}
*/
NzColDirective.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.nzRowDirective) {
this.nzRowDirective.actualGutter$.pipe(operators.startWith(this.nzRowDirective.actualGutter), operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} actualGutter
* @return {?}
*/function (actualGutter) {
_this.renderer.setStyle(_this.el, 'padding-left', actualGutter / 2 + "px");
_this.renderer.setStyle(_this.el, 'padding-right', actualGutter / 2 + "px");
}));
}
};
/**
* @return {?}
*/
NzColDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
};
/**
* @return {?}
*/
NzColDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzColDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-col],nz-col',
providers: [NzUpdateHostClassService]
},] }
];
/** @nocollapse */
NzColDirective.ctorParameters = function () {
return [
{ type: NzUpdateHostClassService },
{ type: i0.ElementRef },
{ type: NzRowDirective, decorators: [{ type: i0.Optional }, { type: i0.Host }] },
{ type: i0.Renderer2 }
];
};
NzColDirective.propDecorators = {
nzSpan: [{ type: i0.Input }],
nzOrder: [{ type: i0.Input }],
nzOffset: [{ type: i0.Input }],
nzPush: [{ type: i0.Input }],
nzPull: [{ type: i0.Input }],
nzXs: [{ type: i0.Input }],
nzSm: [{ type: i0.Input }],
nzMd: [{ type: i0.Input }],
nzLg: [{ type: i0.Input }],
nzXl: [{ type: i0.Input }],
nzXXl: [{ type: i0.Input }]
};
return NzColDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzGridModule = /** @class */ (function () {
function NzGridModule() {
}
NzGridModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzColDirective, NzRowDirective],
exports: [NzColDirective, NzRowDirective],
imports: [i2$1.CommonModule, layout.LayoutModule, platform.PlatformModule]
},] }
];
return NzGridModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var helpMotion = animations$1.trigger('helpMotion', [
animations$1.transition(':enter', [
animations$1.style({
opacity: 0,
transform: 'translateY(-5px)'
}),
animations$1.animate(AnimationDuration.SLOW + " " + AnimationCurves.EASE_IN_OUT, animations$1.style({
opacity: 1,
transform: 'translateY(0)'
}))
]),
animations$1.transition(':leave', [
animations$1.style({
opacity: 1,
transform: 'translateY(0)'
}),
animations$1.animate(AnimationDuration.SLOW + " " + AnimationCurves.EASE_IN_OUT, animations$1.style({
opacity: 0,
transform: 'translateY(-5px)'
}))
])
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormExplainComponent = /** @class */ (function () {
function NzFormExplainComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-form-explain');
}
NzFormExplainComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-form-explain',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
animations: [helpMotion],
template: "<div [@helpMotion]>\n <ng-content></ng-content>\n</div>",
styles: ["nz-form-explain {\n display: block;\n }"]
}] }
];
/** @nocollapse */
NzFormExplainComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzFormExplainComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* should add nz-row directive to host, track https://github.com/angular/angular/issues/8785 *
*/
var NzFormItemComponent = /** @class */ (function (_super) {
__extends(NzFormItemComponent, _super);
function NzFormItemComponent(elementRef, renderer, nzUpdateHostClassService, mediaMatcher, ngZone, platform$$1, cdr) {
var _this = _super.call(this, elementRef, renderer, nzUpdateHostClassService, mediaMatcher, ngZone, platform$$1) || this;
_this.cdr = cdr;
_this._flex = false;
renderer.addClass(elementRef.nativeElement, 'ant-form-item');
return _this;
}
Object.defineProperty(NzFormItemComponent.prototype, "nzFlex", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._flex = toBoolean(value);
if (this._flex) {
this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'flex');
}
else {
this.renderer.removeStyle(this.elementRef.nativeElement, 'display');
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzFormItemComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.listOfNzFormExplainComponent) {
this.listOfNzFormExplainComponent.changes.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.cdr.markForCheck();
}));
}
};
NzFormItemComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-form-item',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
providers: [NzUpdateHostClassService],
template: "<ng-content></ng-content>",
host: {
'[class.ant-form-item-with-help]': 'listOfNzFormExplainComponent && (listOfNzFormExplainComponent.length>0)'
},
styles: ["\n nz-form-item {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzFormItemComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: NzUpdateHostClassService },
{ type: layout.MediaMatcher },
{ type: i0.NgZone },
{ type: platform.Platform },
{ type: i0.ChangeDetectorRef }
];
};
NzFormItemComponent.propDecorators = {
listOfNzFormExplainComponent: [{ type: i0.ContentChildren, args: [NzFormExplainComponent, { descendants: true },] }],
nzFlex: [{ type: i0.Input }]
};
return NzFormItemComponent;
}(NzRowDirective));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormControlComponent = /** @class */ (function (_super) {
__extends(NzFormControlComponent, _super);
function NzFormControlComponent(nzUpdateHostClassService, elementRef, nzFormItemComponent, nzRowDirective, cdr, renderer) {
var _this = _super.call(this, nzUpdateHostClassService, elementRef, nzFormItemComponent || nzRowDirective, renderer) || this;
_this.cdr = cdr;
_this._hasFeedback = false;
_this.controlClassMap = {};
renderer.addClass(elementRef.nativeElement, 'ant-form-item-control-wrapper');
return _this;
}
Object.defineProperty(NzFormControlComponent.prototype, "nzHasFeedback", {
get: /**
* @return {?}
*/ function () {
return this._hasFeedback;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._hasFeedback = toBoolean(value);
this.setControlClassMap();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzFormControlComponent.prototype, "nzValidateStatus", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value instanceof forms.FormControl) {
this.validateControl = value;
this.validateString = null;
this.watchControl();
}
else if (value instanceof forms.FormControlName) {
this.validateControl = value.control;
this.validateString = null;
this.watchControl();
}
else {
this.validateString = value;
this.validateControl = null;
this.setControlClassMap();
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzFormControlComponent.prototype.removeSubscribe = /**
* @return {?}
*/
function () {
if (this.validateChanges) {
this.validateChanges.unsubscribe();
this.validateChanges = null;
}
};
/**
* @return {?}
*/
NzFormControlComponent.prototype.watchControl = /**
* @return {?}
*/
function () {
var _this = this;
this.removeSubscribe();
/** miss detect https://github.com/angular/angular/issues/10887 **/
if (this.validateControl && this.validateControl.statusChanges) {
this.validateChanges = this.validateControl.statusChanges.pipe(operators.startWith(null)).subscribe(( /**
* @return {?}
*/function () {
_this.setControlClassMap();
_this.cdr.markForCheck();
}));
}
};
/**
* @param {?} status
* @return {?}
*/
NzFormControlComponent.prototype.validateControlStatus = /**
* @param {?} status
* @return {?}
*/
function (status) {
return this.validateControl && (this.validateControl.dirty || this.validateControl.touched) && (this.validateControl.status === status);
};
/**
* @return {?}
*/
NzFormControlComponent.prototype.setControlClassMap = /**
* @return {?}
*/
function () {
var _a;
this.controlClassMap = (_a = {},
_a["has-warning"] = this.validateString === 'warning',
_a["is-validating"] = this.validateString === 'validating' || this.validateString === 'pending' || this.validateControlStatus('PENDING'),
_a["has-error"] = this.validateString === 'error' || this.validateControlStatus('INVALID'),
_a["has-success"] = this.validateString === 'success' || this.validateControlStatus('VALID'),
_a["has-feedback"] = this.nzHasFeedback,
_a);
if (this.controlClassMap['has-warning']) {
this.iconType = 'exclamation-circle-fill';
}
else if (this.controlClassMap['is-validating']) {
this.iconType = 'loading';
}
else if (this.controlClassMap['has-error']) {
this.iconType = 'close-circle-fill';
}
else if (this.controlClassMap['has-success']) {
this.iconType = 'check-circle-fill';
}
else {
this.iconType = '';
}
};
/**
* @return {?}
*/
NzFormControlComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
_super.prototype.ngOnInit.call(this);
this.setControlClassMap();
};
/**
* @return {?}
*/
NzFormControlComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.removeSubscribe();
_super.prototype.ngOnDestroy.call(this);
};
/**
* @return {?}
*/
NzFormControlComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
if (this.defaultValidateControl && (!this.validateControl) && (!this.validateString)) {
this.nzValidateStatus = this.defaultValidateControl;
}
};
/**
* @return {?}
*/
NzFormControlComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
_super.prototype.ngAfterViewInit.call(this);
};
NzFormControlComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-form-control',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [NzUpdateHostClassService],
template: "<div class=\"ant-form-item-control\" [ngClass]=\"controlClassMap\">\n <span class=\"ant-form-item-children\">\n <ng-content></ng-content>\n <span class=\"ant-form-item-children-icon\">\n <i *ngIf=\"nzHasFeedback && iconType\" nz-icon [type]=\"iconType\"></i>\n </span>\n </span>\n <ng-content select=\"nz-form-explain\"></ng-content>\n</div>",
styles: ["\n nz-form-control {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzFormControlComponent.ctorParameters = function () {
return [
{ type: NzUpdateHostClassService },
{ type: i0.ElementRef },
{ type: NzFormItemComponent, decorators: [{ type: i0.Optional }, { type: i0.Host }] },
{ type: NzRowDirective, decorators: [{ type: i0.Optional }, { type: i0.Host }] },
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 }
];
};
NzFormControlComponent.propDecorators = {
defaultValidateControl: [{ type: i0.ContentChild, args: [forms.NgControl,] }],
nzHasFeedback: [{ type: i0.Input }],
nzValidateStatus: [{ type: i0.Input }]
};
return NzFormControlComponent;
}(NzColDirective));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormExtraComponent = /** @class */ (function () {
function NzFormExtraComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-form-extra');
}
NzFormExtraComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-form-extra',
template: "<ng-content></ng-content>",
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
styles: ["\n nz-form-extra {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzFormExtraComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzFormExtraComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormLabelComponent = /** @class */ (function (_super) {
__extends(NzFormLabelComponent, _super);
function NzFormLabelComponent(nzUpdateHostClassService, elementRef, nzFormItemComponent, nzRowDirective, renderer) {
var _this = _super.call(this, nzUpdateHostClassService, elementRef, nzFormItemComponent || nzRowDirective, renderer) || this;
_this.nzRequired = false;
renderer.addClass(elementRef.nativeElement, 'ant-form-item-label');
return _this;
}
/**
* @return {?}
*/
NzFormLabelComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
_super.prototype.ngOnDestroy.call(this);
};
/**
* @return {?}
*/
NzFormLabelComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
_super.prototype.ngAfterViewInit.call(this);
};
NzFormLabelComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-form-label',
providers: [NzUpdateHostClassService],
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<label [attr.for]=\"nzFor\" [class.ant-form-item-required]=\"nzRequired\">\n <ng-content></ng-content>\n</label>"
}] }
];
/** @nocollapse */
NzFormLabelComponent.ctorParameters = function () {
return [
{ type: NzUpdateHostClassService },
{ type: i0.ElementRef },
{ type: NzFormItemComponent, decorators: [{ type: i0.Optional }, { type: i0.Host }] },
{ type: NzRowDirective, decorators: [{ type: i0.Optional }, { type: i0.Host }] },
{ type: i0.Renderer2 }
];
};
NzFormLabelComponent.propDecorators = {
nzFor: [{ type: i0.Input }],
nzRequired: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzFormLabelComponent.prototype, "nzRequired", void 0);
return NzFormLabelComponent;
}(NzColDirective));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormSplitComponent = /** @class */ (function () {
function NzFormSplitComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-form-split');
}
NzFormSplitComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-form-split',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-content></ng-content>"
}] }
];
/** @nocollapse */
NzFormSplitComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzFormSplitComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormTextComponent = /** @class */ (function () {
function NzFormTextComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-form-text');
}
NzFormTextComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-form-text',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-content></ng-content>"
}] }
];
/** @nocollapse */
NzFormTextComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzFormTextComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormDirective = /** @class */ (function () {
function NzFormDirective(elementRef, renderer, nzUpdateHostClassService) {
this.elementRef = elementRef;
this.renderer = renderer;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.nzLayout = 'horizontal';
this.renderer.addClass(elementRef.nativeElement, 'ant-form');
}
/**
* @return {?}
*/
NzFormDirective.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, (_a = {},
_a["ant-form-" + this.nzLayout] = this.nzLayout,
_a));
};
/**
* @return {?}
*/
NzFormDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
};
/**
* @return {?}
*/
NzFormDirective.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.setClassMap();
};
NzFormDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-form]',
providers: [NzUpdateHostClassService]
},] }
];
/** @nocollapse */
NzFormDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: NzUpdateHostClassService }
];
};
NzFormDirective.propDecorators = {
nzLayout: [{ type: i0.Input }]
};
return NzFormDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFormModule = /** @class */ (function () {
function NzFormModule() {
}
NzFormModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [
NzFormExtraComponent,
NzFormLabelComponent,
NzFormDirective,
NzFormItemComponent,
NzFormControlComponent,
NzFormExplainComponent,
NzFormTextComponent,
NzFormSplitComponent
],
exports: [
NzFormExtraComponent,
NzFormLabelComponent,
NzFormDirective,
NzFormItemComponent,
NzFormControlComponent,
NzFormExplainComponent,
NzFormTextComponent,
NzFormSplitComponent
],
imports: [i2$1.CommonModule, NzGridModule, NzIconModule, layout.LayoutModule, platform.PlatformModule]
},] }
];
return NzFormModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzInputNumberComponent = /** @class */ (function () {
function NzInputNumberComponent(elementRef, renderer, cdr, focusMonitor) {
this.elementRef = elementRef;
this.renderer = renderer;
this.cdr = cdr;
this.focusMonitor = focusMonitor;
this.isFocused = false;
this.disabledUp = false;
this.disabledDown = false;
this.onChange = ( /**
* @return {?}
*/function () { return null; });
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.nzBlur = new i0.EventEmitter();
this.nzFocus = new i0.EventEmitter();
this.nzSize = 'default';
this.nzMin = -Infinity;
this.nzMax = Infinity;
this.nzParser = ( /**
* @param {?} value
* @return {?}
*/function (value) { return value; });
this.nzPlaceHolder = '';
this.nzStep = 1;
this.nzDisabled = false;
this.nzAutoFocus = false;
this.nzFormatter = ( /**
* @param {?} value
* @return {?}
*/function (value) { return value; });
renderer.addClass(elementRef.nativeElement, 'ant-input-number');
}
/**
* @return {?}
*/
NzInputNumberComponent.prototype.updateAutoFocus = /**
* @return {?}
*/
function () {
if (this.nzAutoFocus) {
this.renderer.setAttribute(this.inputElement.nativeElement, 'autofocus', 'autofocus');
}
else {
this.renderer.removeAttribute(this.inputElement.nativeElement, 'autofocus');
}
};
/**
* @param {?} value
* @return {?}
*/
NzInputNumberComponent.prototype.onModelChange = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.actualValue = this.nzParser(value.trim().replace(/。/g, '.').replace(/[^\w\.-]+/g, ''));
this.inputElement.nativeElement.value = this.actualValue;
};
/**
* @param {?} value
* @return {?}
*/
NzInputNumberComponent.prototype.getCurrentValidValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
/** @type {?} */
var val = value;
if (val === '') {
val = '';
}
else if (!this.isNotCompleteNumber(val)) {
val = ( /** @type {?} */(this.getValidValue(val)));
}
else {
val = this.value;
}
return this.toNumber(val);
};
// '1.' '1x' 'xx' '' => are not complete numbers
// '1.' '1x' 'xx' '' => are not complete numbers
/**
* @param {?} num
* @return {?}
*/
NzInputNumberComponent.prototype.isNotCompleteNumber =
// '1.' '1x' 'xx' '' => are not complete numbers
/**
* @param {?} num
* @return {?}
*/
function (num) {
return (isNaN(( /** @type {?} */(num))) ||
num === '' ||
num === null ||
(num && num.toString().indexOf('.') === num.toString().length - 1));
};
/**
* @param {?} value
* @return {?}
*/
NzInputNumberComponent.prototype.getValidValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
/** @type {?} */
var val = parseFloat(( /** @type {?} */(value)));
// https://github.com/ant-design/ant-design/issues/7358
if (isNaN(val)) {
return value;
}
if (val < this.nzMin) {
val = this.nzMin;
}
if (val > this.nzMax) {
val = this.nzMax;
}
return val;
};
/**
* @param {?} num
* @return {?}
*/
NzInputNumberComponent.prototype.toNumber = /**
* @param {?} num
* @return {?}
*/
function (num) {
if (this.isNotCompleteNumber(num)) {
return ( /** @type {?} */(num));
}
if (isNotNil(this.nzPrecision)) {
return Number(Number(num).toFixed(this.nzPrecision));
}
return Number(num);
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.setValidateValue = /**
* @return {?}
*/
function () {
/** @type {?} */
var value = this.getCurrentValidValue(this.actualValue);
this.setValue(value, "" + this.value !== "" + value);
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.onBlur = /**
* @return {?}
*/
function () {
this.isFocused = false;
this.setValidateValue();
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.onFocus = /**
* @return {?}
*/
function () {
this.isFocused = true;
};
/**
* @param {?} e
* @return {?}
*/
NzInputNumberComponent.prototype.getRatio = /**
* @param {?} e
* @return {?}
*/
function (e) {
/** @type {?} */
var ratio = 1;
if (e.metaKey || e.ctrlKey) {
ratio = 0.1;
}
else if (e.shiftKey) {
ratio = 10;
}
return ratio;
};
/**
* @param {?} e
* @param {?=} ratio
* @return {?}
*/
NzInputNumberComponent.prototype.down = /**
* @param {?} e
* @param {?=} ratio
* @return {?}
*/
function (e, ratio) {
if (!this.isFocused) {
this.focus();
}
this.step('down', e, ratio);
};
/**
* @param {?} e
* @param {?=} ratio
* @return {?}
*/
NzInputNumberComponent.prototype.up = /**
* @param {?} e
* @param {?=} ratio
* @return {?}
*/
function (e, ratio) {
if (!this.isFocused) {
this.focus();
}
this.step('up', e, ratio);
};
/**
* @param {?} value
* @return {?}
*/
NzInputNumberComponent.prototype.getPrecision = /**
* @param {?} value
* @return {?}
*/
function (value) {
/** @type {?} */
var valueString = value.toString();
if (valueString.indexOf('e-') >= 0) {
return parseInt(valueString.slice(valueString.indexOf('e-') + 2), 10);
}
/** @type {?} */
var precision = 0;
if (valueString.indexOf('.') >= 0) {
precision = valueString.length - valueString.indexOf('.') - 1;
}
return precision;
};
// step={1.0} value={1.51}
// press +
// then value should be 2.51, rather than 2.5
// if this.props.precision is undefined
// https://github.com/react-component/input-number/issues/39
// step={1.0} value={1.51}
// press +
// then value should be 2.51, rather than 2.5
// if this.props.precision is undefined
// https://github.com/react-component/input-number/issues/39
/**
* @param {?} currentValue
* @param {?} ratio
* @return {?}
*/
NzInputNumberComponent.prototype.getMaxPrecision =
// step={1.0} value={1.51}
// press +
// then value should be 2.51, rather than 2.5
// if this.props.precision is undefined
// https://github.com/react-component/input-number/issues/39
/**
* @param {?} currentValue
* @param {?} ratio
* @return {?}
*/
function (currentValue, ratio) {
if (isNotNil(this.nzPrecision)) {
return this.nzPrecision;
}
/** @type {?} */
var ratioPrecision = this.getPrecision(ratio);
/** @type {?} */
var stepPrecision = this.getPrecision(this.nzStep);
/** @type {?} */
var currentValuePrecision = this.getPrecision(( /** @type {?} */(currentValue)));
if (!currentValue) {
return ratioPrecision + stepPrecision;
}
return Math.max(currentValuePrecision, ratioPrecision + stepPrecision);
};
/**
* @param {?} currentValue
* @param {?} ratio
* @return {?}
*/
NzInputNumberComponent.prototype.getPrecisionFactor = /**
* @param {?} currentValue
* @param {?} ratio
* @return {?}
*/
function (currentValue, ratio) {
/** @type {?} */
var precision = this.getMaxPrecision(currentValue, ratio);
return Math.pow(10, precision);
};
/**
* @param {?} val
* @param {?} rat
* @return {?}
*/
NzInputNumberComponent.prototype.upStep = /**
* @param {?} val
* @param {?} rat
* @return {?}
*/
function (val, rat) {
/** @type {?} */
var precisionFactor = this.getPrecisionFactor(val, rat);
/** @type {?} */
var precision = Math.abs(this.getMaxPrecision(val, rat));
/** @type {?} */
var result;
if (typeof val === 'number') {
result =
((precisionFactor * val + precisionFactor * this.nzStep * rat) /
precisionFactor).toFixed(precision);
}
else {
result = this.nzMin === -Infinity ? this.nzStep : this.nzMin;
}
return this.toNumber(result);
};
/**
* @param {?} val
* @param {?} rat
* @return {?}
*/
NzInputNumberComponent.prototype.downStep = /**
* @param {?} val
* @param {?} rat
* @return {?}
*/
function (val, rat) {
/** @type {?} */
var precisionFactor = this.getPrecisionFactor(val, rat);
/** @type {?} */
var precision = Math.abs(this.getMaxPrecision(val, rat));
/** @type {?} */
var result;
if (typeof val === 'number') {
result =
((precisionFactor * val - precisionFactor * this.nzStep * rat) /
precisionFactor).toFixed(precision);
}
else {
result = this.nzMin === -Infinity ? -this.nzStep : this.nzMin;
}
return this.toNumber(result);
};
/**
* @param {?} type
* @param {?} e
* @param {?=} ratio
* @return {?}
*/
NzInputNumberComponent.prototype.step = /**
* @param {?} type
* @param {?} e
* @param {?=} ratio
* @return {?}
*/
function (type, e, ratio) {
var _this = this;
if (ratio === void 0) {
ratio = 1;
}
this.stop();
e.preventDefault();
if (this.nzDisabled) {
return;
}
/** @type {?} */
var value = this.getCurrentValidValue(this.actualValue) || 0;
/** @type {?} */
var val;
if (type === 'up') {
val = this.upStep(value, ratio);
}
else if (type === 'down') {
val = this.downStep(value, ratio);
}
/** @type {?} */
var outOfRange = val > this.nzMax || val < this.nzMin;
if (val > this.nzMax) {
val = this.nzMax;
}
else if (val < this.nzMin) {
val = this.nzMin;
}
this.setValue(val, true);
this.isFocused = true;
if (outOfRange) {
return;
}
this.autoStepTimer = setTimeout(( /**
* @return {?}
*/function () {
_this[type](e, ratio, true);
}), 600);
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.stop = /**
* @return {?}
*/
function () {
if (this.autoStepTimer) {
clearTimeout(this.autoStepTimer);
}
};
/**
* @param {?} value
* @param {?} emit
* @return {?}
*/
NzInputNumberComponent.prototype.setValue = /**
* @param {?} value
* @param {?} emit
* @return {?}
*/
function (value, emit) {
if (emit && ("" + this.value !== "" + value)) {
this.onChange(value);
}
this.value = value;
this.actualValue = value;
/** @type {?} */
var displayValue = isNotNil(this.nzFormatter(this.value)) ? this.nzFormatter(this.value) : '';
this.displayValue = displayValue;
this.inputElement.nativeElement.value = displayValue;
this.disabledUp = this.disabledDown = false;
if (value || value === 0) {
/** @type {?} */
var val = Number(value);
if (val >= this.nzMax) {
this.disabledUp = true;
}
if (val <= this.nzMin) {
this.disabledDown = true;
}
}
};
/**
* @param {?} e
* @return {?}
*/
NzInputNumberComponent.prototype.onKeyDown = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (e.code === 'ArrowUp' || e.keyCode === keycodes.UP_ARROW) {
/** @type {?} */
var ratio = this.getRatio(e);
this.up(e, ratio);
this.stop();
}
else if (e.code === 'ArrowDown' || e.keyCode === keycodes.DOWN_ARROW) {
/** @type {?} */
var ratio = this.getRatio(e);
this.down(e, ratio);
this.stop();
}
else if (e.keyCode === keycodes.ENTER) {
this.setValidateValue();
}
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.onKeyUp = /**
* @return {?}
*/
function () {
this.stop();
};
/**
* @param {?} value
* @return {?}
*/
NzInputNumberComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.setValue(value, false);
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzInputNumberComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzInputNumberComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzInputNumberComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.focus = /**
* @return {?}
*/
function () {
this.focusMonitor.focusVia(this.inputElement, 'keyboard');
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.blur = /**
* @return {?}
*/
function () {
this.inputElement.nativeElement.blur();
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.focusMonitor.monitor(this.elementRef, true).subscribe(( /**
* @param {?} focusOrigin
* @return {?}
*/function (focusOrigin) {
if (!focusOrigin) {
_this.nzBlur.emit();
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.onTouched(); }));
}
else {
_this.nzFocus.emit();
}
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzInputNumberComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzAutoFocus) {
this.updateAutoFocus();
}
if (changes.nzFormatter) {
/** @type {?} */
var value = this.getCurrentValidValue(this.actualValue);
this.setValue(value, true);
}
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
if (this.nzAutoFocus) {
this.focus();
}
};
/**
* @return {?}
*/
NzInputNumberComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.focusMonitor.stopMonitoring(this.elementRef);
};
NzInputNumberComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-input-number',
template: "<div class=\"ant-input-number-handler-wrap\">\n <span unselectable=\"unselectable\"\n class=\"ant-input-number-handler ant-input-number-handler-up\"\n (mousedown)=\"up($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.ant-input-number-handler-up-disabled]=\"disabledUp\">\n <i nz-icon type=\"up\" class=\"ant-input-number-handler-up-inner\"></i>\n </span>\n <span unselectable=\"unselectable\"\n class=\"ant-input-number-handler ant-input-number-handler-down\"\n (mousedown)=\"down($event)\"\n (mouseup)=\"stop()\"\n (mouseleave)=\"stop()\"\n [class.ant-input-number-handler-down-disabled]=\"disabledDown\">\n <i nz-icon type=\"down\" class=\"ant-input-number-handler-down-inner\"></i>\n </span>\n</div>\n<div class=\"ant-input-number-input-wrap\">\n <input #inputElement\n autocomplete=\"off\"\n class=\"ant-input-number-input\"\n [disabled]=\"nzDisabled\"\n [attr.min]=\"nzMin\"\n [attr.max]=\"nzMax\"\n [placeholder]=\"nzPlaceHolder\"\n [attr.step]=\"nzStep\"\n (keydown)=\"onKeyDown($event)\"\n (keyup)=\"onKeyUp()\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [ngModel]=\"displayValue\"\n (ngModelChange)=\"onModelChange($event)\">\n</div>",
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzInputNumberComponent; })),
multi: true
}
],
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
host: {
'[class.ant-input-number-focused]': 'isFocused',
'[class.ant-input-number-lg]': "nzSize === 'large'",
'[class.ant-input-number-sm]': "nzSize === 'small'",
'[class.ant-input-number-disabled]': 'nzDisabled'
}
}] }
];
/** @nocollapse */
NzInputNumberComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef },
{ type: a11y.FocusMonitor }
];
};
NzInputNumberComponent.propDecorators = {
nzBlur: [{ type: i0.Output }],
nzFocus: [{ type: i0.Output }],
inputElement: [{ type: i0.ViewChild, args: ['inputElement',] }],
nzSize: [{ type: i0.Input }],
nzMin: [{ type: i0.Input }],
nzMax: [{ type: i0.Input }],
nzParser: [{ type: i0.Input }],
nzPrecision: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzStep: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
nzFormatter: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzInputNumberComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzInputNumberComponent.prototype, "nzAutoFocus", void 0);
return NzInputNumberComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzInputNumberModule = /** @class */ (function () {
function NzInputNumberModule() {
}
NzInputNumberModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, NzIconModule],
declarations: [NzInputNumberComponent],
exports: [NzInputNumberComponent]
},] }
];
return NzInputNumberModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzContentComponent = /** @class */ (function () {
function NzContentComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-layout-content');
}
NzContentComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-content',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-content></ng-content>",
styles: ["nz-content {\n display: block;\n }"]
}] }
];
/** @nocollapse */
NzContentComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzContentComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzFooterComponent = /** @class */ (function () {
function NzFooterComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-layout-footer');
}
NzFooterComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-footer',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-content></ng-content>",
styles: ["nz-footer {\n display: block;\n }"]
}] }
];
/** @nocollapse */
NzFooterComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzFooterComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzHeaderComponent = /** @class */ (function () {
function NzHeaderComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.renderer.addClass(this.elementRef.nativeElement, 'ant-layout-header');
}
NzHeaderComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-header',
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
template: "<ng-content></ng-content>",
styles: ["nz-header {\n display: block;\n }"]
}] }
];
/** @nocollapse */
NzHeaderComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzHeaderComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzLayoutComponent = /** @class */ (function () {
function NzLayoutComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
renderer.addClass(elementRef.nativeElement, 'ant-layout');
}
/**
* @return {?}
*/
NzLayoutComponent.prototype.destroySider = /**
* @return {?}
*/
function () {
this.renderer.removeClass(this.elementRef.nativeElement, 'ant-layout-has-sider');
};
/**
* @return {?}
*/
NzLayoutComponent.prototype.initSider = /**
* @return {?}
*/
function () {
this.renderer.addClass(this.elementRef.nativeElement, 'ant-layout-has-sider');
};
NzLayoutComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-layout',
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
preserveWhitespaces: false,
template: "<ng-content></ng-content>"
}] }
];
/** @nocollapse */
NzLayoutComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
return NzLayoutComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSiderComponent = /** @class */ (function () {
function NzSiderComponent(nzLayoutComponent, mediaMatcher, ngZone, platform$$1, cdr, renderer, elementRef) {
this.nzLayoutComponent = nzLayoutComponent;
this.mediaMatcher = mediaMatcher;
this.ngZone = ngZone;
this.platform = platform$$1;
this.cdr = cdr;
this.below = false;
this.destroy$ = new rxjs.Subject();
this.dimensionMap = {
xs: '480px',
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px',
xxl: '1600px'
};
this.nzWidth = 200;
this.nzTheme = 'dark';
this.nzCollapsedWidth = 80;
this.nzReverseArrow = false;
this.nzCollapsible = false;
this.nzCollapsed = false;
this.nzCollapsedChange = new i0.EventEmitter();
renderer.addClass(elementRef.nativeElement, 'ant-layout-sider');
}
Object.defineProperty(NzSiderComponent.prototype, "flexSetting", {
get: /**
* @return {?}
*/ function () {
if (this.nzCollapsed) {
return "0 0 " + this.nzCollapsedWidth + "px";
}
else {
return "0 0 " + this.nzWidth + "px";
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSiderComponent.prototype, "widthSetting", {
get: /**
* @return {?}
*/ function () {
if (this.nzCollapsed) {
return this.nzCollapsedWidth;
}
else {
return this.nzWidth;
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzSiderComponent.prototype.watchMatchMedia = /**
* @return {?}
*/
function () {
var _this = this;
if (this.nzBreakpoint) {
/** @type {?} */
var matchBelow = this.mediaMatcher.matchMedia("(max-width: " + this.dimensionMap[this.nzBreakpoint] + ")").matches;
this.below = matchBelow;
this.nzCollapsed = matchBelow;
this.nzCollapsedChange.emit(matchBelow);
this.ngZone.run(( /**
* @return {?}
*/function () {
_this.cdr.markForCheck();
}));
}
};
/**
* @return {?}
*/
NzSiderComponent.prototype.toggleCollapse = /**
* @return {?}
*/
function () {
this.nzCollapsed = !this.nzCollapsed;
this.nzCollapsedChange.emit(this.nzCollapsed);
};
Object.defineProperty(NzSiderComponent.prototype, "isZeroTrigger", {
get: /**
* @return {?}
*/ function () {
return this.nzCollapsible && this.nzTrigger && this.nzCollapsedWidth === 0 && ((this.nzBreakpoint && this.below) || (!this.nzBreakpoint));
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzSiderComponent.prototype, "isSiderTrigger", {
get: /**
* @return {?}
*/ function () {
return this.nzCollapsible && this.nzTrigger && this.nzCollapsedWidth !== 0;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzSiderComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
if (this.nzLayoutComponent) {
this.nzLayoutComponent.initSider();
}
};
/**
* @return {?}
*/
NzSiderComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.platform.isBrowser) {
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.watchMatchMedia(); }));
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
rxjs.fromEvent(window, 'resize')
.pipe(operators.auditTime(16), operators.takeUntil(_this.destroy$))
.subscribe(( /**
* @return {?}
*/function () { return _this.watchMatchMedia(); }));
}));
}
};
/**
* @return {?}
*/
NzSiderComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
if (this.nzLayoutComponent) {
this.nzLayoutComponent.destroySider();
}
};
NzSiderComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-sider',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<div class=\"ant-layout-sider-children\">\n <ng-content></ng-content>\n</div>\n<span class=\"ant-layout-sider-zero-width-trigger\" *ngIf=\"isZeroTrigger\" (click)=\"toggleCollapse()\">\n <ng-template [ngTemplateOutlet]=\"nzZeroTrigger || zeroTrigger\"></ng-template>\n</span>\n<div class=\"ant-layout-sider-trigger\"\n *ngIf=\"isSiderTrigger\"\n (click)=\"toggleCollapse()\"\n [style.width.px]=\"nzCollapsed ? nzCollapsedWidth : nzWidth\">\n <ng-template [ngTemplateOutlet]=\"nzTrigger\"></ng-template>\n</div>\n<ng-template #defaultTrigger>\n <i nz-icon [type]=\"nzCollapsed ? 'right' : 'left'\" *ngIf=\"!nzReverseArrow\"></i>\n <i nz-icon [type]=\"nzCollapsed ? 'left' : 'right'\" *ngIf=\"nzReverseArrow\"></i>\n</ng-template>\n<ng-template #zeroTrigger>\n <i nz-icon type=\"bars\"></i>\n</ng-template>",
host: {
'[class.ant-layout-sider-zero-width]': 'nzCollapsed && nzCollapsedWidth === 0',
'[class.ant-layout-sider-light]': "nzTheme === 'light'",
'[class.ant-layout-sider-collapsed]': 'nzCollapsed',
'[style.flex]': 'flexSetting',
'[style.max-width.px]': 'widthSetting',
'[style.min-width.px]': 'widthSetting',
'[style.width.px]': 'widthSetting'
}
}] }
];
/** @nocollapse */
NzSiderComponent.ctorParameters = function () {
return [
{ type: NzLayoutComponent, decorators: [{ type: i0.Optional }, { type: i0.Host }] },
{ type: layout.MediaMatcher },
{ type: i0.NgZone },
{ type: platform.Platform },
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzSiderComponent.propDecorators = {
nzWidth: [{ type: i0.Input }],
nzTheme: [{ type: i0.Input }],
nzCollapsedWidth: [{ type: i0.Input }],
nzBreakpoint: [{ type: i0.Input }],
nzZeroTrigger: [{ type: i0.Input }],
nzTrigger: [{ type: i0.Input }, { type: i0.ViewChild, args: ['defaultTrigger',] }],
nzReverseArrow: [{ type: i0.Input }],
nzCollapsible: [{ type: i0.Input }],
nzCollapsed: [{ type: i0.Input }],
nzCollapsedChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSiderComponent.prototype, "nzReverseArrow", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSiderComponent.prototype, "nzCollapsible", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSiderComponent.prototype, "nzCollapsed", void 0);
return NzSiderComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzLayoutModule = /** @class */ (function () {
function NzLayoutModule() {
}
NzLayoutModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzLayoutComponent, NzHeaderComponent, NzContentComponent, NzFooterComponent, NzSiderComponent],
exports: [NzLayoutComponent, NzHeaderComponent, NzContentComponent, NzFooterComponent, NzSiderComponent],
imports: [i2$1.CommonModule, NzIconModule, layout.LayoutModule, platform.PlatformModule]
},] }
];
return NzLayoutModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSpinComponent = /** @class */ (function () {
function NzSpinComponent(cdr) {
this.cdr = cdr;
this.nzSize = 'default';
this.nzDelay = 0;
this.nzSimple = false;
this.nzSpinning = true;
this.spinning$ = new rxjs.BehaviorSubject(this.nzSpinning);
this.loading$ = this.spinning$.pipe(operators.debounceTime(this.nzDelay));
this.loading = true;
}
/**
* @return {?}
*/
NzSpinComponent.prototype.subscribeLoading = /**
* @return {?}
*/
function () {
var _this = this;
this.unsubscribeLoading();
this.loading_ = this.loading$.subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.loading = data;
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzSpinComponent.prototype.unsubscribeLoading = /**
* @return {?}
*/
function () {
if (this.loading_) {
this.loading_.unsubscribe();
this.loading_ = null;
}
};
/**
* @return {?}
*/
NzSpinComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.subscribeLoading();
};
/**
* @param {?} changes
* @return {?}
*/
NzSpinComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzSpinning) {
if (changes.nzSpinning.isFirstChange()) {
this.loading = this.nzSpinning;
}
this.spinning$.next(this.nzSpinning);
}
if (changes.nzDelay) {
this.loading$ = this.spinning$.pipe(operators.debounceTime(this.nzDelay));
this.subscribeLoading();
}
};
/**
* @return {?}
*/
NzSpinComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.unsubscribeLoading();
};
NzSpinComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-spin',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-template #defaultIndicatorTemplate>\n <span class=\"ant-spin-dot\" [class.ant-spin-dot-spin]=\"loading\">\n <i></i><i></i><i></i><i></i>\n </span>\n</ng-template>\n<div *ngIf=\"loading\">\n <div class=\"ant-spin\"\n [class.ant-spin-spinning]=\"loading\"\n [class.ant-spin-lg]=\"nzSize === 'large'\"\n [class.ant-spin-sm]=\"nzSize === 'small'\"\n [class.ant-spin-show-text]=\"nzTip\">\n <ng-template [ngTemplateOutlet]=\"nzIndicator || defaultIndicatorTemplate\"></ng-template>\n <div class=\"ant-spin-text\" *ngIf=\"nzTip\">{{ nzTip }}</div>\n </div>\n</div>\n<div *ngIf=\"!nzSimple\"\n class=\"ant-spin-container\"\n [class.ant-spin-blur]=\"loading\">\n <ng-content></ng-content>\n</div>\n",
host: {
'[class.ant-spin-nested-loading]': '!nzSimple'
},
styles: ["\n nz-spin {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzSpinComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef }
];
};
NzSpinComponent.propDecorators = {
nzIndicator: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzTip: [{ type: i0.Input }],
nzDelay: [{ type: i0.Input }],
nzSimple: [{ type: i0.Input }],
nzSpinning: [{ type: i0.Input }]
};
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzSpinComponent.prototype, "nzDelay", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSpinComponent.prototype, "nzSimple", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSpinComponent.prototype, "nzSpinning", void 0);
return NzSpinComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSpinModule = /** @class */ (function () {
function NzSpinModule() {
}
NzSpinModule.decorators = [
{ type: i0.NgModule, args: [{
exports: [NzSpinComponent],
declarations: [NzSpinComponent],
imports: [i2$1.CommonModule, observers.ObserversModule]
},] }
];
return NzSpinModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzListItemMetaComponent = /** @class */ (function () {
function NzListItemMetaComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.avatarStr = '';
this.renderer.addClass(elementRef.nativeElement, 'ant-list-item-meta');
}
Object.defineProperty(NzListItemMetaComponent.prototype, "nzAvatar", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value instanceof i0.TemplateRef) {
this.avatarStr = null;
this.avatarTpl = value;
}
else {
this.avatarStr = value;
}
},
enumerable: true,
configurable: true
});
NzListItemMetaComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-list-item-meta',
template: "<div *ngIf=\"avatarStr || avatarTpl\" class=\"ant-list-item-meta-avatar\">\n <ng-container *ngIf=\"avatarStr; else avatarTpl\">\n <nz-avatar [nzSrc]=\"avatarStr\"></nz-avatar>\n </ng-container>\n</div>\n<div *ngIf=\"nzTitle || nzDescription\" class=\"ant-list-item-meta-content\">\n <h4 *ngIf=\"nzTitle\" class=\"ant-list-item-meta-title\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </h4>\n <div *ngIf=\"nzDescription\" class=\"ant-list-item-meta-description\">\n <ng-container *nzStringTemplateOutlet=\"nzDescription\">{{ nzDescription }}</ng-container>\n </div>\n</div>",
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None
}] }
];
/** @nocollapse */
NzListItemMetaComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzListItemMetaComponent.propDecorators = {
nzAvatar: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzDescription: [{ type: i0.Input }]
};
return NzListItemMetaComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzListItemComponent = /** @class */ (function () {
function NzListItemComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.nzActions = [];
this.renderer.addClass(this.elementRef.nativeElement, 'ant-list-item');
}
NzListItemComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-list-item',
template: "<ng-template #contentTpl>\n <div *ngIf=\"nzContent\" class=\"ant-list-item-content\" [ngClass]=\"{'ant-list-item-content-single': metas.length < 1}\">\n <ng-container *nzStringTemplateOutlet=\"nzContent\">{{ nzContent }}</ng-container>\n </div>\n</ng-template>\n<ng-template #actionsTpl>\n <ul *ngIf=\"nzActions?.length > 0\" class=\"ant-list-item-action\">\n <li *ngFor=\"let i of nzActions; let last=last;\">\n <ng-template [ngTemplateOutlet]=\"i\"></ng-template>\n <em *ngIf=\"!last\" class=\"ant-list-item-action-split\"></em>\n </li>\n </ul>\n</ng-template>\n<ng-template #mainTpl>\n <ng-content></ng-content>\n <ng-template [ngTemplateOutlet]=\"contentTpl\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"actionsTpl\"></ng-template>\n</ng-template>\n<div *ngIf=\"nzExtra; else mainTpl\" class=\"ant-list-item-extra-wrap\">\n <div class=\"ant-list-item-main\">\n <ng-template [ngTemplateOutlet]=\"mainTpl\"></ng-template>\n </div>\n <div class=\"ant-list-item-extra\">\n <ng-template [ngTemplateOutlet]=\"nzExtra\"></ng-template>\n </div>\n</div>",
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzListItemComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzListItemComponent.propDecorators = {
metas: [{ type: i0.ContentChildren, args: [NzListItemMetaComponent,] }],
nzActions: [{ type: i0.Input }],
nzContent: [{ type: i0.Input }],
nzExtra: [{ type: i0.Input }]
};
return NzListItemComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzListComponent = /** @class */ (function () {
// #endregion
function NzListComponent(el, updateHostClassService) {
this.el = el;
this.updateHostClassService = updateHostClassService;
this.nzBordered = false;
this.nzItemLayout = 'horizontal';
this.nzLoading = false;
this.nzSize = 'default';
this.nzSplit = true;
// #endregion
// #region styles
this.prefixCls = 'ant-list';
}
/**
* @private
* @return {?}
*/
NzListComponent.prototype._setClassMap = /**
* @private
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var classMap = (_a = {},
_a[this.prefixCls] = true,
_a[this.prefixCls + "-vertical"] = this.nzItemLayout === 'vertical',
_a[this.prefixCls + "-lg"] = this.nzSize === 'large',
_a[this.prefixCls + "-sm"] = this.nzSize === 'small',
_a[this.prefixCls + "-split"] = this.nzSplit,
_a[this.prefixCls + "-bordered"] = this.nzBordered,
_a[this.prefixCls + "-loading"] = this.nzLoading,
_a[this.prefixCls + "-grid"] = this.nzGrid,
_a[this.prefixCls + "-something-after-last-item"] = !!(this.nzLoadMore || this.nzPagination || this.nzFooter),
_a);
this.updateHostClassService.updateHostClass(this.el.nativeElement, classMap);
};
/**
* @return {?}
*/
NzListComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this._setClassMap();
};
/**
* @return {?}
*/
NzListComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this._setClassMap();
};
NzListComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-list',
template: "<ng-template #itemsTpl>\n <ng-container *ngFor=\"let item of nzDataSource; let index = index\">\n <ng-template [ngTemplateOutlet]=\"nzRenderItem\" [ngTemplateOutletContext]=\"{ $implicit: item, index: index }\"></ng-template>\n </ng-container>\n</ng-template>\n<div *ngIf=\"nzHeader\" class=\"ant-list-header\">\n <ng-container *nzStringTemplateOutlet=\"nzHeader\">{{ nzHeader }}</ng-container>\n</div>\n<nz-spin [nzSpinning]=\"nzLoading\">\n <ng-container *ngIf=\"nzDataSource\">\n <div *ngIf=\"nzLoading && nzDataSource.length === 0\" [style.min-height.px]=\"53\"></div>\n <div *ngIf=\"nzGrid; else itemsTpl\" nz-row [nzGutter]=\"nzGrid.gutter\">\n <div nz-col [nzSpan]=\"nzGrid.span\" [nzXs]=\"nzGrid.xs\" [nzSm]=\"nzGrid.sm\" [nzMd]=\"nzGrid.md\" [nzLg]=\"nzGrid.lg\" [nzXl]=\"nzGrid.xl\"\n [nzXXl]=\"nzGrid.xxl\" *ngFor=\"let item of nzDataSource; let index = index\">\n <ng-template [ngTemplateOutlet]=\"nzRenderItem\" [ngTemplateOutletContext]=\"{ $implicit: item, index: index }\"></ng-template>\n </div>\n </div>\n <div *ngIf=\"!nzLoading && nzDataSource.length === 0\" class=\"ant-list-empty-text\">\n <nz-embed-empty [nzComponentName]=\"'list'\" [specificContent]=\"nzNoResult\"></nz-embed-empty>\n </div>\n </ng-container>\n <ng-content></ng-content>\n</nz-spin>\n<div *ngIf=\"nzFooter\" class=\"ant-list-footer\">\n <ng-container *nzStringTemplateOutlet=\"nzFooter\">{{ nzFooter }}</ng-container>\n</div>\n<ng-template [ngTemplateOutlet]=\"nzLoadMore\"></ng-template>\n<div *ngIf=\"nzPagination\" class=\"ant-list-pagination\">\n <ng-template [ngTemplateOutlet]=\"nzPagination\"></ng-template>\n</div>",
providers: [NzUpdateHostClassService],
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
styles: ["\n nz-list, nz-list nz-spin {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzListComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzUpdateHostClassService }
];
};
NzListComponent.propDecorators = {
nzDataSource: [{ type: i0.Input }],
nzBordered: [{ type: i0.Input }],
nzGrid: [{ type: i0.Input }],
nzHeader: [{ type: i0.Input }],
nzFooter: [{ type: i0.Input }],
nzItemLayout: [{ type: i0.Input }],
nzRenderItem: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzLoadMore: [{ type: i0.Input }],
nzPagination: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzSplit: [{ type: i0.Input }],
nzNoResult: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzListComponent.prototype, "nzBordered", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzListComponent.prototype, "nzLoading", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzListComponent.prototype, "nzSplit", void 0);
return NzListComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzListModule = /** @class */ (function () {
function NzListModule() {
}
NzListModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [
i2$1.CommonModule,
NzSpinModule,
NzGridModule,
NzAvatarModule,
NzAddOnModule,
NzEmptyModule
],
declarations: [
NzListComponent,
NzListItemComponent,
NzListItemMetaComponent
],
exports: [
NzListComponent,
NzListItemComponent,
NzListItemMetaComponent
]
},] }
];
return NzListModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMentionSuggestionDirective = /** @class */ (function () {
function NzMentionSuggestionDirective() {
}
NzMentionSuggestionDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nzMentionSuggestion]'
},] }
];
return NzMentionSuggestionDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_MENTION_TRIGGER_ACCESSOR = {
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzMentionTriggerDirective; })),
multi: true
};
var NzMentionTriggerDirective = /** @class */ (function () {
function NzMentionTriggerDirective(el) {
this.el = el;
this.onFocusin = new i0.EventEmitter();
this.onBlur = new i0.EventEmitter();
this.onInput = new i0.EventEmitter();
this.onKeydown = new i0.EventEmitter();
this.onClick = new i0.EventEmitter();
}
/**
* @return {?}
*/
NzMentionTriggerDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.completeEvents();
};
/**
* @return {?}
*/
NzMentionTriggerDirective.prototype.completeEvents = /**
* @return {?}
*/
function () {
this.onFocusin.complete();
this.onBlur.complete();
this.onInput.complete();
this.onKeydown.complete();
this.onClick.complete();
};
/**
* @param {?=} caretPos
* @return {?}
*/
NzMentionTriggerDirective.prototype.focus = /**
* @param {?=} caretPos
* @return {?}
*/
function (caretPos) {
this.el.nativeElement.focus();
this.el.nativeElement.setSelectionRange(caretPos, caretPos);
};
/**
* @param {?} mention
* @return {?}
*/
NzMentionTriggerDirective.prototype.insertMention = /**
* @param {?} mention
* @return {?}
*/
function (mention) {
/** @type {?} */
var value = this.el.nativeElement.value;
/** @type {?} */
var insertValue = mention.mention.trim() + ' ';
/** @type {?} */
var newValue = [
value.slice(0, mention.startPos + 1),
insertValue,
value.slice(mention.endPos, value.length)
].join('');
this.el.nativeElement.value = newValue;
this.focus(mention.startPos + insertValue.length + 1);
this.onChange(newValue);
this.value = newValue;
};
/**
* @param {?} value
* @return {?}
*/
NzMentionTriggerDirective.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.value = value;
if (typeof value === 'string') {
this.el.nativeElement.value = value;
}
else {
this.el.nativeElement.value = '';
}
};
/**
* @param {?} fn
* @return {?}
*/
NzMentionTriggerDirective.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzMentionTriggerDirective.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
NzMentionTriggerDirective.decorators = [
{ type: i0.Directive, args: [{
selector: 'input[nzMentionTrigger], textarea[nzMentionTrigger]',
providers: [NZ_MENTION_TRIGGER_ACCESSOR],
host: {
'autocomplete': 'off',
'(focusin)': 'onFocusin.emit()',
'(blur)': 'onBlur.emit()',
'(input)': 'onInput.emit($event)',
'(keydown)': 'onKeydown.emit($event)',
'(click)': 'onClick.emit($event)'
}
},] }
];
/** @nocollapse */
NzMentionTriggerDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef }
];
};
return NzMentionTriggerDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMentionComponent = /** @class */ (function () {
function NzMentionComponent(ngDocument, // tslint:disable-line:no-any
changeDetectorRef, overlay, viewContainerRef) {
this.ngDocument = ngDocument;
this.changeDetectorRef = changeDetectorRef;
this.overlay = overlay;
this.viewContainerRef = viewContainerRef;
this.nzValueWith = ( /**
* @param {?} value
* @return {?}
*/function (value) { return value; }); // tslint:disable-line:no-any
// tslint:disable-line:no-any
this.nzPrefix = '@';
this.nzLoading = false;
this.nzNotFoundContent = '无匹配结果,轻敲空格完成输入';
this.nzPlacement = 'bottom';
this.nzSuggestions = [];
this.nzOnSelect = new i0.EventEmitter();
this.nzOnSearchChange = new i0.EventEmitter();
this.isOpen = false;
this.filteredSuggestions = [];
this.suggestionTemplate = null; // tslint:disable-line:no-any
// tslint:disable-line:no-any
this.activeIndex = -1;
}
Object.defineProperty(NzMentionComponent.prototype, "suggestionChild", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value) {
this.suggestionTemplate = value;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzMentionComponent.prototype, "triggerNativeElement", {
get: /**
* @private
* @return {?}
*/ function () {
return this.trigger.el.nativeElement;
},
enumerable: true,
configurable: true
});
/**
* @param {?} changes
* @return {?}
*/
NzMentionComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.hasOwnProperty('nzSuggestions')) {
if (this.isOpen) {
this.previousValue = null;
this.activeIndex = -1;
this.resetDropdown(false);
}
}
};
/**
* @return {?}
*/
NzMentionComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
this.bindTriggerEvents();
};
/**
* @return {?}
*/
NzMentionComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.closeDropdown();
};
/**
* @return {?}
*/
NzMentionComponent.prototype.closeDropdown = /**
* @return {?}
*/
function () {
if (this.overlayRef && this.overlayRef.hasAttached()) {
this.overlayRef.detach();
this.overlayBackdropClickSubscription.unsubscribe();
this.isOpen = false;
this.changeDetectorRef.markForCheck();
}
};
/**
* @return {?}
*/
NzMentionComponent.prototype.openDropdown = /**
* @return {?}
*/
function () {
this.attachOverlay();
this.isOpen = true;
this.changeDetectorRef.markForCheck();
};
/**
* @return {?}
*/
NzMentionComponent.prototype.getMentions = /**
* @return {?}
*/
function () {
return getMentions(this.trigger.value, this.nzPrefix);
};
/**
* @param {?} suggestion
* @return {?}
*/
NzMentionComponent.prototype.selectSuggestion = /**
* @param {?} suggestion
* @return {?}
*/
function (suggestion) {
/** @type {?} */
var value = this.nzValueWith(suggestion);
this.trigger.insertMention({
mention: value,
startPos: this.cursorMentionStart,
endPos: this.cursorMentionEnd
});
this.nzOnSelect.emit(suggestion);
this.closeDropdown();
this.activeIndex = -1;
};
/**
* @private
* @param {?} event
* @return {?}
*/
NzMentionComponent.prototype.handleInput = /**
* @private
* @param {?} event
* @return {?}
*/
function (event) {
/** @type {?} */
var target = ( /** @type {?} */(event.target));
this.trigger.onChange(target.value);
this.trigger.value = target.value;
this.resetDropdown();
};
/**
* @private
* @param {?} event
* @return {?}
*/
NzMentionComponent.prototype.handleKeydown = /**
* @private
* @param {?} event
* @return {?}
*/
function (event) {
/** @type {?} */
var keyCode = event.keyCode;
if (this.isOpen && keyCode === keycodes.ENTER && this.activeIndex !== -1 && this.filteredSuggestions.length) {
this.selectSuggestion(this.filteredSuggestions[this.activeIndex]);
event.preventDefault();
}
else if (keyCode === keycodes.LEFT_ARROW || keyCode === keycodes.RIGHT_ARROW) {
this.resetDropdown();
event.stopPropagation();
}
else {
if (this.isOpen && (keyCode === keycodes.TAB || keyCode === keycodes.ESCAPE)) {
this.closeDropdown();
return;
}
if (this.isOpen && (keyCode === keycodes.UP_ARROW)) {
this.setPreviousItemActive();
event.preventDefault();
event.stopPropagation();
}
if (this.isOpen && (keyCode === keycodes.DOWN_ARROW)) {
this.setNextItemActive();
event.preventDefault();
event.stopPropagation();
}
}
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.handleClick = /**
* @private
* @return {?}
*/
function () {
this.resetDropdown();
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.bindTriggerEvents = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.trigger.onInput.subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleInput(e); }));
this.trigger.onKeydown.subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleKeydown(e); }));
this.trigger.onClick.subscribe(( /**
* @return {?}
*/function () { return _this.handleClick(); }));
};
/**
* @private
* @param {?} value
* @param {?} emit
* @return {?}
*/
NzMentionComponent.prototype.suggestionsFilter = /**
* @private
* @param {?} value
* @param {?} emit
* @return {?}
*/
function (value, emit) {
var _this = this;
/** @type {?} */
var suggestions = value.substring(1);
if (this.previousValue === value) {
return;
}
this.previousValue = value;
if (emit) {
this.nzOnSearchChange.emit({
value: this.cursorMention.substring(1),
prefix: this.cursorMention[0]
});
}
/** @type {?} */
var searchValue = suggestions.toLowerCase();
this.filteredSuggestions = this.nzSuggestions
.filter(( /**
* @param {?} suggestion
* @return {?}
*/function (suggestion) { return _this.nzValueWith(suggestion).toLowerCase().includes(searchValue); }));
};
/**
* @private
* @param {?=} emit
* @return {?}
*/
NzMentionComponent.prototype.resetDropdown = /**
* @private
* @param {?=} emit
* @return {?}
*/
function (emit) {
if (emit === void 0) {
emit = true;
}
this.resetCursorMention();
if (typeof this.cursorMention !== 'string' || !this.canOpen()) {
this.closeDropdown();
return;
}
this.suggestionsFilter(this.cursorMention, emit);
/** @type {?} */
var activeIndex = this.filteredSuggestions.indexOf(this.cursorMention.substring(1));
this.activeIndex = activeIndex >= 0 ? activeIndex : 0;
this.openDropdown();
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.setNextItemActive = /**
* @private
* @return {?}
*/
function () {
this.activeIndex = this.activeIndex + 1 <= this.filteredSuggestions.length - 1
? this.activeIndex + 1
: 0;
this.changeDetectorRef.markForCheck();
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.setPreviousItemActive = /**
* @private
* @return {?}
*/
function () {
this.activeIndex = this.activeIndex - 1 < 0
? this.filteredSuggestions.length - 1
: this.activeIndex - 1;
this.changeDetectorRef.markForCheck();
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.canOpen = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var element = this.triggerNativeElement;
return !element.readOnly && !element.disabled;
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.resetCursorMention = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var value = this.triggerNativeElement.value.replace(/[\r\n]/g, ' ') || '';
/** @type {?} */
var selectionStart = this.triggerNativeElement.selectionStart;
/** @type {?} */
var prefix = typeof this.nzPrefix === 'string' ? [this.nzPrefix] : this.nzPrefix;
/** @type {?} */
var i = prefix.length;
while (i >= 0) {
/** @type {?} */
var startPos = value.lastIndexOf(prefix[i], selectionStart);
/** @type {?} */
var endPos = value.indexOf(' ', selectionStart) > -1 ? value.indexOf(' ', selectionStart) : value.length;
/** @type {?} */
var mention = value.substring(startPos, endPos);
if ((startPos > 0 && value[startPos - 1] !== ' ')
|| startPos < 0
|| mention.includes(prefix[i], 1)
|| mention.includes(' ')) {
this.cursorMention = null;
this.cursorMentionStart = -1;
this.cursorMentionEnd = -1;
}
else {
this.cursorMention = mention;
this.cursorMentionStart = startPos;
this.cursorMentionEnd = endPos;
return;
}
i--;
}
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.updatePositions = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var coordinates = getCaretCoordinates(this.triggerNativeElement, this.cursorMentionStart);
/** @type {?} */
var top = coordinates.top
- this.triggerNativeElement.getBoundingClientRect().height
- this.triggerNativeElement.scrollTop
+ (this.nzPlacement === 'bottom' ? coordinates.height : 0);
/** @type {?} */
var left = coordinates.left - this.triggerNativeElement.scrollLeft;
this.positionStrategy.withDefaultOffsetX(left).withDefaultOffsetY(top);
if (this.nzPlacement === 'bottom') {
this.positionStrategy.withPositions([DEFAULT_MENTION_POSITIONS[0]]);
}
if (this.nzPlacement === 'top') {
this.positionStrategy.withPositions([DEFAULT_MENTION_POSITIONS[1]]);
}
this.positionStrategy.apply();
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.subscribeOverlayBackdropClick = /**
* @private
* @return {?}
*/
function () {
var _this = this;
return rxjs.merge(rxjs.fromEvent(this.ngDocument, 'click'), rxjs.fromEvent(this.ngDocument, 'touchend'))
.subscribe(( /**
* @param {?} event
* @return {?}
*/function (event) {
/** @type {?} */
var clickTarget = ( /** @type {?} */(event.target));
if (clickTarget !== _this.trigger.el.nativeElement && _this.isOpen) {
_this.closeDropdown();
}
}));
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.attachOverlay = /**
* @private
* @return {?}
*/
function () {
if (!this.overlayRef) {
this.portal = new portal.TemplatePortal(this.suggestionsTemp, this.viewContainerRef);
this.overlayRef = this.overlay.create(this.getOverlayConfig());
}
if (this.overlayRef && !this.overlayRef.hasAttached()) {
this.overlayRef.attach(this.portal);
this.overlayBackdropClickSubscription = this.subscribeOverlayBackdropClick();
}
this.updatePositions();
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.getOverlayConfig = /**
* @private
* @return {?}
*/
function () {
return new i2$2.OverlayConfig({
positionStrategy: this.getOverlayPosition(),
scrollStrategy: this.overlay.scrollStrategies.reposition()
});
};
/**
* @private
* @return {?}
*/
NzMentionComponent.prototype.getOverlayPosition = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var positions = [
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' })
];
this.positionStrategy = this.overlay.position()
.flexibleConnectedTo(this.trigger.el)
.withPositions(positions)
.withFlexibleDimensions(false)
.withPush(false);
return this.positionStrategy;
};
NzMentionComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-mention',
template: "<ng-content></ng-content>\n<ng-template #suggestions>\n <ul class=\"ant-mention-dropdown\">\n <li class=\"ant-mention-dropdown-item\"\n *ngFor=\"let suggestion of filteredSuggestions; let i = index\"\n [class.focus]=\"i === activeIndex\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"selectSuggestion(suggestion)\">\n <ng-container *ngIf=\"suggestionTemplate else defaultSuggestion\">\n <ng-container *ngTemplateOutlet=\"suggestionTemplate; context: {$implicit: suggestion}\"></ng-container>\n </ng-container>\n <ng-template #defaultSuggestion>{{ nzValueWith(suggestion) }}</ng-template>\n </li>\n <li class=\"ant-mention-dropdown-notfound ant-mention-dropdown-item\"\n *ngIf=\"filteredSuggestions.length === 0\">\n <span *ngIf=\"nzLoading\"><i nz-icon type=\"loading\"></i></span>\n <span *ngIf=\"!nzLoading\">{{ nzNotFoundContent }}</span>\n </li>\n </ul>\n</ng-template>\n",
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
styles: ["\n .ant-mention-dropdown {\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n margin-top: 4px;\n margin-bottom: 4px;\n }\n "]
}] }
];
/** @nocollapse */
NzMentionComponent.ctorParameters = function () {
return [
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2$1.DOCUMENT,] }] },
{ type: i0.ChangeDetectorRef },
{ type: i2$2.Overlay },
{ type: i0.ViewContainerRef }
];
};
NzMentionComponent.propDecorators = {
nzValueWith: [{ type: i0.Input }],
nzPrefix: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzNotFoundContent: [{ type: i0.Input }],
nzPlacement: [{ type: i0.Input }],
nzSuggestions: [{ type: i0.Input }],
nzOnSelect: [{ type: i0.Output }],
nzOnSearchChange: [{ type: i0.Output }],
trigger: [{ type: i0.ContentChild, args: [NzMentionTriggerDirective,] }],
suggestionsTemp: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }],
suggestionChild: [{ type: i0.ContentChild, args: [NzMentionSuggestionDirective, { read: i0.TemplateRef },] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzMentionComponent.prototype, "nzLoading", void 0);
return NzMentionComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var COMPONENTS = [NzMentionComponent, NzMentionTriggerDirective, NzMentionSuggestionDirective];
var NzMentionModule = /** @class */ (function () {
function NzMentionModule() {
}
NzMentionModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, i2$2.OverlayModule, NzIconModule],
declarations: __spread(COMPONENTS),
exports: __spread(COMPONENTS)
},] }
];
return NzMentionModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_MESSAGE_DEFAULT_CONFIG = new i0.InjectionToken('NZ_MESSAGE_DEFAULT_CONFIG');
/** @type {?} */
var NZ_MESSAGE_CONFIG = new i0.InjectionToken('NZ_MESSAGE_CONFIG');
/** @type {?} */
var NZ_MESSAGE_DEFAULT_CONFIG_PROVIDER = {
provide: NZ_MESSAGE_DEFAULT_CONFIG,
useValue: {
nzDuration: 3000,
nzAnimate: true,
nzPauseOnHover: true,
nzMaxStack: 7
}
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMessageContainerComponent = /** @class */ (function () {
function NzMessageContainerComponent(cdr, defaultConfig, config) {
this.cdr = cdr;
this.messages = [];
this.config = {};
this.setConfig(__assign({}, defaultConfig, config));
}
/**
* @param {?} config
* @return {?}
*/
NzMessageContainerComponent.prototype.setConfig = /**
* @param {?} config
* @return {?}
*/
function (config) {
this.config = __assign({}, this.config, config);
};
/**
* Create a new message.
* @param message Parsed message configuration.
*/
/**
* Create a new message.
* @param {?} message Parsed message configuration.
* @return {?}
*/
NzMessageContainerComponent.prototype.createMessage = /**
* Create a new message.
* @param {?} message Parsed message configuration.
* @return {?}
*/
function (message) {
if (this.messages.length >= this.config.nzMaxStack) {
this.messages.splice(0, 1);
}
message.options = this._mergeMessageOptions(message.options);
message.onClose = new rxjs.Subject();
this.messages.push(message);
this.cdr.detectChanges();
};
/**
* Remove a message by `messageId`.
* @param messageId Id of the message to be removed.
* @param userAction Whether this is closed by user interaction.
*/
/**
* Remove a message by `messageId`.
* @param {?} messageId Id of the message to be removed.
* @param {?=} userAction Whether this is closed by user interaction.
* @return {?}
*/
NzMessageContainerComponent.prototype.removeMessage = /**
* Remove a message by `messageId`.
* @param {?} messageId Id of the message to be removed.
* @param {?=} userAction Whether this is closed by user interaction.
* @return {?}
*/
function (messageId, userAction) {
var _this = this;
if (userAction === void 0) {
userAction = false;
}
this.messages.some(( /**
* @param {?} message
* @param {?} index
* @return {?}
*/function (message, index) {
if (message.messageId === messageId) {
_this.messages.splice(index, 1);
_this.cdr.detectChanges();
message.onClose.next(userAction);
message.onClose.complete();
return true;
}
}));
};
/**
* Remove all messages.
*/
/**
* Remove all messages.
* @return {?}
*/
NzMessageContainerComponent.prototype.removeMessageAll = /**
* Remove all messages.
* @return {?}
*/
function () {
this.messages = [];
this.cdr.detectChanges();
};
/**
* Merge default options and custom message options
* @param options
*/
/**
* Merge default options and custom message options
* @protected
* @param {?} options
* @return {?}
*/
NzMessageContainerComponent.prototype._mergeMessageOptions = /**
* Merge default options and custom message options
* @protected
* @param {?} options
* @return {?}
*/
function (options) {
/** @type {?} */
var defaultOptions = {
nzDuration: this.config.nzDuration,
nzAnimate: this.config.nzAnimate,
nzPauseOnHover: this.config.nzPauseOnHover
};
return __assign({}, defaultOptions, options);
};
NzMessageContainerComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-message-container',
preserveWhitespaces: false,
template: "<div class=\"ant-message\">\n <nz-message *ngFor=\"let message of messages; let i = index\" [nzMessage]=\"message\" [nzIndex]=\"i\"></nz-message>\n</div>"
}] }
];
/** @nocollapse */
NzMessageContainerComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_MESSAGE_DEFAULT_CONFIG,] }] },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_MESSAGE_CONFIG,] }] }
];
};
return NzMessageContainerComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var moveUpMotion = animations$1.trigger('moveUpMotion', [
animations$1.transition('* => enter', [
animations$1.style({
transformOrigin: '0 0',
transform: 'translateY(-100%)',
opacity: 0
}),
animations$1.animate("" + AnimationDuration.BASE, animations$1.style({
transformOrigin: '0 0',
transform: 'translateY(0%)',
opacity: 1
}))
]),
animations$1.transition('* => leave', [
animations$1.style({
transformOrigin: '0 0',
transform: 'translateY(0%)',
opacity: 1
}),
animations$1.animate("" + AnimationDuration.BASE, animations$1.style({
transformOrigin: '0 0',
transform: 'translateY(-100%)',
opacity: 0
}))
])
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMessageComponent = /** @class */ (function () {
function NzMessageComponent(_messageContainer, cdr) {
this._messageContainer = _messageContainer;
this.cdr = cdr;
// Whether record timeout to auto destroy self
this._eraseTimer = null;
}
/**
* @return {?}
*/
NzMessageComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this._options = this.nzMessage.options;
if (this._options.nzAnimate) {
this.nzMessage.state = 'enter';
}
this._autoErase = this._options.nzDuration > 0;
if (this._autoErase) {
this._initErase();
this._startEraseTimeout();
}
};
/**
* @return {?}
*/
NzMessageComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
if (this._autoErase) {
this._clearEraseTimeout();
}
};
/**
* @return {?}
*/
NzMessageComponent.prototype.onEnter = /**
* @return {?}
*/
function () {
if (this._autoErase && this._options.nzPauseOnHover) {
this._clearEraseTimeout();
this._updateTTL();
}
};
/**
* @return {?}
*/
NzMessageComponent.prototype.onLeave = /**
* @return {?}
*/
function () {
if (this._autoErase && this._options.nzPauseOnHover) {
this._startEraseTimeout();
}
};
// Remove self
// Remove self
/**
* @protected
* @param {?=} userAction
* @return {?}
*/
NzMessageComponent.prototype._destroy =
// Remove self
/**
* @protected
* @param {?=} userAction
* @return {?}
*/
function (userAction) {
var _this = this;
if (userAction === void 0) {
userAction = false;
}
if (this._options.nzAnimate) {
this.nzMessage.state = 'leave';
this.cdr.detectChanges();
setTimeout(( /**
* @return {?}
*/function () { return _this._messageContainer.removeMessage(_this.nzMessage.messageId, userAction); }), 200);
}
else {
this._messageContainer.removeMessage(this.nzMessage.messageId, userAction);
}
};
/**
* @private
* @return {?}
*/
NzMessageComponent.prototype._initErase = /**
* @private
* @return {?}
*/
function () {
this._eraseTTL = this._options.nzDuration;
this._eraseTimingStart = Date.now();
};
/**
* @private
* @return {?}
*/
NzMessageComponent.prototype._updateTTL = /**
* @private
* @return {?}
*/
function () {
if (this._autoErase) {
this._eraseTTL -= Date.now() - this._eraseTimingStart;
}
};
/**
* @private
* @return {?}
*/
NzMessageComponent.prototype._startEraseTimeout = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (this._eraseTTL > 0) {
this._clearEraseTimeout(); // To prevent calling _startEraseTimeout() more times to create more timer
// TODO: `window` should be removed in milestone II
this._eraseTimer = setTimeout(( /**
* @return {?}
*/function () { return _this._destroy(); }), this._eraseTTL);
this._eraseTimingStart = Date.now();
}
else {
this._destroy();
}
};
/**
* @private
* @return {?}
*/
NzMessageComponent.prototype._clearEraseTimeout = /**
* @private
* @return {?}
*/
function () {
if (this._eraseTimer !== null) {
clearTimeout(this._eraseTimer);
this._eraseTimer = null;
}
};
NzMessageComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-message',
preserveWhitespaces: false,
animations: [moveUpMotion],
template: "<div class=\"ant-message-notice\"\n [@moveUpMotion]=\"nzMessage.state\"\n (mouseenter)=\"onEnter()\"\n (mouseleave)=\"onLeave()\">\n <div class=\"ant-message-notice-content\">\n <div class=\"ant-message-custom-content\" [ngClass]=\"'ant-message-' + nzMessage.type\">\n <ng-container [ngSwitch]=\"nzMessage.type\">\n <i *ngSwitchCase=\"'success'\" nz-icon type=\"check-circle\"></i>\n <i *ngSwitchCase=\"'info'\" nz-icon type=\"info-circle\"></i>\n <i *ngSwitchCase=\"'warning'\" nz-icon type=\"exclamation-circle\"></i>\n <i *ngSwitchCase=\"'error'\" nz-icon type=\"close-circle\"></i>\n <i *ngSwitchCase=\"'loading'\" nz-icon type=\"loading\"></i>\n </ng-container>\n <span [innerHTML]=\"nzMessage.content\"></span>\n </div>\n </div>\n</div>"
}] }
];
/** @nocollapse */
NzMessageComponent.ctorParameters = function () {
return [
{ type: NzMessageContainerComponent },
{ type: i0.ChangeDetectorRef }
];
};
NzMessageComponent.propDecorators = {
nzMessage: [{ type: i0.Input }],
nzIndex: [{ type: i0.Input }]
};
return NzMessageComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var globalCounter = 0;
/**
* @template ContainerClass, MessageData, MessageConfig
*/
var /**
* @template ContainerClass, MessageData, MessageConfig
*/ NzMessageBaseService$$1 = /** @class */ (function () {
function NzMessageBaseService$$1(overlay, containerClass, injector, cfr, appRef, _idPrefix) {
if (_idPrefix === void 0) {
_idPrefix = '';
}
this.overlay = overlay;
this.containerClass = containerClass;
this.injector = injector;
this.cfr = cfr;
this.appRef = appRef;
this._idPrefix = _idPrefix;
this._container = this.createContainer();
}
/**
* @param {?=} messageId
* @return {?}
*/
NzMessageBaseService$$1.prototype.remove = /**
* @param {?=} messageId
* @return {?}
*/
function (messageId) {
if (messageId) {
this._container.removeMessage(messageId);
}
else {
this._container.removeMessageAll();
}
};
/**
* @param {?} message
* @param {?=} options
* @return {?}
*/
NzMessageBaseService$$1.prototype.createMessage = /**
* @param {?} message
* @param {?=} options
* @return {?}
*/
function (message, options) {
// TODO: spread on literal has been disallow on latest proposal
/** @type {?} */
var resultMessage = __assign({}, (( /** @type {?} */(message))), {
messageId: this._generateMessageId(),
options: options,
createdAt: new Date()
});
this._container.createMessage(resultMessage);
return resultMessage;
};
/**
* @param {?} config
* @return {?}
*/
NzMessageBaseService$$1.prototype.config = /**
* @param {?} config
* @return {?}
*/
function (config) {
this._container.setConfig(config);
};
/**
* @protected
* @return {?}
*/
NzMessageBaseService$$1.prototype._generateMessageId = /**
* @protected
* @return {?}
*/
function () {
return this._idPrefix + globalCounter++;
};
// Manually creating container for overlay to avoid multi-checking error, see: https://github.com/NG-ZORRO/ng-zorro-antd/issues/391
// NOTE: we never clean up the container component and it's overlay resources, if we should, we need to do it by our own codes.
// Manually creating container for overlay to avoid multi-checking error, see: https://github.com/NG-ZORRO/ng-zorro-antd/issues/391
// NOTE: we never clean up the container component and it's overlay resources, if we should, we need to do it by our own codes.
/**
* @private
* @return {?}
*/
NzMessageBaseService$$1.prototype.createContainer =
// Manually creating container for overlay to avoid multi-checking error, see: https://github.com/NG-ZORRO/ng-zorro-antd/issues/391
// NOTE: we never clean up the container component and it's overlay resources, if we should, we need to do it by our own codes.
/**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var factory = this.cfr.resolveComponentFactory(this.containerClass);
/** @type {?} */
var componentRef = factory.create(this.injector);
componentRef.changeDetectorRef.detectChanges(); // Immediately change detection to avoid multi-checking error
this.appRef.attachView(componentRef.hostView); // Load view into app root
// Load view into app root
/** @type {?} */
var overlayPane = this.overlay.create().overlayElement;
overlayPane.style.zIndex = '1010'; // Patching: assign the same zIndex of ant-message to it's parent overlay panel, to the ant-message's zindex work.
overlayPane.appendChild(( /** @type {?} */((( /** @type {?} */(componentRef.hostView))).rootNodes[0])));
return componentRef.instance;
};
return NzMessageBaseService$$1;
}());
var NzMessageService$$1 = /** @class */ (function (_super) {
__extends(NzMessageService$$1, _super);
function NzMessageService$$1(overlay, injector, cfr, appRef) {
return _super.call(this, overlay, NzMessageContainerComponent, injector, cfr, appRef, 'message-') || this;
}
// Shortcut methods
// Shortcut methods
/**
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzMessageService$$1.prototype.success =
// Shortcut methods
/**
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (content, options) {
return this.createMessage({ type: 'success', content: content }, options);
};
/**
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzMessageService$$1.prototype.error = /**
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (content, options) {
return this.createMessage({ type: 'error', content: content }, options);
};
/**
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzMessageService$$1.prototype.info = /**
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (content, options) {
return this.createMessage({ type: 'info', content: content }, options);
};
/**
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzMessageService$$1.prototype.warning = /**
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (content, options) {
return this.createMessage({ type: 'warning', content: content }, options);
};
/**
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzMessageService$$1.prototype.loading = /**
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (content, options) {
return this.createMessage({ type: 'loading', content: content }, options);
};
/**
* @param {?} type
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzMessageService$$1.prototype.create = /**
* @param {?} type
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (type, content, options) {
return this.createMessage({ type: type, content: content }, options);
};
NzMessageService$$1.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
NzMessageService$$1.ctorParameters = function () {
return [
{ type: i2$2.Overlay },
{ type: i0.Injector },
{ type: i0.ComponentFactoryResolver },
{ type: i0.ApplicationRef }
];
};
/** @nocollapse */ NzMessageService$$1.ngInjectableDef = i0.defineInjectable({ factory: function NzMessageService_Factory() { return new NzMessageService$$1(i0.inject(i2$2.Overlay), i0.inject(i0.INJECTOR), i0.inject(i0.ComponentFactoryResolver), i0.inject(i0.ApplicationRef)); }, token: NzMessageService$$1, providedIn: "root" });
return NzMessageService$$1;
}(NzMessageBaseService$$1));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMessageModule = /** @class */ (function () {
function NzMessageModule() {
}
NzMessageModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, i2$2.OverlayModule, NzIconModule],
declarations: [NzMessageContainerComponent, NzMessageComponent],
providers: [NZ_MESSAGE_DEFAULT_CONFIG_PROVIDER, NzMessageService$$1],
entryComponents: [NzMessageContainerComponent]
},] }
];
return NzMessageModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var CssUnitPipe = /** @class */ (function () {
function CssUnitPipe() {
}
/**
* @param {?} value
* @param {?=} defaultUnit
* @return {?}
*/
CssUnitPipe.prototype.transform = /**
* @param {?} value
* @param {?=} defaultUnit
* @return {?}
*/
function (value, defaultUnit) {
if (defaultUnit === void 0) {
defaultUnit = 'px';
}
/** @type {?} */
var formatted = +value;
return isNaN(formatted) ? "" + value : "" + formatted + defaultUnit;
};
CssUnitPipe.decorators = [
{ type: i0.Pipe, args: [{
name: 'toCssUnit'
},] }
];
return CssUnitPipe;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzModalControlService = /** @class */ (function () {
function NzModalControlService(parentService) {
this.parentService = parentService;
this.rootOpenModals = this.parentService ? null : [];
this.rootAfterAllClose = this.parentService ? null : new rxjs.Subject();
this.rootRegisteredMetaMap = this.parentService ? null : new Map();
}
Object.defineProperty(NzModalControlService.prototype, "afterAllClose", {
// Track singleton afterAllClose through over the injection tree
get:
// Track singleton afterAllClose through over the injection tree
/**
* @return {?}
*/
function () {
return this.parentService ? this.parentService.afterAllClose : this.rootAfterAllClose;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzModalControlService.prototype, "openModals", {
// Track singleton openModals array through over the injection tree
get:
// Track singleton openModals array through over the injection tree
/**
* @return {?}
*/
function () {
return this.parentService ? this.parentService.openModals : this.rootOpenModals;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzModalControlService.prototype, "registeredMetaMap", {
get: /**
* @private
* @return {?}
*/ function () {
return this.parentService ? this.parentService.registeredMetaMap : this.rootRegisteredMetaMap;
},
enumerable: true,
configurable: true
});
// Register a modal to listen its open/close
// Register a modal to listen its open/close
/**
* @param {?} modalRef
* @return {?}
*/
NzModalControlService.prototype.registerModal =
// Register a modal to listen its open/close
/**
* @param {?} modalRef
* @return {?}
*/
function (modalRef) {
var _this = this;
if (!this.hasRegistered(modalRef)) {
/** @type {?} */
var afterOpenSubscription = modalRef.afterOpen.subscribe(( /**
* @return {?}
*/function () { return _this.openModals.push(modalRef); }));
/** @type {?} */
var afterCloseSubscription = modalRef.afterClose.subscribe(( /**
* @return {?}
*/function () { return _this.removeOpenModal(modalRef); }));
this.registeredMetaMap.set(modalRef, { modalRef: modalRef, afterOpenSubscription: afterOpenSubscription, afterCloseSubscription: afterCloseSubscription });
}
};
// deregister modals
// deregister modals
/**
* @param {?} modalRef
* @return {?}
*/
NzModalControlService.prototype.deregisterModal =
// deregister modals
/**
* @param {?} modalRef
* @return {?}
*/
function (modalRef) {
/** @type {?} */
var registeredMeta = this.registeredMetaMap.get(modalRef);
if (registeredMeta) {
// Remove this modal if it is still in the opened modal list (NOTE: it may trigger "afterAllClose")
this.removeOpenModal(registeredMeta.modalRef);
registeredMeta.afterOpenSubscription.unsubscribe();
registeredMeta.afterCloseSubscription.unsubscribe();
this.registeredMetaMap.delete(modalRef);
}
};
/**
* @param {?} modalRef
* @return {?}
*/
NzModalControlService.prototype.hasRegistered = /**
* @param {?} modalRef
* @return {?}
*/
function (modalRef) {
return this.registeredMetaMap.has(modalRef);
};
// Close all registered opened modals
// Close all registered opened modals
/**
* @return {?}
*/
NzModalControlService.prototype.closeAll =
// Close all registered opened modals
/**
* @return {?}
*/
function () {
/** @type {?} */
var i = this.openModals.length;
while (i--) {
this.openModals[i].close();
}
};
/**
* @private
* @param {?} modalRef
* @return {?}
*/
NzModalControlService.prototype.removeOpenModal = /**
* @private
* @param {?} modalRef
* @return {?}
*/
function (modalRef) {
/** @type {?} */
var index = this.openModals.indexOf(modalRef);
if (index > -1) {
this.openModals.splice(index, 1);
if (!this.openModals.length) {
this.afterAllClose.next();
}
}
};
NzModalControlService.decorators = [
{ type: i0.Injectable }
];
/** @nocollapse */
NzModalControlService.ctorParameters = function () {
return [
{ type: NzModalControlService, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
];
};
return NzModalControlService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// tslint:disable-next-line:no-any
/**
* @param {?} obj
* @return {?}
*/
function isPromise(obj) {
return !!obj && typeof obj.then === 'function' && typeof obj.catch === 'function';
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var ModalUtil = /** @class */ (function () {
function ModalUtil(document) {
this.document = document;
this.lastPosition = null;
this.listenDocumentClick();
}
/**
* @return {?}
*/
ModalUtil.prototype.getLastClickPosition = /**
* @return {?}
*/
function () {
return this.lastPosition;
};
/**
* @return {?}
*/
ModalUtil.prototype.listenDocumentClick = /**
* @return {?}
*/
function () {
var _this = this;
this.document.addEventListener('click', ( /**
* @param {?} event
* @return {?}
*/function (event) {
_this.lastPosition = { x: event.clientX, y: event.clientY };
}));
};
return ModalUtil;
}());
var ModalUtil$1 = new ModalUtil(document);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_MODAL_DEFAULT_CONFIG = {
autoBodyPadding: true
};
/** @type {?} */
var NZ_MODAL_CONFIG = new i0.InjectionToken('NzModalConfig', {
providedIn: 'root',
factory: ( /**
* @return {?}
*/function () { return NZ_MODAL_DEFAULT_CONFIG; }) // Default config
});
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* API class that public to users to handle the modal instance.
* NzModalRef is aim to avoid accessing to the modal instance directly by users.
* @abstract
* @template T, R
*/
var /**
* API class that public to users to handle the modal instance.
* NzModalRef is aim to avoid accessing to the modal instance directly by users.
* @abstract
* @template T, R
*/ NzModalRef = /** @class */ (function () {
function NzModalRef() {
}
return NzModalRef;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var MODAL_ANIMATE_DURATION = 200;
/**
* @template T, R
*/
var NzModalComponent = /** @class */ (function (_super) {
__extends(NzModalComponent, _super);
function NzModalComponent(overlay, i18n, cfr, elementRef, viewContainer, modalControl, focusTrapFactory, cdr, config, document) {
var _this = _super.call(this) || this;
_this.overlay = overlay;
_this.i18n = i18n;
_this.cfr = cfr;
_this.elementRef = elementRef;
_this.viewContainer = viewContainer;
_this.modalControl = modalControl;
_this.focusTrapFactory = focusTrapFactory;
_this.cdr = cdr;
_this.config = config;
_this.document = document;
_this.nzVisible = false;
_this.nzClosable = true;
_this.nzMask = true;
_this.nzMaskClosable = true;
_this.nzOkLoading = false;
_this.nzOkDisabled = false;
_this.nzCancelDisabled = false;
_this.nzCancelLoading = false;
_this.nzKeyboard = true;
_this.nzNoAnimation = false;
// [STATIC] Default Modal ONLY
_this.nzGetContainer = ( /**
* @return {?}
*/function () { return _this.overlay.create(); }); // [STATIC]
// [STATIC]
_this.nzZIndex = 1000;
_this.nzWidth = 520;
_this.nzOkType = 'primary';
_this.nzIconType = 'question-circle'; // Confirm Modal ONLY
// Confirm Modal ONLY
_this.nzModalType = 'default';
_this.nzOnOk = new i0.EventEmitter();
_this.nzOnCancel = new i0.EventEmitter();
_this.nzAfterOpen = new i0.EventEmitter(); // Trigger when modal open(visible) after animations
// Trigger when modal open(visible) after animations
_this.nzAfterClose = new i0.EventEmitter(); // Trigger when modal leave-animation over
// Trigger when modal leave-animation over
_this.nzVisibleChange = new i0.EventEmitter();
// Indicate whether this dialog should hidden
_this.locale = {};
_this.transformOrigin = '0px 0px 0px'; // The origin point that animation based on
_this.unsubscribe$ = new rxjs.Subject();
_this.config = _this.mergeDefaultConfig(_this.config);
_this.scrollStrategy = _this.overlay.scrollStrategies.block();
return _this;
}
Object.defineProperty(NzModalComponent.prototype, "afterOpen", {
get:
// Only aim to focus the ok button that needs to be auto focused
/**
* @return {?}
*/
function () {
return this.nzAfterOpen.asObservable();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzModalComponent.prototype, "afterClose", {
get: /**
* @return {?}
*/ function () {
return this.nzAfterClose.asObservable();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzModalComponent.prototype, "cancelText", {
get: /**
* @return {?}
*/ function () {
return this.nzCancelText || this.locale.cancelText;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzModalComponent.prototype, "okText", {
get: /**
* @return {?}
*/ function () {
return this.nzOkText || this.locale.okText;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzModalComponent.prototype, "hidden", {
get: /**
* @return {?}
*/ function () {
return !this.nzVisible && !this.animationState;
} // Indicate whether this dialog should hidden
,
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzModalComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.i18n.localeChange.pipe(operators.takeUntil(this.unsubscribe$)).subscribe(( /**
* @return {?}
*/function () {
_this.locale = ( /** @type {?} */(_this.i18n.getLocaleData('Modal')));
}));
rxjs.fromEvent(this.document.body, 'keydown').pipe(operators.takeUntil(this.unsubscribe$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.keydownListener(e); }));
if (this.isComponent(this.nzContent)) {
this.createDynamicComponent(( /** @type {?} */(this.nzContent))); // Create component along without View
}
if (this.isModalButtons(this.nzFooter)) { // Setup default button options
this.nzFooter = this.formatModalButtons(( /** @type {?} */(this.nzFooter)));
}
// Place the modal dom to elsewhere
this.container = typeof this.nzGetContainer === 'function' ? this.nzGetContainer() : this.nzGetContainer;
if (this.container instanceof HTMLElement) {
this.container.appendChild(this.elementRef.nativeElement);
}
else if (this.container instanceof i2$2.OverlayRef) { // NOTE: only attach the dom to overlay, the view container is not changed actually
this.container.overlayElement.appendChild(this.elementRef.nativeElement);
}
// Register modal when afterOpen/afterClose is stable
this.modalControl.registerModal(this);
};
// [NOTE] NOT available when using by service!
// Because ngOnChanges never be called when using by service,
// here we can't support "nzContent"(Component) etc. as inputs that initialized dynamically.
// BUT: User also can change "nzContent" dynamically to trigger UI changes (provided you don't use Component that needs initializations)
// [NOTE] NOT available when using by service!
// Because ngOnChanges never be called when using by service,
// here we can't support "nzContent"(Component) etc. as inputs that initialized dynamically.
// BUT: User also can change "nzContent" dynamically to trigger UI changes (provided you don't use Component that needs initializations)
/**
* @param {?} changes
* @return {?}
*/
NzModalComponent.prototype.ngOnChanges =
// [NOTE] NOT available when using by service!
// Because ngOnChanges never be called when using by service,
// here we can't support "nzContent"(Component) etc. as inputs that initialized dynamically.
// BUT: User also can change "nzContent" dynamically to trigger UI changes (provided you don't use Component that needs initializations)
/**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzVisible) {
this.handleVisibleStateChange(this.nzVisible, !changes.nzVisible.firstChange); // Do not trigger animation while initializing
}
};
/**
* @return {?}
*/
NzModalComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
// If using Component, it is the time to attach View while bodyContainer is ready
if (this.contentComponentRef) {
this.bodyContainer.insert(this.contentComponentRef.hostView);
}
if (this.autoFocusButtonOk) {
(( /** @type {?} */(this.autoFocusButtonOk.nativeElement))).focus();
}
};
/**
* @return {?}
*/
NzModalComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
var _this = this;
// Close self before destructing
this.changeVisibleFromInside(false).then(( /**
* @return {?}
*/function () {
_this.modalControl.deregisterModal(_this);
if (_this.container instanceof i2$2.OverlayRef) {
_this.container.dispose();
}
_this.unsubscribe$.next();
_this.unsubscribe$.complete();
}));
};
/**
* @param {?} event
* @return {?}
*/
NzModalComponent.prototype.keydownListener = /**
* @param {?} event
* @return {?}
*/
function (event) {
if (event.keyCode === keycodes.ESCAPE && this.nzKeyboard) {
this.onClickOkCancel('cancel');
}
};
/**
* @return {?}
*/
NzModalComponent.prototype.open = /**
* @return {?}
*/
function () {
this.changeVisibleFromInside(true);
};
/**
* @param {?=} result
* @return {?}
*/
NzModalComponent.prototype.close = /**
* @param {?=} result
* @return {?}
*/
function (result) {
this.changeVisibleFromInside(false, result);
};
/**
* @param {?=} result
* @return {?}
*/
NzModalComponent.prototype.destroy = /**
* @param {?=} result
* @return {?}
*/
function (result) {
this.close(result);
};
/**
* @return {?}
*/
NzModalComponent.prototype.triggerOk = /**
* @return {?}
*/
function () {
this.onClickOkCancel('ok');
};
/**
* @return {?}
*/
NzModalComponent.prototype.triggerCancel = /**
* @return {?}
*/
function () {
this.onClickOkCancel('cancel');
};
/**
* @return {?}
*/
NzModalComponent.prototype.getInstance = /**
* @return {?}
*/
function () {
return this;
};
/**
* @return {?}
*/
NzModalComponent.prototype.getContentComponentRef = /**
* @return {?}
*/
function () {
return this.contentComponentRef;
};
/**
* @return {?}
*/
NzModalComponent.prototype.getContentComponent = /**
* @return {?}
*/
function () {
return this.contentComponentRef && this.contentComponentRef.instance;
};
/**
* @return {?}
*/
NzModalComponent.prototype.getElement = /**
* @return {?}
*/
function () {
return this.elementRef && this.elementRef.nativeElement;
};
/**
* @param {?} $event
* @return {?}
*/
NzModalComponent.prototype.onClickMask = /**
* @param {?} $event
* @return {?}
*/
function ($event) {
if (this.nzMask &&
this.nzMaskClosable &&
(( /** @type {?} */($event.target))).classList.contains('ant-modal-wrap') &&
this.nzVisible) {
this.onClickOkCancel('cancel');
}
};
/**
* @param {?} type
* @return {?}
*/
NzModalComponent.prototype.isModalType = /**
* @param {?} type
* @return {?}
*/
function (type) {
return this.nzModalType === type;
};
/**
* @return {?}
*/
NzModalComponent.prototype.onClickCloseBtn = /**
* @return {?}
*/
function () {
if (this.nzVisible) {
this.onClickOkCancel('cancel');
}
};
/**
* @param {?} type
* @return {?}
*/
NzModalComponent.prototype.onClickOkCancel = /**
* @param {?} type
* @return {?}
*/
function (type) {
var _this = this;
/** @type {?} */
var trigger = { 'ok': this.nzOnOk, 'cancel': this.nzOnCancel }[type];
/** @type {?} */
var loadingKey = { 'ok': 'nzOkLoading', 'cancel': 'nzCancelLoading' }[type];
if (trigger instanceof i0.EventEmitter) {
trigger.emit(this.getContentComponent());
}
else if (typeof trigger === 'function') {
/** @type {?} */
var result = trigger(this.getContentComponent());
/** @type {?} */
var caseClose_1 = ( /**
* @param {?} doClose
* @return {?}
*/function (doClose) { return (doClose !== false) && _this.close(( /** @type {?} */(doClose))); });
if (isPromise(result)) {
this[loadingKey] = true;
/** @type {?} */
var handleThen = ( /**
* @param {?} doClose
* @return {?}
*/function (doClose) {
_this[loadingKey] = false;
caseClose_1(doClose);
});
(( /** @type {?} */(result))).then(handleThen).catch(handleThen);
}
else {
caseClose_1(result);
}
}
};
/**
* @param {?} value
* @return {?}
*/
NzModalComponent.prototype.isNonEmptyString = /**
* @param {?} value
* @return {?}
*/
function (value) {
return typeof value === 'string' && value !== '';
};
/**
* @param {?} value
* @return {?}
*/
NzModalComponent.prototype.isTemplateRef = /**
* @param {?} value
* @return {?}
*/
function (value) {
return value instanceof i0.TemplateRef;
};
/**
* @param {?} value
* @return {?}
*/
NzModalComponent.prototype.isComponent = /**
* @param {?} value
* @return {?}
*/
function (value) {
return value instanceof i0.Type;
};
/**
* @param {?} value
* @return {?}
*/
NzModalComponent.prototype.isModalButtons = /**
* @param {?} value
* @return {?}
*/
function (value) {
return Array.isArray(value) && value.length > 0;
};
// Do rest things when visible state changed
// Do rest things when visible state changed
/**
* @private
* @param {?} visible
* @param {?=} animation
* @param {?=} closeResult
* @return {?}
*/
NzModalComponent.prototype.handleVisibleStateChange =
// Do rest things when visible state changed
/**
* @private
* @param {?} visible
* @param {?=} animation
* @param {?=} closeResult
* @return {?}
*/
function (visible, animation, closeResult) {
var _this = this;
if (animation === void 0) {
animation = true;
}
if (visible) { // Hide scrollbar at the first time when shown up
this.scrollStrategy.enable();
this.savePreviouslyFocusedElement();
this.trapFocus();
}
return Promise
.resolve(animation && this.animateTo(visible))
.then(( /**
* @return {?}
*/function () {
if (visible) {
_this.nzAfterOpen.emit();
}
else {
_this.nzAfterClose.emit(closeResult);
_this.restoreFocus();
_this.scrollStrategy.disable();
// Mark the for check so it can react if the view container is using OnPush change detection.
_this.cdr.markForCheck();
}
}));
};
// Lookup a button's property, if the prop is a function, call & then return the result, otherwise, return itself.
// Lookup a button's property, if the prop is a function, call & then return the result, otherwise, return itself.
/**
* @param {?} options
* @param {?} prop
* @return {?}
*/
NzModalComponent.prototype.getButtonCallableProp =
// Lookup a button's property, if the prop is a function, call & then return the result, otherwise, return itself.
/**
* @param {?} options
* @param {?} prop
* @return {?}
*/
function (options, prop) {
/** @type {?} */
var value = options[prop];
/** @type {?} */
var args = [];
if (this.contentComponentRef) {
args.push(this.contentComponentRef.instance);
}
return typeof value === 'function' ? value.apply(options, args) : value;
};
// On nzFooter's modal button click
// On nzFooter's modal button click
/**
* @param {?} button
* @return {?}
*/
NzModalComponent.prototype.onButtonClick =
// On nzFooter's modal button click
/**
* @param {?} button
* @return {?}
*/
function (button) {
/** @type {?} */
var result = this.getButtonCallableProp(button, 'onClick');
if (isPromise(result)) {
button.loading = true;
(( /** @type {?} */(result))).then(( /**
* @return {?}
*/function () { return button.loading = false; })).catch(( /**
* @return {?}
*/function () { return button.loading = false; }));
}
};
// Change nzVisible from inside
// Change nzVisible from inside
/**
* @private
* @param {?} visible
* @param {?=} closeResult
* @return {?}
*/
NzModalComponent.prototype.changeVisibleFromInside =
// Change nzVisible from inside
/**
* @private
* @param {?} visible
* @param {?=} closeResult
* @return {?}
*/
function (visible, closeResult) {
if (this.nzVisible !== visible) {
// Change nzVisible value immediately
this.nzVisible = visible;
this.nzVisibleChange.emit(visible);
return this.handleVisibleStateChange(visible, true, closeResult);
}
return Promise.resolve();
};
/**
* @private
* @param {?} state
* @return {?}
*/
NzModalComponent.prototype.changeAnimationState = /**
* @private
* @param {?} state
* @return {?}
*/
function (state) {
var _a, _b;
this.animationState = state;
if (state) {
this.maskAnimationClassMap = (_a = {},
_a["fade-" + state] = true,
_a["fade-" + state + "-active"] = true,
_a);
this.modalAnimationClassMap = (_b = {},
_b["zoom-" + state] = true,
_b["zoom-" + state + "-active"] = true,
_b);
}
else {
this.maskAnimationClassMap = this.modalAnimationClassMap = null;
}
};
/**
* @private
* @param {?} isVisible
* @return {?}
*/
NzModalComponent.prototype.animateTo = /**
* @private
* @param {?} isVisible
* @return {?}
*/
function (isVisible) {
var _this = this;
if (isVisible) { // Figure out the lastest click position when shows up
setTimeout(( /**
* @return {?}
*/function () { return _this.updateTransformOrigin(); })); // [NOTE] Using timeout due to the document.click event is fired later than visible change, so if not postponed to next event-loop, we can't get the lastest click position
}
this.changeAnimationState(isVisible ? 'enter' : 'leave');
return new Promise(( /**
* @param {?} resolve
* @return {?}
*/function (resolve) {
return setTimeout(( /**
* @return {?}
*/function () {
_this.changeAnimationState(null);
resolve();
}), _this.nzNoAnimation ? 0 : MODAL_ANIMATE_DURATION);
}));
};
/**
* @private
* @param {?} buttons
* @return {?}
*/
NzModalComponent.prototype.formatModalButtons = /**
* @private
* @param {?} buttons
* @return {?}
*/
function (buttons) {
return buttons.map(( /**
* @param {?} button
* @return {?}
*/function (button) {
return __assign({
type: 'default',
size: 'default',
autoLoading: true,
show: true,
loading: false,
disabled: false
}, button);
}));
};
/**
* Create a component dynamically but not attach to any View (this action will be executed when bodyContainer is ready)
* @param component Component class
*/
/**
* Create a component dynamically but not attach to any View (this action will be executed when bodyContainer is ready)
* @private
* @param {?} component Component class
* @return {?}
*/
NzModalComponent.prototype.createDynamicComponent = /**
* Create a component dynamically but not attach to any View (this action will be executed when bodyContainer is ready)
* @private
* @param {?} component Component class
* @return {?}
*/
function (component) {
/** @type {?} */
var factory = this.cfr.resolveComponentFactory(component);
/** @type {?} */
var childInjector = i0.Injector.create({
providers: [{ provide: NzModalRef, useValue: this }],
parent: this.viewContainer.parentInjector
});
this.contentComponentRef = factory.create(childInjector);
if (this.nzComponentParams) {
Object.assign(this.contentComponentRef.instance, this.nzComponentParams);
}
// Do the first change detection immediately (or we do detection at ngAfterViewInit, multi-changes error will be thrown)
this.contentComponentRef.changeDetectorRef.detectChanges();
};
// Update transform-origin to the last click position on document
// Update transform-origin to the last click position on document
/**
* @private
* @return {?}
*/
NzModalComponent.prototype.updateTransformOrigin =
// Update transform-origin to the last click position on document
/**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var modalElement = ( /** @type {?} */(this.modalContainer.nativeElement));
/** @type {?} */
var lastPosition = ModalUtil$1.getLastClickPosition();
if (lastPosition) {
this.transformOrigin = lastPosition.x - modalElement.offsetLeft + "px " + (lastPosition.y - modalElement.offsetTop) + "px 0px";
}
};
/**
* @private
* @param {?} config
* @return {?}
*/
NzModalComponent.prototype.mergeDefaultConfig = /**
* @private
* @param {?} config
* @return {?}
*/
function (config) {
return __assign({}, NZ_MODAL_DEFAULT_CONFIG, config);
};
/**
* @private
* @return {?}
*/
NzModalComponent.prototype.savePreviouslyFocusedElement = /**
* @private
* @return {?}
*/
function () {
if (this.document) {
this.previouslyFocusedElement = ( /** @type {?} */(this.document.activeElement));
}
};
/**
* @private
* @return {?}
*/
NzModalComponent.prototype.trapFocus = /**
* @private
* @return {?}
*/
function () {
if (!this.focusTrap) {
this.focusTrap = this.focusTrapFactory.create(this.elementRef.nativeElement);
}
this.focusTrap.focusInitialElementWhenReady();
};
/**
* @private
* @return {?}
*/
NzModalComponent.prototype.restoreFocus = /**
* @private
* @return {?}
*/
function () {
// We need the extra check, because IE can set the `activeElement` to null in some cases.
if (this.previouslyFocusedElement && typeof this.previouslyFocusedElement.focus === 'function') {
this.previouslyFocusedElement.focus();
}
if (this.focusTrap) {
this.focusTrap.destroy();
}
};
NzModalComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-modal',
template: "<ng-template #tplOriginContent><ng-content></ng-content></ng-template> <!-- Compatible: the <ng-content> can appear only once -->\n\n<div [nzNoAnimation]=\"nzNoAnimation\">\n <div *ngIf=\"nzMask\"\n class=\"ant-modal-mask\"\n [ngClass]=\"maskAnimationClassMap\"\n [class.ant-modal-mask-hidden]=\"hidden\"\n [ngStyle]=\"nzMaskStyle\"\n [style.zIndex]=\"nzZIndex\"\n ></div>\n <div\n (click)=\"onClickMask($event)\"\n class=\"ant-modal-wrap {{ nzWrapClassName }}\"\n [style.zIndex]=\"nzZIndex\"\n [style.display]=\"hidden ? 'none' : ''\"\n tabindex=\"-1\"\n role=\"dialog\"\n >\n <div #modalContainer\n class=\"ant-modal {{ nzClassName }}\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"nzStyle\"\n [style.width]=\"nzWidth | toCssUnit\"\n [style.transform-origin]=\"transformOrigin\"\n role=\"document\"\n >\n <div class=\"ant-modal-content\">\n <button *ngIf=\"nzClosable\" (click)=\"onClickCloseBtn()\" class=\"ant-modal-close\" aria-label=\"Close\">\n <span class=\"ant-modal-close-x\">\n <i nz-icon type=\"close\" class=\"ant-modal-close-icon\"></i>\n </span>\n </button>\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isModalType('default')\" [ngTemplateOutlet]=\"tplContentDefault\"></ng-container>\n <ng-container *ngSwitchCase=\"isModalType('confirm')\" [ngTemplateOutlet]=\"tplContentConfirm\"></ng-container>\n </ng-container>\n </div>\n </div>\n <div tabindex=\"0\" style=\"width: 0px; height: 0px; overflow: hidden;\">sentinel</div>\n </div>\n</div>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n <div *ngIf=\"nzTitle\" class=\"ant-modal-header\">\n <div class=\"ant-modal-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(nzTitle)\" [ngTemplateOutlet]=\"nzTitle\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(nzTitle)\"><div [innerHTML]=\"nzTitle\"></div></ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"ant-modal-body\" [ngStyle]=\"nzBodyStyle\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(nzContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(nzContent)\" [ngTemplateOutlet]=\"nzContent\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(nzContent)\"><div [innerHTML]=\"nzContent\"></div></ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n <div *ngIf=\"nzFooter !== null\" class=\"ant-modal-footer\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(nzFooter)\" [ngTemplateOutlet]=\"nzFooter\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(nzFooter)\"><div [innerHTML]=\"nzFooter\"></div></ng-container>\n <ng-container *ngSwitchCase=\"isModalButtons(nzFooter)\">\n <button *ngFor=\"let button of nzFooter\" nz-button\n (click)=\"onButtonClick(button)\"\n [hidden]=\"!getButtonCallableProp(button, 'show')\"\n [nzLoading]=\"getButtonCallableProp(button, 'loading')\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n [nzType]=\"button.type\"\n [nzShape]=\"button.shape\"\n [nzSize]=\"button.size\"\n [nzGhost]=\"button.ghost\"\n >{{ button.label }}</button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button *ngIf=\"nzCancelText!==null\" nz-button (click)=\"onClickOkCancel('cancel')\" [nzLoading]=\"nzCancelLoading\" [disabled]=\"nzCancelDisabled\">\n {{ cancelText }}\n </button>\n <button *ngIf=\"nzOkText!==null\" nz-button [nzType]=\"nzOkType\" (click)=\"onClickOkCancel('ok')\" [nzLoading]=\"nzOkLoading\" [disabled]=\"nzOkDisabled\">\n {{ okText }}\n </button>\n </ng-container>\n </ng-container>\n </div>\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"ant-modal-body\" [ngStyle]=\"nzBodyStyle\">\n <div class=\"ant-modal-confirm-body-wrapper\">\n <div class=\"ant-modal-confirm-body\">\n <i nz-icon [type]=\"nzIconType\"></i>\n <span class=\"ant-modal-confirm-title\">\n <ng-container [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(nzTitle)\" [ngTemplateOutlet]=\"nzTitle\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(nzTitle)\"><span [innerHTML]=\"nzTitle\"></span></ng-container>\n </ng-container>\n </span>\n <div class=\"ant-modal-confirm-content\">\n <ng-container #bodyContainer>\n <ng-container *ngIf=\"!isComponent(nzContent)\" [ngSwitch]=\"true\">\n <ng-container *ngSwitchCase=\"isTemplateRef(nzContent)\" [ngTemplateOutlet]=\"nzContent\"></ng-container>\n <ng-container *ngSwitchCase=\"isNonEmptyString(nzContent)\"><div [innerHTML]=\"nzContent\"></div></ng-container>\n <ng-container *ngSwitchDefault [ngTemplateOutlet]=\"tplOriginContent\"></ng-container>\n </ng-container>\n </ng-container>\n </div>\n </div>\n <div class=\"ant-modal-confirm-btns\">\n <button nz-button *ngIf=\"nzCancelText!==null\" (click)=\"onClickOkCancel('cancel')\" [nzLoading]=\"nzCancelLoading\">\n {{ cancelText }}\n </button>\n <button *ngIf=\"nzOkText!==null\" #autoFocusButtonOk nz-button [nzType]=\"nzOkType\" (click)=\"onClickOkCancel('ok')\" [nzLoading]=\"nzOkLoading\">\n {{ okText }}\n </button>\n </div>\n </div> <!-- /.ant-modal-confirm-body-wrapper -->\n </div>\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n",
// Using OnPush for modal caused footer can not to detect changes. we can fix it when 8.x.
changeDetection: i0.ChangeDetectionStrategy.Default
}] }
];
/** @nocollapse */
NzModalComponent.ctorParameters = function () {
return [
{ type: i2$2.Overlay },
{ type: NzI18nService$$1 },
{ type: i0.ComponentFactoryResolver },
{ type: i0.ElementRef },
{ type: i0.ViewContainerRef },
{ type: NzModalControlService },
{ type: a11y.FocusTrapFactory },
{ type: i0.ChangeDetectorRef },
{ type: undefined, decorators: [{ type: i0.Inject, args: [NZ_MODAL_CONFIG,] }] },
{ type: undefined, decorators: [{ type: i0.Inject, args: [i2$1.DOCUMENT,] }] }
];
};
NzModalComponent.propDecorators = {
nzVisible: [{ type: i0.Input }],
nzClosable: [{ type: i0.Input }],
nzMask: [{ type: i0.Input }],
nzMaskClosable: [{ type: i0.Input }],
nzOkLoading: [{ type: i0.Input }],
nzOkDisabled: [{ type: i0.Input }],
nzCancelDisabled: [{ type: i0.Input }],
nzCancelLoading: [{ type: i0.Input }],
nzKeyboard: [{ type: i0.Input }],
nzNoAnimation: [{ type: i0.Input }],
nzContent: [{ type: i0.Input }],
nzComponentParams: [{ type: i0.Input }],
nzFooter: [{ type: i0.Input }],
nzGetContainer: [{ type: i0.Input }],
nzZIndex: [{ type: i0.Input }],
nzWidth: [{ type: i0.Input }],
nzWrapClassName: [{ type: i0.Input }],
nzClassName: [{ type: i0.Input }],
nzStyle: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzMaskStyle: [{ type: i0.Input }],
nzBodyStyle: [{ type: i0.Input }],
nzOkText: [{ type: i0.Input }],
nzCancelText: [{ type: i0.Input }],
nzOkType: [{ type: i0.Input }],
nzIconType: [{ type: i0.Input }],
nzModalType: [{ type: i0.Input }],
nzOnOk: [{ type: i0.Input }, { type: i0.Output }],
nzOnCancel: [{ type: i0.Input }, { type: i0.Output }],
nzAfterOpen: [{ type: i0.Output }],
nzAfterClose: [{ type: i0.Output }],
nzVisibleChange: [{ type: i0.Output }],
modalContainer: [{ type: i0.ViewChild, args: ['modalContainer',] }],
bodyContainer: [{ type: i0.ViewChild, args: ['bodyContainer', { read: i0.ViewContainerRef },] }],
autoFocusButtonOk: [{ type: i0.ViewChild, args: ['autoFocusButtonOk', { read: i0.ElementRef },] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzVisible", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzClosable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzMask", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzMaskClosable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzOkLoading", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzOkDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzCancelDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzCancelLoading", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzModalComponent.prototype, "nzKeyboard", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzModalComponent.prototype, "nzNoAnimation", void 0);
return NzModalComponent;
}(NzModalRef));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
// A builder used for managing service creating modals
var
// A builder used for managing service creating modals
ModalBuilderForService = /** @class */ (function () {
function ModalBuilderForService(overlay, options) {
if (options === void 0) {
options = {};
}
var _this = this;
this.overlay = overlay;
this.createModal();
if (!('nzGetContainer' in options)) { // As we use CDK to create modal in service by force, there is no need to use nzGetContainer
options.nzGetContainer = null; // Override nzGetContainer's default value to prevent creating another overlay
}
this.changeProps(options);
this.modalRef.instance.open();
this.modalRef.instance.nzAfterClose.subscribe(( /**
* @return {?}
*/function () { return _this.destroyModal(); })); // [NOTE] By default, close equals destroy when using as Service
}
/**
* @return {?}
*/
ModalBuilderForService.prototype.getInstance = /**
* @return {?}
*/
function () {
return this.modalRef && this.modalRef.instance;
};
/**
* @return {?}
*/
ModalBuilderForService.prototype.destroyModal = /**
* @return {?}
*/
function () {
if (this.modalRef) {
this.overlayRef.dispose();
this.modalRef = null;
}
};
/**
* @private
* @param {?} options
* @return {?}
*/
ModalBuilderForService.prototype.changeProps = /**
* @private
* @param {?} options
* @return {?}
*/
function (options) {
if (this.modalRef) {
Object.assign(this.modalRef.instance, options); // DANGER: here not limit user's inputs at runtime
}
};
// Create component to ApplicationRef
// Create component to ApplicationRef
/**
* @private
* @return {?}
*/
ModalBuilderForService.prototype.createModal =
// Create component to ApplicationRef
/**
* @private
* @return {?}
*/
function () {
this.overlayRef = this.overlay.create();
this.modalRef = this.overlayRef.attach(new portal.ComponentPortal(NzModalComponent));
};
return ModalBuilderForService;
}());
var NzModalService = /** @class */ (function () {
function NzModalService(overlay, logger, modalControl) {
this.overlay = overlay;
this.logger = logger;
this.modalControl = modalControl;
}
Object.defineProperty(NzModalService.prototype, "openModals", {
// Track of the current close modals (we assume invisible is close this time)
get:
// Track of the current close modals (we assume invisible is close this time)
/**
* @return {?}
*/
function () {
return this.modalControl.openModals;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzModalService.prototype, "afterAllClose", {
get: /**
* @return {?}
*/ function () {
return this.modalControl.afterAllClose.asObservable();
},
enumerable: true,
configurable: true
});
// Closes all of the currently-open dialogs
// Closes all of the currently-open dialogs
/**
* @return {?}
*/
NzModalService.prototype.closeAll =
// Closes all of the currently-open dialogs
/**
* @return {?}
*/
function () {
this.modalControl.closeAll();
};
/**
* @template T
* @param {?=} options
* @return {?}
*/
NzModalService.prototype.create = /**
* @template T
* @param {?=} options
* @return {?}
*/
function (options) {
if (options === void 0) {
options = {};
}
if (typeof options.nzOnCancel !== 'function') {
options.nzOnCancel = ( /**
* @return {?}
*/function () {
}); // Leave a empty function to close this modal by default
}
/** @type {?} */
var modalRef = new ModalBuilderForService(this.overlay, options).getInstance();
return modalRef;
};
/**
* @template T
* @param {?=} options
* @param {?=} confirmType
* @return {?}
*/
NzModalService.prototype.confirm = /**
* @template T
* @param {?=} options
* @param {?=} confirmType
* @return {?}
*/
function (options, confirmType) {
if (options === void 0) {
options = {};
}
if (confirmType === void 0) {
confirmType = 'confirm';
}
if ('nzFooter' in options) {
this.logger.warn("The Confirm-Modal doesn't support \"nzFooter\", this property will be ignored.");
}
if (!('nzWidth' in options)) {
options.nzWidth = 416;
}
if (typeof options.nzOnOk !== 'function') { // NOTE: only support function currently by calling confirm()
options.nzOnOk = ( /**
* @return {?}
*/function () {
}); // Leave a empty function to close this modal by default
}
options.nzModalType = 'confirm';
options.nzClassName = "ant-modal-confirm ant-modal-confirm-" + confirmType + " " + (options.nzClassName || '');
options.nzMaskClosable = false;
return this.create(options);
};
/**
* @template T
* @param {?=} options
* @return {?}
*/
NzModalService.prototype.info = /**
* @template T
* @param {?=} options
* @return {?}
*/
function (options) {
if (options === void 0) {
options = {};
}
return this.simpleConfirm(options, 'info');
};
/**
* @template T
* @param {?=} options
* @return {?}
*/
NzModalService.prototype.success = /**
* @template T
* @param {?=} options
* @return {?}
*/
function (options) {
if (options === void 0) {
options = {};
}
return this.simpleConfirm(options, 'success');
};
/**
* @template T
* @param {?=} options
* @return {?}
*/
NzModalService.prototype.error = /**
* @template T
* @param {?=} options
* @return {?}
*/
function (options) {
if (options === void 0) {
options = {};
}
return this.simpleConfirm(options, 'error');
};
/**
* @template T
* @param {?=} options
* @return {?}
*/
NzModalService.prototype.warning = /**
* @template T
* @param {?=} options
* @return {?}
*/
function (options) {
if (options === void 0) {
options = {};
}
return this.simpleConfirm(options, 'warning');
};
/**
* @private
* @template T
* @param {?=} options
* @param {?=} confirmType
* @return {?}
*/
NzModalService.prototype.simpleConfirm = /**
* @private
* @template T
* @param {?=} options
* @param {?=} confirmType
* @return {?}
*/
function (options, confirmType) {
if (options === void 0) {
options = {};
}
if (!('nzIconType' in options)) {
options.nzIconType = {
'info': 'info-circle',
'success': 'check-circle',
'error': 'close-circle',
'warning': 'exclamation-circle'
}[confirmType];
}
if (!('nzCancelText' in options)) { // Remove the Cancel button if the user not specify a Cancel button
options.nzCancelText = null;
}
return this.confirm(options, confirmType);
};
NzModalService.decorators = [
{ type: i0.Injectable }
];
/** @nocollapse */
NzModalService.ctorParameters = function () {
return [
{ type: i2$2.Overlay },
{ type: LoggerService },
{ type: NzModalControlService }
];
};
return NzModalService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzModalModule = /** @class */ (function () {
function NzModalModule() {
}
NzModalModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, i2$2.OverlayModule, NzI18nModule, NzButtonModule, LoggerModule, NzIconModule, NzNoAnimationModule],
exports: [NzModalComponent],
declarations: [NzModalComponent, CssUnitPipe],
entryComponents: [NzModalComponent],
providers: [NzModalControlService, NzModalService]
},] }
];
return NzModalModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var NZ_NOTIFICATION_DEFAULT_CONFIG = new i0.InjectionToken('NZ_NOTIFICATION_DEFAULT_CONFIG');
/** @type {?} */
var NZ_NOTIFICATION_CONFIG = new i0.InjectionToken('NZ_NOTIFICATION_CONFIG');
/** @type {?} */
var NZ_NOTIFICATION_DEFAULT_CONFIG_PROVIDER = {
provide: NZ_NOTIFICATION_DEFAULT_CONFIG,
useValue: {
nzTop: '24px',
nzBottom: '24px',
nzPlacement: 'topRight',
nzDuration: 4500,
nzMaxStack: 7,
nzPauseOnHover: true,
nzAnimate: true
}
};
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzNotificationContainerComponent = /** @class */ (function (_super) {
__extends(NzNotificationContainerComponent, _super);
function NzNotificationContainerComponent(cdr, defaultConfig, config) {
var _this = _super.call(this, cdr, defaultConfig, config) || this;
/**
* A list of notifications displayed on the screen.
* @override
*/
_this.messages = [];
return _this;
}
/**
* Create a new notification.
* If there's a notification whose `nzKey` is same with `nzKey` in `NzNotificationDataFilled`, replace its content instead of create a new one.
* @override
* @param notification
*/
/**
* Create a new notification.
* If there's a notification whose `nzKey` is same with `nzKey` in `NzNotificationDataFilled`, replace its content instead of create a new one.
* @override
* @param {?} notification
* @return {?}
*/
NzNotificationContainerComponent.prototype.createMessage = /**
* Create a new notification.
* If there's a notification whose `nzKey` is same with `nzKey` in `NzNotificationDataFilled`, replace its content instead of create a new one.
* @override
* @param {?} notification
* @return {?}
*/
function (notification) {
notification.options = this._mergeMessageOptions(notification.options);
notification.onClose = new rxjs.Subject();
/** @type {?} */
var key = notification.options.nzKey;
/** @type {?} */
var notificationWithSameKey = this.messages.find(( /**
* @param {?} msg
* @return {?}
*/function (msg) { return msg.options.nzKey === notification.options.nzKey; }));
if (key && notificationWithSameKey) {
this.replaceNotification(notificationWithSameKey, notification);
}
else {
if (this.messages.length >= this.config.nzMaxStack) {
this.messages.splice(0, 1);
}
this.messages.push(notification);
}
this.cdr.detectChanges();
};
/**
* @private
* @param {?} old
* @param {?} _new
* @return {?}
*/
NzNotificationContainerComponent.prototype.replaceNotification = /**
* @private
* @param {?} old
* @param {?} _new
* @return {?}
*/
function (old, _new) {
old.title = _new.title;
old.content = _new.content;
old.template = _new.template;
old.type = _new.type;
};
NzNotificationContainerComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-notification-container',
preserveWhitespaces: false,
template: "<div\n class=\"ant-notification ant-notification-{{config.nzPlacement}}\"\n [style.top]=\"(config.nzPlacement==='topLeft'||config.nzPlacement=='topRight')? config.nzTop:null\"\n [style.bottom]=\"(config.nzPlacement==='bottomLeft'||config.nzPlacement=='bottomRight')? config.nzBottom:null\"\n [style.right]=\"(config.nzPlacement==='bottomRight'||config.nzPlacement=='topRight')?'0px':null\"\n [style.left]=\"(config.nzPlacement==='topLeft'||config.nzPlacement=='bottomLeft')?'0px':null\">\n <nz-notification *ngFor=\"let message of messages; let i = index\" [nzMessage]=\"message\" [nzIndex]=\"i\"></nz-notification>\n</div>"
}] }
];
/** @nocollapse */
NzNotificationContainerComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_NOTIFICATION_DEFAULT_CONFIG,] }] },
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [NZ_NOTIFICATION_CONFIG,] }] }
];
};
return NzNotificationContainerComponent;
}(NzMessageContainerComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var notificationMotion = animations$1.trigger('notificationMotion', [
animations$1.state('enterRight', animations$1.style({ opacity: 1, transform: 'translateX(0)' })),
animations$1.transition('* => enterRight', [
animations$1.style({ opacity: 0, transform: 'translateX(5%)' }),
animations$1.animate('100ms linear')
]),
animations$1.state('enterLeft', animations$1.style({ opacity: 1, transform: 'translateX(0)' })),
animations$1.transition('* => enterLeft', [
animations$1.style({ opacity: 0, transform: 'translateX(-5%)' }),
animations$1.animate('100ms linear')
]),
animations$1.state('leave', animations$1.style({
opacity: 0,
transform: 'scaleY(0.8)',
transformOrigin: '0% 0%'
})),
animations$1.transition('* => leave', [
animations$1.style({
opacity: 1,
transform: 'scaleY(1)',
transformOrigin: '0% 0%'
}),
animations$1.animate('100ms linear')
])
]);
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzNotificationComponent = /** @class */ (function (_super) {
__extends(NzNotificationComponent, _super);
function NzNotificationComponent(container, cdr) {
var _this = _super.call(this, container, cdr) || this;
_this.container = container;
_this.cdr = cdr;
return _this;
}
/**
* @return {?}
*/
NzNotificationComponent.prototype.close = /**
* @return {?}
*/
function () {
this._destroy(true);
};
Object.defineProperty(NzNotificationComponent.prototype, "state", {
get: /**
* @return {?}
*/ function () {
if (this.nzMessage.state === 'enter') {
if ((this.container.config.nzPlacement === 'topLeft') || (this.container.config.nzPlacement === 'bottomLeft')) {
return 'enterLeft';
}
else {
return 'enterRight';
}
}
else {
return this.nzMessage.state;
}
},
enumerable: true,
configurable: true
});
NzNotificationComponent.decorators = [
{ type: i0.Component, args: [{
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-notification',
preserveWhitespaces: false,
animations: [notificationMotion],
template: "<div class=\"ant-notification-notice ant-notification-notice-closable\"\n [ngStyle]=\"nzMessage.options.nzStyle\"\n [ngClass]=\"nzMessage.options.nzClass\"\n [@notificationMotion]=\"state\"\n (mouseenter)=\"onEnter()\"\n (mouseleave)=\"onLeave()\">\n <div *ngIf=\"!nzMessage.template\" class=\"ant-notification-notice-content\">\n <div class=\"ant-notification-notice-content\" [ngClass]=\"{ 'ant-notification-notice-with-icon': nzMessage.type !== 'blank' }\">\n <div [class.ant-notification-notice-with-icon]=\"nzMessage.type !== 'blank'\">\n <ng-container [ngSwitch]=\"nzMessage.type\">\n <i *ngSwitchCase=\"'success'\" nz-icon type=\"check-circle\" class=\"ant-notification-notice-icon ant-notification-notice-icon-success\"></i>\n <i *ngSwitchCase=\"'info'\" nz-icon type=\"info-circle\" class=\"ant-notification-notice-icon ant-notification-notice-icon-info\"></i>\n <i *ngSwitchCase=\"'warning'\" nz-icon type=\"exclamation-circle\" class=\"ant-notification-notice-icon ant-notification-notice-icon-warning\"></i>\n <i *ngSwitchCase=\"'error'\" nz-icon type=\"close-circle\" class=\"ant-notification-notice-icon ant-notification-notice-icon-error\"></i>\n </ng-container>\n <div class=\"ant-notification-notice-message\" [innerHTML]=\"nzMessage.title\"></div>\n <div class=\"ant-notification-notice-description\" [innerHTML]=\"nzMessage.content\"></div>\n </div>\n </div>\n </div>\n <ng-template\n [ngIf]=\"nzMessage.template\"\n [ngTemplateOutlet]=\"nzMessage.template\"\n [ngTemplateOutletContext]=\"{ $implicit: this, data: nzMessage.options?.nzData }\">\n </ng-template>\n <a tabindex=\"0\" class=\"ant-notification-notice-close\" (click)=\"close()\">\n <span class=\"ant-notification-notice-close-x\">\n <i nz-icon type=\"close\" class=\"ant-notification-close-icon\"></i>\n </span>\n </a>\n</div>"
}] }
];
/** @nocollapse */
NzNotificationComponent.ctorParameters = function () {
return [
{ type: NzNotificationContainerComponent },
{ type: i0.ChangeDetectorRef }
];
};
NzNotificationComponent.propDecorators = {
nzMessage: [{ type: i0.Input }]
};
return NzNotificationComponent;
}(NzMessageComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzNotificationService$$1 = /** @class */ (function (_super) {
__extends(NzNotificationService$$1, _super);
function NzNotificationService$$1(overlay, injector, cfr, appRef) {
return _super.call(this, overlay, NzNotificationContainerComponent, injector, cfr, appRef, 'notification-') || this;
}
// Shortcut methods
// Shortcut methods
/**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzNotificationService$$1.prototype.success =
// Shortcut methods
/**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (title, content, options) {
return ( /** @type {?} */(this.createMessage({ type: 'success', title: title, content: content }, options)));
};
/**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzNotificationService$$1.prototype.error = /**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (title, content, options) {
return ( /** @type {?} */(this.createMessage({ type: 'error', title: title, content: content }, options)));
};
/**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzNotificationService$$1.prototype.info = /**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (title, content, options) {
return ( /** @type {?} */(this.createMessage({ type: 'info', title: title, content: content }, options)));
};
/**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzNotificationService$$1.prototype.warning = /**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (title, content, options) {
return ( /** @type {?} */(this.createMessage({ type: 'warning', title: title, content: content }, options)));
};
/**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzNotificationService$$1.prototype.blank = /**
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (title, content, options) {
return ( /** @type {?} */(this.createMessage({ type: 'blank', title: title, content: content }, options)));
};
/**
* @param {?} type
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
NzNotificationService$$1.prototype.create = /**
* @param {?} type
* @param {?} title
* @param {?} content
* @param {?=} options
* @return {?}
*/
function (type, title, content, options) {
return ( /** @type {?} */(this.createMessage({ type: type, title: title, content: content }, options)));
};
// For content with template
// For content with template
/**
* @param {?} template
* @param {?=} options
* @return {?}
*/
NzNotificationService$$1.prototype.template =
// For content with template
/**
* @param {?} template
* @param {?=} options
* @return {?}
*/
function (template, options) {
return ( /** @type {?} */(this.createMessage({ template: template }, options)));
};
NzNotificationService$$1.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
NzNotificationService$$1.ctorParameters = function () {
return [
{ type: i2$2.Overlay },
{ type: i0.Injector },
{ type: i0.ComponentFactoryResolver },
{ type: i0.ApplicationRef }
];
};
/** @nocollapse */ NzNotificationService$$1.ngInjectableDef = i0.defineInjectable({ factory: function NzNotificationService_Factory() { return new NzNotificationService$$1(i0.inject(i2$2.Overlay), i0.inject(i0.INJECTOR), i0.inject(i0.ComponentFactoryResolver), i0.inject(i0.ApplicationRef)); }, token: NzNotificationService$$1, providedIn: "root" });
return NzNotificationService$$1;
}(NzMessageBaseService$$1));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzNotificationModule = /** @class */ (function () {
function NzNotificationModule() {
}
NzNotificationModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, i2$2.OverlayModule, NzIconModule],
declarations: [NzNotificationComponent, NzNotificationContainerComponent],
providers: [NZ_NOTIFICATION_DEFAULT_CONFIG_PROVIDER, NzNotificationService$$1],
entryComponents: [NzNotificationContainerComponent]
},] }
];
return NzNotificationModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPaginationComponent = /** @class */ (function () {
function NzPaginationComponent(i18n, cdr) {
this.i18n = i18n;
this.cdr = cdr;
// tslint:disable-next-line:no-any
this.locale = {};
this.firstIndex = 1;
this.pages = [];
this.$destroy = new rxjs.Subject();
this.nzPageSizeChange = new i0.EventEmitter();
this.nzPageIndexChange = new i0.EventEmitter();
this.nzInTable = false;
this.nzSize = 'default';
this.nzPageSizeOptions = [10, 20, 30, 40];
this.nzShowSizeChanger = false;
this.nzHideOnSinglePage = false;
this.nzShowQuickJumper = false;
this.nzSimple = false;
this.nzTotal = 0;
this.nzPageIndex = 1;
this.nzPageSize = 10;
}
/**
* @param {?} value
* @return {?}
*/
NzPaginationComponent.prototype.validatePageIndex = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (value > this.lastIndex) {
return this.lastIndex;
}
else if (value < this.firstIndex) {
return this.firstIndex;
}
else {
return value;
}
};
/**
* @param {?} page
* @return {?}
*/
NzPaginationComponent.prototype.updatePageIndexValue = /**
* @param {?} page
* @return {?}
*/
function (page) {
this.nzPageIndex = page;
this.nzPageIndexChange.emit(this.nzPageIndex);
this.buildIndexes();
};
/**
* @param {?} value
* @return {?}
*/
NzPaginationComponent.prototype.isPageIndexValid = /**
* @param {?} value
* @return {?}
*/
function (value) {
return this.validatePageIndex(value) === value;
};
/**
* @param {?} index
* @return {?}
*/
NzPaginationComponent.prototype.jumpPage = /**
* @param {?} index
* @return {?}
*/
function (index) {
if (index !== this.nzPageIndex) {
/** @type {?} */
var pageIndex = this.validatePageIndex(index);
if (pageIndex !== this.nzPageIndex) {
this.updatePageIndexValue(pageIndex);
}
}
};
/**
* @param {?} diff
* @return {?}
*/
NzPaginationComponent.prototype.jumpDiff = /**
* @param {?} diff
* @return {?}
*/
function (diff) {
this.jumpPage(this.nzPageIndex + diff);
};
/**
* @param {?} $event
* @return {?}
*/
NzPaginationComponent.prototype.onPageSizeChange = /**
* @param {?} $event
* @return {?}
*/
function ($event) {
this.nzPageSize = $event;
this.nzPageSizeChange.emit($event);
this.buildIndexes();
if (this.nzPageIndex > this.lastIndex) {
this.updatePageIndexValue(this.lastIndex);
}
};
/**
* @param {?} _
* @param {?} input
* @param {?} clearInputValue
* @return {?}
*/
NzPaginationComponent.prototype.handleKeyDown = /**
* @param {?} _
* @param {?} input
* @param {?} clearInputValue
* @return {?}
*/
function (_, input, clearInputValue) {
/** @type {?} */
var target = input;
/** @type {?} */
var page = toNumber(target.value, this.nzPageIndex);
if (isInteger(page) && this.isPageIndexValid(page) && page !== this.nzPageIndex) {
this.updatePageIndexValue(page);
}
if (clearInputValue) {
target.value = null;
}
else {
target.value = "" + this.nzPageIndex;
}
};
/** generate indexes list */
/**
* generate indexes list
* @return {?}
*/
NzPaginationComponent.prototype.buildIndexes = /**
* generate indexes list
* @return {?}
*/
function () {
/** @type {?} */
var pages = [];
if (this.lastIndex <= 9) {
for (var i = 2; i <= this.lastIndex - 1; i++) {
pages.push(i);
}
}
else {
/** @type {?} */
var current = +this.nzPageIndex;
/** @type {?} */
var left = Math.max(2, current - 2);
/** @type {?} */
var right = Math.min(current + 2, this.lastIndex - 1);
if (current - 1 <= 2) {
right = 5;
}
if (this.lastIndex - current <= 2) {
left = this.lastIndex - 4;
}
for (var i = left; i <= right; i++) {
pages.push(i);
}
}
this.pages = pages;
this.cdr.markForCheck();
};
Object.defineProperty(NzPaginationComponent.prototype, "lastIndex", {
get: /**
* @return {?}
*/ function () {
return Math.ceil(this.nzTotal / this.nzPageSize);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzPaginationComponent.prototype, "isLastIndex", {
get: /**
* @return {?}
*/ function () {
return this.nzPageIndex === this.lastIndex;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzPaginationComponent.prototype, "isFirstIndex", {
get: /**
* @return {?}
*/ function () {
return this.nzPageIndex === this.firstIndex;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzPaginationComponent.prototype, "ranges", {
get: /**
* @return {?}
*/ function () {
return [(this.nzPageIndex - 1) * this.nzPageSize + 1, Math.min(this.nzPageIndex * this.nzPageSize, this.nzTotal)];
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzPaginationComponent.prototype, "showAddOption", {
get: /**
* @return {?}
*/ function () {
return this.nzPageSizeOptions.indexOf(this.nzPageSize) === -1;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzPaginationComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.i18n.localeChange.pipe(operators.takeUntil(this.$destroy)).subscribe(( /**
* @return {?}
*/function () {
_this.locale = _this.i18n.getLocaleData('Pagination');
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzPaginationComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.$destroy.next();
this.$destroy.complete();
};
/**
* @param {?} changes
* @return {?}
*/
NzPaginationComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzTotal || changes.nzPageSize || changes.nzPageIndex) {
this.buildIndexes();
}
};
NzPaginationComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-pagination',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-template #renderItemTemplate let-type let-page=\"page\">\n <a class=\"ant-pagination-item-link\" *ngIf=\"type==='pre'\"><i nz-icon type=\"left\"></i></a>\n <a class=\"ant-pagination-item-link\" *ngIf=\"type==='next'\"><i nz-icon type=\"right\"></i></a>\n <a *ngIf=\"type=='page'\">{{ page }}</a>\n</ng-template>\n<ng-container *ngIf=\"nzHideOnSinglePage && (nzTotal > nzPageSize) || !nzHideOnSinglePage\">\n <ul class=\"ant-pagination\"\n [class.ant-table-pagination]=\"nzInTable\"\n [class.ant-pagination-simple]=\"nzSimple\"\n [class.mini]=\"(nzSize === 'small') && !nzSimple\">\n <ng-container *ngIf=\"nzSimple; else normalTemplate\">\n <li class=\"ant-pagination-prev\"\n [attr.title]=\"locale.prev_page\"\n [class.ant-pagination-disabled]=\"isFirstIndex\"\n (click)=\"jumpDiff(-1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'pre'}\"></ng-template>\n </li>\n <li [attr.title]=\"nzPageIndex+'/'+lastIndex\" class=\"ant-pagination-simple-pager\">\n <input #simplePagerInput [value]=\"nzPageIndex\" (keydown.enter)=\"handleKeyDown($event,simplePagerInput,false)\" size=\"3\">\n <span class=\"ant-pagination-slash\">\uFF0F</span>\n {{ lastIndex }}\n </li>\n <li class=\"ant-pagination-next\"\n [attr.title]=\"locale.next_page\"\n [class.ant-pagination-disabled]=\"isLastIndex\"\n (click)=\"jumpDiff(1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'next'}\"></ng-template>\n </li>\n </ng-container>\n <ng-template #normalTemplate>\n <li class=\"ant-pagination-total-text\" *ngIf=\"nzShowTotal\">\n <ng-template [ngTemplateOutlet]=\"nzShowTotal\" [ngTemplateOutletContext]=\"{ $implicit: nzTotal,range:ranges }\"></ng-template>\n </li>\n <li class=\"ant-pagination-prev\"\n [attr.title]=\"locale.prev_page\"\n [class.ant-pagination-disabled]=\"isFirstIndex\"\n (click)=\"jumpDiff(-1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'pre'}\"></ng-template>\n </li>\n <li class=\"ant-pagination-item\"\n [attr.title]=\"firstIndex\"\n [class.ant-pagination-item-active]=\"isFirstIndex\"\n (click)=\"jumpPage(firstIndex)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'page',page: firstIndex }\"></ng-template>\n </li>\n <li class=\"ant-pagination-jump-prev\"\n *ngIf=\"(lastIndex > 9) && (nzPageIndex - 3 > firstIndex)\"\n [attr.title]=\"locale.prev_5\"\n (click)=\"jumpDiff(-5)\">\n <a class=\"ant-pagination-item-link\">\n <div class=\"ant-pagination-item-container\">\n <i nz-icon type=\"double-left\" class=\"ant-pagination-item-link-icon\"></i>\n <span class=\"ant-pagination-item-ellipsis\">\u2022\u2022\u2022</span>\n </div>\n </a>\n </li>\n <li class=\"ant-pagination-item\"\n *ngFor=\"let page of pages\"\n [attr.title]=\"page\"\n [class.ant-pagination-item-active]=\"nzPageIndex === page\"\n (click)=\"jumpPage(page)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'page',page: page }\"></ng-template>\n </li>\n <li class=\"ant-pagination-jump-next ant-pagination-item-link-icon\"\n [attr.title]=\"locale.next_5\"\n (click)=\"jumpDiff(5)\"\n *ngIf=\"(lastIndex > 9) && (nzPageIndex + 3 < lastIndex)\">\n <a class=\"ant-pagination-item-link\">\n <div class=\"ant-pagination-item-container\">\n <i nz-icon type=\"double-right\" class=\"ant-pagination-item-link-icon\"></i>\n <span class=\"ant-pagination-item-ellipsis\">\u2022\u2022\u2022</span>\n </div>\n </a>\n </li>\n <li class=\"ant-pagination-item\"\n [attr.title]=\"lastIndex\"\n (click)=\"jumpPage(lastIndex)\"\n *ngIf=\"(lastIndex > 0) && (lastIndex !== firstIndex)\"\n [class.ant-pagination-item-active]=\"isLastIndex\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'page',page: lastIndex }\"></ng-template>\n </li>\n <li class=\"ant-pagination-next\"\n [title]=\"locale.next_page\"\n [class.ant-pagination-disabled]=\"isLastIndex\"\n (click)=\"jumpDiff(1)\">\n <ng-template [ngTemplateOutlet]=\"nzItemRender\" [ngTemplateOutletContext]=\"{ $implicit: 'next'}\"></ng-template>\n </li>\n <div class=\"ant-pagination-options\" *ngIf=\"nzShowQuickJumper || nzShowSizeChanger\">\n <nz-select class=\"ant-pagination-options-size-changer\"\n *ngIf=\"nzShowSizeChanger\"\n [nzSize]=\"nzSize\"\n [ngModel]=\"nzPageSize\"\n (ngModelChange)=\"onPageSizeChange($event)\">\n <nz-option *ngFor=\"let option of nzPageSizeOptions\"\n [nzLabel]=\"option + locale.items_per_page\"\n [nzValue]=\"option\">\n </nz-option>\n <nz-option *ngIf=\"showAddOption\"\n [nzLabel]=\"nzPageSize + locale.items_per_page\"\n [nzValue]=\"nzPageSize\">\n </nz-option>\n </nz-select>\n <div class=\"ant-pagination-options-quick-jumper\" *ngIf=\"nzShowQuickJumper\">\n {{ locale.jump_to }}\n <input #quickJumperInput (keydown.enter)=\"handleKeyDown($event,quickJumperInput,true)\">\n {{ locale.page }}\n </div>\n </div>\n </ng-template>\n </ul>\n</ng-container>"
}] }
];
/** @nocollapse */
NzPaginationComponent.ctorParameters = function () {
return [
{ type: NzI18nService$$1 },
{ type: i0.ChangeDetectorRef }
];
};
NzPaginationComponent.propDecorators = {
nzPageSizeChange: [{ type: i0.Output }],
nzPageIndexChange: [{ type: i0.Output }],
nzShowTotal: [{ type: i0.Input }],
nzInTable: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzPageSizeOptions: [{ type: i0.Input }],
nzItemRender: [{ type: i0.Input }, { type: i0.ViewChild, args: ['renderItemTemplate',] }],
nzShowSizeChanger: [{ type: i0.Input }],
nzHideOnSinglePage: [{ type: i0.Input }],
nzShowQuickJumper: [{ type: i0.Input }],
nzSimple: [{ type: i0.Input }],
nzTotal: [{ type: i0.Input }],
nzPageIndex: [{ type: i0.Input }],
nzPageSize: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzPaginationComponent.prototype, "nzShowSizeChanger", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzPaginationComponent.prototype, "nzHideOnSinglePage", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzPaginationComponent.prototype, "nzShowQuickJumper", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzPaginationComponent.prototype, "nzSimple", void 0);
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzPaginationComponent.prototype, "nzTotal", void 0);
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzPaginationComponent.prototype, "nzPageIndex", void 0);
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzPaginationComponent.prototype, "nzPageSize", void 0);
return NzPaginationComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPaginationModule = /** @class */ (function () {
function NzPaginationModule() {
}
NzPaginationModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzPaginationComponent],
exports: [NzPaginationComponent],
imports: [i2$1.CommonModule, forms.FormsModule, NzSelectModule, NzI18nModule, NzIconModule]
},] }
];
return NzPaginationModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzToolTipComponent = /** @class */ (function () {
function NzToolTipComponent(cdr, noAnimation) {
this.cdr = cdr;
this.noAnimation = noAnimation;
this._hasBackdrop = false;
this._prefix = 'ant-tooltip-placement';
this._positions = __spread(DEFAULT_TOOLTIP_POSITIONS);
this._classMap = {};
this._placement = 'top';
this._trigger = 'hover';
this.visibleSource = new rxjs.BehaviorSubject(false);
this.visible$ = this.visibleSource.asObservable();
this.nzOverlayClassName = '';
this.nzOverlayStyle = {};
this.nzMouseEnterDelay = 0.15; // second
// second
this.nzMouseLeaveDelay = 0.1; // second
this.nzVisibleChange = new i0.EventEmitter();
}
Object.defineProperty(NzToolTipComponent.prototype, "nzVisible", {
get: /**
* @return {?}
*/ function () {
return this.visibleSource.value;
},
set:
// second
/**
* @param {?} value
* @return {?}
*/
function (value) {
/** @type {?} */
var visible = toBoolean(value);
if (this.visibleSource.value !== visible) {
this.visibleSource.next(visible);
this.nzVisibleChange.emit(visible);
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzToolTipComponent.prototype, "nzTrigger", {
get: /**
* @return {?}
*/ function () {
return this._trigger;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._trigger = value;
this._hasBackdrop = this._trigger === 'click';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzToolTipComponent.prototype, "nzPlacement", {
get: /**
* @return {?}
*/ function () {
return this._placement;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value !== this._placement) {
this._placement = value;
this._positions = __spread([POSITION_MAP[this.nzPlacement]], this._positions);
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzToolTipComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
var _this = this;
Promise.resolve().then(( /**
* @return {?}
*/function () {
_this.updatePosition();
}));
};
// Manually force updating current overlay's position
// Manually force updating current overlay's position
/**
* @return {?}
*/
NzToolTipComponent.prototype.updatePosition =
// Manually force updating current overlay's position
/**
* @return {?}
*/
function () {
if (this.overlay && this.overlay.overlayRef) {
this.overlay.overlayRef.updatePosition();
}
};
/**
* @param {?} position
* @return {?}
*/
NzToolTipComponent.prototype.onPositionChange = /**
* @param {?} position
* @return {?}
*/
function (position) {
this.nzPlacement = getPlacementName(position);
this.setClassMap();
this.cdr.detectChanges(); // TODO: performance?
};
/**
* @return {?}
*/
NzToolTipComponent.prototype.show = /**
* @return {?}
*/
function () {
if (!this.isContentEmpty()) {
this.nzVisible = true;
}
};
/**
* @return {?}
*/
NzToolTipComponent.prototype.hide = /**
* @return {?}
*/
function () {
this.nzVisible = false;
};
/**
* @param {?} e
* @return {?}
*/
NzToolTipComponent.prototype._afterVisibilityAnimation = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (e.toState === 'false' && !this.nzVisible) {
this.nzVisibleChange.emit(false);
}
if (e.toState === 'true' && this.nzVisible) {
this.nzVisibleChange.emit(true);
}
};
/**
* @return {?}
*/
NzToolTipComponent.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
this._classMap = (_a = {},
_a[this.nzOverlayClassName] = true,
_a[this._prefix + "-" + this._placement] = true,
_a);
};
/**
* @param {?} origin
* @return {?}
*/
NzToolTipComponent.prototype.setOverlayOrigin = /**
* @param {?} origin
* @return {?}
*/
function (origin) {
this.overlayOrigin = origin;
};
/**
* @protected
* @return {?}
*/
NzToolTipComponent.prototype.isContentEmpty = /**
* @protected
* @return {?}
*/
function () {
return this.nzTitle instanceof i0.TemplateRef ? false : (this.nzTitle === '' || !isNotNil(this.nzTitle));
};
NzToolTipComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-tooltip',
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
animations: [zoomBigMotion],
template: "<ng-content></ng-content>\n<ng-template\n #overlay=\"cdkConnectedOverlay\"\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"visible$ | async\"\n [cdkConnectedOverlayHasBackdrop]=\"_hasBackdrop\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"hide()\"\n (detach)=\"hide()\"\n (positionChange)=\"onPositionChange($event)\">\n <div\n class=\"ant-tooltip\"\n [ngClass]=\"_classMap\"\n [ngStyle]=\"nzOverlayStyle\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [@zoomBigMotion]=\"'active'\"\n (@zoomBigMotion.done)=\"_afterVisibilityAnimation($event)\">\n <div class=\"ant-tooltip-content\">\n <div class=\"ant-tooltip-arrow\"></div>\n <div class=\"ant-tooltip-inner\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n </div>\n </div>\n</ng-template>",
preserveWhitespaces: false,
styles: ["\n .ant-tooltip {\n position: relative;\n }\n "]
}] }
];
/** @nocollapse */
NzToolTipComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzToolTipComponent.propDecorators = {
overlay: [{ type: i0.ViewChild, args: ['overlay',] }],
nzTitle: [{ type: i0.Input }, { type: i0.ContentChild, args: ['nzTemplate',] }],
nzOverlayClassName: [{ type: i0.Input }],
nzOverlayStyle: [{ type: i0.Input }],
nzMouseEnterDelay: [{ type: i0.Input }],
nzMouseLeaveDelay: [{ type: i0.Input }],
nzVisible: [{ type: i0.Input }],
nzTrigger: [{ type: i0.Input }],
nzPlacement: [{ type: i0.Input }],
nzVisibleChange: [{ type: i0.Output }]
};
return NzToolTipComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPopconfirmComponent = /** @class */ (function (_super) {
__extends(NzPopconfirmComponent, _super);
function NzPopconfirmComponent(cdr, noAnimation) {
var _this = _super.call(this, cdr, noAnimation) || this;
_this.noAnimation = noAnimation;
_this._prefix = 'ant-popover-placement';
_this._trigger = 'click';
_this._hasBackdrop = true;
_this.nzOkType = 'primary';
_this.nzCondition = false;
_this.nzOnCancel = new i0.EventEmitter();
_this.nzOnConfirm = new i0.EventEmitter();
return _this;
}
/**
* @return {?}
*/
NzPopconfirmComponent.prototype.show = /**
* @return {?}
*/
function () {
if (!this.nzCondition) {
this.nzVisible = true;
}
else {
this.onConfirm();
}
};
/**
* @return {?}
*/
NzPopconfirmComponent.prototype.onCancel = /**
* @return {?}
*/
function () {
this.nzOnCancel.emit();
this.nzVisible = false;
};
/**
* @return {?}
*/
NzPopconfirmComponent.prototype.onConfirm = /**
* @return {?}
*/
function () {
this.nzOnConfirm.emit();
this.nzVisible = false;
};
NzPopconfirmComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-popconfirm',
preserveWhitespaces: false,
animations: [zoomBigMotion],
template: "<ng-content></ng-content>\n<ng-template\n #overlay=\"cdkConnectedOverlay\"\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayHasBackdrop]=\"_hasBackdrop\"\n (backdropClick)=\"hide()\"\n (detach)=\"hide()\"\n (positionChange)=\"onPositionChange($event)\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayOpen]=\"visible$ | async\">\n <div class=\"ant-popover\"\n [ngClass]=\"_classMap\"\n [ngStyle]=\"nzOverlayStyle\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [@zoomBigMotion]=\"'active'\"\n (@zoomBigMotion.done)=\"_afterVisibilityAnimation($event)\">\n <div class=\"ant-popover-content\">\n <div class=\"ant-popover-arrow\"></div>\n <div class=\"ant-popover-inner\">\n <div>\n <div class=\"ant-popover-inner-content\">\n <div class=\"ant-popover-message\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzIcon\">\n <i nz-icon [nzType]=\"nzIcon || 'exclamation-circle'\" nzTheme=\"fill\"></i>\n </ng-container>\n <div class=\"ant-popover-message-title\">{{ nzTitle }}</div>\n </ng-container>\n </div>\n <div class=\"ant-popover-buttons\">\n <button nz-button [nzSize]=\"'small'\" (click)=\"onCancel()\">\n <ng-container *ngIf=\"nzCancelText\">{{ nzCancelText }}</ng-container>\n <ng-container *ngIf=\"!nzCancelText\">{{ 'Modal.cancelText' | nzI18n }}</ng-container>\n </button>\n <button nz-button [nzSize]=\"'small'\" [nzType]=\"nzOkType\" (click)=\"onConfirm()\">\n <ng-container *ngIf=\"nzOkText\">{{ nzOkText }}</ng-container>\n <ng-container *ngIf=\"!nzOkText\">{{ 'Modal.okText' | nzI18n }}</ng-container>\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</ng-template>",
styles: ["\n .ant-popover {\n position: relative;\n }\n "]
}] }
];
/** @nocollapse */
NzPopconfirmComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzPopconfirmComponent.propDecorators = {
nzOkText: [{ type: i0.Input }],
nzOkType: [{ type: i0.Input }],
nzCancelText: [{ type: i0.Input }],
nzCondition: [{ type: i0.Input }],
nzIcon: [{ type: i0.Input }],
nzOnCancel: [{ type: i0.Output }],
nzOnConfirm: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzPopconfirmComponent.prototype, "nzCondition", void 0);
return NzPopconfirmComponent;
}(NzToolTipComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTooltipDirective = /** @class */ (function () {
function NzTooltipDirective(elementRef, hostView, resolver, renderer, tooltip, noAnimation) {
this.elementRef = elementRef;
this.hostView = hostView;
this.resolver = resolver;
this.renderer = renderer;
this.tooltip = tooltip;
this.noAnimation = noAnimation;
// [NOTE] Here hard coded, and nzTitle used only under NzTooltipDirective currently.
this.isTooltipOpen = false;
this.isDynamicTooltip = false; // Indicate whether current tooltip is dynamic created
this.factory = this.resolver.resolveComponentFactory(NzToolTipComponent);
/**
* Names of properties that should be proxy to child component.
*/
this.needProxyProperties = [
'nzTitle',
'nzContent',
'nzOverlayClassName',
'nzOverlayStyle',
'nzMouseEnterDelay',
'nzMouseLeaveDelay',
'nzVisible',
'nzTrigger',
'nzPlacement'
];
this.subs_ = new rxjs.Subscription();
this.nzVisibleChange = new i0.EventEmitter();
}
Object.defineProperty(NzTooltipDirective.prototype, "setTitle", {
set: /**
* @param {?} title
* @return {?}
*/ function (title) {
this.nzTitle = title;
},
enumerable: true,
configurable: true
});
/**
* @param {?} changes
* @return {?}
*/
NzTooltipDirective.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
this.updateProxies(changes);
};
/**
* @return {?}
*/
NzTooltipDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
// Support faster tooltip mode: <a nz-tooltip="xxx"></a>. [NOTE] Used only under NzTooltipDirective currently.
if (!this.tooltip) {
/** @type {?} */
var tooltipComponent = this.hostView.createComponent(this.factory);
this.tooltip = tooltipComponent.instance;
this.tooltip.noAnimation = this.noAnimation;
// Remove element when use directive https://github.com/NG-ZORRO/ng-zorro-antd/issues/1967
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), tooltipComponent.location.nativeElement);
this.isDynamicTooltip = true;
this.needProxyProperties.forEach(( /**
* @param {?} property
* @return {?}
*/function (property) { return _this.updateCompValue(property, _this[property]); }));
/** @type {?} */
var visible_ = this.tooltip.nzVisibleChange.pipe(operators.distinctUntilChanged()).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.visible = data;
_this.nzVisibleChange.emit(data);
}));
this.subs_.add(visible_);
}
this.tooltip.setOverlayOrigin(this);
};
/**
* @return {?}
*/
NzTooltipDirective.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
if (this.tooltip.nzTrigger === 'hover') {
/** @type {?} */
var overlayElement_1;
this.renderer.listen(this.elementRef.nativeElement, 'mouseenter', ( /**
* @return {?}
*/function () { return _this.delayEnterLeave(true, true, _this.tooltip.nzMouseEnterDelay); }));
this.renderer.listen(this.elementRef.nativeElement, 'mouseleave', ( /**
* @return {?}
*/function () {
_this.delayEnterLeave(true, false, _this.tooltip.nzMouseLeaveDelay);
if (_this.tooltip.overlay.overlayRef && !overlayElement_1) { // NOTE: we bind events under "mouseleave" due to the overlayRef is only created after the overlay was completely shown up
overlayElement_1 = _this.tooltip.overlay.overlayRef.overlayElement;
_this.renderer.listen(overlayElement_1, 'mouseenter', ( /**
* @return {?}
*/function () { return _this.delayEnterLeave(false, true); }));
_this.renderer.listen(overlayElement_1, 'mouseleave', ( /**
* @return {?}
*/function () { return _this.delayEnterLeave(false, false); }));
}
}));
}
else if (this.tooltip.nzTrigger === 'focus') {
this.renderer.listen(this.elementRef.nativeElement, 'focus', ( /**
* @return {?}
*/function () { return _this.show(); }));
this.renderer.listen(this.elementRef.nativeElement, 'blur', ( /**
* @return {?}
*/function () { return _this.hide(); }));
}
else if (this.tooltip.nzTrigger === 'click') {
this.renderer.listen(this.elementRef.nativeElement, 'click', ( /**
* @param {?} e
* @return {?}
*/function (e) {
e.preventDefault();
_this.show();
}));
}
};
/**
* @return {?}
*/
NzTooltipDirective.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.subs_.unsubscribe();
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @protected
* @param {?} key
* @param {?} value
* @return {?}
*/
NzTooltipDirective.prototype.updateCompValue =
// tslint:disable-next-line:no-any
/**
* @protected
* @param {?} key
* @param {?} value
* @return {?}
*/
function (key, value) {
if (this.isDynamicTooltip && isNotNil(value)) {
this.tooltip[key] = value;
}
};
/**
* @private
* @return {?}
*/
NzTooltipDirective.prototype.show = /**
* @private
* @return {?}
*/
function () {
this.tooltip.show();
this.isTooltipOpen = true;
};
/**
* @private
* @return {?}
*/
NzTooltipDirective.prototype.hide = /**
* @private
* @return {?}
*/
function () {
this.tooltip.hide();
this.isTooltipOpen = false;
};
/**
* @private
* @param {?} isOrigin
* @param {?} isEnter
* @param {?=} delay
* @return {?}
*/
NzTooltipDirective.prototype.delayEnterLeave = /**
* @private
* @param {?} isOrigin
* @param {?} isEnter
* @param {?=} delay
* @return {?}
*/
function (isOrigin, isEnter, delay) {
var _this = this;
if (delay === void 0) {
delay = -1;
}
if (this.delayTimer) { // Clear timer during the delay time
clearTimeout(this.delayTimer);
this.delayTimer = null;
}
else if (delay > 0) {
this.delayTimer = setTimeout(( /**
* @return {?}
*/function () {
_this.delayTimer = null;
isEnter ? _this.show() : _this.hide();
}), delay * 1000);
}
else {
isEnter && isOrigin ? this.show() : this.hide(); // [Compatible] The "isOrigin" is used due to the tooltip will not hide immediately (may caused by the fade-out animation)
}
};
/**
* Set inputs of child components when this component's inputs change.
* @param changes
*/
/**
* Set inputs of child components when this component's inputs change.
* @private
* @param {?} changes
* @return {?}
*/
NzTooltipDirective.prototype.updateProxies = /**
* Set inputs of child components when this component's inputs change.
* @private
* @param {?} changes
* @return {?}
*/
function (changes) {
var _this = this;
if (this.tooltip) {
Object.keys(changes).forEach(( /**
* @param {?} key
* @return {?}
*/function (key) {
/** @type {?} */
var change = changes[key];
if (change) {
_this.updateCompValue(key, change.currentValue);
}
}));
if (changes.setTitle) {
this.nzTitle = changes.setTitle.currentValue;
this.updateCompValue('nzTitle', changes.setTitle.currentValue);
}
}
};
NzTooltipDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-tooltip]',
host: {
'[class.ant-tooltip-open]': 'isTooltipOpen'
}
},] }
];
/** @nocollapse */
NzTooltipDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.ViewContainerRef },
{ type: i0.ComponentFactoryResolver },
{ type: i0.Renderer2 },
{ type: NzToolTipComponent, decorators: [{ type: i0.Optional }] },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzTooltipDirective.propDecorators = {
nzVisibleChange: [{ type: i0.Output }],
nzTitle: [{ type: i0.Input, args: ['nz-tooltip',] }],
setTitle: [{ type: i0.Input, args: ['nzTitle',] }],
nzContent: [{ type: i0.Input }],
nzMouseEnterDelay: [{ type: i0.Input }],
nzMouseLeaveDelay: [{ type: i0.Input }],
nzOverlayClassName: [{ type: i0.Input }],
nzOverlayStyle: [{ type: i0.Input }],
nzTrigger: [{ type: i0.Input }],
nzVisible: [{ type: i0.Input }],
nzPlacement: [{ type: i0.Input }]
};
return NzTooltipDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPopconfirmDirective = /** @class */ (function (_super) {
__extends(NzPopconfirmDirective, _super);
function NzPopconfirmDirective(elementRef, hostView, resolver, renderer, tooltip, noAnimation) {
var _this = _super.call(this, elementRef, hostView, resolver, renderer, tooltip, noAnimation) || this;
_this.noAnimation = noAnimation;
_this.factory = _this.resolver.resolveComponentFactory(NzPopconfirmComponent);
_this.needProxyProperties = [
'nzTitle',
'nzContent',
'nzOverlayClassName',
'nzOverlayStyle',
'nzMouseEnterDelay',
'nzMouseLeaveDelay',
'nzVisible',
'nzTrigger',
'nzPlacement',
'nzOkText',
'nzOkType',
'nzCancelText',
'nzCondition',
'nzIcon'
];
_this.nzOnCancel = new i0.EventEmitter();
_this.nzOnConfirm = new i0.EventEmitter();
return _this;
}
/**
* @return {?}
*/
NzPopconfirmDirective.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
if (!this.tooltip) {
/** @type {?} */
var tooltipComponent = this.hostView.createComponent(this.factory);
this.tooltip = tooltipComponent.instance;
this.tooltip.noAnimation = this.noAnimation;
// Remove element when use directive https://github.com/NG-ZORRO/ng-zorro-antd/issues/1967
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), tooltipComponent.location.nativeElement);
this.isDynamicTooltip = true;
this.needProxyProperties.forEach(( /**
* @param {?} property
* @return {?}
*/function (property) { return _this.updateCompValue(property, _this[property]); }));
/** @type {?} */
var visible_ = this.tooltip.nzVisibleChange.pipe(operators.distinctUntilChanged()).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.visible = data;
_this.nzVisibleChange.emit(data);
}));
/** @type {?} */
var cancel_ = (( /** @type {?} */(this.tooltip))).nzOnCancel.subscribe(( /**
* @return {?}
*/function () {
_this.nzOnCancel.emit();
}));
/** @type {?} */
var confirm_ = (( /** @type {?} */(this.tooltip))).nzOnConfirm.subscribe(( /**
* @return {?}
*/function () {
_this.nzOnConfirm.emit();
}));
this.subs_.add(visible_);
this.subs_.add(cancel_);
this.subs_.add(confirm_);
}
this.tooltip.setOverlayOrigin(this);
};
NzPopconfirmDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-popconfirm]',
host: {
'[class.ant-popover-open]': 'isTooltipOpen'
}
},] }
];
/** @nocollapse */
NzPopconfirmDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.ViewContainerRef },
{ type: i0.ComponentFactoryResolver },
{ type: i0.Renderer2 },
{ type: NzPopconfirmComponent, decorators: [{ type: i0.Optional }] },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzPopconfirmDirective.propDecorators = {
nzOkText: [{ type: i0.Input }],
nzOkType: [{ type: i0.Input }],
nzCancelText: [{ type: i0.Input }],
nzIcon: [{ type: i0.Input }],
nzCondition: [{ type: i0.Input }],
nzOnCancel: [{ type: i0.Output }],
nzOnConfirm: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzPopconfirmDirective.prototype, "nzCondition", void 0);
return NzPopconfirmDirective;
}(NzTooltipDirective));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPopconfirmModule = /** @class */ (function () {
function NzPopconfirmModule() {
}
NzPopconfirmModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzPopconfirmComponent, NzPopconfirmDirective],
exports: [NzPopconfirmComponent, NzPopconfirmDirective],
imports: [
i2$1.CommonModule,
NzButtonModule,
i2$2.OverlayModule,
NzI18nModule,
NzIconModule,
NzAddOnModule,
NzOverlayModule,
NzNoAnimationModule
],
entryComponents: [NzPopconfirmComponent]
},] }
];
return NzPopconfirmModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPopoverComponent = /** @class */ (function (_super) {
__extends(NzPopoverComponent, _super);
function NzPopoverComponent(cdr, noAnimation) {
var _this = _super.call(this, cdr, noAnimation) || this;
_this.noAnimation = noAnimation;
_this._prefix = 'ant-popover-placement';
return _this;
}
/**
* @protected
* @return {?}
*/
NzPopoverComponent.prototype.isContentEmpty = /**
* @protected
* @return {?}
*/
function () {
/** @type {?} */
var isTitleEmpty = this.nzTitle instanceof i0.TemplateRef ? false : (this.nzTitle === '' || !isNotNil(this.nzTitle));
/** @type {?} */
var isContentEmpty = this.nzContent instanceof i0.TemplateRef ? false : (this.nzContent === '' || !isNotNil(this.nzContent));
return isTitleEmpty && isContentEmpty;
};
NzPopoverComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-popover',
animations: [zoomBigMotion],
template: "<ng-content></ng-content>\n<ng-template\n #overlay=\"cdkConnectedOverlay\"\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayHasBackdrop]=\"_hasBackdrop\"\n (backdropClick)=\"hide()\"\n (detach)=\"hide()\"\n (positionChange)=\"onPositionChange($event)\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n [cdkConnectedOverlayOpen]=\"visible$ | async\">\n <div class=\"ant-popover\"\n [ngClass]=\"_classMap\"\n [ngStyle]=\"nzOverlayStyle\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [@zoomBigMotion]=\"'active'\"\n (@zoomBigMotion.done)=\"_afterVisibilityAnimation($event)\">\n <div class=\"ant-popover-content\">\n <div class=\"ant-popover-arrow\"></div>\n <div class=\"ant-popover-inner\" role=\"tooltip\">\n <div>\n <div class=\"ant-popover-title\" *ngIf=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n <div class=\"ant-popover-inner-content\">\n <ng-container *nzStringTemplateOutlet=\"nzContent\">{{ nzContent }}</ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n</ng-template>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
styles: ["\n .ant-popover {\n position: relative;\n }\n "]
}] }
];
/** @nocollapse */
NzPopoverComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzPopoverComponent.propDecorators = {
nzTitle: [{ type: i0.Input }, { type: i0.ContentChild, args: ['neverUsedTemplate',] }],
nzContent: [{ type: i0.Input }, { type: i0.ContentChild, args: ['nzTemplate',] }]
};
return NzPopoverComponent;
}(NzToolTipComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPopoverDirective = /** @class */ (function (_super) {
__extends(NzPopoverDirective, _super);
function NzPopoverDirective(elementRef, hostView, resolver, renderer, tooltip, noAnimation) {
var _this = _super.call(this, elementRef, hostView, resolver, renderer, tooltip, noAnimation) || this;
_this.noAnimation = noAnimation;
_this.factory = _this.resolver.resolveComponentFactory(NzPopoverComponent);
return _this;
}
NzPopoverDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-popover]',
host: {
'[class.ant-popover-open]': 'isTooltipOpen'
}
},] }
];
/** @nocollapse */
NzPopoverDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.ViewContainerRef },
{ type: i0.ComponentFactoryResolver },
{ type: i0.Renderer2 },
{ type: NzPopoverComponent, decorators: [{ type: i0.Optional }] },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
return NzPopoverDirective;
}(NzTooltipDirective));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzPopoverModule = /** @class */ (function () {
function NzPopoverModule() {
}
NzPopoverModule.decorators = [
{ type: i0.NgModule, args: [{
entryComponents: [NzPopoverComponent],
exports: [NzPopoverDirective, NzPopoverComponent],
declarations: [NzPopoverDirective, NzPopoverComponent],
imports: [i2$1.CommonModule, i2$2.OverlayModule, NzAddOnModule, NzOverlayModule, NzNoAnimationModule]
},] }
];
return NzPopoverModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzProgressComponent = /** @class */ (function () {
function NzProgressComponent() {
this._gapDegree = 0;
this._gapPosition = 'top';
this._percent = 0;
this._status = 'normal';
this._cacheStatus = 'normal';
this._strokeLinecap = 'round';
this._strokeWidth = 8;
this._size = 'default';
this._type = 'line';
this._format = ( /**
* @param {?} percent
* @return {?}
*/function (percent) { return percent + "%"; });
this.isStatusSet = false;
this.isStrokeWidthSet = false;
this.isFormatSet = false;
this.isGapDegreeSet = false;
this.isGapPositionSet = false;
this.statusColorMap = {
normal: '#108ee9',
exception: '#ff5500',
success: '#87d068'
};
this.nzShowInfo = true;
this.nzWidth = 132;
this.nzSuccessPercent = 0;
}
Object.defineProperty(NzProgressComponent.prototype, "nzSize", {
get: /**
* @return {?}
*/ function () {
return this._size;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._size = value;
if (this.nzSize === 'small' && !this.isStrokeWidthSet) {
this._strokeWidth = 6;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzFormat", {
get: /**
* @return {?}
*/ function () {
return this._format;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._format = value;
this.isFormatSet = true;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzPercent", {
get: /**
* @return {?}
*/ function () {
return this._percent;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._percent = value;
if (isNotNil(value)) {
/** @type {?} */
var fillAll = parseInt(value.toString(), 10) >= 100;
if (fillAll && !this.isStatusSet) {
this._status = 'success';
}
else {
this._status = this._cacheStatus;
}
this.updatePathStyles();
this.updateIcon();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzStrokeWidth", {
get: /**
* @return {?}
*/ function () {
return this._strokeWidth;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._strokeWidth = value;
this.isStrokeWidthSet = true;
this.updatePathStyles();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzStatus", {
get: /**
* @return {?}
*/ function () {
return this._status;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._status = value;
this._cacheStatus = value;
this.isStatusSet = true;
this.updateIcon();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzType", {
get: /**
* @return {?}
*/ function () {
return this._type;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._type = value;
if (!this.isStrokeWidthSet) {
if (this.nzType !== 'line') {
this._strokeWidth = 6;
}
}
if (this.nzType === 'dashboard') {
if (!this.isGapPositionSet) {
this._gapPosition = 'bottom';
}
if (!this.isGapDegreeSet) {
this._gapDegree = 75;
}
}
this.updateIcon();
this.updatePathStyles();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzGapDegree", {
get: /**
* @return {?}
*/ function () {
return this._gapDegree;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._gapDegree = value;
this.isGapDegreeSet = true;
this.updatePathStyles();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzGapPosition", {
get: /**
* @return {?}
*/ function () {
return this._gapPosition;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (isNotNil(value)) {
this._gapPosition = value;
this.isGapPositionSet = true;
this.updatePathStyles();
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "nzStrokeLinecap", {
get: /**
* @return {?}
*/ function () {
return this._strokeLinecap;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._strokeLinecap = value;
this.updatePathStyles();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzProgressComponent.prototype, "isCirCleStyle", {
get: /**
* @return {?}
*/ function () {
return this.nzType === 'circle' || this.nzType === 'dashboard';
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzProgressComponent.prototype.updatePathStyles = /**
* @return {?}
*/
function () {
/** @type {?} */
var radius = 50 - (this.nzStrokeWidth / 2);
/** @type {?} */
var beginPositionX = 0;
/** @type {?} */
var beginPositionY = -radius;
/** @type {?} */
var endPositionX = 0;
/** @type {?} */
var endPositionY = radius * -2;
switch (this.nzGapPosition) {
case 'left':
beginPositionX = -radius;
beginPositionY = 0;
endPositionX = radius * 2;
endPositionY = 0;
break;
case 'right':
beginPositionX = radius;
beginPositionY = 0;
endPositionX = radius * -2;
endPositionY = 0;
break;
case 'bottom':
beginPositionY = radius;
endPositionY = radius * 2;
break;
default:
}
this.pathString = "M 50,50 m " + beginPositionX + "," + beginPositionY + "\n a " + radius + "," + radius + " 0 1 1 " + endPositionX + "," + -endPositionY + "\n a " + radius + "," + radius + " 0 1 1 " + -endPositionX + "," + endPositionY;
/** @type {?} */
var len = Math.PI * 2 * radius;
this.trailPathStyle = {
strokeDasharray: len - this.nzGapDegree + "px " + len + "px",
strokeDashoffset: "-" + this.nzGapDegree / 2 + "px",
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s'
};
this.strokePathStyle = {
strokeDasharray: (this.nzPercent / 100) * (len - this.nzGapDegree) + "px " + len + "px",
strokeDashoffset: "-" + this.nzGapDegree / 2 + "px",
transition: 'stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s' // eslint-disable-line
};
};
/**
* @return {?}
*/
NzProgressComponent.prototype.updateIcon = /**
* @return {?}
*/
function () {
/** @type {?} */
var isCircle = (this.nzType === 'circle' || this.nzType === 'dashboard');
/** @type {?} */
var ret = '';
if (this.nzStatus === 'success') {
ret = 'check';
}
if (this.nzStatus === 'exception') {
ret = 'close';
}
if (ret) {
if (!isCircle) {
ret += '-circle';
this.iconTheme = 'fill';
}
else {
this.iconTheme = 'outline';
}
}
this.icon = ret;
};
/**
* @return {?}
*/
NzProgressComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.updatePathStyles();
this.updateIcon();
};
NzProgressComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-progress',
preserveWhitespaces: false,
template: "<ng-template #progressInfoTemplate>\n <span class=\"ant-progress-text\" *ngIf=\"nzShowInfo\">\n <ng-container *ngIf=\"(nzStatus=='exception')||(nzStatus=='success')&&(!isFormatSet); else formatTemplate\">\n <!-- Theme is handled in type here. -->\n <i nz-icon [type]=\"icon\" [theme]=\"iconTheme\"></i>\n </ng-container>\n <ng-template #formatTemplate>\n {{ nzFormat(nzPercent) }}\n </ng-template>\n </span>\n</ng-template>\n<div [ngClass]=\"'ant-progress ant-progress-status-'+nzStatus\"\n [class.ant-progress-line]=\"nzType=='line'\"\n [class.ant-progress-small]=\"nzSize=='small'\"\n [class.ant-progress-show-info]=\"nzShowInfo\"\n [class.ant-progress-circle]=\"isCirCleStyle\">\n <div *ngIf=\"nzType=='line'\">\n <div class=\"ant-progress-outer\">\n <div class=\"ant-progress-inner\">\n <div class=\"ant-progress-bg\"\n [style.width.%]=\"nzPercent\"\n [style.border-radius]=\"nzStrokeLinecap === 'round' ? '100px' : '0'\"\n [style.background]=\"nzStrokeColor\"\n [style.height.px]=\"nzStrokeWidth\">\n </div>\n <div class=\"ant-progress-success-bg\"\n [style.width.%]=\"nzSuccessPercent\"\n [style.border-radius]=\"nzStrokeLinecap === 'round' ? '100px' : '0'\"\n [style.height.px]=\"nzStrokeWidth\"></div>\n </div>\n </div>\n <ng-template [ngTemplateOutlet]=\"progressInfoTemplate\"></ng-template>\n </div>\n <div\n [style.width.px]=\"this.nzWidth\"\n [style.height.px]=\"this.nzWidth\"\n [style.fontSize.px]=\"this.nzWidth*0.15+6\"\n class=\"ant-progress-inner\"\n *ngIf=\"isCirCleStyle\">\n <svg class=\"ant-progress-circle \" viewBox=\"0 0 100 100\">\n <path\n class=\"ant-progress-circle-trail\"\n stroke=\"#f3f3f3\"\n fill-opacity=\"0\"\n [attr.stroke-width]=\"nzStrokeWidth\"\n [ngStyle]=\"trailPathStyle\"\n [attr.d]=\"pathString\">\n </path>\n <path\n class=\"ant-progress-circle-path\"\n [attr.d]=\"pathString\"\n [attr.stroke-linecap]=\"nzStrokeLinecap\"\n fill-opacity=\"0\"\n [attr.stroke]=\"nzStrokeColor || statusColorMap[nzStatus]\"\n [attr.stroke-width]=\"nzPercent?nzStrokeWidth:0\"\n [ngStyle]=\"strokePathStyle\">\n </path>\n </svg>\n <ng-template [ngTemplateOutlet]=\"progressInfoTemplate\"></ng-template>\n </div>\n</div>"
}] }
];
NzProgressComponent.propDecorators = {
nzShowInfo: [{ type: i0.Input }],
nzWidth: [{ type: i0.Input }],
nzSuccessPercent: [{ type: i0.Input }],
nzStrokeColor: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzFormat: [{ type: i0.Input }],
nzPercent: [{ type: i0.Input }],
nzStrokeWidth: [{ type: i0.Input }],
nzStatus: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzGapDegree: [{ type: i0.Input }],
nzGapPosition: [{ type: i0.Input }],
nzStrokeLinecap: [{ type: i0.Input }]
};
return NzProgressComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzProgressModule = /** @class */ (function () {
function NzProgressModule() {
}
NzProgressModule.decorators = [
{ type: i0.NgModule, args: [{
exports: [NzProgressComponent],
declarations: [NzProgressComponent],
imports: [i2$1.CommonModule, NzIconModule]
},] }
];
return NzProgressModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzToolTipModule = /** @class */ (function () {
function NzToolTipModule() {
}
NzToolTipModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzToolTipComponent, NzTooltipDirective],
exports: [NzToolTipComponent, NzTooltipDirective],
imports: [i2$1.CommonModule, i2$2.OverlayModule, NzAddOnModule, NzOverlayModule, NzNoAnimationModule],
entryComponents: [NzToolTipComponent]
},] }
];
return NzToolTipModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRateItemComponent = /** @class */ (function () {
function NzRateItemComponent() {
this.allowHalf = false;
this.itemHover = new i0.EventEmitter();
this.itemClick = new i0.EventEmitter();
}
/**
* @param {?} isHalf
* @return {?}
*/
NzRateItemComponent.prototype.hoverRate = /**
* @param {?} isHalf
* @return {?}
*/
function (isHalf) {
this.itemHover.next(isHalf && this.allowHalf);
};
/**
* @param {?} isHalf
* @return {?}
*/
NzRateItemComponent.prototype.clickRate = /**
* @param {?} isHalf
* @return {?}
*/
function (isHalf) {
this.itemClick.next(isHalf && this.allowHalf);
};
NzRateItemComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: '[nz-rate-item]',
template: "<div class=\"ant-rate-star-second\"\n (mouseover)=\"hoverRate(false); $event.stopPropagation();\"\n (click)=\"clickRate(false); $event.stopPropagation();\">\n <ng-template [ngTemplateOutlet]=\"character || defaultCharacter\"></ng-template>\n</div>\n<div class=\"ant-rate-star-first\"\n (mouseover)=\"hoverRate(true); $event.stopPropagation();\"\n (click)=\"clickRate(true); $event.stopPropagation();\">\n <ng-template [ngTemplateOutlet]=\"character || defaultCharacter\"></ng-template>\n</div>\n\n<ng-template #defaultCharacter>\n <i nz-icon\n type=\"star\"\n theme=\"fill\"></i>\n</ng-template>\n"
}] }
];
NzRateItemComponent.propDecorators = {
character: [{ type: i0.Input }],
allowHalf: [{ type: i0.Input }],
itemHover: [{ type: i0.Output }],
itemClick: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzRateItemComponent.prototype, "allowHalf", void 0);
return NzRateItemComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRateComponent = /** @class */ (function () {
function NzRateComponent(renderer, cdr) {
this.renderer = renderer;
this.cdr = cdr;
this.nzAllowClear = true;
this.nzAllowHalf = false;
this.nzDisabled = false;
this.nzAutoFocus = false;
this.nzTooltips = [];
this.nzOnBlur = new i0.EventEmitter();
this.nzOnFocus = new i0.EventEmitter();
this.nzOnHoverChange = new i0.EventEmitter();
this.nzOnKeyDown = new i0.EventEmitter();
this.hasHalf = false;
this.hoverValue = 0;
this.prefixCls = 'ant-rate';
this.innerPrefixCls = this.prefixCls + "-star";
this.isFocused = false;
this.isInit = false;
this.starArray = [];
this._count = 5;
this._value = 0;
this.onChange = ( /**
* @return {?}
*/function () { return null; });
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
}
Object.defineProperty(NzRateComponent.prototype, "nzCount", {
get: /**
* @return {?}
*/ function () {
return this._count;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (this._count === value) {
return;
}
this._count = value;
this.updateStarArray();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzRateComponent.prototype, "nzValue", {
get: /**
* @return {?}
*/ function () { return this._value; },
set: /**
* @param {?} input
* @return {?}
*/ function (input) {
if (this._value === input) {
return;
}
this._value = input;
this.hasHalf = !Number.isInteger(input);
this.hoverValue = Math.ceil(input);
},
enumerable: true,
configurable: true
});
/**
* @param {?} changes
* @return {?}
*/
NzRateComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzAutoFocus && !changes.nzAutoFocus.isFirstChange()) {
if (this.nzAutoFocus && !this.nzDisabled) {
this.renderer.setAttribute(this.ulElement.nativeElement, 'autofocus', 'autofocus');
}
else {
this.renderer.removeAttribute(this.ulElement.nativeElement, 'autofocus');
}
}
};
/**
* @return {?}
*/
NzRateComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.updateStarArray();
};
/**
* @return {?}
*/
NzRateComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.isInit = true;
};
/**
* @param {?} index
* @param {?} isHalf
* @return {?}
*/
NzRateComponent.prototype.onItemClick = /**
* @param {?} index
* @param {?} isHalf
* @return {?}
*/
function (index, isHalf) {
if (this.nzDisabled) {
return;
}
this.hoverValue = index + 1;
/** @type {?} */
var actualValue = isHalf ? index + 0.5 : index + 1;
if (this.nzValue === actualValue) {
if (this.nzAllowClear) {
this.nzValue = 0;
this.onChange(this.nzValue);
}
}
else {
this.nzValue = actualValue;
this.onChange(this.nzValue);
}
};
/**
* @param {?} index
* @param {?} isHalf
* @return {?}
*/
NzRateComponent.prototype.onItemHover = /**
* @param {?} index
* @param {?} isHalf
* @return {?}
*/
function (index, isHalf) {
if (this.nzDisabled ||
(this.hoverValue === index + 1 && isHalf === this.hasHalf)) {
return;
}
this.hoverValue = index + 1;
this.hasHalf = isHalf;
this.nzOnHoverChange.emit(this.hoverValue);
};
/**
* @return {?}
*/
NzRateComponent.prototype.onRateLeave = /**
* @return {?}
*/
function () {
this.hasHalf = !Number.isInteger(this.nzValue);
this.hoverValue = Math.ceil(this.nzValue);
};
/**
* @param {?} e
* @return {?}
*/
NzRateComponent.prototype.onFocus = /**
* @param {?} e
* @return {?}
*/
function (e) {
this.isFocused = true;
this.nzOnFocus.emit(e);
};
/**
* @param {?} e
* @return {?}
*/
NzRateComponent.prototype.onBlur = /**
* @param {?} e
* @return {?}
*/
function (e) {
this.isFocused = false;
this.nzOnBlur.emit(e);
};
/**
* @return {?}
*/
NzRateComponent.prototype.focus = /**
* @return {?}
*/
function () {
this.ulElement.nativeElement.focus();
};
/**
* @return {?}
*/
NzRateComponent.prototype.blur = /**
* @return {?}
*/
function () {
this.ulElement.nativeElement.blur();
};
/**
* @param {?} e
* @return {?}
*/
NzRateComponent.prototype.onKeyDown = /**
* @param {?} e
* @return {?}
*/
function (e) {
/** @type {?} */
var oldVal = this.nzValue;
if (e.keyCode === keycodes.RIGHT_ARROW && (this.nzValue < this.nzCount)) {
this.nzValue += this.nzAllowHalf ? 0.5 : 1;
}
else if (e.keyCode === keycodes.LEFT_ARROW && (this.nzValue > 0)) {
this.nzValue -= this.nzAllowHalf ? 0.5 : 1;
}
if (oldVal !== this.nzValue) {
this.onChange(this.nzValue);
this.nzOnKeyDown.emit(e);
this.cdr.markForCheck();
}
};
/**
* @param {?} i
* @return {?}
*/
NzRateComponent.prototype.setClasses = /**
* @param {?} i
* @return {?}
*/
function (i) {
var _a;
return _a = {},
_a[this.innerPrefixCls + "-full"] = (i + 1 < this.hoverValue) || (!this.hasHalf) && (i + 1 === this.hoverValue),
_a[this.innerPrefixCls + "-half"] = (this.hasHalf) && (i + 1 === this.hoverValue),
_a[this.innerPrefixCls + "-active"] = (this.hasHalf) && (i + 1 === this.hoverValue),
_a[this.innerPrefixCls + "-zero"] = (i + 1 > this.hoverValue),
_a[this.innerPrefixCls + "-focused"] = (this.hasHalf) && (i + 1 === this.hoverValue) && this.isFocused,
_a;
};
/**
* @private
* @return {?}
*/
NzRateComponent.prototype.updateStarArray = /**
* @private
* @return {?}
*/
function () {
this.starArray = Array(this.nzCount).fill(0).map(( /**
* @param {?} _
* @param {?} i
* @return {?}
*/function (_, i) { return i; }));
};
// #region Implement `ControlValueAccessor`
// #region Implement `ControlValueAccessor`
/**
* @param {?} value
* @return {?}
*/
NzRateComponent.prototype.writeValue =
// #region Implement `ControlValueAccessor`
/**
* @param {?} value
* @return {?}
*/
function (value) {
this.nzValue = value || 0;
this.cdr.markForCheck();
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzRateComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
};
/**
* @param {?} fn
* @return {?}
*/
NzRateComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzRateComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
NzRateComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-rate',
preserveWhitespaces: false,
template: "<ul #ulElement\n class=\"ant-rate\"\n [class.ant-rate-disabled]=\"nzDisabled\"\n [ngClass]=\"classMap\"\n (blur)=\"onBlur($event)\"\n (focus)=\"onFocus($event)\"\n (keydown)=\"onKeyDown($event); $event.preventDefault();\"\n (mouseleave)=\"onRateLeave(); $event.stopPropagation();\"\n [tabindex]=\"nzDisabled ? -1 : 1\">\n <li *ngFor=\"let star of starArray; let i = index\"\n class=\"ant-rate-star\"\n [ngClass]=\"setClasses(star)\"\n nz-tooltip\n [nzTitle]=\"nzTooltips[ i ]\">\n <div nz-rate-item\n [allowHalf]=\"nzAllowHalf\"\n [character]=\"nzCharacter\"\n (itemHover)=\"onItemHover(i, $event)\"\n (itemClick)=\"onItemClick(i, $event)\">\n </div>\n </li>\n</ul>\n",
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzRateComponent; })),
multi: true
}
]
}] }
];
/** @nocollapse */
NzRateComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef }
];
};
NzRateComponent.propDecorators = {
ulElement: [{ type: i0.ViewChild, args: ['ulElement',] }],
nzAllowClear: [{ type: i0.Input }],
nzAllowHalf: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzAutoFocus: [{ type: i0.Input }],
nzCharacter: [{ type: i0.Input }],
nzTooltips: [{ type: i0.Input }],
nzOnBlur: [{ type: i0.Output }],
nzOnFocus: [{ type: i0.Output }],
nzOnHoverChange: [{ type: i0.Output }],
nzOnKeyDown: [{ type: i0.Output }],
nzCount: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzRateComponent.prototype, "nzAllowClear", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzRateComponent.prototype, "nzAllowHalf", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzRateComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzRateComponent.prototype, "nzAutoFocus", void 0);
return NzRateComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzRateModule = /** @class */ (function () {
function NzRateModule() {
}
NzRateModule.decorators = [
{ type: i0.NgModule, args: [{
exports: [NzRateComponent],
declarations: [NzRateComponent, NzRateItemComponent],
imports: [i2$1.CommonModule, NzIconModule, NzToolTipModule]
},] }
];
return NzRateModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSkeletonComponent = /** @class */ (function () {
function NzSkeletonComponent(cdr, renderer, elementRef) {
this.cdr = cdr;
this.nzActive = false;
this.nzLoading = true;
this.nzTitle = true;
this.nzAvatar = false;
this.nzParagraph = true;
this.rowsList = [];
this.widthList = [];
renderer.addClass(elementRef.nativeElement, 'ant-skeleton');
}
/**
* @param {?=} value
* @return {?}
*/
NzSkeletonComponent.prototype.toCSSUnit = /**
* @param {?=} value
* @return {?}
*/
function (value) {
if (value === void 0) {
value = '';
}
return toCssPixel(value);
};
/**
* @private
* @return {?}
*/
NzSkeletonComponent.prototype.getTitleProps = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var hasAvatar = !!this.nzAvatar;
/** @type {?} */
var hasParagraph = !!this.nzParagraph;
/** @type {?} */
var width;
if (!hasAvatar && hasParagraph) {
width = '38%';
}
else if (hasAvatar && hasParagraph) {
width = '50%';
}
return __assign({ width: width }, this.getProps(this.nzTitle));
};
/**
* @private
* @return {?}
*/
NzSkeletonComponent.prototype.getAvatarProps = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var shape = (!!this.nzTitle && !this.nzParagraph) ? 'square' : 'circle';
/** @type {?} */
var size = 'large';
return __assign({ shape: shape, size: size }, this.getProps(this.nzAvatar));
};
/**
* @private
* @return {?}
*/
NzSkeletonComponent.prototype.getParagraphProps = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var hasAvatar = !!this.nzAvatar;
/** @type {?} */
var hasTitle = !!this.nzTitle;
/** @type {?} */
var basicProps = {};
// Width
if (!hasAvatar || !hasTitle) {
basicProps.width = '61%';
}
// Rows
if (!hasAvatar && hasTitle) {
basicProps.rows = 3;
}
else {
basicProps.rows = 2;
}
return __assign({}, basicProps, this.getProps(this.nzParagraph));
};
/**
* @private
* @template T
* @param {?} prop
* @return {?}
*/
NzSkeletonComponent.prototype.getProps = /**
* @private
* @template T
* @param {?} prop
* @return {?}
*/
function (prop) {
return prop && typeof prop === 'object' ? prop : {};
};
/**
* @private
* @return {?}
*/
NzSkeletonComponent.prototype.getWidthList = /**
* @private
* @return {?}
*/
function () {
var _a = this.paragraph, width = _a.width, rows = _a.rows;
/** @type {?} */
var widthList = [];
if (width && Array.isArray(width)) {
widthList = width;
}
else if (width && !Array.isArray(width)) {
widthList = [];
widthList[rows - 1] = width;
}
return widthList;
};
/**
* @private
* @return {?}
*/
NzSkeletonComponent.prototype.updateProps = /**
* @private
* @return {?}
*/
function () {
this.title = this.getTitleProps();
this.avatar = this.getAvatarProps();
this.paragraph = this.getParagraphProps();
this.rowsList = __spread(Array(this.paragraph.rows));
this.widthList = this.getWidthList();
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzSkeletonComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.updateProps();
};
/**
* @param {?} changes
* @return {?}
*/
NzSkeletonComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzTitle || changes.nzAvatar || changes.nzParagraph) {
this.updateProps();
}
};
NzSkeletonComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-skeleton',
template: "<ng-container *ngIf=\"nzLoading\">\n <div class=\"ant-skeleton-header\">\n <span\n *ngIf=\"!!nzAvatar\"\n class=\"ant-skeleton-avatar\"\n [class.ant-skeleton-avatar-lg]=\"avatar.size === 'large'\"\n [class.ant-skeleton-avatar-sm]=\"avatar.size === 'small'\"\n [class.ant-skeleton-avatar-circle]=\"avatar.shape === 'circle'\"\n [class.ant-skeleton-avatar-square]=\"avatar.shape === 'square'\">\n </span>\n </div>\n <div class=\"ant-skeleton-content\">\n <h3 *ngIf=\"!!nzTitle\" class=\"ant-skeleton-title\" [style.width]=\"toCSSUnit(title.width)\"></h3>\n <ul *ngIf=\"!!nzParagraph\" class=\"ant-skeleton-paragraph\">\n <li *ngFor=\"let row of rowsList; let i=index\" [style.width]=\"toCSSUnit(widthList[i])\">\n </li>\n </ul>\n </div>\n</ng-container>\n<ng-container *ngIf=\"!nzLoading\">\n <ng-content></ng-content>\n</ng-container>",
host: {
'[class.ant-skeleton-with-avatar]': '!!nzAvatar',
'[class.ant-skeleton-active]': 'nzActive'
}
}] }
];
/** @nocollapse */
NzSkeletonComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzSkeletonComponent.propDecorators = {
nzActive: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzAvatar: [{ type: i0.Input }],
nzParagraph: [{ type: i0.Input }]
};
return NzSkeletonComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSkeletonModule = /** @class */ (function () {
function NzSkeletonModule() {
}
NzSkeletonModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzSkeletonComponent],
imports: [i2$1.CommonModule],
exports: [NzSkeletonComponent]
},] }
];
return NzSkeletonModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} min
* @param {?} max
* @param {?} value
* @return {?}
*/
function getPercent(min, max, value) {
return (value - min) / (max - min) * 100;
}
/**
* @param {?} num
* @return {?}
*/
function getPrecision(num) {
/** @type {?} */
var numStr = num.toString();
/** @type {?} */
var dotIndex = numStr.indexOf('.');
return dotIndex >= 0 ? numStr.length - dotIndex - 1 : 0;
}
/**
* @param {?} num
* @param {?} min
* @param {?} max
* @return {?}
*/
function ensureNumberInRange(num, min, max) {
if (isNaN(num) || num < min) {
return min;
}
else if (num > max) {
return max;
}
else {
return num;
}
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var Marks = /** @class */ (function () {
function Marks() {
}
return Marks;
}());
/**
* @param {?} value
* @return {?}
*/
function isValueARange(value) {
if (value instanceof Array) {
return value.length === 2;
}
else {
return false;
}
}
/**
* @param {?} config
* @return {?}
*/
function isConfigAObject(config) {
return config instanceof Object;
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @return {?}
*/
function getValueTypeNotMatchError() {
return new Error("The \"nzRange\" can't match the \"ngModel\"'s type, please check these properties: \"nzRange\", \"ngModel\", \"nzDefaultValue\".");
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSliderComponent = /** @class */ (function () {
function NzSliderComponent(cdr) {
this.cdr = cdr;
this.nzDisabled = false;
this.nzDots = false;
this.nzIncluded = true;
this.nzRange = false;
this.nzVertical = false;
this.nzMarks = null;
this.nzMax = 100;
this.nzMin = 0;
this.nzStep = 1;
this.nzTooltipVisible = 'default';
/**
* @deprecated 8.0.0, This API is redundant for Angular.
*/
this.nzDefaultValue = null;
this.nzOnAfterChange = new i0.EventEmitter();
this.value = null; // CORE value state
this.cacheSliderStart = null;
this.cacheSliderLength = null;
this.activeValueIndex = null; // Current activated handle's index ONLY for range=true
// Current activated handle's index ONLY for range=true
this.track = { offset: null, length: null }; // Track's offset and length
// "steps" in array type with more data & FILTER out the invalid mark
this.bounds = { lower: null, upper: null }; // now for nz-slider-step
// now for nz-slider-step
this.isDragging = false; // Current dragging state
}
/**
* @return {?}
*/
NzSliderComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.handles = this.generateHandles(this.nzRange ? 2 : 1);
this.sliderDOM = this.slider.nativeElement;
this.marksArray = this.nzMarks ? this.generateMarkItems(this.nzMarks) : null;
this.createDraggingObservables();
this.toggleDragDisabled(this.nzDisabled);
if (this.getValue() === null) {
this.setValue(this.formatValue(null));
}
};
/**
* @param {?} changes
* @return {?}
*/
NzSliderComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var nzDisabled = changes.nzDisabled, nzMarks = changes.nzMarks, nzRange = changes.nzRange;
if (nzDisabled && !nzDisabled.firstChange) {
this.toggleDragDisabled(nzDisabled.currentValue);
}
else if (nzMarks && !nzMarks.firstChange) {
this.marksArray = this.nzMarks ? this.generateMarkItems(this.nzMarks) : null;
}
else if (nzRange && !nzRange.firstChange) {
this.setValue(this.formatValue(null));
}
};
/**
* @return {?}
*/
NzSliderComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.unsubscribeDrag();
};
/**
* @param {?} val
* @return {?}
*/
NzSliderComponent.prototype.writeValue = /**
* @param {?} val
* @return {?}
*/
function (val) {
this.setValue(val, true);
};
/**
* @param {?} _value
* @return {?}
*/
NzSliderComponent.prototype.onValueChange = /**
* @param {?} _value
* @return {?}
*/
function (_value) {
};
/**
* @return {?}
*/
NzSliderComponent.prototype.onTouched = /**
* @return {?}
*/
function () {
};
/**
* @param {?} fn
* @return {?}
*/
NzSliderComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onValueChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzSliderComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzSliderComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.toggleDragDisabled(isDisabled);
};
/**
* @private
* @param {?} value
* @param {?=} isWriteValue
* @return {?}
*/
NzSliderComponent.prototype.setValue = /**
* @private
* @param {?} value
* @param {?=} isWriteValue
* @return {?}
*/
function (value, isWriteValue) {
if (isWriteValue === void 0) {
isWriteValue = false;
}
if (isWriteValue) {
this.value = this.formatValue(value);
this.updateTrackAndHandles();
}
else if (!this.valuesEqual(this.value, value)) {
this.value = value;
this.updateTrackAndHandles();
this.onValueChange(this.getValue(true));
}
};
/**
* @private
* @param {?=} cloneAndSort
* @return {?}
*/
NzSliderComponent.prototype.getValue = /**
* @private
* @param {?=} cloneAndSort
* @return {?}
*/
function (cloneAndSort) {
if (cloneAndSort === void 0) {
cloneAndSort = false;
}
if (cloneAndSort && isValueARange(this.value)) {
return shallowCopyArray(this.value).sort(( /**
* @param {?} a
* @param {?} b
* @return {?}
*/function (a, b) { return a - b; }));
}
return this.value;
};
/**
* Clone & sort current value and convert them to offsets, then return the new one.
*/
/**
* Clone & sort current value and convert them to offsets, then return the new one.
* @private
* @param {?=} value
* @return {?}
*/
NzSliderComponent.prototype.getValueToOffset = /**
* Clone & sort current value and convert them to offsets, then return the new one.
* @private
* @param {?=} value
* @return {?}
*/
function (value) {
var _this = this;
/** @type {?} */
var normalizedValue = value;
if (typeof normalizedValue === 'undefined') {
normalizedValue = this.getValue(true);
}
return isValueARange(normalizedValue)
? normalizedValue.map(( /**
* @param {?} val
* @return {?}
*/function (val) { return _this.valueToOffset(val); }))
: this.valueToOffset(normalizedValue);
};
/**
* Find the closest value to be activated (only for range = true).
*/
/**
* Find the closest value to be activated (only for range = true).
* @private
* @param {?} pointerValue
* @return {?}
*/
NzSliderComponent.prototype.setActiveValueIndex = /**
* Find the closest value to be activated (only for range = true).
* @private
* @param {?} pointerValue
* @return {?}
*/
function (pointerValue) {
/** @type {?} */
var value = this.getValue();
if (isValueARange(value)) {
/** @type {?} */
var minimal_1 = null;
/** @type {?} */
var gap_1;
/** @type {?} */
var activeIndex_1;
value.forEach(( /**
* @param {?} val
* @param {?} index
* @return {?}
*/function (val, index) {
gap_1 = Math.abs(pointerValue - val);
if (minimal_1 === null || gap_1 < minimal_1) {
minimal_1 = gap_1;
activeIndex_1 = index;
}
}));
this.activeValueIndex = activeIndex_1;
}
};
/**
* @private
* @param {?} pointerValue
* @return {?}
*/
NzSliderComponent.prototype.setActiveValue = /**
* @private
* @param {?} pointerValue
* @return {?}
*/
function (pointerValue) {
if (isValueARange(this.value)) {
/** @type {?} */
var newValue = shallowCopyArray(this.value);
newValue[this.activeValueIndex] = pointerValue;
this.setValue(newValue);
}
else {
this.setValue(pointerValue);
}
};
/**
* Update track and handles' position and length.
*/
/**
* Update track and handles' position and length.
* @private
* @return {?}
*/
NzSliderComponent.prototype.updateTrackAndHandles = /**
* Update track and handles' position and length.
* @private
* @return {?}
*/
function () {
var _this = this;
var _a, _b;
/** @type {?} */
var value = this.getValue();
/** @type {?} */
var offset = this.getValueToOffset(value);
/** @type {?} */
var valueSorted = this.getValue(true);
/** @type {?} */
var offsetSorted = this.getValueToOffset(valueSorted);
/** @type {?} */
var boundParts = this.nzRange ? ( /** @type {?} */(valueSorted)) : [0, valueSorted];
/** @type {?} */
var trackParts = this.nzRange ? [offsetSorted[0], offsetSorted[1] - offsetSorted[0]] : [0, offsetSorted];
this.handles.forEach(( /**
* @param {?} handle
* @param {?} index
* @return {?}
*/function (handle, index) {
handle.offset = _this.nzRange ? offset[index] : offset;
handle.value = _this.nzRange ? value[index] : value;
}));
_a = __read(boundParts, 2), this.bounds.lower = _a[0], this.bounds.upper = _a[1];
_b = __read(trackParts, 2), this.track.offset = _b[0], this.track.length = _b[1];
this.cdr.markForCheck();
};
/**
* @private
* @param {?} value
* @return {?}
*/
NzSliderComponent.prototype.onDragStart = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
this.toggleDragMoving(true);
this.cacheSliderProperty();
this.setActiveValueIndex(value);
this.setActiveValue(value);
this.showHandleTooltip(this.nzRange ? this.activeValueIndex : 0);
};
/**
* @private
* @param {?} value
* @return {?}
*/
NzSliderComponent.prototype.onDragMove = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
this.setActiveValue(value);
this.cdr.markForCheck();
};
/**
* @private
* @return {?}
*/
NzSliderComponent.prototype.onDragEnd = /**
* @private
* @return {?}
*/
function () {
this.nzOnAfterChange.emit(this.getValue(true));
this.toggleDragMoving(false);
this.cacheSliderProperty(true);
this.hideAllHandleTooltip();
this.cdr.markForCheck();
};
/**
* Create user interactions handles.
*/
/**
* Create user interactions handles.
* @private
* @return {?}
*/
NzSliderComponent.prototype.createDraggingObservables = /**
* Create user interactions handles.
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var sliderDOM = this.sliderDOM;
/** @type {?} */
var orientField = this.nzVertical ? 'pageY' : 'pageX';
/** @type {?} */
var mouse = {
start: 'mousedown',
move: 'mousemove',
end: 'mouseup',
pluckKey: [orientField]
};
/** @type {?} */
var touch = {
start: 'touchstart',
move: 'touchmove',
end: 'touchend',
pluckKey: ['touches', '0', orientField],
filter: ( /**
* @param {?} e
* @return {?}
*/function (e) { return e instanceof TouchEvent; })
};
[mouse, touch].forEach(( /**
* @param {?} source
* @return {?}
*/function (source) {
var start = source.start, move = source.move, end = source.end, pluckKey = source.pluckKey, _a = source.filter, filterFunc = _a === void 0 ? (( /**
* @return {?}
*/function () { return true; })) : _a;
source.startPlucked$ = rxjs.fromEvent(sliderDOM, start).pipe(operators.filter(filterFunc), operators.tap(silentEvent), operators.pluck.apply(void 0, __spread(pluckKey)), operators.map(( /**
* @param {?} position
* @return {?}
*/function (position) { return _this.findClosestValue(position); })));
source.end$ = rxjs.fromEvent(document, end);
source.moveResolved$ = rxjs.fromEvent(document, move).pipe(operators.filter(filterFunc), operators.tap(silentEvent), operators.pluck.apply(void 0, __spread(pluckKey)), operators.distinctUntilChanged(), operators.map(( /**
* @param {?} position
* @return {?}
*/function (position) { return _this.findClosestValue(position); })), operators.distinctUntilChanged(), operators.takeUntil(source.end$));
}));
this.dragStart$ = rxjs.merge(mouse.startPlucked$, touch.startPlucked$);
this.dragMove$ = rxjs.merge(mouse.moveResolved$, touch.moveResolved$);
this.dragEnd$ = rxjs.merge(mouse.end$, touch.end$);
};
/**
* @private
* @param {?=} periods
* @return {?}
*/
NzSliderComponent.prototype.subscribeDrag = /**
* @private
* @param {?=} periods
* @return {?}
*/
function (periods) {
if (periods === void 0) {
periods = ['start', 'move', 'end'];
}
if (periods.indexOf('start') !== -1 && this.dragStart$ && !this.dragStart_) {
this.dragStart_ = this.dragStart$.subscribe(this.onDragStart.bind(this));
}
if (periods.indexOf('move') !== -1 && this.dragMove$ && !this.dragMove_) {
this.dragMove_ = this.dragMove$.subscribe(this.onDragMove.bind(this));
}
if (periods.indexOf('end') !== -1 && this.dragEnd$ && !this.dragEnd_) {
this.dragEnd_ = this.dragEnd$.subscribe(this.onDragEnd.bind(this));
}
};
/**
* @private
* @param {?=} periods
* @return {?}
*/
NzSliderComponent.prototype.unsubscribeDrag = /**
* @private
* @param {?=} periods
* @return {?}
*/
function (periods) {
if (periods === void 0) {
periods = ['start', 'move', 'end'];
}
if (periods.indexOf('start') !== -1 && this.dragStart_) {
this.dragStart_.unsubscribe();
this.dragStart_ = null;
}
if (periods.indexOf('move') !== -1 && this.dragMove_) {
this.dragMove_.unsubscribe();
this.dragMove_ = null;
}
if (periods.indexOf('end') !== -1 && this.dragEnd_) {
this.dragEnd_.unsubscribe();
this.dragEnd_ = null;
}
};
/**
* @private
* @param {?} movable
* @return {?}
*/
NzSliderComponent.prototype.toggleDragMoving = /**
* @private
* @param {?} movable
* @return {?}
*/
function (movable) {
/** @type {?} */
var periods = ['move', 'end'];
if (movable) {
this.isDragging = true;
this.subscribeDrag(periods);
}
else {
this.isDragging = false;
this.unsubscribeDrag(periods);
}
};
/**
* @private
* @param {?} disabled
* @return {?}
*/
NzSliderComponent.prototype.toggleDragDisabled = /**
* @private
* @param {?} disabled
* @return {?}
*/
function (disabled) {
if (disabled) {
this.unsubscribeDrag();
}
else {
this.subscribeDrag(['start']);
}
};
/**
* @private
* @param {?} position
* @return {?}
*/
NzSliderComponent.prototype.findClosestValue = /**
* @private
* @param {?} position
* @return {?}
*/
function (position) {
/** @type {?} */
var sliderStart = this.getSliderStartPosition();
/** @type {?} */
var sliderLength = this.getSliderLength();
/** @type {?} */
var ratio = ensureNumberInRange((position - sliderStart) / sliderLength, 0, 1);
/** @type {?} */
var val = (this.nzMax - this.nzMin) * (this.nzVertical ? 1 - ratio : ratio) + this.nzMin;
/** @type {?} */
var points = (this.nzMarks === null ? [] : Object.keys(this.nzMarks).map(parseFloat));
if (this.nzStep !== null && !this.nzDots) {
/** @type {?} */
var closestOne = Math.round(val / this.nzStep) * this.nzStep;
points.push(closestOne);
}
/** @type {?} */
var gaps = points.map(( /**
* @param {?} point
* @return {?}
*/function (point) { return Math.abs(val - point); }));
/** @type {?} */
var closest = points[gaps.indexOf(Math.min.apply(Math, __spread(gaps)))];
return this.nzStep === null ? closest : parseFloat(closest.toFixed(getPrecision(this.nzStep)));
};
/**
* @private
* @param {?} value
* @return {?}
*/
NzSliderComponent.prototype.valueToOffset = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
return getPercent(this.nzMin, this.nzMax, value);
};
/**
* @private
* @return {?}
*/
NzSliderComponent.prototype.getSliderStartPosition = /**
* @private
* @return {?}
*/
function () {
if (this.cacheSliderStart !== null) {
return this.cacheSliderStart;
}
/** @type {?} */
var offset = getElementOffset(this.sliderDOM);
return this.nzVertical ? offset.top : offset.left;
};
/**
* @private
* @return {?}
*/
NzSliderComponent.prototype.getSliderLength = /**
* @private
* @return {?}
*/
function () {
if (this.cacheSliderLength !== null) {
return this.cacheSliderLength;
}
/** @type {?} */
var sliderDOM = this.sliderDOM;
return this.nzVertical ? sliderDOM.clientHeight : sliderDOM.clientWidth;
};
/**
* Cache DOM layout/reflow operations for performance (may not necessary?)
*/
/**
* Cache DOM layout/reflow operations for performance (may not necessary?)
* @private
* @param {?=} remove
* @return {?}
*/
NzSliderComponent.prototype.cacheSliderProperty = /**
* Cache DOM layout/reflow operations for performance (may not necessary?)
* @private
* @param {?=} remove
* @return {?}
*/
function (remove) {
if (remove === void 0) {
remove = false;
}
this.cacheSliderStart = remove ? null : this.getSliderStartPosition();
this.cacheSliderLength = remove ? null : this.getSliderLength();
};
/**
* @private
* @param {?} value
* @return {?}
*/
NzSliderComponent.prototype.formatValue = /**
* @private
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
/** @type {?} */
var res = value;
if (!this.assertValueValid(value)) {
res = this.nzDefaultValue === null
? (this.nzRange ? [this.nzMin, this.nzMax] : this.nzMin)
: this.nzDefaultValue;
}
else {
res = isValueARange(value)
? value.map(( /**
* @param {?} val
* @return {?}
*/function (val) { return ensureNumberInRange(val, _this.nzMin, _this.nzMax); }))
: ensureNumberInRange(value, this.nzMin, this.nzMax);
}
return res;
};
/**
* Check if value is valid and throw error if value-type/range not match.
*/
/**
* Check if value is valid and throw error if value-type/range not match.
* @private
* @param {?} value
* @return {?}
*/
NzSliderComponent.prototype.assertValueValid = /**
* Check if value is valid and throw error if value-type/range not match.
* @private
* @param {?} value
* @return {?}
*/
function (value) {
if (value === null || value === undefined) {
return false;
}
if (!Array.isArray(value) && isNaN(typeof value !== 'number' ? parseFloat(value) : value)) {
return false;
}
return this.assertValueTypeMatch(value);
};
/**
* Assert that if `this.nzRange` is `true`, value is also a range, vice versa.
*/
/**
* Assert that if `this.nzRange` is `true`, value is also a range, vice versa.
* @private
* @param {?} value
* @return {?}
*/
NzSliderComponent.prototype.assertValueTypeMatch = /**
* Assert that if `this.nzRange` is `true`, value is also a range, vice versa.
* @private
* @param {?} value
* @return {?}
*/
function (value) {
if (isValueARange(value) !== this.nzRange) {
throw getValueTypeNotMatchError();
}
return true;
};
/**
* @private
* @param {?} valA
* @param {?} valB
* @return {?}
*/
NzSliderComponent.prototype.valuesEqual = /**
* @private
* @param {?} valA
* @param {?} valB
* @return {?}
*/
function (valA, valB) {
if (typeof valA !== typeof valB) {
return false;
}
return isValueARange(valA) && isValueARange(valB) ? arraysEqual(valA, valB) : valA === valB;
};
/**
* Show one handle's tooltip and hide others'.
*/
/**
* Show one handle's tooltip and hide others'.
* @private
* @param {?=} handleIndex
* @return {?}
*/
NzSliderComponent.prototype.showHandleTooltip = /**
* Show one handle's tooltip and hide others'.
* @private
* @param {?=} handleIndex
* @return {?}
*/
function (handleIndex) {
if (handleIndex === void 0) {
handleIndex = 0;
}
this.handles.forEach(( /**
* @param {?} handle
* @param {?} index
* @return {?}
*/function (handle, index) {
handle.active = index === handleIndex;
}));
};
/**
* @private
* @return {?}
*/
NzSliderComponent.prototype.hideAllHandleTooltip = /**
* @private
* @return {?}
*/
function () {
this.handles.forEach(( /**
* @param {?} handle
* @return {?}
*/function (handle) { return handle.active = false; }));
};
/**
* @private
* @param {?} amount
* @return {?}
*/
NzSliderComponent.prototype.generateHandles = /**
* @private
* @param {?} amount
* @return {?}
*/
function (amount) {
return Array(amount).fill(0).map(( /**
* @return {?}
*/function () { return ({ offset: null, value: null, active: false }); }));
};
/**
* @private
* @param {?} marks
* @return {?}
*/
NzSliderComponent.prototype.generateMarkItems = /**
* @private
* @param {?} marks
* @return {?}
*/
function (marks) {
/** @type {?} */
var marksArray = [];
for (var key in marks) {
/** @type {?} */
var mark = marks[key];
/** @type {?} */
var val = typeof key === 'number' ? key : parseFloat(key);
if (val >= this.nzMin && val <= this.nzMax) {
marksArray.push({ value: val, offset: this.valueToOffset(val), config: mark });
}
}
return marksArray.length ? marksArray : null;
};
NzSliderComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-slider',
preserveWhitespaces: false,
providers: [{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzSliderComponent; })),
multi: true
}],
template: "<div #slider\n class=\"ant-slider\"\n [class.ant-slider-disabled]=\"nzDisabled\"\n [class.ant-slider-vertical]=\"nzVertical\"\n [class.ant-slider-with-marks]=\"marksArray\">\n <div class=\"ant-slider-rail\"></div>\n <nz-slider-track\n [nzVertical]=\"nzVertical\"\n [nzIncluded]=\"nzIncluded\"\n [nzOffset]=\"track.offset\"\n [nzLength]=\"track.length\"></nz-slider-track>\n <nz-slider-step\n *ngIf=\"marksArray\"\n [nzVertical]=\"nzVertical\"\n [nzLowerBound]=\"bounds.lower\"\n [nzUpperBound]=\"bounds.upper\"\n [nzMarksArray]=\"marksArray\"\n [nzIncluded]=\"nzIncluded\"></nz-slider-step>\n <nz-slider-handle\n *ngFor=\"let handle of handles\"\n [nzVertical]=\"nzVertical\"\n [nzOffset]=\"handle.offset\"\n [nzValue]=\"handle.value\"\n [nzActive]=\"handle.active\"\n [nzTipFormatter]=\"nzTipFormatter\"\n [nzTooltipVisible]=\"nzTooltipVisible\"></nz-slider-handle>\n <nz-slider-marks \n *ngIf=\"marksArray\"\n [nzVertical]=\"nzVertical\"\n [nzMin]=\"nzMin\"\n [nzMax]=\"nzMax\"\n [nzLowerBound]=\"bounds.lower\"\n [nzUpperBound]=\"bounds.upper\"\n [nzMarksArray]=\"marksArray\"\n [nzIncluded]=\"nzIncluded\"></nz-slider-marks>\n</div>"
}] }
];
/** @nocollapse */
NzSliderComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef }
];
};
NzSliderComponent.propDecorators = {
slider: [{ type: i0.ViewChild, args: ['slider',] }],
nzDisabled: [{ type: i0.Input }],
nzDots: [{ type: i0.Input }],
nzIncluded: [{ type: i0.Input }],
nzRange: [{ type: i0.Input }],
nzVertical: [{ type: i0.Input }],
nzMarks: [{ type: i0.Input }],
nzMax: [{ type: i0.Input }],
nzMin: [{ type: i0.Input }],
nzStep: [{ type: i0.Input }],
nzTooltipVisible: [{ type: i0.Input }],
nzTipFormatter: [{ type: i0.Input }],
nzDefaultValue: [{ type: i0.Input }],
nzOnAfterChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzSliderComponent.prototype, "nzDots", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzSliderComponent.prototype, "nzIncluded", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzSliderComponent.prototype, "nzRange", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzSliderComponent.prototype, "nzVertical", void 0);
return NzSliderComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSliderHandleComponent = /** @class */ (function () {
function NzSliderHandleComponent(sliderComponent, cdr) {
var _this = this;
this.sliderComponent = sliderComponent;
this.cdr = cdr;
this.nzTooltipVisible = 'default';
this.nzActive = false;
this.style = {};
this.hovers_ = new rxjs.Subscription();
this.enterHandle = ( /**
* @return {?}
*/function () {
if (!_this.sliderComponent.isDragging) {
_this.toggleTooltip(true);
_this.updateTooltipPosition();
_this.cdr.detectChanges();
}
});
this.leaveHandle = ( /**
* @return {?}
*/function () {
if (!_this.sliderComponent.isDragging) {
_this.toggleTooltip(false);
_this.cdr.detectChanges();
}
});
}
/**
* @param {?} changes
* @return {?}
*/
NzSliderHandleComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var _this = this;
var nzOffset = changes.nzOffset, nzValue = changes.nzValue, nzActive = changes.nzActive, nzTooltipVisible = changes.nzTooltipVisible;
if (nzOffset) {
this.updateStyle();
}
if (nzValue) {
this.updateTooltipTitle();
this.updateTooltipPosition();
}
if (nzActive) {
if (nzActive.currentValue) {
this.toggleTooltip(true);
}
else {
this.toggleTooltip(false);
}
}
if (nzTooltipVisible && nzTooltipVisible.currentValue === 'always') {
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.toggleTooltip(true, true); }));
}
};
/**
* @return {?}
*/
NzSliderHandleComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.hovers_.unsubscribe();
};
/**
* @private
* @param {?} show
* @param {?=} force
* @return {?}
*/
NzSliderHandleComponent.prototype.toggleTooltip = /**
* @private
* @param {?} show
* @param {?=} force
* @return {?}
*/
function (show, force) {
if (force === void 0) {
force = false;
}
if (!force && (this.nzTooltipVisible !== 'default' || !this.tooltip)) {
return;
}
if (show) {
this.tooltip.show();
}
else {
this.tooltip.hide();
}
};
/**
* @private
* @return {?}
*/
NzSliderHandleComponent.prototype.updateTooltipTitle = /**
* @private
* @return {?}
*/
function () {
this.tooltipTitle = this.nzTipFormatter ? this.nzTipFormatter(this.nzValue) : "" + this.nzValue;
};
/**
* @private
* @return {?}
*/
NzSliderHandleComponent.prototype.updateTooltipPosition = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (this.tooltip) {
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.tooltip.updatePosition(); }));
}
};
/**
* @private
* @return {?}
*/
NzSliderHandleComponent.prototype.updateStyle = /**
* @private
* @return {?}
*/
function () {
this.style[this.nzVertical ? 'bottom' : 'left'] = this.nzOffset + "%";
};
NzSliderHandleComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-slider-handle',
preserveWhitespaces: false,
template: "<nz-tooltip\n *ngIf=\"nzTipFormatter !== null && nzTooltipVisible !== 'never'\"\n [nzTitle]=\"tooltipTitle\"\n [nzTrigger]=\"null\">\n <div nz-tooltip class=\"ant-slider-handle\" [ngStyle]=\"style\"></div>\n</nz-tooltip>\n<div *ngIf=\"nzTipFormatter === null || nzTooltipVisible === 'never'\" class=\"ant-slider-handle\" [ngStyle]=\"style\"></div>\n",
host: {
'(mouseenter)': 'enterHandle()',
'(mouseleave)': 'leaveHandle()'
}
}] }
];
/** @nocollapse */
NzSliderHandleComponent.ctorParameters = function () {
return [
{ type: NzSliderComponent },
{ type: i0.ChangeDetectorRef }
];
};
NzSliderHandleComponent.propDecorators = {
tooltip: [{ type: i0.ViewChild, args: [NzToolTipComponent,] }],
nzVertical: [{ type: i0.Input }],
nzOffset: [{ type: i0.Input }],
nzValue: [{ type: i0.Input }],
nzTooltipVisible: [{ type: i0.Input }],
nzTipFormatter: [{ type: i0.Input }],
nzActive: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderHandleComponent.prototype, "nzActive", void 0);
return NzSliderHandleComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSliderMarksComponent = /** @class */ (function () {
function NzSliderMarksComponent() {
this.nzLowerBound = null;
this.nzUpperBound = null;
this.nzVertical = false;
this.nzIncluded = false;
}
/**
* @param {?} changes
* @return {?}
*/
NzSliderMarksComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzMarksArray) {
this.buildMarks();
}
if (changes.nzMarksArray || changes.nzLowerBound || changes.nzUpperBound) {
this.togglePointActive();
}
};
/**
* @param {?} _index
* @param {?} mark
* @return {?}
*/
NzSliderMarksComponent.prototype.trackById = /**
* @param {?} _index
* @param {?} mark
* @return {?}
*/
function (_index, mark) {
return mark.value;
};
/**
* @private
* @return {?}
*/
NzSliderMarksComponent.prototype.buildMarks = /**
* @private
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var range = this.nzMax - this.nzMin;
this.marks = this.nzMarksArray.map(( /**
* @param {?} mark
* @return {?}
*/function (mark) {
var value = mark.value, offset = mark.offset, config = mark.config;
/** @type {?} */
var style = _this.buildStyles(value, range, config);
/** @type {?} */
var label = isConfigAObject(config) ? config.label : config;
return {
label: label,
offset: offset,
style: style,
value: value,
config: config,
active: false
};
}));
};
/**
* @private
* @param {?} value
* @param {?} range
* @param {?} config
* @return {?}
*/
NzSliderMarksComponent.prototype.buildStyles = /**
* @private
* @param {?} value
* @param {?} range
* @param {?} config
* @return {?}
*/
function (value, range, config) {
/** @type {?} */
var style;
if (this.nzVertical) {
style = {
marginBottom: '-50%',
bottom: (value - this.nzMin) / range * 100 + "%"
};
}
else {
/** @type {?} */
var marksCount = this.nzMarksArray.length;
/** @type {?} */
var unit = 100 / (marksCount - 1);
/** @type {?} */
var markWidth = unit * 0.9;
style = {
width: markWidth + "%",
marginLeft: -markWidth / 2 + "%",
left: (value - this.nzMin) / range * 100 + "%"
};
}
if (isConfigAObject(config) && config.style) {
style = __assign({}, style, config.style);
}
return style;
};
/**
* @private
* @return {?}
*/
NzSliderMarksComponent.prototype.togglePointActive = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (this.marks && this.nzLowerBound !== null && this.nzUpperBound !== null) {
this.marks.forEach(( /**
* @param {?} mark
* @return {?}
*/function (mark) {
/** @type {?} */
var value = mark.value;
/** @type {?} */
var isActive = (!_this.nzIncluded && value === _this.nzUpperBound) ||
(_this.nzIncluded && value <= _this.nzUpperBound && value >= _this.nzLowerBound);
mark.active = isActive;
}));
}
};
NzSliderMarksComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
selector: 'nz-slider-marks',
template: "<div class=\"ant-slider-mark\">\n <span\n class=\"ant-slider-mark-text\"\n *ngFor=\"let attr of marks; trackBy: trackById\"\n [class.ant-slider-mark-active]=\"attr.active\"\n [ngStyle]=\"attr.style\"\n [innerHTML]=\"attr.label\">\n </span>\n</div>"
}] }
];
NzSliderMarksComponent.propDecorators = {
nzLowerBound: [{ type: i0.Input }],
nzUpperBound: [{ type: i0.Input }],
nzMarksArray: [{ type: i0.Input }],
nzMin: [{ type: i0.Input }],
nzMax: [{ type: i0.Input }],
nzVertical: [{ type: i0.Input }],
nzIncluded: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderMarksComponent.prototype, "nzVertical", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderMarksComponent.prototype, "nzIncluded", void 0);
return NzSliderMarksComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSliderStepComponent = /** @class */ (function () {
function NzSliderStepComponent() {
this.nzLowerBound = null;
this.nzUpperBound = null;
this.nzVertical = false;
this.nzIncluded = false;
}
/**
* @param {?} changes
* @return {?}
*/
NzSliderStepComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzMarksArray) {
this.buildSteps();
}
if (changes.nzMarksArray || changes.nzLowerBound || changes.nzUpperBound) {
this.togglePointActive();
}
};
/**
* @param {?} _index
* @param {?} step
* @return {?}
*/
NzSliderStepComponent.prototype.trackById = /**
* @param {?} _index
* @param {?} step
* @return {?}
*/
function (_index, step) {
return step.value;
};
/**
* @private
* @return {?}
*/
NzSliderStepComponent.prototype.buildSteps = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var orient = this.nzVertical ? 'bottom' : 'left';
this.steps = this.nzMarksArray.map(( /**
* @param {?} mark
* @return {?}
*/function (mark) {
var _a;
var value = mark.value, offset = mark.offset, config = mark.config;
return {
value: value,
offset: offset,
config: config,
active: false,
style: (_a = {},
_a[orient] = offset + "%",
_a)
};
}));
};
/**
* @private
* @return {?}
*/
NzSliderStepComponent.prototype.togglePointActive = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (this.steps && this.nzLowerBound !== null && this.nzUpperBound !== null) {
this.steps.forEach(( /**
* @param {?} step
* @return {?}
*/function (step) {
/** @type {?} */
var value = step.value;
/** @type {?} */
var isActive = (!_this.nzIncluded && value === _this.nzUpperBound) ||
(_this.nzIncluded && value <= _this.nzUpperBound && value >= _this.nzLowerBound);
step.active = isActive;
}));
}
};
NzSliderStepComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-slider-step',
preserveWhitespaces: false,
template: "<div class=\"ant-slider-step\">\n <span\n class=\"ant-slider-dot\"\n *ngFor=\"let mark of steps; trackBy: trackById\"\n [class.ant-slider-dot-active]=\"mark.active\"\n [ngStyle]=\"mark.style\">\n </span>\n</div>"
}] }
];
NzSliderStepComponent.propDecorators = {
nzLowerBound: [{ type: i0.Input }],
nzUpperBound: [{ type: i0.Input }],
nzMarksArray: [{ type: i0.Input }],
nzVertical: [{ type: i0.Input }],
nzIncluded: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderStepComponent.prototype, "nzVertical", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderStepComponent.prototype, "nzIncluded", void 0);
return NzSliderStepComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSliderTrackComponent = /** @class */ (function () {
function NzSliderTrackComponent() {
this.nzVertical = false;
this.nzIncluded = false;
this.style = {};
}
/**
* @param {?} changes
* @return {?}
*/
NzSliderTrackComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzIncluded) {
this.style.visibility = this.nzIncluded ? 'visible' : 'hidden';
}
if (changes.nzVertical || changes.nzOffset || changes.nzLength) {
if (this.nzVertical) {
this.style.bottom = this.nzOffset + "%";
this.style.height = this.nzLength + "%";
this.style.left = null;
this.style.width = null;
}
else {
this.style.left = this.nzOffset + "%";
this.style.width = this.nzLength + "%";
this.style.bottom = null;
this.style.height = null;
}
}
};
NzSliderTrackComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-slider-track',
preserveWhitespaces: false,
template: "<div class=\"ant-slider-track\" [ngStyle]=\"style\"></div>"
}] }
];
NzSliderTrackComponent.propDecorators = {
nzOffset: [{ type: i0.Input }],
nzLength: [{ type: i0.Input }],
nzVertical: [{ type: i0.Input }],
nzIncluded: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderTrackComponent.prototype, "nzVertical", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSliderTrackComponent.prototype, "nzIncluded", void 0);
return NzSliderTrackComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSliderModule = /** @class */ (function () {
function NzSliderModule() {
}
NzSliderModule.decorators = [
{ type: i0.NgModule, args: [{
exports: [
NzSliderComponent,
NzSliderTrackComponent,
NzSliderHandleComponent,
NzSliderStepComponent,
NzSliderMarksComponent
],
declarations: [
NzSliderComponent,
NzSliderTrackComponent,
NzSliderHandleComponent,
NzSliderStepComponent,
NzSliderMarksComponent
],
imports: [i2$1.CommonModule, NzToolTipModule]
},] }
];
return NzSliderModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var REFRESH_INTERVAL = 1000 / 30;
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzStatisticComponent = /** @class */ (function () {
function NzStatisticComponent() {
this.nzValueStyle = {};
}
NzStatisticComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-statistic',
template: "<div class=\"ant-statistic-title\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n</div>\n<div class=\"ant-statistic-content\" [ngStyle]=\"nzValueStyle\">\n <span *ngIf=\"nzPrefix\" class=\"ant-statistic-content-prefix\">\n <ng-container *nzStringTemplateOutlet=\"nzPrefix\">{{ nzPrefix }}</ng-container>\n </span>\n <nz-statistic-number\n [nzValue]=\"nzValue\"\n [nzValueTemplate]=\"nzValueTemplate\">\n </nz-statistic-number>\n <span *ngIf=\"nzSuffix\" class=\"ant-statistic-content-suffix\">\n <ng-container *nzStringTemplateOutlet=\"nzSuffix\">{{ nzSuffix }}</ng-container>\n </span>\n</div>\n",
host: {
class: 'ant-statistic'
},
styles: ['nz-statistic { display: block; }']
}] }
];
NzStatisticComponent.propDecorators = {
nzPrefix: [{ type: i0.Input }],
nzSuffix: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzValue: [{ type: i0.Input }],
nzValueStyle: [{ type: i0.Input }],
nzValueTemplate: [{ type: i0.Input }]
};
return NzStatisticComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzCountdownComponent = /** @class */ (function (_super) {
__extends(NzCountdownComponent, _super);
function NzCountdownComponent(cdr, ngZone) {
var _this = _super.call(this) || this;
_this.cdr = cdr;
_this.ngZone = ngZone;
/**
* @override
*/
_this.nzFormat = 'HH:mm:ss';
return _this;
}
/** @override */
/**
* @override
* @param {?} changes
* @return {?}
*/
NzCountdownComponent.prototype.ngOnChanges = /**
* @override
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzValue) {
this.target = Number(changes.nzValue.currentValue);
if (!changes.nzValue.isFirstChange()) {
this.syncTimer();
}
}
};
/**
* @return {?}
*/
NzCountdownComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.syncTimer();
};
/**
* @return {?}
*/
NzCountdownComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.stopTimer();
};
/**
* @return {?}
*/
NzCountdownComponent.prototype.syncTimer = /**
* @return {?}
*/
function () {
if (this.target >= Date.now()) {
this.startTimer();
}
else {
this.stopTimer();
}
};
/**
* @return {?}
*/
NzCountdownComponent.prototype.startTimer = /**
* @return {?}
*/
function () {
var _this = this;
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
_this.stopTimer();
_this.updater_ = rxjs.interval(REFRESH_INTERVAL).subscribe(( /**
* @return {?}
*/function () {
_this.updateValue();
_this.cdr.detectChanges();
}));
}));
};
/**
* @return {?}
*/
NzCountdownComponent.prototype.stopTimer = /**
* @return {?}
*/
function () {
if (this.updater_) {
this.updater_.unsubscribe();
this.updater_ = null;
}
};
/**
* Update time that should be displayed on the screen.
*/
/**
* Update time that should be displayed on the screen.
* @protected
* @return {?}
*/
NzCountdownComponent.prototype.updateValue = /**
* Update time that should be displayed on the screen.
* @protected
* @return {?}
*/
function () {
this.diff = Math.max(this.target - Date.now(), 0);
if (this.diff === 0) {
this.stopTimer();
}
};
NzCountdownComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-countdown',
template: "<nz-statistic\n [nzValue]=\"diff\"\n [nzValueStyle]=\"nzValueStyle\"\n [nzValueTemplate]=\"nzValueTemplate || countDownTpl\"\n [nzTitle]=\"nzTitle\"\n [nzPrefix]=\"nzPrefix\"\n [nzSuffix]=\"nzSuffix\">\n</nz-statistic>\n\n<ng-template #countDownTpl>{{ diff | nzTimeRange: nzFormat }}</ng-template>"
}] }
];
/** @nocollapse */
NzCountdownComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: i0.NgZone }
];
};
NzCountdownComponent.propDecorators = {
nzFormat: [{ type: i0.Input }]
};
return NzCountdownComponent;
}(NzStatisticComponent));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzStatisticNumberComponent = /** @class */ (function () {
function NzStatisticNumberComponent(locale_id) {
this.locale_id = locale_id;
this.displayInt = '';
this.displayDecimal = '';
}
/**
* @return {?}
*/
NzStatisticNumberComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.formatNumber();
};
/**
* @private
* @return {?}
*/
NzStatisticNumberComponent.prototype.formatNumber = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var decimalSeparator = typeof this.nzValue === 'number'
? '.'
: i2$1.getLocaleNumberSymbol(this.locale_id, i2$1.NumberSymbol.Decimal);
/** @type {?} */
var value = String(this.nzValue);
var _a = __read(value.split(decimalSeparator), 2), int = _a[0], decimal = _a[1];
this.displayInt = int;
this.displayDecimal = decimal ? "" + decimalSeparator + decimal : '';
};
NzStatisticNumberComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
selector: 'nz-statistic-number',
template: "<ng-container\n *ngIf=\"nzValueTemplate\"\n [ngTemplateOutlet]=\"nzValueTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: nzValue }\">\n</ng-container>\n<ng-container *ngIf=\"!nzValueTemplate\">\n <span *ngIf=\"displayInt\" class=\"ant-statistic-content-value-int\">{{ displayInt }}</span>\n <span *ngIf=\"displayDecimal\" class=\"ant-statistic-content-value-decimal\">{{ displayDecimal }}</span>\n</ng-container>\n",
host: {
'class': 'ant-statistic-content-value'
},
styles: ['nz-number { display: inline }']
}] }
];
/** @nocollapse */
NzStatisticNumberComponent.ctorParameters = function () {
return [
{ type: String, decorators: [{ type: i0.Inject, args: [i0.LOCALE_ID,] }] }
];
};
NzStatisticNumberComponent.propDecorators = {
nzValue: [{ type: i0.Input }],
nzValueTemplate: [{ type: i0.Input }]
};
return NzStatisticNumberComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTimeRangePipe = /** @class */ (function () {
function NzTimeRangePipe() {
}
/**
* @param {?} value
* @param {?=} format
* @return {?}
*/
NzTimeRangePipe.prototype.transform = /**
* @param {?} value
* @param {?=} format
* @return {?}
*/
function (value, format) {
if (format === void 0) {
format = 'HH:mm:ss';
}
/** @type {?} */
var duration = Number(value || 0);
return timeUnits.reduce(( /**
* @param {?} current
* @param {?} __1
* @return {?}
*/function (current, _a) {
var _b = __read(_a, 2), name = _b[0], unit = _b[1];
if (current.indexOf(name) !== -1) {
/** @type {?} */
var v_1 = Math.floor(duration / unit);
duration -= v_1 * unit;
return current.replace(new RegExp(name + "+", 'g'), ( /**
* @param {?} match
* @return {?}
*/function (match) {
return padStart(v_1.toString(), match.length, '0');
}));
}
return current;
}), format);
};
NzTimeRangePipe.decorators = [
{ type: i0.Pipe, args: [{
name: 'nzTimeRange',
pure: true
},] }
];
return NzTimeRangePipe;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzStatisticModule = /** @class */ (function () {
function NzStatisticModule() {
}
NzStatisticModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, NzAddOnModule],
declarations: [NzStatisticComponent, NzCountdownComponent, NzStatisticNumberComponent, NzTimeRangePipe],
exports: [NzStatisticComponent, NzCountdownComponent, NzStatisticNumberComponent, NzTimeRangePipe]
},] }
];
return NzStatisticModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzStepComponent = /** @class */ (function () {
function NzStepComponent(cdr, renderer, elementRef) {
this.cdr = cdr;
this.isCustomStatus = false;
this._status = 'wait';
this.oldAPIIcon = true;
this.isIconString = true;
// Set by parent.
this.direction = 'horizontal';
this.index = 0;
this.last = false;
this.outStatus = 'process';
this.showProcessDot = false;
this._currentIndex = 0;
renderer.addClass(elementRef.nativeElement, 'ant-steps-item');
}
Object.defineProperty(NzStepComponent.prototype, "nzStatus", {
get: /**
* @return {?}
*/ function () {
return this._status;
},
set: /**
* @param {?} status
* @return {?}
*/ function (status) {
this._status = status;
this.isCustomStatus = true;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzStepComponent.prototype, "nzIcon", {
get: /**
* @return {?}
*/ function () {
return this._icon;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (!(value instanceof i0.TemplateRef)) {
this.isIconString = true;
this.oldAPIIcon = typeof value === 'string' && value.indexOf('anticon') > -1;
}
else {
this.isIconString = false;
}
this._icon = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzStepComponent.prototype, "currentIndex", {
get: /**
* @return {?}
*/ function () {
return this._currentIndex;
},
set: /**
* @param {?} current
* @return {?}
*/ function (current) {
this._currentIndex = current;
if (!this.isCustomStatus) {
this._status = current > this.index
? 'finish'
: current === this.index
? this.outStatus || ''
: 'wait';
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzStepComponent.prototype.markForCheck = /**
* @return {?}
*/
function () {
this.cdr.markForCheck();
};
NzStepComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
selector: 'nz-step',
preserveWhitespaces: false,
template: "<div class=\"ant-steps-item-tail\" *ngIf=\"last !== true\"></div>\n<div class=\"ant-steps-item-icon\">\n <ng-template [ngIf]=\"!showProcessDot\">\n <span class=\"ant-steps-icon\" *ngIf=\"nzStatus === 'finish' && !nzIcon\"><i nz-icon type=\"check\"></i></span>\n <span class=\"ant-steps-icon\" *ngIf=\"nzStatus === 'error'\"><i nz-icon type=\"close\"></i></span>\n <span class=\"ant-steps-icon\" *ngIf=\"(nzStatus === 'process' || nzStatus === 'wait') && !nzIcon\">{{ index + 1 }}</span>\n <span class=\"ant-steps-icon\" *ngIf=\"nzIcon\">\n <ng-container *ngIf=\"isIconString; else iconTemplate\">\n <i nz-icon [type]=\"!oldAPIIcon && nzIcon\" [ngClass]=\"oldAPIIcon && nzIcon\"></i>\n </ng-container>\n <ng-template #iconTemplate>\n <ng-template [ngTemplateOutlet]=\"nzIcon\"></ng-template>\n </ng-template>\n </span>\n </ng-template>\n <ng-template [ngIf]=\"showProcessDot\">\n <span class=\"ant-steps-icon\">\n <ng-template #processDotTemplate>\n <span class=\"ant-steps-icon-dot\"></span>\n </ng-template>\n <ng-template\n [ngTemplateOutlet]=\"customProcessTemplate||processDotTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: processDotTemplate, status:nzStatus, index:index }\">\n </ng-template>\n </span>\n </ng-template>\n</div>\n<div class=\"ant-steps-item-content\">\n <div class=\"ant-steps-item-title\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n <div class=\"ant-steps-item-description\">\n <ng-container *nzStringTemplateOutlet=\"nzDescription\">{{ nzDescription }}</ng-container>\n </div>\n</div>\n",
host: {
'[class.ant-steps-item-wait]': 'nzStatus === "wait"',
'[class.ant-steps-item-process]': 'nzStatus === "process"',
'[class.ant-steps-item-finish]': 'nzStatus === "finish"',
'[class.ant-steps-item-error]': 'nzStatus === "error"',
'[class.ant-steps-custom]': '!!nzIcon',
'[class.ant-steps-next-error]': '(outStatus === "error") && (currentIndex === index + 1)'
}
}] }
];
/** @nocollapse */
NzStepComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzStepComponent.propDecorators = {
processDotTemplate: [{ type: i0.ViewChild, args: ['processDotTemplate',] }],
nzTitle: [{ type: i0.Input }],
nzDescription: [{ type: i0.Input }],
nzStatus: [{ type: i0.Input }],
nzIcon: [{ type: i0.Input }]
};
return NzStepComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzStepsComponent = /** @class */ (function () {
function NzStepsComponent() {
this.nzCurrent = 0;
this.nzDirection = 'horizontal';
this.nzLabelPlacement = 'horizontal';
this.nzSize = 'default';
this.nzStartIndex = 0;
this.nzStatus = 'process';
this.showProcessDot = false;
this.destroy$ = new rxjs.Subject();
}
Object.defineProperty(NzStepsComponent.prototype, "nzProgressDot", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (value instanceof i0.TemplateRef) {
this.showProcessDot = true;
this.customProcessDotTemplate = value;
}
else {
this.showProcessDot = toBoolean(value);
}
this.updateChildrenSteps();
},
enumerable: true,
configurable: true
});
/**
* @param {?} changes
* @return {?}
*/
NzStepsComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzStartIndex || changes.nzDirection || changes.nzStatus || changes.nzCurrent) {
this.updateChildrenSteps();
}
if (changes.nzDirection || changes.nzProgressDot || changes.nzLabelPlacement || changes.nzSize) {
this.setClassMap();
}
};
/**
* @return {?}
*/
NzStepsComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
this.updateChildrenSteps();
};
/**
* @return {?}
*/
NzStepsComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
/**
* @return {?}
*/
NzStepsComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
this.updateChildrenSteps();
if (this.steps) {
this.steps.changes.pipe(operators.takeUntil(this.destroy$)).subscribe(this.updateChildrenSteps);
}
};
/**
* @private
* @return {?}
*/
NzStepsComponent.prototype.updateChildrenSteps = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (this.steps) {
/** @type {?} */
var length_1 = this.steps.length;
this.steps.toArray().forEach(( /**
* @param {?} step
* @param {?} index
* @return {?}
*/function (step, index) {
Promise.resolve().then(( /**
* @return {?}
*/function () {
step.outStatus = _this.nzStatus;
step.showProcessDot = _this.showProcessDot;
if (_this.customProcessDotTemplate) {
step.customProcessTemplate = _this.customProcessDotTemplate;
}
step.direction = _this.nzDirection;
step.index = index + _this.nzStartIndex;
step.currentIndex = _this.nzCurrent;
step.last = length_1 === index + 1;
step.markForCheck();
}));
}));
}
};
/**
* @private
* @return {?}
*/
NzStepsComponent.prototype.setClassMap = /**
* @private
* @return {?}
*/
function () {
var _a;
this.classMap = (_a = {},
_a["ant-steps-" + this.nzDirection] = true,
_a["ant-steps-label-horizontal"] = this.nzDirection === 'horizontal',
_a["ant-steps-label-vertical"] = (this.showProcessDot || this.nzLabelPlacement === 'vertical') && this.nzDirection === 'horizontal',
_a["ant-steps-dot"] = this.showProcessDot,
_a['ant-steps-small'] = this.nzSize === 'small',
_a);
};
NzStepsComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
selector: 'nz-steps',
template: "<div class=\"ant-steps\" [ngClass]=\"classMap\">\n <ng-content></ng-content>\n</div>"
}] }
];
NzStepsComponent.propDecorators = {
steps: [{ type: i0.ContentChildren, args: [NzStepComponent,] }],
nzCurrent: [{ type: i0.Input }],
nzDirection: [{ type: i0.Input }],
nzLabelPlacement: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzStartIndex: [{ type: i0.Input }],
nzStatus: [{ type: i0.Input }],
nzProgressDot: [{ type: i0.Input }]
};
return NzStepsComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzStepsModule = /** @class */ (function () {
function NzStepsModule() {
}
NzStepsModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, NzIconModule, NzAddOnModule],
exports: [NzStepsComponent, NzStepComponent],
declarations: [NzStepsComponent, NzStepComponent]
},] }
];
return NzStepsModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSwitchComponent = /** @class */ (function () {
function NzSwitchComponent(cdr, focusMonitor) {
this.cdr = cdr;
this.focusMonitor = focusMonitor;
this.checked = false;
this.onChange = ( /**
* @return {?}
*/function () { return null; });
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.nzLoading = false;
this.nzDisabled = false;
this.nzControl = false;
}
/**
* @param {?} e
* @return {?}
*/
NzSwitchComponent.prototype.hostClick = /**
* @param {?} e
* @return {?}
*/
function (e) {
e.preventDefault();
if (!this.nzDisabled && !this.nzLoading && !this.nzControl) {
this.updateValue(!this.checked);
}
};
/**
* @param {?} value
* @return {?}
*/
NzSwitchComponent.prototype.updateValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.checked !== value) {
this.checked = value;
this.onChange(this.checked);
}
};
/**
* @param {?} e
* @return {?}
*/
NzSwitchComponent.prototype.onKeyDown = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (!this.nzControl && !this.nzDisabled && !this.nzLoading) {
if (e.keyCode === keycodes.LEFT_ARROW) {
this.updateValue(false);
e.preventDefault();
}
else if (e.keyCode === keycodes.RIGHT_ARROW) {
this.updateValue(true);
e.preventDefault();
}
else if (e.keyCode === keycodes.SPACE || e.keyCode === keycodes.ENTER) {
this.updateValue(!this.checked);
e.preventDefault();
}
}
};
/**
* @return {?}
*/
NzSwitchComponent.prototype.focus = /**
* @return {?}
*/
function () {
this.focusMonitor.focusVia(this.switchElement.nativeElement, 'keyboard');
};
/**
* @return {?}
*/
NzSwitchComponent.prototype.blur = /**
* @return {?}
*/
function () {
this.switchElement.nativeElement.blur();
};
/**
* @return {?}
*/
NzSwitchComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
this.focusMonitor.monitor(this.switchElement.nativeElement, true).subscribe(( /**
* @param {?} focusOrigin
* @return {?}
*/function (focusOrigin) {
if (!focusOrigin) {
// When a focused element becomes disabled, the browser *immediately* fires a blur event.
// Angular does not expect events to be raised during change detection, so any state change
// (such as a form control's 'ng-touched') will cause a changed-after-checked error.
// See https://github.com/angular/angular/issues/17793. To work around this, we defer
// telling the form control it has been touched until the next tick.
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.onTouched(); }));
}
}));
};
/**
* @param {?} value
* @return {?}
*/
NzSwitchComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.checked = value;
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzSwitchComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzSwitchComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzSwitchComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.cdr.markForCheck();
};
NzSwitchComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-switch',
preserveWhitespaces: false,
template: "<button type=\"button\" #switchElement\n nz-wave\n class=\"ant-switch\"\n [disabled]=\"nzDisabled\"\n [class.ant-switch-checked]=\"checked\"\n [class.ant-switch-loading]=\"nzLoading\"\n [class.ant-switch-disabled]=\"nzDisabled\"\n [class.ant-switch-small]=\"nzSize === 'small'\"\n [nzWaveExtraNode]=\"true\"\n (keydown)=\"onKeyDown($event)\">\n <i *ngIf=\"nzLoading\" nz-icon type=\"loading\" class=\"ant-switch-loading-icon\"></i>\n <span class=\"ant-switch-inner\">\n <span>\n <ng-container *ngIf=\"checked\">\n <ng-container *nzStringTemplateOutlet=\"nzCheckedChildren\">{{ nzCheckedChildren }}</ng-container>\n </ng-container>\n <ng-container *ngIf=\"!checked\">\n <ng-container *nzStringTemplateOutlet=\"nzUnCheckedChildren\">{{ nzUnCheckedChildren }}</ng-container>\n </ng-container>\n </span>\n </span>\n</button>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
providers: [
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzSwitchComponent; })),
multi: true
}
],
host: {
'(click)': 'hostClick($event)'
},
styles: ["\n nz-switch {\n display: inline-block;\n }"]
}] }
];
/** @nocollapse */
NzSwitchComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: a11y.FocusMonitor }
];
};
NzSwitchComponent.propDecorators = {
switchElement: [{ type: i0.ViewChild, args: ['switchElement',] }],
nzLoading: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzControl: [{ type: i0.Input }],
nzCheckedChildren: [{ type: i0.Input }],
nzUnCheckedChildren: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSwitchComponent.prototype, "nzLoading", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSwitchComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzSwitchComponent.prototype, "nzControl", void 0);
return NzSwitchComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzSwitchModule = /** @class */ (function () {
function NzSwitchModule() {
}
NzSwitchModule.decorators = [
{ type: i0.NgModule, args: [{
exports: [NzSwitchComponent],
declarations: [NzSwitchComponent],
imports: [i2$1.CommonModule, NzWaveModule, NzIconModule, NzAddOnModule]
},] }
];
return NzSwitchModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzMeasureScrollbarService = /** @class */ (function () {
// tslint:disable-next-line:no-any
function NzMeasureScrollbarService(document) {
this.document = document;
this.scrollbarMeasure = {
position: 'absolute',
top: '-9999px',
width: '50px',
height: '50px',
overflow: 'scroll'
};
this.initScrollBarWidth();
}
Object.defineProperty(NzMeasureScrollbarService.prototype, "scrollBarWidth", {
get: /**
* @return {?}
*/ function () {
if (isNotNil(this._scrollbarWidth)) {
return this._scrollbarWidth;
}
this.initScrollBarWidth();
return this._scrollbarWidth;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzMeasureScrollbarService.prototype.initScrollBarWidth = /**
* @return {?}
*/
function () {
/** @type {?} */
var scrollDiv = this.document.createElement('div');
for (var scrollProp in this.scrollbarMeasure) {
if (this.scrollbarMeasure.hasOwnProperty(scrollProp)) {
scrollDiv.style[scrollProp] = this.scrollbarMeasure[scrollProp];
}
}
this.document.body.appendChild(scrollDiv);
/** @type {?} */
var width = scrollDiv.offsetWidth - scrollDiv.clientWidth;
this.document.body.removeChild(scrollDiv);
this._scrollbarWidth = width;
};
NzMeasureScrollbarService.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
NzMeasureScrollbarService.ctorParameters = function () {
return [
{ type: undefined, decorators: [{ type: i0.Inject, args: [i2$1.DOCUMENT,] }] }
];
};
/** @nocollapse */ NzMeasureScrollbarService.ngInjectableDef = i0.defineInjectable({ factory: function NzMeasureScrollbarService_Factory() { return new NzMeasureScrollbarService(i0.inject(i2$1.DOCUMENT)); }, token: NzMeasureScrollbarService, providedIn: "root" });
return NzMeasureScrollbarService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzThComponent = /** @class */ (function () {
function NzThComponent(cdr, i18n) {
this.cdr = cdr;
this.i18n = i18n;
this.hasFilterValue = false;
this.filterVisible = false;
this.multipleFilterList = [];
this.singleFilterList = [];
/* tslint:disable-next-line:no-any */
this.locale = ( /** @type {?} */({}));
this.nzWidthChange$ = new rxjs.Subject();
this.destroy$ = new rxjs.Subject();
this.hasDefaultFilter = false;
/* tslint:disable-next-line:no-any */
this.nzSelections = [];
this.nzChecked = false;
this.nzDisabled = false;
this.nzIndeterminate = false;
this.nzFilterMultiple = true;
this.nzSort = null;
this.nzFilters = [];
this.nzExpand = false;
this.nzShowCheckbox = false;
this.nzCustomFilter = false;
this.nzShowSort = false;
this.nzShowFilter = false;
this.nzShowRowSelection = false;
this.nzCheckedChange = new i0.EventEmitter();
this.nzSortChange = new i0.EventEmitter();
this.nzSortChangeWithKey = new i0.EventEmitter();
/* tslint:disable-next-line:no-any */
this.nzFilterChange = new i0.EventEmitter();
}
/**
* @return {?}
*/
NzThComponent.prototype.updateSortValue = /**
* @return {?}
*/
function () {
if (this.nzShowSort) {
if (this.nzSort === 'descend') {
this.setSortValue('ascend');
}
else if (this.nzSort === 'ascend') {
this.setSortValue(null);
}
else {
this.setSortValue('descend');
}
}
};
/**
* @param {?} value
* @return {?}
*/
NzThComponent.prototype.setSortValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.nzSort = value;
this.nzSortChangeWithKey.emit({ key: this.nzSortKey, value: this.nzSort });
this.nzSortChange.emit(this.nzSort);
};
Object.defineProperty(NzThComponent.prototype, "filterList", {
get: /**
* @return {?}
*/ function () {
return this.multipleFilterList.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.checked; })).map(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.value; }));
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzThComponent.prototype, "filterValue", {
/* tslint:disable-next-line:no-any */
get: /* tslint:disable-next-line:no-any */
/**
* @return {?}
*/
function () {
/** @type {?} */
var checkedFilter = this.singleFilterList.find(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.checked; }));
return checkedFilter ? checkedFilter.value : null;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzThComponent.prototype.updateFilterStatus = /**
* @return {?}
*/
function () {
if (this.nzFilterMultiple) {
this.hasFilterValue = this.filterList.length > 0;
}
else {
this.hasFilterValue = isNotNil(this.filterValue);
}
};
/**
* @return {?}
*/
NzThComponent.prototype.search = /**
* @return {?}
*/
function () {
this.updateFilterStatus();
if (this.nzFilterMultiple) {
this.nzFilterChange.emit(this.filterList);
}
else {
this.nzFilterChange.emit(this.filterValue);
}
};
/**
* @return {?}
*/
NzThComponent.prototype.reset = /**
* @return {?}
*/
function () {
this.initMultipleFilterList(true);
this.initSingleFilterList(true);
this.hasFilterValue = false;
};
/**
* @param {?} filter
* @return {?}
*/
NzThComponent.prototype.checkMultiple = /**
* @param {?} filter
* @return {?}
*/
function (filter) {
filter.checked = !filter.checked;
};
/**
* @param {?} filter
* @return {?}
*/
NzThComponent.prototype.checkSingle = /**
* @param {?} filter
* @return {?}
*/
function (filter) {
this.singleFilterList.forEach(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.checked = item === filter; }));
};
/**
* @return {?}
*/
NzThComponent.prototype.hideDropDown = /**
* @return {?}
*/
function () {
this.nzDropDownComponent.setVisibleStateWhen(false);
this.filterVisible = false;
};
/**
* @param {?} value
* @return {?}
*/
NzThComponent.prototype.dropDownVisibleChange = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.filterVisible = value;
if (!value) {
this.search();
}
};
/**
* @param {?=} force
* @return {?}
*/
NzThComponent.prototype.initMultipleFilterList = /**
* @param {?=} force
* @return {?}
*/
function (force) {
var _this = this;
this.multipleFilterList = this.nzFilters.map(( /**
* @param {?} item
* @return {?}
*/function (item) {
/** @type {?} */
var checked = force ? false : !!item.byDefault;
if (checked) {
_this.hasDefaultFilter = true;
}
return { text: item.text, value: item.value, checked: checked };
}));
this.checkDefaultFilters();
};
/**
* @param {?=} force
* @return {?}
*/
NzThComponent.prototype.initSingleFilterList = /**
* @param {?=} force
* @return {?}
*/
function (force) {
var _this = this;
this.singleFilterList = this.nzFilters.map(( /**
* @param {?} item
* @return {?}
*/function (item) {
/** @type {?} */
var checked = force ? false : !!item.byDefault;
if (checked) {
_this.hasDefaultFilter = true;
}
return { text: item.text, value: item.value, checked: checked };
}));
this.checkDefaultFilters();
};
/**
* @return {?}
*/
NzThComponent.prototype.checkDefaultFilters = /**
* @return {?}
*/
function () {
if (!this.nzFilters || this.nzFilters.length === 0 || !this.hasDefaultFilter) {
return;
}
this.updateFilterStatus();
};
/**
* @return {?}
*/
NzThComponent.prototype.marForCheck = /**
* @return {?}
*/
function () {
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzThComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.i18n.localeChange.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.locale = _this.i18n.getLocaleData('Table');
_this.cdr.markForCheck();
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzThComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzFilters) {
this.initMultipleFilterList();
this.initSingleFilterList();
this.updateFilterStatus();
}
if (changes.nzWidth) {
this.nzWidthChange$.next(this.nzWidth);
}
};
/**
* @return {?}
*/
NzThComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzThComponent.decorators = [
{ type: i0.Component, args: [{
// tslint:disable-next-line:component-selector
selector: 'th:not(.nz-disable-th)',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-template #checkboxTemplate>\n <label nz-checkbox\n [class.ant-table-selection-select-all-custom]=\"nzShowRowSelection\"\n [(ngModel)]=\"nzChecked\"\n [nzDisabled]=\"nzDisabled\"\n [nzIndeterminate]=\"nzIndeterminate\"\n (ngModelChange)=\"nzCheckedChange.emit($event)\">\n </label>\n</ng-template>\n<div [class.ant-table-column-sorters]=\"nzShowSort\" (click)=\"updateSortValue()\">\n <div class=\"ant-table-selection\" *ngIf=\"nzShowRowSelection\">\n <ng-container *ngIf=\"nzShowCheckbox\">\n <ng-template [ngTemplateOutlet]=\"checkboxTemplate\"></ng-template>\n </ng-container>\n <nz-dropdown nzPlacement=\"bottomLeft\">\n <div nz-dropdown class=\"ant-table-selection-down\">\n <i nz-icon type=\"down\"></i>\n </div>\n <ul nz-menu class=\"ant-table-selection-menu\">\n <li nz-menu-item *ngFor=\"let selection of nzSelections\" (click)=\"selection.onSelect()\">{{selection.text}}</li>\n </ul>\n </nz-dropdown>\n </div>\n <ng-container *ngIf=\"nzShowCheckbox && !nzShowRowSelection\">\n <ng-template [ngTemplateOutlet]=\"checkboxTemplate\"></ng-template>\n </ng-container>\n <ng-content></ng-content>\n <div class=\"ant-table-column-sorter\" *ngIf=\"nzShowSort\">\n <i nz-icon\n type=\"caret-up\"\n class=\"ant-table-column-sorter-up\"\n [class.on]=\"nzSort == 'ascend'\"\n [class.off]=\"nzSort != 'ascend'\"></i>\n <i nz-icon\n type=\"caret-down\"\n class=\"ant-table-column-sorter-down\"\n [class.on]=\"nzSort == 'descend'\"\n [class.off]=\"nzSort != 'descend'\"></i>\n </div>\n</div>\n<nz-dropdown nzTrigger=\"click\" *ngIf=\"nzShowFilter\" [nzClickHide]=\"false\" nzTableFilter (nzVisibleChange)=\"dropDownVisibleChange($event)\">\n <i nz-icon type=\"filter\" theme=\"fill\" [class.ant-table-filter-selected]=\"hasFilterValue\" [class.ant-table-filter-open]=\"filterVisible\" nz-dropdown></i>\n <ul nz-menu>\n <ng-container *ngIf=\"nzFilterMultiple\">\n <li nz-menu-item *ngFor=\"let filter of multipleFilterList\" (click)=\"checkMultiple(filter)\">\n <label nz-checkbox [ngModel]=\"filter.checked\" (ngModelChange)=\"checkMultiple(filter)\"></label><span>{{filter.text}}</span>\n </li>\n </ng-container>\n <ng-container *ngIf=\"!nzFilterMultiple\">\n <li nz-menu-item *ngFor=\"let filter of singleFilterList\" (click)=\"checkSingle(filter)\">\n <label nz-radio [ngModel]=\"filter.checked\" (ngModelChange)=\"checkSingle(filter)\">{{filter.text}}</label>\n </li>\n </ng-container>\n </ul>\n <div class=\"ant-table-filter-dropdown-btns\">\n <a class=\"ant-table-filter-dropdown-link confirm\" (click)=\"hideDropDown()\">\n <span>{{ locale.filterConfirm }}</span>\n </a>\n <a class=\"ant-table-filter-dropdown-link clear\" (click)=\"reset();hideDropDown()\">\n <span>{{ locale.filterReset }}</span>\n </a>\n </div>\n</nz-dropdown>\n",
host: {
'[class.ant-table-column-has-actions]': 'nzShowFilter || nzShowSort || nzCustomFilter',
'[class.ant-table-column-has-filters]': 'nzShowFilter || nzCustomFilter',
'[class.ant-table-column-has-sorters]': 'nzShowSort',
'[class.ant-table-selection-column-custom]': 'nzShowRowSelection',
'[class.ant-table-selection-column]': 'nzShowCheckbox',
'[class.ant-table-expand-icon-th]': 'nzExpand',
'[class.ant-table-th-left-sticky]': 'nzLeft',
'[class.ant-table-th-right-sticky]': 'nzRight',
'[class.ant-table-column-sort]': "nzSort === 'descend' || nzSort === 'ascend'",
'[style.left]': 'nzLeft',
'[style.right]': 'nzRight',
'[style.text-align]': 'nzAlign'
}
}] }
];
/** @nocollapse */
NzThComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzI18nService$$1 }
];
};
NzThComponent.propDecorators = {
nzDropDownComponent: [{ type: i0.ViewChild, args: [NzDropDownComponent,] }],
nzSelections: [{ type: i0.Input }],
nzChecked: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzIndeterminate: [{ type: i0.Input }],
nzSortKey: [{ type: i0.Input }],
nzFilterMultiple: [{ type: i0.Input }],
nzWidth: [{ type: i0.Input }],
nzLeft: [{ type: i0.Input }],
nzRight: [{ type: i0.Input }],
nzAlign: [{ type: i0.Input }],
nzSort: [{ type: i0.Input }],
nzFilters: [{ type: i0.Input }],
nzExpand: [{ type: i0.Input }],
nzShowCheckbox: [{ type: i0.Input }],
nzCustomFilter: [{ type: i0.Input }],
nzShowSort: [{ type: i0.Input }],
nzShowFilter: [{ type: i0.Input }],
nzShowRowSelection: [{ type: i0.Input }],
nzCheckedChange: [{ type: i0.Output }],
nzSortChange: [{ type: i0.Output }],
nzSortChangeWithKey: [{ type: i0.Output }],
nzFilterChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThComponent.prototype, "nzExpand", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThComponent.prototype, "nzShowCheckbox", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThComponent.prototype, "nzCustomFilter", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThComponent.prototype, "nzShowSort", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThComponent.prototype, "nzShowFilter", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzThComponent.prototype, "nzShowRowSelection", void 0);
return NzThComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzVirtualScrollDirective = /** @class */ (function () {
/* tslint:disable-next-line:no-any */
function NzVirtualScrollDirective(templateRef) {
this.templateRef = templateRef;
}
NzVirtualScrollDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-virtual-scroll]'
},] }
];
/** @nocollapse */
NzVirtualScrollDirective.ctorParameters = function () {
return [
{ type: i0.TemplateRef }
];
};
return NzVirtualScrollDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTableComponent = /** @class */ (function () {
function NzTableComponent(renderer, ngZone, cdr, nzMeasureScrollbarService, i18n, elementRef) {
this.renderer = renderer;
this.ngZone = ngZone;
this.cdr = cdr;
this.nzMeasureScrollbarService = nzMeasureScrollbarService;
this.i18n = i18n;
/**
* public data for ngFor tr
*/
this.data = [];
/* tslint:disable-next-line:no-any */
this.locale = {};
this.lastScrollLeft = 0;
this.headerBottomStyle = {};
this.destroy$ = new rxjs.Subject();
this.nzSize = 'default';
this.nzPageSizeOptions = [10, 20, 30, 40, 50];
this.nzVirtualScroll = false;
this.nzVirtualItemSize = 0;
this.nzVirtualMaxBufferPx = 200;
this.nzVirtualMinBufferPx = 100;
this.nzLoadingDelay = 0;
this.nzTotal = 0;
this.nzWidthConfig = [];
this.nzPageIndex = 1;
this.nzPageSize = 10;
this.nzData = [];
this.nzPaginationPosition = 'bottom';
this.nzScroll = { x: null, y: null };
this.nzFrontPagination = true;
this.nzTemplateMode = false;
this.nzBordered = false;
this.nzShowPagination = true;
this.nzLoading = false;
this.nzShowSizeChanger = false;
this.nzHideOnSinglePage = false;
this.nzShowQuickJumper = false;
this.nzSimple = false;
this.nzPageSizeChange = new i0.EventEmitter();
this.nzPageIndexChange = new i0.EventEmitter();
/* tslint:disable-next-line:no-any */
this.nzCurrentPageDataChange = new i0.EventEmitter();
renderer.addClass(elementRef.nativeElement, 'ant-table-wrapper');
}
Object.defineProperty(NzTableComponent.prototype, "tableBodyNativeElement", {
get: /**
* @return {?}
*/ function () {
return this.tableBodyElement && this.tableBodyElement.nativeElement;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTableComponent.prototype, "tableHeaderNativeElement", {
get: /**
* @return {?}
*/ function () {
return this.tableHeaderElement && this.tableHeaderElement.nativeElement;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTableComponent.prototype, "cdkVirtualScrollNativeElement", {
get: /**
* @return {?}
*/ function () {
return this.cdkVirtualScrollElement && this.cdkVirtualScrollElement.nativeElement;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTableComponent.prototype, "mixTableBodyNativeElement", {
get: /**
* @return {?}
*/ function () {
return this.tableBodyNativeElement || this.cdkVirtualScrollNativeElement;
},
enumerable: true,
configurable: true
});
/**
* @param {?} size
* @param {?} index
* @return {?}
*/
NzTableComponent.prototype.emitPageSizeOrIndex = /**
* @param {?} size
* @param {?} index
* @return {?}
*/
function (size, index) {
if (this.nzPageSize !== size || this.nzPageIndex !== index) {
if (this.nzPageSize !== size) {
this.nzPageSize = size;
this.nzPageSizeChange.emit(this.nzPageSize);
}
if (this.nzPageIndex !== index) {
this.nzPageIndex = index;
this.nzPageIndexChange.emit(this.nzPageIndex);
}
this.updateFrontPaginationDataIfNeeded(this.nzPageSize !== size);
}
};
/**
* @param {?} e
* @return {?}
*/
NzTableComponent.prototype.syncScrollTable = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (e.currentTarget === e.target) {
/** @type {?} */
var target = ( /** @type {?} */(e.target));
if (target.scrollLeft !== this.lastScrollLeft && this.nzScroll && this.nzScroll.x) {
if (target === this.mixTableBodyNativeElement && this.tableHeaderNativeElement) {
this.tableHeaderNativeElement.scrollLeft = target.scrollLeft;
}
else if (target === this.tableHeaderNativeElement && this.mixTableBodyNativeElement) {
this.mixTableBodyNativeElement.scrollLeft = target.scrollLeft;
}
this.setScrollPositionClassName();
}
this.lastScrollLeft = target.scrollLeft;
}
};
/**
* @return {?}
*/
NzTableComponent.prototype.setScrollPositionClassName = /**
* @return {?}
*/
function () {
if (this.mixTableBodyNativeElement && this.nzScroll && this.nzScroll.x) {
if ((this.mixTableBodyNativeElement.scrollWidth === this.mixTableBodyNativeElement.clientWidth) && (this.mixTableBodyNativeElement.scrollWidth !== 0)) {
this.setScrollName();
}
else if (this.mixTableBodyNativeElement.scrollLeft === 0) {
this.setScrollName('left');
}
else if (this.mixTableBodyNativeElement.scrollWidth === (this.mixTableBodyNativeElement.scrollLeft + this.mixTableBodyNativeElement.clientWidth)) {
this.setScrollName('right');
}
else {
this.setScrollName('middle');
}
}
};
/**
* @param {?=} position
* @return {?}
*/
NzTableComponent.prototype.setScrollName = /**
* @param {?=} position
* @return {?}
*/
function (position) {
var _this = this;
/** @type {?} */
var prefix = 'ant-table-scroll-position';
/** @type {?} */
var classList = ['left', 'right', 'middle'];
classList.forEach(( /**
* @param {?} name
* @return {?}
*/function (name) {
_this.renderer.removeClass(_this.tableMainElement.nativeElement, prefix + "-" + name);
}));
if (position) {
this.renderer.addClass(this.tableMainElement.nativeElement, prefix + "-" + position);
}
};
/**
* @return {?}
*/
NzTableComponent.prototype.fitScrollBar = /**
* @return {?}
*/
function () {
/** @type {?} */
var scrollbarWidth = this.nzMeasureScrollbarService.scrollBarWidth;
if (scrollbarWidth) {
this.headerBottomStyle = {
marginBottom: "-" + scrollbarWidth + "px",
paddingBottom: "0px"
};
this.cdr.markForCheck();
}
};
/**
* @param {?=} isPageSizeOrDataChange
* @return {?}
*/
NzTableComponent.prototype.updateFrontPaginationDataIfNeeded = /**
* @param {?=} isPageSizeOrDataChange
* @return {?}
*/
function (isPageSizeOrDataChange) {
var _this = this;
if (isPageSizeOrDataChange === void 0) {
isPageSizeOrDataChange = false;
}
/** @type {?} */
var data = [];
if (this.nzFrontPagination) {
this.nzTotal = this.nzData.length;
if (isPageSizeOrDataChange) {
/** @type {?} */
var maxPageIndex = Math.ceil(this.nzData.length / this.nzPageSize) || 1;
/** @type {?} */
var pageIndex_1 = this.nzPageIndex > maxPageIndex ? maxPageIndex : this.nzPageIndex;
if (pageIndex_1 !== this.nzPageIndex) {
this.nzPageIndex = pageIndex_1;
Promise.resolve().then(( /**
* @return {?}
*/function () { return _this.nzPageIndexChange.emit(pageIndex_1); }));
}
}
data = this.nzData.slice((this.nzPageIndex - 1) * this.nzPageSize, this.nzPageIndex * this.nzPageSize);
}
else {
data = this.nzData;
}
this.data = __spread(data);
this.nzCurrentPageDataChange.next(this.data);
};
/**
* @return {?}
*/
NzTableComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.i18n.localeChange.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.locale = _this.i18n.getLocaleData('Table');
_this.cdr.markForCheck();
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzTableComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzScroll) {
if (changes.nzScroll.currentValue) {
this.nzScroll = changes.nzScroll.currentValue;
}
else {
this.nzScroll = { x: null, y: null };
}
this.setScrollPositionClassName();
}
if (changes.nzPageIndex || changes.nzPageSize || changes.nzFrontPagination || changes.nzData) {
this.updateFrontPaginationDataIfNeeded(!!(changes.nzPageSize || changes.nzData));
}
};
/**
* @return {?}
*/
NzTableComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
var _this = this;
setTimeout(( /**
* @return {?}
*/function () { return _this.setScrollPositionClassName(); }));
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
rxjs.merge(_this.tableHeaderNativeElement ? rxjs.fromEvent(_this.tableHeaderNativeElement, 'scroll') : rxjs.EMPTY, _this.mixTableBodyNativeElement ? rxjs.fromEvent(_this.mixTableBodyNativeElement, 'scroll') : rxjs.EMPTY).pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.syncScrollTable(data);
}));
rxjs.fromEvent(window, 'resize').pipe(operators.startWith(true), operators.takeUntil(_this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.fitScrollBar();
_this.setScrollPositionClassName();
}));
}));
};
/**
* @return {?}
*/
NzTableComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.listOfNzThComponent.changes.pipe(operators.startWith(true), operators.flatMap(( /**
* @return {?}
*/function () {
return rxjs.merge.apply(void 0, __spread([_this.listOfNzThComponent.changes], _this.listOfNzThComponent.map(( /**
* @param {?} th
* @return {?}
*/function (th) { return th.nzWidthChange$; }))));
})), operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzTableComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzTableComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-table',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-template #renderItemTemplate let-type let-page=\"page\">\n <a class=\"ant-pagination-item-link\" *ngIf=\"type==='pre'\"><i nz-icon type=\"left\"></i></a>\n <a class=\"ant-pagination-item-link\" *ngIf=\"type==='next'\"><i nz-icon type=\"right\"></i></a>\n <a *ngIf=\"type=='page'\">{{ page }}</a>\n</ng-template>\n<ng-template #colGroupTemplate>\n <colgroup>\n <col [style.width]=\"width\" [style.minWidth]=\"width\" *ngFor=\"let width of nzWidthConfig\">\n <col [style.width]=\"th.nzWidth\" [style.minWidth]=\"th.nzWidth\" *ngFor=\"let th of listOfNzThComponent\">\n </colgroup>\n</ng-template>\n<ng-template #headerTemplate>\n <ng-template [ngTemplateOutlet]=\"colGroupTemplate\"></ng-template>\n <thead class=\"ant-table-thead\" *ngIf=\"!nzScroll.y\">\n <ng-template [ngTemplateOutlet]=\"nzTheadComponent?.templateRef\"></ng-template>\n </thead>\n</ng-template>\n<ng-template #tableInnerTemplate>\n <div #tableHeaderElement\n *ngIf=\"nzScroll.x || nzScroll.y\"\n [ngStyle]=\"headerBottomStyle\"\n class=\"ant-table-header\">\n <table [class.ant-table-fixed]=\"nzScroll.x\" [style.width]=\"nzScroll.x\">\n <ng-template [ngTemplateOutlet]=\"colGroupTemplate\"></ng-template>\n <thead class=\"ant-table-thead\" *ngIf=\"nzScroll.y\">\n <ng-template [ngTemplateOutlet]=\"nzTheadComponent?.templateRef\"></ng-template>\n </thead>\n </table>\n </div>\n <div #tableBodyElement *ngIf=\"!nzVirtualScroll;else scrollViewTpl\"\n class=\"ant-table-body\"\n [style.maxHeight]=\"nzScroll.y\"\n [style.overflow-y]=\"nzScroll.y ? 'scroll' : ''\"\n [style.overflow-x]=\"nzScroll.x ? 'auto' : ''\">\n <table [class.ant-table-fixed]=\"nzScroll.x\" [style.width]=\"nzScroll.x\">\n <ng-template [ngIf]=\"!nzVirtualScroll\" [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n <ng-content></ng-content>\n </table>\n </div>\n <ng-template #scrollViewTpl>\n <cdk-virtual-scroll-viewport\n class=\"ant-table-body\"\n [itemSize]=\"nzVirtualItemSize\"\n [maxBufferPx]=\"nzVirtualMaxBufferPx\"\n [minBufferPx]=\"nzVirtualMinBufferPx\"\n [style.height]=\"nzScroll.y\">\n <table [class.ant-table-fixed]=\"nzScroll.x\" [style.width]=\"nzScroll.x\">\n <ng-template [ngIf]=\"nzVirtualScroll\" [ngTemplateOutlet]=\"headerTemplate\"></ng-template>\n <tbody>\n <ng-container *cdkVirtualFor=\"let item of data; let i = index\">\n <ng-template [ngTemplateOutlet]=\"nzVirtualScrollDirective?.templateRef\" [ngTemplateOutletContext]=\"{$implicit:item, index:i}\"></ng-template>\n </ng-container>\n </tbody>\n </table>\n </cdk-virtual-scroll-viewport>\n </ng-template>\n <div class=\"ant-table-placeholder\" *ngIf=\"data.length === 0 && !nzLoading && !nzTemplateMode\">\n <nz-embed-empty [nzComponentName]=\"'table'\" [specificContent]=\"nzNoResult\"></nz-embed-empty>\n </div>\n <div class=\"ant-table-footer\" *ngIf=\"nzFooter\">\n <ng-container *nzStringTemplateOutlet=\"nzFooter\">{{ nzFooter }}</ng-container>\n </div>\n</ng-template>\n<ng-template #paginationTemplate>\n <nz-pagination *ngIf=\"nzShowPagination && data.length\"\n [nzInTable]=\"true\"\n [nzShowSizeChanger]=\"nzShowSizeChanger\"\n [nzPageSizeOptions]=\"nzPageSizeOptions\"\n [nzItemRender]=\"nzItemRender\"\n [nzShowQuickJumper]=\"nzShowQuickJumper\"\n [nzHideOnSinglePage]=\"nzHideOnSinglePage\"\n [nzShowTotal]=\"nzShowTotal\"\n [nzSize]=\"(nzSize === 'middle' || nzSize=='small') ? 'small' : ''\"\n [nzPageSize]=\"nzPageSize\"\n [nzTotal]=\"nzTotal\"\n [nzSimple]=\"nzSimple\"\n [nzPageIndex]=\"nzPageIndex\"\n (nzPageSizeChange)=\"emitPageSizeOrIndex($event,nzPageIndex)\"\n (nzPageIndexChange)=\"emitPageSizeOrIndex(nzPageSize,$event)\">\n </nz-pagination>\n</ng-template>\n<nz-spin [nzDelay]=\"nzLoadingDelay\" [nzSpinning]=\"nzLoading\">\n <ng-container *ngIf=\"nzPaginationPosition === 'both' || nzPaginationPosition === 'top'\">\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\n </ng-container>\n <div #tableMainElement\n class=\"ant-table\"\n [class.ant-table-fixed-header]=\"nzScroll.x || nzScroll.y\"\n [class.ant-table-bordered]=\"nzBordered\"\n [class.ant-table-default]=\"nzSize === 'default'\"\n [class.ant-table-middle]=\"nzSize === 'middle'\"\n [class.ant-table-small]=\"nzSize === 'small'\">\n <div class=\"ant-table-title\" *ngIf=\"nzTitle\">\n <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n </div>\n <div class=\"ant-table-content\">\n <ng-container *ngIf=\"nzScroll.x || nzScroll.y; else tableInnerTemplate\">\n <div class=\"ant-table-scroll\">\n <ng-template [ngTemplateOutlet]=\"tableInnerTemplate\"></ng-template>\n </div>\n </ng-container>\n </div>\n </div>\n <ng-container *ngIf=\"nzPaginationPosition === 'both' || nzPaginationPosition === 'bottom'\">\n <ng-template [ngTemplateOutlet]=\"paginationTemplate\"></ng-template>\n </ng-container>\n</nz-spin>\n",
host: {
'[class.ant-table-empty]': 'data.length === 0'
},
styles: ["\n nz-table {\n display: block\n }\n "]
}] }
];
/** @nocollapse */
NzTableComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.NgZone },
{ type: i0.ChangeDetectorRef },
{ type: NzMeasureScrollbarService },
{ type: NzI18nService$$1 },
{ type: i0.ElementRef }
];
};
NzTableComponent.propDecorators = {
listOfNzThComponent: [{ type: i0.ContentChildren, args: [NzThComponent, { descendants: true },] }],
tableHeaderElement: [{ type: i0.ViewChild, args: ['tableHeaderElement', { read: i0.ElementRef },] }],
tableBodyElement: [{ type: i0.ViewChild, args: ['tableBodyElement', { read: i0.ElementRef },] }],
tableMainElement: [{ type: i0.ViewChild, args: ['tableMainElement', { read: i0.ElementRef },] }],
cdkVirtualScrollElement: [{ type: i0.ViewChild, args: [scrolling.CdkVirtualScrollViewport, { read: i0.ElementRef },] }],
nzVirtualScrollDirective: [{ type: i0.ContentChild, args: [NzVirtualScrollDirective,] }],
nzSize: [{ type: i0.Input }],
nzShowTotal: [{ type: i0.Input }],
nzPageSizeOptions: [{ type: i0.Input }],
nzVirtualScroll: [{ type: i0.Input }],
nzVirtualItemSize: [{ type: i0.Input }],
nzVirtualMaxBufferPx: [{ type: i0.Input }],
nzVirtualMinBufferPx: [{ type: i0.Input }],
nzLoadingDelay: [{ type: i0.Input }],
nzTotal: [{ type: i0.Input }],
nzTitle: [{ type: i0.Input }],
nzFooter: [{ type: i0.Input }],
nzNoResult: [{ type: i0.Input }],
nzWidthConfig: [{ type: i0.Input }],
nzPageIndex: [{ type: i0.Input }],
nzPageSize: [{ type: i0.Input }],
nzData: [{ type: i0.Input }],
nzPaginationPosition: [{ type: i0.Input }],
nzScroll: [{ type: i0.Input }],
nzItemRender: [{ type: i0.Input }, { type: i0.ViewChild, args: ['renderItemTemplate',] }],
nzFrontPagination: [{ type: i0.Input }],
nzTemplateMode: [{ type: i0.Input }],
nzBordered: [{ type: i0.Input }],
nzShowPagination: [{ type: i0.Input }],
nzLoading: [{ type: i0.Input }],
nzShowSizeChanger: [{ type: i0.Input }],
nzHideOnSinglePage: [{ type: i0.Input }],
nzShowQuickJumper: [{ type: i0.Input }],
nzSimple: [{ type: i0.Input }],
nzPageSizeChange: [{ type: i0.Output }],
nzPageIndexChange: [{ type: i0.Output }],
nzCurrentPageDataChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzVirtualScroll", void 0);
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzVirtualItemSize", void 0);
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzVirtualMaxBufferPx", void 0);
__decorate([
InputNumber(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzVirtualMinBufferPx", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzFrontPagination", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzTemplateMode", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzBordered", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzShowPagination", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzLoading", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzShowSizeChanger", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzHideOnSinglePage", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzShowQuickJumper", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTableComponent.prototype, "nzSimple", void 0);
return NzTableComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTbodyDirective = /** @class */ (function () {
function NzTbodyDirective(nzTableComponent) {
this.nzTableComponent = nzTableComponent;
}
NzTbodyDirective.decorators = [
{ type: i0.Directive, args: [{
// tslint:disable-next-line:directive-selector
selector: 'tbody',
host: {
'[class.ant-table-tbody]': 'nzTableComponent'
}
},] }
];
/** @nocollapse */
NzTbodyDirective.ctorParameters = function () {
return [
{ type: NzTableComponent, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
return NzTbodyDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTdComponent = /** @class */ (function () {
function NzTdComponent(elementRef, nzUpdateHostClassService) {
this.elementRef = elementRef;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.nzChecked = false;
this.nzDisabled = false;
this.nzIndeterminate = false;
this.nzExpand = false;
this.nzShowExpand = false;
this.nzShowCheckbox = false;
this.nzCheckedChange = new i0.EventEmitter();
this.nzExpandChange = new i0.EventEmitter();
}
/**
* @param {?} e
* @return {?}
*/
NzTdComponent.prototype.expandChange = /**
* @param {?} e
* @return {?}
*/
function (e) {
e.stopPropagation();
this.nzExpand = !this.nzExpand;
this.nzExpandChange.emit(this.nzExpand);
};
/**
* @return {?}
*/
NzTdComponent.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, (_a = {},
_a["ant-table-row-expand-icon-cell"] = this.nzShowExpand && !isNotNil(this.nzIndentSize),
_a["ant-table-selection-column"] = this.nzShowCheckbox,
_a["ant-table-td-left-sticky"] = isNotNil(this.nzLeft),
_a["ant-table-td-right-sticky"] = isNotNil(this.nzRight),
_a));
};
/**
* @param {?} changes
* @return {?}
*/
NzTdComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzIndentSize || changes.nzShowExpand || changes.nzShowCheckbox || changes.nzRight || changes.nzLeft) {
this.setClassMap();
}
};
NzTdComponent.decorators = [
{ type: i0.Component, args: [{
// tslint:disable-next-line:component-selector
selector: 'td:not(.nz-disable-td)',
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [NzUpdateHostClassService],
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
template: "<span class=\"ant-table-row-indent\" *ngIf=\"nzIndentSize >= 0\" [style.padding-left.px]=\"nzIndentSize\"></span>\n<label *ngIf=\"nzShowCheckbox\"\n nz-checkbox\n [nzDisabled]=\"nzDisabled\"\n [(ngModel)]=\"nzChecked\"\n [nzIndeterminate]=\"nzIndeterminate\"\n (ngModelChange)=\"nzCheckedChange.emit($event)\">\n</label>\n<span *ngIf=\"!nzShowExpand && nzIndentSize >= 0\"\n class=\"ant-table-row-expand-icon ant-table-row-spaced\">\n</span>\n<span *ngIf=\"nzShowExpand\"\n class=\"ant-table-row-expand-icon\"\n [class.ant-table-row-expanded]=\"nzExpand\"\n [class.ant-table-row-collapsed]=\"!nzExpand\"\n (click)=\"expandChange($event)\">\n</span>\n<ng-content></ng-content>",
host: {
'[style.left]': 'nzLeft',
'[style.right]': 'nzRight',
'[style.text-align]': 'nzAlign'
}
}] }
];
/** @nocollapse */
NzTdComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzUpdateHostClassService }
];
};
NzTdComponent.propDecorators = {
nzChecked: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzIndeterminate: [{ type: i0.Input }],
nzLeft: [{ type: i0.Input }],
nzRight: [{ type: i0.Input }],
nzAlign: [{ type: i0.Input }],
nzIndentSize: [{ type: i0.Input }],
nzExpand: [{ type: i0.Input }],
nzShowExpand: [{ type: i0.Input }],
nzShowCheckbox: [{ type: i0.Input }],
nzCheckedChange: [{ type: i0.Output }],
nzExpandChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTdComponent.prototype, "nzExpand", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTdComponent.prototype, "nzShowExpand", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTdComponent.prototype, "nzShowCheckbox", void 0);
return NzTdComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTheadComponent = /** @class */ (function () {
// tslint:disable-next-line:no-any
function NzTheadComponent(nzTableComponent, elementRef, renderer) {
this.nzTableComponent = nzTableComponent;
this.elementRef = elementRef;
this.renderer = renderer;
this.destroy$ = new rxjs.Subject();
this.nzSingleSort = false;
this.nzSortChange = new i0.EventEmitter();
if (this.nzTableComponent) {
this.nzTableComponent.nzTheadComponent = this;
}
}
/**
* @return {?}
*/
NzTheadComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.listOfNzThComponent.changes.pipe(operators.startWith(true), operators.flatMap(( /**
* @return {?}
*/function () {
return rxjs.merge.apply(void 0, __spread(_this.listOfNzThComponent.map(( /**
* @param {?} th
* @return {?}
*/function (th) { return th.nzSortChangeWithKey; }))));
})), operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
_this.nzSortChange.emit(data);
if (_this.nzSingleSort) {
_this.listOfNzThComponent.forEach(( /**
* @param {?} th
* @return {?}
*/function (th) {
th.nzSort = (th.nzSortKey === data.key ? th.nzSort : null);
th.marForCheck();
}));
}
}));
};
/**
* @return {?}
*/
NzTheadComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
if (this.nzTableComponent) {
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), this.elementRef.nativeElement);
}
};
/**
* @return {?}
*/
NzTheadComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzTheadComponent.decorators = [
{ type: i0.Component, args: [{
// tslint:disable-next-line:component-selector
selector: 'thead:not(.ant-table-thead)',
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<ng-template #contentTemplate>\n <ng-content></ng-content>\n</ng-template>\n<ng-container *ngIf=\"!nzTableComponent\">\n <ng-template [ngTemplateOutlet]=\"contentTemplate\"></ng-template>\n</ng-container>"
}] }
];
/** @nocollapse */
NzTheadComponent.ctorParameters = function () {
return [
{ type: NzTableComponent, decorators: [{ type: i0.Host }, { type: i0.Optional }] },
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzTheadComponent.propDecorators = {
templateRef: [{ type: i0.ViewChild, args: ['contentTemplate',] }],
listOfNzThComponent: [{ type: i0.ContentChildren, args: [NzThComponent, { descendants: true },] }],
nzSingleSort: [{ type: i0.Input }],
nzSortChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTheadComponent.prototype, "nzSingleSort", void 0);
return NzTheadComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTrDirective = /** @class */ (function () {
function NzTrDirective(elementRef, renderer, nzTableComponent) {
this.elementRef = elementRef;
this.renderer = renderer;
this.nzTableComponent = nzTableComponent;
}
Object.defineProperty(NzTrDirective.prototype, "nzExpand", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
if (toBoolean(value)) {
this.renderer.removeStyle(this.elementRef.nativeElement, 'display');
this.renderer.addClass(this.elementRef.nativeElement, 'ant-table-expanded-row');
}
else {
this.renderer.setStyle(this.elementRef.nativeElement, 'display', 'none');
this.renderer.removeClass(this.elementRef.nativeElement, 'ant-table-expanded-row');
}
},
enumerable: true,
configurable: true
});
NzTrDirective.decorators = [
{ type: i0.Directive, args: [{
// tslint:disable-next-line:directive-selector
selector: 'tr',
host: {
'[class.ant-table-row]': 'nzTableComponent'
}
},] }
];
/** @nocollapse */
NzTrDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 },
{ type: NzTableComponent, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzTrDirective.propDecorators = {
nzExpand: [{ type: i0.Input }]
};
return NzTrDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTableModule = /** @class */ (function () {
function NzTableModule() {
}
NzTableModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzTableComponent, NzThComponent, NzTdComponent, NzTheadComponent, NzTbodyDirective, NzTrDirective, NzVirtualScrollDirective],
exports: [NzTableComponent, NzThComponent, NzTdComponent, NzTheadComponent, NzTbodyDirective, NzTrDirective, NzVirtualScrollDirective],
imports: [
NzMenuModule,
forms.FormsModule,
NzAddOnModule,
NzRadioModule,
NzCheckboxModule,
NzDropDownModule,
i2$1.CommonModule,
NzPaginationModule,
NzSpinModule,
NzI18nModule,
NzIconModule,
NzEmptyModule,
scrolling.ScrollingModule
]
},] }
];
return NzTableModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTabBodyComponent = /** @class */ (function () {
function NzTabBodyComponent() {
this.active = false;
this.forceRender = false;
}
NzTabBodyComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-tab-body]',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-container *ngIf=\"active || forceRender\">\n <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n</ng-container>",
host: {
'[class.ant-tabs-tabpane-active]': 'active',
'[class.ant-tabs-tabpane-inactive]': '!active'
}
}] }
];
NzTabBodyComponent.propDecorators = {
content: [{ type: i0.Input }],
active: [{ type: i0.Input }],
forceRender: [{ type: i0.Input }]
};
return NzTabBodyComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTabLabelDirective = /** @class */ (function () {
function NzTabLabelDirective(elementRef, renderer) {
this.elementRef = elementRef;
this.disabled = false;
renderer.addClass(elementRef.nativeElement, 'ant-tabs-tab');
}
/**
* @return {?}
*/
NzTabLabelDirective.prototype.getOffsetLeft = /**
* @return {?}
*/
function () {
return this.elementRef.nativeElement.offsetLeft;
};
/**
* @return {?}
*/
NzTabLabelDirective.prototype.getOffsetWidth = /**
* @return {?}
*/
function () {
return this.elementRef.nativeElement.offsetWidth;
};
/**
* @return {?}
*/
NzTabLabelDirective.prototype.getOffsetTop = /**
* @return {?}
*/
function () {
return this.elementRef.nativeElement.offsetTop;
};
/**
* @return {?}
*/
NzTabLabelDirective.prototype.getOffsetHeight = /**
* @return {?}
*/
function () {
return this.elementRef.nativeElement.offsetHeight;
};
NzTabLabelDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-tab-label]',
host: {
'[class.ant-tabs-tab-disabled]': 'disabled'
}
},] }
];
/** @nocollapse */
NzTabLabelDirective.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzTabLabelDirective.propDecorators = {
disabled: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTabLabelDirective.prototype, "disabled", void 0);
return NzTabLabelDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* Decorates the `ng-template` tags and reads out the template from it.
*/
var NzTabDirective = /** @class */ (function () {
function NzTabDirective() {
}
NzTabDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-tab]'
},] }
];
return NzTabDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTabComponent = /** @class */ (function () {
function NzTabComponent(elementRef, renderer) {
this.elementRef = elementRef;
this.renderer = renderer;
this.position = null;
this.origin = null;
this.isActive = false;
this.stateChanges = new rxjs.Subject();
this.nzForceRender = false;
this.nzDisabled = false;
this.nzClick = new i0.EventEmitter();
this.nzSelect = new i0.EventEmitter();
this.nzDeselect = new i0.EventEmitter();
this.renderer.addClass(elementRef.nativeElement, 'ant-tabs-tabpane');
}
/**
* @param {?} changes
* @return {?}
*/
NzTabComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzTitle || changes.nzForceRender || changes.nzDisabled) {
this.stateChanges.next();
}
};
/**
* @return {?}
*/
NzTabComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.stateChanges.complete();
};
NzTabComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-tab',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>"
}] }
];
/** @nocollapse */
NzTabComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.Renderer2 }
];
};
NzTabComponent.propDecorators = {
content: [{ type: i0.ViewChild, args: [i0.TemplateRef,] }],
template: [{ type: i0.ContentChild, args: [NzTabDirective, { read: i0.TemplateRef },] }],
nzTitle: [{ type: i0.Input }],
nzForceRender: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzClick: [{ type: i0.Output }],
nzSelect: [{ type: i0.Output }],
nzDeselect: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTabComponent.prototype, "nzForceRender", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTabComponent.prototype, "nzDisabled", void 0);
return NzTabComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTabsInkBarDirective = /** @class */ (function () {
function NzTabsInkBarDirective(renderer, elementRef, ngZone) {
this.renderer = renderer;
this.elementRef = elementRef;
this.ngZone = ngZone;
this.nzAnimated = false;
this.nzPositionMode = 'horizontal';
renderer.addClass(elementRef.nativeElement, 'ant-tabs-ink-bar');
}
/**
* @param {?} element
* @return {?}
*/
NzTabsInkBarDirective.prototype.alignToElement = /**
* @param {?} element
* @return {?}
*/
function (element) {
var _this = this;
if (typeof requestAnimationFrame !== 'undefined') {
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
requestAnimationFrame(( /**
* @return {?}
*/function () { return _this.setStyles(element); }));
}));
}
else {
this.setStyles(element);
}
};
/**
* @param {?} element
* @return {?}
*/
NzTabsInkBarDirective.prototype.setStyles = /**
* @param {?} element
* @return {?}
*/
function (element) {
/** when horizontal remove height style and add transform left **/
if (this.nzPositionMode === 'horizontal') {
this.renderer.removeStyle(this.elementRef.nativeElement, 'height');
this.renderer.setStyle(this.elementRef.nativeElement, 'transform', "translate3d(" + this.getLeftPosition(element) + ", 0px, 0px)");
this.renderer.setStyle(this.elementRef.nativeElement, 'width', this.getElementWidth(element));
}
else {
/** when vertical remove width style and add transform top **/
this.renderer.removeStyle(this.elementRef.nativeElement, 'width');
this.renderer.setStyle(this.elementRef.nativeElement, 'transform', "translate3d(0px, " + this.getTopPosition(element) + ", 0px)");
this.renderer.setStyle(this.elementRef.nativeElement, 'height', this.getElementHeight(element));
}
};
/**
* @param {?} element
* @return {?}
*/
NzTabsInkBarDirective.prototype.getLeftPosition = /**
* @param {?} element
* @return {?}
*/
function (element) {
return element ? element.offsetLeft + 'px' : '0';
};
/**
* @param {?} element
* @return {?}
*/
NzTabsInkBarDirective.prototype.getElementWidth = /**
* @param {?} element
* @return {?}
*/
function (element) {
return element ? element.offsetWidth + 'px' : '0';
};
/**
* @param {?} element
* @return {?}
*/
NzTabsInkBarDirective.prototype.getTopPosition = /**
* @param {?} element
* @return {?}
*/
function (element) {
return element ? element.offsetTop + 'px' : '0';
};
/**
* @param {?} element
* @return {?}
*/
NzTabsInkBarDirective.prototype.getElementHeight = /**
* @param {?} element
* @return {?}
*/
function (element) {
return element ? element.offsetHeight + 'px' : '0';
};
NzTabsInkBarDirective.decorators = [
{ type: i0.Directive, args: [{
selector: '[nz-tabs-ink-bar]',
host: {
'[class.ant-tabs-ink-bar-animated]': 'nzAnimated',
'[class.ant-tabs-ink-bar-no-animated]': '!nzAnimated'
}
},] }
];
/** @nocollapse */
NzTabsInkBarDirective.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: i0.NgZone }
];
};
NzTabsInkBarDirective.propDecorators = {
nzAnimated: [{ type: i0.Input }],
nzPositionMode: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTabsInkBarDirective.prototype, "nzAnimated", void 0);
return NzTabsInkBarDirective;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var EXAGGERATED_OVERSCROLL = 64;
var NzTabsNavComponent = /** @class */ (function () {
function NzTabsNavComponent(elementRef, ngZone, renderer, cdr, dir) {
this.elementRef = elementRef;
this.ngZone = ngZone;
this.renderer = renderer;
this.cdr = cdr;
this.dir = dir;
this._tabPositionMode = 'horizontal';
this._scrollDistance = 0;
this._selectedIndex = 0;
this.showPaginationControls = false;
this.disableScrollAfter = true;
this.disableScrollBefore = true;
this.selectedIndexChanged = false;
this.realignInkBar = null;
this.nzOnNextClick = new i0.EventEmitter();
this.nzOnPrevClick = new i0.EventEmitter();
this.nzAnimated = true;
this.nzHideBar = false;
this.nzShowPagination = true;
this.nzType = 'line';
}
Object.defineProperty(NzTabsNavComponent.prototype, "nzPositionMode", {
get: /**
* @return {?}
*/ function () {
return this._tabPositionMode;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
var _this = this;
this._tabPositionMode = value;
this.alignInkBarToSelectedTab();
if (this.nzShowPagination) {
Promise.resolve().then(( /**
* @return {?}
*/function () {
_this.updatePagination();
}));
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTabsNavComponent.prototype, "selectedIndex", {
get: /**
* @return {?}
*/ function () {
return this._selectedIndex;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.selectedIndexChanged = this._selectedIndex !== value;
this._selectedIndex = value;
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzTabsNavComponent.prototype.onContentChanges = /**
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var textContent = this.elementRef.nativeElement.textContent;
// We need to diff the text content of the header, because the MutationObserver callback
// will fire even if the text content didn't change which is inefficient and is prone
// to infinite loops if a poorly constructed expression is passed in (see #14249).
if (textContent !== this.currentTextContent) {
this.ngZone.run(( /**
* @return {?}
*/function () {
if (_this.nzShowPagination) {
_this.updatePagination();
}
_this.alignInkBarToSelectedTab();
_this.cdr.markForCheck();
}));
}
};
/**
* @param {?} scrollDir
* @return {?}
*/
NzTabsNavComponent.prototype.scrollHeader = /**
* @param {?} scrollDir
* @return {?}
*/
function (scrollDir) {
if (scrollDir === 'before' && !this.disableScrollBefore) {
this.nzOnPrevClick.emit();
}
else if (scrollDir === 'after' && !this.disableScrollAfter) {
this.nzOnNextClick.emit();
}
// Move the scroll distance one-third the length of the tab list's viewport.
this.scrollDistance += (scrollDir === 'before' ? -1 : 1) * this.viewWidthHeightPix / 3;
};
/**
* @return {?}
*/
NzTabsNavComponent.prototype.ngAfterContentChecked = /**
* @return {?}
*/
function () {
if (this.tabLabelCount !== this.listOfNzTabLabelDirective.length) {
if (this.nzShowPagination) {
this.updatePagination();
}
this.tabLabelCount = this.listOfNzTabLabelDirective.length;
this.cdr.markForCheck();
}
if (this.selectedIndexChanged) {
this.scrollToLabel(this._selectedIndex);
if (this.nzShowPagination) {
this.checkScrollingControls();
}
this.alignInkBarToSelectedTab();
this.selectedIndexChanged = false;
this.cdr.markForCheck();
}
if (this.scrollDistanceChanged) {
if (this.nzShowPagination) {
this.updateTabScrollPosition();
}
this.scrollDistanceChanged = false;
this.cdr.markForCheck();
}
};
/**
* @return {?}
*/
NzTabsNavComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.realignInkBar = this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
/** @type {?} */
var dirChange = _this.dir ? _this.dir.change : rxjs.of(null);
/** @type {?} */
var resize = typeof window !== 'undefined' ?
rxjs.fromEvent(window, 'resize').pipe(operators.auditTime(10)) :
rxjs.of(null);
return rxjs.merge(dirChange, resize).pipe(operators.startWith(null)).subscribe(( /**
* @return {?}
*/function () {
if (_this.nzShowPagination) {
_this.updatePagination();
}
_this.alignInkBarToSelectedTab();
}));
}));
};
/**
* @return {?}
*/
NzTabsNavComponent.prototype.updateTabScrollPosition = /**
* @return {?}
*/
function () {
/** @type {?} */
var scrollDistance = this.scrollDistance;
if (this.nzPositionMode === 'horizontal') {
/** @type {?} */
var translateX = this.getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;
this.renderer.setStyle(this.navListElement.nativeElement, 'transform', "translate3d(" + translateX + "px, 0, 0)");
}
else {
this.renderer.setStyle(this.navListElement.nativeElement, 'transform', "translate3d(0," + -scrollDistance + "px, 0)");
}
};
/**
* @return {?}
*/
NzTabsNavComponent.prototype.updatePagination = /**
* @return {?}
*/
function () {
this.checkPaginationEnabled();
this.checkScrollingControls();
this.updateTabScrollPosition();
};
/**
* @return {?}
*/
NzTabsNavComponent.prototype.checkPaginationEnabled = /**
* @return {?}
*/
function () {
/** @type {?} */
var isEnabled = this.tabListScrollWidthHeightPix > this.tabListScrollOffSetWidthHeight;
if (!isEnabled) {
this.scrollDistance = 0;
}
if (isEnabled !== this.showPaginationControls) {
this.cdr.markForCheck();
}
this.showPaginationControls = isEnabled;
};
/**
* @param {?} labelIndex
* @return {?}
*/
NzTabsNavComponent.prototype.scrollToLabel = /**
* @param {?} labelIndex
* @return {?}
*/
function (labelIndex) {
/** @type {?} */
var selectedLabel = this.listOfNzTabLabelDirective
? this.listOfNzTabLabelDirective.toArray()[labelIndex]
: null;
if (selectedLabel) {
// The view length is the visible width of the tab labels.
/** @type {?} */
var labelBeforePos = void 0;
/** @type {?} */
var labelAfterPos = void 0;
if (this.nzPositionMode === 'horizontal') {
if (this.getLayoutDirection() === 'ltr') {
labelBeforePos = selectedLabel.getOffsetLeft();
labelAfterPos = labelBeforePos + selectedLabel.getOffsetWidth();
}
else {
labelAfterPos = this.navListElement.nativeElement.offsetWidth - selectedLabel.getOffsetLeft();
labelBeforePos = labelAfterPos - selectedLabel.getOffsetWidth();
}
}
else {
labelBeforePos = selectedLabel.getOffsetTop();
labelAfterPos = labelBeforePos + selectedLabel.getOffsetHeight();
}
/** @type {?} */
var beforeVisiblePos = this.scrollDistance;
/** @type {?} */
var afterVisiblePos = this.scrollDistance + this.viewWidthHeightPix;
if (labelBeforePos < beforeVisiblePos) {
// Scroll header to move label to the before direction
this.scrollDistance -= beforeVisiblePos - labelBeforePos + EXAGGERATED_OVERSCROLL;
}
else if (labelAfterPos > afterVisiblePos) {
// Scroll header to move label to the after direction
this.scrollDistance += labelAfterPos - afterVisiblePos + EXAGGERATED_OVERSCROLL;
}
}
};
/**
* @return {?}
*/
NzTabsNavComponent.prototype.checkScrollingControls = /**
* @return {?}
*/
function () {
// Check if the pagination arrows should be activated.
this.disableScrollBefore = this.scrollDistance === 0;
this.disableScrollAfter = this.scrollDistance === this.getMaxScrollDistance();
this.cdr.markForCheck();
};
/**
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
* is equal to the difference in width between the tab list container and tab header container.
*
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
* should be called sparingly.
*/
/**
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
* is equal to the difference in width between the tab list container and tab header container.
*
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
* should be called sparingly.
* @return {?}
*/
NzTabsNavComponent.prototype.getMaxScrollDistance = /**
* Determines what is the maximum length in pixels that can be set for the scroll distance. This
* is equal to the difference in width between the tab list container and tab header container.
*
* This is an expensive call that forces a layout reflow to compute box and scroll metrics and
* should be called sparingly.
* @return {?}
*/
function () {
return (this.tabListScrollWidthHeightPix - this.viewWidthHeightPix) || 0;
};
Object.defineProperty(NzTabsNavComponent.prototype, "scrollDistance", {
get: /**
* @return {?}
*/ function () {
return this._scrollDistance;
},
/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */
set: /**
* Sets the distance in pixels that the tab header should be transformed in the X-axis.
* @param {?} v
* @return {?}
*/ function (v) {
this._scrollDistance = Math.max(0, Math.min(this.getMaxScrollDistance(), v));
// Mark that the scroll distance has changed so that after the view is checked, the CSS
// transformation can move the header.
this.scrollDistanceChanged = true;
this.checkScrollingControls();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTabsNavComponent.prototype, "viewWidthHeightPix", {
get: /**
* @return {?}
*/ function () {
/** @type {?} */
var PAGINATION_PIX = 0;
if (this.showPaginationControls) {
PAGINATION_PIX = 64;
}
if (this.nzPositionMode === 'horizontal') {
return this.navContainerElement.nativeElement.offsetWidth - PAGINATION_PIX;
}
else {
return this.navContainerElement.nativeElement.offsetHeight - PAGINATION_PIX;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTabsNavComponent.prototype, "tabListScrollWidthHeightPix", {
get: /**
* @return {?}
*/ function () {
if (this.nzPositionMode === 'horizontal') {
return this.navListElement.nativeElement.scrollWidth;
}
else {
return this.navListElement.nativeElement.scrollHeight;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTabsNavComponent.prototype, "tabListScrollOffSetWidthHeight", {
get: /**
* @return {?}
*/ function () {
if (this.nzPositionMode === 'horizontal') {
return this.scrollListElement.nativeElement.offsetWidth;
}
else {
return this.elementRef.nativeElement.offsetHeight;
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzTabsNavComponent.prototype.getLayoutDirection = /**
* @return {?}
*/
function () {
return this.dir && this.dir.value === 'rtl' ? 'rtl' : 'ltr';
};
/**
* @return {?}
*/
NzTabsNavComponent.prototype.alignInkBarToSelectedTab = /**
* @return {?}
*/
function () {
if (this.nzType === 'line') {
/** @type {?} */
var selectedLabelWrapper = this.listOfNzTabLabelDirective && this.listOfNzTabLabelDirective.length
? this.listOfNzTabLabelDirective.toArray()[this.selectedIndex].elementRef.nativeElement
: null;
if (this.nzTabsInkBarDirective) {
this.nzTabsInkBarDirective.alignToElement(selectedLabelWrapper);
}
}
};
NzTabsNavComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-tabs-nav]',
preserveWhitespaces: false,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
template: "<div style=\"float:right;\" *ngIf=\"nzTabBarExtraContent\" class=\"ant-tabs-extra-content\">\n <ng-template [ngTemplateOutlet]=\"nzTabBarExtraContent\"></ng-template>\n</div>\n<div class=\"ant-tabs-nav-container\"\n [class.ant-tabs-nav-container-scrolling]=\"showPaginationControls\"\n #navContainerElement>\n <span class=\"ant-tabs-tab-prev\"\n (click)=\"scrollHeader('before')\"\n [class.ant-tabs-tab-btn-disabled]=\"disableScrollBefore\"\n [class.ant-tabs-tab-arrow-show]=\"showPaginationControls\">\n <span class=\"ant-tabs-tab-prev-icon\">\n <i nz-icon [type]=\"nzPositionMode === 'horizontal' ? 'left' : 'up'\" class=\"ant-tabs-tab-prev-icon-target\"></i>\n </span>\n </span>\n <span class=\"ant-tabs-tab-next\"\n (click)=\"scrollHeader('after')\"\n [class.ant-tabs-tab-btn-disabled]=\"disableScrollAfter\"\n [class.ant-tabs-tab-arrow-show]=\"showPaginationControls\">\n <span class=\"ant-tabs-tab-next-icon\">\n <i nz-icon [type]=\"nzPositionMode === 'horizontal' ? 'right' : 'down'\" class=\"ant-tabs-tab-next-icon-target\"></i>\n </span>\n </span>\n <div class=\"ant-tabs-nav-wrap\">\n <div class=\"ant-tabs-nav-scroll\" #scrollListElement>\n <div class=\"ant-tabs-nav\"\n [class.ant-tabs-nav-animated]=\"nzAnimated\"\n #navListElement\n (cdkObserveContent)=\"onContentChanges()\">\n <div>\n <ng-content></ng-content>\n </div>\n <div nz-tabs-ink-bar [hidden]=\"nzHideBar\" [nzAnimated]=\"nzAnimated\" [nzPositionMode]=\"nzPositionMode\" style=\"display: block;\"></div>\n </div>\n </div>\n </div>\n</div>"
}] }
];
/** @nocollapse */
NzTabsNavComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.NgZone },
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef },
{ type: bidi.Directionality, decorators: [{ type: i0.Optional }] }
];
};
NzTabsNavComponent.propDecorators = {
listOfNzTabLabelDirective: [{ type: i0.ContentChildren, args: [NzTabLabelDirective,] }],
nzTabsInkBarDirective: [{ type: i0.ViewChild, args: [NzTabsInkBarDirective,] }],
navContainerElement: [{ type: i0.ViewChild, args: ['navContainerElement',] }],
navListElement: [{ type: i0.ViewChild, args: ['navListElement',] }],
scrollListElement: [{ type: i0.ViewChild, args: ['scrollListElement',] }],
nzOnNextClick: [{ type: i0.Output }],
nzOnPrevClick: [{ type: i0.Output }],
nzTabBarExtraContent: [{ type: i0.Input }],
nzAnimated: [{ type: i0.Input }],
nzHideBar: [{ type: i0.Input }],
nzShowPagination: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzPositionMode: [{ type: i0.Input }],
selectedIndex: [{ type: i0.Input }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTabsNavComponent.prototype, "nzAnimated", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTabsNavComponent.prototype, "nzHideBar", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTabsNavComponent.prototype, "nzShowPagination", void 0);
return NzTabsNavComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTabChangeEvent = /** @class */ (function () {
function NzTabChangeEvent() {
}
return NzTabChangeEvent;
}());
var NzTabSetComponent = /** @class */ (function () {
function NzTabSetComponent(renderer, nzUpdateHostClassService, elementRef, cdr) {
this.renderer = renderer;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.elementRef = elementRef;
this.cdr = cdr;
this.indexToSelect = 0;
this.el = this.elementRef.nativeElement;
this._selectedIndex = null;
/**
* Subscription to tabs being added/removed.
*/
this.tabsSubscription = rxjs.Subscription.EMPTY;
/**
* Subscription to changes in the tab labels.
*/
this.tabLabelSubscription = rxjs.Subscription.EMPTY;
this.tabPositionMode = 'horizontal';
this.nzShowPagination = true;
this.nzAnimated = true;
this.nzHideAll = false;
this.nzTabPosition = 'top';
this.nzSize = 'default';
this.nzType = 'line';
this.nzOnNextClick = new i0.EventEmitter();
this.nzOnPrevClick = new i0.EventEmitter();
this.nzSelectChange = new i0.EventEmitter(true);
this.nzSelectedIndexChange = new i0.EventEmitter();
}
Object.defineProperty(NzTabSetComponent.prototype, "nzSelectedIndex", {
get: /**
* @return {?}
*/ function () {
return this._selectedIndex;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.indexToSelect = toNumber(value, null);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTabSetComponent.prototype, "inkBarAnimated", {
get: /**
* @return {?}
*/ function () {
return (this.nzAnimated === true) || ((( /** @type {?} */(this.nzAnimated))).inkBar === true);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTabSetComponent.prototype, "tabPaneAnimated", {
get: /**
* @return {?}
*/ function () {
return (this.nzAnimated === true) || ((( /** @type {?} */(this.nzAnimated))).tabPane === true);
},
enumerable: true,
configurable: true
});
/**
* @param {?} value
* @return {?}
*/
NzTabSetComponent.prototype.setPosition = /**
* @param {?} value
* @return {?}
*/
function (value) {
if (this.tabContent) {
if (value === 'bottom') {
this.renderer.insertBefore(this.el, this.tabContent.nativeElement, this.nzTabsNavComponent.elementRef.nativeElement);
}
else {
this.renderer.insertBefore(this.el, this.nzTabsNavComponent.elementRef.nativeElement, this.tabContent.nativeElement);
}
}
};
/**
* @return {?}
*/
NzTabSetComponent.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
this.nzUpdateHostClassService.updateHostClass(this.el, (_a = {},
_a["ant-tabs"] = true,
_a["ant-tabs-vertical"] = (this.nzTabPosition === 'left') || (this.nzTabPosition === 'right'),
_a["ant-tabs-" + this.nzTabPosition] = this.nzTabPosition,
_a["ant-tabs-no-animation"] = (this.nzAnimated === false) || ((( /** @type {?} */(this.nzAnimated))).tabPane === false),
_a["ant-tabs-" + this.nzType] = this.nzType,
_a["ant-tabs-large"] = this.nzSize === 'large',
_a["ant-tabs-small"] = this.nzSize === 'small',
_a));
};
/**
* @param {?} index
* @param {?} disabled
* @return {?}
*/
NzTabSetComponent.prototype.clickLabel = /**
* @param {?} index
* @param {?} disabled
* @return {?}
*/
function (index, disabled) {
if (!disabled) {
this.nzSelectedIndex = index;
this.listOfNzTabComponent.toArray()[index].nzClick.emit();
}
};
/**
* @param {?} index
* @return {?}
*/
NzTabSetComponent.prototype.createChangeEvent = /**
* @param {?} index
* @return {?}
*/
function (index) {
/** @type {?} */
var event = new NzTabChangeEvent();
event.index = index;
if (this.listOfNzTabComponent && this.listOfNzTabComponent.length) {
event.tab = this.listOfNzTabComponent.toArray()[index];
this.listOfNzTabComponent.forEach(( /**
* @param {?} item
* @param {?} i
* @return {?}
*/function (item, i) {
if (i !== index) {
item.nzDeselect.emit();
}
}));
event.tab.nzSelect.emit();
}
return event;
};
/** Clamps the given index to the bounds of 0 and the tabs length. */
/**
* Clamps the given index to the bounds of 0 and the tabs length.
* @private
* @param {?} index
* @return {?}
*/
NzTabSetComponent.prototype.clampTabIndex = /**
* Clamps the given index to the bounds of 0 and the tabs length.
* @private
* @param {?} index
* @return {?}
*/
function (index) {
// Note the `|| 0`, which ensures that values like NaN can't get through
// and which would otherwise throw the component into an infinite loop
// (since Math.max(NaN, 0) === NaN).
return Math.min(this.listOfNzTabComponent.length - 1, Math.max(index || 0, 0));
};
/**
* @private
* @return {?}
*/
NzTabSetComponent.prototype.subscribeToTabLabels = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (this.tabLabelSubscription) {
this.tabLabelSubscription.unsubscribe();
}
this.tabLabelSubscription = rxjs.merge.apply(void 0, __spread(this.listOfNzTabComponent.map(( /**
* @param {?} tab
* @return {?}
*/function (tab) { return tab.stateChanges; })))).subscribe(( /**
* @return {?}
*/function () { return _this.cdr.markForCheck(); }));
};
/**
* @param {?} changes
* @return {?}
*/
NzTabSetComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzTabPosition) {
if ((this.nzTabPosition === 'top') || (this.nzTabPosition === 'bottom')) {
this.tabPositionMode = 'horizontal';
}
else {
this.tabPositionMode = 'vertical';
}
this.setPosition(this.nzTabPosition);
}
if (changes.nzType) {
if (this.nzType === 'card') {
this.nzAnimated = false;
}
}
if (changes.nzSize || changes.nzAnimated || changes.nzTabPosition || changes.nzType) {
this.setClassMap();
}
};
/**
* @return {?}
*/
NzTabSetComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
};
/**
* @return {?}
*/
NzTabSetComponent.prototype.ngAfterContentChecked = /**
* @return {?}
*/
function () {
var _this = this;
if (this.listOfNzTabComponent && this.listOfNzTabComponent.length) {
// Don't clamp the `indexToSelect` immediately in the setter because it can happen that
// the amount of tabs changes before the actual change detection runs.
/** @type {?} */
var indexToSelect_1 = this.indexToSelect = this.clampTabIndex(this.indexToSelect);
// If there is a change in selected index, emit a change event. Should not trigger if
// the selected index has not yet been initialized.
if (this._selectedIndex !== indexToSelect_1) {
/** @type {?} */
var isFirstRun_1 = this._selectedIndex == null;
if (!isFirstRun_1) {
this.nzSelectChange.emit(this.createChangeEvent(indexToSelect_1));
}
// Changing these values after change detection has run
// since the checked content may contain references to them.
Promise.resolve().then(( /**
* @return {?}
*/function () {
_this.listOfNzTabComponent.forEach(( /**
* @param {?} tab
* @param {?} index
* @return {?}
*/function (tab, index) { return tab.isActive = index === indexToSelect_1; }));
if (!isFirstRun_1) {
_this.nzSelectedIndexChange.emit(indexToSelect_1);
}
}));
}
// Setup the position for each tab and optionally setup an origin on the next selected tab.
this.listOfNzTabComponent.forEach(( /**
* @param {?} tab
* @param {?} index
* @return {?}
*/function (tab, index) {
tab.position = index - indexToSelect_1;
// If there is already a selected tab, then set up an origin for the next selected tab
// if it doesn't have one already.
if (_this._selectedIndex != null && tab.position === 0 && !tab.origin) {
tab.origin = indexToSelect_1 - _this._selectedIndex;
}
}));
if (this._selectedIndex !== indexToSelect_1) {
this._selectedIndex = indexToSelect_1;
this.cdr.markForCheck();
}
}
};
/**
* @return {?}
*/
NzTabSetComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.subscribeToTabLabels();
// Subscribe to changes in the amount of tabs, in order to be
// able to re-render the content as new tabs are added or removed.
this.tabsSubscription = this.listOfNzTabComponent.changes.subscribe(( /**
* @return {?}
*/function () {
/** @type {?} */
var indexToSelect = _this.clampTabIndex(_this.indexToSelect);
// Maintain the previously-selected tab if a new tab is added or removed and there is no
// explicit change that selects a different tab.
if (indexToSelect === _this._selectedIndex) {
/** @type {?} */
var tabs = _this.listOfNzTabComponent.toArray();
for (var i = 0; i < tabs.length; i++) {
if (tabs[i].isActive) {
// Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed
// event, otherwise the consumer may end up in an infinite loop in some edge cases like
// adding a tab within the `selectedIndexChange` event.
_this.indexToSelect = _this._selectedIndex = i;
break;
}
}
}
_this.subscribeToTabLabels();
_this.cdr.markForCheck();
}));
};
/**
* @return {?}
*/
NzTabSetComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.tabsSubscription.unsubscribe();
this.tabLabelSubscription.unsubscribe();
};
/**
* @return {?}
*/
NzTabSetComponent.prototype.ngAfterViewInit = /**
* @return {?}
*/
function () {
this.setPosition(this.nzTabPosition);
};
NzTabSetComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-tabset',
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [NzUpdateHostClassService],
template: "<ng-container *ngIf=\"listOfNzTabComponent\">\n <div nz-tabs-nav\n role=\"tablist\"\n tabindex=\"0\"\n class=\"ant-tabs-bar\"\n [class.ant-tabs-card-bar]=\"nzType === 'card'\"\n [class.ant-tabs-top-bar]=\"nzTabPosition === 'top'\"\n [class.ant-tabs-bottom-bar]=\"nzTabPosition === 'bottom'\"\n [class.ant-tabs-left-bar]=\"nzTabPosition === 'left'\"\n [class.ant-tabs-right-bar]=\"nzTabPosition === 'right'\"\n [class.ant-tabs-small-bar]=\"nzSize === 'small'\"\n [class.ant-tabs-default-bar]=\"nzSize === 'default'\"\n [class.ant-tabs-large-bar]=\"nzSize === 'large'\"\n [nzType]=\"nzType\"\n [nzShowPagination]=\"nzShowPagination\"\n [nzPositionMode]=\"tabPositionMode\"\n [nzAnimated]=\"inkBarAnimated\"\n [ngStyle]=\"nzTabBarStyle\"\n [nzHideBar]=\"nzHideAll\"\n [nzTabBarExtraContent]=\"nzTabBarExtraContent\"\n [selectedIndex]=\"nzSelectedIndex\"\n (nzOnNextClick)=\"nzOnNextClick.emit()\"\n (nzOnPrevClick)=\"nzOnPrevClick.emit()\">\n <div nz-tab-label\n role=\"tab\"\n [style.margin-right.px]=\"nzTabBarGutter\"\n [class.ant-tabs-tab-active]=\"(nzSelectedIndex == i) && !nzHideAll\"\n [disabled]=\"tab.nzDisabled\"\n (click)=\"clickLabel(i,tab.nzDisabled)\"\n *ngFor=\"let tab of listOfNzTabComponent; let i = index\">\n <ng-container *nzStringTemplateOutlet=\"tab.nzTitle\">{{ tab.nzTitle }}</ng-container>\n </div>\n </div>\n <div #tabContent\n class=\"ant-tabs-content\"\n [class.ant-tabs-top-content]=\"nzTabPosition === 'top'\"\n [class.ant-tabs-bottom-content]=\"nzTabPosition === 'bottom'\"\n [class.ant-tabs-left-content]=\"nzTabPosition === 'left'\"\n [class.ant-tabs-right-content]=\"nzTabPosition === 'right'\"\n [class.ant-tabs-content-animated]=\"tabPaneAnimated\"\n [class.ant-tabs-content-no-animated]=\"!tabPaneAnimated\"\n [style.margin-left.%]=\"(tabPositionMode === 'horizontal') && tabPaneAnimated && (-nzSelectedIndex*100)\">\n <div nz-tab-body\n class=\"ant-tabs-tabpane\"\n *ngFor=\"let tab of listOfNzTabComponent; let i = index\"\n [active]=\"(nzSelectedIndex == i) && !nzHideAll\"\n [forceRender]=\"tab.nzForceRender\"\n [content]=\"tab.template || tab.content\">\n </div>\n </div>\n</ng-container>",
styles: ["\n nz-tabset {\n display: block;\n }\n "]
}] }
];
/** @nocollapse */
NzTabSetComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: NzUpdateHostClassService },
{ type: i0.ElementRef },
{ type: i0.ChangeDetectorRef }
];
};
NzTabSetComponent.propDecorators = {
listOfNzTabComponent: [{ type: i0.ContentChildren, args: [NzTabComponent,] }],
nzTabsNavComponent: [{ type: i0.ViewChild, args: [NzTabsNavComponent,] }],
tabContent: [{ type: i0.ViewChild, args: ['tabContent',] }],
nzTabBarExtraContent: [{ type: i0.Input }],
nzShowPagination: [{ type: i0.Input }],
nzAnimated: [{ type: i0.Input }],
nzHideAll: [{ type: i0.Input }],
nzTabPosition: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzTabBarGutter: [{ type: i0.Input }],
nzTabBarStyle: [{ type: i0.Input }],
nzType: [{ type: i0.Input }],
nzOnNextClick: [{ type: i0.Output }],
nzOnPrevClick: [{ type: i0.Output }],
nzSelectChange: [{ type: i0.Output }],
nzSelectedIndexChange: [{ type: i0.Output }],
nzSelectedIndex: [{ type: i0.Input }]
};
return NzTabSetComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTabsModule = /** @class */ (function () {
function NzTabsModule() {
}
NzTabsModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzTabComponent, NzTabDirective, NzTabSetComponent, NzTabsNavComponent, NzTabLabelDirective, NzTabsInkBarDirective, NzTabBodyComponent],
exports: [NzTabComponent, NzTabDirective, NzTabSetComponent, NzTabsNavComponent, NzTabLabelDirective, NzTabsInkBarDirective, NzTabBodyComponent],
imports: [i2$1.CommonModule, observers.ObserversModule, NzIconModule, NzAddOnModule]
},] }
];
return NzTabsModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTagComponent = /** @class */ (function () {
function NzTagComponent(renderer, elementRef, nzUpdateHostClassService) {
this.renderer = renderer;
this.elementRef = elementRef;
this.nzUpdateHostClassService = nzUpdateHostClassService;
this.presetColor = false;
this.nzMode = 'default';
this.nzChecked = false;
this.nzNoAnimation = false;
this.nzAfterClose = new i0.EventEmitter();
this.nzOnClose = new i0.EventEmitter();
this.nzCheckedChange = new i0.EventEmitter();
}
/**
* @private
* @param {?=} color
* @return {?}
*/
NzTagComponent.prototype.isPresetColor = /**
* @private
* @param {?=} color
* @return {?}
*/
function (color) {
if (!color) {
return false;
}
return (/^(pink|red|yellow|orange|cyan|green|blue|purple|geekblue|magenta|volcano|gold|lime)(-inverse)?$/
.test(color));
};
/**
* @private
* @return {?}
*/
NzTagComponent.prototype.updateClassMap = /**
* @private
* @return {?}
*/
function () {
var _a;
this.presetColor = this.isPresetColor(this.nzColor);
/** @type {?} */
var prefix = 'ant-tag';
this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, (_a = {},
_a["" + prefix] = true,
_a[prefix + "-has-color"] = this.nzColor && !this.presetColor,
_a[prefix + "-" + this.nzColor] = this.presetColor,
_a[prefix + "-checkable"] = this.nzMode === 'checkable',
_a[prefix + "-checkable-checked"] = this.nzChecked,
_a));
};
/**
* @return {?}
*/
NzTagComponent.prototype.updateCheckedStatus = /**
* @return {?}
*/
function () {
if (this.nzMode === 'checkable') {
this.nzChecked = !this.nzChecked;
this.nzCheckedChange.emit(this.nzChecked);
this.updateClassMap();
}
};
/**
* @param {?} e
* @return {?}
*/
NzTagComponent.prototype.closeTag = /**
* @param {?} e
* @return {?}
*/
function (e) {
this.nzOnClose.emit(e);
if (!e.defaultPrevented) {
this.renderer.removeChild(this.renderer.parentNode(this.elementRef.nativeElement), this.elementRef.nativeElement);
}
};
/**
* @param {?} e
* @return {?}
*/
NzTagComponent.prototype.afterAnimation = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (e.toState === 'void') {
this.nzAfterClose.emit();
}
};
/**
* @return {?}
*/
NzTagComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.updateClassMap();
};
/**
* @return {?}
*/
NzTagComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.updateClassMap();
};
NzTagComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-tag',
preserveWhitespaces: false,
providers: [NzUpdateHostClassService],
animations: [fadeMotion],
template: "<ng-content></ng-content>\n<i nz-icon type=\"close\" *ngIf=\"nzMode==='closeable'\" tabindex=\"-1\" (click)=\"closeTag($event)\"></i>\n",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
host: {
'[@fadeMotion]': '',
'(@fadeMotion.done)': 'afterAnimation($event)',
'(click)': 'updateCheckedStatus()',
'[style.background-color]': 'presetColor? null : nzColor'
}
}] }
];
/** @nocollapse */
NzTagComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: NzUpdateHostClassService }
];
};
NzTagComponent.propDecorators = {
nzMode: [{ type: i0.Input }],
nzColor: [{ type: i0.Input }],
nzChecked: [{ type: i0.Input }],
nzNoAnimation: [{ type: i0.Input }],
nzAfterClose: [{ type: i0.Output }],
nzOnClose: [{ type: i0.Output }],
nzCheckedChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzTagComponent.prototype, "nzChecked", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzTagComponent.prototype, "nzNoAnimation", void 0);
return NzTagComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTagModule = /** @class */ (function () {
function NzTagModule() {
}
NzTagModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, NzIconModule],
declarations: [
NzTagComponent
],
exports: [
NzTagComponent
]
},] }
];
return NzTagModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTimelineItemComponent = /** @class */ (function () {
function NzTimelineItemComponent(renderer, cdr) {
this.renderer = renderer;
this.cdr = cdr;
this.nzColor = 'blue';
this.isLast = false;
}
/**
* @return {?}
*/
NzTimelineItemComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.tryUpdateCustomColor();
};
/**
* @param {?} changes
* @return {?}
*/
NzTimelineItemComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzColor) {
this.tryUpdateCustomColor();
}
};
/**
* @return {?}
*/
NzTimelineItemComponent.prototype.detectChanges = /**
* @return {?}
*/
function () {
this.cdr.detectChanges();
};
/**
* @private
* @return {?}
*/
NzTimelineItemComponent.prototype.tryUpdateCustomColor = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var defaultColors = ['blue', 'red', 'green'];
/** @type {?} */
var circle = this.liTemplate.nativeElement.querySelector('.ant-timeline-item-head');
if (defaultColors.indexOf(this.nzColor) === -1) {
this.renderer.setStyle(circle, 'border-color', this.nzColor);
}
else {
this.renderer.removeStyle(circle, 'border-color');
}
};
NzTimelineItemComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
selector: 'nz-timeline-item, [nz-timeline-item]',
template: "<li\n class=\"ant-timeline-item\"\n [class.ant-timeline-item-right]=\"position === 'right'\"\n [class.ant-timeline-item-left]=\"position === 'left'\"\n [class.ant-timeline-item-last]=\"isLast\"\n #liTemplate>\n <div class=\"ant-timeline-item-tail\"></div>\n <div\n class=\"ant-timeline-item-head\"\n [class.ant-timeline-item-head-red]=\"nzColor === 'red'\"\n [class.ant-timeline-item-head-blue]=\"nzColor === 'blue'\"\n [class.ant-timeline-item-head-green]=\"nzColor === 'green'\"\n [class.ant-timeline-item-head-custom]=\"!!nzDot\">\n <ng-container *nzStringTemplateOutlet=\"nzDot\">{{ nzDot }}</ng-container>\n </div>\n <div class=\"ant-timeline-item-content\">\n <ng-content></ng-content>\n </div>\n</li>"
}] }
];
/** @nocollapse */
NzTimelineItemComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef }
];
};
NzTimelineItemComponent.propDecorators = {
liTemplate: [{ type: i0.ViewChild, args: ['liTemplate',] }],
nzColor: [{ type: i0.Input }],
nzDot: [{ type: i0.Input }]
};
return NzTimelineItemComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTimelineComponent = /** @class */ (function () {
function NzTimelineComponent(cdr) {
this.cdr = cdr;
this.nzReverse = false;
this.isPendingBoolean = false;
this.destroy$ = new rxjs.Subject();
}
/**
* @param {?} changes
* @return {?}
*/
NzTimelineComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
/** @type {?} */
var modeChanges = changes.nzMode;
/** @type {?} */
var reverseChanges = changes.nzReverse;
/** @type {?} */
var pendingChanges = changes.nzPending;
if (modeChanges && (modeChanges.previousValue !== modeChanges.currentValue || modeChanges.isFirstChange())) {
this.updateChildren();
}
if (reverseChanges && reverseChanges.previousValue !== reverseChanges.currentValue && !reverseChanges.isFirstChange()) {
this.reverseChildTimelineDots();
}
if (pendingChanges) {
this.isPendingBoolean = pendingChanges.currentValue === true;
}
};
/**
* @return {?}
*/
NzTimelineComponent.prototype.ngAfterContentInit = /**
* @return {?}
*/
function () {
var _this = this;
this.updateChildren();
if (this.listOfTimeLine) {
this.listOfTimeLine.changes.pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.updateChildren();
}));
}
};
/**
* @return {?}
*/
NzTimelineComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
/**
* @private
* @return {?}
*/
NzTimelineComponent.prototype.updateChildren = /**
* @private
* @return {?}
*/
function () {
var _this = this;
if (this.listOfTimeLine && this.listOfTimeLine.length) {
/** @type {?} */
var length_1 = this.listOfTimeLine.length;
this.listOfTimeLine.toArray().forEach(( /**
* @param {?} item
* @param {?} index
* @return {?}
*/function (item, index) {
item.isLast = !_this.nzReverse ? index === length_1 - 1 : index === 0;
item.position = _this.nzMode === 'left' || !_this.nzMode
? undefined
: _this.nzMode === 'right'
? 'right'
: _this.nzMode === 'alternate' && index % 2 === 0 ? 'left' : 'right';
item.detectChanges();
}));
this.cdr.markForCheck();
}
};
/**
* @private
* @return {?}
*/
NzTimelineComponent.prototype.reverseChildTimelineDots = /**
* @private
* @return {?}
*/
function () {
reverseChildNodes(( /** @type {?} */(this.timeline.nativeElement)));
this.updateChildren();
};
NzTimelineComponent.decorators = [
{ type: i0.Component, args: [{
changeDetection: i0.ChangeDetectionStrategy.OnPush,
encapsulation: i0.ViewEncapsulation.None,
preserveWhitespaces: false,
selector: 'nz-timeline',
template: "<ul\n class=\"ant-timeline\"\n [class.ant-timeline-right]=\"nzMode === 'right'\"\n [class.ant-timeline-alternate]=\"nzMode === 'alternate'\"\n [class.ant-timeline-pending]=\"!!nzPending\"\n [class.ant-timeline-reverse]=\"nzReverse\"\n #timeline>\n <!-- User inserted timeline dots. -->\n <ng-content></ng-content>\n <!-- Pending dot. -->\n <li *ngIf=\"nzPending\" class=\"ant-timeline-item ant-timeline-item-pending\">\n <div class=\"ant-timeline-item-tail\"></div>\n <div class=\"ant-timeline-item-head ant-timeline-item-head-custom ant-timeline-item-head-blue\">\n <ng-container *nzStringTemplateOutlet=\"nzPendingDot\">\n {{ nzPendingDot }}<i *ngIf=\"!nzPendingDot\" nz-icon type=\"loading\"></i>\n </ng-container>\n </div>\n <div class=\"ant-timeline-item-content\">\n <ng-container *nzStringTemplateOutlet=\"nzPending\">\n {{ isPendingBoolean ? '' : nzPending }}\n </ng-container>\n </div>\n </li>\n</ul>\n"
}] }
];
/** @nocollapse */
NzTimelineComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef }
];
};
NzTimelineComponent.propDecorators = {
timeline: [{ type: i0.ViewChild, args: ['timeline',] }],
listOfTimeLine: [{ type: i0.ContentChildren, args: [NzTimelineItemComponent,] }],
_pendingContent: [{ type: i0.ContentChild, args: ['pending',] }],
nzMode: [{ type: i0.Input }],
nzPending: [{ type: i0.Input }],
nzPendingDot: [{ type: i0.Input }],
nzReverse: [{ type: i0.Input }]
};
return NzTimelineComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTimelineModule = /** @class */ (function () {
function NzTimelineModule() {
}
NzTimelineModule.decorators = [
{ type: i0.NgModule, args: [{
declarations: [NzTimelineItemComponent, NzTimelineComponent],
exports: [NzTimelineItemComponent, NzTimelineComponent],
imports: [i2$1.CommonModule, NzIconModule, NzAddOnModule]
},] }
];
return NzTimelineModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTransferListComponent = /** @class */ (function () {
// #endregion
function NzTransferListComponent(el, updateHostClassService, cdr) {
this.el = el;
this.updateHostClassService = updateHostClassService;
this.cdr = cdr;
// #region fields
this.direction = '';
this.titleText = '';
this.dataSource = [];
this.itemUnit = '';
this.itemsUnit = '';
this.filter = '';
// events
this.handleSelectAll = new i0.EventEmitter();
this.handleSelect = new i0.EventEmitter();
this.filterChange = new i0.EventEmitter();
// #endregion
// #region styles
this.prefixCls = 'ant-transfer-list';
// #endregion
// #region select all
this.stat = {
checkAll: false,
checkHalf: false,
checkCount: 0,
shownCount: 0
};
}
/**
* @return {?}
*/
NzTransferListComponent.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var classMap = (_a = {},
_a[this.prefixCls] = true,
_a[this.prefixCls + "-with-footer"] = !!this.footer,
_a);
this.updateHostClassService.updateHostClass(this.el.nativeElement, classMap);
};
/**
* @param {?} status
* @return {?}
*/
NzTransferListComponent.prototype.onHandleSelectAll = /**
* @param {?} status
* @return {?}
*/
function (status) {
this.dataSource.forEach(( /**
* @param {?} item
* @return {?}
*/function (item) {
if (!item.disabled && !item._hiden) {
item.checked = status;
}
}));
this.updateCheckStatus();
this.handleSelectAll.emit(status);
};
/**
* @private
* @return {?}
*/
NzTransferListComponent.prototype.updateCheckStatus = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var validCount = this.dataSource.filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return !w.disabled; })).length;
this.stat.checkCount = this.dataSource.filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return w.checked && !w.disabled; })).length;
this.stat.shownCount = this.dataSource.filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return !w._hiden; })).length;
this.stat.checkAll = validCount > 0 && validCount === this.stat.checkCount;
this.stat.checkHalf = this.stat.checkCount > 0 && !this.stat.checkAll;
};
// #endregion
// #region search
// #endregion
// #region search
/**
* @param {?} value
* @return {?}
*/
NzTransferListComponent.prototype.handleFilter =
// #endregion
// #region search
/**
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
this.filter = value;
this.dataSource.forEach(( /**
* @param {?} item
* @return {?}
*/function (item) {
item._hiden = value.length > 0 && !_this.matchFilter(value, item);
}));
this.stat.shownCount = this.dataSource.filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return !w._hiden; })).length;
this.filterChange.emit({ direction: this.direction, value: value });
};
/**
* @return {?}
*/
NzTransferListComponent.prototype.handleClear = /**
* @return {?}
*/
function () {
this.handleFilter('');
};
/**
* @private
* @param {?} text
* @param {?} item
* @return {?}
*/
NzTransferListComponent.prototype.matchFilter = /**
* @private
* @param {?} text
* @param {?} item
* @return {?}
*/
function (text, item) {
if (this.filterOption) {
return this.filterOption(text, item);
}
return item.title.includes(text);
};
/**
* @param {?} changes
* @return {?}
*/
NzTransferListComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if ('footer' in changes) {
this.setClassMap();
}
};
/**
* @return {?}
*/
NzTransferListComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.setClassMap();
};
/**
* @return {?}
*/
NzTransferListComponent.prototype.markForCheck = /**
* @return {?}
*/
function () {
this.updateCheckStatus();
this.cdr.markForCheck();
};
/**
* @param {?} item
* @return {?}
*/
NzTransferListComponent.prototype._handleSelect = /**
* @param {?} item
* @return {?}
*/
function (item) {
if (this.disabled || item.disabled) {
return;
}
item.checked = !item.checked;
this.updateCheckStatus();
this.handleSelect.emit(item);
};
NzTransferListComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-transfer-list',
preserveWhitespaces: false,
providers: [NzUpdateHostClassService],
template: "<div class=\"ant-transfer-list-header\">\n <label nz-checkbox [nzChecked]=\"stat.checkAll\" (nzCheckedChange)=\"onHandleSelectAll($event)\"\n [nzIndeterminate]=\"stat.checkHalf\" [nzDisabled]=\"stat.shownCount == 0 || disabled\">\n </label>\n <span class=\"ant-transfer-list-header-selected\">\n <span>{{ (stat.checkCount > 0 ? stat.checkCount + '/' : '') + stat.shownCount }} {{ dataSource.length > 1 ? itemsUnit : itemUnit }}</span>\n <span *ngIf=\"titleText\" class=\"ant-transfer-list-header-title\">{{ titleText }}</span>\n </span>\n</div>\n<div class=\"{{showSearch ? 'ant-transfer-list-body ant-transfer-list-body-with-search' : 'ant-transfer-list-body'}}\"\n [ngClass]=\"{'ant-transfer__nodata': stat.shownCount === 0}\">\n <div *ngIf=\"showSearch\" class=\"ant-transfer-list-body-search-wrapper\">\n <div nz-transfer-search\n (valueChanged)=\"handleFilter($event)\"\n (valueClear)=\"handleClear()\"\n [placeholder]=\"searchPlaceholder\"\n [disabled]=\"disabled\"\n [value]=\"filter\"></div>\n </div>\n <ul class=\"ant-transfer-list-content\">\n <ng-container *ngFor=\"let item of dataSource\">\n <li *ngIf=\"!item._hiden\"\n class=\"ant-transfer-list-content-item\" [ngClass]=\"{'ant-transfer-list-content-item-disabled': disabled || item.disabled}\">\n <label nz-checkbox [nzChecked]=\"item.checked\" (nzCheckedChange)=\"_handleSelect(item)\" [nzDisabled]=\"disabled || item.disabled\">\n <ng-container *ngIf=\"!render; else renderContainer\">{{ item.title }}</ng-container>\n <ng-template #renderContainer [ngTemplateOutlet]=\"render\" [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-template>\n </label>\n </li>\n </ng-container>\n </ul>\n <div *ngIf=\"dataSource.length === 0\" class=\"ant-transfer-list-body-not-found\">\n <nz-embed-empty [nzComponentName]=\"'transfer'\" [specificContent]=\"notFoundContent\"></nz-embed-empty>\n </div>\n</div>\n<div *ngIf=\"footer\" class=\"ant-transfer-list-footer\">\n <ng-template [ngTemplateOutlet]=\"footer\" [ngTemplateOutletContext]=\"{ $implicit: direction }\"></ng-template>\n</div>",
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzTransferListComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: NzUpdateHostClassService },
{ type: i0.ChangeDetectorRef }
];
};
NzTransferListComponent.propDecorators = {
direction: [{ type: i0.Input }],
titleText: [{ type: i0.Input }],
dataSource: [{ type: i0.Input }],
itemUnit: [{ type: i0.Input }],
itemsUnit: [{ type: i0.Input }],
filter: [{ type: i0.Input }],
disabled: [{ type: i0.Input }],
showSearch: [{ type: i0.Input }],
searchPlaceholder: [{ type: i0.Input }],
notFoundContent: [{ type: i0.Input }],
filterOption: [{ type: i0.Input }],
render: [{ type: i0.Input }],
footer: [{ type: i0.Input }],
handleSelectAll: [{ type: i0.Output }],
handleSelect: [{ type: i0.Output }],
filterChange: [{ type: i0.Output }]
};
return NzTransferListComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTransferSearchComponent = /** @class */ (function () {
// endregion
function NzTransferSearchComponent(cdr) {
this.cdr = cdr;
this.valueChanged = new i0.EventEmitter();
this.valueClear = new i0.EventEmitter();
}
/**
* @return {?}
*/
NzTransferSearchComponent.prototype._handle = /**
* @return {?}
*/
function () {
this.valueChanged.emit(this.value);
};
/**
* @return {?}
*/
NzTransferSearchComponent.prototype._clear = /**
* @return {?}
*/
function () {
if (this.disabled) {
return;
}
this.value = '';
this.valueClear.emit();
};
/**
* @return {?}
*/
NzTransferSearchComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.cdr.detectChanges();
};
NzTransferSearchComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-transfer-search]',
preserveWhitespaces: false,
template: "<input [(ngModel)]=\"value\" (ngModelChange)=\"_handle()\" [disabled]=\"disabled\" [placeholder]=\"placeholder\"\n class=\"ant-input ant-transfer-list-search\" [ngClass]=\"{'ant-input-disabled': disabled}\">\n<a *ngIf=\"value && value.length > 0; else def\" class=\"ant-transfer-list-search-action\" (click)=\"_clear()\">\n <i nz-icon type=\"close-circle\"></i>\n</a>\n<ng-template #def>\n <span class=\"ant-transfer-list-search-action\"><i nz-icon type=\"search\"></i></span>\n</ng-template>",
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzTransferSearchComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef }
];
};
NzTransferSearchComponent.propDecorators = {
placeholder: [{ type: i0.Input }],
value: [{ type: i0.Input }],
disabled: [{ type: i0.Input }],
valueChanged: [{ type: i0.Output }],
valueClear: [{ type: i0.Output }]
};
return NzTransferSearchComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTransferComponent = /** @class */ (function () {
// #endregion
function NzTransferComponent(cdr, i18n, renderer, elementRef) {
var _this = this;
this.cdr = cdr;
this.i18n = i18n;
this.unsubscribe$ = new rxjs.Subject();
// tslint:disable-next-line:no-any
this.locale = {};
this.leftFilter = '';
this.rightFilter = '';
// #region fields
this.nzDisabled = false;
this.nzDataSource = [];
this.nzTitles = ['', ''];
this.nzOperations = [];
this.nzCanMove = ( /**
* @param {?} arg
* @return {?}
*/function (arg) { return rxjs.of(arg.list); });
this.nzShowSearch = false;
// events
this.nzChange = new i0.EventEmitter();
this.nzSearchChange = new i0.EventEmitter();
this.nzSelectChange = new i0.EventEmitter();
// #endregion
// #region process data
// left
this.leftDataSource = [];
// right
this.rightDataSource = [];
this.handleLeftSelectAll = ( /**
* @param {?} checked
* @return {?}
*/function (checked) { return _this.handleSelect('left', checked); });
this.handleRightSelectAll = ( /**
* @param {?} checked
* @return {?}
*/function (checked) { return _this.handleSelect('right', checked); });
this.handleLeftSelect = ( /**
* @param {?} item
* @return {?}
*/function (item) { return _this.handleSelect('left', item.checked, item); });
this.handleRightSelect = ( /**
* @param {?} item
* @return {?}
*/function (item) { return _this.handleSelect('right', item.checked, item); });
// #endregion
// #region operation
this.leftActive = false;
this.rightActive = false;
this.moveToLeft = ( /**
* @return {?}
*/function () { return _this.moveTo('left'); });
this.moveToRight = ( /**
* @return {?}
*/function () { return _this.moveTo('right'); });
renderer.addClass(elementRef.nativeElement, 'ant-transfer');
}
/**
* @private
* @return {?}
*/
NzTransferComponent.prototype.splitDataSource = /**
* @private
* @return {?}
*/
function () {
var _this = this;
this.leftDataSource = [];
this.rightDataSource = [];
this.nzDataSource.forEach(( /**
* @param {?} record
* @return {?}
*/function (record) {
if (record.direction === 'right') {
_this.rightDataSource.push(record);
}
else {
_this.leftDataSource.push(record);
}
}));
};
/**
* @private
* @param {?} direction
* @return {?}
*/
NzTransferComponent.prototype.getCheckedData = /**
* @private
* @param {?} direction
* @return {?}
*/
function (direction) {
return this[direction === 'left' ? 'leftDataSource' : 'rightDataSource'].filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return w.checked; }));
};
/**
* @param {?} direction
* @param {?} checked
* @param {?=} item
* @return {?}
*/
NzTransferComponent.prototype.handleSelect = /**
* @param {?} direction
* @param {?} checked
* @param {?=} item
* @return {?}
*/
function (direction, checked, item) {
/** @type {?} */
var list = this.getCheckedData(direction);
this.updateOperationStatus(direction, list.length);
this.nzSelectChange.emit({ direction: direction, checked: checked, list: list, item: item });
};
/**
* @param {?} ret
* @return {?}
*/
NzTransferComponent.prototype.handleFilterChange = /**
* @param {?} ret
* @return {?}
*/
function (ret) {
this.nzSearchChange.emit(ret);
};
/**
* @private
* @param {?} direction
* @param {?=} count
* @return {?}
*/
NzTransferComponent.prototype.updateOperationStatus = /**
* @private
* @param {?} direction
* @param {?=} count
* @return {?}
*/
function (direction, count) {
this[direction === 'right' ? 'leftActive' : 'rightActive'] = (typeof count === 'undefined' ? this.getCheckedData(direction).filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return !w.disabled; })).length : count) > 0;
};
/**
* @param {?} direction
* @return {?}
*/
NzTransferComponent.prototype.moveTo = /**
* @param {?} direction
* @return {?}
*/
function (direction) {
var _this = this;
/** @type {?} */
var oppositeDirection = direction === 'left' ? 'right' : 'left';
this.updateOperationStatus(oppositeDirection, 0);
/** @type {?} */
var datasource = direction === 'left' ? this.rightDataSource : this.leftDataSource;
/** @type {?} */
var moveList = datasource.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.checked === true && !item.disabled; }));
this.nzCanMove({ direction: direction, list: moveList })
.subscribe(( /**
* @param {?} newMoveList
* @return {?}
*/function (newMoveList) {
return _this.truthMoveTo(direction, newMoveList.filter(( /**
* @param {?} i
* @return {?}
*/function (i) { return !!i; })));
}), ( /**
* @return {?}
*/function () {
return moveList.forEach(( /**
* @param {?} i
* @return {?}
*/function (i) { return i.checked = false; }));
}));
};
/**
* @private
* @param {?} direction
* @param {?} list
* @return {?}
*/
NzTransferComponent.prototype.truthMoveTo = /**
* @private
* @param {?} direction
* @param {?} list
* @return {?}
*/
function (direction, list) {
var e_1, _a;
/** @type {?} */
var oppositeDirection = direction === 'left' ? 'right' : 'left';
/** @type {?} */
var datasource = direction === 'left' ? this.rightDataSource : this.leftDataSource;
/** @type {?} */
var targetDatasource = direction === 'left' ? this.leftDataSource : this.rightDataSource;
try {
for (var list_1 = __values(list), list_1_1 = list_1.next(); !list_1_1.done; list_1_1 = list_1.next()) {
var item = list_1_1.value;
item.checked = false;
targetDatasource.push(item);
datasource.splice(datasource.indexOf(item), 1);
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (list_1_1 && !list_1_1.done && (_a = list_1.return))
_a.call(list_1);
}
finally {
if (e_1)
throw e_1.error;
}
}
this.updateOperationStatus(oppositeDirection);
this.nzChange.emit({
from: oppositeDirection,
to: direction,
list: list
});
this.markForCheckAllList();
};
/**
* @private
* @return {?}
*/
NzTransferComponent.prototype.markForCheckAllList = /**
* @private
* @return {?}
*/
function () {
if (!this.lists) {
return;
}
this.lists.forEach(( /**
* @param {?} i
* @return {?}
*/function (i) { return i.markForCheck(); }));
};
/**
* @return {?}
*/
NzTransferComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.i18n.localeChange.pipe(operators.takeUntil(this.unsubscribe$)).subscribe(( /**
* @return {?}
*/function () {
_this.locale = _this.i18n.getLocaleData('Transfer');
_this.markForCheckAllList();
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzTransferComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if ('nzDataSource' in changes) {
this.splitDataSource();
this.updateOperationStatus('left');
this.updateOperationStatus('right');
this.cdr.detectChanges();
this.markForCheckAllList();
}
};
/**
* @return {?}
*/
NzTransferComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.unsubscribe$.next();
this.unsubscribe$.complete();
};
NzTransferComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-transfer',
preserveWhitespaces: false,
template: "<nz-transfer-list class=\"ant-transfer-list\" [ngStyle]=\"nzListStyle\" data-direction=\"left\"\n [titleText]=\"nzTitles[0]\"\n [dataSource]=\"leftDataSource\"\n [filter]=\"leftFilter\"\n [filterOption]=\"nzFilterOption\"\n (filterChange)=\"handleFilterChange($event)\"\n [render]=\"nzRender\"\n [disabled]=\"nzDisabled\"\n [showSearch]=\"nzShowSearch\"\n [searchPlaceholder]=\"nzSearchPlaceholder || locale.searchPlaceholder\"\n [notFoundContent]=\"nzNotFoundContent\"\n [itemUnit]=\"nzItemUnit || locale.itemUnit\"\n [itemsUnit]=\"nzItemsUnit || locale.itemsUnit\"\n [footer]=\"nzFooter\"\n (handleSelect)=\"handleLeftSelect($event)\"\n (handleSelectAll)=\"handleLeftSelectAll($event)\">\n</nz-transfer-list>\n<div class=\"ant-transfer-operation\">\n <button nz-button (click)=\"moveToLeft()\" [disabled]=\"nzDisabled || !leftActive\" [nzType]=\"'primary'\" [nzSize]=\"'small'\">\n <i nz-icon type=\"left\"></i><span *ngIf=\"nzOperations[1]\">{{ nzOperations[1] }}</span>\n </button>\n <button nz-button (click)=\"moveToRight()\" [disabled]=\"nzDisabled || !rightActive\" [nzType]=\"'primary'\" [nzSize]=\"'small'\">\n <i nz-icon type=\"right\"></i><span *ngIf=\"nzOperations[0]\">{{ nzOperations[0] }}</span>\n </button>\n</div>\n<nz-transfer-list class=\"ant-transfer-list\" [ngStyle]=\"nzListStyle\" data-direction=\"right\"\n [titleText]=\"nzTitles[1]\"\n [dataSource]=\"rightDataSource\"\n [filter]=\"rightFilter\"\n [filterOption]=\"nzFilterOption\"\n (filterChange)=\"handleFilterChange($event)\"\n [render]=\"nzRender\"\n [disabled]=\"nzDisabled\"\n [showSearch]=\"nzShowSearch\"\n [searchPlaceholder]=\"nzSearchPlaceholder || locale.searchPlaceholder\"\n [notFoundContent]=\"nzNotFoundContent\"\n [itemUnit]=\"nzItemUnit || locale.itemUnit\"\n [itemsUnit]=\"nzItemsUnit || locale.itemsUnit\"\n [footer]=\"nzFooter\"\n (handleSelect)=\"handleRightSelect($event)\"\n (handleSelectAll)=\"handleRightSelectAll($event)\">\n</nz-transfer-list>",
host: {
'[class.ant-transfer-disabled]': 'nzDisabled'
},
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzTransferComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzI18nService$$1 },
{ type: i0.Renderer2 },
{ type: i0.ElementRef }
];
};
NzTransferComponent.propDecorators = {
lists: [{ type: i0.ViewChildren, args: [NzTransferListComponent,] }],
nzDisabled: [{ type: i0.Input }],
nzDataSource: [{ type: i0.Input }],
nzTitles: [{ type: i0.Input }],
nzOperations: [{ type: i0.Input }],
nzListStyle: [{ type: i0.Input }],
nzItemUnit: [{ type: i0.Input }],
nzItemsUnit: [{ type: i0.Input }],
nzCanMove: [{ type: i0.Input }],
nzRender: [{ type: i0.Input }],
nzFooter: [{ type: i0.Input }],
nzShowSearch: [{ type: i0.Input }],
nzFilterOption: [{ type: i0.Input }],
nzSearchPlaceholder: [{ type: i0.Input }],
nzNotFoundContent: [{ type: i0.Input }],
nzChange: [{ type: i0.Output }],
nzSearchChange: [{ type: i0.Output }],
nzSelectChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTransferComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTransferComponent.prototype, "nzShowSearch", void 0);
return NzTransferComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTransferModule = /** @class */ (function () {
function NzTransferModule() {
}
NzTransferModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, NzCheckboxModule, NzButtonModule, NzInputModule, NzI18nModule, NzIconModule, NzEmptyModule],
declarations: [NzTransferComponent, NzTransferListComponent, NzTransferSearchComponent],
exports: [NzTransferComponent]
},] }
];
return NzTransferModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeNode = /** @class */ (function () {
function NzTreeNode(option, parent, service) {
if (parent === void 0) {
parent = null;
}
var _this = this;
this.level = 0;
if (option instanceof NzTreeNode) {
return option;
}
this._service = service;
this._title = option.title || '---';
this.key = option.key || null;
this._icon = option.icon || '';
this._isLeaf = option.isLeaf || false;
this.origin = option;
this._children = [];
this.parentNode = parent;
// option params
this._isChecked = option.checked || false;
this._isSelectable = option.disabled || (option.selectable === false ? false : true);
this._isDisabled = option.disabled || false;
this._isDisableCheckbox = option.disableCheckbox || false;
this._isExpanded = option.isLeaf ? false : (option.expanded || false);
this._isHalfChecked = false;
this._isSelected = (!option.disabled && option.selected) || false;
this._isLoading = false;
this.isMatched = false;
/**
* parent's checked status will affect children while initializing
*/
if (parent) {
this.level = parent.level + 1;
}
else {
this.level = 0;
}
if (typeof (option.children) !== 'undefined' && option.children !== null) {
option.children.forEach(( /**
* @param {?} nodeOptions
* @return {?}
*/function (nodeOptions) {
if ((_this.treeService && !_this.treeService.isCheckStrictly) && option.checked && !option.disabled && !nodeOptions.disabled && !nodeOptions.disableCheckbox) {
nodeOptions.checked = option.checked;
}
_this._children.push(new NzTreeNode(nodeOptions, _this));
}));
}
}
Object.defineProperty(NzTreeNode.prototype, "treeService", {
get: /**
* @return {?}
*/ function () {
if (this._service) {
return this._service;
}
else if (this.parentNode) {
return this.parentNode.treeService;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "service", {
/**
* auto generate
* get
* set
*/
get: /**
* auto generate
* get
* set
* @return {?}
*/ function () {
return this._service;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._service = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "title", {
get: /**
* @return {?}
*/ function () {
return this._title;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._title = value;
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "icon", {
get: /**
* @return {?}
*/ function () {
return this._icon;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._icon = value;
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "children", {
get: /**
* @return {?}
*/ function () {
return this._children;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._children = value;
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isLeaf", {
get: /**
* @return {?}
*/ function () {
return this._isLeaf;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isLeaf = value;
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isChecked", {
get: /**
* @return {?}
*/ function () {
return this._isChecked;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isChecked = value;
this.origin.checked = value;
this.treeService.setCheckedNodeList(this);
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isHalfChecked", {
get: /**
* @return {?}
*/ function () {
return this._isHalfChecked;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isHalfChecked = value;
this.treeService.setHalfCheckedNodeList(this);
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isSelectable", {
get: /**
* @return {?}
*/ function () {
return this._isSelectable;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isSelectable = value;
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isDisabled", {
get: /**
* @return {?}
*/ function () {
return this._isDisabled;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isDisabled = value;
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isDisableCheckbox", {
get: /**
* @return {?}
*/ function () {
return this._isDisableCheckbox;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isDisableCheckbox = value;
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isExpanded", {
get: /**
* @return {?}
*/ function () {
return this._isExpanded;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isExpanded = value;
this.origin.expanded = value;
this.treeService.setExpandedNodeList(this);
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isSelected", {
get: /**
* @return {?}
*/ function () {
return this._isSelected;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isSelected = value;
this.origin.selected = value;
this.treeService.setNodeActive(this);
this.update();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNode.prototype, "isLoading", {
get: /**
* @return {?}
*/ function () {
return this._isLoading;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._isLoading = value;
this.update();
},
enumerable: true,
configurable: true
});
/**
* end
* get
* set
*/
/**
* end
* get
* set
* @return {?}
*/
NzTreeNode.prototype.getParentNode = /**
* end
* get
* set
* @return {?}
*/
function () {
return this.parentNode;
};
/**
* @return {?}
*/
NzTreeNode.prototype.getChildren = /**
* @return {?}
*/
function () {
return this.children;
};
/**
* 支持按索引位置插入,叶子节点不可添加
*/
// tslint:disable-next-line:no-any
/**
* 支持按索引位置插入,叶子节点不可添加
* @param {?} children
* @param {?=} childPos
* @return {?}
*/
// tslint:disable-next-line:no-any
NzTreeNode.prototype.addChildren = /**
* 支持按索引位置插入,叶子节点不可添加
* @param {?} children
* @param {?=} childPos
* @return {?}
*/
// tslint:disable-next-line:no-any
function (children, childPos) {
var _this = this;
if (childPos === void 0) {
childPos = -1;
}
if (!this.isLeaf) {
children.forEach(( /**
* @param {?} node
* @return {?}
*/function (node) {
/** @type {?} */
var refreshLevel = ( /**
* @param {?} n
* @return {?}
*/function (n) {
n.getChildren().forEach(( /**
* @param {?} c
* @return {?}
*/function (c) {
c.level = c.getParentNode().level + 1;
// flush origin
c.origin.level = c.level;
refreshLevel(c);
}));
});
/** @type {?} */
var child = node;
if (child instanceof NzTreeNode) {
child.parentNode = _this;
}
else {
child = new NzTreeNode(node, _this);
}
child.level = _this.level + 1;
child.origin.level = child.level;
refreshLevel(child);
try {
childPos === -1 ? _this.children.push(child) : _this.children.splice(childPos, 0, child);
// flush origin
}
catch (e) {
}
}));
this.origin.children = this.getChildren().map(( /**
* @param {?} v
* @return {?}
*/function (v) { return v.origin; }));
// remove loading state
this.isLoading = false;
this.treeService.triggerEventChange$.next({
'eventName': 'addChildren',
'node': this
});
}
};
/**
* @return {?}
*/
NzTreeNode.prototype.clearChildren = /**
* @return {?}
*/
function () {
var _this = this;
this.getChildren().forEach(( /**
* @param {?} n
* @return {?}
*/function (n) {
_this.treeService.afterRemove(n, false);
}));
this.getChildren().splice(0, this.getChildren().length);
this.origin.children = [];
// refresh checked state
this.treeService.calcCheckedKeys(this.treeService.checkedNodeList.map(( /**
* @param {?} v
* @return {?}
*/function (v) { return v.key; })), this.treeService.rootNodes, this.treeService.isCheckStrictly);
this.update();
};
/**
* @return {?}
*/
NzTreeNode.prototype.remove = /**
* @return {?}
*/
function () {
var _this = this;
if (this.getParentNode()) {
/** @type {?} */
var index = this.getParentNode().getChildren().findIndex(( /**
* @param {?} n
* @return {?}
*/function (n) { return n.key === _this.key; }));
this.getParentNode().getChildren().splice(index, 1);
this.getParentNode().origin.children.splice(index, 1);
this.treeService.afterRemove(this);
this.update();
}
};
/**
* @return {?}
*/
NzTreeNode.prototype.update = /**
* @return {?}
*/
function () {
if (this.component) {
this.component.setClassMap();
this.component.markForCheck();
}
};
return NzTreeNode;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} node
* @return {?}
*/
function isCheckDisabled(node) {
var isDisabled = node.isDisabled, isDisableCheckbox = node.isDisableCheckbox;
return !!(isDisabled || isDisableCheckbox);
}
// tslint:disable-next-line:no-any
/**
* @param {?} needle
* @param {?} haystack
* @return {?}
*/
function isInArray(needle, haystack) {
return (haystack.length > 0 && haystack.indexOf(needle) > -1);
}
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeBaseService = /** @class */ (function () {
function NzTreeBaseService() {
this.DRAG_SIDE_RANGE = 0.25;
this.DRAG_MIN_GAP = 2;
this.isCheckStrictly = false;
this.isMultiple = false;
this.rootNodes = [];
this.selectedNodeList = [];
this.expandedNodeList = [];
this.checkedNodeList = [];
this.halfCheckedNodeList = [];
this.matchedNodeList = [];
this.triggerEventChange$ = new rxjs.Subject();
}
/**
* trigger event
*/
/**
* trigger event
* @return {?}
*/
NzTreeBaseService.prototype.eventTriggerChanged = /**
* trigger event
* @return {?}
*/
function () {
return this.triggerEventChange$.asObservable();
};
/**
* reset tree nodes will clear default node list
*/
/**
* reset tree nodes will clear default node list
* @param {?} nzNodes
* @return {?}
*/
NzTreeBaseService.prototype.initTree = /**
* reset tree nodes will clear default node list
* @param {?} nzNodes
* @return {?}
*/
function (nzNodes) {
var _this = this;
this.rootNodes = nzNodes;
this.expandedNodeList = [];
this.selectedNodeList = [];
this.halfCheckedNodeList = [];
this.checkedNodeList = [];
this.matchedNodeList = [];
// refresh node checked state
setTimeout(( /**
* @return {?}
*/function () {
_this.refreshCheckState(_this.isCheckStrictly);
}));
};
/**
* @return {?}
*/
NzTreeBaseService.prototype.getSelectedNode = /**
* @return {?}
*/
function () {
return this.selectedNode;
};
/**
* get some list
*/
/**
* get some list
* @return {?}
*/
NzTreeBaseService.prototype.getSelectedNodeList = /**
* get some list
* @return {?}
*/
function () {
return this.conductNodeState('select');
};
/**
* return checked nodes
*/
/**
* return checked nodes
* @return {?}
*/
NzTreeBaseService.prototype.getCheckedNodeList = /**
* return checked nodes
* @return {?}
*/
function () {
return this.conductNodeState('check');
};
/**
* @return {?}
*/
NzTreeBaseService.prototype.getHalfCheckedNodeList = /**
* @return {?}
*/
function () {
return this.conductNodeState('halfCheck');
};
/**
* return expanded nodes
*/
/**
* return expanded nodes
* @return {?}
*/
NzTreeBaseService.prototype.getExpandedNodeList = /**
* return expanded nodes
* @return {?}
*/
function () {
return this.conductNodeState('expand');
};
/**
* return search matched nodes
*/
/**
* return search matched nodes
* @return {?}
*/
NzTreeBaseService.prototype.getMatchedNodeList = /**
* return search matched nodes
* @return {?}
*/
function () {
return this.conductNodeState('match');
};
// tslint:disable-next-line:no-any
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @return {?}
*/
NzTreeBaseService.prototype.isArrayOfNzTreeNode =
// tslint:disable-next-line:no-any
/**
* @param {?} value
* @return {?}
*/
function (value) {
return value.every(( /**
* @param {?} item
* @return {?}
*/function (item) { return item instanceof NzTreeNode; }));
};
/**
* reset selectedNodeList
*/
/**
* reset selectedNodeList
* @param {?} selectedKeys
* @param {?} nzNodes
* @param {?=} isMulti
* @return {?}
*/
NzTreeBaseService.prototype.calcSelectedKeys = /**
* reset selectedNodeList
* @param {?} selectedKeys
* @param {?} nzNodes
* @param {?=} isMulti
* @return {?}
*/
function (selectedKeys, nzNodes, isMulti) {
if (isMulti === void 0) {
isMulti = false;
}
/** @type {?} */
var calc = ( /**
* @param {?} nodes
* @return {?}
*/function (nodes) {
return nodes.every(( /**
* @param {?} node
* @return {?}
*/function (node) {
if (isInArray(node.key, selectedKeys)) {
node.isSelected = true;
if (!isMulti) {
// if not support multi select
return false;
}
}
else {
node.isSelected = false;
}
if (node.children.length > 0) {
// Recursion
return calc(node.children);
}
return true;
}));
});
calc(nzNodes);
};
/**
* reset expandedNodeList
*/
/**
* reset expandedNodeList
* @param {?} expandedKeys
* @param {?} nzNodes
* @return {?}
*/
NzTreeBaseService.prototype.calcExpandedKeys = /**
* reset expandedNodeList
* @param {?} expandedKeys
* @param {?} nzNodes
* @return {?}
*/
function (expandedKeys, nzNodes) {
this.expandedNodeList = [];
/** @type {?} */
var calc = ( /**
* @param {?} nodes
* @return {?}
*/function (nodes) {
nodes.forEach(( /**
* @param {?} node
* @return {?}
*/function (node) {
if (isInArray(node.key, expandedKeys)) {
node.isExpanded = true;
}
else {
node.isExpanded = false;
}
if (node.children.length > 0) {
calc(node.children);
}
}));
});
calc(nzNodes);
};
/**
* reset checkedNodeList
*/
/**
* reset checkedNodeList
* @param {?} checkedKeys
* @param {?} nzNodes
* @param {?=} isCheckStrictly
* @return {?}
*/
NzTreeBaseService.prototype.calcCheckedKeys = /**
* reset checkedNodeList
* @param {?} checkedKeys
* @param {?} nzNodes
* @param {?=} isCheckStrictly
* @return {?}
*/
function (checkedKeys, nzNodes, isCheckStrictly) {
if (isCheckStrictly === void 0) {
isCheckStrictly = false;
}
this.checkedNodeList = [];
this.halfCheckedNodeList = [];
/** @type {?} */
var calc = ( /**
* @param {?} nodes
* @return {?}
*/function (nodes) {
nodes.forEach(( /**
* @param {?} node
* @return {?}
*/function (node) {
if (isInArray(node.key, checkedKeys)) {
node.isChecked = true;
node.isHalfChecked = false;
}
else {
node.isChecked = false;
node.isHalfChecked = false;
}
if (node.children.length > 0) {
calc(node.children);
}
}));
});
calc(nzNodes);
// controlled state
this.refreshCheckState(isCheckStrictly);
};
/**
* set drag node
*/
/**
* set drag node
* @param {?=} node
* @return {?}
*/
NzTreeBaseService.prototype.setSelectedNode = /**
* set drag node
* @param {?=} node
* @return {?}
*/
function (node) {
this.selectedNode = null;
if (node) {
this.selectedNode = node;
}
};
/**
* set node selected status
*/
/**
* set node selected status
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.setNodeActive = /**
* set node selected status
* @param {?} node
* @return {?}
*/
function (node) {
if (!this.isMultiple && node.isSelected) {
this.selectedNodeList.forEach(( /**
* @param {?} n
* @return {?}
*/function (n) {
if (node.key !== n.key) {
// reset other nodes
n.isSelected = false;
}
}));
// single mode: remove pre node
this.selectedNodeList = [];
}
this.setSelectedNodeList(node, this.isMultiple);
};
/**
* add or remove node to selectedNodeList
*/
/**
* add or remove node to selectedNodeList
* @param {?} node
* @param {?=} isMultiple
* @return {?}
*/
NzTreeBaseService.prototype.setSelectedNodeList = /**
* add or remove node to selectedNodeList
* @param {?} node
* @param {?=} isMultiple
* @return {?}
*/
function (node, isMultiple) {
if (isMultiple === void 0) {
isMultiple = false;
}
/** @type {?} */
var index = this.selectedNodeList.findIndex(( /**
* @param {?} n
* @return {?}
*/function (n) { return node.key === n.key; }));
if (isMultiple) {
if (node.isSelected && index === -1) {
this.selectedNodeList.push(node);
}
}
else {
if (node.isSelected && index === -1) {
this.selectedNodeList = [node];
}
}
index = this.selectedNodeList.findIndex(( /**
* @param {?} n
* @return {?}
*/function (n) { return node.key === n.key; }));
if (!node.isSelected && index > -1) {
this.selectedNodeList.splice(index, 1);
}
};
/**
* merge checked nodes
*/
/**
* merge checked nodes
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.setHalfCheckedNodeList = /**
* merge checked nodes
* @param {?} node
* @return {?}
*/
function (node) {
/** @type {?} */
var index = this.halfCheckedNodeList.findIndex(( /**
* @param {?} n
* @return {?}
*/function (n) { return node.key === n.key; }));
if (node.isHalfChecked && index === -1) {
this.halfCheckedNodeList.push(node);
}
else if (!node.isHalfChecked && index > -1) {
this.halfCheckedNodeList.splice(index, 1);
}
};
/**
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.setCheckedNodeList = /**
* @param {?} node
* @return {?}
*/
function (node) {
/** @type {?} */
var index = this.checkedNodeList.findIndex(( /**
* @param {?} n
* @return {?}
*/function (n) { return node.key === n.key; }));
if (node.isChecked && index === -1) {
this.checkedNodeList.push(node);
}
else if (!node.isChecked && index > -1) {
this.checkedNodeList.splice(index, 1);
}
};
/**
* conduct checked/selected/expanded keys
*/
/**
* conduct checked/selected/expanded keys
* @param {?=} type
* @return {?}
*/
NzTreeBaseService.prototype.conductNodeState = /**
* conduct checked/selected/expanded keys
* @param {?=} type
* @return {?}
*/
function (type) {
var _this = this;
if (type === void 0) {
type = 'check';
}
/** @type {?} */
var resultNodesList = [];
switch (type) {
case 'select':
resultNodesList = this.selectedNodeList;
break;
case 'expand':
resultNodesList = this.expandedNodeList;
break;
case 'match':
resultNodesList = this.matchedNodeList;
break;
case 'check':
resultNodesList = this.checkedNodeList;
/** @type {?} */
var isIgnore_1 = ( /**
* @param {?} node
* @return {?}
*/function (node) {
if (node.getParentNode()) {
if (_this.checkedNodeList.findIndex(( /**
* @param {?} v
* @return {?}
*/function (v) { return v.key === node.getParentNode().key; })) > -1) {
return true;
}
else {
return isIgnore_1(node.getParentNode());
}
}
return false;
});
// merge checked
if (!this.isCheckStrictly) {
resultNodesList = this.checkedNodeList.filter(( /**
* @param {?} n
* @return {?}
*/function (n) { return !isIgnore_1(n); }));
}
break;
case 'halfCheck':
if (!this.isCheckStrictly) {
resultNodesList = this.halfCheckedNodeList;
}
break;
}
return resultNodesList;
};
/**
* set expanded nodes
*/
/**
* set expanded nodes
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.setExpandedNodeList = /**
* set expanded nodes
* @param {?} node
* @return {?}
*/
function (node) {
if (node.isLeaf) {
return;
}
/** @type {?} */
var index = this.expandedNodeList.findIndex(( /**
* @param {?} n
* @return {?}
*/function (n) { return node.key === n.key; }));
if (node.isExpanded && index === -1) {
this.expandedNodeList.push(node);
}
else if (!node.isExpanded && index > -1) {
this.expandedNodeList.splice(index, 1);
}
};
/**
* check state
* @param node
*/
/**
* check state
* @param {?=} isCheckStrictly
* @return {?}
*/
NzTreeBaseService.prototype.refreshCheckState = /**
* check state
* @param {?=} isCheckStrictly
* @return {?}
*/
function (isCheckStrictly) {
var _this = this;
if (isCheckStrictly === void 0) {
isCheckStrictly = false;
}
if (isCheckStrictly) {
return;
}
this.checkedNodeList.forEach(( /**
* @param {?} node
* @return {?}
*/function (node) {
_this.conduct(node);
}));
};
// reset other node checked state based current node
// reset other node checked state based current node
/**
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.conduct =
// reset other node checked state based current node
/**
* @param {?} node
* @return {?}
*/
function (node) {
/** @type {?} */
var isChecked = node.isChecked;
if (node) {
this.conductUp(node);
this.conductDown(node, isChecked);
}
};
/**
* 1、children half checked
* 2、children all checked, parent checked
* 3、no children checked
*/
/**
* 1、children half checked
* 2、children all checked, parent checked
* 3、no children checked
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.conductUp = /**
* 1、children half checked
* 2、children all checked, parent checked
* 3、no children checked
* @param {?} node
* @return {?}
*/
function (node) {
/** @type {?} */
var parentNode = node.getParentNode();
// 全禁用节点不选中
if (parentNode) {
if (!isCheckDisabled(parentNode)) {
if (parentNode.children.every(( /**
* @param {?} child
* @return {?}
*/function (child) { return isCheckDisabled(child) || (!child.isHalfChecked && child.isChecked); }))) {
parentNode.isChecked = true;
parentNode.isHalfChecked = false;
}
else if (parentNode.children.some(( /**
* @param {?} child
* @return {?}
*/function (child) { return child.isHalfChecked || child.isChecked; }))) {
parentNode.isChecked = false;
parentNode.isHalfChecked = true;
}
else {
parentNode.isChecked = false;
parentNode.isHalfChecked = false;
}
}
this.setCheckedNodeList(parentNode);
this.setHalfCheckedNodeList(parentNode);
this.conductUp(parentNode);
}
};
/**
* reset child check state
*/
/**
* reset child check state
* @param {?} node
* @param {?} value
* @return {?}
*/
NzTreeBaseService.prototype.conductDown = /**
* reset child check state
* @param {?} node
* @param {?} value
* @return {?}
*/
function (node, value) {
var _this = this;
if (!isCheckDisabled(node)) {
node.isChecked = value;
node.isHalfChecked = false;
this.setCheckedNodeList(node);
this.setHalfCheckedNodeList(node);
node.children.forEach(( /**
* @param {?} n
* @return {?}
*/function (n) {
_this.conductDown(n, value);
}));
}
};
/**
* search value & expand node
* should add expandlist
*/
/**
* search value & expand node
* should add expandlist
* @param {?} value
* @return {?}
*/
NzTreeBaseService.prototype.searchExpand = /**
* search value & expand node
* should add expandlist
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
this.matchedNodeList = [];
/** @type {?} */
var expandedKeys = [];
if (!isNotNil(value)) {
return;
}
// to reset expandedNodeList
/** @type {?} */
var expandParent = ( /**
* @param {?} p
* @return {?}
*/function (p) {
// expand parent node
if (p.getParentNode()) {
expandedKeys.push(p.getParentNode().key);
expandParent(p.getParentNode());
}
});
/** @type {?} */
var searchChild = ( /**
* @param {?} n
* @return {?}
*/function (n) {
if (value && n.title.includes(value)) {
// match the node
n.isMatched = true;
_this.matchedNodeList.push(n);
// expand parentNode
expandParent(n);
}
else {
n.isMatched = false;
}
n.children.forEach(( /**
* @param {?} child
* @return {?}
*/function (child) {
searchChild(child);
}));
});
this.rootNodes.forEach(( /**
* @param {?} child
* @return {?}
*/function (child) {
searchChild(child);
}));
// expand matched keys
this.calcExpandedKeys(expandedKeys, this.rootNodes);
};
/**
* flush after delete node
*/
/**
* flush after delete node
* @param {?} node
* @param {?=} removeSelf
* @return {?}
*/
NzTreeBaseService.prototype.afterRemove = /**
* flush after delete node
* @param {?} node
* @param {?=} removeSelf
* @return {?}
*/
function (node, removeSelf) {
var _this = this;
if (removeSelf === void 0) {
removeSelf = true;
}
/** @type {?} */
var index;
// to reset selectedNodeList & expandedNodeList
/** @type {?} */
var loopNode = ( /**
* @param {?} n
* @return {?}
*/function (n) {
// remove selected node
index = _this.selectedNodeList.findIndex(( /**
* @param {?} v
* @return {?}
*/function (v) { return v.key === n.key; }));
if (index > -1) {
_this.selectedNodeList.splice(index, 1);
}
// remove expanded node
index = _this.expandedNodeList.findIndex(( /**
* @param {?} v
* @return {?}
*/function (v) { return v.key === n.key; }));
if (index > -1) {
_this.expandedNodeList.splice(index, 1);
}
// remove checked node
index = _this.checkedNodeList.findIndex(( /**
* @param {?} v
* @return {?}
*/function (v) { return v.key === n.key; }));
if (index > -1) {
_this.checkedNodeList.splice(index, 1);
}
if (n.children) {
n.children.forEach(( /**
* @param {?} child
* @return {?}
*/function (child) {
loopNode(child);
}));
}
});
loopNode(node);
if (removeSelf) {
this.refreshCheckState(this.isCheckStrictly);
}
};
/**
* drag event
*/
/**
* drag event
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.refreshDragNode = /**
* drag event
* @param {?} node
* @return {?}
*/
function (node) {
var _this = this;
if (node.children.length === 0) {
// until root
this.conductUp(node);
}
else {
node.children.forEach(( /**
* @param {?} child
* @return {?}
*/function (child) {
_this.refreshDragNode(child);
}));
}
};
// reset node level
// reset node level
/**
* @param {?} node
* @return {?}
*/
NzTreeBaseService.prototype.resetNodeLevel =
// reset node level
/**
* @param {?} node
* @return {?}
*/
function (node) {
var e_1, _a;
if (node.getParentNode()) {
node.level = node.getParentNode().level + 1;
}
else {
node.level = 0;
}
try {
for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
this.resetNodeLevel(child);
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
};
/**
* @param {?} event
* @return {?}
*/
NzTreeBaseService.prototype.calcDropPosition = /**
* @param {?} event
* @return {?}
*/
function (event) {
var clientY = event.clientY;
// to fix firefox undefined
var _a = event.srcElement ? event.srcElement.getBoundingClientRect() : (( /** @type {?} */(event.target))).getBoundingClientRect(), top = _a.top, bottom = _a.bottom, height = _a.height;
/** @type {?} */
var des = Math.max(height * this.DRAG_SIDE_RANGE, this.DRAG_MIN_GAP);
if (clientY <= top + des) {
return -1;
}
else if (clientY >= bottom - des) {
return 1;
}
return 0;
};
/**
* drop
* 0: inner -1: pre 1: next
*/
/**
* drop
* 0: inner -1: pre 1: next
* @param {?} targetNode
* @param {?=} dragPos
* @return {?}
*/
NzTreeBaseService.prototype.dropAndApply = /**
* drop
* 0: inner -1: pre 1: next
* @param {?} targetNode
* @param {?=} dragPos
* @return {?}
*/
function (targetNode, dragPos) {
var _this = this;
if (dragPos === void 0) {
dragPos = -1;
}
if (!targetNode || dragPos > 1) {
return;
}
/** @type {?} */
var treeService = targetNode.treeService;
/** @type {?} */
var targetParent = targetNode.getParentNode();
/** @type {?} */
var isSelectedRootNode = this.selectedNode.getParentNode();
// remove the dragNode
if (isSelectedRootNode) {
isSelectedRootNode.children.splice(isSelectedRootNode.children.indexOf(this.selectedNode), 1);
}
else {
this.rootNodes.splice(this.rootNodes.indexOf(this.selectedNode), 1);
}
switch (dragPos) {
case 0:
targetNode.addChildren([this.selectedNode]);
this.resetNodeLevel(targetNode);
break;
case -1:
case 1:
/** @type {?} */
var tIndex = dragPos === 1 ? 1 : 0;
if (targetParent) {
targetParent.addChildren([this.selectedNode], targetParent.children.indexOf(targetNode) + tIndex);
if (this.selectedNode.getParentNode()) {
this.resetNodeLevel(this.selectedNode.getParentNode());
}
}
else {
/** @type {?} */
var targetIndex = this.rootNodes.indexOf(targetNode) + tIndex;
// 根节点插入
this.rootNodes.splice(targetIndex, 0, this.selectedNode);
this.rootNodes[targetIndex].parentNode = null;
this.rootNodes[targetIndex].level = 0;
}
break;
}
// flush all nodes
this.rootNodes.forEach(( /**
* @param {?} child
* @return {?}
*/function (child) {
if (!child.treeService) {
child.service = treeService;
}
_this.refreshDragNode(child);
}));
};
/**
* emit Structure
* eventName
* node
* event: MouseEvent / DragEvent
* dragNode
*/
/**
* emit Structure
* eventName
* node
* event: MouseEvent / DragEvent
* dragNode
* @param {?} eventName
* @param {?} node
* @param {?} event
* @return {?}
*/
NzTreeBaseService.prototype.formatEvent = /**
* emit Structure
* eventName
* node
* event: MouseEvent / DragEvent
* dragNode
* @param {?} eventName
* @param {?} node
* @param {?} event
* @return {?}
*/
function (eventName, node, event) {
/** @type {?} */
var emitStructure = {
'eventName': eventName,
'node': node,
'event': event
};
switch (eventName) {
case 'dragstart':
case 'dragenter':
case 'dragover':
case 'dragleave':
case 'drop':
case 'dragend':
Object.assign(emitStructure, { 'dragNode': this.getSelectedNode() });
break;
case 'click':
case 'dblclick':
Object.assign(emitStructure, { 'selectedKeys': this.selectedNodeList });
Object.assign(emitStructure, { 'nodes': this.selectedNodeList });
Object.assign(emitStructure, { 'keys': this.selectedNodeList.map(( /**
* @param {?} n
* @return {?}
*/function (n) { return n.key; })) });
break;
case 'check':
/** @type {?} */
var checkedNodeList = this.getCheckedNodeList();
Object.assign(emitStructure, { 'checkedKeys': checkedNodeList });
Object.assign(emitStructure, { 'nodes': checkedNodeList });
Object.assign(emitStructure, { 'keys': checkedNodeList.map(( /**
* @param {?} n
* @return {?}
*/function (n) { return n.key; })) });
break;
case 'search':
Object.assign(emitStructure, { 'matchedKeys': this.getMatchedNodeList() });
Object.assign(emitStructure, { 'nodes': this.getMatchedNodeList() });
Object.assign(emitStructure, { 'keys': this.getMatchedNodeList().map(( /**
* @param {?} n
* @return {?}
*/function (n) { return n.key; })) });
break;
case 'expand':
Object.assign(emitStructure, { 'nodes': this.expandedNodeList });
Object.assign(emitStructure, { 'keys': this.expandedNodeList.map(( /**
* @param {?} n
* @return {?}
*/function (n) { return n.key; })) });
break;
}
return emitStructure;
};
/**
* @return {?}
*/
NzTreeBaseService.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.triggerEventChange$.complete();
this.triggerEventChange$ = null;
};
NzTreeBaseService.decorators = [
{ type: i0.Injectable }
];
return NzTreeBaseService;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeNodeComponent = /** @class */ (function () {
function NzTreeNodeComponent(nzTreeService, ngZone, renderer, elRef, cdr, noAnimation) {
this.nzTreeService = nzTreeService;
this.ngZone = ngZone;
this.renderer = renderer;
this.elRef = elRef;
this.cdr = cdr;
this.noAnimation = noAnimation;
this.nzHideUnMatched = false;
this.nzNoAnimation = false;
this.nzSelectMode = false;
this.nzShowIcon = false;
// default var
this.prefixCls = 'ant-tree';
this.highlightKeys = [];
this.nzNodeClass = {};
this.nzNodeSwitcherClass = {};
this.nzNodeContentClass = {};
this.nzNodeCheckboxClass = {};
this.nzNodeContentIconClass = {};
this.nzNodeContentLoadingClass = {};
/**
* drag var
*/
this.destroy$ = new rxjs.Subject();
this.dragPos = 2;
this.dragPosClass = {
'0': 'drag-over',
'1': 'drag-over-gap-bottom',
'-1': 'drag-over-gap-top'
};
/**
* default set
*/
this._searchValue = '';
this._nzDraggable = false;
this._nzExpandAll = false;
}
Object.defineProperty(NzTreeNodeComponent.prototype, "nzDraggable", {
get: /**
* @return {?}
*/ function () {
return this._nzDraggable;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._nzDraggable = value;
this.handDragEvent();
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "nzDefaultExpandAll", {
get: /**
* @return {?}
*/ function () {
return this._nzExpandAll;
},
/**
* @deprecated use
* nzExpandAll instead
*/
set: /**
* @deprecated use
* nzExpandAll instead
* @param {?} value
* @return {?}
*/ function (value) {
this._nzExpandAll = value;
if (value && this.nzTreeNode && !this.nzTreeNode.isLeaf) {
this.nzTreeNode.isExpanded = true;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "nzExpandAll", {
get: /**
* @return {?}
*/ function () {
return this._nzExpandAll;
},
// default set
set:
// default set
/**
* @param {?} value
* @return {?}
*/
function (value) {
this._nzExpandAll = value;
if (value && this.nzTreeNode && !this.nzTreeNode.isLeaf) {
this.nzTreeNode.isExpanded = true;
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "nzSearchValue", {
get: /**
* @return {?}
*/ function () {
return this._searchValue;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.highlightKeys = [];
if (value && this.nzTreeNode.title.includes(value)) {
// match the search value
/** @type {?} */
var index = this.nzTreeNode.title.indexOf(value);
this.highlightKeys = [this.nzTreeNode.title.slice(0, index), this.nzTreeNode.title.slice(index + value.length, this.nzTreeNode.title.length)];
}
this._searchValue = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "nzIcon", {
get: /**
* @return {?}
*/ function () {
return this.nzTreeNode.icon;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "canDraggable", {
get: /**
* @return {?}
*/ function () {
return (this.nzDraggable && !this.nzTreeNode.isDisabled) ? true : null;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "isShowLineIcon", {
get: /**
* @return {?}
*/ function () {
return !this.nzTreeNode.isLeaf && this.nzShowLine;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "isShowSwitchIcon", {
get: /**
* @return {?}
*/ function () {
return !this.nzTreeNode.isLeaf && !this.nzShowLine;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "isSwitcherOpen", {
get: /**
* @return {?}
*/ function () {
return (this.nzTreeNode.isExpanded && !this.nzTreeNode.isLeaf);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "isSwitcherClose", {
get: /**
* @return {?}
*/ function () {
return (!this.nzTreeNode.isExpanded && !this.nzTreeNode.isLeaf);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeNodeComponent.prototype, "displayStyle", {
get: /**
* @return {?}
*/ function () {
// to hide unmatched nodes
return (this.nzSearchValue && this.nzHideUnMatched && !this.nzTreeNode.isMatched && !this.nzTreeNode.isExpanded) ? 'none' : '';
},
enumerable: true,
configurable: true
});
/**
* reset node class
*/
/**
* reset node class
* @return {?}
*/
NzTreeNodeComponent.prototype.setClassMap = /**
* reset node class
* @return {?}
*/
function () {
var _a, _b, _c, _d, _e, _f;
this.prefixCls = this.nzSelectMode ? 'ant-select-tree' : 'ant-tree';
this.nzNodeClass = (_a = {},
_a[this.prefixCls + "-treenode-disabled"] = this.nzTreeNode.isDisabled,
_a[this.prefixCls + "-treenode-switcher-open"] = this.isSwitcherOpen,
_a[this.prefixCls + "-treenode-switcher-close"] = this.isSwitcherClose,
_a[this.prefixCls + "-treenode-checkbox-checked"] = this.nzTreeNode.isChecked,
_a[this.prefixCls + "-treenode-checkbox-indeterminate"] = this.nzTreeNode.isHalfChecked,
_a[this.prefixCls + "-treenode-selected"] = this.nzTreeNode.isSelected,
_a[this.prefixCls + "-treenode-loading"] = this.nzTreeNode.isLoading,
_a);
this.nzNodeSwitcherClass = (_b = {},
_b[this.prefixCls + "-switcher"] = true,
_b[this.prefixCls + "-switcher-noop"] = this.nzTreeNode.isLeaf,
_b[this.prefixCls + "-switcher_open"] = this.isSwitcherOpen,
_b[this.prefixCls + "-switcher_close"] = this.isSwitcherClose,
_b);
this.nzNodeCheckboxClass = (_c = {},
_c[this.prefixCls + "-checkbox"] = true,
_c[this.prefixCls + "-checkbox-checked"] = this.nzTreeNode.isChecked,
_c[this.prefixCls + "-checkbox-indeterminate"] = this.nzTreeNode.isHalfChecked,
_c[this.prefixCls + "-checkbox-disabled"] = this.nzTreeNode.isDisabled || this.nzTreeNode.isDisableCheckbox,
_c);
this.nzNodeContentClass = (_d = {},
_d[this.prefixCls + "-node-content-wrapper"] = true,
_d[this.prefixCls + "-node-content-wrapper-open"] = this.isSwitcherOpen,
_d[this.prefixCls + "-node-content-wrapper-close"] = this.isSwitcherClose,
_d[this.prefixCls + "-node-selected"] = this.nzTreeNode.isSelected,
_d);
this.nzNodeContentIconClass = (_e = {},
_e[this.prefixCls + "-iconEle"] = true,
_e[this.prefixCls + "-icon__customize"] = true,
_e);
this.nzNodeContentLoadingClass = (_f = {},
_f[this.prefixCls + "-iconEle"] = true,
_f);
};
/**
* @param {?} event
* @return {?}
*/
NzTreeNodeComponent.prototype.onMousedown = /**
* @param {?} event
* @return {?}
*/
function (event) {
if (this.nzSelectMode) {
event.preventDefault();
}
};
/**
* click node to select, 200ms to dbl click
*/
/**
* click node to select, 200ms to dbl click
* @param {?} event
* @return {?}
*/
NzTreeNodeComponent.prototype.nzClick = /**
* click node to select, 200ms to dbl click
* @param {?} event
* @return {?}
*/
function (event) {
event.preventDefault();
event.stopPropagation();
if (this.nzTreeNode.isSelectable && !this.nzTreeNode.isDisabled) {
this.nzTreeNode.isSelected = !this.nzTreeNode.isSelected;
}
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('click', this.nzTreeNode, event);
this.nzTreeService.triggerEventChange$.next(eventNext);
};
/**
* @param {?} event
* @return {?}
*/
NzTreeNodeComponent.prototype.nzDblClick = /**
* @param {?} event
* @return {?}
*/
function (event) {
event.preventDefault();
event.stopPropagation();
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('dblclick', this.nzTreeNode, event);
this.nzTreeService.triggerEventChange$.next(eventNext);
};
/**
* @param event
*/
/**
* @param {?} event
* @return {?}
*/
NzTreeNodeComponent.prototype.nzContextMenu = /**
* @param {?} event
* @return {?}
*/
function (event) {
event.preventDefault();
event.stopPropagation();
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('contextmenu', this.nzTreeNode, event);
this.nzTreeService.triggerEventChange$.next(eventNext);
};
/**
* collapse node
* @param event
*/
/**
* collapse node
* @param {?} event
* @return {?}
*/
NzTreeNodeComponent.prototype._clickExpand = /**
* collapse node
* @param {?} event
* @return {?}
*/
function (event) {
event.preventDefault();
event.stopPropagation();
if (!this.nzTreeNode.isLoading && !this.nzTreeNode.isLeaf) {
// set async state
if (this.nzAsyncData && this.nzTreeNode.children.length === 0 && !this.nzTreeNode.isExpanded) {
this.nzTreeNode.isLoading = true;
}
this.nzTreeNode.isExpanded = !this.nzTreeNode.isExpanded;
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('expand', this.nzTreeNode, event);
this.nzTreeService.triggerEventChange$.next(eventNext);
}
};
/**
* check node
* @param event
*/
/**
* check node
* @param {?} event
* @return {?}
*/
NzTreeNodeComponent.prototype._clickCheckBox = /**
* check node
* @param {?} event
* @return {?}
*/
function (event) {
event.preventDefault();
event.stopPropagation();
// return if node is disabled
if (this.nzTreeNode.isDisabled || this.nzTreeNode.isDisableCheckbox) {
return;
}
this.nzTreeNode.isChecked = !this.nzTreeNode.isChecked;
this.nzTreeNode.isHalfChecked = false;
if (!this.nzTreeService.isCheckStrictly) {
this.nzTreeService.conduct(this.nzTreeNode);
}
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('check', this.nzTreeNode, event);
this.nzTreeService.triggerEventChange$.next(eventNext);
};
/**
* drag event
* @param e
*/
/**
* drag event
* @return {?}
*/
NzTreeNodeComponent.prototype.clearDragClass = /**
* drag event
* @return {?}
*/
function () {
var _this = this;
/** @type {?} */
var dragClass = ['drag-over-gap-top', 'drag-over-gap-bottom', 'drag-over'];
dragClass.forEach(( /**
* @param {?} e
* @return {?}
*/function (e) {
_this.renderer.removeClass(_this.dragElement.nativeElement, e);
}));
};
/**
* @param {?} e
* @return {?}
*/
NzTreeNodeComponent.prototype.handleDragStart = /**
* @param {?} e
* @return {?}
*/
function (e) {
e.stopPropagation();
try {
// ie throw error
// firefox-need-it
e.dataTransfer.setData('text/plain', this.nzTreeNode.key);
}
catch (error) {
// empty
}
this.nzTreeService.setSelectedNode(this.nzTreeNode);
this.nzTreeNode.isExpanded = false;
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('dragstart', this.nzTreeNode, e);
this.nzTreeService.triggerEventChange$.next(eventNext);
};
/**
* @param {?} e
* @return {?}
*/
NzTreeNodeComponent.prototype.handleDragEnter = /**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
e.preventDefault();
e.stopPropagation();
// reset position
this.dragPos = 2;
this.ngZone.run(( /**
* @return {?}
*/function () {
/** @type {?} */
var node = _this.nzTreeService.getSelectedNode();
if (node && node.key !== _this.nzTreeNode.key && !_this.nzTreeNode.isExpanded && !_this.nzTreeNode.isLeaf) {
_this.nzTreeNode.isExpanded = true;
}
/** @type {?} */
var eventNext = _this.nzTreeService.formatEvent('dragenter', _this.nzTreeNode, e);
_this.nzTreeService.triggerEventChange$.next(eventNext);
}));
};
/**
* @param {?} e
* @return {?}
*/
NzTreeNodeComponent.prototype.handleDragOver = /**
* @param {?} e
* @return {?}
*/
function (e) {
e.preventDefault();
e.stopPropagation();
/** @type {?} */
var dropPosition = this.nzTreeService.calcDropPosition(e);
if (this.dragPos !== dropPosition) {
this.clearDragClass();
this.dragPos = dropPosition;
// leaf node will pass
if (!(this.dragPos === 0 && this.nzTreeNode.isLeaf)) {
this.renderer.addClass(this.dragElement.nativeElement, this.dragPosClass[this.dragPos]);
}
}
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('dragover', this.nzTreeNode, e);
this.nzTreeService.triggerEventChange$.next(eventNext);
};
/**
* @param {?} e
* @return {?}
*/
NzTreeNodeComponent.prototype.handleDragLeave = /**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
e.stopPropagation();
this.ngZone.run(( /**
* @return {?}
*/function () {
_this.clearDragClass();
}));
/** @type {?} */
var eventNext = this.nzTreeService.formatEvent('dragleave', this.nzTreeNode, e);
this.nzTreeService.triggerEventChange$.next(eventNext);
};
/**
* @param {?} e
* @return {?}
*/
NzTreeNodeComponent.prototype.handleDragDrop = /**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
e.preventDefault();
e.stopPropagation();
this.ngZone.run(( /**
* @return {?}
*/function () {
_this.clearDragClass();
/** @type {?} */
var node = _this.nzTreeService.getSelectedNode();
if (!node || (node && node.key === _this.nzTreeNode.key) || (_this.dragPos === 0 && _this.nzTreeNode.isLeaf)) {
return;
}
// pass if node is leafNo
/** @type {?} */
var dropEvent = _this.nzTreeService.formatEvent('drop', _this.nzTreeNode, e);
/** @type {?} */
var dragEndEvent = _this.nzTreeService.formatEvent('dragend', _this.nzTreeNode, e);
if (_this.nzBeforeDrop) {
_this.nzBeforeDrop({
dragNode: _this.nzTreeService.getSelectedNode(),
node: _this.nzTreeNode,
pos: _this.dragPos
}).subscribe(( /**
* @param {?} canDrop
* @return {?}
*/function (canDrop) {
if (canDrop) {
_this.nzTreeService.dropAndApply(_this.nzTreeNode, _this.dragPos);
}
_this.nzTreeService.triggerEventChange$.next(dropEvent);
_this.nzTreeService.triggerEventChange$.next(dragEndEvent);
}));
}
else if (_this.nzTreeNode) {
_this.nzTreeService.dropAndApply(_this.nzTreeNode, _this.dragPos);
_this.nzTreeService.triggerEventChange$.next(dropEvent);
}
}));
};
/**
* @param {?} e
* @return {?}
*/
NzTreeNodeComponent.prototype.handleDragEnd = /**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
e.stopPropagation();
this.ngZone.run(( /**
* @return {?}
*/function () {
// if user do not custom beforeDrop
if (!_this.nzBeforeDrop) {
_this.nzTreeService.setSelectedNode(null);
/** @type {?} */
var eventNext = _this.nzTreeService.formatEvent('dragend', _this.nzTreeNode, e);
_this.nzTreeService.triggerEventChange$.next(eventNext);
}
}));
};
/**
* 监听拖拽事件
*/
/**
* 监听拖拽事件
* @return {?}
*/
NzTreeNodeComponent.prototype.handDragEvent = /**
* 监听拖拽事件
* @return {?}
*/
function () {
var _this = this;
this.ngZone.runOutsideAngular(( /**
* @return {?}
*/function () {
if (_this.nzDraggable) {
_this.destroy$ = new rxjs.Subject();
rxjs.fromEvent(_this.elRef.nativeElement, 'dragstart').pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleDragStart(e); }));
rxjs.fromEvent(_this.elRef.nativeElement, 'dragenter').pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleDragEnter(e); }));
rxjs.fromEvent(_this.elRef.nativeElement, 'dragover').pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleDragOver(e); }));
rxjs.fromEvent(_this.elRef.nativeElement, 'dragleave').pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleDragLeave(e); }));
rxjs.fromEvent(_this.elRef.nativeElement, 'drop').pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleDragDrop(e); }));
rxjs.fromEvent(_this.elRef.nativeElement, 'dragend').pipe(operators.takeUntil(_this.destroy$)).subscribe(( /**
* @param {?} e
* @return {?}
*/function (e) { return _this.handleDragEnd(e); }));
}
else {
_this.destroy$.next();
_this.destroy$.complete();
}
}));
};
/**
* @return {?}
*/
NzTreeNodeComponent.prototype.markForCheck = /**
* @return {?}
*/
function () {
this.cdr.markForCheck();
};
/**
* @return {?}
*/
NzTreeNodeComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
// init expanded / selected / checked list
if (this.nzTreeNode.isSelected) {
this.nzTreeService.setNodeActive(this.nzTreeNode);
}
if (this.nzTreeNode.isExpanded) {
this.nzTreeService.setExpandedNodeList(this.nzTreeNode);
}
if (this.nzTreeNode.isChecked) {
this.nzTreeService.setCheckedNodeList(this.nzTreeNode);
}
// TODO
this.nzTreeNode.component = this;
this.nzTreeService.eventTriggerChanged().pipe(operators.filter(( /**
* @param {?} data
* @return {?}
*/function (data) { return data.node.key === _this.nzTreeNode.key; })), operators.takeUntil(this.destroy$)).subscribe(( /**
* @return {?}
*/function () {
_this.setClassMap();
_this.markForCheck();
}));
this.setClassMap();
};
/**
* @return {?}
*/
NzTreeNodeComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.setClassMap();
};
/**
* @return {?}
*/
NzTreeNodeComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
};
NzTreeNodeComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-tree-node',
template: "<li\n #dragElement\n role=\"treeitem\"\n [style.display]=\"displayStyle\"\n [ngClass]=\"nzNodeClass\">\n <ng-container *ngIf=\"nzShowExpand\">\n <span\n [ngClass]=\"nzNodeSwitcherClass\"\n (click)=\"_clickExpand($event)\">\n <ng-container *ngIf=\"isShowSwitchIcon\">\n <i *ngIf=\"!nzTreeNode.isLoading\"\n nz-icon\n type=\"caret-down\"\n [class.ant-select-switcher-icon]=\"nzSelectMode\"\n [class.ant-tree-switcher-icon]=\"!nzSelectMode\"></i>\n <i *ngIf=\"nzTreeNode.isLoading\" nz-icon type=\"loading\" [spin]=\"true\" class=\"ant-tree-switcher-loading-icon\"></i>\n </ng-container>\n <ng-container *ngIf=\"nzShowLine\">\n <i *ngIf=\"isShowLineIcon\" nz-icon [type]=\"isSwitcherOpen ? 'minus-square' : 'plus-square'\" class=\"ant-tree-switcher-line-icon\"></i>\n <i *ngIf=\"!isShowLineIcon\" nz-icon type=\"file\" class=\"ant-tree-switcher-line-icon\"></i>\n </ng-container>\n </span>\n </ng-container>\n <ng-container *ngIf=\"nzCheckable\">\n <span\n [ngClass]=\"nzNodeCheckboxClass\"\n (click)=\"_clickCheckBox($event)\">\n <span [class.ant-tree-checkbox-inner]=\"!nzSelectMode\"\n [class.ant-select-tree-checkbox-inner]=\"nzSelectMode\"></span>\n </span>\n </ng-container>\n <ng-container *ngIf=\"!nzTreeTemplate\">\n <span\n title=\"{{nzTreeNode.title}}\"\n [attr.draggable]=\"canDraggable\"\n [attr.aria-grabbed]=\"canDraggable\"\n [ngClass]=\"nzNodeContentClass\"\n [class.draggable]=\"canDraggable\">\n <span\n *ngIf=\"nzTreeNode.icon && nzShowIcon\"\n [class.ant-tree-icon__open]=\"isSwitcherOpen\"\n [class.ant-tree-icon__close]=\"isSwitcherClose\"\n [class.ant-tree-icon_loading]=\"nzTreeNode.isLoading\"\n [ngClass]=\"nzNodeContentLoadingClass\">\n <span\n [ngClass]=\"nzNodeContentIconClass\">\n <i nz-icon *ngIf=\"nzIcon\" [type]=\"nzIcon\"></i>\n </span>\n </span>\n <span class=\"ant-tree-title\">\n <ng-container *ngIf=\"nzTreeNode.isMatched\">\n <span>\n {{highlightKeys[0]}}<span class=\"font-highlight\">{{nzSearchValue}}</span>{{highlightKeys[1]}}\n </span>\n </ng-container>\n <ng-container *ngIf=\"!nzTreeNode.isMatched\">\n {{nzTreeNode.title}}\n </ng-container>\n </span>\n </span>\n </ng-container>\n <ng-template\n [ngTemplateOutlet]=\"nzTreeTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: nzTreeNode }\">\n </ng-template>\n\n <ul\n role=\"group\"\n class=\"ant-tree-child-tree\"\n [class.ant-tree-child-tree-open]=\"!nzSelectMode || nzTreeNode.isExpanded\"\n data-expanded=\"true\"\n [@.disabled]=\"noAnimation?.nzNoAnimation\"\n [@collapseMotion]=\"nzTreeNode.isExpanded ? 'expanded' : 'collapsed'\">\n <nz-tree-node\n *ngFor=\"let node of nzTreeNode.getChildren()\"\n [nzTreeNode]=\"node\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [nzSelectMode]=\"nzSelectMode\"\n [nzShowLine]=\"nzShowLine\"\n [nzDraggable]=\"nzDraggable\"\n [nzCheckable]=\"nzCheckable\"\n [nzShowExpand]=\"nzShowExpand\"\n [nzAsyncData]=\"nzAsyncData\"\n [nzExpandAll]=\"nzExpandAll\"\n [nzDefaultExpandAll]=\"nzDefaultExpandAll\"\n [nzShowIcon]=\"nzShowIcon\"\n [nzSearchValue]=\"nzSearchValue\"\n [nzHideUnMatched]=\"nzHideUnMatched\"\n [nzBeforeDrop]=\"nzBeforeDrop\"\n [nzCheckStrictly]=\"nzCheckStrictly\"\n [nzTreeTemplate]=\"nzTreeTemplate\">\n </nz-tree-node>\n </ul>\n</li>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
preserveWhitespaces: false,
animations: [collapseMotion]
}] }
];
/** @nocollapse */
NzTreeNodeComponent.ctorParameters = function () {
return [
{ type: NzTreeBaseService },
{ type: i0.NgZone },
{ type: i0.Renderer2 },
{ type: i0.ElementRef },
{ type: i0.ChangeDetectorRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzTreeNodeComponent.propDecorators = {
dragElement: [{ type: i0.ViewChild, args: ['dragElement',] }],
nzTreeNode: [{ type: i0.Input }],
nzShowLine: [{ type: i0.Input }],
nzShowExpand: [{ type: i0.Input }],
nzCheckable: [{ type: i0.Input }],
nzAsyncData: [{ type: i0.Input }],
nzCheckStrictly: [{ type: i0.Input }],
nzHideUnMatched: [{ type: i0.Input }],
nzNoAnimation: [{ type: i0.Input }],
nzSelectMode: [{ type: i0.Input }],
nzShowIcon: [{ type: i0.Input }],
nzTreeTemplate: [{ type: i0.Input }],
nzBeforeDrop: [{ type: i0.Input }],
nzDraggable: [{ type: i0.Input }],
nzDefaultExpandAll: [{ type: i0.Input }],
nzExpandAll: [{ type: i0.Input }],
nzSearchValue: [{ type: i0.Input }],
onMousedown: [{ type: i0.HostListener, args: ['mousedown', ['$event'],] }],
nzClick: [{ type: i0.HostListener, args: ['click', ['$event'],] }],
nzDblClick: [{ type: i0.HostListener, args: ['dblclick', ['$event'],] }],
nzContextMenu: [{ type: i0.HostListener, args: ['contextmenu', ['$event'],] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzTreeNodeComponent.prototype, "nzShowLine", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzTreeNodeComponent.prototype, "nzShowExpand", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzTreeNodeComponent.prototype, "nzCheckable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzTreeNodeComponent.prototype, "nzAsyncData", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean)
], NzTreeNodeComponent.prototype, "nzCheckStrictly", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeNodeComponent.prototype, "nzHideUnMatched", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeNodeComponent.prototype, "nzNoAnimation", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeNodeComponent.prototype, "nzSelectMode", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeNodeComponent.prototype, "nzShowIcon", void 0);
return NzTreeNodeComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeSelectService = /** @class */ (function (_super) {
__extends(NzTreeSelectService, _super);
function NzTreeSelectService() {
return _super !== null && _super.apply(this, arguments) || this;
}
NzTreeSelectService.decorators = [
{ type: i0.Injectable }
];
return NzTreeSelectService;
}(NzTreeBaseService));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeService = /** @class */ (function (_super) {
__extends(NzTreeService, _super);
function NzTreeService() {
return _super !== null && _super.apply(this, arguments) || this;
}
NzTreeService.decorators = [
{ type: i0.Injectable }
];
return NzTreeService;
}(NzTreeBaseService));
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @param {?} treeSelectService
* @param {?} treeService
* @return {?}
*/
function NzTreeServiceFactory(treeSelectService, treeService) {
return treeSelectService ? treeSelectService : treeService;
}
var NzTreeComponent = /** @class */ (function () {
function NzTreeComponent(nzTreeService, cdr, noAnimation) {
this.nzTreeService = nzTreeService;
this.cdr = cdr;
this.noAnimation = noAnimation;
this.nzShowIcon = false;
this.nzShowLine = false;
this.nzCheckStrictly = false;
this.nzCheckable = false;
this.nzShowExpand = true;
this.nzAsyncData = false;
this.nzDraggable = false;
this.nzExpandAll = false;
this.nzHideUnMatched = false;
this.nzSelectMode = false;
/**
* @deprecated use
* nzExpandAll instead
*/
this.nzDefaultExpandAll = false;
// model bind
this.nzExpandedKeysChange = new i0.EventEmitter();
this.nzSelectedKeysChange = new i0.EventEmitter();
this.nzCheckedKeysChange = new i0.EventEmitter();
this.nzSearchValueChange = new i0.EventEmitter();
/**
* @deprecated use
* nzSearchValueChange instead
*/
this.nzOnSearchNode = new i0.EventEmitter();
this.nzClick = new i0.EventEmitter();
this.nzDblClick = new i0.EventEmitter();
this.nzContextMenu = new i0.EventEmitter();
this.nzCheckBoxChange = new i0.EventEmitter();
this.nzExpandChange = new i0.EventEmitter();
this.nzOnDragStart = new i0.EventEmitter();
this.nzOnDragEnter = new i0.EventEmitter();
this.nzOnDragOver = new i0.EventEmitter();
this.nzOnDragLeave = new i0.EventEmitter();
this.nzOnDrop = new i0.EventEmitter();
this.nzOnDragEnd = new i0.EventEmitter();
this._searchValue = null;
this._nzMultiple = false;
this.nzDefaultSubject = new rxjs.ReplaySubject(6);
this.destroy$ = new rxjs.Subject();
this.nzNodes = [];
this.prefixCls = 'ant-tree';
this.classMap = {};
this.onChange = ( /**
* @return {?}
*/function () { return null; });
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
}
Object.defineProperty(NzTreeComponent.prototype, "nzMultiple", {
get: /**
* @return {?}
*/ function () {
return this._nzMultiple;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._nzMultiple = value;
this.nzTreeService.isMultiple = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzData", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
var _this = this;
if (Array.isArray(value)) {
if (!this.nzTreeService.isArrayOfNzTreeNode(value)) {
// has not been new NzTreeNode
this.nzNodes = value.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return (new NzTreeNode(item, null, _this.nzTreeService)); }));
}
else {
this.nzNodes = value.map(( /**
* @param {?} item
* @return {?}
*/function (item) {
item.service = _this.nzTreeService;
return item;
}));
}
this.nzTreeService.isCheckStrictly = this.nzCheckStrictly;
this.nzTreeService.isMultiple = this.nzMultiple;
this.nzTreeService.initTree(this.nzNodes);
}
else {
if (value !== null) {
console.warn('ngModel only accepts an array and must be not empty');
}
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzDefaultExpandedKeys", {
/**
* @deprecated use
* nzExpandedKeys instead
*/
set: /**
* @deprecated use
* nzExpandedKeys instead
* @param {?} value
* @return {?}
*/ function (value) {
this.nzDefaultSubject.next({ type: 'nzExpandedKeys', keys: value });
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzDefaultSelectedKeys", {
/**
* @deprecated use
* nzSelectedKeys instead
*/
set: /**
* @deprecated use
* nzSelectedKeys instead
* @param {?} value
* @return {?}
*/ function (value) {
this.nzDefaultSubject.next({ type: 'nzSelectedKeys', keys: value });
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzDefaultCheckedKeys", {
/**
* @deprecated use
* nzCheckedKeys instead
*/
set: /**
* @deprecated use
* nzCheckedKeys instead
* @param {?} value
* @return {?}
*/ function (value) {
this.nzDefaultSubject.next({ type: 'nzCheckedKeys', keys: value });
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzExpandedKeys", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzDefaultSubject.next({ type: 'nzExpandedKeys', keys: value });
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzSelectedKeys", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzDefaultSubject.next({ type: 'nzSelectedKeys', keys: value });
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzCheckedKeys", {
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this.nzDefaultSubject.next({ type: 'nzCheckedKeys', keys: value });
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeComponent.prototype, "nzSearchValue", {
get: /**
* @return {?}
*/ function () {
return this._searchValue;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._searchValue = value;
this.nzTreeService.searchExpand(value);
if (isNotNil(value)) {
this.nzSearchValueChange.emit(this.nzTreeService.formatEvent('search', null, null));
this.nzOnSearchNode.emit(this.nzTreeService.formatEvent('search', null, null));
}
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzTreeComponent.prototype.getTreeNodes = /**
* @return {?}
*/
function () {
return this.nzTreeService.rootNodes;
};
/**
* @param {?} key
* @return {?}
*/
NzTreeComponent.prototype.getTreeNodeByKey = /**
* @param {?} key
* @return {?}
*/
function (key) {
/** @type {?} */
var targetNode = null;
/** @type {?} */
var getNode = ( /**
* @param {?} node
* @return {?}
*/function (node) {
if (node.key === key) {
targetNode = node;
// break every
return false;
}
else {
node.getChildren().every(( /**
* @param {?} n
* @return {?}
*/function (n) {
return getNode(n);
}));
}
return true;
});
this.nzNodes.every(( /**
* @param {?} n
* @return {?}
*/function (n) {
return getNode(n);
}));
return targetNode;
};
/**
* public function
*/
/**
* public function
* @return {?}
*/
NzTreeComponent.prototype.getCheckedNodeList = /**
* public function
* @return {?}
*/
function () {
return this.nzTreeService.getCheckedNodeList();
};
/**
* @return {?}
*/
NzTreeComponent.prototype.getSelectedNodeList = /**
* @return {?}
*/
function () {
return this.nzTreeService.getSelectedNodeList();
};
/**
* @return {?}
*/
NzTreeComponent.prototype.getHalfCheckedNodeList = /**
* @return {?}
*/
function () {
return this.nzTreeService.getHalfCheckedNodeList();
};
/**
* @return {?}
*/
NzTreeComponent.prototype.getExpandedNodeList = /**
* @return {?}
*/
function () {
return this.nzTreeService.getExpandedNodeList();
};
/**
* @return {?}
*/
NzTreeComponent.prototype.getMatchedNodeList = /**
* @return {?}
*/
function () {
return this.nzTreeService.getMatchedNodeList();
};
/**
* @return {?}
*/
NzTreeComponent.prototype.setClassMap = /**
* @return {?}
*/
function () {
var _a;
this.classMap = (_a = {},
_a[this.prefixCls] = true,
_a[this.prefixCls + '-show-line'] = this.nzShowLine,
_a[this.prefixCls + "-icon-hide"] = !this.nzShowIcon,
_a['draggable-tree'] = this.nzDraggable,
_a['ant-select-tree'] = this.nzSelectMode,
_a);
};
/**
* @param {?} value
* @return {?}
*/
NzTreeComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
if (Array.isArray(value)) {
this.nzNodes = value.map(( /**
* @param {?} item
* @return {?}
*/function (item) {
item.service = _this.nzTreeService;
return item;
}));
this.nzTreeService.isCheckStrictly = this.nzCheckStrictly;
this.nzTreeService.isMultiple = this.nzMultiple;
this.nzTreeService.initTree(this.nzNodes);
this.cdr.markForCheck();
}
else {
if (value !== null) {
console.warn('ngModel only accepts an array and should be not empty');
}
}
};
/**
* @param {?} fn
* @return {?}
*/
NzTreeComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzTreeComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @return {?}
*/
NzTreeComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
var _this = this;
this.setClassMap();
this.nzDefaultSubscription = this.nzDefaultSubject.subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
if (!data || !data.keys) {
return;
}
switch (data.type) {
case 'nzExpandedKeys':
_this.nzTreeService.calcExpandedKeys(data.keys, _this.nzNodes);
_this.nzExpandedKeysChange.emit(data.keys);
break;
case 'nzSelectedKeys':
_this.nzTreeService.calcSelectedKeys(data.keys, _this.nzNodes, _this.nzMultiple);
_this.nzSelectedKeysChange.emit(data.keys);
break;
case 'nzCheckedKeys':
_this.nzTreeService.calcCheckedKeys(data.keys, _this.nzNodes, _this.nzCheckStrictly);
_this.nzCheckedKeysChange.emit(data.keys);
break;
}
_this.cdr.markForCheck();
}));
this.nzTreeService.eventTriggerChanged().pipe(operators.takeUntil(this.destroy$)).subscribe(( /**
* @param {?} data
* @return {?}
*/function (data) {
switch (data.eventName) {
case 'expand':
_this.nzExpandChange.emit(data);
break;
case 'click':
_this.nzClick.emit(data);
break;
case 'check':
_this.nzCheckBoxChange.emit(data);
break;
case 'dblclick':
_this.nzDblClick.emit(data);
break;
case 'contextmenu':
_this.nzContextMenu.emit(data);
break;
// drag drop
case 'dragstart':
_this.nzOnDragStart.emit(data);
break;
case 'dragenter':
_this.nzOnDragEnter.emit(data);
break;
case 'dragover':
_this.nzOnDragOver.emit(data);
break;
case 'dragleave':
_this.nzOnDragLeave.emit(data);
break;
case 'drop':
_this.nzOnDrop.emit(data);
break;
case 'dragend':
_this.nzOnDragEnd.emit(data);
break;
}
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzTreeComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.nzCheckStrictly) {
this.nzTreeService.isCheckStrictly = changes.nzCheckStrictly.currentValue;
}
if (changes.nzMultiple) {
this.nzTreeService.isMultiple = changes.nzMultiple.currentValue;
}
};
/**
* @return {?}
*/
NzTreeComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy$.next();
this.destroy$.complete();
this.destroy$ = null;
if (this.nzDefaultSubscription) {
this.nzDefaultSubscription.unsubscribe();
this.nzDefaultSubscription = null;
}
};
NzTreeComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-tree',
template: "<ul\n role=\"tree\"\n unselectable=\"on\"\n [ngClass]=\"classMap\">\n <ng-container *ngFor=\"let node of nzNodes\">\n <nz-tree-node\n [nzTreeNode]=\"node\"\n [nzSelectMode]=\"nzSelectMode\"\n [nzShowLine]=\"nzShowLine\"\n [nzDraggable]=\"nzDraggable\"\n [nzCheckable]=\"nzCheckable\"\n [nzShowExpand]=\"nzShowExpand\"\n [nzAsyncData]=\"nzAsyncData\"\n [nzSearchValue]=\"nzSearchValue\"\n [nzHideUnMatched]=\"nzHideUnMatched\"\n [nzBeforeDrop]=\"nzBeforeDrop\"\n [nzCheckStrictly]=\"nzCheckStrictly\"\n [nzExpandAll]=\"nzExpandAll\"\n [nzDefaultExpandAll]=\"nzDefaultExpandAll\"\n [nzShowIcon]=\"nzShowIcon\"\n [nzTreeTemplate]=\"nzTreeTemplate\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\">\n </nz-tree-node>\n </ng-container>\n</ul>",
changeDetection: i0.ChangeDetectionStrategy.OnPush,
providers: [
NzTreeService,
{
provide: NzTreeBaseService,
useFactory: NzTreeServiceFactory,
deps: [
[
new i0.SkipSelf(),
new i0.Optional(),
NzTreeSelectService
],
NzTreeService
]
},
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzTreeComponent; })),
multi: true
}
]
}] }
];
/** @nocollapse */
NzTreeComponent.ctorParameters = function () {
return [
{ type: NzTreeBaseService },
{ type: i0.ChangeDetectorRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzTreeComponent.propDecorators = {
nzShowIcon: [{ type: i0.Input }],
nzShowLine: [{ type: i0.Input }],
nzCheckStrictly: [{ type: i0.Input }],
nzCheckable: [{ type: i0.Input }],
nzShowExpand: [{ type: i0.Input }],
nzAsyncData: [{ type: i0.Input }],
nzDraggable: [{ type: i0.Input }],
nzExpandAll: [{ type: i0.Input }],
nzHideUnMatched: [{ type: i0.Input }],
nzSelectMode: [{ type: i0.Input }],
nzDefaultExpandAll: [{ type: i0.Input }],
nzBeforeDrop: [{ type: i0.Input }],
nzMultiple: [{ type: i0.Input }],
nzData: [{ type: i0.Input }],
nzDefaultExpandedKeys: [{ type: i0.Input }],
nzDefaultSelectedKeys: [{ type: i0.Input }],
nzDefaultCheckedKeys: [{ type: i0.Input }],
nzExpandedKeys: [{ type: i0.Input }],
nzSelectedKeys: [{ type: i0.Input }],
nzCheckedKeys: [{ type: i0.Input }],
nzSearchValue: [{ type: i0.Input }],
nzExpandedKeysChange: [{ type: i0.Output }],
nzSelectedKeysChange: [{ type: i0.Output }],
nzCheckedKeysChange: [{ type: i0.Output }],
nzSearchValueChange: [{ type: i0.Output }],
nzOnSearchNode: [{ type: i0.Output }],
nzClick: [{ type: i0.Output }],
nzDblClick: [{ type: i0.Output }],
nzContextMenu: [{ type: i0.Output }],
nzCheckBoxChange: [{ type: i0.Output }],
nzExpandChange: [{ type: i0.Output }],
nzOnDragStart: [{ type: i0.Output }],
nzOnDragEnter: [{ type: i0.Output }],
nzOnDragOver: [{ type: i0.Output }],
nzOnDragLeave: [{ type: i0.Output }],
nzOnDrop: [{ type: i0.Output }],
nzOnDragEnd: [{ type: i0.Output }],
nzTreeTemplate: [{ type: i0.ContentChild, args: ['nzTreeTemplate',] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzShowIcon", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzShowLine", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzCheckStrictly", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzCheckable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzShowExpand", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzAsyncData", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzDraggable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzExpandAll", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzHideUnMatched", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzSelectMode", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeComponent.prototype, "nzDefaultExpandAll", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Boolean),
__metadata("design:paramtypes", [Boolean])
], NzTreeComponent.prototype, "nzMultiple", null);
return NzTreeComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeModule = /** @class */ (function () {
function NzTreeModule() {
}
NzTreeModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [
i2$1.CommonModule,
NzIconModule,
NzNoAnimationModule,
NzAddOnModule
],
declarations: [
NzTreeComponent,
NzTreeNodeComponent
],
exports: [
NzTreeComponent,
NzTreeNodeComponent
]
},] }
];
return NzTreeModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeSelectComponent = /** @class */ (function () {
function NzTreeSelectComponent(renderer, cdr, nzTreeService, elementRef, noAnimation) {
this.renderer = renderer;
this.cdr = cdr;
this.nzTreeService = nzTreeService;
this.elementRef = elementRef;
this.noAnimation = noAnimation;
this.nzAllowClear = true;
this.nzShowExpand = true;
this.nzDropdownMatchSelectWidth = true;
this.nzCheckable = false;
this.nzShowSearch = false;
this.nzDisabled = false;
this.nzShowLine = false;
this.nzAsyncData = false;
this.nzMultiple = false;
this.nzDefaultExpandAll = false;
this.nzNodes = [];
this.nzOpen = false;
this.nzSize = 'default';
this.nzPlaceHolder = '';
this.nzDefaultExpandedKeys = [];
this.nzDisplayWith = ( /**
* @param {?} node
* @return {?}
*/function (node) { return node.title; });
this.nzOpenChange = new i0.EventEmitter();
this.nzCleared = new i0.EventEmitter();
this.nzRemoved = new i0.EventEmitter();
this.nzExpandChange = new i0.EventEmitter();
this.nzTreeClick = new i0.EventEmitter();
this.nzTreeCheckBoxChange = new i0.EventEmitter();
this.isComposing = false;
this.isDestroy = true;
this.isNotFound = false;
this.inputValue = '';
this.dropDownPosition = 'bottom';
this.selectedNodes = [];
this.value = [];
this.onTouched = ( /**
* @return {?}
*/function () { return null; });
this.renderer.addClass(this.elementRef.nativeElement, 'ant-select');
}
Object.defineProperty(NzTreeSelectComponent.prototype, "placeHolderDisplay", {
get: /**
* @return {?}
*/ function () {
return this.inputValue || this.isComposing || this.selectedNodes.length ? 'none' : 'block';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeSelectComponent.prototype, "searchDisplay", {
get: /**
* @return {?}
*/ function () {
return this.nzOpen ? 'block' : 'none';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeSelectComponent.prototype, "isMultiple", {
get: /**
* @return {?}
*/ function () {
return this.nzMultiple || this.nzCheckable;
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzTreeSelectComponent.prototype, "selectedValueDisplay", {
get: /**
* @return {?}
*/ function () {
/** @type {?} */
var showSelectedValue = false;
/** @type {?} */
var opacity = 1;
if (!this.nzShowSearch) {
showSelectedValue = true;
}
else {
if (this.nzOpen) {
showSelectedValue = !(this.inputValue || this.isComposing);
if (showSelectedValue) {
opacity = 0.4;
}
}
else {
showSelectedValue = true;
}
}
return {
display: showSelectedValue ? 'block' : 'none',
opacity: "" + opacity
};
},
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.isDestroy = false;
this.selectionChangeSubscription = this.subscribeSelectionChange();
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.isDestroy = true;
this.closeDropDown();
this.selectionChangeSubscription.unsubscribe();
};
/**
* @param {?} isDisabled
* @return {?}
*/
NzTreeSelectComponent.prototype.setDisabledState = /**
* @param {?} isDisabled
* @return {?}
*/
function (isDisabled) {
this.nzDisabled = isDisabled;
this.closeDropDown();
};
/**
* @param {?} changes
* @return {?}
*/
NzTreeSelectComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
if (changes.hasOwnProperty('nzNodes')) {
this.updateSelectedNodes(true);
}
};
/**
* @param {?} value
* @return {?}
*/
NzTreeSelectComponent.prototype.writeValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
var _this = this;
if (value) {
if (this.isMultiple && Array.isArray(value)) {
this.value = value;
}
else {
this.value = [(( /** @type {?} */(value)))];
}
this.updateSelectedNodes(true);
}
else {
this.value = [];
this.selectedNodes.forEach(( /**
* @param {?} node
* @return {?}
*/function (node) {
_this.removeSelected(node, false);
}));
this.selectedNodes = [];
}
this.cdr.markForCheck();
};
/**
* @param {?} fn
* @return {?}
*/
NzTreeSelectComponent.prototype.registerOnChange = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onChange = fn;
};
/**
* @param {?} fn
* @return {?}
*/
NzTreeSelectComponent.prototype.registerOnTouched = /**
* @param {?} fn
* @return {?}
*/
function (fn) {
this.onTouched = fn;
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.trigger = /**
* @return {?}
*/
function () {
if (this.nzDisabled || (!this.nzDisabled && this.nzOpen)) {
this.closeDropDown();
}
else {
this.openDropdown();
if (this.nzShowSearch || this.isMultiple) {
this.focusOnInput();
}
}
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.openDropdown = /**
* @return {?}
*/
function () {
if (!this.nzDisabled) {
this.nzOpen = true;
this.nzOpenChange.emit(this.nzOpen);
this.updateCdkConnectedOverlayStatus();
this.updatePosition();
}
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.closeDropDown = /**
* @return {?}
*/
function () {
this.onTouched();
this.nzOpen = false;
this.nzOpenChange.emit(this.nzOpen);
this.cdr.markForCheck();
};
/**
* @param {?} e
* @return {?}
*/
NzTreeSelectComponent.prototype.onKeyDownInput = /**
* @param {?} e
* @return {?}
*/
function (e) {
/** @type {?} */
var keyCode = e.keyCode;
/** @type {?} */
var eventTarget = ( /** @type {?} */(e.target));
if (this.isMultiple &&
!eventTarget.value &&
keyCode === keycodes.BACKSPACE) {
e.preventDefault();
if (this.selectedNodes.length) {
/** @type {?} */
var removeNode = this.selectedNodes[this.selectedNodes.length - 1];
this.removeSelected(removeNode);
this.nzTreeService.triggerEventChange$.next({
'eventName': 'removeSelect',
'node': removeNode
});
}
}
};
/**
* @param {?} value
* @return {?}
*/
NzTreeSelectComponent.prototype.onExpandedKeysChange = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.nzExpandChange.emit(value);
this.nzDefaultExpandedKeys = __spread(value.keys);
};
/**
* @param {?} value
* @return {?}
*/
NzTreeSelectComponent.prototype.setInputValue = /**
* @param {?} value
* @return {?}
*/
function (value) {
this.inputValue = value;
this.updateInputWidth();
this.updatePosition();
};
/**
* @param {?} node
* @param {?=} emit
* @param {?=} event
* @return {?}
*/
NzTreeSelectComponent.prototype.removeSelected = /**
* @param {?} node
* @param {?=} emit
* @param {?=} event
* @return {?}
*/
function (node, emit, event) {
if (emit === void 0) {
emit = true;
}
node.isSelected = false;
node.isChecked = false;
if (this.nzCheckable) {
this.nzTreeService.conduct(node);
}
else {
this.nzTreeService.setSelectedNodeList(node, this.nzMultiple);
}
if (emit) {
this.nzRemoved.emit(node);
}
// Do not trigger the popup
if (event && event.stopPropagation) {
event.stopPropagation();
}
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.focusOnInput = /**
* @return {?}
*/
function () {
var _this = this;
setTimeout(( /**
* @return {?}
*/function () {
if (_this.inputElement) {
_this.inputElement.nativeElement.focus();
}
}));
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.subscribeSelectionChange = /**
* @return {?}
*/
function () {
var _this = this;
return rxjs.merge(this.nzTreeClick.pipe(operators.tap(( /**
* @param {?} event
* @return {?}
*/function (event) {
/** @type {?} */
var node = event.node;
if (_this.nzCheckable && !node.isDisabled && !node.isDisableCheckbox) {
node.isChecked = !node.isChecked;
_this.nzTreeService.conduct(node);
}
if (_this.nzCheckable) {
node.isSelected = false;
}
})), operators.filter(( /**
* @param {?} event
* @return {?}
*/function (event) {
return _this.nzCheckable ? (!event.node.isDisabled && !event.node.isDisableCheckbox) : !event.node.isDisabled;
}))), this.nzCheckable ? this.nzTreeCheckBoxChange : rxjs.of(), this.nzCleared, this.nzRemoved).subscribe(( /**
* @return {?}
*/function () {
_this.updateSelectedNodes();
/** @type {?} */
var value = _this.selectedNodes.map(( /**
* @param {?} node
* @return {?}
*/function (node) { return node.key; }));
_this.value = __spread(value);
if (_this.nzShowSearch || _this.isMultiple) {
_this.inputValue = '';
_this.isNotFound = false;
}
if (_this.isMultiple) {
_this.onChange(value);
_this.focusOnInput();
_this.updatePosition();
}
else {
_this.closeDropDown();
_this.onChange(value.length ? value[0] : null);
}
}));
};
/**
* @param {?=} init
* @return {?}
*/
NzTreeSelectComponent.prototype.updateSelectedNodes = /**
* @param {?=} init
* @return {?}
*/
function (init) {
var _this = this;
if (init === void 0) {
init = false;
}
if (init) {
/** @type {?} */
var nodes = void 0;
this.nzTreeService.isMultiple = this.isMultiple;
if (!this.nzTreeService.isArrayOfNzTreeNode(this.nzNodes)) {
// has not been new NzTreeNode
nodes = this.nzNodes.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return (new NzTreeNode(item, null, _this.nzTreeService)); }));
}
else {
nodes = this.nzNodes.map(( /**
* @param {?} item
* @return {?}
*/function (item) { return (new NzTreeNode(__assign({}, item.origin), null, _this.nzTreeService)); }));
}
this.nzTreeService.initTree(nodes);
if (this.nzCheckable) {
this.nzTreeService.calcCheckedKeys(this.value, nodes);
}
else {
this.nzTreeService.calcSelectedKeys(this.value, nodes, this.isMultiple);
}
}
this.selectedNodes = __spread((this.nzCheckable ? this.nzTreeService.getCheckedNodeList() : this.nzTreeService.getSelectedNodeList()));
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.updatePosition = /**
* @return {?}
*/
function () {
var _this = this;
setTimeout(( /**
* @return {?}
*/function () {
if (_this.cdkConnectedOverlay && _this.cdkConnectedOverlay.overlayRef) {
_this.cdkConnectedOverlay.overlayRef.updatePosition();
}
}));
};
/**
* @param {?} position
* @return {?}
*/
NzTreeSelectComponent.prototype.onPositionChange = /**
* @param {?} position
* @return {?}
*/
function (position) {
this.dropDownPosition = position.connectionPair.originY;
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.updateInputWidth = /**
* @return {?}
*/
function () {
if (this.isMultiple && this.inputElement) {
if (this.inputValue || this.isComposing) {
this.renderer.setStyle(this.inputElement.nativeElement, 'width', this.inputElement.nativeElement.scrollWidth + "px");
}
else {
this.renderer.removeStyle(this.inputElement.nativeElement, 'width');
}
}
};
/**
* @param {?} $event
* @return {?}
*/
NzTreeSelectComponent.prototype.onClearSelection = /**
* @param {?} $event
* @return {?}
*/
function ($event) {
var _this = this;
$event.stopPropagation();
$event.preventDefault();
this.selectedNodes.forEach(( /**
* @param {?} node
* @return {?}
*/function (node) {
_this.removeSelected(node, false);
}));
this.nzCleared.emit();
};
/**
* @param {?} $event
* @return {?}
*/
NzTreeSelectComponent.prototype.setSearchValues = /**
* @param {?} $event
* @return {?}
*/
function ($event) {
var _this = this;
Promise.resolve().then(( /**
* @return {?}
*/function () {
_this.isNotFound = (_this.nzShowSearch || _this.isMultiple)
&& _this.inputValue
&& $event.matchedKeys.length === 0;
}));
};
/**
* @return {?}
*/
NzTreeSelectComponent.prototype.updateCdkConnectedOverlayStatus = /**
* @return {?}
*/
function () {
this.triggerWidth = this.cdkOverlayOrigin.elementRef.nativeElement.getBoundingClientRect().width;
};
/**
* @param {?} _index
* @param {?} option
* @return {?}
*/
NzTreeSelectComponent.prototype.trackValue = /**
* @param {?} _index
* @param {?} option
* @return {?}
*/
function (_index, option) {
return option.key;
};
NzTreeSelectComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-tree-select',
animations: [slideMotion, zoomMotion],
template: "<ng-template #inputTemplate>\n <input\n #inputElement\n autocomplete=\"off\"\n class=\"ant-select-search__field\"\n (compositionstart)=\"isComposing = true\"\n (compositionend)=\"isComposing = false\"\n (keydown)=\"onKeyDownInput($event)\"\n [ngModel]=\"inputValue\"\n (ngModelChange)=\"setInputValue($event)\"\n [disabled]=\"nzDisabled\">\n</ng-template>\n\n<ng-template\n cdkConnectedOverlay\n nzConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"cdkOverlayOrigin\"\n [cdkConnectedOverlayOpen]=\"nzOpen\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayMinWidth]=\"nzDropdownMatchSelectWidth? null : triggerWidth\"\n [cdkConnectedOverlayWidth]=\"nzDropdownMatchSelectWidth? triggerWidth : null\"\n (backdropClick)=\"closeDropDown()\"\n (detach)=\"closeDropDown()\"\n (positionChange)=\"onPositionChange($event)\">\n <div class=\"ant-select-dropdown ant-select-tree-dropdown\"\n [@slideMotion]=\"nzOpen ? dropDownPosition : 'void'\"\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [class.ant-select-dropdown--single]=\"!nzMultiple\"\n [class.ant-select-dropdown--multiple]=\"nzMultiple\"\n [class.ant-select-dropdown-placement-bottomLeft]=\"dropDownPosition === 'bottom'\"\n [class.ant-select-dropdown-placement-topLeft]=\"dropDownPosition === 'top'\"\n [ngStyle]=\"nzDropdownStyle\">\n <nz-tree\n #treeRef\n [hidden]=\"isNotFound\"\n nzNoAnimation\n nzSelectMode\n [nzData]=\"nzNodes\"\n [nzMultiple]=\"nzMultiple\"\n [nzSearchValue]=\"inputValue\"\n [nzCheckable]=\"nzCheckable\"\n [nzAsyncData]=\"nzAsyncData\"\n [nzShowExpand]=\"nzShowExpand\"\n [nzShowLine]=\"nzShowLine\"\n [nzExpandAll]=\"nzDefaultExpandAll\"\n [nzExpandedKeys]=\"nzDefaultExpandedKeys\"\n [nzCheckedKeys]=\"nzCheckable ? value : []\"\n [nzSelectedKeys]=\"!nzCheckable ? value : []\"\n (nzExpandChange)=\"onExpandedKeysChange($event)\"\n (nzClick)=\"nzTreeClick.emit($event)\"\n (nzCheckedKeysChange)=\"updateSelectedNodes()\"\n (nzSelectedKeysChange)=\"updateSelectedNodes()\"\n (nzCheckBoxChange)=\"nzTreeCheckBoxChange.emit($event)\"\n (nzSearchValueChange)=\"setSearchValues($event)\">\n </nz-tree>\n <span *ngIf=\"nzNodes.length === 0 || isNotFound\" class=\"ant-select-not-found\">\n <nz-embed-empty [nzComponentName]=\"'tree-select'\" [specificContent]=\"nzNotFoundContent\"></nz-embed-empty>\n </span>\n </div>\n</ng-template>\n\n<div\n cdkOverlayOrigin\n class=\"ant-select-selection\"\n [class.ant-select-selection--single]=\"!isMultiple\"\n [class.ant-select-selection--multiple]=\"isMultiple\"\n tabindex=\"0\">\n <ng-container *ngIf=\"!isMultiple\">\n <div class=\"ant-select-selection__rendered\">\n <div\n *ngIf=\"nzPlaceHolder && selectedNodes.length === 0\"\n [style.display]=\"placeHolderDisplay\"\n class=\"ant-select-selection__placeholder\">\n {{ nzPlaceHolder }}\n </div>\n\n <div\n *ngIf=\"selectedNodes.length === 1\"\n class=\"ant-select-selection-selected-value\"\n [attr.title]=\"nzDisplayWith(selectedNodes[0])\"\n [ngStyle]=\"selectedValueDisplay\">\n {{ nzDisplayWith(selectedNodes[0]) }}\n </div>\n\n <div\n *ngIf=\"nzShowSearch\"\n [style.display]=\"searchDisplay\"\n class=\"ant-select-search ant-select-search--inline\">\n <div class=\"ant-select-search__field__wrap\">\n <ng-template [ngTemplateOutlet]=\"inputTemplate\"></ng-template>\n <span class=\"ant-select-search__field__mirror\">{{inputValue}} </span>\n </div>\n </div>\n\n </div>\n </ng-container>\n <ng-container *ngIf=\"isMultiple\">\n <ul class=\"ant-select-selection__rendered\">\n <div\n *ngIf=\"nzPlaceHolder && selectedNodes.length === 0\"\n [style.display]=\"placeHolderDisplay\"\n class=\"ant-select-selection__placeholder\">\n {{ nzPlaceHolder }}\n </div>\n <ng-container *ngFor=\"let node of selectedNodes | slice: 0 : nzMaxTagCount; trackBy:trackValue\">\n <li\n [@zoomMotion]\n [nzNoAnimation]=\"noAnimation?.nzNoAnimation\"\n [attr.title]=\"nzDisplayWith(node)\"\n [class.ant-select-selection__choice__disabled]=\"node.isDisabled\"\n class=\"ant-select-selection__choice\">\n <span *ngIf=\"!node.isDisabled\" class=\"ant-select-selection__choice__remove\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"removeSelected(node, true, $event)\">\n <i nz-icon type=\"close\" class=\"ant-select-remove-icon\"></i>\n </span>\n <span class=\"ant-select-selection__choice__content\">{{ nzDisplayWith(node) }}</span>\n </li>\n </ng-container>\n <li [@zoomMotion]\n *ngIf=\"selectedNodes.length > nzMaxTagCount\"\n class=\"ant-select-selection__choice\">\n <div class=\"ant-select-selection__choice__content\">\n <ng-container *ngIf=\"nzMaxTagPlaceholder\">\n <ng-template\n [ngTemplateOutlet]=\"nzMaxTagPlaceholder\"\n [ngTemplateOutletContext]=\"{ $implicit: selectedNodes | slice: nzMaxTagCount}\">\n </ng-template>\n </ng-container>\n <ng-container *ngIf=\"!nzMaxTagPlaceholder\">\n + {{ selectedNodes.length - nzMaxTagCount }} ...\n </ng-container>\n </div>\n </li>\n <li class=\"ant-select-search ant-select-search--inline\">\n <ng-template [ngTemplateOutlet]=\"inputTemplate\"></ng-template>\n </li>\n </ul>\n </ng-container>\n <span *ngIf=\"nzAllowClear\" class=\"ant-select-selection__clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"onClearSelection($event)\">\n <i nz-icon type=\"close-circle\" class=\"ant-select-clear-icon\" theme=\"fill\"></i>\n </span>\n <span *ngIf=\"!isMultiple\" class=\"ant-select-arrow\">\n <i nz-icon type=\"down\" class=\"ant-select-arrow-icon\"></i>\n </span>\n</div>",
providers: [
NzTreeSelectService,
{
provide: forms.NG_VALUE_ACCESSOR,
useExisting: i0.forwardRef(( /**
* @return {?}
*/function () { return NzTreeSelectComponent; })),
multi: true
}
],
host: {
'[class.ant-select-lg]': 'nzSize==="large"',
'[class.ant-select-sm]': 'nzSize==="small"',
'[class.ant-select-enabled]': '!nzDisabled',
'[class.ant-select-disabled]': 'nzDisabled',
'[class.ant-select-allow-clear]': 'nzAllowClear',
'[class.ant-select-open]': 'nzOpen',
'(click)': 'trigger()'
},
styles: ["\n .ant-select-dropdown {\n top: 100%;\n left: 0;\n position: relative;\n width: 100%;\n margin-top: 4px;\n margin-bottom: 4px;\n overflow: auto;\n }\n "]
}] }
];
/** @nocollapse */
NzTreeSelectComponent.ctorParameters = function () {
return [
{ type: i0.Renderer2 },
{ type: i0.ChangeDetectorRef },
{ type: NzTreeSelectService },
{ type: i0.ElementRef },
{ type: NzNoAnimationDirective, decorators: [{ type: i0.Host }, { type: i0.Optional }] }
];
};
NzTreeSelectComponent.propDecorators = {
nzAllowClear: [{ type: i0.Input }],
nzShowExpand: [{ type: i0.Input }],
nzDropdownMatchSelectWidth: [{ type: i0.Input }],
nzCheckable: [{ type: i0.Input }],
nzShowSearch: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzShowLine: [{ type: i0.Input }],
nzAsyncData: [{ type: i0.Input }],
nzMultiple: [{ type: i0.Input }],
nzDefaultExpandAll: [{ type: i0.Input }],
nzNotFoundContent: [{ type: i0.Input }],
nzNodes: [{ type: i0.Input }],
nzOpen: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzPlaceHolder: [{ type: i0.Input }],
nzDropdownStyle: [{ type: i0.Input }],
nzDefaultExpandedKeys: [{ type: i0.Input }],
nzDisplayWith: [{ type: i0.Input }],
nzMaxTagCount: [{ type: i0.Input }],
nzMaxTagPlaceholder: [{ type: i0.Input }],
nzOpenChange: [{ type: i0.Output }],
nzCleared: [{ type: i0.Output }],
nzRemoved: [{ type: i0.Output }],
nzExpandChange: [{ type: i0.Output }],
nzTreeClick: [{ type: i0.Output }],
nzTreeCheckBoxChange: [{ type: i0.Output }],
inputElement: [{ type: i0.ViewChild, args: ['inputElement',] }],
treeRef: [{ type: i0.ViewChild, args: ['treeRef',] }],
cdkOverlayOrigin: [{ type: i0.ViewChild, args: [i2$2.CdkOverlayOrigin,] }],
cdkConnectedOverlay: [{ type: i0.ViewChild, args: [i2$2.CdkConnectedOverlay,] }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzAllowClear", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzShowExpand", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzDropdownMatchSelectWidth", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzCheckable", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzShowSearch", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzShowLine", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzAsyncData", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzMultiple", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzTreeSelectComponent.prototype, "nzDefaultExpandAll", void 0);
return NzTreeSelectComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzTreeSelectModule = /** @class */ (function () {
function NzTreeSelectModule() {
}
NzTreeSelectModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, i2$2.OverlayModule, forms.FormsModule, NzTreeModule, NzIconModule, NzEmptyModule, NzOverlayModule, NzNoAnimationModule],
declarations: [NzTreeSelectComponent],
exports: [NzTreeSelectComponent]
},] }
];
return NzTreeSelectModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzUploadBtnComponent = /** @class */ (function () {
// #endregion
function NzUploadBtnComponent(http, el, updateHostClassService) {
this.http = http;
this.el = el;
this.updateHostClassService = updateHostClassService;
this.reqs = {};
this.inited = false;
this.destroy = false;
// #region fields
this.classes = {};
// #region styles
this.prefixCls = 'ant-upload';
if (!http) {
throw new Error("Not found 'HttpClient', You can import 'HttpClientModule' in your root module.");
}
}
// #endregion
// #endregion
/**
* @return {?}
*/
NzUploadBtnComponent.prototype.onClick =
// #endregion
/**
* @return {?}
*/
function () {
if (this.options.disabled || !this.options.openFileDialogOnClick) {
return;
}
(( /** @type {?} */(this.file.nativeElement))).click();
};
/**
* @param {?} e
* @return {?}
*/
NzUploadBtnComponent.prototype.onKeyDown = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (this.options.disabled) {
return;
}
if (e.key === 'Enter' || e.keyCode === keycodes.ENTER) {
this.onClick();
}
};
/**
* @param {?} e
* @return {?}
*/
NzUploadBtnComponent.prototype.onFileDrop = /**
* @param {?} e
* @return {?}
*/
function (e) {
var _this = this;
if (this.options.disabled || e.type === 'dragover') {
e.preventDefault();
return;
}
if (this.options.directory) {
this.traverseFileTree(e.dataTransfer.items);
}
else {
/** @type {?} */
var files = Array.prototype.slice.call(e.dataTransfer.files).filter(( /**
* @param {?} file
* @return {?}
*/function (file) { return _this.attrAccept(file, _this.options.accept); }));
if (files.length) {
this.uploadFiles(files);
}
}
e.preventDefault();
};
/**
* @param {?} e
* @return {?}
*/
NzUploadBtnComponent.prototype.onChange = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (this.options.disabled) {
return;
}
/** @type {?} */
var hie = ( /** @type {?} */(e.target));
this.uploadFiles(hie.files);
hie.value = '';
};
/**
* @private
* @param {?} files
* @return {?}
*/
NzUploadBtnComponent.prototype.traverseFileTree = /**
* @private
* @param {?} files
* @return {?}
*/
function (files) {
var _this = this;
var e_1, _a;
// tslint:disable-next-line:no-any
/** @type {?} */
var _traverseFileTree = ( /**
* @param {?} item
* @param {?} path
* @return {?}
*/function (item, path) {
if (item.isFile) {
item.file(( /**
* @param {?} file
* @return {?}
*/function (file) {
if (_this.attrAccept(file, _this.options.accept)) {
_this.uploadFiles([file]);
}
}));
}
else if (item.isDirectory) {
/** @type {?} */
var dirReader = item.createReader();
dirReader.readEntries(( /**
* @param {?} entries
* @return {?}
*/function (entries) {
var e_2, _a;
try {
for (var entries_1 = __values(entries), entries_1_1 = entries_1.next(); !entries_1_1.done; entries_1_1 = entries_1.next()) {
var entrieItem = entries_1_1.value;
_traverseFileTree(entrieItem, "" + path + item.name + "/");
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (entries_1_1 && !entries_1_1.done && (_a = entries_1.return))
_a.call(entries_1);
}
finally {
if (e_2)
throw e_2.error;
}
}
}));
}
});
try {
// tslint:disable-next-line:no-any
for (var _b = __values(( /** @type {?} */(files))), _c = _b.next(); !_c.done; _c = _b.next()) {
var file = _c.value;
_traverseFileTree(file.webkitGetAsEntry(), '');
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
};
/**
* @private
* @param {?} file
* @param {?} acceptedFiles
* @return {?}
*/
NzUploadBtnComponent.prototype.attrAccept = /**
* @private
* @param {?} file
* @param {?} acceptedFiles
* @return {?}
*/
function (file, acceptedFiles) {
if (file && acceptedFiles) {
/** @type {?} */
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
/** @type {?} */
var fileName_1 = '' + file.name;
/** @type {?} */
var mimeType_1 = '' + file.type;
/** @type {?} */
var baseMimeType_1 = mimeType_1.replace(/\/.*$/, '');
return acceptedFilesArray.some(( /**
* @param {?} type
* @return {?}
*/function (type) {
/** @type {?} */
var validType = type.trim();
if (validType.charAt(0) === '.') {
return fileName_1.toLowerCase().indexOf(validType.toLowerCase(), fileName_1.toLowerCase().length - validType.toLowerCase().length) !== -1;
}
else if (/\/\*$/.test(validType)) {
// This is something like a image/* mime type
return baseMimeType_1 === validType.replace(/\/.*$/, '');
}
return mimeType_1 === validType;
}));
}
return true;
};
/**
* @private
* @param {?} file
* @return {?}
*/
NzUploadBtnComponent.prototype.attachUid = /**
* @private
* @param {?} file
* @return {?}
*/
function (file) {
if (!file.uid) {
file.uid = Math.random().toString(36).substring(2);
}
return file;
};
/**
* @param {?} fileList
* @return {?}
*/
NzUploadBtnComponent.prototype.uploadFiles = /**
* @param {?} fileList
* @return {?}
*/
function (fileList) {
var _this = this;
/** @type {?} */
var filters$ = rxjs.of(Array.prototype.slice.call(fileList));
this.options.filters.forEach(( /**
* @param {?} f
* @return {?}
*/function (f) {
filters$ = filters$.pipe(operators.switchMap(( /**
* @param {?} list
* @return {?}
*/function (list) {
/** @type {?} */
var fnRes = f.fn(list);
return fnRes instanceof rxjs.Observable ? fnRes : rxjs.of(fnRes);
})));
}));
filters$.subscribe(( /**
* @param {?} list
* @return {?}
*/function (list) {
list.forEach(( /**
* @param {?} file
* @return {?}
*/function (file) {
_this.attachUid(file);
_this.upload(file, list);
}));
}), ( /**
* @param {?} e
* @return {?}
*/function (e) {
console.warn("Unhandled upload filter error", e);
}));
};
/**
* @private
* @param {?} file
* @param {?} fileList
* @return {?}
*/
NzUploadBtnComponent.prototype.upload = /**
* @private
* @param {?} file
* @param {?} fileList
* @return {?}
*/
function (file, fileList) {
var _this = this;
if (!this.options.beforeUpload) {
return this.post(file);
}
/** @type {?} */
var before = this.options.beforeUpload(file, fileList);
if (before instanceof rxjs.Observable) {
before.subscribe(( /**
* @param {?} processedFile
* @return {?}
*/function (processedFile) {
/** @type {?} */
var processedFileType = Object.prototype.toString.call(processedFile);
if (processedFileType === '[object File]' || processedFileType === '[object Blob]') {
_this.attachUid(processedFile);
_this.post(processedFile);
}
else if (typeof processedFile === 'boolean' && processedFile !== false) {
_this.post(file);
}
}), ( /**
* @param {?} e
* @return {?}
*/function (e) {
console.warn("Unhandled upload beforeUpload error", e);
}));
}
else if (before !== false) {
return this.post(file);
}
};
/**
* @private
* @param {?} file
* @return {?}
*/
NzUploadBtnComponent.prototype.post = /**
* @private
* @param {?} file
* @return {?}
*/
function (file) {
var _this = this;
if (this.destroy) {
return;
}
/** @type {?} */
var opt = this.options;
var uid = file.uid;
var data = opt.data, headers = opt.headers;
if (typeof data === 'function') {
data = (( /** @type {?} */(data)))(file);
}
if (typeof headers === 'function') {
headers = (( /** @type {?} */(headers)))(file);
}
/** @type {?} */
var args = {
action: opt.action,
name: opt.name,
headers: headers,
file: file,
data: data,
withCredentials: opt.withCredentials,
onProgress: opt.onProgress ? ( /**
* @param {?} e
* @return {?}
*/function (e) {
opt.onProgress(e, file);
}) : null,
onSuccess: ( /**
* @param {?} ret
* @param {?} xhr
* @return {?}
*/function (ret, xhr) {
_this.clean(uid);
opt.onSuccess(ret, file, xhr);
}),
onError: ( /**
* @param {?} xhr
* @return {?}
*/function (xhr) {
_this.clean(uid);
opt.onError(xhr, file);
})
};
/** @type {?} */
var req$ = (opt.customRequest || this.xhr).call(this, args);
if (!(req$ instanceof rxjs.Subscription)) {
console.warn("Must return Subscription type in '[nzCustomRequest]' property");
}
this.reqs[uid] = req$;
opt.onStart(file);
};
/**
* @private
* @param {?} args
* @return {?}
*/
NzUploadBtnComponent.prototype.xhr = /**
* @private
* @param {?} args
* @return {?}
*/
function (args) {
var _this = this;
/** @type {?} */
var formData = new FormData();
// tslint:disable-next-line:no-any
formData.append(args.name, ( /** @type {?} */(args.file)));
if (args.data) {
Object.keys(args.data).map(( /**
* @param {?} key
* @return {?}
*/function (key) {
formData.append(key, args.data[key]);
}));
}
if (!args.headers) {
args.headers = {};
}
if (args.headers['X-Requested-With'] !== null) {
args.headers['X-Requested-With'] = "XMLHttpRequest";
}
else {
delete args.headers['X-Requested-With'];
}
/** @type {?} */
var req = new i3.HttpRequest('POST', args.action, formData, {
reportProgress: true,
withCredentials: args.withCredentials,
headers: new i3.HttpHeaders(args.headers)
});
return this.http.request(req).subscribe(( /**
* @param {?} event
* @return {?}
*/function (event) {
if (event.type === i3.HttpEventType.UploadProgress) {
if (event.total > 0) {
// tslint:disable-next-line:no-any
(( /** @type {?} */(event))).percent = event.loaded / event.total * 100;
}
args.onProgress(event, args.file);
}
else if (event instanceof i3.HttpResponse) {
args.onSuccess(event.body, args.file, event);
}
}), ( /**
* @param {?} err
* @return {?}
*/function (err) {
_this.abort(args.file);
args.onError(err, args.file);
}));
};
/**
* @private
* @param {?} uid
* @return {?}
*/
NzUploadBtnComponent.prototype.clean = /**
* @private
* @param {?} uid
* @return {?}
*/
function (uid) {
/** @type {?} */
var req$ = this.reqs[uid];
if (req$ instanceof rxjs.Subscription) {
req$.unsubscribe();
}
delete this.reqs[uid];
};
/**
* @param {?=} file
* @return {?}
*/
NzUploadBtnComponent.prototype.abort = /**
* @param {?=} file
* @return {?}
*/
function (file) {
var _this = this;
if (file) {
this.clean(file && file.uid);
}
else {
Object.keys(this.reqs).forEach(( /**
* @param {?} uid
* @return {?}
*/function (uid) { return _this.clean(uid); }));
}
};
/**
* @private
* @return {?}
*/
NzUploadBtnComponent.prototype.setClassMap = /**
* @private
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var classMap = __assign((_a = {}, _a[this.prefixCls] = true, _a[this.prefixCls + "-disabled"] = this.options.disabled, _a), this.classes);
this.updateHostClassService.updateHostClass(this.el.nativeElement, classMap);
};
/**
* @return {?}
*/
NzUploadBtnComponent.prototype.ngOnInit = /**
* @return {?}
*/
function () {
this.inited = true;
this.setClassMap();
};
/**
* @return {?}
*/
NzUploadBtnComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
if (this.inited) {
this.setClassMap();
}
};
/**
* @return {?}
*/
NzUploadBtnComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.destroy = true;
this.abort();
};
NzUploadBtnComponent.decorators = [
{ type: i0.Component, args: [{
selector: '[nz-upload-btn]',
template: "<input type=\"file\" #file (change)=\"onChange($event)\"\n [attr.accept]=\"options.accept\"\n [attr.directory]=\"options.directory ? 'directory': null\"\n [attr.webkitdirectory]=\"options.directory ? 'webkitdirectory': null\"\n [multiple]=\"options.multiple\" style=\"display: none;\">\n<ng-content></ng-content>",
host: {
'[attr.tabindex]': '"0"',
'[attr.role]': '"button"'
},
providers: [NzUpdateHostClassService],
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None
}] }
];
/** @nocollapse */
NzUploadBtnComponent.ctorParameters = function () {
return [
{ type: i3.HttpClient, decorators: [{ type: i0.Optional }] },
{ type: i0.ElementRef },
{ type: NzUpdateHostClassService }
];
};
NzUploadBtnComponent.propDecorators = {
file: [{ type: i0.ViewChild, args: ['file',] }],
classes: [{ type: i0.Input }],
options: [{ type: i0.Input }],
onClick: [{ type: i0.HostListener, args: ['click',] }],
onKeyDown: [{ type: i0.HostListener, args: ['keydown', ['$event'],] }],
onFileDrop: [{ type: i0.HostListener, args: ['drop', ['$event'],] }, { type: i0.HostListener, args: ['dragover', ['$event'],] }]
};
return NzUploadBtnComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzUploadListComponent = /** @class */ (function () {
// #endregion
function NzUploadListComponent(el, cdr, updateHostClassService) {
this.el = el;
this.cdr = cdr;
this.updateHostClassService = updateHostClassService;
this.imageTypes = ['image', 'webp', 'png', 'svg', 'gif', 'jpg', 'jpeg', 'bmp'];
// #region fields
// tslint:disable-next-line:no-any
this.locale = {};
// #endregion
// #region styles
this.prefixCls = 'ant-upload-list';
}
Object.defineProperty(NzUploadListComponent.prototype, "showPic", {
get: /**
* @return {?}
*/ function () {
return this.listType === 'picture' || this.listType === 'picture-card';
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzUploadListComponent.prototype, "items", {
get: /**
* @return {?}
*/ function () {
return this._items;
},
set: /**
* @param {?} list
* @return {?}
*/ function (list) {
list.forEach(( /**
* @param {?} file
* @return {?}
*/function (file) {
file.linkProps = typeof file.linkProps === 'string' ? JSON.parse(file.linkProps) : file.linkProps;
}));
this._items = list;
},
enumerable: true,
configurable: true
});
/**
* @private
* @return {?}
*/
NzUploadListComponent.prototype.setClassMap = /**
* @private
* @return {?}
*/
function () {
var _a;
/** @type {?} */
var classMap = (_a = {},
_a[this.prefixCls] = true,
_a[this.prefixCls + "-" + this.listType] = true,
_a);
this.updateHostClassService.updateHostClass(this.el.nativeElement, classMap);
};
// #endregion
// #region render
// #endregion
// #region render
/**
* @private
* @param {?} url
* @return {?}
*/
NzUploadListComponent.prototype.extname =
// #endregion
// #region render
/**
* @private
* @param {?} url
* @return {?}
*/
function (url) {
/** @type {?} */
var temp = url.split('/');
/** @type {?} */
var filename = temp[temp.length - 1];
/** @type {?} */
var filenameWithoutSuffix = filename.split(/#|\?/)[0];
return (/\.[^./\\]*$/.exec(filenameWithoutSuffix) || [''])[0];
};
/**
* @param {?} file
* @return {?}
*/
NzUploadListComponent.prototype.isImageUrl = /**
* @param {?} file
* @return {?}
*/
function (file) {
if (~this.imageTypes.indexOf(file.type)) {
return true;
}
/** @type {?} */
var url = ( /** @type {?} */((file.thumbUrl || file.url || '')));
if (!url) {
return false;
}
/** @type {?} */
var extension = this.extname(url);
if (/^data:image\//.test(url) || /(webp|svg|png|gif|jpg|jpeg|bmp)$/i.test(extension)) {
return true;
}
else if (/^data:/.test(url)) {
// other file types of base64
return false;
}
else if (extension) {
// other file types which have extension
return false;
}
return true;
};
/**
* @private
* @param {?} file
* @param {?} callback
* @return {?}
*/
NzUploadListComponent.prototype.previewFile = /**
* @private
* @param {?} file
* @param {?} callback
* @return {?}
*/
function (file, callback) {
if (file.type && this.imageTypes.indexOf(file.type) === -1) {
callback('');
}
/** @type {?} */
var reader = new FileReader();
// https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL
reader.onloadend = ( /**
* @return {?}
*/function () { return callback(( /** @type {?} */(reader.result))); });
reader.readAsDataURL(file);
};
/**
* @private
* @return {?}
*/
NzUploadListComponent.prototype.genThumb = /**
* @private
* @return {?}
*/
function () {
var _this = this;
// tslint:disable-next-line:no-any
/** @type {?} */
var win = ( /** @type {?} */(window));
if (!this.showPic ||
typeof document === 'undefined' ||
typeof win === 'undefined' ||
!win.FileReader ||
!win.File) {
return;
}
this.items
.filter(( /**
* @param {?} file
* @return {?}
*/function (file) { return file.originFileObj instanceof File && file.thumbUrl === undefined; }))
.forEach(( /**
* @param {?} file
* @return {?}
*/function (file) {
file.thumbUrl = '';
_this.previewFile(file.originFileObj, ( /**
* @param {?} previewDataUrl
* @return {?}
*/function (previewDataUrl) {
file.thumbUrl = previewDataUrl;
_this.detectChanges();
}));
}));
};
/**
* @param {?} file
* @return {?}
*/
NzUploadListComponent.prototype.showPreview = /**
* @param {?} file
* @return {?}
*/
function (file) {
var _a = this.icons, showPreviewIcon = _a.showPreviewIcon, hidePreviewIconInNonImage = _a.hidePreviewIconInNonImage;
if (!showPreviewIcon) {
return false;
}
return this.isImageUrl(file) ? true : !hidePreviewIconInNonImage;
};
/**
* @param {?} file
* @param {?} e
* @return {?}
*/
NzUploadListComponent.prototype.handlePreview = /**
* @param {?} file
* @param {?} e
* @return {?}
*/
function (file, e) {
if (!this.onPreview) {
return;
}
e.preventDefault();
return this.onPreview(file);
};
/**
* @param {?} file
* @param {?} e
* @return {?}
*/
NzUploadListComponent.prototype.handleRemove = /**
* @param {?} file
* @param {?} e
* @return {?}
*/
function (file, e) {
e.preventDefault();
if (this.onRemove) {
this.onRemove(file);
}
return;
};
/**
* @return {?}
*/
NzUploadListComponent.prototype.detectChanges = /**
* @return {?}
*/
function () {
this.cdr.detectChanges();
};
/**
* @return {?}
*/
NzUploadListComponent.prototype.ngOnChanges = /**
* @return {?}
*/
function () {
this.setClassMap();
this.genThumb();
};
NzUploadListComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-upload-list',
template: "<div *ngFor=\"let file of items\" class=\"ant-upload-list-item ant-upload-list-item-{{file.status}}\" @itemState>\n <ng-template #icon>\n <ng-container *ngIf=\"showPic; else noPicTpl\">\n <div *ngIf=\"listType === 'picture-card' && file.status === 'uploading'; else thumbUrlCheck\" class=\"ant-upload-list-item-uploading-text\">{{ locale.uploading }}</div>\n </ng-container>\n <ng-template #thumbUrlCheck>\n <i *ngIf=\"!file.thumbUrl && !file.url; else thumbTpl\"\n class=\"ant-upload-list-item-thumbnail\" nz-icon type=\"picture\" theme=\"twotone\"></i>\n </ng-template>\n <ng-template #thumbTpl>\n <a class=\"ant-upload-list-item-thumbnail\" target=\"_blank\" rel=\"noopener noreferrer\"\n [href]=\"file.thumbUrl || file.url\"\n (click)=\"handlePreview(file, $event)\">\n <img *ngIf=\"isImageUrl(file); else noThumbTpl\" [src]=\"file.thumbUrl || file.url\" [attr.alt]=\"file.name\" />\n </a>\n </ng-template>\n <ng-template #noThumbTpl><i class=\"ant-upload-list-item-icon\" nz-icon type=\"file\" theme=\"twotone\"></i></ng-template>\n <ng-template #noPicTpl><i nz-icon [type]=\"file.status === 'uploading' ? 'loading' : 'paper-clip'\"></i></ng-template>\n </ng-template>\n <ng-template #preview>\n <ng-container *ngIf=\"file.url; else prevText\">\n <a [href]=\"file.thumbUrl || file.url\" target=\"_blank\" rel=\"noopener noreferrer\" [attr.download]=\"file.linkProps && file.linkProps.download\"\n (click)=\"handlePreview(file, $event)\" class=\"ant-upload-list-item-name\" title=\"{{ file.name }}\">{{ file.name }}</a>\n </ng-container>\n <ng-template #prevText>\n <span (click)=\"handlePreview(file, $event)\" class=\"ant-upload-list-item-name\" title=\"{{ file.name }}\">{{ file.name }}</span>\n </ng-template>\n </ng-template>\n <div class=\"ant-upload-list-item-info\">\n <span *ngIf=\"file.status === 'error'\" nz-tooltip [nzTitle]=\"file.message\">\n <ng-template [ngTemplateOutlet]=\"icon\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"preview\"></ng-template>\n </span>\n <span *ngIf=\"file.status !== 'error'\">\n <ng-template [ngTemplateOutlet]=\"icon\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"preview\"></ng-template>\n </span>\n </div>\n <ng-container *ngIf=\"listType === 'picture-card' && file.status !== 'uploading'; else close\">\n <span class=\"ant-upload-list-item-actions\">\n <a *ngIf=\"showPreview(file)\" [href]=\"file.thumbUrl || file.url\"\n target=\"_blank\" rel=\"noopener noreferrer\"\n title=\"{{ locale.previewFile }}\"\n [ngStyle]=\"!(file.url || file.thumbUrl) && {'opacity': .5, 'pointer-events': 'none'}\"\n (click)=\"handlePreview(file, $event)\">\n <i nz-icon type=\"eye-o\"></i>\n </a>\n <i *ngIf=\"icons.showRemoveIcon\" (click)=\"handleRemove(file, $event)\" class=\"anticon anticon-delete\" title=\"{{ locale.removeFile }}\"></i>\n </span>\n </ng-container>\n <ng-template #close>\n <i *ngIf=\"icons.showRemoveIcon\" (click)=\"handleRemove(file, $event)\" nz-icon type=\"close\" title=\"{{ locale.removeFile }}\"></i>\n </ng-template>\n <div *ngIf=\"file.status === 'uploading'\" class=\"ant-upload-list-item-progress\">\n <nz-progress [nzPercent]=\"file.percent\" [nzShowInfo]=\"false\" [nzStrokeWidth]=\"2\"></nz-progress>\n </div>\n</div>",
providers: [NzUpdateHostClassService],
animations: [
animations$1.trigger('itemState', [
animations$1.transition(':enter', [
animations$1.style({ height: '0', width: '0', opacity: 0 }),
animations$1.animate(150, animations$1.style({ height: '*', width: '*', opacity: 1 }))
]),
animations$1.transition(':leave', [
animations$1.animate(150, animations$1.style({ height: '0', width: '0', opacity: 0 }))
])
])
],
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzUploadListComponent.ctorParameters = function () {
return [
{ type: i0.ElementRef },
{ type: i0.ChangeDetectorRef },
{ type: NzUpdateHostClassService }
];
};
NzUploadListComponent.propDecorators = {
locale: [{ type: i0.Input }],
listType: [{ type: i0.Input }],
items: [{ type: i0.Input }],
icons: [{ type: i0.Input }],
onPreview: [{ type: i0.Input }],
onRemove: [{ type: i0.Input }]
};
return NzUploadListComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzUploadComponent = /** @class */ (function () {
// #endregion
function NzUploadComponent(cdr, i18n) {
var _this = this;
this.cdr = cdr;
this.i18n = i18n;
// tslint:disable-next-line:no-any
this.locale = {};
// #region fields
this.nzType = 'select';
this._limit = 0;
this._size = 0;
this.nzDirectory = false;
this.nzOpenFileDialogOnClick = true;
this.nzFilter = [];
this.nzFileList = [];
this.nzDisabled = false;
this.nzListType = 'text';
this.nzMultiple = false;
this.nzName = 'file';
this._showUploadList = true;
this.nzShowButton = true;
this.nzWithCredentials = false;
this.nzChange = new i0.EventEmitter();
this.nzFileListChange = new i0.EventEmitter();
this.onStart = ( /**
* @param {?} file
* @return {?}
*/function (file) {
if (!_this.nzFileList) {
_this.nzFileList = [];
}
/** @type {?} */
var targetItem = _this.fileToObject(file);
targetItem.status = 'uploading';
_this.nzFileList = _this.nzFileList.concat(targetItem);
_this.nzFileListChange.emit(_this.nzFileList);
_this.nzChange.emit({ file: targetItem, fileList: _this.nzFileList, type: 'start' });
_this.detectChangesList();
});
this.onProgress = ( /**
* @param {?} e
* @param {?} file
* @return {?}
*/function (e, file) {
/** @type {?} */
var fileList = _this.nzFileList;
/** @type {?} */
var targetItem = _this.getFileItem(file, fileList);
targetItem.percent = e.percent;
_this.nzChange.emit({
event: e,
file: __assign({}, targetItem),
fileList: _this.nzFileList,
type: 'progress'
});
_this.detectChangesList();
});
this.onSuccess = ( /**
* @param {?} res
* @param {?} file
* @return {?}
*/function (res, file) {
/** @type {?} */
var fileList = _this.nzFileList;
/** @type {?} */
var targetItem = _this.getFileItem(file, fileList);
targetItem.status = 'done';
targetItem.response = res;
_this.nzChange.emit({
file: __assign({}, targetItem),
fileList: fileList,
type: 'success'
});
_this.detectChangesList();
});
this.onError = ( /**
* @param {?} err
* @param {?} file
* @return {?}
*/function (err, file) {
/** @type {?} */
var fileList = _this.nzFileList;
/** @type {?} */
var targetItem = _this.getFileItem(file, fileList);
targetItem.error = err;
targetItem.status = 'error';
targetItem.message = _this.genErr(targetItem);
_this.nzChange.emit({
file: __assign({}, targetItem),
fileList: fileList,
type: 'error'
});
_this.detectChangesList();
});
this.onRemove = ( /**
* @param {?} file
* @return {?}
*/function (file) {
_this.uploadComp.abort(file);
file.status = 'removed';
/** @type {?} */
var fnRes = typeof _this.nzRemove === 'function' ?
_this.nzRemove(file) : _this.nzRemove == null ? true : _this.nzRemove;
(fnRes instanceof rxjs.Observable ? fnRes : rxjs.of(fnRes))
.pipe(operators.filter(( /**
* @param {?} res
* @return {?}
*/function (res) { return res; })))
.subscribe(( /**
* @return {?}
*/function () {
_this.nzFileList = _this.removeFileItem(file, _this.nzFileList);
_this.nzChange.emit({
file: file,
fileList: _this.nzFileList,
type: 'removed'
});
_this.nzFileListChange.emit(_this.nzFileList);
_this.cdr.detectChanges();
}));
});
// #endregion
// #region styles
this.prefixCls = 'ant-upload';
this.classList = [];
}
Object.defineProperty(NzUploadComponent.prototype, "nzLimit", {
get: /**
* @return {?}
*/ function () {
return this._limit;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._limit = toNumber(value, null);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzUploadComponent.prototype, "nzSize", {
get: /**
* @return {?}
*/ function () {
return this._size;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._size = toNumber(value, null);
},
enumerable: true,
configurable: true
});
Object.defineProperty(NzUploadComponent.prototype, "nzShowUploadList", {
get: /**
* @return {?}
*/ function () {
return this._showUploadList;
},
set: /**
* @param {?} value
* @return {?}
*/ function (value) {
this._showUploadList = typeof value === 'boolean' ? toBoolean(value) : value;
},
enumerable: true,
configurable: true
});
/**
* @private
* @template THIS
* @this {THIS}
* @return {THIS}
*/
NzUploadComponent.prototype.zipOptions = /**
* @private
* @template THIS
* @this {THIS}
* @return {THIS}
*/
function () {
var _this = this;
if (typeof ( /** @type {?} */(this)).nzShowUploadList === 'boolean' && ( /** @type {?} */(this)).nzShowUploadList) {
( /** @type {?} */(this)).nzShowUploadList = {
showPreviewIcon: true,
showRemoveIcon: true,
hidePreviewIconInNonImage: false
};
}
// filters
/** @type {?} */
var filters = ( /** @type {?} */(this)).nzFilter.slice();
if (( /** @type {?} */(this)).nzMultiple && ( /** @type {?} */(this)).nzLimit > 0 && filters.findIndex(( /**
* @param {?} w
* @return {?}
*/function (w) { return w.name === 'limit'; })) === -1) {
filters.push({
name: 'limit',
fn: ( /**
* @param {?} fileList
* @return {?}
*/function (fileList) { return fileList.slice(-( /** @type {?} */(_this)).nzLimit); })
});
}
if (( /** @type {?} */(this)).nzSize > 0 && filters.findIndex(( /**
* @param {?} w
* @return {?}
*/function (w) { return w.name === 'size'; })) === -1) {
filters.push({
name: 'size',
fn: ( /**
* @param {?} fileList
* @return {?}
*/function (fileList) {
return fileList.filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return (w.size / 1024) <= ( /** @type {?} */(_this)).nzSize; }));
})
});
}
if (( /** @type {?} */(this)).nzFileType && ( /** @type {?} */(this)).nzFileType.length > 0 && filters.findIndex(( /**
* @param {?} w
* @return {?}
*/function (w) { return w.name === 'type'; })) === -1) {
/** @type {?} */
var types_1 = ( /** @type {?} */(this)).nzFileType.split(',');
filters.push({
name: 'type',
fn: ( /**
* @param {?} fileList
* @return {?}
*/function (fileList) {
return fileList.filter(( /**
* @param {?} w
* @return {?}
*/function (w) { return ~types_1.indexOf(w.type); }));
})
});
}
( /** @type {?} */(this))._btnOptions = {
disabled: ( /** @type {?} */(this)).nzDisabled,
accept: ( /** @type {?} */(this)).nzAccept,
action: ( /** @type {?} */(this)).nzAction,
directory: ( /** @type {?} */(this)).nzDirectory,
openFileDialogOnClick: ( /** @type {?} */(this)).nzOpenFileDialogOnClick,
beforeUpload: ( /** @type {?} */(this)).nzBeforeUpload,
customRequest: ( /** @type {?} */(this)).nzCustomRequest,
data: ( /** @type {?} */(this)).nzData,
headers: ( /** @type {?} */(this)).nzHeaders,
name: ( /** @type {?} */(this)).nzName,
multiple: ( /** @type {?} */(this)).nzMultiple,
withCredentials: ( /** @type {?} */(this)).nzWithCredentials,
filters: filters,
onStart: ( /** @type {?} */(this)).onStart,
onProgress: ( /** @type {?} */(this)).onProgress,
onSuccess: ( /** @type {?} */(this)).onSuccess,
onError: ( /** @type {?} */(this)).onError
};
return ( /** @type {?} */(this));
};
// #region upload
// #region upload
/**
* @private
* @param {?} file
* @return {?}
*/
NzUploadComponent.prototype.fileToObject =
// #region upload
/**
* @private
* @param {?} file
* @return {?}
*/
function (file) {
return {
lastModified: file.lastModified,
lastModifiedDate: file.lastModifiedDate,
name: file.filename || file.name,
size: file.size,
type: file.type,
uid: file.uid,
response: file.response,
error: file.error,
percent: 0,
// tslint:disable-next-line:no-any
originFileObj: ( /** @type {?} */(file))
};
};
/**
* @private
* @param {?} file
* @param {?} fileList
* @return {?}
*/
NzUploadComponent.prototype.getFileItem = /**
* @private
* @param {?} file
* @param {?} fileList
* @return {?}
*/
function (file, fileList) {
return fileList.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.uid === file.uid; }))[0];
};
/**
* @private
* @param {?} file
* @param {?} fileList
* @return {?}
*/
NzUploadComponent.prototype.removeFileItem = /**
* @private
* @param {?} file
* @param {?} fileList
* @return {?}
*/
function (file, fileList) {
return fileList.filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return item.uid !== file.uid; }));
};
/**
* @private
* @param {?} file
* @return {?}
*/
NzUploadComponent.prototype.genErr = /**
* @private
* @param {?} file
* @return {?}
*/
function (file) {
return file.response && typeof file.response === 'string' ?
file.response :
(file.error && file.error.statusText) || this.locale.uploadError;
};
/**
* @param {?} e
* @return {?}
*/
NzUploadComponent.prototype.fileDrop = /**
* @param {?} e
* @return {?}
*/
function (e) {
if (e.type === this.dragState) {
return;
}
this.dragState = e.type;
this.setClassMap();
};
// #endregion
// #region list
// #endregion
// #region list
/**
* @private
* @return {?}
*/
NzUploadComponent.prototype.detectChangesList =
// #endregion
// #region list
/**
* @private
* @return {?}
*/
function () {
this.cdr.detectChanges();
this.listComp.detectChanges();
};
/**
* @private
* @return {?}
*/
NzUploadComponent.prototype.setClassMap = /**
* @private
* @return {?}
*/
function () {
/** @type {?} */
var subCls = [];
if (this.nzType === 'drag') {
subCls = [
this.nzFileList.some(( /**
* @param {?} file
* @return {?}
*/function (file) { return file.status === 'uploading'; })) && this.prefixCls + "-drag-uploading",
this.dragState === 'dragover' && this.prefixCls + "-drag-hover"
];
}
else {
subCls = [
this.prefixCls + "-select-" + this.nzListType
];
}
this.classList = __spread([
this.prefixCls,
this.prefixCls + "-" + this.nzType
], subCls, [
this.nzDisabled && this.prefixCls + "-disabled"
]).filter(( /**
* @param {?} item
* @return {?}
*/function (item) { return !!item; }));
this.cdr.detectChanges();
};
// #endregion
// #endregion
/**
* @return {?}
*/
NzUploadComponent.prototype.ngOnInit =
// #endregion
/**
* @return {?}
*/
function () {
var _this = this;
this.i18n$ = this.i18n.localeChange.subscribe(( /**
* @return {?}
*/function () {
_this.locale = _this.i18n.getLocaleData('Upload');
_this.detectChangesList();
}));
};
/**
* @param {?} changes
* @return {?}
*/
NzUploadComponent.prototype.ngOnChanges = /**
* @param {?} changes
* @return {?}
*/
function (changes) {
var _this = this;
if (changes.nzFileList) {
(this.nzFileList || []).forEach(( /**
* @param {?} file
* @return {?}
*/function (file) { return file.message = _this.genErr(file); }));
}
this.zipOptions().setClassMap();
};
/**
* @return {?}
*/
NzUploadComponent.prototype.ngOnDestroy = /**
* @return {?}
*/
function () {
this.i18n$.unsubscribe();
};
NzUploadComponent.decorators = [
{ type: i0.Component, args: [{
selector: 'nz-upload',
template: "<ng-template #list>\n <nz-upload-list #listComp [style.display]=\"nzShowUploadList ? '' : 'none'\"\n [locale]=\"locale\"\n [listType]=\"nzListType\"\n [items]=\"nzFileList || []\"\n [icons]=\"nzShowUploadList\"\n [onPreview]=\"nzPreview\"\n [onRemove]=\"onRemove\"></nz-upload-list>\n</ng-template>\n<ng-template #con><ng-content></ng-content></ng-template>\n<ng-template #btn>\n <div [ngClass]=\"classList\" [style.display]=\"nzShowButton ? '' : 'none'\">\n <div nz-upload-btn #uploadComp [options]=\"_btnOptions\">\n <ng-template [ngTemplateOutlet]=\"con\"></ng-template>\n </div>\n </div>\n</ng-template>\n<ng-container *ngIf=\"nzType === 'drag'; else select\">\n <div [ngClass]=\"classList\"\n (drop)=\"fileDrop($event)\"\n (dragover)=\"fileDrop($event)\"\n (dragleave)=\"fileDrop($event)\">\n <div nz-upload-btn #upload [options]=\"_btnOptions\" [classes]=\"{'ant-upload-btn': true}\">\n <div class=\"ant-upload-drag-container\">\n <ng-template [ngTemplateOutlet]=\"con\"></ng-template>\n </div>\n </div>\n </div>\n <ng-template [ngTemplateOutlet]=\"list\"></ng-template>\n</ng-container>\n<ng-template #select>\n <ng-container *ngIf=\"nzListType === 'picture-card'; else pic\">\n <ng-template [ngTemplateOutlet]=\"list\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"btn\"></ng-template>\n </ng-container>\n</ng-template>\n<ng-template #pic>\n <ng-template [ngTemplateOutlet]=\"btn\"></ng-template>\n <ng-template [ngTemplateOutlet]=\"list\"></ng-template>\n</ng-template>",
preserveWhitespaces: false,
encapsulation: i0.ViewEncapsulation.None,
changeDetection: i0.ChangeDetectionStrategy.OnPush
}] }
];
/** @nocollapse */
NzUploadComponent.ctorParameters = function () {
return [
{ type: i0.ChangeDetectorRef },
{ type: NzI18nService$$1 }
];
};
NzUploadComponent.propDecorators = {
uploadComp: [{ type: i0.ViewChild, args: ['uploadComp',] }],
listComp: [{ type: i0.ViewChild, args: ['listComp',] }],
nzType: [{ type: i0.Input }],
nzLimit: [{ type: i0.Input }],
nzSize: [{ type: i0.Input }],
nzFileType: [{ type: i0.Input }],
nzAccept: [{ type: i0.Input }],
nzAction: [{ type: i0.Input }],
nzDirectory: [{ type: i0.Input }],
nzOpenFileDialogOnClick: [{ type: i0.Input }],
nzBeforeUpload: [{ type: i0.Input }],
nzCustomRequest: [{ type: i0.Input }],
nzData: [{ type: i0.Input }],
nzFilter: [{ type: i0.Input }],
nzFileList: [{ type: i0.Input }],
nzDisabled: [{ type: i0.Input }],
nzHeaders: [{ type: i0.Input }],
nzListType: [{ type: i0.Input }],
nzMultiple: [{ type: i0.Input }],
nzName: [{ type: i0.Input }],
nzShowUploadList: [{ type: i0.Input }],
nzShowButton: [{ type: i0.Input }],
nzWithCredentials: [{ type: i0.Input }],
nzRemove: [{ type: i0.Input }],
nzPreview: [{ type: i0.Input }],
nzChange: [{ type: i0.Output }],
nzFileListChange: [{ type: i0.Output }]
};
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzUploadComponent.prototype, "nzDirectory", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzUploadComponent.prototype, "nzOpenFileDialogOnClick", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzUploadComponent.prototype, "nzDisabled", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzUploadComponent.prototype, "nzMultiple", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzUploadComponent.prototype, "nzShowButton", void 0);
__decorate([
InputBoolean(),
__metadata("design:type", Object)
], NzUploadComponent.prototype, "nzWithCredentials", void 0);
return NzUploadComponent;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzUploadModule = /** @class */ (function () {
function NzUploadModule() {
}
NzUploadModule.decorators = [
{ type: i0.NgModule, args: [{
imports: [i2$1.CommonModule, forms.FormsModule, NzToolTipModule, NzProgressModule, NzI18nModule, NzIconModule],
declarations: [NzUploadComponent, NzUploadBtnComponent, NzUploadListComponent],
exports: [NzUploadComponent]
},] }
];
return NzUploadModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NzDropdownService$$1 = /** @class */ (function () {
function NzDropdownService$$1(overlay) {
this.overlay = overlay;
}
/**
* @param {?} $event
* @param {?} templateRef
* @return {?}
*/
NzDropdownService$$1.prototype.create = /**
* @param {?} $event
* @param {?} templateRef
* @return {?}
*/
function ($event, templateRef) {
var _this = this;
$event.preventDefault();
this.dispose();
this.overlayRef = this.overlay.create(new i2$2.OverlayConfig({
scrollStrategy: this.overlay.scrollStrategies.close(),
positionStrategy: this.overlay.position().flexibleConnectedTo({
x: $event.x,
y: $event.y
}).withPositions([
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'top' }),
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'end', overlayY: 'bottom' }),
new i2$2.ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'end', overlayY: 'top' })
])
}));
/** @type {?} */
var positionChanges = (( /** @type {?} */(this.overlayRef.getConfig().positionStrategy))).positionChanges;
/** @type {?} */
var instance = this.overlayRef.attach(new portal.ComponentPortal(NzDropdownContextComponent)).instance;
rxjs.fromEvent(document, 'click').pipe(operators.filter(( /**
* @param {?} event
* @return {?}
*/function (event) { return !!_this.overlayRef && !_this.overlayRef.overlayElement.contains(( /** @type {?} */(event.target))); })), operators.take(1)).subscribe(( /**
* @return {?}
*/function () { return instance.close(); }));
instance.init(true, templateRef, positionChanges, this);
return instance;
};
/**
* @return {?}
*/
NzDropdownService$$1.prototype.dispose = /**
* @return {?}
*/
function () {
if (this.overlayRef && this.overlayRef.hasAttached()) {
this.overlayRef.dispose();
this.overlayRef = null;
}
};
NzDropdownService$$1.decorators = [
{ type: i0.Injectable, args: [{
providedIn: 'root'
},] }
];
/** @nocollapse */
NzDropdownService$$1.ctorParameters = function () {
return [
{ type: i2$2.Overlay }
];
};
/** @nocollapse */ NzDropdownService$$1.ngInjectableDef = i0.defineInjectable({ factory: function NzDropdownService_Factory() { return new NzDropdownService$$1(i0.inject(i2$2.Overlay)); }, token: NzDropdownService$$1, providedIn: "root" });
return NzDropdownService$$1;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/** @type {?} */
var VERSION = new i0.Version('7.0.2');
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
var NgZorroAntdModule = /** @class */ (function () {
function NgZorroAntdModule() {
}
/**
* @deprecated Use `NgZorroAntdModule` instead.
*/
/**
* @deprecated Use `NgZorroAntdModule` instead.
* @return {?}
*/
NgZorroAntdModule.forRoot = /**
* @deprecated Use `NgZorroAntdModule` instead.
* @return {?}
*/
function () {
return {
ngModule: NgZorroAntdModule
};
};
NgZorroAntdModule.decorators = [
{ type: i0.NgModule, args: [{
exports: [
NzButtonModule,
NzCalendarModule,
NzGridModule,
NzSwitchModule,
NzSelectModule,
NzMenuModule,
NzMentionModule,
NzAnchorModule,
NzAffixModule,
NzDropDownModule,
NzLayoutModule,
NzBreadCrumbModule,
NzPaginationModule,
NzStepsModule,
NzInputModule,
NzCheckboxModule,
NzInputNumberModule,
NzSliderModule,
NzRateModule,
NzBadgeModule,
NzRadioModule,
NzAlertModule,
NzSpinModule,
NzProgressModule,
NzTabsModule,
NzIconModule,
NzCardModule,
NzAvatarModule,
NzTimelineModule,
NzTransferModule,
NzCarouselModule,
NzCollapseModule,
NzCommentModule,
NzTableModule,
NzDatePickerModule,
NzDividerModule,
NzDrawerModule,
NzFormModule,
NzListModule,
NzI18nModule,
NzUploadModule,
NzAutocompleteModule,
NzTagModule,
NzMessageModule,
NzNotificationModule,
NzPopoverModule,
NzToolTipModule,
NzPopconfirmModule,
NzModalModule,
NzBackTopModule,
NzCascaderModule,
NzTreeModule,
NzTreeSelectModule,
NzTimePickerModule,
NzWaveModule,
NzNoAnimationModule,
NzSkeletonModule,
NzStatisticModule,
NzEmptyModule
]
},] }
];
return NgZorroAntdModule;
}());
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
exports.NgZorroAntdModule = NgZorroAntdModule;
exports.NzAffixComponent = NzAffixComponent;
exports.NzAffixModule = NzAffixModule;
exports.NzAlertComponent = NzAlertComponent;
exports.NzAlertModule = NzAlertModule;
exports.NzAnchorLinkComponent = NzAnchorLinkComponent;
exports.NzAnchorComponent = NzAnchorComponent;
exports.NzAnchorModule = NzAnchorModule;
exports.NzAvatarComponent = NzAvatarComponent;
exports.NzAvatarModule = NzAvatarModule;
exports.NzBackTopComponent = NzBackTopComponent;
exports.NzBackTopModule = NzBackTopModule;
exports.NzBadgeComponent = NzBadgeComponent;
exports.NzBadgeModule = NzBadgeModule;
exports.NzBreadCrumbItemComponent = NzBreadCrumbItemComponent;
exports.NZ_ROUTE_DATA_BREADCRUMB = NZ_ROUTE_DATA_BREADCRUMB;
exports.NzBreadCrumbComponent = NzBreadCrumbComponent;
exports.NzBreadCrumbModule = NzBreadCrumbModule;
exports.NzButtonComponent = NzButtonComponent;
exports.NzButtonGroupComponent = NzButtonGroupComponent;
exports.NzButtonModule = NzButtonModule;
exports.NzCalendarComponent = NzCalendarComponent;
exports.NzCalendarModule = NzCalendarModule;
exports.NzCardGridDirective = NzCardGridDirective;
exports.NzCardComponent = NzCardComponent;
exports.NzCardModule = NzCardModule;
exports.NzCardLoadingComponent = NzCardLoadingComponent;
exports.NzCardMetaComponent = NzCardMetaComponent;
exports.NzCardTabComponent = NzCardTabComponent;
exports.NzCarouselModule = NzCarouselModule;
exports.NzCarouselComponent = NzCarouselComponent;
exports.NzCarouselContentDirective = NzCarouselContentDirective;
exports.NzCheckboxComponent = NzCheckboxComponent;
exports.NzCheckboxModule = NzCheckboxModule;
exports.NzCheckboxGroupComponent = NzCheckboxGroupComponent;
exports.NzCheckboxWrapperComponent = NzCheckboxWrapperComponent;
exports.NzCollapsePanelComponent = NzCollapsePanelComponent;
exports.NzCollapseComponent = NzCollapseComponent;
exports.NzCollapseModule = NzCollapseModule;
exports.NzCommentModule = NzCommentModule;
exports.NzCommentComponent = NzCommentComponent;
exports.NzCommentAvatarDirective = NzCommentAvatarDirective;
exports.NzCommentContentDirective = NzCommentContentDirective;
exports.NzCommentActionHostDirective = NzCommentActionHostDirective;
exports.NzCommentActionComponent = NzCommentActionComponent;
exports.CandyDate = CandyDate;
exports.NzDatePickerModule = NzDatePickerModule;
exports.NzDatePickerComponent = NzDatePickerComponent;
exports.NzRangePickerComponent = NzRangePickerComponent;
exports.NzMonthPickerComponent = NzMonthPickerComponent;
exports.NzWeekPickerComponent = NzWeekPickerComponent;
exports.NzDividerComponent = NzDividerComponent;
exports.NzDividerModule = NzDividerModule;
exports.DRAWER_ANIMATE_DURATION = DRAWER_ANIMATE_DURATION;
exports.NzDrawerComponent = NzDrawerComponent;
exports.NzDrawerModule = NzDrawerModule;
exports.DrawerBuilderForService = DrawerBuilderForService$$1;
exports.NzDrawerService = NzDrawerService$$1;
exports.NzDrawerRef = NzDrawerRef;
exports.NzDropdownContextComponent = NzDropdownContextComponent;
exports.NzDropDownComponent = NzDropDownComponent;
exports.NzDropDownDirective = NzDropDownDirective;
exports.NzDropdownService = NzDropdownService$$1;
exports.NzDropDownButtonComponent = NzDropDownButtonComponent;
exports.NzDropDownModule = NzDropDownModule;
exports.NzEmbedEmptyComponent = NzEmbedEmptyComponent;
exports.NzEmptyComponent = NzEmptyComponent;
exports.NzEmptyModule = NzEmptyModule;
exports.NzEmptyService = NzEmptyService$$1;
exports.NZ_DEFAULT_EMPTY_CONTENT = NZ_DEFAULT_EMPTY_CONTENT;
exports.NZ_EMPTY_COMPONENT_NAME = NZ_EMPTY_COMPONENT_NAME;
exports.emptyImage = emptyImage;
exports.simpleEmptyImage = simpleEmptyImage;
exports.NzFormModule = NzFormModule;
exports.NzFormDirective = NzFormDirective;
exports.NzFormControlComponent = NzFormControlComponent;
exports.NzFormExplainComponent = NzFormExplainComponent;
exports.NzFormItemComponent = NzFormItemComponent;
exports.NzFormExtraComponent = NzFormExtraComponent;
exports.NzFormLabelComponent = NzFormLabelComponent;
exports.NzFormSplitComponent = NzFormSplitComponent;
exports.NzFormTextComponent = NzFormTextComponent;
exports.Breakpoint = Breakpoint;
exports.NzRowDirective = NzRowDirective;
exports.NzColDirective = NzColDirective;
exports.NzGridModule = NzGridModule;
exports.NzI18nModule = NzI18nModule;
exports.NzI18nService = NzI18nService$$1;
exports.NZ_DATE_CONFIG = NZ_DATE_CONFIG;
exports.DateHelperService = DateHelperService$$1;
exports.ar_EG = ar_EG;
exports.bg_BG = bg_BG;
exports.ca_ES = ca_ES;
exports.cs_CZ = cs_CZ;
exports.da_DK = da_DK;
exports.de_DE = de_DE;
exports.el_GR = el_GR;
exports.en_GB = en_GB;
exports.en_US = en_US;
exports.es_ES = es_ES;
exports.et_EE = et_EE;
exports.fa_IR = fa_IR;
exports.fi_FI = fi_FI;
exports.fr_BE = fr_BE;
exports.fr_FR = fr_FR;
exports.is_IS = is_IS;
exports.it_IT = it_IT;
exports.ja_JP = ja_JP;
exports.ko_KR = ko_KR;
exports.nb_NO = nb_NO;
exports.nl_BE = nl_BE;
exports.nl_NL = nl_NL;
exports.pl_PL = pl_PL;
exports.pt_BR = pt_BR;
exports.pt_PT = pt_PT;
exports.ru_RU = ru_RU;
exports.sk_SK = sk_SK;
exports.sl_SI = sl_SI;
exports.sr_RS = sr_RS;
exports.sv_SE = sv_SE;
exports.th_TH = th_TH;
exports.tr_TR = tr_TR;
exports.uk_UA = uk_UA;
exports.vi_VN = vi_VN;
exports.zh_CN = zh_CN;
exports.zh_TW = zh_TW;
exports.NZ_I18N = NZ_I18N;
exports.NZ_DATE_LOCALE = NZ_DATE_LOCALE;
exports.NzIconModule = NzIconModule;
exports.NzIconDirective = NzIconDirective;
exports.NZ_ICONS = NZ_ICONS$$1;
exports.NZ_ICON_DEFAULT_TWOTONE_COLOR = NZ_ICON_DEFAULT_TWOTONE_COLOR$$1;
exports.DEFAULT_TWOTONE_COLOR = DEFAULT_TWOTONE_COLOR$$1;
exports.NZ_ICONS_USED_BY_ZORRO = NZ_ICONS_USED_BY_ZORRO$$1;
exports.NzIconService = NzIconService$$1;
exports.NzInputGroupComponent = NzInputGroupComponent;
exports.NzInputModule = NzInputModule;
exports.NzInputDirective = NzInputDirective;
exports.NzInputNumberComponent = NzInputNumberComponent;
exports.NzInputNumberModule = NzInputNumberModule;
exports.NzContentComponent = NzContentComponent;
exports.NzFooterComponent = NzFooterComponent;
exports.NzHeaderComponent = NzHeaderComponent;
exports.NzLayoutComponent = NzLayoutComponent;
exports.NzSiderComponent = NzSiderComponent;
exports.NzLayoutModule = NzLayoutModule;
exports.NzListItemMetaComponent = NzListItemMetaComponent;
exports.NzListItemComponent = NzListItemComponent;
exports.NzListComponent = NzListComponent;
exports.NzListModule = NzListModule;
exports.NzMentionModule = NzMentionModule;
exports.NzMentionComponent = NzMentionComponent;
exports.NZ_MENTION_TRIGGER_ACCESSOR = NZ_MENTION_TRIGGER_ACCESSOR;
exports.NzMentionTriggerDirective = NzMentionTriggerDirective;
exports.NzMentionSuggestionDirective = NzMentionSuggestionDirective;
exports.NzMenuFactory = NzMenuFactory;
exports.NzMenuDirective = NzMenuDirective;
exports.NzMenuGroupComponent = NzMenuGroupComponent;
exports.NzMenuDividerDirective = NzMenuDividerDirective;
exports.NzMenuItemDirective = NzMenuItemDirective;
exports.NzSubMenuComponent = NzSubMenuComponent;
exports.NzMenuModule = NzMenuModule;
exports.NzPaginationComponent = NzPaginationComponent;
exports.NzPaginationModule = NzPaginationModule;
exports.NzProgressModule = NzProgressModule;
exports.NzProgressComponent = NzProgressComponent;
exports.NzRadioButtonComponent = NzRadioButtonComponent;
exports.NzRadioGroupComponent = NzRadioGroupComponent;
exports.NzRadioComponent = NzRadioComponent;
exports.NzRadioModule = NzRadioModule;
exports.NzRateComponent = NzRateComponent;
exports.NzRateModule = NzRateModule;
exports.NzOptionGroupComponent = NzOptionGroupComponent;
exports.NzOptionContainerComponent = NzOptionContainerComponent;
exports.NzOptionComponent = NzOptionComponent;
exports.NzSelectComponent = NzSelectComponent;
exports.NzSelectModule = NzSelectModule;
exports.NzSpinComponent = NzSpinComponent;
exports.NzSpinModule = NzSpinModule;
exports.NzCountdownComponent = NzCountdownComponent;
exports.NzStatisticComponent = NzStatisticComponent;
exports.NzStatisticModule = NzStatisticModule;
exports.NzStepsComponent = NzStepsComponent;
exports.NzStepComponent = NzStepComponent;
exports.NzStepsModule = NzStepsModule;
exports.NzSwitchComponent = NzSwitchComponent;
exports.NzSwitchModule = NzSwitchModule;
exports.NzTableComponent = NzTableComponent;
exports.NzTableModule = NzTableModule;
exports.NzTbodyDirective = NzTbodyDirective;
exports.NzTdComponent = NzTdComponent;
exports.NzThComponent = NzThComponent;
exports.NzTheadComponent = NzTheadComponent;
exports.NzTrDirective = NzTrDirective;
exports.NzTabBodyComponent = NzTabBodyComponent;
exports.NzTabLabelDirective = NzTabLabelDirective;
exports.NzTabComponent = NzTabComponent;
exports.NzTabsInkBarDirective = NzTabsInkBarDirective;
exports.NzTabsModule = NzTabsModule;
exports.NzTabsNavComponent = NzTabsNavComponent;
exports.NzTabChangeEvent = NzTabChangeEvent;
exports.NzTabSetComponent = NzTabSetComponent;
exports.NzTimelineItemComponent = NzTimelineItemComponent;
exports.NzTimelineComponent = NzTimelineComponent;
exports.NzTimelineModule = NzTimelineModule;
exports.NzTransferListComponent = NzTransferListComponent;
exports.NzTransferSearchComponent = NzTransferSearchComponent;
exports.NzTransferComponent = NzTransferComponent;
exports.NzTransferModule = NzTransferModule;
exports.NzUploadBtnComponent = NzUploadBtnComponent;
exports.NzUploadListComponent = NzUploadListComponent;
exports.NzUploadComponent = NzUploadComponent;
exports.NzUploadModule = NzUploadModule;
exports.NzTagComponent = NzTagComponent;
exports.NzTagModule = NzTagModule;
exports.NzAutocompleteModule = NzAutocompleteModule;
exports.NzAutocompleteComponent = NzAutocompleteComponent;
exports.getNzAutocompleteMissingPanelError = getNzAutocompleteMissingPanelError;
exports.NZ_AUTOCOMPLETE_VALUE_ACCESSOR = NZ_AUTOCOMPLETE_VALUE_ACCESSOR;
exports.NzAutocompleteTriggerDirective = NzAutocompleteTriggerDirective;
exports.NzOptionSelectionChange = NzOptionSelectionChange;
exports.NzAutocompleteOptionComponent = NzAutocompleteOptionComponent;
exports.NzAutocompleteOptgroupComponent = NzAutocompleteOptgroupComponent;
exports.NzMessageBaseService = NzMessageBaseService$$1;
exports.NzMessageService = NzMessageService$$1;
exports.NzMessageModule = NzMessageModule;
exports.NzMessageComponent = NzMessageComponent;
exports.NzMessageContainerComponent = NzMessageContainerComponent;
exports.NZ_MESSAGE_DEFAULT_CONFIG = NZ_MESSAGE_DEFAULT_CONFIG;
exports.NZ_MESSAGE_CONFIG = NZ_MESSAGE_CONFIG;
exports.NZ_MESSAGE_DEFAULT_CONFIG_PROVIDER = NZ_MESSAGE_DEFAULT_CONFIG_PROVIDER;
exports.NzTimePickerComponent = NzTimePickerComponent;
exports.NzTimePickerModule = NzTimePickerModule;
exports.NzToolTipComponent = NzToolTipComponent;
exports.NzTooltipDirective = NzTooltipDirective;
exports.NzToolTipModule = NzToolTipModule;
exports.NzSkeletonComponent = NzSkeletonComponent;
exports.NzSkeletonModule = NzSkeletonModule;
exports.NzSliderComponent = NzSliderComponent;
exports.NzSliderModule = NzSliderModule;
exports.NzSliderHandleComponent = NzSliderHandleComponent;
exports.NzSliderMarksComponent = NzSliderMarksComponent;
exports.NzSliderStepComponent = NzSliderStepComponent;
exports.NzSliderTrackComponent = NzSliderTrackComponent;
exports.isValueARange = isValueARange;
exports.isConfigAObject = isConfigAObject;
exports.Marks = Marks;
exports.NzPopoverComponent = NzPopoverComponent;
exports.NzPopoverDirective = NzPopoverDirective;
exports.NzPopoverModule = NzPopoverModule;
exports.NZ_NOTIFICATION_DEFAULT_CONFIG = NZ_NOTIFICATION_DEFAULT_CONFIG;
exports.NZ_NOTIFICATION_CONFIG = NZ_NOTIFICATION_CONFIG;
exports.NZ_NOTIFICATION_DEFAULT_CONFIG_PROVIDER = NZ_NOTIFICATION_DEFAULT_CONFIG_PROVIDER;
exports.NzNotificationComponent = NzNotificationComponent;
exports.NzNotificationModule = NzNotificationModule;
exports.NzNotificationService = NzNotificationService$$1;
exports.NzNotificationContainerComponent = NzNotificationContainerComponent;
exports.NzPopconfirmComponent = NzPopconfirmComponent;
exports.NzPopconfirmDirective = NzPopconfirmDirective;
exports.NzPopconfirmModule = NzPopconfirmModule;
exports.NzModalComponent = NzModalComponent;
exports.NzModalRef = NzModalRef;
exports.NzModalModule = NzModalModule;
exports.NzModalService = NzModalService;
exports.NZ_MODAL_CONFIG = NZ_MODAL_CONFIG;
exports.NzCascaderModule = NzCascaderModule;
exports.NzCascaderComponent = NzCascaderComponent;
exports.NzTreeModule = NzTreeModule;
exports.NzTreeServiceFactory = NzTreeServiceFactory;
exports.NzTreeComponent = NzTreeComponent;
exports.NzTreeNodeComponent = NzTreeNodeComponent;
exports.NzTreeNode = NzTreeNode;
exports.NzTreeBaseService = NzTreeBaseService;
exports.isCheckDisabled = isCheckDisabled;
exports.isInArray = isInArray;
exports.NzTreeSelectComponent = NzTreeSelectComponent;
exports.NzTreeSelectModule = NzTreeSelectModule;
exports.VERSION = VERSION;
exports.NzWaveRenderer = NzWaveRenderer;
exports.NZ_WAVE_GLOBAL_CONFIG_FACTORY = NZ_WAVE_GLOBAL_CONFIG_FACTORY;
exports.NZ_WAVE_GLOBAL_DEFAULT_CONFIG = NZ_WAVE_GLOBAL_DEFAULT_CONFIG;
exports.NZ_WAVE_GLOBAL_CONFIG = NZ_WAVE_GLOBAL_CONFIG;
exports.NzWaveDirective = NzWaveDirective;
exports.NzWaveModule = NzWaveModule;
exports.isNotNil = isNotNil;
exports.shallowEqual = shallowEqual;
exports.isInteger = isInteger;
exports.isEmpty = isEmpty;
exports.filterNotEmptyNode = filterNotEmptyNode;
exports.isNonEmptyString = isNonEmptyString;
exports.isTemplateRef = isTemplateRef;
exports.isComponent = isComponent;
exports.toBoolean = toBoolean;
exports.toNumber = toNumber;
exports.toCssPixel = toCssPixel;
exports.valueFunctionProp = valueFunctionProp;
exports.InputBoolean = InputBoolean;
exports.InputCssPixel = InputCssPixel;
exports.InputNumber = InputNumber;
exports.getRegExp = getRegExp;
exports.getMentions = getMentions;
exports.padStart = padStart;
exports.padEnd = padEnd;
exports.getRepeatedElement = getRepeatedElement;
exports.getCaretCoordinates = getCaretCoordinates;
exports.createDebugEle = createDebugEle;
exports.properties = properties;
exports.throttleByAnimationFrameDecorator = throttleByAnimationFrameDecorator;
exports.timeUnits = timeUnits;
exports.NzNoAnimationModule = NzNoAnimationModule;
exports.NzNoAnimationDirective = NzNoAnimationDirective;
exports.ɵea = NzAffixComponent;
exports.ɵdz = NzAffixModule;
exports.ɵfv = NzAlertComponent;
exports.ɵfu = NzAlertModule;
exports.ɵdy = NzAnchorLinkComponent;
exports.ɵdu = NzAnchorComponent;
exports.ɵdt = NzAnchorModule;
exports.ɵjx = NzAutocompleteOptgroupComponent;
exports.ɵju = NzAutocompleteOptionComponent;
exports.ɵjv = NZ_AUTOCOMPLETE_VALUE_ACCESSOR;
exports.ɵjw = NzAutocompleteTriggerDirective;
exports.ɵjt = NzAutocompleteComponent;
exports.ɵjs = NzAutocompleteModule;
exports.ɵgp = NzAvatarComponent;
exports.ɵgo = NzAvatarModule;
exports.ɵlj = NzBackTopComponent;
exports.ɵli = NzBackTopModule;
exports.ɵft = NzBadgeComponent;
exports.ɵfs = NzBadgeModule;
exports.ɵeq = NzBreadCrumbItemComponent;
exports.ɵep = NzBreadCrumbComponent;
exports.ɵeo = NzBreadCrumbModule;
exports.ɵp = NzButtonGroupComponent;
exports.ɵb = NzButtonComponent;
exports.ɵa = NzButtonModule;
exports.ɵbe = NzDateCellDirective;
exports.ɵbg = NzDateFullCellDirective;
exports.ɵbf = NzMonthCellDirective;
exports.ɵbh = NzMonthFullCellDirective;
exports.ɵt = NzCalendarHeaderComponent;
exports.ɵbd = NzCalendarComponent;
exports.ɵs = NzCalendarModule;
exports.ɵgl = NzCardGridDirective;
exports.ɵgn = NzCardLoadingComponent;
exports.ɵgm = NzCardMetaComponent;
exports.ɵgk = NzCardTabComponent;
exports.ɵgj = NzCardComponent;
exports.ɵgi = NzCardModule;
exports.ɵgz = NzCarouselContentDirective;
exports.ɵgy = NzCarouselComponent;
exports.ɵgx = NzCarouselModule;
exports.ɵlm = NzCascaderOptionComponent;
exports.ɵll = NzCascaderComponent;
exports.ɵlk = NzCascaderModule;
exports.ɵfd = NzCheckboxGroupComponent;
exports.ɵfc = NzCheckboxWrapperComponent;
exports.ɵfb = NzCheckboxComponent;
exports.ɵfa = NzCheckboxModule;
exports.ɵhb = NzCollapsePanelComponent;
exports.ɵhc = NzCollapseComponent;
exports.ɵha = NzCollapseModule;
exports.ɵhi = NzCommentActionComponent;
exports.ɵhh = NzCommentActionHostDirective;
exports.ɵhf = NzCommentAvatarDirective;
exports.ɵhg = NzCommentContentDirective;
exports.ɵhe = NzCommentComponent;
exports.ɵhd = NzCommentModule;
exports.ɵbu = NzAddOnModule;
exports.ɵbw = NzClassListAddDirective;
exports.ɵbv = NzStringTemplateOutletDirective;
exports.ɵco = AnimationCurves;
exports.ɵcn = AnimationDuration;
exports.ɵdl = collapseMotion;
exports.ɵka = fadeMotion;
exports.ɵjf = helpMotion;
exports.ɵki = moveUpMotion;
exports.ɵkn = notificationMotion;
exports.ɵcm = slideAlertMotion;
exports.ɵcl = slideMotion;
exports.ɵcs = zoomBadgeMotion;
exports.ɵcr = zoomBigMotion;
exports.ɵcq = zoomMotion;
exports.ɵcf = NzNoAnimationDirective;
exports.ɵce = NzNoAnimationModule;
exports.ɵcd = NzConnectedOverlayDirective;
exports.ɵcc = NzOverlayModule;
exports.ɵdv = NzScrollService;
exports.ɵdx = SCROLL_SERVICE_PROVIDER;
exports.ɵdw = SCROLL_SERVICE_PROVIDER_FACTORY;
exports.ɵhn = NzMeasureScrollbarService;
exports.ɵc = NzUpdateHostClassService;
exports.ɵe = InputBoolean;
exports.ɵi = InputBoolean;
exports.ɵj = InputNumber;
exports.ɵbj = LoggerModule;
exports.ɵbn = LOGGER_SERVICE_PROVIDER;
exports.ɵbm = LOGGER_SERVICE_PROVIDER_FACTORY;
exports.ɵbl = LoggerService;
exports.ɵbk = NZ_LOGGER_STATE;
exports.ɵeb = throttleByAnimationFrameDecorator;
exports.ɵm = NZ_WAVE_GLOBAL_CONFIG;
exports.ɵn = NZ_WAVE_GLOBAL_CONFIG_FACTORY;
exports.ɵl = NZ_WAVE_GLOBAL_DEFAULT_CONFIG;
exports.ɵo = NzWaveDirective;
exports.ɵq = NzWaveModule;
exports.ɵin = AbstractPickerComponent;
exports.ɵil = NzDatePickerComponent;
exports.ɵhs = NzDatePickerModule;
exports.ɵim = DateRangePickerComponent;
exports.ɵir = HeaderPickerComponent;
exports.ɵia = CalendarFooterComponent;
exports.ɵhy = CalendarHeaderComponent;
exports.ɵhz = CalendarInputComponent;
exports.ɵib = OkButtonComponent;
exports.ɵic = TimePickerButtonComponent;
exports.ɵid = TodayButtonComponent;
exports.ɵie = DateTableComponent;
exports.ɵii = DecadePanelComponent;
exports.ɵht = LibPackerModule;
exports.ɵig = MonthPanelComponent;
exports.ɵih = MonthTableComponent;
exports.ɵik = DateRangePopupComponent;
exports.ɵij = InnerPopupComponent;
exports.ɵif = YearPanelComponent;
exports.ɵiq = NzMonthPickerComponent;
exports.ɵio = NzPickerComponent;
exports.ɵip = NzRangePickerComponent;
exports.ɵit = NzWeekPickerComponent;
exports.ɵis = NzYearPickerComponent;
exports.ɵiv = NzDividerComponent;
exports.ɵiu = NzDividerModule;
exports.ɵiy = NzDrawerRef;
exports.ɵix = NzDrawerComponent;
exports.ɵiw = NzDrawerModule;
exports.ɵiz = NzDrawerService$$1;
exports.ɵeh = NzDropDownADirective;
exports.ɵeg = NzDropDownButtonComponent;
exports.ɵed = NzDropdownContextComponent;
exports.ɵee = NzDropDownComponent;
exports.ɵef = NzDropDownDirective;
exports.ɵec = NzDropDownModule;
exports.ɵdh = NzMenuDropdownService;
exports.ɵbz = NzEmbedEmptyComponent;
exports.ɵcb = NZ_DEFAULT_EMPTY_CONTENT;
exports.ɵby = NzEmptyComponent;
exports.ɵbx = NzEmptyModule;
exports.ɵca = NzEmptyService$$1;
exports.ɵjh = NzFormControlComponent;
exports.ɵje = NzFormExplainComponent;
exports.ɵjb = NzFormExtraComponent;
exports.ɵjd = NzFormItemComponent;
exports.ɵjc = NzFormLabelComponent;
exports.ɵjj = NzFormSplitComponent;
exports.ɵji = NzFormTextComponent;
exports.ɵjg = NzFormDirective;
exports.ɵja = NzFormModule;
exports.ɵcy = NzColDirective;
exports.ɵcx = NzGridModule;
exports.ɵcz = NzRowDirective;
exports.ɵbb = NZ_DATE_CONFIG;
exports.ɵz = DATE_HELPER_SERVICE_FACTORY;
exports.ɵba = DateHelperService$$1;
exports.ɵbi = NzI18nModule;
exports.ɵbo = NzI18nPipe;
exports.ɵu = NzI18nService$$1;
exports.ɵw = NZ_DATE_LOCALE;
exports.ɵv = NZ_I18N;
exports.ɵd = NzIconDirective;
exports.ɵr = NzIconModule;
exports.ɵf = NZ_ICONS$$1;
exports.ɵg = NZ_ICON_DEFAULT_TWOTONE_COLOR$$1;
exports.ɵh = NzIconService$$1;
exports.ɵff = NzInputNumberComponent;
exports.ɵfe = NzInputNumberModule;
exports.ɵez = NzAutoResizeDirective;
exports.ɵey = NzInputGroupComponent;
exports.ɵex = NzInputDirective;
exports.ɵew = NzInputModule;
exports.ɵel = NzContentComponent;
exports.ɵem = NzFooterComponent;
exports.ɵek = NzHeaderComponent;
exports.ɵej = NzLayoutComponent;
exports.ɵei = NzLayoutModule;
exports.ɵen = NzSiderComponent;
exports.ɵjn = NzListItemMetaComponent;
exports.ɵjm = NzListItemComponent;
exports.ɵjl = NzListComponent;
exports.ɵjk = NzListModule;
exports.ɵds = NzMentionSuggestionDirective;
exports.ɵdq = NZ_MENTION_TRIGGER_ACCESSOR;
exports.ɵdr = NzMentionTriggerDirective;
exports.ɵdp = NzMentionComponent;
exports.ɵdo = NzMentionModule;
exports.ɵdm = NzMenuDividerDirective;
exports.ɵdn = NzMenuGroupComponent;
exports.ɵdi = NzMenuItemDirective;
exports.ɵdf = NzMenuMenuService;
exports.ɵde = NzMenuDirective;
exports.ɵdd = NzMenuFactory;
exports.ɵdc = NzMenuModule;
exports.ɵdg = NzMenuService;
exports.ɵdk = NzSubMenuComponent;
exports.ɵdj = NzSubmenuService;
exports.ɵkf = NZ_MESSAGE_CONFIG;
exports.ɵke = NZ_MESSAGE_DEFAULT_CONFIG;
exports.ɵkg = NZ_MESSAGE_DEFAULT_CONFIG_PROVIDER;
exports.ɵkc = NzMessageContainerComponent;
exports.ɵkh = NzMessageComponent;
exports.ɵkb = NzMessageModule;
exports.ɵkj = NzMessageBaseService$$1;
exports.ɵkk = NzMessageService$$1;
exports.ɵlg = CssUnitPipe;
exports.ɵld = NZ_MODAL_CONFIG;
exports.ɵlf = NzModalControlService;
exports.ɵlc = NzModalRef;
exports.ɵlb = NzModalComponent;
exports.ɵla = NzModalModule;
exports.ɵlh = NzModalService;
exports.ɵkr = NZ_NOTIFICATION_CONFIG;
exports.ɵkq = NZ_NOTIFICATION_DEFAULT_CONFIG;
exports.ɵks = NZ_NOTIFICATION_DEFAULT_CONFIG_PROVIDER;
exports.ɵko = NzNotificationContainerComponent;
exports.ɵkm = NzNotificationComponent;
exports.ɵkl = NzNotificationModule;
exports.ɵkt = NzNotificationService$$1;
exports.ɵes = NzPaginationComponent;
exports.ɵer = NzPaginationModule;
exports.ɵky = NzPopconfirmComponent;
exports.ɵkz = NzPopconfirmDirective;
exports.ɵkx = NzPopconfirmModule;
exports.ɵkv = NzPopoverComponent;
exports.ɵkw = NzPopoverDirective;
exports.ɵku = NzPopoverModule;
exports.ɵfz = NzProgressComponent;
exports.ɵfy = NzProgressModule;
exports.ɵbr = NzRadioButtonComponent;
exports.ɵbs = NzRadioGroupComponent;
exports.ɵbq = NzRadioComponent;
exports.ɵbp = NzRadioModule;
exports.ɵfr = NzRateItemComponent;
exports.ɵfq = NzRateComponent;
exports.ɵfp = NzRateModule;
exports.ɵcu = NzOptionContainerComponent;
exports.ɵct = NzOptionGroupComponent;
exports.ɵcv = NzOptionLiComponent;
exports.ɵci = NzOptionComponent;
exports.ɵch = NzFilterGroupOptionPipe;
exports.ɵcg = NzFilterOptionPipe;
exports.ɵcp = NzSelectTopControlComponent;
exports.ɵcw = NzSelectUnselectableDirective;
exports.ɵcj = NzSelectComponent;
exports.ɵbt = NzSelectModule;
exports.ɵck = NzSelectService;
exports.ɵlx = NzSkeletonComponent;
exports.ɵlw = NzSkeletonModule;
exports.ɵfj = NzSliderHandleComponent;
exports.ɵfm = NzSliderMarksComponent;
exports.ɵfl = NzSliderStepComponent;
exports.ɵfi = NzSliderTrackComponent;
exports.ɵfh = NzSliderComponent;
exports.ɵfg = NzSliderModule;
exports.ɵfx = NzSpinComponent;
exports.ɵfw = NzSpinModule;
exports.ɵma = NzCountdownComponent;
exports.ɵmb = NzStatisticNumberComponent;
exports.ɵlz = NzStatisticComponent;
exports.ɵly = NzStatisticModule;
exports.ɵmc = NzTimeRangePipe;
exports.ɵev = NzStepComponent;
exports.ɵeu = NzStepsComponent;
exports.ɵet = NzStepsModule;
exports.ɵdb = NzSwitchComponent;
exports.ɵda = NzSwitchModule;
exports.ɵhk = NzTableComponent;
exports.ɵhj = NzTableModule;
exports.ɵhq = NzTbodyDirective;
exports.ɵho = NzTdComponent;
exports.ɵhl = NzThComponent;
exports.ɵhp = NzTheadComponent;
exports.ɵhr = NzTrDirective;
exports.ɵhm = NzVirtualScrollDirective;
exports.ɵgh = NzTabBodyComponent;
exports.ɵgf = NzTabLabelDirective;
exports.ɵgb = NzTabComponent;
exports.ɵgc = NzTabDirective;
exports.ɵgg = NzTabsInkBarDirective;
exports.ɵge = NzTabsNavComponent;
exports.ɵga = NzTabsModule;
exports.ɵgd = NzTabSetComponent;
exports.ɵjz = NzTagComponent;
exports.ɵjy = NzTagModule;
exports.ɵhw = NzTimePickerPanelComponent;
exports.ɵhv = NzTimePickerComponent;
exports.ɵhu = NzTimePickerModule;
exports.ɵhx = NzTimeValueAccessorDirective;
exports.ɵgr = NzTimelineItemComponent;
exports.ɵgs = NzTimelineComponent;
exports.ɵgq = NzTimelineModule;
exports.ɵfk = NzToolTipComponent;
exports.ɵfo = NzTooltipDirective;
exports.ɵfn = NzToolTipModule;
exports.ɵgv = NzTransferListComponent;
exports.ɵgw = NzTransferSearchComponent;
exports.ɵgu = NzTransferComponent;
exports.ɵgt = NzTransferModule;
exports.ɵlv = NzTreeSelectComponent;
exports.ɵlu = NzTreeSelectModule;
exports.ɵls = NzTreeSelectService;
exports.ɵlr = NzTreeBaseService;
exports.ɵlt = NzTreeNodeComponent;
exports.ɵlp = NzTreeComponent;
exports.ɵlo = NzTreeServiceFactory;
exports.ɵln = NzTreeModule;
exports.ɵlq = NzTreeService;
exports.ɵjq = NzUploadBtnComponent;
exports.ɵjr = NzUploadListComponent;
exports.ɵjp = NzUploadComponent;
exports.ɵjo = NzUploadModule;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ng-zorro-antd.umd.js.map