import { ComponentRef, ElementRef, NgZone, OnDestroy, OnInit, TemplateRef } from '@angular/core'; import { Subject } from 'rxjs'; import { SingTooltipPosition } from './models/tooltip-position.type'; import { TooltipService } from './services/tooltip.service'; import { TooltipContainerComponent } from './tooltip-container/tooltip-container.component'; import * as i0 from "@angular/core"; export declare class TooltipDirective implements OnInit, OnDestroy { private elementRef; private tooltipService; private ngZone; tooltip: TemplateRef; tooltipContext: Record | null; showDelay: number; hideDelay: number; position: SingTooltipPosition; showTriggerEventName: string | null; hideTriggerEventName: string | null; automationId: string; offset: number; disable: boolean; closeOnEscape: boolean; closeOnClickOutside: boolean; tooltipClass: string; keepOpenOnTemplateHover: boolean; private hostElementVisible; private itWasShow; private killShowTimeout; private killHideTimeout; private observer; readonly ngUnSubscribe: Subject; readonly scrollEvent$: import("rxjs").Observable; /** * check if tooltip is visible. */ get isTooltipVisible(): boolean; constructor(elementRef: ElementRef, tooltipService: TooltipService, ngZone: NgZone); ngOnInit(): void; ngOnDestroy(): void; /** * show tooltip */ show(): void; /** * hide tooltip */ hide(): void; /** * toggle between show and hide tooltip */ toggle(): void; /** * start listening to events in order to show and hide tooltip. * in order to prevent listening -> init the inputs as null. * For example: * [singTooltipShowTriggerEventName]="null" * [singTooltipHideTriggerEventName]="null" */ private initListenShowAndHideEvents; /** * subscribe to tooltip component events if needed */ attachEventListensAfterTooltipIsOpen(component: ComponentRef): void; /** * listen to scroll event. * we have some scenario we need to handle when tooltip is displayed. * * Step 1: Hide tooltip in case it's visible. * Step 2: reposition tooltip if the directive host element is still in hover mode * or the tooltip was show will scroll and the showTriggerEventName is different from 'mouseenter' * * NOTE: the scrollEvent$ includes the unsubscribe in the declaration. */ private initListenScrollEvent; /** * check if the directive host element is currently hovered. */ private isDirectiveHostElementHasHoverAttribute; /** * check the given is valid template ref */ private isValidTemplateRef; /** * listen to host element to check if it's visible in the viewport. * The "hostElementVisible" flag helps us avoid unnecessary calculations for the tooltip visibility * when the host element is outside of the viewport */ private intersectionObserverOnHostElement; /** * check if need to start close side-nav. * when user clicks on escape */ escapeClicked(): void; handleOutsideClick(event: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } //# sourceMappingURL=tooltip.directive.d.ts.map