UNPKG

ngx-guided-tour

Version:

Guided tour for your Angular applications.

1 lines 60.5 kB
{"version":3,"file":"ngx-guided-tour.mjs","sources":["../../../projects/ngx-guided-tour/src/lib/guided-tour.constants.ts","../../../projects/ngx-guided-tour/src/lib/windowref.service.ts","../../../projects/ngx-guided-tour/src/lib/guided-tour.service.ts","../../../projects/ngx-guided-tour/src/lib/guided-tour.component.ts","../../../projects/ngx-guided-tour/src/lib/guided-tour.module.ts","../../../projects/ngx-guided-tour/src/public_api.ts","../../../projects/ngx-guided-tour/src/ngx-guided-tour.ts"],"sourcesContent":["\nexport interface TourStep {\n    /** Selector for element that will be highlighted */\n    selector?: string;\n    /** Tour title text */\n    title?: string;\n    /** Tour step text */\n    content: string;\n    /** Where the tour step will appear next to the selected element */\n    orientation?: Orientation | OrientationConfiguration[];\n    /** Action that happens when the step is opened */\n    action?: () => void;\n    /** Action that happens when the step is closed */\n    closeAction?: () => void;\n    /** Skips this step, this is so you do not have create multiple tour configurations based on user settings/configuration */\n    skipStep?: boolean;\n    /** Adds some padding for things like sticky headers when scrolling to an element */\n    scrollAdjustment?: number;\n    /** Adds default padding around tour highlighting. Does not need to be true for highlightPadding to work */\n    useHighlightPadding?: boolean;\n    /** Adds padding around tour highlighting in pixels, this overwrites the default for this step. Is not dependent on useHighlightPadding being true */\n    highlightPadding?: number;\n}\n\nexport interface GuidedTour {\n    /** Identifier for tour */\n    tourId: string;\n    /** Use orb to start tour */\n    useOrb?: boolean;\n    /** Steps fo the tour */\n    steps: TourStep[];\n    /** Function will be called when tour is skipped */\n    skipCallback?: (stepSkippedOn: number) => void;\n    /** Function will be called when tour is completed */\n    completeCallback?: () => void;\n    /** Minimum size of screen in pixels before the tour is run, if the tour is resized below this value the user will be told to resize */\n    minimumScreenSize?: number;\n    /** Dialog shown if the window width is smaller than the defined minimum screen size. */\n    resizeDialog?: {\n        /** Resize dialog title text */\n        title?: string;\n        /** Resize dialog text */\n        content: string;\n    }\n    /**\n     * Prevents the tour from advancing by clicking the backdrop.\n     * This should only be set if you are completely sure your tour is displaying correctly on all screen sizes otherwise a user can get stuck.\n     */\n    preventBackdropFromAdvancing?: boolean;\n}\n\nexport interface OrientationConfiguration {\n    /** Where the tour step will appear next to the selected element */\n    orientationDirection: Orientation;\n    /** When this orientation configuration starts in pixels */\n    maximumSize?: number;\n}\n\nexport class Orientation {\n    public static readonly Bottom = 'bottom';\n    public static readonly BottomLeft = 'bottom-left';\n    public static readonly BottomRight = 'bottom-right';\n    public static readonly Center = 'center';\n    public static readonly Left = 'left';\n    public static readonly Right = 'right';\n    public static readonly Top = 'top';\n    public static readonly TopLeft = 'top-left';\n    public static readonly TopRight = 'top-right';\n}\n\nexport enum ProgressIndicatorLocation {\n    InsideNextButton = 'inside-next-button',\n    TopOfTourBlock = 'top-of-tour-block',\n    None = 'none',\n}  \n","import { Inject, Injectable, PLATFORM_ID } from \"@angular/core\";\nimport { isPlatformBrowser } from \"@angular/common\";\n\nfunction getWindow(): any {\n    return window;\n}\n\nfunction getMockWindow(): any {\n    return {\n        innerWidth: 0,\n        innerHeight: 0,\n        scrollY: 0,\n        scrollX: 0,\n        pageYOffset: 0,\n        pageXOffset: 0,\n        scroll: () => {},\n        scrollTo: () => {},\n        addEventListener: () => {},\n        removeEventListener: () => {},\n    }\n}\n\n@Injectable()\nexport class WindowRefService {\n    private readonly isBrowser: boolean = false;\n\n    get nativeWindow(): any {\n        if (this.isBrowser) {\n            return getWindow();\n        } else {\n            return getMockWindow();\n        }\n    }\n\n    constructor(@Inject(PLATFORM_ID) platformId) {\n        this.isBrowser = isPlatformBrowser(platformId);\n    }\n}\n","import { debounceTime } from 'rxjs/operators';\nimport { ErrorHandler, Inject, Injectable } from '@angular/core';\nimport { Observable, Subject, fromEvent } from 'rxjs';\nimport { GuidedTour, TourStep, Orientation, OrientationConfiguration } from './guided-tour.constants';\nimport { cloneDeep } from 'lodash';\nimport { DOCUMENT } from \"@angular/common\";\nimport { WindowRefService } from \"./windowref.service\";\n\n@Injectable()\nexport class GuidedTourService {\n    public guidedTourCurrentStepStream: Observable<TourStep>;\n    public guidedTourOrbShowingStream: Observable<boolean>;\n\n    private _guidedTourCurrentStepSubject = new Subject<TourStep>();\n    private _guidedTourOrbShowingSubject = new Subject<boolean>();\n    private _currentTourStepIndex = 0;\n    private _currentTour: GuidedTour = null;\n    private _onFirstStep = true;\n    private _onLastStep = true;\n    private _onResizeMessage = false;\n\n    constructor(\n        public errorHandler: ErrorHandler,\n        private windowRef: WindowRefService,\n        @Inject(DOCUMENT) private dom\n    ) {\n        this.guidedTourCurrentStepStream = this._guidedTourCurrentStepSubject.asObservable();\n        this.guidedTourOrbShowingStream = this._guidedTourOrbShowingSubject.asObservable();\n\n        fromEvent(this.windowRef.nativeWindow, 'resize').pipe(debounceTime(200)).subscribe(() => {\n            if (this._currentTour && this._currentTourStepIndex > -1) {\n                if (this._currentTour.minimumScreenSize && this._currentTour.minimumScreenSize >= this.windowRef.nativeWindow.innerWidth) {\n                    this._onResizeMessage = true;\n                    const dialog = this._currentTour.resizeDialog || {\n                        title: 'Please resize',\n                        content: 'You have resized the tour to a size that is too small to continue. Please resize the browser to a larger size to continue the tour or close the tour.'\n                    };\n\n                    this._guidedTourCurrentStepSubject.next(dialog);\n                } else {\n                    this._onResizeMessage = false;\n                    this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n                }\n            }\n        });\n    }\n\n    public nextStep(): void {\n        if (this._currentTour.steps[this._currentTourStepIndex].closeAction) {\n            this._currentTour.steps[this._currentTourStepIndex].closeAction();\n        }\n        if (this._currentTour.steps[this._currentTourStepIndex + 1]) {\n            this._currentTourStepIndex++;\n            this._setFirstAndLast();\n            if (this._currentTour.steps[this._currentTourStepIndex].action) {\n                this._currentTour.steps[this._currentTourStepIndex].action();\n                // Usually an action is opening something so we need to give it time to render.\n                setTimeout(() => {\n                    if (this._checkSelectorValidity()) {\n                        this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n                    } else {\n                        this.nextStep();\n                    }\n                });\n            } else {\n                if (this._checkSelectorValidity()) {\n                    this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n                } else {\n                    this.nextStep();\n                }\n            }\n        } else {\n            if (this._currentTour.completeCallback) {\n                this._currentTour.completeCallback();\n            }\n            this.resetTour();\n        }\n    }\n\n    public backStep(): void {\n        if (this._currentTour.steps[this._currentTourStepIndex].closeAction) {\n            this._currentTour.steps[this._currentTourStepIndex].closeAction();\n        }\n        if (this._currentTour.steps[this._currentTourStepIndex - 1]) {\n            this._currentTourStepIndex--;\n            this._setFirstAndLast();\n            if (this._currentTour.steps[this._currentTourStepIndex].action) {\n                this._currentTour.steps[this._currentTourStepIndex].action();\n                setTimeout(() => {\n                    if (this._checkSelectorValidity()) {\n                        this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n                    } else {\n                        this.backStep();\n                    }\n                });\n            } else {\n                if (this._checkSelectorValidity()) {\n                    this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n                } else {\n                    this.backStep();\n                }\n            }\n        } else {\n            this.resetTour();\n        }\n    }\n\n    public skipTour(): void {\n        if (this._currentTour.skipCallback) {\n            this._currentTour.skipCallback(this._currentTourStepIndex);\n        }\n        this.resetTour();\n    }\n\n    public resetTour(): void {\n        this.dom.body.classList.remove('tour-open');\n        this._currentTour = null;\n        this._currentTourStepIndex = 0;\n        this._guidedTourCurrentStepSubject.next(null);\n    }\n\n    public startTour(tour: GuidedTour): void {\n        this._currentTour = cloneDeep(tour);\n        this._currentTour.steps = this._currentTour.steps.filter(step => !step.skipStep);\n        this._currentTourStepIndex = 0;\n        this._setFirstAndLast();\n        this._guidedTourOrbShowingSubject.next(this._currentTour.useOrb);\n        if (\n            this._currentTour.steps.length > 0\n            && (!this._currentTour.minimumScreenSize\n                || (this.windowRef.nativeWindow.innerWidth >= this._currentTour.minimumScreenSize))\n        ) {\n            if (!this._currentTour.useOrb) {\n                this.dom.body.classList.add('tour-open');\n            }\n            if (this._currentTour.steps[this._currentTourStepIndex].action) {\n                this._currentTour.steps[this._currentTourStepIndex].action();\n            }\n            if (this._checkSelectorValidity()) {\n                this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));\n            } else {\n                this.nextStep();\n            }\n        }\n    }\n\n    public activateOrb(): void {\n        this._guidedTourOrbShowingSubject.next(false);\n        this.dom.body.classList.add('tour-open');\n    }\n\n    private _setFirstAndLast(): void {\n        this._onLastStep = (this._currentTour.steps.length - 1) === this._currentTourStepIndex;\n        this._onFirstStep = this._currentTourStepIndex === 0;\n    }\n\n    private _checkSelectorValidity(): boolean {\n        if (this._currentTour.steps[this._currentTourStepIndex].selector) {\n            const selectedElement = this.dom.querySelector(this._currentTour.steps[this._currentTourStepIndex].selector);\n            if (!selectedElement) {\n                this.errorHandler.handleError(\n                    // If error handler is configured this should not block the browser.\n                    new Error(`Error finding selector ${this._currentTour.steps[this._currentTourStepIndex].selector} on step ${this._currentTourStepIndex + 1} during guided tour: ${this._currentTour.tourId}`)\n                );\n                return false;\n            }\n        }\n        return true;\n    }\n\n    public get onLastStep(): boolean {\n        return this._onLastStep;\n    }\n\n    public get onFirstStep(): boolean {\n        return this._onFirstStep;\n    }\n\n    public get onResizeMessage(): boolean {\n        return this._onResizeMessage;\n    }\n\n    public get currentTourStepDisplay(): number {\n        return this._currentTourStepIndex + 1;\n    }\n\n    public get currentTourStepCount(): number {\n        return this._currentTour && this._currentTour.steps ? this._currentTour.steps.length : 0;\n    }\n\n    public get preventBackdropFromAdvancing(): boolean {\n        return this._currentTour && this._currentTour.preventBackdropFromAdvancing;\n    }\n\n    private getPreparedTourStep(index: number): TourStep {\n        return this.setTourOrientation(this._currentTour.steps[index]);\n    }\n\n    private setTourOrientation(step: TourStep): TourStep {\n        const convertedStep = cloneDeep(step);\n        if (\n            convertedStep.orientation\n            && !(typeof convertedStep.orientation === 'string')\n            && (convertedStep.orientation as OrientationConfiguration[]).length\n        ) {\n            (convertedStep.orientation as OrientationConfiguration[]).sort((a: OrientationConfiguration, b: OrientationConfiguration) => {\n                if (!b.maximumSize) {\n                    return 1;\n                }\n                if (!a.maximumSize) {\n                    return -1;\n                }\n                return b.maximumSize - a.maximumSize;\n            });\n\n            let currentOrientation: Orientation = Orientation.Top;\n            (convertedStep.orientation as OrientationConfiguration[]).forEach(\n                (orientationConfig: OrientationConfiguration) => {\n                    if (!orientationConfig.maximumSize || this.windowRef.nativeWindow.innerWidth <= orientationConfig.maximumSize) {\n                        currentOrientation = orientationConfig.orientationDirection;\n                    }\n                }\n            );\n\n            convertedStep.orientation = currentOrientation;\n        }\n        return convertedStep;\n    }\n}\n","import { AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild, ViewEncapsulation, TemplateRef, Inject } from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { DOCUMENT } from '@angular/common';\nimport { Orientation, TourStep, ProgressIndicatorLocation } from './guided-tour.constants';\nimport { GuidedTourService } from './guided-tour.service';\nimport { WindowRefService } from \"./windowref.service\";\n\n@Component({\n    selector: 'ngx-guided-tour',\n    template: `\n        <div *ngIf=\"currentTourStep && selectedElementRect && isOrbShowing\"\n                (mouseenter)=\"handleOrb()\"\n                class=\"tour-orb tour-{{ currentTourStep.orientation }}\"\n                [style.top.px]=\"orbTopPosition\"\n                [style.left.px]=\"orbLeftPosition\"\n                [style.transform]=\"orbTransform\">\n                <div class=\"tour-orb-ring\"></div>\n        </div>\n        <div *ngIf=\"currentTourStep && !isOrbShowing\">\n            <div class=\"guided-tour-user-input-mask\" (click)=\"backdropClick($event)\"></div>\n            <div class=\"guided-tour-spotlight-overlay\"\n                [style.top.px]=\"overlayTop\"\n                [style.left.px]=\"overlayLeft\"\n                [style.height.px]=\"overlayHeight\"\n                [style.width.px]=\"overlayWidth\">\n            </div>\n        </div>\n        <div *ngIf=\"currentTourStep && !isOrbShowing\">\n            <div #tourStep *ngIf=\"currentTourStep\"\n                class=\"tour-step tour-{{ currentTourStep.orientation }}\"\n                [ngClass]=\"{\n                    'page-tour-step': !currentTourStep.selector\n                }\"\n                [style.top.px]=\"(currentTourStep.selector && selectedElementRect ? topPosition : null)\"\n                [style.left.px]=\"(currentTourStep.selector && selectedElementRect ? leftPosition : null)\"\n                [style.width.px]=\"(currentTourStep.selector && selectedElementRect ? calculatedTourStepWidth : null)\"\n                [style.transform]=\"(currentTourStep.selector && selectedElementRect ? transform : null)\">\n                <div *ngIf=\"currentTourStep.selector\" class=\"tour-arrow\"></div>\n                <div class=\"tour-block\">\n                    <div *ngIf=\"\n                        progressIndicatorLocation === progressIndicatorLocations.TopOfTourBlock\n                        && !guidedTourService.onResizeMessage\"\n                    class=\"tour-progress-indicator\">\n                        <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n                    </div>\n                    <h3 class=\"tour-title\" *ngIf=\"currentTourStep.title && currentTourStep.selector\">\n                        {{ currentTourStep.title }}\n                    </h3>\n                    <h2 class=\"tour-title\" *ngIf=\"currentTourStep.title && !currentTourStep.selector\">\n                        {{ currentTourStep.title }}\n                    </h2>\n                    <div class=\"tour-content\" [innerHTML]=\"currentTourStep.content\"></div>\n                    <div class=\"tour-buttons\">\n                        <button *ngIf=\"!guidedTourService.onResizeMessage\"\n                            (click)=\"guidedTourService.skipTour()\"\n                            class=\"skip-button link-button\">\n                            {{ skipText }}\n                        </button>\n                        <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\"\n                            class=\"next-button\"\n                            (click)=\"guidedTourService.nextStep()\">\n                            {{ nextText }}\n                            <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n                                <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n                            </ng-container>\n                        </button>\n                        <button *ngIf=\"guidedTourService.onLastStep\"\n                            class=\"next-button\"\n                            (click)=\"guidedTourService.nextStep()\">\n                            {{ doneText }}\n                        </button>\n\n                        <button *ngIf=\"guidedTourService.onResizeMessage\"\n                            class=\"next-button\"\n                            (click)=\"guidedTourService.resetTour()\">\n                            {{ closeText }}\n                        </button>\n                        <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n                            class=\"back-button link-button\"\n                            (click)=\"guidedTourService.backStep()\">\n                            {{ backText }}\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </div>\n        <ng-template #progress>\n            <ng-container *ngTemplateOutlet=\"\n                progressIndicator || defaultProgressIndicator; \n                context: { currentStepNumber: guidedTourService.currentTourStepDisplay, totalSteps: guidedTourService.currentTourStepCount }\n            \"></ng-container> \n        </ng-template>\n        <ng-template #defaultProgressIndicator let-currentStepNumber=\"currentStepNumber\" let-totalSteps=\"totalSteps\">\n            <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">&nbsp;</ng-container>{{ currentStepNumber }}/{{ totalSteps }}\n        </ng-template>\n    `,\n    styleUrls: ['./guided-tour.component.scss'],\n    encapsulation: ViewEncapsulation.None\n})\nexport class GuidedTourComponent implements AfterViewInit, OnDestroy {\n    @Input() public topOfPageAdjustment ?= 0;\n    @Input() public tourStepWidth ?= 300;\n    @Input() public minimalTourStepWidth ?= 200;\n    @Input() public skipText ?= 'Skip';\n    @Input() public nextText ?= 'Next';\n    @Input() public doneText ?= 'Done';\n    @Input() public closeText ?= 'Close';\n    @Input() public backText ?= 'Back';\n    @Input() public progressIndicatorLocation?: ProgressIndicatorLocation = ProgressIndicatorLocation.InsideNextButton;\n    @Input() public progressIndicator?: TemplateRef<any> = undefined;\n    @ViewChild('tourStep', { static: false }) public tourStep: ElementRef;\n    public highlightPadding = 4;\n    public currentTourStep: TourStep = null;\n    public selectedElementRect: DOMRect = null;\n    public isOrbShowing = false;\n    public progressIndicatorLocations = ProgressIndicatorLocation;\n\n    private resizeSubscription: Subscription;\n    private scrollSubscription: Subscription;\n\n    constructor(\n        public guidedTourService: GuidedTourService,\n        private windowRef: WindowRefService,\n        @Inject(DOCUMENT) private dom: any\n    ) { }\n\n    private get maxWidthAdjustmentForTourStep(): number {\n        return this.tourStepWidth - this.minimalTourStepWidth;\n    }\n\n    private get widthAdjustmentForScreenBound(): number {\n        if (!this.tourStep) {\n            return 0;\n        }\n        let adjustment = 0;\n        if (this.calculatedLeftPosition < 0) {\n            adjustment = -this.calculatedLeftPosition;\n        }\n        if (this.calculatedLeftPosition > this.windowRef.nativeWindow.innerWidth - this.tourStepWidth) {\n            adjustment = this.calculatedLeftPosition - (this.windowRef.nativeWindow.innerWidth - this.tourStepWidth);\n        }\n\n        return Math.min(this.maxWidthAdjustmentForTourStep, adjustment);\n    }\n\n    public get calculatedTourStepWidth() {\n        return this.tourStepWidth - this.widthAdjustmentForScreenBound;\n    }\n\n    public ngAfterViewInit(): void {\n        this.guidedTourService.guidedTourCurrentStepStream.subscribe((step: TourStep) => {\n            this.currentTourStep = step;\n            if (step && step.selector) {\n                const selectedElement = this.dom.querySelector(step.selector);\n                if (selectedElement) {\n                    this.scrollToAndSetElement();\n                } else {\n                    this.selectedElementRect = null;\n                }\n            } else {\n                this.selectedElementRect = null;\n            }\n        });\n\n        this.guidedTourService.guidedTourOrbShowingStream.subscribe((value: boolean) => {\n            this.isOrbShowing = value;\n        });\n\n        this.resizeSubscription = fromEvent(this.windowRef.nativeWindow, 'resize').subscribe(() => {\n            this.updateStepLocation();\n        });\n\n        this.scrollSubscription = fromEvent(this.windowRef.nativeWindow, 'scroll').subscribe(() => {\n            this.updateStepLocation();\n        });\n    }\n\n    public ngOnDestroy(): void {\n        this.resizeSubscription?.unsubscribe();\n        this.scrollSubscription?.unsubscribe();\n    }\n\n    public scrollToAndSetElement(): void {\n        this.updateStepLocation();\n        // Allow things to render to scroll to the correct location\n        setTimeout(() => {\n            if (!this.isOrbShowing && !this.isTourOnScreen()) {\n                if (this.selectedElementRect && this.isBottom()) {\n                    // Scroll so the element is on the top of the screen.\n                    const topPos = ((this.windowRef.nativeWindow.scrollY + this.selectedElementRect.top) - this.topOfPageAdjustment)\n                        - (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)\n                        + this.getStepScreenAdjustment();\n                    try {\n                        this.windowRef.nativeWindow.scrollTo({\n                            left: null,\n                            top: topPos,\n                            behavior: 'smooth'\n                        });\n                    } catch (err) {\n                        if (err instanceof TypeError) {\n                            this.windowRef.nativeWindow.scroll(0, topPos);\n                        } else {\n                            throw err;\n                        }\n                    }\n                } else {\n                    // Scroll so the element is on the bottom of the screen.\n                    const topPos = (this.windowRef.nativeWindow.scrollY + this.selectedElementRect.top + this.selectedElementRect.height)\n                        - this.windowRef.nativeWindow.innerHeight\n                        + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)\n                        - this.getStepScreenAdjustment();\n                    try {\n                        this.windowRef.nativeWindow.scrollTo({\n                            left: null,\n                            top: topPos,\n                            behavior: 'smooth'\n                        });\n                    } catch (err) {\n                        if (err instanceof TypeError) {\n                            this.windowRef.nativeWindow.scroll(0, topPos);\n                        } else {\n                            throw err;\n                        }\n                    }\n                }\n            }\n        });\n    }\n\n    public handleOrb(): void {\n        this.guidedTourService.activateOrb();\n        if (this.currentTourStep && this.currentTourStep.selector) {\n            this.scrollToAndSetElement();\n        }\n    }\n\n    private isTourOnScreen(): boolean {\n        return this.tourStep\n            && this.elementInViewport(this.dom.querySelector(this.currentTourStep.selector))\n            && this.elementInViewport(this.tourStep.nativeElement);\n    }\n\n    // Modified from https://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport\n    private elementInViewport(element: HTMLElement): boolean {\n        let top = element.offsetTop;\n        const height = element.offsetHeight;\n\n        while (element.offsetParent) {\n            element = (element.offsetParent as HTMLElement);\n            top += element.offsetTop;\n        }\n        if (this.isBottom()) {\n            return (\n                top >= (this.windowRef.nativeWindow.pageYOffset\n                    + this.topOfPageAdjustment\n                    + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)\n                    + this.getStepScreenAdjustment())\n                && (top + height) <= (this.windowRef.nativeWindow.pageYOffset + this.windowRef.nativeWindow.innerHeight)\n            );\n        } else {\n            return (\n                top >= (this.windowRef.nativeWindow.pageYOffset + this.topOfPageAdjustment - this.getStepScreenAdjustment())\n                && (top + height + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)) <= (this.windowRef.nativeWindow.pageYOffset + this.windowRef.nativeWindow.innerHeight)\n            );\n        }\n    }\n\n    public backdropClick(event: Event): void {\n        if (this.guidedTourService.preventBackdropFromAdvancing) {\n            event.stopPropagation();\n        } else {\n            this.guidedTourService.nextStep();\n        }\n    }\n\n    public updateStepLocation(): void {\n        if (this.currentTourStep && this.currentTourStep.selector) {\n            const selectedElement = this.dom.querySelector(this.currentTourStep.selector);\n            if (selectedElement && typeof selectedElement.getBoundingClientRect === 'function') {\n                this.selectedElementRect = (selectedElement.getBoundingClientRect() as DOMRect);\n            } else {\n                this.selectedElementRect = null;\n            }\n        } else {\n            this.selectedElementRect = null;\n        }\n    }\n\n    private isBottom(): boolean {\n        return this.currentTourStep.orientation\n            && (this.currentTourStep.orientation === Orientation.Bottom\n            || this.currentTourStep.orientation === Orientation.BottomLeft\n            || this.currentTourStep.orientation === Orientation.BottomRight);\n    }\n\n    public get topPosition(): number {\n        const paddingAdjustment = this.getHighlightPadding();\n\n        if (this.isBottom()) {\n            return this.selectedElementRect.top + this.selectedElementRect.height + paddingAdjustment;\n        }\n\n        return this.selectedElementRect.top - this.getHighlightPadding();\n    }\n\n    public get orbTopPosition(): number {\n        if (this.isBottom()) {\n            return this.selectedElementRect.top + this.selectedElementRect.height;\n        }\n\n        if (\n            this.currentTourStep.orientation === Orientation.Right\n            || this.currentTourStep.orientation === Orientation.Left\n        ) {\n            return (this.selectedElementRect.top + (this.selectedElementRect.height / 2));\n        }\n\n        return this.selectedElementRect.top;\n    }\n\n    private get calculatedLeftPosition(): number {\n        const paddingAdjustment = this.getHighlightPadding();\n\n        if (\n            this.currentTourStep.orientation === Orientation.TopRight\n            || this.currentTourStep.orientation === Orientation.BottomRight\n        ) {\n            return (this.selectedElementRect.right - this.tourStepWidth);\n        }\n\n        if (\n            this.currentTourStep.orientation === Orientation.TopLeft\n            || this.currentTourStep.orientation === Orientation.BottomLeft\n        ) {\n            return (this.selectedElementRect.left);\n        }\n\n        if (this.currentTourStep.orientation === Orientation.Left) {\n            return this.selectedElementRect.left - this.tourStepWidth - paddingAdjustment;\n        }\n\n        if (this.currentTourStep.orientation === Orientation.Right) {\n            return (this.selectedElementRect.left + this.selectedElementRect.width + paddingAdjustment);\n        }\n\n        return (this.selectedElementRect.right - (this.selectedElementRect.width / 2) - (this.tourStepWidth / 2));\n    }\n\n    public get leftPosition(): number {\n        if (this.calculatedLeftPosition >= 0) {\n            return this.calculatedLeftPosition;\n        }\n        const adjustment = Math.max(0, -this.calculatedLeftPosition)\n        const maxAdjustment = Math.min(this.maxWidthAdjustmentForTourStep, adjustment);\n        return this.calculatedLeftPosition + maxAdjustment;\n    }\n\n    public get orbLeftPosition(): number {\n        if (\n            this.currentTourStep.orientation === Orientation.TopRight\n            || this.currentTourStep.orientation === Orientation.BottomRight\n        ) {\n            return this.selectedElementRect.right;\n        }\n\n        if (\n            this.currentTourStep.orientation === Orientation.TopLeft\n            || this.currentTourStep.orientation === Orientation.BottomLeft\n        ) {\n            return this.selectedElementRect.left;\n        }\n\n        if (this.currentTourStep.orientation === Orientation.Left) {\n            return this.selectedElementRect.left;\n        }\n\n        if (this.currentTourStep.orientation === Orientation.Right) {\n            return (this.selectedElementRect.left + this.selectedElementRect.width);\n        }\n\n        return (this.selectedElementRect.right - (this.selectedElementRect.width / 2));\n    }\n\n    public get transform(): string {\n        if (\n            !this.currentTourStep.orientation\n            || this.currentTourStep.orientation === Orientation.Top\n            || this.currentTourStep.orientation === Orientation.TopRight\n            || this.currentTourStep.orientation === Orientation.TopLeft\n        ) {\n            return 'translateY(-100%)';\n        }\n        return null;\n    }\n\n    public get orbTransform(): string {\n        if (\n            !this.currentTourStep.orientation\n            || this.currentTourStep.orientation === Orientation.Top\n            || this.currentTourStep.orientation === Orientation.Bottom\n            || this.currentTourStep.orientation === Orientation.TopLeft\n            || this.currentTourStep.orientation === Orientation.BottomLeft\n        ) {\n            return 'translateY(-50%)';\n        }\n\n        if (\n            this.currentTourStep.orientation === Orientation.TopRight\n            || this.currentTourStep.orientation === Orientation.BottomRight\n        ) {\n            return 'translate(-100%, -50%)';\n        }\n\n        if (\n            this.currentTourStep.orientation === Orientation.Right\n            || this.currentTourStep.orientation === Orientation.Left\n        ) {\n            return 'translate(-50%, -50%)';\n        }\n\n        return null;\n    }\n\n    public get overlayTop(): number {\n        if (this.selectedElementRect) {\n            return this.selectedElementRect.top - this.getHighlightPadding();\n        }\n        return 0;\n    }\n\n    public get overlayLeft(): number {\n        if (this.selectedElementRect) {\n            return this.selectedElementRect.left - this.getHighlightPadding();\n        }\n        return 0;\n    }\n\n    public get overlayHeight(): number {\n        if (this.selectedElementRect) {\n            return this.selectedElementRect.height + (this.getHighlightPadding() * 2);\n        }\n        return 0;\n    }\n\n    public get overlayWidth(): number {\n        if (this.selectedElementRect) {\n            return this.selectedElementRect.width + (this.getHighlightPadding() * 2);\n        }\n        return 0;\n    }\n\n    private getHighlightPadding(): number {\n        let paddingAdjustment = this.currentTourStep.useHighlightPadding ? this.highlightPadding : 0;\n        if (this.currentTourStep.highlightPadding) {\n            paddingAdjustment = this.currentTourStep.highlightPadding;\n        }\n        return paddingAdjustment;\n    }\n\n    // This calculates a value to add or subtract so the step should not be off screen.\n    private getStepScreenAdjustment(): number {\n        if (\n            this.currentTourStep.orientation === Orientation.Left\n            || this.currentTourStep.orientation === Orientation.Right\n        ) {\n            return 0;\n        }\n\n        const scrollAdjustment = this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0;\n        const tourStepHeight = typeof this.tourStep.nativeElement.getBoundingClientRect === 'function' ? this.tourStep.nativeElement.getBoundingClientRect().height : 0;\n        const elementHeight = this.selectedElementRect.height + scrollAdjustment + tourStepHeight;\n\n        if ((this.windowRef.nativeWindow.innerHeight - this.topOfPageAdjustment) < elementHeight) {\n            return elementHeight - (this.windowRef.nativeWindow.innerHeight - this.topOfPageAdjustment);\n        }\n        return 0;\n    }\n}\n","import { GuidedTourService } from './guided-tour.service';\nimport { GuidedTourComponent } from './guided-tour.component';\nimport { NgModule, ErrorHandler, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { WindowRefService } from './windowref.service';\n\n@NgModule({\n  declarations: [GuidedTourComponent],\n  imports: [CommonModule],\n  providers: [WindowRefService],\n  exports: [GuidedTourComponent],\n  entryComponents: [GuidedTourComponent],\n})\nexport class GuidedTourModule {\n  public static forRoot(): ModuleWithProviders<GuidedTourModule> {\n    return {\n      ngModule: GuidedTourModule,\n      providers: [ErrorHandler, GuidedTourService],\n    };\n  }\n}\n","/*\n * Public API Surface of ngx-guided-tour\n */\n\nexport * from './lib/guided-tour.module';\nexport * from './lib/guided-tour.component';\nexport * from './lib/guided-tour.service';\nexport * from './lib/guided-tour.constants';\nexport * from './lib/windowref.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MA0Da,WAAW,CAAA;;AACG,WAAM,CAAA,MAAA,GAAG,QAAQ,CAAC;AAClB,WAAU,CAAA,UAAA,GAAG,aAAa,CAAC;AAC3B,WAAW,CAAA,WAAA,GAAG,cAAc,CAAC;AAC7B,WAAM,CAAA,MAAA,GAAG,QAAQ,CAAC;AAClB,WAAI,CAAA,IAAA,GAAG,MAAM,CAAC;AACd,WAAK,CAAA,KAAA,GAAG,OAAO,CAAC;AAChB,WAAG,CAAA,GAAA,GAAG,KAAK,CAAC;AACZ,WAAO,CAAA,OAAA,GAAG,UAAU,CAAC;AACrB,WAAQ,CAAA,QAAA,GAAG,WAAW,CAAC;AAGtC,IAAA,0BAIX;AAJD,CAAA,UAAY,yBAAyB,EAAA;AACjC,IAAA,yBAAA,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