vue-data-ui 2.4.41 → 2.4.42
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-6z0ZQva_.js → Arrow-DE71uBJZ.js} +1 -1
- package/dist/{Arrow-Cht76m69.cjs → Arrow-DTscDttD.cjs} +1 -1
- package/dist/{BaseIcon-DCE3wRiG.js → BaseIcon-C8XxmpRq.js} +1 -1
- package/dist/{BaseIcon-D-JUZiGA.cjs → BaseIcon-COOfxsl_.cjs} +1 -1
- package/dist/{DataTable-Cr3Xkxe4.cjs → DataTable-DEdQvqB1.cjs} +1 -1
- package/dist/{DataTable-B5DiCrf_.js → DataTable-D_w08xos.js} +2 -2
- package/dist/{Legend-DzxQIjDO.js → Legend-BWDoQii_.js} +1 -1
- package/dist/{Legend-BXG_XPom.cjs → Legend-C4rlR-Ge.cjs} +1 -1
- package/dist/{PackageVersion-S7OD_s5u.js → PackageVersion-CH6MCx6T.js} +1 -1
- package/dist/{PackageVersion-CMtZxTqq.cjs → PackageVersion-DKyD7D76.cjs} +1 -1
- package/dist/{PenAndPaper-BxJZd7k9.js → PenAndPaper-BWTR3U2d.js} +3 -3
- package/dist/{PenAndPaper-DWYhyZye.cjs → PenAndPaper-Dc2zn4C0.cjs} +1 -1
- package/dist/{Shape-CvL90fNe.cjs → Shape-BLS-KzBD.cjs} +1 -1
- package/dist/{Shape-C3ywBhkW.js → Shape-xrlfL_v4.js} +1 -1
- package/dist/Slicer-8gKX0l4Q.cjs +1 -0
- package/dist/Slicer-DIYseEL1.js +423 -0
- package/dist/{Title-D9gPXVTT.cjs → Title-B-xkTfi8.cjs} +1 -1
- package/dist/{Title-BB0O0yol.js → Title-Cnl9ySNH.js} +1 -1
- package/dist/Tooltip-Brbj6DqX.cjs +1 -0
- package/dist/{Tooltip-GvLaModr.js → Tooltip-DEAOBZ8h.js} +33 -25
- package/dist/index-B68kzBN9.cjs +9 -0
- package/dist/{index-B6Q1Fyk0.js → index-DnukYspq.js} +45 -41
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +4 -0
- package/dist/types/vue-data-ui.d.ts +4 -0
- package/dist/{useNestedProp-DQpuJSz3.js → useNestedProp-CVOQGx-X.js} +1 -1
- package/dist/{useNestedProp-bZitLnbb.cjs → useNestedProp-es9bVqY_.cjs} +1 -1
- package/dist/{usePrinter-DtpFEgOX.cjs → usePrinter-C9yUesCc.cjs} +1 -1
- package/dist/{usePrinter-D8dIU7aG.js → usePrinter-DVIALk5e.js} +1 -1
- package/dist/{vue-data-ui-H24TWcBx.js → vue-data-ui-BmmjmNbb.js} +60 -60
- package/dist/{vue-data-ui-DBN7iJHU.cjs → vue-data-ui-LA94HAVo.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +3 -3
- package/dist/{vue-ui-3d-bar-BA2CQYGW.js → vue-ui-3d-bar-CnVJAgFO.js} +9 -9
- package/dist/{vue-ui-3d-bar-BaNI_M3v.cjs → vue-ui-3d-bar-DYswbvC_.cjs} +1 -1
- package/dist/{vue-ui-accordion-u4xDSvRn.cjs → vue-ui-accordion-D_K9gNUR.cjs} +1 -1
- package/dist/{vue-ui-accordion-BOHicozd.js → vue-ui-accordion-f9NTID9e.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DN25tjv-.cjs → vue-ui-age-pyramid-Bj9K08ws.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-vKWko9vn.js → vue-ui-age-pyramid-CL0RB7mU.js} +42 -41
- package/dist/{vue-ui-annotator-D4KNucw5.js → vue-ui-annotator-C82vEb7R.js} +1 -1
- package/dist/{vue-ui-annotator-BcxUQ5tM.cjs → vue-ui-annotator-DhwUZ4WB.cjs} +1 -1
- package/dist/{vue-ui-bullet-DZgtd_qb.js → vue-ui-bullet-BxYYiFnu.js} +15 -15
- package/dist/{vue-ui-bullet-C3DKTZbg.cjs → vue-ui-bullet-D6KC5yoe.cjs} +1 -1
- package/dist/vue-ui-candlestick-Duf3yfwR.js +740 -0
- package/dist/vue-ui-candlestick-lunuQ9Ka.cjs +2 -0
- package/dist/{vue-ui-carousel-table-C62szGjt.cjs → vue-ui-carousel-table-4z9ZACSk.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Bpsrlbx9.js → vue-ui-carousel-table-DQymYeK0.js} +4 -4
- package/dist/{vue-ui-chestnut-DhPSNM96.js → vue-ui-chestnut-DDNLUSav.js} +8 -8
- package/dist/{vue-ui-chestnut-VWwSZnUX.cjs → vue-ui-chestnut-iRODkXaw.cjs} +1 -1
- package/dist/{vue-ui-cursor-BM2OiZnZ.js → vue-ui-cursor-Bdud_Fxg.js} +2 -2
- package/dist/{vue-ui-cursor-BwnZYB4D.cjs → vue-ui-cursor-Bt_SieMc.cjs} +1 -1
- package/dist/{vue-ui-dashboard-D8FU1GbE.cjs → vue-ui-dashboard-BzRR9Ra7.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BcnW7vDs.js → vue-ui-dashboard-CeVkJPeG.js} +2 -2
- package/dist/{vue-ui-digits-BmQBwho3.cjs → vue-ui-digits-DF3oLaaR.cjs} +1 -1
- package/dist/{vue-ui-digits-M4Pvrg0n.js → vue-ui-digits-DtNvb8lM.js} +2 -2
- package/dist/{vue-ui-donut-BgsQjURe.js → vue-ui-donut-C028OlzU.js} +99 -98
- package/dist/vue-ui-donut-evolution-2vQPsBFq.cjs +1 -0
- package/dist/vue-ui-donut-evolution-CprYApXF.js +908 -0
- package/dist/{vue-ui-donut-CZZfvbPk.cjs → vue-ui-donut-o09QqVJO.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-zv7yiPPM.js → vue-ui-dumbbell-BV2LN5qt.js} +10 -10
- package/dist/{vue-ui-dumbbell-CsMqgiGr.cjs → vue-ui-dumbbell-CS8pY-mj.cjs} +1 -1
- package/dist/{vue-ui-flow-BqtIWBkz.js → vue-ui-flow-QRimZUXT.js} +46 -46
- package/dist/{vue-ui-flow-E5MkZ3Yb.cjs → vue-ui-flow-iNWWhp7U.cjs} +1 -1
- package/dist/{vue-ui-funnel-QU0_JscL.cjs → vue-ui-funnel-BL8vtmsw.cjs} +1 -1
- package/dist/{vue-ui-funnel-CmVLAttG.js → vue-ui-funnel-CBymVSdd.js} +19 -19
- package/dist/{vue-ui-galaxy-BPDH-9KW.cjs → vue-ui-galaxy-DSJrMBzj.cjs} +1 -1
- package/dist/{vue-ui-galaxy-sy8zvgcg.js → vue-ui-galaxy-KP3A9HVX.js} +53 -52
- package/dist/{vue-ui-gauge--hARSvgz.js → vue-ui-gauge-BuU0DDG0.js} +7 -7
- package/dist/{vue-ui-gauge-D_yokJMS.cjs → vue-ui-gauge-H9j8Dq5h.cjs} +1 -1
- package/dist/{vue-ui-gizmo-AUJq3EQL.cjs → vue-ui-gizmo-Bl9JoMk1.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CvTeq5j0.js → vue-ui-gizmo-M7RalwJ6.js} +3 -3
- package/dist/{vue-ui-heatmap-D-xNLuqW.cjs → vue-ui-heatmap-BXWWh4iN.cjs} +1 -1
- package/dist/{vue-ui-heatmap-lI8oO-nh.js → vue-ui-heatmap-DSkfyl8j.js} +60 -59
- package/dist/{vue-ui-history-plot-BC0Rvo-r.cjs → vue-ui-history-plot-BUoUHKx6.cjs} +1 -1
- package/dist/{vue-ui-history-plot-D3CwJpll.js → vue-ui-history-plot-CYSDr-GH.js} +60 -59
- package/dist/{vue-ui-kpi-B4FQKZ_r.cjs → vue-ui-kpi-BXe7HQIh.cjs} +1 -1
- package/dist/{vue-ui-kpi-C0agq-Os.js → vue-ui-kpi-BvUaC7JA.js} +3 -3
- package/dist/{vue-ui-mini-loader-CkjJ5pRO.js → vue-ui-mini-loader-DM8ShcKo.js} +2 -2
- package/dist/{vue-ui-mini-loader-BJ70GAEv.cjs → vue-ui-mini-loader-zbjxzJTp.cjs} +1 -1
- package/dist/{vue-ui-molecule-CsQfkIEE.cjs → vue-ui-molecule-BdIRpOM9.cjs} +1 -1
- package/dist/{vue-ui-molecule-V9UFJHeV.js → vue-ui-molecule-CZi84tUl.js} +26 -25
- package/dist/{vue-ui-mood-radar-Cj_wOEbY.js → vue-ui-mood-radar-DDnbuNdv.js} +11 -11
- package/dist/{vue-ui-mood-radar-CdU2vusL.cjs → vue-ui-mood-radar-DipV_UPN.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DFVQwbHg.js → vue-ui-nested-donuts-Chuuvtu-.js} +78 -77
- package/dist/{vue-ui-nested-donuts-DevV-xZr.cjs → vue-ui-nested-donuts-DuxVLzDH.cjs} +2 -2
- package/dist/{vue-ui-onion-BJ-PjA7d.js → vue-ui-onion-CIRGvycb.js} +49 -48
- package/dist/{vue-ui-onion-DGWktnME.cjs → vue-ui-onion-CvlwZgpu.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-CjxZbVNa.cjs → vue-ui-parallel-coordinate-plot-eJMnJ_u2.cjs} +3 -3
- package/dist/{vue-ui-parallel-coordinate-plot-33naX1Ss.js → vue-ui-parallel-coordinate-plot-jv7L5_x8.js} +70 -69
- package/dist/{vue-ui-quadrant-xJaZzXgo.js → vue-ui-quadrant-CjjXU43-.js} +55 -54
- package/dist/{vue-ui-quadrant-DqZqBb2L.cjs → vue-ui-quadrant-ks_4yK85.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BwN9eLye.js → vue-ui-quick-chart-BAVQ2SJ2.js} +637 -622
- package/dist/vue-ui-quick-chart-Br2gTOPk.cjs +15 -0
- package/dist/{vue-ui-radar-B4EXwJDY.js → vue-ui-radar-CXXAYowO.js} +38 -37
- package/dist/{vue-ui-radar-CQ66YUG5.cjs → vue-ui-radar-kjh9y4cm.cjs} +1 -1
- package/dist/{vue-ui-rating-DNkygw1i.js → vue-ui-rating-DOqMciYJ.js} +2 -2
- package/dist/{vue-ui-rating-D334I4ju.cjs → vue-ui-rating-EEIqiBgY.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CP2Z6IWV.cjs → vue-ui-relation-circle-BEv568py.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BKeSh28h.js → vue-ui-relation-circle-CR3iWQV_.js} +19 -19
- package/dist/{vue-ui-rings-D6M3UNSE.js → vue-ui-rings-B--CFaNX.js} +49 -48
- package/dist/vue-ui-rings-CgvWaw5N.cjs +2 -0
- package/dist/{vue-ui-scatter-JUPbbsO7.js → vue-ui-scatter-C-RD4h73.js} +26 -25
- package/dist/{vue-ui-scatter-C9ZoWV1q.cjs → vue-ui-scatter-ChWlgb1L.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DmLDHfF9.js → vue-ui-screenshot-C6-MOj7h.js} +1 -1
- package/dist/{vue-ui-screenshot-JMBX_AWn.cjs → vue-ui-screenshot-CtjCOun0.cjs} +1 -1
- package/dist/{vue-ui-skeleton-D7rg5vFC.js → vue-ui-skeleton-CXdyOF4T.js} +3 -3
- package/dist/{vue-ui-skeleton-E9_X0-sa.cjs → vue-ui-skeleton-DGCkWrND.cjs} +1 -1
- package/dist/{vue-ui-smiley-aRTznf8z.cjs → vue-ui-smiley-AYBZK1EE.cjs} +1 -1
- package/dist/{vue-ui-smiley-BAlHZm8H.js → vue-ui-smiley-CHXnJeLu.js} +2 -2
- package/dist/{vue-ui-spark-trend-DZR6Fqu5.cjs → vue-ui-spark-trend-D2wIBOvT.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-J9swikF_.js → vue-ui-spark-trend-DO5rDGRm.js} +5 -5
- package/dist/{vue-ui-sparkbar-Bjmi8pMf.cjs → vue-ui-sparkbar-COUcdDjn.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-B0tCpwZ9.js → vue-ui-sparkbar-CU3UNgHm.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DVX2pIC3.js → vue-ui-sparkgauge-0810df6b.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dhzbkn67.cjs → vue-ui-sparkgauge-DrJzwEAh.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Wd6q0mqj.js → vue-ui-sparkhistogram-CENPsEeO.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-gIaXDrFh.cjs → vue-ui-sparkhistogram-j7MGEYYJ.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DYT-gts9.js → vue-ui-sparkline-BOYreaxT.js} +4 -4
- package/dist/{vue-ui-sparkline-B5ySeM9y.cjs → vue-ui-sparkline-CXMea9Ki.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-ilvB3RBv.cjs → vue-ui-sparkstackbar-BJIo5y1n.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BMGA05VR.js → vue-ui-sparkstackbar-JvKmnoEy.js} +5 -5
- package/dist/vue-ui-stackbar-BOAmp-no.cjs +6 -0
- package/dist/{vue-ui-stackbar-BZbOagnf.js → vue-ui-stackbar-C3-hx7VM.js} +390 -377
- package/dist/{vue-ui-strip-plot-B-r4luYX.js → vue-ui-strip-plot-8MxOeTM_.js} +71 -70
- package/dist/{vue-ui-strip-plot-DPo7osh_.cjs → vue-ui-strip-plot-CmIS1Osx.cjs} +1 -1
- package/dist/{vue-ui-table-wlXHwJVW.js → vue-ui-table-CS-NSZjj.js} +1 -1
- package/dist/{vue-ui-table-C6z56ODT.cjs → vue-ui-table-hVmeT8wY.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CM-c7n0F.js → vue-ui-table-heatmap-CGHYZFJy.js} +9 -9
- package/dist/{vue-ui-table-heatmap-B05GifSw.cjs → vue-ui-table-heatmap-k9e_RrhC.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DHaEHFG_.js → vue-ui-table-sparkline-CRnJVQmO.js} +5 -5
- package/dist/{vue-ui-table-sparkline-Dx-ePVqW.cjs → vue-ui-table-sparkline-DiMZ_mh6.cjs} +1 -1
- package/dist/{vue-ui-thermometer-HCpOZBHv.cjs → vue-ui-thermometer-43jmlgFC.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BU_ckSdu.js → vue-ui-thermometer-D2BUcsvF.js} +7 -7
- package/dist/{vue-ui-timer-CUChwyzF.cjs → vue-ui-timer-BO9Ipy0W.cjs} +1 -1
- package/dist/{vue-ui-timer-DiRZ849L.js → vue-ui-timer-Dc6zOjxq.js} +9 -9
- package/dist/{vue-ui-tiremarks-yoQtfbj7.cjs → vue-ui-tiremarks-CMUTe1vY.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-BHMNb_tq.js → vue-ui-tiremarks-ejt0fqPg.js} +7 -7
- package/dist/{vue-ui-treemap-BpD6OdL3.js → vue-ui-treemap-DD8tFk9R.js} +98 -97
- package/dist/{vue-ui-treemap-BInwLSes.cjs → vue-ui-treemap-DqSHqaJK.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CBNWMmCg.js → vue-ui-vertical-bar-CxydSPHF.js} +58 -57
- package/dist/{vue-ui-vertical-bar-hS4gzdKs.cjs → vue-ui-vertical-bar-D4dYglan.cjs} +2 -2
- package/dist/{vue-ui-waffle-Cmq6zhD8.cjs → vue-ui-waffle-CHWAepdl.cjs} +1 -1
- package/dist/{vue-ui-waffle-BE8iTrGF.js → vue-ui-waffle-DYdcFM17.js} +79 -78
- package/dist/{vue-ui-wheel-BXSIBRLM.js → vue-ui-wheel-CxtgGGpt.js} +7 -7
- package/dist/{vue-ui-wheel-BT0mLxln.cjs → vue-ui-wheel-_ynSyF3l.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-3wvSYRbp.js → vue-ui-word-cloud-B0AhPT0k.js} +10 -10
- package/dist/{vue-ui-word-cloud-BXHlm41O.cjs → vue-ui-word-cloud-Ct16Xxaw.cjs} +1 -1
- package/dist/{vue-ui-xy-D8XvOgW6.js → vue-ui-xy-B3346TfB.js} +195 -185
- package/dist/vue-ui-xy-DHYbKvBg.cjs +3 -0
- package/dist/vue-ui-xy-canvas-DtPqmu7B.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-Cx7vPyfT.js → vue-ui-xy-canvas-W7YGqG7f.js} +378 -365
- package/package.json +1 -1
- package/dist/Slicer-B2aHb4bj.cjs +0 -1
- package/dist/Slicer-D9ASV60L.js +0 -400
- package/dist/Tooltip-ypQtmi99.cjs +0 -1
- package/dist/index-B5Ugkauv.cjs +0 -9
- package/dist/vue-ui-candlestick-C8yBMu8-.js +0 -725
- package/dist/vue-ui-candlestick-DVEofXBZ.cjs +0 -2
- package/dist/vue-ui-donut-evolution-BO2-ARBX.js +0 -895
- package/dist/vue-ui-donut-evolution-DP14ctdf.cjs +0 -1
- package/dist/vue-ui-quick-chart-BzpXJYR_.cjs +0 -15
- package/dist/vue-ui-rings-2oDSTctd.cjs +0 -2
- package/dist/vue-ui-stackbar-BZKwsAjO.cjs +0 -6
- package/dist/vue-ui-xy-CfduqTWA.cjs +0 -3
- package/dist/vue-ui-xy-canvas-BTR-cL02.cjs +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B5Ugkauv.cjs"),J=require("./useResponsive-BJ7DTGpm.cjs"),xe=require("./Title-D9gPXVTT.cjs"),K=require("./usePrinter-DtpFEgOX.cjs"),we=require("./vue-ui-skeleton-E9_X0-sa.cjs"),Q=require("./useNestedProp-bZitLnbb.cjs"),be=require("./PackageVersion-CMtZxTqq.cjs"),Ce=require("./PenAndPaper-DWYhyZye.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],Pe=["xmlns","viewBox"],$e=["cx","cy","r","stroke","stroke-width"],Le={key:0},ze=["stroke","d","stroke-width"],Ee={style:{"pointer-events":"none"}},Se=["cx","cy","fill","r","stroke"],Oe=["x","y","fill","font-size"],Ae={key:1},Ne=["stroke","stroke-width","x1","x2","y1","y2"],Ie={style:{"pointer-events":"none"}},Fe=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Ve=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Te=["cx","cy","fill","stroke","onClick","r"],Re={key:5,class:"vue-data-ui-watermark"},je={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(Z,{expose:ee}){const y=Z;e.useCssVars(t=>({"7693a9d2":ae.value,"65d94d14":oe.value,fa445a50:se.value}));const{vue_ui_relation_circle:te}=o.useConfig(),_=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),x=e.ref(o.createUid()),S=e.ref(0),w=e.ref(null),O=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(0),r=e.computed({get:()=>F(),set:t=>t});function F(){const t=Q.useNestedProp({userConfig:y.config,defaultConfig:te});return t.theme?{...Q.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=F(),G(),I.value+=1},{deep:!0});const{isPrinting:M,isImaging:V,generatePdf:T,generateImage:R}=K.usePrinter({elementId:`relation_circle_${x.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),le=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),j=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),s=e.ref({}),v=e.ref([]),re=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),D=e.ref(r.value.style.plot.radius),q=e.ref(r.value.style.labels.fontSize),i=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ne=e.computed(()=>r.value.style.links.curved),oe=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ae=e.computed(()=>m.value*2),se=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{G(),document.getElementById(`relation_circle_${x.value}`).addEventListener("click",U)});function G(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=J.throttle(()=>{const{width:n,height:l}=J.useResponsive({chart:w.value,title:r.value.style.title.text?O.value:null,source:A.value,noTitle:N.value});k.value=Math.min(n,l),i.value.width=n,i.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],W(),Y(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),D.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),q.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(w.value.parentNode)}else h.value=[],d.value=[],W(),Y()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${x.value}`).removeEventListener("click",U),b.value&&b.value.disconnect()});function U(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(s.value={},v.value=[])}function W(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,a=0;P.value.forEach((c,u)=>{const z=c.weights.reduce((ke,pe)=>ke+pe,0),E=m.value*Math.cos(l)+i.value.width/2,me=m.value*Math.sin(l)+i.value.height/2+r.value.style.circle.offsetY;h.value.push({x:E,y:me,...c,color:c.color?c.color:j.value[u]?j.value[u]:o.palette[u],regAngle:a,totalWeight:z}),l+=t,a+=n})}function ie(t,n){const l=(t.x+n.x)/2,a=(t.y+n.y)/2;return{x:l,y:a}}function Y(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,a)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ie({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ue({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ue(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},a={x:t.x1,y:t.y1},c={x:i.value.width/2,y:i.value.height/2+r.value.style.circle.offsetY},u=.5,z=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*a.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,E=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*a.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:z,y:E}}const ce=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function de(t){return Object.hasOwn(s.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function X(t){return Object.hasOwn(s.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${s.value.id}`||t.relationId===`${s.value.id}_${t.id}`?`opacity:1;stroke-width:${$(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(s.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${s.value.id}`||t.relationId===`${s.value.id}_${t.id}`):!1}function ve(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function fe(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ye(t){return Object.hasOwn(s.value,"x")?s.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ge(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function H(t){re.value=360-t.regAngle,s.value.id&&t.id===s.value.id?(s.value={},v.value=[]):(s.value=t,v.value=[...t.relations])}function $(t){const n=t.weight/ce.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function he(t){C.value=t,S.value+=1}const B=e.ref(!1);function L(){B.value=!B.value}return ee({generatePdf:T,generateImage:R,toggleAnnotator:L}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:w,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${x.value}`},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ce.PenAndPaper,{key:0,parent:w.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:N,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&_.value?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(M),isImaging:e.unref(V),uid:x.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:w.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:he,onGeneratePdf:e.unref(T),onGenerateImage:e.unref(R),onToggleAnnotator:L},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(be._sfc_main),e.createElementVNode("circle",{cx:(i.value.width<=0?1e-4:i.value.width)/2,cy:(i.value.height<=0?1e-4:i.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,$e),ne.value?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${a}`,style:e.normalizeStyle(X(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":s.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${i.value.width/2},${i.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":$(l),"stroke-linecap":"round"},null,14,ze))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",Ee,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Se)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Oe)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${a}`,stroke:g(l),"stroke-width":$(l),style:e.normalizeStyle(X(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":s.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Fe)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,a)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${a}`,"text-anchor":ve(l),transform:ge(l),x:fe(l),y:l.y+5,onClick:c=>H(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":s.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ye(l)}`),"font-size":q.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,a)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${a}`,style:e.normalizeStyle(de(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>H(l),r:D.value},null,12,Te))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],10,Pe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:A,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,_e))}},De=Be._export_sfc(je,[["__scopeId","data-v-f7051bc9"]]);exports.default=De;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-B68kzBN9.cjs"),J=require("./useResponsive-BJ7DTGpm.cjs"),xe=require("./Title-B-xkTfi8.cjs"),K=require("./usePrinter-C9yUesCc.cjs"),we=require("./vue-ui-skeleton-DGCkWrND.cjs"),Q=require("./useNestedProp-es9bVqY_.cjs"),be=require("./PackageVersion-DKyD7D76.cjs"),Ce=require("./PenAndPaper-Dc2zn4C0.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],Pe=["xmlns","viewBox"],$e=["cx","cy","r","stroke","stroke-width"],Le={key:0},ze=["stroke","d","stroke-width"],Ee={style:{"pointer-events":"none"}},Se=["cx","cy","fill","r","stroke"],Oe=["x","y","fill","font-size"],Ae={key:1},Ne=["stroke","stroke-width","x1","x2","y1","y2"],Ie={style:{"pointer-events":"none"}},Fe=["cx","cy","fill","r","stroke"],Me=["x","y","fill","font-size"],Ve=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],Te=["cx","cy","fill","stroke","onClick","r"],Re={key:5,class:"vue-data-ui-watermark"},je={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(Z,{expose:ee}){const y=Z;e.useCssVars(t=>({"7693a9d2":ae.value,"65d94d14":oe.value,fa445a50:se.value}));const{vue_ui_relation_circle:te}=o.useConfig(),_=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),x=e.ref(o.createUid()),S=e.ref(0),w=e.ref(null),O=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(0),r=e.computed({get:()=>F(),set:t=>t});function F(){const t=Q.useNestedProp({userConfig:y.config,defaultConfig:te});return t.theme?{...Q.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}e.watch(()=>y.config,t=>{r.value=F(),G(),I.value+=1},{deep:!0});const{isPrinting:M,isImaging:V,generatePdf:T,generateImage:R}=K.usePrinter({elementId:`relation_circle_${x.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),le=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),j=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),s=e.ref({}),v=e.ref([]),re=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),D=e.ref(r.value.style.plot.radius),q=e.ref(r.value.style.labels.fontSize),i=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ne=e.computed(()=>r.value.style.links.curved),oe=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ae=e.computed(()=>m.value*2),se=e.computed(()=>m.value*4),b=e.ref(null);e.onMounted(()=>{G(),document.getElementById(`relation_circle_${x.value}`).addEventListener("click",U)});function G(){if(o.objectIsEmpty(y.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{o.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=J.throttle(()=>{const{width:n,height:l}=J.useResponsive({chart:w.value,title:r.value.style.title.text?O.value:null,source:A.value,noTitle:N.value});k.value=Math.min(n,l),i.value.width=n,i.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],W(),Y(),f.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),D.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),q.value=o.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})});b.value=new ResizeObserver(t),b.value.observe(w.value.parentNode)}else h.value=[],d.value=[],W(),Y()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${x.value}`).removeEventListener("click",U),b.value&&b.value.disconnect()});function U(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(s.value={},v.value=[])}function W(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,a=0;P.value.forEach((c,u)=>{const z=c.weights.reduce((ke,pe)=>ke+pe,0),E=m.value*Math.cos(l)+i.value.width/2,me=m.value*Math.sin(l)+i.value.height/2+r.value.style.circle.offsetY;h.value.push({x:E,y:me,...c,color:c.color?c.color:j.value[u]?j.value[u]:o.palette[u],regAngle:a,totalWeight:z}),l+=t,a+=n})}function ie(t,n){const l=(t.x+n.x)/2,a=(t.y+n.y)/2;return{x:l,y:a}}function Y(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,a)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ie({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:ue({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function ue(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},a={x:t.x1,y:t.y1},c={x:i.value.width/2,y:i.value.height/2+r.value.style.circle.offsetY},u=.5,z=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*a.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,E=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*a.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:z,y:E}}const ce=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function de(t){return Object.hasOwn(s.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function X(t){return Object.hasOwn(s.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${s.value.id}`||t.relationId===`${s.value.id}_${t.id}`?`opacity:1;stroke-width:${$(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(s.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${s.value.id}`||t.relationId===`${s.value.id}_${t.id}`):!1}function ve(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function fe(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ye(t){return Object.hasOwn(s.value,"x")?s.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function ge(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function H(t){re.value=360-t.regAngle,s.value.id&&t.id===s.value.id?(s.value={},v.value=[]):(s.value=t,v.value=[...t.relations])}function $(t){const n=t.weight/ce.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function he(t){C.value=t,S.value+=1}const B=e.ref(!1);function L(){B.value=!B.value}return ee({generatePdf:T,generateImage:R,toggleAnnotator:L}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:w,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${x.value}`},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ce.PenAndPaper,{key:0,parent:w.value,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:L},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),le.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:N,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(xe._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&_.value?(e.openBlock(),e.createBlock(K.UserOptions,{ref:"details",key:`user_options_${S.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(M),isImaging:e.unref(V),uid:x.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:w.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:he,onGeneratePdf:e.unref(T),onGenerateImage:e.unref(R),onToggleAnnotator:L},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:a})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:a})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:a})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:a})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),_.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(be._sfc_main),e.createElementVNode("circle",{cx:(i.value.width<=0?1e-4:i.value.width)/2,cy:(i.value.height<=0?1e-4:i.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,$e),ne.value?(e.openBlock(),e.createElementBlock("g",Le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${a}`,style:e.normalizeStyle(X(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":s.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${i.value.width/2},${i.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":$(l),"stroke-linecap":"round"},null,14,ze))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",Ee,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Se)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Oe)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${a}`,stroke:g(l),"stroke-width":$(l),style:e.normalizeStyle(X(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":s.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,Ne))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,a)=>(e.openBlock(),e.createElementBlock("g",Ie,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.normalizeProps(e.mergeProps({key:0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value})),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Fe)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(o.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Me)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,a)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${a}`,"text-anchor":ve(l),transform:ge(l),x:fe(l),y:l.y+5,onClick:c=>H(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":s.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ye(l)}`),"font-size":q.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(o.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(o.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,a)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${a}`,style:e.normalizeStyle(de(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>H(l),r:D.value},null,12,Te))),128)),e.renderSlot(t.$slots,"svg",{svg:i.value},void 0,!0)],10,Pe)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Re,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:A,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),_.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(we.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,_e))}},De=Be._export_sfc(je,[["__scopeId","data-v-f7051bc9"]]);exports.default=De;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useCssVars as Re, computed as f, ref as r, watch as je, onMounted as Ge, onBeforeUnmount as Ue, openBlock as s, createElementBlock as i, normalizeStyle as O, createBlock as F, createCommentVNode as v, unref as d, createSlots as We, withCtx as B, renderSlot as k, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as De, createElementVNode as Ve, Fragment as C, renderList as P, mergeProps as ye, toDisplayString as
|
|
2
|
-
import { u as Xe, c as Ye, t as qe, a as He, p as fe, b as Je, o as Ke, e as he, g as Qe, X as Ze,
|
|
1
|
+
import { useCssVars as Re, computed as f, ref as r, watch as je, onMounted as Ge, onBeforeUnmount as Ue, openBlock as s, createElementBlock as i, normalizeStyle as O, createBlock as F, createCommentVNode as v, unref as d, createSlots as We, withCtx as B, renderSlot as k, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as De, createElementVNode as Ve, Fragment as C, renderList as P, mergeProps as ye, toDisplayString as T } from "vue";
|
|
2
|
+
import { u as Xe, c as Ye, t as qe, a as He, p as fe, b as Je, o as Ke, e as he, g as Qe, X as Ze, G as ge, i as V, f as X, F as Y } from "./index-DnukYspq.js";
|
|
3
3
|
import { t as et, u as tt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as lt } from "./Title-
|
|
5
|
-
import { u as st, U as at } from "./usePrinter-
|
|
6
|
-
import it from "./vue-ui-skeleton-
|
|
7
|
-
import { u as me } from "./useNestedProp-
|
|
8
|
-
import { _ as nt } from "./PackageVersion-
|
|
9
|
-
import { P as rt } from "./PenAndPaper-
|
|
4
|
+
import { _ as lt } from "./Title-Cnl9ySNH.js";
|
|
5
|
+
import { u as st, U as at } from "./usePrinter-DVIALk5e.js";
|
|
6
|
+
import it from "./vue-ui-skeleton-CXdyOF4T.js";
|
|
7
|
+
import { u as me } from "./useNestedProp-CVOQGx-X.js";
|
|
8
|
+
import { _ as nt } from "./PackageVersion-CH6MCx6T.js";
|
|
9
|
+
import { P as rt } from "./PenAndPaper-BWTR3U2d.js";
|
|
10
10
|
import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "stroke-width"], vt = { key: 0 }, yt = ["stroke", "d", "stroke-width"], ft = { style: { "pointer-events": "none" } }, ht = ["cx", "cy", "fill", "r", "stroke"], gt = ["x", "y", "fill", "font-size"], mt = { key: 1 }, kt = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], xt = { style: { "pointer-events": "none" } }, pt = ["cx", "cy", "fill", "r", "stroke"], wt = ["x", "y", "fill", "font-size"], bt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], _t = ["cx", "cy", "fill", "stroke", "onClick", "r"], $t = {
|
|
12
12
|
key: 5,
|
|
@@ -34,7 +34,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
34
34
|
"65d94d14": $e.value,
|
|
35
35
|
fa445a50: Pe.value
|
|
36
36
|
}));
|
|
37
|
-
const { vue_ui_relation_circle: pe } = Xe(),
|
|
37
|
+
const { vue_ui_relation_circle: pe } = Xe(), E = f(() => !!x.dataset && Object.keys(x.dataset).length), L = r(Ye()), q = r(0), z = r(null), H = r(null), J = r(null), K = r(null), Q = r(0), l = f({
|
|
38
38
|
get: () => Z(),
|
|
39
39
|
set: (e) => e
|
|
40
40
|
});
|
|
@@ -130,8 +130,8 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
130
130
|
const e = 6.28319 / N.value.length, a = 360 / N.value.length;
|
|
131
131
|
let t = 0, n = 0;
|
|
132
132
|
N.value.forEach((y, c) => {
|
|
133
|
-
const G = y.weights.reduce((
|
|
134
|
-
w.value.push({ x: U, y:
|
|
133
|
+
const G = y.weights.reduce((Ee, Ne) => Ee + Ne, 0), U = b.value * Math.cos(t) + o.value.width / 2, Te = b.value * Math.sin(t) + o.value.height / 2 + l.value.style.circle.offsetY;
|
|
134
|
+
w.value.push({ x: U, y: Te, ...y, color: y.color ? y.color : ae.value[c] ? ae.value[c] : fe[c], regAngle: n, totalWeight: G }), t += e, n += a;
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
function Le(e, a) {
|
|
@@ -256,7 +256,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
256
256
|
}
|
|
257
257
|
}, null, 8, ["config"]))
|
|
258
258
|
], 512)) : v("", !0),
|
|
259
|
-
l.value.userOptions.show &&
|
|
259
|
+
l.value.userOptions.show && E.value ? (s(), F(at, {
|
|
260
260
|
ref: "details",
|
|
261
261
|
key: `user_options_${q.value}`,
|
|
262
262
|
backgroundColor: l.value.style.backgroundColor,
|
|
@@ -308,7 +308,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
308
308
|
key: "3"
|
|
309
309
|
} : void 0
|
|
310
310
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
|
|
311
|
-
|
|
311
|
+
E.value ? (s(), i("svg", {
|
|
312
312
|
key: 4,
|
|
313
313
|
xmlns: d(Ze),
|
|
314
314
|
class: D([{ "vue-data-ui-fullscreen--on": M.value, "vue-data-ui-fulscreen--off": !M.value }, "relation-circle"]),
|
|
@@ -361,7 +361,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
361
361
|
fill: d(ge)(p(t)),
|
|
362
362
|
"text-anchor": "middle",
|
|
363
363
|
"font-size": m.value
|
|
364
|
-
},
|
|
364
|
+
}, T(d(V)(
|
|
365
365
|
l.value.style.weightLabels.formatter,
|
|
366
366
|
t.weight,
|
|
367
367
|
d(X)({
|
|
@@ -410,7 +410,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
410
410
|
fill: d(ge)(p(t)),
|
|
411
411
|
"text-anchor": "middle",
|
|
412
412
|
"font-size": m.value
|
|
413
|
-
},
|
|
413
|
+
}, T(d(V)(
|
|
414
414
|
l.value.style.weightLabels.formatter,
|
|
415
415
|
t.weight,
|
|
416
416
|
d(X)({
|
|
@@ -436,7 +436,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
436
436
|
style: O(`font-family:${l.value.style.fontFamily};${Se(t)}`),
|
|
437
437
|
"font-size": ne.value,
|
|
438
438
|
fill: l.value.style.labels.color
|
|
439
|
-
},
|
|
439
|
+
}, T(t.label) + " (" + T(d(V)(
|
|
440
440
|
l.value.style.weightLabels.formatter,
|
|
441
441
|
t.totalWeight,
|
|
442
442
|
d(X)({
|
|
@@ -472,7 +472,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
472
472
|
}, [
|
|
473
473
|
k(e.$slots, "source", {}, void 0, !0)
|
|
474
474
|
], 512)) : v("", !0),
|
|
475
|
-
|
|
475
|
+
E.value ? v("", !0) : (s(), F(it, {
|
|
476
476
|
key: 7,
|
|
477
477
|
config: {
|
|
478
478
|
type: "relationCircle",
|
|
@@ -486,7 +486,7 @@ const ot = ["id"], ct = ["xmlns", "viewBox"], dt = ["cx", "cy", "r", "stroke", "
|
|
|
486
486
|
}, null, 8, ["config"]))
|
|
487
487
|
], 12, ot));
|
|
488
488
|
}
|
|
489
|
-
},
|
|
489
|
+
}, Tt = /* @__PURE__ */ ut(Ct, [["__scopeId", "data-v-f7051bc9"]]);
|
|
490
490
|
export {
|
|
491
|
-
|
|
491
|
+
Tt as default
|
|
492
492
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ref as n, computed as v, watch as Re, onMounted as Ve, onBeforeUnmount as Be, openBlock as r, createElementBlock as f, normalizeClass as W, normalizeStyle as
|
|
2
|
-
import { u as We, c as ke, t as Ee, a as Ge, p as x, o as He, e as Y, g as Xe, b as je,
|
|
1
|
+
import { ref as n, computed as v, watch as Re, onMounted as Ve, onBeforeUnmount as Be, openBlock as r, createElementBlock as f, normalizeClass as W, normalizeStyle as O, createBlock as _, createCommentVNode as k, unref as i, createSlots as De, withCtx as p, renderSlot as h, normalizeProps as I, guardReactiveProps as M, createVNode as fe, createElementVNode as C, Fragment as ye, renderList as me, createTextVNode as be, toDisplayString as E, nextTick as Ue } from "vue";
|
|
2
|
+
import { u as We, c as ke, t as Ee, a as Ge, p as x, o as He, e as Y, g as Xe, b as je, J as Ye, d as Ce, f as N, X as qe, s as Je, w as Ke, v as q, i as we, x as Qe, y as Ze, q as et, r as tt } from "./index-DnukYspq.js";
|
|
3
3
|
import { t as lt, u as ot } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as st, U as nt } from "./usePrinter-
|
|
6
|
-
import { _ as rt } from "./Tooltip-
|
|
7
|
-
import { D as ut } from "./DataTable-
|
|
8
|
-
import { L as it } from "./Legend-
|
|
9
|
-
import vt from "./vue-ui-skeleton-
|
|
10
|
-
import ct from "./vue-ui-accordion-
|
|
11
|
-
import { u as $e } from "./useNestedProp-
|
|
12
|
-
import { _ as dt } from "./PackageVersion-
|
|
13
|
-
import { P as pt } from "./PenAndPaper-
|
|
4
|
+
import { _ as at } from "./Title-Cnl9ySNH.js";
|
|
5
|
+
import { u as st, U as nt } from "./usePrinter-DVIALk5e.js";
|
|
6
|
+
import { _ as rt } from "./Tooltip-DEAOBZ8h.js";
|
|
7
|
+
import { D as ut } from "./DataTable-D_w08xos.js";
|
|
8
|
+
import { L as it } from "./Legend-BWDoQii_.js";
|
|
9
|
+
import vt from "./vue-ui-skeleton-CXdyOF4T.js";
|
|
10
|
+
import ct from "./vue-ui-accordion-f9NTID9e.js";
|
|
11
|
+
import { u as $e } from "./useNestedProp-CVOQGx-X.js";
|
|
12
|
+
import { _ as dt } from "./PackageVersion-CH6MCx6T.js";
|
|
13
|
+
import { P as pt } from "./PenAndPaper-BWTR3U2d.js";
|
|
14
14
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"], bt = ["stop-color"], kt = ["stroke", "cx", "cy", "r", "fill"], Ct = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], wt = ["cx", "cy", "r", "onMouseenter"], $t = {
|
|
16
16
|
key: 5,
|
|
@@ -33,7 +33,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
33
33
|
},
|
|
34
34
|
emits: ["selectLegend"],
|
|
35
35
|
setup(Te, { expose: _e, emit: xe }) {
|
|
36
|
-
const y = Te, { vue_ui_rings: Ne } = We(),
|
|
36
|
+
const y = Te, { vue_ui_rings: Ne } = We(), S = n(!1), z = v(() => !!y.dataset && y.dataset.length), A = n(ke()), Pe = n(null), R = n(!1), G = n(""), T = n(null), J = n(0), P = n(null), K = n(null), Q = n(null), Z = n(null), ee = n(null), te = n(0), le = n(0), oe = n(0), e = v({
|
|
37
37
|
get: () => ae(),
|
|
38
38
|
set: (t) => t
|
|
39
39
|
});
|
|
@@ -90,14 +90,14 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
90
90
|
V.value = new ResizeObserver(t), V.value.observe(P.value.parentNode);
|
|
91
91
|
}
|
|
92
92
|
setTimeout(() => {
|
|
93
|
-
|
|
93
|
+
S.value = !0;
|
|
94
94
|
}, 600);
|
|
95
95
|
}
|
|
96
96
|
Be(() => {
|
|
97
97
|
V.value && V.value.disconnect();
|
|
98
98
|
});
|
|
99
99
|
const { isPrinting: ne, isImaging: re, generatePdf: ue, generateImage: ie } = st({
|
|
100
|
-
elementId: `rings_${
|
|
100
|
+
elementId: `rings_${A.value}`,
|
|
101
101
|
fileName: e.value.style.chart.title.text || "vue-ui-rings"
|
|
102
102
|
}), Le = v(() => e.value.userOptions.show && !e.value.style.chart.title.text), ve = v(() => je(e.value.customPalette)), w = n({
|
|
103
103
|
showTable: e.value.table.show,
|
|
@@ -120,12 +120,12 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
120
120
|
return t / Ae.value;
|
|
121
121
|
}
|
|
122
122
|
const B = v(() => y.dataset.map(({ values: t, name: o, color: l = null }, a) => {
|
|
123
|
-
const s = Ye(t).reduce((b,
|
|
123
|
+
const s = Ye(t).reduce((b, F) => b + F, 0);
|
|
124
124
|
return {
|
|
125
125
|
name: o,
|
|
126
126
|
color: l || Ce(l) || ve.value[a] || x[a] || x[a % x.length],
|
|
127
127
|
value: s,
|
|
128
|
-
proportion: s / y.dataset.map((b) => (b.values || []).reduce((
|
|
128
|
+
proportion: s / y.dataset.map((b) => (b.values || []).reduce((F, ze) => F + ze, 0)).reduce((b, F) => b + F, 0),
|
|
129
129
|
uid: ke()
|
|
130
130
|
};
|
|
131
131
|
})), de = v(() => B.value.map((t) => ({
|
|
@@ -134,7 +134,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
134
134
|
opacity: c.value.includes(t.uid) ? 0.5 : 1,
|
|
135
135
|
segregate: () => H(t.uid),
|
|
136
136
|
isSegregated: c.value.includes(t.uid)
|
|
137
|
-
})).toSorted((t, o) => o.value - t.value)),
|
|
137
|
+
})).toSorted((t, o) => o.value - t.value)), Fe = v(() => ({
|
|
138
138
|
cy: "rings-div-legend",
|
|
139
139
|
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
140
140
|
color: e.value.style.chart.legend.color,
|
|
@@ -150,7 +150,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
150
150
|
percentage: o / m.value * 100,
|
|
151
151
|
strokeWidth: e.value.style.chart.layout.rings.strokeWidth * ce(o)
|
|
152
152
|
})).toSorted((t, o) => o.value - t.value));
|
|
153
|
-
function
|
|
153
|
+
function Oe() {
|
|
154
154
|
return d.value.map(
|
|
155
155
|
({ name: t, color: o, value: l, absoluteValues: a, percentage: s }) => ({
|
|
156
156
|
name: t,
|
|
@@ -162,7 +162,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
164
|
const g = v(() => Se.value - e.value.style.chart.layout.rings.strokeWidth * 2), X = n(null);
|
|
165
|
-
function
|
|
165
|
+
function Ie(t, o) {
|
|
166
166
|
if (c.value.length === y.dataset.length) return;
|
|
167
167
|
X.value = {
|
|
168
168
|
datapoint: o,
|
|
@@ -258,9 +258,9 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
258
258
|
tt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const L = n(!1);
|
|
262
262
|
function Me(t) {
|
|
263
|
-
|
|
263
|
+
L.value = t, J.value += 1;
|
|
264
264
|
}
|
|
265
265
|
function he() {
|
|
266
266
|
w.value.showTable = !w.value.showTable;
|
|
@@ -273,7 +273,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
273
273
|
U.value = !U.value;
|
|
274
274
|
}
|
|
275
275
|
return _e({
|
|
276
|
-
getData:
|
|
276
|
+
getData: Oe,
|
|
277
277
|
generatePdf: ue,
|
|
278
278
|
generateCsv: pe,
|
|
279
279
|
generateImage: ie,
|
|
@@ -283,9 +283,9 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
283
283
|
}), (t, o) => (r(), f("div", {
|
|
284
284
|
ref_key: "ringsChart",
|
|
285
285
|
ref: P,
|
|
286
|
-
class: W(`vue-ui-rings ${
|
|
287
|
-
style:
|
|
288
|
-
id: `rings_${
|
|
286
|
+
class: W(`vue-ui-rings ${L.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
287
|
+
style: O(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
288
|
+
id: `rings_${A.value}`,
|
|
289
289
|
onMouseleave: o[3] || (o[3] = (l) => {
|
|
290
290
|
T.value = null, R.value = !1;
|
|
291
291
|
})
|
|
@@ -333,7 +333,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
333
333
|
color: e.value.style.chart.color,
|
|
334
334
|
isPrinting: i(ne),
|
|
335
335
|
isImaging: i(re),
|
|
336
|
-
uid:
|
|
336
|
+
uid: A.value,
|
|
337
337
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
338
338
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
339
339
|
hasXls: e.value.userOptions.buttons.csv,
|
|
@@ -341,7 +341,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
341
341
|
hasTable: e.value.userOptions.buttons.table,
|
|
342
342
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
343
343
|
isTooltip: w.value.showTooltip,
|
|
344
|
-
isFullscreen:
|
|
344
|
+
isFullscreen: L.value,
|
|
345
345
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
346
346
|
chartElement: P.value,
|
|
347
347
|
position: e.value.userOptions.position,
|
|
@@ -393,14 +393,14 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
393
393
|
t.$slots.optionFullscreen ? {
|
|
394
394
|
name: "optionFullscreen",
|
|
395
395
|
fn: p(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
396
|
-
h(t.$slots, "optionFullscreen",
|
|
396
|
+
h(t.$slots, "optionFullscreen", I(M({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
397
397
|
]),
|
|
398
398
|
key: "5"
|
|
399
399
|
} : void 0,
|
|
400
400
|
t.$slots.optionAnnotator ? {
|
|
401
401
|
name: "optionAnnotator",
|
|
402
402
|
fn: p(({ toggleAnnotator: l, isAnnotator: a }) => [
|
|
403
|
-
h(t.$slots, "optionAnnotator",
|
|
403
|
+
h(t.$slots, "optionAnnotator", I(M({ toggleAnnotator: l, isAnnotator: a })), void 0, !0)
|
|
404
404
|
]),
|
|
405
405
|
key: "6"
|
|
406
406
|
} : void 0
|
|
@@ -408,9 +408,9 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
408
408
|
z.value ? (r(), f("svg", {
|
|
409
409
|
key: 4,
|
|
410
410
|
xmlns: i(qe),
|
|
411
|
-
class: W({ "vue-data-ui-fullscreen--on":
|
|
411
|
+
class: W({ "vue-data-ui-fullscreen--on": L.value, "vue-data-ui-fulscreen--off": !L.value }),
|
|
412
412
|
viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
|
|
413
|
-
style:
|
|
413
|
+
style: O(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
414
414
|
}, [
|
|
415
415
|
fe(dt),
|
|
416
416
|
C("defs", null, [
|
|
@@ -420,7 +420,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
420
420
|
r: "50%",
|
|
421
421
|
fx: "50%",
|
|
422
422
|
fy: "50%",
|
|
423
|
-
id: `gradient_${
|
|
423
|
+
id: `gradient_${A.value}_${a}`
|
|
424
424
|
}, [
|
|
425
425
|
C("stop", {
|
|
426
426
|
offset: "0%",
|
|
@@ -435,11 +435,11 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
435
435
|
(r(!0), f(ye, null, me(d.value, (l, a) => (r(), f("g", null, [
|
|
436
436
|
C("circle", {
|
|
437
437
|
class: W({
|
|
438
|
-
"vue-ui-rings-item":
|
|
439
|
-
"vue-rings-item-onload": !
|
|
438
|
+
"vue-ui-rings-item": S.value && e.value.useCssAnimation,
|
|
439
|
+
"vue-rings-item-onload": !S.value && e.value.useCssAnimation,
|
|
440
440
|
"vue-ui-rings-opacity": T.value !== null && T.value !== a
|
|
441
441
|
}),
|
|
442
|
-
style:
|
|
442
|
+
style: O(`animation-delay:${a * 100}ms`),
|
|
443
443
|
stroke: e.value.style.chart.layout.rings.stroke,
|
|
444
444
|
cx: u.value.width / 2,
|
|
445
445
|
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * d.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
|
|
@@ -448,18 +448,18 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
448
448
|
}, null, 14, kt),
|
|
449
449
|
C("circle", {
|
|
450
450
|
class: W({
|
|
451
|
-
"vue-ui-rings-item":
|
|
452
|
-
"vue-rings-item-onload": !
|
|
451
|
+
"vue-ui-rings-item": S.value && e.value.useCssAnimation,
|
|
452
|
+
"vue-rings-item-onload": !S.value && e.value.useCssAnimation,
|
|
453
453
|
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
454
454
|
"vue-ui-rings-blur": T.value !== null && T.value !== a
|
|
455
455
|
}),
|
|
456
|
-
style:
|
|
456
|
+
style: O(`animation-delay:${a * 100}ms`),
|
|
457
457
|
stroke: e.value.style.chart.layout.rings.stroke,
|
|
458
458
|
"stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
|
|
459
459
|
cx: u.value.width / 2,
|
|
460
460
|
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * d.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
|
|
461
461
|
r: i(q)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
|
|
462
|
-
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${
|
|
462
|
+
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${A.value}_${a})` : l.color
|
|
463
463
|
}, null, 14, Ct),
|
|
464
464
|
C("circle", {
|
|
465
465
|
"data-cy-trap": "",
|
|
@@ -468,7 +468,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
468
468
|
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + g.value * d.value[0].proportion / 2 - g.value * l.proportion / 2 - 2 * (a + 1),
|
|
469
469
|
r: i(q)(g.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : g.value * l.proportion / 2 * 0.9),
|
|
470
470
|
fill: "transparent",
|
|
471
|
-
onMouseenter: (s) =>
|
|
471
|
+
onMouseenter: (s) => Ie(a, l),
|
|
472
472
|
onMouseleave: o[0] || (o[0] = (s) => {
|
|
473
473
|
T.value = null, R.value = !1;
|
|
474
474
|
})
|
|
@@ -477,7 +477,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
477
477
|
h(t.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
478
478
|
], 14, ft)) : k("", !0),
|
|
479
479
|
t.$slots.watermark ? (r(), f("div", $t, [
|
|
480
|
-
h(t.$slots, "watermark",
|
|
480
|
+
h(t.$slots, "watermark", I(M({ isPrinting: i(ne) || i(re) })), void 0, !0)
|
|
481
481
|
])) : k("", !0),
|
|
482
482
|
z.value ? k("", !0) : (r(), _(vt, {
|
|
483
483
|
key: 6,
|
|
@@ -498,14 +498,14 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
498
498
|
e.value.style.chart.legend.show ? (r(), _(it, {
|
|
499
499
|
key: `legend_${oe.value}`,
|
|
500
500
|
legendSet: de.value,
|
|
501
|
-
config:
|
|
501
|
+
config: Fe.value,
|
|
502
502
|
onClickMarker: o[1] || (o[1] = ({ legend: l }) => H(l.uid))
|
|
503
503
|
}, {
|
|
504
504
|
item: p(({ legend: l, index: a }) => [
|
|
505
505
|
C("div", {
|
|
506
506
|
"data-cy-legend-item": "",
|
|
507
507
|
onClick: (s) => H(l.uid),
|
|
508
|
-
style:
|
|
508
|
+
style: O(`opacity:${c.value.includes(l.uid) ? 0.5 : 1}`)
|
|
509
509
|
}, [
|
|
510
510
|
be(E(l.name) + ": " + E(i(we)(
|
|
511
511
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
@@ -552,16 +552,17 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
552
552
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
553
553
|
parent: P.value,
|
|
554
554
|
content: G.value,
|
|
555
|
+
isFullscreen: L.value,
|
|
555
556
|
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
556
557
|
}, {
|
|
557
558
|
"tooltip-before": p(() => [
|
|
558
|
-
h(t.$slots, "tooltip-before",
|
|
559
|
+
h(t.$slots, "tooltip-before", I(M({ ...X.value })), void 0, !0)
|
|
559
560
|
]),
|
|
560
561
|
"tooltip-after": p(() => [
|
|
561
|
-
h(t.$slots, "tooltip-after",
|
|
562
|
+
h(t.$slots, "tooltip-after", I(M({ ...X.value })), void 0, !0)
|
|
562
563
|
]),
|
|
563
564
|
_: 3
|
|
564
|
-
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
565
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
565
566
|
z.value ? (r(), _(ct, {
|
|
566
567
|
key: 8,
|
|
567
568
|
hideDetails: "",
|
|
@@ -604,7 +605,7 @@ const gt = ["id"], ft = ["xmlns", "viewBox"], yt = ["id"], mt = ["stop-color"],
|
|
|
604
605
|
}, 8, ["config"])) : k("", !0)
|
|
605
606
|
], 46, gt));
|
|
606
607
|
}
|
|
607
|
-
}, Et = /* @__PURE__ */ ht(Pt, [["__scopeId", "data-v-
|
|
608
|
+
}, Et = /* @__PURE__ */ ht(Pt, [["__scopeId", "data-v-55a9dc26"]]);
|
|
608
609
|
export {
|
|
609
610
|
Et as default
|
|
610
611
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-B68kzBN9.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),ge=require("./Title-B-xkTfi8.cjs"),ee=require("./usePrinter-C9yUesCc.cjs"),fe=require("./Tooltip-Brbj6DqX.cjs"),me=require("./DataTable-DEdQvqB1.cjs"),ye=require("./Legend-C4rlR-Ge.cjs"),be=require("./vue-ui-skeleton-DGCkWrND.cjs"),ke=require("./vue-ui-accordion-D_K9gNUR.cjs"),te=require("./useNestedProp-es9bVqY_.cjs"),Ce=require("./PackageVersion-DKyD7D76.cjs"),we=require("./PenAndPaper-Dc2zn4C0.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],Ne=["xmlns","viewBox"],$e=["id"],Se=["stop-color"],Be=["stop-color"],Pe=["stroke","cx","cy","r","fill"],_e=["stroke","stroke-width","cx","cy","r","fill"],Le=["cx","cy","r","onMouseenter"],Ve={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={key:0},Fe={key:1},Oe=["innerHTML"],ze={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(le,{expose:oe,emit:ae}){const v=le,{vue_ui_rings:re}=r.useConfig(),k=e.ref(!1),T=e.computed(()=>!!v.dataset&&v.dataset.length),C=e.ref(r.createUid()),ne=e.ref(null),x=e.ref(!1),P=e.ref(""),m=e.ref(null),E=e.ref(0),y=e.ref(null),A=e.ref(null),F=e.ref(null),O=e.ref(null),z=e.ref(null),I=e.ref(0),R=e.ref(0),M=e.ref(0),t=e.computed({get:()=>q(),set:l=>l});function q(){const l=te.useNestedProp({userConfig:v.config,defaultConfig:re});return l.theme?{...te.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>v.config,l=>{t.value=q(),D(),I.value+=1,R.value+=1,M.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{l.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=Z.throttle(()=>{const{width:a,height:o}=Z.useResponsive({chart:y.value,title:t.value.style.chart.title.text?A.value:null,legend:t.value.style.chart.legend.show?F.value:null,source:O.value,noTitle:z.value});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(y.value.parentNode)}setTimeout(()=>{k.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ee.usePrinter({elementId:`rings_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),se=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function _(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),ae("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ie=e.computed(()=>Math.max(...$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function X(l){return l/ie.value}const $=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=r.sanitizeArray(l).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||j.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,he)=>w+he,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),Y=e.computed(()=>$.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>_(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ce=e.computed(()=>({cy:"rings-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":""})),p=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||j.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:X(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*X(a)})).toSorted((l,a)=>a.value-l.value));function de(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>se.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ve(l,a){if(i.value.length===v.dataset.length)return;L.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))P.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.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="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,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.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
|
+
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),P.value=u}x.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=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:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(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},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function J(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.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-rings"})})}const b=e.ref(!1);function pe(l){b.value=l,E.value+=1}function K(){g.value.showTable=!g.value.showTable}function Q(){g.value.showTooltip=!g.value.showTooltip}const B=e.ref(!1);function V(){B.value=!B.value}return oe({getData:de,generatePdf:W,generateCsv:J,generateImage:G,toggleTable:K,toggleTooltip:Q,toggleAnnotator:V}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:y,class:e.normalizeClass(`vue-ui-rings ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${C.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,x.value=!1})},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),uid:C.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:g.value.showTooltip,isFullscreen:b.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(W),onGenerateCsv:J,onGenerateImage:e.unref(G),onToggleTable:K,onToggleTooltip:Q,onToggleAnnotator:V},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:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${C.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(o.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Be)],8,$e))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":k.value&&t.value.useCssAnimation,"vue-rings-item-onload":!k.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,Pe),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":k.value&&t.value.useCssAnimation,"vue-rings-item-onload":!k.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${C.value}_${n})`:o.color},null,14,_e),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ve(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,x.value=!1})},null,40,Le)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(be.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:F},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ye.Legend,{key:`legend_${M.value}`,legendSet:Y.value,config:ce.value,onClickMarker:a[1]||(a[1]=({legend:o})=>_(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>_(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.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:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",Fe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ae," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ee)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:Y.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:O,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(fe._sfc_main,{show:g.value.showTooltip&&x.value&&i.value.length<v.dataset.length,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:y.value,content:P.value,isFullscreen:b.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),T.value?(e.openBlock(),e.createBlock(ke.default,{key:8,hideDetails:"",config:{open:g.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.openBlock(),e.createBlock(me.DataTable,{key:`table_${R.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.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=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Oe)]),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)],46,xe))}},Ie=Te._export_sfc(ze,[["__scopeId","data-v-55a9dc26"]]);exports.default=Ie;
|