{"version":3,"file":"chunk-hschodgx.js","sources":["packages/vanilla/lib/features/hint/src/hint.html","packages/vanilla/lib/features/hint/src/hint.component.ts","packages/vanilla/lib/features/hint/src/hint-overlay.service.ts","packages/vanilla/lib/features/hint/src/hint-queue.service.ts","packages/vanilla/lib/features/hint/src/hint.models.ts","packages/vanilla/lib/features/hint/src/hint-bootstrap.service.ts","packages/vanilla/lib/features/hint/src/hint.feature.ts"],"sourcesContent":["@if (hint; as hint) {\n
\n @if (hint?.parameters; as parameters) {\n @if (parameters.hintIcon) {\n \n }\n @if (parameters.showCloseButton === 'true') {\n \n }\n }\n @if (hint; as hint) {\n \n }\n
\n}\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit, ViewEncapsulation, inject } from '@angular/core';\n\nimport { ContentItem, WebWorkerService, WorkerType } from '@frontend/vanilla/core';\nimport { PageMatrixComponent } from '@frontend/vanilla/features/content';\nimport { IconCustomComponent } from '@frontend/vanilla/shared/icons';\nimport { toNumber } from 'lodash-es';\n\n@Component({\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, PageMatrixComponent, IconCustomComponent],\n selector: 'vn-hint',\n templateUrl: 'hint.html',\n styleUrls: ['../../../../../themepark/themes/whitelabel/components/bookmark-hint/styles.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class HintComponent implements OnInit, OnDestroy {\n @Input() hint?: ContentItem;\n closeIcon: string;\n\n private overlayRef = inject(OverlayRef);\n private webWorkerService = inject(WebWorkerService);\n\n ngOnInit() {\n this.closeIcon = this.hint?.parameters?.['closeIcon'] || 'theme-close-i';\n const timeOutParam = this.hint?.parameters?.['timeOut'];\n\n if (timeOutParam) {\n const timeOut = toNumber(timeOutParam);\n\n if (timeOut) {\n this.webWorkerService.createWorker(WorkerType.HintTimerTimeout, { timeout: timeOut }, () => {\n this.closeMessage();\n });\n }\n }\n }\n\n ngOnDestroy() {\n this.webWorkerService.removeWorker(WorkerType.HintTimerTimeout);\n }\n\n closeMessage() {\n this.overlayRef.detach();\n }\n}\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ComponentRef, Injectable, Injector } from '@angular/core';\n\nimport { ContentItem } from '@frontend/vanilla/core';\nimport { OverlayFactory } from '@frontend/vanilla/shared/overlay-factory';\n\nimport { HintComponent } from './hint.component';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class HintOverlayService {\n constructor(\n private overlay: OverlayFactory,\n private injector: Injector,\n ) {}\n\n show(item: ContentItem): [OverlayRef, ComponentRef] {\n const overlayRef = this.overlay.create({\n panelClass: 'vn-overlay-hint-container',\n scrollStrategy: this.overlay.scrollStrategies.noop(),\n });\n overlayRef.backdropClick().subscribe(() => overlayRef.detach());\n\n const portal = new ComponentPortal(\n HintComponent,\n null,\n Injector.create({\n providers: [{ provide: OverlayRef, useValue: overlayRef }],\n parent: this.injector,\n }),\n );\n const componentRef = overlayRef.attach(portal);\n componentRef.setInput('hint', item);\n\n return [overlayRef, componentRef];\n }\n}\n","import { OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentRef, Injectable } from '@angular/core';\n\nimport {\n ContentItem,\n ContentService,\n CookieDBService,\n CookieList,\n CookieName,\n Logger,\n Page,\n ProductService,\n UserEvent,\n UserLoginEvent,\n UserService,\n WebWorkerService,\n WorkerType,\n toBoolean,\n} from '@frontend/vanilla/core';\nimport { isNumber } from 'lodash-es';\nimport { catchError, first, map } from 'rxjs/operators';\n\nimport { HintOverlayService } from './hint-overlay.service';\nimport { HintComponent } from './hint.component';\nimport { HintQueueItem } from './hint.models';\n\n/**\n * @whatItDoes Displays hints defined in sitecore with configurable number of displays.\n *\n * @howToUse\n * ```\n * this.hintQueueService.add('hint1'); // the name is reference to a sitecore item 'App-v1.0/Hints/Hint1'. Name can be the name of item or the name of a folder.\n * ```\n *\n * @description\n *\n * All hints content is loaded asynchronously from sitecore folder `App-v1.0/Hints` when first used. Then the names of hints to be shown\n * are stored in a cookie. Once currently shown hint from the queue is hidden (by user clicking on it or a timeout), the next one in the queue is shown.\n *\n * ### Parameters that can be set in sitecore item:\n *\n * `showCloseButton` - show close button.\n * `hintClass` - custom class on hint.\n * `timeOut` - time to live in milliseconds.\n * `displayCounter` - indicates number of times that the hint will be shown after it was closed.\n * `cookieExpireDays` - indicates number of days after hint will be shown again when it was shown max number of times. Use in combination with displayCounter.\n * `isProductSpecific` - indicates if hint is product specific. Use in combination with displayCounter.\n *\n * @stable\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class HintQueueService {\n private currentRef: OverlayRef | null;\n private componentRef: ComponentRef | null;\n private hintsContent: ContentItem[];\n private loading: boolean;\n private db: CookieList;\n\n constructor(\n private contentService: ContentService,\n private log: Logger,\n private page: Page,\n private user: UserService,\n private hintOverlayService: HintOverlayService,\n private productService: ProductService,\n private webWorkerService: WebWorkerService,\n cookieDBService: CookieDBService,\n ) {\n this.db = cookieDBService.createList(CookieName.HintQueue, this.generateExpiryDate(365));\n }\n\n add(name: string) {\n if (!name) {\n return;\n }\n\n name = name.toLowerCase();\n this.removeExpired();\n\n const isItemInQueue = this.db.getOne((hint: HintQueueItem) => this.predicate(hint, name));\n\n if (isItemInQueue) {\n this.db.update(\n (hint: HintQueueItem) => this.predicate(hint, name),\n (hint: HintQueueItem) => (hint.shouldShow = true),\n );\n } else {\n this.db.insert({ name, shouldShow: true });\n }\n\n this.webWorkerService.createWorker(WorkerType.HintQueueTimeout, { timeout: 0 }, () => {\n this.display();\n this.webWorkerService.removeWorker(WorkerType.HintQueueTimeout);\n });\n }\n\n remove(name: string) {\n if (name) {\n this.db.delete((hint: HintQueueItem) => hint.name === name.toLowerCase());\n }\n }\n\n clear() {\n this.db.deleteAll();\n }\n\n // fetch hint based on name and product\n private predicate: (hint: HintQueueItem, name: string) => boolean = (hint: HintQueueItem, name: string) =>\n hint.name === name && (hint.product === this.productService.current.name || !hint.product);\n\n private removeExpired() {\n this.db.delete((hint: HintQueueItem) => !!hint.expires && new Date().getTime() > hint.expires);\n }\n\n private display() {\n if (this.currentRef) {\n return;\n }\n\n if (this.hintsContent) {\n this.showNextHint();\n } else {\n this.loadHints();\n }\n }\n\n private showNextHint() {\n const item = this.db.getOne((hint: HintQueueItem) => hint.shouldShow && (hint.product === this.productService.current.name || !hint.product));\n\n if (!item) {\n return;\n }\n\n const normalizedName = item.name.toLowerCase();\n let hint = this.hintsContent.find((contentItem: ContentItem) => contentItem.name === normalizedName);\n\n // If the hint name corresponds to folder name in `App-v1.0/Hints` than take the first item from that folder.\n if (hint?.items) {\n hint = hint.items[0];\n }\n\n if (!hint) {\n this.db.update(\n (hint: HintQueueItem) => this.predicate(hint, item.name),\n (hint: HintQueueItem) => (hint.shouldShow = false),\n );\n this.log.warn(`No content found for hint ${normalizedName}.`);\n\n if (this.currentRef) {\n this.currentRef.detach();\n return;\n }\n\n this.showNextHint();\n\n return;\n }\n\n if (this.currentRef && this.componentRef) {\n this.componentRef.setInput('hint', hint);\n\n return;\n }\n\n if (\n hint.parameters &&\n item.displayCounter &&\n hint.parameters.displayCounter &&\n item.displayCounter >= parseInt(hint.parameters.displayCounter)\n ) {\n this.db.update(\n (hint: HintQueueItem) => this.predicate(hint, item.name),\n (hint: HintQueueItem) => (hint.shouldShow = false),\n );\n this.log.info(`Hint ${normalizedName} is already shown max number of times ${hint.parameters.displayCounter}.`);\n this.showNextHint();\n\n return;\n }\n\n [this.currentRef, this.componentRef] = this.hintOverlayService.show(hint);\n this.currentRef.detachments().subscribe(() => {\n if (hint?.parameters?.displayCounter) {\n const cookieExpireDays = hint.parameters.cookieExpireDays\n ? this.generateExpiryDate(hint.parameters.cookieExpireDays)?.getTime()\n : undefined;\n\n const productSpecific = toBoolean(hint.parameters.isProductSpecific) ? this.productService.current.name : undefined;\n\n this.db.update(\n (hint: HintQueueItem) => this.predicate(hint, item.name),\n (hint: HintQueueItem) => {\n hint.shouldShow = false;\n hint.displayCounter = (item.displayCounter || 0) + 1;\n\n if (cookieExpireDays) {\n hint.expires = cookieExpireDays;\n }\n\n if (productSpecific) {\n hint.product = productSpecific;\n }\n },\n );\n } else {\n this.db.delete((hint: HintQueueItem) => hint.name === item.name);\n }\n\n this.currentRef!.dispose();\n this.currentRef = null;\n this.componentRef = null;\n this.showNextHint();\n });\n }\n\n private loadHints() {\n if (this.loading || this.hintsContent) {\n return;\n }\n\n this.loading = true;\n\n if (this.page.isAnonymousAccessRestricted && !this.user.isAuthenticated) {\n this.user.events.pipe(first((e: UserEvent) => e instanceof UserLoginEvent)).subscribe(() => this.loadHintContent());\n } else {\n this.loadHintContent();\n }\n }\n\n private loadHintContent() {\n this.contentService\n .getJsonFiltered('App-v1.0/Hints')\n .pipe(\n map((content: ContentItem) => content.items || []),\n catchError(() => []),\n )\n .subscribe((hints: ContentItem[]) => {\n this.hintsContent = hints;\n this.loading = false;\n\n if (this.currentRef) {\n this.showNextHint();\n } else {\n this.display();\n }\n });\n }\n\n private generateExpiryDate(days: string | number | null): Date | undefined {\n if (!days) {\n return;\n }\n\n const expireDate = new Date();\n expireDate.setDate(expireDate.getDate() + (isNumber(days) ? days : parseInt(days, 10)));\n\n return expireDate;\n }\n}\n","export enum HitType {\n HomeScreen = 'homescreen',\n}\n\nexport interface HintQueueItem {\n name: string;\n shouldShow: boolean;\n displayCounter?: number;\n expires?: number;\n product?: string;\n}\n","import { Injectable } from '@angular/core';\n\nimport { OnFeatureInit, UserEvent, UserLoginEvent, UserService } from '@frontend/vanilla/core';\nimport { filter } from 'rxjs/operators';\n\nimport { HintQueueService } from './hint-queue.service';\nimport { HitType } from './hint.models';\n\n@Injectable()\nexport class HintBootstrapService implements OnFeatureInit {\n constructor(\n private hintQueueService: HintQueueService,\n private user: UserService,\n ) {}\n\n onFeatureInit() {\n if (!this.user.isAuthenticated) {\n this.hintQueueService.add(HitType.HomeScreen);\n }\n\n this.user.events\n .pipe(filter((event: UserEvent) => event instanceof UserLoginEvent))\n .subscribe(() => this.hintQueueService.add(HitType.HomeScreen));\n }\n}\n","import { runOnFeatureInit } from '@frontend/vanilla/core';\n\nimport { HintBootstrapService } from './hint-bootstrap.service';\n\nexport function provide() {\n return [runOnFeatureInit(HintBootstrapService)];\n}\n"],"names":["ɵɵelement","g","ɵɵproperty","parameters_r1","hintIcon","L","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r2","ctx_r2","ɵɵnextContext","ɵɵresetView","closeMessage","ɵɵelementEnd","closeIcon","ɵɵtemplate","HintComponent_Conditional_0_Conditional_1_Conditional_0_Template","HintComponent_Conditional_0_Conditional_1_Conditional_1_Template","ɵɵconditional","ɵɵadvance","showCloseButton","ctx","HintComponent_Conditional_0_Conditional_1_Template","HintComponent_Conditional_0_Conditional_2_Template","hint_r4","parameters","hintClass","undefined","tmp_3_0","tmp_4_0","HintComponent","constructor","overlayRef","inject","OverlayRef","webWorkerService","WebWorkerService","ngOnInit","hint","timeOutParam","timeOut","toNumber","createWorker","WorkerType","HintTimerTimeout","timeout","ngOnDestroy","removeWorker","detach","selectors","inputs","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","HintComponent_Conditional_0_Template","tmp_0_0","CommonModule","NgClass","PageMatrixComponent","IconCustomComponent","styles","encapsulation","changeDetection","_HintComponent","HintOverlayService","overlay","injector","show","item","create","panelClass","scrollStrategy","scrollStrategies","noop","backdropClick","subscribe","portal","ComponentPortal","Injector","providers","provide","useValue","parent","componentRef","attach","setInput","ɵɵinject","OverlayFactory","factory","ɵfac","providedIn","_HintOverlayService","HintQueueService","contentService","log","page","user","hintOverlayService","productService","cookieDBService","predicate","name","product","current","db","createList","CookieName","HintQueue","generateExpiryDate","add","toLowerCase","removeExpired","getOne","update","shouldShow","insert","HintQueueTimeout","display","remove","delete","clear","deleteAll","expires","Date","getTime","currentRef","hintsContent","showNextHint","loadHints","normalizedName","find","contentItem","items","warn","displayCounter","parseInt","info","detachments","cookieExpireDays","productSpecific","toBoolean","isProductSpecific","dispose","loading","isAnonymousAccessRestricted","isAuthenticated","events","pipe","first","e","UserLoginEvent","loadHintContent","getJsonFiltered","map","content","catchError","hints","days","expireDate","setDate","getDate","isNumber","ContentService","Logger","Page","UserService","ProductService","CookieDBService","_HintQueueService","HitType","HintBootstrapService","hintQueueService","onFeatureInit","HomeScreen","filter","event","_HintBootstrapService","runOnFeatureInit"],"mappings":"wwBAIgBA,SAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,EAAAA,EAAAA,CAAA,CAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAAC,EAAA,EAAA,CAAwBC,KAAA,SAAAC,CAAAA,CAAAA,CAAAC,QAAA,EAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAAC,EAAA,EAAA,CAGxBC,EAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA,EAA0EC,EAAA,CAAA,OAAA,CAAA,UAAA,CAAAC,EAAAC,CAAAA,CAAA,CAAA,CAAA,IAAAC,EAAAC,EAAA,CAAA,CAAA,CAAA,CAAA,OAAAC,GAASF,CAAAG,CAAAA,YAAAA,EAAc,CAAA,CAAA,CAAjGC,CAAAA,EAAAA,GAASZ,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAA,MAAAQ,CAAAA,CAAAA,CAAAK,SAAA,EAAA,CAAA,CAAA,SAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAJbC,GAAA,CAAAC,CAAAA,EAAAA,CAAA,CAAA,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,CA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