import { OverlayRef } from '@angular/cdk/overlay'; import { ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, Injector, TemplateRef, ViewContainerRef } from '@angular/core'; import { Subject } from 'rxjs'; import { Placement } from '../../common/placement'; import { BooleanInput } from '@angular/cdk/coercion'; import { SapphireOverlay } from '../../theme/src/sapphire-overlay.service'; import * as i0 from "@angular/core"; export interface PopoverTrigger { toggle(): void; open(): void; close(): void; elementRef: ElementRef; } export declare const POPOVER_TRIGGER: InjectionToken; export declare class PopoverTriggerDirective implements PopoverTrigger { private changeDetectorRef; private overlay; private viewContainerRef; elementRef: ElementRef; private injector; placement: Placement; templateRef: TemplateRef | null; /** * Whether the popover should not block interaction with background. */ nonModal: BooleanInput; /** * Whether the popover should be opened on press start. */ openOnPressStart: BooleanInput; /** * Whether the popover should be closed when the container is scrolled. * @default false */ closeOnScroll: BooleanInput; /** * Can be used to disable toggling popover on clicks. Useful if `spPopoverTrigger` * is applied on an element which doesn't support `disabled` property. */ disabled: BooleanInput; /** * If the popover should be pushed around whenever it doesn't fit the viewport * with the provided placement. */ disablePushInsideViewport: BooleanInput; /** Emits when the attached popover is requested to open */ readonly opened: EventEmitter; /** Emits when the attached popover is requested to close */ readonly closed: EventEmitter; /** Emits when this trigger is destroyed. */ protected readonly destroyed: Subject; /** A reference to the overlay which manages the triggered menu */ protected overlayRef: OverlayRef | null; private isBeingPressed; get getPopoverId(): string | undefined; constructor(changeDetectorRef: ChangeDetectorRef, overlay: SapphireOverlay, viewContainerRef: ViewContainerRef, elementRef: ElementRef, injector: Injector); ngOnDestroy(): void; /** Toggle the attached popover. */ toggle(): void; /** Open the attached popover. */ open(): void; /** Close the opened popover. */ close(): void; /** Whether the popover is open. */ isOpen(): boolean; private handleMousedown; private handleClick; /** * While onFocusout takes care of closing the popover when focus goes out, in the rare cases * that there is no more focusable element between the trigger and the popover, the focus can * go to the popover on pressing `Tab`. But the popover should be closed when tabbing on the * trigger. */ private handleTab; /** * In some use cases (e.g. in searchable select) popover trigger grabs the focus, right after * the popover is opened. That requires popover trigger to detect when focus goes out of it * and close the popover. * Note: we can't use `blur` event since it won't bubble up, and the focus can be on an element * inside the trigger, but not the trigger itself. * */ private onFocusout; private handleKeyDown; private destroyOverlay; /** Get the configuration object used to create the overlay. */ private getOverlayConfig; private getContentPortal; private getOverlayPositionStrategy; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }