vue-data-ui 2.3.98 → 2.4.0
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-BLDzSVI-.cjs → Arrow-CbntjQjr.cjs} +1 -1
- package/dist/{Arrow-DgyN_Z51.js → Arrow-NcE21Ngm.js} +1 -1
- package/dist/BaseIcon-7IlvRUX2.cjs +1 -0
- package/dist/{BaseIcon-CdxkWcA_.js → BaseIcon-BUTpMnXi.js} +17 -16
- package/dist/{DataTable-DT8VcwR5.cjs → DataTable-BwH-MU-S.cjs} +1 -1
- package/dist/{DataTable-CFtLoh2y.js → DataTable-DAgyf9zN.js} +2 -2
- package/dist/{Legend-BiaVNQjc.cjs → Legend-CHQgjBuK.cjs} +1 -1
- package/dist/{Legend-DlZZeU8Y.js → Legend-DBhpIX2x.js} +1 -1
- package/dist/PackageVersion-Djty0wb2.cjs +1 -0
- package/dist/{PackageVersion-B2pJ6f4s.js → PackageVersion-wB6dCDZw.js} +1 -1
- package/dist/{Shape-CbyenPbK.js → Shape-CQVJz33T.js} +1 -1
- package/dist/{Shape-CLCzNUYM.cjs → Shape-DQ0Hh2Gg.cjs} +1 -1
- package/dist/{Slicer-CCE1xFS8.cjs → Slicer-CiSmaE0_.cjs} +1 -1
- package/dist/{Slicer-C2ocGjgt.js → Slicer-DXw23eOC.js} +2 -2
- package/dist/{Title-spYln43E.cjs → Title-BHmTg9iK.cjs} +1 -1
- package/dist/{Title-DqYX5EDQ.js → Title-DlVZnHjs.js} +1 -1
- package/dist/{Tooltip-7I8a4mo2.js → Tooltip-CveCRFgK.js} +1 -1
- package/dist/{Tooltip-BgkDlGZj.cjs → Tooltip-DBzXz806.cjs} +1 -1
- package/dist/{index-CHn5mpNE.js → index-B0CpCD8z.js} +33 -26
- package/dist/index-Dfhvf8hT.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +7 -1
- package/dist/types/vue-data-ui.d.ts +7 -1
- package/dist/{useNestedProp-BF5raFbY.js → useNestedProp-DGWP4D-K.js} +1 -1
- package/dist/{useNestedProp-XzXFHriE.cjs → useNestedProp-iuDCMc2p.cjs} +1 -1
- package/dist/usePrinter-BQQasUin.cjs +1 -0
- package/dist/{usePrinter-DNwJl64i.js → usePrinter-Dr30K4cu.js} +27 -23
- package/dist/{vue-data-ui-D74akyv3.js → vue-data-ui-BdSFeW_X.js} +57 -57
- package/dist/{vue-data-ui-DyzsgRrE.cjs → vue-data-ui-BgVPGbxq.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CEIsvuEw.js → vue-ui-3d-bar-C3hYrYTV.js} +8 -8
- package/dist/{vue-ui-3d-bar-DABkuo-g.cjs → vue-ui-3d-bar-DhHuwXZ1.cjs} +1 -1
- package/dist/{vue-ui-accordion-DXd5ND_A.js → vue-ui-accordion-CmENcGVW.js} +3 -3
- package/dist/{vue-ui-accordion-DDiQi7FV.cjs → vue-ui-accordion-Deyo7jw7.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Bk87h-18.js → vue-ui-age-pyramid-C075Lvfe.js} +9 -9
- package/dist/{vue-ui-age-pyramid-DgDByrGl.cjs → vue-ui-age-pyramid-DaenyRp2.cjs} +1 -1
- package/dist/{vue-ui-annotator-B6velitp.js → vue-ui-annotator-Bb6fUz4x.js} +1 -1
- package/dist/{vue-ui-annotator-CC523zDg.cjs → vue-ui-annotator-DslXalSQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BW7ajYg7.js → vue-ui-candlestick-C4VEOmY_.js} +10 -10
- package/dist/{vue-ui-candlestick-DbU_XaYN.cjs → vue-ui-candlestick-CnVzd826.cjs} +1 -1
- package/dist/vue-ui-carousel-table-Coq4gg_P.cjs +1 -0
- package/dist/{vue-ui-carousel-table-C2GpkqxJ.js → vue-ui-carousel-table-DZfMMpZ7.js} +26 -25
- package/dist/{vue-ui-chestnut-ynySog92.cjs → vue-ui-chestnut-CLnJ0jmo.cjs} +1 -1
- package/dist/{vue-ui-chestnut-s4sYE-Yq.js → vue-ui-chestnut-CUnbj-Zb.js} +7 -7
- package/dist/{vue-ui-cursor-C0JCZjSM.cjs → vue-ui-cursor-B9UvQwLp.cjs} +1 -1
- package/dist/{vue-ui-cursor-B3OZaotE.js → vue-ui-cursor-CtuPho-s.js} +2 -2
- package/dist/{vue-ui-dashboard-B8glPKoJ.js → vue-ui-dashboard-8gQ1bGCn.js} +2 -2
- package/dist/{vue-ui-dashboard-Bn3v9JMP.cjs → vue-ui-dashboard-KMTRqXzR.cjs} +1 -1
- package/dist/{vue-ui-digits-Bf3jPyKq.cjs → vue-ui-digits-DSMNN4z_.cjs} +1 -1
- package/dist/{vue-ui-digits-BTw5A-9I.js → vue-ui-digits-DuEyX8op.js} +2 -2
- package/dist/{vue-ui-donut-CMHiEbv5.js → vue-ui-donut-0xdYBc41.js} +362 -336
- package/dist/vue-ui-donut-C4ek9m3R.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DMM09v7x.cjs → vue-ui-donut-evolution-B4TkwvNq.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Cn-kZE-i.js → vue-ui-donut-evolution-DbojarYN.js} +10 -10
- package/dist/{vue-ui-dumbbell-BRgiYAXh.js → vue-ui-dumbbell-BxhWjCvR.js} +9 -9
- package/dist/{vue-ui-dumbbell-6liDM1Uq.cjs → vue-ui-dumbbell-Cn3spRSv.cjs} +1 -1
- package/dist/{vue-ui-flow-B7wvK8sK.cjs → vue-ui-flow-D00VdtGU.cjs} +1 -1
- package/dist/{vue-ui-flow-CkRBNjsz.js → vue-ui-flow-DreN8go4.js} +8 -8
- package/dist/{vue-ui-galaxy-C1I2rPqV.js → vue-ui-galaxy-BddgLpP-.js} +10 -10
- package/dist/{vue-ui-galaxy-BuuC5iw-.cjs → vue-ui-galaxy-DVN-S67V.cjs} +1 -1
- package/dist/{vue-ui-gauge-BvJ0qzq4.cjs → vue-ui-gauge-DYZYFzHP.cjs} +1 -1
- package/dist/{vue-ui-gauge-B0PNChvw.js → vue-ui-gauge-DoTctAHq.js} +6 -6
- package/dist/{vue-ui-gizmo-C6G_WlP5.cjs → vue-ui-gizmo-DRASsqlp.cjs} +1 -1
- package/dist/{vue-ui-gizmo-HvL1eMUO.js → vue-ui-gizmo-hXBWaB0c.js} +3 -3
- package/dist/{vue-ui-heatmap-CQXqbbaT.js → vue-ui-heatmap-B43q8UHu.js} +9 -9
- package/dist/{vue-ui-heatmap-5ALzyHu_.cjs → vue-ui-heatmap-ldCySJFf.cjs} +1 -1
- package/dist/{vue-ui-kpi-5u25Gbfg.cjs → vue-ui-kpi-BiJnqtGR.cjs} +1 -1
- package/dist/{vue-ui-kpi-JIlZQFAC.js → vue-ui-kpi-_GVnhxEd.js} +3 -3
- package/dist/{vue-ui-mini-loader-DcJ58uSW.cjs → vue-ui-mini-loader-DVZtFcHw.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Dktn_fME.js → vue-ui-mini-loader-qvtu5jtI.js} +2 -2
- package/dist/{vue-ui-molecule-Wefpekma.cjs → vue-ui-molecule-DP9jhODZ.cjs} +1 -1
- package/dist/{vue-ui-molecule-BSSNMC6m.js → vue-ui-molecule-Dpu7Xmu5.js} +10 -10
- package/dist/{vue-ui-mood-radar-B7oYZs55.cjs → vue-ui-mood-radar-BR0INhYL.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-D4fVO5iO.js → vue-ui-mood-radar-iZJ0B1Wf.js} +10 -10
- package/dist/{vue-ui-nested-donuts-4_tabA8c.js → vue-ui-nested-donuts-CovQfZ81.js} +10 -10
- package/dist/{vue-ui-nested-donuts-ClqZ-eJl.cjs → vue-ui-nested-donuts-CwIsGnyH.cjs} +1 -1
- package/dist/{vue-ui-onion-Ch6BgUFP.js → vue-ui-onion-CJb2Pg0t.js} +10 -10
- package/dist/{vue-ui-onion-DQ9E4dGJ.cjs → vue-ui-onion-DjEChSmi.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CeXmNMQ-.cjs → vue-ui-parallel-coordinate-plot-B8Kl6AMk.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BtZ1F37V.js → vue-ui-parallel-coordinate-plot-CUA_fFC3.js} +11 -11
- package/dist/{vue-ui-quadrant-fhNZ5-B5.cjs → vue-ui-quadrant-CmdbW8yZ.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CGiq44Mt.js → vue-ui-quadrant-IAIp5IZq.js} +11 -11
- package/dist/{vue-ui-quick-chart-B-vFmpy5.js → vue-ui-quick-chart-Bb2RQ6qI.js} +8 -8
- package/dist/{vue-ui-quick-chart-DI4IPOIj.cjs → vue-ui-quick-chart-DcEk6Ho7.cjs} +1 -1
- package/dist/{vue-ui-radar-B80HMKEf.cjs → vue-ui-radar-TjgO9_LA.cjs} +1 -1
- package/dist/{vue-ui-radar-DWzxx466.js → vue-ui-radar-mIQMBRHx.js} +11 -11
- package/dist/vue-ui-rating-BGRWSTGr.cjs +1 -0
- package/dist/vue-ui-rating-DcJb7_bV.js +323 -0
- package/dist/{vue-ui-relation-circle-dUlg-_QI.js → vue-ui-relation-circle-f0fKvSSw.js} +6 -6
- package/dist/{vue-ui-relation-circle-DNaNyiIv.cjs → vue-ui-relation-circle-x4sKnxbi.cjs} +1 -1
- package/dist/{vue-ui-rings-C_z0XK6f.cjs → vue-ui-rings-B3mUyyQ9.cjs} +1 -1
- package/dist/{vue-ui-rings-CqFaPqaR.js → vue-ui-rings-M1PUv5Wu.js} +10 -10
- package/dist/{vue-ui-scatter-DFiICBjw.cjs → vue-ui-scatter-DF_nobsG.cjs} +1 -1
- package/dist/{vue-ui-scatter-Bsfc6z4K.js → vue-ui-scatter-DiQJtMz1.js} +11 -11
- package/dist/{vue-ui-screenshot-uE34c5Im.cjs → vue-ui-screenshot-BdnW3WFN.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CXptYbDY.js → vue-ui-screenshot-QRt5bT48.js} +1 -1
- package/dist/{vue-ui-skeleton-BmPO8QNa.js → vue-ui-skeleton-DEv_1TFa.js} +3 -3
- package/dist/{vue-ui-skeleton-g8cEqYmt.cjs → vue-ui-skeleton-fqwO2mHD.cjs} +1 -1
- package/dist/{vue-ui-smiley-ByBzn20M.js → vue-ui-smiley-BAr3XuJG.js} +405 -320
- package/dist/vue-ui-smiley-D-zRYR9g.cjs +2 -0
- package/dist/{vue-ui-spark-trend-BXiiilKK.cjs → vue-ui-spark-trend-Br0GTMx_.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DYfjqLKr.js → vue-ui-spark-trend-CS6jl2aN.js} +5 -5
- package/dist/{vue-ui-sparkbar-BCqmWJWk.cjs → vue-ui-sparkbar-N8aFbuJv.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D37uDtG6.js → vue-ui-sparkbar-tgfbnVYO.js} +4 -4
- package/dist/{vue-ui-sparkgauge-Dp4bJ89f.cjs → vue-ui-sparkgauge--hgbxLQS.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-f1tYOMwd.js → vue-ui-sparkgauge-CqH25hj7.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DHYJG6d0.js → vue-ui-sparkhistogram-Cry2PFGH.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-Gh_h9QK_.cjs → vue-ui-sparkhistogram-vVRA6Z_l.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CkPExlPm.cjs → vue-ui-sparkline-BZir7JxD.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CENc9bgs.js → vue-ui-sparkline-DXwqMlzQ.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-BNUyfD4B.js → vue-ui-sparkstackbar-CQjpberv.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-WWR3yYii.cjs → vue-ui-sparkstackbar-Dc6tZvej.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BQC8Ca_b.js → vue-ui-stackbar-BF0M1KJf.js} +11 -11
- package/dist/{vue-ui-stackbar-CFIZ94i3.cjs → vue-ui-stackbar-BGmTwxvv.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-OPkq7c7M.js → vue-ui-strip-plot-C8dme7tS.js} +10 -10
- package/dist/{vue-ui-strip-plot-BEyk6uih.cjs → vue-ui-strip-plot-DT9Od_To.cjs} +1 -1
- package/dist/{vue-ui-table-DQno4vjF.js → vue-ui-table-BvbXppa1.js} +1 -1
- package/dist/{vue-ui-table-Btz8Txup.cjs → vue-ui-table-DGmUNjR_.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DAQ3DL1R.cjs → vue-ui-table-heatmap-Ch2UwsIw.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Dvl7B3i2.js → vue-ui-table-heatmap-ccoLJyce.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DJwhjePK.js → vue-ui-table-sparkline-BZ8faxdR.js} +5 -5
- package/dist/{vue-ui-table-sparkline-ZEGDkLve.cjs → vue-ui-table-sparkline-DT5a8gHs.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Dmi60VAf.js → vue-ui-thermometer-BOs1_H4X.js} +6 -6
- package/dist/{vue-ui-thermometer-DCP3GH7M.cjs → vue-ui-thermometer-Biv2CIsy.cjs} +1 -1
- package/dist/{vue-ui-timer-BjlYd8dM.cjs → vue-ui-timer-CNpKGbIg.cjs} +1 -1
- package/dist/{vue-ui-timer-BffyRll5.js → vue-ui-timer-DE_m5wxu.js} +5 -5
- package/dist/{vue-ui-tiremarks-GSBKzXEK.js → vue-ui-tiremarks-CTMS_E0z.js} +6 -6
- package/dist/{vue-ui-tiremarks-2RGbitnQ.cjs → vue-ui-tiremarks-YU4wuZl3.cjs} +1 -1
- package/dist/{vue-ui-treemap-CuYV5RnC.js → vue-ui-treemap-5Dm82baA.js} +10 -10
- package/dist/{vue-ui-treemap-D0wMLDpi.cjs → vue-ui-treemap-C0E1_DGA.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CqH76_tw.cjs → vue-ui-vertical-bar-CVZHDENz.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-n6-aILoL.js → vue-ui-vertical-bar-CVZI3v1Y.js} +10 -10
- package/dist/{vue-ui-waffle-DN0nEorT.js → vue-ui-waffle-Bf4epEaH.js} +10 -10
- package/dist/{vue-ui-waffle-CUw9wjum.cjs → vue-ui-waffle-DD09_Fdb.cjs} +1 -1
- package/dist/{vue-ui-wheel-bauD1n_w.cjs → vue-ui-wheel-BybAQ0bR.cjs} +1 -1
- package/dist/{vue-ui-wheel-gFxj5brx.js → vue-ui-wheel-DMvZZCzi.js} +6 -6
- package/dist/{vue-ui-word-cloud-BXCUAiAK.js → vue-ui-word-cloud-B8hdGDYI.js} +9 -9
- package/dist/{vue-ui-word-cloud-CzXCfW8Q.cjs → vue-ui-word-cloud-MQ0kgdPw.cjs} +1 -1
- package/dist/{vue-ui-xy-CEfc7szr.cjs → vue-ui-xy-B4C0WR56.cjs} +1 -1
- package/dist/{vue-ui-xy-BbRzriSg.js → vue-ui-xy-D3TaTkPR.js} +13 -13
- package/dist/{vue-ui-xy-canvas-Cw-F7w38.js → vue-ui-xy-canvas-ClETpddw.js} +10 -10
- package/dist/{vue-ui-xy-canvas-DhHuhTxz.cjs → vue-ui-xy-canvas-qbn0PHMN.cjs} +1 -1
- package/package.json +1 -1
- package/dist/BaseIcon-BriP3G7r.cjs +0 -1
- package/dist/PackageVersion-DMkpXFFU.cjs +0 -1
- package/dist/index-xtIm3ydy.cjs +0 -9
- package/dist/usePrinter-BrE53tUa.cjs +0 -1
- package/dist/vue-ui-carousel-table-23OR7otR.cjs +0 -1
- package/dist/vue-ui-donut-yfNvdjlP.cjs +0 -1
- package/dist/vue-ui-rating-BOGhqulq.cjs +0 -1
- package/dist/vue-ui-rating-CPuKzB4x.js +0 -271
- package/dist/vue-ui-smiley-DQEb9ejw.cjs +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-xtIm3ydy.cjs"),Ne=require("./Title-spYln43E.cjs"),ie=require("./usePrinter-BrE53tUa.cjs"),Ee=require("./DataTable-DT8VcwR5.cjs"),Te=require("./Tooltip-BgkDlGZj.cjs"),z=require("./BaseIcon-BriP3G7r.cjs"),Se=require("./vue-ui-skeleton-g8cEqYmt.cjs"),Ve=require("./vue-ui-accordion-DDiQi7FV.cjs"),ue=require("./useNestedProp-XzXFHriE.cjs"),Re=require("./PackageVersion-DMkpXFFU.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Me={__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:["zoom","hover"],setup(r,{emit:g}){const h=r;function i(a){g("zoom",a)}function u(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(P,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:P.x,cy:P.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>i(v),["stop"]),onMouseover:x=>u(v),onMouseleave:d[0]||(d[0]=x=>u(null))},null,40,ze))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:i,onHover:u},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Ie={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(i=>{i.nodes&&i.nodes.length>0&&i.nodes.forEach(u=>{u.ancestor=i})}),(i,u)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Ue)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(B=>{B.ancestor=u})}),(u,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,Oe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},qe={style:{position:"relative",height:"100%",width:"100%"}},Ae={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",qe,[e.createElementVNode("button",{onClick:i[0]||(i[0]=e.withModifiers(u=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[1]||(i[1]=e.withModifiers(u=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[2]||(i[2]=e.withModifiers(u=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[3]||(i[3]=e.withModifiers(u=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[4]||(i[4]=e.withModifiers(u=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},je=["id"],Ge={key:0,style:"width:100%;background:transparent;"},Xe=["xmlns","viewBox"],Ye=["id"],We=["stop-color"],Ze=["stop-color"],Je={key:4,class:"vue-data-ui-watermark"},Ke=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:i}=m.useConfig(),u=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),P=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),X=e.ref(null),U=e.ref(0),Y=e.ref(0),W=e.ref(0),o=e.computed({get:()=>Z(),set:t=>t});function Z(){const t=ue.useNestedProp({userConfig:h.config,defaultConfig:i});return t.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=Z(),B(),Y.value+=1,W.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:_}=ie.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ce=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function ee(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?ee(t[0].nodes,l+1):l}function de(){const t=ee(h.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const w=e.ref(de()),I=e.ref(`0 0 ${w.value.width} ${w.value.height}`);function te(t,l={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,c=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const j=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((p,F)=>{const R=j.coordinates[F];let $;if(p.ancestor?p.ancestor.ancestor?$=p.ancestor.color||V:($=ce.value[f]||m.palette[f]||V,f+=1):$=V,p.polygonPath={coordinates:[R]},p.circleRadius=c,p.color=$,p.uid=m.createUid(),p.nodes&&p.nodes.length>0){const G=!p.ancestor||!p.ancestor.ancestor?f:0;p.nodes=te(p.nodes,R,n/2.9,c/2.2,s+Math.PI*F/p.nodes.length,G,$)}})}return t}function ve(t){const l=new Set;function n(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&n(f.nodes)})}n(t);const c={};return Array.from(l).forEach((s,f)=>{c[s]=`gradient_${f}`}),c}const fe=e.computed(()=>ve(b.value)),b=e.computed(()=>te(h.dataset));function O(){x.value=!1,M.value=null,X.value=null,y.value=null,q({polygonPath:{coordinates:[{x:w.value.width/2,y:w.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){P.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:j}=t.polygonPath.coordinates[0],{circleRadius:p}=t,F=8.34,R=V-p*F,$=j-p*F,G=p*F*2,Be=p*F*2,xe=Math.sqrt((R-n)**2+($-c)**2),L=Math.min(1200,Math.max(20,Math.floor(xe/10))),we=(R-n)/L,$e=($-c)/L,Pe=(G-s)/L,Fe=(Be-f)/L;let E=0;function se(){I.value=`${n+we*E} ${c+$e*E} ${s+Pe*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(se))}se()})}function pe(t){M.value===t.uid?O():(M.value=t.uid,X.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const A=e.ref(null);function he(t){A.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const oe=e.ref(null),T=e.ref(null);function ge(t){oe.value=t,t?(C.value=!0,he(t),T.value=t.uid):(C.value=!1,v.value="",T.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function ye(t){const l=[];function n(c){c.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const ke=e.computed(()=>ye(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ke.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},c=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:c}});function le(){e.nextTick(()=>{const t=N.value.body.map((c,s)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function be(){return b.value}const S=e.ref(!1);function Ce(t){S.value=t,U.value+=1}function ne(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ae(){k.value.showTooltip=!k.value.showTooltip}return g({getData:be,generatePdf:Q,generateCsv:le,generateImage:_,toggleTable:ne,toggleLabels:re,toggleTooltip:ae}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{oe.value=null,T.value=null}),ref_key:"moleculeChart",ref:P,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&u.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:d,key:`user_options_${U.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:P.value,position:o.value.userOptions.position,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:le,onGenerateImage:e.unref(_),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:ae},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:c})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:c})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>me(n),["stop"]))},[e.createVNode(Re._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(fe.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,We),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ze)],8,Ye))),256))]),e.createVNode(Ie,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Me,{dataset:b.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:pe,onHover:ge},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:w.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae,{key:`direction_pad_${U.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>D("left")),onMoveRight:l[2]||(l[2]=n=>D("right")),onMoveTop:l[3]||(l[3]=n=>D("top")),onMoveBottom:l[4]||(l[4]=n=>D("bottom")),onReset:l[5]||(l[5]=n=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:P.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),u.value?(e.openBlock(),e.createBlock(Ve.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${W.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ke)]),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,je))}},_e=Le._export_sfc(Qe,[["__scopeId","data-v-aafaabe0"]]);exports.default=_e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-Dfhvf8hT.cjs"),Ne=require("./Title-BHmTg9iK.cjs"),ie=require("./usePrinter-BQQasUin.cjs"),Ee=require("./DataTable-BwH-MU-S.cjs"),Te=require("./Tooltip-DBzXz806.cjs"),z=require("./BaseIcon-7IlvRUX2.cjs"),Se=require("./vue-ui-skeleton-fqwO2mHD.cjs"),Ve=require("./vue-ui-accordion-Deyo7jw7.cjs"),ue=require("./useNestedProp-iuDCMc2p.cjs"),Re=require("./PackageVersion-Djty0wb2.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ze=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Me={__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:["zoom","hover"],setup(r,{emit:g}){const h=r;function i(a){g("zoom",a)}function u(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(P,M)=>(e.openBlock(),e.createElementBlock("circle",{cx:P.x,cy:P.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>i(v),["stop"]),onMouseover:x=>u(v),onMouseleave:d[0]||(d[0]=x=>u(null))},null,40,ze))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:i,onHover:u},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De=["x1","y1","x2","y2","stroke","stroke-width"],Ue=["x1","y1","x2","y2","stroke","stroke-width"],Ie={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;return e.toRef(g,"dataset").value.forEach(i=>{i.nodes&&i.nodes.length>0&&i.nodes.forEach(u=>{u.ancestor=i})}),(i,u)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,De),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Ue)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},Oe=["x","y","fill","font-size"],He={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(B=>{B.ancestor=u})}),(u,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,Oe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},qe={style:{position:"relative",height:"100%",width:"100%"}},Ae={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",qe,[e.createElementVNode("button",{onClick:i[0]||(i[0]=e.withModifiers(u=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[1]||(i[1]=e.withModifiers(u=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[2]||(i[2]=e.withModifiers(u=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[3]||(i[3]=e.withModifiers(u=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:i[4]||(i[4]=e.withModifiers(u=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},je=["id"],Ge={key:0,style:"width:100%;background:transparent;"},Xe=["xmlns","viewBox"],Ye=["id"],We=["stop-color"],Ze=["stop-color"],Je={key:4,class:"vue-data-ui-watermark"},Ke=["innerHTML"],Qe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:i}=m.useConfig(),u=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),P=e.ref(null),M=e.ref(null),x=e.ref(!1),y=e.ref(null),X=e.ref(null),U=e.ref(0),Y=e.ref(0),W=e.ref(0),o=e.computed({get:()=>Z(),set:t=>t});function Z(){const t=ue.useNestedProp({userConfig:h.config,defaultConfig:i});return t.theme?{...ue.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=Z(),B(),Y.value+=1,W.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:_}=ie.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ce=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function ee(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?ee(t[0].nodes,l+1):l}function de(){const t=ee(h.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const w=e.ref(de()),I=e.ref(`0 0 ${w.value.width} ${w.value.height}`);function te(t,l={x:-w.value.width/2.43,y:w.value.height/2},n=w.value.width/1.1,c=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const j=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((p,F)=>{const R=j.coordinates[F];let $;if(p.ancestor?p.ancestor.ancestor?$=p.ancestor.color||V:($=ce.value[f]||m.palette[f]||V,f+=1):$=V,p.polygonPath={coordinates:[R]},p.circleRadius=c,p.color=$,p.uid=m.createUid(),p.nodes&&p.nodes.length>0){const G=!p.ancestor||!p.ancestor.ancestor?f:0;p.nodes=te(p.nodes,R,n/2.9,c/2.2,s+Math.PI*F/p.nodes.length,G,$)}})}return t}function ve(t){const l=new Set;function n(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&n(f.nodes)})}n(t);const c={};return Array.from(l).forEach((s,f)=>{c[s]=`gradient_${f}`}),c}const fe=e.computed(()=>ve(b.value)),b=e.computed(()=>te(h.dataset));function O(){x.value=!1,M.value=null,X.value=null,y.value=null,q({polygonPath:{coordinates:[{x:w.value.width/2,y:w.value.height/2}]},circleRadius:24})}const H=e.ref(null);function q(t){P.value.focus(),e.nextTick(()=>{H.value&&cancelAnimationFrame(H.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:j}=t.polygonPath.coordinates[0],{circleRadius:p}=t,F=8.34,R=V-p*F,$=j-p*F,G=p*F*2,Be=p*F*2,xe=Math.sqrt((R-n)**2+($-c)**2),L=Math.min(1200,Math.max(20,Math.floor(xe/10))),we=(R-n)/L,$e=($-c)/L,Pe=(G-s)/L,Fe=(Be-f)/L;let E=0;function se(){I.value=`${n+we*E} ${c+$e*E} ${s+Pe*E} ${f+Fe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(H.value=requestAnimationFrame(se))}se()})}function pe(t){M.value===t.uid?O():(M.value=t.uid,X.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},q(t),x.value=t.uid!==b.value[0].uid)}function me(t){if(t.target.nodeName!=="circle")O(),x.value=!1;else return}const A=e.ref(null);function he(t){A.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const oe=e.ref(null),T=e.ref(null);function ge(t){oe.value=t,t?(C.value=!0,he(t),T.value=t.uid):(C.value=!1,v.value="",T.value=null)}function D(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),q(y.value)}function ye(t){const l=[];function n(c){c.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const ke=e.computed(()=>ye(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=ke.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},c=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:c}});function le(){e.nextTick(()=>{const t=N.value.body.map((c,s)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function be(){return b.value}const S=e.ref(!1);function Ce(t){S.value=t,U.value+=1}function ne(){k.value.showTable=!k.value.showTable}function re(){k.value.showDataLabels=!k.value.showDataLabels}function ae(){k.value.showTooltip=!k.value.showTooltip}return g({getData:be,generatePdf:Q,generateCsv:le,generateImage:_,toggleTable:ne,toggleLabels:re,toggleTooltip:ae}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=n=>{oe.value=null,T.value=null}),ref_key:"moleculeChart",ref:P,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",Ge,[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${Y.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&u.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:d,key:`user_options_${U.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:P.value,position:o.value.userOptions.position,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:le,onGenerateImage:e.unref(_),onToggleTable:ne,onToggleLabels:re,onToggleTooltip:ae},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:c})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:c})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>me(n),["stop"]))},[e.createVNode(Re._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(fe.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,We),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,Ze)],8,Ye))),256))]),e.createVNode(Ie,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Me,{dataset:b.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:pe,onHover:ge},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(He,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:w.value},void 0,!0)],14,Xe)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ae,{key:`direction_pad_${U.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=n=>D("left")),onMoveRight:l[2]||(l[2]=n=>D("right")),onMoveTop:l[3]||(l[3]=n=>D("top")),onMoveBottom:l[4]||(l[4]=n=>D("bottom")),onReset:l[5]||(l[5]=n=>{O(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Te._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:P.value,content:v.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),u.value?(e.openBlock(),e.createBlock(Ve.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${W.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,Ke)]),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,je))}},_e=Le._export_sfc(Qe,[["__scopeId","data-v-aafaabe0"]]);exports.default=_e;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { toRef as re, resolveComponent as ie, openBlock as s, createElementBlock as r, Fragment as y, renderList as z, withModifiers as H, createBlock as F, createCommentVNode as m, createElementVNode as $, toDisplayString as Le, normalizeStyle as ne, createVNode as S, computed as O, onMounted as Ze, ref as f, watch as Je, normalizeClass as Pe, unref as N, createSlots as Ke, withCtx as C, renderSlot as P, normalizeProps as J, guardReactiveProps as K, createTextVNode as Qe, nextTick as Te } from "vue";
|
|
2
|
-
import { u as _e, o as et, e as tt, c as Fe, t as ot, a as lt, p as Re, b as at, X as st, l as nt, O as rt, q as it, r as ut, x as ct, y as dt } from "./index-
|
|
3
|
-
import { _ as vt } from "./Title-
|
|
4
|
-
import { u as ft, U as pt } from "./usePrinter-
|
|
5
|
-
import { D as ht } from "./DataTable-
|
|
6
|
-
import { _ as gt } from "./Tooltip-
|
|
7
|
-
import W from "./BaseIcon-
|
|
8
|
-
import yt from "./vue-ui-skeleton-
|
|
9
|
-
import mt from "./vue-ui-accordion-
|
|
10
|
-
import { u as Se } from "./useNestedProp-
|
|
11
|
-
import { _ as bt } from "./PackageVersion-
|
|
2
|
+
import { u as _e, o as et, e as tt, c as Fe, t as ot, a as lt, p as Re, b as at, X as st, l as nt, O as rt, q as it, r as ut, x as ct, y as dt } from "./index-B0CpCD8z.js";
|
|
3
|
+
import { _ as vt } from "./Title-DlVZnHjs.js";
|
|
4
|
+
import { u as ft, U as pt } from "./usePrinter-Dr30K4cu.js";
|
|
5
|
+
import { D as ht } from "./DataTable-DAgyf9zN.js";
|
|
6
|
+
import { _ as gt } from "./Tooltip-CveCRFgK.js";
|
|
7
|
+
import W from "./BaseIcon-BUTpMnXi.js";
|
|
8
|
+
import yt from "./vue-ui-skeleton-DEv_1TFa.js";
|
|
9
|
+
import mt from "./vue-ui-accordion-CmENcGVW.js";
|
|
10
|
+
import { u as Se } from "./useNestedProp-DGWP4D-K.js";
|
|
11
|
+
import { _ as bt } from "./PackageVersion-wB6dCDZw.js";
|
|
12
12
|
import { _ as kt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const Ct = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], $t = {
|
|
14
14
|
__name: "RecursiveCircles",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-xtIm3ydy.cjs"),X=require("./Title-spYln43E.cjs"),S=require("./usePrinter-BrE53tUa.cjs"),K=require("./Legend-BiaVNQjc.cjs"),p=require("./BaseIcon-BriP3G7r.cjs"),Y=require("./DataTable-DT8VcwR5.cjs"),J=require("./vue-ui-skeleton-g8cEqYmt.cjs"),Q=require("./vue-ui-accordion-DDiQi7FV.cjs"),T=require("./useNestedProp-XzXFHriE.cjs"),Z=require("./PackageVersion-DMkpXFFU.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.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 g=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(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:x,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(X._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.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Z._sfc_main),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,re),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,ne)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.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,se))),256)),e.createElementVNode("path",{d:C.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,ue),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,ie),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,ce),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,de),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,ye),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,me),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,he),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,fe),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,pe),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,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.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,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(o=>o.plots),(o,u)=>(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,be),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,Ce),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,Ne),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:u})),9,xe),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/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.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(p.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(p.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(p.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(p.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",Pe,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:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Dfhvf8hT.cjs"),X=require("./Title-BHmTg9iK.cjs"),S=require("./usePrinter-BQQasUin.cjs"),K=require("./Legend-CHQgjBuK.cjs"),p=require("./BaseIcon-7IlvRUX2.cjs"),Y=require("./DataTable-BwH-MU-S.cjs"),J=require("./vue-ui-skeleton-fqwO2mHD.cjs"),Q=require("./vue-ui-accordion-Deyo7jw7.cjs"),T=require("./useNestedProp-iuDCMc2p.cjs"),Z=require("./PackageVersion-Djty0wb2.cjs"),ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=["id"],oe={key:0,style:"width:100%;background:transparent"},le=["xmlns","viewBox"],ae=["id"],re=["stop-color"],ne=["stop-color"],se=["x1","y1","x2","y2","stroke","stroke-width"],ue=["d","stroke","stroke-width"],ie=["stroke"],ce=["fill"],de=["stroke"],ye=["fill"],ve=["stroke"],me=["fill"],he=["stroke"],fe=["fill"],pe=["stroke"],ke=["fill"],ge=["d","stroke","stroke-width","fill"],be=["x1","y1","stroke"],Ce=["cx","cy","fill","stroke"],Ne=["fill","stroke"],xe=["y","fill","font-weight"],we=["y","fill"],_e={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Pe={style:{"font-weight":"bold"}},Me=["innerHTML"],$e={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(O,{expose:A}){const s=O,{vue_ui_mood_radar:I}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{N()});function N(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),x=e.ref(null),F=e.ref(null),n=e.ref(null),D=e.ref(0),q=e.ref(0),w=e.ref(0),t=e.computed({get:()=>_(),set:l=>l});function _(){const l=T.useNestedProp({userConfig:s.config,defaultConfig:I});return l.theme?{...T.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=_(),N(),D.value+=1,q.value+=1,w.value+=1},{deep:!0});const{isPrinting:V,isImaging:P,generatePdf:M,generateImage:$}=S.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function z({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:f,value:R}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:f,value:R}}const j=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),v=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/v.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),B=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),C.value.coordinates.map((l,a)=>{const o=z({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/j.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),W=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 G(l){l===n.value?n.value=null:n.value=l}const y=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function E(){e.nextTick(()=>{const l=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.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 g=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(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.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},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function U(){return i.value}function L(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function H(l){b.value=l}return A({getData:U,generatePdf:M,generateCsv:E,generateImage:$,toggleTable:L}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:x,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(X._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.openBlock(),e.createBlock(S.UserOptions,{key:1,ref_key:"details",ref:F,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(V),isImaging:e.unref(P),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,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,position:t.value.userOptions.position,onToggleFullscreen:H,onGeneratePdf:e.unref(M),onGenerateCsv:E,onGenerateImage:e.unref($),onToggleTable:L},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Z._sfc_main),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,re),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,ne)],8,ae)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.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,se))),256)),e.createElementVNode("path",{d:C.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,ue),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,ie),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,ce),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,de),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,ye),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,me),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,he),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,fe),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,pe),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,ke),e.createElementVNode("path",{d:e.unref(r.makePath)(B.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,ge),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.map(o=>o.plots),(o,u)=>(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,be),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,Ce),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,Ne),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:u})),9,xe),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/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,we)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,le)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",_e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(V)||e.unref(P)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(J.default,{key:4,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(K.Legend,{legendSet:i.value,config:W.value,key:`legend_${w.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>G(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(p.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(p.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(p.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(p.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(p.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",Pe,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:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Ve)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(Q.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Y.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.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=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Me)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,te))}},Be=ee._export_sfc($e,[["__scopeId","data-v-bded5f3b"]]);exports.default=Be;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as c, onMounted as he, ref as h, watch as fe, openBlock as n, createElementBlock as k, normalizeClass as R, normalizeStyle as O, createVNode as F, createCommentVNode as i, createBlock as f, unref as s, createSlots as me, withCtx as m, renderSlot as b, normalizeProps as X, guardReactiveProps as K, createElementVNode as a, Fragment as q, renderList as Y, toDisplayString as M, createTextVNode as J, nextTick as pe } from "vue";
|
|
2
|
-
import { u as ge, o as ke, e as Q, c as be, t as Ce, O as xe, X as _e, s as C, w as we, P as $e, i as Z, f as A, q as Me, r as Pe } from "./index-
|
|
3
|
-
import { _ as Ne } from "./Title-
|
|
4
|
-
import { u as Le, U as Te } from "./usePrinter-
|
|
5
|
-
import { L as Ae } from "./Legend-
|
|
6
|
-
import P from "./BaseIcon-
|
|
7
|
-
import { D as Ie } from "./DataTable-
|
|
8
|
-
import Oe from "./vue-ui-skeleton-
|
|
9
|
-
import Fe from "./vue-ui-accordion-
|
|
10
|
-
import { u as ee } from "./useNestedProp-
|
|
11
|
-
import { _ as Se } from "./PackageVersion-
|
|
2
|
+
import { u as ge, o as ke, e as Q, c as be, t as Ce, O as xe, X as _e, s as C, w as we, P as $e, i as Z, f as A, q as Me, r as Pe } from "./index-B0CpCD8z.js";
|
|
3
|
+
import { _ as Ne } from "./Title-DlVZnHjs.js";
|
|
4
|
+
import { u as Le, U as Te } from "./usePrinter-Dr30K4cu.js";
|
|
5
|
+
import { L as Ae } from "./Legend-DBhpIX2x.js";
|
|
6
|
+
import P from "./BaseIcon-BUTpMnXi.js";
|
|
7
|
+
import { D as Ie } from "./DataTable-DAgyf9zN.js";
|
|
8
|
+
import Oe from "./vue-ui-skeleton-DEv_1TFa.js";
|
|
9
|
+
import Fe from "./vue-ui-accordion-CmENcGVW.js";
|
|
10
|
+
import { u as ee } from "./useNestedProp-DGWP4D-K.js";
|
|
11
|
+
import { _ as Se } from "./PackageVersion-wB6dCDZw.js";
|
|
12
12
|
import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const je = ["id"], Be = {
|
|
14
14
|
key: 0,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as g, ref as d, watch as De, onMounted as Ke, onBeforeUnmount as Je, openBlock as u, createElementBlock as n, normalizeClass as z, normalizeStyle as ue, createBlock as P, createCommentVNode as y, unref as r, createSlots as Qe, withCtx as m, renderSlot as $, normalizeProps as q, guardReactiveProps as K, createVNode as Oe, createElementVNode as p, Fragment as x, renderList as S, toDisplayString as T, createTextVNode as J, nextTick as Ze, pushScopeId as je, popScopeId as et } from "vue";
|
|
2
|
-
import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, I as ze, d as nt, m as Pe, f as L, X as rt, s as Ae, K as it, k as V, n as ne, i as R, x as Ve, y as dt, q as ct, r as vt } from "./index-
|
|
2
|
+
import { u as tt, c as lt, t as at, a as ot, p as Q, o as st, e as A, b as ut, I as ze, d as nt, m as Pe, f as L, X as rt, s as Ae, K as it, k as V, n as ne, i as R, x as Ve, y as dt, q as ct, r as vt } from "./index-B0CpCD8z.js";
|
|
3
3
|
import { t as ft, u as ht } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as yt } from "./Title-
|
|
5
|
-
import { u as pt, U as bt } from "./usePrinter-
|
|
6
|
-
import { D as gt } from "./DataTable-
|
|
7
|
-
import { _ as mt } from "./Tooltip-
|
|
8
|
-
import { L as _t } from "./Legend-
|
|
9
|
-
import wt from "./vue-ui-skeleton-
|
|
10
|
-
import kt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Me } from "./useNestedProp-
|
|
12
|
-
import { _ as xt } from "./PackageVersion-
|
|
4
|
+
import { _ as yt } from "./Title-DlVZnHjs.js";
|
|
5
|
+
import { u as pt, U as bt } from "./usePrinter-Dr30K4cu.js";
|
|
6
|
+
import { D as gt } from "./DataTable-DAgyf9zN.js";
|
|
7
|
+
import { _ as mt } from "./Tooltip-CveCRFgK.js";
|
|
8
|
+
import { L as _t } from "./Legend-DBhpIX2x.js";
|
|
9
|
+
import wt from "./vue-ui-skeleton-DEv_1TFa.js";
|
|
10
|
+
import kt from "./vue-ui-accordion-CmENcGVW.js";
|
|
11
|
+
import { u as Me } from "./useNestedProp-DGWP4D-K.js";
|
|
12
|
+
import { _ as xt } from "./PackageVersion-wB6dCDZw.js";
|
|
13
13
|
import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const re = (M) => (je("data-v-e05474aa"), M = M(), et(), M), Lt = ["id"], Ct = ["xmlns", "viewBox"], Ft = ["id"], St = /* @__PURE__ */ re(() => /* @__PURE__ */ p("stop", {
|
|
15
15
|
offset: "0%",
|
|
@@ -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-Dfhvf8hT.cjs"),ce=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-BHmTg9iK.cjs"),de=require("./usePrinter-BQQasUin.cjs"),xe=require("./DataTable-BwH-MU-S.cjs"),Be=require("./Tooltip-DBzXz806.cjs"),_e=require("./Legend-CHQgjBuK.cjs"),$e=require("./vue-ui-skeleton-fqwO2mHD.cjs"),Ne=require("./vue-ui-accordion-Deyo7jw7.cjs"),ve=require("./useNestedProp-iuDCMc2p.cjs"),Se=require("./PackageVersion-Djty0wb2.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M=w=>(e.pushScopeId("data-v-e05474aa"),w=w(),e.popScopeId(),w),Fe=["id"],Ve=["xmlns","viewBox"],Te=["id"],De=M(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),ze=["offset","stop-color"],Pe=["offset","stop-opacity"],Oe=M(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Ie=["id"],Ae=["id"],Me=M(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Re=["id"],Ue=["flood-color"],qe=["d","fill","stroke","stroke-width","filter"],Ye={key:0},Xe=["d","fill"],Ge={key:1},He=["x","y","font-size","font-weight","fill"],We={key:2},Je=["filter"],Ke=["text-anchor","x","y","fill","font-size","font-weight"],Qe=["text-anchor","x","y","fill","font-size","font-weight"],Ze=["text-anchor","x","y","fill","font-size","font-weight"],je=["d","fill","onMouseenter","onClick"],et={key:3,class:"vue-data-ui-watermark"},tt={key:0,class:"vue-ui-nested-donuts-legend-title"},lt=["onClick"],at=["innerHTML"],ot={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(w,{expose:fe,emit:R}){const k=w,{vue_ui_nested_donuts:pe}=r.useConfig(),_=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),V=e.ref(!1),T=e.ref(""),he=e.ref(null),U=e.ref(0),x=e.ref(null),q=e.ref(null),D=e.ref(null),Y=e.ref(0),X=e.ref(0),G=e.ref(0),B=e.ref(!1);function ye(l){B.value=l,U.value+=1}const t=e.computed({get:()=>H(),set:l=>l});function H(){const l=ve.useNestedProp({userConfig:k.config,defaultConfig:pe});return l.theme?{...ve.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=H(),W(),Y.value+=1,X.value+=1,G.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{W()});function W(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ce.throttle(()=>{const{width:s,height:o}=ce.useResponsive({chart:x.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?D.value:null});d.value.width=s,d.value.height=o});$.value=new ResizeObserver(l),$.value.observe(x.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),me=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function be({datapoint:l,index:s}){R("selectDatapoint",{datapoint:l,index:s})}const v=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=>!v.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:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||me.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(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),j=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function ge(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 c=e.ref(j.value);e.watch(()=>j.value,l=>c.value=l);const ee=e.ref(null),te=e.ref(null);function z(l){R("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.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),f=ge(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ee.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ee.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(te.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),te.value=requestAnimationFrame(i))};i()}}const P=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),le=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,P.value)}})),ae=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.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]}})),oe=e.ref(null),S=e.ref(null),E=e.ref(null),O=e.ref(null);function ke({datapoint:l,_relativeIndex:s,seriesIndex:o}){oe.value=l.arcOfId,S.value=l.id,E.value=o,O.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)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,15 +1,15 @@
|
|
|
1
1
|
import { computed as d, ref as n, watch as he, onMounted as Ne, onBeforeUnmount as Re, openBlock as s, createElementBlock as u, normalizeClass as z, normalizeStyle as W, createBlock as C, createCommentVNode as b, unref as v, createSlots as Ae, withCtx as h, renderSlot as g, normalizeProps as Y, guardReactiveProps as B, createVNode as fe, Fragment as M, renderList as F, createElementVNode as _, toDisplayString as T, createTextVNode as De, nextTick as Le } from "vue";
|
|
2
|
-
import { u as ze, c as Ye, t as Be, a as Ve, p as ge, b as Xe, o as Ge, e as j, d as Ue, X as Ee, f as N, i as q, x as pe, q as He, r as We, y as je } from "./index-
|
|
2
|
+
import { u as ze, c as Ye, t as Be, a as Ve, p as ge, b as Xe, o as Ge, e as j, d as Ue, X as Ee, f as N, i as q, x as pe, q as He, r as We, y as je } from "./index-B0CpCD8z.js";
|
|
3
3
|
import { t as qe, u as Je } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Ke } from "./Title-
|
|
5
|
-
import { u as Qe, U as Ze } from "./usePrinter-
|
|
6
|
-
import { L as et } from "./Legend-
|
|
7
|
-
import { D as tt } from "./DataTable-
|
|
8
|
-
import { _ as at } from "./Tooltip-
|
|
9
|
-
import lt from "./vue-ui-skeleton-
|
|
10
|
-
import ot from "./vue-ui-accordion-
|
|
11
|
-
import { u as ye } from "./useNestedProp-
|
|
12
|
-
import { _ as rt } from "./PackageVersion-
|
|
4
|
+
import { _ as Ke } from "./Title-DlVZnHjs.js";
|
|
5
|
+
import { u as Qe, U as Ze } from "./usePrinter-Dr30K4cu.js";
|
|
6
|
+
import { L as et } from "./Legend-DBhpIX2x.js";
|
|
7
|
+
import { D as tt } from "./DataTable-DAgyf9zN.js";
|
|
8
|
+
import { _ as at } from "./Tooltip-CveCRFgK.js";
|
|
9
|
+
import lt from "./vue-ui-skeleton-DEv_1TFa.js";
|
|
10
|
+
import ot from "./vue-ui-accordion-CmENcGVW.js";
|
|
11
|
+
import { u as ye } from "./useNestedProp-DGWP4D-K.js";
|
|
12
|
+
import { _ as rt } from "./PackageVersion-wB6dCDZw.js";
|
|
13
13
|
import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const nt = ["id"], ut = ["xmlns", "viewBox"], it = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], ct = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], dt = ["id"], vt = ["stdDeviation"], ht = ["filter"], ft = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], gt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], pt = { key: 1 }, yt = ["onMouseenter"], mt = ["x", "y", "font-size", "fill", "font-weight"], bt = {
|
|
15
15
|
key: 3,
|
|
@@ -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-Dfhvf8hT.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),he=require("./Title-BHmTg9iK.cjs"),J=require("./usePrinter-BQQasUin.cjs"),pe=require("./Legend-CHQgjBuK.cjs"),fe=require("./DataTable-BwH-MU-S.cjs"),ge=require("./Tooltip-DBzXz806.cjs"),me=require("./vue-ui-skeleton-fqwO2mHD.cjs"),ye=require("./vue-ui-accordion-Deyo7jw7.cjs"),K=require("./useNestedProp-iuDCMc2p.cjs"),be=require("./PackageVersion-Djty0wb2.cjs"),ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),we=["id"],Ce=["xmlns","viewBox"],xe=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],$e=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Be=["id"],Te=["stdDeviation"],_e=["filter"],Se=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Pe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ne={key:1},Oe=["onMouseenter"],Fe=["x","y","font-size","fill","font-weight"],Ie={key:3,class:"vue-data-ui-watermark"},Ve=["onClick"],Ee=["innerHTML"],Le={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Q,{expose:Z,emit:ee}){const p=Q,{vue_ui_onion:te}=u.useConfig(),C=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),ae=e.ref(null),F=e.ref(0),x=e.ref(!1),T=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),V=e.ref(null),E=e.ref(0),L=e.ref(0),M=e.ref(0),t=e.computed({get:()=>D(),set:l=>l});function D(){const l=K.useNestedProp({userConfig:p.config,defaultConfig:te});return l.theme?{...K.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=D(),Y(),E.value+=1,L.value+=1,M.value+=1},{deep:!0});const{isPrinting:R,isImaging:z,generatePdf:A,generateImage:q}=J.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),le=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=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}),$=e.ref(null);e.onMounted(()=>{Y()});function Y(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=j.throttle(()=>{const{width:a,height:o}=j.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?V.value:null});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});$.value=new ResizeObserver(r),$.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.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(()=>(p.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})}),p.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)||le.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>X(a),isSegregated:d.value.includes(a)}}))),b=e.ref(i.value),oe=e.computed(()=>t.value.useStartAnimation),re=e.ref(null),ne=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),_=e.ref(!1);e.watch(()=>i.value,ue,{immediate:!0});function ue(){if(oe.value&&!_.value){let r=function(){l>=ne.value?(cancelAnimationFrame(re.value),b.value=i.value,_.value=!0):(b.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),_.value=!0)};b.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else b.value=i.value}const se=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":""})),ie=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}}),v=e.computed(()=>b.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ie.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ce(a,l.percentage||0)}}));function ce(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,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-Dfhvf8hT.cjs"),le=require("./useResponsive-B3TrDDIG.cjs"),ye=require("./Title-BHmTg9iK.cjs"),fe=require("./Legend-CHQgjBuK.cjs"),ge=require("./Tooltip-DBzXz806.cjs"),be=require("./Shape-DQ0Hh2Gg.cjs"),ae=require("./usePrinter-BQQasUin.cjs"),ke=require("./DataTable-BwH-MU-S.cjs"),xe=require("./vue-ui-accordion-Deyo7jw7.cjs"),Ce=require("./vue-ui-skeleton-fqwO2mHD.cjs"),oe=require("./useNestedProp-iuDCMc2p.cjs"),we=require("./PackageVersion-Djty0wb2.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],$e=["xmlns","viewBox"],ze={style:{"pointer-events":"none"}},Ne=["x1","x2","y1","y2","stroke","stroke-width"],_e=["x","y","fill","font-size","font-weight"],Te=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x","y","fill","font-size","font-weight"],Pe={key:0},Ae=["x","y","font-size","fill"],Me=["width","x","y"],Le={style:{width:"100%"}},Ee=["x","y","fill","font-weight","font-size","onMouseenter"],Ie=["d","stroke","stroke-width","onMouseenter"],Ve={key:3,class:"vue-data-ui-watermark"},De=["onClick"],Oe=["innerHTML"],qe={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ne,{expose:se,emit:M}){const b=ne,{vue_ui_parallel_coordinate_plot:re}=i.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),w=e.ref(null),E=e.ref(null),I=e.ref(null),V=e.ref(0),D=e.ref(0),O=e.ref(0),N=e.ref(i.createUid()),B=e.ref(!1);function ie(l){B.value=l,L.value+=1}const t=e.computed({get:()=>q(),set:l=>l});function q(){const l=oe.useNestedProp({userConfig:b.config,defaultConfig:re});return l.theme?{...oe.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=q(),R(),V.value+=1,O.value+=1,D.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{R()});function R(){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=le.throttle(()=>{const{width:o,height:a}=le.useResponsive({chart:w.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?I.value:null});c.value.width=o,c.value.height=a,c.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});$.value=new ResizeObserver(l),$.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:U,isImaging:W,generatePdf:j,generateImage:H}=ae.usePrinter({elementId:`pcp_${N.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),c=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}),d=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.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}}),ue=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),m=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 G(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)||ue.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"}})),ce=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>G(l.id),isSegregated:f.value.includes(l.id)}))),de=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":""})),Y=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(()=>d.value.width/Y.value),_=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),h=e.computed(()=>{let l=[];for(let o=0;o<Y.value;o+=1){const a=Math.min(..._.value.flatMap(v=>v.series.map(z=>z.values[o]||0)||0)),n=Math.max(..._.value.flatMap(v=>v.series.map(z=>z.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((v,z)=>{const he=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),me=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(he/me),x:d.value.left+y.value*o+y.value/2,value:v}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),T=e.computed(()=>_.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=h.value[s].scale.min<0?(r||0)+Math.abs(h.value[s].scale.min):(r||0)-Math.abs(h.value[s].scale.min),g=h.value[s].scale.min<0?h.value[s].scale.max+Math.abs(h.value[s].scale.min):h.value[s].scale.max-Math.abs(h.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.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 X({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 p=e.ref(null),F=e.ref(null),S=e.ref(!1),P=e.ref("");function A({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){F.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:h.value},S.value=!0,p.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:h.value}))?P.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:h.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>`,h.value.map(g=>g.name).forEach((g,v)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as f, ref as h, watch as De, onMounted as We, onBeforeUnmount as Ee, openBlock as i, createElementBlock as u, normalizeClass as B, normalizeStyle as z, createBlock as I, createCommentVNode as g, unref as A, createSlots as Be, withCtx as b, renderSlot as x, normalizeProps as R, guardReactiveProps as j, createVNode as xe, Fragment as C, renderList as M, createElementVNode as F, toDisplayString as S, createTextVNode as Re } from "vue";
|
|
2
|
-
import { u as je, c as J, t as Ue, a as Ve, p as U, o as Ge, e as ke, g as He, b as Xe, d as Ye, C as qe, Q as Qe, R as Je, S as Ke, X as Ze, x as Ce, i as we, f as $e, y as et, q as tt, r as at, E as V } from "./index-
|
|
2
|
+
import { u as je, c as J, t as Ue, a as Ve, p as U, o as Ge, e as ke, g as He, b as Xe, d as Ye, C as qe, Q as Qe, R as Je, S as Ke, X as Ze, x as Ce, i as we, f as $e, y as et, q as tt, r as at, E as V } from "./index-B0CpCD8z.js";
|
|
3
3
|
import { t as lt, u as ot } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as st } from "./Title-
|
|
5
|
-
import { L as nt } from "./Legend-
|
|
6
|
-
import { _ as it } from "./Tooltip-
|
|
7
|
-
import { _ as ut } from "./Shape-
|
|
8
|
-
import { u as rt, U as ct } from "./usePrinter-
|
|
9
|
-
import { D as vt } from "./DataTable-
|
|
10
|
-
import dt from "./vue-ui-accordion-
|
|
11
|
-
import ht from "./vue-ui-skeleton-
|
|
12
|
-
import { u as _e } from "./useNestedProp-
|
|
13
|
-
import { _ as pt } from "./PackageVersion-
|
|
4
|
+
import { _ as st } from "./Title-DlVZnHjs.js";
|
|
5
|
+
import { L as nt } from "./Legend-DBhpIX2x.js";
|
|
6
|
+
import { _ as it } from "./Tooltip-CveCRFgK.js";
|
|
7
|
+
import { _ as ut } from "./Shape-CQVJz33T.js";
|
|
8
|
+
import { u as rt, U as ct } from "./usePrinter-Dr30K4cu.js";
|
|
9
|
+
import { D as vt } from "./DataTable-DAgyf9zN.js";
|
|
10
|
+
import dt from "./vue-ui-accordion-CmENcGVW.js";
|
|
11
|
+
import ht from "./vue-ui-skeleton-DEv_1TFa.js";
|
|
12
|
+
import { u as _e } from "./useNestedProp-DGWP4D-K.js";
|
|
13
|
+
import { _ as pt } from "./PackageVersion-wB6dCDZw.js";
|
|
14
14
|
import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const yt = ["id"], ft = ["xmlns", "viewBox"], gt = { style: { "pointer-events": "none" } }, bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], xt = ["x", "y", "fill", "font-size", "font-weight"], kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ct = ["x", "y", "fill", "font-size", "font-weight"], wt = { key: 0 }, $t = ["x", "y", "font-size", "fill"], _t = ["width", "x", "y"], Tt = { style: { width: "100%" } }, zt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], At = ["d", "stroke", "stroke-width", "onMouseenter"], Mt = {
|
|
16
16
|
key: 3,
|