@ibiz-template/vue3-components 0.7.30-alpha.2 → 0.7.30-alpha.3

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.
@@ -1 +1 @@
1
- System.register(["vue","@ibiz-template/vue3-util","echarts","qx-util","@ibiz-template/runtime"],(function(e){"use strict";var t,i,s,o,a,n,l,r,c,d,h,u,m,p,v;return{setters:[function(e){t=e.defineComponent,i=e.ref,s=e.watch,o=e.onMounted,a=e.onBeforeUnmount,n=e.createVNode,l=e.resolveComponent,r=e.nextTick,c=e.isVNode},function(e){d=e.useControlController,h=e.useNamespace,u=e.useClickOutside},function(e){m=e.init},function(e){p=e.createUUID},function(e){v=e.ChartController}],execute:function(){e("default",t({name:"IBizChartControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},loadDefault:{type:Boolean,default:!0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1}},emits:["drillDown"],setup(e,{emit:t}){const f=d(((...e)=>new v(...e))),w=h("control-".concat(f.model.controlType.toLowerCase())),g=i(),b=i(0),D=p(),y=i(!1),C=i({}),z=i();let P,x;const L=()=>{e.data&&(f.state.items=e.data,f.afterLoad({},f.state.items))};f.evt.on("onCreated",(async()=>{e.isSimple&&(L(),f.state.isSimple=!0,f.state.isLoaded=!0)})),s((()=>e.data),(()=>{e.isSimple&&L()}),{deep:!0});const O=async()=>{await r();const e=document.getElementById(D);e&&("bottom"===f.state.gridPosition||"top"===f.state.gridPosition?b.value=e.offsetHeight/2-8:b.value=e.offsetHeight-16)};let B;o((()=>{var t,i;const s=m(g.value);f.initChart(s),window.addEventListener("resize",O),g.value&&ResizeObserver&&(B=new ResizeObserver((()=>{f.resizeChart()})),B.observe(g.value)),O(),(null==(i=null==(t=e.modelData.controlParam)?void 0:t.ctrlParams)?void 0:i.ENABLEDRILLDOWN)&&s.on("click",(e=>{x=e,s.dispatchAction({type:"hideTip"}),y.value=!0,f.changeTooltipState(!1),P=u(z,(()=>{y.value=!1,f.changeTooltipState(!0),P.stop()})),(e=>{if(e.event){const t=e.event.event;t.stopPropagation(),t.preventDefault();const{offsetX:i,offsetY:s}=e.event;C.value={top:"".concat(s,"px"),left:"".concat(i+16,"px")}}})(e)}))}));s((()=>f.state.showGrid),(()=>{O()}),{immediate:!0});return a((()=>{window.removeEventListener("resize",O),null==B||B.disconnect()})),{c:f,ns:w,chartRef:g,uuid:D,showCheck:y,drillDownPos:C,drillDownRef:z,openDrillDown:e=>{y.value=!1,P&&P.stop(),f.changeTooltipState(!0);const i=f.computedDrillDownParam(x);t("drillDown",i)},renderGrid:()=>{let e;return n(l("el-table"),{ref:"tableRef",data:f.state.gridData||[],border:!0,style:{width:"100%"},"max-height":b.value,"header-row-class-name":w.e("grid-header")},"function"==typeof(t=e=f.state.gridHeaders.map((e=>n(l("el-table-column"),{prop:e.id,align:"center",label:e.name},null))))||"[object Object]"===Object.prototype.toString.call(t)&&!c(t)?e:{default:()=>[e]});var t}}},render(){return n(l("iBizControlBase"),{controller:this.c},{default:()=>[n("div",{id:this.uuid,class:this.ns.b("chart-container")},[n(l("el-empty"),{class:[this.ns.e("empty"),this.ns.is("no-data",0===this.c.state.items.length)],description:ibiz.i18n.t("control.common.currentNoData")},null),n("div",{class:[this.ns.e("chart-grid"),this.ns.is("no-data",0===this.c.state.items.length),this.ns.is("show-grid",this.c.state.showGrid),{[this.ns.em("chart-grid",this.c.state.gridPosition)]:this.c.state.showGrid}]},[n("div",{class:[this.ns.e("chart-grid-container"),this.ns.is(this.c.state.gridPosition,this.c.state.showGrid),this.ns.is("no-grid",!this.c.state.showGrid)]},[n("div",{ref:"chartRef",class:[this.ns.e("chart")]},[ibiz.i18n.t("control.chart.chartPlaceholder")]),this.showCheck?n("div",{ref:"drillDownRef",class:this.ns.e("drill-down"),style:this.drillDownPos},[n("div",{class:this.ns.em("drill-down","item")},[n("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false",fill:"currentColor"},[n("g",{id:"aspnormal/preview","stroke-width":"1","fill-rule":"evenodd"},[n("path",{d:"M11.626 0c1.057 0 1.923.818 2 1.855l.005.15v3.411a.6.6 0 0 1-1.192.097l-.008-.097.001-1.348V2.005c0-.41-.31-.749-.705-.799l-.101-.006h-9.62c-.41 0-.75.308-.8.704l-.006.101v11.989c0 .41.308.75.705.8l.101.006h5.906l.017-.004.016-.003h2.074a.598.598 0 1 1 .107 1.187l-.095.01V16H2.006a2.006 2.006 0 0 1-2-1.856L0 13.994V2.005C0 .948.818.082 1.856.005L2.006 0h9.62zm-1.595 6.328a3.669 3.669 0 0 1 3.665 3.665c0 .79-.251 1.523-.678 2.123l2.412 2.412a.6.6 0 1 1-.848.85l-2.41-2.412a3.646 3.646 0 0 1-2.14.692 3.67 3.67 0 0 1-3.667-3.665 3.67 3.67 0 0 1 3.666-3.665zm-5.106 5.29a.6.6 0 0 1 .097 1.191l-.097.008H2.85a.6.6 0 0 1-.097-1.192l.097-.008h2.074zm5.106-4.09a2.468 2.468 0 0 0-2.466 2.465 2.468 2.468 0 0 0 2.466 2.466 2.47 2.47 0 0 0 2.466-2.466 2.469 2.469 0 0 0-2.466-2.465zm-4.815-.126a.6.6 0 0 1 .097 1.193l-.097.007h-2.35A.6.6 0 0 1 2.77 7.41l.098-.008h2.349zm5.58-4a.6.6 0 0 1 .097 1.192l-.097.008H2.867A.6.6 0 0 1 2.77 3.41l.097-.008h7.929z",id:"asp合并形状"},null)])]),n("div",{class:this.ns.em("drill-down","item-text"),onClick:this.openDrillDown},[ibiz.i18n.t("control.chart.drillDown")])])]):null]),this.c.state.showGrid?n("div",{class:this.ns.e("grid")},[this.renderGrid()]):null])])]})}}))}}}));
1
+ System.register(["vue","@ibiz-template/vue3-util","echarts","qx-util","@ibiz-template/runtime"],(function(e){"use strict";var t,i,s,o,a,n,l,r,c,d,h,u,m,p,v;return{setters:[function(e){t=e.defineComponent,i=e.ref,s=e.watch,o=e.onMounted,a=e.onBeforeUnmount,n=e.createVNode,l=e.resolveComponent,r=e.nextTick,c=e.isVNode},function(e){d=e.useControlController,h=e.useNamespace,u=e.useClickOutside},function(e){m=e.init},function(e){p=e.createUUID},function(e){v=e.ChartController}],execute:function(){e("default",t({name:"IBizChartControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},mdctrlActiveMode:{type:Number,default:void 0},loadDefault:{type:Boolean,default:!0},isSimple:{type:Boolean,required:!1},data:{type:Array,required:!1}},emits:["drillDown"],setup(e,{emit:t}){const f=d(((...e)=>new v(...e))),w=h("control-".concat(f.model.controlType.toLowerCase())),g=i(),b=i(0),D=p(),y=i(!1),C=i({}),z=i();let P,x;const L=()=>{e.data&&(f.state.items=e.data,f.afterLoad({},f.state.items))};f.evt.on("onCreated",(async()=>{e.isSimple&&(L(),f.state.isSimple=!0,f.state.isLoaded=!0)})),s((()=>e.data),(()=>{e.isSimple&&L()}),{deep:!0});const O=async()=>{await r();const e=document.getElementById(D);e&&("bottom"===f.state.gridPosition||"top"===f.state.gridPosition?b.value=e.offsetHeight/2-8:b.value=e.offsetHeight-16)};let B;o((()=>{var t,i;const s=m(g.value);f.initChart(s),window.addEventListener("resize",O),g.value&&ResizeObserver&&(B=new ResizeObserver((()=>{f.resizeChart()})),B.observe(g.value)),O(),(null==(i=null==(t=e.modelData.controlParam)?void 0:t.ctrlParams)?void 0:i.ENABLEDRILLDOWN)&&s.on("click",(e=>{x=e,s.dispatchAction({type:"hideTip"}),y.value=!0,f.changeTooltipState(!1),P=u(z,(()=>{y.value=!1,f.changeTooltipState(!0),P.stop()})),(e=>{if(e.event){const t=e.event.event;t.stopPropagation(),t.preventDefault();const{offsetX:i,offsetY:s}=e.event;C.value={top:"".concat(s,"px"),left:"".concat(i+16,"px")}}})(e)}))}));s((()=>f.state.showGrid),(()=>{O()}),{immediate:!0});return a((()=>{window.removeEventListener("resize",O),null==B||B.disconnect()})),{c:f,ns:w,chartRef:g,uuid:D,showCheck:y,drillDownPos:C,drillDownRef:z,openDrillDown:e=>{y.value=!1,P&&P.stop(),f.changeTooltipState(!0);const i=f.computedDrillDownParam(x);t("drillDown",i)},renderGrid:()=>{let e;return n(l("el-table"),{ref:"tableRef",data:f.state.gridData||[],border:!0,style:{width:"100%"},"max-height":b.value,"header-row-class-name":w.e("grid-header")},"function"==typeof(t=e=f.state.gridHeaders.map((e=>n(l("el-table-column"),{prop:e.id,align:"center",label:e.name},null))))||"[object Object]"===Object.prototype.toString.call(t)&&!c(t)?e:{default:()=>[e]});var t}}},render(){return n(l("iBizControlBase"),{controller:this.c},{default:()=>[n("div",{id:this.uuid,class:this.ns.b("chart-container")},[n(l("el-empty"),{class:[this.ns.e("empty"),this.ns.is("no-data",0===this.c.state.items.length)],description:ibiz.i18n.t("control.common.currentNoData")},null),n("div",{class:[this.ns.e("chart-grid"),this.ns.is("no-data",0===this.c.state.items.length),this.ns.is("show-grid",this.c.state.showGrid),{[this.ns.em("chart-grid",this.c.state.gridPosition)]:this.c.state.showGrid}]},[n("div",{class:[this.ns.e("chart-grid-container"),this.ns.is(this.c.state.gridPosition,this.c.state.showGrid),this.ns.is("no-grid",!this.c.state.showGrid)]},[n("div",{ref:"chartRef",class:[this.ns.e("chart")]},[ibiz.i18n.t("control.chart.chartPlaceholder")]),this.showCheck?n("div",{ref:"drillDownRef",class:this.ns.e("drill-down"),style:this.drillDownPos,onClick:this.openDrillDown},[n("div",{class:this.ns.em("drill-down","item")},[n("svg",{viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",focusable:"false",fill:"currentColor"},[n("g",{id:"aspnormal/preview","stroke-width":"1","fill-rule":"evenodd"},[n("path",{d:"M11.626 0c1.057 0 1.923.818 2 1.855l.005.15v3.411a.6.6 0 0 1-1.192.097l-.008-.097.001-1.348V2.005c0-.41-.31-.749-.705-.799l-.101-.006h-9.62c-.41 0-.75.308-.8.704l-.006.101v11.989c0 .41.308.75.705.8l.101.006h5.906l.017-.004.016-.003h2.074a.598.598 0 1 1 .107 1.187l-.095.01V16H2.006a2.006 2.006 0 0 1-2-1.856L0 13.994V2.005C0 .948.818.082 1.856.005L2.006 0h9.62zm-1.595 6.328a3.669 3.669 0 0 1 3.665 3.665c0 .79-.251 1.523-.678 2.123l2.412 2.412a.6.6 0 1 1-.848.85l-2.41-2.412a3.646 3.646 0 0 1-2.14.692 3.67 3.67 0 0 1-3.667-3.665 3.67 3.67 0 0 1 3.666-3.665zm-5.106 5.29a.6.6 0 0 1 .097 1.191l-.097.008H2.85a.6.6 0 0 1-.097-1.192l.097-.008h2.074zm5.106-4.09a2.468 2.468 0 0 0-2.466 2.465 2.468 2.468 0 0 0 2.466 2.466 2.47 2.47 0 0 0 2.466-2.466 2.469 2.469 0 0 0-2.466-2.465zm-4.815-.126a.6.6 0 0 1 .097 1.193l-.097.007h-2.35A.6.6 0 0 1 2.77 7.41l.098-.008h2.349zm5.58-4a.6.6 0 0 1 .097 1.192l-.097.008H2.867A.6.6 0 0 1 2.77 3.41l.097-.008h7.929z",id:"asp合并形状"},null)])]),n("div",{class:this.ns.em("drill-down","item-text")},[ibiz.i18n.t("control.chart.drillDown")])])]):null]),this.c.state.showGrid?n("div",{class:this.ns.e("grid")},[this.renderGrid()]):null])])]})}}))}}}));