vue-data-ui 2.10.2-beta.1 → 2.10.2-beta.2
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-Durz-Lij.js → Arrow-B2-rOYz8.js} +1 -1
- package/dist/{Arrow-D_EAhs0m.cjs → Arrow-D6UBVyNr.cjs} +1 -1
- package/dist/{BaseIcon-BnWfrW1B.js → BaseIcon-Br5G8Cdk.js} +1 -1
- package/dist/{BaseIcon-DPT0BaqM.cjs → BaseIcon-DfoJJxST.cjs} +1 -1
- package/dist/{ColorPicker-COqCncYu.js → ColorPicker-CiQzB3a-.js} +3 -3
- package/dist/{ColorPicker-CYaUst4k.cjs → ColorPicker-Dvgprgpv.cjs} +1 -1
- package/dist/{DataTable-DSiJ_YaA.cjs → DataTable-CGucPqAQ.cjs} +1 -1
- package/dist/{DataTable-CyKnS5wp.js → DataTable-Dk-94kK2.js} +2 -2
- package/dist/{Legend-RwWQ6l8r.cjs → Legend-B9aoKeq3.cjs} +1 -1
- package/dist/{Legend-Dj_es4iV.js → Legend-Cx6NYPTA.js} +2 -2
- package/dist/{PackageVersion-vJyd5YD8.js → PackageVersion-BdNfnIm2.js} +1 -1
- package/dist/{PackageVersion-DCriWnX3.cjs → PackageVersion-C2bjLIu9.cjs} +1 -1
- package/dist/{PenAndPaper-lj1PPAzR.cjs → PenAndPaper-CJIFAI78.cjs} +1 -1
- package/dist/{PenAndPaper-BgZ0aAW2.js → PenAndPaper-wrVNMaG8.js} +3 -3
- package/dist/{Shape-BgbyzOCz.cjs → Shape-Cn2RU1NY.cjs} +1 -1
- package/dist/{Shape-0QfdCJdX.js → Shape-vIKj52KP.js} +1 -1
- package/dist/{Slicer-B-i-6x8C.cjs → Slicer-t3EfI94H.cjs} +1 -1
- package/dist/{Slicer-lB3lQUsg.js → Slicer-yki6JqTB.js} +2 -2
- package/dist/{Title-zlQvBTwR.cjs → Title-Bae0QJu7.cjs} +1 -1
- package/dist/{Title-UITSl88n.js → Title-CDYBDpu3.js} +1 -1
- package/dist/{Tooltip-QHKaXOYQ.js → Tooltip-BzsAOdBd.js} +1 -1
- package/dist/{Tooltip-DY4rXOAP.cjs → Tooltip-CfqYTd5O.cjs} +1 -1
- package/dist/{dom-to-png-BoSiNLCZ.cjs → dom-to-png-DgRl9bEH.cjs} +1 -1
- package/dist/{dom-to-png-IpAl2vt0.js → dom-to-png-IAiARGiU.js} +1 -1
- package/dist/{img-1Hu7T2L5.js → img-DaDUVggy.js} +1 -1
- package/dist/{img-DOJMU48p.cjs → img-DxEvbX77.cjs} +1 -1
- package/dist/{index-Br1RehUb.js → index-BI6O7K58.js} +1 -1
- package/dist/{index-DiJiQMBB.cjs → index-DgIVCHLv.cjs} +1 -1
- package/dist/{pdf-C6M_O5rS.js → pdf-DBVNp7s2.js} +1 -1
- package/dist/{pdf-Bg3JLNad.cjs → pdf-Dq3h9PEr.cjs} +1 -1
- package/dist/{useNestedProp-DqEOzYzu.cjs → useNestedProp-CCR03NVM.cjs} +1 -1
- package/dist/{useNestedProp-DXxFHEXa.js → useNestedProp-Cvz4MkSy.js} +1 -1
- package/dist/{usePrinter-Bkd5ycBt.cjs → usePrinter-B2xVvtiy.cjs} +1 -1
- package/dist/{usePrinter-BotFh1ji.js → usePrinter-Jr3eyr8H.js} +3 -3
- package/dist/{vue-data-ui-DmyMMva1.cjs → vue-data-ui-DhWKehHS.cjs} +1 -1
- package/dist/{vue-data-ui-ceT6Ds8c.js → vue-data-ui-bm5wfGa_.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BuLR9KPG.cjs → vue-ui-3d-bar-Bpm8dKya.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-D8gTYv2q.js → vue-ui-3d-bar-CHOAZoDV.js} +9 -9
- package/dist/{vue-ui-accordion-P5hXhzth.cjs → vue-ui-accordion-DE1isSE9.cjs} +1 -1
- package/dist/{vue-ui-accordion-BlsQ4IFe.js → vue-ui-accordion-ldF7KsjV.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DQjIgLoF.cjs → vue-ui-age-pyramid-BnHOxOPT.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-C_WRa17B.js → vue-ui-age-pyramid-BuKSta-B.js} +10 -10
- package/dist/{vue-ui-annotator-SHkR_9cj.cjs → vue-ui-annotator-B9j16TKW.cjs} +1 -1
- package/dist/{vue-ui-annotator-BI4gOYbV.js → vue-ui-annotator-BBuH-QB4.js} +2 -2
- package/dist/{vue-ui-bullet-DQnycr6Q.js → vue-ui-bullet-B0C_rPTQ.js} +8 -8
- package/dist/{vue-ui-bullet-Dv-CldQs.cjs → vue-ui-bullet-CRChR0Qe.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Bd9v_ssR.cjs → vue-ui-candlestick-Bq66GLxw.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CxPvkEtR.js → vue-ui-candlestick-By5MsCcS.js} +11 -11
- package/dist/{vue-ui-carousel-table-DuwoXFJH.js → vue-ui-carousel-table-BOtjI2Ov.js} +4 -4
- package/dist/{vue-ui-carousel-table-Dwvy8FmR.cjs → vue-ui-carousel-table-CyywZulq.cjs} +1 -1
- package/dist/{vue-ui-chestnut-1P_kvZFR.js → vue-ui-chestnut-BS2kXrPU.js} +8 -8
- package/dist/{vue-ui-chestnut-Da5lD-jy.cjs → vue-ui-chestnut-D8QPZS8n.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-_d0WvVlg.js → vue-ui-circle-pack-C8m10WZ0.js} +9 -9
- package/dist/{vue-ui-circle-pack-H7fs4aWV.cjs → vue-ui-circle-pack-iOxdB75t.cjs} +1 -1
- package/dist/{vue-ui-cursor-CcxO5N6B.js → vue-ui-cursor-Bn-CCFO0.js} +2 -2
- package/dist/{vue-ui-cursor-CeAtprXI.cjs → vue-ui-cursor-Ccym3tFb.cjs} +1 -1
- package/dist/{vue-ui-dashboard-nLTbt8rE.cjs → vue-ui-dashboard-Cw4IXhXY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DQql8FoJ.js → vue-ui-dashboard-D-vs2N_7.js} +62 -62
- package/dist/{vue-ui-digits-CIm6jt9J.js → vue-ui-digits-BXBXg7wv.js} +2 -2
- package/dist/{vue-ui-digits-DYzQpKDk.cjs → vue-ui-digits-D66h3nUw.cjs} +1 -1
- package/dist/{vue-ui-donut-CMmo-xas.js → vue-ui-donut-BGZIwC5D.js} +12 -12
- package/dist/{vue-ui-donut-BZBTtRIT.cjs → vue-ui-donut-Bf3THSxi.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CmVkOgHk.js → vue-ui-donut-evolution-5yOibvNM.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BigkaF3K.cjs → vue-ui-donut-evolution-xxrUJzgG.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DNRxfbMB.js → vue-ui-dumbbell-C-KqKhxI.js} +10 -10
- package/dist/{vue-ui-dumbbell-COVwDZf9.cjs → vue-ui-dumbbell-CWn7cNsm.cjs} +1 -1
- package/dist/{vue-ui-flow-CWn5Xgfv.js → vue-ui-flow-D4_2VnaB.js} +9 -9
- package/dist/{vue-ui-flow-C2-V4oXf.cjs → vue-ui-flow-DFxWNRRJ.cjs} +1 -1
- package/dist/{vue-ui-funnel-Caa_fg2B.js → vue-ui-funnel-ADEjZ8yz.js} +9 -9
- package/dist/{vue-ui-funnel-CzUX32Ub.cjs → vue-ui-funnel-DIoqpwbm.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Dh6mXUEh.cjs → vue-ui-galaxy-BRle40mR.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DlPI9C4p.js → vue-ui-galaxy-DLtA9Ebb.js} +11 -11
- package/dist/{vue-ui-gauge-C0-BHMRe.cjs → vue-ui-gauge-B4vEWkRk.cjs} +1 -1
- package/dist/{vue-ui-gauge-DCKwx-39.js → vue-ui-gauge-BVj-IBdi.js} +7 -7
- package/dist/{vue-ui-gizmo-Dbyg4lfp.js → vue-ui-gizmo-BTe8CPyi.js} +3 -3
- package/dist/{vue-ui-gizmo-CBEmt6wS.cjs → vue-ui-gizmo-BwBtkZ5z.cjs} +1 -1
- package/dist/{vue-ui-heatmap-B8aHMTRT.js → vue-ui-heatmap-DrXMOxbe.js} +10 -10
- package/dist/{vue-ui-heatmap-L44qq3tT.cjs → vue-ui-heatmap-VdFtflO6.cjs} +1 -1
- package/dist/{vue-ui-history-plot-cK3Eyct-.cjs → vue-ui-history-plot-B-ScOcEy.cjs} +1 -1
- package/dist/{vue-ui-history-plot-Db9VBFJo.js → vue-ui-history-plot-_DfuZIMP.js} +11 -11
- package/dist/{vue-ui-kpi-3Y6KGCu8.cjs → vue-ui-kpi-DSQV0Kf2.cjs} +1 -1
- package/dist/{vue-ui-kpi-DTVFlqqr.js → vue-ui-kpi-DfFiDtCP.js} +3 -3
- package/dist/{vue-ui-mini-loader-C0-qR0Wv.js → vue-ui-mini-loader-1JZipPcP.js} +2 -2
- package/dist/{vue-ui-mini-loader-DYQjIOkq.cjs → vue-ui-mini-loader-CDOlO_1_.cjs} +1 -1
- package/dist/{vue-ui-molecule-CZYTkXRy.js → vue-ui-molecule-Db_C7mVS.js} +11 -11
- package/dist/{vue-ui-molecule-BsbB0T8n.cjs → vue-ui-molecule-jEcRTe4V.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Dcgb3cQR.cjs → vue-ui-mood-radar-BoKSTE-Y.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-zWFTh0WG.js → vue-ui-mood-radar-m48vvkft.js} +11 -11
- package/dist/{vue-ui-nested-donuts-Ci2TbHCY.js → vue-ui-nested-donuts-DNhMOryo.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CElXmrE_.cjs → vue-ui-nested-donuts-ihd00Tpn.cjs} +1 -1
- package/dist/{vue-ui-onion-DTYqd0S7.cjs → vue-ui-onion-D9AHOWa5.cjs} +1 -1
- package/dist/{vue-ui-onion-C3w_0U-6.js → vue-ui-onion-YKxsqnI7.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-DmAaG5vE.js → vue-ui-parallel-coordinate-plot-7SCwFkrU.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DXgrYF8V.cjs → vue-ui-parallel-coordinate-plot-BmO6zenq.cjs} +1 -1
- package/dist/{vue-ui-quadrant-xIalSKQB.js → vue-ui-quadrant-Bi0by7IK.js} +12 -12
- package/dist/{vue-ui-quadrant--MXxqtPm.cjs → vue-ui-quadrant-CAJ4dTBu.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-DrEeKIP-.cjs → vue-ui-quick-chart-C37lGqa1.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CSffm4a5.js → vue-ui-quick-chart-DlV0Qv_x.js} +9 -9
- package/dist/{vue-ui-radar-BkYTilrU.js → vue-ui-radar-B14zLIww.js} +12 -12
- package/dist/{vue-ui-radar-Baujx0zJ.cjs → vue-ui-radar-H08KmB3s.cjs} +1 -1
- package/dist/{vue-ui-rating-CoCspb5w.cjs → vue-ui-rating-CYarWaTf.cjs} +1 -1
- package/dist/{vue-ui-rating-D9mcamSQ.js → vue-ui-rating-CdSQUBG6.js} +2 -2
- package/dist/{vue-ui-relation-circle-BOQbjwio.cjs → vue-ui-relation-circle-A4Vw8kYl.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D1QRMkRv.js → vue-ui-relation-circle-IzAvPPGl.js} +7 -7
- package/dist/{vue-ui-ridgeline-DAhVh2wO.js → vue-ui-ridgeline-BF5X6KQR.js} +12 -12
- package/dist/{vue-ui-ridgeline-evw3STiF.cjs → vue-ui-ridgeline-BaHgOn_p.cjs} +1 -1
- package/dist/{vue-ui-rings-BbaMc09d.js → vue-ui-rings-DUhnXy1h.js} +12 -12
- package/dist/{vue-ui-rings-BhG1riq2.cjs → vue-ui-rings-DnVeMrOw.cjs} +1 -1
- package/dist/{vue-ui-scatter-BA1innim.js → vue-ui-scatter-D7bXuxob.js} +12 -12
- package/dist/{vue-ui-scatter-D2EXkBxx.cjs → vue-ui-scatter-DoGX7iHp.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DEI0qJZY.cjs → vue-ui-skeleton-DeEGdJEn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BksknW8F.js → vue-ui-skeleton-Dxm7rqic.js} +3 -3
- package/dist/{vue-ui-smiley-D_lDFgTX.js → vue-ui-smiley-95l4UiqT.js} +2 -2
- package/dist/{vue-ui-smiley-B4dNIhTF.cjs → vue-ui-smiley-DmAtXVht.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-JPsaMYzx.cjs → vue-ui-spark-trend-C3CO25Jy.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-YVwnvmen.js → vue-ui-spark-trend-DdH43oVm.js} +5 -5
- package/dist/{vue-ui-sparkbar-P7ab216P.cjs → vue-ui-sparkbar-C2roDWfv.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-COtSp75m.js → vue-ui-sparkbar-DTe3QrR3.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DBTs_fko.js → vue-ui-sparkgauge-BwclNj3C.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BrmBThWX.cjs → vue-ui-sparkgauge-nq6-9TjT.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Bbui1Mjp.cjs → vue-ui-sparkhistogram-BdWirDjI.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-D9ltgqDi.js → vue-ui-sparkhistogram-Brau127G.js} +5 -5
- package/dist/{vue-ui-sparkline-DkRtUZjr.cjs → vue-ui-sparkline-B2mOJzkG.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DxlyRPM_.js → vue-ui-sparkline-qqfyQyVz.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-CAAfi-lB.cjs → vue-ui-sparkstackbar-BJl9lbBp.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DjrHKvP-.js → vue-ui-sparkstackbar-DLlDU0B2.js} +5 -5
- package/dist/{vue-ui-stackbar-hDFg5vfU.cjs → vue-ui-stackbar-CEvmDjq3.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BQw6lOEm.js → vue-ui-stackbar-RRGnblUm.js} +13 -13
- package/dist/{vue-ui-strip-plot-D5X65rGR.js → vue-ui-strip-plot-C9LKjSkW.js} +11 -11
- package/dist/{vue-ui-strip-plot-BuA2QRro.cjs → vue-ui-strip-plot-Dlsv-yRI.cjs} +1 -1
- package/dist/{vue-ui-table-4x1r1zJ4.js → vue-ui-table-DxdJ151X.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BuGa0tHQ.cjs → vue-ui-table-heatmap-BhxOvDDW.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-gU7N3s52.js → vue-ui-table-heatmap-CzGeU_uL.js} +4 -4
- package/dist/{vue-ui-table-DN4G0Xcv.cjs → vue-ui-table-qULtmHGA.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-B3YUUzDD.cjs → vue-ui-table-sparkline-D1hriLB0.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CrNEnGwB.js → vue-ui-table-sparkline-DSZhEDKX.js} +5 -5
- package/dist/{vue-ui-thermometer-D5NxA-Pu.cjs → vue-ui-thermometer-Cvnh4jvE.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BRTBFuLr.js → vue-ui-thermometer-Pw4X3Bun.js} +7 -7
- package/dist/{vue-ui-timer-CUdy26j8.cjs → vue-ui-timer-BlmIXPv6.cjs} +1 -1
- package/dist/{vue-ui-timer-DjpkBrmE.js → vue-ui-timer-CvvexEeN.js} +5 -5
- package/dist/{vue-ui-tiremarks-DK1Y5NS-.cjs → vue-ui-tiremarks-BAkMBz3o.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-C3oH7Ida.js → vue-ui-tiremarks-DbZQvV_2.js} +7 -7
- package/dist/{vue-ui-treemap-B9Ttncgf.js → vue-ui-treemap-CF-RjM16.js} +12 -12
- package/dist/{vue-ui-treemap-DeDaY1tK.cjs → vue-ui-treemap-a6b1vWy-.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-jQ534ONL.cjs → vue-ui-vertical-bar-Dm5zMIeE.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DbGWFmAZ.js → vue-ui-vertical-bar-ZJbSI-xR.js} +12 -12
- package/dist/{vue-ui-waffle-BEAMerlK.js → vue-ui-waffle-I9AKkwb4.js} +12 -12
- package/dist/{vue-ui-waffle-Dlq-kfVb.cjs → vue-ui-waffle-XNiw-qtb.cjs} +1 -1
- package/dist/{vue-ui-wheel-BwxXgxYN.js → vue-ui-wheel-BA7wZUZL.js} +7 -7
- package/dist/{vue-ui-wheel-BpoGeeG1.cjs → vue-ui-wheel-DJUrO6CA.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DRihn0ID.js → vue-ui-word-cloud-BVqb1Yix.js} +11 -11
- package/dist/vue-ui-word-cloud-ByjkRq1g.cjs +1 -0
- package/dist/{vue-ui-world-zCrAoO8x.cjs → vue-ui-world-9nlcZMH1.cjs} +1 -1
- package/dist/{vue-ui-world-BvwaCfKu.js → vue-ui-world-DkYRlp5s.js} +11 -11
- package/dist/{vue-ui-xy-D8ZtpWDi.js → vue-ui-xy-B1HwPMFi.js} +16 -16
- package/dist/{vue-ui-xy-DTbAGaIM.cjs → vue-ui-xy-B4sqGuw6.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DI6-54yO.cjs → vue-ui-xy-canvas-C-rykR_6.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DQhK_N_z.js → vue-ui-xy-canvas-CGCtkn9g.js} +12 -12
- package/package.json +1 -1
- package/dist/vue-ui-word-cloud-Bwp55Vjk.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ref as L, computed as B, watch as Ne, onMounted as wt, onBeforeUnmount as At, nextTick as Ie, createElementBlock as l, openBlock as a, normalizeStyle as M, normalizeClass as ve, createBlock as Ee, createCommentVNode as f, createVNode as de, unref as g, createSlots as _t, withCtx as X, renderSlot as N, normalizeProps as ae, guardReactiveProps as le, toDisplayString as O, createElementVNode as _, Fragment as m, renderList as $, mergeProps as Fe } from "vue";
|
|
2
|
-
import { u as zt, c as Lt, t as $t, p as q, a as Ct, C as nt, b as It, H as Et, e as Pt, d as Ue, m as Ot, D as it, X as Tt, j as Rt, k as Be, n as ke, i as Z, f as D, S as ut, v as Y, x as Pe, y as De } from "./index-
|
|
2
|
+
import { u as zt, c as Lt, t as $t, p as q, a as Ct, C as nt, b as It, H as Et, e as Pt, d as Ue, m as Ot, D as it, X as Tt, j as Rt, k as Be, n as ke, i as Z, f as D, S as ut, v as Y, x as Pe, y as De } from "./index-BI6O7K58.js";
|
|
3
3
|
import { t as Mt, u as Nt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import Oe from "./BaseIcon-
|
|
5
|
-
import { _ as Ft } from "./Tooltip-
|
|
6
|
-
import { u as Ut, U as Bt } from "./usePrinter-
|
|
7
|
-
import { S as Dt } from "./Slicer-
|
|
8
|
-
import Vt from "./vue-ui-skeleton-
|
|
9
|
-
import { u as rt } from "./useNestedProp-
|
|
10
|
-
import { _ as qt } from "./PackageVersion-
|
|
11
|
-
import { _ as Ht } from "./PenAndPaper-
|
|
4
|
+
import Oe from "./BaseIcon-Br5G8Cdk.js";
|
|
5
|
+
import { _ as Ft } from "./Tooltip-BzsAOdBd.js";
|
|
6
|
+
import { u as Ut, U as Bt } from "./usePrinter-Jr3eyr8H.js";
|
|
7
|
+
import { S as Dt } from "./Slicer-yki6JqTB.js";
|
|
8
|
+
import Vt from "./vue-ui-skeleton-Dxm7rqic.js";
|
|
9
|
+
import { u as rt } from "./useNestedProp-Cvz4MkSy.js";
|
|
10
|
+
import { _ as qt } from "./PackageVersion-BdNfnIm2.js";
|
|
11
|
+
import { _ as Ht } from "./PenAndPaper-wrVNMaG8.js";
|
|
12
12
|
import { u as Wt } from "./useChartAccessibility-BWojgys7.js";
|
|
13
13
|
import { _ as jt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const A = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as p, ref as i, watch as He, onMounted as Ye, onBeforeUnmount as Qe, createElementBlock as n, openBlock as r, unref as c, normalizeStyle as W, normalizeClass as M, createBlock as _, createCommentVNode as d, createElementVNode as $, createVNode as ee, createSlots as Je, withCtx as y, renderSlot as f, normalizeProps as N, guardReactiveProps as S, Fragment as T, renderList as P, toDisplayString as U, createTextVNode as xe, nextTick as Ke } from "vue";
|
|
2
|
-
import { u as Ze, c as et, t as tt, p as x, a as at, o as ot, e as I, b as lt, g as Oe, d as Ae, P as Fe, v as rt, i as Ne, f as V, X as st, s as te, w as nt, Q as Se, q as ut, r as it, x as ct, y as dt } from "./index-
|
|
2
|
+
import { u as Ze, c as et, t as tt, p as x, a as at, o as ot, e as I, b as lt, g as Oe, d as Ae, P as Fe, v as rt, i as Ne, f as V, X as st, s as te, w as nt, Q as Se, q as ut, r as it, x as ct, y as dt } from "./index-BI6O7K58.js";
|
|
3
3
|
import { t as vt, u as ht } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as pt } from "./Title-
|
|
5
|
-
import { u as gt, U as ft } from "./usePrinter-
|
|
6
|
-
import { _ as yt } from "./Tooltip-
|
|
7
|
-
import mt from "./vue-ui-sparkbar-
|
|
8
|
-
import { L as bt } from "./Legend-
|
|
9
|
-
import { D as kt } from "./DataTable-
|
|
10
|
-
import Ct from "./vue-ui-skeleton-
|
|
11
|
-
import wt from "./vue-ui-accordion-
|
|
12
|
-
import { u as Ie } from "./useNestedProp-
|
|
13
|
-
import { _ as _t } from "./PackageVersion-
|
|
14
|
-
import { _ as $t } from "./PenAndPaper-
|
|
4
|
+
import { _ as pt } from "./Title-CDYBDpu3.js";
|
|
5
|
+
import { u as gt, U as ft } from "./usePrinter-Jr3eyr8H.js";
|
|
6
|
+
import { _ as yt } from "./Tooltip-BzsAOdBd.js";
|
|
7
|
+
import mt from "./vue-ui-sparkbar-DTe3QrR3.js";
|
|
8
|
+
import { L as bt } from "./Legend-Cx6NYPTA.js";
|
|
9
|
+
import { D as kt } from "./DataTable-Dk-94kK2.js";
|
|
10
|
+
import Ct from "./vue-ui-skeleton-Dxm7rqic.js";
|
|
11
|
+
import wt from "./vue-ui-accordion-ldF7KsjV.js";
|
|
12
|
+
import { u as Ie } from "./useNestedProp-Cvz4MkSy.js";
|
|
13
|
+
import { _ as _t } from "./PackageVersion-BdNfnIm2.js";
|
|
14
|
+
import { _ as $t } from "./PenAndPaper-wrVNMaG8.js";
|
|
15
15
|
import { u as Tt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { u as Pt } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DiJiQMBB.cjs"),se=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-zlQvBTwR.cjs"),ue=require("./usePrinter-Bkd5ycBt.cjs"),_e=require("./Tooltip-DY4rXOAP.cjs"),$e=require("./vue-ui-sparkbar-P7ab216P.cjs"),Te=require("./Legend-RwWQ6l8r.cjs"),Ne=require("./DataTable-DSiJ_YaA.cjs"),xe=require("./vue-ui-skeleton-DEI0qJZY.cjs"),Se=require("./vue-ui-accordion-P5hXhzth.cjs"),ie=require("./useNestedProp-DqEOzYzu.cjs"),Ee=require("./PackageVersion-DCriWnX3.cjs"),Ve=require("./PenAndPaper-lj1PPAzR.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],ze=["xmlns","viewBox"],Ie=["width","height"],Re=["id"],qe=["stop-color"],Me=["stop-color"],Ue={key:1},De=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:0},We=["d","stroke","stroke-width"],He=["d","stroke","stroke-width"],je={key:2},Xe=["x","y","text-anchor","font-size","fill","onMouseenter"],Ye=["points","stroke","stroke-width"],Je=["points","stroke","stroke-width","fill"],Ke={key:3},Qe=["cx","cy","fill","r","stroke"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt={key:0,style:{"max-width":"200px",margin:"0 auto"}},ot={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ce,{expose:de,emit:ve}){const{vue_ui_radar:pe}=n.useConfig(),d=ce,b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),he=e.ref(null),T=e.ref(!1),N=e.ref(""),L=e.ref(0),C=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>j(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:G,keepUserOptionState:W}=Oe.useUserOptionState({config:t.value}),{svgRef:H}=Fe.useChartAccessibility({config:t.value.style.chart.title});function j(){const o=ie.useNestedProp({userConfig:d.config,defaultConfig:pe});return o.theme?{...ie.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=j(),x.value=!t.value.userOptions.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1,p.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tootlip.show},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=se.throttle(()=>{const{width:a,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});requestAnimationFrame(()=>{u.value.width=a,u.value.height=l})});B.value=new ResizeObserver(o),B.value.observe(C.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),fe=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=ve,i=e.ref([]),w=e.ref(null),m=e.ref(!1);function ee(o){m.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{m.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{m.value=!1},500)),me("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ye(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),h=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),te=e.computed(()=>Math.max(...h.value.flatMap(o=>o.values))),oe=e.computed(()=>h.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),ae=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:oe.value,rotation:0})),ke=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>ae.value.coordinates.map((o,a)=>{const l=h.value[a].values.map(r=>be({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(h.value[a].target||te.value)}));return{...o,...h.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function be({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const y=e.computed(()=>{const o=h.value.map((a,l)=>a.values.map(r=>r/(a.target||te.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/h.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>ee(l),isSegregated:i.value.includes(l)}))}),Ce=e.computed(()=>({cy:"radar-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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function we(o,a){V.value=[],_.value=a,T.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function le(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,lt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const k=e.ref(!1);function Be(o){k.value=o,L.value+=1}function re(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return de({getData:ye,generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:re,toggleTooltip:ne,toggleAnnotator:F}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:C,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve._sfc_main,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,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",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(W)||e.unref(x))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ee._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Me)],8,Re))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,De))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:oe.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:ae.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),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>we(l,r),onMouseleave:a[0]||(a[0]=s=>{T.value=!1,_.value=null})},e.toDisplayString(l.name),41,Xe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Ye)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===c&&t.value.useCssAnimation})},null,10,Qe))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${D.value}`,legendSet:y.value,config:Ce.value,onClickMarker:a[1]||(a[1]=({i:l})=>ee(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(_e._sfc_main,{show:p.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:N.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode($e.default,{dataset:V.value,config:fe.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[2]||(a[2]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},at=Ae._export_sfc(ot,[["__scopeId","data-v-b6116edd"]]);exports.default=at;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-DgIVCHLv.cjs"),se=require("./useResponsive-DQmBAoBf.cjs"),Pe=require("./Title-Bae0QJu7.cjs"),ue=require("./usePrinter-B2xVvtiy.cjs"),_e=require("./Tooltip-CfqYTd5O.cjs"),$e=require("./vue-ui-sparkbar-C2roDWfv.cjs"),Te=require("./Legend-B9aoKeq3.cjs"),Ne=require("./DataTable-CGucPqAQ.cjs"),xe=require("./vue-ui-skeleton-DeEGdJEn.cjs"),Se=require("./vue-ui-accordion-DE1isSE9.cjs"),ie=require("./useNestedProp-CCR03NVM.cjs"),Ee=require("./PackageVersion-C2bjLIu9.cjs"),Ve=require("./PenAndPaper-CJIFAI78.cjs"),Oe=require("./useUserOptionState-BgepsfED.cjs"),Fe=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Le=["id"],ze=["xmlns","viewBox"],Ie=["width","height"],Re=["id"],qe=["stop-color"],Me=["stop-color"],Ue={key:1},De=["x1","y1","x2","y2","stroke","stroke-width"],Ge={key:0},We=["d","stroke","stroke-width"],He=["d","stroke","stroke-width"],je={key:2},Xe=["x","y","text-anchor","font-size","fill","onMouseenter"],Ye=["points","stroke","stroke-width"],Je=["points","stroke","stroke-width","fill"],Ke={key:3},Qe=["cx","cy","fill","r","stroke"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt={key:0,style:{"max-width":"200px",margin:"0 auto"}},ot={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ce,{expose:de,emit:ve}){const{vue_ui_radar:pe}=n.useConfig(),d=ce,b=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),he=e.ref(null),T=e.ref(!1),N=e.ref(""),L=e.ref(0),C=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>j(),set:o=>o}),{userOptionsVisible:x,setUserOptionsVisibility:G,keepUserOptionState:W}=Oe.useUserOptionState({config:t.value}),{svgRef:H}=Fe.useChartAccessibility({config:t.value.style.chart.title});function j(){const o=ie.useNestedProp({userConfig:d.config,defaultConfig:pe});return o.theme?{...ie.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=j(),x.value=!t.value.userOptions.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1,p.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,p.value.showTable=t.value.table.show,p.value.showTooltip=t.value.style.chart.tootlip.show},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=se.throttle(()=>{const{width:a,height:l}=se.useResponsive({chart:C.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});requestAnimationFrame(()=>{u.value.width=a,u.value.height=l})});B.value=new ResizeObserver(o),B.value.observe(C.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=ue.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Z=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),p=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),fe=e.computed(()=>({style:{backgroundColor:"#FFFFFF00",animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),u=e.ref({height:312,width:512}),me=ve,i=e.ref([]),w=e.ref(null),m=e.ref(!1);function ee(o){m.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{m.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{m.value=!1},500)),me("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ye(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),h=e.computed(()=>b.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Z.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),te=e.computed(()=>Math.max(...h.value.flatMap(o=>o.values))),oe=e.computed(()=>h.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),ae=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:oe.value,rotation:0})),ke=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>ae.value.coordinates.map((o,a)=>{const l=h.value[a].values.map(r=>be({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(h.value[a].target||te.value)}));return{...o,...h.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function be({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const y=e.computed(()=>{const o=h.value.map((a,l)=>a.values.map(r=>r/(a.target||te.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/h.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>ee(l),isSegregated:i.value.includes(l)}))}),Ce=e.computed(()=>({cy:"radar-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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function we(o,a){V.value=[],_.value=a,T.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:h.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function le(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,lt)=>[c.name,c.target,...c.values.flatMap(A=>[A,isNaN(A/c.target)?"":A/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const k=e.ref(!1);function Be(o){k.value=o,L.value+=1}function re(){p.value.showTable=!p.value.showTable}function ne(){p.value.showTooltip=!p.value.showTooltip}const $=e.ref(!1);function F(){$.value=!$.value}return de({getData:ye,generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:re,toggleTooltip:ne,toggleAnnotator:F}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${k.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:C,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ve._sfc_main,{key:0,svgRef:e.unref(H),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:F},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,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",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Pe._sfc_main,{key:`title_${M.value}`,config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(W)||e.unref(x))?(e.openBlock(),e.createBlock(ue.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:k.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:C.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne,onToggleAnnotator:F,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(x)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:H,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ee._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:u.value.width<=0?10:u.value.width,height:u.value.height<=0?10:u.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ie)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,Me)],8,Re))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,De))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:oe.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,We))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:ae.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),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>we(l,r),onMouseleave:a[0]||(a[0]=s=>{T.value=!1,_.value=null})},e.toDisplayString(l.name),41,Xe))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Ye)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,points:e.unref(n.makePath)(g.value.map(s=>s.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===r&&t.value.useCssAnimation})},null,10,Je)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":m.value&&w.value===c&&t.value.useCssAnimation})},null,10,Qe))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Te.Legend,{key:`legend_${D.value}`,legendSet:y.value,config:Ce.value,onClickMarker:a[1]||(a[1]=({i:l})=>ee(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(_e._sfc_main,{show:p.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:C.value,content:N.value,isFullscreen:k.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode($e.default,{dataset:V.value,config:fe.value,backgroundOpacity:0},null,8,["dataset","config"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Se.default,{key:8,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ne.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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[2]||(a[2]=l=>p.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Le))}},at=Ae._export_sfc(ot,[["__scopeId","data-v-b6116edd"]]);exports.default=at;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DiJiQMBB.cjs"),F=require("./useNestedProp-DqEOzYzu.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-DgIVCHLv.cjs"),F=require("./useNestedProp-CCR03NVM.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},j={key:0,style:{position:"relative"}},O={key:0,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},X={key:1,style:{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"}},I=["src","height","width"],Y=["xmlns","height","width"],G=["id"],P=["stop-color"],U=["stop-color"],q=["points","fill","stroke","stroke-width"],H=["src","alt","height","width","id"],K=["xmlns","viewBox","height","id"],T=["id"],W=["stop-color"],J=["stop-color"],Q=["points","fill","stroke"],Z=["xmlns","height"],ee=["onClick","onMouseenter","onFocus","onKeyup"],te=["onMouseenter","onFocus"],le={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(S,{expose:_,emit:z}){const{vue_ui_rating:w}=a.useConfig(),i=S,v=e.ref(a.createUid()),g=e.ref(!1),r=e.ref(void 0),y=e.ref(void 0),p=e.ref([]),B=e.useSlots();e.onMounted(()=>{B["chart-background"]&&console.warn("VueUiRating does not support the #chart-background slot.")});const V=z,t=e.computed({get:()=>m(),set:o=>o});function m(){return F.useNestedProp({userConfig:i.config,defaultConfig:w})}e.watch(()=>i.config,o=>{t.value=m(),k()},{deep:!0});const N=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?E(i.dataset.rating):i.dataset.rating),C=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),u=e.ref(N.value),h=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function E(o){let n=0,l=0;for(const s in o){const D=parseInt(s),x=o[s];n+=D*x,l+=x}if(l===0)return 0;const d=n/l;return Math.min(t.value.to,Math.max(t.value.from,d))}e.onMounted(()=>{k()});function k(){(!Object.hasOwn(i.dataset,"rating")||a.objectIsEmpty(i.dataset))&&a.error({componentName:"VueUiRating",type:"datasetAttribute",property:"rating"}),p.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)p.value.push(o)}function f(o,n=!1){return o>r.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${v.value})`:t.value.style.star.activeColor}function $(o,n=!1){const l=u.value-o,d=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*d;default:return l*d}}function b(o){c.value||(u.value=o,V("rate",o))}function L(){return u.value}function M(o=!0){c.value=o}return _({getData:L,toggleReadonly:M}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[4]||(n[4]=l=>g.value=!0),onMouseleave:n[5]||(n[5]=l=>{g.value=!1,r.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(l,d)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[o.$slots["layer-under"]||o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",j,[o.$slots["layer-under"]?(e.openBlock(),e.createElementBlock("div",O,[e.renderSlot(o.$slots,"layer-under",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0),o.$slots["layer-above"]?(e.openBlock(),e.createElementBlock("div",X,[e.renderSlot(o.$slots,"layer-above",e.mergeProps({ref_for:!0},{value:l,size:t.value.style.itemSize,hoveredValue:r.value,focusedValue:y.value}),void 0,!0)])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(r.value)?t.value.style.image.inactiveOpacity:f(l,!0)}`)},null,12,I)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(r.value)?t.value.style.star.inactiveColor:f(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:r.value?f(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,q)],8,Y)),h.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${v.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${$(d,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,H)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${$(d)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${v.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${v.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,J)],8,T)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${v.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,Q)],8,K))],64)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:s=>b(l),onMouseenter:s=>r.value=l,onMouseleave:n[0]||(n[0]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[1]||(n[1]=s=>y.value=void 0),tabindex:"0",onKeyup:e.withKeys(s=>b(l),["enter"])},null,40,ee)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:s=>r.value=l,onMouseleave:n[2]||(n[2]=s=>r.value=void 0),onFocus:s=>y.value=l,onBlur:n[3]||(n[3]=s=>y.value=void 0)},null,40,te)):e.createCommentVNode("",!0)],12,Z)),t.value.style.tooltip.show&&C.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:2,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${r.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,u.value,e.unref(a.dataLabel)({v:u.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},oe=A._export_sfc(le,[["__scopeId","data-v-e9ed619f"]]);exports.default=oe;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as $, useSlots as J, onMounted as R, computed as x, watch as Q, createElementBlock as o, openBlock as a, normalizeStyle as s, createCommentVNode as p, createElementVNode as r, toDisplayString as f, unref as n, Fragment as B, renderList as Z, renderSlot as j, mergeProps as O, withKeys as ee } from "vue";
|
|
2
|
-
import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, W as I } from "./index-
|
|
3
|
-
import { u as ie } from "./useNestedProp-
|
|
2
|
+
import { u as te, c as le, o as oe, e as ae, i as b, f as _, X as z, w as X, W as I } from "./index-BI6O7K58.js";
|
|
3
|
+
import { u as ie } from "./useNestedProp-Cvz4MkSy.js";
|
|
4
4
|
import { _ as se } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const ne = {
|
|
6
6
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DiJiQMBB.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-zlQvBTwR.cjs"),te=require("./usePrinter-Bkd5ycBt.cjs"),$e=require("./vue-ui-skeleton-DEI0qJZY.cjs"),le=require("./useNestedProp-DqEOzYzu.cjs"),_e=require("./PackageVersion-DCriWnX3.cjs"),Pe=require("./PenAndPaper-lj1PPAzR.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:_,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),_.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,o=0;P.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(_))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(_e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DgIVCHLv.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),Be=require("./Title-Bae0QJu7.cjs"),te=require("./usePrinter-B2xVvtiy.cjs"),$e=require("./vue-ui-skeleton-DeEGdJEn.cjs"),le=require("./useNestedProp-CCR03NVM.cjs"),_e=require("./PackageVersion-C2bjLIu9.cjs"),Pe=require("./PenAndPaper-CJIFAI78.cjs"),Le=require("./useUserOptionState-BgepsfED.cjs"),ze=require("./useChartAccessibility-Cm7nkzTG.cjs"),Oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=["id"],Ee=["xmlns","viewBox"],Ae=["width","height"],Ne=["cx","cy","r","stroke","stroke-width"],Ie={key:1},Ve=["stroke","d","stroke-width"],Fe={style:{"pointer-events":"none"}},Me=["cx","cy","fill","r","stroke"],Re=["x","y","fill","font-size"],Te={key:2},qe=["stroke","stroke-width","x1","x2","y1","y2"],je={style:{"pointer-events":"none"}},De=["cx","cy","fill","r","stroke"],Ue=["x","y","fill","font-size"],Ge=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],We=["cx","cy","fill","stroke","onClick","r"],Ye={key:5,class:"vue-data-ui-watermark"},Xe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(re,{expose:ne}){e.useCssVars(t=>({cc1109c8:ce.value,fd19c20a:ue.value,"0d0b359d":de.value}));const{vue_ui_relation_circle:oe}=s.useConfig(),y=re,$=e.computed(()=>!!y.dataset&&Object.keys(y.dataset).length),w=e.ref(s.createUid()),E=e.ref(0),b=e.ref(null),A=e.ref(null),N=e.ref(null),I=e.ref(null),V=e.ref(0),r=e.computed({get:()=>T(),set:t=>t}),{userOptionsVisible:_,setUserOptionsVisibility:F,keepUserOptionState:M}=Le.useUserOptionState({config:r.value}),{svgRef:R}=ze.useChartAccessibility({config:r.value.style.title});function T(){const t=le.useNestedProp({userConfig:y.config,defaultConfig:oe});return t.theme?{...le.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||y.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>y.config,t=>{r.value=T(),_.value=!r.value.userOptions.showOnChartHover,X(),V.value+=1},{deep:!0});const{isPrinting:q,isImaging:j,generatePdf:D,generateImage:U}=te.usePrinter({elementId:`relation_circle_${w.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle",options:r.value.userOptions.print}),se=e.computed(()=>r.value.userOptions.show&&!r.value.style.title.text),G=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),h=e.ref([]),d=e.ref([]),i=e.ref({}),v=e.ref([]),ae=e.ref(0),P=e.computed(()=>y.dataset.slice(0,r.value.style.limit)),k=e.ref(r.value.style.size),f=e.ref(r.value.style.weightLabels.size),W=e.ref(r.value.style.plot.radius),Y=e.ref(r.value.style.labels.fontSize),a=e.ref({height:r.value.style.size,width:r.value.style.size}),m=e.computed({get(){return k.value*r.value.style.circle.radiusProportion},set(t){return t}}),ie=e.computed(()=>r.value.style.links.curved),ue=e.computed(()=>`${r.value.style.animation.speedMs}ms`),ce=e.computed(()=>m.value*2),de=e.computed(()=>m.value*4),x=e.ref(null);e.onMounted(()=>{X(),document.getElementById(`relation_circle_${w.value}`).addEventListener("click",H)});function X(){if(s.objectIsEmpty(y.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):y.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=ee.throttle(()=>{const{width:n,height:l}=ee.useResponsive({chart:b.value,title:r.value.style.title.text?A.value:null,source:N.value,noTitle:I.value});requestAnimationFrame(()=>{k.value=Math.min(n,l),a.value.width=n,a.value.height=l,m.value=k.value*r.value.style.circle.radiusProportion,h.value=[],d.value=[],J(),K(),f.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.weightLabels.size,threshold:6,fallback:6}),W.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.plot.radius,threshold:1,fallback:1}),Y.value=s.translateSize({relator:k.value,adjuster:r.value.style.size,source:r.value.style.labels.fontSize,threshold:6,fallback:6})})});x.value=new ResizeObserver(t),x.value.observe(b.value.parentNode)}else h.value=[],d.value=[],J(),K()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${w.value}`).removeEventListener("click",H),x.value&&x.value.disconnect()});function H(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},v.value=[])}function J(){const t=6.28319/P.value.length,n=360/P.value.length;let l=0,o=0;P.value.forEach((c,u)=>{const O=c.weights.reduce((xe,Ce)=>xe+Ce,0),S=m.value*Math.cos(l)+a.value.width/2,be=m.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;h.value.push({x:S,y:be,...c,color:c.color?c.color:G.value[u]?G.value[u]:s.palette[u],regAngle:o,totalWeight:O}),l+=t,o+=n})}function ve(t,n){const l=(t.x+n.x)/2,o=(t.y+n.y)/2;return{x:l,y:o}}function K(){d.value=[],h.value.forEach(t=>{h.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{const c=l.relations.indexOf(t.id);d.value.push({weight:l.weights[c]?l.weights[c]:0,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,midPointLine:ve({x:t.x,y:t.y},{x:l.x,y:l.y}),midPointBezier:fe({x1:t.x,x2:l.x,y1:t.y,y2:l.y}),...t})})})}function fe(t){const n={x:t.x1,y:t.y1},l={x:t.x2,y:t.y2},o={x:t.x1,y:t.y1},c={x:a.value.width/2,y:a.value.height/2+r.value.style.circle.offsetY},u=.5,O=Math.pow(1-u,3)*n.x+3*Math.pow(1-u,2)*u*o.x+3*(1-u)*Math.pow(u,2)*c.x+Math.pow(u,3)*l.x,S=Math.pow(1-u,3)*n.y+3*Math.pow(1-u,2)*u*o.y+3*(1-u)*Math.pow(u,2)*c.y+Math.pow(u,3)*l.y;return{x:O,y:S}}const ye=e.computed(()=>Math.max(...d.value.map(t=>t.weight)));function ge(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function g(t){return t.colorSource}function Q(t){return Object.hasOwn(i.value,"x")?v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function p(t){return Object.hasOwn(i.value,"x")?!!(v.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`):!1}function he(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function me(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ke(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||v.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function pe(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function Z(t){ae.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},v.value=[]):(i.value=t,v.value=[...t.relations])}function L(t){const n=t.weight/ye.value*r.value.style.links.maxWidth;return Math.max(.3,n)}const C=e.ref(!1);function we(t){C.value=t,E.value+=1}const B=e.ref(!1);function z(){B.value=!B.value}return ne({generatePdf:D,generateImage:U,toggleAnnotator:z}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:b,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${w.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref(F)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(F)(!1))},[r.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe._sfc_main,{key:0,svgRef:e.unref(R),backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,active:B.value,onClose:z},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:I,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(Be._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),r.value.userOptions.show&&$.value&&(e.unref(M)||e.unref(_))?(e.openBlock(),e.createBlock(te.UserOptions,{ref:"details",key:`user_options_${E.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(q),isImaging:e.unref(j),uid:w.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:C.value,titles:{...r.value.userOptions.buttonTitles},chartElement:b.value,position:r.value.userOptions.position,hasAnnotator:r.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(D),onGenerateImage:e.unref(U),onToggleAnnotator:z,style:e.normalizeStyle({visibility:e.unref(M)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[t.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:o})=>[e.renderSlot(t.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:o})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"3"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:R,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(_e._sfc_main),t.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:a.value.width<=0?10:a.value.width,height:a.value.height<=0?10:a.value.height,style:{pointerEvents:"none"}},[e.renderSlot(t.$slots,"chart-background",{},void 0,!0)],8,Ae)):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:m.value<=0?1e-4:m.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,Ne),ie.value?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(Q(l)),stroke:g(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,Ve))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",Fe,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointBezier.x,y:l.midPointBezier.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointBezier.x,cy:l.midPointBezier.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,Me)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointBezier.x,y:l.midPointBezier.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Re)):e.createCommentVNode("",!0)]))),256))])):(e.openBlock(),e.createElementBlock("g",Te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:g(l),"stroke-width":L(l),style:e.normalizeStyle(Q(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&v.value.includes(l.id)}),"stroke-linecap":"round"},null,14,qe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("g",je,[p(l)?e.renderSlot(t.$slots,"dataLabel",e.mergeProps({key:0,ref_for:!0},{x:l.midPointLine.x,y:l.midPointLine.y,color:g(l),weight:l.weight,fontSize:f.value}),void 0,!0):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("circle",{key:1,cx:l.midPointLine.x,cy:l.midPointLine.y,fill:g(l),r:f.value,stroke:r.value.style.backgroundColor,"stroke-width":"1"},null,8,De)):e.createCommentVNode("",!0),p(l)&&!t.$slots.dataLabel&&r.value.style.weightLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.midPointLine.x,y:l.midPointLine.y+f.value/3,fill:e.unref(s.adaptColorToBackground)(g(l)),"text-anchor":"middle","font-size":f.value},e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.weight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.weight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l})),9,Ue)):e.createCommentVNode("",!0)]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":he(l),transform:pe(l),x:me(l),y:l.y+5,onClick:c=>Z(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${ke(l)}`),"font-size":Y.value,fill:r.value.style.labels.color},e.toDisplayString(l.label)+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(r.value.style.weightLabels.formatter,l.totalWeight,e.unref(s.dataLabel)({p:r.value.style.weightLabels.prefix,v:l.totalWeight,s:r.value.style.weightLabels.suffix,r:r.value.style.weightLabels.rounding}),{...l}))+") ",13,Ge))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ge(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.useSerieColor?l.color:r.value.style.plot.color,stroke:r.value.style.backgroundColor,"stroke-width":"1",onClick:c=>Z(l),r:W.value},null,12,We))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],10,Ee)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(q)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:N,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],44,Se))}},He=Oe._export_sfc(Xe,[["__scopeId","data-v-1f567c99"]]);exports.default=He;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ve, computed as y, ref as o, watch as We, onMounted as De, onBeforeUnmount as Xe, createElementBlock as a, openBlock as i, unref as r, normalizeStyle as C, createBlock as F, createCommentVNode as v, createSlots as Ye, withCtx as z, renderSlot as h, normalizeProps as B, guardReactiveProps as R, normalizeClass as D, createVNode as qe, createElementVNode as He, Fragment as P, renderList as L, mergeProps as me, toDisplayString as E } from "vue";
|
|
2
|
-
import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-
|
|
2
|
+
import { u as Je, c as Ke, t as Qe, p as ke, a as Ze, b as et, o as tt, e as pe, g as st, X as lt, G as we, i as X, f as Y, F as q } from "./index-BI6O7K58.js";
|
|
3
3
|
import { t as it, u as at } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as nt } from "./Title-
|
|
5
|
-
import { u as rt, U as ut } from "./usePrinter-
|
|
6
|
-
import ot from "./vue-ui-skeleton-
|
|
7
|
-
import { u as xe } from "./useNestedProp-
|
|
8
|
-
import { _ as ct } from "./PackageVersion-
|
|
9
|
-
import { _ as dt } from "./PenAndPaper-
|
|
4
|
+
import { _ as nt } from "./Title-CDYBDpu3.js";
|
|
5
|
+
import { u as rt, U as ut } from "./usePrinter-Jr3eyr8H.js";
|
|
6
|
+
import ot from "./vue-ui-skeleton-Dxm7rqic.js";
|
|
7
|
+
import { u as xe } from "./useNestedProp-Cvz4MkSy.js";
|
|
8
|
+
import { _ as ct } from "./PackageVersion-BdNfnIm2.js";
|
|
9
|
+
import { _ as dt } from "./PenAndPaper-wrVNMaG8.js";
|
|
10
10
|
import { u as vt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as ft } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { useCssVars as Ct, ref as h, reactive as At, computed as k, onUnmounted as _t, createBlock as P, openBlock as r, Teleport as St, createElementBlock as u, createCommentVNode as y, withModifiers as V, normalizeStyle as O, createElementVNode as c, unref as g, renderSlot as x, createVNode as Ze, nextTick as et, onMounted as Mt, onBeforeUnmount as zt, watch as Ve, normalizeClass as ce, createSlots as Ue, withCtx as $, normalizeProps as de, guardReactiveProps as he, Fragment as b, renderList as T, mergeProps as Ge, toDisplayString as J, createTextVNode as je } from "vue";
|
|
2
|
-
import { X as tt, u as Lt, c as Ae, o as Tt, e as _e, g as qe, b as Ot, d as Pt, p as ve, ak as Je, a7 as Et, R as Ke, S as Dt, T as Nt, G as It, i as fe, f as ge, t as Xt, a as Ft, q as Rt, r as Ht, al as Bt } from "./index-
|
|
2
|
+
import { X as tt, u as Lt, c as Ae, o as Tt, e as _e, g as qe, b as Ot, d as Pt, p as ve, ak as Je, a7 as Et, R as Ke, S as Dt, T as Nt, G as It, i as fe, f as ge, t as Xt, a as Ft, q as Rt, r as Ht, al as Bt } from "./index-BI6O7K58.js";
|
|
3
3
|
import { u as Wt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
4
4
|
import { u as Yt } from "./useChartAccessibility-BWojgys7.js";
|
|
5
|
-
import { u as Vt, U as Ut } from "./usePrinter-
|
|
5
|
+
import { u as Vt, U as Ut } from "./usePrinter-Jr3eyr8H.js";
|
|
6
6
|
import { t as Gt, u as jt } from "./useResponsive-Cw4oZ8sQ.js";
|
|
7
|
-
import { u as Qe } from "./useNestedProp-
|
|
8
|
-
import qt from "./vue-ui-accordion-
|
|
9
|
-
import Jt from "./BaseIcon-
|
|
7
|
+
import { u as Qe } from "./useNestedProp-Cvz4MkSy.js";
|
|
8
|
+
import qt from "./vue-ui-accordion-ldF7KsjV.js";
|
|
9
|
+
import Jt from "./BaseIcon-Br5G8Cdk.js";
|
|
10
10
|
import { _ as at } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
import { D as Kt } from "./DataTable-
|
|
12
|
-
import { L as Qt } from "./Legend-
|
|
13
|
-
import { _ as Zt } from "./PenAndPaper-
|
|
14
|
-
import { _ as ea } from "./Shape-
|
|
15
|
-
import ta from "./vue-ui-skeleton-
|
|
16
|
-
import { _ as aa } from "./Title-
|
|
17
|
-
import la from "./vue-ui-xy-
|
|
11
|
+
import { D as Kt } from "./DataTable-Dk-94kK2.js";
|
|
12
|
+
import { L as Qt } from "./Legend-Cx6NYPTA.js";
|
|
13
|
+
import { _ as Zt } from "./PenAndPaper-wrVNMaG8.js";
|
|
14
|
+
import { _ as ea } from "./Shape-vIKj52KP.js";
|
|
15
|
+
import ta from "./vue-ui-skeleton-Dxm7rqic.js";
|
|
16
|
+
import { _ as aa } from "./Title-CDYBDpu3.js";
|
|
17
|
+
import la from "./vue-ui-xy-B1HwPMFi.js";
|
|
18
18
|
const oa = ["xmlns"], sa = { class: "modal-title" }, na = { class: "modal-body" }, ra = {
|
|
19
19
|
__name: "BaseDraggableDialog",
|
|
20
20
|
props: {
|