/** * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE */ import { Direction, Directionality } from '@angular/cdk/bidi'; import { CdkConnectedOverlay, ConnectedOverlayPositionChange, ConnectionPositionPair } from '@angular/cdk/overlay'; import { AfterViewInit, ChangeDetectorRef, ComponentFactoryResolver, ComponentRef, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core'; import { VtsConfigService, PopConfirmConfig, PopoverConfig } from '@ui-vts-kit/ng-vts/core/config'; import { VtsNoAnimationDirective } from '@ui-vts-kit/ng-vts/core/no-animation'; import { BooleanInput, NgClassInterface, NgStyleInterface, VtsSafeAny, VtsTSType } from '@ui-vts-kit/ng-vts/core/types'; import { Subject } from 'rxjs'; import * as i0 from "@angular/core"; export interface PropertyMapping { [key: string]: [string, () => unknown]; } export type VtsTooltipType = 'sentence' | 'paragraph'; export type VtsTooltipTrigger = 'click' | 'focus' | 'hover' | null; export declare abstract class VtsTooltipBaseDirective implements OnChanges, OnDestroy, AfterViewInit { elementRef: ElementRef; protected hostView: ViewContainerRef; protected resolver: ComponentFactoryResolver; protected renderer: Renderer2; protected noAnimation?: VtsNoAnimationDirective; protected vtsConfigService?: VtsConfigService; arrowPointAtCenter?: boolean; config?: Required; directiveTitle?: VtsTSType | null; directiveContent?: VtsTSType | null; title?: VtsTSType | null; content?: VtsTSType | null; trigger?: VtsTooltipTrigger; placement?: string | string[]; origin?: ElementRef; visible?: boolean; mouseEnterDelay?: number; mouseLeaveDelay?: number; overlayClassName?: string; overlayStyle?: NgStyleInterface; visibleChange: EventEmitter; vtsType?: VtsTooltipType; /** * For create tooltip dynamically. This should be override for each different component. */ protected componentRef: ComponentRef; /** * This true title that would be used in other parts on this component. */ protected get _title(): VtsTSType | null; protected get _content(): VtsTSType | null; protected get _trigger(): VtsTooltipTrigger; protected get _placement(): string[]; protected get _visible(): boolean; protected get _mouseEnterDelay(): number; protected get _mouseLeaveDelay(): number; protected get _overlayClassName(): string | null; protected get _overlayStyle(): NgStyleInterface | null; protected get _vtsType(): VtsTooltipType | null; private internalVisible; protected getProxyPropertyMap(): PropertyMapping; component?: VtsTooltipBaseComponent; protected readonly destroy$: Subject; protected readonly triggerDisposables: Array<() => void>; private delayTimer?; constructor(elementRef: ElementRef, hostView: ViewContainerRef, resolver: ComponentFactoryResolver, renderer: Renderer2, noAnimation?: VtsNoAnimationDirective, vtsConfigService?: VtsConfigService); ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngOnDestroy(): void; show(): void; hide(): void; /** * Force the component to update its position. */ updatePosition(): void; /** * Create a dynamic tooltip component. This method can be override. */ protected createComponent(): void; protected registerTriggers(): void; private updatePropertiesByChanges; private updatePropertiesByKeys; private initProperties; private updateComponentValue; private delayEnterLeave; private removeTriggerListeners; private clearTogglingTimer; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export declare abstract class VtsTooltipBaseComponent implements OnDestroy, OnInit { cdr: ChangeDetectorRef; private directionality; noAnimation?: VtsNoAnimationDirective; static ngAcceptInputType_vtsVisible: BooleanInput; static ngAcceptInputType_vtsArrowPointAtCenter: BooleanInput; overlay: CdkConnectedOverlay; vtsTitle: VtsTSType | null; vtsContent: VtsTSType | null; vtsArrowPointAtCenter: boolean; vtsOverlayClassName: string; vtsOverlayStyle: NgStyleInterface; vtsBackdrop: boolean; vtsMouseEnterDelay?: number; vtsMouseLeaveDelay?: number; vtsType?: VtsTooltipType; vtsVisibleChange: Subject; set vtsVisible(value: boolean); get vtsVisible(): boolean; _visible: boolean; set vtsTrigger(value: VtsTooltipTrigger); get vtsTrigger(): VtsTooltipTrigger; protected _trigger: VtsTooltipTrigger; set vtsPlacement(value: string[]); preferredPlacement: string; origin: ElementRef; dir: Direction; _classMap: NgClassInterface; _prefix: string; _positions: ConnectionPositionPair[]; private destroy$; constructor(cdr: ChangeDetectorRef, directionality: Directionality, noAnimation?: VtsNoAnimationDirective); ngOnInit(): void; ngOnDestroy(): void; show(): void; hide(): void; updateByDirective(): void; /** * Force the component to update its position. */ updatePosition(): void; onPositionChange(position: ConnectedOverlayPositionChange): void; updateStyles(): void; setOverlayOrigin(origin: ElementRef): void; onClickOutside(event: MouseEvent): void; /** * Hide the component while the content is empty. */ private updateVisibilityByTitle; /** * Empty component cannot be opened. */ protected abstract isEmpty(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export declare function isTooltipEmpty(value: string | TemplateRef | null): boolean;