vue-data-ui 2.10.3-beta.2 → 2.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-D2Pi70sk.cjs → Arrow-ClADeuRV.cjs} +1 -1
- package/dist/{Arrow-Dh_Fpbqg.js → Arrow-CsFRQWgn.js} +1 -1
- package/dist/{BaseIcon-Bal8YWHd.cjs → BaseIcon-BZiTtIp-.cjs} +1 -1
- package/dist/{BaseIcon-DDXu6LPD.js → BaseIcon-DuZmhYGx.js} +1 -1
- package/dist/{ColorPicker-DFdr_v0e.js → ColorPicker-CWTWiV6N.js} +3 -3
- package/dist/{ColorPicker-CJ3V6DBg.cjs → ColorPicker-ajFBO-uj.cjs} +1 -1
- package/dist/{DataTable-BgEOVOhs.cjs → DataTable-D8eve3Rv.cjs} +1 -1
- package/dist/{DataTable-BEgGQ4D3.js → DataTable-D8vcDzp3.js} +2 -2
- package/dist/{Legend-D3fzSDzv.js → Legend-BXkorlVx.js} +2 -2
- package/dist/{Legend-ywuPKha1.cjs → Legend-C-9Va34F.cjs} +1 -1
- package/dist/{PackageVersion-D9Y0IJOt.cjs → PackageVersion-B6hD3Tku.cjs} +1 -1
- package/dist/{PackageVersion-BtYm4WhX.js → PackageVersion-Cwa-KDYy.js} +1 -1
- package/dist/{PenAndPaper-C0mD6paN.js → PenAndPaper-bYremuGq.js} +3 -3
- package/dist/{PenAndPaper-dMpMHvEy.cjs → PenAndPaper-mD8Ft9s0.cjs} +1 -1
- package/dist/{Shape-BlXVxC09.js → Shape-BKl_8fSs.js} +1 -1
- package/dist/{Shape-DF1rpvBr.cjs → Shape-C-MjxBzW.cjs} +1 -1
- package/dist/{Slicer-BaB88GFk.cjs → Slicer-BbnCHEKM.cjs} +1 -1
- package/dist/{Slicer-CaBTnAu_.js → Slicer-D-8HCnPl.js} +2 -2
- package/dist/{Title-9xdQbKmK.js → Title-A3qdvX3g.js} +1 -1
- package/dist/{Title-CduBjJSc.cjs → Title-g0Df2kQZ.cjs} +1 -1
- package/dist/{Tooltip-DAG_w755.js → Tooltip-C3RycjbN.js} +1 -1
- package/dist/{Tooltip-KPaPh0AB.cjs → Tooltip-CzFLZsDA.cjs} +1 -1
- package/dist/{dom-to-png-BHePseM4.js → dom-to-png-BycXzYPI.js} +1 -1
- package/dist/{dom-to-png-9Doy7r6I.cjs → dom-to-png-CDJbBbow.cjs} +1 -1
- package/dist/{img-Di1y0Ikf.js → img-BCG9afle.js} +1 -1
- package/dist/{img-BBbAfJQR.cjs → img-Daf6wWtq.cjs} +1 -1
- package/dist/index-CLiv4lWF.cjs +9 -0
- package/dist/{index-Cq9SFWKh.js → index-DO87eA2V.js} +44 -37
- package/dist/{pdf-CJjcR9vj.cjs → pdf-BO4SP770.cjs} +1 -1
- package/dist/{pdf-DQ1mgiex.js → pdf-CUKGQwXz.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +4 -1
- package/dist/types/vue-data-ui.d.ts +4 -1
- package/dist/{useNestedProp-Dv_NLIAp.cjs → useNestedProp-DWYmdrE5.cjs} +1 -1
- package/dist/{useNestedProp-D3PTIhO4.js → useNestedProp-fOy4tvij.js} +1 -1
- package/dist/{usePrinter-Ca40kS6V.js → usePrinter-BjvSt_Yu.js} +3 -3
- package/dist/{usePrinter-uYxKqDEn.cjs → usePrinter-sfF-cTSO.cjs} +1 -1
- package/dist/{vue-data-ui-JrJq4CRi.cjs → vue-data-ui-BGjhB0IM.cjs} +1 -1
- package/dist/{vue-data-ui-Bjik9H-H.js → vue-data-ui-BnXm4F7y.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +21 -21
- package/dist/{vue-ui-3d-bar-vqgTXxnJ.js → vue-ui-3d-bar-B_iIJS6A.js} +9 -9
- package/dist/{vue-ui-3d-bar-CDnuvl7-.cjs → vue-ui-3d-bar-eQPQ37P9.cjs} +1 -1
- package/dist/{vue-ui-accordion-DqMoC-KV.js → vue-ui-accordion-CMJOxHWq.js} +3 -3
- package/dist/{vue-ui-accordion-CMi53Y4v.cjs → vue-ui-accordion-DQ-y4bL8.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-Asn7VBGh.cjs → vue-ui-age-pyramid-BKcb5h0_.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DOd1r-qj.js → vue-ui-age-pyramid-DSelZbfg.js} +10 -10
- package/dist/{vue-ui-annotator-DgGB9Xkp.js → vue-ui-annotator-Ae8rLlRh.js} +2 -2
- package/dist/{vue-ui-annotator-CQcK254t.cjs → vue-ui-annotator-BnfB4-1v.cjs} +1 -1
- package/dist/{vue-ui-bullet-Bb9jWm8_.js → vue-ui-bullet-CV7t3yQK.js} +8 -8
- package/dist/{vue-ui-bullet-00HOqfX-.cjs → vue-ui-bullet-D3wD3j73.cjs} +1 -1
- package/dist/{vue-ui-candlestick-wHpHbQrl.cjs → vue-ui-candlestick-CP-TFhQo.cjs} +1 -1
- package/dist/{vue-ui-candlestick-D0PW4-P1.js → vue-ui-candlestick-ylYUQUkS.js} +11 -11
- package/dist/{vue-ui-carousel-table-kYZBRDac.cjs → vue-ui-carousel-table-B5FwZhGC.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Dqm7cpU6.js → vue-ui-carousel-table-B8Yes-sQ.js} +4 -4
- package/dist/{vue-ui-chestnut-C225mv_7.js → vue-ui-chestnut-DAskg0cX.js} +8 -8
- package/dist/{vue-ui-chestnut-Bs9m2OhK.cjs → vue-ui-chestnut-De2g4Q2p.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-BYpSP8TK.cjs → vue-ui-circle-pack-BRLoGdmB.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-0zHx3DG_.js → vue-ui-circle-pack-BlKPb01P.js} +9 -9
- package/dist/{vue-ui-cursor-BAe0sXM-.cjs → vue-ui-cursor-3vZlEDs4.cjs} +1 -1
- package/dist/{vue-ui-cursor-DiCXcRu4.js → vue-ui-cursor-Fw7eOKi1.js} +2 -2
- package/dist/{vue-ui-dashboard-CHPhLJJX.cjs → vue-ui-dashboard-B_02OPVe.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CTgsMPIT.js → vue-ui-dashboard-jeg6HmFh.js} +62 -62
- package/dist/{vue-ui-digits-Bp9d897p.js → vue-ui-digits-1inXKiGc.js} +2 -2
- package/dist/{vue-ui-digits-8R3Ru4a1.cjs → vue-ui-digits-D9COqRtQ.cjs} +1 -1
- package/dist/vue-ui-donut-B4HiTFOD.js +1294 -0
- package/dist/{vue-ui-donut-evolution-YHz8IrSU.js → vue-ui-donut-evolution-CwGD6UCG.js} +11 -11
- package/dist/{vue-ui-donut-evolution-vOVT8Cqx.cjs → vue-ui-donut-evolution-t8NE1QRt.cjs} +1 -1
- package/dist/vue-ui-donut-snJ23_B8.cjs +1 -0
- package/dist/{vue-ui-dumbbell-BaWWoQp_.cjs → vue-ui-dumbbell-BItso2iE.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CZ8OUBMa.js → vue-ui-dumbbell-DdFlUsZF.js} +10 -10
- package/dist/{vue-ui-flow-CPkqQVYz.js → vue-ui-flow-CR-74ZdV.js} +9 -9
- package/dist/{vue-ui-flow-CkaBfjze.cjs → vue-ui-flow-DZrVpkqa.cjs} +1 -1
- package/dist/{vue-ui-funnel-DZi6LrXD.js → vue-ui-funnel-C6Q9kDZj.js} +9 -9
- package/dist/{vue-ui-funnel-DJzbSo8T.cjs → vue-ui-funnel-P6dph9rO.cjs} +1 -1
- package/dist/{vue-ui-galaxy-Cf47Bk_F.cjs → vue-ui-galaxy-BzfQwtb7.cjs} +1 -1
- package/dist/{vue-ui-galaxy-C3k2rRb6.js → vue-ui-galaxy-CRvj8ew8.js} +11 -11
- package/dist/{vue-ui-gauge-Mjyb4wHf.cjs → vue-ui-gauge-BOmHo3_2.cjs} +1 -1
- package/dist/{vue-ui-gauge-BnOUtuf2.js → vue-ui-gauge-CrrDIYlt.js} +7 -7
- package/dist/{vue-ui-gizmo-BBLhRulv.js → vue-ui-gizmo-BjKqctlX.js} +3 -3
- package/dist/{vue-ui-gizmo-C0iAMf4L.cjs → vue-ui-gizmo-CdBHJhKH.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C5_iy1I6.cjs → vue-ui-heatmap-CfeV2PVZ.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C5ucCKcZ.js → vue-ui-heatmap-DQZsO55U.js} +10 -10
- package/dist/{vue-ui-history-plot-RiYWJmxF.cjs → vue-ui-history-plot-BwmxWdM2.cjs} +1 -1
- package/dist/{vue-ui-history-plot-xDuhK9RB.js → vue-ui-history-plot-DR6KcO-n.js} +11 -11
- package/dist/{vue-ui-kpi-GVxO3gjv.cjs → vue-ui-kpi-CL1YEty9.cjs} +1 -1
- package/dist/{vue-ui-kpi-C_fH20jQ.js → vue-ui-kpi-DPbpUZ9S.js} +3 -3
- package/dist/{vue-ui-mini-loader-CPtBDnXj.js → vue-ui-mini-loader-DH6ZNRTg.js} +2 -2
- package/dist/{vue-ui-mini-loader-CggXnACM.cjs → vue-ui-mini-loader-sEeyMkrd.cjs} +1 -1
- package/dist/{vue-ui-molecule-BSrG4A0E.cjs → vue-ui-molecule-CRnMyuuZ.cjs} +1 -1
- package/dist/{vue-ui-molecule-CIp-rk8k.js → vue-ui-molecule-DLK2q-Oq.js} +11 -11
- package/dist/{vue-ui-mood-radar-D6gH60DF.js → vue-ui-mood-radar-W5IVToCL.js} +11 -11
- package/dist/{vue-ui-mood-radar-DspivlWW.cjs → vue-ui-mood-radar-lnAFfrjE.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-D6QCg4MP.cjs → vue-ui-nested-donuts-CeuU6oEJ.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CcGcaTsb.js → vue-ui-nested-donuts-DtgPU-KX.js} +11 -11
- package/dist/{vue-ui-onion-CqhUwNIA.js → vue-ui-onion-BeNPgG7G.js} +11 -11
- package/dist/{vue-ui-onion-Dx6zuimZ.cjs → vue-ui-onion-WwdP8EpV.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CtNlO3V9.js → vue-ui-parallel-coordinate-plot-Ck3SJsIG.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DyS5MQKG.cjs → vue-ui-parallel-coordinate-plot-Cv68PCn5.cjs} +1 -1
- package/dist/{vue-ui-quadrant-CzN4-r-5.js → vue-ui-quadrant-CMkw88lO.js} +12 -12
- package/dist/{vue-ui-quadrant-Omh6HelC.cjs → vue-ui-quadrant-DZ6ybcaY.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-Dw7durcc.js → vue-ui-quick-chart-Cl6gJp5T.js} +9 -9
- package/dist/{vue-ui-quick-chart-BjCA0MlK.cjs → vue-ui-quick-chart-DJa7vHnr.cjs} +1 -1
- package/dist/{vue-ui-radar-CacbmFtH.js → vue-ui-radar-D18-CVYt.js} +12 -12
- package/dist/{vue-ui-radar-BrRw8hK5.cjs → vue-ui-radar-DJQ9V5u3.cjs} +1 -1
- package/dist/{vue-ui-rating-CQX3iJ-l.js → vue-ui-rating-4aeU2wx4.js} +2 -2
- package/dist/{vue-ui-rating-dmcWyFJL.cjs → vue-ui-rating-DJ8riM4Y.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-bSpbFWDy.cjs → vue-ui-relation-circle-CNmTYbJn.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-wQOpbtiz.js → vue-ui-relation-circle-D5fbkhA5.js} +7 -7
- package/dist/{vue-ui-ridgeline-CW1ZWqY3.js → vue-ui-ridgeline-DYu8Ye38.js} +12 -12
- package/dist/{vue-ui-ridgeline-B3UC7scn.cjs → vue-ui-ridgeline-DcP5wra6.cjs} +1 -1
- package/dist/{vue-ui-rings-cQmDPKw_.js → vue-ui-rings-BVR1q--q.js} +12 -12
- package/dist/{vue-ui-rings-CcZO3uzz.cjs → vue-ui-rings-CLex25i0.cjs} +1 -1
- package/dist/{vue-ui-scatter-BzscpnA6.js → vue-ui-scatter-1nnDmU8p.js} +12 -12
- package/dist/{vue-ui-scatter-BXL-s1EX.cjs → vue-ui-scatter-CSsBerNk.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dqs4vHnY.cjs → vue-ui-skeleton-3odYNTi5.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CEUPs326.js → vue-ui-skeleton-BTg31tSs.js} +3 -3
- package/dist/{vue-ui-smiley-WaDKRlg_.js → vue-ui-smiley-BIzjWlLm.js} +2 -2
- package/dist/{vue-ui-smiley-Cm0XM44X.cjs → vue-ui-smiley-DAbOc9Sm.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-u1NaH34Q.js → vue-ui-spark-trend-CFYnfyEb.js} +5 -5
- package/dist/{vue-ui-spark-trend-BpPFjrqX.cjs → vue-ui-spark-trend-CRKk0fMc.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DbinWHG4.cjs → vue-ui-sparkbar-CCZDQYle.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-C7hFS6Sx.js → vue-ui-sparkbar-V1FyDpDn.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BBQjJUfu.cjs → vue-ui-sparkgauge-CrirH2LX.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-BS3MWXh7.js → vue-ui-sparkgauge-MgywKNqC.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-CALOiQXU.js → vue-ui-sparkhistogram-CwBviGI7.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DgI4On_t.cjs → vue-ui-sparkhistogram-U__aSGYT.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DSN96c9R.cjs → vue-ui-sparkline-BHiVgcfL.cjs} +1 -1
- package/dist/{vue-ui-sparkline-Sm8GP_gE.js → vue-ui-sparkline-D3v5ydDD.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-C_BjsR_9.js → vue-ui-sparkstackbar--tnnBrOu.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-CP-f0RiJ.cjs → vue-ui-sparkstackbar-BrBQ2Vby.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CsXTzibp.js → vue-ui-stackbar-C-dJRiXT.js} +13 -13
- package/dist/{vue-ui-stackbar-umPic16O.cjs → vue-ui-stackbar-D7htqdCz.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DanwoFZA.js → vue-ui-strip-plot-B-Mc-qGK.js} +11 -11
- package/dist/{vue-ui-strip-plot-EohSje2m.cjs → vue-ui-strip-plot-hNrBW3SU.cjs} +1 -1
- package/dist/{vue-ui-table-BxE_5O0R.cjs → vue-ui-table-ByDKzqNM.cjs} +1 -1
- package/dist/{vue-ui-table-CcxyWlGr.js → vue-ui-table-CQp16PNe.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CYTrU1IM.js → vue-ui-table-heatmap-BNl4iQhq.js} +4 -4
- package/dist/{vue-ui-table-heatmap-BS6gDxAV.cjs → vue-ui-table-heatmap-DaEPU0kc.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CEUN2DKK.cjs → vue-ui-table-sparkline-BgV9zEpQ.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-VQRxKokd.js → vue-ui-table-sparkline-lTHfuO-u.js} +5 -5
- package/dist/{vue-ui-thermometer-BGo9JVPi.js → vue-ui-thermometer-BN6Hyr3r.js} +7 -7
- package/dist/{vue-ui-thermometer-DDEWBlJX.cjs → vue-ui-thermometer-HB6BdSZ7.cjs} +1 -1
- package/dist/{vue-ui-timer-iHHHozQk.cjs → vue-ui-timer-6NZga1VA.cjs} +1 -1
- package/dist/{vue-ui-timer-BOYI9dj1.js → vue-ui-timer-DpIbKhWx.js} +5 -5
- package/dist/{vue-ui-tiremarks-C6AOzn6M.js → vue-ui-tiremarks-BDlFLwmy.js} +7 -7
- package/dist/{vue-ui-tiremarks-4wzRyfkY.cjs → vue-ui-tiremarks-Bssfpj2T.cjs} +1 -1
- package/dist/{vue-ui-treemap-D6tGxfkH.js → vue-ui-treemap-CSEqsnF6.js} +12 -12
- package/dist/{vue-ui-treemap-Dsbtoqmc.cjs → vue-ui-treemap-X9VKUYSw.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DFtT4E0d.cjs → vue-ui-vertical-bar-Bv35bg1C.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CCG0RzzH.js → vue-ui-vertical-bar-SgM2OnqX.js} +12 -12
- package/dist/{vue-ui-waffle-Cm6ldzLl.cjs → vue-ui-waffle-C1L34KiX.cjs} +1 -1
- package/dist/{vue-ui-waffle-Cs2lFmZk.js → vue-ui-waffle-CPwuaVId.js} +12 -12
- package/dist/{vue-ui-wheel-CGA_ObLc.cjs → vue-ui-wheel-D2HqXb2O.cjs} +1 -1
- package/dist/{vue-ui-wheel-DwHygX8h.js → vue-ui-wheel-DbNXTA9I.js} +7 -7
- package/dist/{vue-ui-word-cloud-DruVUuqq.js → vue-ui-word-cloud-B7VTWsl2.js} +21 -21
- package/dist/{vue-ui-word-cloud-B5xsdE9W.cjs → vue-ui-word-cloud-Cmm3wp39.cjs} +1 -1
- package/dist/{vue-ui-world-D-R7ZstC.js → vue-ui-world-51vUWrqr.js} +11 -11
- package/dist/{vue-ui-world-AmEJJ8Ml.cjs → vue-ui-world-Bi32aYtK.cjs} +1 -1
- package/dist/{vue-ui-xy-UDsyRd42.cjs → vue-ui-xy-BxJgh4xL.cjs} +2 -2
- package/dist/{vue-ui-xy-DwvS7yTz.js → vue-ui-xy-D1O0m03x.js} +16 -16
- package/dist/{vue-ui-xy-canvas-DUmkN9El.cjs → vue-ui-xy-canvas-DbS90DFy.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DQ8Ubrlv.js → vue-ui-xy-canvas-DsZxaeOo.js} +12 -12
- package/package.json +1 -1
- package/dist/index-BS69wmdK.cjs +0 -9
- package/dist/vue-ui-donut-C-4-X-rY.js +0 -1261
- package/dist/vue-ui-donut-CrIbNaOx.cjs +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useSlots as at, computed as d, ref as v, watch as Ne, onMounted as ot, onBeforeUnmount as ut, createElementBlock as r, openBlock as s, unref as c, normalizeStyle as H, normalizeClass as Be, createBlock as N, createCommentVNode as p, createElementVNode as x, createVNode as re, createSlots as Ve, withCtx as m, renderSlot as g, normalizeProps as U, guardReactiveProps as G, Fragment as $, renderList as L, mergeProps as Me, toDisplayString as A, createTextVNode as De, nextTick as st } from "vue";
|
|
2
|
-
import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, J as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-
|
|
2
|
+
import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, J as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-DO87eA2V.js";
|
|
3
3
|
import { t as $t, u as _t } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
-
import { _ as It } from "./Title-
|
|
5
|
-
import { u as Tt, U as St } from "./usePrinter-
|
|
6
|
-
import { _ as Ot } from "./Tooltip-
|
|
7
|
-
import { D as Pt } from "./DataTable-
|
|
8
|
-
import { L as Lt } from "./Legend-
|
|
9
|
-
import At from "./vue-ui-skeleton-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Re } from "./useNestedProp-
|
|
12
|
-
import { _ as zt } from "./PackageVersion-
|
|
13
|
-
import { _ as Nt } from "./PenAndPaper-
|
|
4
|
+
import { _ as It } from "./Title-A3qdvX3g.js";
|
|
5
|
+
import { u as Tt, U as St } from "./usePrinter-BjvSt_Yu.js";
|
|
6
|
+
import { _ as Ot } from "./Tooltip-C3RycjbN.js";
|
|
7
|
+
import { D as Pt } from "./DataTable-D8vcDzp3.js";
|
|
8
|
+
import { L as Lt } from "./Legend-BXkorlVx.js";
|
|
9
|
+
import At from "./vue-ui-skeleton-BTg31tSs.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-CMJOxHWq.js";
|
|
11
|
+
import { u as Re } from "./useNestedProp-fOy4tvij.js";
|
|
12
|
+
import { _ as zt } from "./PackageVersion-Cwa-KDYy.js";
|
|
13
|
+
import { _ as Nt } from "./PenAndPaper-bYremuGq.js";
|
|
14
14
|
import { u as Bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Vt } from "./Shape-
|
|
15
|
+
import { _ as Vt } from "./Shape-BKl_8fSs.js";
|
|
16
16
|
import { u as Mt } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"], Et = ["stop-color"], Wt = ["id"], qt = ["x", "y", "height", "width"], Ht = ["height", "width"], Xt = { key: 0 }, Yt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Jt = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Kt = { key: 1 }, Qt = ["rx", "x", "y", "height", "width", "fill", "filter"], Zt = ["x", "y", "height", "width", "filter"], el = { key: 0 }, tl = { key: 1 }, ll = { key: 2 }, al = { key: 3 }, ol = ["onMouseover", "x", "y", "height", "width"], ul = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BS69wmdK.cjs"),Q=require("./Title-CduBjJSc.cjs"),R=require("./usePrinter-uYxKqDEn.cjs"),V=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./vue-ui-skeleton-Dqs4vHnY.cjs"),U=require("./useNestedProp-Dv_NLIAp.cjs"),ee=require("./PackageVersion-D9Y0IJOt.cjs"),te=require("./PenAndPaper-dMpMHvEy.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),_=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:O,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=oe.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),_.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:o}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,o)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const o=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+o,l):s.value>l&&(s.value=Math.max(s.value-o,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const o=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(n.value.size/v.value*a),{x:J,y:K}=E(n.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(o,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):o})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[0]||(a[0]=()=>e.unref(O)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te._sfc_main,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${_.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(o,u)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:o.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=ne._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-CLiv4lWF.cjs"),Q=require("./Title-g0Df2kQZ.cjs"),R=require("./usePrinter-sfF-cTSO.cjs"),V=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./vue-ui-skeleton-3odYNTi5.cjs"),U=require("./useNestedProp-DWYmdrE5.cjs"),ee=require("./PackageVersion-B6hD3Tku.cjs"),te=require("./PenAndPaper-mD8Ft9s0.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),oe=require("./useChartAccessibility-Cm7nkzTG.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),_=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:O,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=oe.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),_.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),n=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:o}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,o)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const o=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+o,l):s.value>l&&(s.value=Math.max(s.value-o,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const o=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(n.value.size/v.value*a),{x:J,y:K}=E(n.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(o,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):o})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[0]||(a[0]=()=>e.unref(O)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(O)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te._sfc_main,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,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:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${_.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.value,(o,u)=>(e.openBlock(),e.createElementBlock("line",{x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2,stroke:o.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(o,u)=>(e.openBlock(),e.createElementBlock("path",{d:o.arcSlice,fill:o.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=ne._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed as f, ref as c, watch as J, onMounted as he, onBeforeUnmount as de, createElementBlock as v, openBlock as n, unref as s, normalizeStyle as S, createBlock as _, createCommentVNode as h, createSlots as ye, withCtx as g, renderSlot as y, normalizeProps as $, guardReactiveProps as O, normalizeClass as z, createVNode as fe, Fragment as K, renderList as Q, toDisplayString as pe } from "vue";
|
|
2
|
-
import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-
|
|
3
|
-
import { _ as Ie } from "./Title-
|
|
4
|
-
import { u as xe, U as Ae } from "./usePrinter-
|
|
2
|
+
import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-DO87eA2V.js";
|
|
3
|
+
import { _ as Ie } from "./Title-A3qdvX3g.js";
|
|
4
|
+
import { u as xe, U as Ae } from "./usePrinter-BjvSt_Yu.js";
|
|
5
5
|
import { t as Fe, u as Pe } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
-
import Se from "./vue-ui-skeleton-
|
|
7
|
-
import { u as te } from "./useNestedProp-
|
|
8
|
-
import { _ as ze } from "./PackageVersion-
|
|
9
|
-
import { _ as Me } from "./PenAndPaper-
|
|
6
|
+
import Se from "./vue-ui-skeleton-BTg31tSs.js";
|
|
7
|
+
import { u as te } from "./useNestedProp-fOy4tvij.js";
|
|
8
|
+
import { _ as ze } from "./PackageVersion-Cwa-KDYy.js";
|
|
9
|
+
import { _ as Me } from "./PenAndPaper-bYremuGq.js";
|
|
10
10
|
import { u as Te } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as Ne } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCssVars as Oe, computed as oe, ref as f, watch as me, onMounted as Ne, onBeforeUnmount as Ae, createElementBlock as X, openBlock as w, unref as h, normalizeStyle as re, createBlock as ae, createCommentVNode as B, createVNode as fe, createSlots as Ie, withCtx as P, renderSlot as F, normalizeProps as J, guardReactiveProps as K, normalizeClass as we, createElementVNode as pe, Fragment as Xe, renderList as Re, toDisplayString as Ce, createTextVNode as We, nextTick as ke } from "vue";
|
|
2
|
-
import { u as Ve, c as xe,
|
|
3
|
-
import { _ as Je } from "./Title-
|
|
4
|
-
import { u as Ke, U as Qe } from "./usePrinter-
|
|
2
|
+
import { u as Ve, c as xe, aj as Be, v as Ye, t as De, p as ue, a as Ue, o as Ee, e as $e, g as Ge, f as Le, X as je, q as He, r as qe, x as Ze } from "./index-DO87eA2V.js";
|
|
3
|
+
import { _ as Je } from "./Title-A3qdvX3g.js";
|
|
4
|
+
import { u as Ke, U as Qe } from "./usePrinter-BjvSt_Yu.js";
|
|
5
5
|
import { t as et, u as tt, d as ot } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
-
import at from "./vue-ui-accordion-
|
|
7
|
-
import { D as lt } from "./DataTable-
|
|
8
|
-
import { u as Te } from "./useNestedProp-
|
|
9
|
-
import { _ as nt } from "./PackageVersion-
|
|
10
|
-
import { _ as st } from "./Tooltip-
|
|
11
|
-
import { _ as it } from "./PenAndPaper-
|
|
6
|
+
import at from "./vue-ui-accordion-CMJOxHWq.js";
|
|
7
|
+
import { D as lt } from "./DataTable-D8vcDzp3.js";
|
|
8
|
+
import { u as Te } from "./useNestedProp-fOy4tvij.js";
|
|
9
|
+
import { _ as nt } from "./PackageVersion-Cwa-KDYy.js";
|
|
10
|
+
import { _ as st } from "./Tooltip-C3RycjbN.js";
|
|
11
|
+
import { _ as it } from "./PenAndPaper-bYremuGq.js";
|
|
12
12
|
import { u as rt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
13
|
import { u as ut } from "./useChartAccessibility-BWojgys7.js";
|
|
14
14
|
import { u as ct } from "./usePanZoom-CUkkqW81.js";
|
|
15
|
-
import dt from "./BaseIcon-
|
|
15
|
+
import dt from "./BaseIcon-DuZmhYGx.js";
|
|
16
16
|
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
function ht(b, p) {
|
|
18
18
|
const { width: c, height: n } = b, d = p.getImageData(0, 0, c, n).data;
|
|
@@ -249,17 +249,17 @@ const pt = ["id"], gt = ["xmlns", "viewBox"], yt = ["width", "height"], bt = ["t
|
|
|
249
249
|
const U = f([]);
|
|
250
250
|
me(() => n.dataset, L, { immediate: !0 });
|
|
251
251
|
function L() {
|
|
252
|
-
const t = [...z.value].map((C) => C.value), i = Math.max(...t), o = Math.min(...t), S = [...z.value].map((C,
|
|
253
|
-
let
|
|
254
|
-
|
|
255
|
-
const be = D(C.name,
|
|
252
|
+
const t = [...z.value].map((C) => C.value), i = Math.max(...t), o = Math.min(...t), S = [...z.value].map((C, j) => {
|
|
253
|
+
let H = (C.value - o) / (i - o) * (u.value.maxFontSize - u.value.minFontSize) + u.value.minFontSize;
|
|
254
|
+
H = isNaN(H) ? u.value.minFontSize : H;
|
|
255
|
+
const be = D(C.name, H);
|
|
256
256
|
return {
|
|
257
257
|
...C,
|
|
258
258
|
id: xe(),
|
|
259
|
-
fontSize:
|
|
259
|
+
fontSize: H,
|
|
260
260
|
width: be.width,
|
|
261
261
|
height: be.height,
|
|
262
|
-
color: e.value.style.chart.words.usePalette ? e.value.customPalette[
|
|
262
|
+
color: e.value.style.chart.words.usePalette ? e.value.customPalette[j] || e.value.customPalette[j % e.value.customPalette.length] || ue[j] || ue[j % ue.length] : e.value.style.chart.words.color
|
|
263
263
|
};
|
|
264
264
|
});
|
|
265
265
|
U.value = ft({
|
|
@@ -280,7 +280,7 @@ const pt = ["id"], gt = ["xmlns", "viewBox"], yt = ["width", "height"], bt = ["t
|
|
|
280
280
|
ke(() => {
|
|
281
281
|
const t = G.value.head.map((S, C) => [[
|
|
282
282
|
S.name
|
|
283
|
-
], [G.value.body[C]]]), i = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), o =
|
|
283
|
+
], [G.value.body[C]]]), i = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), o = He(i);
|
|
284
284
|
qe({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
285
285
|
});
|
|
286
286
|
}
|
|
@@ -288,14 +288,14 @@ const pt = ["id"], gt = ["xmlns", "viewBox"], yt = ["width", "height"], bt = ["t
|
|
|
288
288
|
const t = [
|
|
289
289
|
e.value.table.columnNames.series,
|
|
290
290
|
e.value.table.columnNames.value
|
|
291
|
-
], i = G.value.head.map((C,
|
|
292
|
-
const
|
|
291
|
+
], i = G.value.head.map((C, j) => {
|
|
292
|
+
const H = Le({ p: e.value.table.td.prefix, v: G.value.body[j], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
293
293
|
return [
|
|
294
294
|
{
|
|
295
295
|
color: C.color,
|
|
296
296
|
name: C.name
|
|
297
297
|
},
|
|
298
|
-
|
|
298
|
+
H
|
|
299
299
|
];
|
|
300
300
|
}), o = {
|
|
301
301
|
th: {
|
|
@@ -494,7 +494,7 @@ const pt = ["id"], gt = ["xmlns", "viewBox"], yt = ["width", "height"], bt = ["t
|
|
|
494
494
|
ref_key: "svgRef",
|
|
495
495
|
ref: Q,
|
|
496
496
|
class: we({ "vue-data-ui-fullscreen--on": V.value, "vue-data-ui-fulscreen--off": !V.value }),
|
|
497
|
-
xmlns: h(
|
|
497
|
+
xmlns: h(je),
|
|
498
498
|
viewBox: `${h(ie).x} ${h(ie).y} ${h(ie).width} ${h(ie).height}`,
|
|
499
499
|
style: "overflow:hidden;background:transparent;"
|
|
500
500
|
}, [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-BS69wmdK.cjs"),me=require("./Title-CduBjJSc.cjs"),se=require("./usePrinter-uYxKqDEn.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),pe=require("./vue-ui-accordion-CMi53Y4v.cjs"),ge=require("./DataTable-BgEOVOhs.cjs"),ie=require("./useNestedProp-Dv_NLIAp.cjs"),ye=require("./PackageVersion-D9Y0IJOt.cjs"),be=require("./Tooltip-KPaPh0AB.cjs"),ke=require("./PenAndPaper-dMpMHvEy.cjs"),we=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-Bal8YWHd.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Te(b,p){const{width:d,height:r}=b,v=p.getImageData(0,0,d,r).data;let n=d,l=r,s=0,g=0,w=!1;for(let f=0;f<r;f+=1)for(let y=0;y<d;y+=1)v[(f*d+y)*4+3]>1&&(w=!0,y<n&&(n=y),y>s&&(s=y),f<l&&(l=f),f>g&&(g=f));return w?[n,l,s,g]:[0,0,0,0]}function ue({word:b,fontSize:p,pad:d,canvas:r,ctx:u,svg:v}){u.save(),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`;const n=u.measureText(b.name),l=Math.ceil(n.width)+2+(d?d*2:0),s=Math.ceil(p)+2+(d?d*2:0);r.width=l,r.height=s,u.clearRect(0,0,l,s),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`,u.textAlign="center",u.textBaseline="middle",u.fillStyle="black",u.fillText(b.name,l/2,s/2);const w=u.getImageData(0,0,l,s).data,f=[];for(let B=0;B<s;B+=1)for(let I=0;I<l;I+=1)w[(B*l+I)*4+3]>1&&f.push([I,B]);const[y,t,P,O]=Te(r,u);return u.restore(),{w:l,h:s,wordMask:f,minX:y,minY:t,maxX:P,maxY:O}}function ce({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];if(l<0||s<0||l>=p||s>=d||b[s*p+l])return!1}return!0}function de({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];l>=0&&s>=0&&l<p&&s<d&&(b[s*p+l]=1)}}function Pe({wordMask:b,w:p,h:d,dilation:r}){const u=new Set(b.map(([n,l])=>`${n},${l}`)),v=new Set(u);for(let[n,l]of b)for(let s=-r;s<=r;s+=1)for(let g=-r;g<=r;g+=1){if(s===0&&g===0)continue;const w=n+s,f=l+g;w>=0&&w<p&&f>=0&&f<d&&v.add(`${w},${f}`)}return Array.from(v).map(n=>n.split(",").map(Number))}function Be({words:b,proximity:p=0,svg:d,strictPixelPadding:r}){const{width:u,height:v}=d,n=Math.round(u),l=Math.round(v),s=1,g=d.minFontSize,w=Math.min(d.maxFontSize,100),f=b.map(C=>C.value),y=Math.min(...f),t=Math.max(...f),P=new Uint8Array(n*l),O=document.createElement("canvas"),B=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=l;const I=6,j=2,G=2,Z=1,c=Math.floor(n/2),J=Math.floor(l/2),Q=[...b].sort((C,N)=>N.value-C.value),R=[];for(const C of Q){let N=g;t!==y&&(N=(C.value-y)/(t-y)*(w-g)+g),N=Math.max(g,Math.min(w,N));let V=!1,z=N;for(;!V&&z>=s;){let{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});r&&(_=Pe({wordMask:_,w:M,h,dilation:1}));let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<1e4;){for(let F=0;F<360;F+=I){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=j}V||(z-=1)}if(!V&&z<s){z=s;const{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<25e3;){for(let F=0;F<360;F+=G){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=Z}}}return R.sort((C,N)=>N.fontSize-C.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Me=["width","height"],Fe=["transform"],Oe=["x","y","width","height","onMouseover"],Ve=["fill","font-weight","x","y","font-size","transform"],Ae={key:4,class:"vue-data-ui-watermark"},Ie={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},_e=["innerHTML"],Ee={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"7200478e":o.slicerColor}));const{vue_ui_word_cloud:d}=m.useConfig(),r=b,u=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),v=e.ref(m.createUid()),n=e.ref(0),l=e.ref(null),s=e.ref(null),g=e.ref(null),w=e.ref(0),f=e.ref(0),y=e.ref(!1),t=e.computed({get:()=>Z(),set:o=>o}),P=e.ref(O());function O(){return typeof r.dataset=="string"?m.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map((o,i)=>({...o,value:m.checkNaN(o.value)}))}e.watch(()=>r.dataset,()=>{P.value=O(),W()});const{userOptionsVisible:B,setUserOptionsVisibility:I,keepUserOptionState:j}=we.useUserOptionState({config:t.value}),{svgRef:G}=Ce.useChartAccessibility({config:t.value.style.chart.title});function Z(){const o=ie.useNestedProp({userConfig:r.config,defaultConfig:d});return o.theme?{...ie.useNestedProp({userConfig:m.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:m.themePalettes[o.theme]||m.palette}:o}e.watch(()=>r.config,o=>{t.value=Z(),B.value=!t.value.userOptions.showOnChartHover,C(),w.value+=1,f.value+=1,h.value.showTable=t.value.table.show,h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const c=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),J=ae.debounce(()=>{W()},10),Q=ae.throttle(()=>{const{width:o,height:i}=ae.useResponsive({chart:l.value,title:t.value.style.chart.title.text?s.value:null,source:g.value});requestAnimationFrame(()=>{c.value.width=o,c.value.height=i,e.nextTick(J)})}),R=e.ref(null);e.onMounted(C);function C(){m.objectIsEmpty(r.dataset)?m.error({componentName:"VueUiWordCloud",type:"dataset"}):P.value.forEach((o,i)=>{m.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(a=>{u.value=!1,m.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:a,index:i})})}),t.value.responsive&&(R.value=new ResizeObserver(Q),R.value.observe(l.value.parentNode))}e.onBeforeUnmount(()=>{R.value&&R.value.disconnect()});const{isPrinting:N,isImaging:V,generatePdf:z,generateImage:M}=se.usePrinter({elementId:`wordCloud_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),h=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function _(o,i,a="Arial"){const k=document.createElement("canvas").getContext("2d");return k.font=`${i}px ${t.value.style.chart.words.bold?"bold":"normal"} ${a}`,{width:k.measureText(o).width+t.value.style.chart.words.proximity,height:i}}const E=e.ref([]);e.watch(()=>r.dataset,W,{immediate:!0});function W(){const o=[...P.value].map(k=>k.value),i=Math.max(...o),a=Math.min(...o),S=[...P.value].map((k,X)=>{let U=(k.value-a)/(i-a)*(c.value.maxFontSize-c.value.minFontSize)+c.value.minFontSize;U=isNaN(U)?c.value.minFontSize:U;const re=_(k.name,U);return{...k,id:m.createUid(),fontSize:U,width:re.width,height:re.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[X]||t.value.customPalette[X%t.value.customPalette.length]||m.palette[X]||m.palette[X%m.palette.length]:t.value.style.chart.words.color}});E.value=Be({words:S,svg:c.value,proximity:t.value.style.chart.words.proximity,strictPixelPadding:t.value.strictPixelPadding})}const q=e.computed(()=>{const o=E.value.map(a=>({name:a.name,color:a.color})),i=E.value.map(a=>a.value);return{head:o,body:i}});function D(){e.nextTick(()=>{const o=q.value.head.map((S,k)=>[[S.name],[q.value.body[k]]]),i=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),a=m.createCsvContent(i);m.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const x=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],i=q.value.head.map((k,X)=>{const U=m.dataLabel({p:t.value.table.td.prefix,v:q.value.body[X],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:k.color,name:k.name},U]}),a={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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:i,config:a}}),A=e.ref(!1);function F(o){A.value=o,n.value+=1}function T(){return E.value}function $(){h.value.showTable=!h.value.showTable}function le(){h.value.showTooltip=!h.value.showTooltip}const H=e.ref(!1);function ee(){H.value=!H.value}const ve=e.computed(()=>!H.value&&t.value.style.chart.zoom.show),{viewBox:K,resetZoom:ne,isZoom:he}=xe.usePanZoom(G,{x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height},1,ve);p({getData:T,generateCsv:D,generatePdf:z,generateImage:M,toggleTable:$,toggleTooltip:le,toggleAnnotator:ee});const Y=e.ref(null),L=e.ref(!1),te=e.ref(""),oe=e.ref(null);function fe(o){if(!h.value.showTooltip)return;Y.value=o.id,oe.value={datapoint:o,config:t.value};const i=t.value.style.chart.tooltip.customFormat;if(L.value=!1,m.isFunction(i))try{const a=i({datapoint:o,config:t.value});typeof a=="string"&&(te.value=a,L.value=!0)}catch{console.warn("Custom format cannot be applied."),L.value=!1}if(!L.value){let a=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;te.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${a}</div>`}y.value=!0}return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:l,id:`wordCloud_${v.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[3]||(i[3]=()=>e.unref(I)(!0)),onMouseleave:i[4]||(i[4]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke._sfc_main,{key:0,svgRef:e.unref(G),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:ee},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:s,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${w.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&u.value&&(e.unref(j)||e.unref(B))?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_option_${n.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(V),uid:v.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:l.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:h.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:F,onGeneratePdf:e.unref(z),onGenerateCsv:D,onGenerateImage:e.unref(M),onToggleTable:$,onToggleTooltip:le,onToggleAnnotator:ee,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:S})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:S})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:S})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:S})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:S})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:S})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:G,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(m.XMLNS),viewBox:`${e.unref(K).x} ${e.unref(K).y} ${e.unref(K).width} ${e.unref(K).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(c.value.width<=0?10:c.value.width)/2}, ${(c.value.height<=0?10:c.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(a,S)=>(e.openBlock(),e.createElementBlock("g",null,[a.minX!==void 0?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x+a.minX,y:a.y+a.minY*1.25,width:a.maxX-a.minX,height:a.maxY-a.minY,fill:"transparent","pointer-events":"visiblePainted",onMouseover:k=>fe(a),onMouseleave:i[0]||(i[0]=k=>{Y.value=null,y.value=!1})},null,40,Oe)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("text",{fill:a.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:S,x:a.x,y:a.y,"font-size":a.fontSize,transform:`translate(${a.width/2}, ${a.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":Y.value&&Y.value===a.id&&h.value.showTooltip,"word-not-selected":Y.value&&Y.value!==a.id&&h.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",style:e.normalizeStyle(`animation-delay:${S*t.value.animationDelayMs}ms !important; pointer-events:none;`)},e.toDisplayString(a.name),15,Ve))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:c.value.height,width:c.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(ne)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:i[1]||(i[1]=a=>e.unref(ne)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:h.value.showTooltip&&y.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,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,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.value,content:te.value,isCustom:L.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:g,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(pe.default,{key:7,hideDetails:"",config:{open:h.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(ge.DataTable,{key:`table_${f.value}`,colNames:x.value.colNames,head:x.value.head,body:x.value.body,config:x.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:i[2]||(i[2]=a=>h.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,_e)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},Re=Se._export_sfc(Ee,[["__scopeId","data-v-cda211d1"]]);exports.default=Re;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("./index-CLiv4lWF.cjs"),me=require("./Title-g0Df2kQZ.cjs"),se=require("./usePrinter-sfF-cTSO.cjs"),ae=require("./useResponsive-DQmBAoBf.cjs"),pe=require("./vue-ui-accordion-DQ-y4bL8.cjs"),ge=require("./DataTable-D8eve3Rv.cjs"),ie=require("./useNestedProp-DWYmdrE5.cjs"),ye=require("./PackageVersion-B6hD3Tku.cjs"),be=require("./Tooltip-CzFLZsDA.cjs"),ke=require("./PenAndPaper-mD8Ft9s0.cjs"),we=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-BZiTtIp-.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Te(b,p){const{width:d,height:r}=b,v=p.getImageData(0,0,d,r).data;let n=d,l=r,s=0,g=0,w=!1;for(let f=0;f<r;f+=1)for(let y=0;y<d;y+=1)v[(f*d+y)*4+3]>1&&(w=!0,y<n&&(n=y),y>s&&(s=y),f<l&&(l=f),f>g&&(g=f));return w?[n,l,s,g]:[0,0,0,0]}function ue({word:b,fontSize:p,pad:d,canvas:r,ctx:u,svg:v}){u.save(),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`;const n=u.measureText(b.name),l=Math.ceil(n.width)+2+(d?d*2:0),s=Math.ceil(p)+2+(d?d*2:0);r.width=l,r.height=s,u.clearRect(0,0,l,s),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`,u.textAlign="center",u.textBaseline="middle",u.fillStyle="black",u.fillText(b.name,l/2,s/2);const w=u.getImageData(0,0,l,s).data,f=[];for(let B=0;B<s;B+=1)for(let I=0;I<l;I+=1)w[(B*l+I)*4+3]>1&&f.push([I,B]);const[y,t,P,O]=Te(r,u);return u.restore(),{w:l,h:s,wordMask:f,minX:y,minY:t,maxX:P,maxY:O}}function ce({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];if(l<0||s<0||l>=p||s>=d||b[s*p+l])return!1}return!0}function de({mask:b,maskW:p,maskH:d,wx:r,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const l=r+v[n][0],s=u+v[n][1];l>=0&&s>=0&&l<p&&s<d&&(b[s*p+l]=1)}}function Pe({wordMask:b,w:p,h:d,dilation:r}){const u=new Set(b.map(([n,l])=>`${n},${l}`)),v=new Set(u);for(let[n,l]of b)for(let s=-r;s<=r;s+=1)for(let g=-r;g<=r;g+=1){if(s===0&&g===0)continue;const w=n+s,f=l+g;w>=0&&w<p&&f>=0&&f<d&&v.add(`${w},${f}`)}return Array.from(v).map(n=>n.split(",").map(Number))}function Be({words:b,proximity:p=0,svg:d,strictPixelPadding:r}){const{width:u,height:v}=d,n=Math.round(u),l=Math.round(v),s=1,g=d.minFontSize,w=Math.min(d.maxFontSize,100),f=b.map(C=>C.value),y=Math.min(...f),t=Math.max(...f),P=new Uint8Array(n*l),O=document.createElement("canvas"),B=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=l;const I=6,j=2,G=2,Z=1,c=Math.floor(n/2),J=Math.floor(l/2),Q=[...b].sort((C,N)=>N.value-C.value),R=[];for(const C of Q){let N=g;t!==y&&(N=(C.value-y)/(t-y)*(w-g)+g),N=Math.max(g,Math.min(w,N));let V=!1,z=N;for(;!V&&z>=s;){let{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});r&&(_=Pe({wordMask:_,w:M,h,dilation:1}));let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<1e4;){for(let F=0;F<360;F+=I){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=j}V||(z-=1)}if(!V&&z<s){z=s;const{w:M,h,wordMask:_,minX:E,minY:W,maxX:q,maxY:D}=ue({word:C,fontSize:z,pad:p,canvas:O,ctx:B,svg:d});let x=0,A=0;for(;x<Math.max(n,l)&&!V&&A<25e3;){for(let F=0;F<360;F+=G){A+=1;const T=Math.round(c+x*Math.cos(F*Math.PI/180)-M/2),$=Math.round(J+x*Math.sin(F*Math.PI/180)-h/2);if(!(T<0||$<0||T+M>n||$+h>l)&&ce({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_})){R.push({...C,x:T-n/2,y:$-l/2,fontSize:z,width:M,height:h,angle:0,minX:E,minY:W,maxX:q,maxY:D}),de({mask:P,maskW:n,maskH:l,wx:T,wy:$,wordMask:_}),V=!0;break}}x+=Z}}}return R.sort((C,N)=>N.fontSize-C.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Me=["width","height"],Fe=["transform"],Oe=["x","y","width","height","onMouseover"],Ve=["fill","font-weight","x","y","font-size","transform"],Ae={key:4,class:"vue-data-ui-watermark"},Ie={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},_e=["innerHTML"],Ee={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"7200478e":o.slicerColor}));const{vue_ui_word_cloud:d}=m.useConfig(),r=b,u=e.computed({get(){return!!r.dataset&&r.dataset.length},set(o){return o}}),v=e.ref(m.createUid()),n=e.ref(0),l=e.ref(null),s=e.ref(null),g=e.ref(null),w=e.ref(0),f=e.ref(0),y=e.ref(!1),t=e.computed({get:()=>Z(),set:o=>o}),P=e.ref(O());function O(){return typeof r.dataset=="string"?m.createWordCloudDatasetFromPlainText(r.dataset):r.dataset.map((o,i)=>({...o,value:m.checkNaN(o.value)}))}e.watch(()=>r.dataset,()=>{P.value=O(),W()});const{userOptionsVisible:B,setUserOptionsVisibility:I,keepUserOptionState:j}=we.useUserOptionState({config:t.value}),{svgRef:G}=Ce.useChartAccessibility({config:t.value.style.chart.title});function Z(){const o=ie.useNestedProp({userConfig:r.config,defaultConfig:d});return o.theme?{...ie.useNestedProp({userConfig:m.themes.vue_ui_word_cloud[o.theme]||r.config,defaultConfig:o}),customPalette:m.themePalettes[o.theme]||m.palette}:o}e.watch(()=>r.config,o=>{t.value=Z(),B.value=!t.value.userOptions.showOnChartHover,C(),w.value+=1,f.value+=1,h.value.showTable=t.value.table.show,h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const c=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),J=ae.debounce(()=>{W()},10),Q=ae.throttle(()=>{const{width:o,height:i}=ae.useResponsive({chart:l.value,title:t.value.style.chart.title.text?s.value:null,source:g.value});requestAnimationFrame(()=>{c.value.width=o,c.value.height=i,e.nextTick(J)})}),R=e.ref(null);e.onMounted(C);function C(){m.objectIsEmpty(r.dataset)?m.error({componentName:"VueUiWordCloud",type:"dataset"}):P.value.forEach((o,i)=>{m.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(a=>{u.value=!1,m.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:a,index:i})})}),t.value.responsive&&(R.value=new ResizeObserver(Q),R.value.observe(l.value.parentNode))}e.onBeforeUnmount(()=>{R.value&&R.value.disconnect()});const{isPrinting:N,isImaging:V,generatePdf:z,generateImage:M}=se.usePrinter({elementId:`wordCloud_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),h=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function _(o,i,a="Arial"){const k=document.createElement("canvas").getContext("2d");return k.font=`${i}px ${t.value.style.chart.words.bold?"bold":"normal"} ${a}`,{width:k.measureText(o).width+t.value.style.chart.words.proximity,height:i}}const E=e.ref([]);e.watch(()=>r.dataset,W,{immediate:!0});function W(){const o=[...P.value].map(k=>k.value),i=Math.max(...o),a=Math.min(...o),S=[...P.value].map((k,X)=>{let U=(k.value-a)/(i-a)*(c.value.maxFontSize-c.value.minFontSize)+c.value.minFontSize;U=isNaN(U)?c.value.minFontSize:U;const re=_(k.name,U);return{...k,id:m.createUid(),fontSize:U,width:re.width,height:re.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[X]||t.value.customPalette[X%t.value.customPalette.length]||m.palette[X]||m.palette[X%m.palette.length]:t.value.style.chart.words.color}});E.value=Be({words:S,svg:c.value,proximity:t.value.style.chart.words.proximity,strictPixelPadding:t.value.strictPixelPadding})}const q=e.computed(()=>{const o=E.value.map(a=>({name:a.name,color:a.color})),i=E.value.map(a=>a.value);return{head:o,body:i}});function D(){e.nextTick(()=>{const o=q.value.head.map((S,k)=>[[S.name],[q.value.body[k]]]),i=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),a=m.createCsvContent(i);m.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const x=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],i=q.value.head.map((k,X)=>{const U=m.dataLabel({p:t.value.table.td.prefix,v:q.value.body[X],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:k.color,name:k.name},U]}),a={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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:i,config:a}}),A=e.ref(!1);function F(o){A.value=o,n.value+=1}function T(){return E.value}function $(){h.value.showTable=!h.value.showTable}function le(){h.value.showTooltip=!h.value.showTooltip}const H=e.ref(!1);function ee(){H.value=!H.value}const ve=e.computed(()=>!H.value&&t.value.style.chart.zoom.show),{viewBox:K,resetZoom:ne,isZoom:he}=xe.usePanZoom(G,{x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height},1,ve);p({getData:T,generateCsv:D,generatePdf:z,generateImage:M,toggleTable:$,toggleTooltip:le,toggleAnnotator:ee});const Y=e.ref(null),L=e.ref(!1),te=e.ref(""),oe=e.ref(null);function fe(o){if(!h.value.showTooltip)return;Y.value=o.id,oe.value={datapoint:o,config:t.value};const i=t.value.style.chart.tooltip.customFormat;if(L.value=!1,m.isFunction(i))try{const a=i({datapoint:o,config:t.value});typeof a=="string"&&(te.value=a,L.value=!0)}catch{console.warn("Custom format cannot be applied."),L.value=!1}if(!L.value){let a=`<svg viewBox="0 0 10 10" height="${t.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${o.color}"/></svg><span>${o.name}:</span><b>${(o.value||0).toFixed(t.value.style.chart.tooltip.roundingValue)}</b>`;te.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${a}</div>`}y.value=!0}return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:l,id:`wordCloud_${v.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[3]||(i[3]=()=>e.unref(I)(!0)),onMouseleave:i[4]||(i[4]=()=>e.unref(I)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ke._sfc_main,{key:0,svgRef:e.unref(G),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:ee},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:s,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(me._sfc_main,{key:`title_${w.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&u.value&&(e.unref(j)||e.unref(B))?(e.openBlock(),e.createBlock(se.UserOptions,{ref:"details",key:`user_option_${n.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(V),uid:v.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:A.value,titles:{...t.value.userOptions.buttonTitles},chartElement:l.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:h.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:F,onGeneratePdf:e.unref(z),onGenerateCsv:D,onGenerateImage:e.unref(M),onToggleTable:$,onToggleTooltip:le,onToggleAnnotator:ee,style:e.normalizeStyle({visibility:e.unref(j)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:S})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:S})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:S})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:S})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:S})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:S})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:G,class:e.normalizeClass({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value}),xmlns:e.unref(m.XMLNS),viewBox:`${e.unref(K).x} ${e.unref(K).y} ${e.unref(K).width} ${e.unref(K).height}`,style:"overflow:hidden;background:transparent;"},[e.createVNode(ye._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Me)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(c.value.width<=0?10:c.value.width)/2}, ${(c.value.height<=0?10:c.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(a,S)=>(e.openBlock(),e.createElementBlock("g",null,[a.minX!==void 0?(e.openBlock(),e.createElementBlock("rect",{key:0,x:a.x+a.minX,y:a.y+a.minY*1.25,width:a.maxX-a.minX,height:a.maxY-a.minY,fill:"transparent","pointer-events":"visiblePainted",onMouseover:k=>fe(a),onMouseleave:i[0]||(i[0]=k=>{Y.value=null,y.value=!1})},null,40,Oe)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("text",{fill:a.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:S,x:a.x,y:a.y,"font-size":a.fontSize,transform:`translate(${a.width/2}, ${a.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":Y.value&&Y.value===a.id&&h.value.showTooltip,"word-not-selected":Y.value&&Y.value!==a.id&&h.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",style:e.normalizeStyle(`animation-delay:${S*t.value.animationDelayMs}ms !important; pointer-events:none;`)},e.toDisplayString(a.name),15,Ve))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:c.value.height,width:c.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(ne)},()=>[e.createElementVNode("button",{"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",style:e.normalizeStyle({background:t.value.style.chart.backgroundColor}),onClick:i[1]||(i[1]=a=>e.unref(ne)(!0))},[e.createVNode($e.default,{name:"refresh",stroke:t.value.style.chart.color},null,8,["stroke"])],4)],!0)])):e.createCommentVNode("",!0),e.createVNode(be._sfc_main,{show:h.value.showTooltip&&y.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,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,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:l.value,content:te.value,isCustom:L.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...oe.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:g,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(pe.default,{key:7,hideDetails:"",config:{open:h.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(ge.DataTable,{key:`table_${f.value}`,colNames:x.value.colNames,head:x.value.head,body:x.value.body,config:x.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:i[2]||(i[2]=a=>h.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,_e)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},Re=Se._export_sfc(Ee,[["__scopeId","data-v-cda211d1"]]);exports.default=Re;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as N, ref as v, watch as Ja, createElementBlock as R, openBlock as k, unref as S, normalizeStyle as pa, normalizeClass as Qa, createBlock as sa, createCommentVNode as L, renderSlot as B, createVNode as wa, createSlots as Xa, withCtx as G, normalizeProps as ma, guardReactiveProps as oa, withModifiers as G0, Fragment as ra, createElementVNode as T, renderList as $a, mergeProps as C0, createTextVNode as Sa, toDisplayString as ba, nextTick as I0 } from "vue";
|
|
2
|
-
import { u as P0, c as qa, b as U0, d as ga, p as da, X as O0, l as D0, h as a0, i as _0, f as l0, C as ya, N as K0, q as z0, r as j0, x as H0 } from "./index-
|
|
3
|
-
import { u as F0 } from "./useNestedProp-
|
|
2
|
+
import { u as P0, c as qa, b as U0, d as ga, p as da, X as O0, l as D0, h as a0, i as _0, f as l0, C as ya, N as K0, q as z0, r as j0, x as H0 } from "./index-DO87eA2V.js";
|
|
3
|
+
import { u as F0 } from "./useNestedProp-fOy4tvij.js";
|
|
4
4
|
import { u as Z0 } from "./useUserOptionState-BIvW1Kz7.js";
|
|
5
5
|
import { u as x0 } from "./useChartAccessibility-BWojgys7.js";
|
|
6
|
-
import { _ as W0 } from "./PenAndPaper-
|
|
7
|
-
import { _ as Y0 } from "./Title-
|
|
8
|
-
import { u as V0, U as J0 } from "./usePrinter-
|
|
9
|
-
import { _ as Q0 } from "./PackageVersion-
|
|
10
|
-
import { _ as X0 } from "./Tooltip-
|
|
11
|
-
import $0 from "./vue-ui-accordion-
|
|
12
|
-
import { D as q0 } from "./DataTable-
|
|
13
|
-
import { L as a3 } from "./Legend-
|
|
14
|
-
import { _ as _3 } from "./Shape-
|
|
6
|
+
import { _ as W0 } from "./PenAndPaper-bYremuGq.js";
|
|
7
|
+
import { _ as Y0 } from "./Title-A3qdvX3g.js";
|
|
8
|
+
import { u as V0, U as J0 } from "./usePrinter-BjvSt_Yu.js";
|
|
9
|
+
import { _ as Q0 } from "./PackageVersion-Cwa-KDYy.js";
|
|
10
|
+
import { _ as X0 } from "./Tooltip-C3RycjbN.js";
|
|
11
|
+
import $0 from "./vue-ui-accordion-CMJOxHWq.js";
|
|
12
|
+
import { D as q0 } from "./DataTable-D8vcDzp3.js";
|
|
13
|
+
import { L as a3 } from "./Legend-BXkorlVx.js";
|
|
14
|
+
import { _ as _3 } from "./Shape-BKl_8fSs.js";
|
|
15
15
|
import { _ as l3 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const n3 = {
|
|
17
17
|
type: "FeatureCollection",
|