import { UrlSegment } from '@angular/router'; import * as i0 from '@angular/core'; import { ElementRef } from '@angular/core'; import { Subject, Observable } from 'rxjs'; interface TourAnchorDirective { showTourStep(step: IStepOption): void; hideTourStep(): void; element: ElementRef; } interface BackdropConfig { zIndex?: string; backgroundColor?: string; /** * Parent container CSS selector or html element reference. Set to fix backdrop stacking issues. Defaults to body. */ parentContainer?: string | HTMLElement; /** * Offset in pixels to add space between the backdrop and the anchor element. */ offset?: number; } interface StepDimensions { width?: string; minWidth?: string; maxWidth?: string; } interface IStepOption { stepId?: string; anchorId?: string; title?: string; content?: string; route?: string | UrlSegment[]; nextStep?: number | string; prevStep?: number | string; disableScrollToAnchor?: boolean; centerAnchorOnScroll?: boolean; smoothScroll?: boolean; /** * CSS selector or html element reference. Only set this config if you have enabled "smoothScroll" and tour step * description pops-up before scrolling has finished or doesn't show up at all. This should only be the case when * scroll container is part of shadow DOM. */ scrollContainer?: string | HTMLElement; prevBtnTitle?: string; nextBtnTitle?: string; endBtnTitle?: string; enableBackdrop?: boolean; backdropConfig?: BackdropConfig; isAsync?: boolean; asyncStepTimeout?: number; isOptional?: boolean; delayAfterNavigation?: number; delayBeforeStepShow?: number; nextOnAnchorClick?: boolean; duplicateAnchorHandling?: 'error' | 'registerFirst' | 'registerLast'; disablePageScrolling?: boolean; allowUserInitiatedNavigation?: boolean; stepDimensions?: StepDimensions; popoverClass?: string; showProgress?: boolean; } declare enum TourState { OFF = 0, ON = 1, PAUSED = 2 } declare enum Direction { Forwards = 0, Backwards = 1 } interface StepChangeParams { step: T; direction: Direction; } declare class TourService { stepShow$: Subject>; stepHide$: Subject>; initialize$: Subject; start$: Subject; end$: Subject; pause$: Subject; resume$: Subject; anchorRegister$: Subject; anchorUnregister$: Subject; events$: Observable<{ name: string; value: unknown; }>; steps: T[]; currentStep: T; anchors: Record; private status; private isHotKeysEnabled; private direction; private waitingForScroll; private navigationStarted; private userDefaults; private readonly router; private readonly backdrop; private readonly anchorClickService; private readonly scrollBlockingService; private readonly scrollingService; initialize(steps: T[], stepDefaults?: T): void; setDefaults(defaultOptions: T): void; getDefaults(): T; private validateSteps; private subscribeToNavigationStartEvent; disableHotkeys(): void; enableHotkeys(): void; start(): void; startAt(stepId: number | string): void; end(): void; pause(): void; private disableTour; resume(): void; toggle(pause?: boolean): void; next(): void; private getStepIndex; hasNext(step: T): boolean; private isNextOptionalAnchorMissing; prev(): void; hasPrev(step: T): boolean; private isPrevOptionalAnchorMising; goto(stepId: number | string): void; register(anchorId: string, anchor: TourAnchorDirective): void; private findStepByAnchorId; unregister(anchorId: string): void; getStatus(): TourState; isHotkeysEnabled(): boolean; private goToStep; private listenToOnAnchorClick; private navigateToRouteAndSetStep; private loadStep; private setCurrentStep; private setCurrentStepAsync; protected showStep(step: T, skipAsync?: boolean): Promise; private hideStep; private scrollToAnchor; private toggleBackdrop; private togglePageScrolling; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class TourHotkeyListenerComponent { protected readonly tourService: TourService; /** * Configures hot keys for controlling the tour with the keyboard */ onEscapeKey(): void; onArrowRightKey(): void; onArrowLeftKey(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const enum ElementSides { Top = 0, Bottom = 1, All = 2 } declare function isInViewport(htmlElement: HTMLElement, sidesToCheck?: ElementSides): boolean; declare function isCovered(htmlElement: HTMLElement, sidesToCheck?: ElementSides): boolean; declare abstract class BaseTourProxyAnchor { protected abstract readonly anchorDirective: TourAnchorDirective; private readonly document; abstract anchorEl: string | HTMLElement; constructor(); private setAnchorElement; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export { BaseTourProxyAnchor, Direction, ElementSides, TourHotkeyListenerComponent, TourService, TourState, isCovered, isInViewport }; export type { BackdropConfig, IStepOption, StepChangeParams, StepDimensions, TourAnchorDirective };