{"version":3,"file":"hint-jemb2rro.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","b","ɵɵproperty","parameters_r1","hintIcon","M","ɵɵ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","_a","_b","_c","_d","hint","timeOutParam","timeOut","toNumber","createWorker","WorkerType","HintTimerTimeout","timeout","ngOnDestroy","removeWorker","detach","F","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","m","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":"6fAIgBA,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,GAAA,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,GAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,CAA0EC,GAAA,OAAA,CAAA,UAAA,CAAAC,EAAAA,CAAAC,CAAA,CAAA,CAAA,IAAAC,CAAAC,CAAAA,EAAAA,CAAA,CAAA,CAAA,CAAA,OAAAC,EAASF,CAAAA,CAAAA,CAAAG,cAAc,CAAA,CAAA,CAAA,CAAjGC,KAASZ,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAAAA,CAAA,MAAAQ,CAAAA,CAAAA,CAAAK,SAAA,EAJbC,CAAAA,CAAAA,SAAAA,EAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,EAAAA,EAAAA,CAAA,CAAAC,CAAAA,EAAAA,CAAA,EAAA,C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