{ "version": 3, "sources": ["apps/business-center-client/src/app/core/local-cache.service.ts", "apps/business-center-client/src/app/brands/account-group-cache.service.ts", "apps/business-center-client/src/app/brands/brands.api.service.ts", "apps/business-center-client/src/app/brands/brand.ts", "apps/business-center-client/src/app/locations/locations.service.ts", "apps/business-center-client/src/app/locations/index.ts"], "sourcesContent": ["import { of as observableOf, Observable } from 'rxjs';\nimport { map, tap } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\n\ninterface CacheValue {\n cachedAt: Date;\n data: T;\n}\n\nconst CacheKeyPartSeparator = '|';\n\n@Injectable()\nexport abstract class LocalCacheService {\n /**\n * Load data when there is a cache miss\n * @param ids A list of the ids that need to be filled in the cache\n */\n protected abstract load(ids: Array): Observable<{ [key: string]: T }>;\n\n /**\n * How long to keep items in the cache\n */\n protected abstract maxAge(): number;\n\n /**\n * Namespace of the cache. If this cache fills only keys in this namespace will be cleared\n */\n protected abstract namespace(): string;\n\n public getMulti(ids: Array): Observable<{ [key: string]: T }> {\n // Look at cache to determine what we have and what we need to get\n const filteredCacheHits = {};\n const resourceIdsToRequest = [];\n ids.forEach((id) => {\n const k = this.cacheKey(id);\n let hit = this.get(k);\n if (hit && this.isHitExpired(hit)) {\n localStorage.removeItem(k);\n hit = null;\n }\n if (hit) {\n filteredCacheHits[this.resourceIdKey(id)] = hit.data;\n } else {\n resourceIdsToRequest.push(id);\n }\n });\n\n const load$ = resourceIdsToRequest.length ? this.load(resourceIdsToRequest) : observableOf({});\n return load$.pipe(\n tap((loadedData) => {\n const now = new Date();\n // Populate cache\n Object.keys(loadedData).forEach((id) => {\n this.set(this.cacheKey(id), {\n cachedAt: now,\n data: loadedData[id],\n });\n });\n }),\n map((loadedData) => Object.assign(loadedData, filteredCacheHits)),\n );\n }\n\n private get(k: string): CacheValue {\n const hit = localStorage.getItem(k);\n if (hit) {\n const p = JSON.parse(hit);\n p.cachedAt = new Date(p.cachedAt);\n return p;\n }\n }\n\n private set(key: string, item: CacheValue): void {\n try {\n localStorage.setItem(key, JSON.stringify(item));\n } catch (error) {\n this.clear();\n }\n return;\n }\n\n private clear(): void {\n if (this.browserSupport) {\n Object.keys(localStorage)\n .filter((k) => k.startsWith(this.namespace()))\n .map((k) => localStorage.removeItem(k));\n }\n }\n\n private get browserSupport(): boolean {\n return !!typeof Storage;\n }\n\n private isHitExpired(hit: CacheValue): boolean {\n const now = new Date();\n return now.valueOf() - hit.cachedAt.valueOf() > this.maxAge();\n }\n\n private cacheKey(resourceId: string): string {\n return [this.namespace(), this.resourceIdKey(resourceId)].join(CacheKeyPartSeparator);\n }\n\n private resourceIdKey(resourceId: string): string {\n return resourceId;\n }\n}\n", "import { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport { LocalCacheService } from '../core/local-cache.service';\nimport { AccountGroup } from './../account-group/account-group';\nimport { AccountGroupService } from './../account-group/account-group.service';\n\n@Injectable({ providedIn: 'root' })\nexport class AccountGroupCacheService extends LocalCacheService {\n constructor(private accountGroupService: AccountGroupService) {\n super();\n }\n\n protected load(ids: Array): Observable<{ [key: string]: AccountGroup }> {\n return this.accountGroupService.getAccountGroups(ids).pipe(\n map((accountGroups) =>\n accountGroups.reduce((agMap, accountGroup) => {\n agMap[accountGroup.accountGroupId] = accountGroup;\n return agMap;\n }, {}),\n ),\n );\n }\n\n deleteFromCacheForAccountGroup(accountGroupId: string): void {\n localStorage.removeItem(`${this.namespace()}|${accountGroupId}`);\n }\n\n protected maxAge(): number {\n return 24 * 3600 * 1000;\n }\n\n protected namespace(): string {\n return 'multi-location-account-group';\n }\n}\n", "import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Environment, EnvironmentService } from '@galaxy/core';\nimport { Observable } from 'rxjs';\nimport { map } from 'rxjs/operators';\n\ninterface ListLocationIDsResponse {\n data: string[];\n}\n\nexport interface Group {\n name: string;\n pathNodes: string[];\n hasAccess: boolean;\n}\ninterface ListChildGroupsResponse {\n data: Group[];\n}\n\n@Injectable({ providedIn: 'root' })\nexport class BrandsApiService {\n constructor(private http: HttpClient, private environmentService: EnvironmentService) {\n (window).brandsAPI = this;\n }\n\n public listLocationIDs(groupPath: string): Observable {\n const url = this.hostWithScheme() + '/api/v2/node-list-locations';\n const params = new HttpParams().set('groupPath', groupPath);\n return this.http.post(url, params, this.apiOptions()).pipe(map((r) => r.data));\n }\n\n public listChildGroups(partnerId: string, groupPath: string): Observable {\n const url = this.hostWithScheme() + '/api/v2/node-list-child-groups';\n const params = new HttpParams()\n .set('groupPath', groupPath)\n .set('partnerId', partnerId)\n .set('includeDescendantsFlag', 'true');\n return this.http.post(url, params, this.apiOptions()).pipe(map((r) => r.data));\n }\n\n private host(): string {\n switch (this.environmentService.getEnvironment()) {\n case Environment.LOCAL:\n return 'nbrg-test.appspot.com';\n case Environment.TEST:\n return 'nbrg-test.appspot.com';\n case Environment.DEMO:\n return 'nbrg-demo.appspot.com';\n case Environment.PROD:\n return 'nbrg-prod.appspot.com';\n }\n }\n\n private hostWithScheme(): string {\n const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';\n return scheme + this.host();\n }\n\n private apiOptions(): { headers: HttpHeaders; withCredentials: boolean } {\n return {\n headers: new HttpHeaders({\n 'Content-Type': 'application/x-www-form-urlencoded',\n }),\n withCredentials: true,\n };\n }\n}\n", "import { Brand as MultiLocationBrand } from '@vendasta/multi-location';\n\nexport class Brand {\n //Identifiers\n name: string;\n path: string;\n private _groupNodes: string[]; // The path to this brand/region in groups\n marketId: string;\n\n //Info\n activatedSources: number[];\n\n //TabStatuses\n socialTabVisible: boolean;\n reviewsTabVisible: boolean;\n listingsTabVisible: boolean;\n insightsTabVisible: boolean;\n googleQAndATabVisible: boolean;\n advertisingTabVisible: boolean;\n dataExportTabVisible: boolean;\n websiteTabVisible: boolean;\n reportTabVisible: boolean;\n\n //FeatureStatuses\n requestReviewsPageVisible: boolean;\n customerVoiceExecutiveReportVisible: boolean;\n\n constructor(brand: MultiLocationBrand) {\n //Identifiers\n this._groupNodes = brand.group.path.nodes;\n this.name = brand.group.name;\n this.path = brand.brandPath;\n this.marketId = brand.marketId;\n //Info\n this.activatedSources = brand.activatedVisibilitySources.map((x) => parseInt(x));\n //TabStatuses\n this.socialTabVisible = brand.tabStatuses.socialTabEnabled;\n this.reviewsTabVisible = brand.tabStatuses.reviewsTabEnabled;\n this.listingsTabVisible = brand.tabStatuses.listingsTabEnabled;\n this.insightsTabVisible = brand.tabStatuses.insightsTabEnabled;\n this.advertisingTabVisible = brand.tabStatuses.advertisingTabEnabled;\n this.websiteTabVisible = brand.tabStatuses.websiteTabEnabled;\n this.googleQAndATabVisible = brand.tabStatuses.googleQAndATabEnabled;\n this.dataExportTabVisible = brand.tabStatuses.dataExportTabEnabled;\n this.reportTabVisible = brand.tabStatuses.reportTabEnabled;\n //FeatureStatuses\n this.requestReviewsPageVisible = brand.featureStatuses.requestReviewPageEnabled;\n this.customerVoiceExecutiveReportVisible = brand.featureStatuses.customerVoiceExecutiveReportEnabled;\n }\n\n get groupNodes(): string[] {\n return Object.assign([], this._groupNodes);\n }\n\n get title(): string {\n return this.name;\n }\n\n get subtitle(): string {\n return 'Brand';\n }\n}\n", "import { Injectable, Injector } from '@angular/core';\nimport { BusinessNavConfigService } from '@vendasta/business-nav';\nimport { BehaviorSubject, of, map, shareReplay, switchMap, distinctUntilChanged } from 'rxjs';\nimport { partnerId } from '../../globals';\nimport { AccountGroup, AccountGroupService } from '../account-group';\nimport { AccountGroupCacheService } from '../brands/account-group-cache.service';\nimport { BrandsApiService } from '../brands/brands.api.service';\nimport { Brand } from '../brands/brand';\nimport { AtlasConfigService } from '@galaxy/atlas/core';\n\nexport type Location = AccountGroup | Brand | null;\n\nexport function isAccountGroup(locationRef: AccountGroup | Brand): locationRef is AccountGroup {\n return locationRef instanceof AccountGroup;\n}\n\nexport function isBrand(locationRef: AccountGroup | Brand): locationRef is Brand {\n return locationRef instanceof Brand;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class LocationsService {\n private currentLocation$$ = new BehaviorSubject(null);\n readonly currentLocation$ = this.currentLocation$$.asObservable();\n\n readonly marketId$ = this.currentLocation$.pipe(\n map((loc) => {\n if (!loc) {\n return '';\n }\n return loc.marketId;\n }),\n distinctUntilChanged(),\n shareReplay(1),\n );\n\n readonly isCurrentLocationABrand$ = this.currentLocation$.pipe(map((location) => isBrand(location)));\n\n readonly currentAccountGroups$ = this.currentLocation$.pipe(\n switchMap((location) => {\n if (isBrand(location)) {\n const path = location.groupNodes;\n return this.brandsApiService.listLocationIDs(path.join('|')).pipe(\n switchMap((accountGroupIds) => {\n const accountGroupCacheService = this.injector.get(AccountGroupCacheService);\n return accountGroupCacheService.getMulti(accountGroupIds);\n }),\n );\n }\n if (isAccountGroup(location)) {\n return of({\n [location.accountGroupId]: location,\n });\n }\n return of({});\n }),\n shareReplay(1),\n );\n\n readonly currentAccountGroupIds$ = this.currentAccountGroups$.pipe(\n map((accountGroups) => Object.keys(accountGroups)),\n );\n\n constructor(\n private atlasConfig: AtlasConfigService,\n private businessNavConfig: BusinessNavConfigService,\n private brandsApiService: BrandsApiService,\n private injector: Injector,\n private accountGroupService: AccountGroupService,\n ) {\n this.currentLocation$.subscribe((location) => {\n if (isBrand(location)) {\n this.atlasConfig.initialize('VBC', partnerId, location.marketId, null, null, null, location.groupNodes[0]);\n this.businessNavConfig.initialize(partnerId, location.marketId, null, location.groupNodes[0], 'VBC', null);\n } else if (isAccountGroup(location)) {\n this.atlasConfig.initialize('VBC', partnerId, location.marketId, location.accountGroupId, null, null, null);\n this.businessNavConfig.initialize(partnerId, location.marketId, location.accountGroupId, null, 'VBC', null);\n this.accountGroupService.switchAccountGroup(location);\n } else {\n this.atlasConfig.initialize('VBC', partnerId, null, null, null, null, null);\n this.businessNavConfig.initialize(partnerId, null, null, null, 'VBC', null);\n }\n });\n }\n\n setCurrentLocation(location: Location): void {\n this.currentLocation$$.next(location);\n }\n}\n", "export * from './locations.service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AkBkC,WAAWC,EAAWnB,EAASJ,SAAU,KAAMI,EAASI,WAAW,CAAC,EAAG,MAAO,IAAI,GAChGnC,EAAe+B,CAAQ,GAChC,KAAKjB,YAAYmC,WAAW,MAAOC,EAAWnB,EAASJ,SAAUI,EAASY,eAAgB,KAAM,KAAM,IAAI,EAC1G,KAAK5B,kBAAkBkC,WAAWC,EAAWnB,EAASJ,SAAUI,EAASY,eAAgB,KAAM,MAAO,IAAI,EAC1G,KAAKzB,oBAAoBiC,mBAAmBpB,CAAQ,IAEpD,KAAKjB,YAAYmC,WAAW,MAAOC,EAAW,KAAM,KAAM,KAAM,KAAM,IAAI,EAC1E,KAAKnC,kBAAkBkC,WAAWC,EAAW,KAAM,KAAM,KAAM,MAAO,IAAI,EAE9E,CAAC,CACH,CAEAE,mBAAmBrB,EAAkB,CACnC,KAAKZ,kBAAkBkC,KAAKtB,CAAQ,CACtC,yCAlEW1B,GAAgBiD,EAAAC,CAAA,EAAAD,EAAAE,CAAA,EAAAF,EAAAG,CAAA,EAAAH,EAAAI,CAAA,EAAAJ,EAAAK,CAAA,CAAA,CAAA,wBAAhBtD,EAAgBuD,QAAhBvD,EAAgBwD,UAAAC,WADH,MAAM,CAAA,EAC1B,IAAOzD,EAAP0D,SAAO1D,CAAgB,GAAA,ICrB7B,IAAA2D,GAAAC,EAAA,KAAAC", "names": ["CacheKeyPartSeparator", "LocalCacheService", "init_local_cache_service", "__esmMin", "init_esm", "init_operators", "getMulti", "ids", "filteredCacheHits", "resourceIdsToRequest", "forEach", "id", "k", "cacheKey", "hit", "get", "isHitExpired", "localStorage", "removeItem", "resourceIdKey", "data", "push", "length", "load", "observableOf", "pipe", "tap", "loadedData", "now", "Date", "Object", "keys", "set", "cachedAt", "map", "assign", "getItem", "p", "JSON", "parse", "key", "item", "setItem", "stringify", "clear", "browserSupport", "filter", "startsWith", "namespace", "valueOf", "maxAge", "resourceId", "join", "factory", "\u0275fac", "_LocalCacheService", "AccountGroupCacheService", "init_account_group_cache_service", "__esmMin", "init_operators", "init_local_cache_service", "LocalCacheService", "constructor", "accountGroupService", "load", "ids", "getAccountGroups", "pipe", "map", "accountGroups", "reduce", "agMap", "accountGroup", "accountGroupId", "deleteFromCacheForAccountGroup", "localStorage", "removeItem", "namespace", "maxAge", "\u0275\u0275inject", "AccountGroupService", "factory", "\u0275fac", "providedIn", "_AccountGroupCacheService", "BrandsApiService", "init_brands_api_service", "__esmMin", "init_http", "init_src", "init_operators", "constructor", "http", "environmentService", "window", "brandsAPI", "listLocationIDs", "groupPath", "url", "hostWithScheme", "params", "HttpParams", "set", "post", "apiOptions", "pipe", "map", "r", "data", "listChildGroups", "partnerId", "host", "getEnvironment", "Environment", "LOCAL", "TEST", "DEMO", "PROD", "headers", "HttpHeaders", "withCredentials", "\u0275\u0275inject", "HttpClient", "EnvironmentService", "factory", "\u0275fac", "providedIn", "_BrandsApiService", "Brand", "init_brand", "__esmMin", "constructor", "brand", "_groupNodes", "group", "path", "nodes", "name", "brandPath", "marketId", "activatedSources", "activatedVisibilitySources", "map", "x", "parseInt", "socialTabVisible", "tabStatuses", "socialTabEnabled", "reviewsTabVisible", "reviewsTabEnabled", "listingsTabVisible", "listingsTabEnabled", "insightsTabVisible", "insightsTabEnabled", "advertisingTabVisible", "advertisingTabEnabled", "websiteTabVisible", "websiteTabEnabled", "googleQAndATabVisible", "googleQAndATabEnabled", "dataExportTabVisible", "dataExportTabEnabled", "reportTabVisible", "reportTabEnabled", "requestReviewsPageVisible", "featureStatuses", "requestReviewPageEnabled", "customerVoiceExecutiveReportVisible", "customerVoiceExecutiveReportEnabled", "groupNodes", "Object", "assign", "title", "subtitle", "isAccountGroup", "locationRef", "AccountGroup", "isBrand", "Brand", "LocationsService", "init_locations_service", "__esmMin", "init_esm", "init_globals", "init_account_group", "init_account_group_cache_service", "init_brand", "constructor", "atlasConfig", "businessNavConfig", "brandsApiService", "injector", "accountGroupService", "currentLocation$$", "BehaviorSubject", "currentLocation$", "asObservable", "marketId$", "pipe", "map", "loc", "marketId", "distinctUntilChanged", "shareReplay", "isCurrentLocationABrand$", "location", "currentAccountGroups$", "switchMap", "path", "groupNodes", "listLocationIDs", "join", "accountGroupIds", "get", "AccountGroupCacheService", "getMulti", "of", "accountGroupId", "currentAccountGroupIds$", "accountGroups", "Object", "keys", "subscribe", "initialize", "partnerId", "switchAccountGroup", "setCurrentLocation", "next", "\u0275\u0275inject", "AtlasConfigService", "BusinessNavConfigService", "BrandsApiService", "Injector", "AccountGroupService", "factory", "\u0275fac", "providedIn", "_LocationsService", "init_locations", "__esmMin", "init_locations_service"] }