import { ChangeDetectorRef, ComponentFactoryResolver, DoCheck, ElementRef, EventEmitter, Injector, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, TemplateRef, ViewContainerRef } from '@angular/core'; import { FocusTrapFactory } from 'vdl-angular/core'; import { VdlPopoverConfig } from './popover-config'; import { Placement } from './positioning'; export { VdlPopoverConfig } from './popover-config'; /** * This can be used to pass in your own content/html to the header of a popover instead of it just having a title or * secondary title */ export declare class VdlPopoverHeader { } /** * Content of a popover */ export declare class VdlPopoverContent { } /** * Footer of a popover */ export declare class VdlPopoverFooter { } /** @docs-private */ export declare class VdlPopoverWindow implements DoCheck, OnInit, OnDestroy { private ref; private _focusTrapFactory; private _elementRef; placement: Placement; title: string; secondaryTitle: string; hasTabbableChild: boolean; private _focusTrap; constructor(ref: ChangeDetectorRef, _focusTrapFactory: FocusTrapFactory, _elementRef: ElementRef); ngDoCheck(): void; ngOnInit(): void; ngOnDestroy(): void; /** * Moves the focus inside the focus trap. */ private _trapFocus(); onClick(event: any): void; } /** * A lightweight, extensible directive for fancy popover creation. */ export declare class VdlPopover implements OnInit, OnDestroy, OnChanges { private _elementRef; private _renderer; inputRef: any; /** * A selector specifying the element the popover should be appended to. * Currently only supports `'body'`. */ container: string; /** * Placement of a popover. Accepts: `'auto'`, `'top'`, `'bottom'`, `'left'`, `'right'`, `'bottom-left'`, `'bottom-right'` */ placement: Placement; /** * Height of popover. */ popoverHeight: number; /** * Secondary title of popover that is at the right edge */ popoverSecondaryTitle: string; /** * Title of a popover. */ popoverTitle: string; /** * Width of popover. */ popoverWidth: number; /** * Specifies events that should trigger. Supports a space separated list of event names. */ triggers: string; /** * Content to be displayed as popover. */ vdlPopover: string | TemplateRef; /** * Emits an event when the popover is hidden */ hidden: EventEmitter<{}>; /** * Emits an event when the popover is shown */ shown: EventEmitter<{}>; private _popupService; private _windowRef; private _unregisterListenersFn; private _zoneSubscription; private _globalClickListenFn; private _globalEscapeListenFn; /** Element that was focused before the popover was opened. Save this to restore upon close. */ private _elementFocusedBeforePopoverWasOpened; /** * Set to `true` after the popover opens; used to cancel the document click * handler so it doesn't immediately close the popover. */ private _triggered; private _document; constructor(_document: any, _elementRef: ElementRef, _renderer: Renderer2, injector: Injector, componentFactoryResolver: ComponentFactoryResolver, viewContainerRef: ViewContainerRef, config: VdlPopoverConfig, ngZone: NgZone); ngOnChanges(): void; ngOnDestroy(): void; ngOnInit(): void; _handleClickOutsidePopover(e: Event): boolean; _handleEscape(event: KeyboardEvent): void; /** * Opens an element’s popover. This is considered a manual triggering of the popover. * @param context Used to apply the popover to a different element than the one it is attached to. */ open(context?: any): void; /** * Closes an element’s popover. This is considered a manual triggering of the popover. */ close(): void; /** * Toggles an element’s popover. This is considered a manual triggering of the popover. */ toggle(): void; /** * Returns whether or not the popover is currently being shown */ isOpen(): boolean; /** Saves a reference to the element that was focused before the popover was opened. */ private _savePreviouslyFocusedElement(); }