ng-zorro-antd-yj
Version:
An enterprise-class UI components based on Ant Design and Angular
279 lines • 20.8 kB
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
import * as tslib_1 from "tslib";
import { CdkConnectedOverlay } from '@angular/cdk/overlay';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, EventEmitter, Host, Input, Optional, Output, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { zoomBigMotion } from '../core/animation/zoom';
import { NzNoAnimationDirective } from '../core/no-animation/nz-no-animation.directive';
import { getPlacementName, DEFAULT_TOOLTIP_POSITIONS, POSITION_MAP } from '../core/overlay/overlay-position';
import { isNotNil } from '../core/util/check';
import { toBoolean } from '../core/util/convert';
var NzToolTipComponent = /** @class */ (function () {
function NzToolTipComponent(cdr, noAnimation) {
this.cdr = cdr;
this.noAnimation = noAnimation;
this._hasBackdrop = false;
this._prefix = 'ant-tooltip-placement';
this._positions = tslib_1.__spread(DEFAULT_TOOLTIP_POSITIONS);
this._classMap = {};
this._placement = 'top';
this._trigger = 'hover';
this.visibleSource = new 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 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 = tslib_1.__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 = (/** @type {?} */ (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 TemplateRef ? false : this.nzTitle === '' || !isNotNil(this.nzTitle);
};
NzToolTipComponent.decorators = [
{ type: Component, args: [{
selector: 'nz-tooltip',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: 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: ChangeDetectorRef },
{ type: NzNoAnimationDirective, decorators: [{ type: Host }, { type: Optional }] }
]; };
NzToolTipComponent.propDecorators = {
overlay: [{ type: ViewChild, args: ['overlay',] }],
nzTitle: [{ type: Input }, { type: ContentChild, args: ['nzTemplate',] }],
nzOverlayClassName: [{ type: Input }],
nzOverlayStyle: [{ type: Input }],
nzMouseEnterDelay: [{ type: Input }],
nzMouseLeaveDelay: [{ type: Input }],
nzVisible: [{ type: Input }],
nzTrigger: [{ type: Input }],
nzPlacement: [{ type: Input }],
nzVisibleChange: [{ type: Output }]
};
return NzToolTipComponent;
}());
export { NzToolTipComponent };
if (false) {
/** @type {?} */
NzToolTipComponent.prototype._hasBackdrop;
/** @type {?} */
NzToolTipComponent.prototype._prefix;
/** @type {?} */
NzToolTipComponent.prototype._positions;
/** @type {?} */
NzToolTipComponent.prototype._classMap;
/** @type {?} */
NzToolTipComponent.prototype._placement;
/** @type {?} */
NzToolTipComponent.prototype._trigger;
/** @type {?} */
NzToolTipComponent.prototype.overlayOrigin;
/** @type {?} */
NzToolTipComponent.prototype.visibleSource;
/** @type {?} */
NzToolTipComponent.prototype.visible$;
/** @type {?} */
NzToolTipComponent.prototype.overlay;
/** @type {?} */
NzToolTipComponent.prototype.nzTitle;
/** @type {?} */
NzToolTipComponent.prototype.nzOverlayClassName;
/** @type {?} */
NzToolTipComponent.prototype.nzOverlayStyle;
/** @type {?} */
NzToolTipComponent.prototype.nzMouseEnterDelay;
/** @type {?} */
NzToolTipComponent.prototype.nzMouseLeaveDelay;
/** @type {?} */
NzToolTipComponent.prototype.nzVisibleChange;
/** @type {?} */
NzToolTipComponent.prototype.cdr;
/** @type {?} */
NzToolTipComponent.prototype.noAnimation;
/* Skipping unhandled member: [property: string]: any;*/
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnotdG9vbHRpcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZy16b3Jyby1hbnRkLXlqLyIsInNvdXJjZXMiOlsidG9vbHRpcC9uei10b29sdGlwLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUNBLE9BQU8sRUFDTCxtQkFBbUI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