@studiohyperdrive/ngx-tour
Version:
A lightweight and customizable Angular help tour approach using Angular CDK.
1 lines • 54.3 kB
Source Map (JSON)
{"version":3,"file":"studiohyperdrive-ngx-tour.mjs","sources":["../../../../../libs/angular/tour/src/lib/tokens/tour-step.token.ts","../../../../../libs/angular/tour/src/lib/utils/element-visible-in-viewport/element-visible-in-viewport.util.ts","../../../../../libs/angular/tour/src/lib/services/tour-service/tour.service.ts","../../../../../libs/angular/tour/src/lib/abstracts/tour-step/tour-step.component.ts","../../../../../libs/angular/tour/src/lib/directives/tour-item/tour-item.directive.ts","../../../../../libs/angular/tour/src/lib/providers/tour/provide-tour.util.ts","../../../../../libs/angular/tour/src/lib/operators/use-mock-data-during-tour/use-mock-data-during-tour.operator.ts","../../../../../libs/angular/tour/src/studiohyperdrive-ngx-tour.ts"],"sourcesContent":["import { InjectionToken, Type } from '@angular/core';\n\nimport { NgxTourStepComponent } from '../abstracts';\n\n/**\n * A token to provide the necessary configuration to the tour service\n */\nexport const NgxTourStepToken = new InjectionToken<Type<NgxTourStepComponent>>('NgxTourStepToken');\n","import { NgxTourStepOffset } from '../../types';\n\n/**\n * Determines whether an element is visible in the viewport.\n * It calculates the position that should be scrolled to, taking into account the provided offset and\n * the relative position of the element to the center of the viewport.s\n *\n * @param element - The provided element\n * @param offset - The optional configurable margin around the cutout\n */\nexport const elementIsVisibleInViewport = (\n\telement: HTMLElement,\n\tmargin: number,\n\toffset?: NgxTourStepOffset\n): {\n\tisVisible: boolean;\n\tscrollY: number | undefined;\n\trelativeTo: 'top' | 'bottom';\n} => {\n\tif (!element) {\n\t\t// Wouter: If element is not provided, return \"true\" as to prevent scrolling\n\t\treturn { isVisible: true, scrollY: undefined, relativeTo: 'top' };\n\t}\n\n\tconst { top, bottom, height: elementHeight } = element.getBoundingClientRect();\n\tconst { innerHeight, scrollY } = window;\n\n\tconst isVisible = top >= 0 && bottom <= innerHeight;\n\n\t// Wouter: If the vertical center of the element is on top of the vertical center of the viewport, the element is closer to the top\n\tconst isCloserToTop = top + elementHeight / 2 <= innerHeight / 2;\n\n\t// Wouter: If element is in viewport, return true\n\tif (isVisible) {\n\t\t// Wouter: Take the required offset into account\n\t\tif (isCloserToTop) {\n\t\t\treturn { isVisible: true, scrollY: scrollY - (offset?.top || 0), relativeTo: 'top' };\n\t\t}\n\n\t\treturn { isVisible: true, scrollY: scrollY + (offset?.bottom || 0), relativeTo: 'bottom' };\n\t}\n\n\t// Wouter: If element is not in viewport, calculate whether it is closer to top or bottom.\n\tif (isCloserToTop) {\n\t\t// Wouter: If closer to top, set scrollY to top of viewport and the provided offset\n\t\treturn {\n\t\t\tisVisible: false,\n\t\t\tscrollY: top - margin - (offset?.top || 0),\n\t\t\trelativeTo: 'top',\n\t\t};\n\t}\n\n\t// Wouter: If closer to bottom, set scrollY to bottom of viewport with an offset of the cutout height and the provided offset\n\treturn {\n\t\tisVisible: false,\n\t\tscrollY: bottom - innerHeight + margin + (offset?.bottom || 0),\n\t\trelativeTo: 'bottom',\n\t};\n};\n","import { ComponentRef, Inject, Injectable, OnDestroy, PLATFORM_ID } from '@angular/core';\nimport {\n\tBehaviorSubject,\n\tObservable,\n\tSubject,\n\tauditTime,\n\tcombineLatest,\n\tconcatMap,\n\tdelay,\n\tdistinctUntilChanged,\n\tfilter,\n\tmap,\n\tof,\n\tstartWith,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n} from 'rxjs';\nimport { ConnectedPosition, Overlay, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { isPlatformBrowser, isPlatformServer } from '@angular/common';\n\nimport { NgxTourStepComponent } from '../../abstracts';\nimport { NgxTourItemDirective } from '../../directives';\nimport { NgxTourStepToken } from '../../tokens';\nimport {\n\tNgxTourDirection,\n\tNgxTourAction,\n\tNgxTourStep,\n\tNgxTourInteraction,\n\tNgxTourStepPosition,\n\tNgxTourRegistrationEvent,\n\tNgxTourBackdropClipEvent,\n\tNgxTourTokenConfiguration,\n} from '../../types';\nimport { elementIsVisibleInViewport } from '../../utils';\n\n/**\n * A singleton service used to run help tours through an application.\n */\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class NgxTourService implements OnDestroy {\n\t/**\n\t * A subject to hold the destroyed event\n\t */\n\tprivate readonly destroyedSubject: Subject<void> = new Subject<void>();\n\n\t/**\n\t * A subject to hold the window resize event\n\t */\n\tprivate readonly windowResizeSubject: Subject<void> = new Subject<void>();\n\n\t/**\n\t * A subject to hold the backdrop clip event\n\t */\n\tprivate readonly backdropClipEventSubject: Subject<NgxTourBackdropClipEvent> =\n\t\tnew Subject<NgxTourBackdropClipEvent>();\n\n\t/**\n\t * A record of registered step elements we wish to highlight\n\t */\n\tprivate elements: Record<string, BehaviorSubject<NgxTourItemDirective>> = {};\n\n\t/**\n\t * Property to hold the current body overflow behavior\n\t */\n\tprivate bodyOverflow: string;\n\n\t/**\n\t * A record of positions to place the\n\t */\n\tprivate readonly positionMap: Record<NgxTourStepPosition, ConnectedPosition> = {\n\t\tbelow: { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n\t\tabove: { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' },\n\t\tleft: { originX: 'start', originY: 'bottom', overlayX: 'end', overlayY: 'bottom' },\n\t\tright: { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'bottom' },\n\t};\n\n\t/**\n\t * The currently active overlay\n\t */\n\tprivate overlayRef: OverlayRef;\n\n\t/**\n\t * The amount of steps of the current tour\n\t */\n\tprivate amountOfSteps: number = 0;\n\n\t/**\n\t * The current direction we're moving the tour in\n\t */\n\tprivate currentDirection: NgxTourDirection;\n\n\t/**\n\t * The currently active step in the tour as a subject\n\t */\n\tprivate readonly currentStepSubject: BehaviorSubject<NgxTourStep> =\n\t\tnew BehaviorSubject<NgxTourStep>(undefined);\n\n\t/**\n\t * The previously active step in the tour as a subject\n\t */\n\tprivate readonly previousStepSubject: BehaviorSubject<NgxTourStep> =\n\t\tnew BehaviorSubject<NgxTourStep>(undefined);\n\n\t/**\n\t * The index of the current step of the tour as a subject\n\t */\n\tprivate readonly currentIndexSubject: BehaviorSubject<number> = new BehaviorSubject<number>(0);\n\n\t/**\n\t * Whether the tour has started as a subject\n\t */\n\tprivate readonly tourStartedSubject: Subject<void> = new Subject();\n\n\t/**\n\t * Whether the tour has ended as a subject\n\t */\n\tprivate readonly tourEndedSubject: Subject<void> = new Subject();\n\n\t/**\n\t * The currently active tour as a subject\n\t */\n\tprivate readonly currentTourSubject: BehaviorSubject<NgxTourStep[]> = new BehaviorSubject<\n\t\tNgxTourStep[]\n\t>(undefined);\n\n\t/**\n\t * A subject to hold the registration events\n\t */\n\tprivate readonly registerElementSubject: Subject<NgxTourRegistrationEvent> =\n\t\tnew Subject<NgxTourRegistrationEvent>();\n\n\t/**\n\t * The start scroll position of the page\n\t */\n\tprivate startingScrollPosition: number;\n\n\t/**\n\t * The currently active tour\n\t */\n\tpublic readonly currentTour$: Observable<NgxTourStep[]> =\n\t\tthis.currentTourSubject.asObservable();\n\n\t/**\n\t * The currently active step\n\t */\n\tpublic readonly currentStep$: Observable<NgxTourStep> = this.currentStepSubject\n\t\t.asObservable()\n\t\t.pipe(distinctUntilChanged(), filter(Boolean));\n\n\t/**\n\t * The currently active index\n\t */\n\tpublic readonly currentIndex$: Observable<number> = this.currentIndexSubject\n\t\t.asObservable()\n\t\t.pipe(distinctUntilChanged());\n\n\t/**\n\t * The previously active step\n\t */\n\tpublic readonly previousStep$: Observable<NgxTourStep> = this.previousStepSubject\n\t\t.asObservable()\n\t\t.pipe(distinctUntilChanged(), filter(Boolean));\n\n\t/**\n\t * Whether the tour has ended\n\t */\n\tpublic readonly tourEnded$: Observable<void> = this.tourEndedSubject.asObservable();\n\n\t/**\n\t * Whether the tour has started\n\t */\n\tpublic readonly tourStarted$: Observable<void> = this.tourStartedSubject.asObservable();\n\n\t/**\n\t * Whether the tour is active\n\t */\n\tpublic readonly tourActive$: Observable<boolean> = this.currentStepSubject\n\t\t.asObservable()\n\t\t.pipe(map(Boolean));\n\n\tconstructor(\n\t\tprivate readonly cdkOverlayService: Overlay,\n\t\t@Inject(PLATFORM_ID) private readonly platformId: string,\n\t\t@Inject(NgxTourStepToken) private readonly configuration: NgxTourTokenConfiguration\n\t) {\n\t\t// Iben: We use a subject with concatMap here because we want each event to be handled correctly and the elements record should finish updating before updating it again.\n\t\tthis.registerElementSubject\n\t\t\t.pipe(\n\t\t\t\tfilter(Boolean),\n\t\t\t\tconcatMap((event) => {\n\t\t\t\t\treturn this.handleRegistrationEvent(event);\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.destroyedSubject)\n\t\t\t)\n\t\t\t.subscribe();\n\n\t\t// Iben: Listen to the onresize event of the window\n\t\tthis.runInBrowser(({ browserWindow }) => {\n\t\t\tbrowserWindow.onresize = () => {\n\t\t\t\tthis.windowResizeSubject.next();\n\t\t\t};\n\t\t});\n\t}\n\n\t/**\n\t * Start a provided tour\n\t *\n\t * @param tour - The tour we wish to start\n\t * @param onClose - An optional on close function we wish to run\n\t * @param startIndex - An optional index we wish to start the tour from , default this is 0\n\t */\n\tpublic startTour(\n\t\ttour: NgxTourStep[],\n\t\tonClose?: NgxTourAction,\n\t\tstartIndex = 0\n\t): Observable<void> {\n\t\t// Wouter: Early exit if the tour is run on the server, for which this service is not intended\n\t\tif (isPlatformServer(this.platformId)) {\n\t\t\tconsole.warn(\n\t\t\t\t'NgxTourService: The tour service is not intended to be run on the server. The tour will not be started.'\n\t\t\t);\n\n\t\t\treturn of(null);\n\t\t}\n\n\t\tthis.runInBrowser(({ browserWindow, browserDocument }) => {\n\t\t\t// Iben: Save the current scroll position so we can return to it when we close the tour\n\t\t\tthis.startingScrollPosition = browserWindow.scrollY;\n\n\t\t\t// Iben: Save the current\n\t\t\tthis.bodyOverflow = browserDocument.body.style.overflow;\n\t\t});\n\n\t\t// Iben: Loop over the tour and set subjects for all elements that haven't been found yet\n\t\ttour.forEach((step) => {\n\t\t\tif (!this.elements[step.tourItem]) {\n\t\t\t\tthis.elements[step.tourItem] = new BehaviorSubject<NgxTourItemDirective>(undefined);\n\t\t\t}\n\t\t});\n\n\t\t// Iben: Set the new tour\n\t\tthis.currentTourSubject.next(tour);\n\n\t\t// Iben: Set the amount of steps based on the length of the tour\n\t\tthis.amountOfSteps = tour.length;\n\n\t\t// Iben: Set the first two starting subjects\n\t\tthis.currentIndexSubject.next(startIndex);\n\t\tthis.tourStartedSubject.next();\n\n\t\t// Wouter: Set a class onto the body to indicate onto which styling can be added by the user\n\t\tthis.handleBodyClass('set');\n\n\t\t// Iben: Listen to the window resize and the backdrop clip event, so that when the window resizes, the clip path still works correctly\n\t\tcombineLatest([\n\t\t\tthis.windowResizeSubject.pipe(startWith(undefined)),\n\t\t\tthis.backdropClipEventSubject,\n\t\t])\n\t\t\t.pipe(\n\t\t\t\ttap(([, event]) => {\n\t\t\t\t\t// Iben: Set the clip path based on the event\n\t\t\t\t\tthis.setClipPath(event);\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.tourEnded$)\n\t\t\t)\n\t\t\t.subscribe();\n\n\t\t// Iben: Start the first tour, and run it until the tour is ended\n\t\tthis.setStep(tour[startIndex]).pipe(takeUntil(this.tourEnded$)).subscribe();\n\n\t\t// Iben: Listen to the end of the tour and run the end function when needed\n\t\treturn this.tourEndedSubject.asObservable().pipe(\n\t\t\ttake(1),\n\t\t\tswitchMap(() => this.runStepFunction(onClose)),\n\t\t\ttap(() => {\n\t\t\t\tthis.runInBrowser(({ browserWindow, browserDocument }) => {\n\t\t\t\t\t// Iben: Scroll back to the starting position\n\t\t\t\t\tbrowserWindow.scrollTo({ top: this.startingScrollPosition });\n\n\t\t\t\t\t// Iben: Restore the body overflow\n\t\t\t\t\tbrowserDocument.body.style.overflow = this.bodyOverflow;\n\t\t\t\t});\n\t\t\t}),\n\t\t\tmap(() => undefined)\n\t\t);\n\t}\n\n\t/**\n\t * Registers a template element so it can be highlighted\n\t *\n\t * @param element - The highlighted element\n\t */\n\tpublic registerElement(element: NgxTourItemDirective): void {\n\t\tthis.registerElementSubject.next({\n\t\t\ttourItem: element.tourItem,\n\t\t\telement,\n\t\t\ttype: 'register',\n\t\t});\n\t}\n\n\t/**\n\t * Removes an element from the record\n\t *\n\t * @param tourItem - The id of the element\n\t */\n\tpublic unregisterElement(tourItem: string): void {\n\t\tthis.registerElementSubject.next({\n\t\t\ttourItem,\n\t\t\ttype: 'unregister',\n\t\t});\n\t}\n\n\t/**\n\t * Closes the currently running tour\n\t */\n\tpublic closeTour(): Observable<NgxTourInteraction> {\n\t\t// Iben: Remove the current overlay\n\t\tif (this.overlayRef) {\n\t\t\tthis.overlayRef.dispose();\n\t\t\tthis.overlayRef = undefined;\n\t\t}\n\n\t\t// Iben: Set the current and previous item to inactive\n\t\tthis.elements[this.currentStepSubject.getValue()?.tourItem]?.getValue()?.setActive(false);\n\t\tthis.elements[this.previousStepSubject.getValue()?.tourItem]?.getValue()?.setActive(false);\n\n\t\t// Iben: Reset the subjects\n\t\tthis.currentStepSubject.next(undefined);\n\t\tthis.previousStepSubject.next(undefined);\n\n\t\t// Iben: Reset the tour and the tour length\n\t\tthis.currentTourSubject.next(undefined);\n\t\tthis.amountOfSteps = 0;\n\n\t\t// Wouter: Remove the body class\n\t\tthis.handleBodyClass('remove');\n\n\t\t// Iben: Emit the end of the tour\n\t\tthis.tourEndedSubject.next();\n\n\t\t// Iben: Return an empty Observable\n\t\treturn of(null);\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Iben: Complete all subscriptions\n\t\tthis.destroyedSubject.next();\n\t\tthis.destroyedSubject.complete();\n\t\tthis.tourEndedSubject.next();\n\t\tthis.tourEndedSubject.complete();\n\t\tthis.windowResizeSubject.next();\n\t\tthis.windowResizeSubject.complete();\n\n\t\t// Wouter: Remove the body class\n\t\tthis.handleBodyClass('remove');\n\n\t\t// Iben: Get rid of the onresize event\n\t\tthis.runInBrowser(({ browserWindow }) => {\n\t\t\tbrowserWindow.onresize = null;\n\t\t});\n\t}\n\n\t/**\n\t * Sets a provided step in the tour\n\t *\n\t * @param currentStep - The provided step we want to set\n\t */\n\tprivate setStep(currentStep: NgxTourStep): Observable<NgxTourInteraction> {\n\t\t// Iben: Get the previous step, if it exists\n\t\tconst previousStep = this.currentStepSubject.getValue();\n\t\tconst previousItem = this.elements[previousStep?.tourItem]?.getValue();\n\n\t\t// Iben: Set the previous item back to inactive\n\t\tif (previousItem) {\n\t\t\tpreviousItem.setActive(false);\n\t\t}\n\n\t\t// Iben: Early exit and close tour if there's no current step\n\t\tif (!currentStep) {\n\t\t\treturn this.closeTour();\n\t\t}\n\n\t\t// Iben: Run the afterVisible of the previous step\n\t\treturn this.runStepFunction(previousStep?.afterVisible).pipe(\n\t\t\t// Iben: Run the beforeVisible of the current step\n\t\t\tconcatMap(() => {\n\t\t\t\treturn this.runStepFunction(currentStep.beforeVisible);\n\t\t\t}),\n\t\t\t// Wouter: Add a delay to allow the change detection to be ran before the step is visualized.\n\t\t\t// This makes sure the bounding box of the highlighted element is correct.\n\t\t\tdelay(1),\n\t\t\tconcatMap(() => {\n\t\t\t\t// Iben: If no tourItem was provided, we render the step in the center of the page\n\t\t\t\tif (!currentStep.tourItem) {\n\t\t\t\t\treturn this.handleStepInteractions(currentStep);\n\t\t\t\t}\n\n\t\t\t\t// Iben: If a tourItem was provided, we know we have to search for the element\n\t\t\t\treturn this.elements[currentStep.tourItem].pipe(\n\t\t\t\t\t// Iben: Check if the item already exists. If not, we wait and grab the latest emit using auditTime\n\t\t\t\t\t// We do this to avoid a delay when going back and forth in the tour\n\t\t\t\t\tconcatMap((item) => {\n\t\t\t\t\t\treturn item\n\t\t\t\t\t\t\t? of(item)\n\t\t\t\t\t\t\t: this.elements[currentStep.tourItem].pipe(\n\t\t\t\t\t\t\t\t\t// Iben: If no delay was provided, we use the default of 100ms\n\t\t\t\t\t\t\t\t\tauditTime(currentStep.delay || 100)\n\t\t\t\t\t\t\t );\n\t\t\t\t\t}),\n\t\t\t\t\ttake(1),\n\t\t\t\t\tswitchMap((item) => {\n\t\t\t\t\t\t// Iben: If an item wasn't found, we move in the current direction until we find an element\n\t\t\t\t\t\tif (!item) {\n\t\t\t\t\t\t\treturn this.handleNext(this.currentDirection || 'next');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Iben: If the item was found, we visualize the step\n\t\t\t\t\t\treturn this.handleStepInteractions(currentStep, item);\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t})\n\t\t);\n\t}\n\n\t/**\n\t * Handles the next action in the tour\n\t *\n\t * @param direction - The direction we wish to move in\n\t */\n\tprivate handleNext(direction: NgxTourDirection): Observable<NgxTourInteraction> {\n\t\t// Iben set the current direction so we know in which way we're moving the tour\n\t\tthis.currentDirection = direction;\n\n\t\t// Iben: Get the new index\n\t\tconst index =\n\t\t\tdirection === 'next'\n\t\t\t\t? this.currentIndexSubject.getValue() + 1\n\t\t\t\t: this.currentIndexSubject.getValue() - 1;\n\n\t\t// Iben: Update the new index\n\t\tthis.currentIndexSubject.next(index);\n\n\t\t// Iben: Set the next step in the tour\n\t\treturn this.setStep(this.currentTourSubject.getValue()[index]);\n\t}\n\n\t/**\n\t * Visualizes the current step\n\t *\n\t * @private\n\t * @param currentStep - The step we wish to visualize\n\t * @param item - The item we wish to highlight\n\t */\n\tprivate visualizeStep(\n\t\tcurrentStep: NgxTourStep,\n\t\titem?: NgxTourItemDirective\n\t): ComponentRef<NgxTourStepComponent> {\n\t\treturn this.runInBrowser(({ browserDocument, browserWindow }) => {\n\t\t\t// Iben: Update the previous and current step subject\n\t\t\tthis.previousStepSubject.next(this.currentStepSubject.getValue());\n\t\t\tthis.currentStepSubject.next(currentStep);\n\n\t\t\t// Iben: Restore the body overflow so we can scroll to the right element\n\t\t\tbrowserDocument.body.style.overflow = this.bodyOverflow;\n\n\t\t\t// Iben: Calculate the defaultOffsets\n\t\t\t// Wouter: This needs to happen before we calculate the scroll position\n\t\t\tconst margin = this.getCutoutMargin(currentStep);\n\n\t\t\t// Iben: Scroll to the top before each step to get consistent behavior when going back and forth\n\t\t\tbrowserWindow.scrollTo({ top: 0 });\n\n\t\t\tconst { isVisible, scrollY, relativeTo } = elementIsVisibleInViewport(\n\t\t\t\titem?.elementRef?.nativeElement,\n\t\t\t\tmargin,\n\t\t\t\t{ ...this.configuration.offset, ...currentStep?.offset }\n\t\t\t);\n\n\t\t\t// Iben: Scroll to the element if it's not in view\n\t\t\tif (!isVisible) {\n\t\t\t\tbrowserWindow.scrollTo({ top: scrollY });\n\t\t\t}\n\n\t\t\t// Iben: Disable scrolling\n\t\t\tbrowserDocument.body.style.overflow = 'hidden';\n\n\t\t\t// Wouter: Calculate the step's position so that it is rendered relatively to the cutout\n\t\t\tconst relativeDisplay: NgxTourStepPosition = relativeTo == 'bottom' ? 'above' : 'below';\n\t\t\tconst positionY = currentStep.position ? currentStep.position : relativeDisplay;\n\t\t\tconst offsetY = positionY === 'above' ? -margin : margin;\n\t\t\tconst offsetX = currentStep.position === 'right' ? margin : -margin;\n\n\t\t\t// Iben: Determine the position of the item based on whether a tourItem was provided\n\t\t\tconst positionStrategy = item\n\t\t\t\t? this.cdkOverlayService\n\t\t\t\t\t\t.position()\n\t\t\t\t\t\t.flexibleConnectedTo(item.elementRef)\n\t\t\t\t\t\t.withDefaultOffsetY(offsetY)\n\t\t\t\t\t\t.withDefaultOffsetX(offsetX)\n\t\t\t\t\t\t.withPositions([this.positionMap[currentStep.position || relativeDisplay]])\n\t\t\t\t: this.cdkOverlayService\n\t\t\t\t\t\t.position()\n\t\t\t\t\t\t.global()\n\t\t\t\t\t\t.centerHorizontally()\n\t\t\t\t\t\t.centerVertically();\n\n\t\t\t// Iben: Create an overlay if it does not exist\n\t\t\tif (!this.overlayRef) {\n\t\t\t\t// Iben: Create an overlay config\n\t\t\t\tconst config = new OverlayConfig({\n\t\t\t\t\thasBackdrop: !currentStep.disableBackDrop,\n\t\t\t\t\t// Iben: Due to issues with how the scrollingStrategy.block() works with scrolling to items that are not in view, we set this to noop\n\t\t\t\t\tscrollStrategy: this.cdkOverlayService.scrollStrategies.noop(),\n\t\t\t\t\tpositionStrategy,\n\t\t\t\t});\n\n\t\t\t\t// Create the overlay\n\t\t\t\tthis.overlayRef = this.cdkOverlayService.create(config);\n\t\t\t} else {\n\t\t\t\t// Iben: Detach the previous portal\n\t\t\t\tthis.overlayRef.detach();\n\n\t\t\t\t// Iben: If the overlay exists, we update the position strategy\n\t\t\t\tthis.overlayRef.updatePositionStrategy(positionStrategy);\n\n\t\t\t\t// Iben: If the current step has no backdrop, we detach the backdrop\n\t\t\t\tif (currentStep.disableBackDrop) {\n\t\t\t\t\tthis.overlayRef.detachBackdrop();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Iben: Create a portal and attach the component\n\t\t\tconst portal = new ComponentPortal<NgxTourStepComponent>(\n\t\t\t\t// Iben: If the currentStep has its own component, we overwrite it\n\t\t\t\tcurrentStep.component || this.configuration.component\n\t\t\t);\n\n\t\t\tconst componentRef = this.overlayRef.attach(portal);\n\t\t\tconst component = componentRef.instance;\n\n\t\t\t// Iben: Update the data of the component\n\t\t\tcomponent.content = currentStep.content;\n\t\t\tcomponent.title = currentStep.title;\n\t\t\tcomponent.data = currentStep.data;\n\t\t\tcomponent.currentStep = this.currentIndexSubject.getValue();\n\t\t\tcomponent.amountOfSteps = this.amountOfSteps;\n\t\t\tcomponent.position = item ? currentStep.position || 'below' : undefined;\n\t\t\tcomponent.stepClass = currentStep.stepClass;\n\t\t\tcomponent.elementId = item?.elementId;\n\n\t\t\t// Iben: Highlight the current html item as active if one is provided\n\t\t\tif (item) {\n\t\t\t\t// Iben: Set the active class of the item\n\t\t\t\titem.setActive(true);\n\t\t\t}\n\n\t\t\t// Iben: Set the clip path of the backdrop\n\t\t\tthis.backdropClipEventSubject.next({\n\t\t\t\tbackdrop: this.overlayRef.backdropElement,\n\t\t\t\titem: item?.elementRef?.nativeElement,\n\t\t\t\tcutoutMargin: this.getCutoutMargin(currentStep),\n\t\t\t});\n\n\t\t\t// Iben: Return the new component\n\t\t\treturn componentRef;\n\t\t});\n\t}\n\n\t/**\n\t * Handles the interactions with a step\n\t *\n\t * @param currentStep - The provided step\n\t * @param item - An optional item\n\t */\n\tprivate handleStepInteractions(\n\t\tcurrentStep: NgxTourStep,\n\t\titem?: NgxTourItemDirective\n\t): Observable<NgxTourInteraction> {\n\t\t// Iben: If the item was found, we visualize the step\n\t\tconst componentRef = this.visualizeStep(currentStep, item);\n\n\t\treturn this.runStepFunction(currentStep.onVisible).pipe(\n\t\t\tconcatMap(() => {\n\t\t\t\t// Iben: Listen to the component interactions and respond accordingly\n\t\t\t\treturn componentRef.instance.handleInteraction.pipe(\n\t\t\t\t\ttake(1),\n\t\t\t\t\tconcatMap((interaction: NgxTourInteraction) => {\n\t\t\t\t\t\treturn interaction === 'close'\n\t\t\t\t\t\t\t? this.closeTour()\n\t\t\t\t\t\t\t: this.handleNext(interaction);\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t})\n\t\t);\n\t}\n\n\t/**\n\t * Returns an observable based on whether a step function was provided\n\t *\n\t * @param stepFunction - The provided step function\n\t */\n\tprivate runStepFunction(stepFunction?: NgxTourAction): Observable<unknown> {\n\t\t// Iben: If no step function was provided, we simply return a single void of\n\t\tif (!stepFunction) {\n\t\t\treturn of(null);\n\t\t}\n\n\t\t// Iben: Run the step function and depending on the result, we return the result or an of.\n\t\treturn (\n\t\t\tstepFunction(this.currentStepSubject.getValue(), this.currentIndexSubject.getValue()) ||\n\t\t\tof(null)\n\t\t).pipe(\n\t\t\t// Iben: We add a take(1) as an extra safety measure in case users end up not taking care of this\n\t\t\ttake(1)\n\t\t);\n\t}\n\n\t/**\n\t * Surrounds the provided item with a cutout in the backdrop\n\t *\n\t * @private\n\t * @param backdrop - The provided backdrop\n\t * @param item - The item we wish to surround\n\t * @param cutoutMargin - The amount of margin we want around the item\n\t */\n\tprivate setClipPath(event: NgxTourBackdropClipEvent): void {\n\t\tconst { backdrop, item, cutoutMargin } = event;\n\n\t\t// Iben: Early exit in case no backdrop or item is present\n\t\tif (!backdrop || !item) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: Get the positions of the path around the item\n\t\tconst { top, left, bottom, right } = item.getBoundingClientRect();\n\t\tconst positionTop = top - cutoutMargin;\n\t\tconst positionLeft = left - cutoutMargin;\n\t\tconst positionBottom = bottom + cutoutMargin;\n\t\tconst positionRight = right + cutoutMargin;\n\n\t\t// Iben: Create the box around the item\n\t\tconst box = `${positionLeft}px ${positionTop}px, ${positionRight}px ${positionTop}px, ${positionRight}px ${positionBottom}px, ${positionLeft}px ${positionBottom}px, ${positionLeft}px ${positionTop}px`;\n\n\t\t// Iben: Clip the box out of the backdrop\n\t\tbackdrop.style.clipPath = `polygon(evenodd, 0% 0%, 0% 100%, 100% 100%, 100% 0%, 0% 0%,${box})`;\n\t}\n\n\t/**\n\t * Handles the registration event\n\t *\n\t * @param event - The registration event we wish to handle\n\t */\n\tprivate handleRegistrationEvent(event: NgxTourRegistrationEvent): Observable<null> {\n\t\t// Iben: Early exit if no event was found\n\t\tif (!event) {\n\t\t\treturn of(null);\n\t\t}\n\n\t\t// Iben: Unregister the element if it's an unregister event\n\t\tif (event.type === 'unregister') {\n\t\t\tthis.elements[event.tourItem]?.next(undefined);\n\t\t\treturn of(null);\n\t\t}\n\n\t\t// Iben: Early exit if no element was found\n\t\tif (!event.element) {\n\t\t\treturn of(null);\n\t\t}\n\n\t\t// Iben: Check if there is already an item with the current id. If it is, update it, if not, make a new BehaviorSubject\n\t\tconst elementSubject = this.elements[event.tourItem];\n\n\t\t// Iben: If we have an element subject already, we check if it already has an element\n\t\tif (elementSubject) {\n\t\t\t// Iben: If the current value is undefined, we register the element\n\t\t\tif (elementSubject.getValue() === undefined) {\n\t\t\t\telementSubject.next(event.element);\n\t\t\t}\n\n\t\t\treturn of(null);\n\t\t}\n\n\t\t// Iben: If no BehaviorSubject exists, we create one\n\t\tthis.elements[event.tourItem] = new BehaviorSubject<NgxTourItemDirective>(event.element);\n\n\t\treturn of(null);\n\t}\n\n\t/**\n\t * Returns the provided cutoutMargin of a step, or 5px if none is provided\n\t *\n\t * @param step - The current step\n\t */\n\tprivate getCutoutMargin(step: NgxTourStep): number {\n\t\treturn step?.cutoutMargin === undefined ? 5 : step.cutoutMargin;\n\t}\n\n\t/**\n\t * Sets or removes the body class to indicate the tour is active\n\t */\n\tprivate handleBodyClass(action: 'set' | 'remove'): void {\n\t\tthis.runInBrowser(({ browserDocument }) => {\n\t\t\tif (action === 'set') {\n\t\t\t\tbrowserDocument.body.classList.add('ngx-tour-active');\n\t\t\t} else {\n\t\t\t\tbrowserDocument.body.classList.remove('ngx-tour-active');\n\t\t\t}\n\t\t});\n\t}\n\n\t//TODO: Iben: Remove this function in service of the WindowService once it is shared\n\tprivate runInBrowser<ReturnType = void>(\n\t\tcallback: (data: { browserWindow: Window; browserDocument: Document }) => ReturnType\n\t): ReturnType {\n\t\tif (isPlatformBrowser(this.platformId)) {\n\t\t\treturn callback({ browserWindow: document.defaultView, browserDocument: document });\n\t\t}\n\n\t\treturn undefined;\n\t}\n}\n","import {\n\tAfterViewInit,\n\tDirective,\n\tElementRef,\n\tEventEmitter,\n\tHostBinding,\n\tHostListener,\n\tInput,\n\tOnInit,\n\tOutput,\n\tsignal,\n\tViewChild,\n\tWritableSignal,\n} from '@angular/core';\nimport { UUID } from 'angular2-uuid';\n\nimport { NgxTourInteraction, NgxTourStepPosition } from '../../types';\nimport { NgxTourService } from '../../services';\n\n/**\n * An abstract class that defines the minimum properties needed for the step component to be rendered\n */\n@Directive({\n\thost: {\n\t\trole: 'dialog',\n\t\t'[attr.aria-modal]': 'true',\n\t\t'[attr.aria-labelledby]': 'titleId()',\n\t},\n\tstandalone: false,\n})\nexport abstract class NgxTourStepComponent<DataType = any> implements OnInit, AfterViewInit {\n\t/**\n\t * Close the tour on escape pressed\n\t */\n\t@HostListener('document:keydown.escape') private onEscape() {\n\t\tthis.tourService.closeTour().subscribe();\n\t}\n\n\t/**\n\t * The ngx-tour-step class of the component\n\t */\n\t@HostBinding('class') protected rootClass: string;\n\n\t/**\n\t * The id of the element that the tour-step describes\n\t */\n\t@HostBinding('attr.aria-details') @Input({ required: true }) public elementId: string;\n\n\t/**\n\t * The element of the tour-step that is seen as the title\n\t */\n\t@ViewChild('stepTitle') public titleElement: ElementRef<HTMLElement>;\n\n\t/**\n\t * The position of the step\n\t */\n\t@Input({\n\t\trequired: true,\n\t})\n\tpublic position: NgxTourStepPosition | undefined;\n\n\t/**\n\t * The title of the step\n\t */\n\t@Input({ required: true }) public title: string;\n\n\t/**\n\t * The content of the step\n\t */\n\t@Input({ required: true }) public content: string;\n\n\t/**\n\t * The index of the step\n\t */\n\t@Input({ required: true }) public currentStep: number;\n\n\t/**\n\t * The total amount of steps\n\t */\n\t@Input({ required: true }) public amountOfSteps: number;\n\n\t/**\n\t * Optional data we wish to use in a step\n\t */\n\t@Input() public data: DataType;\n\n\t/**\n\t * A custom step class we can set\n\t */\n\t@Input() public stepClass: string;\n\n\t/**\n\t * Emits the possible interactions with a step\n\t */\n\t@Output() public handleInteraction: EventEmitter<NgxTourInteraction> =\n\t\tnew EventEmitter<NgxTourInteraction>();\n\n\t/**\n\t * The aria-labelledby id of the title element\n\t */\n\tprivate titleId: WritableSignal<string> = signal('');\n\n\tpublic ngOnInit(): void {\n\t\t// Iben: We set the correct host class. As this step is rendered and not changed afterwards, we do not have to adjust this in the onChanges\n\t\tconst positionClass = this.position ? `ngx-tour-step-position-${this.position}` : '';\n\t\tthis.rootClass = `ngx-tour-step ${positionClass} ${this.stepClass || ''}`;\n\t}\n\n\tpublic ngAfterViewInit(): void {\n\t\t// Iben: If no title element was found, we throw an error\n\t\tif (!this.titleElement) {\n\t\t\tconsole.error(\n\t\t\t\t'NgxTourService: The tour step component does not have an element marked with `stepTitle`. Because of that, the necessary accessibility attributes could not be set. Please add the `stepTitle` tag to the element that represents the title of the step.'\n\t\t\t);\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Iben: Connect the aria-labbledby tag to the title element\n\t\tlet id = this.titleElement.nativeElement.getAttribute('id');\n\n\t\t// Iben: If the title element does not have an id, we generate one\n\t\tif (!id) {\n\t\t\tid = UUID.UUID();\n\t\t\tthis.titleElement.nativeElement.setAttribute('id', id);\n\t\t}\n\n\t\t// Iben: To prevent issues with changeDetection, we use a signal here to update the id\n\t\tthis.titleId.set(id);\n\t}\n\n\tconstructor(private readonly tourService: NgxTourService) {}\n}\n","import {\n\tAfterViewInit,\n\tChangeDetectorRef,\n\tDirective,\n\tElementRef,\n\tHostBinding,\n\tInput,\n\tOnDestroy,\n} from '@angular/core';\nimport { UUID } from 'angular2-uuid';\n\nimport { NgxTourService } from '../../services';\n\n/**\n * A directive to mark elements in the DOM to be highlighted during a tour\n */\n@Directive({\n\tselector: '[tourItem]',\n\tstandalone: true,\n})\nexport class NgxTourItemDirective implements AfterViewInit, OnDestroy {\n\t/**\n\t * A class added to the currently active item\n\t */\n\t@HostBinding('class.ngx-tour-item-active') public isActive: boolean = false;\n\n\t/**\n\t * The id of the item that corresponds with the step\n\t */\n\t@Input() public tourItem: string;\n\n\tconstructor(\n\t\tpublic readonly elementRef: ElementRef<HTMLElement>,\n\t\tprivate readonly tourService: NgxTourService,\n\t\tprivate readonly cdRef: ChangeDetectorRef\n\t) {}\n\n\t/**\n\t * Mark an element as active or inactive\n\t *\n\t * @param isActive - Whether or not the element should be active\n\t */\n\tpublic setActive(isActive: boolean): void {\n\t\t// Iben: Mark the current item as active or inactive\n\t\tthis.isActive = isActive;\n\n\t\t// Iben: Detect the changes on the component\n\t\tthis.cdRef.detectChanges();\n\t}\n\n\t/**\n\t * Returns the id of the element. Uses for the `aria-details` on the tour-item component\n\t */\n\tpublic get elementId(): string {\n\t\treturn this.elementRef.nativeElement.getAttribute('id');\n\t}\n\n\tpublic ngAfterViewInit(): void {\n\t\t// Iben: Register the element when rendered\n\t\tthis.tourService.registerElement(this);\n\n\t\t// Iben: Check if the element has an id, if not, give it a new id for accessibility\n\t\tif (!this.elementRef.nativeElement.getAttribute('id')) {\n\t\t\tthis.elementRef.nativeElement.setAttribute('id', UUID.UUID());\n\t\t}\n\t}\n\n\tpublic ngOnDestroy(): void {\n\t\t// Iben: Unregister the element when the element gets destroyed\n\t\tthis.tourService.unregisterElement(this.tourItem);\n\t}\n}\n","import { Provider } from '@angular/core';\n\nimport { NgxTourStepToken } from '../../tokens';\nimport { NgxTourTokenConfiguration, NgxTourTokenType } from '../../types';\n\n/**\n * Provides the configuration for the NgxDisplayContent directive. This can be either just\n * the component or the component and the offset. More information can be found in the\n * documentation of the `NgxTourStep`.\n *\n * @param configuration - The required configuration\n */\nexport const provideNgxTourConfiguration = (configuration: NgxTourTokenType): Provider => {\n\treturn {\n\t\tprovide: NgxTourStepToken,\n\t\tuseValue:\n\t\t\t// Wouter: If the configuration is an object, return it as is. If it is a component, return it as an object with the component as the `component` property and a default offset.\n\t\t\ttypeof configuration === 'object'\n\t\t\t\t? (configuration as NgxTourTokenConfiguration)\n\t\t\t\t: ({\n\t\t\t\t\t\tcomponent: configuration,\n\t\t\t\t\t\toffset: { top: 0, bottom: 0 },\n\t\t\t\t } as NgxTourTokenConfiguration),\n\t};\n};\n","import { inject } from '@angular/core';\nimport { OperatorFunction, combineLatest, map, of, switchMap } from 'rxjs';\n\nimport { NgxTourService } from '../../services';\n\n/**\n * An operator to map the data of an Observable to mock data when the NgxTourService has an active tour.\n *\n * *Important*: This operator only works within an injection context\n *\n * @param mockData - The mock data we wish to use when the tour is active\n */\nexport const useMockDataDuringTour = <ValueType>(\n\tmockData: ValueType\n): OperatorFunction<ValueType, ValueType> => {\n\t// Iben: Inject the tour service\n\tconst tourService: NgxTourService = inject(NgxTourService);\n\n\t// Iben: Listen to the active state of the tour\n\treturn switchMap((value: ValueType) => {\n\t\treturn combineLatest([of(value), tourService.tourActive$]).pipe(\n\t\t\tmap(([value, isActive]) => {\n\t\t\t\t// Iben: If the tour is active, return the mockData, else, return the value\n\t\t\t\tif (isActive) {\n\t\t\t\t\treturn mockData;\n\t\t\t\t}\n\n\t\t\t\treturn value;\n\t\t\t})\n\t\t);\n\t});\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.NgxTourService"],"mappings":";;;;;;;;;AAIA;;AAEG;AACI,MAAM,gBAAgB,GAAG,IAAI,cAAc,CAA6B,kBAAkB,CAAC;;ACLlG;;;;;;;AAOG;AACI,MAAM,0BAA0B,GAAG,CACzC,OAAoB,EACpB,MAAc,EACd,MAA0B,KAKvB;IACH,IAAI,CAAC,OAAO,EAAE;;AAEb,QAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE;;AAGlE,IAAA,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,qBAAqB,EAAE;AAC9E,IAAA,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,MAAM;IAEvC,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,IAAI,MAAM,IAAI,WAAW;;IAGnD,MAAM,aAAa,GAAG,GAAG,GAAG,aAAa,GAAG,CAAC,IAAI,WAAW,GAAG,CAAC;;IAGhE,IAAI,SAAS,EAAE;;QAEd,IAAI,aAAa,EAAE;YAClB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE;;QAGrF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE;;;IAI3F,IAAI,aAAa,EAAE;;QAElB,OAAO;AACN,YAAA,SAAS,EAAE,KAAK;YAChB,OAAO,EAAE,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,GAAG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