"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),r=require("lodash"),m=require("../../core/useChart.js"),v={class:"zerov-widget"},b=["id"],_=s.defineComponent({name:"zv-chart-other-treemap-basic"}),f=s.defineComponent({..._,props:{basicOption:{},sources:{},useEvents:{},uuid:{}},emits:["chart-click","chart-dblclick","chart-mousedown","chart-mouseover","chart-mouseout","chart-contextmenu"],setup(i,{expose:u,emit:d}){const e=i,l=d,{id:h,setOption:o,chart:p,renderChart:n,renderData:a}=m.useChart({basicOption:r.cloneDeep(e.basicOption),useEvents:r.cloneDeep(e.useEvents),customRenderData:t=>{t=r.cloneDeep(t),window.SHJDatasourceV2({tId:e.uuid,sources:e.sources,callback:({data:c})=>{try{window.SHJParseEvent(e.useEvents,"dataListener",c),t.series[0].data=r.cloneDeep(c[0].data),o(t)}catch{window.SHJParseEvent(e.useEvents,"dataListener",null),o(t)}}})},emit:l});return s.watch(()=>e.sources,()=>{a(e.basicOption)},{deep:!0}),s.watch(()=>r.cloneDeep(e.basicOption),(t,c)=>{r.isEqual(t,c)||n(t)},{deep:!0}),u({getEchartsInstance:()=>p.value,refresh:()=>{e.sources&&e.sources.length>0&&n(e.basicOption),a(e.basicOption)},refreshView:()=>{e.sources&&e.sources.length>0&&n(e.basicOption)},refreshData:()=>{a(e.basicOption)}}),(t,c)=>(s.openBlock(),s.createElementBlock("div",v,[s.createElementVNode("div",{id:s.unref(h),class:"widget"},null,8,b)]))}});exports.default=f;
