UNPKG

@galaxyproject/galaxy-client

Version:

Galaxy client application build system

1 lines 1.12 kB
"use strict";(self.webpackChunk_galaxyproject_galaxy_client=self.webpackChunk_galaxyproject_galaxy_client||[]).push([[9840],{79840:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var n=t(62893),r=t(46517),l=t(62949);const s=(0,n.defineComponent)({__name:"VegaWrapper",props:{spec:null,fillWidth:{type:Boolean,default:!0}},setup(e){const a=e,t=(0,n.ref)(null),s=(0,n.ref)("");let i;async function o(){try{if(await(0,n.nextTick)(),i&&i.finalize(),null!==t.value){const e=await(0,l.Ay)(t.value,a.spec,{renderer:"svg"});i=e.view}s.value=""}catch(e){s.value=String(e)}}return(0,n.watch)(a,o,{deep:!0}),(0,r.wYm)(t,(()=>{i&&i.resize()})),(0,n.onMounted)((()=>o())),(0,n.onBeforeUnmount)((()=>{i&&i.finalize()})),{__sfc:!0,props:a,chartContainer:t,errorMessage:s,vegaView:i,embedChart:o}}});const i=(0,t(14486).A)(s,(function(){var e=this,a=e._self._c,t=e._self._setupProxy;return a("div",[t.errorMessage?a("b-alert",{staticClass:"p-2",attrs:{variant:"danger",show:""}},[e._v("\n "+e._s(t.errorMessage)+"\n ")]):e._e(),e._v(" "),a("div",{ref:"chartContainer",class:e.fillWidth&&"w-100"})],1)}),[],!1,null,null,null).exports}}]);