/** * Generated bundle index. Do not edit. */ import * as i0 from "@angular/core"; import { AfterViewInit, ChangeDetectorRef, ElementRef, InjectionToken, NgZone, OnDestroy, OnInit, Signal, ViewContainerRef } from "@angular/core"; import { Observable } from "rxjs"; import * as i1 from "@angular/cdk/a11y"; import { AriaDescriber, FocusMonitor } from "@angular/cdk/a11y"; import { Direction, Directionality } from "@angular/cdk/bidi"; import { BooleanInput } from "@angular/cdk/coercion"; import * as i3 from "@angular/cdk/overlay"; import { OriginConnectionPosition, Overlay, OverlayConnectionPosition, OverlayRef, ScrollStrategy } from "@angular/cdk/overlay"; import { Platform } from "@angular/cdk/platform"; import { ScrollDispatcher } from "@angular/cdk/scrolling"; import * as i2 from "@angular/common"; /** * Possible positions of the tooltip. */ export type TooltipPosition = TooltipVerticalPosition | TooltipHorizontalPosition; export type TooltipHorizontalPosition = 'left' | 'right'; export type TooltipVerticalPosition = 'top' | 'bottom'; /** Injection token that determines the scroll handling while a tooltip is open. */ export declare const NX_TOOLTIP_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** * @docs-private * @deprecated No longer used. * @deletion-target 18.0.0 */ export declare function NX_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy; /** * @docs-private * @deprecated No longer used. * @deletion-target 18.0.0 */ export declare const NX_TOOLTIP_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; useFactory: typeof NX_TOOLTIP_SCROLL_STRATEGY_PROVIDER_FACTORY; deps: (typeof Overlay)[]; }; /** * CSS class that will be attached to the overlay panel. * @docs-private */ export declare const NX_TOOLTIP_PANEL_CLASS = "nx-tooltip-panel"; /** * Creates an error to be thrown if the user provided an invalid tooltip position. * @docs-private */ export declare function getNxTooltipInvalidPositionError(position: string): Error; /** Default `nxTooltip` options that can be overridden. */ export interface NxTooltipDefaultOptions { /** The default delay in ms before showing the tooltip after show is called */ showDelay: number; /** The default delay in ms before hiding the tooltip after hide is called */ hideDelay: number; /** The default delay in ms before hiding the tooltip on touch devices */ touchendHideDelay: number; /** The default position of the tooltip */ position?: TooltipPosition; } /** Injection token to be used to override the default options for `nxTooltip`. */ export declare const NX_TOOLTIP_DEFAULT_OPTIONS: InjectionToken; export declare function NX_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): NxTooltipDefaultOptions; /** * Directive that attaches a tooltip to the host element. * */ export declare class NxTooltipDirective implements OnDestroy, OnInit, AfterViewInit { private readonly _overlay; private readonly _elementRef; private readonly _scrollDispatcher; private readonly _viewContainerRef; private readonly _ngZone; private readonly _ariaDescriber; private readonly _focusMonitor; private readonly _dir; private readonly _defaultOptions; private readonly _defaultScrollStrategyFactory; _overlayRef: OverlayRef | null; _tooltipInstance: NxTooltipComponent | null; private readonly _injector; private _portal; private _embeddedViewRef; private readonly _possibleTooltipPositions; /** Allows the user to define the position of the tooltip relative to the parent element */ set position(value: TooltipPosition); get position(): TooltipPosition; private _position; /** Disables the display of the tooltip. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** * Allow selection of text within tooltip trigger. * * NOTE: inputs and textareas always remain selectable, ignoring this input. */ set selectable(value: BooleanInput); get selectable(): boolean; private _selectable; /** The default delay in ms before showing the tooltip after show is called */ readonly showDelay: import("@angular/core").InputSignal; /** The default delay in ms before hiding the tooltip after hide is called */ readonly hideDelay: import("@angular/core").InputSignal; /** Whether the tooltip uses the inverse appearance, for triggers placed on a dark surface. */ readonly inverse: import("@angular/core").InputSignalWithTransform; /** The message to be displayed in the tooltip */ set message(value: string); get message(): string; private _message; /** Strategy factory that will be used to handle scrolling while the tooltip panel is open. */ private readonly _scrollStrategyFactory; private readonly _manualListeners; private readonly _destroyed; constructor(_overlay: Overlay, _elementRef: ElementRef, _scrollDispatcher: ScrollDispatcher, _viewContainerRef: ViewContainerRef, _ngZone: NgZone, platform: Platform, _ariaDescriber: AriaDescriber, _focusMonitor: FocusMonitor, _dir: Directionality | null, _defaultOptions: NxTooltipDefaultOptions | null, _defaultScrollStrategyFactory: () => ScrollStrategy); /** * Whether the tooltip should only be shown or hidden manually. * If true, tooltip will not respond to mouse or focus events. */ manualTrigger: import("@angular/core").InputSignal; ngOnInit(): void; ngAfterViewInit(): void; /** * Dispose the tooltip when destroyed. */ ngOnDestroy(): void; /** * Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input * @param delay Amount of milliseconds to delay showing the tooltip. * @param announce Whether to announce the message to screen readers. Pass `false` when the * trigger's `aria-describedby` already reads it out, e.g. on keyboard focus. */ show(delay?: number, announce?: boolean): void; /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */ hide(delay?: number): void; /** Shows/hides the tooltip */ toggle(): void; /** Returns true if the tooltip is currently visible to the user */ _isTooltipVisible(): boolean; /** Handles the touchend events on the host element. */ _handleTouchend(): void; /** * Setup styling-specific things. */ _updateSelectabilityStyles(): void; /** Create the overlay config and position strategy */ private _createOverlay; /** * Routes ESCAPE through the CDK's shared overlay dispatcher instead of a standalone `document` * listener, so only the topmost overlay reacts to a single ESCAPE press. */ private readonly _overlayEventPredicate; /** Detaches the currently-attached tooltip. */ private _detach; /** Updates the position of the current tooltip. */ private _updatePosition; /** * Returns the origin position based on the user's position preference. */ _getOrigin(position: TooltipPosition): OriginConnectionPosition; /** Returns the overlay position based on the user's preference */ _getOverlayPosition(position: TooltipPosition): OverlayConnectionPosition; /** Returns the overlay offset required by the user's position preference */ private _getOffset; /** Returns the opposite position, using aquila tooltip position naming: top, right, bottom, left */ private _getInverseTooltipPosition; /** Returns the opposite position, using angular position naming: top, bottom, start, end, center */ private _getInversePosition; /** * Returns an array of fallback positions for tooltip, following the algoritm: * 1) Slightly alternate preferred position if applicable. I.e. for 'top' try 'top-start' and 'top-end' positioning. * 2) Try the opposite position, i.e. for 'top' try 'bottom'. * 3) Slightly alternate opposite position, i.e. 'bottom-start', 'bottom-end'. * 4) All remaining positions from positions list. */ private _getFallbackPositions; /** Calculates fallbacks for vertical tooltip positioning */ private _getVerticalFallbackPositionPairs; /** Calculates fallbacks for horizontal tooltip positioning */ private _getHorizontalFallbackPositionPairs; /** Updates the tooltip message and repositions the overlay according to the new message length */ private _updateTooltipMessage; private _positionArrow; _dirChangeHandler(value: Direction): void; get _isLtr(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } type TooltipVisibility = 'initial' | 'visible' | 'hidden'; /** * Internal component that wraps the tooltip's content. * @docs-private */ export declare class NxTooltipComponent implements OnDestroy { private readonly _cdr; readonly elementRef: ElementRef; private readonly _liveAnnouncer; /** The timeout ID of any current timer set to show the tooltip */ private _showTimeoutId; /** The timeout ID of any current timer set to hide the tooltip */ private _hideTimeoutId; /** Message to display in the tooltip */ private _message; set message(value: string); get message(): string; _visibility: TooltipVisibility; /** Property watched by the animation framework to show or hide the tooltip */ get visibility(): TooltipVisibility; private readonly _position; /** @docs-private */ set position(value: TooltipPosition); /** @docs-private */ get position(): TooltipPosition; _arrowStyle: { [key: string]: string; }; /** @docs-private */ set arrowStyle(value: { [key: string]: string; }); /** @docs-private */ get arrowStyle(): { [key: string]: string; }; /** @docs-private */ get arrowClass(): string; /** @docs-private */ protected readonly _svgPath: Signal<"M0.88097 0.43185C0.94670 0.46407 0.94774 0.51684 0.88328 0.54970L0 1L0 0Z" | "M0.56815 0.88097C0.53593 0.94670 0.48316 0.94774 0.45030 0.88328L0 0L1 0Z" | "M1 0.50980L0 0L0 1Z" | "M0.50980 1L0 0L1 0Z">; /** * Whether the tooltip uses the inverse appearance. */ _inverse: Signal; /** Whether interactions on the page should close the tooltip */ private _closeOnInteraction; /** Matches the trigger's hide delay, so crossing the arrow gap back to it can still cancel the hide. */ _mouseLeaveHideDelay: number; /** Whether to announce on show. False when focus already triggers `aria-describedby`, to avoid a duplicate announcement. */ _announceOnShow: boolean; /** Subject for notifying that the tooltip has been hidden from the view */ private readonly _onHide; private readonly _allianzOneOptions; protected readonly isAllianzOne: Signal; constructor(_cdr: ChangeDetectorRef, elementRef: ElementRef); /** * Shows the tooltip with an aninxion originating from the provided origin * @param delay Amount of milliseconds to the delay showing the tooltip. */ show(delay: number): void; /** * Begins the animation to hide the tooltip after the provided delay in ms. * @param delay Amount of milliseconds to delay showing the tooltip. */ hide(delay: number): void; /** Returns an observable that notifies when the tooltip has been hidden from view. */ afterHidden(): Observable; /** Whether the tooltip is being displayed. */ isVisible(): boolean; /** Whether the tooltip should be rendered in DOM (for measurement or display) */ protected shouldRender(): boolean; /** Whether the tooltip started a delay to be shown/hidden */ isDelayed(): boolean; isPendingShow(): boolean; ngOnDestroy(): void; /** * Interactions on the HTML body should close the tooltip immediately. */ _handleBodyInteraction(): void; /** Cancels a pending hide without replaying the show delay or re-announcing. */ _cancelPendingHide(): void; /** Keeps the tooltip open while the pointer is over it, e.g. to read or select its content. */ protected _handleMouseenter(): void; /** Hides with the trigger's delay, so moving back onto it can still cancel the hide. */ protected _handleMouseleave(): void; protected onEnter(): void; protected onLeave(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class NxTooltipModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export {};