UNPKG

4.13 kBTypeScriptView Raw
1import { ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, ViewContainerRef } from '@angular/core';
2import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
3import { BsDropdownConfig } from './bs-dropdown.config';
4import { BsDropdownState } from './bs-dropdown.state';
5import { AnimationBuilder } from '@angular/animations';
6import * as ɵngcc0 from '@angular/core';
7export declare class BsDropdownDirective implements OnInit, OnDestroy {
8 private _elementRef;
9 private _renderer;
10 private _viewContainerRef;
11 private _cis;
12 private _state;
13 private _config;
14 /**
15 * Placement of a popover. Accepts: "top", "bottom", "left", "right"
16 */
17 placement?: string;
18 /**
19 * Specifies events that should trigger. Supports a space separated list of
20 * event names.
21 */
22 triggers?: string;
23 /**
24 * A selector specifying the element the popover should be appended to.
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 set autoClose(value: boolean);
36 get autoClose(): boolean;
37 /**
38 * Indicates that dropdown will be animated
39 */
40 set isAnimated(value: boolean);
41 get isAnimated(): boolean;
42 /**
43 * This attribute indicates that the dropdown shouldn't close on inside click when autoClose is set to true
44 */
45 set insideClick(value: boolean);
46 get insideClick(): boolean;
47 /**
48 * Disables dropdown toggle and hides dropdown menu if opened
49 */
50 set isDisabled(value: boolean);
51 get isDisabled(): boolean;
52 /**
53 * Returns whether or not the popover is currently being shown
54 */
55 get isOpen(): boolean;
56 set isOpen(value: boolean);
57 /**
58 * Emits an event when isOpen change
59 */
60 isOpenChange: EventEmitter<boolean>;
61 /**
62 * Emits an event when the popover is shown
63 */
64 onShown: EventEmitter<boolean>;
65 /**
66 * Emits an event when the popover is hidden
67 */
68 onHidden: EventEmitter<boolean>;
69 get isBs4(): boolean;
70 private _dropdown;
71 private get _showInline();
72 private _isInlineOpen;
73 private _inlinedMenu?;
74 private _isDisabled;
75 private _subscriptions;
76 private _isInited;
77 private _factoryDropDownAnimation;
78 constructor(_elementRef: ElementRef, _renderer: Renderer2, _viewContainerRef: ViewContainerRef, _cis: ComponentLoaderFactory, _state: BsDropdownState, _config: BsDropdownConfig, _builder: AnimationBuilder);
79 ngOnInit(): void;
80 /**
81 * Opens an element’s popover. This is considered a “manual” triggering of
82 * the popover.
83 */
84 show(): void;
85 /**
86 * Closes an element’s popover. This is considered a “manual” triggering of
87 * the popover.
88 */
89 hide(): void;
90 /**
91 * Toggles an element’s popover. This is considered a “manual” triggering of
92 * the popover. With parameter <code>true</code> allows toggling, with parameter <code>false</code>
93 * only hides opened dropdown. Parameter usage will be removed in ngx-bootstrap v3
94 */
95 toggle(value?: boolean): void;
96 /** @internal */
97 _contains(event: MouseEvent): boolean;
98 ngOnDestroy(): void;
99 private addBs4Polyfills;
100 private playAnimation;
101 private addShowClass;
102 private removeShowClass;
103 private checkRightAlignment;
104 private addDropupStyles;
105 private removeDropupStyles;
106 static ɵfac: ɵngcc0.ɵɵFactoryDef<BsDropdownDirective, never>;
107 static ɵdir: ɵngcc0.ɵɵDirectiveDefWithMeta<BsDropdownDirective, "[bsDropdown], [dropdown]", ["bs-dropdown"], { "dropup": "dropup"; "autoClose": "autoClose"; "isAnimated": "isAnimated"; "insideClick": "insideClick"; "isDisabled": "isDisabled"; "isOpen": "isOpen"; "placement": "placement"; "triggers": "triggers"; "container": "container"; }, { "onShown": "onShown"; "onHidden": "onHidden"; "isOpenChange": "isOpenChange"; }, never>;
108}
109
110//# sourceMappingURL=bs-dropdown.directive.d.ts.map
\No newline at end of file