import { Overlay, OverlayRef, ScrollStrategy } from '@angular/cdk/overlay'; import { TemplatePortal } from '@angular/cdk/portal'; import { ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, NgZone, OnDestroy, TemplateRef } from '@angular/core'; import { Observable } from 'rxjs'; import { SbbTooltipRegistryService } from './tooltip-registry.service'; /** Injection token that determines the scroll handling while the calendar is open. */ export declare const SBB_TOOLTIP_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** @docs-private */ export declare function SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy; /** @docs-private */ export declare const SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; deps: (typeof Overlay)[]; useFactory: typeof SBB_TOOLTIP_SCROLL_STRATEGY_FACTORY; }; export declare class SbbTooltipChangeEvent { /** Instance of tooltip component. */ instance: TTooltip; /** States if the tooltip has been opened by a click. */ isUserInput: boolean; constructor( /** Instance of tooltip component. */ instance: TTooltip, /** States if the tooltip has been opened by a click. */ isUserInput?: boolean); } export declare abstract class SbbTooltipBase implements OnDestroy { protected _overlay: Overlay; protected _tooltipRegistry: SbbTooltipRegistryService; protected _document: any; protected _zone: NgZone; protected _changeDetectorRef: ChangeDetectorRef; protected _elementRef: ElementRef; /** * The icon to be used as click target. * By default uses question-mark, but the user can use his own icon using the IconDirective. */ set icon(tooltipIcon: TemplateRef); get icon(): TemplateRef; private _icon; /** * icon placed in template * @docs-private */ _contentIcon: TemplateRef; /** Checks if a tooltip panel exists */ get overlayAttached(): boolean; /** * A stream of actions that should close the autocomplete panel, including * on blur events. */ get panelClosingActions(): Observable; /** Identifier of tooltip. */ id: string; /** Identifier of tooltip content. */ contentId: string; /** * Overlay containg the tooltip text and the close button. * It's built when the user clicks on the question mark. */ tooltipRef: OverlayRef; /** @docs-private */ tooltipContentPortal: TemplatePortal; /** @docs-private */ tooltipTrigger: ElementRef; /** @docs-private */ defaultIcon: TemplateRef; /** Sets whether the overlay can be pushed on-screen if it does not fit otherwise. */ overlayWithPush: boolean; /** * Sets whether the overlay's position should be locked in after it is * positioned initially. * When an overlay is locked in, it won't attempt to reposition itself * when the position is re-applied (e.g. when the user scrolls away). */ overlayWithLockedPosition: boolean; /** Sets a minimum distance the overlay may be positioned to the edge of the viewport. */ overlayViewportMargin: number; /** Open event to a click on tooltip element. */ readonly opened: EventEmitter>; /** Close event to a click on tooltip element. */ readonly closed: EventEmitter>; private readonly _closeKeyEventStream; private readonly _scrollStrategy; private _closingActionsSubscription; protected _panelClass: string[]; /** Whether the element is inside of a ShadowRoot component. */ private _isInsideShadowRoot; constructor(_overlay: Overlay, _tooltipRegistry: SbbTooltipRegistryService, _document: any, _zone: NgZone, _changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, scrollStrategy: any); ngOnDestroy(): void; onClick(event: Event): void; /** * Opens the tooltip * @param isUserInput states if the tooltip has been opened by a click */ open(isUserInput?: boolean): void; /** * Closes the tooltip * @param isUserInput states if the tooltip has been opened by a click */ close(isUserInput?: boolean): void; /** Create the popup PositionStrategy. */ private _createTooltipPositionStrategy; /** Stream of clicks outside of the tooltip panel. */ private _getOutsideClickStream; /** * This method listens to a stream of panel closing actions and resets the * stream every time the option list changes. */ private _subscribeToClosingActions; private _createPopup; }