{ "version": 3, "sources": ["src/app/shared/components/google-map-search/model/google-map-result.ts", "src/app/shared/components/google-map-search/google-map-search.service.ts", "src/app/shared/components/google-map-search/google-map-search-input/google-map-search-input.component.ts", "src/app/shared/components/google-map-search/google-map-search-input/google-map-search-input.component.html"], "sourcesContent": ["export class GoogleMapSearchResult\n{\n fullAddress: string;\n country:string;\n countryCode: string;\n address: string;\n streetNumber: string;\n postalCode: string;\n state: string;\n city: string;\n lat: number;\n lng: number;\n \n}", "import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GoogleMapSearchService {\n private service: google.maps.places.PlacesService = new google.maps.places.PlacesService(new google.maps.Map(window.document.createElement(\"div\") as HTMLElement));\n private autoCompleteService: google.maps.places.AutocompleteService = new google.maps.places.AutocompleteService();\n constructor() { }\n\n textSearch(query: string, types: string[], countries: string[] | null) {\n const sub: Subject = new Subject();\n this.autoCompleteService.getPlacePredictions({input: query, types, componentRestrictions: countries ? {country: countries} : null}, (a: google.maps.places.AutocompletePrediction[], b: google.maps.places.PlacesServiceStatus) => b === google.maps.places.PlacesServiceStatus.OK || b === google.maps.places.PlacesServiceStatus.ZERO_RESULTS ? sub.next(a || []) : sub.error(null));\n return sub;\n }\n\n getPlaceDetails(placeId: string, fields: string[]) {\n const sub: Subject = new Subject();\n this.service.getDetails({placeId, fields}, (a: google.maps.places.PlaceResult, b: google.maps.places.PlacesServiceStatus) => b === google.maps.places.PlacesServiceStatus.OK ? sub.next(a) : sub.error(null));\n return sub;\n }\n}\n", "import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, ViewChild, ElementRef, forwardRef, Self, AfterViewInit, Optional, Host, SimpleChanges, } from '@angular/core';\nimport {NG_VALUE_ACCESSOR, ControlValueAccessor, UntypedFormControl, Validators, NgControl, NG_VALIDATORS, FormGroup, FormBuilder, AbstractControl, ValidationErrors, ControlContainer} from '@angular/forms'\nimport { GoogleMapSearchResult } from '../model/google-map-result';\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport { GoogleMapSearchService } from '../google-map-search.service';\nimport { take, tap, catchError } from 'rxjs/operators';\nimport { BehaviorSubject, combineLatest, pipe } from 'rxjs';\nimport { ResourceService } from 'src/app/services/resource.service';\nimport { LocationDetailsResponse } from 'src/app/shared/models/LocationDetailsResponse.model';\nimport { OnDestroyMixin, untilComponentDestroyed } from '@w11k/ngx-componentdestroyed';\nimport { LocationToStringPipe } from 'src/app/shared/pipes/location-to-string.pipe';\nimport { AutoComplete } from 'primeng/autocomplete';\n\ninterface AutoCompleteCompleteEvent {\n originalEvent: Event;\n query: string;\n}\n@Component({\n selector: 'terra-google-map-search-input',\n templateUrl: './google-map-search-input.component.html',\n styleUrls: ['./google-map-search-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => GoogleMapSearchInputComponent),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => GoogleMapSearchInputComponent),\n multi: true\n }\n ]\n})\nexport class GoogleMapSearchInputComponent extends OnDestroyMixin implements OnInit, ControlValueAccessor, AfterViewInit {\n \n @Input() adressType: string;\n @Input() delayMSBetweenUserKeyStrokes: number = 20000;\n @Input() isOuterFormSubmitted: boolean = false;\n\n @Output() setAddress: EventEmitter = new EventEmitter();\n @ViewChild('mapContainer') mapContainer: ElementRef;\n @ViewChild('autocomplete') autocomplete: AutoComplete;\n\n @Input()\n addressLabelText = 'Address (Country, State, City, Street and Number)';\n\n @Input()\n addressSubLabelText = 'You may type in any language';\n\n @Input()\n placeholderText = 'Please enter the address';\n\n @Input()\n requiredErrorText = 'Country is required';\n\n @Input()\n invalidErrorText = 'The address is not valid';\n\n @Input()\n shouldShowMap: boolean = true;\n\n public addressForm: FormGroup;\n\n @Input()\n searchTypes: string[] = []\n \n @Input()\n restrictedCountries: string[];\n \n private _disabled = false;\n private onChange: (value: {address: LocationDetailsResponse, street2Name: string}) => void;\n private onTouched: () => void;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.addressForm.disable() : this.addressForm.enable();\n }\n\n map: google.maps.Map;\n\n constructor(private googleMapsService: GoogleMapSearchService, private resourceService: ResourceService, private locationToString : LocationToStringPipe, private formBuilder: FormBuilder) {\n super();\n }\n\n filteredAddresses$ : BehaviorSubject = new BehaviorSubject([]);\n\n\n\n writeValue(obj: any): void {\n const form = {\n address: obj?.address,\n street2Name: obj?.address?.street2Name\n };\n combineLatest([this.filteredAddresses$,this.resourceService.allCountries$]).pipe(take(1),tap(([addresses, countries]) => {\n if(!addresses.length && obj?.address) {\n const locationDetailsClone = {...obj?.address};\n if(!locationDetailsClone.country && locationDetailsClone.countryId) {\n locationDetailsClone.country = countries.find(c => c.id == locationDetailsClone.countryId); \n }\n if(!locationDetailsClone.fullAddress) {\n const fields = [[locationDetailsClone.houseNumber, locationDetailsClone.streetName], [locationDetailsClone.cityName], [locationDetailsClone.stateName], [locationDetailsClone.postalCode], [locationDetailsClone.cityName || locationDetailsClone.stateName || locationDetailsClone.postalCode ? locationDetailsClone.country.code : locationDetailsClone.country.name]];\n locationDetailsClone.fullAddress = fields.map(part => part.filter(Boolean).join(\" \"))\n .filter(str => str.length).join(\", \");\n }\n if(locationDetailsClone.fullAddress != '' && !locationDetailsClone.googlePlaceId) {\n this.filteredAddresses$.next([locationDetailsClone]);\n }\n form.address = locationDetailsClone;\n }\n if(this.map && form.address?.lat && form.address?.lng) {\n this.addAddressToTheMap(null, form.address);\n }\n this.addressForm.patchValue(form, { emitEvent: false });\n this.addressForm.updateValueAndValidity();\n })).subscribe();\n }\n registerOnChange(fn: (value: {address: LocationDetailsResponse, street2Name: string}) => void): void {\n this.addressForm.valueChanges.subscribe(fn);\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n ngOnInit() {\n this.addressForm = this.formBuilder.group({\n address: [null, Validators.required],\n street2Name: null,\n });\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if(changes['isOuterFormSubmitted'] && changes['isOuterFormSubmitted'].previousValue === false) {\n Object.values(this.addressForm.controls).forEach(control => {control.markAsTouched(); control.markAsDirty()});\n }\n}\n\n validate(control: AbstractControl): ValidationErrors {\n return this.addressForm.valid ? null : { invalidForm: { valid: false, errors: this.addressForm.errors } };\n}\n\nregisterOnValidatorChange?(fn: () => void): void { }\n\n ngAfterViewInit() {\n if(this.shouldShowMap) {\n this.map = new google.maps.Map(\n this.mapContainer.nativeElement,\n {\n zoom: 1,\n center: { lat: 35.141927, lng: -40.480495 },\n }\n );\n const value = this.addressForm.getRawValue();\n if(value?.address?.lat && value?.address?.lng) {\n this.addAddressToTheMap(null, value?.address);\n }\n }\n // this.autocomplete.onOverlayAnimationEnd = (event)=>{};\n }\n\n invokeEvent(place: google.maps.places.PlaceResult) {\n if(!place.place_id || !place.geometry) {\n return;\n }\n const googleMapResult = this.parseGoogleResponse(place);\n const value = {...this.addressForm.getRawValue()};\n this.resourceService.allCountries$.pipe(take(1),tap(countries => {\n const country = countries.find(c => c.name === googleMapResult.country);\n const newAddress = {streetName: googleMapResult.address, \n houseNumber: googleMapResult.streetNumber, \n cityName: googleMapResult.city, \n postalCode: googleMapResult.postalCode, \n stateName: googleMapResult.state, \n country: country, \n countryId: country?.id,\n fullAddress: googleMapResult.fullAddress,\n googlePlaceId: place.place_id,\n street2Name: value.street2Name,\n lat: googleMapResult.lat,\n lng: googleMapResult.lng } as LocationDetailsResponse;\n this.addressForm.patchValue({address: newAddress }, { emitEvent: false });\n this.addressForm.updateValueAndValidity();\n this.addAddressToTheMap(value.address, newAddress);\n value.address = newAddress\n this.setAddress.emit(googleMapResult);\n })).subscribe()\n\n }\n\n addAddressToTheMap(oldAddress: LocationDetailsResponse, address: LocationDetailsResponse) {\n if(oldAddress && oldAddress.googlePlaceId && oldAddress.lat && oldAddress.lng) {\n this.map.data.remove(this.map.data.getFeatureById(oldAddress.googlePlaceId))\n }\n this.map.data.add({geometry: {lat: address.lat, lng: address.lng}, id: address.googlePlaceId, properties: address});\n this.map.setCenter({lat: address.lat, lng: address.lng});\n this.map.setZoom(10);\n }\n \n addressSelected(event: LocationDetailsResponse) {\n this.googleMapsService.getPlaceDetails(event.googlePlaceId, ['address_components', 'formatted_address', 'geometry', 'place_id']).pipe(take(1),tap(result => this.invokeEvent(result))).subscribe();\n }\n\n filterAddress(event: AutoCompleteCompleteEvent) {\n if(event.query?.length < 3) {\n this.filteredAddresses$.next([]);\n return;\n }\n this.googleMapsService.textSearch(event.query, this.searchTypes, this.restrictedCountries).pipe(take(1),tap(results => this.filteredAddresses$.next(results.map(result => ({fullAddress: result.description, googlePlaceId: result.place_id} as LocationDetailsResponse)))),catchError(err => {this.filteredAddresses$.next([]); throw err;})).subscribe();\n }\n\n parseGoogleResponse(result: google.maps.places.PlaceResult): GoogleMapSearchResult\n {\n // Extracting address components\n let googleMapSearchResult = new GoogleMapSearchResult();\n\n if(!Array.isArray(result.address_components))\n {\n throw new Error(\"Address component is not an array\")\n }\n\n if(!result.address_components.length)\n {\n throw new Error(\"Address component is not an array\")\n }\n\n for (let i = 0; i < result.address_components.length; i++) \n {\n const component = result.address_components[i];\n \n if (this.isStreetNumber(component)) {\n googleMapSearchResult.streetNumber = component.long_name;\n }\n \n if (this.isStreetName(component)) {\n googleMapSearchResult.address = component.long_name;\n }\n \n if (this.isCity(component)) {\n googleMapSearchResult.city = component.long_name;\n }\n \n if (this.isCountry(component)) {\n googleMapSearchResult.country = component.long_name;\n googleMapSearchResult.countryCode = component.short_name;\n }\n \n if (this.isState(component)) {\n googleMapSearchResult.state = component.long_name;\n }\n \n if (this.isPostalCode(component)) {\n googleMapSearchResult.postalCode = component.long_name;\n }\n }\n \n // Extracting additional information\n googleMapSearchResult.fullAddress = result.formatted_address;\n if (result.geometry && result.geometry.location) {\n googleMapSearchResult.lat = result.geometry.location.lat();\n googleMapSearchResult.lng = result.geometry.location.lng();\n }\n \n return googleMapSearchResult;\n \n }\n\n private isStreetNumber(component: any): boolean {\n return component.types.includes('street_number');\n }\n\n private isStreetName(component: any): boolean {\n return component.types.includes('route');\n }\n\n private isCity(component): boolean {\n return component.types.includes('locality') || component.types.includes('sublocality_level_1');\n }\n\n private isState(component): boolean {\n return component.types.includes('administrative_area_level_1');\n }\n\n private isCountry(component): boolean {\n return component.types.includes('country');\n }\n\n private isPostalCode(component): boolean {\n return component.types.includes('postal_code');\n  }\n}", "
\n
\n
\n \n
\n
\n \n \n
\n \n
{{ address.fullAddress }}
\n
\n
\n \n \n {{ requiredErrorText }}\n \n {{ addressSubLabelText }}\n
\n\n
\n
\n"], "mappings": "6jBAAM,IAAOA,EAAP,KAA4B,CAAA,ECMlC,IAAaC,IAAsB,IAAA,CAA7B,IAAOA,EAAP,MAAOA,CAAsB,CAGjCC,aAAA,CAFQ,KAAAC,QAA4C,IAAIC,OAAOC,KAAKC,OAAOC,cAAc,IAAIH,OAAOC,KAAKG,IAAIC,OAAOC,SAASC,cAAc,KAAK,CAAgB,CAAC,EACzJ,KAAAC,oBAA8D,IAAIR,OAAOC,KAAKC,OAAOO,mBAC7E,CAEhBC,WAAWC,EAAeC,EAAiBC,EAA0B,CACnE,IAAMC,EAA4D,IAAIC,EACtE,YAAKP,oBAAoBQ,oBAAoB,CAACC,MAAON,EAAOC,MAAAA,EAAOM,sBAAuBL,EAAY,CAACM,QAASN,CAAS,EAAI,IAAI,EAAG,CAACO,EAAgDC,IAA8CA,IAAMrB,OAAOC,KAAKC,OAAOoB,oBAAoBC,IAAMF,IAAMrB,OAAOC,KAAKC,OAAOoB,oBAAoBE,aAAgBV,EAAIW,KAAKL,GAAK,CAAA,CAAE,EAAIN,EAAIY,MAAM,IAAI,CAAC,EAC/WZ,CACT,CAEAa,gBAAgBC,EAAiBC,EAAgB,CAC/C,IAAMf,EAA+C,IAAIC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ogleMapSearchService", "constructor", "service", "google", "maps", "places", "PlacesService", "Map", "window", "document", "createElement", "autoCompleteService", "AutocompleteService", "textSearch", "query", "types", "countries", "sub", "Subject", "getPlacePredictions", "input", "componentRestrictions", "country", "a", "b", "PlacesServiceStatus", "OK", "ZERO_RESULTS", "next", "error", "getPlaceDetails", "placeId", "fields", "getDetails", "factory", "\u0275fac", "providedIn", "_GoogleMapSearchService", "\u0275\u0275elementStart", "\u0275\u0275element", "\u0275\u0275text", "\u0275\u0275elementEnd", "\u0275\u0275advance", "\u0275\u0275textInterpolate", "address_r2", "fullAddress", "\u0275\u0275textInterpolate1", "ctx_r2", "requiredErrorText", "addressSubLabelText", "GoogleMapSearchInputComponent", "OnDestroyMixin", "disabled", "_disabled", "value", "coerceBooleanProperty", "addressForm", "disable", "enable", "constructor", "googleMapsService", "resourceService", "locationToString", "formBuilder", "delayMSBetweenUserKeyStrokes", "isOuterFormSubmitted", "setAddress", "EventEmitter", "addressLabelText", "placeholderText", "invalidErrorText", "shouldShowMap", "searchTypes", "filteredAddresses$", "BehaviorSubject", "writeValue", "obj", "form", "address", "street2Name", "combineLatest", "allCountries$", "pipe", "take", "tap", "addresses", "countries", "length", "locationDetailsClone", "__spreadValues", "country", "countryId", "find", "c", "id", "fields", "houseNumber", "streetName", "cityName", "stateName", "postalCode", "code", "name", "map", "part", "filter", "Boolean", "join", "str", "googlePlaceId", "next", "lat", "lng", "addAddressToTheMap", "patchValue", "emitEvent", "updateValueAndValidity", "subscribe", "registerOnChange", "fn", "valueChanges", "registerOnTouched", "onTouched", "setDisabledState", "isDisabled", "ngOnInit", "group", "Validators", "required", "ngOnChanges", "changes", "previousValue", "Object", "values", "controls", "forEach", "control", "markAsTouched", "markAsDirty", "validate", "valid", "invalidForm", "errors", "registerOnValidatorChange", "ngAfterViewInit", "google", "maps", "Map", "mapContainer", "nativeElement", "zoom", "center", "getRawValue", "invokeEvent", "place", "place_id", "geometry", "googleMapResult", "parseGoogleResponse", "newAddress", "streetNumber", "city", "state", "emit", "oldAddress", "data", "remove", "getFeatureById", "add", "properties", "setCenter", "setZoom", "addressSelected", "event", "getPlaceDetails", "result", "filterAddress", "query", "textSearch", "restrictedCountries", "results", "description", "catchError", "err", "googleMapSearchResult", "GoogleMapSearchResult", "Array", "isArray", "address_components", "Error", "i", "component", "isStreetNumber", "long_name", "isStreetName", "isCity", "isCountry", "countryCode", "short_name", "isState", "isPostalCode", "formatted_address", "location", "types", "includes", "\u0275\u0275directiveInject", "GoogleMapSearchService", "ResourceService", "LocationToStringPipe", "FormBuilder", "selectors", "viewQuery", "rf", "ctx", "provide", "NG_VALUE_ACCESSOR", "useExisting", "forwardRef", "multi", "NG_VALIDATORS", "\u0275\u0275InheritDefinitionFeature", "\u0275\u0275NgOnChangesFeature", "decls", "vars", "consts", "template", "\u0275\u0275listener", "$event", "i0", "\u0275\u0275restoreView", "_r1", "\u0275\u0275resetView", "\u0275\u0275template", "GoogleMapSearchInputComponent_ng_template_9_Template", "GoogleMapSearchInputComponent_mat_error_10_Template", "GoogleMapSearchInputComponent_label_11_Template", "GoogleMapSearchInputComponent_div_16_Template", "\u0275\u0275property", "\u0275\u0275pipeBind1", "touched", "get", "hasError", "_GoogleMapSearchInputComponent"] }