UNPKG

1.85 kBJavaScriptView Raw
1import { Component, ChangeDetectionStrategy } from '@angular/core';
2import { TooltipConfig } from './tooltip.config';
3import { isBs3 } from '../utils/ng2-bootstrap-config';
4export var TooltipContainerComponent = (function () {
5 function TooltipContainerComponent(config) {
6 Object.assign(this, config);
7 }
8 Object.defineProperty(TooltipContainerComponent.prototype, "isBs3", {
9 get: function () {
10 return isBs3();
11 },
12 enumerable: true,
13 configurable: true
14 });
15 TooltipContainerComponent.prototype.ngAfterViewInit = function () {
16 this.classMap = { in: false, fade: false };
17 this.classMap[this.placement] = true;
18 this.classMap['tooltip-' + this.placement] = true;
19 this.classMap.in = true;
20 if (this.animation) {
21 this.classMap.fade = true;
22 }
23 if (this.popupClass) {
24 this.classMap[this.popupClass] = true;
25 }
26 };
27 TooltipContainerComponent.decorators = [
28 { type: Component, args: [{
29 selector: 'bs-tooltip-container',
30 changeDetection: ChangeDetectionStrategy.OnPush,
31 // tslint:disable-next-line
32 host: {
33 '[class]': '"tooltip in tooltip-" + placement + " " + placement',
34 '[class.show]': '!isBs3',
35 role: 'tooltip'
36 },
37 template: "\n <div class=\"tooltip-arrow\"></div>\n <div class=\"tooltip-inner\"><ng-content></ng-content></div>\n "
38 },] },
39 ];
40 /** @nocollapse */
41 TooltipContainerComponent.ctorParameters = function () { return [
42 { type: TooltipConfig, },
43 ]; };
44 return TooltipContainerComponent;
45}());
46//# sourceMappingURL=tooltip-container.component.js.map
\No newline at end of file