vue-data-ui 2.6.2 → 2.6.3
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/README.md +4 -4
- package/dist/{Arrow-DnYsOsEt.cjs → Arrow-CUx3sy0R.cjs} +1 -1
- package/dist/{Arrow-B4TCBt4-.js → Arrow-CaNCmIG1.js} +1 -1
- package/dist/{BaseIcon-DTJIrD3k.js → BaseIcon-CFtrFJk8.js} +1 -1
- package/dist/{BaseIcon-Dn1igOva.cjs → BaseIcon-DEUnx0Km.cjs} +1 -1
- package/dist/{DataTable-BWABkdIL.js → DataTable-g-vVSX5e.js} +2 -2
- package/dist/{DataTable-Cybmjq2W.cjs → DataTable-o267EcsS.cjs} +1 -1
- package/dist/{Legend-Bf8J9KZk.cjs → Legend-14o6ysPB.cjs} +1 -1
- package/dist/{Legend-du4CJMG1.js → Legend-D3s69_UE.js} +2 -2
- package/dist/{PackageVersion-Bmro6-lR.cjs → PackageVersion-GUCKUltM.cjs} +1 -1
- package/dist/{PackageVersion-Dqo8V-i_.js → PackageVersion-koLOUagZ.js} +1 -1
- package/dist/{PenAndPaper-B7dv_ssy.cjs → PenAndPaper-BFxCZMe_.cjs} +1 -1
- package/dist/{PenAndPaper-QsaleY3R.js → PenAndPaper-NARoVmb-.js} +3 -3
- package/dist/{Shape-D_MGNYEa.js → Shape-BQwPhaQ2.js} +1 -1
- package/dist/{Shape-QydDpcqr.cjs → Shape-DQcajuPX.cjs} +1 -1
- package/dist/{Slicer-DKXIt2om.js → Slicer-BHKjr5Ta.js} +2 -2
- package/dist/{Slicer-Vzo3baUi.cjs → Slicer-D2-FPJ8d.cjs} +1 -1
- package/dist/{Title-MKfkLka7.js → Title-BrlBOQMX.js} +1 -1
- package/dist/{Title-x7Hmi2zb.cjs → Title-IEvHjzFX.cjs} +1 -1
- package/dist/{Tooltip-BUMgVEu0.js → Tooltip-2BVEpShN.js} +1 -1
- package/dist/{Tooltip-pA64woiQ.cjs → Tooltip-Ce3-d-Jl.cjs} +1 -1
- package/dist/documentation/installation.md +4 -4
- package/dist/{index-B8uVRkA1.js → index-Sq6_Z5Ol.js} +1 -1
- package/dist/{index-Bmq5HB9y.cjs → index-TsXfF4RW.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CivZENAh.cjs → useNestedProp-AmCRQ0Mq.cjs} +1 -1
- package/dist/{useNestedProp-kStEZqtl.js → useNestedProp-BmjPdxME.js} +1 -1
- package/dist/{usePrinter-Cf6Zct5m.cjs → usePrinter-DqLdu0d8.cjs} +1 -1
- package/dist/{usePrinter-CppD6oY_.js → usePrinter-KhQnrZzM.js} +1 -1
- package/dist/{vue-data-ui-ZZGY9nKv.js → vue-data-ui-BDtCPTUD.js} +61 -61
- package/dist/{vue-data-ui-HGY4nSGa.cjs → vue-data-ui-W8pd2Z-N.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-DbhESYsC.js → vue-ui-3d-bar-BSNWr70h.js} +9 -9
- package/dist/{vue-ui-3d-bar-BMZJgQzl.cjs → vue-ui-3d-bar-CQarDWrH.cjs} +1 -1
- package/dist/{vue-ui-accordion-CE2Pnpz3.js → vue-ui-accordion-Cs3dJ86t.js} +3 -3
- package/dist/{vue-ui-accordion-WWblnzaJ.cjs → vue-ui-accordion-DQr01ula.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DzPdTFTe.cjs → vue-ui-age-pyramid-CXRisfK0.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-CxW84Zy4.js → vue-ui-age-pyramid-nfG0pqCk.js} +10 -10
- package/dist/{vue-ui-annotator-D5PCmH8u.cjs → vue-ui-annotator-D4f8pjvy.cjs} +1 -1
- package/dist/{vue-ui-annotator-DuS_kY-C.js → vue-ui-annotator-qbVoTl_7.js} +1 -1
- package/dist/{vue-ui-bullet-CvB9cU_g.js → vue-ui-bullet-C7O_SGrf.js} +8 -8
- package/dist/{vue-ui-bullet-DND6LL0P.cjs → vue-ui-bullet-tNkxVPL6.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C76ZVkkY.js → vue-ui-candlestick-C5w6Q5tA.js} +11 -11
- package/dist/{vue-ui-candlestick-Bq4VyBVk.cjs → vue-ui-candlestick-CHWTbUPr.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CdwSAavZ.cjs → vue-ui-carousel-table-BnyQxoK_.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-DPlos7Us.js → vue-ui-carousel-table-DhlknuHM.js} +4 -4
- package/dist/{vue-ui-chestnut-CB4BA3mx.js → vue-ui-chestnut-CxDFoe_1.js} +8 -8
- package/dist/{vue-ui-chestnut-CH1rO8yv.cjs → vue-ui-chestnut-DXSCCzCc.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-DslAztEw.js → vue-ui-circle-pack-8GcO3_Mk.js} +9 -9
- package/dist/{vue-ui-circle-pack-T0baWnD4.cjs → vue-ui-circle-pack-DCVBrNSm.cjs} +1 -1
- package/dist/{vue-ui-cursor-CNrbLYcU.js → vue-ui-cursor-DqTG5Bkn.js} +2 -2
- package/dist/{vue-ui-cursor-tyy0Lbsc.cjs → vue-ui-cursor-ZG_l61-u.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BIQYUy0X.js → vue-ui-dashboard-BUA1xet-.js} +2 -2
- package/dist/{vue-ui-dashboard-2EJIfom5.cjs → vue-ui-dashboard-CM_JWUb1.cjs} +1 -1
- package/dist/{vue-ui-digits-9j9HvJAE.cjs → vue-ui-digits-BTw7SVPJ.cjs} +1 -1
- package/dist/{vue-ui-digits-B9zkzbxp.js → vue-ui-digits-NaC5TAtZ.js} +2 -2
- package/dist/{vue-ui-donut-CTTVwsjp.js → vue-ui-donut-BNUwbtTK.js} +12 -12
- package/dist/{vue-ui-donut-MNv-tPgT.cjs → vue-ui-donut-CxRlW3Wf.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-QrqawlMF.js → vue-ui-donut-evolution-CAmcyYYg.js} +11 -11
- package/dist/{vue-ui-donut-evolution-ByfZmrmA.cjs → vue-ui-donut-evolution-MrRKOI1i.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DbJC4PQf.js → vue-ui-dumbbell-B-HdfY_j.js} +10 -10
- package/dist/{vue-ui-dumbbell-DdFhLM7x.cjs → vue-ui-dumbbell-C6Lgic0q.cjs} +1 -1
- package/dist/{vue-ui-flow-oXRtEqoD.js → vue-ui-flow-BrQovUAh.js} +9 -9
- package/dist/{vue-ui-flow-D3fu0o6H.cjs → vue-ui-flow-VBP_6WA8.cjs} +1 -1
- package/dist/{vue-ui-funnel-wG5mmmoA.js → vue-ui-funnel-B8-Uj9S3.js} +9 -9
- package/dist/{vue-ui-funnel-Btk9EM8C.cjs → vue-ui-funnel-BIupy22h.cjs} +1 -1
- package/dist/{vue-ui-galaxy-D0chyXGV.cjs → vue-ui-galaxy-BbysRccu.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DKsUFAVZ.js → vue-ui-galaxy-hElQRBl6.js} +11 -11
- package/dist/{vue-ui-gauge-CVS_Ragk.js → vue-ui-gauge-BxavhokI.js} +7 -7
- package/dist/{vue-ui-gauge-BgRQ_PbK.cjs → vue-ui-gauge-CgUeFE-O.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D4BHhwJ8.js → vue-ui-gizmo-Ci0pE9Nw.js} +3 -3
- package/dist/{vue-ui-gizmo-Dhu6rJ9P.cjs → vue-ui-gizmo-DSLh6fXp.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BGioOZJj.js → vue-ui-heatmap-BN1FdDqM.js} +10 -10
- package/dist/{vue-ui-heatmap-EGSWPEkM.cjs → vue-ui-heatmap-D5QJROY5.cjs} +1 -1
- package/dist/{vue-ui-history-plot-B18G7ARJ.js → vue-ui-history-plot-D8Y08JYH.js} +11 -11
- package/dist/{vue-ui-history-plot-Be4mtSAH.cjs → vue-ui-history-plot-DqnirTGv.cjs} +1 -1
- package/dist/{vue-ui-kpi-B7rHhQ3H.cjs → vue-ui-kpi-DbKHOVxZ.cjs} +1 -1
- package/dist/{vue-ui-kpi-BK1Vq6tA.js → vue-ui-kpi-DbbXD09A.js} +3 -3
- package/dist/{vue-ui-mini-loader-lAOgjMme.js → vue-ui-mini-loader-BbQzMsAO.js} +2 -2
- package/dist/{vue-ui-mini-loader-DrWDl3Hc.cjs → vue-ui-mini-loader-FNEOkheZ.cjs} +1 -1
- package/dist/{vue-ui-molecule-TSwsc6wZ.cjs → vue-ui-molecule-CCPkPyjT.cjs} +1 -1
- package/dist/{vue-ui-molecule-DEKmU-Mx.js → vue-ui-molecule-DmZCUvJq.js} +11 -11
- package/dist/{vue-ui-mood-radar-vLXtDHcR.cjs → vue-ui-mood-radar-Bqv_OukZ.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-6XZfljIe.js → vue-ui-mood-radar-CReqB6g6.js} +11 -11
- package/dist/{vue-ui-nested-donuts-Cl8xdJU6.js → vue-ui-nested-donuts-BwCtd7TA.js} +11 -11
- package/dist/{vue-ui-nested-donuts--A1qjixG.cjs → vue-ui-nested-donuts-D93rQwDR.cjs} +1 -1
- package/dist/{vue-ui-onion-CPlqANiN.js → vue-ui-onion-BMUjoxS_.js} +11 -11
- package/dist/{vue-ui-onion-C32u8Ezk.cjs → vue-ui-onion-Bts6tMCc.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-95RlJka2.js → vue-ui-parallel-coordinate-plot-Ce2wd0f5.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-BY0t_Hc_.cjs → vue-ui-parallel-coordinate-plot-CgujndZr.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C_BIZcc8.js → vue-ui-quadrant-C-jarCHF.js} +12 -12
- package/dist/{vue-ui-quadrant-CWwHr8BX.cjs → vue-ui-quadrant-CGSLYSYL.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CZYAIILY.cjs → vue-ui-quick-chart-B0SVk7ry.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BZ5n0UQy.js → vue-ui-quick-chart-BJz8KURA.js} +9 -9
- package/dist/{vue-ui-radar-Ddu3Dzxx.js → vue-ui-radar-BNi9EFmX.js} +12 -12
- package/dist/{vue-ui-radar-D4XBfJym.cjs → vue-ui-radar-Bn_j-SA4.cjs} +1 -1
- package/dist/vue-ui-rating-H6zv15BL.cjs +1 -0
- package/dist/vue-ui-rating-ykC0fTg_.js +350 -0
- package/dist/{vue-ui-relation-circle-8Kw5PdZD.cjs → vue-ui-relation-circle-CcYVlwwi.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-B_xPyr_-.js → vue-ui-relation-circle-DeILJwJP.js} +7 -7
- package/dist/{vue-ui-rings-pjfgnXyP.js → vue-ui-rings-CM4Yh4K7.js} +12 -12
- package/dist/{vue-ui-rings-CuLwbEa2.cjs → vue-ui-rings-DfFzFEA6.cjs} +1 -1
- package/dist/{vue-ui-scatter-x6zrT3IA.js → vue-ui-scatter-9l9U12tf.js} +12 -12
- package/dist/{vue-ui-scatter-YQ4zYJj0.cjs → vue-ui-scatter-CZBufI8b.cjs} +1 -1
- package/dist/{vue-ui-screenshot-D3k8rLXz.cjs → vue-ui-screenshot-BHMuQw8r.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DeKe5Csw.js → vue-ui-screenshot-lygBinT2.js} +1 -1
- package/dist/{vue-ui-skeleton-D5890icn.cjs → vue-ui-skeleton-D3N7upHq.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BC7kQhlE.js → vue-ui-skeleton-DhEZVP4j.js} +3 -3
- package/dist/{vue-ui-smiley-5evB5mWX.js → vue-ui-smiley-QyjA0TcO.js} +69 -68
- package/dist/{vue-ui-smiley-CNlhfa-H.cjs → vue-ui-smiley-ctSWt0nv.cjs} +2 -2
- package/dist/{vue-ui-spark-trend-CuqG_rtb.cjs → vue-ui-spark-trend-C9mK9gsJ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-BgZ0JbXH.js → vue-ui-spark-trend-CQu8fJyp.js} +5 -5
- package/dist/{vue-ui-sparkbar-DkAi7xTy.js → vue-ui-sparkbar-1nTJch0Z.js} +4 -4
- package/dist/{vue-ui-sparkbar-DrG8Dq7-.cjs → vue-ui-sparkbar-BlXSG_u8.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-C8JczQHv.cjs → vue-ui-sparkgauge-Cu5HQYtA.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BPhv4OLb.js → vue-ui-sparkgauge-Df4RaQL4.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-e9JHVPef.cjs → vue-ui-sparkhistogram-CbGVLioY.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CvhqCMzj.js → vue-ui-sparkhistogram-D2RUQcAo.js} +5 -5
- package/dist/{vue-ui-sparkline-DAaH0160.cjs → vue-ui-sparkline-CYIZ1DFh.cjs} +1 -1
- package/dist/{vue-ui-sparkline-TSwCmhPw.js → vue-ui-sparkline-ZWCxuBSn.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-r_awjtOp.cjs → vue-ui-sparkstackbar-CkiTTddK.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BoS2_lla.js → vue-ui-sparkstackbar-DZWMi8IY.js} +5 -5
- package/dist/{vue-ui-stackbar-BEN8-V44.js → vue-ui-stackbar-CohW8Lni.js} +13 -13
- package/dist/{vue-ui-stackbar-COZlH_nE.cjs → vue-ui-stackbar-DxA3vG2f.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-zTtIMHMC.cjs → vue-ui-strip-plot-CUJtddMq.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Cbd43lkd.js → vue-ui-strip-plot-CfKGbLE-.js} +11 -11
- package/dist/{vue-ui-table-Cdn-p4Sv.js → vue-ui-table-CyewBxeG.js} +1 -1
- package/dist/{vue-ui-table-D3n9zK4_.cjs → vue-ui-table-Di_YIf-o.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-1gluLlyr.cjs → vue-ui-table-heatmap-CgFby9Fm.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DUoSqJAq.js → vue-ui-table-heatmap-U735dVB7.js} +4 -4
- package/dist/{vue-ui-table-sparkline-B6WbUZ-8.js → vue-ui-table-sparkline-CI6fVXqD.js} +5 -5
- package/dist/{vue-ui-table-sparkline-axmTWfsW.cjs → vue-ui-table-sparkline-DMo-8Xvd.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DO8jsmEA.cjs → vue-ui-thermometer-3x4w5Bzf.cjs} +1 -1
- package/dist/{vue-ui-thermometer-CYPaaRUL.js → vue-ui-thermometer-vg0OAZ-r.js} +7 -7
- package/dist/{vue-ui-timer-BxB-pqMO.cjs → vue-ui-timer-DH2x_4wH.cjs} +1 -1
- package/dist/{vue-ui-timer-DVDPJaIq.js → vue-ui-timer-u18zWozG.js} +5 -5
- package/dist/{vue-ui-tiremarks-CHJQsXBn.cjs → vue-ui-tiremarks-CxKWI2fp.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-LeiTjrNE.js → vue-ui-tiremarks-DktQB0KM.js} +7 -7
- package/dist/{vue-ui-treemap-D1qUMxJQ.js → vue-ui-treemap-CVOhnvNh.js} +11 -11
- package/dist/{vue-ui-treemap-5vtoQA3B.cjs → vue-ui-treemap-DlsJqd0C.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BvooiWAc.cjs → vue-ui-vertical-bar-BwOZxjR-.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BjqeLwN6.js → vue-ui-vertical-bar-CdoSGi-B.js} +12 -12
- package/dist/{vue-ui-waffle-DphHhyQF.js → vue-ui-waffle-CajquWJE.js} +12 -12
- package/dist/{vue-ui-waffle-I9RUtRMp.cjs → vue-ui-waffle-D4yjRBba.cjs} +1 -1
- package/dist/{vue-ui-wheel-BloNNVqT.js → vue-ui-wheel-BlMIG6cZ.js} +7 -7
- package/dist/{vue-ui-wheel-KJdapRnF.cjs → vue-ui-wheel-fTjcexDm.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BLpGQgdL.cjs → vue-ui-word-cloud-BqqXPBt-.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-wxMpsmI9.js → vue-ui-word-cloud-DL7Qnl9r.js} +10 -10
- package/dist/{vue-ui-xy-Zy60Z2c1.js → vue-ui-xy-BA50z2Qp.js} +14 -14
- package/dist/{vue-ui-xy-BEgKs6jA.cjs → vue-ui-xy-BrL3AnU6.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-zINzDQlN.js → vue-ui-xy-canvas-BL2xqLMH.js} +11 -11
- package/dist/{vue-ui-xy-canvas-rKk7-Q2Q.cjs → vue-ui-xy-canvas-kRxLPOUB.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-rating-C7MH_wxf.js +0 -327
- package/dist/vue-ui-rating-WjFEnnp5.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./useNestedProp-AmCRQ0Mq.cjs"),n=require("./index-TsXfF4RW.cjs"),m=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=["xmlns","viewBox"],C={key:0},_=["stroke"],h=["stroke"],M=["stroke"],y={key:1},B=["stroke"],f={key:2},L=["stroke"],b={__name:"vue-ui-mini-loader",props:{config:{type:Object,default(){return{}}}},setup(u){e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:a}=n.useConfig(),i=u,t=e.computed(()=>v.useNestedProp({userConfig:i.config,defaultConfig:a})),s=e.ref({onion:"-10 -10 84 84",line:"-10 -10 112 84",bar:"-10 -10 106 84"}),r=e.computed(()=>({gutter:`stroke:${t.value.line.gutterColor};opacity:${t.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.line.gutterBlur}px);`})),l=e.computed(()=>({gutter:`stroke:${t.value.bar.gutterColor};opacity:${t.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.bar.gutterBlur}px);`})),o=e.computed(()=>({gutter:`stroke:${t.value.onion.gutterColor};opacity:${t.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${t.value.onion.gutterBlur}px);`})),c=e.computed(()=>`blur(${t.value.onion.trackBlur}px) hue-rotate(${t.value.onion.trackHueRotate}deg)`),d=e.computed(()=>`blur(${t.value.line.trackBlur}px) hue-rotate(${t.value.line.trackHueRotate}deg)`),p=e.computed(()=>`blur(${t.value.bar.trackBlur}px) hue-rotate(${t.value.bar.trackHueRotate}deg)`);return(k,x)=>(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(n.XMLNS),viewBox:s.value[t.value.type],style:{background:"transparent"},width:"100%"},[t.value.type==="onion"?(e.openBlock(),e.createElementBlock("g",C,[e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(o.value.gutter+o.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,_),e.createElementVNode("path",{d:"M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,h),e.createElementVNode("path",{d:"M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25",stroke:t.value.onion.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"onion-animated"},null,8,M)])):e.createCommentVNode("",!0),t.value.type==="line"?(e.openBlock(),e.createElementBlock("g",y,[e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(r.value.gutter+r.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5",stroke:t.value.line.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"line-animated"},null,8,B)])):e.createCommentVNode("",!0),t.value.type==="bar"?(e.openBlock(),e.createElementBlock("g",f,[e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5","stroke-width":"4",fill:"none","stroke-linecap":"round",style:e.normalizeStyle(l.value.gutter+l.value.gutterBlur)},null,4),e.createElementVNode("path",{d:"M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5",stroke:t.value.bar.trackColor,"stroke-width":"4",fill:"none","stroke-linecap":"round",class:"bar-animated"},null,8,L)])):e.createCommentVNode("",!0)],8,g))}},N=m._export_sfc(b,[["__scopeId","data-v-20f54e0e"]]);exports.default=N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-Bmq5HB9y.cjs"),Le=require("./Title-x7Hmi2zb.cjs"),pe=require("./usePrinter-Cf6Zct5m.cjs"),Oe=require("./DataTable-Cybmjq2W.cjs"),ze=require("./Tooltip-pA64woiQ.cjs"),z=require("./BaseIcon-Dn1igOva.cjs"),Ue=require("./vue-ui-skeleton-D5890icn.cjs"),Me=require("./vue-ui-accordion-WWblnzaJ.cjs"),fe=require("./useNestedProp-CivZENAh.cjs"),De=require("./PackageVersion-Bmro6-lR.cjs"),Ae=require("./PenAndPaper-B7dv_ssy.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],je={__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:w}){const k=r,v=w;function a(s){v("zoom",s)}function h(s){v("hover",s)}return e.toRef(k,"dataset").value.forEach(s=>{s.nodes&&s.nodes.length>0&&s.nodes.forEach(b=>{b.ancestor=s})}),(s,b)=>{const P=e.resolveComponent("RecursiveCircles",!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,(F,N)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:d.circleRadius,fill:`url(#gradient_${d.color})`,stroke:r.hoveredUid&&r.hoveredUid===d.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===d.uid?d.circleRadius/6:d.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>a(d),["stop"]),onMouseover:g=>h(d),onMouseleave:b[0]||(b[0]=g=>h(null))},null,40,qe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(P,{key:0,dataset:d.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:a,onHover:h},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge=["x1","y1","x2","y2","stroke","stroke-width"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const w=r;return e.toRef(w,"dataset").value.forEach(v=>{v.nodes&&v.nodes.length>0&&v.nodes.forEach(a=>{a.ancestor=v})}),(v,a)=>{const h=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.polygonPath.coordinates,(s,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.ancestor&&u.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":u.circleRadius/1.5},null,8,Ge),e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":u.circleRadius/2},null,8,Xe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.nodes&&u.nodes.length>0?(e.openBlock(),e.createBlock(h,{key:0,dataset:u.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},We=["x","y","fill","font-size"],Ze={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:w}){const k=r;return e.toRef(k,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(h=>{h.ancestor=a})}),(a,h)=>{const u=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+s.circleRadius*2,fill:r.color,"font-size":s.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(s.name),9,We))),256)),s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(u,{key:0,dataset:s.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Je={style:{position:"relative",height:"100%",width:"100%"}},Ke={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:w}){const k=w;return(v,a)=>(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",Je,[e.createElementVNode("button",{onClick:a[0]||(a[0]=e.withModifiers(h=>k("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:a[1]||(a[1]=e.withModifiers(h=>k("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:a[2]||(a[2]=e.withModifiers(h=>k("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:a[3]||(a[3]=e.withModifiers(h=>k("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:a[4]||(a[4]=e.withModifiers(h=>k("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))}},Qe=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},et={key:2,style:"width:100%;background:transparent;"},tt=["xmlns","viewBox"],ot=["width","height"],lt=["id"],nt=["stop-color"],rt=["stop-color"],at={key:6,class:"vue-data-ui-watermark"},st={key:8,ref:"source",dir:"auto"},it=["innerHTML"],ut={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:w}){const{vue_ui_molecule:k}=m.useConfig(),v=r,a=e.computed(()=>!!v.dataset&&v.dataset.length);e.onMounted(()=>{h()});function h(){m.objectIsEmpty(v.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const u=e.ref(m.createUid()),s=e.ref(null),b=e.ref(!1),P=e.ref(""),d=e.ref(null),F=e.ref(null),N=e.ref(!1),g=e.ref(null),Z=e.ref(null),D=e.ref(0),J=e.ref(0),K=e.ref(0),o=e.computed({get:()=>ee(),set:t=>t}),{userOptionsVisible:A,setUserOptionsVisibility:Q,keepUserOptionState:_}=Ie.useUserOptionState({config:o.value});function ee(){const t=fe.useNestedProp({userConfig:v.config,defaultConfig:k});return t.theme?{...fe.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||v.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>v.config,t=>{o.value=ee(),A.value=!o.value.userOptions.showOnChartHover,h(),J.value+=1,K.value+=1,y.value.showTable=o.value.table.show,y.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ne}=pe.usePrinter({elementId:`cluster_${u.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),me=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),he=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),y=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function re(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?re(t[0].nodes,l+1):l}function ge(){const t=re(v.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const C=e.ref(ge()),I=e.ref(`0 0 ${C.value.width} ${C.value.height}`);function ae(t,l={x:-C.value.width/2.43,y:C.value.height/2},n=C.value.width/1.1,c=24,i=0,p=0,R="#BBBBBB"){if(t&&t.length>0){const Y=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:i});t.forEach((f,$)=>{const L=Y.coordinates[$];let x;if(f.ancestor?f.ancestor.ancestor?x=f.ancestor.color||R:(x=he.value[p]||m.palette[p]||R,p+=1):x=R,f.polygonPath={coordinates:[L]},f.circleRadius=c,f.color=x,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const W=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=ae(f.nodes,L,n/2.9,c/2.2,i+Math.PI*$/f.nodes.length,W,x)}})}return t}function ye(t){const l=new Set;function n(i){i.forEach(p=>{p.color&&!l.has(p.color)&&l.add(p.color),p.nodes&&p.nodes.length>0&&n(p.nodes)})}n(t);const c={};return Array.from(l).forEach((i,p)=>{c[i]=`gradient_${p}`}),c}const ke=e.computed(()=>ye(B.value)),B=e.computed(()=>ae(v.dataset));function H(){N.value=!1,F.value=null,Z.value=null,g.value=null,j({polygonPath:{coordinates:[{x:C.value.width/2,y:C.value.height/2}]},circleRadius:24})}const q=e.ref(null);function j(t){d.value.focus(),e.nextTick(()=>{q.value&&cancelAnimationFrame(q.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),i=parseFloat(l[2]),p=parseFloat(l[3]),{x:R,y:Y}=t.polygonPath.coordinates[0],{circleRadius:f}=t,$=8.34,L=R-f*$,x=Y-f*$,W=f*$*2,Ne=f*$*2,Te=Math.sqrt((L-n)**2+(x-c)**2),O=Math.min(1200,Math.max(20,Math.floor(Te/10))),Ee=(L-n)/O,Se=(x-c)/O,Ve=(W-i)/O,Re=(Ne-p)/O;let S=0;function ve(){I.value=`${n+Ee*S} ${c+Se*S} ${i+Ve*S} ${p+Re*S}`,S+=o.value.style.chart.zoom.speed,S<=O&&(q.value=requestAnimationFrame(ve))}ve()})}function be(t){F.value===t.uid?H():(F.value=t.uid,Z.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},j(t),N.value=t.uid!==B.value[0].uid)}function Ce(t){if(t.target.nodeName!=="circle")H(),N.value=!1;else return}const G=e.ref(null);function Be(t){G.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})))P.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>`),P.value=`<div style="font-family:inherit">${n}</div>`}}const se=e.ref(null),V=e.ref(null);function we(t){se.value=t,t?(b.value=!0,Be(t),V.value=t.uid):(b.value=!1,P.value="",V.value=null)}function U(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),j(g.value)}function xe(t){const l=[];function n(c){c.forEach(i=>{const p={name:i.name,details:i.details||"-",ancestor:i.ancestor&&i.ancestor.name||"-",color:i.color||""};l.push(p),i.nodes&&i.nodes.length>0&&n(i.nodes,i.name)})}return n(t),l}const $e=e.computed(()=>xe(B.value)),T=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=$e.value.map((i,p)=>[{color:i.color,name:i.name},i.details,i.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 ie(){e.nextTick(()=>{const t=T.value.body.map((c,i)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...T.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Pe(){return B.value}const E=e.ref(!1);function Fe(t){E.value=t,D.value+=1}function ue(){y.value.showTable=!y.value.showTable}function ce(){y.value.showDataLabels=!y.value.showDataLabels}function de(){y.value.showTooltip=!y.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return w({getData:Pe,generatePdf:le,generateCsv:ie,generateImage:ne,toggleTable:ue,toggleLabels:ce,toggleTooltip:de,toggleAnnotator:X}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:d,class:e.normalizeClass(`vue-ui-molecule ${E.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_${u.value}`,onMouseleave:l[7]||(l[7]=n=>{se.value=null,V.value=null,e.unref(Q)(!1)}),onMouseenter:l[8]||(l[8]=()=>e.unref(Q)(!0))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:d.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${J.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&&a.value&&(e.unref(_)||e.unref(A))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:s,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:u.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:y.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:d.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(le),onGenerateCsv:ie,onGenerateImage:e.unref(ne),onToggleTable:ue,onToggleLabels:ce,onToggleTooltip:de,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(_)?e.unref(A)?"visible":"hidden":"visible"})},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,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:c})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:c})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>Ce(n),["stop"]))},[e.createVNode(De._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:C.value.width<=0?10:C.value.width,height:C.value.height<=0?10:C.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,ot)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ke.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,nt),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,rt)],8,lt))),256))]),e.createVNode(Ye,{dataset:B.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(je,{dataset:B.value,hoveredUid:V.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:be,onHover:we},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),y.value.showDataLabels?(e.openBlock(),e.createBlock(Ze,{key:1,dataset:B.value,color:o.value.style.chart.color,hoveredUid:V.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:C.value},void 0,!0)],14,tt)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createBlock(Ke,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:E.value,onMoveLeft:l[1]||(l[1]=n=>U("left")),onMoveRight:l[2]||(l[2]=n=>U("right")),onMoveTop:l[3]||(l[3]=n=>U("top")),onMoveBottom:l[4]||(l[4]=n=>U("bottom")),onReset:l[5]||(l[5]=n=>{H(),N.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&b.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:d.value,content:P.value,isFullscreen:E.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({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),a.value?(e.openBlock(),e.createBlock(Me.default,{key:9,hideDetails:"",config:{open:y.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(Oe.DataTable,{key:`table_${K.value}`,colNames:T.value.colNames,head:T.value.head,body:T.value.body,config:T.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=>y.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,it)]),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,Qe))}},ct=He._export_sfc(ut,[["__scopeId","data-v-c9ee14bc"]]);exports.default=ct;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-TsXfF4RW.cjs"),Le=require("./Title-IEvHjzFX.cjs"),pe=require("./usePrinter-DqLdu0d8.cjs"),Oe=require("./DataTable-o267EcsS.cjs"),ze=require("./Tooltip-Ce3-d-Jl.cjs"),z=require("./BaseIcon-DEUnx0Km.cjs"),Ue=require("./vue-ui-skeleton-D3N7upHq.cjs"),Me=require("./vue-ui-accordion-DQr01ula.cjs"),fe=require("./useNestedProp-AmCRQ0Mq.cjs"),De=require("./PackageVersion-GUCKUltM.cjs"),Ae=require("./PenAndPaper-BFxCZMe_.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],je={__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:w}){const k=r,v=w;function a(s){v("zoom",s)}function h(s){v("hover",s)}return e.toRef(k,"dataset").value.forEach(s=>{s.nodes&&s.nodes.length>0&&s.nodes.forEach(b=>{b.ancestor=s})}),(s,b)=>{const P=e.resolveComponent("RecursiveCircles",!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,(F,N)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:d.circleRadius,fill:`url(#gradient_${d.color})`,stroke:r.hoveredUid&&r.hoveredUid===d.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===d.uid?d.circleRadius/6:d.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(g=>a(d),["stop"]),onMouseover:g=>h(d),onMouseleave:b[0]||(b[0]=g=>h(null))},null,40,qe))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(P,{key:0,dataset:d.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:a,onHover:h},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge=["x1","y1","x2","y2","stroke","stroke-width"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const w=r;return e.toRef(w,"dataset").value.forEach(v=>{v.nodes&&v.nodes.length>0&&v.nodes.forEach(a=>{a.ancestor=v})}),(v,a)=>{const h=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.polygonPath.coordinates,(s,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.ancestor&&u.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":u.circleRadius/1.5},null,8,Ge),e.createElementVNode("line",{x1:s.x,y1:s.y,x2:u.ancestor.polygonPath.coordinates[0].x,y2:u.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":u.circleRadius/2},null,8,Xe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,u=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[u.polygonPath&&u.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[u.nodes&&u.nodes.length>0?(e.openBlock(),e.createBlock(h,{key:0,dataset:u.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},We=["x","y","fill","font-size"],Ze={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:w}){const k=r;return e.toRef(k,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(h=>{h.ancestor=a})}),(a,h)=>{const u=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,s=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.polygonPath&&s.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+s.circleRadius*2,fill:r.color,"font-size":s.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(s.name),9,We))),256)),s.nodes&&s.nodes.length>0?(e.openBlock(),e.createBlock(u,{key:0,dataset:s.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Je={style:{position:"relative",height:"100%",width:"100%"}},Ke={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:w}){const k=w;return(v,a)=>(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",Je,[e.createElementVNode("button",{onClick:a[0]||(a[0]=e.withModifiers(h=>k("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:a[1]||(a[1]=e.withModifiers(h=>k("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:a[2]||(a[2]=e.withModifiers(h=>k("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:a[3]||(a[3]=e.withModifiers(h=>k("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:a[4]||(a[4]=e.withModifiers(h=>k("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))}},Qe=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},et={key:2,style:"width:100%;background:transparent;"},tt=["xmlns","viewBox"],ot=["width","height"],lt=["id"],nt=["stop-color"],rt=["stop-color"],at={key:6,class:"vue-data-ui-watermark"},st={key:8,ref:"source",dir:"auto"},it=["innerHTML"],ut={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:w}){const{vue_ui_molecule:k}=m.useConfig(),v=r,a=e.computed(()=>!!v.dataset&&v.dataset.length);e.onMounted(()=>{h()});function h(){m.objectIsEmpty(v.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const u=e.ref(m.createUid()),s=e.ref(null),b=e.ref(!1),P=e.ref(""),d=e.ref(null),F=e.ref(null),N=e.ref(!1),g=e.ref(null),Z=e.ref(null),D=e.ref(0),J=e.ref(0),K=e.ref(0),o=e.computed({get:()=>ee(),set:t=>t}),{userOptionsVisible:A,setUserOptionsVisibility:Q,keepUserOptionState:_}=Ie.useUserOptionState({config:o.value});function ee(){const t=fe.useNestedProp({userConfig:v.config,defaultConfig:k});return t.theme?{...fe.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||v.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>v.config,t=>{o.value=ee(),A.value=!o.value.userOptions.showOnChartHover,h(),J.value+=1,K.value+=1,y.value.showTable=o.value.table.show,y.value.showTooltip=o.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ne}=pe.usePrinter({elementId:`cluster_${u.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),me=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),he=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),y=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function re(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?re(t[0].nodes,l+1):l}function ge(){const t=re(v.dataset);let l=100,n=l;for(let c=0;c<t;c+=1)l/=1,n+=l;return{height:n,width:n}}const C=e.ref(ge()),I=e.ref(`0 0 ${C.value.width} ${C.value.height}`);function ae(t,l={x:-C.value.width/2.43,y:C.value.height/2},n=C.value.width/1.1,c=24,i=0,p=0,R="#BBBBBB"){if(t&&t.length>0){const Y=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:i});t.forEach((f,$)=>{const L=Y.coordinates[$];let x;if(f.ancestor?f.ancestor.ancestor?x=f.ancestor.color||R:(x=he.value[p]||m.palette[p]||R,p+=1):x=R,f.polygonPath={coordinates:[L]},f.circleRadius=c,f.color=x,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const W=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=ae(f.nodes,L,n/2.9,c/2.2,i+Math.PI*$/f.nodes.length,W,x)}})}return t}function ye(t){const l=new Set;function n(i){i.forEach(p=>{p.color&&!l.has(p.color)&&l.add(p.color),p.nodes&&p.nodes.length>0&&n(p.nodes)})}n(t);const c={};return Array.from(l).forEach((i,p)=>{c[i]=`gradient_${p}`}),c}const ke=e.computed(()=>ye(B.value)),B=e.computed(()=>ae(v.dataset));function H(){N.value=!1,F.value=null,Z.value=null,g.value=null,j({polygonPath:{coordinates:[{x:C.value.width/2,y:C.value.height/2}]},circleRadius:24})}const q=e.ref(null);function j(t){d.value.focus(),e.nextTick(()=>{q.value&&cancelAnimationFrame(q.value);const l=I.value.split(" "),n=parseFloat(l[0]),c=parseFloat(l[1]),i=parseFloat(l[2]),p=parseFloat(l[3]),{x:R,y:Y}=t.polygonPath.coordinates[0],{circleRadius:f}=t,$=8.34,L=R-f*$,x=Y-f*$,W=f*$*2,Ne=f*$*2,Te=Math.sqrt((L-n)**2+(x-c)**2),O=Math.min(1200,Math.max(20,Math.floor(Te/10))),Ee=(L-n)/O,Se=(x-c)/O,Ve=(W-i)/O,Re=(Ne-p)/O;let S=0;function ve(){I.value=`${n+Ee*S} ${c+Se*S} ${i+Ve*S} ${p+Re*S}`,S+=o.value.style.chart.zoom.speed,S<=O&&(q.value=requestAnimationFrame(ve))}ve()})}function be(t){F.value===t.uid?H():(F.value=t.uid,Z.value=t,g.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},j(t),N.value=t.uid!==B.value[0].uid)}function Ce(t){if(t.target.nodeName!=="circle")H(),N.value=!1;else return}const G=e.ref(null);function Be(t){G.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})))P.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>`),P.value=`<div style="font-family:inherit">${n}</div>`}}const se=e.ref(null),V=e.ref(null);function we(t){se.value=t,t?(b.value=!0,Be(t),V.value=t.uid):(b.value=!1,P.value="",V.value=null)}function U(t){t==="right"&&(g.value.polygonPath.coordinates[0].x+=g.value.circleRadius),t==="left"&&(g.value.polygonPath.coordinates[0].x-=g.value.circleRadius),t==="top"&&(g.value.polygonPath.coordinates[0].y-=g.value.circleRadius),t==="bottom"&&(g.value.polygonPath.coordinates[0].y+=g.value.circleRadius),j(g.value)}function xe(t){const l=[];function n(c){c.forEach(i=>{const p={name:i.name,details:i.details||"-",ancestor:i.ancestor&&i.ancestor.name||"-",color:i.color||""};l.push(p),i.nodes&&i.nodes.length>0&&n(i.nodes,i.name)})}return n(t),l}const $e=e.computed(()=>xe(B.value)),T=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=$e.value.map((i,p)=>[{color:i.color,name:i.name},i.details,i.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 ie(){e.nextTick(()=>{const t=T.value.body.map((c,i)=>[[c[0].name],[c[1]],[c[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...T.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Pe(){return B.value}const E=e.ref(!1);function Fe(t){E.value=t,D.value+=1}function ue(){y.value.showTable=!y.value.showTable}function ce(){y.value.showDataLabels=!y.value.showDataLabels}function de(){y.value.showTooltip=!y.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return w({getData:Pe,generatePdf:le,generateCsv:ie,generateImage:ne,toggleTable:ue,toggleLabels:ce,toggleTooltip:de,toggleAnnotator:X}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:d,class:e.normalizeClass(`vue-ui-molecule ${E.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_${u.value}`,onMouseleave:l[7]||(l[7]=n=>{se.value=null,V.value=null,e.unref(Q)(!1)}),onMouseenter:l[8]||(l[8]=()=>e.unref(Q)(!0))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:d.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${J.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&&a.value&&(e.unref(_)||e.unref(A))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:s,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:u.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:y.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:d.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(le),onGenerateCsv:ie,onGenerateImage:e.unref(ne),onToggleTable:ue,onToggleLabels:ce,onToggleTooltip:de,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(_)?e.unref(A)?"visible":"hidden":"visible"})},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,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:c})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:c})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>Ce(n),["stop"]))},[e.createVNode(De._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:C.value.width<=0?10:C.value.width,height:C.value.height<=0?10:C.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,ot)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ke.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,nt),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,rt)],8,lt))),256))]),e.createVNode(Ye,{dataset:B.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(je,{dataset:B.value,hoveredUid:V.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:be,onHover:we},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),y.value.showDataLabels?(e.openBlock(),e.createBlock(Ze,{key:1,dataset:B.value,color:o.value.style.chart.color,hoveredUid:V.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:C.value},void 0,!0)],14,tt)):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createBlock(Ke,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:E.value,onMoveLeft:l[1]||(l[1]=n=>U("left")),onMoveRight:l[2]||(l[2]=n=>U("right")),onMoveTop:l[3]||(l[3]=n=>U("top")),onMoveBottom:l[4]||(l[4]=n=>U("bottom")),onReset:l[5]||(l[5]=n=>{H(),N.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&b.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:d.value,content:P.value,isFullscreen:E.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({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),a.value?(e.openBlock(),e.createBlock(Me.default,{key:9,hideDetails:"",config:{open:y.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(Oe.DataTable,{key:`table_${K.value}`,colNames:T.value.colNames,head:T.value.head,body:T.value.body,config:T.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=>y.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,it)]),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,Qe))}},ct=He._export_sfc(ut,[["__scopeId","data-v-c9ee14bc"]]);exports.default=ct;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { toRef as ce, resolveComponent as de, createElementBlock as n, openBlock as a, Fragment as m, renderList as A, createCommentVNode as f, createBlock as S, withModifiers as z, createElementVNode as F, toDisplayString as Ie, normalizeStyle as _, createVNode as L, computed as D, onMounted as tt, ref as v, watch as ot, unref as C, normalizeClass as Oe, createSlots as lt, withCtx as x, renderSlot as $, normalizeProps as q, guardReactiveProps as Z, createTextVNode as at, nextTick as Le } from "vue";
|
|
2
|
-
import { u as st, o as nt, e as rt, c as Ue, t as it, p as De, a as ut, b as ct, X as dt, l as vt, P as ht, q as ft, r as pt, x as gt, y as yt } from "./index-
|
|
3
|
-
import { _ as mt } from "./Title-
|
|
4
|
-
import { u as bt, U as kt } from "./usePrinter-
|
|
5
|
-
import { D as Ct } from "./DataTable-
|
|
6
|
-
import { _ as $t } from "./Tooltip-
|
|
7
|
-
import J from "./BaseIcon-
|
|
8
|
-
import wt from "./vue-ui-skeleton-
|
|
9
|
-
import xt from "./vue-ui-accordion-
|
|
10
|
-
import { u as Ae } from "./useNestedProp-
|
|
11
|
-
import { _ as Pt } from "./PackageVersion-
|
|
12
|
-
import { P as Tt } from "./PenAndPaper-
|
|
2
|
+
import { u as st, o as nt, e as rt, c as Ue, t as it, p as De, a as ut, b as ct, X as dt, l as vt, P as ht, q as ft, r as pt, x as gt, y as yt } from "./index-Sq6_Z5Ol.js";
|
|
3
|
+
import { _ as mt } from "./Title-BrlBOQMX.js";
|
|
4
|
+
import { u as bt, U as kt } from "./usePrinter-KhQnrZzM.js";
|
|
5
|
+
import { D as Ct } from "./DataTable-g-vVSX5e.js";
|
|
6
|
+
import { _ as $t } from "./Tooltip-2BVEpShN.js";
|
|
7
|
+
import J from "./BaseIcon-CFtrFJk8.js";
|
|
8
|
+
import wt from "./vue-ui-skeleton-DhEZVP4j.js";
|
|
9
|
+
import xt from "./vue-ui-accordion-Cs3dJ86t.js";
|
|
10
|
+
import { u as Ae } from "./useNestedProp-BmjPdxME.js";
|
|
11
|
+
import { _ as Pt } from "./PackageVersion-koLOUagZ.js";
|
|
12
|
+
import { P as Tt } from "./PenAndPaper-NARoVmb-.js";
|
|
13
13
|
import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { _ as Rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const St = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], Ot = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Bmq5HB9y.cjs"),te=require("./Title-x7Hmi2zb.cjs"),F=require("./usePrinter-Cf6Zct5m.cjs"),oe=require("./Legend-Bf8J9KZk.cjs"),k=require("./BaseIcon-Dn1igOva.cjs"),le=require("./DataTable-Cybmjq2W.cjs"),ae=require("./vue-ui-skeleton-D5890icn.cjs"),re=require("./vue-ui-accordion-WWblnzaJ.cjs"),q=require("./useNestedProp-CivZENAh.cjs"),ne=require("./PackageVersion-Bmro6-lR.cjs"),se=require("./PenAndPaper-B7dv_ssy.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:2,style:"width:100%;background:transparent"},ve=["xmlns","viewBox"],ye=["width","height"],me=["id"],he=["stop-color"],pe=["stop-color"],fe=["x1","y1","x2","y2","stroke","stroke-width"],ke=["d","stroke","stroke-width"],ge=["stroke"],be=["fill"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["d","stroke","stroke-width","fill"],Me=["x1","y1","stroke"],Ee=["cx","cy","fill","stroke"],Oe=["fill","stroke"],Se=["y","fill","font-weight"],Ae=["y","fill"],Te={key:5,class:"vue-data-ui-watermark"},Le=["onClick"],Ie={style:{"font-weight":"bold"}},Fe={key:8,ref:"source",dir:"auto"},qe=["innerHTML"],ze={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:D}){const{vue_ui_mood_radar:j}=r.useConfig(),s=z,m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>M(),set:l=>l}),{userOptionsVisible:w,setUserOptionsVisibility:P,keepUserOptionState:$}=ue.useUserOptionState({config:t.value});function M(){const l=q.useNestedProp({userConfig:s.config,defaultConfig:j});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=M(),w.value=!t.value.userOptions.showOnChartHover,_(),G.value+=1,H.value+=1,B.value+=1,p.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:E,isImaging:O,generatePdf:S,generateImage:A}=F.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function X({centerX:l,centerY:a,apexX:o,apexY:u,proportion:d,key:f,value:ee}){return{x:l+(o-l)*d,y:a+(u-a)*d,key:f,value:ee}}const K=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=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/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),T=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})}),x.value.coordinates.map((l,a)=>{const o=X({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/K.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),Y=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 J(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function L(){e.nextTick(()=>{const l=v.value.head.map((u,d)=>[[u.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const 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(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,f)=>[{color:d.color,name:d.name},v.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[f]/y.value)?"-":(v.value.body[f]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},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 Q(){return c.value}function I(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function Z(l){b.value=l}const C=e.ref(!1);function V(){C.value=!C.value}return D({getData:Q,generatePdf:S,generateCsv:L,generateImage:A,toggleTable:I,toggleAnnotator:V}),(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:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(se.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(te._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(w))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(O),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:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(S),onGenerateCsv:L,onGenerateImage:e.unref(A),onToggleTable:I,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref($)?e.unref(w)?"visible":"hidden":"visible"})},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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.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(ne._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ye)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,he),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,pe)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,fe))),256)),e.createElementVNode("path",{d:x.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,ke),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,ge),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,be),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,Ce),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,Ne),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,we),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,xe),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,Ve),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,_e),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,Be),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,Pe),e.createElementVNode("path",{d:e.unref(r.makePath)(T.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,$e),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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,Me),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,Ee),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,Oe),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,Se),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Ae)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(oe.Legend,{legendSet:c.value,config:Y.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>J(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(k.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(k.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(k.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(k.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(k.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",Ie,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,Le)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(re.default,{key:9,hideDetails:"",config:{open:p.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(le.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=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,qe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ce))}},De=ie._export_sfc(ze,[["__scopeId","data-v-171d740b"]]);exports.default=De;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-TsXfF4RW.cjs"),te=require("./Title-IEvHjzFX.cjs"),F=require("./usePrinter-DqLdu0d8.cjs"),oe=require("./Legend-14o6ysPB.cjs"),k=require("./BaseIcon-DEUnx0Km.cjs"),le=require("./DataTable-o267EcsS.cjs"),ae=require("./vue-ui-skeleton-D3N7upHq.cjs"),re=require("./vue-ui-accordion-DQr01ula.cjs"),q=require("./useNestedProp-AmCRQ0Mq.cjs"),ne=require("./PackageVersion-GUCKUltM.cjs"),se=require("./PenAndPaper-BFxCZMe_.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:2,style:"width:100%;background:transparent"},ve=["xmlns","viewBox"],ye=["width","height"],me=["id"],he=["stop-color"],pe=["stop-color"],fe=["x1","y1","x2","y2","stroke","stroke-width"],ke=["d","stroke","stroke-width"],ge=["stroke"],be=["fill"],Ce=["stroke"],Ne=["fill"],we=["stroke"],xe=["fill"],Ve=["stroke"],_e=["fill"],Be=["stroke"],Pe=["fill"],$e=["d","stroke","stroke-width","fill"],Me=["x1","y1","stroke"],Ee=["cx","cy","fill","stroke"],Oe=["fill","stroke"],Se=["y","fill","font-weight"],Ae=["y","fill"],Te={key:5,class:"vue-data-ui-watermark"},Le=["onClick"],Ie={style:{"font-weight":"bold"}},Fe={key:8,ref:"source",dir:"auto"},qe=["innerHTML"],ze={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:D}){const{vue_ui_mood_radar:j}=r.useConfig(),s=z,m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const h=e.ref(r.createUid()),N=e.ref(null),U=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),B=e.ref(0),t=e.computed({get:()=>M(),set:l=>l}),{userOptionsVisible:w,setUserOptionsVisibility:P,keepUserOptionState:$}=ue.useUserOptionState({config:t.value});function M(){const l=q.useNestedProp({userConfig:s.config,defaultConfig:j});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=M(),w.value=!t.value.userOptions.showOnChartHover,_(),G.value+=1,H.value+=1,B.value+=1,p.value.showTable=t.value.table.show},{deep:!0});const{isPrinting:E,isImaging:O,generatePdf:S,generateImage:A}=F.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),p=e.ref({showTable:t.value.table.show}),i=e.computed(()=>({height:256,width:256})),x=e.computed(()=>r.createPolygonPath({plot:{x:128,y:i.value.height/2},radius:90,sides:5,rotation:11}));function X({centerX:l,centerY:a,apexX:o,apexY:u,proportion:d,key:f,value:ee}){return{x:l+(o-l)*d,y:a+(u-a)*d,key:f,value:ee}}const K=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),c=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/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),T=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})}),x.value.coordinates.map((l,a)=>{const o=X({centerX:i.value.width/2,centerY:i.value.height/2,apexX:l.x,apexY:l.y,proportion:c.value[a].value/K.value,key:c.value[a].key,value:c.value[a].value});return{...l,plots:o,key:c.value[a].key}})):[]),Y=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 J(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=c.value.map(o=>({name:o.key,color:o.color})),a=c.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function L(){e.nextTick(()=>{const l=v.value.head.map((u,d)=>[[u.name],[v.value.body[d]],[isNaN(v.value.body[d]/y.value)?"-":v.value.body[d]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const 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(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((d,f)=>[{color:d.color,name:d.name},v.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[f]/y.value)?"-":(v.value.body[f]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},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 Q(){return c.value}function I(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function Z(l){b.value=l}const C=e.ref(!1);function V(){C.value=!C.value}return D({getData:Q,generatePdf:S,generateCsv:L,generateImage:A,toggleTable:I,toggleAnnotator:V}),(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:N,id:`${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(P)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(se.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(te._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(w))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref_key:"details",ref:U,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(O),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:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(S),onGenerateCsv:L,onGenerateImage:e.unref(A),onToggleTable:I,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref($)?e.unref(w)?"visible":"hidden":"visible"})},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,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${i.value.width} ${i.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(ne._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width,height:i.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ye)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,he),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,pe)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:i.value.width/2,y1:i.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,fe))),256)),e.createElementVNode("path",{d:x.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,ke),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,ge),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,be),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,Ce),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,Ne),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,we),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,xe),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,Ve),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,_e),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,Be),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,Pe),e.createElementVNode("path",{d:e.unref(r.makePath)(T.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,$e),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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,Me),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,Ee),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,Oe),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,Se),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Ae)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Te,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(oe.Legend,{legendSet:c.value,config:Y.value,key:`legend_${B.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>J(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(k.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(k.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(k.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(k.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(k.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",Ie,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,Le)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:c.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(re.default,{key:9,hideDetails:"",config:{open:p.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(le.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=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,qe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ce))}},De=ie._export_sfc(ze,[["__scopeId","data-v-171d740b"]]);exports.default=De;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as c, onMounted as Ce, ref as v, watch as we, createElementBlock as y, openBlock as r, unref as a, normalizeStyle as L, normalizeClass as Z, createBlock as p, createCommentVNode as u, renderSlot as h, createVNode as U, createSlots as xe, withCtx as m, normalizeProps as B, guardReactiveProps as D, createElementVNode as s, Fragment as ee, renderList as te, toDisplayString as P, createTextVNode as oe, nextTick as _e } from "vue";
|
|
2
|
-
import { u as $e, o as Me, e as le, c as Pe, a as Ne, P as Ae, X as Oe, s as C, w as Te, Q as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-
|
|
3
|
-
import { _ as Se } from "./Title-
|
|
4
|
-
import { u as Ve, U as je } from "./usePrinter-
|
|
5
|
-
import { L as Ue } from "./Legend-
|
|
6
|
-
import N from "./BaseIcon-
|
|
7
|
-
import { D as Be } from "./DataTable-
|
|
8
|
-
import De from "./vue-ui-skeleton-
|
|
9
|
-
import We from "./vue-ui-accordion-
|
|
10
|
-
import { u as se } from "./useNestedProp-
|
|
11
|
-
import { _ as ze } from "./PackageVersion-
|
|
12
|
-
import { P as Ee } from "./PenAndPaper-
|
|
2
|
+
import { u as $e, o as Me, e as le, c as Pe, a as Ne, P as Ae, X as Oe, s as C, w as Te, Q as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-Sq6_Z5Ol.js";
|
|
3
|
+
import { _ as Se } from "./Title-BrlBOQMX.js";
|
|
4
|
+
import { u as Ve, U as je } from "./usePrinter-KhQnrZzM.js";
|
|
5
|
+
import { L as Ue } from "./Legend-D3s69_UE.js";
|
|
6
|
+
import N from "./BaseIcon-CFtrFJk8.js";
|
|
7
|
+
import { D as Be } from "./DataTable-g-vVSX5e.js";
|
|
8
|
+
import De from "./vue-ui-skeleton-DhEZVP4j.js";
|
|
9
|
+
import We from "./vue-ui-accordion-Cs3dJ86t.js";
|
|
10
|
+
import { u as se } from "./useNestedProp-BmjPdxME.js";
|
|
11
|
+
import { _ as ze } from "./PackageVersion-koLOUagZ.js";
|
|
12
|
+
import { P as Ee } from "./PenAndPaper-NARoVmb-.js";
|
|
13
13
|
import { u as Ge } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const Re = ["id"], Xe = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as m, ref as i, watch as Ve, onMounted as at, onBeforeUnmount as ot, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as P, createBlock as D, createCommentVNode as f, createVNode as Me, createSlots as st, withCtx as k, renderSlot as w, normalizeProps as B, guardReactiveProps as E, createElementVNode as b, Fragment as C, renderList as F, toDisplayString as S, createTextVNode as Q, nextTick as ut } from "vue";
|
|
2
|
-
import { u as nt, c as rt, t as it, p as Z, a as dt, o as vt, e as M, b as ct, J as Ue, d as ft, m as Be, f as x, X as ht, s as Ee, L as yt, k as ie, n as U, i as R, x as Re, q as pt, r as bt, y as gt } from "./index-
|
|
2
|
+
import { u as nt, c as rt, t as it, p as Z, a as dt, o as vt, e as M, b as ct, J as Ue, d as ft, m as Be, f as x, X as ht, s as Ee, L as yt, k as ie, n as U, i as R, x as Re, q as pt, r as bt, y as gt } from "./index-Sq6_Z5Ol.js";
|
|
3
3
|
import { t as mt, u as kt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as wt } from "./Title-
|
|
5
|
-
import { u as $t, U as Lt } from "./usePrinter-
|
|
6
|
-
import { D as Ct } from "./DataTable-
|
|
7
|
-
import { _ as xt } from "./Tooltip-
|
|
8
|
-
import { L as _t } from "./Legend-
|
|
9
|
-
import Tt from "./vue-ui-skeleton-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ge } from "./useNestedProp-
|
|
12
|
-
import { _ as Nt } from "./PackageVersion-
|
|
13
|
-
import { P as St } from "./PenAndPaper-
|
|
4
|
+
import { _ as wt } from "./Title-BrlBOQMX.js";
|
|
5
|
+
import { u as $t, U as Lt } from "./usePrinter-KhQnrZzM.js";
|
|
6
|
+
import { D as Ct } from "./DataTable-g-vVSX5e.js";
|
|
7
|
+
import { _ as xt } from "./Tooltip-2BVEpShN.js";
|
|
8
|
+
import { L as _t } from "./Legend-D3s69_UE.js";
|
|
9
|
+
import Tt from "./vue-ui-skeleton-DhEZVP4j.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-Cs3dJ86t.js";
|
|
11
|
+
import { u as Ge } from "./useNestedProp-BmjPdxME.js";
|
|
12
|
+
import { _ as Nt } from "./PackageVersion-koLOUagZ.js";
|
|
13
|
+
import { P as St } from "./PenAndPaper-NARoVmb-.js";
|
|
14
14
|
import { u as Ot } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as At } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const It = ["id"], Pt = ["xmlns", "viewBox"], Dt = ["width", "height"], zt = ["id"], Vt = ["offset", "stop-color"], Mt = ["offset", "stop-opacity"], Ut = ["id"], Bt = ["id"], Et = ["id"], Rt = ["flood-color"], Gt = ["d", "fill", "stroke", "stroke-width", "filter"], Yt = { key: 1 }, Xt = ["d", "fill"], Ht = { key: 2 }, Wt = ["x", "y", "font-size", "font-weight", "fill"], qt = { key: 3 }, Jt = ["filter"], Kt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Qt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Zt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], jt = ["d", "fill", "onMouseenter", "onClick"], el = {
|
|
@@ -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-TsXfF4RW.cjs"),he=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-IEvHjzFX.cjs"),ye=require("./usePrinter-DqLdu0d8.cjs"),Fe=require("./DataTable-o267EcsS.cjs"),Te=require("./Tooltip-Ce3-d-Jl.cjs"),Oe=require("./Legend-14o6ysPB.cjs"),Pe=require("./vue-ui-skeleton-D3N7upHq.cjs"),ze=require("./vue-ui-accordion-DQr01ula.cjs"),me=require("./useNestedProp-AmCRQ0Mq.cjs"),De=require("./PackageVersion-GUCKUltM.cjs"),Ae=require("./PenAndPaper-BFxCZMe_.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],qe=["xmlns","viewBox"],Re=["width","height"],Ye=["id"],Xe=["offset","stop-color"],Ge=["offset","stop-opacity"],He=["id"],We=["id"],Je=["id"],Ke=["flood-color"],Qe=["d","fill","stroke","stroke-width","filter"],Ze={key:1},je=["d","fill"],et={key:2},tt=["x","y","font-size","font-weight","fill"],lt={key:3},at=["filter"],ot=["text-anchor","x","y","fill","font-size","font-weight"],nt=["text-anchor","x","y","fill","font-size","font-weight"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["d","fill","onMouseenter","onClick"],ut={key:5,class:"vue-data-ui-watermark"},it={key:0,class:"vue-ui-nested-donuts-legend-title"},ct=["onClick"],dt=["innerHTML"],vt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(be,{expose:ge,emit:ke}){const{vue_ui_nested_donuts:Ce}=r.useConfig(),k=be,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),we=e.ref(null),q=e.ref(0),L=e.ref(null),R=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),B=e.ref(!1);function Le(l){B.value=l,q.value+=1}const t=e.computed({get:()=>Q(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Ie.useUserOptionState({config:t.value});function Q(){const l=me.useNestedProp({userConfig:k.config,defaultConfig:Ce});return l.theme?{...me.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=Q(),P.value=!t.value.userOptions.showOnChartHover,Z(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const $=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=he.throttle(()=>{const{width:s,height:o}=he.useResponsive({chart:L.value,title:t.value.style.chart.title.text?R.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(L.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:j,isImaging:ee,generatePdf:te,generateImage:le}=ye.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),xe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),ae=ke;function $e({datapoint:l,index:s}){ae("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||xe.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),oe=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Ne(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(oe.value);e.watch(()=>oe.value,l=>d.value=l);const ne=e.ref(null),re=e.ref(null);function z(l){ae("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),p=Ne(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(ne.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),ne.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(re.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),re.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),se=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ue=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ie=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function Se({datapoint:l,_relativeIndex:s,seriesIndex:o}){ie.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as v, ref as s, watch as ke, onMounted as Ue, onBeforeUnmount as Xe, createElementBlock as u, openBlock as n, unref as i, normalizeStyle as B, normalizeClass as U, createBlock as C, createCommentVNode as f, createElementVNode as O, createVNode as we, createSlots as Ge, withCtx as g, renderSlot as h, normalizeProps as S, guardReactiveProps as F, Fragment as M, renderList as N, toDisplayString as P, createTextVNode as Ee, nextTick as He } from "vue";
|
|
2
|
-
import { u as We, c as je, t as qe, p as $e, a as Je, b as Ke, o as Qe, e as K, d as Ze, X as et, f as R, i as Q, x as Ce, q as tt, r as at, y as lt } from "./index-
|
|
2
|
+
import { u as We, c as je, t as qe, p as $e, a as Je, b as Ke, o as Qe, e as K, d as Ze, X as et, f as R, i as Q, x as Ce, q as tt, r as at, y as lt } from "./index-Sq6_Z5Ol.js";
|
|
3
3
|
import { t as ot, u as rt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as nt } from "./Title-
|
|
5
|
-
import { u as st, U as ut } from "./usePrinter-
|
|
6
|
-
import { L as it } from "./Legend-
|
|
7
|
-
import { D as ct } from "./DataTable-
|
|
8
|
-
import { _ as dt } from "./Tooltip-
|
|
9
|
-
import vt from "./vue-ui-skeleton-
|
|
10
|
-
import ht from "./vue-ui-accordion-
|
|
11
|
-
import { u as xe } from "./useNestedProp-
|
|
12
|
-
import { _ as ft } from "./PackageVersion-
|
|
13
|
-
import { P as gt } from "./PenAndPaper-
|
|
4
|
+
import { _ as nt } from "./Title-BrlBOQMX.js";
|
|
5
|
+
import { u as st, U as ut } from "./usePrinter-KhQnrZzM.js";
|
|
6
|
+
import { L as it } from "./Legend-D3s69_UE.js";
|
|
7
|
+
import { D as ct } from "./DataTable-g-vVSX5e.js";
|
|
8
|
+
import { _ as dt } from "./Tooltip-2BVEpShN.js";
|
|
9
|
+
import vt from "./vue-ui-skeleton-DhEZVP4j.js";
|
|
10
|
+
import ht from "./vue-ui-accordion-Cs3dJ86t.js";
|
|
11
|
+
import { u as xe } from "./useNestedProp-BmjPdxME.js";
|
|
12
|
+
import { _ as ft } from "./PackageVersion-koLOUagZ.js";
|
|
13
|
+
import { P as gt } from "./PenAndPaper-NARoVmb-.js";
|
|
14
14
|
import { u as pt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const mt = ["id"], bt = ["xmlns", "viewBox"], kt = ["width", "height"], wt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], $t = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Ct = ["id"], xt = ["stdDeviation"], Tt = ["filter"], _t = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Ot = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], Pt = { key: 2 }, At = ["onMouseenter"], It = ["x", "y", "font-size", "fill", "font-weight"], St = {
|
|
@@ -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-TsXfF4RW.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-IEvHjzFX.cjs"),ae=require("./usePrinter-DqLdu0d8.cjs"),$e=require("./Legend-14o6ysPB.cjs"),xe=require("./DataTable-o267EcsS.cjs"),Be=require("./Tooltip-Ce3-d-Jl.cjs"),Te=require("./vue-ui-skeleton-D3N7upHq.cjs"),Se=require("./vue-ui-accordion-DQr01ula.cjs"),oe=require("./useNestedProp-AmCRQ0Mq.cjs"),Pe=require("./PackageVersion-GUCKUltM.cjs"),Oe=require("./PenAndPaper-BFxCZMe_.cjs"),Ne=require("./useUserOptionState-BgepsfED.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Fe=["xmlns","viewBox"],Ae=["width","height"],Ee=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ie=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["id"],Le=["stdDeviation"],Re=["filter"],ze=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],De=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],qe={key:2},Ue=["onMouseenter"],Ye=["x","y","font-size","fill","font-weight"],Xe={key:5,class:"vue-data-ui-watermark"},Ge=["onClick"],He=["innerHTML"],je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const{vue_ui_onion:se}=u.useConfig(),f=re,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ie=e.ref(null),E=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),M=e.ref(null),L=e.ref(null),R=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=Ne.useUserOptionState({config:t.value});function X(){const l=oe.useNestedProp({userConfig:f.config,defaultConfig:se});return l.theme?{...oe.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=X(),P.value=!t.value.userOptions.showOnChartHover,J(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:G,isImaging:H,generatePdf:j,generateImage:W}=ae.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),de=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{J()});function J(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:L.value,noTitle:R.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||de.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>K(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),ve=e.computed(()=>t.value.useStartAnimation),he=e.ref(null),pe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,fe,{immediate:!0});function fe(){if(ve.value&&!O.value){let r=function(){l>=pe.value?(cancelAnimationFrame(he.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const ge=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":""})),me=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/me.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ye(a,l.percentage||0)}}));function ye(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-l}
|
|
3
3
|
A ${l},${l} 0 1 1
|
|
4
4
|
${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as g, ref as v, watch as Ge, onMounted as Xe, onBeforeUnmount as Ye, createElementBlock as i, openBlock as u, unref as x, normalizeStyle as T, normalizeClass as U, createBlock as z, createCommentVNode as m, createElementVNode as I, createVNode as _e, createSlots as qe, withCtx as k, renderSlot as b, normalizeProps as W, guardReactiveProps as E, Fragment as C, renderList as F, toDisplayString as D, createTextVNode as Je } from "vue";
|
|
2
|
-
import { u as Ke, c as ee, t as Qe, p as H, a as Ze, o as et, e as Me, g as tt, b as at, d as lt, D as ot, R as st, S as nt, T as ut, X as it, x as ze, F as G, q as rt, r as ct, i as Fe, f as Ie, y as vt } from "./index-
|
|
2
|
+
import { u as Ke, c as ee, t as Qe, p as H, a as Ze, o as et, e as Me, g as tt, b as at, d as lt, D as ot, R as st, S as nt, T as ut, X as it, x as ze, F as G, q as rt, r as ct, i as Fe, f as Ie, y as vt } from "./index-Sq6_Z5Ol.js";
|
|
3
3
|
import { t as dt, u as ht } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as pt } from "./Title-
|
|
5
|
-
import { L as mt } from "./Legend-
|
|
6
|
-
import { _ as yt } from "./Tooltip-
|
|
7
|
-
import { _ as ft } from "./Shape-
|
|
8
|
-
import { u as gt, U as bt } from "./usePrinter-
|
|
9
|
-
import { D as xt } from "./DataTable-
|
|
10
|
-
import kt from "./vue-ui-accordion-
|
|
11
|
-
import wt from "./vue-ui-skeleton-
|
|
12
|
-
import { u as Pe } from "./useNestedProp-
|
|
13
|
-
import { _ as Ct } from "./PackageVersion-
|
|
14
|
-
import { P as $t } from "./PenAndPaper-
|
|
4
|
+
import { _ as pt } from "./Title-BrlBOQMX.js";
|
|
5
|
+
import { L as mt } from "./Legend-D3s69_UE.js";
|
|
6
|
+
import { _ as yt } from "./Tooltip-2BVEpShN.js";
|
|
7
|
+
import { _ as ft } from "./Shape-BQwPhaQ2.js";
|
|
8
|
+
import { u as gt, U as bt } from "./usePrinter-KhQnrZzM.js";
|
|
9
|
+
import { D as xt } from "./DataTable-g-vVSX5e.js";
|
|
10
|
+
import kt from "./vue-ui-accordion-Cs3dJ86t.js";
|
|
11
|
+
import wt from "./vue-ui-skeleton-DhEZVP4j.js";
|
|
12
|
+
import { u as Pe } from "./useNestedProp-BmjPdxME.js";
|
|
13
|
+
import { _ as Ct } from "./PackageVersion-koLOUagZ.js";
|
|
14
|
+
import { P as $t } from "./PenAndPaper-NARoVmb-.js";
|
|
15
15
|
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { _ as Tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const _t = ["id"], Mt = ["xmlns", "viewBox"], zt = ["x", "y", "width", "height"], Ft = { style: { "pointer-events": "none" } }, It = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pt = ["x", "y", "fill", "font-size", "font-weight"], Nt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Lt = ["x", "y", "fill", "font-size", "font-weight"], Ot = { key: 0 }, St = ["x", "y", "font-size", "fill"], Dt = ["width", "x", "y"], Ut = { style: { width: "100%" } }, Wt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], Et = ["d", "stroke", "stroke-width", "onMouseenter"], Vt = ["d", "onMouseenter"], jt = {
|
|
@@ -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-TsXfF4RW.cjs"),ue=require("./useResponsive-BJ7DTGpm.cjs"),$e=require("./Title-IEvHjzFX.cjs"),Se=require("./Legend-14o6ysPB.cjs"),ze=require("./Tooltip-Ce3-d-Jl.cjs"),Ne=require("./Shape-DQcajuPX.cjs"),ce=require("./usePrinter-DqLdu0d8.cjs"),Ae=require("./DataTable-o267EcsS.cjs"),Te=require("./vue-ui-accordion-DQr01ula.cjs"),Pe=require("./vue-ui-skeleton-D3N7upHq.cjs"),de=require("./useNestedProp-AmCRQ0Mq.cjs"),Fe=require("./PackageVersion-GUCKUltM.cjs"),Me=require("./PenAndPaper-BFxCZMe_.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ie=["id"],Le=["xmlns","viewBox"],Ve=["x","y","width","height"],Oe={style:{"pointer-events":"none"}},De=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x","y","fill","font-size","font-weight"],Ue=["x1","x2","y1","y2","stroke","stroke-width"],Re=["x","y","fill","font-size","font-weight"],We={key:0},je=["x","y","font-size","fill"],He=["width","x","y"],Ge={style:{width:"100%"}},Ye=["x","y","fill","font-weight","font-size","onMouseenter"],Xe=["d","stroke","stroke-width","onMouseenter"],Je=["d","onMouseenter"],Ke={key:5,class:"vue-data-ui-watermark"},Qe=["onClick"],Ze=["innerHTML"],et={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ve,{expose:pe,emit:he}){const{vue_ui_parallel_coordinate_plot:me}=i.useConfig(),b=ve,x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),C=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),U=e.ref(0),R=e.ref(0),W=e.ref(0),T=e.ref(i.createUid()),w=e.ref(!1);function ye(l){w.value=l,L.value+=1}const t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:H}=_e.useUserOptionState({config:t.value});function G(){const l=de.useNestedProp({userConfig:b.config,defaultConfig:me});return l.theme?{...de.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=G(),P.value=!t.value.userOptions.showOnChartHover,Y(),U.value+=1,W.value+=1,R.value+=1,v.value.dataLabels.show=t.value.style.chart.yAxis.labels.datapoints.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const S=e.ref(null);e.onMounted(()=>{Y()});function Y(){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=ue.throttle(()=>{const{width:o,height:a}=ue.useResponsive({chart:C.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=a,d.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),d.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),d.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),d.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})})});S.value=new ResizeObserver(l),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:X,isImaging:J,generatePdf:K,generateImage:Q}=ce.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),fe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),d=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),c=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=d.value.height,s=d.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),ge=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function Z(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)||ge.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"}})),be=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>Z(l.id),isSegregated:f.value.includes(l.id)}))),ke=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":""})),ee=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>c.value.width/ee.value),F=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>{let l=[];for(let o=0;o<ee.value;o+=1){const a=Math.min(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),n=Math.max(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((p,A)=>{const we=u.min<0?p+Math.abs(u.min):p-Math.abs(u.min),Be=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:c.value.bottom-c.value.height*(we/Be),x:c.value.left+y.value*o+y.value/2,value:p}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),M=e.computed(()=>F.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:c.value.left+y.value*s+y.value/2,y:c.value.bottom-c.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function te({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),B=e.ref(!1),E=e.ref("");function z({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){_.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},B.value=!0,h.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}))?E.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,m.value.map(g=>g.name).forEach((g,p)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|