vue-data-ui 2.3.28 → 2.3.30
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/README.md +15 -0
- package/dist/{Arrow-C6lQ94rK.cjs → Arrow-B8z06v67.cjs} +1 -1
- package/dist/{Arrow-BPoxM_Tq.js → Arrow-Bh7WeO_g.js} +1 -1
- package/dist/{BaseIcon-Op8_v5x7.js → BaseIcon-BG_bJS3R.js} +1 -1
- package/dist/{BaseIcon-BK5xYOzV.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
- package/dist/{DataTable-bEXuvNn5.js → DataTable-CsPidn0_.js} +23 -20
- package/dist/DataTable-Doh_4M84.cjs +1 -0
- package/dist/{Legend-BNfS77GS.cjs → Legend-B20rRwGi.cjs} +1 -1
- package/dist/{Legend-DwludSgp.js → Legend-CkQ_zypV.js} +1 -1
- package/dist/{Shape-COYAxpcP.js → Shape-B4gGeBLI.js} +1 -1
- package/dist/{Shape-CcWWIf-s.cjs → Shape-B8O8_E6l.cjs} +1 -1
- package/dist/{Slicer-DGkm-5p-.cjs → Slicer-BXveU40S.cjs} +1 -1
- package/dist/{Slicer-Cv-2s_-r.js → Slicer-DaEfxscP.js} +1 -1
- package/dist/{Title-DQz9dO4d.cjs → Title-BU6E8Xld.cjs} +1 -1
- package/dist/{Title-CtWGLaoz.js → Title-eBTH8iGJ.js} +1 -1
- package/dist/{Tooltip-D6BUVHr1.js → Tooltip-B11OahTD.js} +1 -1
- package/dist/{Tooltip-DQgBkgFk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
- package/dist/{index-BhCM2QF1.js → index-BlXzlBwZ.js} +443 -364
- package/dist/index-hKWfT7Wa.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +66 -0
- package/dist/types/vue-data-ui.d.ts +66 -0
- package/dist/{useNestedProp-CH3PVhvc.js → useNestedProp-BoNl5H_z.js} +1 -1
- package/dist/{useNestedProp-C2H2jmU6.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
- package/dist/{usePrinter-B75HLwzw.js → usePrinter-CZ8F5Cth.js} +1 -1
- package/dist/{usePrinter-DTF28E03.cjs → usePrinter-DoYKBzst.cjs} +1 -1
- package/dist/{vue-data-ui-DdhV5Pth.js → vue-data-ui-BOqzG_nZ.js} +57 -57
- package/dist/{vue-data-ui-cqeqQWwY.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +6 -6
- package/dist/{vue-ui-3d-bar-gi0fEJUl.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
- package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
- package/dist/{vue-ui-accordion-CVrj6roI.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
- package/dist/{vue-ui-accordion-CSZdj7wA.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
- package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CFSWDX3d.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
- package/dist/{vue-ui-annotator-DqZU11ky.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
- package/dist/{vue-ui-annotator-u5YbenPl.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C3xswSm3.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dph2PhZC.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
- package/dist/{vue-ui-carousel-table-0S6lSZnt.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-eY08SE2G.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
- package/dist/{vue-ui-chestnut-BikYCrjQ.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
- package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
- package/dist/{vue-ui-cursor-OFgeAFSo.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
- package/dist/{vue-ui-cursor-DUA57VkZ.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BTG0m9YL.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DA4M1Z0-.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
- package/dist/{vue-ui-digits-55Zmunkv.js → vue-ui-digits-CmSFSs5S.js} +2 -2
- package/dist/{vue-ui-digits-COxRiMVI.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
- package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
- package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
- package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
- package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
- package/dist/{vue-ui-dumbbell-BSFT-Bce.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-BtEXt5Ox.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
- package/dist/{vue-ui-flow-BPEGOFRZ.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
- package/dist/{vue-ui-flow-BBoXBTkC.js → vue-ui-flow-wq0aqc5r.js} +98 -93
- package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
- package/dist/{vue-ui-galaxy-ZFEufIyy.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
- package/dist/{vue-ui-gauge-CfZ9XJW_.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
- package/dist/{vue-ui-gauge-BqZp_V5m.js → vue-ui-gauge-CIN265dN.js} +158 -149
- package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
- package/dist/{vue-ui-gizmo-DitbWAJp.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
- package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
- package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
- package/dist/{vue-ui-kpi-BWuzEkyY.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
- package/dist/{vue-ui-kpi-B2Bo26hh.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwAWiK3k.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
- package/dist/{vue-ui-mini-loader-C_Nb-qVd.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
- package/dist/{vue-ui-molecule-CSbXNrvu.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
- package/dist/{vue-ui-molecule-BD2UW2lJ.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
- package/dist/{vue-ui-mood-radar-CbMab8pJ.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
- package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-SDaiotgC.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
- package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
- package/dist/{vue-ui-onion-BamHJBdP.js → vue-ui-onion-B_khL0Kv.js} +230 -196
- package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BaAa3t1h.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-1R4CyBdQ.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
- package/dist/{vue-ui-quadrant-CKCLhAS7.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
- package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
- package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
- package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
- package/dist/{vue-ui-radar-BY-y8Mal.js → vue-ui-radar-B2vAPYa7.js} +237 -214
- package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
- package/dist/{vue-ui-rating-DGEgzOaB.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bq1SsByA.js → vue-ui-rating-xGz4av68.js} +9 -9
- package/dist/{vue-ui-relation-circle-BPzLP6U6.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
- package/dist/{vue-ui-relation-circle-pdZ79G9r.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
- package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
- package/dist/{vue-ui-rings-C5ce6pEf.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
- package/dist/{vue-ui-scatter-CMetujXJ.js → vue-ui-scatter-CHONk8k0.js} +437 -381
- package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
- package/dist/{vue-ui-screenshot-BqzljUT3.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
- package/dist/{vue-ui-screenshot--2aeIH_x.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
- package/dist/{vue-ui-skeleton-_VMQ594N.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
- package/dist/{vue-ui-skeleton-B5Z4craS.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
- package/dist/{vue-ui-smiley-CL-bubXk.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cty3e_yE.js → vue-ui-smiley-DXVcosKR.js} +2 -2
- package/dist/{vue-ui-spark-trend-DT1fMqf_.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-pgdWTEqG.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
- package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
- package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
- package/dist/{vue-ui-sparkgauge-DdzlyDsm.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dx2gFX6H.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
- package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-Bg_fJsT5.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
- package/dist/{vue-ui-sparkline-WMI-RgkW.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BWl_B6LX.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
- package/dist/{vue-ui-sparkstackbar-Skcshn6g.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-MMGRG9eS.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
- package/dist/{vue-ui-stackbar-NZFO3R77.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
- package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
- package/dist/{vue-ui-strip-plot-CJmCgC_a.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
- package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
- package/dist/{vue-ui-table-jJ3daLHe.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
- package/dist/{vue-ui-table-B-vHHlRw.js → vue-ui-table-DtwEoIzI.js} +9 -9
- package/dist/{vue-ui-table-heatmap-YCyFyq8J.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BfzDb2H7.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
- package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
- package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
- package/dist/{vue-ui-thermometer-CdtG1AoI.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
- package/dist/{vue-ui-timer-Cb95XSdn.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
- package/dist/{vue-ui-timer-DBqMb9iX.js → vue-ui-timer-RA9yfgBk.js} +8 -8
- package/dist/{vue-ui-tiremarks-CHKETcHr.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
- package/dist/{vue-ui-tiremarks-BqXfvQ4t.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
- package/dist/{vue-ui-treemap-DxKunHfW.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
- package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
- package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
- package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
- package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
- package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
- package/dist/{vue-ui-wheel-kMVi976p.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
- package/dist/{vue-ui-wheel-4HKXl04I.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
- package/dist/{vue-ui-word-cloud-CrC3iKGd.js → vue-ui-word-cloud-DBxVNlJ3.js} +7 -7
- package/dist/{vue-ui-word-cloud-WgbYJhMF.cjs → vue-ui-word-cloud-Dmcelg3z.cjs} +1 -1
- package/dist/{vue-ui-xy-BN_H7q0X.js → vue-ui-xy-BIbvJSh2.js} +367 -288
- package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
- package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DAY9Ylzs.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
- package/package.json +1 -1
- package/dist/DataTable-B4_9ynlY.cjs +0 -1
- package/dist/index-Y23HeR26.cjs +0 -4
- package/dist/vue-ui-3d-bar-BB6yidY7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CrTadT86.cjs +0 -1
- package/dist/vue-ui-chestnut-C3XOHDgw.cjs +0 -6
- package/dist/vue-ui-donut-CG3VWjnG.js +0 -751
- package/dist/vue-ui-donut-JA9hlLlV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CA8sDbwX.js +0 -805
- package/dist/vue-ui-donut-evolution-_E0xUI9Y.cjs +0 -1
- package/dist/vue-ui-galaxy-DPrJum3L.cjs +0 -1
- package/dist/vue-ui-gizmo-CrSaW32p.cjs +0 -1
- package/dist/vue-ui-heatmap-CTRjjhmd.cjs +0 -1
- package/dist/vue-ui-heatmap-zV0pg2Q5.js +0 -606
- package/dist/vue-ui-mood-radar-zpxdsZ4u.cjs +0 -1
- package/dist/vue-ui-nested-donuts-07UI_VlW.cjs +0 -16
- package/dist/vue-ui-onion-DiychUul.cjs +0 -1
- package/dist/vue-ui-quadrant-DxLYb8Mk.cjs +0 -1
- package/dist/vue-ui-quick-chart-CAXuRSdm.js +0 -1318
- package/dist/vue-ui-quick-chart-DgCRM6WA.cjs +0 -13
- package/dist/vue-ui-radar-iETP_3US.cjs +0 -1
- package/dist/vue-ui-rings-DdpKT3DJ.cjs +0 -1
- package/dist/vue-ui-scatter-Dsc6RABP.cjs +0 -1
- package/dist/vue-ui-sparkbar-BVQPOz2O.js +0 -257
- package/dist/vue-ui-sparkbar-kfA-BPVJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B5xstgQG.cjs +0 -1
- package/dist/vue-ui-stackbar-DZ0CArmk.cjs +0 -15
- package/dist/vue-ui-strip-plot-Db_dqjd9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-4Qbmxxsy.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DZt-bo2D.js +0 -420
- package/dist/vue-ui-thermometer-HXWDU2wD.cjs +0 -1
- package/dist/vue-ui-treemap-CW9JmJ2d.cjs +0 -1
- package/dist/vue-ui-vertical-bar-83AMwsHD.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DRLwZjIz.js +0 -745
- package/dist/vue-ui-waffle-BRuDxyDU.js +0 -650
- package/dist/vue-ui-waffle-BwUbvdOE.cjs +0 -1
- package/dist/vue-ui-xy-BXfP5pz5.cjs +0 -3
- package/dist/vue-ui-xy-canvas-NrhVgFsv.cjs +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Y23HeR26.cjs"),ue=require("./Title-DQz9dO4d.cjs"),A=require("./usePrinter-DTF28E03.cjs"),ie=require("./DataTable-B4_9ynlY.cjs"),ce=require("./vue-ui-accordion-CVrj6roI.cjs"),de=require("./vue-ui-skeleton-B5Z4craS.cjs"),W=require("./useNestedProp-C2H2jmU6.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],he=["xmlns","viewBox"],me=["id"],pe=["stop-color"],ge=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ke=["x","y","font-size","fill"],we=["x","y","font-size","fill"],Ce={key:2,class:"vue-data-ui-watermark"},xe=["innerHTML"],$e={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(X,{expose:R}){const f=X,{vue_ui_flow:Z}=i.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{i.objectIsEmpty(f.dataset)&&i.error({componentName:"VueUiFlow",type:"dataset"})});const B=e.ref(i.createUid()),T=e.ref(null),P=e.ref(0),b=e.ref(!1);function J(o){b.value=o,P.value+=1}const t=e.computed(()=>{const o=W.useNestedProp({userConfig:f.config,defaultConfig:Z});return o.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_flow[o.theme]||f.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}),{isPrinting:F,isImaging:L,generatePdf:z,generateImage:I}=A.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),N=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show}),O=e.computed(()=>t.value.style.chart.links.width),V=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}f.dataset.forEach(([r,a,c])=>{n(r),n(a),o[r].outflow+=c,o[a].inflow+=c});let l=0;for(const r in o){const a=Math.max(o[r].inflow,o[r].outflow);l=Math.max(l,a)}return l});function K(o){return o/V.value*100+t.value.style.chart.nodes.minHeight}function Q(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*V.value}function ee(o){const n={},l={};function r(s,u){n[s]||(n[s]={height:0,level:null,inflow:0,outflow:0}),n[s].level===null&&(n[s].level=u),l[u]||(l[u]=[]),l[u].includes(s)||l[u].push(s)}o.forEach(([s,u,v],y)=>{const p=n[s]?n[s].level:0,x=p+1;r(s,p),r(u,x),n[s].children||(n[s].children=[]),n[s].children.push({target:u,value:v}),n[s].outflow+=v,n[u].inflow+=v}),Object.keys(n).forEach((s,u)=>{n[s].color=N.value[u]||N.value[u%N.value.length]||i.palette[u]||i.palette[u%d.length]});for(const s in n)n[s].height=K(Math.max(n[s].inflow,n[s].outflow)),n[s].name=s;const a={};for(const s in l){let u=0;l[s].forEach((v,y)=>{const p=n[v].height;a[v]={x:parseInt(s,10)*O.value+t.value.style.chart.padding.left,y:u,absoluteY:u,height:p,i:y,color:n[v].color,value:Q(p)},u+=p+H.value})}const c=[];for(const s in n){let u=a[s].absoluteY;n[s].children&&n[s].children.forEach(({target:v,value:y},p)=>{const x=a[v].y,E=a[s],S=a[v],q=u,G=u+y/n[s].outflow*E.height,U=x,j=x+y/n[v].inflow*S.height,re={id:i.createUid(),source:s,target:v,path:`M ${E.x+g.value} ${q} L ${E.x+g.value} ${G} L ${S.x} ${j} L ${S.x} ${U} Z`,value:y,sourceColor:n[s].color,targetColor:n[v].color};c.push(re),u+=G-q,a[v].y+=j-U})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const o=ee(f.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),te=e.computed(()=>le(h.value.nodes));function le(o){const n={};for(const r in o){const{x:a,height:c}=o[r];n[a]||(n[a]=0),n[a]+=c+H.value}return Math.max(...Object.values(n))}const _=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=f.dataset.length*O.value;return{height:te.value+o+r,width:n+Math.max(...h.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function oe(o){const n={},l={},r=new Set;return f.dataset.forEach(([a,c,s])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>r.add(a)),l[o]&&l[o].forEach(a=>r.add(a)),Array.from(r).concat(o)}const m=e.ref(null),w=e.ref(null);function ne(o){m.value=oe(o.name),w.value=o.name}function ae(){m.value=null,w.value=null}const M=e.computed(()=>h.value.links.map(({source:o,target:n,sourceColor:l,targetColor:r,value:a})=>({source:o,target:n,sourceColor:l,targetColor:r,value:a})));function Y(){e.nextTick(()=>{const o=M.value.map((r,a)=>[[r.source],[r.target],[r.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=i.createCsvContent(n);i.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=M.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},i.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function se(){return h.value}function D(){k.value.showTable=!k.value.showTable}return R({getData:se,generateCsv:Y,generateImage:I,generatePdf:z,toggleTable:D}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:T,class:e.normalizeClass(`vue-ui-flow ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ue._sfc_main,{config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(L),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,onToggleFullscreen:J,onGeneratePdf:e.unref(z),onGenerateCsv:Y,onGenerateImage:e.unref(I),onToggleTable:D},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${_.value.width} ${_.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,ge)],8,me))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[l.target,l.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,ye))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:l.absoluteY,height:l.height,width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ne(l),onMouseleave:n[0]||(n[0]=a=>ae()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(i.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})),13,we))),256)),e.renderSlot(o.$slots,"svg",{svg:_.value},void 0,!0)],14,he)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ie.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Be=ve._export_sfc($e,[["__scopeId","data-v-4616230a"]]);exports.default=Be;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-hKWfT7Wa.cjs"),ue=require("./Title-BU6E8Xld.cjs"),A=require("./usePrinter-DoYKBzst.cjs"),ie=require("./DataTable-Doh_4M84.cjs"),ce=require("./vue-ui-accordion-CTYvdLLH.cjs"),de=require("./vue-ui-skeleton-j-IOiy5w.cjs"),W=require("./useNestedProp-Cggpoz7e.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],he=["xmlns","viewBox"],me=["id"],pe=["stop-color"],ge=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],ke=["x","y","font-size","fill"],we=["x","y","font-size","fill"],Ce={key:2,class:"vue-data-ui-watermark"},xe=["innerHTML"],$e={__name:"vue-ui-flow",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(X,{expose:R}){const f=X,{vue_ui_flow:Z}=i.useConfig(),$=e.computed(()=>!!f.dataset&&f.dataset.length);e.onMounted(()=>{i.objectIsEmpty(f.dataset)&&i.error({componentName:"VueUiFlow",type:"dataset"})});const B=e.ref(i.createUid()),T=e.ref(null),P=e.ref(0),b=e.ref(!1);function J(o){b.value=o,P.value+=1}const t=e.computed(()=>{const o=W.useNestedProp({userConfig:f.config,defaultConfig:Z});return o.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_flow[o.theme]||f.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}),{isPrinting:F,isImaging:L,generatePdf:z,generateImage:I}=A.usePrinter({elementId:`flow_${B.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),N=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),H=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),k=e.ref({showTable:t.value.table.show}),O=e.computed(()=>t.value.style.chart.links.width),V=e.computed(()=>{const o={};function n(s){o[s]||(o[s]={inflow:0,outflow:0})}f.dataset.forEach(([s,a,c])=>{n(s),n(a),o[s].outflow+=c,o[a].inflow+=c});let l=0;for(const s in o){const a=Math.max(o[s].inflow,o[s].outflow);l=Math.max(l,a)}return l});function K(o){return o/V.value*100+t.value.style.chart.nodes.minHeight}function Q(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*V.value}function ee(o){const n={},l={};function s(r,u){n[r]||(n[r]={height:0,level:null,inflow:0,outflow:0}),n[r].level===null&&(n[r].level=u),l[u]||(l[u]=[]),l[u].includes(r)||l[u].push(r)}o.forEach(([r,u,v],y)=>{const p=n[r]?n[r].level:0,x=p+1;s(r,p),s(u,x),n[r].children||(n[r].children=[]),n[r].children.push({target:u,value:v}),n[r].outflow+=v,n[u].inflow+=v}),Object.keys(n).forEach((r,u)=>{n[r].color=N.value[u]||N.value[u%N.value.length]||i.palette[u]||i.palette[u%d.length]});for(const r in n)n[r].height=K(Math.max(n[r].inflow,n[r].outflow)),n[r].name=r;const a={};for(const r in l){let u=0;l[r].forEach((v,y)=>{const p=n[v].height;a[v]={x:parseInt(r,10)*O.value+t.value.style.chart.padding.left,y:u,absoluteY:u,height:p,i:y,color:n[v].color,value:Q(p)},u+=p+H.value})}const c=[];for(const r in n){let u=a[r].absoluteY;n[r].children&&n[r].children.forEach(({target:v,value:y},p)=>{const x=a[v].y,E=a[r],S=a[v],q=u,G=u+y/n[r].outflow*E.height,U=x,j=x+y/n[v].inflow*S.height,re={id:i.createUid(),source:r,target:v,path:`M ${E.x+g.value} ${q} L ${E.x+g.value} ${G} L ${S.x} ${j} L ${S.x} ${U} Z`,value:y,sourceColor:n[r].color,targetColor:n[v].color};c.push(re),u+=G-q,a[v].y+=j-U})}return{nodeCoordinates:a,links:c}}const h=e.computed(()=>{const o=ee(f.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),te=e.computed(()=>le(h.value.nodes));function le(o){const n={};for(const s in o){const{x:a,height:c}=o[s];n[a]||(n[a]=0),n[a]+=c+H.value}return Math.max(...Object.values(n))}const _=e.computed(()=>{const{top:o,right:n,left:l,bottom:s}=t.value.style.chart.padding,a=f.dataset.length*O.value;return{height:te.value+o+s,width:n+Math.max(...h.value.nodes.map(c=>c.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:s}});function oe(o){const n={},l={},s=new Set;return f.dataset.forEach(([a,c,r])=>{n[a]||(n[a]=[]),l[c]||(l[c]=[]),n[a].push(c),l[c].push(a)}),n[o]&&n[o].forEach(a=>s.add(a)),l[o]&&l[o].forEach(a=>s.add(a)),Array.from(s).concat(o)}const m=e.ref(null),w=e.ref(null);function ne(o){m.value=oe(o.name),w.value=o.name}function ae(){m.value=null,w.value=null}const M=e.computed(()=>h.value.links.map(({source:o,target:n,sourceColor:l,targetColor:s,value:a})=>({source:o,target:n,sourceColor:l,targetColor:s,value:a})));function D(){e.nextTick(()=>{const o=M.value.map((s,a)=>[[s.source],[s.target],[s.value]]),n=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.source],[t.value.table.columnNames.target],[t.value.table.columnNames.value]]].concat(o),l=i.createCsvContent(n);i.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const C=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=M.value.map((a,c)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},i.dataLabel({p:t.value.style.chart.nodes.labels.prefix,v:a.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding})]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],head:o,body:n,config:l}});function se(){return h.value}function Y(){k.value.showTable=!k.value.showTable}return R({getData:se,generateCsv:D,generateImage:I,generatePdf:z,toggleTable:Y}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:T,class:e.normalizeClass(`vue-ui-flow ${b.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`flow_${B.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(ue._sfc_main,{config:{title:{cy:"flow-title",...t.value.style.chart.title},subtitle:{cy:"flow-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value?(e.openBlock(),e.createBlock(A.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(L),uid:B.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:T.value,onToggleFullscreen:J,onGeneratePdf:e.unref(z),onGenerateCsv:D,onGenerateImage:e.unref(I),onToggleTable:Y},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(i.XMLNS),viewBox:`0 0 ${_.value.width} ${_.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,(l,s)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:l.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":l.sourceColor},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,ge)],8,me))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.links,l=>(e.openBlock(),e.createElementBlock("path",{class:"vue-ui-flow-link",d:l.path,fill:`url(#${l.id})`,stroke:t.value.style.chart.links.stroke,"stroke-width":t.value.style.chart.links.strokeWidth,style:e.normalizeStyle(`opacity:${w.value?[l.target,l.source].includes(w.value)?1:.3:t.value.style.chart.links.opacity}`)},null,12,ye))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:l.absoluteY,height:l.height,width:g.value,fill:l.color,stroke:t.value.style.chart.nodes.stroke,"stroke-width":t.value.style.chart.nodes.strokeWidth,onMouseenter:a=>ne(l),onMouseleave:n[0]||(n[0]=a=>ae()),style:e.normalizeStyle(`opacity:${m.value?m.value.includes(l.name)?1:.2:1}`)},null,44,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2-t.value.style.chart.nodes.labels.fontSize/4,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(t.value.style.chart.nodes.labels.abbreviation.use?e.unref(i.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,ke))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.nodes,(l,s)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize,"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(i.adaptColorToBackground)(l.color),"text-anchor":"middle",style:e.normalizeStyle(`pointer-events: none; opacity:${m.value?m.value.includes(l.name)?1:0:1}`)},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(i.dataLabel)({p:t.value.style.chart.nodes.labels.prefix,v:l.value,s:t.value.style.chart.nodes.labels.suffix,r:t.value.style.chart.nodes.labels.rounding}),{datapoint:l,seriesIndex:s})),13,we))),256)),e.renderSlot(o.$slots,"svg",{svg:_.value},void 0,!0)],14,he)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(L)})),void 0,!0)])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(de.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),$.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ie.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>k.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Be=ve._export_sfc($e,[["__scopeId","data-v-2f88276e"]]);exports.default=Be;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { computed as f, onMounted as Te, ref as k, openBlock as r, createElementBlock as v, normalizeClass as ne, normalizeStyle as w, createVNode as se, createCommentVNode as N, createBlock as G, unref as h, createSlots as Pe, withCtx as b, renderSlot as C, normalizeProps as ue, guardReactiveProps as re, createElementVNode as
|
|
2
|
-
import { u as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { u as
|
|
5
|
-
import { D as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { u as ve } from "./useNestedProp-
|
|
9
|
-
import { _ as
|
|
10
|
-
const
|
|
1
|
+
import { computed as f, onMounted as Te, ref as k, openBlock as r, createElementBlock as v, normalizeClass as ne, normalizeStyle as w, createVNode as se, createCommentVNode as N, createBlock as G, unref as h, createSlots as Pe, withCtx as b, renderSlot as C, normalizeProps as ue, guardReactiveProps as re, createElementVNode as O, Fragment as T, renderList as P, toDisplayString as B, createTextVNode as Fe, nextTick as Ie } from "vue";
|
|
2
|
+
import { u as Le, o as He, e as Oe, c as ie, t as Ee, a as Me, p as A, b as Se, f as ce, X as ze, D as de, F as Ye, i as De, q as Ge, r as Be } from "./index-BlXzlBwZ.js";
|
|
3
|
+
import { _ as Ae } from "./Title-eBTH8iGJ.js";
|
|
4
|
+
import { u as Ue, U as Ve } from "./usePrinter-CZ8F5Cth.js";
|
|
5
|
+
import { D as je } from "./DataTable-CsPidn0_.js";
|
|
6
|
+
import Xe from "./vue-ui-accordion-wHRG3nXl.js";
|
|
7
|
+
import We from "./vue-ui-skeleton-CJ2R5R6u.js";
|
|
8
|
+
import { u as ve } from "./useNestedProp-BoNl5H_z.js";
|
|
9
|
+
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
const Re = ["id"], Ze = ["xmlns", "viewBox"], Je = ["id"], Ke = ["stop-color"], Qe = ["stop-color"], et = ["d", "fill", "stroke", "stroke-width"], tt = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], lt = ["x", "y", "font-size", "fill"], ot = ["x", "y", "font-size", "fill"], at = {
|
|
11
11
|
key: 2,
|
|
12
12
|
class: "vue-data-ui-watermark"
|
|
13
|
-
},
|
|
13
|
+
}, nt = ["innerHTML"], st = {
|
|
14
14
|
__name: "vue-ui-flow",
|
|
15
15
|
props: {
|
|
16
16
|
config: {
|
|
@@ -27,9 +27,9 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
setup(fe, { expose: he }) {
|
|
30
|
-
const m = fe, { vue_ui_flow: me } =
|
|
30
|
+
const m = fe, { vue_ui_flow: me } = Le(), E = f(() => !!m.dataset && m.dataset.length);
|
|
31
31
|
Te(() => {
|
|
32
|
-
|
|
32
|
+
He(m.dataset) && Oe({
|
|
33
33
|
componentName: "VueUiFlow",
|
|
34
34
|
type: "dataset"
|
|
35
35
|
});
|
|
@@ -45,27 +45,27 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
45
45
|
});
|
|
46
46
|
return l.theme ? {
|
|
47
47
|
...ve({
|
|
48
|
-
userConfig:
|
|
48
|
+
userConfig: Ee.vue_ui_flow[l.theme] || m.config,
|
|
49
49
|
defaultConfig: l
|
|
50
50
|
}),
|
|
51
51
|
customPalette: Me[l.theme] || A
|
|
52
52
|
} : l;
|
|
53
|
-
}), { isPrinting: j, isImaging: X, generatePdf: W, generateImage: q } =
|
|
53
|
+
}), { isPrinting: j, isImaging: X, generatePdf: W, generateImage: q } = Ue({
|
|
54
54
|
elementId: `flow_${M.value}`,
|
|
55
55
|
fileName: e.value.style.chart.title.text || "vue-ui-flow"
|
|
56
56
|
}), S = f(() => Se(e.value.customPalette)), R = f(() => e.value.style.chart.nodes.gap), x = f(() => e.value.style.chart.nodes.width), F = k({
|
|
57
57
|
showTable: e.value.table.show
|
|
58
58
|
}), Z = f(() => e.value.style.chart.links.width), J = f(() => {
|
|
59
59
|
const l = {};
|
|
60
|
-
function o(
|
|
61
|
-
l[
|
|
60
|
+
function o(n) {
|
|
61
|
+
l[n] || (l[n] = { inflow: 0, outflow: 0 });
|
|
62
62
|
}
|
|
63
|
-
m.dataset.forEach(([
|
|
64
|
-
o(
|
|
63
|
+
m.dataset.forEach(([n, a, i]) => {
|
|
64
|
+
o(n), o(a), l[n].outflow += i, l[a].inflow += i;
|
|
65
65
|
});
|
|
66
66
|
let t = 0;
|
|
67
|
-
for (const
|
|
68
|
-
const a = Math.max(l[
|
|
67
|
+
for (const n in l) {
|
|
68
|
+
const a = Math.max(l[n].inflow, l[n].outflow);
|
|
69
69
|
t = Math.max(t, a);
|
|
70
70
|
}
|
|
71
71
|
return t;
|
|
@@ -79,24 +79,24 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
79
79
|
}
|
|
80
80
|
function ye(l) {
|
|
81
81
|
const o = {}, t = {};
|
|
82
|
-
function s
|
|
83
|
-
o[
|
|
82
|
+
function n(s, u) {
|
|
83
|
+
o[s] || (o[s] = { height: 0, level: null, inflow: 0, outflow: 0 }), o[s].level === null && (o[s].level = u), t[u] || (t[u] = []), t[u].includes(s) || t[u].push(s);
|
|
84
84
|
}
|
|
85
|
-
l.forEach(([
|
|
86
|
-
const y = o[
|
|
87
|
-
s
|
|
88
|
-
}), Object.keys(o).forEach((
|
|
89
|
-
o[
|
|
85
|
+
l.forEach(([s, u, c], $) => {
|
|
86
|
+
const y = o[s] ? o[s].level : 0, H = y + 1;
|
|
87
|
+
n(s, y), n(u, H), o[s].children || (o[s].children = []), o[s].children.push({ target: u, value: c }), o[s].outflow += c, o[u].inflow += c;
|
|
88
|
+
}), Object.keys(o).forEach((s, u) => {
|
|
89
|
+
o[s].color = S.value[u] || S.value[u % S.value.length] || A[u] || A[u % d.length];
|
|
90
90
|
});
|
|
91
|
-
for (const
|
|
92
|
-
o[
|
|
91
|
+
for (const s in o)
|
|
92
|
+
o[s].height = pe(Math.max(o[s].inflow, o[s].outflow)), o[s].name = s;
|
|
93
93
|
const a = {};
|
|
94
|
-
for (const
|
|
94
|
+
for (const s in t) {
|
|
95
95
|
let u = 0;
|
|
96
|
-
t[
|
|
96
|
+
t[s].forEach((c, $) => {
|
|
97
97
|
const y = o[c].height;
|
|
98
98
|
a[c] = {
|
|
99
|
-
x: parseInt(
|
|
99
|
+
x: parseInt(s, 10) * Z.value + e.value.style.chart.padding.left,
|
|
100
100
|
y: u,
|
|
101
101
|
absoluteY: u,
|
|
102
102
|
height: y,
|
|
@@ -107,16 +107,16 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
const i = [];
|
|
110
|
-
for (const
|
|
111
|
-
let u = a[
|
|
112
|
-
o[
|
|
113
|
-
const
|
|
110
|
+
for (const s in o) {
|
|
111
|
+
let u = a[s].absoluteY;
|
|
112
|
+
o[s].children && o[s].children.forEach(({ target: c, value: $ }, y) => {
|
|
113
|
+
const H = a[c].y, Y = a[s], D = a[c], te = u, le = u + $ / o[s].outflow * Y.height, oe = H, ae = H + $ / o[c].inflow * D.height, Ne = {
|
|
114
114
|
id: ie(),
|
|
115
|
-
source:
|
|
115
|
+
source: s,
|
|
116
116
|
target: c,
|
|
117
117
|
path: `M ${Y.x + x.value} ${te} L ${Y.x + x.value} ${le} L ${D.x} ${ae} L ${D.x} ${oe} Z`,
|
|
118
118
|
value: $,
|
|
119
|
-
sourceColor: o[
|
|
119
|
+
sourceColor: o[s].color,
|
|
120
120
|
targetColor: o[c].color
|
|
121
121
|
};
|
|
122
122
|
i.push(Ne), u += le - te, a[c].y += ae - oe;
|
|
@@ -136,29 +136,29 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
136
136
|
}), ke = f(() => we(g.value.nodes));
|
|
137
137
|
function we(l) {
|
|
138
138
|
const o = {};
|
|
139
|
-
for (const
|
|
140
|
-
const { x: a, height: i } = l[
|
|
139
|
+
for (const n in l) {
|
|
140
|
+
const { x: a, height: i } = l[n];
|
|
141
141
|
o[a] || (o[a] = 0), o[a] += i + R.value;
|
|
142
142
|
}
|
|
143
143
|
return Math.max(...Object.values(o));
|
|
144
144
|
}
|
|
145
145
|
const z = f(() => {
|
|
146
|
-
const { top: l, right: o, left: t, bottom:
|
|
146
|
+
const { top: l, right: o, left: t, bottom: n } = e.value.style.chart.padding, a = m.dataset.length * Z.value;
|
|
147
147
|
return {
|
|
148
|
-
height: ke.value + l +
|
|
148
|
+
height: ke.value + l + n,
|
|
149
149
|
width: o + Math.max(...g.value.nodes.map((i) => i.x)) + x.value,
|
|
150
150
|
left: t,
|
|
151
151
|
top: l,
|
|
152
152
|
right: a - o,
|
|
153
153
|
p_top: l,
|
|
154
|
-
p_bottom:
|
|
154
|
+
p_bottom: n
|
|
155
155
|
};
|
|
156
156
|
});
|
|
157
157
|
function Ce(l) {
|
|
158
|
-
const o = {}, t = {},
|
|
159
|
-
return m.dataset.forEach(([a, i,
|
|
158
|
+
const o = {}, t = {}, n = /* @__PURE__ */ new Set();
|
|
159
|
+
return m.dataset.forEach(([a, i, s]) => {
|
|
160
160
|
o[a] || (o[a] = []), t[i] || (t[i] = []), o[a].push(i), t[i].push(a);
|
|
161
|
-
}), o[l] && o[l].forEach((a) =>
|
|
161
|
+
}), o[l] && o[l].forEach((a) => n.add(a)), t[l] && t[l].forEach((a) => n.add(a)), Array.from(n).concat(l);
|
|
162
162
|
}
|
|
163
163
|
const p = k(null), I = k(null);
|
|
164
164
|
function xe(l) {
|
|
@@ -167,19 +167,19 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
167
167
|
function $e() {
|
|
168
168
|
p.value = null, I.value = null;
|
|
169
169
|
}
|
|
170
|
-
const K = f(() => g.value.links.map(({ source: l, target: o, sourceColor: t, targetColor:
|
|
170
|
+
const K = f(() => g.value.links.map(({ source: l, target: o, sourceColor: t, targetColor: n, value: a }) => ({
|
|
171
171
|
source: l,
|
|
172
172
|
target: o,
|
|
173
173
|
sourceColor: t,
|
|
174
|
-
targetColor:
|
|
174
|
+
targetColor: n,
|
|
175
175
|
value: a
|
|
176
176
|
})));
|
|
177
177
|
function Q() {
|
|
178
178
|
Ie(() => {
|
|
179
|
-
const l = K.value.map((
|
|
180
|
-
[
|
|
181
|
-
[
|
|
182
|
-
[
|
|
179
|
+
const l = K.value.map((n, a) => [
|
|
180
|
+
[n.source],
|
|
181
|
+
[n.target],
|
|
182
|
+
[n.value]
|
|
183
183
|
]), o = [
|
|
184
184
|
[e.value.style.chart.title.text],
|
|
185
185
|
[e.value.style.chart.title.subtitle.text],
|
|
@@ -188,14 +188,14 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
188
188
|
[e.value.table.columnNames.target],
|
|
189
189
|
[e.value.table.columnNames.value]
|
|
190
190
|
]
|
|
191
|
-
].concat(l), t =
|
|
192
|
-
|
|
191
|
+
].concat(l), t = Ge(o);
|
|
192
|
+
Be({
|
|
193
193
|
csvContent: t,
|
|
194
194
|
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
195
195
|
});
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const L = f(() => {
|
|
199
199
|
const l = [
|
|
200
200
|
e.value.table.columnNames.source,
|
|
201
201
|
e.value.table.columnNames.target,
|
|
@@ -262,7 +262,7 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
262
262
|
key: 0,
|
|
263
263
|
style: w(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
264
264
|
}, [
|
|
265
|
-
se(
|
|
265
|
+
se(Ae, {
|
|
266
266
|
config: {
|
|
267
267
|
title: {
|
|
268
268
|
cy: "flow-title",
|
|
@@ -275,7 +275,7 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
275
275
|
}
|
|
276
276
|
}, null, 8, ["config"])
|
|
277
277
|
], 4)) : N("", !0),
|
|
278
|
-
e.value.userOptions.show &&
|
|
278
|
+
e.value.userOptions.show && E.value ? (r(), G(Ve, {
|
|
279
279
|
ref: "details",
|
|
280
280
|
key: `user_option_${V.value}`,
|
|
281
281
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -327,8 +327,8 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
327
327
|
} : void 0,
|
|
328
328
|
l.$slots.optionFullscreen ? {
|
|
329
329
|
name: "optionFullscreen",
|
|
330
|
-
fn: b(({ toggleFullscreen: t, isFullscreen:
|
|
331
|
-
C(l.$slots, "optionFullscreen", ue(re({ toggleFullscreen: t, isFullscreen:
|
|
330
|
+
fn: b(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
331
|
+
C(l.$slots, "optionFullscreen", ue(re({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
332
332
|
]),
|
|
333
333
|
key: "4"
|
|
334
334
|
} : void 0
|
|
@@ -339,23 +339,23 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
339
339
|
class: ne({ "vue-data-ui-fullscreen--on": _.value, "vue-data-ui-fulscreen--off": !_.value }),
|
|
340
340
|
style: w(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
341
341
|
}, [
|
|
342
|
-
|
|
343
|
-
(r(!0), v(T, null, P(g.value.links, (t,
|
|
342
|
+
O("defs", null, [
|
|
343
|
+
(r(!0), v(T, null, P(g.value.links, (t, n) => (r(), v("linearGradient", {
|
|
344
344
|
id: t.id,
|
|
345
345
|
x1: "0%",
|
|
346
346
|
y1: "0%",
|
|
347
347
|
x2: "100%",
|
|
348
348
|
y2: "0%"
|
|
349
349
|
}, [
|
|
350
|
-
|
|
350
|
+
O("stop", {
|
|
351
351
|
offset: "0%",
|
|
352
352
|
"stop-color": t.sourceColor
|
|
353
|
-
}, null, 8,
|
|
354
|
-
|
|
353
|
+
}, null, 8, Ke),
|
|
354
|
+
O("stop", {
|
|
355
355
|
offset: "100%",
|
|
356
356
|
"stop-color": t.targetColor
|
|
357
|
-
}, null, 8,
|
|
358
|
-
], 8,
|
|
357
|
+
}, null, 8, Qe)
|
|
358
|
+
], 8, Je))), 256))
|
|
359
359
|
]),
|
|
360
360
|
(r(!0), v(T, null, P(g.value.links, (t) => (r(), v("path", {
|
|
361
361
|
class: "vue-ui-flow-link",
|
|
@@ -364,8 +364,8 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
364
364
|
stroke: e.value.style.chart.links.stroke,
|
|
365
365
|
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
366
366
|
style: w(`opacity:${I.value ? [t.target, t.source].includes(I.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}`)
|
|
367
|
-
}, null, 12,
|
|
368
|
-
(r(!0), v(T, null, P(g.value.nodes, (t,
|
|
367
|
+
}, null, 12, et))), 256)),
|
|
368
|
+
(r(!0), v(T, null, P(g.value.nodes, (t, n) => (r(), v("rect", {
|
|
369
369
|
class: "vue-ui-flow-node",
|
|
370
370
|
x: t.x,
|
|
371
371
|
y: t.absoluteY,
|
|
@@ -377,34 +377,39 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
377
377
|
onMouseenter: (a) => xe(t),
|
|
378
378
|
onMouseleave: o[0] || (o[0] = (a) => $e()),
|
|
379
379
|
style: w(`opacity:${p.value ? p.value.includes(t.name) ? 1 : 0.2 : 1}`)
|
|
380
|
-
}, null, 44,
|
|
381
|
-
(r(!0), v(T, null, P(g.value.nodes, (t,
|
|
380
|
+
}, null, 44, tt))), 256)),
|
|
381
|
+
(r(!0), v(T, null, P(g.value.nodes, (t, n) => (r(), v("text", {
|
|
382
382
|
x: t.x + x.value / 2,
|
|
383
383
|
y: t.absoluteY + t.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4,
|
|
384
384
|
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
385
385
|
fill: h(de)(t.color),
|
|
386
386
|
"text-anchor": "middle",
|
|
387
387
|
style: w(`pointer-events: none; opacity:${p.value ? p.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
388
|
-
}, B(e.value.style.chart.nodes.labels.abbreviation.use ? h(Ye)({ source: t.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : t.name), 13,
|
|
389
|
-
(r(!0), v(T, null, P(g.value.nodes, (t,
|
|
388
|
+
}, B(e.value.style.chart.nodes.labels.abbreviation.use ? h(Ye)({ source: t.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : t.name), 13, lt))), 256)),
|
|
389
|
+
(r(!0), v(T, null, P(g.value.nodes, (t, n) => (r(), v("text", {
|
|
390
390
|
x: t.x + x.value / 2,
|
|
391
391
|
y: t.absoluteY + t.height / 2 + e.value.style.chart.nodes.labels.fontSize,
|
|
392
392
|
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
393
393
|
fill: h(de)(t.color),
|
|
394
394
|
"text-anchor": "middle",
|
|
395
395
|
style: w(`pointer-events: none; opacity:${p.value ? p.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
396
|
-
}, B(h(
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
396
|
+
}, B(h(De)(
|
|
397
|
+
e.value.style.chart.nodes.labels.formatter,
|
|
398
|
+
t.value,
|
|
399
|
+
h(ce)({
|
|
400
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
401
|
+
v: t.value,
|
|
402
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
403
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
404
|
+
}),
|
|
405
|
+
{ datapoint: t, seriesIndex: n }
|
|
406
|
+
)), 13, ot))), 256)),
|
|
402
407
|
C(l.$slots, "svg", { svg: z.value }, void 0, !0)
|
|
403
|
-
], 14,
|
|
404
|
-
l.$slots.watermark ? (r(), v("div",
|
|
408
|
+
], 14, Ze)),
|
|
409
|
+
l.$slots.watermark ? (r(), v("div", at, [
|
|
405
410
|
C(l.$slots, "watermark", ue(re({ isPrinting: h(j) || h(X) })), void 0, !0)
|
|
406
411
|
])) : N("", !0),
|
|
407
|
-
|
|
412
|
+
E.value ? N("", !0) : (r(), G(We, {
|
|
408
413
|
key: 3,
|
|
409
414
|
config: {
|
|
410
415
|
type: "flow",
|
|
@@ -413,7 +418,7 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
413
418
|
}
|
|
414
419
|
}
|
|
415
420
|
}, null, 8, ["config"])),
|
|
416
|
-
|
|
421
|
+
E.value ? (r(), G(Xe, {
|
|
417
422
|
key: 4,
|
|
418
423
|
hideDetails: "",
|
|
419
424
|
config: {
|
|
@@ -430,19 +435,19 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
430
435
|
}
|
|
431
436
|
}, {
|
|
432
437
|
content: b(() => [
|
|
433
|
-
se(
|
|
434
|
-
colNames:
|
|
435
|
-
head:
|
|
436
|
-
body:
|
|
437
|
-
config:
|
|
438
|
+
se(je, {
|
|
439
|
+
colNames: L.value.colNames,
|
|
440
|
+
head: L.value.head,
|
|
441
|
+
body: L.value.body,
|
|
442
|
+
config: L.value.config,
|
|
438
443
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
439
444
|
onClose: o[1] || (o[1] = (t) => F.value.showTable = !1)
|
|
440
445
|
}, {
|
|
441
446
|
th: b(({ th: t }) => [
|
|
442
|
-
|
|
447
|
+
O("div", {
|
|
443
448
|
innerHTML: t,
|
|
444
449
|
style: { display: "flex", "align-items": "center" }
|
|
445
|
-
}, null, 8,
|
|
450
|
+
}, null, 8, nt)
|
|
446
451
|
]),
|
|
447
452
|
td: b(({ td: t }) => [
|
|
448
453
|
Fe(B(t.name || t), 1)
|
|
@@ -452,9 +457,9 @@ const qe = ["id"], Re = ["xmlns", "viewBox"], Ze = ["id"], Je = ["stop-color"],
|
|
|
452
457
|
]),
|
|
453
458
|
_: 1
|
|
454
459
|
}, 8, ["config"])) : N("", !0)
|
|
455
|
-
], 14,
|
|
460
|
+
], 14, Re));
|
|
456
461
|
}
|
|
457
|
-
},
|
|
462
|
+
}, gt = /* @__PURE__ */ qe(st, [["__scopeId", "data-v-2f88276e"]]);
|
|
458
463
|
export {
|
|
459
|
-
|
|
464
|
+
gt as default
|
|
460
465
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-hKWfT7Wa.cjs"),K=require("./Legend-B20rRwGi.cjs"),Q=require("./Title-BU6E8Xld.cjs"),Z=require("./Tooltip-Oicp_EIo.cjs"),ee=require("./DataTable-Doh_4M84.cjs"),D=require("./usePrinter-DoYKBzst.cjs"),te=require("./vue-ui-skeleton-j-IOiy5w.cjs"),le=require("./vue-ui-accordion-CTYvdLLH.cjs"),q=require("./useNestedProp-Cggpoz7e.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["id"],ue=["stdDeviation"],ne=["d","stroke","stroke-width"],ie=["d","stroke","stroke-width"],ce=["filter"],de=["d","stroke","stroke-width"],ve=["d","stroke-width","onMouseenter","onClick"],he={key:3,class:"vue-data-ui-watermark"},pe=["onClick"],ye={key:0},fe={key:1},ge=["innerHTML"],me={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(G,{expose:M,emit:B}){const d=G,{vue_ui_galaxy:W}=r.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length);e.onMounted(()=>{r.objectIsEmpty(d.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):d.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})});const f=e.ref(r.createUid()),C=e.ref(null),U=e.ref(null),w=e.ref(!1),x=e.ref(""),i=e.ref(null),S=e.ref(0),t=e.computed(()=>{const l=q.useNestedProp({userConfig:d.config,defaultConfig:W});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||d.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:_,isImaging:P,generatePdf:L,generateImage:E}=D.usePrinter({elementId:`galaxy_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),A=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),$=e.ref({height:180,width:250}),n=e.ref([]);function N(l){n.value.includes(l.id)?n.value=n.value.filter(a=>a!==l.id):n.value.push(l.id),B("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const p=e.computed(()=>d.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||A.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?l.values.reduce((o,s)=>o+s,0):0,absoluteValues:l.values||[0],id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function H(){return p.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const c=e.computed(()=>p.value.filter(l=>!n.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),R=e.ref(190),V=e.computed(()=>p.value.filter(l=>!n.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<V.value.length;a+=1){const o=V.value[a];let s=o.value/c.value*R.value;a>0&&l.length&&(s+=l[a-1].points),l.push({points:s,...o,seriesIndex:a,proportion:o.value/c.value,path:r.createSpiralPath({points:s,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!n.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function X(l){m.value=l,S.value+=1}const T=e.ref(null);function j({datapoint:l,_relativeIndex:a,seriesIndex:o,show:s=!1}){T.value={datapoint:l,seriesIndex:o,series:p.value,config:t.value},w.value=s,i.value=l.id;let u="";const y=t.value.style.chart.tooltip.customFormat;r.isFunction(y)&&r.functionReturnsString(()=>y({seriesIndex:o,datapoint:l,series:p.value,config:t.value}))?x.value=y({seriesIndex:o,datapoint:l,series:p.value,config:t.value}):(u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${u}</div>`)}const F=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((s,u)=>s+u,0)).reduce((o,s)=>o+s,0),opacity:n.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:n.value.includes(l.id)}))),Y=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),h=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=h.value.head.map((s,u)=>[[s.name],[h.value.body[u]],[isNaN(h.value.body[u]/c.value)?"-":h.value.body[u]/c.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const k=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:c.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=h.value.head.map((u,y)=>{const J=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:h.value.body[y],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},J,isNaN(h.value.body[y]/c.value)?"-":r.dataLabel({v:h.value.body[y]/c.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:a,config:o}});function O(){v.value.showTable=!v.value.showTable}function z(){v.value.showTooltip=!v.value.showTooltip}return M({getData:H,generatePdf:L,generateCsv:I,generateImage:E,toggleTable:O,toggleTooltip:z}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:C,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Q._sfc_main,{config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref_key:"details",ref:U,key:`user_option_${S.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(_),isImaging:e.unref(P),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:X,onGeneratePdf:e.unref(L),onGenerateCsv:I,onGenerateImage:e.unref(E),onToggleTable:O,onToggleTooltip:z},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:s})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${$.value.width} ${$.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,ue)],8,se)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ne)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,ie)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${f.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(i.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${i.value&&i.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,de)],8,ce)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,s)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:u=>j({datapoint:o,relativeIndex:s,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=u=>{w.value=!1,i.value=null}),onClick:u=>B("selectDatapoint",o)},null,40,ve)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:$.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(_)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(te.default,{key:4,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(K.Legend,{key:5,legendSet:F.value,config:Y.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:u=>N(o),style:e.normalizeStyle(`opacity:${n.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:s}))+" ",1),n.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",fe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ye," ("+e.toDisplayString(isNaN(o.value/c.value)?"-":e.unref(r.dataLabel)({v:o.value/c.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,pe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:F.value},void 0,!0),e.createVNode(Z._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:x.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(le.default,{key:6,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ee.DataTable,{colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ge)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ae))}},be=oe._export_sfc(me,[["__scopeId","data-v-6f44b172"]]);exports.default=be;
|