vue-data-ui 2.6.46 → 2.6.47
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-l2Rjf1KV.cjs → Arrow-CRrMt_zT.cjs} +1 -1
- package/dist/{Arrow-D4sCAfTr.js → Arrow-Dvz6Z2gU.js} +1 -1
- package/dist/{BaseIcon-Dx5FJt-N.js → BaseIcon-CEgQPz8O.js} +5 -3
- package/dist/{BaseIcon-BpdQLb-0.cjs → BaseIcon-DoqpR480.cjs} +1 -1
- package/dist/{ColorPicker-BkUHmkbg.cjs → ColorPicker-Bp_7FV2c.cjs} +1 -1
- package/dist/{ColorPicker-Ag9OY75a.js → ColorPicker-DwezDvSV.js} +3 -3
- package/dist/{DataTable-D9wdDVT6.js → DataTable-751-cN2c.js} +2 -2
- package/dist/{DataTable-B8Ui_Pd4.cjs → DataTable-D_Guh5Hf.cjs} +1 -1
- package/dist/{Legend-BCngKEVr.js → Legend-BG9fLat9.js} +2 -2
- package/dist/{Legend-BFB4DMQS.cjs → Legend-CepYsC9r.cjs} +1 -1
- package/dist/{PackageVersion-Da8iEjju.cjs → PackageVersion-D8T0gm3t.cjs} +1 -1
- package/dist/{PackageVersion-DR6SOSy8.js → PackageVersion-SrpgZayt.js} +1 -1
- package/dist/{PenAndPaper-Dpjaroq-.cjs → PenAndPaper-BJ6gGBM2.cjs} +1 -1
- package/dist/{PenAndPaper-DxsKkGjV.js → PenAndPaper-jnD991LP.js} +3 -3
- package/dist/{Shape-CcATSdDH.js → Shape-BaijOBYT.js} +1 -1
- package/dist/{Shape-DomxDqtX.cjs → Shape-og7-ULyN.cjs} +1 -1
- package/dist/{Slicer-DlCXj2P9.cjs → Slicer-B4ZDkwnQ.cjs} +1 -1
- package/dist/{Slicer-Bw4VblBK.js → Slicer-COHzItjq.js} +3 -3
- package/dist/{Title-CFmNnjPN.cjs → Title-BUnn57ZR.cjs} +1 -1
- package/dist/{Title-Dr0O3Ohb.js → Title-DMhhB9yN.js} +1 -1
- package/dist/{Tooltip-C8mLFDBp.js → Tooltip-BaPecnnV.js} +1 -1
- package/dist/{Tooltip-UBWsyt1M.cjs → Tooltip-DJtOxx2P.cjs} +1 -1
- package/dist/index-DEbhC0cM.cjs +9 -0
- package/dist/{index-BdV23M_4.js → index-KdQpiTkm.js} +3 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +5 -1
- package/dist/types/vue-data-ui.d.ts +5 -1
- package/dist/{useNestedProp-DyW-iWus.js → useNestedProp-CO8Pe266.js} +1 -1
- package/dist/{useNestedProp-BIeXIQxH.cjs → useNestedProp-COYn8tA0.cjs} +1 -1
- package/dist/{usePrinter-TFomTfxX.js → usePrinter-BuiF8wZK.js} +1 -1
- package/dist/{usePrinter-BUMwWyWM.cjs → usePrinter-DRmOwFc2.cjs} +1 -1
- package/dist/useResponsive-Cw4oZ8sQ.js +192 -0
- package/dist/useResponsive-DQmBAoBf.cjs +1 -0
- package/dist/{vue-data-ui-Cal0DvqU.js → vue-data-ui-3jkYjNO_.js} +61 -61
- package/dist/{vue-data-ui-DBoVETZN.cjs → vue-data-ui-BbpJaKj_.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-DUMfvSbU.js → vue-ui-3d-bar-Bda7eCM_.js} +9 -9
- package/dist/{vue-ui-3d-bar-GTKfWFni.cjs → vue-ui-3d-bar-D7_7INdZ.cjs} +1 -1
- package/dist/{vue-ui-accordion-2_hSAOvX.js → vue-ui-accordion-CDTJiQu0.js} +3 -3
- package/dist/{vue-ui-accordion-BIBhKMbJ.cjs → vue-ui-accordion-ChxVn9CH.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DotN5JY1.cjs → vue-ui-age-pyramid-C-5yJnWs.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-C0UfrmeD.js → vue-ui-age-pyramid-C4FUVgL1.js} +11 -11
- package/dist/{vue-ui-annotator-C-9pwUrR.js → vue-ui-annotator-pYtolxGn.js} +1 -1
- package/dist/{vue-ui-annotator-C0V4kD4I.cjs → vue-ui-annotator-yLvZcOQb.cjs} +1 -1
- package/dist/{vue-ui-bullet-Ct39TnfH.cjs → vue-ui-bullet-BVmbUAYh.cjs} +1 -1
- package/dist/{vue-ui-bullet-6vftOeqJ.js → vue-ui-bullet-oEZK6DxU.js} +8 -8
- package/dist/{vue-ui-candlestick-Cxpk32bR.cjs → vue-ui-candlestick-CVM-Yvvm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-IxSh2gnY.js → vue-ui-candlestick-Cm0ipv0t.js} +12 -12
- package/dist/{vue-ui-carousel-table-BinpEAPd.cjs → vue-ui-carousel-table-BGPWwg3x.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DreHo_wE.js → vue-ui-carousel-table-PcE7YCyE.js} +4 -4
- package/dist/{vue-ui-chestnut-CpYTb1wd.cjs → vue-ui-chestnut-CeYVXtyW.cjs} +1 -1
- package/dist/{vue-ui-chestnut-3saDHpZ-.js → vue-ui-chestnut-Ob9Rt-3r.js} +8 -8
- package/dist/{vue-ui-circle-pack-BechgWzd.js → vue-ui-circle-pack-BF0PBuDU.js} +10 -10
- package/dist/{vue-ui-circle-pack-BfskRpSw.cjs → vue-ui-circle-pack-pbnF0Jb7.cjs} +1 -1
- package/dist/{vue-ui-cursor-CRMGfBFa.cjs → vue-ui-cursor-DE4hlTca.cjs} +1 -1
- package/dist/{vue-ui-cursor-BEuJm8Mb.js → vue-ui-cursor-Drnazkqg.js} +2 -2
- package/dist/{vue-ui-dashboard-TQto_FFI.cjs → vue-ui-dashboard-D3-z2poA.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DSrb1InR.js → vue-ui-dashboard-j5IuBHiv.js} +2 -2
- package/dist/{vue-ui-digits-BeoOy04C.js → vue-ui-digits-BRMuUzSA.js} +2 -2
- package/dist/{vue-ui-digits-BRPGEv7S.cjs → vue-ui-digits-CD5-WopZ.cjs} +1 -1
- package/dist/{vue-ui-donut-BWQ3vgjP.js → vue-ui-donut-CdVSree_.js} +229 -219
- package/dist/vue-ui-donut-Dq1F2vBg.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DOXHsGwg.cjs → vue-ui-donut-evolution-BQ7-rOnh.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DQIaWcso.js → vue-ui-donut-evolution-DzrJwccW.js} +11 -11
- package/dist/{vue-ui-dumbbell--mlgQyZ7.cjs → vue-ui-dumbbell-DSdwbWLI.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BAA0L5kU.js → vue-ui-dumbbell-DuCdZc41.js} +11 -11
- package/dist/{vue-ui-flow-CbIxR8qu.js → vue-ui-flow-CYpiRQ_u.js} +9 -9
- package/dist/{vue-ui-flow-zigj6Xbo.cjs → vue-ui-flow-D_UgsB9t.cjs} +1 -1
- package/dist/{vue-ui-funnel-C1CjZHuh.js → vue-ui-funnel-6q79enxr.js} +10 -10
- package/dist/{vue-ui-funnel-Cs-Kjiev.cjs → vue-ui-funnel-Dr4ssgIM.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CWI4H3RW.cjs → vue-ui-galaxy-BGxIGzn8.cjs} +1 -1
- package/dist/{vue-ui-galaxy-G9AFzo0J.js → vue-ui-galaxy-Bg-3xnWe.js} +11 -11
- package/dist/{vue-ui-gauge-hDpxwLu6.js → vue-ui-gauge-Cwhlraja.js} +8 -8
- package/dist/{vue-ui-gauge-CsyLGIqh.cjs → vue-ui-gauge-DGt25KK7.cjs} +1 -1
- package/dist/{vue-ui-gizmo-BIcmHlyo.cjs → vue-ui-gizmo-C0024J7B.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Bc-DWND7.js → vue-ui-gizmo-VRONxCxp.js} +3 -3
- package/dist/{vue-ui-heatmap-DZ9xsMHI.cjs → vue-ui-heatmap-CTwazjkR.cjs} +1 -1
- package/dist/{vue-ui-heatmap-8p4PejGU.js → vue-ui-heatmap-ay3NAawN.js} +10 -10
- package/dist/{vue-ui-history-plot-W2UVpzIY.js → vue-ui-history-plot-BQ_2NZVm.js} +12 -12
- package/dist/{vue-ui-history-plot-DiTEY9hR.cjs → vue-ui-history-plot-B_IHuJff.cjs} +1 -1
- package/dist/{vue-ui-kpi-DFFosWUi.js → vue-ui-kpi-BGSgE7Ck.js} +3 -3
- package/dist/{vue-ui-kpi-BXQ6gSky.cjs → vue-ui-kpi-BtHmGmj6.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C8hmEB9w.cjs → vue-ui-mini-loader-Bwe3_hqy.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C2uhjtCz.js → vue-ui-mini-loader-DyRqUv0j.js} +2 -2
- package/dist/{vue-ui-molecule-CXIE8hWW.cjs → vue-ui-molecule-Cy_P0hK2.cjs} +1 -1
- package/dist/{vue-ui-molecule-B1pxOA3p.js → vue-ui-molecule-gJVbPM60.js} +10 -10
- package/dist/{vue-ui-mood-radar-BuLuDh5y.cjs → vue-ui-mood-radar-BxFd74g3.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-B-bELxUM.js → vue-ui-mood-radar-DAYJLwXw.js} +11 -11
- package/dist/vue-ui-nested-donuts-DP_cQ0OI.cjs +17 -0
- package/dist/{vue-ui-nested-donuts-C4isJwag.js → vue-ui-nested-donuts-r67jsUHC.js} +221 -211
- package/dist/{vue-ui-onion-BNPFlq-G.js → vue-ui-onion-C-d1e3w2.js} +12 -12
- package/dist/{vue-ui-onion-nbqNRCyk.cjs → vue-ui-onion-CR4UoiPQ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-C9FIQC4s.cjs → vue-ui-parallel-coordinate-plot-DVltec37.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DFHwTxhN.js → vue-ui-parallel-coordinate-plot-FRhJ4mby.js} +13 -13
- package/dist/{vue-ui-quadrant-C4NULaSL.js → vue-ui-quadrant-BKWD8HER.js} +13 -13
- package/dist/{vue-ui-quadrant-CEyZ6gCX.cjs → vue-ui-quadrant-D-vSAn7m.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-B7PqLKWn.cjs → vue-ui-quick-chart-Bbcex3jc.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-m9kWUtKc.js → vue-ui-quick-chart-Cy3FCnd-.js} +10 -10
- package/dist/{vue-ui-radar-DHH8CDle.cjs → vue-ui-radar-BHCghGVU.cjs} +1 -1
- package/dist/{vue-ui-radar-CKb7rcO0.js → vue-ui-radar-BX_7Ngn_.js} +13 -13
- package/dist/{vue-ui-rating-BowDISAW.js → vue-ui-rating-CM6YiPW3.js} +2 -2
- package/dist/{vue-ui-rating-nYq9NVf8.cjs → vue-ui-rating-JhzvmHjC.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CXa8v5cY.cjs → vue-ui-relation-circle-BPhcc_fN.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CtaNRzML.js → vue-ui-relation-circle-JTWFex69.js} +8 -8
- package/dist/{vue-ui-rings-CRgcPBhj.cjs → vue-ui-rings-CzXIKikH.cjs} +1 -1
- package/dist/{vue-ui-rings-DaydpH_W.js → vue-ui-rings-NBAca-G8.js} +13 -13
- package/dist/{vue-ui-scatter-Bx16gq37.js → vue-ui-scatter-5SJ4F605.js} +13 -13
- package/dist/{vue-ui-scatter-CH8b47_g.cjs → vue-ui-scatter-DCunyG-E.cjs} +1 -1
- package/dist/{vue-ui-screenshot-j_ruTkOe.js → vue-ui-screenshot-DPm6Bpiq.js} +1 -1
- package/dist/{vue-ui-screenshot-BOqEw_Ty.cjs → vue-ui-screenshot-q3DSJ00h.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CVnkLuNk.js → vue-ui-skeleton-BhHXiz99.js} +3 -3
- package/dist/{vue-ui-skeleton-CX4m8kLi.cjs → vue-ui-skeleton-D7S6OsSN.cjs} +1 -1
- package/dist/{vue-ui-smiley-DOcs96EG.cjs → vue-ui-smiley-CQE1dvvV.cjs} +1 -1
- package/dist/{vue-ui-smiley-DGfBC_1p.js → vue-ui-smiley-Cb8d713r.js} +2 -2
- package/dist/{vue-ui-spark-trend-Cx5_BczW.cjs → vue-ui-spark-trend-7Bo9O1fQ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BjNjO7Al.js → vue-ui-spark-trend-BVNEGhp9.js} +5 -5
- package/dist/{vue-ui-sparkbar-Bj9M7Klo.js → vue-ui-sparkbar-BbOu_w63.js} +4 -4
- package/dist/{vue-ui-sparkbar-CzRw1-5c.cjs → vue-ui-sparkbar-qAaHy4or.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-mx5x8jhB.js → vue-ui-sparkgauge-BwNM15jl.js} +4 -4
- package/dist/{vue-ui-sparkgauge-iMqket_H.cjs → vue-ui-sparkgauge-ddRVuzSQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-w4t8R3kU.cjs → vue-ui-sparkhistogram-C8E73uuw.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-knnJtMmd.js → vue-ui-sparkhistogram-DhJ72P8O.js} +5 -5
- package/dist/{vue-ui-sparkline-BgGreU8G.cjs → vue-ui-sparkline-C6wkmXa0.cjs} +1 -1
- package/dist/{vue-ui-sparkline-C4xJULc3.js → vue-ui-sparkline-m3nNPKwo.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DKozbgvk.js → vue-ui-sparkstackbar-B71Vue4E.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-oCiVPgqg.cjs → vue-ui-sparkstackbar-CJyCwn7x.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Bomp_wIS.cjs → vue-ui-stackbar-6W0SjyLd.cjs} +1 -1
- package/dist/{vue-ui-stackbar-avxRfDtE.js → vue-ui-stackbar-CL7KXBrn.js} +14 -14
- package/dist/{vue-ui-strip-plot-7k2wQR85.cjs → vue-ui-strip-plot-D10qNzJu.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-CdLa8dCp.js → vue-ui-strip-plot-T99zioSX.js} +12 -12
- package/dist/{vue-ui-table-C0a-SgcX.js → vue-ui-table-CCrE_Qnd.js} +1 -1
- package/dist/{vue-ui-table-CE-PgrMl.cjs → vue-ui-table-Cva4CGRJ.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BoI6tise.js → vue-ui-table-heatmap-CQbPKFW_.js} +4 -4
- package/dist/{vue-ui-table-heatmap-ycSv15rY.cjs → vue-ui-table-heatmap-GOsIhgPo.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-idKvXcFK.cjs → vue-ui-table-sparkline-AIunqOTn.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Dxx6025N.js → vue-ui-table-sparkline-CHtZhhn6.js} +5 -5
- package/dist/{vue-ui-thermometer-Cx0BYvoa.js → vue-ui-thermometer-CCVPdXye.js} +7 -7
- package/dist/{vue-ui-thermometer-Bu1o-YxS.cjs → vue-ui-thermometer-CGAA0bAU.cjs} +1 -1
- package/dist/{vue-ui-timer-D_UKwqRG.cjs → vue-ui-timer-C3detaHT.cjs} +1 -1
- package/dist/{vue-ui-timer-DkGY_7Z9.js → vue-ui-timer-Djxb8XuU.js} +6 -6
- package/dist/{vue-ui-tiremarks-DTm_Xj8_.cjs → vue-ui-tiremarks-D-xQKhur.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CL8yqBs3.js → vue-ui-tiremarks-DExuaGwV.js} +7 -7
- package/dist/{vue-ui-treemap-rohF9UGD.cjs → vue-ui-treemap-BXWbdL3o.cjs} +1 -1
- package/dist/{vue-ui-treemap-WcZTaeP0.js → vue-ui-treemap-Dnn29Qdu.js} +13 -13
- package/dist/{vue-ui-vertical-bar-EJofGF6Z.cjs → vue-ui-vertical-bar-3V-J4-Qp.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-Czmk3lor.js → vue-ui-vertical-bar-B9-cwCz2.js} +13 -13
- package/dist/{vue-ui-waffle-Ci5lps_0.js → vue-ui-waffle-BH4NkBmK.js} +13 -13
- package/dist/{vue-ui-waffle-C7Lq9EWX.cjs → vue-ui-waffle-by6o3KnD.cjs} +1 -1
- package/dist/{vue-ui-wheel-DWSgTz2U.js → vue-ui-wheel-D2BqDvNB.js} +8 -8
- package/dist/{vue-ui-wheel-DSUUCTFP.cjs → vue-ui-wheel-DWNHihoO.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-IoOiZMCJ.js → vue-ui-word-cloud-Bpyn_t-K.js} +11 -11
- package/dist/{vue-ui-word-cloud-pp9BsZMx.cjs → vue-ui-word-cloud-DvXgJCIv.cjs} +1 -1
- package/dist/{vue-ui-xy-Bk09XvD1.js → vue-ui-xy-CuLfvdAU.js} +14 -14
- package/dist/{vue-ui-xy-canvas-BEWBX2Os.js → vue-ui-xy-canvas-BK3C3PqR.js} +13 -13
- package/dist/{vue-ui-xy-canvas-hUlid7hP.cjs → vue-ui-xy-canvas-bysKB96p.cjs} +1 -1
- package/dist/{vue-ui-xy-e1xFpXmD.cjs → vue-ui-xy-luOYkYWO.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-FtxQWcA1.cjs +0 -9
- package/dist/useResponsive-N8jl0-aC.cjs +0 -1
- package/dist/useResponsive-vZgZwV-S.js +0 -191
- package/dist/vue-ui-donut-Dam0YSMu.cjs +0 -1
- package/dist/vue-ui-nested-donuts-C4vK7cf-.cjs +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-FtxQWcA1.cjs"),Ce=require("./Title-CFmNnjPN.cjs"),ie=require("./usePrinter-BUMwWyWM.cjs"),we=require("./DataTable-B8Ui_Pd4.cjs"),Be=require("./Tooltip-UBWsyt1M.cjs"),$e=require("./vue-ui-skeleton-CX4m8kLi.cjs"),xe=require("./vue-ui-accordion-BIBhKMbJ.cjs"),ue=require("./useNestedProp-BIeXIQxH.cjs"),Pe=require("./PackageVersion-Da8iEjju.cjs"),Ee=require("./PenAndPaper-Dpjaroq-.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),Se=require("./useChartAccessibility-Cm7nkzTG.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le=["x","y","height","width","onClick","onMouseover"],Ve={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(s,{emit:N}){const L=s,B=N;function a(r){B("click",r)}function g(r){B("hover",r)}return e.toRef(L,"dataset").value.forEach(r=>{r.nodes&&r.nodes.length>0&&r.nodes.forEach(h=>{h.ancestor=r})}),(r,h)=>{const V=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(k,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:k.x,cy:k.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:s.hoveredUid&&s.hoveredUid===i.uid?s.strokeHovered:s.stroke,"stroke-width":s.hoveredUid&&s.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:$=>a(i),onMouseover:$=>g(i),onMouseleave:h[0]||(h[0]=$=>g(null))},null,40,Ne),r.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.x-i.circleRadius,y:k.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers($=>a(i),["stop"]),onMouseover:$=>g(i),onMouseleave:h[1]||(h[1]=$=>g(null))},[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Le)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(V,{key:0,dataset:i.nodes,color:s.color,stroke:s.stroke,strokeHovered:s.strokeHovered,hoveredUid:s.hoveredUid,onClick:a,onHover:g},{node:e.withCtx(({node:k})=>[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:k}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Re=["x1","y1","x2","y2","stroke","stroke-width"],Ae=["x1","y1","x2","y2","stroke","stroke-width"],Oe={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(s){const N=s;return e.toRef(N,"dataset").value.forEach(B=>{B.nodes&&B.nodes.length>0&&B.nodes.forEach(a=>{a.ancestor=B})}),(B,a)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.polygonPath.coordinates,(r,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.ancestor&&u.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:r.x,y1:r.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:s.backgroundColor,"stroke-width":u.circleRadius/1.5},null,8,Re),e.createElementVNode("line",{x1:r.x,y1:r.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:s.color,"stroke-width":u.circleRadius/2},null,8,Ae)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.nodes&&u.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:u.nodes,color:s.color,backgroundColor:s.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Ue=["x","y","fill","font-size"],De={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(s,{emit:N}){const L=s;return e.toRef(L,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(g=>{g.ancestor=a})}),(a,g)=>{const u=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.polygonPath&&r.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.polygonPath.coordinates,h=>(e.openBlock(),e.createElementBlock("text",{x:h.x,y:h.y+r.circleRadius*2,fill:s.color,"font-size":r.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(r.name),9,Ue))),256)),r.nodes&&r.nodes.length>0?(e.openBlock(),e.createBlock(u,{key:0,dataset:r.nodes,color:s.color,hoveredUid:s.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}};function ze(s,N={x:0,y:0,width:100,height:100},L=1,B){const a=e.ref({...N}),g=e.ref(1),u=e.ref(!1),r=e.ref({x:0,y:0});let h={x:0,y:0},V=null,i=null;function k(l){var E;const d=s.value;if(!d)return{x:0,y:0};const p=d.createSVGPoint();p.x=l.clientX,p.y=l.clientY;const b=(E=d.getScreenCTM())==null?void 0:E.inverse();return b?p.matrixTransform(b):{x:0,y:0}}function F(l){u.value=!0;const d=k(l.touches?l.touches[0]:l);r.value={x:d.x,y:d.y},h={x:0,y:0}}function $(l){if(!u.value)return;const d=k(l.touches?l.touches[0]:l);let p=d.x-r.value.x,b=d.y-r.value.y;Math.abs(p)<.3&&Math.abs(b)<.3||(h.x=p*.8+h.x*.2,h.y=b*.8+h.y*.2,r.value=d,V||(V=requestAnimationFrame(q)))}function q(){a.value.x-=h.x,a.value.y-=h.y,V=null}function S(){u.value=!1}function t(l){l.preventDefault();const d=l.deltaY>0?.9:1.1;A(d,k(l))}function R(l){l.preventDefault();const d=k(l),p=1.02*(1+L/100);G(p,d)}function G(l,d){i&&cancelAnimationFrame(i);let p=g.value,b=p*l,E=0;const y=()=>{E+=.02;let U=p+(b-p)*j(E);if(E>=1){g.value=b,i=null;return}A(U/p,d),i=requestAnimationFrame(y)};y()}const j=l=>l<.5?2*l*l:-1+(4-2*l)*l;function A(l,d){const p=g.value*l,b=p/g.value,E=a.value.width/b,y=a.value.height/b,U=(d.x-a.value.x)*(1-1/b),X=(d.y-a.value.y)*(1-1/b);a.value.x+=U,a.value.y+=X,a.value.width=E,a.value.height=y,g.value=p}e.onMounted(I),e.onUnmounted(O);function I(){const l=s.value;l&&(l.addEventListener("mousedown",F),l.addEventListener("mousemove",$),l.addEventListener("mouseup",S),l.addEventListener("mouseleave",S),l.addEventListener("wheel",t,{passive:!1}),l.addEventListener("dblclick",R),l.addEventListener("touchstart",d=>{d.preventDefault(),F(d)},{passive:!1}),l.addEventListener("touchmove",d=>{d.preventDefault(),$(d)},{passive:!1}),l.addEventListener("touchend",S))}function O(){const l=s.value;l&&(l.removeEventListener("mousedown",F),l.removeEventListener("mousemove",$),l.removeEventListener("mouseup",S),l.removeEventListener("mouseleave",S),l.removeEventListener("wheel",t),l.removeEventListener("dblclick",R),l.removeEventListener("touchstart",F),l.removeEventListener("touchmove",$),l.removeEventListener("touchend",S))}return e.watchEffect(()=>(B.value?I():O(),()=>{O()})),{viewBox:a}}const Ie=["id"],Me={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},_e={key:2,style:"width:100%;background:transparent;"},He=["xmlns","viewBox"],qe=["width","height"],Ge=["id"],je=["stop-color"],We=["stop-color"],Xe={key:5,class:"vue-data-ui-watermark"},Ye={key:7,ref:"source",dir:"auto"},Ze=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(s,{expose:N,emit:L}){const{vue_ui_molecule:B}=m.useConfig(),a=s,g=L,u=e.computed(()=>!!a.dataset&&a.dataset.length);e.onMounted(()=>{r()});function r(){m.objectIsEmpty(a.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const h=e.ref(m.createUid()),V=e.ref(null),i=e.ref(!1),k=e.ref(""),F=e.ref(null),$=e.ref(0),q=e.ref(0),S=e.ref(0),t=e.computed({get:()=>I(),set:o=>o}),{userOptionsVisible:R,setUserOptionsVisibility:G,keepUserOptionState:j}=Fe.useUserOptionState({config:t.value}),{svgRef:A}=Se.useChartAccessibility({config:t.value.style.chart.title});function I(){const o=ue.useNestedProp({userConfig:a.config,defaultConfig:B});return o.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[o.theme]||a.config,defaultConfig:o}),customPalette:m.themePalettes[o.theme]||m.palette}:o}e.watch(()=>a.config,o=>{t.value=I(),R.value=!t.value.userOptions.showOnChartHover,r(),q.value+=1,S.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:O,isImaging:l,generatePdf:d,generateImage:p}=ie.usePrinter({elementId:`cluster_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),b=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>m.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function U(o,c=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?U(o[0].nodes,c+1):c}function X(){const o=U(a.dataset);let c=100,n=c;for(let f=0;f<o;f+=1)c/=1,n+=c;return{height:n,width:n}}const w=e.ref(X());e.ref(`0 0 ${w.value.width} ${w.value.height}`);function K(o,c={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,f=24,v=0,C=0,x="#BBBBBB",Q=0){if(!Array.isArray(o)||o.length===0)return o;const be=m.createPolygonPath({plot:c,radius:n,sides:o.length,rotation:v});return o.forEach((P,re)=>{const ae=be.coordinates[re],se=P.color?(()=>{let J=m.convertColorToHex(P.color);return J.startsWith("#")?J:`#${J}`})():null;let z;se?z=se:Q===0?z=x:Q===1?(z=E.value[C]||m.palette[C]||x,C+=1):z=x,P.polygonPath={coordinates:[ae]},P.circleRadius=f,P.color=z,P.uid=m.createUid(),Array.isArray(P.nodes)&&P.nodes.length&&(P.nodes=K(P.nodes,ae,n/2.9,f/2.2,v+Math.PI*re/P.nodes.length,C,z,Q+1))}),o}function ce(o){const c=new Set;function n(v){v.forEach(C=>{if(!C.color)return;let x=C.color;/^#?[0-9A-F]{6}$/i.test(x)||(x=m.convertColorToHex(x)),x.startsWith("#")||(x=`#${x}`),c.add(x),Array.isArray(C.nodes)&&C.nodes.length&&n(C.nodes)})}n(o);const f={};return Array.from(c).forEach(v=>{const C=v.slice(1);f[v]=`gradient_${C}`}),f}const de=e.computed(()=>ce(T.value)),T=e.computed(()=>{const o=m.deepClone(a.dataset);return K(o)}),Y=e.ref(null);function ve(o){Y.value={datapoint:o,seriesIndex:-1,series:T.value,config:t.value};const c=t.value.style.chart.tooltip.customFormat;if(m.isFunction(c)&&m.functionReturnsString(()=>c({seriesIndex:-1,datapoint:o,series:T.value,config:t.value})))k.value=c({seriesIndex:-1,datapoint:o,series:T.value,config:t.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(n+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),k.value=`<div style="font-family:inherit">${n}</div>`}}const ee=e.ref(null),M=e.ref(null);function he(o){ee.value=o,o?(i.value=!0,ve(o),M.value=o.uid):(i.value=!1,k.value="",M.value=null)}function fe(o){const c=[];function n(f){f.forEach(v=>{const C={name:v.name,details:v.details||"-",ancestor:v.ancestor&&v.ancestor.name||"-",color:v.color||""};c.push(C),v.nodes&&v.nodes.length>0&&n(v.nodes,v.name)})}return n(o),c}const me=e.computed(()=>fe(T.value)),D=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],c=me.value.map((v,C)=>[{color:v.color,name:v.name},v.details,v.ancestor||""]),n={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},f=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:c,config:n,colNames:f}});function te(){e.nextTick(()=>{const o=D.value.body.map((f,v)=>[[f[0].name],[f[1]],[f[2]]]),c=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...D.value.head]]].concat(o),n=m.createCsvContent(c);m.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function pe(){return T.value}const _=e.ref(!1);function ge(o){_.value=o,$.value+=1}function oe(){y.value.showTable=!y.value.showTable}function le(){y.value.showDataLabels=!y.value.showDataLabels}function ne(){y.value.showTooltip=!y.value.showTooltip}const H=e.ref(!1);function Z(){H.value=!H.value}const ye=e.computed(()=>!H.value),{viewBox:W}=ze(A,{x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height},t.value.style.chart.zoom.speed,ye);function ke(o){g("selectNode",o)}return N({getData:pe,generatePdf:d,generateCsv:te,generateImage:p,toggleTable:oe,toggleLabels:le,toggleTooltip:ne,toggleAnnotator:Z}),(o,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:F,class:e.normalizeClass(`vue-ui-molecule ${_.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${h.value}`,onMouseleave:c[1]||(c[1]=n=>{ee.value=null,M.value=null,e.unref(G)(!1)}),onMouseenter:c[2]||(c[2]=()=>e.unref(G)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:Z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",Me,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",_e,[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&u.value&&(e.unref(j)||e.unref(R))?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:V,key:`user_options_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(l),uid:h.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(d),onGenerateCsv:te,onGenerateImage:e.unref(p),onToggleTable:oe,onToggleLabels:le,onToggleTooltip:ne,onToggleAnnotator:Z,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:f})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:f})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:f})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:f})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:f})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:f})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(m.XMLNS),viewBox:`${e.unref(W).x} ${e.unref(W).y} ${e.unref(W).width} ${e.unref(W).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,qe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(de.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,We)],8,Ge))),256))]),e.createVNode(Oe,{dataset:T.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ve,{dataset:T.value,hoveredUid:M.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:ke,onHover:he},{node:e.withCtx(({node:n})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:n})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),y.value.showDataLabels?(e.openBlock(),e.createBlock(De,{key:1,dataset:T.value,color:t.value.style.chart.color,hoveredUid:M.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,He)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(l)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:y.value.showTooltip&&i.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:F.value,content:k.value,isFullscreen:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),u.value?(e.openBlock(),e.createBlock(xe.default,{key:8,hideDetails:"",config:{open:y.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(we.DataTable,{key:`table_${S.value}`,colNames:D.value.colNames,head:D.value.head,body:D.value.body,config:D.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[0]||(c[0]=n=>y.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Je=Te._export_sfc(Qe,[["__scopeId","data-v-d296dc0b"]]);exports.default=Je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-DEbhC0cM.cjs"),Ce=require("./Title-BUnn57ZR.cjs"),ie=require("./usePrinter-DRmOwFc2.cjs"),we=require("./DataTable-D_Guh5Hf.cjs"),Be=require("./Tooltip-DJtOxx2P.cjs"),$e=require("./vue-ui-skeleton-D7S6OsSN.cjs"),xe=require("./vue-ui-accordion-ChxVn9CH.cjs"),ue=require("./useNestedProp-COYn8tA0.cjs"),Pe=require("./PackageVersion-D8T0gm3t.cjs"),Ee=require("./PenAndPaper-BJ6gGBM2.cjs"),Fe=require("./useUserOptionState-BgepsfED.cjs"),Se=require("./useChartAccessibility-Cm7nkzTG.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Le=["x","y","height","width","onClick","onMouseover"],Ve={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["click","hover"],setup(s,{emit:N}){const L=s,B=N;function a(r){B("click",r)}function g(r){B("hover",r)}return e.toRef(L,"dataset").value.forEach(r=>{r.nodes&&r.nodes.length>0&&r.nodes.forEach(h=>{h.ancestor=r})}),(r,h)=>{const V=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,(k,F)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("circle",{cx:k.x,cy:k.y,r:i.circleRadius,fill:`url(#gradient_${i.color})`,stroke:s.hoveredUid&&s.hoveredUid===i.uid?s.strokeHovered:s.stroke,"stroke-width":s.hoveredUid&&s.hoveredUid===i.uid?i.circleRadius/6:i.circleRadius/12,style:{cursor:"pointer"},onClick:$=>a(i),onMouseover:$=>g(i),onMouseleave:h[0]||(h[0]=$=>g(null))},null,40,Ne),r.$slots.node?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:k.x-i.circleRadius,y:k.y-i.circleRadius,height:i.circleRadius*2,width:i.circleRadius*2,style:{overflow:"visible"},onClick:e.withModifiers($=>a(i),["stop"]),onMouseover:$=>g(i),onMouseleave:h[1]||(h[1]=$=>g(null))},[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:i}))],40,Le)):e.createCommentVNode("",!0)],64))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(V,{key:0,dataset:i.nodes,color:s.color,stroke:s.stroke,strokeHovered:s.strokeHovered,hoveredUid:s.hoveredUid,onClick:a,onHover:g},{node:e.withCtx(({node:k})=>[e.renderSlot(r.$slots,"node",e.mergeProps({ref_for:!0},{node:k}))]),_:2},1032,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Re=["x1","y1","x2","y2","stroke","stroke-width"],Ae=["x1","y1","x2","y2","stroke","stroke-width"],Oe={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(s){const N=s;return e.toRef(N,"dataset").value.forEach(B=>{B.nodes&&B.nodes.length>0&&B.nodes.forEach(a=>{a.ancestor=B})}),(B,a)=>{const g=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.polygonPath.coordinates,(r,h)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.ancestor&&u.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:r.x,y1:r.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:s.backgroundColor,"stroke-width":u.circleRadius/1.5},null,8,Re),e.createElementVNode("line",{x1:r.x,y1:r.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:s.color,"stroke-width":u.circleRadius/2},null,8,Ae)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.nodes&&u.nodes.length>0?(e.openBlock(),e.createBlock(g,{key:0,dataset:u.nodes,color:s.color,backgroundColor:s.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Ue=["x","y","fill","font-size"],De={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(s,{emit:N}){const L=s;return e.toRef(L,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(g=>{g.ancestor=a})}),(a,g)=>{const u=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.dataset,r=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[r.polygonPath&&r.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.polygonPath.coordinates,h=>(e.openBlock(),e.createElementBlock("text",{x:h.x,y:h.y+r.circleRadius*2,fill:s.color,"font-size":r.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(r.name),9,Ue))),256)),r.nodes&&r.nodes.length>0?(e.openBlock(),e.createBlock(u,{key:0,dataset:r.nodes,color:s.color,hoveredUid:s.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}};function ze(s,N={x:0,y:0,width:100,height:100},L=1,B){const a=e.ref({...N}),g=e.ref(1),u=e.ref(!1),r=e.ref({x:0,y:0});let h={x:0,y:0},V=null,i=null;function k(l){var E;const d=s.value;if(!d)return{x:0,y:0};const p=d.createSVGPoint();p.x=l.clientX,p.y=l.clientY;const b=(E=d.getScreenCTM())==null?void 0:E.inverse();return b?p.matrixTransform(b):{x:0,y:0}}function F(l){u.value=!0;const d=k(l.touches?l.touches[0]:l);r.value={x:d.x,y:d.y},h={x:0,y:0}}function $(l){if(!u.value)return;const d=k(l.touches?l.touches[0]:l);let p=d.x-r.value.x,b=d.y-r.value.y;Math.abs(p)<.3&&Math.abs(b)<.3||(h.x=p*.8+h.x*.2,h.y=b*.8+h.y*.2,r.value=d,V||(V=requestAnimationFrame(q)))}function q(){a.value.x-=h.x,a.value.y-=h.y,V=null}function S(){u.value=!1}function t(l){l.preventDefault();const d=l.deltaY>0?.9:1.1;A(d,k(l))}function R(l){l.preventDefault();const d=k(l),p=1.02*(1+L/100);G(p,d)}function G(l,d){i&&cancelAnimationFrame(i);let p=g.value,b=p*l,E=0;const y=()=>{E+=.02;let U=p+(b-p)*j(E);if(E>=1){g.value=b,i=null;return}A(U/p,d),i=requestAnimationFrame(y)};y()}const j=l=>l<.5?2*l*l:-1+(4-2*l)*l;function A(l,d){const p=g.value*l,b=p/g.value,E=a.value.width/b,y=a.value.height/b,U=(d.x-a.value.x)*(1-1/b),X=(d.y-a.value.y)*(1-1/b);a.value.x+=U,a.value.y+=X,a.value.width=E,a.value.height=y,g.value=p}e.onMounted(I),e.onUnmounted(O);function I(){const l=s.value;l&&(l.addEventListener("mousedown",F),l.addEventListener("mousemove",$),l.addEventListener("mouseup",S),l.addEventListener("mouseleave",S),l.addEventListener("wheel",t,{passive:!1}),l.addEventListener("dblclick",R),l.addEventListener("touchstart",d=>{d.preventDefault(),F(d)},{passive:!1}),l.addEventListener("touchmove",d=>{d.preventDefault(),$(d)},{passive:!1}),l.addEventListener("touchend",S))}function O(){const l=s.value;l&&(l.removeEventListener("mousedown",F),l.removeEventListener("mousemove",$),l.removeEventListener("mouseup",S),l.removeEventListener("mouseleave",S),l.removeEventListener("wheel",t),l.removeEventListener("dblclick",R),l.removeEventListener("touchstart",F),l.removeEventListener("touchmove",$),l.removeEventListener("touchend",S))}return e.watchEffect(()=>(B.value?I():O(),()=>{O()})),{viewBox:a}}const Ie=["id"],Me={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},_e={key:2,style:"width:100%;background:transparent;"},He=["xmlns","viewBox"],qe=["width","height"],Ge=["id"],je=["stop-color"],We=["stop-color"],Xe={key:5,class:"vue-data-ui-watermark"},Ye={key:7,ref:"source",dir:"auto"},Ze=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectNode"],setup(s,{expose:N,emit:L}){const{vue_ui_molecule:B}=m.useConfig(),a=s,g=L,u=e.computed(()=>!!a.dataset&&a.dataset.length);e.onMounted(()=>{r()});function r(){m.objectIsEmpty(a.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const h=e.ref(m.createUid()),V=e.ref(null),i=e.ref(!1),k=e.ref(""),F=e.ref(null),$=e.ref(0),q=e.ref(0),S=e.ref(0),t=e.computed({get:()=>I(),set:o=>o}),{userOptionsVisible:R,setUserOptionsVisibility:G,keepUserOptionState:j}=Fe.useUserOptionState({config:t.value}),{svgRef:A}=Se.useChartAccessibility({config:t.value.style.chart.title});function I(){const o=ue.useNestedProp({userConfig:a.config,defaultConfig:B});return o.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[o.theme]||a.config,defaultConfig:o}),customPalette:m.themePalettes[o.theme]||m.palette}:o}e.watch(()=>a.config,o=>{t.value=I(),R.value=!t.value.userOptions.showOnChartHover,r(),q.value+=1,S.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:O,isImaging:l,generatePdf:d,generateImage:p}=ie.usePrinter({elementId:`cluster_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-molecule",options:t.value.userOptions.print}),b=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),E=e.computed(()=>m.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showDataLabels:!0,showTooltip:t.value.style.chart.tooltip.show});function U(o,c=0){return Array.isArray(o)&&o.length>0&&o[0].nodes?U(o[0].nodes,c+1):c}function X(){const o=U(a.dataset);let c=100,n=c;for(let f=0;f<o;f+=1)c/=1,n+=c;return{height:n,width:n}}const w=e.ref(X());e.ref(`0 0 ${w.value.width} ${w.value.height}`);function K(o,c={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,f=24,v=0,C=0,x="#BBBBBB",Q=0){if(!Array.isArray(o)||o.length===0)return o;const be=m.createPolygonPath({plot:c,radius:n,sides:o.length,rotation:v});return o.forEach((P,re)=>{const ae=be.coordinates[re],se=P.color?(()=>{let J=m.convertColorToHex(P.color);return J.startsWith("#")?J:`#${J}`})():null;let z;se?z=se:Q===0?z=x:Q===1?(z=E.value[C]||m.palette[C]||x,C+=1):z=x,P.polygonPath={coordinates:[ae]},P.circleRadius=f,P.color=z,P.uid=m.createUid(),Array.isArray(P.nodes)&&P.nodes.length&&(P.nodes=K(P.nodes,ae,n/2.9,f/2.2,v+Math.PI*re/P.nodes.length,C,z,Q+1))}),o}function ce(o){const c=new Set;function n(v){v.forEach(C=>{if(!C.color)return;let x=C.color;/^#?[0-9A-F]{6}$/i.test(x)||(x=m.convertColorToHex(x)),x.startsWith("#")||(x=`#${x}`),c.add(x),Array.isArray(C.nodes)&&C.nodes.length&&n(C.nodes)})}n(o);const f={};return Array.from(c).forEach(v=>{const C=v.slice(1);f[v]=`gradient_${C}`}),f}const de=e.computed(()=>ce(T.value)),T=e.computed(()=>{const o=m.deepClone(a.dataset);return K(o)}),Y=e.ref(null);function ve(o){Y.value={datapoint:o,seriesIndex:-1,series:T.value,config:t.value};const c=t.value.style.chart.tooltip.customFormat;if(m.isFunction(c)&&m.functionReturnsString(()=>c({seriesIndex:-1,datapoint:o,series:T.value,config:t.value})))k.value=c({seriesIndex:-1,datapoint:o,series:T.value,config:t.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${o.color}">⬤</div><div>${o.name}</div></div>`,o.details&&(n+=`<div style="width:100%;border-top:1px solid ${t.value.style.chart.tooltip.borderColor};margin-top: 2px">${o.details}</div>`),k.value=`<div style="font-family:inherit">${n}</div>`}}const ee=e.ref(null),M=e.ref(null);function he(o){ee.value=o,o?(i.value=!0,ve(o),M.value=o.uid):(i.value=!1,k.value="",M.value=null)}function fe(o){const c=[];function n(f){f.forEach(v=>{const C={name:v.name,details:v.details||"-",ancestor:v.ancestor&&v.ancestor.name||"-",color:v.color||""};c.push(C),v.nodes&&v.nodes.length>0&&n(v.nodes,v.name)})}return n(o),c}const me=e.computed(()=>fe(T.value)),D=e.computed(()=>{const o=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor],c=me.value.map((v,C)=>[{color:v.color,name:v.name},v.details,v.ancestor||""]),n={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},f=[t.value.table.translations.nodeName,t.value.table.translations.details,t.value.table.translations.ancestor];return{head:o,body:c,config:n,colNames:f}});function te(){e.nextTick(()=>{const o=D.value.body.map((f,v)=>[[f[0].name],[f[1]],[f[2]]]),c=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[...D.value.head]]].concat(o),n=m.createCsvContent(c);m.downloadCsv({csvContent:n,title:t.value.style.chart.title.text||"vue-ui-molecule"})})}function pe(){return T.value}const _=e.ref(!1);function ge(o){_.value=o,$.value+=1}function oe(){y.value.showTable=!y.value.showTable}function le(){y.value.showDataLabels=!y.value.showDataLabels}function ne(){y.value.showTooltip=!y.value.showTooltip}const H=e.ref(!1);function Z(){H.value=!H.value}const ye=e.computed(()=>!H.value),{viewBox:W}=ze(A,{x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height},t.value.style.chart.zoom.speed,ye);function ke(o){g("selectNode",o)}return N({getData:pe,generatePdf:d,generateCsv:te,generateImage:p,toggleTable:oe,toggleLabels:le,toggleTooltip:ne,toggleAnnotator:Z}),(o,c)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:F,class:e.normalizeClass(`vue-ui-molecule ${_.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`cluster_${h.value}`,onMouseleave:c[1]||(c[1]=n=>{ee.value=null,M.value=null,e.unref(G)(!1)}),onMouseenter:c[2]||(c[2]=()=>e.unref(G)(!0))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,svgRef:e.unref(A),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:Z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",Me,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",_e,[(e.openBlock(),e.createBlock(Ce._sfc_main,{key:`title_${q.value}`,config:{title:{cy:"molecule-div-title",...t.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&u.value&&(e.unref(j)||e.unref(R))?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:V,key:`user_options_${$.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(l),uid:h.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:F.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(d),onGenerateCsv:te,onGenerateImage:e.unref(p),onToggleTable:oe,onToggleLabels:le,onToggleTooltip:ne,onToggleAnnotator:Z,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:f})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:f})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:f})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:f})),void 0,!0)]),key:"7"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:f})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:f})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:A,xmlns:e.unref(m.XMLNS),viewBox:`${e.unref(W).x} ${e.unref(W).y} ${e.unref(W).width} ${e.unref(W).height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Pe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:w.value.width<=0?10:w.value.width,height:w.value.height<=0?10:w.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,qe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(de.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,We)],8,Ge))),256))]),e.createVNode(Oe,{dataset:T.value,color:t.value.style.chart.links.stroke,backgroundColor:t.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Ve,{dataset:T.value,hoveredUid:M.value,stroke:t.value.style.chart.nodes.stroke,strokeHovered:t.value.style.chart.nodes.strokeHovered,onClick:ke,onHover:he},{node:e.withCtx(({node:n})=>[e.renderSlot(o.$slots,"node",e.normalizeProps(e.guardReactiveProps({node:n})),void 0,!0)]),_:3},8,["dataset","hoveredUid","stroke","strokeHovered"]),y.value.showDataLabels?(e.openBlock(),e.createBlock(De,{key:1,dataset:T.value,color:t.value.style.chart.color,hoveredUid:M.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:w.value},void 0,!0)],14,He)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(l)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:6,config:{type:"molecule",style:{backgroundColor:t.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),o.$slots.source?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:y.value.showTooltip&&i.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:F.value,content:k.value,isFullscreen:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),u.value?(e.openBlock(),e.createBlock(xe.default,{key:8,hideDetails:"",config:{open:y.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(we.DataTable,{key:`table_${S.value}`,colNames:D.value.colNames,head:D.value.head,body:D.value.body,config:D.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:c[0]||(c[0]=n=>y.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ze)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Je=Te._export_sfc(Qe,[["__scopeId","data-v-d296dc0b"]]);exports.default=Je;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { toRef as he, resolveComponent as fe, createElementBlock as d, openBlock as s, Fragment as k, renderList as M, createCommentVNode as m, createBlock as R, createElementVNode as W, withModifiers as Ge, renderSlot as w, mergeProps as xe, withCtx as P, toDisplayString as Se, ref as p, onMounted as Ae, onUnmounted as Ve, watchEffect as We, computed as _, watch as Xe, unref as b, normalizeStyle as ve, normalizeClass as Pe, createVNode as ae, createSlots as je, normalizeProps as G, guardReactiveProps as V, createTextVNode as Ye, nextTick as Ze } from "vue";
|
|
2
|
-
import { u as qe, o as Qe, e as Je, c as Te, t as Ke, p as Fe, a as et, b as tt, P as ot, X as lt, l as st, Q as nt, d as Le, q as at, r as rt, x as it, y as ut } from "./index-
|
|
3
|
-
import { _ as ct } from "./Title-
|
|
4
|
-
import { u as dt, U as vt } from "./usePrinter-
|
|
5
|
-
import { D as ht } from "./DataTable-
|
|
6
|
-
import { _ as ft } from "./Tooltip-
|
|
7
|
-
import yt from "./vue-ui-skeleton-
|
|
8
|
-
import pt from "./vue-ui-accordion-
|
|
9
|
-
import { u as Ee } from "./useNestedProp-
|
|
10
|
-
import { _ as mt } from "./PackageVersion-
|
|
11
|
-
import { P as gt } from "./PenAndPaper-
|
|
2
|
+
import { u as qe, o as Qe, e as Je, c as Te, t as Ke, p as Fe, a as et, b as tt, P as ot, X as lt, l as st, Q as nt, d as Le, q as at, r as rt, x as it, y as ut } from "./index-KdQpiTkm.js";
|
|
3
|
+
import { _ as ct } from "./Title-DMhhB9yN.js";
|
|
4
|
+
import { u as dt, U as vt } from "./usePrinter-BuiF8wZK.js";
|
|
5
|
+
import { D as ht } from "./DataTable-751-cN2c.js";
|
|
6
|
+
import { _ as ft } from "./Tooltip-BaPecnnV.js";
|
|
7
|
+
import yt from "./vue-ui-skeleton-BhHXiz99.js";
|
|
8
|
+
import pt from "./vue-ui-accordion-CDTJiQu0.js";
|
|
9
|
+
import { u as Ee } from "./useNestedProp-CO8Pe266.js";
|
|
10
|
+
import { _ as mt } from "./PackageVersion-SrpgZayt.js";
|
|
11
|
+
import { P as gt } from "./PenAndPaper-jnD991LP.js";
|
|
12
12
|
import { u as bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { u as kt } from "./useChartAccessibility-BWojgys7.js";
|
|
14
14
|
import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FtxQWcA1.cjs"),oe=require("./Title-CFmNnjPN.cjs"),q=require("./usePrinter-BUMwWyWM.cjs"),le=require("./Legend-BFB4DMQS.cjs"),g=require("./BaseIcon-BpdQLb-0.cjs"),ae=require("./DataTable-B8Ui_Pd4.cjs"),re=require("./vue-ui-skeleton-CX4m8kLi.cjs"),ne=require("./vue-ui-accordion-BIBhKMbJ.cjs"),z=require("./useNestedProp-BIeXIQxH.cjs"),se=require("./PackageVersion-Da8iEjju.cjs"),ue=require("./PenAndPaper-Dpjaroq-.cjs"),ie=require("./useUserOptionState-BgepsfED.cjs"),ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ye={key:2,style:"width:100%;background:transparent"},me=["xmlns","viewBox"],he=["width","height"],fe=["id"],pe=["stop-color"],ke=["stop-color"],ge=["x1","y1","x2","y2","stroke","stroke-width"],be=["d","stroke","stroke-width"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Pe=["stroke"],Be=["fill"],$e=["stroke"],Me=["fill"],Ee=["d","stroke","stroke-width","fill"],Oe=["x1","y1","stroke"],Se=["cx","cy","fill","stroke"],Ae=["fill","stroke"],Te=["y","fill","font-weight"],Le=["y","fill"],Ie={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],qe={style:{"font-weight":"bold"}},ze={key:8,ref:"source",dir:"auto"},De=["innerHTML"],Re={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(D,{expose:R}){const{vue_ui_mood_radar:j}=r.useConfig(),u=D,m=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),_=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),P=e.ref(0),t=e.computed({get:()=>E(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:B,keepUserOptionState:$}=ie.useUserOptionState({config:t.value}),{svgRef:M}=ce.useChartAccessibility({config:t.value.style.chart.title});function E(){const l=z.useNestedProp({userConfig:u.config,defaultConfig:j});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=E(),N.value=!t.value.userOptions.showOnChartHover,V(),G.value+=1,H.value+=1,P.value+=1,f.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:O,isImaging:S,generatePdf:A,generateImage:T}=q.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar",options:t.value.userOptions.print}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),f=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function K({centerX:l,centerY:a,apexX:o,apexY:s,proportion:d,key:k,value:te}){return{x:l+(o-l)*d,y:a+(s-a)*d,key:k,value:te}}const Y=e.computed(()=>Math.max(...Object.values(u.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(u.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(u.dataset).map((l,a)=>{const o=typeof u.dataset[l]!="number"||isNaN(u.dataset[l])?0:u.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),L=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(u.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=K({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/Y.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),J=e.computed(()=>({cy:"mood-radar-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":""}));function Q(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=v.value.head.map((s,d)=>[[s.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.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-mood-radar"})})}const b=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>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.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},s=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:s}});function Z(){return c.value}function F(){f.value.showTable=!f.value.showTable}const p=e.ref(!1);function ee(l){p.value=l}const C=e.ref(!1);function x(){C.value=!C.value}return R({getData:Z,generatePdf:A,generateCsv:I,generateImage:T,toggleTable:F,toggleAnnotator:x}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${p.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:_,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(B)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(B)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,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",ye,[e.createVNode(oe._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(N))?(e.openBlock(),e.createBlock(q.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(S),uid:h.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:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(A),onGenerateCsv:I,onGenerateImage:e.unref(T),onToggleTable:F,onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref($)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:s})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:s})),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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:s})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:M,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,he)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ke)],8,fe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ge))),256)),e.createElementVNode("path",{d:w.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,$e),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Me),e.createElementVNode("path",{d:e.unref(r.makePath)(L.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ee),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value.map(o=>o.plots),(o,s)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Oe),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Se),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ae),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),9,Te),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Le)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(S)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{legendSet:c.value,config:J.value,key:`legend_${P.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:()=>Q(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(g.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(g.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(g.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(g.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",qe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ne.default,{key:9,hideDetails:"",config:{open:f.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(ae.DataTable,{colNames:b.value.colNames,head:b.value.head,body:b.value.body,config:b.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[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,De)]),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,ve))}},je=de._export_sfc(Re,[["__scopeId","data-v-219c3ecd"]]);exports.default=je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DEbhC0cM.cjs"),oe=require("./Title-BUnn57ZR.cjs"),q=require("./usePrinter-DRmOwFc2.cjs"),le=require("./Legend-CepYsC9r.cjs"),g=require("./BaseIcon-DoqpR480.cjs"),ae=require("./DataTable-D_Guh5Hf.cjs"),re=require("./vue-ui-skeleton-D7S6OsSN.cjs"),ne=require("./vue-ui-accordion-ChxVn9CH.cjs"),z=require("./useNestedProp-COYn8tA0.cjs"),se=require("./PackageVersion-D8T0gm3t.cjs"),ue=require("./PenAndPaper-BJ6gGBM2.cjs"),ie=require("./useUserOptionState-BgepsfED.cjs"),ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],ye={key:2,style:"width:100%;background:transparent"},me=["xmlns","viewBox"],he=["width","height"],fe=["id"],pe=["stop-color"],ke=["stop-color"],ge=["x1","y1","x2","y2","stroke","stroke-width"],be=["d","stroke","stroke-width"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Pe=["stroke"],Be=["fill"],$e=["stroke"],Me=["fill"],Ee=["d","stroke","stroke-width","fill"],Oe=["x1","y1","stroke"],Se=["cx","cy","fill","stroke"],Ae=["fill","stroke"],Te=["y","fill","font-weight"],Le=["y","fill"],Ie={key:5,class:"vue-data-ui-watermark"},Fe=["onClick"],qe={style:{"font-weight":"bold"}},ze={key:8,ref:"source",dir:"auto"},De=["innerHTML"],Re={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(D,{expose:R}){const{vue_ui_mood_radar:j}=r.useConfig(),u=D,m=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length);e.onMounted(()=>{V()});function V(){r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),_=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),P=e.ref(0),t=e.computed({get:()=>E(),set:l=>l}),{userOptionsVisible:N,setUserOptionsVisibility:B,keepUserOptionState:$}=ie.useUserOptionState({config:t.value}),{svgRef:M}=ce.useChartAccessibility({config:t.value.style.chart.title});function E(){const l=z.useNestedProp({userConfig:u.config,defaultConfig:j});return l.theme?{...z.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=E(),N.value=!t.value.userOptions.showOnChartHover,V(),G.value+=1,H.value+=1,P.value+=1,f.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:O,isImaging:S,generatePdf:A,generateImage:T}=q.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar",options:t.value.userOptions.print}),X=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),f=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function K({centerX:l,centerY:a,apexX:o,apexY:s,proportion:d,key:k,value:te}){return{x:l+(o-l)*d,y:a+(s-a)*d,key:k,value:te}}const Y=e.computed(()=>Math.max(...Object.values(u.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(u.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=e.computed(()=>Object.keys(u.dataset).map((l,a)=>{const o=typeof u.dataset[l]!="number"||isNaN(u.dataset[l])?0:u.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),L=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(u.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=K({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/Y.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),J=e.computed(()=>({cy:"mood-radar-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":""}));function Q(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function I(){e.nextTick(()=>{const l=v.value.head.map((s,d)=>[[s.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.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-mood-radar"})})}const b=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>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,k)=>[{color:d.color,name:d.name},v.value.body[k].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[k]/y.value)?"-":(v.value.body[k]/y.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},s=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:s}});function Z(){return c.value}function F(){f.value.showTable=!f.value.showTable}const p=e.ref(!1);function ee(l){p.value=l}const C=e.ref(!1);function x(){C.value=!C.value}return R({getData:Z,generatePdf:A,generateCsv:I,generateImage:T,toggleTable:F,toggleAnnotator:x}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${p.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:_,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(B)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(B)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ue.PenAndPaper,{key:0,svgRef:e.unref(M),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),X.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,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",ye,[e.createVNode(oe._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(N))?(e.openBlock(),e.createBlock(q.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(O),isImaging:e.unref(S),uid:h.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:p.value,titles:{...t.value.userOptions.buttonTitles},chartElement:_.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(A),onGenerateCsv:I,onGenerateImage:e.unref(T),onToggleTable:F,onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref($)?e.unref(N)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:s})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:s})),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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:s})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:s})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:M,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":p.value,"vue-data-ui-fulscreen--off":!p.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(se._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,he)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,pe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,ke)],8,fe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ge))),256)),e.createElementVNode("path",{d:w.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[5],"stroke-width":"1","stroke-linecap":"round",d:"M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22"},null,8,Ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,Ne),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[4],"stroke-width":"1","stroke-linecap":"round",d:"M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[3],"stroke-width":"1","stroke-linecap":"round",d:"M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215"},null,8,Ve),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,_e),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,Pe),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Be),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,$e),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Me),e.createElementVNode("path",{d:e.unref(r.makePath)(L.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${h.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Ee),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value.map(o=>o.plots),(o,s)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,Oe),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Se),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ae),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),9,Te),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Le)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,me)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(S)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(le.Legend,{legendSet:c.value,config:J.value,key:`legend_${P.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:s})=>[e.createElementVNode("div",{onClick:()=>Q(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(g.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(g.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(g.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(g.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(g.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",qe,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:s})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Fe)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(ne.default,{key:9,hideDetails:"",config:{open:f.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(ae.DataTable,{colNames:b.value.colNames,head:b.value.head,body:b.value.body,config:b.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[10]||(a[10]=o=>f.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,De)]),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,ve))}},je=de._export_sfc(Re,[["__scopeId","data-v-219c3ecd"]]);exports.default=je;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as c, onMounted as we, ref as y, watch as xe, createElementBlock as h, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as ee, createBlock as p, createCommentVNode as u, renderSlot as v, createVNode as U, createSlots as _e, withCtx as f, normalizeProps as I, guardReactiveProps as F, createElementVNode as s, Fragment as te, renderList as oe, toDisplayString as N, createTextVNode as le, nextTick as $e } from "vue";
|
|
2
|
-
import { u as Me, o as Pe, e as ae, c as Ne, a as Ae, Q as Oe, X as Te, s as C, w as Le, R as Ie, i as se, f as S, q as Fe, r as Se } from "./index-
|
|
3
|
-
import { _ as Ve } from "./Title-
|
|
4
|
-
import { u as je, U as Re } from "./usePrinter-
|
|
5
|
-
import { L as Ue } from "./Legend-
|
|
6
|
-
import A from "./BaseIcon-
|
|
7
|
-
import { D as Be } from "./DataTable-
|
|
8
|
-
import De from "./vue-ui-skeleton-
|
|
9
|
-
import We from "./vue-ui-accordion-
|
|
10
|
-
import { u as re } from "./useNestedProp-
|
|
11
|
-
import { _ as ze } from "./PackageVersion-
|
|
12
|
-
import { P as Ee } from "./PenAndPaper-
|
|
2
|
+
import { u as Me, o as Pe, e as ae, c as Ne, a as Ae, Q as Oe, X as Te, s as C, w as Le, R as Ie, i as se, f as S, q as Fe, r as Se } from "./index-KdQpiTkm.js";
|
|
3
|
+
import { _ as Ve } from "./Title-DMhhB9yN.js";
|
|
4
|
+
import { u as je, U as Re } from "./usePrinter-BuiF8wZK.js";
|
|
5
|
+
import { L as Ue } from "./Legend-BG9fLat9.js";
|
|
6
|
+
import A from "./BaseIcon-CEgQPz8O.js";
|
|
7
|
+
import { D as Be } from "./DataTable-751-cN2c.js";
|
|
8
|
+
import De from "./vue-ui-skeleton-BhHXiz99.js";
|
|
9
|
+
import We from "./vue-ui-accordion-CDTJiQu0.js";
|
|
10
|
+
import { u as re } from "./useNestedProp-CO8Pe266.js";
|
|
11
|
+
import { _ as ze } from "./PackageVersion-SrpgZayt.js";
|
|
12
|
+
import { P as Ee } from "./PenAndPaper-jnD991LP.js";
|
|
13
13
|
import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { u as He } from "./useChartAccessibility-BWojgys7.js";
|
|
15
15
|
import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DEbhC0cM.cjs"),me=require("./useResponsive-DQmBAoBf.cjs"),Te=require("./Title-BUnn57ZR.cjs"),be=require("./usePrinter-DRmOwFc2.cjs"),Oe=require("./DataTable-D_Guh5Hf.cjs"),Pe=require("./Tooltip-DJtOxx2P.cjs"),ze=require("./Legend-CepYsC9r.cjs"),De=require("./vue-ui-skeleton-D7S6OsSN.cjs"),Ae=require("./vue-ui-accordion-ChxVn9CH.cjs"),ge=require("./useNestedProp-COYn8tA0.cjs"),Ie=require("./PackageVersion-D8T0gm3t.cjs"),Me=require("./PenAndPaper-BJ6gGBM2.cjs"),Re=require("./useUserOptionState-BgepsfED.cjs"),Ue=require("./useChartAccessibility-Cm7nkzTG.cjs"),qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ye=["id"],Xe=["xmlns","viewBox"],Ge=["width","height"],He=["id"],We=["offset","stop-color"],Je=["offset","stop-opacity"],Ke=["id"],Qe=["id"],Ze=["id"],je=["flood-color"],et=["d","fill","stroke","stroke-width","filter"],tt={key:1},lt=["d","fill"],at={key:2},ot=["x","y","font-size","font-weight","fill"],nt={key:3},rt=["filter"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["text-anchor","x","y","fill","font-size","font-weight"],ct=["d","fill","onMouseenter","onClick"],dt={key:5,class:"vue-data-ui-watermark"},vt={key:0,class:"vue-ui-nested-donuts-legend-title"},ft=["onClick"],pt=["innerHTML"],ht={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ke,{expose:Ce,emit:we}){const{vue_ui_nested_donuts:Le}=s.useConfig(),k=ke,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(s.createUid()),F=e.ref(!1),T=e.ref(""),Be=e.ref(null),U=e.ref(0),B=e.ref(null),q=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),L=e.ref(!1);function xe(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Re.useUserOptionState({config:t.value}),{svgRef:Q}=Ue.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=ge.useNestedProp({userConfig:k.config,defaultConfig:Le});return l.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,ee(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const j=e.computed(()=>{const{top:l,right:r,bottom:o,left:n}=t.value.style.chart.padding;return{css:`padding:${l}px ${r}px ${o}px ${n}px`,top:l,right:r,bottom:o,left:n}}),$=e.ref(null);e.onMounted(()=>{ee()});function ee(){if(s.objectIsEmpty(k.dataset)&&s.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=me.throttle(()=>{const{width:r,height:o}=me.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value,padding:j.value});requestAnimationFrame(()=>{c.value.width=r,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:te,isImaging:le,generatePdf:ae,generateImage:oe}=be.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),$e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Ne=e.computed(()=>s.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}),c=e.ref({height:512,width:512}),ne=we;function Se({datapoint:l,index:r}){ne("selectDatapoint",{datapoint:l,index:r})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:r}),[null,void 0].includes(l.series)?s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:r}):l.series.length===0?s.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${r}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&s.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,r)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>s.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:r,id:`${h.value}_${r}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${r}`,id:`${h.value}_${r}_${n}`,seriesIndex:n,datasetIndex:r,color:s.convertColorToHex(o.color)||Ne.value[n]||s.palette[n]||s.palette[n%s.palette.length],value:s.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),re=e.computed(()=>[...m.value].map((l,r)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function _e(l,r,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<r}const d=e.ref(re.value);e.watch(()=>re.value,l=>d.value=l);const se=e.ref(null),ue=e.ref(null);function z(l){ne("selectLegend",l);const r=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===r.arcOfId).series.map(i=>i.id),p=_e(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>r.value?(cancelAnimationFrame(se.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:r.value}:g)}))):(a+=r.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),se.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(ue.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),ue.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ie=e.computed(()=>d.value.map((l,r)=>b.value-r*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,r)=>{const o=r*b.value/m.value.length;return{...l,radius:b.value-o,donut:s.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ce=e.computed(()=>[...m.value].map((l,r)=>{const o=r*b.value/m.value.length;return{sizeRatio:o,donut:s.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),de=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Ve({datapoint:l,_relativeIndex:r,seriesIndex:o}){de.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(s.isFunction(n)&&s.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
|
|
2
|
+
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
|
+
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
|
+
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
5
|
+
<circle cx="10" cy="10" r="10" fill="${p.color}"/>
|
|
6
|
+
</svg>
|
|
7
|
+
<span>
|
|
8
|
+
${p.arcOf??""} - ${p.name}
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
<span>
|
|
12
|
+
${t.value.style.chart.tooltip.showValue?`<b>${s.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,s.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})}
|
|
13
|
+
</b>`:""}
|
|
14
|
+
${t.value.style.chart.tooltip.showPercentage?`(${s.dataLabel({v:p.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
|
|
15
|
+
</span>
|
|
16
|
+
</div>
|
|
17
|
+
`})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<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&&(a+=`<b>${s.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,s.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?a+=`<span>(${s.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${s.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function ve(l,r){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===r?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,r)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:r,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),Ee=e.computed(()=>({cy:"nested-donuts-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":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),r=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:r}});function fe(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=s.createCsvContent(r);s.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],r=C.value.head.map((a,u)=>{const p=s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":s.dataLabel({v:C.value.body[u]/a.total*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:r,config:o}});function Fe(){return m.value}function pe(){v.value.showTable=!v.value.showTable}function he(){v.value.dataLabels.show=!v.value.dataLabels.show}function ye(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function R(){E.value=!E.value}return Ce({getData:Fe,generatePdf:ae,generateCsv:fe,generateImage:oe,toggleTable:pe,toggleLabels:he,toggleTooltip:ye,toggleAnnotator:R}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:B,class:e.normalizeClass(`vue-ui-nested-donuts ${L.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;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:r[3]||(r[3]=()=>e.unref(J)(!0)),onMouseleave:r[4]||(r[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Me.PenAndPaper,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,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:q},[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(be.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(le),uid:h.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:xe,onGeneratePdf:e.unref(ae),onGenerateCsv:fe,onGenerateImage:e.unref(oe),onToggleTable:pe,onToggleLabels:he,onToggleTooltip:ye,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}: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:"7"}: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:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Q,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color};${j.value.css}`)},[e.createVNode(Ie._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[r[5]||(r[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/ie.value[n])*100}%`,"stop-color":e.unref(s.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,We),e.createElementVNode("stop",{offset:`${(1-D.value/ie.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,Je),r[6]||(r[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,He))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Qe),r[7]||(r[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,Ke),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,je)],8,Ze)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(s.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:ve(a,u)},null,8,et)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ce.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,lt)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",at,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(s.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,ot)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:ve(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,st)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,ut)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(s.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(s.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(s.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,it)):e.createCommentVNode("",!0)],8,rt))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.arcSlice,fill:Be.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>Ve({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>Se({datapoint:a,index:u}),onMouseleave:r[0]||(r[0]=p=>{F.value=!1,de.value=null,S.value=null,_.value=null})},null,40,ct)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(le)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Pe._sfc_main,{show:v.value.showTooltip&&F.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:B.value,content:T.value,isFullscreen:L.value,isCustom:e.unref(s.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(ze.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:Ee.value,onClickMarker:r[1]||(r[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(s.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,ft)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae.default,{key:10,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.openBlock(),e.createBlock(Oe.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,pt)]),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,Ye))}},yt=qe._export_sfc(ht,[["__scopeId","data-v-23284122"]]);exports.default=yt;
|