@platecms/delta-vue 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +5 -5
package/index.cjs
CHANGED
|
@@ -50,4 +50,4 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
50
50
|
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(o=>i.set(o)),i}static accessor(e){const i=(this[Tl]=this[Tl]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=Zr(u);i[l]||(ly(o,u),i[l]=!0)}return I.isArray(e)?e.forEach(a):a(e),this}};ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(ae.prototype,({value:r},e)=>{let t=e[0].toUpperCase()+e.slice(1);return{get:()=>r,set(i){this[t]=i}}});I.freezeMethods(ae);function ca(r,e){const t=this||Un,i=e||t,o=ae.from(i.headers);let a=i.data;return I.forEach(r,function(l){a=l.call(t,a,o.normalize(),e?e.status:void 0)}),o.normalize(),a}function gg(r){return!!(r&&r.__CANCEL__)}function Ur(r,e,t){AA.call(this,r??"canceled",AA.ERR_CANCELED,e,t),this.name="CanceledError"}I.inherits(Ur,AA,{__CANCEL__:!0});function wg(r,e,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?r(t):e(new AA("Request failed with status code "+t.status,[AA.ERR_BAD_REQUEST,AA.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}function fy(r){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return e&&e[1]||""}function gy(r,e){r=r||10;const t=new Array(r),i=new Array(r);let o=0,a=0,u;return e=e!==void 0?e:1e3,function(f){const h=Date.now(),d=i[a];u||(u=h),t[o]=f,i[o]=h;let C=a,m=0;for(;C!==o;)m+=t[C++],C=C%r;if(o=(o+1)%r,o===a&&(a=(a+1)%r),h-u<e)return;const K=d&&h-d;return K?Math.round(m*1e3/K):void 0}}function wy(r,e){let t=0,i=1e3/e,o,a;const u=(h,d=Date.now())=>{t=d,o=null,a&&(clearTimeout(a),a=null),r(...h)};return[(...h)=>{const d=Date.now(),C=d-t;C>=i?u(h,d):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},i-C)))},()=>o&&u(o)]}const es=(r,e,t=3)=>{let i=0;const o=gy(50,250);return wy(a=>{const u=a.loaded,l=a.lengthComputable?a.total:void 0,f=u-i,h=o(f),d=u<=l;i=u;const C={loaded:u,total:l,progress:l?u/l:void 0,bytes:f,rate:h||void 0,estimated:h&&l&&d?(l-u)/h:void 0,event:a,lengthComputable:l!=null,[e?"download":"upload"]:!0};r(C)},t)},Dl=(r,e)=>{const t=r!=null;return[i=>e[0]({lengthComputable:t,total:r,loaded:i}),e[1]]},Ol=r=>(...e)=>I.asap(()=>r(...e)),hy=qA.hasStandardBrowserEnv?((r,e)=>t=>(t=new URL(t,qA.origin),r.protocol===t.protocol&&r.host===t.host&&(e||r.port===t.port)))(new URL(qA.origin),qA.navigator&&/(msie|trident)/i.test(qA.navigator.userAgent)):()=>!0,dy=qA.hasStandardBrowserEnv?{write(r,e,t,i,o,a){const u=[r+"="+encodeURIComponent(e)];I.isNumber(t)&&u.push("expires="+new Date(t).toGMTString()),I.isString(i)&&u.push("path="+i),I.isString(o)&&u.push("domain="+o),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(r){const e=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qy(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Cy(r,e){return e?r.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):r}function hg(r,e,t){let i=!Qy(e);return r&&(i||t==!1)?Cy(r,e):e}const Rl=r=>r instanceof ae?{...r}:r;function Wt(r,e){e=e||{};const t={};function i(h,d,C,m){return I.isPlainObject(h)&&I.isPlainObject(d)?I.merge.call({caseless:m},h,d):I.isPlainObject(d)?I.merge({},d):I.isArray(d)?d.slice():d}function o(h,d,C,m){if(I.isUndefined(d)){if(!I.isUndefined(h))return i(void 0,h,C,m)}else return i(h,d,C,m)}function a(h,d){if(!I.isUndefined(d))return i(void 0,d)}function u(h,d){if(I.isUndefined(d)){if(!I.isUndefined(h))return i(void 0,h)}else return i(void 0,d)}function l(h,d,C){if(C in e)return i(h,d);if(C in r)return i(void 0,h)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:l,headers:(h,d,C)=>o(Rl(h),Rl(d),C,!0)};return I.forEach(Object.keys({...r,...e}),function(d){const C=f[d]||o,m=C(r[d],e[d],d);I.isUndefined(m)&&C!==l||(t[d]=m)}),t}const dg=r=>{const e=Wt({},r);let{data:t,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:l}=e;e.headers=u=ae.from(u),e.url=cg(hg(e.baseURL,e.url,e.allowAbsoluteUrls),r.params,r.paramsSerializer),l&&u.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let f;if(I.isFormData(t)){if(qA.hasStandardBrowserEnv||qA.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if((f=u.getContentType())!==!1){const[h,...d]=f?f.split(";").map(C=>C.trim()).filter(Boolean):[];u.setContentType([h||"multipart/form-data",...d].join("; "))}}if(qA.hasStandardBrowserEnv&&(i&&I.isFunction(i)&&(i=i(e)),i||i!==!1&&hy(e.url))){const h=o&&a&&dy.read(a);h&&u.set(o,h)}return e},py=typeof XMLHttpRequest<"u",Uy=py&&function(r){return new Promise(function(t,i){const o=dg(r);let a=o.data;const u=ae.from(o.headers).normalize();let{responseType:l,onUploadProgress:f,onDownloadProgress:h}=o,d,C,m,K,E;function y(){K&&K(),E&&E(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function T(){if(!_)return;const P=ae.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),M={data:!l||l==="text"||l==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:P,config:r,request:_};wg(function(J){t(J),y()},function(J){i(J),y()},M),_=null}"onloadend"in _?_.onloadend=T:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(T)},_.onabort=function(){_&&(i(new AA("Request aborted",AA.ECONNABORTED,r,_)),_=null)},_.onerror=function(){i(new AA("Network Error",AA.ERR_NETWORK,r,_)),_=null},_.ontimeout=function(){let X=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const M=o.transitional||lg;o.timeoutErrorMessage&&(X=o.timeoutErrorMessage),i(new AA(X,M.clarifyTimeoutError?AA.ETIMEDOUT:AA.ECONNABORTED,r,_)),_=null},a===void 0&&u.setContentType(null),"setRequestHeader"in _&&I.forEach(u.toJSON(),function(X,M){_.setRequestHeader(M,X)}),I.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),l&&l!=="json"&&(_.responseType=o.responseType),h&&([m,E]=es(h,!0),_.addEventListener("progress",m)),f&&_.upload&&([C,K]=es(f),_.upload.addEventListener("progress",C),_.upload.addEventListener("loadend",K)),(o.cancelToken||o.signal)&&(d=P=>{_&&(i(!P||P.type?new Ur(null,r,_):P),_.abort(),_=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const D=fy(o.url);if(D&&qA.protocols.indexOf(D)===-1){i(new AA("Unsupported protocol "+D+":",AA.ERR_BAD_REQUEST,r));return}_.send(a||null)})},Fy=(r,e)=>{const{length:t}=r=r?r.filter(Boolean):[];if(e||t){let i=new AbortController,o;const a=function(h){if(!o){o=!0,l();const d=h instanceof Error?h:this.reason;i.abort(d instanceof AA?d:new Ur(d instanceof Error?d.message:d))}};let u=e&&setTimeout(()=>{u=null,a(new AA(`timeout ${e} of ms exceeded`,AA.ETIMEDOUT))},e);const l=()=>{r&&(u&&clearTimeout(u),u=null,r.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),r=null)};r.forEach(h=>h.addEventListener("abort",a));const{signal:f}=i;return f.unsubscribe=()=>I.asap(l),f}},Ey=function*(r,e){let t=r.byteLength;if(t<e){yield r;return}let i=0,o;for(;i<t;)o=i+e,yield r.slice(i,o),i=o},vy=async function*(r,e){for await(const t of my(r))yield*Ey(t,e)},my=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const e=r.getReader();try{for(;;){const{done:t,value:i}=await e.read();if(t)break;yield i}}finally{await e.cancel()}},Ml=(r,e,t,i)=>{const o=vy(r,e);let a=0,u,l=f=>{u||(u=!0,i&&i(f))};return new ReadableStream({async pull(f){try{const{done:h,value:d}=await o.next();if(h){l(),f.close();return}let C=d.byteLength;if(t){let m=a+=C;t(m)}f.enqueue(new Uint8Array(d))}catch(h){throw l(h),h}},cancel(f){return l(f),o.return()}},{highWaterMark:2})},Cs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Qg=Cs&&typeof ReadableStream=="function",Hy=Cs&&(typeof TextEncoder=="function"?(r=>e=>r.encode(e))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),Cg=(r,...e)=>{try{return!!r(...e)}catch{return!1}},Iy=Qg&&Cg(()=>{let r=!1;const e=new Request(qA.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!e}),Nl=64*1024,Ma=Qg&&Cg(()=>I.isReadableStream(new Response("").body)),ts={stream:Ma&&(r=>r.body)};Cs&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ts[e]&&(ts[e]=I.isFunction(r[e])?t=>t[e]():(t,i)=>{throw new AA(`Response type '${e}' is not supported`,AA.ERR_NOT_SUPPORT,i)})})})(new Response);const yy=async r=>{if(r==null)return 0;if(I.isBlob(r))return r.size;if(I.isSpecCompliantForm(r))return(await new Request(qA.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(I.isArrayBufferView(r)||I.isArrayBuffer(r))return r.byteLength;if(I.isURLSearchParams(r)&&(r=r+""),I.isString(r))return(await Hy(r)).byteLength},by=async(r,e)=>{const t=I.toFiniteNumber(r.getContentLength());return t??yy(e)},Ly=Cs&&(async r=>{let{url:e,method:t,data:i,signal:o,cancelToken:a,timeout:u,onDownloadProgress:l,onUploadProgress:f,responseType:h,headers:d,withCredentials:C="same-origin",fetchOptions:m}=dg(r);h=h?(h+"").toLowerCase():"text";let K=Fy([o,a&&a.toAbortSignal()],u),E;const y=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let _;try{if(f&&Iy&&t!=="get"&&t!=="head"&&(_=await by(d,i))!==0){let M=new Request(e,{method:"POST",body:i,duplex:"half"}),O;if(I.isFormData(i)&&(O=M.headers.get("content-type"))&&d.setContentType(O),M.body){const[J,z]=Dl(_,es(Ol(f)));i=Ml(M.body,Nl,J,z)}}I.isString(C)||(C=C?"include":"omit");const T="credentials"in Request.prototype;E=new Request(e,{...m,signal:K,method:t.toUpperCase(),headers:d.normalize().toJSON(),body:i,duplex:"half",credentials:T?C:void 0});let D=await fetch(E,m);const P=Ma&&(h==="stream"||h==="response");if(Ma&&(l||P&&y)){const M={};["status","statusText","headers"].forEach(W=>{M[W]=D[W]});const O=I.toFiniteNumber(D.headers.get("content-length")),[J,z]=l&&Dl(O,es(Ol(l),!0))||[];D=new Response(Ml(D.body,Nl,J,()=>{z&&z(),y&&y()}),M)}h=h||"text";let X=await ts[I.findKey(ts,h)||"text"](D,r);return!P&&y&&y(),await new Promise((M,O)=>{wg(M,O,{data:X,headers:ae.from(D.headers),status:D.status,statusText:D.statusText,config:r,request:E})})}catch(T){throw y&&y(),T&&T.name==="TypeError"&&/Load failed|fetch/i.test(T.message)?Object.assign(new AA("Network Error",AA.ERR_NETWORK,r,E),{cause:T.cause||T}):AA.from(T,T&&T.code,r,E)}}),Na={http:XI,xhr:Uy,fetch:Ly};I.forEach(Na,(r,e)=>{if(r){try{Object.defineProperty(r,"name",{value:e})}catch{}Object.defineProperty(r,"adapterName",{value:e})}});const Gl=r=>`- ${r}`,xy=r=>I.isFunction(r)||r===null||r===!1,pg={getAdapter:r=>{r=I.isArray(r)?r:[r];const{length:e}=r;let t,i;const o={};for(let a=0;a<e;a++){t=r[a];let u;if(i=t,!xy(t)&&(i=Na[(u=String(t)).toLowerCase()],i===void 0))throw new AA(`Unknown adapter '${u}'`);if(i)break;o[u||"#"+a]=i}if(!i){const a=Object.entries(o).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let u=e?a.length>1?`since :
|
|
51
51
|
`+a.map(Gl).join(`
|
|
52
52
|
`):" "+Gl(a[0]):"as no adapter specified";throw new AA("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:Na};function la(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Ur(null,r)}function Vl(r){return la(r),r.headers=ae.from(r.headers),r.data=ca.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),pg.getAdapter(r.adapter||Un.adapter)(r).then(function(i){return la(r),i.data=ca.call(r,r.transformResponse,i),i.headers=ae.from(i.headers),i},function(i){return gg(i)||(la(r),i&&i.response&&(i.response.data=ca.call(r,r.transformResponse,i.response),i.response.headers=ae.from(i.response.headers))),Promise.reject(i)})}const Ug="1.11.0",ps={};["object","boolean","number","function","string","symbol"].forEach((r,e)=>{ps[r]=function(i){return typeof i===r||"a"+(e<1?"n ":" ")+r}});const Pl={};ps.transitional=function(e,t,i){function o(a,u){return"[Axios v"+Ug+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,l)=>{if(e===!1)throw new AA(o(u," has been removed"+(t?" in "+t:"")),AA.ERR_DEPRECATED);return t&&!Pl[u]&&(Pl[u]=!0,console.warn(o(u," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,u,l):!0}};ps.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function Ky(r,e,t){if(typeof r!="object")throw new AA("options must be an object",AA.ERR_BAD_OPTION_VALUE);const i=Object.keys(r);let o=i.length;for(;o-- >0;){const a=i[o],u=e[a];if(u){const l=r[a],f=l===void 0||u(l,a,r);if(f!==!0)throw new AA("option "+a+" must be "+f,AA.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new AA("Unknown option "+a,AA.ERR_BAD_OPTION)}}const Pi={assertOptions:Ky,validators:ps},We=Pi.validators;let Xt=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Sl,response:new Sl}}async request(e,t){try{return await this._request(e,t)}catch(i){if(i instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
53
|
-
`+a):i.stack=a}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Wt(this.defaults,t);const{transitional:i,paramsSerializer:o,headers:a}=t;i!==void 0&&Pi.assertOptions(i,{silentJSONParsing:We.transitional(We.boolean),forcedJSONParsing:We.transitional(We.boolean),clarifyTimeoutError:We.transitional(We.boolean)},!1),o!=null&&(I.isFunction(o)?t.paramsSerializer={serialize:o}:Pi.assertOptions(o,{encode:We.function,serialize:We.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Pi.assertOptions(t,{baseUrl:We.spelling("baseURL"),withXsrfToken:We.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let u=a&&I.merge(a.common,a[t.method]);a&&I.forEach(["delete","get","head","post","put","patch","common"],E=>{delete a[E]}),t.headers=ae.concat(u,a);const l=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(t)===!1||(f=f&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const h=[];this.interceptors.response.forEach(function(y){h.push(y.fulfilled,y.rejected)});let d,C=0,m;if(!f){const E=[Vl.bind(this),void 0];for(E.unshift(...l),E.push(...h),m=E.length,d=Promise.resolve(t);C<m;)d=d.then(E[C++],E[C++]);return d}m=l.length;let K=t;for(C=0;C<m;){const E=l[C++],y=l[C++];try{K=E(K)}catch(_){y.call(this,_);break}}try{d=Vl.call(this,K)}catch(E){return Promise.reject(E)}for(C=0,m=h.length;C<m;)d=d.then(h[C++],h[C++]);return d}getUri(e){e=Wt(this.defaults,e);const t=hg(e.baseURL,e.url,e.allowAbsoluteUrls);return cg(t,e.params,e.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(e){Xt.prototype[e]=function(t,i){return this.request(Wt(i||{},{method:e,url:t,data:(i||{}).data}))}});I.forEach(["post","put","patch"],function(e){function t(i){return function(a,u,l){return this.request(Wt(l||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Xt.prototype[e]=t(),Xt.prototype[e+"Form"]=t(!0)});let _y=class Fg{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const i=this;this.promise.then(o=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](o);i._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(l=>{i.subscribe(l),a=l}).then(o);return u.cancel=function(){i.unsubscribe(a)},u},e(function(a,u,l){i.reason||(i.reason=new Ur(a,u,l),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Fg(function(o){e=o}),cancel:e}}};function Sy(r){return function(t){return r.apply(null,t)}}function Ty(r){return I.isObject(r)&&r.isAxiosError===!0}const Ga={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ga).forEach(([r,e])=>{Ga[e]=r});function Eg(r){const e=new Xt(r),t=jf(Xt.prototype.request,e);return I.extend(t,Xt.prototype,e,{allOwnKeys:!0}),I.extend(t,e,null,{allOwnKeys:!0}),t.create=function(o){return Eg(Wt(r,o))},t}const yA=Eg(Un);yA.Axios=Xt;yA.CanceledError=Ur;yA.CancelToken=_y;yA.isCancel=gg;yA.VERSION=Ug;yA.toFormData=Qs;yA.AxiosError=AA;yA.Cancel=yA.CanceledError;yA.all=function(e){return Promise.all(e)};yA.spread=Sy;yA.isAxiosError=Ty;yA.mergeConfig=Wt;yA.AxiosHeaders=ae;yA.formToJSON=r=>fg(I.isHTMLForm(r)?new FormData(r):r);yA.getAdapter=pg.getAdapter;yA.HttpStatusCode=Ga;yA.default=yA;const{Axios:Wy,AxiosError:Jy,CanceledError:Yy,isCancel:Zy,CancelToken:qy,VERSION:zy,all:$y,Cancel:jy,isAxiosError:A1,spread:e1,toFormData:t1,AxiosHeaders:r1,HttpStatusCode:n1,formToJSON:i1,getAdapter:s1,mergeConfig:o1}=yA,Dy=p.defineComponent({name:"NotFoundView"}),Oy=(r,e)=>{const t=r.__vccOpts||r;for(const[i,o]of e)t[i]=o;return t},Ry={class:"dv:h-screen dv:w-screen dv:flex dv:flex-col dv:gap-4 dv:items-center dv:justify-center"};function My(r,e,t,i,o,a){return p.openBlock(),p.createElementBlock("div",Ry,e[0]||(e[0]=[p.createElementVNode("p",{class:"dv:text-[8rem]"}," 404 ",-1),p.createElementVNode("div",{class:"dv:text-center"},[p.createElementVNode("h1",{class:"dv:font-bold"}," Page not found "),p.createElementVNode("h2",null," The page you are looking for does not exist (yet...) ")],-1)]))}const Ny=Oy(Dy,[["render",My]]),Gy=p.defineComponent({__name:"ExperienceView",setup(r){const e=p.inject("router"),t=p.inject("mode","dev"),i=p.inject("token"),o=p.ref(void 0),a=p.ref(void 0),u=p.computed(()=>a.value?.response?.data),l=p.ref({dev:"https://api.dev.getplate.rocks/public-api/content-experiences",acc:"https://api.acc.getplate.rocks/public-api/content-experiences",prod:"https://api.acc.getplate.rocks/public-api/content-experiences"}),f=yA.create({baseURL:l.value[t],headers:{Authorization:`Bearer ${i}`}});return p.onMounted(async()=>{if(e){a.value=void 0;try{const{data:h}=await f.get(e?.currentRoute.value.fullPath);o.value=h,document.title=`${o.value?.title} - Organization`}catch(h){
|
|
53
|
+
`+a):i.stack=a}catch{}}throw i}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Wt(this.defaults,t);const{transitional:i,paramsSerializer:o,headers:a}=t;i!==void 0&&Pi.assertOptions(i,{silentJSONParsing:We.transitional(We.boolean),forcedJSONParsing:We.transitional(We.boolean),clarifyTimeoutError:We.transitional(We.boolean)},!1),o!=null&&(I.isFunction(o)?t.paramsSerializer={serialize:o}:Pi.assertOptions(o,{encode:We.function,serialize:We.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Pi.assertOptions(t,{baseUrl:We.spelling("baseURL"),withXsrfToken:We.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let u=a&&I.merge(a.common,a[t.method]);a&&I.forEach(["delete","get","head","post","put","patch","common"],E=>{delete a[E]}),t.headers=ae.concat(u,a);const l=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(t)===!1||(f=f&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const h=[];this.interceptors.response.forEach(function(y){h.push(y.fulfilled,y.rejected)});let d,C=0,m;if(!f){const E=[Vl.bind(this),void 0];for(E.unshift(...l),E.push(...h),m=E.length,d=Promise.resolve(t);C<m;)d=d.then(E[C++],E[C++]);return d}m=l.length;let K=t;for(C=0;C<m;){const E=l[C++],y=l[C++];try{K=E(K)}catch(_){y.call(this,_);break}}try{d=Vl.call(this,K)}catch(E){return Promise.reject(E)}for(C=0,m=h.length;C<m;)d=d.then(h[C++],h[C++]);return d}getUri(e){e=Wt(this.defaults,e);const t=hg(e.baseURL,e.url,e.allowAbsoluteUrls);return cg(t,e.params,e.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(e){Xt.prototype[e]=function(t,i){return this.request(Wt(i||{},{method:e,url:t,data:(i||{}).data}))}});I.forEach(["post","put","patch"],function(e){function t(i){return function(a,u,l){return this.request(Wt(l||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Xt.prototype[e]=t(),Xt.prototype[e+"Form"]=t(!0)});let _y=class Fg{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(a){t=a});const i=this;this.promise.then(o=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](o);i._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(l=>{i.subscribe(l),a=l}).then(o);return u.cancel=function(){i.unsubscribe(a)},u},e(function(a,u,l){i.reason||(i.reason=new Ur(a,u,l),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=i=>{e.abort(i)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Fg(function(o){e=o}),cancel:e}}};function Sy(r){return function(t){return r.apply(null,t)}}function Ty(r){return I.isObject(r)&&r.isAxiosError===!0}const Ga={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ga).forEach(([r,e])=>{Ga[e]=r});function Eg(r){const e=new Xt(r),t=jf(Xt.prototype.request,e);return I.extend(t,Xt.prototype,e,{allOwnKeys:!0}),I.extend(t,e,null,{allOwnKeys:!0}),t.create=function(o){return Eg(Wt(r,o))},t}const yA=Eg(Un);yA.Axios=Xt;yA.CanceledError=Ur;yA.CancelToken=_y;yA.isCancel=gg;yA.VERSION=Ug;yA.toFormData=Qs;yA.AxiosError=AA;yA.Cancel=yA.CanceledError;yA.all=function(e){return Promise.all(e)};yA.spread=Sy;yA.isAxiosError=Ty;yA.mergeConfig=Wt;yA.AxiosHeaders=ae;yA.formToJSON=r=>fg(I.isHTMLForm(r)?new FormData(r):r);yA.getAdapter=pg.getAdapter;yA.HttpStatusCode=Ga;yA.default=yA;const{Axios:Wy,AxiosError:Jy,CanceledError:Yy,isCancel:Zy,CancelToken:qy,VERSION:zy,all:$y,Cancel:jy,isAxiosError:A1,spread:e1,toFormData:t1,AxiosHeaders:r1,HttpStatusCode:n1,formToJSON:i1,getAdapter:s1,mergeConfig:o1}=yA,Dy=p.defineComponent({name:"NotFoundView"}),Oy=(r,e)=>{const t=r.__vccOpts||r;for(const[i,o]of e)t[i]=o;return t},Ry={class:"dv:h-screen dv:w-screen dv:flex dv:flex-col dv:gap-4 dv:items-center dv:justify-center"};function My(r,e,t,i,o,a){return p.openBlock(),p.createElementBlock("div",Ry,e[0]||(e[0]=[p.createElementVNode("p",{class:"dv:text-[8rem]"}," 404 ",-1),p.createElementVNode("div",{class:"dv:text-center"},[p.createElementVNode("h1",{class:"dv:font-bold"}," Page not found "),p.createElementVNode("h2",null," The page you are looking for does not exist (yet...) ")],-1)]))}const Ny=Oy(Dy,[["render",My]]),Gy=p.defineComponent({__name:"ExperienceView",setup(r){const e=p.inject("router"),t=p.inject("mode","dev"),i=p.inject("token"),o=p.ref(void 0),a=p.ref(void 0),u=p.computed(()=>a.value?.response?.data),l=p.ref({dev:"https://api.dev.getplate.rocks/public-api/content-experiences",acc:"https://api.acc.getplate.rocks/public-api/content-experiences",prod:"https://api.acc.getplate.rocks/public-api/content-experiences"}),f=yA.create({baseURL:l.value[t],headers:{Authorization:`Bearer ${i}`}});return p.onMounted(async()=>{if(e){a.value=void 0;try{const{data:h}=await f.get(e?.currentRoute.value.fullPath);o.value=h,document.title=`${o.value?.title} - Organization`}catch(h){o.value=void 0,a.value=h,a.value.response?.status===404?document.title="Not found":document.title="Error"}}}),(h,d)=>u.value?(p.openBlock(),p.createBlock(Ny,{key:0})):o.value?(p.openBlock(),p.createBlock(ns,{key:1,"root-experience-component":o.value.experienceComponent},null,8,["root-experience-component"])):p.createCommentVNode("",!0)}}),Vy={install(r,e={library:{},mode:"dev"}){r.component("RootExperienceComponentProvider",ns),r.component("ExperienceComponent",rs),r.component("GridPlacement",Va),e.router&&(Py(e.router,e.notFoundView,e.mode==="prod"),r.provide("router",e.router)),r.provide("blacklist",e.blacklist??[]),r.provide("library",e.library),r.provide("token",e.token),r.provide("mode",e.mode)}};function Py(r,e,t){r.addRoute(lF),r.addRoute(cF),t||r.addRoute(uF)}exports.EditorControlsContainer=Zf;exports.EditorExperienceComponent=qa;exports.EditorGridPlacement=qf;exports.EditorRootExperienceComponent=zf;exports.EmptyGridPlacements=$f;exports.ExperienceComponent=rs;exports.ExperienceEditorView=nI;exports.ExperiencePreviewView=iI;exports.ExperienceView=Gy;exports.GridPlacement=Va;exports.MissingExperienceComponent=As;exports.RenderLibraryComponent=cn;exports.RootExperienceComponentProvider=ns;exports.delta=Vy;
|
package/index.js
CHANGED
|
@@ -10835,7 +10835,7 @@ const n1 = /* @__PURE__ */ e1(A1, [["render", r1]]), I1 = /* @__PURE__ */ ae({
|
|
|
10835
10835
|
const { data: h } = await f.get(e?.currentRoute.value.fullPath);
|
|
10836
10836
|
o.value = h, document.title = `${o.value?.title} - Organization`;
|
|
10837
10837
|
} catch (h) {
|
|
10838
|
-
|
|
10838
|
+
o.value = void 0, a.value = h, a.value.response?.status === 404 ? document.title = "Not found" : document.title = "Error";
|
|
10839
10839
|
}
|
|
10840
10840
|
}
|
|
10841
10841
|
}), (h, d) => u.value ? (rA(), ee(n1, { key: 0 })) : o.value ? (rA(), ee(nB, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platecms/delta-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Plugin to connect to the Plate Delta CMS in a Vue application.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"publishConfig": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"./style.css": "./style.css"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@platecms/delta-cast": "0.
|
|
27
|
-
"@platecms/delta-castscript": "0.
|
|
28
|
-
"@platecms/delta-client": "0.
|
|
29
|
-
"@platecms/delta-plate-resource-notation": "0.
|
|
26
|
+
"@platecms/delta-cast": "0.6.0",
|
|
27
|
+
"@platecms/delta-castscript": "0.6.0",
|
|
28
|
+
"@platecms/delta-client": "0.6.0",
|
|
29
|
+
"@platecms/delta-plate-resource-notation": "0.6.0",
|
|
30
30
|
"@graphql-codegen/cli": "5.0.7",
|
|
31
31
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
32
32
|
"axios": "1.11.0",
|