ng2-tooltip-directive
Version:
Tooltip for Angular
113 lines (112 loc) • 5.08 kB
TypeScript
import { ElementRef, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, SimpleChanges } from '@angular/core';
import { TooltipOptions } from './options.interface';
import * as i0 from "@angular/core";
export interface AdComponent {
data: any;
show: boolean;
close: boolean;
events: any;
}
export declare class TooltipDirective {
private initOptions;
private elementRef;
private componentFactoryResolver;
private appRef;
private injector;
hideTimeoutId: number;
destroyTimeoutId: number;
hideAfterClickTimeoutId: number;
createTimeoutId: number;
showTimeoutId: number;
componentRef: any;
elementPosition: any;
_id: any;
_options: any;
_defaultOptions: any;
_destroyDelay: number;
componentSubscribe: any;
_contentType: "string" | "html" | "template";
_showDelay: number;
_hideDelay: number;
_zIndex: number;
_tooltipClass: string;
_animationDuration: number;
_maxWidth: string;
set options(value: TooltipOptions);
get options(): TooltipOptions;
tooltipValue: string;
placement: string;
autoPlacement: boolean;
set contentTypeBackwardCompatibility(value: "string" | "html" | "template");
set contentType(value: "string" | "html" | "template");
get contentType(): "string" | "html" | "template";
hideDelayMobile: number;
hideDelayTouchscreen: number;
set zIndexBackwardCompatibility(value: number);
set zIndex(value: number);
get zIndex(): number;
set animationDurationBackwardCompatibility(value: number);
set animationDuration(value: number);
get animationDuration(): number;
trigger: string;
set tooltipClassBackwardCompatibility(value: string);
set tooltipClass(value: string);
get tooltipClass(): string;
display: boolean;
displayMobile: boolean;
displayTouchscreen: boolean;
shadow: boolean;
theme: "dark" | "light";
offset: number;
width: string;
set maxWidthBackwardCompatibility(value: string);
set maxWidth(value: string);
get maxWidth(): string;
id: any;
set showDelayBackwardCompatibility(value: number);
set showDelay(value: number);
get showDelay(): number;
set hideDelayBackwardCompatibility(value: number);
set hideDelay(value: number);
get hideDelay(): number;
hideDelayAfterClick: number;
pointerEvents: 'auto' | 'none';
position: {
top: number;
left: number;
};
get isTooltipDestroyed(): any;
get destroyDelay(): number;
set destroyDelay(value: number);
get tooltipPosition(): any;
events: EventEmitter<any>;
constructor(initOptions: any, elementRef: ElementRef, componentFactoryResolver: ComponentFactoryResolver, appRef: ApplicationRef, injector: Injector);
onMouseEnter(): void;
onMouseLeave(): void;
onClick(): void;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
getShowDelay(): number | undefined;
getHideDelay(): number | undefined;
getProperties(changes: SimpleChanges): any;
renameProperties(options: any): any;
getElementPosition(): void;
createTooltip(): void;
destroyTooltip(options?: {
fast: boolean;
}): void;
showTooltipElem(): void;
hideTooltip(): void;
appendComponentToBody(component: any, data?: any): void;
clearTimeouts(): void;
get isDisplayOnHover(): boolean;
get isDisplayOnClick(): boolean;
get isTouchScreen(): boolean;
applyOptionsDefault(defaultOptions: any, options: any): void;
handleEvents(event: any): void;
show(): void;
hide(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, [{ optional: true; }, null, null, null, null]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tooltip]", ["tooltip"], { "options": "options"; "tooltipValue": "tooltip"; "placement": "placement"; "autoPlacement": "autoPlacement"; "contentTypeBackwardCompatibility": "content-type"; "contentType": "contentType"; "hideDelayMobile": "hide-delay-mobile"; "hideDelayTouchscreen": "hideDelayTouchscreen"; "zIndexBackwardCompatibility": "z-index"; "zIndex": "zIndex"; "animationDurationBackwardCompatibility": "animation-duration"; "animationDuration": "animationDuration"; "trigger": "trigger"; "tooltipClassBackwardCompatibility": "tooltip-class"; "tooltipClass": "tooltipClass"; "display": "display"; "displayMobile": "display-mobile"; "displayTouchscreen": "displayTouchscreen"; "shadow": "shadow"; "theme": "theme"; "offset": "offset"; "width": "width"; "maxWidthBackwardCompatibility": "max-width"; "maxWidth": "maxWidth"; "id": "id"; "showDelayBackwardCompatibility": "show-delay"; "showDelay": "showDelay"; "hideDelayBackwardCompatibility": "hide-delay"; "hideDelay": "hideDelay"; "hideDelayAfterClick": "hideDelayAfterClick"; "pointerEvents": "pointerEvents"; "position": "position"; }, { "events": "events"; }, never>;
}