UNPKG

2.44 kBTypeScriptView Raw
1import { ElementRef, EventEmitter, OnDestroy, OnInit, Renderer, ViewContainerRef } from '@angular/core';
2import 'rxjs/add/operator/filter';
3import { ComponentLoaderFactory } from '../component-loader';
4import { BsDropdownConfig } from './bs-dropdown.config';
5import { BsDropdownState } from './bs-dropdown.state';
6export declare class BsDropdownDirective implements OnInit, OnDestroy {
7 private _elementRef;
8 private _renderer;
9 private _viewContainerRef;
10 private _cis;
11 private _config;
12 private _state;
13 /**
14 * Placement of a popover. Accepts: "top", "bottom", "left", "right"
15 */
16 placement: string;
17 /**
18 * Specifies events that should trigger. Supports a space separated list of
19 * event names.
20 */
21 triggers: string;
22 /**
23 * A selector specifying the element the popover should be appended to.
24 * Currently only supports "body".
25 */
26 container: string;
27 /**
28 * This attribute indicates that the dropdown should be opened upwards
29 */
30 dropup: boolean;
31 /**
32 * Indicates that dropdown will be closed on item or document click,
33 * and after pressing ESC
34 */
35 autoClose: boolean;
36 /**
37 * Disables dropdown toggle and hides dropdown menu if opened
38 */
39 isDisabled: boolean;
40 /**
41 * Returns whether or not the popover is currently being shown
42 */
43 isOpen: boolean;
44 /**
45 * Emits an event when the popover is shown
46 */
47 onShown: EventEmitter<any>;
48 /**
49 * Emits an event when the popover is hidden
50 */
51 onHidden: EventEmitter<any>;
52 readonly isBs4: boolean;
53 private _isInlineOpen;
54 private _showInline;
55 private _inlinedMenu;
56 private _isDisabled;
57 private _dropdown;
58 private _subscriptions;
59 constructor(_elementRef: ElementRef, _renderer: Renderer, _viewContainerRef: ViewContainerRef, _cis: ComponentLoaderFactory, _config: BsDropdownConfig, _state: BsDropdownState);
60 ngOnInit(): void;
61 /**
62 * Opens an element’s popover. This is considered a “manual” triggering of
63 * the popover.
64 */
65 show(): void;
66 /**
67 * Closes an element’s popover. This is considered a “manual” triggering of
68 * the popover.
69 */
70 hide(): void;
71 /**
72 * Toggles an element’s popover. This is considered a “manual” triggering of
73 * the popover.
74 */
75 toggle(value?: boolean): void;
76 ngOnDestroy(): void;
77}