UNPKG

1.92 kBTypeScriptView Raw
1import { EventEmitter, OnInit, OnDestroy, Renderer, ElementRef, TemplateRef, ViewContainerRef } from '@angular/core';
2import { PopoverConfig } from './popover.config';
3import { ComponentLoaderFactory } from '../component-loader';
4/**
5 * A lightweight, extensible directive for fancy popover creation.
6 */
7export declare class PopoverDirective implements OnInit, OnDestroy {
8 /**
9 * Content to be displayed as popover.
10 */
11 popover: string | TemplateRef<any>;
12 /**
13 * Title of a popover.
14 */
15 popoverTitle: string;
16 /**
17 * Placement of a popover. Accepts: "top", "bottom", "left", "right"
18 */
19 placement: 'top' | 'bottom' | 'left' | 'right';
20 /**
21 * Specifies events that should trigger. Supports a space separated list of
22 * event names.
23 */
24 triggers: string;
25 /**
26 * A selector specifying the element the popover should be appended to.
27 * Currently only supports "body".
28 */
29 container: string;
30 /**
31 * Returns whether or not the popover is currently being shown
32 */
33 isOpen: boolean;
34 /**
35 * Emits an event when the popover is shown
36 */
37 onShown: EventEmitter<any>;
38 /**
39 * Emits an event when the popover is hidden
40 */
41 onHidden: EventEmitter<any>;
42 private _popover;
43 constructor(_elementRef: ElementRef, _renderer: Renderer, _viewContainerRef: ViewContainerRef, _config: PopoverConfig, cis: ComponentLoaderFactory);
44 /**
45 * Opens an element’s popover. This is considered a “manual” triggering of
46 * the popover.
47 */
48 show(): void;
49 /**
50 * Closes an element’s popover. This is considered a “manual” triggering of
51 * the popover.
52 */
53 hide(): void;
54 /**
55 * Toggles an element’s popover. This is considered a “manual” triggering of
56 * the popover.
57 */
58 toggle(): void;
59 ngOnInit(): any;
60 ngOnDestroy(): any;
61}