@ngx-popovers/tooltip
Version:
The Tooltip component based on Angular 17+ and Floating-ui shows tooltips next to the trigger element
96 lines (95 loc) • 4.62 kB
TypeScript
import { ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, TemplateRef } from '@angular/core';
import { MiddlewareList, Placement } from '@ngx-popovers/core';
import { AnimationEvent } from '@angular/animations';
import { ComputePosition } from './types';
import * as i0 from "@angular/core";
export declare class NgxTooltip implements OnChanges {
private el;
config: import("@ngx-popovers/tooltip").NgxTooltipConfig;
cdRef: ChangeDetectorRef;
tooltipText: string;
tooltipComponent: import("@angular/core").Type<any>;
template?: TemplateRef<void>;
placement: Placement;
middleware: MiddlewareList;
strategy: import("@angular/core").InputSignal<import("@floating-ui/utils").Strategy | undefined>;
private _ngxValue;
set ngxValue(value: boolean);
get ngxValue(): boolean;
ngxValueChange: EventEmitter<boolean>;
/**
* Time delay before the tooltip is displayed
*/
debounce: number;
/**
* Show arrow or not
*/
arrow: boolean;
/**
* Show arrow or not
*/
arrowPadding: number;
/**
* Updates floating element automatically
*/
autoUpdate: boolean;
/**
* HTMLElement where floating renders
*/
bindTo: string | HTMLElement | undefined;
tooltipDisabled: boolean;
animationDisabled: boolean;
/**
* Emits when tooltip shows
*/
showEnd: EventEmitter<any>;
/**
* Emits when tooltip hides
*/
hideEnd: EventEmitter<any>;
animationStart: EventEmitter<AnimationEvent>;
animationDone: EventEmitter<AnimationEvent>;
clickedOutside: EventEmitter<Element>;
clickedInside: EventEmitter<Element>;
computePosition: EventEmitter<import("@floating-ui/core").ComputePositionReturn>;
isTooltipCreated: import("@angular/core").WritableSignal<boolean>;
isReferenceHovered: import("@angular/core").WritableSignal<boolean>;
isTooltipHovered: import("@angular/core").WritableSignal<boolean>;
isAnimating: import("@angular/core").WritableSignal<boolean>;
get reference(): HTMLElement;
get fixedDebounce(): number;
constructor(el: ElementRef);
ngOnChanges(): void;
initListeners(): void;
private moveSubscriber$?;
mouseMoveListener(): void;
private focusListener$?;
focusListener(): void;
private leaveSubscriber$?;
mouseleaveListener(): void;
private blurListener$?;
blurListener(): void;
onShow(): void;
onHide(): void;
show(): void;
hide(): void;
setTooltipHovered($event: boolean): void;
onClickedInside(element: Element): void;
/**
* Check if user clicked outside the reference and the tooltip element.
* Close tooltip if user clicks outside (actually for touch devices)
*/
onClickedOutside(element: Element): void;
onAnimationStart(event: AnimationEvent): void;
onAnimationDone(event: AnimationEvent): void;
onPositionReturn($event: ComputePosition): void;
private fixDebounce;
static ɵfac: i0.ɵɵFactoryDeclaration<NgxTooltip, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NgxTooltip, "[ngxTooltip]", never, { "tooltipText": { "alias": "ngxTooltip"; "required": false; }; "tooltipComponent": { "alias": "tooltipComponent"; "required": false; }; "template": { "alias": "template"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "middleware": { "alias": "middleware"; "required": false; }; "strategy": { "alias": "strategy"; "required": false; "isSignal": true; }; "ngxValue": { "alias": "ngxValue"; "required": false; }; "debounce": { "alias": "debounce"; "required": false; }; "arrow": { "alias": "arrow"; "required": false; }; "arrowPadding": { "alias": "arrowPadding"; "required": false; }; "autoUpdate": { "alias": "autoUpdate"; "required": false; }; "bindTo": { "alias": "bindTo"; "required": false; }; "tooltipDisabled": { "alias": "tooltipDisabled"; "required": false; }; "animationDisabled": { "alias": "animationDisabled"; "required": false; }; }, { "ngxValueChange": "ngxValueChange"; "showEnd": "showEnd"; "hideEnd": "hideEnd"; "animationStart": "animationStart"; "animationDone": "animationDone"; "clickedOutside": "clickedOutside"; "clickedInside": "clickedInside"; "computePosition": "computePosition"; }, never, ["*"], true, never>;
static ngAcceptInputType_debounce: unknown;
static ngAcceptInputType_arrow: unknown;
static ngAcceptInputType_arrowPadding: unknown;
static ngAcceptInputType_autoUpdate: unknown;
static ngAcceptInputType_tooltipDisabled: unknown;
static ngAcceptInputType_animationDisabled: unknown;
}