UNPKG

ngx-bootstrap

Version:
50 lines 2.33 kB
import { Component, ChangeDetectionStrategy } from '@angular/core'; import { TooltipConfig } from './tooltip.config'; import { isBs3 } from '../utils/theme-provider'; var TooltipContainerComponent = /** @class */ (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.containerClass) { this.classMap[this.containerClass] = true; } }; TooltipContainerComponent.decorators = [ { type: Component, args: [{ selector: 'bs-tooltip-container', changeDetection: ChangeDetectionStrategy.OnPush, // tslint:disable-next-line host: { '[class]': '"tooltip in tooltip-" + placement + " " + "bs-tooltip-" + placement + " " + placement + " " + containerClass', '[class.show]': '!isBs3', role: 'tooltip' }, styles: [ "\n :host.tooltip {\n display: block;\n }\n :host.bs-tooltip-top .arrow, :host.bs-tooltip-bottom .arrow {\n left: 50%;\n margin-left: -6px;\n }\n :host.bs-tooltip-left .arrow, :host.bs-tooltip-right .arrow {\n top: 50%;\n margin-top: -6px;\n }\n " ], template: "\n <div class=\"tooltip-arrow arrow\"></div>\n <div class=\"tooltip-inner\"><ng-content></ng-content></div>\n " },] }, ]; /** @nocollapse */ TooltipContainerComponent.ctorParameters = function () { return [ { type: TooltipConfig, }, ]; }; return TooltipContainerComponent; }()); export { TooltipContainerComponent }; //# sourceMappingURL=tooltip-container.component.js.map