vue-data-ui 2.3.61 → 2.3.63
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/dist/{Arrow-B5nYwPUt.js → Arrow-CBx1Hj4I.js} +1 -1
- package/dist/{Arrow-Dv_tprAO.cjs → Arrow-fP0md3L3.cjs} +1 -1
- package/dist/{BaseIcon-DUPLRuLO.js → BaseIcon-CS18qRiy.js} +1 -1
- package/dist/{BaseIcon-aPcCSO_Z.cjs → BaseIcon-O8jJvy48.cjs} +1 -1
- package/dist/{DataTable-NUzEZXWt.js → DataTable-BGJ2mVxG.js} +2 -2
- package/dist/{DataTable-B6xCb-DR.cjs → DataTable-CSEiZDAb.cjs} +1 -1
- package/dist/{Legend-ePmJ_YIA.cjs → Legend-DuuSl2rJ.cjs} +1 -1
- package/dist/{Legend-C3tseguI.js → Legend-UWyvC57K.js} +1 -1
- package/dist/{Shape-DAe5uqIA.cjs → Shape-Dsx4SQVn.cjs} +1 -1
- package/dist/{Shape-BPcWPP9D.js → Shape-HfEpP-Tk.js} +1 -1
- package/dist/{Slicer-CmHwU6if.js → Slicer-Bk3Rt85L.js} +9 -9
- package/dist/{Slicer-BJs52Jle.cjs → Slicer-Cf74aFVz.cjs} +1 -1
- package/dist/{Title-BAQrVaNA.js → Title-CPZstF2C.js} +1 -1
- package/dist/{Title-B_p983os.cjs → Title-PZ6S96pU.cjs} +1 -1
- package/dist/{Tooltip-C2dhDgoh.cjs → Tooltip-BoIYPSX3.cjs} +1 -1
- package/dist/{Tooltip-B73tTE2v.js → Tooltip-CBmmiqKr.js} +5 -5
- package/dist/{index-CwG--L4Z.js → index-C_05i_JG.js} +578 -526
- package/dist/{index-nPEJmXmf.cjs → index-NNZeHOBS.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-TbnnNrH2.cjs → useNestedProp-CPsbJAGj.cjs} +1 -1
- package/dist/{useNestedProp-BqwYEJGM.js → useNestedProp-DLnT0Wtg.js} +1 -1
- package/dist/{usePrinter-D012Olnq.cjs → usePrinter-BLbY8qGZ.cjs} +1 -1
- package/dist/{usePrinter-Do9tGYem.js → usePrinter-DOhlzlnx.js} +1 -1
- package/dist/{vue-data-ui-DQAJDvpX.cjs → vue-data-ui-D5aG0WkE.cjs} +1 -1
- package/dist/{vue-data-ui-ORLyt-v3.js → vue-data-ui-vqnxkVKv.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BRbooRg3.cjs → vue-ui-3d-bar-Cez69HMH.cjs} +1 -1
- package/dist/{vue-ui-3d-bar--ztApFzW.js → vue-ui-3d-bar-b7Pu7sfL.js} +7 -7
- package/dist/{vue-ui-accordion-CHL4xuW4.cjs → vue-ui-accordion-CcdyvXrp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Be_wWB1T.js → vue-ui-accordion-rGJVvi_V.js} +3 -3
- package/dist/vue-ui-age-pyramid-B6LKyKjc.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-DLIladXC.js → vue-ui-age-pyramid-CH1Vj2R6.js} +226 -226
- package/dist/{vue-ui-annotator-CS2d8F8x.cjs → vue-ui-annotator-BfmMNM_X.cjs} +1 -1
- package/dist/{vue-ui-annotator-Bxrjl1nz.js → vue-ui-annotator-CTio5IiK.js} +1 -1
- package/dist/{vue-ui-candlestick-BppLVU6c.js → vue-ui-candlestick-C4kT9W0j.js} +158 -158
- package/dist/{vue-ui-candlestick-tumv-lhv.cjs → vue-ui-candlestick-DvX9Jxoi.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-BsFNypM6.cjs → vue-ui-carousel-table-CMs7scX3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnOsmGVc.js → vue-ui-carousel-table-Df2HHk0v.js} +4 -4
- package/dist/{vue-ui-chestnut-DFb7M_SC.js → vue-ui-chestnut-BKTnDElg.js} +65 -64
- package/dist/{vue-ui-chestnut-tK8ebPQM.cjs → vue-ui-chestnut-CCw8h0_m.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-eRMlWI.cjs → vue-ui-cursor-C-8bpiuy.cjs} +1 -1
- package/dist/{vue-ui-cursor-CYk61ZVK.js → vue-ui-cursor-DOOlFN5D.js} +2 -2
- package/dist/{vue-ui-dashboard-Cbk74q7K.cjs → vue-ui-dashboard-B_h8KxOx.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BomFWtsP.js → vue-ui-dashboard-D7U1UkAh.js} +2 -2
- package/dist/{vue-ui-digits-Ch9quA4D.js → vue-ui-digits-DmxQgABv.js} +2 -2
- package/dist/{vue-ui-digits-DWJOvgi2.cjs → vue-ui-digits-DoQoNGGx.cjs} +1 -1
- package/dist/{vue-ui-donut-BIMgi_Qw.cjs → vue-ui-donut-DdnwGXq6.cjs} +1 -1
- package/dist/vue-ui-donut-evolution-DsRAZLMN.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-ClNciLi2.js → vue-ui-donut-evolution-uPCTV6E6.js} +95 -95
- package/dist/{vue-ui-donut-Ctzc7e6_.js → vue-ui-donut-t5zf9Lm5.js} +42 -42
- package/dist/{vue-ui-dumbbell-IBrAHdlc.js → vue-ui-dumbbell-BCdxqHVR.js} +109 -107
- package/dist/vue-ui-dumbbell-D1Ak2pEE.cjs +9 -0
- package/dist/vue-ui-flow-CLqm5nkx.cjs +1 -0
- package/dist/vue-ui-flow-J1SmdKkh.js +469 -0
- package/dist/vue-ui-galaxy-CSXbhXBe.cjs +1 -0
- package/dist/{vue-ui-galaxy-BBKU6WqV.js → vue-ui-galaxy-DNMbyKNg.js} +91 -91
- package/dist/{vue-ui-gauge-CDpN6D_X.js → vue-ui-gauge-CC_9cSwj.js} +84 -84
- package/dist/vue-ui-gauge-O3ntKI31.cjs +1 -0
- package/dist/{vue-ui-gizmo-BS-olrbu.js → vue-ui-gizmo-C5vGMHUU.js} +2 -2
- package/dist/{vue-ui-gizmo-Dyi4DWSA.cjs → vue-ui-gizmo-qrJt0nH6.cjs} +1 -1
- package/dist/vue-ui-heatmap-BjimHnMb.cjs +1 -0
- package/dist/{vue-ui-heatmap-Bonl3GBj.js → vue-ui-heatmap-ByxLZuR5.js} +257 -239
- package/dist/{vue-ui-kpi-MeC195T8.js → vue-ui-kpi-DdNQlVCe.js} +3 -3
- package/dist/{vue-ui-kpi-ChD3Gh4P.cjs → vue-ui-kpi-eyxMedig.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-NiTij5XQ.cjs → vue-ui-mini-loader-B5ykH9BF.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-l2G4D7lJ.js → vue-ui-mini-loader-C05VGcNr.js} +2 -2
- package/dist/{vue-ui-molecule-C1dO-Ony.js → vue-ui-molecule-DI0oHPT5.js} +20 -20
- package/dist/{vue-ui-molecule-pXZ3aWlr.cjs → vue-ui-molecule-LZ1SRkgK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Gv4iYr.cjs → vue-ui-mood-radar-BJqk2oK_.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BVpJ3O4m.js → vue-ui-mood-radar-DIDqiVMf.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Dmeqsml8.js → vue-ui-nested-donuts-BkSiryoB.js} +120 -120
- package/dist/{vue-ui-nested-donuts-Cwk0M7SE.cjs → vue-ui-nested-donuts-Nggnu_iK.cjs} +2 -2
- package/dist/{vue-ui-onion-BmJO696O.cjs → vue-ui-onion-B29Cxru2.cjs} +1 -1
- package/dist/{vue-ui-onion-Ogj_rMlX.js → vue-ui-onion-xiubSG3j.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-BBBuJdGN.js → vue-ui-parallel-coordinate-plot-DjmOGHVx.js} +69 -69
- package/dist/{vue-ui-parallel-coordinate-plot-Cqm7uMBs.cjs → vue-ui-parallel-coordinate-plot-DqrkSOo6.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BJtgJ_lu.js → vue-ui-quadrant-Cc79ggIy.js} +36 -36
- package/dist/{vue-ui-quadrant-DcqQwIsD.cjs → vue-ui-quadrant-Df_2X-ca.cjs} +1 -1
- package/dist/vue-ui-quick-chart-BnBGXd4d.cjs +15 -0
- package/dist/{vue-ui-quick-chart-D7dCfDSL.js → vue-ui-quick-chart-t_cPx4OT.js} +549 -515
- package/dist/{vue-ui-radar-BMxzhMFJ.js → vue-ui-radar-C3qEonKT.js} +59 -59
- package/dist/vue-ui-radar-D3W9B9JE.cjs +1 -0
- package/dist/{vue-ui-rating-DSgHml7s.js → vue-ui-rating-DffL7w-I.js} +9 -9
- package/dist/{vue-ui-rating-buop0ul0.cjs → vue-ui-rating-aOa6zIr5.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BACMnvv8.cjs → vue-ui-relation-circle-BZ7r7Unx.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CdHbZK0u.js → vue-ui-relation-circle-D0zUfd3f.js} +5 -5
- package/dist/vue-ui-rings-BjWAtE4x.cjs +2 -0
- package/dist/{vue-ui-rings-BBnzxfo2.js → vue-ui-rings-PHbuqfoT.js} +188 -185
- package/dist/{vue-ui-scatter-sF3c5eqM.cjs → vue-ui-scatter-DMJ77QYr.cjs} +1 -1
- package/dist/{vue-ui-scatter-DYXhTzch.js → vue-ui-scatter-DuCnr2yB.js} +378 -375
- package/dist/{vue-ui-screenshot-D-6YvKkW.cjs → vue-ui-screenshot-DBuA631a.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B4WOalT6.js → vue-ui-screenshot-DbwRrmHv.js} +6 -6
- package/dist/{vue-ui-skeleton-D6wHGzmu.cjs → vue-ui-skeleton-CI4t8LHn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-ClzVF3vm.js → vue-ui-skeleton-CcJR2m18.js} +23 -23
- package/dist/{vue-ui-smiley-B1cqwAN5.js → vue-ui-smiley-2rJFSSZS.js} +2 -2
- package/dist/{vue-ui-smiley-CoVnFdkD.cjs → vue-ui-smiley-C7KBm0fz.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DY_sfo6o.js +251 -0
- package/dist/vue-ui-spark-trend-VH2nwGJf.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BOzSGZak.js → vue-ui-sparkbar-B0O77PcV.js} +3 -3
- package/dist/{vue-ui-sparkbar-CpIfPtyd.cjs → vue-ui-sparkbar-Bs8ZQem1.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-4hk6ZJwJ.js → vue-ui-sparkgauge-B5KqrHQZ.js} +64 -64
- package/dist/vue-ui-sparkgauge-Cd7b4u0z.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-VCAQZfgG.cjs → vue-ui-sparkhistogram-CEWCLohQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-8degKlMU.js → vue-ui-sparkhistogram-DwRPeG7H.js} +4 -4
- package/dist/{vue-ui-sparkline-DsUwWV4z.cjs → vue-ui-sparkline-CuFtIMpq.cjs} +1 -1
- package/dist/{vue-ui-sparkline-uBkd9kR2.js → vue-ui-sparkline-W5bZnpQo.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cpq2lHcl.js → vue-ui-sparkstackbar-9hBQZ0lZ.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DyNfMGkM.cjs → vue-ui-sparkstackbar-TyVFUMtT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-lr_qudpY.js → vue-ui-stackbar-BlkgM0nD.js} +35 -35
- package/dist/{vue-ui-stackbar-jQe7BneA.cjs → vue-ui-stackbar-CwVcupxt.cjs} +1 -1
- package/dist/vue-ui-strip-plot-C1GfRjXJ.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DwvlcnHB.js → vue-ui-strip-plot-CBfqkkY6.js} +76 -75
- package/dist/{vue-ui-table-Dhj4_z9d.js → vue-ui-table-B8cvvLk8.js} +1 -1
- package/dist/{vue-ui-table-D5ybohqp.cjs → vue-ui-table-CmguTt4I.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CChLZdxj.cjs → vue-ui-table-heatmap-DMnh8-b1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BY65DeiH.js → vue-ui-table-heatmap-wVWltZ2x.js} +26 -26
- package/dist/{vue-ui-table-sparkline-CvMETVJ1.js → vue-ui-table-sparkline-_POawNEL.js} +13 -13
- package/dist/{vue-ui-table-sparkline-Cmy6PcPI.cjs → vue-ui-table-sparkline-wtIFAc20.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BIN2ofrh.js → vue-ui-thermometer-CFJqd-VY.js} +116 -116
- package/dist/vue-ui-thermometer-D6SnFJb1.cjs +1 -0
- package/dist/{vue-ui-timer-DBcOT10h.cjs → vue-ui-timer-194y0LUC.cjs} +1 -1
- package/dist/{vue-ui-timer-DoSqphvk.js → vue-ui-timer-D8dgDAfe.js} +4 -4
- package/dist/vue-ui-tiremarks-BM28JsxE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-DRTLsMWt.js → vue-ui-tiremarks-CH1BFqbO.js} +71 -71
- package/dist/vue-ui-treemap-BIpIg3Qa.cjs +1 -0
- package/dist/{vue-ui-treemap-D8-D_wfq.js → vue-ui-treemap-DHsoVY5n.js} +89 -82
- package/dist/{vue-ui-vertical-bar-zUaXmUpB.js → vue-ui-vertical-bar-DNODBoSo.js} +246 -242
- package/dist/vue-ui-vertical-bar-Du8ikoWM.cjs +4 -0
- package/dist/{vue-ui-waffle-CztGir7e.js → vue-ui-waffle-C8hMAeMl.js} +44 -44
- package/dist/{vue-ui-waffle-RCqpPcSF.cjs → vue-ui-waffle-_Bi9MRx8.cjs} +1 -1
- package/dist/{vue-ui-wheel-CBqL8FKG.cjs → vue-ui-wheel-BZxcRGJX.cjs} +1 -1
- package/dist/{vue-ui-wheel-BQ2a-ZyV.js → vue-ui-wheel-CmZKsfKj.js} +5 -5
- package/dist/{vue-ui-word-cloud-CKUGIGnW.js → vue-ui-word-cloud-fLf-x06l.js} +68 -65
- package/dist/vue-ui-word-cloud-nHVG2yid.cjs +1 -0
- package/dist/{vue-ui-xy-Dsa2tfKS.js → vue-ui-xy-CPln5bGQ.js} +82 -82
- package/dist/vue-ui-xy-canvas-Z1tJJV5-.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-JeNqaB_p.js → vue-ui-xy-canvas-k30CEsKi.js} +122 -121
- package/dist/vue-ui-xy-qxQy2sOl.cjs +3 -0
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-BILMRRi1.cjs +0 -1
- package/dist/vue-ui-donut-evolution-K7LUkN6q.cjs +0 -1
- package/dist/vue-ui-dumbbell-HVpK20XO.cjs +0 -9
- package/dist/vue-ui-flow-CiXnGdNb.js +0 -465
- package/dist/vue-ui-flow-ClV2yd8Y.cjs +0 -1
- package/dist/vue-ui-galaxy-CMCXCWDA.cjs +0 -1
- package/dist/vue-ui-gauge-DwCGaX1h.cjs +0 -1
- package/dist/vue-ui-heatmap-WFNo-GFX.cjs +0 -1
- package/dist/vue-ui-quick-chart-D9zFHA0L.cjs +0 -15
- package/dist/vue-ui-radar-D8ik0Fqr.cjs +0 -1
- package/dist/vue-ui-rings-Dn5opKNy.cjs +0 -2
- package/dist/vue-ui-spark-trend-DnO4DW0n.cjs +0 -1
- package/dist/vue-ui-spark-trend-HioE2zeC.js +0 -251
- package/dist/vue-ui-sparkgauge-C2_I0tyO.cjs +0 -1
- package/dist/vue-ui-strip-plot-BMKaWqD4.cjs +0 -1
- package/dist/vue-ui-thermometer-Bfp-FwRE.cjs +0 -1
- package/dist/vue-ui-tiremarks-BeBJHz2R.cjs +0 -1
- package/dist/vue-ui-treemap-DqBukSj6.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BM3aaSuB.cjs +0 -4
- package/dist/vue-ui-word-cloud-BbnU0d3E.cjs +0 -1
- package/dist/vue-ui-xy-BU0fCkSk.cjs +0 -3
- package/dist/vue-ui-xy-canvas-IaIARWWS.cjs +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-NNZeHOBS.cjs"),ce=require("./Title-PZ6S96pU.cjs"),W=require("./usePrinter-BLbY8qGZ.cjs"),ie=require("./DataTable-CSEiZDAb.cjs"),de=require("./vue-ui-accordion-CcdyvXrp.cjs"),he=require("./vue-ui-skeleton-CI4t8LHn.cjs"),X=require("./useNestedProp-CPsbJAGj.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],me=["xmlns","viewBox"],pe=["id"],ge=["stop-color"],ke=["stop-color"],ye=["d","fill","stroke","stroke-width"],be=["x","y","height","width","fill","stroke","stroke-width","onMouseenter"],we=["x","y","font-size","fill"],Ne=["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(R,{expose:Z}){const v=R,{vue_ui_flow:J}=s.useConfig(),x=e.computed(()=>!!v.dataset&&v.dataset.length);e.onMounted(()=>{s.objectIsEmpty(v.dataset)&&s.error({componentName:"VueUiFlow",type:"dataset"})});const $=e.ref(s.createUid()),P=e.ref(null),F=e.ref(0),y=e.ref(!1);function K(o){y.value=o,F.value+=1}const t=e.computed(()=>{const o=X.useNestedProp({userConfig:v.config,defaultConfig:J});return o.theme?{...X.useNestedProp({userConfig:s.themes.vue_ui_flow[o.theme]||v.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}),{isPrinting:L,isImaging:z,generatePdf:I,generateImage:H}=W.usePrinter({elementId:`flow_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-flow"}),B=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),O=e.computed(()=>t.value.style.chart.nodes.gap),g=e.computed(()=>t.value.style.chart.nodes.width),b=e.ref({showTable:t.value.table.show}),V=e.computed(()=>t.value.style.chart.links.width),_=e.computed(()=>!v.dataset||!v.dataset.length?[]:v.dataset.map(o=>[o[0],o[1],s.checkNaN(o[2])])),M=e.computed(()=>{const o={};function n(r){o[r]||(o[r]={inflow:0,outflow:0})}_.value.forEach(([r,a,i])=>{n(r),n(a),o[r].outflow+=i,o[a].inflow+=i});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 Q(o){return o/M.value*100+t.value.style.chart.nodes.minHeight}function ee(o){const n=t.value.style.chart.nodes.minHeight;return(o-n)/100*M.value}function te(o){const n={},l={};function r(u,c){n[u]||(n[u]={height:0,level:null,inflow:0,outflow:0}),n[u].level===null&&(n[u].level=c),l[c]||(l[c]=[]),l[c].includes(u)||l[c].push(u)}o.forEach(([u,c,h],k)=>{const p=n[u]?n[u].level:0,C=p+1;r(u,p),r(c,C),n[u].children||(n[u].children=[]),n[u].children.push({target:c,value:h}),n[u].outflow+=h,n[c].inflow+=h}),Object.keys(n).forEach((u,c)=>{n[u].color=B.value[c]||B.value[c%B.value.length]||s.palette[c]||s.palette[c%d.length]});for(const u in n)n[u].height=Q(Math.max(n[u].inflow,n[u].outflow)),n[u].name=u;const a={};for(const u in l){let c=0;l[u].forEach((h,k)=>{const p=n[h].height;a[h]={x:parseInt(u,10)*V.value+t.value.style.chart.padding.left,y:c,absoluteY:c,height:p,i:k,color:n[h].color,value:ee(p)},c+=p+O.value})}const i=[];for(const u in n){let c=a[u].absoluteY;n[u].children&&n[u].children.forEach(({target:h,value:k},p)=>{const C=a[h].y,S=a[u],T=a[h],G=s.checkNaN(c),U=s.checkNaN(c+k/n[u].outflow*S.height),j=s.checkNaN(C),A=s.checkNaN(C+k/n[h].inflow*T.height),ue={id:s.createUid(),source:u,target:h,path:`M ${s.checkNaN(S.x)+s.checkNaN(g.value)} ${G} L ${s.checkNaN(S.x)+s.checkNaN(g.value)} ${U} L ${s.checkNaN(T.x)} ${A} L ${s.checkNaN(T.x)} ${j} Z`,value:k,sourceColor:n[u].color,targetColor:n[h].color};i.push(ue),c+=U-G,a[h].y+=A-j})}return{nodeCoordinates:a,links:i}}const f=e.computed(()=>{const o=te(v.dataset);return{nodes:Object.keys(o.nodeCoordinates).map((n,l)=>({...o.nodeCoordinates[n],name:n})),links:o.links}}),le=e.computed(()=>oe(f.value.nodes));function oe(o){const n={};for(const r in o){const{x:a,height:i}=o[r];n[a]||(n[a]=0),n[a]+=i+O.value}return Math.max(...Object.values(n))}const E=e.computed(()=>{const{top:o,right:n,left:l,bottom:r}=t.value.style.chart.padding,a=_.value.length*V.value;return{height:le.value+o+r,width:n+Math.max(...f.value.nodes.map(i=>i.x))+g.value,left:l,top:o,right:a-n,p_top:o,p_bottom:r}});function ne(o){const n={},l={},r=new Set;return _.value.forEach(([a,i,u])=>{n[a]||(n[a]=[]),l[i]||(l[i]=[]),n[a].push(i),l[i].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 ae(o){m.value=ne(o.name),w.value=o.name}function se(){m.value=null,w.value=null}const D=e.computed(()=>f.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=D.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=s.createCsvContent(n);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-flow"})})}const N=e.computed(()=>{const o=[t.value.table.columnNames.source,t.value.table.columnNames.target,t.value.table.columnNames.value],n=D.value.map((a,i)=>[{color:a.sourceColor,name:a.source},{color:a.targetColor,name:a.target},s.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 re(){return f.value}function q(){b.value.showTable=!b.value.showTable}return Z({getData:re,generateCsv:Y,generateImage:H,generatePdf:I,toggleTable:q}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"flowChart",ref:P,class:e.normalizeClass(`vue-ui-flow ${y.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_${$.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(ce._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&&x.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref:"details",key:`user_option_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(L),isImaging:e.unref(z),uid:$.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:y.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,onToggleFullscreen:K,onGeneratePdf:e.unref(I),onGenerateCsv:Y,onGenerateImage:e.unref(H),onToggleTable:q},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(s.XMLNS),viewBox:`0 0 ${E.value.width} ${E.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.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(f.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,ge),e.createElementVNode("stop",{offset:"100%","stop-color":l.targetColor},null,8,ke)],8,pe))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.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(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{class:"vue-ui-flow-node",x:l.x,y:e.unref(s.checkNaN)(l.absoluteY),height:e.unref(s.checkNaN)(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=>ae(l),onMouseleave:n[0]||(n[0]=a=>se()),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(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(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(s.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(s.abbreviate)({source:l.name,length:t.value.style.chart.nodes.labels.abbreviation.length}):l.name),13,we))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value.nodes,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:l.x+g.value/2,y:e.unref(s.checkNaN)(l.absoluteY+l.height/2+t.value.style.chart.nodes.labels.fontSize),"font-size":t.value.style.chart.nodes.labels.fontSize,fill:e.unref(s.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(s.applyDataLabel)(t.value.style.chart.nodes.labels.formatter,l.value,e.unref(s.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:r})),13,Ne))),256)),e.renderSlot(o.$slots,"svg",{svg:E.value},void 0,!0)],14,me)),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ce,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(L)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:3,config:{type:"flow",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),x.value?(e.openBlock(),e.createBlock(de.default,{key:4,hideDetails:"",config:{open:b.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:N.value.colNames,head:N.value.head,body:N.value.body,config:N.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=>b.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-c5ae33a6"]]);exports.default=Be;
|
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import { computed as m, onMounted as Fe, ref as w, openBlock as r, createElementBlock as h, normalizeClass as ue, normalizeStyle as C, createVNode as re, createCommentVNode as T, createBlock as A, unref as i, createSlots as Ie, withCtx as y, renderSlot as x, normalizeProps as ie, guardReactiveProps as ce, createElementVNode as O, Fragment as P, renderList as F, toDisplayString as U, createTextVNode as He, nextTick as Le } from "vue";
|
|
2
|
+
import { u as Ee, o as Oe, e as Me, c as de, t as Se, a as ze, p as V, b as Ye, s as v, f as ve, X as De, E as fe, H as Ge, i as Be, q as Ae, r as Ue } from "./index-C_05i_JG.js";
|
|
3
|
+
import { _ as Ve } from "./Title-CPZstF2C.js";
|
|
4
|
+
import { u as je, U as Xe } from "./usePrinter-DOhlzlnx.js";
|
|
5
|
+
import { D as We } from "./DataTable-BGJ2mVxG.js";
|
|
6
|
+
import qe from "./vue-ui-accordion-rGJVvi_V.js";
|
|
7
|
+
import Re from "./vue-ui-skeleton-CcJR2m18.js";
|
|
8
|
+
import { u as he } from "./useNestedProp-DLnT0Wtg.js";
|
|
9
|
+
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
const Je = ["id"], Ke = ["xmlns", "viewBox"], Qe = ["id"], et = ["stop-color"], tt = ["stop-color"], lt = ["d", "fill", "stroke", "stroke-width"], ot = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter"], at = ["x", "y", "font-size", "fill"], nt = ["x", "y", "font-size", "fill"], st = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "vue-data-ui-watermark"
|
|
13
|
+
}, ut = ["innerHTML"], rt = {
|
|
14
|
+
__name: "vue-ui-flow",
|
|
15
|
+
props: {
|
|
16
|
+
config: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default() {
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dataset: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default() {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
setup(me, { expose: ge }) {
|
|
30
|
+
const g = me, { vue_ui_flow: pe } = Ee(), M = m(() => !!g.dataset && g.dataset.length);
|
|
31
|
+
Fe(() => {
|
|
32
|
+
Oe(g.dataset) && Me({
|
|
33
|
+
componentName: "VueUiFlow",
|
|
34
|
+
type: "dataset"
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
const S = w(de()), j = w(null), X = w(0), N = w(!1);
|
|
38
|
+
function be(l) {
|
|
39
|
+
N.value = l, X.value += 1;
|
|
40
|
+
}
|
|
41
|
+
const e = m(() => {
|
|
42
|
+
const l = he({
|
|
43
|
+
userConfig: g.config,
|
|
44
|
+
defaultConfig: pe
|
|
45
|
+
});
|
|
46
|
+
return l.theme ? {
|
|
47
|
+
...he({
|
|
48
|
+
userConfig: Se.vue_ui_flow[l.theme] || g.config,
|
|
49
|
+
defaultConfig: l
|
|
50
|
+
}),
|
|
51
|
+
customPalette: ze[l.theme] || V
|
|
52
|
+
} : l;
|
|
53
|
+
}), { isPrinting: W, isImaging: q, generatePdf: R, generateImage: Z } = je({
|
|
54
|
+
elementId: `flow_${S.value}`,
|
|
55
|
+
fileName: e.value.style.chart.title.text || "vue-ui-flow"
|
|
56
|
+
}), z = m(() => Ye(e.value.customPalette)), J = m(() => e.value.style.chart.nodes.gap), $ = m(() => e.value.style.chart.nodes.width), I = w({
|
|
57
|
+
showTable: e.value.table.show
|
|
58
|
+
}), K = m(() => e.value.style.chart.links.width), Y = m(() => !g.dataset || !g.dataset.length ? [] : g.dataset.map((l) => [
|
|
59
|
+
l[0],
|
|
60
|
+
l[1],
|
|
61
|
+
v(l[2])
|
|
62
|
+
])), Q = m(() => {
|
|
63
|
+
const l = {};
|
|
64
|
+
function o(n) {
|
|
65
|
+
l[n] || (l[n] = { inflow: 0, outflow: 0 });
|
|
66
|
+
}
|
|
67
|
+
Y.value.forEach(([n, a, c]) => {
|
|
68
|
+
o(n), o(a), l[n].outflow += c, l[a].inflow += c;
|
|
69
|
+
});
|
|
70
|
+
let t = 0;
|
|
71
|
+
for (const n in l) {
|
|
72
|
+
const a = Math.max(l[n].inflow, l[n].outflow);
|
|
73
|
+
t = Math.max(t, a);
|
|
74
|
+
}
|
|
75
|
+
return t;
|
|
76
|
+
});
|
|
77
|
+
function ye(l) {
|
|
78
|
+
return l / Q.value * 100 + e.value.style.chart.nodes.minHeight;
|
|
79
|
+
}
|
|
80
|
+
function ke(l) {
|
|
81
|
+
const o = e.value.style.chart.nodes.minHeight;
|
|
82
|
+
return (l - o) / 100 * Q.value;
|
|
83
|
+
}
|
|
84
|
+
function we(l) {
|
|
85
|
+
const o = {}, t = {};
|
|
86
|
+
function n(s, u) {
|
|
87
|
+
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);
|
|
88
|
+
}
|
|
89
|
+
l.forEach(([s, u, f], _) => {
|
|
90
|
+
const k = o[s] ? o[s].level : 0, E = k + 1;
|
|
91
|
+
n(s, k), n(u, E), o[s].children || (o[s].children = []), o[s].children.push({ target: u, value: f }), o[s].outflow += f, o[u].inflow += f;
|
|
92
|
+
}), Object.keys(o).forEach((s, u) => {
|
|
93
|
+
o[s].color = z.value[u] || z.value[u % z.value.length] || V[u] || V[u % d.length];
|
|
94
|
+
});
|
|
95
|
+
for (const s in o)
|
|
96
|
+
o[s].height = ye(Math.max(o[s].inflow, o[s].outflow)), o[s].name = s;
|
|
97
|
+
const a = {};
|
|
98
|
+
for (const s in t) {
|
|
99
|
+
let u = 0;
|
|
100
|
+
t[s].forEach((f, _) => {
|
|
101
|
+
const k = o[f].height;
|
|
102
|
+
a[f] = {
|
|
103
|
+
x: parseInt(s, 10) * K.value + e.value.style.chart.padding.left,
|
|
104
|
+
y: u,
|
|
105
|
+
absoluteY: u,
|
|
106
|
+
height: k,
|
|
107
|
+
i: _,
|
|
108
|
+
color: o[f].color,
|
|
109
|
+
value: ke(k)
|
|
110
|
+
}, u += k + J.value;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const c = [];
|
|
114
|
+
for (const s in o) {
|
|
115
|
+
let u = a[s].absoluteY;
|
|
116
|
+
o[s].children && o[s].children.forEach(({ target: f, value: _ }, k) => {
|
|
117
|
+
const E = a[f].y, G = a[s], B = a[f], oe = v(u), ae = v(u + _ / o[s].outflow * G.height), ne = v(E), se = v(E + _ / o[f].inflow * B.height), Pe = {
|
|
118
|
+
id: de(),
|
|
119
|
+
source: s,
|
|
120
|
+
target: f,
|
|
121
|
+
path: `M ${v(G.x) + v($.value)} ${oe} L ${v(G.x) + v($.value)} ${ae} L ${v(B.x)} ${se} L ${v(B.x)} ${ne} Z`,
|
|
122
|
+
value: _,
|
|
123
|
+
sourceColor: o[s].color,
|
|
124
|
+
targetColor: o[f].color
|
|
125
|
+
};
|
|
126
|
+
c.push(Pe), u += ae - oe, a[f].y += se - ne;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return { nodeCoordinates: a, links: c };
|
|
130
|
+
}
|
|
131
|
+
const p = m(() => {
|
|
132
|
+
const l = we(g.dataset);
|
|
133
|
+
return {
|
|
134
|
+
nodes: Object.keys(l.nodeCoordinates).map((o, t) => ({
|
|
135
|
+
...l.nodeCoordinates[o],
|
|
136
|
+
name: o
|
|
137
|
+
})),
|
|
138
|
+
links: l.links
|
|
139
|
+
};
|
|
140
|
+
}), Ce = m(() => xe(p.value.nodes));
|
|
141
|
+
function xe(l) {
|
|
142
|
+
const o = {};
|
|
143
|
+
for (const n in l) {
|
|
144
|
+
const { x: a, height: c } = l[n];
|
|
145
|
+
o[a] || (o[a] = 0), o[a] += c + J.value;
|
|
146
|
+
}
|
|
147
|
+
return Math.max(...Object.values(o));
|
|
148
|
+
}
|
|
149
|
+
const D = m(() => {
|
|
150
|
+
const { top: l, right: o, left: t, bottom: n } = e.value.style.chart.padding, a = Y.value.length * K.value;
|
|
151
|
+
return {
|
|
152
|
+
height: Ce.value + l + n,
|
|
153
|
+
width: o + Math.max(...p.value.nodes.map((c) => c.x)) + $.value,
|
|
154
|
+
left: t,
|
|
155
|
+
top: l,
|
|
156
|
+
right: a - o,
|
|
157
|
+
p_top: l,
|
|
158
|
+
p_bottom: n
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
function $e(l) {
|
|
162
|
+
const o = {}, t = {}, n = /* @__PURE__ */ new Set();
|
|
163
|
+
return Y.value.forEach(([a, c, s]) => {
|
|
164
|
+
o[a] || (o[a] = []), t[c] || (t[c] = []), o[a].push(c), t[c].push(a);
|
|
165
|
+
}), o[l] && o[l].forEach((a) => n.add(a)), t[l] && t[l].forEach((a) => n.add(a)), Array.from(n).concat(l);
|
|
166
|
+
}
|
|
167
|
+
const b = w(null), H = w(null);
|
|
168
|
+
function _e(l) {
|
|
169
|
+
b.value = $e(l.name), H.value = l.name;
|
|
170
|
+
}
|
|
171
|
+
function Ne() {
|
|
172
|
+
b.value = null, H.value = null;
|
|
173
|
+
}
|
|
174
|
+
const ee = m(() => p.value.links.map(({ source: l, target: o, sourceColor: t, targetColor: n, value: a }) => ({
|
|
175
|
+
source: l,
|
|
176
|
+
target: o,
|
|
177
|
+
sourceColor: t,
|
|
178
|
+
targetColor: n,
|
|
179
|
+
value: a
|
|
180
|
+
})));
|
|
181
|
+
function te() {
|
|
182
|
+
Le(() => {
|
|
183
|
+
const l = ee.value.map((n, a) => [
|
|
184
|
+
[n.source],
|
|
185
|
+
[n.target],
|
|
186
|
+
[n.value]
|
|
187
|
+
]), o = [
|
|
188
|
+
[e.value.style.chart.title.text],
|
|
189
|
+
[e.value.style.chart.title.subtitle.text],
|
|
190
|
+
[
|
|
191
|
+
[e.value.table.columnNames.source],
|
|
192
|
+
[e.value.table.columnNames.target],
|
|
193
|
+
[e.value.table.columnNames.value]
|
|
194
|
+
]
|
|
195
|
+
].concat(l), t = Ae(o);
|
|
196
|
+
Ue({
|
|
197
|
+
csvContent: t,
|
|
198
|
+
title: e.value.style.chart.title.text || "vue-ui-flow"
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
const L = m(() => {
|
|
203
|
+
const l = [
|
|
204
|
+
e.value.table.columnNames.source,
|
|
205
|
+
e.value.table.columnNames.target,
|
|
206
|
+
e.value.table.columnNames.value
|
|
207
|
+
], o = ee.value.map((a, c) => [
|
|
208
|
+
{
|
|
209
|
+
color: a.sourceColor,
|
|
210
|
+
name: a.source
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
color: a.targetColor,
|
|
214
|
+
name: a.target
|
|
215
|
+
},
|
|
216
|
+
ve({
|
|
217
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
218
|
+
v: a.value,
|
|
219
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
220
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
221
|
+
})
|
|
222
|
+
]), t = {
|
|
223
|
+
th: {
|
|
224
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
225
|
+
color: e.value.table.th.color,
|
|
226
|
+
outline: e.value.table.th.outline
|
|
227
|
+
},
|
|
228
|
+
td: {
|
|
229
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
230
|
+
color: e.value.table.td.color,
|
|
231
|
+
outline: e.value.table.td.outline
|
|
232
|
+
},
|
|
233
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
234
|
+
};
|
|
235
|
+
return {
|
|
236
|
+
colNames: [
|
|
237
|
+
e.value.table.columnNames.source,
|
|
238
|
+
e.value.table.columnNames.target,
|
|
239
|
+
e.value.table.columnNames.value
|
|
240
|
+
],
|
|
241
|
+
head: l,
|
|
242
|
+
body: o,
|
|
243
|
+
config: t
|
|
244
|
+
};
|
|
245
|
+
});
|
|
246
|
+
function Te() {
|
|
247
|
+
return p.value;
|
|
248
|
+
}
|
|
249
|
+
function le() {
|
|
250
|
+
I.value.showTable = !I.value.showTable;
|
|
251
|
+
}
|
|
252
|
+
return ge({
|
|
253
|
+
getData: Te,
|
|
254
|
+
generateCsv: te,
|
|
255
|
+
generateImage: Z,
|
|
256
|
+
generatePdf: R,
|
|
257
|
+
toggleTable: le
|
|
258
|
+
}), (l, o) => (r(), h("div", {
|
|
259
|
+
ref_key: "flowChart",
|
|
260
|
+
ref: j,
|
|
261
|
+
class: ue(`vue-ui-flow ${N.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
262
|
+
style: C(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
|
|
263
|
+
id: `flow_${S.value}`
|
|
264
|
+
}, [
|
|
265
|
+
e.value.style.chart.title.text ? (r(), h("div", {
|
|
266
|
+
key: 0,
|
|
267
|
+
style: C(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
268
|
+
}, [
|
|
269
|
+
re(Ve, {
|
|
270
|
+
config: {
|
|
271
|
+
title: {
|
|
272
|
+
cy: "flow-title",
|
|
273
|
+
...e.value.style.chart.title
|
|
274
|
+
},
|
|
275
|
+
subtitle: {
|
|
276
|
+
cy: "flow-subtitle",
|
|
277
|
+
...e.value.style.chart.title.subtitle
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}, null, 8, ["config"])
|
|
281
|
+
], 4)) : T("", !0),
|
|
282
|
+
e.value.userOptions.show && M.value ? (r(), A(Xe, {
|
|
283
|
+
ref: "details",
|
|
284
|
+
key: `user_option_${X.value}`,
|
|
285
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
286
|
+
color: e.value.style.chart.color,
|
|
287
|
+
isPrinting: i(W),
|
|
288
|
+
isImaging: i(q),
|
|
289
|
+
uid: S.value,
|
|
290
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
291
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
292
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
293
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
294
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
295
|
+
isFullscreen: N.value,
|
|
296
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
297
|
+
chartElement: j.value,
|
|
298
|
+
onToggleFullscreen: be,
|
|
299
|
+
onGeneratePdf: i(R),
|
|
300
|
+
onGenerateCsv: te,
|
|
301
|
+
onGenerateImage: i(Z),
|
|
302
|
+
onToggleTable: le
|
|
303
|
+
}, Ie({ _: 2 }, [
|
|
304
|
+
l.$slots.optionPdf ? {
|
|
305
|
+
name: "optionPdf",
|
|
306
|
+
fn: y(() => [
|
|
307
|
+
x(l.$slots, "optionPdf", {}, void 0, !0)
|
|
308
|
+
]),
|
|
309
|
+
key: "0"
|
|
310
|
+
} : void 0,
|
|
311
|
+
l.$slots.optionCsv ? {
|
|
312
|
+
name: "optionCsv",
|
|
313
|
+
fn: y(() => [
|
|
314
|
+
x(l.$slots, "optionCsv", {}, void 0, !0)
|
|
315
|
+
]),
|
|
316
|
+
key: "1"
|
|
317
|
+
} : void 0,
|
|
318
|
+
l.$slots.optionImg ? {
|
|
319
|
+
name: "optionImg",
|
|
320
|
+
fn: y(() => [
|
|
321
|
+
x(l.$slots, "optionImg", {}, void 0, !0)
|
|
322
|
+
]),
|
|
323
|
+
key: "2"
|
|
324
|
+
} : void 0,
|
|
325
|
+
l.$slots.optionTable ? {
|
|
326
|
+
name: "optionTable",
|
|
327
|
+
fn: y(() => [
|
|
328
|
+
x(l.$slots, "optionTable", {}, void 0, !0)
|
|
329
|
+
]),
|
|
330
|
+
key: "3"
|
|
331
|
+
} : void 0,
|
|
332
|
+
l.$slots.optionFullscreen ? {
|
|
333
|
+
name: "optionFullscreen",
|
|
334
|
+
fn: y(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
335
|
+
x(l.$slots, "optionFullscreen", ie(ce({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
336
|
+
]),
|
|
337
|
+
key: "4"
|
|
338
|
+
} : void 0
|
|
339
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : T("", !0),
|
|
340
|
+
(r(), h("svg", {
|
|
341
|
+
xmlns: i(De),
|
|
342
|
+
viewBox: `0 0 ${D.value.width} ${D.value.height}`,
|
|
343
|
+
class: ue({ "vue-data-ui-fullscreen--on": N.value, "vue-data-ui-fulscreen--off": !N.value }),
|
|
344
|
+
style: C(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
345
|
+
}, [
|
|
346
|
+
O("defs", null, [
|
|
347
|
+
(r(!0), h(P, null, F(p.value.links, (t, n) => (r(), h("linearGradient", {
|
|
348
|
+
id: t.id,
|
|
349
|
+
x1: "0%",
|
|
350
|
+
y1: "0%",
|
|
351
|
+
x2: "100%",
|
|
352
|
+
y2: "0%"
|
|
353
|
+
}, [
|
|
354
|
+
O("stop", {
|
|
355
|
+
offset: "0%",
|
|
356
|
+
"stop-color": t.sourceColor
|
|
357
|
+
}, null, 8, et),
|
|
358
|
+
O("stop", {
|
|
359
|
+
offset: "100%",
|
|
360
|
+
"stop-color": t.targetColor
|
|
361
|
+
}, null, 8, tt)
|
|
362
|
+
], 8, Qe))), 256))
|
|
363
|
+
]),
|
|
364
|
+
(r(!0), h(P, null, F(p.value.links, (t) => (r(), h("path", {
|
|
365
|
+
class: "vue-ui-flow-link",
|
|
366
|
+
d: t.path,
|
|
367
|
+
fill: `url(#${t.id})`,
|
|
368
|
+
stroke: e.value.style.chart.links.stroke,
|
|
369
|
+
"stroke-width": e.value.style.chart.links.strokeWidth,
|
|
370
|
+
style: C(`opacity:${H.value ? [t.target, t.source].includes(H.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}`)
|
|
371
|
+
}, null, 12, lt))), 256)),
|
|
372
|
+
(r(!0), h(P, null, F(p.value.nodes, (t, n) => (r(), h("rect", {
|
|
373
|
+
class: "vue-ui-flow-node",
|
|
374
|
+
x: t.x,
|
|
375
|
+
y: i(v)(t.absoluteY),
|
|
376
|
+
height: i(v)(t.height),
|
|
377
|
+
width: $.value,
|
|
378
|
+
fill: t.color,
|
|
379
|
+
stroke: e.value.style.chart.nodes.stroke,
|
|
380
|
+
"stroke-width": e.value.style.chart.nodes.strokeWidth,
|
|
381
|
+
onMouseenter: (a) => _e(t),
|
|
382
|
+
onMouseleave: o[0] || (o[0] = (a) => Ne()),
|
|
383
|
+
style: C(`opacity:${b.value ? b.value.includes(t.name) ? 1 : 0.2 : 1}`)
|
|
384
|
+
}, null, 44, ot))), 256)),
|
|
385
|
+
(r(!0), h(P, null, F(p.value.nodes, (t, n) => (r(), h("text", {
|
|
386
|
+
x: t.x + $.value / 2,
|
|
387
|
+
y: i(v)(t.absoluteY + t.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4),
|
|
388
|
+
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
389
|
+
fill: i(fe)(t.color),
|
|
390
|
+
"text-anchor": "middle",
|
|
391
|
+
style: C(`pointer-events: none; opacity:${b.value ? b.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
392
|
+
}, U(e.value.style.chart.nodes.labels.abbreviation.use ? i(Ge)({ source: t.name, length: e.value.style.chart.nodes.labels.abbreviation.length }) : t.name), 13, at))), 256)),
|
|
393
|
+
(r(!0), h(P, null, F(p.value.nodes, (t, n) => (r(), h("text", {
|
|
394
|
+
x: t.x + $.value / 2,
|
|
395
|
+
y: i(v)(t.absoluteY + t.height / 2 + e.value.style.chart.nodes.labels.fontSize),
|
|
396
|
+
"font-size": e.value.style.chart.nodes.labels.fontSize,
|
|
397
|
+
fill: i(fe)(t.color),
|
|
398
|
+
"text-anchor": "middle",
|
|
399
|
+
style: C(`pointer-events: none; opacity:${b.value ? b.value.includes(t.name) ? 1 : 0 : 1}`)
|
|
400
|
+
}, U(i(Be)(
|
|
401
|
+
e.value.style.chart.nodes.labels.formatter,
|
|
402
|
+
t.value,
|
|
403
|
+
i(ve)({
|
|
404
|
+
p: e.value.style.chart.nodes.labels.prefix,
|
|
405
|
+
v: t.value,
|
|
406
|
+
s: e.value.style.chart.nodes.labels.suffix,
|
|
407
|
+
r: e.value.style.chart.nodes.labels.rounding
|
|
408
|
+
}),
|
|
409
|
+
{ datapoint: t, seriesIndex: n }
|
|
410
|
+
)), 13, nt))), 256)),
|
|
411
|
+
x(l.$slots, "svg", { svg: D.value }, void 0, !0)
|
|
412
|
+
], 14, Ke)),
|
|
413
|
+
l.$slots.watermark ? (r(), h("div", st, [
|
|
414
|
+
x(l.$slots, "watermark", ie(ce({ isPrinting: i(W) || i(q) })), void 0, !0)
|
|
415
|
+
])) : T("", !0),
|
|
416
|
+
M.value ? T("", !0) : (r(), A(Re, {
|
|
417
|
+
key: 3,
|
|
418
|
+
config: {
|
|
419
|
+
type: "flow",
|
|
420
|
+
style: {
|
|
421
|
+
backgroundColor: e.value.style.chart.backgroundColor
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}, null, 8, ["config"])),
|
|
425
|
+
M.value ? (r(), A(qe, {
|
|
426
|
+
key: 4,
|
|
427
|
+
hideDetails: "",
|
|
428
|
+
config: {
|
|
429
|
+
open: I.value.showTable,
|
|
430
|
+
maxHeight: 1e4,
|
|
431
|
+
body: {
|
|
432
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
433
|
+
color: e.value.style.chart.color
|
|
434
|
+
},
|
|
435
|
+
head: {
|
|
436
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
437
|
+
color: e.value.style.chart.color
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}, {
|
|
441
|
+
content: y(() => [
|
|
442
|
+
re(We, {
|
|
443
|
+
colNames: L.value.colNames,
|
|
444
|
+
head: L.value.head,
|
|
445
|
+
body: L.value.body,
|
|
446
|
+
config: L.value.config,
|
|
447
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
448
|
+
onClose: o[1] || (o[1] = (t) => I.value.showTable = !1)
|
|
449
|
+
}, {
|
|
450
|
+
th: y(({ th: t }) => [
|
|
451
|
+
O("div", {
|
|
452
|
+
innerHTML: t,
|
|
453
|
+
style: { display: "flex", "align-items": "center" }
|
|
454
|
+
}, null, 8, ut)
|
|
455
|
+
]),
|
|
456
|
+
td: y(({ td: t }) => [
|
|
457
|
+
He(U(t.name || t), 1)
|
|
458
|
+
]),
|
|
459
|
+
_: 1
|
|
460
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
461
|
+
]),
|
|
462
|
+
_: 1
|
|
463
|
+
}, 8, ["config"])) : T("", !0)
|
|
464
|
+
], 14, Je));
|
|
465
|
+
}
|
|
466
|
+
}, bt = /* @__PURE__ */ Ze(rt, [["__scopeId", "data-v-c5ae33a6"]]);
|
|
467
|
+
export {
|
|
468
|
+
bt as default
|
|
469
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NNZeHOBS.cjs"),K=require("./Legend-DuuSl2rJ.cjs"),Q=require("./Title-PZ6S96pU.cjs"),Z=require("./Tooltip-BoIYPSX3.cjs"),ee=require("./DataTable-CSEiZDAb.cjs"),D=require("./usePrinter-BLbY8qGZ.cjs"),te=require("./vue-ui-skeleton-CI4t8LHn.cjs"),le=require("./vue-ui-accordion-CcdyvXrp.cjs"),q=require("./useNestedProp-CPsbJAGj.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["id"],ne=["stdDeviation"],ue=["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:A}=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),W=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:A});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"}),U=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}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.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)||U.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,s)=>o+s,0):0,absoluteValues:r.sanitizeArray(l.values),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=>!u.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=>!u.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)=>!u.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 n="";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}):(n+=`<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>`,n+=`<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&&(n+=`<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?n+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:n+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),x.value=`<div>${n}</div>`)}const F=e.computed(()=>p.value.map((l,a)=>({...l,proportion:(l.value||0)/d.dataset.map(o=>(o.values||[]).reduce((s,n)=>s+n,0)).reduce((o,s)=>o+s,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.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,n)=>[[s.name],[h.value.body[n]],[isNaN(h.value.body[n]/c.value)?"-":h.value.body[n]/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((n,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:n.color,name:n.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 z(){v.value.showTable=!v.value.showTable}function O(){v.value.showTooltip=!v.value.showTooltip}return M({getData:H,generatePdf:L,generateCsv:I,generateImage:E,toggleTable:z,toggleTooltip:O}),(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:W,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:z,onToggleTooltip:O},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,ne)],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,ue)):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:n=>j({datapoint:o,relativeIndex:s,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=n=>{w.value=!1,i.value=null}),onClick:n=>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:n=>N(o),style:e.normalizeStyle(`opacity:${u.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),u.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-57d0334c"]]);exports.default=be;
|