{"version":3,"sources":["webpack:///D:/a/1/s/src/app/core/components/thumbs/thumbTypes/forLocation/thumb-for-location.shared.component.html","webpack:///D:/a/1/s/src/app/core/components/thumbs/thumbTypes/forLocation/thumb-for-location.shared.component.ts","webpack:///D:/a/1/s/src/app/core/components/pickupStatus/pickup-status.shared.component.html","webpack:///D:/a/1/s/src/app/core/components/pickupStatus/pickup-status.shared.component.ts","webpack:///D:/a/1/s/src/app/core/components/distanceStatus/distance-status.shared.component.html","webpack:///D:/a/1/s/src/app/core/components/distanceStatus/distance-status.shared.component.ts","webpack:///D:/a/1/s/src/app/core/components/tiles/tilesTypes/forLocation/tile-for-location.shared.component.html","webpack:///D:/a/1/s/src/app/core/components/tiles/tilesTypes/forLocation/tile-for-location.shared.component.ts","webpack:///D:/a/1/s/src/app/core/components/lists/listsTypes/forLocations/list-for-locations.shared.component.html","webpack:///D:/a/1/s/src/app/core/components/lists/listsTypes/forLocations/list-for-locations.shared.component.ts"],"names":["ThumbForLocationComponent","alternative","width","height","changes","this","imgLoaded","loading","previousValue","currentValue","src","PickupStatusComponent","pickupTime","icon","prefix","suffix","DistanceStatusComponent","config","suffixImperial","suffixMetic","c","localization","units","console","warn","TileForLocationComponent","changeDetectorRef","controllers","routeService","modalsService","elementRef","super","infoBtnSize","orderBtnSize","onShow","location","isAvailable$","locations","canOrderFromLocationIncludingFutureOpening","LocationNo","image$","locationImage$","openStatus$","openStatus","asapPickupTime$","filters","asapPickupTimeForLocation$","locationDescription$","selectedPickupTime$","getLocationFilterSelectedPickupTime$","showDistance$","appSettings","distance$","geolocation","getDistanceToLocation$","latitude","Latitude","longitude","Longitude","labels$","getLabels$","isLocked","lock","navigateToLocation","show","type","locationNo","params","canNavigate","images","requestThumbForLocations","emit","pipe","map","obj","of","onLocationTileClick","ListForLocationsComponent","limit","length","index","item","indexOf"],"mappings":"mRAEQ,0C,4EAGA,QACI,gBACI,gBACI,kEADJ,OAEJ,OACJ,O,uBAJ4C,oCACP,yCAA0B,gBAA1B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qBALkB,sDAA8D,2B,yBAHpF,QAEI,+BAQJ,Q,oBARkB,iCCT1B,kCAWO,Y,MAAMC,UAAkC,IAI3C,cACI9C,QAHG,KAAA+C,MAAgB,EAMvB,cACI,OAAOzE,KAAKgC,WAAuC,IAA1BhC,KAAKgC,UAAU0C,OAGrC,QAAQC,EAAeC,G,MAC1B,OAAW,QAAJ,EAAAA,SAAI,eAAE1C,aAAcyC,EAGxB,kBAAkBd,GACrB,MAAMc,EAAQ3E,KAAKgC,UAAUoC,IAAIC,GAAOA,EAAInC,YAAY2C,QAAQhB,GAC5Dc,IAAU3E,KAAKyE,MAAQ,IACvBzE,KAAKyE,MAAQE,EAAQ,I,6CAnBpBH,I,uBAAAA,EAAyB,waDbtC,gBACI,gBAEI,+BAMA,+BAYJ,OACJ,Q,MAnBsB,oCAMA,sC,2YCIf","file":"x","sourcesContent":["
\r\n
\r\n \r\n \r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n
\r\n
","import { Component, Input, ChangeDetectionStrategy, OnChanges, SimpleChanges } from '@angular/core';\r\n\r\nimport { ThumbsComponent } from '../../thumbs.shared.component';\r\n\r\n@Component({\r\n selector: 'shared-thumb-for-location',\r\n templateUrl: './thumb-for-location.shared.component.html',\r\n styleUrls: ['./thumb-for-location.shared.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ThumbForLocationComponent extends ThumbsComponent implements OnChanges {\r\n public alternative: string = '/assets/images/thumb.location-no-img.jpg';\r\n\r\n @Input() public width: number = 371;\r\n @Input() public height: number = 183;\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (!this.imgLoaded) {\r\n if (changes.loading) {\r\n if (changes.loading.previousValue !== changes.loading.currentValue && !changes.loading.currentValue) {\r\n this.imgLoaded = false;\r\n }\r\n }\r\n\r\n if (changes.src) {\r\n if (changes.src.previousValue !== changes.src.currentValue) {\r\n this.imgLoaded = false;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n \r\n
{{prefix}}{{pickupTime}}{{suffix}}
\r\n
\r\n
","import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core';\r\n\r\nimport * as Services from '@shared/core/services';\r\n\r\n@Component({\r\n selector: 'shared-pickup-status',\r\n templateUrl: './pickup-status.shared.component.html',\r\n styleUrls: ['./pickup-status.shared.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class PickupStatusComponent implements OnInit {\r\n @Input() public pickupTime: number = null;\r\n @Input() public icon: string = 'time';\r\n @Input() public prefix: string = 'Pickup ';\r\n @Input() public suffix: string = ' mins';\r\n constructor(\r\n ) { }\r\n\r\n ngOnInit(): void { }\r\n}\r\n","
\r\n
\r\n \r\n
{{distance}}{{suffix}}
\r\n
\r\n
","import { Component, OnInit, Input, Inject } from '@angular/core';\r\n\r\nimport * as Tokens from '@shared/core/tokens';\r\n\r\n@Component({\r\n selector: 'shared-distance-status',\r\n templateUrl: './distance-status.shared.component.html',\r\n styleUrls: ['./distance-status.shared.component.scss']\r\n})\r\nexport class DistanceStatusComponent implements OnInit {\r\n @Input() public distance: number;\r\n @Input() public icon: string = 'poi';\r\n @Input() public suffixImperial: string = ' mil away';\r\n @Input() public suffixMetic: string = ' km away';\r\n\r\n public suffix: string;\r\n\r\n constructor(\r\n @Inject(Tokens.CONFIG_TOKEN) public config: IConfig\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n const c = this.config.localization.units;\r\n if (!this.suffixImperial && this.suffixMetic || c === 'imperial' && !this.suffixImperial || c === 'metric' && !this.suffixMetic) {\r\n return console.warn('Invalid suffixes imperial and/or metric in distance-status.shared.component');\r\n }\r\n\r\n if (c === 'imperial' || !c) {\r\n this.suffix = this.suffixImperial;\r\n }\r\n\r\n if (c === 'metric') {\r\n this.suffix = this.suffixMetic;\r\n }\r\n }\r\n}\r\n","
\r\n
\r\n\r\n
\r\n \r\n \r\n\r\n \r\n i\r\n \r\n\r\n
currently not\r\n taking\r\n online orders
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n\r\n \r\n \r\n\r\n \r\n {{location?.LocationFriendlyName}}\r\n \r\n
\r\n\r\n
\r\n\r\n \r\n \r\n\r\n \r\n order\r\n \r\n
\r\n
\r\n\r\n
\r\n {{locationDescription$ | async}}\r\n
\r\n\r\n
\r\n\r\n
\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n
\r\n\r\n
\r\n
\r\n","import { Component, ChangeDetectionStrategy, ChangeDetectorRef, OnInit, Input, ElementRef, Output, EventEmitter } from '@angular/core';\r\n\r\nimport * as Services from '@shared/core/services';\r\nimport * as Models from '@shared/core/models';\r\nimport { Controllers } from '@shared/core/controllers';\r\n\r\nimport { TilesComponent } from '../../tiles.shared.component';\r\n\r\nimport { Observable, of } from 'rxjs';\r\nimport { map } from 'rxjs/operators';\r\nimport { ILocationBusinessModel } from '@shared/state';\r\n\r\n\r\n@Component({\r\n selector: 'shared-tile-for-location',\r\n templateUrl: './tile-for-location.shared.component.html',\r\n styleUrls: ['./tile-for-location.shared.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class TileForLocationComponent extends TilesComponent implements OnInit {\r\n\r\n public infoBtnSize: OLO.Components.BUTTON_SIZE = 'sm';\r\n public orderBtnSize: OLO.Components.BUTTON_SIZE = 'sm';\r\n\r\n @Input() public location: ILocationBusinessModel;\r\n @Output() public onShow: EventEmitter = new EventEmitter();\r\n\r\n\r\n /* Location tile */\r\n public isAvailable$: Observable;\r\n public openStatus$: Observable;\r\n public selectedPickupTime$: Observable;\r\n public asapPickupTime$: Observable;\r\n public showDistance$: Observable;\r\n public distance$: Observable;\r\n public image$: Observable;\r\n public locationDescription$: Observable;\r\n public labels$: Observable>;\r\n\r\n constructor(\r\n public changeDetectorRef: ChangeDetectorRef,\r\n public controllers: Controllers,\r\n public routeService: Services.RouteService,\r\n public modalsService: Services.ModalsService,\r\n public elementRef: ElementRef,\r\n ) {\r\n super(changeDetectorRef, controllers);\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.location) {\r\n this.isAvailable$ = this.controllers.locations.canOrderFromLocationIncludingFutureOpening(this.location.LocationNo);\r\n this.image$ = this.controllers.locations.locationImage$(this.location.LocationNo, OLO.Enums.IMAGE_TYPE.ForList);\r\n this.openStatus$ = this.controllers.locations.openStatus(this.location.LocationNo, true);\r\n this.asapPickupTime$ = this.controllers.filters.asapPickupTimeForLocation$(this.location.LocationNo);\r\n this.locationDescription$ = this.controllers.locations.locationDescription$(this.location.LocationNo);\r\n this.selectedPickupTime$ = this.controllers.filters.getLocationFilterSelectedPickupTime$();\r\n this.showDistance$ = this.controllers.appSettings.showDistance$();\r\n this.distance$ = this.controllers.geolocation.getDistanceToLocation$({ latitude: this.location.Latitude, longitude: this.location.Longitude });\r\n this.labels$ = this.controllers.locations.getLabels$(this.location.LocationNo);\r\n }\r\n }\r\n\r\n /* Location */\r\n public async onLocationTileClick(): Promise {\r\n if (this.isLocked || !this.location) return false;\r\n this.lock();\r\n\r\n return this.routeService.navigateToLocation(this.location.LocationNo);\r\n }\r\n\r\n public onInfoBtnClick(): void {\r\n if (this.isLocked) return;\r\n this.lock();\r\n this.modalsService.show({ type: 'location-open-hours', locationNo: this.location.LocationNo, params: { canNavigate: false } });\r\n }\r\n\r\n public requestLocationImage(locationNo: number): void {\r\n this.controllers.images.requestThumbForLocations([locationNo]);\r\n }\r\n\r\n public requestLocationLoading(locationNo: number): void {\r\n this.onShow.emit(locationNo);\r\n }\r\n\r\n public get ctx(): TileForLocationComponent {\r\n return this;\r\n }\r\n\r\n public get canRequestImage$(): Observable {\r\n if (!this.location) {\r\n return of(false);\r\n }\r\n\r\n return this.image$\r\n .pipe(\r\n map(obj => !obj)\r\n );\r\n }\r\n}\r\n","
\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n
\r\n\r\n \r\n\r\n \r\n \r\n
\r\n \r\n
\r\n
\r\n
\r\n\r\n
\r\n\r\n
\r\n
\r\n","import { Component, Input, ChangeDetectionStrategy } from '@angular/core';\r\n\r\nimport { ListsComponent } from '../../lists.shared.component';\r\n\r\nimport { Observable } from 'rxjs';\r\nimport { ILocationBusinessModel } from '@shared/state';\r\n\r\n@Component({\r\n selector: 'shared-list-for-locations',\r\n templateUrl: './list-for-locations.shared.component.html',\r\n styleUrls: ['./list-for-locations.shared.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class ListForLocationsComponent extends ListsComponent {\r\n @Input() public locations: ILocationBusinessModel[];\r\n public limit: number = 6;\r\n\r\n constructor() {\r\n super();\r\n }\r\n\r\n public get isEmpty(): boolean {\r\n return this.locations && this.locations.length === 0;\r\n }\r\n\r\n public trackBy(index: number, item: ILocationBusinessModel): number {\r\n return item?.LocationNo || index;\r\n }\r\n\r\n public onShowListElement(locationNo: number): void {\r\n const index = this.locations.map(obj => obj.LocationNo).indexOf(locationNo);\r\n if (index === this.limit - 1) {\r\n this.limit = index + 4;\r\n }\r\n }\r\n}\r\n"]}