1 | import { ChangeDetectionStrategy, Component } from '@angular/core';
|
2 | import { BsDropdownState } from './bs-dropdown.state';
|
3 | export var BsDropdownContainerComponent = (function () {
|
4 | function BsDropdownContainerComponent(_state) {
|
5 | var _this = this;
|
6 | this._state = _state;
|
7 | this.isOpen = false;
|
8 | this._subscription = _state.isOpenChange.subscribe(function (value) {
|
9 | _this.isOpen = value;
|
10 | });
|
11 | }
|
12 | Object.defineProperty(BsDropdownContainerComponent.prototype, "direction", {
|
13 | get: function () {
|
14 | return this._state.direction;
|
15 | },
|
16 | enumerable: true,
|
17 | configurable: true
|
18 | });
|
19 | BsDropdownContainerComponent.prototype.ngOnDestroy = function () {
|
20 | this._subscription.unsubscribe();
|
21 | };
|
22 | BsDropdownContainerComponent.decorators = [
|
23 | { type: Component, args: [{
|
24 | selector: 'bs-dropdown-container',
|
25 | changeDetection: ChangeDetectionStrategy.OnPush,
|
26 | host: {
|
27 | style: 'display:block;position: absolute;'
|
28 | },
|
29 | template: "\n <div [class.dropup]=\"direction === 'up'\"\n [class.dropdown]=\"direction === 'down'\"\n [class.show]=\"isOpen\"\n [class.open]=\"isOpen\"><ng-content></ng-content></div>\n "
|
30 | },] },
|
31 | ];
|
32 |
|
33 | BsDropdownContainerComponent.ctorParameters = function () { return [
|
34 | { type: BsDropdownState, },
|
35 | ]; };
|
36 | return BsDropdownContainerComponent;
|
37 | }());
|
38 |
|
\ | No newline at end of file |