vue-data-ui 2.3.61 → 2.3.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-B5nYwPUt.js → Arrow-CBx1Hj4I.js} +1 -1
- package/dist/{Arrow-Dv_tprAO.cjs → Arrow-fP0md3L3.cjs} +1 -1
- package/dist/{BaseIcon-DUPLRuLO.js → BaseIcon-CS18qRiy.js} +1 -1
- package/dist/{BaseIcon-aPcCSO_Z.cjs → BaseIcon-O8jJvy48.cjs} +1 -1
- package/dist/{DataTable-NUzEZXWt.js → DataTable-BGJ2mVxG.js} +2 -2
- package/dist/{DataTable-B6xCb-DR.cjs → DataTable-CSEiZDAb.cjs} +1 -1
- package/dist/{Legend-ePmJ_YIA.cjs → Legend-DuuSl2rJ.cjs} +1 -1
- package/dist/{Legend-C3tseguI.js → Legend-UWyvC57K.js} +1 -1
- package/dist/{Shape-DAe5uqIA.cjs → Shape-Dsx4SQVn.cjs} +1 -1
- package/dist/{Shape-BPcWPP9D.js → Shape-HfEpP-Tk.js} +1 -1
- package/dist/{Slicer-CmHwU6if.js → Slicer-Bk3Rt85L.js} +9 -9
- package/dist/{Slicer-BJs52Jle.cjs → Slicer-Cf74aFVz.cjs} +1 -1
- package/dist/{Title-BAQrVaNA.js → Title-CPZstF2C.js} +1 -1
- package/dist/{Title-B_p983os.cjs → Title-PZ6S96pU.cjs} +1 -1
- package/dist/{Tooltip-C2dhDgoh.cjs → Tooltip-BoIYPSX3.cjs} +1 -1
- package/dist/{Tooltip-B73tTE2v.js → Tooltip-CBmmiqKr.js} +5 -5
- package/dist/{index-CwG--L4Z.js → index-C_05i_JG.js} +578 -526
- package/dist/{index-nPEJmXmf.cjs → index-NNZeHOBS.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-TbnnNrH2.cjs → useNestedProp-CPsbJAGj.cjs} +1 -1
- package/dist/{useNestedProp-BqwYEJGM.js → useNestedProp-DLnT0Wtg.js} +1 -1
- package/dist/{usePrinter-D012Olnq.cjs → usePrinter-BLbY8qGZ.cjs} +1 -1
- package/dist/{usePrinter-Do9tGYem.js → usePrinter-DOhlzlnx.js} +1 -1
- package/dist/{vue-data-ui-DQAJDvpX.cjs → vue-data-ui-D5aG0WkE.cjs} +1 -1
- package/dist/{vue-data-ui-ORLyt-v3.js → vue-data-ui-vqnxkVKv.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BRbooRg3.cjs → vue-ui-3d-bar-Cez69HMH.cjs} +1 -1
- package/dist/{vue-ui-3d-bar--ztApFzW.js → vue-ui-3d-bar-b7Pu7sfL.js} +7 -7
- package/dist/{vue-ui-accordion-CHL4xuW4.cjs → vue-ui-accordion-CcdyvXrp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Be_wWB1T.js → vue-ui-accordion-rGJVvi_V.js} +3 -3
- package/dist/vue-ui-age-pyramid-B6LKyKjc.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-DLIladXC.js → vue-ui-age-pyramid-CH1Vj2R6.js} +226 -226
- package/dist/{vue-ui-annotator-CS2d8F8x.cjs → vue-ui-annotator-BfmMNM_X.cjs} +1 -1
- package/dist/{vue-ui-annotator-Bxrjl1nz.js → vue-ui-annotator-CTio5IiK.js} +1 -1
- package/dist/{vue-ui-candlestick-BppLVU6c.js → vue-ui-candlestick-C4kT9W0j.js} +158 -158
- package/dist/{vue-ui-candlestick-tumv-lhv.cjs → vue-ui-candlestick-DvX9Jxoi.cjs} +2 -2
- package/dist/{vue-ui-carousel-table-BsFNypM6.cjs → vue-ui-carousel-table-CMs7scX3.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnOsmGVc.js → vue-ui-carousel-table-Df2HHk0v.js} +4 -4
- package/dist/{vue-ui-chestnut-DFb7M_SC.js → vue-ui-chestnut-BKTnDElg.js} +65 -64
- package/dist/{vue-ui-chestnut-tK8ebPQM.cjs → vue-ui-chestnut-CCw8h0_m.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-eRMlWI.cjs → vue-ui-cursor-C-8bpiuy.cjs} +1 -1
- package/dist/{vue-ui-cursor-CYk61ZVK.js → vue-ui-cursor-DOOlFN5D.js} +2 -2
- package/dist/{vue-ui-dashboard-Cbk74q7K.cjs → vue-ui-dashboard-B_h8KxOx.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BomFWtsP.js → vue-ui-dashboard-D7U1UkAh.js} +2 -2
- package/dist/{vue-ui-digits-Ch9quA4D.js → vue-ui-digits-DmxQgABv.js} +2 -2
- package/dist/{vue-ui-digits-DWJOvgi2.cjs → vue-ui-digits-DoQoNGGx.cjs} +1 -1
- package/dist/{vue-ui-donut-BIMgi_Qw.cjs → vue-ui-donut-DdnwGXq6.cjs} +1 -1
- package/dist/vue-ui-donut-evolution-DsRAZLMN.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-ClNciLi2.js → vue-ui-donut-evolution-uPCTV6E6.js} +95 -95
- package/dist/{vue-ui-donut-Ctzc7e6_.js → vue-ui-donut-t5zf9Lm5.js} +42 -42
- package/dist/{vue-ui-dumbbell-IBrAHdlc.js → vue-ui-dumbbell-BCdxqHVR.js} +109 -107
- package/dist/vue-ui-dumbbell-D1Ak2pEE.cjs +9 -0
- package/dist/vue-ui-flow-CLqm5nkx.cjs +1 -0
- package/dist/vue-ui-flow-J1SmdKkh.js +469 -0
- package/dist/vue-ui-galaxy-CSXbhXBe.cjs +1 -0
- package/dist/{vue-ui-galaxy-BBKU6WqV.js → vue-ui-galaxy-DNMbyKNg.js} +91 -91
- package/dist/{vue-ui-gauge-CDpN6D_X.js → vue-ui-gauge-CC_9cSwj.js} +84 -84
- package/dist/vue-ui-gauge-O3ntKI31.cjs +1 -0
- package/dist/{vue-ui-gizmo-BS-olrbu.js → vue-ui-gizmo-C5vGMHUU.js} +2 -2
- package/dist/{vue-ui-gizmo-Dyi4DWSA.cjs → vue-ui-gizmo-qrJt0nH6.cjs} +1 -1
- package/dist/vue-ui-heatmap-BjimHnMb.cjs +1 -0
- package/dist/{vue-ui-heatmap-Bonl3GBj.js → vue-ui-heatmap-ByxLZuR5.js} +257 -239
- package/dist/{vue-ui-kpi-MeC195T8.js → vue-ui-kpi-DdNQlVCe.js} +3 -3
- package/dist/{vue-ui-kpi-ChD3Gh4P.cjs → vue-ui-kpi-eyxMedig.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-NiTij5XQ.cjs → vue-ui-mini-loader-B5ykH9BF.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-l2G4D7lJ.js → vue-ui-mini-loader-C05VGcNr.js} +2 -2
- package/dist/{vue-ui-molecule-C1dO-Ony.js → vue-ui-molecule-DI0oHPT5.js} +20 -20
- package/dist/{vue-ui-molecule-pXZ3aWlr.cjs → vue-ui-molecule-LZ1SRkgK.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3Gv4iYr.cjs → vue-ui-mood-radar-BJqk2oK_.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BVpJ3O4m.js → vue-ui-mood-radar-DIDqiVMf.js} +9 -9
- package/dist/{vue-ui-nested-donuts-Dmeqsml8.js → vue-ui-nested-donuts-BkSiryoB.js} +120 -120
- package/dist/{vue-ui-nested-donuts-Cwk0M7SE.cjs → vue-ui-nested-donuts-Nggnu_iK.cjs} +2 -2
- package/dist/{vue-ui-onion-BmJO696O.cjs → vue-ui-onion-B29Cxru2.cjs} +1 -1
- package/dist/{vue-ui-onion-Ogj_rMlX.js → vue-ui-onion-xiubSG3j.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-BBBuJdGN.js → vue-ui-parallel-coordinate-plot-DjmOGHVx.js} +69 -69
- package/dist/{vue-ui-parallel-coordinate-plot-Cqm7uMBs.cjs → vue-ui-parallel-coordinate-plot-DqrkSOo6.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BJtgJ_lu.js → vue-ui-quadrant-Cc79ggIy.js} +36 -36
- package/dist/{vue-ui-quadrant-DcqQwIsD.cjs → vue-ui-quadrant-Df_2X-ca.cjs} +1 -1
- package/dist/vue-ui-quick-chart-BnBGXd4d.cjs +15 -0
- package/dist/{vue-ui-quick-chart-D7dCfDSL.js → vue-ui-quick-chart-t_cPx4OT.js} +549 -515
- package/dist/{vue-ui-radar-BMxzhMFJ.js → vue-ui-radar-C3qEonKT.js} +59 -59
- package/dist/vue-ui-radar-D3W9B9JE.cjs +1 -0
- package/dist/{vue-ui-rating-DSgHml7s.js → vue-ui-rating-DffL7w-I.js} +9 -9
- package/dist/{vue-ui-rating-buop0ul0.cjs → vue-ui-rating-aOa6zIr5.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BACMnvv8.cjs → vue-ui-relation-circle-BZ7r7Unx.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CdHbZK0u.js → vue-ui-relation-circle-D0zUfd3f.js} +5 -5
- package/dist/vue-ui-rings-BjWAtE4x.cjs +2 -0
- package/dist/{vue-ui-rings-BBnzxfo2.js → vue-ui-rings-PHbuqfoT.js} +188 -185
- package/dist/{vue-ui-scatter-sF3c5eqM.cjs → vue-ui-scatter-DMJ77QYr.cjs} +1 -1
- package/dist/{vue-ui-scatter-DYXhTzch.js → vue-ui-scatter-DuCnr2yB.js} +378 -375
- package/dist/{vue-ui-screenshot-D-6YvKkW.cjs → vue-ui-screenshot-DBuA631a.cjs} +1 -1
- package/dist/{vue-ui-screenshot-B4WOalT6.js → vue-ui-screenshot-DbwRrmHv.js} +6 -6
- package/dist/{vue-ui-skeleton-D6wHGzmu.cjs → vue-ui-skeleton-CI4t8LHn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-ClzVF3vm.js → vue-ui-skeleton-CcJR2m18.js} +23 -23
- package/dist/{vue-ui-smiley-B1cqwAN5.js → vue-ui-smiley-2rJFSSZS.js} +2 -2
- package/dist/{vue-ui-smiley-CoVnFdkD.cjs → vue-ui-smiley-C7KBm0fz.cjs} +1 -1
- package/dist/vue-ui-spark-trend-DY_sfo6o.js +251 -0
- package/dist/vue-ui-spark-trend-VH2nwGJf.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BOzSGZak.js → vue-ui-sparkbar-B0O77PcV.js} +3 -3
- package/dist/{vue-ui-sparkbar-CpIfPtyd.cjs → vue-ui-sparkbar-Bs8ZQem1.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-4hk6ZJwJ.js → vue-ui-sparkgauge-B5KqrHQZ.js} +64 -64
- package/dist/vue-ui-sparkgauge-Cd7b4u0z.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-VCAQZfgG.cjs → vue-ui-sparkhistogram-CEWCLohQ.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-8degKlMU.js → vue-ui-sparkhistogram-DwRPeG7H.js} +4 -4
- package/dist/{vue-ui-sparkline-DsUwWV4z.cjs → vue-ui-sparkline-CuFtIMpq.cjs} +1 -1
- package/dist/{vue-ui-sparkline-uBkd9kR2.js → vue-ui-sparkline-W5bZnpQo.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cpq2lHcl.js → vue-ui-sparkstackbar-9hBQZ0lZ.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DyNfMGkM.cjs → vue-ui-sparkstackbar-TyVFUMtT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-lr_qudpY.js → vue-ui-stackbar-BlkgM0nD.js} +35 -35
- package/dist/{vue-ui-stackbar-jQe7BneA.cjs → vue-ui-stackbar-CwVcupxt.cjs} +1 -1
- package/dist/vue-ui-strip-plot-C1GfRjXJ.cjs +1 -0
- package/dist/{vue-ui-strip-plot-DwvlcnHB.js → vue-ui-strip-plot-CBfqkkY6.js} +76 -75
- package/dist/{vue-ui-table-Dhj4_z9d.js → vue-ui-table-B8cvvLk8.js} +1 -1
- package/dist/{vue-ui-table-D5ybohqp.cjs → vue-ui-table-CmguTt4I.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CChLZdxj.cjs → vue-ui-table-heatmap-DMnh8-b1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BY65DeiH.js → vue-ui-table-heatmap-wVWltZ2x.js} +26 -26
- package/dist/{vue-ui-table-sparkline-CvMETVJ1.js → vue-ui-table-sparkline-_POawNEL.js} +13 -13
- package/dist/{vue-ui-table-sparkline-Cmy6PcPI.cjs → vue-ui-table-sparkline-wtIFAc20.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BIN2ofrh.js → vue-ui-thermometer-CFJqd-VY.js} +116 -116
- package/dist/vue-ui-thermometer-D6SnFJb1.cjs +1 -0
- package/dist/{vue-ui-timer-DBcOT10h.cjs → vue-ui-timer-194y0LUC.cjs} +1 -1
- package/dist/{vue-ui-timer-DoSqphvk.js → vue-ui-timer-D8dgDAfe.js} +4 -4
- package/dist/vue-ui-tiremarks-BM28JsxE.cjs +1 -0
- package/dist/{vue-ui-tiremarks-DRTLsMWt.js → vue-ui-tiremarks-CH1BFqbO.js} +71 -71
- package/dist/vue-ui-treemap-BIpIg3Qa.cjs +1 -0
- package/dist/{vue-ui-treemap-D8-D_wfq.js → vue-ui-treemap-DHsoVY5n.js} +89 -82
- package/dist/{vue-ui-vertical-bar-zUaXmUpB.js → vue-ui-vertical-bar-DNODBoSo.js} +246 -242
- package/dist/vue-ui-vertical-bar-Du8ikoWM.cjs +4 -0
- package/dist/{vue-ui-waffle-CztGir7e.js → vue-ui-waffle-C8hMAeMl.js} +44 -44
- package/dist/{vue-ui-waffle-RCqpPcSF.cjs → vue-ui-waffle-_Bi9MRx8.cjs} +1 -1
- package/dist/{vue-ui-wheel-CBqL8FKG.cjs → vue-ui-wheel-BZxcRGJX.cjs} +1 -1
- package/dist/{vue-ui-wheel-BQ2a-ZyV.js → vue-ui-wheel-CmZKsfKj.js} +5 -5
- package/dist/{vue-ui-word-cloud-CKUGIGnW.js → vue-ui-word-cloud-fLf-x06l.js} +68 -65
- package/dist/vue-ui-word-cloud-nHVG2yid.cjs +1 -0
- package/dist/{vue-ui-xy-Dsa2tfKS.js → vue-ui-xy-CPln5bGQ.js} +82 -82
- package/dist/vue-ui-xy-canvas-Z1tJJV5-.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-JeNqaB_p.js → vue-ui-xy-canvas-k30CEsKi.js} +122 -121
- package/dist/vue-ui-xy-qxQy2sOl.cjs +3 -0
- package/package.json +1 -1
- package/dist/vue-ui-age-pyramid-BILMRRi1.cjs +0 -1
- package/dist/vue-ui-donut-evolution-K7LUkN6q.cjs +0 -1
- package/dist/vue-ui-dumbbell-HVpK20XO.cjs +0 -9
- package/dist/vue-ui-flow-CiXnGdNb.js +0 -465
- package/dist/vue-ui-flow-ClV2yd8Y.cjs +0 -1
- package/dist/vue-ui-galaxy-CMCXCWDA.cjs +0 -1
- package/dist/vue-ui-gauge-DwCGaX1h.cjs +0 -1
- package/dist/vue-ui-heatmap-WFNo-GFX.cjs +0 -1
- package/dist/vue-ui-quick-chart-D9zFHA0L.cjs +0 -15
- package/dist/vue-ui-radar-D8ik0Fqr.cjs +0 -1
- package/dist/vue-ui-rings-Dn5opKNy.cjs +0 -2
- package/dist/vue-ui-spark-trend-DnO4DW0n.cjs +0 -1
- package/dist/vue-ui-spark-trend-HioE2zeC.js +0 -251
- package/dist/vue-ui-sparkgauge-C2_I0tyO.cjs +0 -1
- package/dist/vue-ui-strip-plot-BMKaWqD4.cjs +0 -1
- package/dist/vue-ui-thermometer-Bfp-FwRE.cjs +0 -1
- package/dist/vue-ui-tiremarks-BeBJHz2R.cjs +0 -1
- package/dist/vue-ui-treemap-DqBukSj6.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BM3aaSuB.cjs +0 -4
- package/dist/vue-ui-word-cloud-BbnU0d3E.cjs +0 -1
- package/dist/vue-ui-xy-BU0fCkSk.cjs +0 -3
- package/dist/vue-ui-xy-canvas-IaIARWWS.cjs +0 -9
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as b, ref as c, onMounted as h, watch as F, openBlock as n, createElementBlock as s, normalizeClass as v, normalizeStyle as u, createElementVNode as g, renderSlot as i, createTextVNode as p, toDisplayString as $, createVNode as N, Fragment as D, unref as y } from "vue";
|
|
2
|
-
import { u as S } from "./useNestedProp-
|
|
3
|
-
import { u as x, i as z, f as A } from "./index-
|
|
4
|
-
import B from "./vue-ui-digits-
|
|
2
|
+
import { u as S } from "./useNestedProp-DLnT0Wtg.js";
|
|
3
|
+
import { u as x, i as z, f as A } from "./index-C_05i_JG.js";
|
|
4
|
+
import B from "./vue-ui-digits-DmxQgABv.js";
|
|
5
5
|
const I = {
|
|
6
6
|
__name: "vue-ui-kpi",
|
|
7
7
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),m=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),m=require("./useNestedProp-CPsbJAGj.cjs"),n=require("./index-NNZeHOBS.cjs"),f=require("./vue-ui-digits-DoQoNGGx.cjs"),g={__name:"vue-ui-kpi",props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(u){const o=u,{vue_ui_kpi:c}=n.useConfig(),e=a.computed(()=>m.useNestedProp({userConfig:o.config,defaultConfig:c})),d=a.ref((typeof o.dataset=="number",o.dataset)),t=a.ref(e.value.useAnimation?e.value.animationValueStart:d.value),i=l=>{const s=e.value.animationFrames,r=Math.abs(l-t.value)/s;function v(){t.value<l?t.value=Math.min(t.value+r,l):t.value>l&&(t.value=Math.max(t.value-r,l)),t.value!==l&&requestAnimationFrame(v)}v()};return a.onMounted(()=>{e.value.useAnimation?(t.value=e.value.animationValueStart,i(o.dataset)):t.value=o.dataset}),a.watch(()=>o.dataset,l=>{e.value.useAnimation?i(l):t.value=l}),(l,s)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`vue-ui-kpi ${e.value.layoutClass}`),style:a.normalizeStyle(`background:${e.value.backgroundColor}; ${e.value.layoutCss}`)},[a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-title ${e.value.titleClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.titleFontSize}px; color:${e.value.titleColor}; font-weight:${e.value.titleBold?"bold":"normal"}; ${e.value.titleCss}`)},[a.renderSlot(l.$slots,"title",{comment:u.dataset}),a.createTextVNode(" "+a.toDisplayString(e.value.title),1)],6),a.renderSlot(l.$slots,"comment-before",{comment:u.dataset}),a.createElementVNode("div",{class:a.normalizeClass(`vue-ui-kpi-value ${e.value.valueClass}`),style:a.normalizeStyle(`font-family: ${e.value.fontFamily}; font-size:${e.value.valueFontSize}px; color:${e.value.valueColor}; font-weight:${e.value.valueBold?"bold":"normal"}; ${e.value.valueCss}`)},[a.renderSlot(l.$slots,"value",{comment:u.dataset}),e.value.analogDigits.show?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({height:e.value.analogDigits.height+"px"})},[a.createVNode(f.default,{dataset:Number(t.value.toFixed(e.value.valueRounding)),config:{backgroundColor:e.value.backgroundColor,digits:{color:e.value.analogDigits.color,skeletonColor:e.value.analogDigits.skeletonColor}}},null,8,["dataset","config"])],4)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(a.unref(n.applyDataLabel)(e.value.formatter,t.value,a.unref(n.dataLabel)({p:e.value.prefix,v:t.value,s:e.value.suffix,r:e.value.valueRounding}))),1)],64))],6),a.renderSlot(l.$slots,"comment-after",{comment:u.dataset})],6))}};exports.default=g;
|
|
@@ -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-CPsbJAGj.cjs"),n=require("./index-NNZeHOBS.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){const a=u;e.useCssVars(k=>({"221651ee":c.value,d11bae38:d.value,d85c00de:p.value}));const{vue_ui_mini_loader:i}=n.useConfig(),t=e.computed(()=>v.useNestedProp({userConfig:a.config,defaultConfig:i})),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,6 +1,6 @@
|
|
|
1
1
|
import { useCssVars as h, computed as r, ref as f, openBlock as n, createElementBlock as u, unref as M, createElementVNode as t, normalizeStyle as l, createCommentVNode as a } from "vue";
|
|
2
|
-
import { u as m } from "./useNestedProp-
|
|
3
|
-
import { u as y, X as L } from "./index-
|
|
2
|
+
import { u as m } from "./useNestedProp-DLnT0Wtg.js";
|
|
3
|
+
import { u as y, X as L } from "./index-C_05i_JG.js";
|
|
4
4
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const b = ["xmlns", "viewBox"], x = { key: 0 }, $ = ["stroke"], w = ["stroke"], A = ["stroke"], N = { key: 1 }, O = ["stroke"], S = { key: 2 }, F = ["stroke"], I = {
|
|
6
6
|
__name: "vue-ui-mini-loader",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as N, withModifiers as M, createBlock as U, createCommentVNode as m, createElementVNode as x, toDisplayString as Te, normalizeStyle as
|
|
2
|
-
import { u as qe, o as Ze, e as
|
|
3
|
-
import { _ as rt } from "./Title-
|
|
4
|
-
import { u as it, U as ut } from "./usePrinter-
|
|
5
|
-
import { D as ct } from "./DataTable-
|
|
6
|
-
import { _ as dt } from "./Tooltip-
|
|
7
|
-
import W from "./BaseIcon-
|
|
8
|
-
import vt from "./vue-ui-skeleton-
|
|
9
|
-
import ft from "./vue-ui-accordion-
|
|
10
|
-
import { u as Pe } from "./useNestedProp-
|
|
1
|
+
import { toRef as ne, resolveComponent as re, openBlock as s, createElementBlock as r, Fragment as y, renderList as N, withModifiers as M, createBlock as U, createCommentVNode as m, createElementVNode as x, toDisplayString as Te, normalizeStyle as K, createVNode as R, computed as B, onMounted as Ve, ref as g, normalizeClass as Ce, unref as I, createSlots as Ye, withCtx as $, renderSlot as P, normalizeProps as Z, guardReactiveProps as J, createTextVNode as We, nextTick as $e } from "vue";
|
|
2
|
+
import { u as qe, o as Ze, e as Je, c as xe, t as Ke, a as Qe, p as we, b as _e, X as et, l as tt, M as ot, q as lt, r as at, x as st, y as nt } from "./index-C_05i_JG.js";
|
|
3
|
+
import { _ as rt } from "./Title-CPZstF2C.js";
|
|
4
|
+
import { u as it, U as ut } from "./usePrinter-DOhlzlnx.js";
|
|
5
|
+
import { D as ct } from "./DataTable-BGJ2mVxG.js";
|
|
6
|
+
import { _ as dt } from "./Tooltip-CBmmiqKr.js";
|
|
7
|
+
import W from "./BaseIcon-CS18qRiy.js";
|
|
8
|
+
import vt from "./vue-ui-skeleton-CcJR2m18.js";
|
|
9
|
+
import ft from "./vue-ui-accordion-rGJVvi_V.js";
|
|
10
|
+
import { u as Pe } from "./useNestedProp-DLnT0Wtg.js";
|
|
11
11
|
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], gt = {
|
|
13
13
|
__name: "RecursiveCircles",
|
|
@@ -198,7 +198,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
198
198
|
emits: ["moveLeft", "moveTop", "moveRight", "moveBottom", "reset"],
|
|
199
199
|
setup(a, { emit: k }) {
|
|
200
200
|
return (C, c) => (s(), r("div", {
|
|
201
|
-
style:
|
|
201
|
+
style: K(`position: ${a.isFullscreen ? "fixed" : "absolute"};bottom:0;right:${a.isFullscreen ? "12px" : "0"};width:80px;height:80px`),
|
|
202
202
|
"data-html2canvas-ignore": ""
|
|
203
203
|
}, [
|
|
204
204
|
x("div", $t, [
|
|
@@ -278,7 +278,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
278
278
|
setup(a, { expose: k }) {
|
|
279
279
|
const C = a, { vue_ui_molecule: c } = qe(), d = B(() => !!C.dataset && C.dataset.length);
|
|
280
280
|
Ve(() => {
|
|
281
|
-
Ze(C.dataset) &&
|
|
281
|
+
Ze(C.dataset) && Je({
|
|
282
282
|
componentName: "VueUiMolecule",
|
|
283
283
|
type: "dataset"
|
|
284
284
|
});
|
|
@@ -290,7 +290,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
290
290
|
});
|
|
291
291
|
return e.theme ? {
|
|
292
292
|
...Pe({
|
|
293
|
-
userConfig:
|
|
293
|
+
userConfig: Ke.vue_ui_molecule[e.theme] || C.config,
|
|
294
294
|
defaultConfig: e
|
|
295
295
|
}),
|
|
296
296
|
customPalette: Qe[e.theme] || we
|
|
@@ -516,12 +516,12 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
516
516
|
ref_key: "moleculeChart",
|
|
517
517
|
ref: f,
|
|
518
518
|
class: Ce(`vue-ui-molecule ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
519
|
-
style:
|
|
519
|
+
style: K(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),
|
|
520
520
|
id: `cluster_${S.value}`
|
|
521
521
|
}, [
|
|
522
522
|
t.value.style.chart.title.text ? (s(), r("div", {
|
|
523
523
|
key: 0,
|
|
524
|
-
style:
|
|
524
|
+
style: K(`width:100%;background:${t.value.style.chart.backgroundColor};`)
|
|
525
525
|
}, [
|
|
526
526
|
R(rt, {
|
|
527
527
|
config: {
|
|
@@ -608,7 +608,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
608
608
|
e.$slots.optionFullscreen ? {
|
|
609
609
|
name: "optionFullscreen",
|
|
610
610
|
fn: $(({ toggleFullscreen: l, isFullscreen: v }) => [
|
|
611
|
-
P(e.$slots, "optionFullscreen", Z(
|
|
611
|
+
P(e.$slots, "optionFullscreen", Z(J({ toggleFullscreen: l, isFullscreen: v })), void 0, !0)
|
|
612
612
|
]),
|
|
613
613
|
key: "6"
|
|
614
614
|
} : void 0
|
|
@@ -618,7 +618,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
618
618
|
xmlns: I(et),
|
|
619
619
|
viewBox: _.value,
|
|
620
620
|
class: Ce({ "vue-data-ui-fullscreen--on": G.value, "vue-data-ui-fulscreen--off": !G.value }),
|
|
621
|
-
style:
|
|
621
|
+
style: K(`overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`),
|
|
622
622
|
onClick: o[0] || (o[0] = M((l) => Ie(l), ["stop"]))
|
|
623
623
|
}, [
|
|
624
624
|
x("defs", null, [
|
|
@@ -674,7 +674,7 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
674
674
|
})
|
|
675
675
|
}, null, 8, ["color", "isFullscreen"])) : m("", !0),
|
|
676
676
|
e.$slots.watermark ? (s(), r("div", St, [
|
|
677
|
-
P(e.$slots, "watermark", Z(
|
|
677
|
+
P(e.$slots, "watermark", Z(J({ isPrinting: I(ue) || I(ce) })), void 0, !0)
|
|
678
678
|
])) : m("", !0),
|
|
679
679
|
d.value ? m("", !0) : (s(), U(vt, {
|
|
680
680
|
key: 5,
|
|
@@ -704,10 +704,10 @@ const pt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMou
|
|
|
704
704
|
isCustom: t.value.style.chart.tooltip.customFormat && typeof t.value.style.chart.tooltip.customFormat == "function"
|
|
705
705
|
}, {
|
|
706
706
|
"tooltip-before": $(() => [
|
|
707
|
-
P(e.$slots, "tooltip-before", Z(
|
|
707
|
+
P(e.$slots, "tooltip-before", Z(J({ ...le.value })), void 0, !0)
|
|
708
708
|
]),
|
|
709
709
|
"tooltip-after": $(() => [
|
|
710
|
-
P(e.$slots, "tooltip-after", Z(
|
|
710
|
+
P(e.$slots, "tooltip-after", Z(J({ ...le.value })), void 0, !0)
|
|
711
711
|
]),
|
|
712
712
|
_: 3
|
|
713
713
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-nPEJmXmf.cjs"),we=require("./Title-B_p983os.cjs"),re=require("./usePrinter-D012Olnq.cjs"),$e=require("./DataTable-B6xCb-DR.cjs"),Fe=require("./Tooltip-C2dhDgoh.cjs"),z=require("./BaseIcon-aPcCSO_Z.cjs"),Pe=require("./vue-ui-skeleton-D6wHGzmu.cjs"),Ne=require("./vue-ui-accordion-CHL4xuW4.cjs"),ne=require("./useNestedProp-TbnnNrH2.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__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(n,{emit:g}){const y=n;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Te))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const g=n;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;return e.toRef(y,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je={key:4,class:"vue-data-ui-watermark"},Ge=["innerHTML"],Xe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:g}){const y=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=ne.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...ne.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:X,isImaging:Y,generatePdf:W,generateImage:Z}=re.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function J(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?J(t[0].nodes,l+1):l}function se(){const t=J(y.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function K(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ae.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=K(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>K(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,ye=m*$*2,ke=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-r)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-f)/L;let E=0;function le(){U.value=`${r+be*E} ${d+Ce*E} ${s+Be*E} ${f+xe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(le))}le()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const Q=e.ref(null),T=e.ref(null);function fe(t){Q.value=t,t?(i.value=!0,ve(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function me(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const pe=e.computed(()=>me(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={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},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function _(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function ee(){k.value.showTable=!k.value.showTable}function te(){k.value.showDataLabels=!k.value.showDataLabels}function oe(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:W,generateCsv:_,generateImage:Z,toggleTable:ee,toggleLabels:te,toggleTooltip:oe}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{Q.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{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"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(Y),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:_,onGenerateImage:e.unref(Z),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe},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:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>de(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:fe},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.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:v.value,content:b.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({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode($e.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,Ge)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Ye=Ee._export_sfc(Xe,[["__scopeId","data-v-a8f784eb"]]);exports.default=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-NNZeHOBS.cjs"),we=require("./Title-PZ6S96pU.cjs"),re=require("./usePrinter-BLbY8qGZ.cjs"),$e=require("./DataTable-CSEiZDAb.cjs"),Fe=require("./Tooltip-BoIYPSX3.cjs"),z=require("./BaseIcon-O8jJvy48.cjs"),Pe=require("./vue-ui-skeleton-CI4t8LHn.cjs"),Ne=require("./vue-ui-accordion-CcdyvXrp.cjs"),ne=require("./useNestedProp-CPsbJAGj.cjs"),Ee=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],Se={__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(n,{emit:g}){const y=n;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(y,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(i=>{i.ancestor=a})}),(a,i)=>{const b=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(F,P)=>(e.openBlock(),e.createElementBlock("circle",{cx:F.x,cy:F.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:n.hoveredUid&&n.hoveredUid===v.uid?n.strokeHovered:n.stroke,"stroke-width":n.hoveredUid&&n.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(h=>u(v),["stop"]),onMouseover:h=>c(v),onMouseleave:i[0]||(i[0]=h=>c(null))},null,40,Te))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(b,{key:0,dataset:v.nodes,color:n.color,stroke:n.stroke,strokeHovered:n.strokeHovered,hoveredUid:n.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ve=["x1","y1","x2","y2","stroke","stroke-width"],Re=["x1","y1","x2","y2","stroke","stroke-width"],Le={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(n){const g=n;return e.toRef(g,"dataset").value.forEach(u=>{u.nodes&&u.nodes.length>0&&u.nodes.forEach(c=>{c.ancestor=u})}),(u,c)=>{const B=e.resolveComponent("RecursiveLinks",!0);return e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(i,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ve),e.createElementVNode("line",{x1:i.x,y1:i.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:n.color,"stroke-width":a.circleRadius/2},null,8,Re)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:n.color,backgroundColor:n.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},ze=["x","y","fill","font-size"],Me={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(n,{emit:g}){const y=n;return e.toRef(y,"dataset").value.forEach(c=>{c.nodes&&c.nodes.length>0&&c.nodes.forEach(B=>{B.ancestor=c})}),(c,B)=>{const a=e.resolveComponent("RecursiveLabels",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.dataset,i=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.polygonPath&&i.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.polygonPath.coordinates,b=>(e.openBlock(),e.createElementBlock("text",{x:b.x,y:b.y+i.circleRadius*2,fill:n.color,"font-size":i.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(i.name),9,ze))),256)),i.nodes&&i.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:i.nodes,color:n.color,hoveredUid:n.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},De={style:{position:"relative",height:"100%",width:"100%"}},Ue={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(n,{emit:g}){return(y,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${n.isFullscreen?"fixed":"absolute"};bottom:0;right:${n.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",De,[e.createElementVNode("button",{onClick:u[0]||(u[0]=e.withModifiers(c=>g("moveLeft"),["stop"])),style:{position:"absolute",left:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowLeft",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[1]||(u[1]=e.withModifiers(c=>g("moveTop"),["stop"])),style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowTop",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[2]||(u[2]=e.withModifiers(c=>g("moveRight"),["stop"])),style:{position:"absolute",right:"0",top:"50%",transform:"translateY(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowRight",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[3]||(u[3]=e.withModifiers(c=>g("moveBottom"),["stop"])),style:{position:"absolute",bottom:"0",left:"50%",transform:"translateX(-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"arrowBottom",style:{cursor:"pointer"}},null,8,["stroke"])]),e.createElementVNode("button",{onClick:u[4]||(u[4]=e.withModifiers(c=>g("reset"),["stop"])),style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%,-50%)",height:"24px",width:"24px",padding:"0",background:"transparent",border:"none",display:"flex","align-items":"center","justify-content":"center"}},[e.createVNode(z.default,{stroke:n.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Ie=["id"],Oe=["xmlns","viewBox"],He=["id"],qe=["stop-color"],Ae=["stop-color"],je={key:4,class:"vue-data-ui-watermark"},Ge=["innerHTML"],Xe={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(n,{expose:g}){const y=n,{vue_ui_molecule:u}=p.useConfig(),c=e.computed(()=>!!y.dataset&&y.dataset.length);e.onMounted(()=>{p.objectIsEmpty(y.dataset)&&p.error({componentName:"VueUiMolecule",type:"dataset"})});const B=e.ref(p.createUid()),a=e.ref(null),i=e.ref(!1),b=e.ref(""),v=e.ref(null),F=e.ref(null),P=e.ref(!1),h=e.ref(null),G=e.ref(null),D=e.ref(0),o=e.computed(()=>{const t=ne.useNestedProp({userConfig:y.config,defaultConfig:u});return t.theme?{...ne.useNestedProp({userConfig:p.themes.vue_ui_molecule[t.theme]||y.config,defaultConfig:t}),customPalette:p.themePalettes[t.theme]||p.palette}:t}),{isPrinting:X,isImaging:Y,generatePdf:W,generateImage:Z}=re.usePrinter({elementId:`cluster_${B.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),ae=e.computed(()=>p.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function J(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?J(t[0].nodes,l+1):l}function se(){const t=J(y.dataset);let l=100,r=l;for(let d=0;d<t;d+=1)l/=1,r+=l;return{height:r,width:r}}const x=e.ref(se()),U=e.ref(`0 0 ${x.value.width} ${x.value.height}`);function K(t,l={x:-x.value.width/2.43,y:x.value.height/2},r=x.value.width/1.1,d=24,s=0,f=0,V="#BBBBBB"){if(t&&t.length>0){const A=p.createPolygonPath({plot:l,radius:r,sides:t.length,rotation:s});t.forEach((m,$)=>{const R=A.coordinates[$];let w;if(m.ancestor?m.ancestor.ancestor?w=m.ancestor.color||V:(w=ae.value[f]||p.palette[f]||V,f+=1):w=V,m.polygonPath={coordinates:[R]},m.circleRadius=d,m.color=w,m.uid=p.createUid(),m.nodes&&m.nodes.length>0){const j=!m.ancestor||!m.ancestor.ancestor?f:0;m.nodes=K(m.nodes,R,r/2.9,d/2.2,s+Math.PI*$/m.nodes.length,j,w)}})}return t}function ie(t){const l=new Set;function r(s){s.forEach(f=>{f.color&&!l.has(f.color)&&l.add(f.color),f.nodes&&f.nodes.length>0&&r(f.nodes)})}r(t);const d={};return Array.from(l).forEach((s,f)=>{d[s]=`gradient_${f}`}),d}const ue=e.computed(()=>ie(C.value)),C=e.computed(()=>K(y.dataset));function I(){P.value=!1,F.value=null,G.value=null,h.value=null,H({polygonPath:{coordinates:[{x:x.value.width/2,y:x.value.height/2}]},circleRadius:24})}const O=e.ref(null);function H(t){v.value.focus(),e.nextTick(()=>{O.value&&cancelAnimationFrame(O.value);const l=U.value.split(" "),r=parseFloat(l[0]),d=parseFloat(l[1]),s=parseFloat(l[2]),f=parseFloat(l[3]),{x:V,y:A}=t.polygonPath.coordinates[0],{circleRadius:m}=t,$=8.34,R=V-m*$,w=A-m*$,j=m*$*2,ye=m*$*2,ke=Math.sqrt((R-r)**2+(w-d)**2),L=Math.min(1200,Math.max(20,Math.floor(ke/10))),be=(R-r)/L,Ce=(w-d)/L,Be=(j-s)/L,xe=(ye-f)/L;let E=0;function le(){U.value=`${r+be*E} ${d+Ce*E} ${s+Be*E} ${f+xe*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(O.value=requestAnimationFrame(le))}le()})}function ce(t){F.value===t.uid?I():(F.value=t.uid,G.value=t,h.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},H(t),P.value=t.uid!==C.value[0].uid)}function de(t){if(t.target.nodeName!=="circle")I(),P.value=!1;else return}const q=e.ref(null);function ve(t){q.value={datapoint:t,seriesIndex:-1,series:C.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(p.isFunction(l)&&p.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value})))b.value=l({seriesIndex:-1,datapoint:t,series:C.value,config:o.value});else{let r="";r+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(r+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),b.value=`<div style="font-family:inherit">${r}</div>`}}const Q=e.ref(null),T=e.ref(null);function fe(t){Q.value=t,t?(i.value=!0,ve(t),T.value=t.uid):(i.value=!1,b.value="",T.value=null)}function M(t){t==="right"&&(h.value.polygonPath.coordinates[0].x+=h.value.circleRadius),t==="left"&&(h.value.polygonPath.coordinates[0].x-=h.value.circleRadius),t==="top"&&(h.value.polygonPath.coordinates[0].y-=h.value.circleRadius),t==="bottom"&&(h.value.polygonPath.coordinates[0].y+=h.value.circleRadius),H(h.value)}function me(t){const l=[];function r(d){d.forEach(s=>{const f={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(f),s.nodes&&s.nodes.length>0&&r(s.nodes,s.name)})}return r(t),l}const pe=e.computed(()=>me(C.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=pe.value.map((s,f)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),r={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},d=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:r,colNames:d}});function _(){e.nextTick(()=>{const t=N.value.body.map((d,s)=>[[d[0].name],[d[1]],[d[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),r=p.createCsvContent(l);p.downloadCsv({csvContent:r,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function he(){return C.value}const S=e.ref(!1);function ge(t){S.value=t,D.value+=1}function ee(){k.value.showTable=!k.value.showTable}function te(){k.value.showDataLabels=!k.value.showDataLabels}function oe(){k.value.showTooltip=!k.value.showTooltip}return g({getData:he,generatePdf:W,generateCsv:_,generateImage:Z,toggleTable:ee,toggleLabels:te,toggleTooltip:oe}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseleave:l[7]||(l[7]=r=>{Q.value=null,T.value=null}),ref_key:"moleculeChart",ref:v,class:e.normalizeClass(`vue-ui-molecule ${S.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${B.value}`},[o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${o.value.style.chart.backgroundColor};`)},[e.createVNode(we._sfc_main,{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"])],4)):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value?(e.openBlock(),e.createBlock(re.UserOptions,{ref_key:"details",ref:a,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(X),isImaging:e.unref(Y),uid:B.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:v.value,onToggleFullscreen:ge,onGeneratePdf:e.unref(W),onGenerateCsv:_,onGenerateImage:e.unref(Z),onToggleTable:ee,onToggleLabels:te,onToggleTooltip:oe},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:r,isFullscreen:d})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:r,isFullscreen:d})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(p.XMLNS),viewBox:U.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),style:e.normalizeStyle(`overflow: hidden; background:${o.value.style.chart.backgroundColor};color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(r=>de(r),["stop"]))},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ue.value),r=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${r}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(p.lightenHexColor)(r,.5)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":r},null,8,Ae)],8,He))),256))]),e.createVNode(Le,{dataset:C.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(Se,{dataset:C.value,hoveredUid:T.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:ce,onHover:fe},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Me,{key:0,dataset:C.value,color:o.value.style.chart.color,hoveredUid:T.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:x.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createBlock(Ue,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:S.value,onMoveLeft:l[1]||(l[1]=r=>M("left")),onMoveRight:l[2]||(l[2]=r=>M("right")),onMoveTop:l[3]||(l[3]=r=>M("top")),onMoveBottom:l[4]||(l[4]=r=>M("bottom")),onReset:l[5]||(l[5]=r=>{I(),P.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",je,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(X)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Fe._sfc_main,{show:k.value.showTooltip&&i.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:v.value,content:b.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({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode($e.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=r=>k.value.showTable=!1)},{th:e.withCtx(({th:r})=>[e.createElementVNode("div",{innerHTML:r,style:{display:"flex","align-items":"center"}},null,8,Ge)]),td:e.withCtx(({td:r})=>[e.createTextVNode(e.toDisplayString(r.name||r),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ie))}},Ye=Ee._export_sfc(Xe,[["__scopeId","data-v-a8f784eb"]]);exports.default=Ye;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-nPEJmXmf.cjs"),W=require("./Title-B_p983os.cjs"),B=require("./usePrinter-D012Olnq.cjs"),G=require("./Legend-ePmJ_YIA.cjs"),k=require("./BaseIcon-aPcCSO_Z.cjs"),U=require("./DataTable-B6xCb-DR.cjs"),H=require("./vue-ui-skeleton-D6wHGzmu.cjs"),R=require("./vue-ui-accordion-CHL4xuW4.cjs"),E=require("./useNestedProp-TbnnNrH2.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],le=["stroke"],oe=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],fe=["y","fill","font-weight"],ke=["y","fill"],pe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:S}){const s=L,{vue_ui_mood_radar:T}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(r.createUid()),N=e.ref(null),A=e.ref(null),n=e.ref(null),t=e.computed(()=>{const o=E.useNestedProp({userConfig:s.config,defaultConfig:T});return o.theme?{...E.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[o.theme]||s.config,defaultConfig:o})}:o}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),p=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function I({centerX:o,centerY:a,apexX:l,apexY:u,proportion:c,key:f,value:q}){return{x:o+(l-o)*c,y:a+(u-a)*c,key:f,value:q}}const F=e.computed(()=>Math.max(...Object.values(s.dataset).map(o=>isNaN(o)?0:o))),v=e.computed(()=>Object.values(s.dataset).reduce((o,a)=>(isNaN(o)?0:o)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((o,a)=>{const l=typeof s.dataset[o]!="number"||isNaN(s.dataset[o])?0:s.dataset[o];return{index:a,key:o,value:l,proportion:l/v.value,color:t.value.style.chart.layout.smileys.colors[o]}}).sort((o,a)=>a.key-o.key)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(o=>{[null,void 0].includes(s.dataset[o])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:o})}),C.value.coordinates.map((o,a)=>{const l=I({centerX:d.value.width/2,centerY:d.value.height/2,apexX:o.x,apexY:o.y,proportion:i.value[a].value/F.value,key:i.value[a].key,value:i.value[a].value});return{...o,plots:l,key:i.value[a].key}})):[]),O=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 D(o){o===n.value?n.value=null:n.value=o}const y=e.computed(()=>{const o=i.value.map(l=>({name:l.key,color:l.color})),a=i.value.map(l=>isNaN(l.value)?0:l.value);return{head:o,body:a}});function M(){e.nextTick(()=>{const o=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={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:o,body:a,config:l,colNames:u}});function z(){return i.value}function P(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function j(o){b.value=o}return S({getData:z,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(o,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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),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,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,l=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ee))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,te),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,le),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=l=>n.value=5),onMouseleave:a[1]||(a[1]=l=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,oe),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,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=l=>n.value=4),onMouseleave:a[3]||(a[3]=l=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),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,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=l=>n.value=3),onMouseleave:a[5]||(a[5]=l=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),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,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=l=>n.value=2),onMouseleave:a[7]||(a[7]=l=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),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,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=l=>n.value=1),onMouseleave:a[9]||(a[9]=l=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(r.makePath)($.value.map(l=>l.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})`:t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(l=>l.plots),(l,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==l.key?"1":"0"}`)},[e.createElementVNode("line",{x1:l.x,y1:l.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,ve),e.createElementVNode("circle",{cx:l.x,cy:l.y,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(l.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,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),9,fe),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,ke)],4))),256)),e.renderSlot(o.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:5,legendSet:i.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:()=>D(l.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[l.key==1?(e.openBlock(),e.createBlock(k.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==2?(e.openBlock(),e.createBlock(k.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==3?(e.openBlock(),e.createBlock(k.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==4?(e.openBlock(),e.createBlock(k.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==5?(e.openBlock(),e.createBlock(k.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",be,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,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(U.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]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ce)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-1399dfb6"]]);exports.default=xe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-NNZeHOBS.cjs"),W=require("./Title-PZ6S96pU.cjs"),B=require("./usePrinter-BLbY8qGZ.cjs"),G=require("./Legend-DuuSl2rJ.cjs"),k=require("./BaseIcon-O8jJvy48.cjs"),U=require("./DataTable-CSEiZDAb.cjs"),H=require("./vue-ui-skeleton-CI4t8LHn.cjs"),R=require("./vue-ui-accordion-CcdyvXrp.cjs"),E=require("./useNestedProp-CPsbJAGj.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=["id"],Y=["xmlns","viewBox"],J=["id"],Q=["stop-color"],Z=["stop-color"],ee=["x1","y1","x2","y2","stroke","stroke-width"],te=["d","stroke","stroke-width"],le=["stroke"],oe=["fill"],ae=["stroke"],re=["fill"],ne=["stroke"],se=["fill"],ue=["stroke"],ie=["fill"],ce=["stroke"],de=["fill"],ye=["d","stroke","stroke-width","fill"],ve=["x1","y1","stroke"],me=["cx","cy","fill","stroke"],he=["fill","stroke"],fe=["y","fill","font-weight"],ke=["y","fill"],pe={key:3,class:"vue-data-ui-watermark"},ge=["onClick"],be={style:{"font-weight":"bold"}},Ce=["innerHTML"],Ne={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:S}){const s=L,{vue_ui_mood_radar:T}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})});const h=e.ref(r.createUid()),N=e.ref(null),A=e.ref(null),n=e.ref(null),t=e.computed(()=>{const o=E.useNestedProp({userConfig:s.config,defaultConfig:T});return o.theme?{...E.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[o.theme]||s.config,defaultConfig:o})}:o}),{isPrinting:x,isImaging:w,generatePdf:_,generateImage:V}=B.usePrinter({elementId:h.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),p=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),C=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function I({centerX:o,centerY:a,apexX:l,apexY:u,proportion:c,key:f,value:q}){return{x:o+(l-o)*c,y:a+(u-a)*c,key:f,value:q}}const F=e.computed(()=>Math.max(...Object.values(s.dataset).map(o=>isNaN(o)?0:o))),v=e.computed(()=>Object.values(s.dataset).reduce((o,a)=>(isNaN(o)?0:o)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((o,a)=>{const l=typeof s.dataset[o]!="number"||isNaN(s.dataset[o])?0:s.dataset[o];return{index:a,key:o,value:l,proportion:l/v.value,color:t.value.style.chart.layout.smileys.colors[o]}}).sort((o,a)=>a.key-o.key)),$=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(o=>{[null,void 0].includes(s.dataset[o])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:o})}),C.value.coordinates.map((o,a)=>{const l=I({centerX:d.value.width/2,centerY:d.value.height/2,apexX:o.x,apexY:o.y,proportion:i.value[a].value/F.value,key:i.value[a].key,value:i.value[a].value});return{...o,plots:l,key:i.value[a].key}})):[]),O=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 D(o){o===n.value?n.value=null:n.value=o}const y=e.computed(()=>{const o=i.value.map(l=>({name:l.key,color:l.color})),a=i.value.map(l=>isNaN(l.value)?0:l.value);return{head:o,body:a}});function M(){e.nextTick(()=>{const o=y.value.head.map((u,c)=>[[u.name],[y.value.body[c]],[isNaN(y.value.body[c]/v.value)?"-":y.value.body[c]/v.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(v.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=y.value.head.map((c,f)=>[{color:c.color,name:c.name},y.value.body[f].toFixed(t.value.table.td.roundingValue),isNaN(y.value.body[f]/v.value)?"-":(y.value.body[f]/v.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),l={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:o,body:a,config:l,colNames:u}});function z(){return i.value}function P(){p.value.showTable=!p.value.showTable}const b=e.ref(!1);function j(o){b.value=o}return S({getData:z,generatePdf:_,generateCsv:M,generateImage:V,toggleTable:P}),(o,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;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(W._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"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value?(e.openBlock(),e.createBlock(B.UserOptions,{key:1,ref_key:"details",ref:A,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(x),isImaging:e.unref(w),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,onToggleFullscreen:j,onGeneratePdf:e.unref(_),onGenerateCsv:M,onGenerateImage:e.unref(V),onToggleTable:P},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[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":t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Q),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100)}${e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,Z)],8,J)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value.coordinates,l=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,ee))),256)),e.createElementVNode("path",{d:C.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,te),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,le),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=l=>n.value=5),onMouseleave:a[1]||(a[1]=l=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?t.value.style.chart.layout.smileys.colors[5]+"33":"transparent"},null,40,oe),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,ae),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=l=>n.value=4),onMouseleave:a[3]||(a[3]=l=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?t.value.style.chart.layout.smileys.colors[4]+"33":"transparent"},null,40,re),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,ne),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[4]||(a[4]=l=>n.value=3),onMouseleave:a[5]||(a[5]=l=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?t.value.style.chart.layout.smileys.colors[3]+"33":"transparent"},null,40,se),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,ue),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=l=>n.value=2),onMouseleave:a[7]||(a[7]=l=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?t.value.style.chart.layout.smileys.colors[2]+"33":"transparent"},null,40,ie),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,ce),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=l=>n.value=1),onMouseleave:a[9]||(a[9]=l=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?t.value.style.chart.layout.smileys.colors[1]+"33":"transparent"},null,40,de),e.createElementVNode("path",{d:e.unref(r.makePath)($.value.map(l=>l.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})`:t.value.style.chart.layout.dataPolygon.color+e.unref(r.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,ye),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value.map(l=>l.plots),(l,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==l.key?"1":"0"}`)},[e.createElementVNode("line",{x1:l.x,y1:l.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,ve),e.createElementVNode("circle",{cx:l.x,cy:l.y,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[l.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,he),e.createElementVNode("text",{x:128,y:["5",5].includes(l.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,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),9,fe),e.createElementVNode("text",{x:128,y:["5",5].includes(l.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.value/v.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,ke)],4))),256)),e.renderSlot(o.$slots,"svg",{svg:d.value},void 0,!0)],14,Y)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(x)||e.unref(w)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(H.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(G.Legend,{key:5,legendSet:i.value,config:O.value,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:()=>D(l.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[l.key==1?(e.openBlock(),e.createBlock(k.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==2?(e.openBlock(),e.createBlock(k.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==3?(e.openBlock(),e.createBlock(k.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==4?(e.openBlock(),e.createBlock(k.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),l.key==5?(e.openBlock(),e.createBlock(k.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[l.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",be,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:l.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:l,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:l.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,ge)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"legend",{legend:i.value},void 0,!0),m.value?(e.openBlock(),e.createBlock(R.default,{key:6,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(U.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]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ce)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,K))}},xe=X._export_sfc(Ne,[["__scopeId","data-v-1399dfb6"]]);exports.default=xe;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { computed as c, onMounted as ie, ref as C, openBlock as n, createElementBlock as g, normalizeClass as G, normalizeStyle as T, createVNode as E, createCommentVNode as i, createBlock as h, unref as r, createSlots as de, withCtx as m, renderSlot as p, normalizeProps as U, guardReactiveProps as H, createElementVNode as a, Fragment as R, renderList as X, toDisplayString as $, createTextVNode as K, nextTick as ce } from "vue";
|
|
2
|
-
import { u as ye, o as ve, e as q, c as he, t as me,
|
|
3
|
-
import { _ as xe } from "./Title-
|
|
4
|
-
import { u as _e, U as we } from "./usePrinter-
|
|
5
|
-
import { L as $e } from "./Legend-
|
|
6
|
-
import M from "./BaseIcon-
|
|
7
|
-
import { D as Me } from "./DataTable-
|
|
8
|
-
import Ne from "./vue-ui-skeleton-
|
|
9
|
-
import Pe from "./vue-ui-accordion-
|
|
10
|
-
import { u as J } from "./useNestedProp-
|
|
2
|
+
import { u as ye, o as ve, e as q, c as he, t as me, M as fe, X as ke, w as F, v as ge, N as pe, i as Y, f as A, q as be, r as Ce } from "./index-C_05i_JG.js";
|
|
3
|
+
import { _ as xe } from "./Title-CPZstF2C.js";
|
|
4
|
+
import { u as _e, U as we } from "./usePrinter-DOhlzlnx.js";
|
|
5
|
+
import { L as $e } from "./Legend-UWyvC57K.js";
|
|
6
|
+
import M from "./BaseIcon-CS18qRiy.js";
|
|
7
|
+
import { D as Me } from "./DataTable-BGJ2mVxG.js";
|
|
8
|
+
import Ne from "./vue-ui-skeleton-CcJR2m18.js";
|
|
9
|
+
import Pe from "./vue-ui-accordion-rGJVvi_V.js";
|
|
10
|
+
import { u as J } from "./useNestedProp-DLnT0Wtg.js";
|
|
11
11
|
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Te = ["id"], Ae = ["xmlns", "viewBox"], Ie = ["id"], Fe = ["stop-color"], Oe = ["stop-color"], Se = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ve = ["d", "stroke", "stroke-width"], je = ["stroke"], Be = ["fill"], De = ["stroke"], We = ["fill"], ze = ["stroke"], Ge = ["fill"], Ee = ["stroke"], Ue = ["fill"], He = ["stroke"], Re = ["fill"], Xe = ["d", "stroke", "stroke-width", "fill"], Ke = ["x1", "y1", "stroke"], qe = ["cx", "cy", "fill", "stroke"], Ye = ["fill", "stroke"], Je = ["y", "fill", "font-weight"], Qe = ["y", "fill"], Ze = {
|
|
13
13
|
key: 3,
|