UNPKG

3.53 kBTypeScriptView Raw
1import { ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core';
2import { PopoverConfig } from './popover.config';
3import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
4import { PositioningService, AvailbleBSPositions } from 'ngx-bootstrap/positioning';
5/**
6 * A lightweight, extensible directive for fancy popover creation.
7 */
8import * as ɵngcc0 from '@angular/core';
9export declare class PopoverDirective implements OnInit, OnDestroy {
10 private _elementRef;
11 private _renderer;
12 private _positionService;
13 /** unique id popover - use for aria-describedby */
14 popoverId: number;
15 /** sets disable adaptive position */
16 adaptivePosition: boolean;
17 /**
18 * Content to be displayed as popover.
19 */
20 popover?: string | TemplateRef<any>;
21 /**
22 * Context to be used if popover is a template.
23 */
24 popoverContext: any;
25 /**
26 * Title of a popover.
27 */
28 popoverTitle?: string;
29 /**
30 * Placement of a popover. Accepts: "top", "bottom", "left", "right"
31 */
32 placement: AvailbleBSPositions;
33 /**
34 * Close popover on outside click
35 */
36 outsideClick: boolean;
37 /**
38 * Specifies events that should trigger. Supports a space separated list of
39 * event names.
40 */
41 triggers: string;
42 /**
43 * A selector specifying the element the popover should be appended to.
44 */
45 container?: string;
46 /**
47 * Css class for popover container
48 */
49 containerClass: string;
50 /**
51 * Returns whether or not the popover is currently being shown
52 */
53 get isOpen(): boolean;
54 set isOpen(value: boolean);
55 /**
56 * Delay before showing the tooltip
57 */
58 delay: number;
59 /**
60 * Emits an event when the popover is shown
61 */
62 onShown: EventEmitter<unknown>;
63 /**
64 * Emits an event when the popover is hidden
65 */
66 onHidden: EventEmitter<unknown>;
67 protected _popoverCancelShowFn?: () => void;
68 protected _delayTimeoutId?: number;
69 private _popover;
70 private _isInited;
71 private _ariaDescribedby?;
72 constructor(_config: PopoverConfig, _elementRef: ElementRef, _renderer: Renderer2, _viewContainerRef: ViewContainerRef, cis: ComponentLoaderFactory, _positionService: PositioningService);
73 /**
74 * Set attribute aria-describedBy for element directive and
75 * set id for the popover
76 */
77 setAriaDescribedBy(): void;
78 /**
79 * Opens an element’s popover. This is considered a “manual” triggering of
80 * the popover.
81 */
82 show(): void;
83 /**
84 * Closes an element’s popover. This is considered a “manual” triggering of
85 * the popover.
86 */
87 hide(): void;
88 /**
89 * Toggles an element’s popover. This is considered a “manual” triggering of
90 * the popover.
91 */
92 toggle(): void;
93 ngOnInit(): void;
94 ngOnDestroy(): void;
95 static ɵfac: ɵngcc0.ɵɵFactoryDef<PopoverDirective, never>;
96 static ɵdir: ɵngcc0.ɵɵDirectiveDefWithMeta<PopoverDirective, "[popover]", ["bs-popover"], { "adaptivePosition": "adaptivePosition"; "placement": "placement"; "outsideClick": "outsideClick"; "triggers": "triggers"; "containerClass": "containerClass"; "delay": "delay"; "isOpen": "isOpen"; "popover": "popover"; "popoverContext": "popoverContext"; "popoverTitle": "popoverTitle"; "container": "container"; }, { "onShown": "onShown"; "onHidden": "onHidden"; }, never>;
97}
98
99//# sourceMappingURL=popover.directive.d.ts.map
\No newline at end of file