cm-angular-tooltip
Version:
Tooltip for Angular
113 lines (112 loc) • 6.05 kB
TypeScript
import { ElementRef, ComponentFactoryResolver, ApplicationRef, Injector, EventEmitter, SimpleChanges } from '@angular/core';
import { TooltipOptions } from './tooltip-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": { "alias": "options"; "required": false; }; "tooltipValue": { "alias": "tooltip"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "autoPlacement": { "alias": "autoPlacement"; "required": false; }; "contentTypeBackwardCompatibility": { "alias": "content-type"; "required": false; }; "contentType": { "alias": "contentType"; "required": false; }; "hideDelayMobile": { "alias": "hide-delay-mobile"; "required": false; }; "hideDelayTouchscreen": { "alias": "hideDelayTouchscreen"; "required": false; }; "zIndexBackwardCompatibility": { "alias": "z-index"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "animationDurationBackwardCompatibility": { "alias": "animation-duration"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; "trigger": { "alias": "trigger"; "required": false; }; "tooltipClassBackwardCompatibility": { "alias": "tooltip-class"; "required": false; }; "tooltipClass": { "alias": "tooltipClass"; "required": false; }; "display": { "alias": "display"; "required": false; }; "displayMobile": { "alias": "display-mobile"; "required": false; }; "displayTouchscreen": { "alias": "displayTouchscreen"; "required": false; }; "shadow": { "alias": "shadow"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "width": { "alias": "width"; "required": false; }; "maxWidthBackwardCompatibility": { "alias": "max-width"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "id": { "alias": "id"; "required": false; }; "showDelayBackwardCompatibility": { "alias": "show-delay"; "required": false; }; "showDelay": { "alias": "showDelay"; "required": false; }; "hideDelayBackwardCompatibility": { "alias": "hide-delay"; "required": false; }; "hideDelay": { "alias": "hideDelay"; "required": false; }; "hideDelayAfterClick": { "alias": "hideDelayAfterClick"; "required": false; }; "pointerEvents": { "alias": "pointerEvents"; "required": false; }; "position": { "alias": "position"; "required": false; }; }, { "events": "events"; }, never, never, false, never>;
}