update packages

This commit is contained in:
Meghdad committed 2026-11-25 21:50:39 +03:30
1 parent 8d5446f466
commit 8cfce7b922
51 files changed
+1983 -1681

No files matched your search

@@ -0,0 +1 @@
var m=o=>JSON.parse(JSON.stringify(o));function y({renderer:o,getBaseUrl:u,getContext:f,getProps:a,onError:i,onFailure:c,onReady:p=()=>{},onDestroy:h=()=>{}}){let s,r=!1,d=t=>{try{Promise.resolve(t?.destroy()).catch(e=>i("cleanup",e))}catch(e){i("cleanup",e)}},g=()=>{if(r)return;r=!0,h();let t=s;s=void 0,d(t)},l=(t,e)=>{if(r)return;r=!0,h(),i(t,e);let n=s;s=void 0,d(n),c()},$=()=>{if(!(r||!s))try{let t=a();if(t===void 0)return;Promise.resolve(s.update(t)).catch(e=>l("update",e))}catch(t){l("update",t)}};return{async init(){let t=typeof o=="string"?"import":"mount";try{if(!o){p();return}let e=typeof o=="string"?(await import(new URL(o,u()).href)).default:o;if(r)return;if(typeof e!="function")throw new TypeError("The renderer module must default-export a mount function.");t="mount";let n=await e(f());if(typeof n?.update!="function"||typeof n?.destroy!="function")throw typeof n?.destroy=="function"&&d(n),new TypeError("The renderer must return update() and destroy() methods.");if(r){d(n);return}s=n,$(),r||p()}catch(e){l(t,e)}},update:$,destroy:g}}function w({renderer:o,rendererConfiguration:u={},componentConfiguration:f}){let a,i=()=>({...f,configuration:m(u)});return{hasError:!1,updateRendererConfiguration(c){u=m(c),a?.update()},init(){let c=this;return a=y({renderer:o,getBaseUrl:()=>this.$el.ownerDocument.baseURI,getProps:i,getContext:()=>({host:this.$refs.host,props:i(),utilities:{...this.$schemaComponentMethods,get $wire(){return c.$wire},$callSchemaComponentMethod:this.$callSchemaComponentMethod,$get:this.$get,$set:this.$set,$statePath:this.$statePath,get $state(){return c.$state}}}),onError:(p,h)=>{console.error(`JS schema component ${p} failed:`,{statePath:this.$statePath,renderer:o},h)},onReady:()=>this.$dispatch("async-component-ready"),onFailure:()=>{this.$refs.host.replaceChildren(),this.hasError=!0,this.$dispatch("async-component-ready")}}),a.init()},destroy(){a?.destroy()}}}export{w as default};