vue-data-ui 2.4.52 → 2.4.53
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-CFlFdPC5.cjs → Arrow-BGjtcB03.cjs} +1 -1
- package/dist/{Arrow-BuBoE64l.js → Arrow-XbzVXHDF.js} +1 -1
- package/dist/{BaseIcon-zmxwsaLW.js → BaseIcon-CiQzR1fE.js} +1 -1
- package/dist/{BaseIcon-CfhoS_qC.cjs → BaseIcon-DGRZS55E.cjs} +1 -1
- package/dist/{DataTable-CwAdpLng.cjs → DataTable-DWQiMziO.cjs} +1 -1
- package/dist/{DataTable-COkA4Nyz.js → DataTable-jvL0XGWl.js} +2 -2
- package/dist/{Legend-CR9ydX8N.cjs → Legend-BstxUr4T.cjs} +1 -1
- package/dist/{Legend-bYlSC7I7.js → Legend-DcIfRSNC.js} +1 -1
- package/dist/{PackageVersion-C1F3QLoY.cjs → PackageVersion-CeJ2R9gK.cjs} +1 -1
- package/dist/{PackageVersion-Dz3KcTL4.js → PackageVersion-Ve0s76sL.js} +1 -1
- package/dist/{PenAndPaper-DDheVRNG.cjs → PenAndPaper-DQPbe0G_.cjs} +1 -1
- package/dist/{PenAndPaper-BycdTwSP.js → PenAndPaper-IHG7xTmx.js} +3 -3
- package/dist/{Shape-BBp5EwJH.cjs → Shape-Bzx4qKcd.cjs} +1 -1
- package/dist/{Shape-BDJJ38uM.js → Shape-Rg6yW7m3.js} +1 -1
- package/dist/{Slicer-D_DaIThC.js → Slicer-CP2Z31Lc.js} +2 -2
- package/dist/{Slicer-7oTpm-cZ.cjs → Slicer-CPp7_WWa.cjs} +1 -1
- package/dist/{Title-B7ruS8yl.cjs → Title-CSyDhu3S.cjs} +1 -1
- package/dist/{Title-aMb2ETf7.js → Title-DLo3Zo2_.js} +1 -1
- package/dist/{Tooltip-BRZ3DT4p.js → Tooltip-CA1QhFeE.js} +1 -1
- package/dist/{Tooltip-BqSN71SL.cjs → Tooltip-D88h1zvE.cjs} +1 -1
- package/dist/{index-BkXYJDpD.cjs → index-C3wsuQ2C.cjs} +1 -1
- package/dist/{index-K5uyh1gA.js → index-DhxnZ6ZS.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DifqJZAs.js → useNestedProp-BcqToEU0.js} +1 -1
- package/dist/{useNestedProp-C6IvqE-r.cjs → useNestedProp-CFwQtnNB.cjs} +1 -1
- package/dist/{usePrinter-DHv-BwME.cjs → usePrinter-Dglf1bsw.cjs} +1 -1
- package/dist/{usePrinter-p_ZZlGc9.js → usePrinter-mDGfOQZA.js} +1 -1
- package/dist/{vue-data-ui-M0E2b8Dw.cjs → vue-data-ui-BM5qFlPf.cjs} +1 -1
- package/dist/{vue-data-ui-3PlAeIlX.js → vue-data-ui-C6tJVggL.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-PrijRaoI.js → vue-ui-3d-bar-BFzCyxbR.js} +9 -9
- package/dist/{vue-ui-3d-bar-VQyMytda.cjs → vue-ui-3d-bar-DiL5x37F.cjs} +1 -1
- package/dist/{vue-ui-accordion-CsJT7Az3.js → vue-ui-accordion-DDp8hUlk.js} +3 -3
- package/dist/{vue-ui-accordion-kr18wKfc.cjs → vue-ui-accordion-kv5FuXqU.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DFYykOow.js → vue-ui-age-pyramid-ORFLMq65.js} +10 -10
- package/dist/{vue-ui-age-pyramid-BV1MgH8J.cjs → vue-ui-age-pyramid-xYMc6DPS.cjs} +1 -1
- package/dist/{vue-ui-annotator-Blg3LdqF.js → vue-ui-annotator-CYyuSx8D.js} +1 -1
- package/dist/{vue-ui-annotator-DffUZR4a.cjs → vue-ui-annotator-J_Ssv585.cjs} +1 -1
- package/dist/{vue-ui-bullet-DSampkai.cjs → vue-ui-bullet-BbOqOHbK.cjs} +1 -1
- package/dist/{vue-ui-bullet-Ybz4qPWl.js → vue-ui-bullet-D8w5qQKc.js} +8 -8
- package/dist/{vue-ui-candlestick-DsVBdCz_.js → vue-ui-candlestick-B7jJlgII.js} +11 -11
- package/dist/{vue-ui-candlestick-BxcwK8UI.cjs → vue-ui-candlestick-BbKj6Lt5.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-C2ThrWYt.js → vue-ui-carousel-table-3ntrCePt.js} +4 -4
- package/dist/{vue-ui-carousel-table-DkWNe0mJ.cjs → vue-ui-carousel-table-Cazhvs3E.cjs} +1 -1
- package/dist/{vue-ui-chestnut-Cw8LKuZG.cjs → vue-ui-chestnut-DyFTfNZi.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BacH0ZYK.js → vue-ui-chestnut-apUInPn_.js} +8 -8
- package/dist/{vue-ui-cursor-CMKSCQ-v.js → vue-ui-cursor-CFTO66GQ.js} +2 -2
- package/dist/{vue-ui-cursor-D2kQNFWy.cjs → vue-ui-cursor-CsNO0-Tw.cjs} +1 -1
- package/dist/{vue-ui-dashboard-9PYl4mWC.js → vue-ui-dashboard-C-pDSWwi.js} +2 -2
- package/dist/{vue-ui-dashboard-BHwlhK33.cjs → vue-ui-dashboard-DddJvm7i.cjs} +1 -1
- package/dist/{vue-ui-digits-2yacgzrJ.cjs → vue-ui-digits-DSqN9pA7.cjs} +1 -1
- package/dist/{vue-ui-digits-CyTjq_oN.js → vue-ui-digits-DWAbSFx3.js} +2 -2
- package/dist/{vue-ui-donut-BxLlCBhU.js → vue-ui-donut-DSeDfu4H.js} +11 -11
- package/dist/{vue-ui-donut-BNv1eGiu.cjs → vue-ui-donut-DrAes-Cb.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DGjHfyq8.cjs → vue-ui-donut-evolution-CYtTDj7r.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-Bw9hfwuO.js → vue-ui-donut-evolution-D7h33-ti.js} +11 -11
- package/dist/{vue-ui-dumbbell-CjHcgzti.cjs → vue-ui-dumbbell-DAK7iUrl.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-D0PjpD19.js → vue-ui-dumbbell-LF5uy2pG.js} +10 -10
- package/dist/{vue-ui-flow-BuTJcn6b.js → vue-ui-flow-ClPKB4R5.js} +9 -9
- package/dist/{vue-ui-flow-Dc-KV4a3.cjs → vue-ui-flow-u3UVnWTH.cjs} +1 -1
- package/dist/{vue-ui-funnel-CxO1aav3.js → vue-ui-funnel-BIXUXI8z.js} +8 -8
- package/dist/{vue-ui-funnel-QQGqK4OD.cjs → vue-ui-funnel-BY7rqfpW.cjs} +1 -1
- package/dist/{vue-ui-galaxy-B2uwYVgz.js → vue-ui-galaxy-CEnGrqn3.js} +11 -11
- package/dist/{vue-ui-galaxy-CABgAX76.cjs → vue-ui-galaxy-DBnbXO8c.cjs} +1 -1
- package/dist/{vue-ui-gauge-CqhJx__t.js → vue-ui-gauge-C7Qchm0R.js} +7 -7
- package/dist/{vue-ui-gauge-CTEPbzWe.cjs → vue-ui-gauge-CJYWRyeq.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DlQOItIS.cjs → vue-ui-gizmo-C9_Ciat_.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D7G-8Al-.js → vue-ui-gizmo-CKZRt29V.js} +3 -3
- package/dist/{vue-ui-heatmap-DLNzJh--.js → vue-ui-heatmap-BlbOJnS0.js} +10 -10
- package/dist/{vue-ui-heatmap-BOwY6qNR.cjs → vue-ui-heatmap-olBNo_Ui.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CH2mN74k.js → vue-ui-history-plot-CBpL_OyR.js} +11 -11
- package/dist/{vue-ui-history-plot-EiYWpITj.cjs → vue-ui-history-plot-Cyd53pxt.cjs} +1 -1
- package/dist/{vue-ui-kpi-Cb3fLQlS.js → vue-ui-kpi-C2XDua17.js} +3 -3
- package/dist/{vue-ui-kpi-DB00TrXv.cjs → vue-ui-kpi-CkcQ40VT.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DAaZwOTE.cjs → vue-ui-mini-loader-CpeOqmXd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Czn2u6m3.js → vue-ui-mini-loader-DXF2Zpi6.js} +2 -2
- package/dist/{vue-ui-molecule-BAwzIU19.js → vue-ui-molecule-ekgpnwl8.js} +11 -11
- package/dist/{vue-ui-molecule-DZ6Z4eru.cjs → vue-ui-molecule-qQjh4AkD.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BXOWHB57.js → vue-ui-mood-radar-CV30YU_f.js} +11 -11
- package/dist/{vue-ui-mood-radar-BL3vQzMq.cjs → vue-ui-mood-radar-KoW8hhxL.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-D1EF5IEw.cjs → vue-ui-nested-donuts-AkaYvLCi.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-F1pwFa1Y.js → vue-ui-nested-donuts-DZ_eS-bB.js} +11 -11
- package/dist/{vue-ui-onion-nA8sXxh-.cjs → vue-ui-onion-Bl1UUCFU.cjs} +1 -1
- package/dist/{vue-ui-onion-C9dEaRbc.js → vue-ui-onion-YfHn7AeD.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-Cgc8JHMy.js → vue-ui-parallel-coordinate-plot-BEqbS5A6.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DL4DOhyh.cjs → vue-ui-parallel-coordinate-plot-Dv_UD2bi.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C_hJHr9T.js → vue-ui-quadrant-BU_pD15l.js} +12 -12
- package/dist/{vue-ui-quadrant-DJGxKeBq.cjs → vue-ui-quadrant-DO6afeTp.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-C5v_8Kpw.cjs → vue-ui-quick-chart-ByDBV3lo.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D4k-zSan.js → vue-ui-quick-chart-U-1paiOI.js} +9 -9
- package/dist/{vue-ui-radar-WKQ-TavD.js → vue-ui-radar-B5FUXS1e.js} +12 -12
- package/dist/{vue-ui-radar-BeGVGueh.cjs → vue-ui-radar-DLsIiPBR.cjs} +1 -1
- package/dist/{vue-ui-rating-DI3L8UYN.cjs → vue-ui-rating-D4-ebrWA.cjs} +1 -1
- package/dist/{vue-ui-rating-BrSnMkzF.js → vue-ui-rating-DcCUrP6L.js} +2 -2
- package/dist/{vue-ui-relation-circle-DzZ5H4og.js → vue-ui-relation-circle-2i7B4Yf-.js} +7 -7
- package/dist/{vue-ui-relation-circle-BJ_TOhIp.cjs → vue-ui-relation-circle-jPx6gmw1.cjs} +1 -1
- package/dist/{vue-ui-rings-1qwg2E0O.cjs → vue-ui-rings-6JF72UH8.cjs} +1 -1
- package/dist/{vue-ui-rings-43dY-4_7.js → vue-ui-rings-DG0DQD21.js} +11 -11
- package/dist/{vue-ui-scatter-cTK10i0K.cjs → vue-ui-scatter-CfbMuDQy.cjs} +1 -1
- package/dist/{vue-ui-scatter-q6Sfqa4W.js → vue-ui-scatter-j6SU-TUb.js} +12 -12
- package/dist/{vue-ui-screenshot-CEy169Mc.js → vue-ui-screenshot-B6hhgFz_.js} +1 -1
- package/dist/{vue-ui-screenshot-gOGGT_ti.cjs → vue-ui-screenshot-BKfP266_.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BTN1PKkz.cjs → vue-ui-skeleton-99lBQ_mF.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BhA2lIT6.js → vue-ui-skeleton-pdtGfiV6.js} +3 -3
- package/dist/{vue-ui-smiley-BIEXWWWa.cjs → vue-ui-smiley-8UembS7P.cjs} +1 -1
- package/dist/{vue-ui-smiley-BAFdctGJ.js → vue-ui-smiley-fOlIEhGS.js} +2 -2
- package/dist/{vue-ui-spark-trend-Deg6oJxD.js → vue-ui-spark-trend-BkPSkOrh.js} +5 -5
- package/dist/{vue-ui-spark-trend-LqnAP3mZ.cjs → vue-ui-spark-trend-CV5Uq241.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CJR8pSqp.cjs → vue-ui-sparkbar-DUNqm_AP.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Dm393iij.js → vue-ui-sparkbar-qB9reaJo.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DpP1XF6C.cjs → vue-ui-sparkgauge-D0hLQuMH.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-WTo7H8eC.js → vue-ui-sparkgauge-Mmm3mt-c.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-DNVBeCU9.js → vue-ui-sparkhistogram-9yQ-E0co.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CEvdVaLZ.cjs → vue-ui-sparkhistogram-CuB-M26R.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Bcn_JAfC.js → vue-ui-sparkline-D_QkkgS-.js} +4 -4
- package/dist/{vue-ui-sparkline-B87AKRMY.cjs → vue-ui-sparkline-Du8Hm28x.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DPPTp1Tm.js → vue-ui-sparkstackbar-BDubVDPN.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-Cmafq74u.cjs → vue-ui-sparkstackbar-B_I1tmuS.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DeFiDh8a.cjs → vue-ui-stackbar-DHnilreT.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BeXW23yH.js → vue-ui-stackbar-rNiqr7aF.js} +12 -12
- package/dist/{vue-ui-strip-plot-CG-wp65N.js → vue-ui-strip-plot-DPn3qgdB.js} +11 -11
- package/dist/{vue-ui-strip-plot-5n6Om5PH.cjs → vue-ui-strip-plot-DlRej1u9.cjs} +1 -1
- package/dist/{vue-ui-table-BzuWkWse.js → vue-ui-table-BrZ__Cd2.js} +1 -1
- package/dist/{vue-ui-table-Bbfdq7B8.cjs → vue-ui-table-DLcFdjyM.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap--Uj5nFcF.cjs → vue-ui-table-heatmap-DIkXPyqe.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-obAYC2HB.js → vue-ui-table-heatmap-DQXI2uPZ.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CW0-ubzl.js → vue-ui-table-sparkline-BUNsAEVY.js} +77 -76
- package/dist/vue-ui-table-sparkline-BazGMr3R.cjs +1 -0
- package/dist/{vue-ui-thermometer-BmgPuIr6.js → vue-ui-thermometer-DMkD9fS8.js} +7 -7
- package/dist/{vue-ui-thermometer-DW10BlzG.cjs → vue-ui-thermometer-_gbnwB1j.cjs} +1 -1
- package/dist/{vue-ui-timer-CKp_yNVJ.cjs → vue-ui-timer-BTfgxjIc.cjs} +1 -1
- package/dist/{vue-ui-timer-6eWSNYld.js → vue-ui-timer-Dv-GSUf1.js} +5 -5
- package/dist/{vue-ui-tiremarks-DeEI5TAa.js → vue-ui-tiremarks-CEMrBJPF.js} +7 -7
- package/dist/{vue-ui-tiremarks-nb8r7akm.cjs → vue-ui-tiremarks-Ct9y13Sl.cjs} +1 -1
- package/dist/{vue-ui-treemap-B54QUZ46.cjs → vue-ui-treemap-D7SBHWJ2.cjs} +1 -1
- package/dist/{vue-ui-treemap-tlPZye6M.js → vue-ui-treemap-D8AkLDqM.js} +11 -11
- package/dist/{vue-ui-vertical-bar-BIst1a32.js → vue-ui-vertical-bar-BnhysoC9.js} +11 -11
- package/dist/{vue-ui-vertical-bar-CCXF79YU.cjs → vue-ui-vertical-bar-_EQI8SXm.cjs} +1 -1
- package/dist/{vue-ui-waffle-Dctw-uNI.cjs → vue-ui-waffle-DOhi1BWD.cjs} +1 -1
- package/dist/{vue-ui-waffle-iJT4g4Ht.js → vue-ui-waffle-DfRmWfrG.js} +11 -11
- package/dist/{vue-ui-wheel-DnCpgZZo.cjs → vue-ui-wheel-BbDtndmW.cjs} +1 -1
- package/dist/{vue-ui-wheel-v1_jsNWp.js → vue-ui-wheel-CU6-VBD1.js} +7 -7
- package/dist/{vue-ui-word-cloud-BXa6XzUJ.cjs → vue-ui-word-cloud-CRarnngT.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DR8E1ArH.js → vue-ui-word-cloud-CbuHwEkP.js} +10 -10
- package/dist/{vue-ui-xy-CvFWhRR-.cjs → vue-ui-xy-BRTegbdr.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-hPcU2SBK.js → vue-ui-xy-canvas-DsTqLLWp.js} +11 -11
- package/dist/{vue-ui-xy-canvas-BVw3zOIC.cjs → vue-ui-xy-canvas-hn3ncIFk.cjs} +1 -1
- package/dist/{vue-ui-xy-BZ3lbw6i.js → vue-ui-xy-pSvq591u.js} +14 -14
- package/package.json +1 -1
- package/dist/vue-ui-table-sparkline-Buh41Ovt.cjs +0 -1
|
@@ -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-BcqToEU0.js";
|
|
3
|
+
import { u as y, X as L } from "./index-DhxnZ6ZS.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,15 +1,15 @@
|
|
|
1
1
|
import { toRef as ce, resolveComponent as de, openBlock as a, createElementBlock as r, Fragment as m, renderList as z, withModifiers as M, createBlock as F, createCommentVNode as y, createElementVNode as w, toDisplayString as Ie, normalizeStyle as _, createVNode as O, computed as N, onMounted as tt, ref as f, watch as ot, normalizeClass as Oe, unref as b, createSlots as lt, withCtx as C, renderSlot as $, normalizeProps as W, guardReactiveProps as q, createTextVNode as at, nextTick as Le } from "vue";
|
|
2
|
-
import { u as nt, o as st, e as rt, c as Ue, t as it, a as ut, p as De, b as ct, X as dt, l as vt, O as ft, q as pt, r as ht, x as gt, y as yt } from "./index-
|
|
3
|
-
import { _ as mt } from "./Title-
|
|
4
|
-
import { u as bt, U as kt } from "./usePrinter-
|
|
5
|
-
import { D as Ct } from "./DataTable-
|
|
6
|
-
import { _ as $t } from "./Tooltip-
|
|
7
|
-
import Z from "./BaseIcon-
|
|
8
|
-
import xt from "./vue-ui-skeleton-
|
|
9
|
-
import wt from "./vue-ui-accordion-
|
|
10
|
-
import { u as Ae } from "./useNestedProp-
|
|
11
|
-
import { _ as Pt } from "./PackageVersion-
|
|
12
|
-
import { P as Tt } from "./PenAndPaper-
|
|
2
|
+
import { u as nt, o as st, e as rt, c as Ue, t as it, a as ut, p as De, b as ct, X as dt, l as vt, O as ft, q as pt, r as ht, x as gt, y as yt } from "./index-DhxnZ6ZS.js";
|
|
3
|
+
import { _ as mt } from "./Title-DLo3Zo2_.js";
|
|
4
|
+
import { u as bt, U as kt } from "./usePrinter-mDGfOQZA.js";
|
|
5
|
+
import { D as Ct } from "./DataTable-jvL0XGWl.js";
|
|
6
|
+
import { _ as $t } from "./Tooltip-CA1QhFeE.js";
|
|
7
|
+
import Z from "./BaseIcon-CiQzR1fE.js";
|
|
8
|
+
import xt from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
9
|
+
import wt from "./vue-ui-accordion-DDp8hUlk.js";
|
|
10
|
+
import { u as Ae } from "./useNestedProp-BcqToEU0.js";
|
|
11
|
+
import { _ as Pt } from "./PackageVersion-Ve0s76sL.js";
|
|
12
|
+
import { P as Tt } from "./PenAndPaper-IHG7xTmx.js";
|
|
13
13
|
import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { _ as Rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const St = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onClick", "onMouseover"], Ot = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-BkXYJDpD.cjs"),Le=require("./Title-B7ruS8yl.cjs"),pe=require("./usePrinter-DHv-BwME.cjs"),ze=require("./DataTable-CwAdpLng.cjs"),Oe=require("./Tooltip-BqSN71SL.cjs"),z=require("./BaseIcon-CfhoS_qC.cjs"),Ue=require("./vue-ui-skeleton-BTN1PKkz.cjs"),Me=require("./vue-ui-accordion-kr18wKfc.cjs"),fe=require("./useNestedProp-C6IvqE-r.cjs"),De=require("./PackageVersion-C1F3QLoY.cjs"),Ae=require("./PenAndPaper-DDheVRNG.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],je={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,O)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,qe))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge=["x1","y1","x2","y2","stroke","stroke-width"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;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(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ge),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Xe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},We=["x","y","fill","font-size"],Ze={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"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(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,We))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Je={style:{position:"relative",height:"100%",width:"100%"}},Ke={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Je,[e.createElementVNode("button",{onClick: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:r.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:r.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:r.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:r.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:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Qe=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},et={key:2,style:"width:100%;background:transparent;"},tt=["xmlns","viewBox"],ot=["id"],lt=["stop-color"],nt=["stop-color"],rt={key:6,class:"vue-data-ui-watermark"},at={key:8,ref:"source",dir:"auto"},st=["innerHTML"],it={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),O=e.ref(null),x=e.ref(!1),y=e.ref(null),Z=e.ref(null),D=e.ref(0),J=e.ref(0),K=e.ref(0),o=e.computed({get:()=>ee(),set:t=>t}),{userOptionsVisible:A,setUserOptionsVisibility:Q,keepUserOptionState:_}=Ie.useUserOptionState({config:o.value});function ee(){const t=fe.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...fe.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=ee(),A.value=!o.value.showOnChartHover,B(),J.value+=1,K.value+=1},{deep:!0});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ne}=pe.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),me=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),he=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function re(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?re(t[0].nodes,l+1):l}function ge(){const t=re(h.dataset);let l=100,n=l;for(let i=0;i<t;i+=1)l/=1,n+=l;return{height:n,width:n}}const $=e.ref(ge()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function ae(t,l={x:-$.value.width/2.43,y:$.value.height/2},n=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const Y=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=Y.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=he.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const W=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=ae(f.nodes,R,n/2.9,i/2.2,s+Math.PI*F/f.nodes.length,W,P)}})}return t}function ye(t){const l=new Set;function n(s){s.forEach(p=>{p.color&&!l.has(p.color)&&l.add(p.color),p.nodes&&p.nodes.length>0&&n(p.nodes)})}n(t);const i={};return Array.from(l).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const ke=e.computed(()=>ye(b.value)),b=e.computed(()=>ae(h.dataset));function H(){x.value=!1,O.value=null,Z.value=null,y.value=null,j({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const q=e.ref(null);function j(t){w.value.focus(),e.nextTick(()=>{q.value&&cancelAnimationFrame(q.value);const l=I.value.split(" "),n=parseFloat(l[0]),i=parseFloat(l[1]),s=parseFloat(l[2]),p=parseFloat(l[3]),{x:V,y:Y}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=Y-f*F,W=f*F*2,Ne=f*F*2,Te=Math.sqrt((R-n)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor(Te/10))),Ee=(R-n)/L,Se=(P-i)/L,Ve=(W-s)/L,Re=(Ne-p)/L;let E=0;function ve(){I.value=`${n+Ee*E} ${i+Se*E} ${s+Ve*E} ${p+Re*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(q.value=requestAnimationFrame(ve))}ve()})}function be(t){O.value===t.uid?H():(O.value=t.uid,Z.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},j(t),x.value=t.uid!==b.value[0].uid)}function Ce(t){if(t.target.nodeName!=="circle")H(),x.value=!1;else return}const G=e.ref(null);function Be(t){G.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const se=e.ref(null),S=e.ref(null);function we(t){se.value=t,t?(C.value=!0,Be(t),S.value=t.uid):(C.value=!1,v.value="",S.value=null)}function U(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),j(y.value)}function xe(t){const l=[];function n(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(p),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const $e=e.computed(()=>xe(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=$e.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:i}});function ie(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Pe(){return b.value}const T=e.ref(!1);function Fe(t){T.value=t,D.value+=1}function ue(){k.value.showTable=!k.value.showTable}function ce(){k.value.showDataLabels=!k.value.showDataLabels}function de(){k.value.showTooltip=!k.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return g({getData:Pe,generatePdf:le,generateCsv:ie,generateImage:ne,toggleTable:ue,toggleLabels:ce,toggleTooltip:de,toggleAnnotator:X}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${T.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`,onMouseleave:l[7]||(l[7]=n=>{se.value=null,S.value=null,e.unref(Q)(!1)}),onMouseenter:l[8]||(l[8]=()=>e.unref(Q)(!0))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value&&(e.unref(_)||e.unref(A))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:d,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(le),onGenerateCsv:ie,onGenerateImage:e.unref(ne),onToggleTable:ue,onToggleLabels:ce,onToggleTooltip:de,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(_)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>Ce(n),["stop"]))},[e.createVNode(De._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ke.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,nt)],8,ot))),256))]),e.createVNode(Ye,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(je,{dataset:b.value,hoveredUid:S.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:be,onHover:we},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ze,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:S.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,tt)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ke,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:T.value,onMoveLeft:l[1]||(l[1]=n=>U("left")),onMoveRight:l[2]||(l[2]=n=>U("right")),onMoveTop:l[3]||(l[3]=n=>U("top")),onMoveBottom:l[4]||(l[4]=n=>U("bottom")),onReset:l[5]||(l[5]=n=>{H(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",rt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Oe._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isFullscreen:T.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Me.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ze.DataTable,{key:`table_${K.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,st)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ut=He._export_sfc(it,[["__scopeId","data-v-8277f51b"]]);exports.default=ut;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-C3wsuQ2C.cjs"),Le=require("./Title-CSyDhu3S.cjs"),pe=require("./usePrinter-Dglf1bsw.cjs"),ze=require("./DataTable-DWQiMziO.cjs"),Oe=require("./Tooltip-D88h1zvE.cjs"),z=require("./BaseIcon-DGRZS55E.cjs"),Ue=require("./vue-ui-skeleton-99lBQ_mF.cjs"),Me=require("./vue-ui-accordion-kv5FuXqU.cjs"),fe=require("./useNestedProp-CFwQtnNB.cjs"),De=require("./PackageVersion-CeJ2R9gK.cjs"),Ae=require("./PenAndPaper-DQPbe0G_.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["cx","cy","r","fill","stroke","stroke-width","onClick","onMouseover"],je={__name:"RecursiveCircles",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null},linkColor:{type:String,default:"#CCCCCC"},stroke:{type:String,default:"#FFFFFF"},strokeHovered:{type:String,default:"#000000"}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;function u(a){g("zoom",a)}function c(a){g("hover",a)}return e.toRef(h,"dataset").value.forEach(a=>{a.nodes&&a.nodes.length>0&&a.nodes.forEach(d=>{d.ancestor=a})}),(a,d)=>{const C=e.resolveComponent("RecursiveCircles",!0);return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,v=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.polygonPath&&v.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.polygonPath.coordinates,(w,O)=>(e.openBlock(),e.createElementBlock("circle",{cx:w.x,cy:w.y,r:v.circleRadius,fill:`url(#gradient_${v.color})`,stroke:r.hoveredUid&&r.hoveredUid===v.uid?r.strokeHovered:r.stroke,"stroke-width":r.hoveredUid&&r.hoveredUid===v.uid?v.circleRadius/6:v.circleRadius/12,style:{cursor:"pointer"},onClick:e.withModifiers(x=>u(v),["stop"]),onMouseover:x=>c(v),onMouseleave:d[0]||(d[0]=x=>c(null))},null,40,qe))),256)),v.nodes&&v.nodes.length>0?(e.openBlock(),e.createBlock(C,{key:0,dataset:v.nodes,color:r.color,stroke:r.stroke,strokeHovered:r.strokeHovered,hoveredUid:r.hoveredUid,onZoom:u,onHover:c},null,8,["dataset","color","stroke","strokeHovered","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Ge=["x1","y1","x2","y2","stroke","stroke-width"],Xe=["x1","y1","x2","y2","stroke","stroke-width"],Ye={__name:"RecursiveLinks",props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:"#DDDDDD"},backgroundColor:{type:String,default:"#FFFFFF"}},setup(r){const g=r;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(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.polygonPath.coordinates,(d,C)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.ancestor&&a.ancestor.polygonPath?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.backgroundColor,"stroke-width":a.circleRadius/1.5},null,8,Ge),e.createElementVNode("line",{x1:d.x,y1:d.y,x2:a.ancestor.polygonPath.coordinates[0].x,y2:a.ancestor.polygonPath.coordinates[0].y,stroke:r.color,"stroke-width":a.circleRadius/2},null,8,Xe)],64)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.dataset,a=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.polygonPath&&a.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[a.nodes&&a.nodes.length>0?(e.openBlock(),e.createBlock(B,{key:0,dataset:a.nodes,color:r.color,backgroundColor:r.backgroundColor},null,8,["dataset","color","backgroundColor"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256))],64)}}},We=["x","y","fill","font-size"],Ze={__name:"RecursiveLabels",props:{color:{type:String,default:"#000000"},dataset:{type:Array,default:()=>[]},hoveredUid:{type:String,default:null}},emits:["zoom","hover"],setup(r,{emit:g}){const h=r;return e.toRef(h,"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(r.dataset,d=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[d.polygonPath&&d.polygonPath.coordinates?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.polygonPath.coordinates,C=>(e.openBlock(),e.createElementBlock("text",{x:C.x,y:C.y+d.circleRadius*2,fill:r.color,"font-size":d.circleRadius,"text-anchor":"middle",style:{opacity:"0.8","pointer-events":"none"}},e.toDisplayString(d.name),9,We))),256)),d.nodes&&d.nodes.length>0?(e.openBlock(),e.createBlock(a,{key:0,dataset:d.nodes,color:r.color,hoveredUid:r.hoveredUid},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)],64))),256)}}},Je={style:{position:"relative",height:"100%",width:"100%"}},Ke={__name:"BaseDirectionPad",props:{color:{type:String,default:"#FF0000"},isFullscreen:{type:Boolean,default:!1}},emits:["moveLeft","moveTop","moveRight","moveBottom","reset"],setup(r,{emit:g}){return(h,u)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`position: ${r.isFullscreen?"fixed":"absolute"};bottom:0;right:${r.isFullscreen?"12px":"0"};width:80px;height:80px`),"data-html2canvas-ignore":""},[e.createElementVNode("div",Je,[e.createElementVNode("button",{onClick: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:r.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:r.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:r.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:r.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:r.color,name:"close",style:{cursor:"pointer"},strokeWidth:2},null,8,["stroke"])])])],4))}},Qe=["id"],_e={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},et={key:2,style:"width:100%;background:transparent;"},tt=["xmlns","viewBox"],ot=["id"],lt=["stop-color"],nt=["stop-color"],rt={key:6,class:"vue-data-ui-watermark"},at={key:8,ref:"source",dir:"auto"},st=["innerHTML"],it={__name:"vue-ui-molecule",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(r,{expose:g}){const h=r,{vue_ui_molecule:u}=m.useConfig(),c=e.computed(()=>!!h.dataset&&h.dataset.length);e.onMounted(()=>{B()});function B(){m.objectIsEmpty(h.dataset)&&m.error({componentName:"VueUiMolecule",type:"dataset"})}const a=e.ref(m.createUid()),d=e.ref(null),C=e.ref(!1),v=e.ref(""),w=e.ref(null),O=e.ref(null),x=e.ref(!1),y=e.ref(null),Z=e.ref(null),D=e.ref(0),J=e.ref(0),K=e.ref(0),o=e.computed({get:()=>ee(),set:t=>t}),{userOptionsVisible:A,setUserOptionsVisibility:Q,keepUserOptionState:_}=Ie.useUserOptionState({config:o.value});function ee(){const t=fe.useNestedProp({userConfig:h.config,defaultConfig:u});return t.theme?{...fe.useNestedProp({userConfig:m.themes.vue_ui_molecule[t.theme]||h.config,defaultConfig:t}),customPalette:m.themePalettes[t.theme]||m.palette}:t}e.watch(()=>h.config,t=>{o.value=ee(),A.value=!o.value.showOnChartHover,B(),J.value+=1,K.value+=1},{deep:!0});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ne}=pe.usePrinter({elementId:`cluster_${a.value}`,fileName:o.value.style.chart.title.text||"vue-ui-molecule"}),me=e.computed(()=>o.value.userOptions.show&&!o.value.style.chart.title.text),he=e.computed(()=>m.convertCustomPalette(o.value.customPalette)),k=e.ref({showTable:o.value.table.show,showDataLabels:!0,showTooltip:o.value.style.chart.tooltip.show});function re(t,l=0){return Array.isArray(t)&&t.length>0&&t[0].nodes?re(t[0].nodes,l+1):l}function ge(){const t=re(h.dataset);let l=100,n=l;for(let i=0;i<t;i+=1)l/=1,n+=l;return{height:n,width:n}}const $=e.ref(ge()),I=e.ref(`0 0 ${$.value.width} ${$.value.height}`);function ae(t,l={x:-$.value.width/2.43,y:$.value.height/2},n=$.value.width/1.1,i=24,s=0,p=0,V="#BBBBBB"){if(t&&t.length>0){const Y=m.createPolygonPath({plot:l,radius:n,sides:t.length,rotation:s});t.forEach((f,F)=>{const R=Y.coordinates[F];let P;if(f.ancestor?f.ancestor.ancestor?P=f.ancestor.color||V:(P=he.value[p]||m.palette[p]||V,p+=1):P=V,f.polygonPath={coordinates:[R]},f.circleRadius=i,f.color=P,f.uid=m.createUid(),f.nodes&&f.nodes.length>0){const W=!f.ancestor||!f.ancestor.ancestor?p:0;f.nodes=ae(f.nodes,R,n/2.9,i/2.2,s+Math.PI*F/f.nodes.length,W,P)}})}return t}function ye(t){const l=new Set;function n(s){s.forEach(p=>{p.color&&!l.has(p.color)&&l.add(p.color),p.nodes&&p.nodes.length>0&&n(p.nodes)})}n(t);const i={};return Array.from(l).forEach((s,p)=>{i[s]=`gradient_${p}`}),i}const ke=e.computed(()=>ye(b.value)),b=e.computed(()=>ae(h.dataset));function H(){x.value=!1,O.value=null,Z.value=null,y.value=null,j({polygonPath:{coordinates:[{x:$.value.width/2,y:$.value.height/2}]},circleRadius:24})}const q=e.ref(null);function j(t){w.value.focus(),e.nextTick(()=>{q.value&&cancelAnimationFrame(q.value);const l=I.value.split(" "),n=parseFloat(l[0]),i=parseFloat(l[1]),s=parseFloat(l[2]),p=parseFloat(l[3]),{x:V,y:Y}=t.polygonPath.coordinates[0],{circleRadius:f}=t,F=8.34,R=V-f*F,P=Y-f*F,W=f*F*2,Ne=f*F*2,Te=Math.sqrt((R-n)**2+(P-i)**2),L=Math.min(1200,Math.max(20,Math.floor(Te/10))),Ee=(R-n)/L,Se=(P-i)/L,Ve=(W-s)/L,Re=(Ne-p)/L;let E=0;function ve(){I.value=`${n+Ee*E} ${i+Se*E} ${s+Ve*E} ${p+Re*E}`,E+=o.value.style.chart.zoom.speed,E<=L&&(q.value=requestAnimationFrame(ve))}ve()})}function be(t){O.value===t.uid?H():(O.value=t.uid,Z.value=t,y.value={circleRadius:t.circleRadius,polygonPath:{coordinates:[{x:t.polygonPath.coordinates[0].x,y:t.polygonPath.coordinates[0].y}]}},j(t),x.value=t.uid!==b.value[0].uid)}function Ce(t){if(t.target.nodeName!=="circle")H(),x.value=!1;else return}const G=e.ref(null);function Be(t){G.value={datapoint:t,seriesIndex:-1,series:b.value,config:o.value};const l=o.value.style.chart.tooltip.customFormat;if(m.isFunction(l)&&m.functionReturnsString(()=>l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value})))v.value=l({seriesIndex:-1,datapoint:t,series:b.value,config:o.value});else{let n="";n+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${t.color}">⬤</div><div>${t.name}</div></div>`,t.details&&(n+=`<div style="width:100%;border-top:1px solid ${o.value.style.chart.tooltip.borderColor};margin-top: 2px">${t.details}</div>`),v.value=`<div style="font-family:inherit">${n}</div>`}}const se=e.ref(null),S=e.ref(null);function we(t){se.value=t,t?(C.value=!0,Be(t),S.value=t.uid):(C.value=!1,v.value="",S.value=null)}function U(t){t==="right"&&(y.value.polygonPath.coordinates[0].x+=y.value.circleRadius),t==="left"&&(y.value.polygonPath.coordinates[0].x-=y.value.circleRadius),t==="top"&&(y.value.polygonPath.coordinates[0].y-=y.value.circleRadius),t==="bottom"&&(y.value.polygonPath.coordinates[0].y+=y.value.circleRadius),j(y.value)}function xe(t){const l=[];function n(i){i.forEach(s=>{const p={name:s.name,details:s.details||"-",ancestor:s.ancestor&&s.ancestor.name||"-",color:s.color||""};l.push(p),s.nodes&&s.nodes.length>0&&n(s.nodes,s.name)})}return n(t),l}const $e=e.computed(()=>xe(b.value)),N=e.computed(()=>{const t=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor],l=$e.value.map((s,p)=>[{color:s.color,name:s.name},s.details,s.ancestor||""]),n={th:{backgroundColor:o.value.table.th.backgroundColor,color:o.value.table.th.color,outline:o.value.table.th.outline},td:{backgroundColor:o.value.table.td.backgroundColor,color:o.value.table.td.color,outline:o.value.table.td.outline},breakpoint:o.value.table.responsiveBreakpoint},i=[o.value.table.translations.nodeName,o.value.table.translations.details,o.value.table.translations.ancestor];return{head:t,body:l,config:n,colNames:i}});function ie(){e.nextTick(()=>{const t=N.value.body.map((i,s)=>[[i[0].name],[i[1]],[i[2]]]),l=[[o.value.style.chart.title.text],[o.value.style.chart.title.subtitle.text],[[...N.value.head]]].concat(t),n=m.createCsvContent(l);m.downloadCsv({csvContent:n,title:o.value.style.chart.title.text||"vue-ui-molecule"})})}function Pe(){return b.value}const T=e.ref(!1);function Fe(t){T.value=t,D.value+=1}function ue(){k.value.showTable=!k.value.showTable}function ce(){k.value.showDataLabels=!k.value.showDataLabels}function de(){k.value.showTooltip=!k.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return g({getData:Pe,generatePdf:le,generateCsv:ie,generateImage:ne,toggleTable:ue,toggleLabels:ce,toggleTooltip:de,toggleAnnotator:X}),(t,l)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"moleculeChart",ref:w,class:e.normalizeClass(`vue-ui-molecule ${T.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${o.value.style.fontFamily};width:100%; text-align:center;background:${o.value.style.chart.backgroundColor}`),id:`cluster_${a.value}`,onMouseleave:l[7]||(l[7]=n=>{se.value=null,S.value=null,e.unref(Q)(!1)}),onMouseenter:l[8]||(l[8]=()=>e.unref(Q)(!0))},[o.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ae.PenAndPaper,{key:0,parent:w.value,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createElementBlock("div",_e,null,512)):e.createCommentVNode("",!0),o.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",et,[(e.openBlock(),e.createBlock(Le._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"molecule-div-title",...o.value.style.chart.title},subtitle:{cy:"molecule-div-subtitle",...o.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),o.value.userOptions.show&&c.value&&(e.unref(_)||e.unref(A))?(e.openBlock(),e.createBlock(pe.UserOptions,{ref_key:"details",ref:d,key:`user_options_${D.value}`,backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:a.value,hasTooltip:o.value.userOptions.buttons.tooltip&&o.value.style.chart.tooltip.show,hasPdf:o.value.userOptions.buttons.pdf,hasXls:o.value.userOptions.buttons.csv,hasImg:o.value.userOptions.buttons.img,hasTable:o.value.userOptions.buttons.table,hasLabel:o.value.userOptions.buttons.labels,hasFullscreen:o.value.userOptions.buttons.fullscreen,isTooltip:k.value.showTooltip,titles:{...o.value.userOptions.buttonTitles},chartElement:w.value,position:o.value.userOptions.position,hasAnnotator:o.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Fe,onGeneratePdf:e.unref(le),onGenerateCsv:ie,onGenerateImage:e.unref(ne),onToggleTable:ue,onToggleLabels:ce,onToggleTooltip:de,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(_)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,t.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,t.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"6"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:i})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:i})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(m.XMLNS),viewBox:I.value,class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),style:e.normalizeStyle(`overflow: hidden; background:transparent;color:${o.value.style.chart.color}`),onClick:l[0]||(l[0]=e.withModifiers(n=>Ce(n),["stop"]))},[e.createVNode(De._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(ke.value),n=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_${n}`,cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(m.lightenHexColor)(n,.5)},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":n},null,8,nt)],8,ot))),256))]),e.createVNode(Ye,{dataset:b.value,color:o.value.style.chart.links.stroke,backgroundColor:o.value.style.chart.backgroundColor},null,8,["dataset","color","backgroundColor"]),e.createVNode(je,{dataset:b.value,hoveredUid:S.value,stroke:o.value.style.chart.nodes.stroke,strokeHovered:o.value.style.chart.nodes.strokeHovered,onZoom:be,onHover:we},null,8,["dataset","hoveredUid","stroke","strokeHovered"]),k.value.showDataLabels?(e.openBlock(),e.createBlock(Ze,{key:0,dataset:b.value,color:o.value.style.chart.color,hoveredUid:S.value},null,8,["dataset","color","hoveredUid"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"svg",{svg:$.value},void 0,!0)],14,tt)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(Ke,{key:`direction_pad_${D.value}`,color:o.value.style.chart.color,isFullscreen:T.value,onMoveLeft:l[1]||(l[1]=n=>U("left")),onMoveRight:l[2]||(l[2]=n=>U("right")),onMoveTop:l[3]||(l[3]=n=>U("top")),onMoveBottom:l[4]||(l[4]=n=>U("bottom")),onReset:l[5]||(l[5]=n=>{H(),x.value=!1})},null,8,["color","isFullscreen"])):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",rt,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,config:{type:"molecule",style:{backgroundColor:o.value.style.chart.backgroundColor,molecule:{color:"#CCCCCC"}}}},null,8,["config"])),t.$slots.source?(e.openBlock(),e.createElementBlock("div",at,[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Oe._sfc_main,{show:k.value.showTooltip&&C.value,backgroundColor:o.value.style.chart.tooltip.backgroundColor,color:o.value.style.chart.tooltip.color,borderRadius:o.value.style.chart.tooltip.borderRadius,borderColor:o.value.style.chart.tooltip.borderColor,borderWidth:o.value.style.chart.tooltip.borderWidth,fontSize:o.value.style.chart.tooltip.fontSize,backgroundOpacity:o.value.style.chart.tooltip.backgroundOpacity,position:o.value.style.chart.tooltip.position,offsetY:o.value.style.chart.tooltip.offsetY,parent:w.value,content:v.value,isFullscreen:T.value,isCustom:o.value.style.chart.tooltip.customFormat&&typeof o.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Me.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color},head:{backgroundColor:o.value.style.chart.backgroundColor,color:o.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ze.DataTable,{key:`table_${K.value}`,colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${o.value.style.chart.title.text}${o.value.style.chart.title.subtitle.text?` : ${o.value.style.chart.title.subtitle.text}`:""}`,onClose:l[6]||(l[6]=n=>k.value.showTable=!1)},{th:e.withCtx(({th:n})=>[e.createElementVNode("div",{innerHTML:n,style:{display:"flex","align-items":"center"}},null,8,st)]),td:e.withCtx(({td:n})=>[e.createTextVNode(e.toDisplayString(n.name||n),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Qe))}},ut=He._export_sfc(it,[["__scopeId","data-v-8277f51b"]]);exports.default=ut;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { computed as c, onMounted as Ce, ref as v, watch as xe, openBlock as r, createElementBlock as y, normalizeClass as Z, normalizeStyle as L, unref as a, createBlock as h, createCommentVNode as u, createVNode as U, createSlots as we, withCtx as f, renderSlot as p, normalizeProps as B, guardReactiveProps as D, createElementVNode as s, Fragment as ee, renderList as te, toDisplayString as M, createTextVNode as oe, nextTick as _e } from "vue";
|
|
2
|
-
import { u as $e, o as Me, e as le, c as Pe, t as Ne, O as Ae, X as Oe, s as C, w as Te, P as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-
|
|
3
|
-
import { _ as Se } from "./Title-
|
|
4
|
-
import { u as Ve, U as je } from "./usePrinter-
|
|
5
|
-
import { L as Ue } from "./Legend-
|
|
6
|
-
import P from "./BaseIcon-
|
|
7
|
-
import { D as Be } from "./DataTable-
|
|
8
|
-
import De from "./vue-ui-skeleton-
|
|
9
|
-
import We from "./vue-ui-accordion-
|
|
10
|
-
import { u as se } from "./useNestedProp-
|
|
11
|
-
import { _ as ze } from "./PackageVersion-
|
|
12
|
-
import { P as Ge } from "./PenAndPaper-
|
|
2
|
+
import { u as $e, o as Me, e as le, c as Pe, t as Ne, O as Ae, X as Oe, s as C, w as Te, P as Le, i as ae, f as I, q as Ie, r as Fe } from "./index-DhxnZ6ZS.js";
|
|
3
|
+
import { _ as Se } from "./Title-DLo3Zo2_.js";
|
|
4
|
+
import { u as Ve, U as je } from "./usePrinter-mDGfOQZA.js";
|
|
5
|
+
import { L as Ue } from "./Legend-DcIfRSNC.js";
|
|
6
|
+
import P from "./BaseIcon-CiQzR1fE.js";
|
|
7
|
+
import { D as Be } from "./DataTable-jvL0XGWl.js";
|
|
8
|
+
import De from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
9
|
+
import We from "./vue-ui-accordion-DDp8hUlk.js";
|
|
10
|
+
import { u as se } from "./useNestedProp-BcqToEU0.js";
|
|
11
|
+
import { _ as ze } from "./PackageVersion-Ve0s76sL.js";
|
|
12
|
+
import { P as Ge } from "./PenAndPaper-IHG7xTmx.js";
|
|
13
13
|
import { u as Ee } from "./useUserOptionState-BIvW1Kz7.js";
|
|
14
14
|
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
15
|
const Re = ["id"], Xe = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BkXYJDpD.cjs"),te=require("./Title-B7ruS8yl.cjs"),F=require("./usePrinter-DHv-BwME.cjs"),oe=require("./Legend-CR9ydX8N.cjs"),h=require("./BaseIcon-CfhoS_qC.cjs"),le=require("./DataTable-CwAdpLng.cjs"),ae=require("./vue-ui-skeleton-BTN1PKkz.cjs"),re=require("./vue-ui-accordion-kr18wKfc.cjs"),q=require("./useNestedProp-C6IvqE-r.cjs"),ne=require("./PackageVersion-C1F3QLoY.cjs"),se=require("./PenAndPaper-DDheVRNG.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:2,style:"width:100%;background:transparent"},ve=["xmlns","viewBox"],ye=["id"],me=["stop-color"],fe=["stop-color"],pe=["x1","y1","x2","y2","stroke","stroke-width"],he=["d","stroke","stroke-width"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["stroke"],Ve=["fill"],_e=["stroke"],Pe=["fill"],Be=["d","stroke","stroke-width","fill"],$e=["x1","y1","stroke"],Me=["cx","cy","fill","stroke"],Ee=["fill","stroke"],Oe=["y","fill","font-weight"],Se=["y","fill"],Ae={key:5,class:"vue-data-ui-watermark"},Te=["onClick"],Le={style:{"font-weight":"bold"}},Ie={key:8,ref:"source",dir:"auto"},Fe=["innerHTML"],qe={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:D}){const s=z,{vue_ui_mood_radar:U}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const f=e.ref(r.createUid()),N=e.ref(null),j=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),P=e.ref(0),t=e.computed({get:()=>M(),set:l=>l}),{userOptionsVisible:x,setUserOptionsVisibility:B,keepUserOptionState:$}=ue.useUserOptionState({config:t.value});function M(){const l=q.useNestedProp({userConfig:s.config,defaultConfig:U});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=M(),x.value=!t.value.showOnChartHover,_(),G.value+=1,H.value+=1,P.value+=1},{deep:!0});const{isPrinting:E,isImaging:O,generatePdf:S,generateImage:A}=F.usePrinter({elementId:f.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function X({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:ee}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:ee}}const K=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),T=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=X({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/K.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),Y=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function J(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function L(){e.nextTick(()=>{const l=v.value.head.map((u,c)=>[[u.name],[v.value.body[c]],[isNaN(v.value.body[c]/y.value)?"-":v.value.body[c]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((c,p)=>[{color:c.color,name:c.name},v.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[p]/y.value)?"-":(v.value.body[p]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function Q(){return i.value}function I(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Z(l){b.value=l}const C=e.ref(!1);function V(){C.value=!C.value}return D({getData:Q,generatePdf:S,generateCsv:L,generateImage:A,toggleTable:I,toggleAnnotator:V}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(B)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(B)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(se.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(te._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(x))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref_key:"details",ref:j,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(O),uid:f.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(S),onGenerateCsv:L,onGenerateImage:e.unref(A),onToggleTable:I,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref($)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,fe)],8,ye)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,pe))),256)),e.createElementVNode("path",{d:w.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,he),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,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ge),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,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,Ce),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]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ve),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,_e),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Pe),e.createElementVNode("path",{d:e.unref(r.makePath)(T.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${f.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Be),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,$e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ee),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Oe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Se)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(oe.Legend,{legendSet:i.value,config:Y.value,key:`legend_${P.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>J(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(h.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(h.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(h.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(h.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(h.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Le,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Te)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(re.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(le.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Fe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ce))}},ze=ie._export_sfc(qe,[["__scopeId","data-v-583f1c0f"]]);exports.default=ze;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-C3wsuQ2C.cjs"),te=require("./Title-CSyDhu3S.cjs"),F=require("./usePrinter-Dglf1bsw.cjs"),oe=require("./Legend-BstxUr4T.cjs"),h=require("./BaseIcon-DGRZS55E.cjs"),le=require("./DataTable-DWQiMziO.cjs"),ae=require("./vue-ui-skeleton-99lBQ_mF.cjs"),re=require("./vue-ui-accordion-kv5FuXqU.cjs"),q=require("./useNestedProp-CFwQtnNB.cjs"),ne=require("./PackageVersion-CeJ2R9gK.cjs"),se=require("./PenAndPaper-DQPbe0G_.cjs"),ue=require("./useUserOptionState-BgepsfED.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],de={key:2,style:"width:100%;background:transparent"},ve=["xmlns","viewBox"],ye=["id"],me=["stop-color"],fe=["stop-color"],pe=["x1","y1","x2","y2","stroke","stroke-width"],he=["d","stroke","stroke-width"],ke=["stroke"],ge=["fill"],be=["stroke"],Ce=["fill"],Ne=["stroke"],xe=["fill"],we=["stroke"],Ve=["fill"],_e=["stroke"],Pe=["fill"],Be=["d","stroke","stroke-width","fill"],$e=["x1","y1","stroke"],Me=["cx","cy","fill","stroke"],Ee=["fill","stroke"],Oe=["y","fill","font-weight"],Se=["y","fill"],Ae={key:5,class:"vue-data-ui-watermark"},Te=["onClick"],Le={style:{"font-weight":"bold"}},Ie={key:8,ref:"source",dir:"auto"},Fe=["innerHTML"],qe={__name:"vue-ui-mood-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:D}){const s=z,{vue_ui_mood_radar:U}=r.useConfig(),m=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{_()});function _(){r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiMoodRadar",type:"dataset"})}const f=e.ref(r.createUid()),N=e.ref(null),j=e.ref(null),n=e.ref(null),W=e.ref(null),G=e.ref(0),H=e.ref(0),P=e.ref(0),t=e.computed({get:()=>M(),set:l=>l}),{userOptionsVisible:x,setUserOptionsVisibility:B,keepUserOptionState:$}=ue.useUserOptionState({config:t.value});function M(){const l=q.useNestedProp({userConfig:s.config,defaultConfig:U});return l.theme?{...q.useNestedProp({userConfig:r.themes.vue_ui_mood_radar[l.theme]||s.config,defaultConfig:l})}:l}e.watch(()=>s.config,l=>{t.value=M(),x.value=!t.value.showOnChartHover,_(),G.value+=1,H.value+=1,P.value+=1},{deep:!0});const{isPrinting:E,isImaging:O,generatePdf:S,generateImage:A}=F.usePrinter({elementId:f.value,fileName:t.value.style.chart.title.text||"vue-ui-mood-radar"}),R=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),k=e.ref({showTable:t.value.table.show}),d=e.computed(()=>({height:256,width:256})),w=e.computed(()=>r.createPolygonPath({plot:{x:128,y:d.value.height/2},radius:90,sides:5,rotation:11}));function X({centerX:l,centerY:a,apexX:o,apexY:u,proportion:c,key:p,value:ee}){return{x:l+(o-l)*c,y:a+(u-a)*c,key:p,value:ee}}const K=e.computed(()=>Math.max(...Object.values(s.dataset).map(l=>isNaN(l)?0:l))),y=e.computed(()=>Object.values(s.dataset).reduce((l,a)=>(isNaN(l)?0:l)+(isNaN(a)?0:a),0)),i=e.computed(()=>Object.keys(s.dataset).map((l,a)=>{const o=typeof s.dataset[l]!="number"||isNaN(s.dataset[l])?0:s.dataset[l];return{index:a,key:l,value:o,proportion:o/y.value,color:t.value.style.chart.layout.smileys.colors[l]}}).sort((l,a)=>a.key-l.key)),T=e.computed(()=>m.value?(["1","2","3","4","5"].forEach(l=>{[null,void 0].includes(s.dataset[l])&&r.error({componentName:"VueUiMoodRadar",type:"datasetAttribute",property:l})}),w.value.coordinates.map((l,a)=>{const o=X({centerX:d.value.width/2,centerY:d.value.height/2,apexX:l.x,apexY:l.y,proportion:i.value[a].value/K.value,key:i.value[a].key,value:i.value[a].value});return{...l,plots:o,key:i.value[a].key}})):[]),Y=e.computed(()=>({cy:"mood-radar-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function J(l){l===n.value?n.value=null:n.value=l}const v=e.computed(()=>{const l=i.value.map(o=>({name:o.key,color:o.color})),a=i.value.map(o=>isNaN(o.value)?0:o.value);return{head:l,body:a}});function L(){e.nextTick(()=>{const l=v.value.head.map((u,c)=>[[u.name],[v.value.body[c]],[isNaN(v.value.body[c]/y.value)?"-":v.value.body[c]/y.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-mood-radar"})})}const g=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',Number(y.value.toFixed(t.value.table.td.roundingValue)).toLocaleString(),"100%"],a=v.value.head.map((c,p)=>[{color:c.color,name:c.name},v.value.body[p].toFixed(t.value.table.td.roundingValue),isNaN(v.value.body[p]/y.value)?"-":(v.value.body[p]/y.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},u=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:u}});function Q(){return i.value}function I(){k.value.showTable=!k.value.showTable}const b=e.ref(!1);function Z(l){b.value=l}const C=e.ref(!1);function V(){C.value=!C.value}return D({getData:Q,generatePdf:S,generateCsv:L,generateImage:A,toggleTable:I,toggleAnnotator:V}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-mood-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"moodRadarChart",ref:N,id:`${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[11]||(a[11]=()=>e.unref(B)(!0)),onMouseleave:a[12]||(a[12]=()=>e.unref(B)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(se.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:C.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),R.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:W,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(te._sfc_main,{config:{title:{cy:"mood-radar-title",...t.value.style.chart.title},subtitle:{cy:"mood-radar-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])])):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref($)||e.unref(x))?(e.openBlock(),e.createBlock(F.UserOptions,{key:3,ref_key:"details",ref:j,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(O),uid:f.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:C.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(S),onGenerateCsv:L,onGenerateImage:e.unref(A),onToggleTable:I,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref($)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"4"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),viewBox:`0 0 ${d.value.width} ${d.value.height}`,class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ne._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`mood_radar_gradient_${f.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.gradient.intensity/100),t.value.style.chart.layout.dataPolygon.opacity)},null,8,fe)],8,ye)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.coordinates,o=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.width/2,y1:d.value.height/2,x2:o.x,y2:o.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,pe))),256)),e.createElementVNode("path",{d:w.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,he),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,ke),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[0]||(a[0]=o=>n.value=5),onMouseleave:a[1]||(a[1]=o=>n.value=null),cx:"128",cy:"25",r:"20",fill:n.value===5?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[5],20):"transparent"},null,40,ge),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,be),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[2]||(a[2]=o=>n.value=4),onMouseleave:a[3]||(a[3]=o=>n.value=null),cx:"227",cy:"95.5",r:"20",fill:n.value===4?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[4],20):"transparent"},null,40,Ce),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]=o=>n.value=3),onMouseleave:a[5]||(a[5]=o=>n.value=null),cx:"190",cy:"213.5",r:"20",fill:n.value===3?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[3],20):"transparent"},null,40,xe),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[2],"stroke-width":"1","stroke-linecap":"round",d:"M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210"},null,8,we),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[6]||(a[6]=o=>n.value=2),onMouseleave:a[7]||(a[7]=o=>n.value=null),cx:"65",cy:"213.5",r:"20",fill:n.value===2?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[2],20):"transparent"},null,40,Ve),e.createElementVNode("path",{fill:"none",stroke:t.value.style.chart.layout.smileys.colors[1],"stroke-width":"1","stroke-linecap":"round",d:"M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93"},null,8,_e),e.createElementVNode("circle",{class:"vue-ui-mood-radar-trap",onMouseenter:a[8]||(a[8]=o=>n.value=1),onMouseleave:a[9]||(a[9]=o=>n.value=null),cx:"29",cy:"95.5",r:"20",fill:n.value===1?e.unref(r.setOpacity)(t.value.style.chart.layout.smileys.colors[1],20):"transparent"},null,40,Pe),e.createElementVNode("path",{d:e.unref(r.makePath)(T.value.map(o=>o.plots)),stroke:t.value.style.chart.layout.dataPolygon.stroke,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:t.value.style.chart.layout.dataPolygon.gradient.show?`url(#mood_radar_gradient_${f.value})`:e.unref(r.setOpacity)(t.value.style.chart.layout.dataPolygon.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Be),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value.map(o=>o.plots),(o,u)=>(e.openBlock(),e.createElementBlock("g",{class:"vue-ui-mood-radar-trap",style:e.normalizeStyle(`opacity:${n.value==o.key?"1":"0"}`)},[e.createElementVNode("line",{x1:o.x,y1:o.y,x2:128,y2:128,stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,$e),e.createElementVNode("circle",{cx:o.x,cy:o.y,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Me),e.createElementVNode("circle",{cx:128,cy:128,fill:t.value.style.chart.layout.smileys.colors[o.key],r:"3",stroke:t.value.style.chart.backgroundColor,"stroke-width":.5},null,8,Ee),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?145:120,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle","font-weight":t.value.style.chart.layout.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),9,Oe),e.createElementVNode("text",{x:128,y:["5",5].includes(o.key)?163:102,fill:t.value.style.chart.layout.dataLabel.color,"font-size":"12","text-anchor":"middle"}," ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.value/y.value*100,s:"%",r:t.value.style.chart.layout.dataLabel.roundingPercentage}))+") ",9,Se)],4))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,ve)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ae.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:"#CCCCCC"},shapes:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(oe.Legend,{legendSet:i.value,config:Y.value,key:`legend_${P.value}`,style:{display:"flex","row-gap":"6px"}},{item:e.withCtx(({legend:o,index:u})=>[e.createElementVNode("div",{onClick:()=>J(o.key),style:{display:"flex","flex-direction":"row",gap:"3px","align-items":"center",margin:"3px 0"}},[o.key==1?(e.openBlock(),e.createBlock(h.default,{key:0,strokeWidth:1,name:"moodSad",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==2?(e.openBlock(),e.createBlock(h.default,{key:1,strokeWidth:1,name:"moodFlat",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==3?(e.openBlock(),e.createBlock(h.default,{key:2,strokeWidth:1,name:"moodNeutral",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==4?(e.openBlock(),e.createBlock(h.default,{key:3,strokeWidth:1,name:"smiley",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),o.key==5?(e.openBlock(),e.createBlock(h.default,{key:4,strokeWidth:1,name:"moodHappy",stroke:t.value.style.chart.layout.smileys.colors[o.key]},null,8,["stroke"])):e.createCommentVNode("",!0),e.createElementVNode("span",Le,e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.dataLabel.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.dataLabel.prefix,v:o.value,s:t.value.style.chart.layout.dataLabel.suffix,r:t.value.style.chart.layout.dataLabel.roundingValue}),{datapoint:o,seriesIndex:u})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(r.dataLabel)({v:o.proportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],8,Te)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:i.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(re.default,{key:9,hideDetails:"",config:{open:k.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(le.DataTable,{colNames:g.value.colNames,head:g.value.head,body:g.value.body,config:g.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[10]||(a[10]=o=>k.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Fe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ce))}},ze=ie._export_sfc(qe,[["__scopeId","data-v-583f1c0f"]]);exports.default=ze;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-C3wsuQ2C.cjs"),me=require("./useResponsive-BJ7DTGpm.cjs"),Ee=require("./Title-CSyDhu3S.cjs"),be=require("./usePrinter-Dglf1bsw.cjs"),Fe=require("./DataTable-DWQiMziO.cjs"),Te=require("./Tooltip-D88h1zvE.cjs"),Oe=require("./Legend-BstxUr4T.cjs"),Pe=require("./vue-ui-skeleton-99lBQ_mF.cjs"),ze=require("./vue-ui-accordion-kv5FuXqU.cjs"),ge=require("./useNestedProp-CFwQtnNB.cjs"),De=require("./PackageVersion-CeJ2R9gK.cjs"),Ie=require("./PenAndPaper-DQPbe0G_.cjs"),Ae=require("./useUserOptionState-BgepsfED.cjs"),Me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),q=x=>(e.pushScopeId("data-v-36b04f69"),x=x(),e.popScopeId(),x),Ue=["id"],Re=["xmlns","viewBox"],qe=["id"],Ye=q(()=>e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),Xe=["offset","stop-color"],Ge=["offset","stop-opacity"],He=q(()=>e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),We=["id"],Je=["id"],Ke=q(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Qe=["id"],Ze=["flood-color"],je=["d","fill","stroke","stroke-width","filter"],et={key:0},tt=["d","fill"],lt={key:1},at=["x","y","font-size","font-weight","fill"],ot={key:2},nt=["filter"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["d","fill","onMouseenter","onClick"],ct={key:5,class:"vue-data-ui-watermark"},dt={key:0,class:"vue-ui-nested-donuts-legend-title"},vt=["onClick"],ft=["innerHTML"],pt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(x,{expose:ke,emit:Y}){const k=x,{vue_ui_nested_donuts:Ce}=r.useConfig(),$=e.computed(()=>!!k.dataset&&k.dataset.length),p=e.ref(r.createUid()),T=e.ref(!1),O=e.ref(""),Le=e.ref(null),X=e.ref(0),w=e.ref(null),G=e.ref(null),P=e.ref(null),H=e.ref(null),W=e.ref(null),J=e.ref(0),K=e.ref(0),Q=e.ref(0),B=e.ref(!1);function we(l){B.value=l,X.value+=1}const t=e.computed({get:()=>ee(),set:l=>l}),{userOptionsVisible:z,setUserOptionsVisibility:Z,keepUserOptionState:j}=Ae.useUserOptionState({config:t.value});function ee(){const l=ge.useNestedProp({userConfig:k.config,defaultConfig:Ce});return l.theme?{...ge.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=ee(),z.value=!t.value.showOnChartHover,te(),J.value+=1,K.value+=1,Q.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{te()});function te(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=me.throttle(()=>{const{width:s,height:o}=me.useResponsive({chart:w.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?P.value:null,source:H.value,noTitle:W.value});d.value.width=s,d.value.height=o});N.value=new ResizeObserver(l),N.value.observe(w.value.parentNode)}}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:ne}=be.usePrinter({elementId:`nested_donuts_${p.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),xe=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),d=e.ref({height:512,width:512});function $e({datapoint:l,index:s}){Y("selectDatapoint",{datapoint:l,index:s})}const v=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!v.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${p.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${p.value}_${s}`,id:`${p.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||xe.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(d.value.height,d.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),re=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!v.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!v.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Ne(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const c=e.ref(re.value);e.watch(()=>re.value,l=>c.value=l);const se=e.ref(null),ue=e.ref(null);function D(l){Y("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=c.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),f=Ne(u,u.length-1,v.value);if(v.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(se.value),c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,c.value=c.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),se.value=requestAnimationFrame(i))};v.value=v.value.filter(y=>y!==l.id),i()}else if(f){let i=function(){a<.1?(cancelAnimationFrame(ue.value),v.value.push(l.id),c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:0}:L)}))):(a/=1.1,c.value=c.value.map((y,g)=>({...y,series:y.series.map(L=>L.id===l.id?{...L,value:a}:L)})),ue.value=requestAnimationFrame(i))};i()}}const I=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ie=e.computed(()=>c.value.map((l,s)=>b.value-s*b.value/m.value.length)),_=e.computed(()=>c.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,I.value)}})),ce=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},d.value.width/2,d.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),de=e.ref(null),S=e.ref(null),V=e.ref(null),A=e.ref(null);function _e({datapoint:l,_relativeIndex:s,seriesIndex:o}){de.value=l.arcOfId,S.value=l.id,V.value=o,A.value={datapoint:l,seriesIndex:o,series:c.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:c.value,config:t.value})))O.value=n({seriesIndex:o,datapoint:l,series:c.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&v.value.length===0){const u=c.value.map(f=>f.series.find(i=>i.seriesIndex===o));u.forEach((f,i)=>{if(!f)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as g, ref as i, watch as Ue, onMounted as at, onBeforeUnmount as ot, openBlock as u, createElementBlock as n, normalizeClass as P, normalizeStyle as Q, unref as r, createBlock as D, createCommentVNode as v, createSlots as st, withCtx as m, renderSlot as k, normalizeProps as R, guardReactiveProps as E, createVNode as Be, createElementVNode as y, Fragment as _, renderList as T, toDisplayString as N, createTextVNode as Z, nextTick as ut, pushScopeId as nt, popScopeId as rt } from "vue";
|
|
2
|
-
import { u as it, c as dt, t as ct, a as vt, p as j, o as ft, e as M, b as ht, J as Re, d as pt, m as Ee, f as x, X as yt, s as Ge, L as bt, k as U, n as de, i as G, x as Ye, y as gt, q as mt, r as kt } from "./index-
|
|
2
|
+
import { u as it, c as dt, t as ct, a as vt, p as j, o as ft, e as M, b as ht, J as Re, d as pt, m as Ee, f as x, X as yt, s as Ge, L as bt, k as U, n as de, i as G, x as Ye, y as gt, q as mt, r as kt } from "./index-DhxnZ6ZS.js";
|
|
3
3
|
import { t as wt, u as $t } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as Lt } from "./Title-
|
|
5
|
-
import { u as _t, U as xt } from "./usePrinter-
|
|
6
|
-
import { D as Ct } from "./DataTable-
|
|
7
|
-
import { _ as Ft } from "./Tooltip-
|
|
8
|
-
import { L as Tt } from "./Legend-
|
|
9
|
-
import St from "./vue-ui-skeleton-
|
|
10
|
-
import Nt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Xe } from "./useNestedProp-
|
|
12
|
-
import { _ as Ot } from "./PackageVersion-
|
|
13
|
-
import { P as It } from "./PenAndPaper-
|
|
4
|
+
import { _ as Lt } from "./Title-DLo3Zo2_.js";
|
|
5
|
+
import { u as _t, U as xt } from "./usePrinter-mDGfOQZA.js";
|
|
6
|
+
import { D as Ct } from "./DataTable-jvL0XGWl.js";
|
|
7
|
+
import { _ as Ft } from "./Tooltip-CA1QhFeE.js";
|
|
8
|
+
import { L as Tt } from "./Legend-DcIfRSNC.js";
|
|
9
|
+
import St from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
10
|
+
import Nt from "./vue-ui-accordion-DDp8hUlk.js";
|
|
11
|
+
import { u as Xe } from "./useNestedProp-BcqToEU0.js";
|
|
12
|
+
import { _ as Ot } from "./PackageVersion-Ve0s76sL.js";
|
|
13
|
+
import { P as It } from "./PenAndPaper-IHG7xTmx.js";
|
|
14
14
|
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as Pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const ce = (B) => (nt("data-v-36b04f69"), B = B(), rt(), B), Dt = ["id"], zt = ["xmlns", "viewBox"], Vt = ["id"], Mt = /* @__PURE__ */ ce(() => /* @__PURE__ */ y("stop", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-C3wsuQ2C.cjs"),le=require("./useResponsive-BJ7DTGpm.cjs"),Ce=require("./Title-CSyDhu3S.cjs"),ae=require("./usePrinter-Dglf1bsw.cjs"),we=require("./Legend-BstxUr4T.cjs"),$e=require("./DataTable-DWQiMziO.cjs"),xe=require("./Tooltip-D88h1zvE.cjs"),Be=require("./vue-ui-skeleton-99lBQ_mF.cjs"),Te=require("./vue-ui-accordion-kv5FuXqU.cjs"),oe=require("./useNestedProp-CFwQtnNB.cjs"),Se=require("./PackageVersion-CeJ2R9gK.cjs"),Pe=require("./PenAndPaper-DQPbe0G_.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_e=["id"],Ve=["xmlns","viewBox"],Fe=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ae=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Ee=["id"],Ie=["stdDeviation"],Me=["filter"],Le=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Re=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],ze={key:1},De=["onMouseenter"],qe=["x","y","font-size","fill","font-weight"],Ue={key:5,class:"vue-data-ui-watermark"},Ye=["onClick"],Xe=["innerHTML"],Ge={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(re,{expose:ne,emit:ue}){const p=re,{vue_ui_onion:se}=u.useConfig(),w=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(u.createUid()),ie=e.ref(null),E=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),y=e.ref(null),I=e.ref(null),M=e.ref(null),L=e.ref(null),R=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>X(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=Oe.useUserOptionState({config:t.value});function X(){const l=oe.useNestedProp({userConfig:p.config,defaultConfig:se});return l.theme?{...oe.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=X(),P.value=!t.value.showOnChartHover,J(),z.value+=1,D.value+=1,q.value+=1},{deep:!0});const{isPrinting:G,isImaging:H,generatePdf:W,generateImage:j}=ae.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion"}),ce=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),de=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),f=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{J()});function J(){if(u.objectIsEmpty(p.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=le.throttle(()=>{const{width:a,height:o}=le.useResponsive({chart:y.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:L.value,noTitle:R.value});n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125});x.value=new ResizeObserver(r),x.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(p.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),p.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||de.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>K(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),ve=e.computed(()=>t.value.useStartAnimation),he=e.ref(null),pe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,fe,{immediate:!0});function fe(){if(ve.value&&!O.value){let r=function(){l>=pe.value?(cancelAnimationFrame(he.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const ge=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),me=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),v=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/me.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:ye(a,l.percentage||0)}}));function ye(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,C=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:C,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-l}
|
|
3
3
|
A ${l},${l} 0 1 1
|
|
4
4
|
${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as v, ref as s, watch as ke, onMounted as Be, onBeforeUnmount as Ue, openBlock as n, createElementBlock as u, normalizeClass as B, normalizeStyle as U, unref as i, createBlock as C, createCommentVNode as p, createSlots as Xe, withCtx as h, renderSlot as f, normalizeProps as S, guardReactiveProps as M, createVNode as $e, Fragment as F, renderList as N, createElementVNode as O, toDisplayString as P, createTextVNode as Ge, nextTick as He } from "vue";
|
|
2
|
-
import { u as Ee, c as We, t as je, a as qe, p as we, b as Je, o as Ke, e as K, d as Qe, X as Ze, f as R, i as Q, x as Ce, q as et, r as tt, y as at } from "./index-
|
|
2
|
+
import { u as Ee, c as We, t as je, a as qe, p as we, b as Je, o as Ke, e as K, d as Qe, X as Ze, f as R, i as Q, x as Ce, q as et, r as tt, y as at } from "./index-DhxnZ6ZS.js";
|
|
3
3
|
import { t as lt, u as ot } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as rt } from "./Title-
|
|
5
|
-
import { u as nt, U as st } from "./usePrinter-
|
|
6
|
-
import { L as ut } from "./Legend-
|
|
7
|
-
import { D as it } from "./DataTable-
|
|
8
|
-
import { _ as ct } from "./Tooltip-
|
|
9
|
-
import dt from "./vue-ui-skeleton-
|
|
10
|
-
import vt from "./vue-ui-accordion-
|
|
11
|
-
import { u as xe } from "./useNestedProp-
|
|
12
|
-
import { _ as ht } from "./PackageVersion-
|
|
13
|
-
import { P as ft } from "./PenAndPaper-
|
|
4
|
+
import { _ as rt } from "./Title-DLo3Zo2_.js";
|
|
5
|
+
import { u as nt, U as st } from "./usePrinter-mDGfOQZA.js";
|
|
6
|
+
import { L as ut } from "./Legend-DcIfRSNC.js";
|
|
7
|
+
import { D as it } from "./DataTable-jvL0XGWl.js";
|
|
8
|
+
import { _ as ct } from "./Tooltip-CA1QhFeE.js";
|
|
9
|
+
import dt from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
10
|
+
import vt from "./vue-ui-accordion-DDp8hUlk.js";
|
|
11
|
+
import { u as xe } from "./useNestedProp-BcqToEU0.js";
|
|
12
|
+
import { _ as ht } from "./PackageVersion-Ve0s76sL.js";
|
|
13
|
+
import { P as ft } from "./PenAndPaper-IHG7xTmx.js";
|
|
14
14
|
import { u as pt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as gt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const yt = ["id"], mt = ["xmlns", "viewBox"], bt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], kt = ["cx", "cy", "r", "stroke", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], $t = ["id"], wt = ["stdDeviation"], Ct = ["filter"], xt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset"], Tt = ["cx", "cy", "r", "stroke-width", "stroke-dasharray", "stroke-dashoffset", "onMouseenter"], _t = { key: 1 }, Ot = ["onMouseenter"], Pt = ["x", "y", "font-size", "fill", "font-weight"], At = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as g, ref as c, watch as He, onMounted as Ge, onBeforeUnmount as Xe, openBlock as u, createElementBlock as i, normalizeClass as U, normalizeStyle as T, unref as b, createBlock as z, createCommentVNode as m, createSlots as Ye, withCtx as k, renderSlot as x, normalizeProps as W, guardReactiveProps as V, createVNode as _e, Fragment as w, renderList as I, createElementVNode as F, toDisplayString as D, createTextVNode as qe } from "vue";
|
|
2
|
-
import { u as Qe, c as ee, t as Je, a as Ke, p as H, o as Ze, e as Me, g as et, b as tt, d as at, D as lt, Q as ot, R as st, S as nt, X as ut, x as ze, i as Ie, f as Fe, y as it, q as rt, r as ct, F as G } from "./index-
|
|
2
|
+
import { u as Qe, c as ee, t as Je, a as Ke, p as H, o as Ze, e as Me, g as et, b as tt, d as at, D as lt, Q as ot, R as st, S as nt, X as ut, x as ze, i as Ie, f as Fe, y as it, q as rt, r as ct, F as G } from "./index-DhxnZ6ZS.js";
|
|
3
3
|
import { t as vt, u as dt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as ht } from "./Title-
|
|
5
|
-
import { L as pt } from "./Legend-
|
|
6
|
-
import { _ as mt } from "./Tooltip-
|
|
7
|
-
import { _ as yt } from "./Shape-
|
|
8
|
-
import { u as ft, U as gt } from "./usePrinter-
|
|
9
|
-
import { D as bt } from "./DataTable-
|
|
10
|
-
import xt from "./vue-ui-accordion-
|
|
11
|
-
import kt from "./vue-ui-skeleton-
|
|
12
|
-
import { u as Pe } from "./useNestedProp-
|
|
13
|
-
import { _ as Ct } from "./PackageVersion-
|
|
14
|
-
import { P as wt } from "./PenAndPaper-
|
|
4
|
+
import { _ as ht } from "./Title-DLo3Zo2_.js";
|
|
5
|
+
import { L as pt } from "./Legend-DcIfRSNC.js";
|
|
6
|
+
import { _ as mt } from "./Tooltip-CA1QhFeE.js";
|
|
7
|
+
import { _ as yt } from "./Shape-Rg6yW7m3.js";
|
|
8
|
+
import { u as ft, U as gt } from "./usePrinter-mDGfOQZA.js";
|
|
9
|
+
import { D as bt } from "./DataTable-jvL0XGWl.js";
|
|
10
|
+
import xt from "./vue-ui-accordion-DDp8hUlk.js";
|
|
11
|
+
import kt from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
12
|
+
import { u as Pe } from "./useNestedProp-BcqToEU0.js";
|
|
13
|
+
import { _ as Ct } from "./PackageVersion-Ve0s76sL.js";
|
|
14
|
+
import { P as wt } from "./PenAndPaper-IHG7xTmx.js";
|
|
15
15
|
import { u as $t } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { _ as At } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Tt = ["id"], _t = ["xmlns", "viewBox"], Mt = { style: { "pointer-events": "none" } }, zt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], It = ["x", "y", "fill", "font-size", "font-weight"], Ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Pt = ["x", "y", "fill", "font-size", "font-weight"], Nt = { key: 0 }, St = ["x", "y", "font-size", "fill"], Lt = ["width", "x", "y"], Ot = { style: { width: "100%" } }, Dt = ["x", "y", "fill", "font-weight", "font-size", "onMouseenter"], Ut = ["d", "stroke", "stroke-width", "onMouseenter"], Wt = ["d", "onMouseenter"], Vt = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-C3wsuQ2C.cjs"),ue=require("./useResponsive-BJ7DTGpm.cjs"),Be=require("./Title-CSyDhu3S.cjs"),$e=require("./Legend-BstxUr4T.cjs"),Se=require("./Tooltip-D88h1zvE.cjs"),ze=require("./Shape-Bzx4qKcd.cjs"),ce=require("./usePrinter-Dglf1bsw.cjs"),Ne=require("./DataTable-DWQiMziO.cjs"),Ae=require("./vue-ui-accordion-kv5FuXqU.cjs"),Te=require("./vue-ui-skeleton-99lBQ_mF.cjs"),de=require("./useNestedProp-CFwQtnNB.cjs"),Pe=require("./PackageVersion-CeJ2R9gK.cjs"),Fe=require("./PenAndPaper-DQPbe0G_.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["id"],Ie=["xmlns","viewBox"],Le={style:{"pointer-events":"none"}},Ve=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x","y","fill","font-size","font-weight"],De=["x1","x2","y1","y2","stroke","stroke-width"],qe=["x","y","fill","font-size","font-weight"],Ue={key:0},Re=["x","y","font-size","fill"],We=["width","x","y"],je={style:{width:"100%"}},He=["x","y","fill","font-weight","font-size","onMouseenter"],Ge=["d","stroke","stroke-width","onMouseenter"],Ye=["d","onMouseenter"],Xe={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Ke=["innerHTML"],Qe={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ve,{expose:pe,emit:L}){const b=ve,{vue_ui_parallel_coordinate_plot:he}=i.useConfig(),x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),V=e.ref(0),C=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),U=e.ref(null),R=e.ref(0),W=e.ref(0),j=e.ref(0),T=e.ref(i.createUid()),w=e.ref(!1);function me(l){w.value=l,V.value+=1}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:H,keepUserOptionState:G}=Me.useUserOptionState({config:t.value});function Y(){const l=de.useNestedProp({userConfig:b.config,defaultConfig:he});return l.theme?{...de.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=Y(),P.value=!t.value.showOnChartHover,X(),R.value+=1,j.value+=1,W.value+=1},{deep:!0});const S=e.ref(null);e.onMounted(()=>{X()});function X(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ue.throttle(()=>{const{width:o,height:a}=ue.useResponsive({chart:C.value,title:t.value.style.chart.title.text?O.value:null,legend:t.value.style.chart.legend.show?D.value:null,source:q.value,noTitle:U.value});c.value.width=o,c.value.height=a,c.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),c.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),c.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),c.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})});S.value=new ResizeObserver(l),S.value.observe(C.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=ce.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"}),ye=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),c=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),d=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=c.value.height,s=c.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),fe=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function ee(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||fe.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),ge=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>ee(l.id),isSegregated:f.value.includes(l.id)}))),be=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),te=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>d.value.width/te.value),F=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>{let l=[];for(let o=0;o<te.value;o+=1){const a=Math.min(...F.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),n=Math.max(...F.value.flatMap(v=>v.series.map(A=>A.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((v,A)=>{const Ce=u.min<0?v+Math.abs(u.min):v-Math.abs(u.min),we=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:d.value.bottom-d.value.height*(Ce/we),x:d.value.left+y.value*o+y.value/2,value:v}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),M=e.computed(()=>F.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:d.value.left+y.value*s+y.value/2,y:d.value.bottom-d.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function le({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const p=e.ref(null),_=e.ref(null),B=e.ref(!1),E=e.ref("");function z({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){_.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},B.value=!0,p.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}))?E.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,m.value.map(g=>g.name).forEach((g,v)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as g, ref as h, watch as Fe, onMounted as lt, onBeforeUnmount as at, openBlock as o, createElementBlock as n, normalizeClass as T, normalizeStyle as w, unref as y, createBlock as N, createCommentVNode as c, createSlots as ut, withCtx as x, renderSlot as L, normalizeProps as G, guardReactiveProps as Q, createVNode as ve, createElementVNode as v, Fragment as S, renderList as Y, toDisplayString as $, createTextVNode as ot, nextTick as st } from "vue";
|
|
2
|
-
import { u as rt, c as Re, t as nt, a as it, p as de, o as vt, e as H, b as dt, T as ct, d as ht, i as O, f as P, X as yt, s as ae, w as bt, U as ft, G as pt, x as gt, y as mt, q as xt, r as $t } from "./index-
|
|
2
|
+
import { u as rt, c as Re, t as nt, a as it, p as de, o as vt, e as H, b as dt, T as ct, d as ht, i as O, f as P, X as yt, s as ae, w as bt, U as ft, G as pt, x as gt, y as mt, q as xt, r as $t } from "./index-DhxnZ6ZS.js";
|
|
3
3
|
import { t as kt, u as Lt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as wt } from "./Title-
|
|
5
|
-
import { u as qt, U as _t } from "./usePrinter-
|
|
6
|
-
import { _ as St } from "./Tooltip-
|
|
7
|
-
import { _ as He } from "./Shape-
|
|
8
|
-
import { L as Ct } from "./Legend-
|
|
9
|
-
import { D as zt } from "./DataTable-
|
|
10
|
-
import Tt from "./vue-ui-skeleton-
|
|
11
|
-
import Wt from "./vue-ui-accordion-
|
|
12
|
-
import { u as Ie } from "./useNestedProp-
|
|
13
|
-
import { _ as Xt } from "./PackageVersion-
|
|
14
|
-
import { P as Yt } from "./PenAndPaper-
|
|
4
|
+
import { _ as wt } from "./Title-DLo3Zo2_.js";
|
|
5
|
+
import { u as qt, U as _t } from "./usePrinter-mDGfOQZA.js";
|
|
6
|
+
import { _ as St } from "./Tooltip-CA1QhFeE.js";
|
|
7
|
+
import { _ as He } from "./Shape-Rg6yW7m3.js";
|
|
8
|
+
import { L as Ct } from "./Legend-DcIfRSNC.js";
|
|
9
|
+
import { D as zt } from "./DataTable-jvL0XGWl.js";
|
|
10
|
+
import Tt from "./vue-ui-skeleton-pdtGfiV6.js";
|
|
11
|
+
import Wt from "./vue-ui-accordion-DDp8hUlk.js";
|
|
12
|
+
import { u as Ie } from "./useNestedProp-BcqToEU0.js";
|
|
13
|
+
import { _ as Xt } from "./PackageVersion-Ve0s76sL.js";
|
|
14
|
+
import { P as Yt } from "./PenAndPaper-IHG7xTmx.js";
|
|
15
15
|
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Nt = ["id"], Ot = ["xmlns", "viewBox", "id"], Pt = ["id"], Vt = ["stop-color"], Bt = ["stop-color"], Ft = { key: 0 }, Rt = ["fill", "x", "y", "height", "width", "stroke-width", "stroke", "rx"], Ht = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], It = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ut = { key: 1 }, Dt = ["points", "fill"], Et = ["points", "fill"], Gt = ["points", "fill"], Qt = ["points", "fill"], Jt = { key: 2 }, jt = ["y", "fill", "font-size"], Zt = ["x", "y", "fill", "font-size"], Kt = ["x", "y", "fill", "font-size"], el = ["y", "fill", "font-size"], tl = { key: 3 }, ll = ["x", "y", "font-size", "fill"], al = ["x", "y", "font-size", "fill"], ul = ["x", "y", "font-size", "fill"], ol = ["id", "font-size", "transform", "fill"], sl = ["id", "font-size", "transform", "fill"], rl = ["id", "font-size", "transform", "fill"], nl = { key: 4 }, il = ["fill", "points"], vl = ["x", "y", "width", "height"], dl = ["x", "y", "width", "height"], cl = ["x", "y", "width", "height"], hl = ["x", "y", "width", "height"], yl = {
|