vue-data-ui 2.6.44 → 2.6.45
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-DGay3Mq4.cjs → Arrow-Bfwl8OAb.cjs} +1 -1
- package/dist/{Arrow-BIsMVdtn.js → Arrow-km8WlE5f.js} +1 -1
- package/dist/{BaseIcon-CNr0ynIA.cjs → BaseIcon-BjlTm9wZ.cjs} +1 -1
- package/dist/{BaseIcon-BkG8oy7S.js → BaseIcon-DywZoZmD.js} +1 -1
- package/dist/{ColorPicker-Dk1k_q80.cjs → ColorPicker-COPqu9IV.cjs} +1 -1
- package/dist/{ColorPicker-BolaeJP4.js → ColorPicker-gkZLlxzP.js} +3 -3
- package/dist/{DataTable-CMtUsL3k.js → DataTable-CrhPpuOy.js} +2 -2
- package/dist/{DataTable-ChXRV1c1.cjs → DataTable-ImmHVJ0i.cjs} +1 -1
- package/dist/{Legend-CNvH8CO_.js → Legend-BVtJaKHS.js} +2 -2
- package/dist/{Legend-DpeobB-J.cjs → Legend-CfimXfYH.cjs} +1 -1
- package/dist/{PackageVersion-DpTw0H2K.js → PackageVersion-DJu8NH8u.js} +3 -3
- package/dist/PackageVersion-DjHCw2D_.cjs +1 -0
- package/dist/{PenAndPaper-B3u1FDG_.cjs → PenAndPaper-AZpGBe7x.cjs} +1 -1
- package/dist/{PenAndPaper-CdyjU7Bn.js → PenAndPaper-DC3X33rh.js} +3 -3
- package/dist/{Shape--0X0ca4a.js → Shape-Bs4vWaC-.js} +1 -1
- package/dist/{Shape-gapU-fux.cjs → Shape-Dl6kIG9D.cjs} +1 -1
- package/dist/{Slicer-CZQhXgqN.js → Slicer-CgnhZJgM.js} +2 -2
- package/dist/{Slicer-hryDvXmh.cjs → Slicer-OBTv9I2-.cjs} +1 -1
- package/dist/{Title-CUTRN3ig.js → Title-6BRNasyb.js} +1 -1
- package/dist/{Title-DRo5NxnS.cjs → Title-DBgUbEU1.cjs} +1 -1
- package/dist/{Tooltip-BvEZcxbc.js → Tooltip-BUPxcljs.js} +1 -1
- package/dist/{Tooltip-Cbjcw6Jz.cjs → Tooltip-TGHDsCSU.cjs} +1 -1
- package/dist/{index-hcakVXU6.cjs → index-BXhJaCcU.cjs} +1 -1
- package/dist/{index-DQCJDAtd.js → index-jVWdGfFl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-WD6Qn-jr.js → useNestedProp-BN5jbfiQ.js} +1 -1
- package/dist/{useNestedProp-DCfCPrTU.cjs → useNestedProp-DhyCNtMY.cjs} +1 -1
- package/dist/{usePrinter-FM1PheWO.js → usePrinter-BI95cSFJ.js} +1 -1
- package/dist/{usePrinter-Dv0RMCX1.cjs → usePrinter-DRWBcwQ7.cjs} +1 -1
- package/dist/{vue-data-ui-CDVMMv3d.cjs → vue-data-ui-B0eO9goE.cjs} +1 -1
- package/dist/{vue-data-ui-Byi8FBJM.js → vue-data-ui-DFmsvz9E.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CZJ6Zo23.js → vue-ui-3d-bar-BcdL4c9H.js} +9 -9
- package/dist/{vue-ui-3d-bar-DJUNcjtc.cjs → vue-ui-3d-bar-CwXgNWXb.cjs} +1 -1
- package/dist/{vue-ui-accordion-BckkmphN.js → vue-ui-accordion-DOBMerZl.js} +3 -3
- package/dist/{vue-ui-accordion-BfFg-sVJ.cjs → vue-ui-accordion-DdHwnq9o.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DgGMb_Xp.js → vue-ui-age-pyramid-Dtaikxqn.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DunUSOpu.cjs → vue-ui-age-pyramid-i52Ub253.cjs} +1 -1
- package/dist/{vue-ui-annotator-B_MQz1AA.js → vue-ui-annotator-BrjeA9CQ.js} +1 -1
- package/dist/{vue-ui-annotator-B3G-FQLy.cjs → vue-ui-annotator-CKUZCHHC.cjs} +1 -1
- package/dist/{vue-ui-bullet-DYpgP9uL.js → vue-ui-bullet-C1xxCzws.js} +8 -8
- package/dist/{vue-ui-bullet-8Kk3qeH_.cjs → vue-ui-bullet-DxUauLaF.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DnY1Z5sA.js → vue-ui-candlestick-CPF7rQqu.js} +11 -11
- package/dist/{vue-ui-candlestick-BSB_x1u_.cjs → vue-ui-candlestick-t1BaVylo.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DNnBKojP.cjs → vue-ui-carousel-table-BqPfItK8.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Cd_2r90R.js → vue-ui-carousel-table-x8RLpKZv.js} +4 -4
- package/dist/{vue-ui-chestnut-WcoV2zl6.cjs → vue-ui-chestnut-BiX9TQ2v.cjs} +1 -1
- package/dist/{vue-ui-chestnut-B1NWviH6.js → vue-ui-chestnut-SdFREl6l.js} +8 -8
- package/dist/{vue-ui-circle-pack-D32Zo62g.cjs → vue-ui-circle-pack-B28TVLHQ.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-CxxPZDLO.js → vue-ui-circle-pack-DVkRm1KL.js} +9 -9
- package/dist/{vue-ui-cursor-BNdKosWF.cjs → vue-ui-cursor-BkQNdavl.cjs} +1 -1
- package/dist/{vue-ui-cursor-Df3A3tId.js → vue-ui-cursor-CY5VZS8t.js} +2 -2
- package/dist/{vue-ui-dashboard-SRIs3xRd.cjs → vue-ui-dashboard-BCcNNuM_.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BD3v2yB2.js → vue-ui-dashboard-DQ8lax7M.js} +2 -2
- package/dist/{vue-ui-digits-6ixh72pY.js → vue-ui-digits-BkXEbzlS.js} +2 -2
- package/dist/{vue-ui-digits-DiwdDWIi.cjs → vue-ui-digits-D-F0Chxn.cjs} +1 -1
- package/dist/{vue-ui-donut-O_bMKpp0.cjs → vue-ui-donut-Dxie1WUb.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-COqxvgDm.cjs → vue-ui-donut-evolution-C8ZQum6h.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DFeCoFLD.js → vue-ui-donut-evolution-YKmsjVkR.js} +11 -11
- package/dist/{vue-ui-donut-BLrLvjYC.js → vue-ui-donut-qRDAQa4n.js} +12 -12
- package/dist/{vue-ui-dumbbell-BdpORbsw.js → vue-ui-dumbbell-C6OpTSyF.js} +10 -10
- package/dist/{vue-ui-dumbbell-CnvbgjAc.cjs → vue-ui-dumbbell-bOMg4szX.cjs} +1 -1
- package/dist/{vue-ui-flow-DZW6HtMG.cjs → vue-ui-flow-Bnj7K0Td.cjs} +1 -1
- package/dist/{vue-ui-flow-Bq5TNf0q.js → vue-ui-flow-aIpHJK9l.js} +9 -9
- package/dist/{vue-ui-funnel-BTs69xlm.cjs → vue-ui-funnel-CapST2C3.cjs} +1 -1
- package/dist/{vue-ui-funnel-CdTmW2Dv.js → vue-ui-funnel-Ckn6d97S.js} +9 -9
- package/dist/{vue-ui-galaxy-Dc38cJm-.js → vue-ui-galaxy-0p-jvo0s.js} +11 -11
- package/dist/{vue-ui-galaxy-Bks-C0T9.cjs → vue-ui-galaxy-FIQp4ePf.cjs} +1 -1
- package/dist/{vue-ui-gauge-BTCMT6kZ.cjs → vue-ui-gauge-C1QU2678.cjs} +1 -1
- package/dist/{vue-ui-gauge-BPe-Wpxa.js → vue-ui-gauge-CtzP0_kK.js} +7 -7
- package/dist/{vue-ui-gizmo-DBnHMb9H.js → vue-ui-gizmo--TFv_z_f.js} +3 -3
- package/dist/{vue-ui-gizmo-CUKcPiKM.cjs → vue-ui-gizmo-D6E03WtQ.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C1YhyvNx.js → vue-ui-heatmap-Bx9RCECY.js} +10 -10
- package/dist/{vue-ui-heatmap-BufOxGx7.cjs → vue-ui-heatmap-DQ_4z6a6.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DWAkb7b_.cjs → vue-ui-history-plot-BNybvrYe.cjs} +1 -1
- package/dist/{vue-ui-history-plot-oMjKnlp3.js → vue-ui-history-plot-OlxcB4fR.js} +11 -11
- package/dist/{vue-ui-kpi-BLHpMBxd.js → vue-ui-kpi-D-EjjlYh.js} +3 -3
- package/dist/{vue-ui-kpi-ufMTcMPT.cjs → vue-ui-kpi-DhsQdhIg.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BLsy0k_A.js → vue-ui-mini-loader-CYRJtuw3.js} +2 -2
- package/dist/{vue-ui-mini-loader-T1GcVUKb.cjs → vue-ui-mini-loader-gsh0jMbc.cjs} +1 -1
- package/dist/{vue-ui-molecule-BnCvFuus.js → vue-ui-molecule-Dke-JabR.js} +10 -10
- package/dist/{vue-ui-molecule-B3GExfFV.cjs → vue-ui-molecule-K4PM7UqE.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Cxt_fhUy.cjs → vue-ui-mood-radar-CnR7mp7Z.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Yso-s4of.js → vue-ui-mood-radar-sXLyAWIK.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BfRWRgkw.js → vue-ui-nested-donuts-CJ9r-x9P.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BBzhXq6P.cjs → vue-ui-nested-donuts-DW1Zx5R0.cjs} +1 -1
- package/dist/{vue-ui-onion-Dt4TWe6t.js → vue-ui-onion-CVRrdFde.js} +11 -11
- package/dist/{vue-ui-onion-OEnDmiOB.cjs → vue-ui-onion-DM-jq72Y.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DGLh0ael.js → vue-ui-parallel-coordinate-plot-DLVjGpqC.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-BnAAzLae.cjs → vue-ui-parallel-coordinate-plot-DMouPTwE.cjs} +1 -1
- package/dist/{vue-ui-quadrant-nHh7YqG6.js → vue-ui-quadrant-BGuywSpy.js} +12 -12
- package/dist/{vue-ui-quadrant-B6E6v1xG.cjs → vue-ui-quadrant-CXFcrSRD.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Dr20RPOf.cjs → vue-ui-quick-chart-9R835dAy.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-SGvhac9d.js → vue-ui-quick-chart-D_ZSUMnh.js} +9 -9
- package/dist/{vue-ui-radar-BRtf9Ps5.cjs → vue-ui-radar-CGSB8Q_3.cjs} +1 -1
- package/dist/{vue-ui-radar-CcdphM-O.js → vue-ui-radar-CrF3XMq8.js} +12 -12
- package/dist/{vue-ui-rating-DgwurE4x.cjs → vue-ui-rating-BiwEz-WI.cjs} +1 -1
- package/dist/{vue-ui-rating-DRlCBElN.js → vue-ui-rating-DCH03Nd-.js} +2 -2
- package/dist/{vue-ui-relation-circle-g1JlL2f2.js → vue-ui-relation-circle-CFB3nQrw.js} +7 -7
- package/dist/{vue-ui-relation-circle-B4TErNPT.cjs → vue-ui-relation-circle-D7sKIx2H.cjs} +1 -1
- package/dist/{vue-ui-rings-BM9uYCUU.js → vue-ui-rings-CDFQgsVL.js} +12 -12
- package/dist/{vue-ui-rings-CBeL3HIa.cjs → vue-ui-rings-CMzJJbL7.cjs} +1 -1
- package/dist/{vue-ui-scatter-DT_QBIeo.js → vue-ui-scatter-CYweE3aN.js} +12 -12
- package/dist/{vue-ui-scatter-gkSm6cYR.cjs → vue-ui-scatter-Cpc9LK6H.cjs} +1 -1
- package/dist/{vue-ui-screenshot-2leQxim8.cjs → vue-ui-screenshot-BA27Irge.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DGbuK-RT.js → vue-ui-screenshot-BRY1fQOv.js} +1 -1
- package/dist/{vue-ui-skeleton-FXF7pMM8.cjs → vue-ui-skeleton-CLMRPxZm.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BTfzoolB.js → vue-ui-skeleton-Dsd0bx0Y.js} +3 -3
- package/dist/{vue-ui-smiley-Dijs1HRf.cjs → vue-ui-smiley-CNnxNaGC.cjs} +1 -1
- package/dist/{vue-ui-smiley-rwgYU3A2.js → vue-ui-smiley-CeC-WFLx.js} +2 -2
- package/dist/{vue-ui-spark-trend-Cj0B6A_8.js → vue-ui-spark-trend-C8FlaTDz.js} +5 -5
- package/dist/{vue-ui-spark-trend-D62Z0XyP.cjs → vue-ui-spark-trend-liGslvUe.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-B3R7uA_h.js → vue-ui-sparkbar-BjCkuYB0.js} +4 -4
- package/dist/{vue-ui-sparkbar-BB_OXsVx.cjs → vue-ui-sparkbar-DTUuvjOA.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-20iVOcBv.js → vue-ui-sparkgauge-BBJvgM0r.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CV3MRct2.cjs → vue-ui-sparkgauge-BEL_6k7M.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-ASA1Izuq.cjs → vue-ui-sparkhistogram-B12f_DfZ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-C8WGWsjQ.js → vue-ui-sparkhistogram-DgRpgf4S.js} +5 -5
- package/dist/{vue-ui-sparkline-C4MRWUBA.js → vue-ui-sparkline-COtgfnKN.js} +4 -4
- package/dist/{vue-ui-sparkline-jX03CtPG.cjs → vue-ui-sparkline-CgNq3TDg.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-C6jgtbtu.js → vue-ui-sparkstackbar-3qtBnVN-.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-BcCB8Id3.cjs → vue-ui-sparkstackbar-JgTWCear.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CVS_1WMe.cjs → vue-ui-stackbar-BIQOmKWQ.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CkEnBXay.js → vue-ui-stackbar-BzWMNHEl.js} +13 -13
- package/dist/{vue-ui-strip-plot-ES7BwMoF.js → vue-ui-strip-plot-B5yz7F4O.js} +11 -11
- package/dist/{vue-ui-strip-plot-DBabY03i.cjs → vue-ui-strip-plot-Pr-p3HVe.cjs} +1 -1
- package/dist/{vue-ui-table-Cf1g82vY.cjs → vue-ui-table-Da8yPHbm.cjs} +1 -1
- package/dist/{vue-ui-table-CCwzUTnA.js → vue-ui-table-DfzIKXYz.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DtzKVrpK.js → vue-ui-table-heatmap-B42LEDQq.js} +4 -4
- package/dist/{vue-ui-table-heatmap-CyHzz9rv.cjs → vue-ui-table-heatmap-m9WunlMI.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-95pS3pBt.js → vue-ui-table-sparkline-D0NpqAlx.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CLAybURJ.cjs → vue-ui-table-sparkline-D87wVYbh.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BQTWXeqU.js → vue-ui-thermometer-CLrrfpCH.js} +7 -7
- package/dist/{vue-ui-thermometer-Cm_KBNVZ.cjs → vue-ui-thermometer-CpaWOGHr.cjs} +1 -1
- package/dist/{vue-ui-timer-B0D_sZmm.cjs → vue-ui-timer-DJ3N2OIu.cjs} +1 -1
- package/dist/{vue-ui-timer-tLNMbgLM.js → vue-ui-timer-ruhqlCDV.js} +5 -5
- package/dist/{vue-ui-tiremarks-nIj267dw.js → vue-ui-tiremarks-B1PaJvW_.js} +7 -7
- package/dist/{vue-ui-tiremarks-CWIZflLH.cjs → vue-ui-tiremarks-By-ZwLdD.cjs} +1 -1
- package/dist/{vue-ui-treemap-Js5dG3BL.js → vue-ui-treemap-B3_lUi3B.js} +276 -268
- package/dist/vue-ui-treemap-DX_oIHsl.cjs +1 -0
- package/dist/{vue-ui-vertical-bar-NCB7yZQF.js → vue-ui-vertical-bar-Bi_p2HMG.js} +12 -12
- package/dist/{vue-ui-vertical-bar-fh2mIy4s.cjs → vue-ui-vertical-bar-D51OT6tD.cjs} +1 -1
- package/dist/{vue-ui-waffle-BTz72Vui.cjs → vue-ui-waffle-BRFWNTTy.cjs} +1 -1
- package/dist/{vue-ui-waffle-C70QQeU2.js → vue-ui-waffle-D_OFNFu_.js} +12 -12
- package/dist/{vue-ui-wheel-C9DYeu9D.cjs → vue-ui-wheel-C_0xODX0.cjs} +1 -1
- package/dist/{vue-ui-wheel-BKAEI3lz.js → vue-ui-wheel-Dm-sn-fc.js} +7 -7
- package/dist/{vue-ui-word-cloud-BgxihpLV.cjs → vue-ui-word-cloud-CpbPC0k6.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-ChIuYeMe.js → vue-ui-word-cloud-WO_xGFwd.js} +10 -10
- package/dist/{vue-ui-xy-BSKwWGbp.cjs → vue-ui-xy-ArWU04zz.cjs} +1 -1
- package/dist/{vue-ui-xy-DHgnF-1N.js → vue-ui-xy-DYGsBFzv.js} +14 -14
- package/dist/{vue-ui-xy-canvas-BstJgVjY.cjs → vue-ui-xy-canvas-DCFJnGtu.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-xQvriWI0.js → vue-ui-xy-canvas-SpUUvBPW.js} +12 -12
- package/package.json +1 -1
- package/dist/PackageVersion-C9u9Pwxk.cjs +0 -1
- package/dist/vue-ui-treemap-DRDVV_Da.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-hcakVXU6.cjs"),Ce=require("./Title-DRo5NxnS.cjs"),ie=require("./usePrinter-Dv0RMCX1.cjs"),we=require("./DataTable-ChXRV1c1.cjs"),Be=require("./Tooltip-Cbjcw6Jz.cjs"),$e=require("./vue-ui-skeleton-FXF7pMM8.cjs"),xe=require("./vue-ui-accordion-BfFg-sVJ.cjs"),ue=require("./useNestedProp-DCfCPrTU.cjs"),Pe=require("./PackageVersion-C9u9Pwxk.cjs"),Ee=require("./PenAndPaper-B3u1FDG_.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-BXhJaCcU.cjs"),Ce=require("./Title-DBgUbEU1.cjs"),ie=require("./usePrinter-DRWBcwQ7.cjs"),we=require("./DataTable-ImmHVJ0i.cjs"),Be=require("./Tooltip-TGHDsCSU.cjs"),$e=require("./vue-ui-skeleton-CLMRPxZm.cjs"),xe=require("./vue-ui-accordion-DdHwnq9o.cjs"),ue=require("./useNestedProp-DhyCNtMY.cjs"),Pe=require("./PackageVersion-DjHCw2D_.cjs"),Ee=require("./PenAndPaper-AZpGBe7x.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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-hcakVXU6.cjs"),oe=require("./Title-DRo5NxnS.cjs"),q=require("./usePrinter-Dv0RMCX1.cjs"),le=require("./Legend-DpeobB-J.cjs"),g=require("./BaseIcon-CNr0ynIA.cjs"),ae=require("./DataTable-ChXRV1c1.cjs"),re=require("./vue-ui-skeleton-FXF7pMM8.cjs"),ne=require("./vue-ui-accordion-BfFg-sVJ.cjs"),z=require("./useNestedProp-DCfCPrTU.cjs"),se=require("./PackageVersion-C9u9Pwxk.cjs"),ue=require("./PenAndPaper-B3u1FDG_.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-BXhJaCcU.cjs"),oe=require("./Title-DBgUbEU1.cjs"),q=require("./usePrinter-DRWBcwQ7.cjs"),le=require("./Legend-CfimXfYH.cjs"),g=require("./BaseIcon-BjlTm9wZ.cjs"),ae=require("./DataTable-ImmHVJ0i.cjs"),re=require("./vue-ui-skeleton-CLMRPxZm.cjs"),ne=require("./vue-ui-accordion-DdHwnq9o.cjs"),z=require("./useNestedProp-DhyCNtMY.cjs"),se=require("./PackageVersion-DjHCw2D_.cjs"),ue=require("./PenAndPaper-AZpGBe7x.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-jVWdGfFl.js";
|
|
3
|
+
import { _ as Ve } from "./Title-6BRNasyb.js";
|
|
4
|
+
import { u as je, U as Re } from "./usePrinter-BI95cSFJ.js";
|
|
5
|
+
import { L as Ue } from "./Legend-BVtJaKHS.js";
|
|
6
|
+
import A from "./BaseIcon-DywZoZmD.js";
|
|
7
|
+
import { D as Be } from "./DataTable-CrhPpuOy.js";
|
|
8
|
+
import De from "./vue-ui-skeleton-Dsd0bx0Y.js";
|
|
9
|
+
import We from "./vue-ui-accordion-DOBMerZl.js";
|
|
10
|
+
import { u as re } from "./useNestedProp-BN5jbfiQ.js";
|
|
11
|
+
import { _ as ze } from "./PackageVersion-DJu8NH8u.js";
|
|
12
|
+
import { P as Ee } from "./PenAndPaper-DC3X33rh.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";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as w, ref as i, watch as Me, onMounted as ot, onBeforeUnmount as st, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as P, createBlock as D, createCommentVNode as f, createVNode as Ue, createSlots as ut, withCtx as b, renderSlot as g, normalizeProps as V, guardReactiveProps as M, createElementVNode as m, Fragment as C, renderList as F, toDisplayString as S, createTextVNode as Q, nextTick as nt } from "vue";
|
|
2
|
-
import { u as rt, c as it, t as dt, p as Z, a as vt, o as ct, e as U, b as ft, J as Re, d as ht, m as Be, f as x, X as yt, s as Ee, L as pt, k as ie, n as R, i as E, x as Ge, q as bt, r as gt, y as mt } from "./index-
|
|
2
|
+
import { u as rt, c as it, t as dt, p as Z, a as vt, o as ct, e as U, b as ft, J as Re, d as ht, m as Be, f as x, X as yt, s as Ee, L as pt, k as ie, n as R, i as E, x as Ge, q as bt, r as gt, y as mt } from "./index-jVWdGfFl.js";
|
|
3
3
|
import { t as kt, u as wt } from "./useResponsive-vZgZwV-S.js";
|
|
4
|
-
import { _ as $t } from "./Title-
|
|
5
|
-
import { u as Lt, U as Ct } from "./usePrinter-
|
|
6
|
-
import { D as xt } from "./DataTable-
|
|
7
|
-
import { _ as _t } from "./Tooltip-
|
|
8
|
-
import { L as Tt } from "./Legend-
|
|
9
|
-
import Ft from "./vue-ui-skeleton-
|
|
10
|
-
import Nt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ye } from "./useNestedProp-
|
|
12
|
-
import { _ as St } from "./PackageVersion-
|
|
13
|
-
import { P as Ot } from "./PenAndPaper-
|
|
4
|
+
import { _ as $t } from "./Title-6BRNasyb.js";
|
|
5
|
+
import { u as Lt, U as Ct } from "./usePrinter-BI95cSFJ.js";
|
|
6
|
+
import { D as xt } from "./DataTable-CrhPpuOy.js";
|
|
7
|
+
import { _ as _t } from "./Tooltip-BUPxcljs.js";
|
|
8
|
+
import { L as Tt } from "./Legend-BVtJaKHS.js";
|
|
9
|
+
import Ft from "./vue-ui-skeleton-Dsd0bx0Y.js";
|
|
10
|
+
import Nt from "./vue-ui-accordion-DOBMerZl.js";
|
|
11
|
+
import { u as Ye } from "./useNestedProp-BN5jbfiQ.js";
|
|
12
|
+
import { _ as St } from "./PackageVersion-DJu8NH8u.js";
|
|
13
|
+
import { P as Ot } from "./PenAndPaper-DC3X33rh.js";
|
|
14
14
|
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as It } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
import { _ as Pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BXhJaCcU.cjs"),ye=require("./useResponsive-N8jl0-aC.cjs"),Fe=require("./Title-DBgUbEU1.cjs"),me=require("./usePrinter-DRWBcwQ7.cjs"),Te=require("./DataTable-ImmHVJ0i.cjs"),Oe=require("./Tooltip-TGHDsCSU.cjs"),Pe=require("./Legend-CfimXfYH.cjs"),ze=require("./vue-ui-skeleton-CLMRPxZm.cjs"),De=require("./vue-ui-accordion-DdHwnq9o.cjs"),be=require("./useNestedProp-DhyCNtMY.cjs"),Ae=require("./PackageVersion-DjHCw2D_.cjs"),Ie=require("./PenAndPaper-AZpGBe7x.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),Re=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["id"],Ye=["xmlns","viewBox"],Xe=["width","height"],Ge=["id"],He=["offset","stop-color"],We=["offset","stop-opacity"],Je=["id"],Ke=["id"],Qe=["id"],Ze=["flood-color"],je=["d","fill","stroke","stroke-width","filter"],et={key:1},tt=["d","fill"],lt={key:2},at=["x","y","font-size","font-weight","fill"],ot={key:3},nt=["filter"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["d","fill","onMouseenter","onClick"],ct={key:5,class:"vue-data-ui-watermark"},dt={key:0,class:"vue-ui-nested-donuts-legend-title"},vt=["onClick"],ft=["innerHTML"],pt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ge,{expose:ke,emit:Ce}){const{vue_ui_nested_donuts:we}=r.useConfig(),k=ge,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),Le=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 Be(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Me.useUserOptionState({config:t.value}),{svgRef:Q}=Re.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=be.useNestedProp({userConfig:k.config,defaultConfig:we});return l.theme?{...be.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,j(),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 $=e.ref(null);e.onMounted(()=>{j()});function j(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ye.throttle(()=>{const{width:s,height:o}=ye.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});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),xe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),$e=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),oe=Ce;function Ne({datapoint:l,index:s}){oe("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||$e.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.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)),ne=e.computed(()=>[...m.value].map((l,s)=>{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 Se(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(ne.value);e.watch(()=>ne.value,l=>d.value=l);const re=e.ref(null),se=e.ref(null);function z(l){oe("selectLegend",l);const s=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===s.arcOfId).series.map(i=>i.id),p=Se(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(re.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),re.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(se.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)})),se.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ue=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.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)}})),ie=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.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]}})),ce=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function _e({datapoint:l,_relativeIndex:s,seriesIndex:o}){ce.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(r.isFunction(n)&&r.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
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
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as h, ref as r, watch as we, onMounted as Xe, onBeforeUnmount as Ge, createElementBlock as u, openBlock as s, unref as i, normalizeStyle as B, normalizeClass as U, createBlock as C, createCommentVNode as g, createElementVNode as O, createVNode as $e, createSlots as Ee, withCtx as f, renderSlot as d, normalizeProps as _, guardReactiveProps as P, Fragment as M, renderList as N, toDisplayString as I, createTextVNode as He, nextTick as We } from "vue";
|
|
2
|
-
import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-
|
|
2
|
+
import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-jVWdGfFl.js";
|
|
3
3
|
import { t as nt, u as st } from "./useResponsive-vZgZwV-S.js";
|
|
4
|
-
import { _ as rt } from "./Title-
|
|
5
|
-
import { u as ut, U as it } from "./usePrinter-
|
|
6
|
-
import { L as ct } from "./Legend-
|
|
7
|
-
import { D as dt } from "./DataTable-
|
|
8
|
-
import { _ as vt } from "./Tooltip-
|
|
9
|
-
import ht from "./vue-ui-skeleton-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Te } from "./useNestedProp-
|
|
12
|
-
import { _ as gt } from "./PackageVersion-
|
|
13
|
-
import { P as pt } from "./PenAndPaper-
|
|
4
|
+
import { _ as rt } from "./Title-6BRNasyb.js";
|
|
5
|
+
import { u as ut, U as it } from "./usePrinter-BI95cSFJ.js";
|
|
6
|
+
import { L as ct } from "./Legend-BVtJaKHS.js";
|
|
7
|
+
import { D as dt } from "./DataTable-CrhPpuOy.js";
|
|
8
|
+
import { _ as vt } from "./Tooltip-BUPxcljs.js";
|
|
9
|
+
import ht from "./vue-ui-skeleton-Dsd0bx0Y.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-DOBMerZl.js";
|
|
11
|
+
import { u as Te } from "./useNestedProp-BN5jbfiQ.js";
|
|
12
|
+
import { _ as gt } from "./PackageVersion-DJu8NH8u.js";
|
|
13
|
+
import { P as pt } from "./PenAndPaper-DC3X33rh.js";
|
|
14
14
|
import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as mt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
import { _ as bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BXhJaCcU.cjs"),ae=require("./useResponsive-N8jl0-aC.cjs"),$e=require("./Title-DBgUbEU1.cjs"),oe=require("./usePrinter-DRWBcwQ7.cjs"),xe=require("./Legend-CfimXfYH.cjs"),Be=require("./DataTable-ImmHVJ0i.cjs"),Te=require("./Tooltip-TGHDsCSU.cjs"),Se=require("./vue-ui-skeleton-CLMRPxZm.cjs"),Pe=require("./vue-ui-accordion-DdHwnq9o.cjs"),re=require("./useNestedProp-DhyCNtMY.cjs"),Oe=require("./PackageVersion-DjHCw2D_.cjs"),Ne=require("./PenAndPaper-AZpGBe7x.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Ie=["xmlns","viewBox"],Ee=["width","height"],Re=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Le=["id"],ze=["stdDeviation"],De=["filter"],qe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ue=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ye={key:2},Xe=["onMouseenter"],Ge=["x","y","font-size","fill","font-weight"],He={key:5,class:"vue-data-ui-watermark"},je=["onClick"],We=["innerHTML"],Je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const{vue_ui_onion:ie}=u.useConfig(),f=ne,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ce=e.ref(null),I=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),b=e.ref(null),E=e.ref(null),R=e.ref(null),M=e.ref(null),L=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=_e.useUserOptionState({config:t.value}),{svgRef:X}=Ve.useChartAccessibility({config:t.value.style.chart.title});function G(){const l=re.useNestedProp({userConfig:f.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,K(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:H,isImaging:j,generatePdf:W,generateImage:J}=oe.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion",options:t.value.userOptions.print}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ve=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{K()});function K(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=ae.throttle(()=>{const{width:a,height:o}=ae.useResponsive({chart:b.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?R.value:null,source:M.value,noTitle:L.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||ve.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>Q(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),he=e.computed(()=>t.value.useStartAnimation),pe=e.ref(null),fe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,ge,{immediate:!0});function ge(){if(he.value&&!O.value){let r=function(){l>=fe.value?(cancelAnimationFrame(pe.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const me=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ye=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ye.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:be(a,l.percentage||0)}}));function be(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-l}
|
|
3
3
|
A ${l},${l} 0 1 1
|
|
4
4
|
${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as b, ref as v, watch as Xe, onMounted as Ye, onBeforeUnmount as qe, createElementBlock as i, openBlock as u, unref as x, normalizeStyle as T, normalizeClass as W, createBlock as z, createCommentVNode as m, createElementVNode as F, createVNode as Me, createSlots as Je, withCtx as k, renderSlot as f, normalizeProps as S, guardReactiveProps as D, Fragment as C, renderList as I, toDisplayString as R, createTextVNode as Ke } from "vue";
|
|
2
|
-
import { u as Qe, c as ee, t as Ze, p as H, a as et, o as tt, e as ze, g as at, b as lt, d as ot, D as st, S as nt, T as ut, U as it, X as rt, x as Ie, F as G, q as ct, r as vt, i as Fe, f as Pe, y as dt } from "./index-
|
|
2
|
+
import { u as Qe, c as ee, t as Ze, p as H, a as et, o as tt, e as ze, g as at, b as lt, d as ot, D as st, S as nt, T as ut, U as it, X as rt, x as Ie, F as G, q as ct, r as vt, i as Fe, f as Pe, y as dt } from "./index-jVWdGfFl.js";
|
|
3
3
|
import { t as ht, u as pt } from "./useResponsive-vZgZwV-S.js";
|
|
4
|
-
import { _ as mt } from "./Title-
|
|
5
|
-
import { L as yt } from "./Legend-
|
|
6
|
-
import { _ as ft } from "./Tooltip-
|
|
7
|
-
import { _ as gt } from "./Shape
|
|
8
|
-
import { u as bt, U as xt } from "./usePrinter-
|
|
9
|
-
import { D as kt } from "./DataTable-
|
|
10
|
-
import wt from "./vue-ui-accordion-
|
|
11
|
-
import Ct from "./vue-ui-skeleton-
|
|
12
|
-
import { u as Ne } from "./useNestedProp-
|
|
13
|
-
import { _ as $t } from "./PackageVersion-
|
|
14
|
-
import { P as At } from "./PenAndPaper-
|
|
4
|
+
import { _ as mt } from "./Title-6BRNasyb.js";
|
|
5
|
+
import { L as yt } from "./Legend-BVtJaKHS.js";
|
|
6
|
+
import { _ as ft } from "./Tooltip-BUPxcljs.js";
|
|
7
|
+
import { _ as gt } from "./Shape-Bs4vWaC-.js";
|
|
8
|
+
import { u as bt, U as xt } from "./usePrinter-BI95cSFJ.js";
|
|
9
|
+
import { D as kt } from "./DataTable-CrhPpuOy.js";
|
|
10
|
+
import wt from "./vue-ui-accordion-DOBMerZl.js";
|
|
11
|
+
import Ct from "./vue-ui-skeleton-Dsd0bx0Y.js";
|
|
12
|
+
import { u as Ne } from "./useNestedProp-BN5jbfiQ.js";
|
|
13
|
+
import { _ as $t } from "./PackageVersion-DJu8NH8u.js";
|
|
14
|
+
import { P as At } from "./PenAndPaper-DC3X33rh.js";
|
|
15
15
|
import { u as Tt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { u as _t } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BXhJaCcU.cjs"),ce=require("./useResponsive-N8jl0-aC.cjs"),Se=require("./Title-DBgUbEU1.cjs"),ze=require("./Legend-CfimXfYH.cjs"),Ne=require("./Tooltip-TGHDsCSU.cjs"),Ae=require("./Shape-Dl6kIG9D.cjs"),de=require("./usePrinter-DRWBcwQ7.cjs"),Te=require("./DataTable-ImmHVJ0i.cjs"),Pe=require("./vue-ui-accordion-DdHwnq9o.cjs"),Fe=require("./vue-ui-skeleton-CLMRPxZm.cjs"),ve=require("./useNestedProp-DhyCNtMY.cjs"),Me=require("./PackageVersion-DjHCw2D_.cjs"),_e=require("./PenAndPaper-AZpGBe7x.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Oe=["xmlns","viewBox"],De=["x","y","width","height"],qe={style:{"pointer-events":"none"}},Re=["x1","x2","y1","y2","stroke","stroke-width"],Ue=["x","y","fill","font-size","font-weight"],We=["x1","x2","y1","y2","stroke","stroke-width"],je=["x","y","fill","font-size","font-weight"],He={key:0},Ge=["x","y","font-size","fill"],Ye=["width","x","y"],Xe={style:{width:"100%"}},Je=["x","y","fill","font-weight","font-size","onMouseenter"],Ke=["d","stroke","stroke-width","onMouseenter"],Qe=["d","onMouseenter"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt=["innerHTML"],lt={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(pe,{expose:he,emit:me}){const{vue_ui_parallel_coordinate_plot:ye}=i.useConfig(),b=pe,x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),$=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),R=e.ref(0),U=e.ref(0),W=e.ref(0),T=e.ref(i.createUid()),C=e.ref(!1);function fe(l){C.value=l,L.value+=1}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:H}=Ie.useUserOptionState({config:t.value}),{svgRef:G}=Ee.useChartAccessibility({config:t.value.style.chart.title});function Y(){const l=ve.useNestedProp({userConfig:b.config,defaultConfig:ye});return l.theme?{...ve.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=Y(),P.value=!t.value.userOptions.showOnChartHover,X(),R.value+=1,W.value+=1,U.value+=1,v.value.dataLabels.show=t.value.style.chart.yAxis.labels.datapoints.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const S=e.ref(null);e.onMounted(()=>{X()});function X(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ce.throttle(()=>{const{width:o,height:a}=ce.useResponsive({chart:$.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=a,d.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),d.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),d.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),d.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})})});S.value=new ResizeObserver(l),S.value.observe($.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),d=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),c=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=d.value.height,s=d.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),be=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function ee(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||be.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),ke=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>ee(l.id),isSegregated:f.value.includes(l.id)}))),xe=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),te=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>c.value.width/te.value),F=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>{let l=[];for(let o=0;o<te.value;o+=1){const a=Math.min(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),n=Math.max(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((p,A)=>{const Be=u.min<0?p+Math.abs(u.min):p-Math.abs(u.min),$e=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:c.value.bottom-c.value.height*(Be/$e),x:c.value.left+y.value*o+y.value/2,value:p}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),M=e.computed(()=>F.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:c.value.left+y.value*s+y.value/2,y:c.value.bottom-c.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function le({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),w=e.ref(!1),I=e.ref("");function z({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){_.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},w.value=!0,h.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}))?I.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,m.value.map(g=>g.name).forEach((g,p)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as g, ref as y, watch as Fe, onMounted as ut, onBeforeUnmount as ot, createElementBlock as n, openBlock as o, unref as h, normalizeStyle as q, normalizeClass as T, createBlock as N, createCommentVNode as c, createElementVNode as d, createVNode as ve, createSlots as st, withCtx as m, renderSlot as x, normalizeProps as F, guardReactiveProps as H, Fragment as C, renderList as Y, toDisplayString as L, createTextVNode as rt, nextTick as nt } from "vue";
|
|
2
|
-
import { u as it, c as He, t as vt, p as de, a as dt, o as ct, e as I, b as ht, d as yt, V as bt, i as O, f as V, X as ft, s as ae, w as pt, W as gt, G as mt, q as xt, r as $t, x as kt, y as Lt } from "./index-
|
|
2
|
+
import { u as it, c as He, t as vt, p as de, a as dt, o as ct, e as I, b as ht, d as yt, V as bt, i as O, f as V, X as ft, s as ae, w as pt, W as gt, G as mt, q as xt, r as $t, x as kt, y as Lt } from "./index-jVWdGfFl.js";
|
|
3
3
|
import { t as wt, u as qt } from "./useResponsive-vZgZwV-S.js";
|
|
4
|
-
import { _ as _t } from "./Title-
|
|
5
|
-
import { u as Ct, U as St } from "./usePrinter-
|
|
6
|
-
import { _ as zt } from "./Tooltip-
|
|
7
|
-
import { _ as Ie } from "./Shape
|
|
8
|
-
import { L as Tt } from "./Legend-
|
|
9
|
-
import { D as Wt } from "./DataTable-
|
|
10
|
-
import Xt from "./vue-ui-skeleton-
|
|
11
|
-
import Yt from "./vue-ui-accordion-
|
|
12
|
-
import { u as Ue } from "./useNestedProp-
|
|
13
|
-
import { _ as At } from "./PackageVersion-
|
|
14
|
-
import { P as Mt } from "./PenAndPaper-
|
|
4
|
+
import { _ as _t } from "./Title-6BRNasyb.js";
|
|
5
|
+
import { u as Ct, U as St } from "./usePrinter-BI95cSFJ.js";
|
|
6
|
+
import { _ as zt } from "./Tooltip-BUPxcljs.js";
|
|
7
|
+
import { _ as Ie } from "./Shape-Bs4vWaC-.js";
|
|
8
|
+
import { L as Tt } from "./Legend-BVtJaKHS.js";
|
|
9
|
+
import { D as Wt } from "./DataTable-CrhPpuOy.js";
|
|
10
|
+
import Xt from "./vue-ui-skeleton-Dsd0bx0Y.js";
|
|
11
|
+
import Yt from "./vue-ui-accordion-DOBMerZl.js";
|
|
12
|
+
import { u as Ue } from "./useNestedProp-BN5jbfiQ.js";
|
|
13
|
+
import { _ as At } from "./PackageVersion-DJu8NH8u.js";
|
|
14
|
+
import { P as Mt } from "./PenAndPaper-DC3X33rh.js";
|
|
15
15
|
import { u as Nt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { u as Ot } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|