From 9265855eed30d66a1d5e8fc1ff745c3db7b8b2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Tessier?= Date: Tue, 13 Dec 2022 19:09:58 +0100 Subject: [PATCH] Release v2.0.1 --- CHANGELOG.md | 8 ++++++++ dist/js/field.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af642f1..77054d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Release Notes +## [v2.0.1](https://github.com/ctessier/nova-advanced-image-field/compare/v2.0.0...v2.0.1) + +> Released 2022/12/13 + +### Changed + +- Remove `console.log` ([#85](https://github.com/ctessier/nova-advanced-image-field/pull/85)). Thanks [puzzledmonkey](https://github.com/puzzledmonkey)! + ## [v2.0.0](https://github.com/ctessier/nova-advanced-image-field/compare/v1.3.3...v2.0.0) > Released 2022/12/12 diff --git a/dist/js/field.js b/dist/js/field.js index 2dea9be..86d4e8c 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={9680:(e,t,r)=>{function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=n(r(3945)),o=r(129),a=n(r(9996));function s(){return(s=Object.assign?Object.assign.bind():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,m(window.location).href===m(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,i,o=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==(i=window.history.state)?void 0:i.scrollRegions)?n:[],this.setPage(e,{preserveScroll:a.preserveScroll,preserveState:!0}).then((function(){a.preserveScroll&&o.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,i=t.interrupted,o=void 0!==i&&i;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=n,e.interrupted=o,y(e),e.onFinish(e))},r.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,y(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,o=void 0===r?{}:r,a=o.method,c=void 0===a?t.n$.GET:a,l=o.data,f=void 0===l?{}:l,p=o.replace,y=void 0!==p&&p,b=o.preserveScroll,w=void 0!==b&&b,x=o.preserveState,S=void 0!==x&&x,E=o.only,A=void 0===E?[]:E,O=o.headers,R=void 0===O?{}:O,_=o.errorBag,j=void 0===_?"":_,P=o.forceFormData,C=void 0!==P&&P,k=o.onCancelToken,T=void 0===k?function(){}:k,M=o.onBefore,z=void 0===M?function(){}:M,B=o.onStart,N=void 0===B?function(){}:B,I=o.onProgress,D=void 0===I?function(){}:I,L=o.onFinish,F=void 0===L?function(){}:L,U=o.onCancel,W=void 0===U?function(){}:U,V=o.onSuccess,$=void 0===V?function(){}:V,H=o.onError,q=void 0===H?function(){}:H,Y=o.queryStringArrayFormat,X=void 0===Y?"brackets":Y,G="string"==typeof e?d(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)}))}(f)&&!C||f instanceof FormData||(f=h(f)),!(f instanceof FormData)){var J=v(c,G,f,X),Z=J[1];G=d(J[0]),f=Z}var Q={url:G,method:c,data:f,replace:y,preserveScroll:w,preserveState:S,only:A,headers:R,errorBag:j,forceFormData:C,queryStringArrayFormat:X,cancelled:!1,completed:!1,interrupted:!1};if(!1!==z(Q)&&function(e){return g("before",{cancelable:!0,detail:{visit:e}})}(Q)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var K=this.createVisitId();this.activeVisit=s({},Q,{onCancelToken:T,onBefore:z,onStart:N,onProgress:D,onFinish:F,onCancel:W,onSuccess:$,onError:q,queryStringArrayFormat:X,cancelToken:i.CancelToken.source()}),T({cancel:function(){n.activeVisit&&n.cancelVisit(n.activeVisit,{cancelled:!0})}}),function(e){g("start",{detail:{visit:e}})}(Q),N(Q),i({method:c,url:m(G).href,data:c===t.n$.GET?{}:f,params:c===t.n$.GET?f:{},cancelToken:this.activeVisit.cancelToken.token,headers:s({},R,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},A.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":A.join(",")}:{},j&&j.length?{"X-Inertia-Error-Bag":j}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){f instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){g("progress",{detail:{progress:e}})}(e),D(e))}}).then((function(e){var t;if(!n.isInertiaResponse(e))return Promise.reject({response:e});var r=e.data;A.length&&r.component===n.page.component&&(r.props=s({},n.page.props,r.props)),w=n.resolvePreserveOption(w,r),(S=n.resolvePreserveOption(S,r))&&null!=(t=window.history.state)&&t.rememberedState&&r.component===n.page.component&&(r.rememberedState=window.history.state.rememberedState);var i=G,o=d(r.url);return i.hash&&!o.hash&&m(i).href===o.href&&(o.hash=i.hash,r.url=o.href),n.setPage(r,{visitId:K,replace:y,preserveScroll:w,preserveState:S})})).then((function(){var e=n.page.props.errors||{};if(Object.keys(e).length>0){var t=j?e[j]?e[j]:{}:e;return function(e){g("error",{detail:{errors:e}})}(t),q(t)}return g("success",{detail:{page:n.page}}),$(n.page)})).catch((function(e){if(n.isInertiaResponse(e.response))return n.setPage(e.response.data,{visitId:K});if(n.isLocationVisitResponse(e.response)){var t=d(e.response.headers["x-inertia-location"]),r=G;r.hash&&!t.hash&&m(r).href===t.href&&(t.hash=r.hash),n.locationVisit(t,!0===w)}else{if(!e.response)return Promise.reject(e);g("invalid",{cancelable:!0,detail:{response:e.response}})&&u.show(e.response.data)}})).then((function(){n.activeVisit&&n.finishVisit(n.activeVisit)})).catch((function(e){if(!i.isCancel(e)){var t=g("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,i=n.visitId,o=void 0===i?this.createVisitId():i,a=n.replace,s=void 0!==a&&a,c=n.preserveScroll,u=void 0!==c&&c,l=n.preserveState,h=void 0!==l&&l;return Promise.resolve(this.resolveComponent(e.component)).then((function(t){o===r.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(s=s||d(e.url).href===window.location.href)?r.replaceState(e):r.pushState(e),r.swapComponent({component:t,page:e,preserveState:h}).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 i=d(this.page.url);i.hash=window.location.hash,this.replaceState(s({},this.page,{url:i.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}(),S={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var r=t.content.firstChild;if(!e.startsWith("