diff --git a/dist/js/field.js b/dist/js/field.js index 9bcde07..ae78f34 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,2 +1,2 @@ /*! For license information please see field.js.LICENSE.txt */ -(()=>{var e={5858:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(e){return e[1]}));o.push([e.id,".invisible{position:absolute;visibility:hidden}",""]);const i=o},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=[];function s(e){for(var t=-1,r=0;r{"use strict";t.Z=(e,t)=>{const r=e.__vccOpts||e;for(const[e,n]of t)r[e]=n;return r}},8336:(e,t,r)=>{function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=n(r(20)),i=r(6878),a=n(r(308));function s(){return(s=Object.assign||function(e){for(var t=1;t0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},r.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then((function(){t.restoreScrollPositions(),b(e)}))},r.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,v(window.location).href===v(e).href&&window.location.reload()}catch(e){return!1}},r.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},r.handleLocationVisit=function(e){var t,r,n,o,i=this,a=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(r=window.history.state)?void 0:r.rememberedState)?t:{},e.scrollRegions=null!=(n=null==(o=window.history.state)?void 0:o.scrollRegions)?n:[],this.setPage(e,{preserveScroll:a.preserveScroll,preserveState:!0}).then((function(){a.preserveScroll&&i.restoreScrollPositions(),b(e)}))},r.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},r.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},r.createVisitId=function(){return this.visitId={},this.visitId},r.cancelVisit=function(e,t){var r=t.cancelled,n=void 0!==r&&r,o=t.interrupted,i=void 0!==o&&o;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=n,e.interrupted=i,g(e),e.onFinish(e))},r.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,g(e),e.onFinish(e))},r.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},r.visit=function(e,r){var n=this,i=void 0===r?{}:r,a=i.method,c=void 0===a?t.n$.GET:a,l=i.data,p=void 0===l?{}:l,d=i.replace,g=void 0!==d&&d,b=i.preserveScroll,w=void 0!==b&&b,O=i.preserveState,j=void 0!==O&&O,x=i.only,S=void 0===x?[]:x,_=i.headers,P=void 0===_?{}:_,E=i.errorBag,A=void 0===E?"":E,k=i.forceFormData,C=void 0!==k&&k,T=i.onCancelToken,N=void 0===T?function(){}:T,I=i.onBefore,F=void 0===I?function(){}:I,R=i.onStart,M=void 0===R?function(){}:R,D=i.onProgress,L=void 0===D?function(){}:D,V=i.onFinish,B=void 0===V?function(){}:V,U=i.onCancel,$=void 0===U?function(){}:U,q=i.onSuccess,G=void 0===q?function(){}:q,z=i.onError,W=void 0===z?function(){}:z,H=i.queryStringArrayFormat,J=void 0===H?"brackets":H,Q="string"==typeof e?h(e):e;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some((function(t){return e(t)}))||"object"==typeof t&&null!==t&&Object.values(t).some((function(t){return e(t)}))}(p)&&!C||p instanceof FormData||(p=f(p)),!(p instanceof FormData)){var K=y(c,Q,p,J),X=K[1];Q=h(K[0]),p=X}var Z={url:Q,method:c,data:p,replace:g,preserveScroll:w,preserveState:j,only:S,headers:P,errorBag:A,forceFormData:C,queryStringArrayFormat:J,cancelled:!1,completed:!1,interrupted:!1};if(!1!==F(Z)&&function(e){return m("before",{cancelable:!0,detail:{visit:e}})}(Z)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Y=this.createVisitId();this.activeVisit=s({},Z,{onCancelToken:N,onBefore:F,onStart:M,onProgress:L,onFinish:B,onCancel:$,onSuccess:G,onError:W,queryStringArrayFormat:J,cancelToken:o.CancelToken.source()}),N({cancel:function(){n.activeVisit&&n.cancelVisit(n.activeVisit,{cancelled:!0})}}),function(e){m("start",{detail:{visit:e}})}(Z),M(Z),o({method:c,url:v(Q).href,data:c===t.n$.GET?{}:p,params:c===t.n$.GET?p:{},cancelToken:this.activeVisit.cancelToken.token,headers:s({},P,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},S.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":S.join(",")}:{},A&&A.length?{"X-Inertia-Error-Bag":A}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){p instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){m("progress",{detail:{progress:e}})}(e),L(e))}}).then((function(e){var t;if(!n.isInertiaResponse(e))return Promise.reject({response:e});var r=e.data;S.length&&r.component===n.page.component&&(r.props=s({},n.page.props,r.props)),w=n.resolvePreserveOption(w,r),(j=n.resolvePreserveOption(j,r))&&null!=(t=window.history.state)&&t.rememberedState&&r.component===n.page.component&&(r.rememberedState=window.history.state.rememberedState);var o=Q,i=h(r.url);return o.hash&&!i.hash&&v(o).href===i.href&&(i.hash=o.hash,r.url=i.href),n.setPage(r,{visitId:Y,replace:g,preserveScroll:w,preserveState:j})})).then((function(){var e=n.page.props.errors||{};if(Object.keys(e).length>0){var t=A?e[A]?e[A]:{}:e;return function(e){m("error",{detail:{errors:e}})}(t),W(t)}return m("success",{detail:{page:n.page}}),G(n.page)})).catch((function(e){if(n.isInertiaResponse(e.response))return n.setPage(e.response.data,{visitId:Y});if(n.isLocationVisitResponse(e.response)){var t=h(e.response.headers["x-inertia-location"]),r=Q;r.hash&&!t.hash&&v(r).href===t.href&&(t.hash=r.hash),n.locationVisit(t,!0===w)}else{if(!e.response)return Promise.reject(e);m("invalid",{cancelable:!0,detail:{response:e.response}})&&u.show(e.response.data)}})).then((function(){n.activeVisit&&n.finishVisit(n.activeVisit)})).catch((function(e){if(!o.isCancel(e)){var t=m("exception",{cancelable:!0,detail:{exception:e}});if(n.activeVisit&&n.finishVisit(n.activeVisit),t)return Promise.reject(e)}}))}},r.setPage=function(e,t){var r=this,n=void 0===t?{}:t,o=n.visitId,i=void 0===o?this.createVisitId():o,a=n.replace,s=void 0!==a&&a,c=n.preserveScroll,u=void 0!==c&&c,l=n.preserveState,f=void 0!==l&&l;return Promise.resolve(this.resolveComponent(e.component)).then((function(t){i===r.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(s=s||h(e.url).href===window.location.href)?r.replaceState(e):r.pushState(e),r.swapComponent({component:t,page:e,preserveState:f}).then((function(){u||r.resetScrollPositions(),s||b(e)})))}))},r.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},r.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},r.handlePopstateEvent=function(e){var t=this;if(null!==e.state){var r=e.state,n=this.createVisitId();Promise.resolve(this.resolveComponent(r.component)).then((function(e){n===t.visitId&&(t.page=r,t.swapComponent({component:e,page:r,preserveState:!1}).then((function(){t.restoreScrollPositions(),b(r)})))}))}else{var o=h(this.page.url);o.hash=window.location.hash,this.replaceState(s({},this.page,{url:o.href})),this.resetScrollPositions()}},r.get=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({},n,{method:t.n$.GET,data:r}))},r.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,s({},e,{preserveScroll:!0,preserveState:!0}))},r.replace=function(e,t){var r;return void 0===t&&(t={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(r=t.method)?r:"get")+"() instead."),this.visit(e,s({preserveState:!0},t,{replace:!0}))},r.post=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({preserveState:!0},n,{method:t.n$.POST,data:r}))},r.put=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({preserveState:!0},n,{method:t.n$.PUT,data:r}))},r.patch=function(e,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(e,s({preserveState:!0},n,{method:t.n$.PATCH,data:r}))},r.delete=function(e,r){return void 0===r&&(r={}),this.visit(e,s({preserveState:!0},r,{method:t.n$.DELETE}))},r.remember=function(e,t){var r,n;void 0===t&&(t="default"),w||this.replaceState(s({},this.page,{rememberedState:s({},null==(r=this.page)?void 0:r.rememberedState,(n={},n[t]=e,n))}))},r.restore=function(e){var t,r;if(void 0===e&&(e="default"),!w)return null==(t=window.history.state)||null==(r=t.rememberedState)?void 0:r[e]},r.on=function(e,t){var r=function(e){var r=t(e);e.cancelable&&!e.defaultPrevented&&!1===r&&e.preventDefault()};return document.addEventListener("inertia:"+e,r),function(){return document.removeEventListener("inertia:"+e,r)}},e}(),j={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var r=t.content.firstChild;if(!e.startsWith(" diff --git a/resources/js/components/GoogleAutocomplete/FormField.vue b/resources/js/components/GoogleAutocomplete/FormField.vue index 5e9e3f1..bc0b228 100644 --- a/resources/js/components/GoogleAutocomplete/FormField.vue +++ b/resources/js/components/GoogleAutocomplete/FormField.vue @@ -67,7 +67,10 @@ export default { } }); - Nova.$emit('address-metadata-update', { ...retrievedAddress }); + Nova.$emit('address-metadata-update', { + attribute: this.field.attribute, + ...retrievedAddress + }); }, setInitialValue() { this.value = this.field.value || '';