{"version":3,"file":"address_controller-WzoT5IhC.js","sources":["../../../app/javascript/controllers/mixins/useTextareaExpansion.js","../../../app/javascript/controllers/models/google/place_detail.js","../../../app/javascript/controllers/models/google/place_autocomplete.js","../../../app/javascript/controllers/property/address_controller.js"],"sourcesContent":["// Allows elements that have data-controller=\"auto-expandable-textarea\" to automatically expand to fit their content.\n// This mixin allows parent controllers to let their targets know that they should expand to fit their content easily\n// without the need of dispatching an event to the target.\n\nexport const useTextareaExpansion = (controller) => {\n Object.assign(controller, {\n expandTextarea(targetElement) {\n targetElement.setAttribute('data-auto-expand', '')\n }\n })\n}\n","class PlaceDetail {\n constructor(response) {\n this.details = response\n }\n\n get streetNumber() {\n return this.details.address_components.find(component => component.types.includes('street_number'))?.long_name\n }\n\n get streetName() {\n return this.details.address_components.find(component => component.types.includes('route'))?.long_name\n }\n\n get postalCode() {\n return this.details.address_components.find(component => component.types.includes('postal_code'))?.long_name\n }\n\n get city() {\n return this.details.address_components.find(component => component.types.includes('locality'))?.long_name\n }\n\n get country() {\n return this.details.address_components.find(component => component.types.includes('country'))\n }\n\n get state() {\n return this.details.address_components.find(component => component.types.includes('administrative_area_level_1'))?.long_name\n }\n\n get countryCode() {\n return this.country?.short_name\n }\n}\n\nexport { PlaceDetail }\n","const placeTypes = {\n country: 'country',\n administrative_area_level_1: 'state',\n locality: 'city',\n neighborhood: 'neighborhood',\n route: 'street',\n establishment: 'establishment'\n}\n\nclass PlaceAutocomplete {\n constructor(response) {\n this.response = response\n }\n\n get type() {\n if(this.isCountry) {\n return placeTypes.country\n } else if (this.isState) {\n return placeTypes.administrative_area_level_1\n } else if (this.isCity) {\n return placeTypes.locality\n } else if (this.isNeighborhood) {\n return placeTypes.neighborhood\n } else if (this.isStreet) {\n return placeTypes.route\n } else if (this.isEstablishment) {\n return placeTypes.establishment\n }\n }\n\n get isCountry() {\n return this.response.types.includes('country')\n }\n\n get isState() {\n return this.response.types.includes('administrative_area_level_1')\n }\n\n get isCity() {\n return this.response.types.includes('locality')\n }\n\n get isNeighborhood() {\n return this.response.types.includes('neighborhood')\n }\n\n get isStreet() {\n return this.response.types.includes('route') || this.response.types.includes('street_address')\n }\n\n get isEstablishment() {\n return this.response.types.includes('establishment')\n }\n}\n\nexport { PlaceAutocomplete }\n","import { Loader } from \"@googlemaps/js-api-loader\"\n\nimport ApplicationController from '../application_controller'\nimport { Current } from \"@/controllers/models/current\"\nimport { useToastNotifiers } from \"@/controllers/mixins/useToastNotifiers\"\nimport { useTextareaExpansion } from \"@/controllers/mixins/useTextareaExpansion\"\nimport { useLineNotifiers } from \"@/controllers/mixins/useLineNotifiers\"\n\nimport { PlaceDetail, PlaceAutocomplete } from '../models/google'\n\nexport default class extends ApplicationController {\n static values = {\n initial: String,\n apiKey: String,\n countryCode: String,\n persisted: Boolean,\n international: { type: Boolean, default: false }\n }\n\n static targets = [\n 'searchInput',\n 'streetNameInput',\n 'input',\n 'form',\n 'formContainer',\n 'select',\n 'dropdown',\n 'addressList',\n 'addressListContainer',\n 'itemTemplate',\n 'toggleButton',\n 'referenceInput',\n 'stateInput',\n 'countryInput',\n 'deleteButton',\n 'updateButton',\n 'customAddressButton',\n 'customAddressLabel',\n 'cityInput',\n 'removeCustomAddressViewButton',\n 'searchContainer',\n 'googleLogo',\n 'error',\n ]\n\n initialize() {\n super.initialize()\n\n this.loader = new Loader({\n apiKey: this.apiKeyValue,\n version: \"weekly\",\n libraries: [\"places\"]\n });\n\n this.countryCodeValue ||= Current.business.country.code\n\n if(!this.internationalValue) {\n this.countryInputTarget.value = this.countryCodeValue\n this.countryInputTarget.setAttribute('data-original', this.countryCodeValue)\n }\n\n this.buildAddressElement = this.buildAddressElement.bind(this)\n this.removeSearchResults = this.removeSearchResults.bind(this)\n this.placeDetails = {}\n this.places = {}\n }\n\n connect() {\n super.connect()\n\n this.setupGoogle()\n\n useToastNotifiers(this)\n useTextareaExpansion(this)\n useLineNotifiers(this)\n\n this.nextTick(() => this.autoExpandTextareasHeight())\n }\n\n showForm() {\n this.show(this.formContainerTarget)\n this.show(this.removeCustomAddressViewButtonTarget)\n\n this.hide(this.addressListTarget)\n this.hide(this.addressListContainerTarget)\n\n if(this.hasAddressListContainerTarget) {\n this.hide(this.addressListContainerTarget)\n }\n\n this.focus(this.streetNumberInputTarget, { moveCursorToEnd: true })\n\n this.autoExpandTextareasHeight()\n this.nextTick(this.removeSearchResults)\n\n this.hide(this.googleLogoTarget)\n }\n\n hideAndResetForm(focus = true) {\n this.hide(this.formContainerTarget)\n this.hide(this.removeCustomAddressViewButtonTarget)\n this.hide(this.addressListContainerTarget)\n\n this.show(this.addressListTarget)\n this.formTarget.querySelectorAll('input, textarea').forEach(this.clearInput)\n\n if(focus) {\n this.focus(this.searchInputTarget, { moveCursorToEnd: true })\n }\n }\n\n focusSearchInput() {\n this.autoExpandTextareasHeight()\n\n this.nextTick(\n () => this.focus(\n this.searchInputTarget,\n { moveCursorToEnd: true }\n )\n )\n }\n\n search({ currentTarget }) {\n if(currentTarget.value) {\n this.streetNameInputTarget.value = currentTarget.value\n this.debounce(() => this.searchAddress(currentTarget))\n } else {\n this.resetInput(this.streetNameInputTarget)\n this.removeSearchResults()\n }\n }\n\n async searchAddress(currentTarget) {\n this.selectTarget.setAttribute('data-arrow-navigation-enabled-value', false)\n\n const response = await this.autocompleteAPI.getPlacePredictions({\n input: currentTarget.value,\n language: Current.user.locale,\n componentRestrictions: !this.internationalValue && {\n country: this.countryCodeValue\n }\n })\n\n this.removeSearchResults()\n\n response.predictions\n .map(this.buildAddressElement)\n .forEach(element => this.addressListTarget.appendChild(element))\n\n if(response.predictions.length !== 0) {\n this.show(this.googleLogoTarget)\n\n if(this.hasRemoveCustomAddressViewButtonTarget) {\n this.hide(this.removeCustomAddressViewButtonTarget)\n }\n }\n\n if(this.hasAddressListContainerTarget) {\n if(response.predictions.length !== 0) {\n this.show(this.addressListContainerTarget)\n } else {\n this.hide(this.addressListContainerTarget)\n }\n }\n\n if(response.predictions.length === 0 && this.hasFormContainerTarget && this.isInvisible(this.formContainerTarget)) {\n this.hide(this.googleLogoTarget)\n this.showCustomAddressButton()\n }\n\n this.show(this.addressListTarget)\n this.selectTarget.setAttribute('data-arrow-navigation-enabled-value', true)\n }\n\n selectAddress({ currentTarget }) {\n const { id, description } = currentTarget.dataset\n\n this.streetNameInputTarget.value = description\n this.referenceInputTarget.value = id\n this.countryInputTarget.value = this.countryCodeValue\n\n const place = this.places[id]\n\n if(place.isCountry) {\n this.countryInputTarget.value = description\n this.streetNameInputTarget.value = ''\n }\n\n if(this.persistedValue) {\n this.setInputFieldsFromPlaceDetails(id)\n this.nextTick(this.removeSearchResults)\n\n if(this.isInvisible(this.formContainerTarget)) {\n this.submitForm()\n }\n } else if(this.hasFormTarget) {\n this.formTarget.requestSubmit()\n } else {\n this.searchInputTarget.value = description\n\n this.hide(this.addressListContainerTarget)\n this.hide(this.addressListTarget)\n }\n\n this.hide(this.googleLogoTarget)\n }\n\n setInputFieldsFromPlaceDetails(id) {\n const detail = this.placeDetails[id]\n\n if(detail.streetNumber) {\n this.streetNumberInputTarget.value = detail.streetNumber\n this.searchInputTarget.value = this.searchInputTarget.value.replace(detail.streetNumber, '').trim()\n }\n\n if(detail.postalCode) {\n this.postalCodeInputTarget.value = detail.postalCode\n this.searchInputTarget.value = this.searchInputTarget.value.replace(detail.postalCode, '').trim()\n }\n\n if(detail.city) {\n this.dispatch('select:city', {\n target: this.formContainerTarget,\n detail: {\n city: detail.city,\n countryCode: detail.countryCode\n }\n })\n }\n\n if(detail.state) {\n this.stateInputTarget.value = detail.state\n }\n\n if(this.hasAddressListContainerTarget) {\n this.hide(this.addressListContainerTarget)\n }\n\n this.hide(this.addressListTarget)\n this.focus(this.searchInputTarget, { moveCursorToEnd: true })\n\n this.streetNameInputTarget.value = this.searchInputTarget.value\n }\n\n saveChanges({ target }) {\n if(this.hasDropdownTarget) {\n if(this.isInvisible(this.dropdownTarget) || this.dropdownTarget.contains(target) || this.toggleButtonTarget.contains(target)) return\n\n if(this.hasError) {\n this.restoreLastSavedState()\n } else {\n this.submitForm()\n }\n\n this.blurLine()\n }\n }\n\n restoreLastSavedState() {\n if(!this.hasDropdownTarget) return\n if(this.isInvisible(this.dropdownTarget)) return\n\n this.hide(this.dropdownTarget)\n this.hide(this.addressListContainerTarget)\n\n if(this.hasToggleButtonTarget) {\n this.show(this.toggleButtonTarget)\n }\n\n this.persistedValue ? this.showForm() : this.hideAndResetForm()\n this.element.querySelectorAll('input, textarea').forEach(this.resetInput)\n\n this.removeSearchResults()\n\n this.dispatch('restore', {\n target: this.formContainerTarget\n })\n\n this.dropdownTarget.classList.remove('error')\n this.hasError = false\n\n this.blurLine()\n }\n\n showDropdown() {\n if(this.hasToggleButtonTarget) {\n this.hide(this.toggleButtonTarget)\n }\n\n this.show(this.dropdownTarget)\n this.nextTick(() => this.moveLineToThisElement())\n }\n\n submit() {\n this.submitForm()\n }\n\n autoExpandTextareasHeight() {\n this.element.querySelectorAll('textarea')\n .forEach(textarea => this.expandTextarea(textarea))\n }\n\n errorTargetConnected() {\n this.hasError = true\n this.dropdownTarget.classList.add('error')\n\n this.errorTarget.remove()\n }\n // private\n\n setupGoogle() {\n this.loader.load().then((google) => {\n this.google = google\n this.autocompleteAPI = new google.maps.places.AutocompleteService()\n\n this.map = new google.maps.Map(document.createElement('div'), {})\n this.placeService = new google.maps.places.PlacesService(this.map)\n\n }).catch((error) => {\n console.log(\"failed to initialize google maps api\", error)\n })\n }\n\n submitForm() {\n if(!this.hasFormTarget) return\n\n this.hide(this.addressListContainerTarget)\n\n if(this.unchanged) {\n this.hide(this.dropdownTarget)\n\n if(this.hasToggleButtonTarget) {\n this.show(this.toggleButtonTarget)\n }\n\n return this.persistedValue ? this.showForm() : this.hideAndResetForm(false)\n }\n\n if(this.isNewRecord) {\n return this.formTarget.requestSubmit()\n }\n\n if(this.cleared && this.hasDeleteButtonTarget) {\n this.deleteButtonTarget.click()\n } else {\n this.updateButtonTarget.click()\n }\n }\n\n showCustomAddressButton() {\n const customAddressItem = this.customAddressButtonTarget.cloneNode(true)\n\n customAddressItem.setAttribute('data-arrow-navigatable', '')\n this.removeClass(customAddressItem, 'hidden')\n\n this.addressListTarget.appendChild(customAddressItem)\n\n if(this.persistedValue && this.streetNameInputTarget.value === this.streetNameInputTarget.dataset.original) {\n this.customAddressLabelTarget.innerText = this.translations.property.addresses.form.edit\n } else {\n this.customAddressLabelTarget.innerText = this.translations.property.addresses.form.open\n }\n\n this.show(this.addressListContainerTarget)\n this.show(this.addressListTarget)\n }\n\n removeSearchResults() {\n this.addressListTarget.innerHTML = ''\n\n this.hide(this.addressListContainerTarget)\n this.hide(this.googleLogoTarget)\n }\n\n buildAddressElement(prediction, index) {\n const item = this.itemTemplateTarget.cloneNode(true)\n this.removeClass(item, 'hidden')\n\n if(this.persistedValue) {\n this.placeService.getDetails({\n placeId: prediction.place_id,\n fields: ['name', 'formatted_address', 'geometry', 'address_components'],\n }, (place, status) => {\n if (status === google.maps.places.PlacesServiceStatus.OK) {\n this.placeDetails[prediction.place_id] = new PlaceDetail(place)\n }\n })\n }\n\n this.places[prediction.place_id] = new PlaceAutocomplete(prediction)\n\n if(this.internationalValue) {\n item.querySelector('[data-address-description]').innerText = prediction.description\n } else {\n item.querySelector('[data-address-description]').innerText = [prediction.structured_formatting.main_text, this.countryCodeValue].join(', ')\n }\n\n item.setAttribute('data-id', prediction.place_id)\n item.setAttribute('data-description', this.internationalValue ? prediction.description : prediction.structured_formatting.main_text)\n item.setAttribute('data-action', 'click->property--address#selectAddress')\n item.setAttribute('tabindex', index + 1)\n item.setAttribute('data-arrow-navigatable', '')\n\n console.log(prediction)\n if(this.places[prediction.place_id].type) {\n item.querySelector('[data-address-type]').innerText = this.translations.address.types[this.places[prediction.place_id].type]\n item.querySelector('[data-address-type]').classList.remove('hidden')\n }\n\n return item\n }\n\n get selectIsInvisible() {\n return this.selectTarget.classList.contains('hidden')\n }\n\n get formIsVisible() {\n return !this.formContainerTarget.classList.contains('hidden')\n }\n\n get unchanged() {\n return Array.from(this.formContainerTarget.querySelectorAll('input, textarea'))\n .every(input => input.value === input.dataset.original)\n }\n\n get cleared() {\n return this.searchInputTarget.value === ''\n }\n\n get isNewRecord() {\n return !this.persistedValue\n }\n\n get streetNumberInputTarget() {\n return this.inputTargets.find(input => input.dataset.field === 'number')\n }\n\n get postalCodeInputTarget() {\n return this.inputTargets.find(input => input.dataset.field === 'postal_code')\n }\n}\n"],"names":["useTextareaExpansion","controller","targetElement","PlaceDetail","response","_a","component","placeTypes","PlaceAutocomplete","address_controller","ApplicationController","Loader","Current","useToastNotifiers","useLineNotifiers","focus","currentTarget","element","id","description","detail","target","textarea","google","error","customAddressItem","prediction","index","item","place","status","input","__publicField"],"mappings":"6WAIO,MAAMA,EAAwBC,GAAe,CAClD,OAAO,OAAOA,EAAY,CACxB,eAAeC,EAAe,CAC5BA,EAAc,aAAa,mBAAoB,EAAE,CACvD,CACG,CAAA,CACH,ECVA,MAAMC,CAAY,CAChB,YAAYC,EAAU,CACpB,KAAK,QAAUA,CACnB,CAEE,IAAI,cAAe,OACjB,OAAOC,EAAA,KAAK,QAAQ,mBAAmB,KAAKC,GAAaA,EAAU,MAAM,SAAS,eAAe,CAAC,IAA3F,YAAAD,EAA8F,SACzG,CAEE,IAAI,YAAa,OACf,OAAOA,EAAA,KAAK,QAAQ,mBAAmB,KAAKC,GAAaA,EAAU,MAAM,SAAS,OAAO,CAAC,IAAnF,YAAAD,EAAsF,SACjG,CAEE,IAAI,YAAa,OACf,OAAOA,EAAA,KAAK,QAAQ,mBAAmB,KAAKC,GAAaA,EAAU,MAAM,SAAS,aAAa,CAAC,IAAzF,YAAAD,EAA4F,SACvG,CAEE,IAAI,MAAO,OACT,OAAOA,EAAA,KAAK,QAAQ,mBAAmB,KAAKC,GAAaA,EAAU,MAAM,SAAS,UAAU,CAAC,IAAtF,YAAAD,EAAyF,SACpG,CAEE,IAAI,SAAU,CACZ,OAAO,KAAK,QAAQ,mBAAmB,KAAKC,GAAaA,EAAU,MA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