ng2-bootstrap
Version:
Native Angular Bootstrap Components
46 lines • 1.85 kB
JavaScript
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { TooltipConfig } from './tooltip.config';
import { isBs3 } from '../utils/ng2-bootstrap-config';
export var TooltipContainerComponent = (function () {
function TooltipContainerComponent(config) {
Object.assign(this, config);
}
Object.defineProperty(TooltipContainerComponent.prototype, "isBs3", {
get: function () {
return isBs3();
},
enumerable: true,
configurable: true
});
TooltipContainerComponent.prototype.ngAfterViewInit = function () {
this.classMap = { in: false, fade: false };
this.classMap[this.placement] = true;
this.classMap['tooltip-' + this.placement] = true;
this.classMap.in = true;
if (this.animation) {
this.classMap.fade = true;
}
if (this.popupClass) {
this.classMap[this.popupClass] = true;
}
};
TooltipContainerComponent.decorators = [
{ type: Component, args: [{
selector: 'bs-tooltip-container',
changeDetection: ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line
host: {
'[class]': '"tooltip in tooltip-" + placement + " " + placement',
'[class.show]': '!isBs3',
role: 'tooltip'
},
template: "\n <div class=\"tooltip-arrow\"></div>\n <div class=\"tooltip-inner\"><ng-content></ng-content></div>\n "
},] },
];
/** @nocollapse */
TooltipContainerComponent.ctorParameters = function () { return [
{ type: TooltipConfig, },
]; };
return TooltipContainerComponent;
}());
//# sourceMappingURL=tooltip-container.component.js.map