ngx-smart-popover
Version:
Simple popover control for your angular (v4+) applications using bootstrap4 with smart reflection logic when overflowing the viewport. This is a continuation of ngx-popover (https://github.com/pleerock/ngx-popover). If you want to use it without bootstrap
68 lines (67 loc) • 2.35 kB
TypeScript
/**
* This is a continuation of ngx-popover
* @Reference {github} https://github.com/pleerock/ngx-popover
*/
import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
import { PopoverDirective } from './popover.directive';
import { PopoverPlacement } from './popover.placement';
export declare class PopoverContentComponent implements AfterViewInit, OnDestroy {
protected element: ElementRef;
protected cdr: ChangeDetectorRef;
protected renderer: Renderer2;
content: string;
placement: PopoverPlacement;
title: string;
parentClass: string;
animation: boolean;
closeOnClickOutside: boolean;
closeOnMouseOutside: boolean;
appendToBody: boolean;
size: 'small' | 'medium-small' | 'medium' | 'large' | 'auto';
popoverDiv: ElementRef;
popover: PopoverDirective;
onCloseFromOutside: EventEmitter<{}>;
top: number;
left: number;
isIn: boolean;
effectivePlacement: string;
opacity: number;
transitionEnabled: boolean;
windowWidth: number;
windowHeight: number;
listenClickFunc: any;
listenMouseFunc: any;
listenTouchFunc: any;
/**
* Closes dropdown if user clicks outside of this directive.
*/
onDocumentMouseDown: (event: any) => void;
constructor(element: ElementRef, cdr: ChangeDetectorRef, renderer: Renderer2);
ngAfterViewInit(): void;
ngOnDestroy(): void;
onResize(event: any): void;
updatePosition(): void;
show(): void;
hide(): void;
hideFromPopover(): void;
protected positionElements(hostEl: HTMLElement, targetEl: HTMLElement, positionStr: PopoverPlacement, appendToBody?: boolean): {
top: number;
left: number;
};
protected position(nativeEl: HTMLElement): {
width: number;
height: number;
top: number;
left: number;
};
protected offset(nativeEl: any): {
width: number;
height: number;
top: number;
left: number;
};
protected getStyle(nativeEl: HTMLElement, cssProp: string): string;
protected isStaticPositioned(nativeEl: HTMLElement): boolean;
protected parentOffsetEl(nativeEl: HTMLElement): any;
protected getEffectivePlacement(placement: string, hostElement: HTMLElement, targetElement: HTMLElement): string;
}