vue-data-ui 2.6.50 → 2.6.52-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/{Arrow-DgCzka34.js → Arrow-BrgzjEu9.js} +1 -1
- package/dist/{Arrow-Cj0UP9DN.cjs → Arrow-i892KlJJ.cjs} +1 -1
- package/dist/{BaseIcon-Dug6kYBB.js → BaseIcon-1Kh1hniD.js} +1 -1
- package/dist/{BaseIcon-BeRHKYU4.cjs → BaseIcon-OIGwOnCM.cjs} +1 -1
- package/dist/{ColorPicker-C-VVlvta.cjs → ColorPicker-C5fe9E7-.cjs} +1 -1
- package/dist/{ColorPicker-8EgjF14O.js → ColorPicker-Cxeiob9V.js} +3 -3
- package/dist/{DataTable-Qe7lM3JL.js → DataTable-C4Zf4XLF.js} +15 -15
- package/dist/DataTable-DJyyRRlW.cjs +1 -0
- package/dist/{Legend-lzTl1S1b.js → Legend-1pyX_J1z.js} +2 -2
- package/dist/{Legend-CjiKxR8b.cjs → Legend-Dx4tku_Q.cjs} +1 -1
- package/dist/{PackageVersion-DqsBfaeh.js → PackageVersion-BPpaTwrM.js} +1 -1
- package/dist/{PackageVersion-yiiAD1cf.cjs → PackageVersion-Di08b2vs.cjs} +1 -1
- package/dist/{PenAndPaper-AvORsvqF.js → PenAndPaper-B21RAf9P.js} +5 -5
- package/dist/PenAndPaper-C0I2pjPq.cjs +1 -0
- package/dist/{Shape-2KuBmTJV.cjs → Shape-Bn0OAR4-.cjs} +1 -1
- package/dist/{Shape-Jg6afnuk.js → Shape-BrtnGizi.js} +1 -1
- package/dist/{Slicer-DPPVa8zE.js → Slicer-BeRcAG--.js} +25 -25
- package/dist/Slicer-BrIoq1c-.cjs +1 -0
- package/dist/{Title-cjYd6IYr.cjs → Title-CcW9kRtT.cjs} +1 -1
- package/dist/{Title-DPXXRQ-w.js → Title-rbJs8Cs3.js} +1 -1
- package/dist/{Tooltip-YBqthQ_8.cjs → Tooltip-BzDUupFB.cjs} +1 -1
- package/dist/{Tooltip-C4H6zELy.js → Tooltip-DZGBhn8l.js} +1 -1
- package/dist/documentation/installation.md +0 -1
- package/dist/dom-to-png-BpstRczV.cjs +1 -0
- package/dist/dom-to-png-DFDQ3B5I.js +119 -0
- package/dist/img-DN4K4BLQ.cjs +1 -0
- package/dist/img-hntVQbmL.js +19 -0
- package/dist/index-CuIvJLJx.cjs +9 -0
- package/dist/{index-BdAppyf2.js → index-DYjLUPYr.js} +291 -349
- package/dist/pdf-BwewXrne.js +46 -0
- package/dist/pdf-ClzzT4YP.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +0 -64
- package/dist/types/vue-data-ui.d.ts +0 -64
- package/dist/{useNestedProp-B3UWJnDQ.cjs → useNestedProp-B3OcLUMU.cjs} +1 -1
- package/dist/{useNestedProp-BGSJvQb3.js → useNestedProp-DPpLpUNG.js} +1 -1
- package/dist/usePanZoom-CUkkqW81.js +116 -0
- package/dist/usePanZoom-PXRi2Rwx.cjs +1 -0
- package/dist/usePrinter-BwwdT1Uh.cjs +1 -0
- package/dist/{usePrinter-Bvq0gUmP.js → usePrinter-GOjH1UQd.js} +5 -5
- package/dist/{vue-data-ui-B66itXhe.js → vue-data-ui-CgYIT4l6.js} +60 -62
- package/dist/vue-data-ui-XSn3UFqP.cjs +9 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +35 -36
- package/dist/{vue-ui-3d-bar-kESBThJe.js → vue-ui-3d-bar-BFA4GviN.js} +11 -11
- package/dist/{vue-ui-3d-bar-Bp1Qx_3s.cjs → vue-ui-3d-bar-d2lzwwD0.cjs} +2 -2
- package/dist/{vue-ui-accordion-Btv7fZHc.cjs → vue-ui-accordion-ZlcsLKVn.cjs} +1 -1
- package/dist/{vue-ui-accordion-dAJcVBnP.js → vue-ui-accordion-zFcofzrb.js} +3 -3
- package/dist/{vue-ui-age-pyramid-yogLIZ0-.cjs → vue-ui-age-pyramid-BrS-QXEl.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DOf4u3G7.js → vue-ui-age-pyramid-HYnV6m7j.js} +10 -10
- package/dist/{vue-ui-annotator-CSE9-lNO.js → vue-ui-annotator-Bnl6xoGx.js} +84 -85
- package/dist/vue-ui-annotator-DpcBNv4G.cjs +371 -0
- package/dist/{vue-ui-bullet-CrO7QKNT.js → vue-ui-bullet-BMAoQg9X.js} +8 -8
- package/dist/{vue-ui-bullet-C12nLt5L.cjs → vue-ui-bullet-CUg-Tqm5.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DdwcejCS.cjs → vue-ui-candlestick-BB_TlvHs.cjs} +1 -1
- package/dist/{vue-ui-candlestick-fZNnGqnR.js → vue-ui-candlestick-D99-OMzs.js} +11 -11
- package/dist/{vue-ui-carousel-table-Be2jjnQa.cjs → vue-ui-carousel-table-BLMby8AI.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-D7TTErUh.js → vue-ui-carousel-table-Cj28UhyG.js} +4 -4
- package/dist/{vue-ui-chestnut-DXxpU3iH.js → vue-ui-chestnut-BcHI2rpx.js} +8 -8
- package/dist/{vue-ui-chestnut-OYsNRpL_.cjs → vue-ui-chestnut-CK_b_ta8.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-i0GUh3ui.js → vue-ui-circle-pack-BYhg53UE.js} +9 -9
- package/dist/{vue-ui-circle-pack-CzGyZQx0.cjs → vue-ui-circle-pack-ClzkEDGg.cjs} +1 -1
- package/dist/vue-ui-cursor-B3u3ldcD.cjs +1 -0
- package/dist/{vue-ui-cursor-7vhZ073K.js → vue-ui-cursor-DkcChdeb.js} +4 -4
- package/dist/{vue-ui-dashboard-Z0ukqnTc.js → vue-ui-dashboard-BdnlFgl5.js} +8 -8
- package/dist/vue-ui-dashboard-Nt0DdH9L.cjs +1 -0
- package/dist/{vue-ui-digits-CnSmR9jO.js → vue-ui-digits-D_BKH_j3.js} +2 -2
- package/dist/{vue-ui-digits-er9gte-s.cjs → vue-ui-digits-LJ5NoBDi.cjs} +1 -1
- package/dist/{vue-ui-donut-DlBL_0yx.js → vue-ui-donut-DKIAm-ME.js} +12 -12
- package/dist/{vue-ui-donut-evolution-U0GNz2fp.js → vue-ui-donut-evolution-B_aFgOze.js} +14 -14
- package/dist/{vue-ui-donut-evolution-BDuXBSjv.cjs → vue-ui-donut-evolution-BtnTa4le.cjs} +1 -1
- package/dist/{vue-ui-donut-DVg5ro7B.cjs → vue-ui-donut-kRhrhvjt.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-PioEuDZQ.cjs → vue-ui-dumbbell-BFYVlYa4.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-aIYpaGN0.js → vue-ui-dumbbell-jzYimGnw.js} +10 -10
- package/dist/{vue-ui-flow-BOlMAhh0.cjs → vue-ui-flow-BuXSGu-i.cjs} +1 -1
- package/dist/{vue-ui-flow-BcaSo6z0.js → vue-ui-flow-CqihZo8O.js} +9 -9
- package/dist/{vue-ui-funnel-AgQn4mH5.js → vue-ui-funnel-B9OFgkeR.js} +9 -9
- package/dist/{vue-ui-funnel-DrkVJPw1.cjs → vue-ui-funnel-CpaBBSbU.cjs} +1 -1
- package/dist/{vue-ui-galaxy-D85_jVQh.cjs → vue-ui-galaxy-BCQr-U2u.cjs} +1 -1
- package/dist/{vue-ui-galaxy-DWSIn-eK.js → vue-ui-galaxy-FOIZdAZe.js} +11 -11
- package/dist/{vue-ui-gauge-8ULXCGzO.js → vue-ui-gauge-B42XWwB2.js} +7 -7
- package/dist/{vue-ui-gauge-BHj3D_VH.cjs → vue-ui-gauge-kZxueLp8.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D1j6MDV_.js → vue-ui-gizmo-DNzFp5mg.js} +3 -3
- package/dist/{vue-ui-gizmo-CEsmiN_U.cjs → vue-ui-gizmo-DtQnmFnB.cjs} +1 -1
- package/dist/{vue-ui-heatmap-tMQOgzTJ.js → vue-ui-heatmap-CBahWBfm.js} +10 -10
- package/dist/{vue-ui-heatmap-Cww1BNvU.cjs → vue-ui-heatmap-DwTkeSCE.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CrVMrU9H.cjs → vue-ui-history-plot-BLZfokqh.cjs} +1 -1
- package/dist/{vue-ui-history-plot-17Ayxmx8.js → vue-ui-history-plot-JF7Cxj70.js} +11 -11
- package/dist/{vue-ui-kpi-C9kltMQ9.js → vue-ui-kpi-Dd7_MpTH.js} +3 -3
- package/dist/{vue-ui-kpi-BALQ_M2s.cjs → vue-ui-kpi-DgYNzLPE.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DzObX7ZU.cjs → vue-ui-mini-loader-AnEvVAeN.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-zkvcqGEg.js → vue-ui-mini-loader-CYlUH9YB.js} +2 -2
- package/dist/{vue-ui-molecule-C8d0BNOu.js → vue-ui-molecule-CwjSX0qp.js} +253 -226
- package/dist/vue-ui-molecule-DenzPBhZ.cjs +1 -0
- package/dist/{vue-ui-mood-radar-Bl-PDTeX.js → vue-ui-mood-radar-B_ZdNRq7.js} +11 -11
- package/dist/{vue-ui-mood-radar-B-I03OhG.cjs → vue-ui-mood-radar-oZi1r3t2.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-DnuV1MXZ.cjs → vue-ui-nested-donuts-1iw0Uhgn.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BxTLEwZg.js → vue-ui-nested-donuts-u6o7Mo5w.js} +11 -11
- package/dist/{vue-ui-onion-ChlD0lEh.js → vue-ui-onion-BIgB8q-o.js} +11 -11
- package/dist/{vue-ui-onion-jrh-OYsj.cjs → vue-ui-onion-nSs841wa.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DEsxCUkG.cjs → vue-ui-parallel-coordinate-plot-CLZbLwv6.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DaQ5VVjw.js → vue-ui-parallel-coordinate-plot-CzdztQbb.js} +12 -12
- package/dist/{vue-ui-quadrant-BhwxemSE.cjs → vue-ui-quadrant-DVJk4jVY.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DHwHNx0L.js → vue-ui-quadrant-Dqj0kKDK.js} +12 -12
- package/dist/{vue-ui-quick-chart-DCKBR3yK.js → vue-ui-quick-chart-C16V9Aae.js} +9 -9
- package/dist/{vue-ui-quick-chart-CKzMyPRh.cjs → vue-ui-quick-chart-DseczpPU.cjs} +1 -1
- package/dist/{vue-ui-radar-BKa6M5Wq.cjs → vue-ui-radar-BAeIHJpy.cjs} +1 -1
- package/dist/{vue-ui-radar-B5llyhiL.js → vue-ui-radar-Db7iB_Qj.js} +12 -12
- package/dist/{vue-ui-rating-ChPyKOUl.cjs → vue-ui-rating-D0Dx6ZXa.cjs} +1 -1
- package/dist/{vue-ui-rating-BLdhelA-.js → vue-ui-rating-JEdFnT3W.js} +2 -2
- package/dist/{vue-ui-relation-circle-CS8SHw7f.cjs → vue-ui-relation-circle-DQna8U5y.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CDhd8AAr.js → vue-ui-relation-circle-gakSZ4S6.js} +7 -7
- package/dist/{vue-ui-rings-bZCTJMWv.js → vue-ui-rings-D5n6DT_A.js} +12 -12
- package/dist/{vue-ui-rings-DJS0iOwC.cjs → vue-ui-rings-DtRyfbLl.cjs} +1 -1
- package/dist/{vue-ui-scatter-BP8fVV4q.cjs → vue-ui-scatter-Bi6D12HK.cjs} +1 -1
- package/dist/{vue-ui-scatter-BKvtGb58.js → vue-ui-scatter-PREHAey0.js} +12 -12
- package/dist/{vue-ui-skeleton-CIPY7Xfo.cjs → vue-ui-skeleton-B3iHjtI-.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BvIz3HzY.js → vue-ui-skeleton-Bvgys0sE.js} +3 -3
- package/dist/{vue-ui-smiley-CF97kVSw.js → vue-ui-smiley-Bbz2pMRt.js} +2 -2
- package/dist/{vue-ui-smiley-Dcw6DDUd.cjs → vue-ui-smiley-CPZZHQxU.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-H77En2yP.cjs → vue-ui-spark-trend-BQJgJLH1.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-DDWZF8FE.js → vue-ui-spark-trend-OSzSYi-e.js} +5 -5
- package/dist/{vue-ui-sparkbar-D_J5RsQ7.cjs → vue-ui-sparkbar-CMXau9-B.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DS7rL1J8.js → vue-ui-sparkbar-CTBKE2AF.js} +4 -4
- package/dist/{vue-ui-sparkgauge-MSEo6cmu.js → vue-ui-sparkgauge-Cut-q8bg.js} +4 -4
- package/dist/{vue-ui-sparkgauge-lyri9BYV.cjs → vue-ui-sparkgauge-DXGiSj1v.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DZPn2dDv.js → vue-ui-sparkhistogram-Bc9284wI.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-qNy_nXl3.cjs → vue-ui-sparkhistogram-D0JFcRmB.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DhUWmLtU.cjs → vue-ui-sparkline-BjuntN3v.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DmMQ2SZ_.js → vue-ui-sparkline-JtLdV2lv.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DgmKIPN-.js → vue-ui-sparkstackbar-Dnb7y-aL.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DSWq3rmC.cjs → vue-ui-sparkstackbar-UHMiNIcM.cjs} +1 -1
- package/dist/{vue-ui-stackbar-2RHJInUq.cjs → vue-ui-stackbar-B3tfGGNG.cjs} +2 -2
- package/dist/{vue-ui-stackbar-DYOgS1Qd.js → vue-ui-stackbar-Do4pbvT_.js} +15 -15
- package/dist/{vue-ui-strip-plot-6VO97qw1.cjs → vue-ui-strip-plot-BL_QIbRg.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Dt2b8qR2.js → vue-ui-strip-plot-DpEyBQVy.js} +11 -11
- package/dist/{vue-ui-table-DB16XLTw.cjs → vue-ui-table-Bo6YTb5z.cjs} +1 -1
- package/dist/{vue-ui-table-CUXgc62i.js → vue-ui-table-DOy0Vino.js} +1 -1
- package/dist/{vue-ui-table-heatmap-CCE1VZlG.js → vue-ui-table-heatmap-BBtNwXmc.js} +4 -4
- package/dist/{vue-ui-table-heatmap-Awh619At.cjs → vue-ui-table-heatmap-BEyXNXkX.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Cmmla_Dx.js → vue-ui-table-sparkline-CgMtPPVk.js} +5 -5
- package/dist/{vue-ui-table-sparkline-DYQYdZbN.cjs → vue-ui-table-sparkline-CjOt6yUn.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DOwFD-a9.cjs → vue-ui-thermometer-DDzJGu-3.cjs} +1 -1
- package/dist/{vue-ui-thermometer-C-9ZCOYE.js → vue-ui-thermometer-mxQsDV23.js} +7 -7
- package/dist/{vue-ui-timer-DhmCBz29.cjs → vue-ui-timer-BoHc9W-g.cjs} +1 -1
- package/dist/{vue-ui-timer-BJWfxtwA.js → vue-ui-timer-py5C5kre.js} +5 -5
- package/dist/{vue-ui-tiremarks-C_fjzZx1.cjs → vue-ui-tiremarks-DfzjVsQy.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DWb36mmN.js → vue-ui-tiremarks-cOumsgMp.js} +7 -7
- package/dist/vue-ui-treemap-BapuAvm_.cjs +1 -0
- package/dist/{vue-ui-treemap-BvQ-fZ2Q.js → vue-ui-treemap-D52gL3aO.js} +185 -185
- package/dist/{vue-ui-vertical-bar-Bx-Hgjrl.js → vue-ui-vertical-bar-B7xGhcol.js} +12 -12
- package/dist/{vue-ui-vertical-bar-BX82g5XY.cjs → vue-ui-vertical-bar-tUOVTrhe.cjs} +1 -1
- package/dist/{vue-ui-waffle-6bPlupZ9.cjs → vue-ui-waffle-D_eTTi3G.cjs} +1 -1
- package/dist/{vue-ui-waffle-XBYHZddH.js → vue-ui-waffle-Dl3103a6.js} +12 -12
- package/dist/{vue-ui-wheel-BAGyz9kV.cjs → vue-ui-wheel-BF-ixbP0.cjs} +1 -1
- package/dist/{vue-ui-wheel-B3opMdjn.js → vue-ui-wheel-j5qr7c2B.js} +7 -7
- package/dist/vue-ui-word-cloud-CDCHlEtX.js +628 -0
- package/dist/vue-ui-word-cloud-DzhX3V-T.cjs +1 -0
- package/dist/{vue-ui-xy-DCMV8GPA.js → vue-ui-xy-Cqd9LwBJ.js} +18 -18
- package/dist/vue-ui-xy-DXp678aj.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-DKhymJYh.cjs → vue-ui-xy-canvas-DfYwxC06.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DDf9P1hu.js → vue-ui-xy-canvas-byW5VmrH.js} +16 -16
- package/package.json +2 -3
- package/dist/DataTable-DtXoZKgy.cjs +0 -1
- package/dist/PenAndPaper-Btnlb4RH.cjs +0 -1
- package/dist/Slicer-BGrOB5Ac.cjs +0 -1
- package/dist/img-BIeSHu0f.js +0 -15
- package/dist/img-D6uvziU0.cjs +0 -1
- package/dist/index-BVYLM95-.cjs +0 -9
- package/dist/pdf-BpXLKlRx.cjs +0 -1
- package/dist/pdf-H8Iw_Wax.js +0 -44
- package/dist/usePanZoom-BI9ALAYy.cjs +0 -1
- package/dist/usePanZoom-D76xCBni.js +0 -97
- package/dist/usePrinter-CkJDEgjQ.cjs +0 -1
- package/dist/vue-data-ui-CgyB5G6z.cjs +0 -9
- package/dist/vue-ui-annotator-DVCxXtI-.cjs +0 -371
- package/dist/vue-ui-cursor-BjYOyMry.cjs +0 -1
- package/dist/vue-ui-dashboard-zYOnUnUa.cjs +0 -1
- package/dist/vue-ui-molecule-mDLCkrh8.cjs +0 -1
- package/dist/vue-ui-screenshot-BLvYddQy.cjs +0 -3
- package/dist/vue-ui-screenshot-CAciP-qg.js +0 -161
- package/dist/vue-ui-treemap-ksooFSp3.cjs +0 -1
- package/dist/vue-ui-word-cloud-1Lsf7r8k.cjs +0 -1
- package/dist/vue-ui-word-cloud-DJGCUigw.js +0 -571
- package/dist/vue-ui-xy-aSB6TWYQ.cjs +0 -3
|
@@ -0,0 +1,628 @@
|
|
|
1
|
+
import { useCssVars as Ae, computed as K, ref as h, watch as de, onMounted as Ne, onBeforeUnmount as Ie, createElementBlock as V, openBlock as b, unref as v, normalizeStyle as ne, createBlock as Q, createCommentVNode as U, createVNode as ve, createSlots as _e, withCtx as S, renderSlot as $, normalizeProps as G, guardReactiveProps as L, normalizeClass as ye, createElementVNode as he, Fragment as Re, renderList as We, toDisplayString as be, createTextVNode as Ve, nextTick as we } from "vue";
|
|
2
|
+
import { u as Ue, c as Ce, a6 as Be, v as De, t as Ee, p as se, a as Ge, o as Le, e as ke, g as He, f as je, X as Xe, q as qe, r as Ye, x as Ze } from "./index-DYjLUPYr.js";
|
|
3
|
+
import { _ as Je } from "./Title-rbJs8Cs3.js";
|
|
4
|
+
import { u as Ke, U as Qe } from "./usePrinter-GOjH1UQd.js";
|
|
5
|
+
import { t as et, u as tt, d as ot } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
+
import at from "./vue-ui-accordion-zFcofzrb.js";
|
|
7
|
+
import { D as lt } from "./DataTable-C4Zf4XLF.js";
|
|
8
|
+
import { u as $e } from "./useNestedProp-DPpLpUNG.js";
|
|
9
|
+
import { _ as nt } from "./PackageVersion-BPpaTwrM.js";
|
|
10
|
+
import { _ as st } from "./Tooltip-DZGBhn8l.js";
|
|
11
|
+
import { P as rt } from "./PenAndPaper-B21RAf9P.js";
|
|
12
|
+
import { u as it } from "./useUserOptionState-BIvW1Kz7.js";
|
|
13
|
+
import { u as ut } from "./useChartAccessibility-BWojgys7.js";
|
|
14
|
+
import { u as ct } from "./usePanZoom-CUkkqW81.js";
|
|
15
|
+
import dt from "./BaseIcon-1Kh1hniD.js";
|
|
16
|
+
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
|
+
function xe({
|
|
18
|
+
word: w,
|
|
19
|
+
fontSize: m,
|
|
20
|
+
pad: f,
|
|
21
|
+
canvas: i,
|
|
22
|
+
ctx: u,
|
|
23
|
+
svg: l
|
|
24
|
+
}) {
|
|
25
|
+
u.save(), u.font = `${l.style && l.style.bold ? "bold " : ""}${m}px Arial`;
|
|
26
|
+
const a = u.measureText(w.name), n = Math.ceil(a.width) + 2 + (f ? f * 2 : 0), r = Math.ceil(m) + 2 + (f ? f * 2 : 0);
|
|
27
|
+
i.width = n, i.height = r, u.clearRect(0, 0, n, r), u.font = `${l.style && l.style.bold ? "bold " : ""}${m}px Arial`, u.textAlign = "center", u.textBaseline = "middle", u.fillStyle = "black", u.fillText(w.name, n / 2, r / 2);
|
|
28
|
+
const M = u.getImageData(0, 0, n, r).data, x = [];
|
|
29
|
+
for (let P = 0; P < r; P += 1)
|
|
30
|
+
for (let e = 0; e < n; e += 1)
|
|
31
|
+
M[(P * n + e) * 4 + 3] > 1 && x.push([e, P]);
|
|
32
|
+
return u.restore(), { w: n, h: r, wordMask: x };
|
|
33
|
+
}
|
|
34
|
+
function Te({ mask: w, maskW: m, maskH: f, wx: i, wy: u, wordMask: l }) {
|
|
35
|
+
for (let a = 0; a < l.length; a += 1) {
|
|
36
|
+
const n = i + l[a][0], r = u + l[a][1];
|
|
37
|
+
if (n < 0 || r < 0 || n >= m || r >= f || w[r * m + n]) return !1;
|
|
38
|
+
}
|
|
39
|
+
return !0;
|
|
40
|
+
}
|
|
41
|
+
function Se({ mask: w, maskW: m, maskH: f, wx: i, wy: u, wordMask: l }) {
|
|
42
|
+
for (let a = 0; a < l.length; a += 1) {
|
|
43
|
+
const n = i + l[a][0], r = u + l[a][1];
|
|
44
|
+
n >= 0 && r >= 0 && n < m && r < f && (w[r * m + n] = 1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function ht({ wordMask: w, w: m, h: f, dilation: i }) {
|
|
48
|
+
const u = new Set(w.map(([a, n]) => `${a},${n}`)), l = new Set(u);
|
|
49
|
+
for (let [a, n] of w)
|
|
50
|
+
for (let r = -i; r <= i; r += 1)
|
|
51
|
+
for (let F = -i; F <= i; F += 1) {
|
|
52
|
+
if (r === 0 && F === 0) continue;
|
|
53
|
+
const M = a + r, x = n + F;
|
|
54
|
+
M >= 0 && M < m && x >= 0 && x < f && l.add(`${M},${x}`);
|
|
55
|
+
}
|
|
56
|
+
return Array.from(l).map((a) => a.split(",").map(Number));
|
|
57
|
+
}
|
|
58
|
+
function ft({
|
|
59
|
+
words: w,
|
|
60
|
+
proximity: m = 0,
|
|
61
|
+
svg: f
|
|
62
|
+
}) {
|
|
63
|
+
const { width: i, height: u } = f, l = Math.round(i), a = Math.round(u), n = 1, r = f.minFontSize, F = f.maxFontSize, M = w.map((p) => p.value), x = Math.min(...M), P = Math.max(...M), e = new Uint8Array(l * a), R = document.createElement("canvas"), H = R.getContext("2d", { willReadFrequently: !0 });
|
|
64
|
+
R.width = l, R.height = a;
|
|
65
|
+
const j = 6, ee = 2, te = 2, X = 1, q = Math.floor(l / 2), c = Math.floor(a / 2), re = [...w].sort((p, z) => z.value - p.value), Y = [];
|
|
66
|
+
for (const p of re) {
|
|
67
|
+
let z = r;
|
|
68
|
+
P !== x && (z = (p.value - x) / (P - x) * (F - r) + r), z = Math.max(r, Math.min(F, z));
|
|
69
|
+
let W = !1, O = z;
|
|
70
|
+
for (; !W && O >= n; ) {
|
|
71
|
+
let { w: A, h: N, wordMask: d } = xe({
|
|
72
|
+
word: p,
|
|
73
|
+
fontSize: O,
|
|
74
|
+
pad: m,
|
|
75
|
+
canvas: R,
|
|
76
|
+
ctx: H,
|
|
77
|
+
svg: f
|
|
78
|
+
});
|
|
79
|
+
d = ht({ wordMask: d, w: A, h: N, dilation: 2 });
|
|
80
|
+
let I = 0, _ = 0;
|
|
81
|
+
for (; I < Math.max(l, a) && !W && _ < 1e4; ) {
|
|
82
|
+
for (let T = 0; T < 360; T += j) {
|
|
83
|
+
_ += 1;
|
|
84
|
+
const g = Math.round(q + I * Math.cos(T * Math.PI / 180) - A / 2), C = Math.round(c + I * Math.sin(T * Math.PI / 180) - N / 2);
|
|
85
|
+
if (!(g < 0 || C < 0 || g + A > l || C + N > a) && Te({ mask: e, maskW: l, maskH: a, wx: g, wy: C, wordMask: d })) {
|
|
86
|
+
Y.push({ ...p, x: g - l / 2, y: C - a / 2, fontSize: O, width: A, height: N, angle: 0 }), Se({ mask: e, maskW: l, maskH: a, wx: g, wy: C, wordMask: d }), W = !0;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
I += ee;
|
|
91
|
+
}
|
|
92
|
+
W || (O -= 1);
|
|
93
|
+
}
|
|
94
|
+
if (!W && O < n) {
|
|
95
|
+
O = n;
|
|
96
|
+
const { w: A, h: N, wordMask: d } = xe({
|
|
97
|
+
word: p,
|
|
98
|
+
fontSize: O,
|
|
99
|
+
pad: m,
|
|
100
|
+
canvas: R,
|
|
101
|
+
ctx: H,
|
|
102
|
+
svg: f
|
|
103
|
+
});
|
|
104
|
+
let I = 0, _ = 0;
|
|
105
|
+
for (; I < Math.max(l, a) && !W && _ < 25e3; ) {
|
|
106
|
+
for (let T = 0; T < 360; T += te) {
|
|
107
|
+
_ += 1;
|
|
108
|
+
const g = Math.round(q + I * Math.cos(T * Math.PI / 180) - A / 2), C = Math.round(c + I * Math.sin(T * Math.PI / 180) - N / 2);
|
|
109
|
+
if (!(g < 0 || C < 0 || g + A > l || C + N > a) && Te({ mask: e, maskW: l, maskH: a, wx: g, wy: C, wordMask: d })) {
|
|
110
|
+
Y.push({ ...p, x: g - l / 2, y: C - a / 2, fontSize: O, width: A, height: N, angle: 0 }), Se({ mask: e, maskW: l, maskH: a, wx: g, wy: C, wordMask: d }), W = !0;
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
I += X;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return Y.sort((p, z) => z.fontSize - p.fontSize);
|
|
119
|
+
}
|
|
120
|
+
const mt = ["id"], pt = ["xmlns", "viewBox"], gt = ["width", "height"], yt = ["transform"], bt = ["fill", "font-weight", "x", "y", "font-size", "transform", "onMouseover"], wt = {
|
|
121
|
+
key: 4,
|
|
122
|
+
class: "vue-data-ui-watermark"
|
|
123
|
+
}, Ct = {
|
|
124
|
+
key: 5,
|
|
125
|
+
"data-dom-to-png-ignore": "",
|
|
126
|
+
class: "reset-wrapper"
|
|
127
|
+
}, kt = ["innerHTML"], $t = {
|
|
128
|
+
__name: "vue-ui-word-cloud",
|
|
129
|
+
props: {
|
|
130
|
+
config: {
|
|
131
|
+
type: Object,
|
|
132
|
+
default() {
|
|
133
|
+
return {};
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
dataset: {
|
|
137
|
+
type: [Array, String],
|
|
138
|
+
default() {
|
|
139
|
+
return [];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
setup(w, { expose: m }) {
|
|
144
|
+
Ae((t) => ({
|
|
145
|
+
"1461b4f2": t.slicerColor
|
|
146
|
+
}));
|
|
147
|
+
const { vue_ui_word_cloud: f } = Ue(), i = w, u = K({
|
|
148
|
+
get() {
|
|
149
|
+
return !!i.dataset && i.dataset.length;
|
|
150
|
+
},
|
|
151
|
+
set(t) {
|
|
152
|
+
return t;
|
|
153
|
+
}
|
|
154
|
+
}), l = h(Ce()), a = h(0), n = h(null), r = h(null), F = h(null), M = h(0), x = h(0), P = h(!1), e = K({
|
|
155
|
+
get: () => q(),
|
|
156
|
+
set: (t) => t
|
|
157
|
+
}), R = h(H());
|
|
158
|
+
function H() {
|
|
159
|
+
return typeof i.dataset == "string" ? Be(i.dataset) : i.dataset.map((t, s) => ({
|
|
160
|
+
...t,
|
|
161
|
+
value: De(t.value)
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
de(() => i.dataset, () => {
|
|
165
|
+
R.value = H(), T();
|
|
166
|
+
});
|
|
167
|
+
const { userOptionsVisible: j, setUserOptionsVisibility: ee, keepUserOptionState: te } = it({ config: e.value }), { svgRef: X } = ut({ config: e.value.style.chart.title });
|
|
168
|
+
function q() {
|
|
169
|
+
const t = $e({
|
|
170
|
+
userConfig: i.config,
|
|
171
|
+
defaultConfig: f
|
|
172
|
+
});
|
|
173
|
+
return t.theme ? {
|
|
174
|
+
...$e({
|
|
175
|
+
userConfig: Ge.vue_ui_word_cloud[t.theme] || i.config,
|
|
176
|
+
defaultConfig: t
|
|
177
|
+
}),
|
|
178
|
+
customPalette: Ee[t.theme] || se
|
|
179
|
+
} : t;
|
|
180
|
+
}
|
|
181
|
+
de(() => i.config, (t) => {
|
|
182
|
+
e.value = q(), j.value = !e.value.userOptions.showOnChartHover, z(), M.value += 1, x.value += 1, d.value.showTable = e.value.table.show, d.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
183
|
+
}, { deep: !0 });
|
|
184
|
+
const c = h({
|
|
185
|
+
width: e.value.style.chart.width,
|
|
186
|
+
height: e.value.style.chart.height,
|
|
187
|
+
maxFontSize: e.value.style.chart.words.maxFontSize,
|
|
188
|
+
minFontSize: e.value.style.chart.words.minFontSize,
|
|
189
|
+
bold: e.value.style.chart.words.bold
|
|
190
|
+
}), re = ot(() => {
|
|
191
|
+
T();
|
|
192
|
+
}, 10), Y = et(() => {
|
|
193
|
+
const { width: t, height: s } = tt({
|
|
194
|
+
chart: n.value,
|
|
195
|
+
title: e.value.style.chart.title.text ? r.value : null,
|
|
196
|
+
source: F.value
|
|
197
|
+
});
|
|
198
|
+
requestAnimationFrame(() => {
|
|
199
|
+
c.value.width = t, c.value.height = s, we(re);
|
|
200
|
+
});
|
|
201
|
+
}), p = h(null);
|
|
202
|
+
Ne(z);
|
|
203
|
+
function z() {
|
|
204
|
+
Le(i.dataset) ? ke({
|
|
205
|
+
componentName: "VueUiWordCloud",
|
|
206
|
+
type: "dataset"
|
|
207
|
+
}) : R.value.forEach((t, s) => {
|
|
208
|
+
He({
|
|
209
|
+
datasetObject: t,
|
|
210
|
+
requiredAttributes: ["name", "value"]
|
|
211
|
+
}).forEach((o) => {
|
|
212
|
+
u.value = !1, ke({
|
|
213
|
+
componentName: "VueUiWordCloud",
|
|
214
|
+
type: "datasetSerieAttribute",
|
|
215
|
+
property: o,
|
|
216
|
+
index: s
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
}), e.value.responsive && (p.value = new ResizeObserver(Y), p.value.observe(n.value.parentNode));
|
|
220
|
+
}
|
|
221
|
+
Ie(() => {
|
|
222
|
+
p.value && p.value.disconnect();
|
|
223
|
+
});
|
|
224
|
+
const { isPrinting: W, isImaging: O, generatePdf: A, generateImage: N } = Ke({
|
|
225
|
+
elementId: `wordCloud_${l.value}`,
|
|
226
|
+
fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
|
|
227
|
+
options: e.value.userOptions.print
|
|
228
|
+
}), d = h({
|
|
229
|
+
showTable: e.value.table.show,
|
|
230
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
231
|
+
});
|
|
232
|
+
function I(t, s, o = "Arial") {
|
|
233
|
+
const y = document.createElement("canvas").getContext("2d");
|
|
234
|
+
return y.font = `${s}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${o}`, {
|
|
235
|
+
width: y.measureText(t).width + e.value.style.chart.words.proximity,
|
|
236
|
+
height: s
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
const _ = h([]);
|
|
240
|
+
de(() => i.dataset, T, { immediate: !0 });
|
|
241
|
+
function T() {
|
|
242
|
+
const t = [...R.value].map((y) => y.value), s = Math.max(...t), o = Math.min(...t), k = [...R.value].map((y, B) => {
|
|
243
|
+
let D = (y.value - o) / (s - o) * (c.value.maxFontSize - c.value.minFontSize) + c.value.minFontSize;
|
|
244
|
+
D = isNaN(D) ? c.value.minFontSize : D;
|
|
245
|
+
const ge = I(y.name, D);
|
|
246
|
+
return {
|
|
247
|
+
...y,
|
|
248
|
+
id: Ce(),
|
|
249
|
+
fontSize: D,
|
|
250
|
+
width: ge.width,
|
|
251
|
+
height: ge.height,
|
|
252
|
+
color: e.value.style.chart.words.usePalette ? e.value.customPalette[B] || e.value.customPalette[B % e.value.customPalette.length] || se[B] || se[B % se.length] : e.value.style.chart.words.color
|
|
253
|
+
};
|
|
254
|
+
});
|
|
255
|
+
_.value = ft({
|
|
256
|
+
words: k,
|
|
257
|
+
svg: c.value,
|
|
258
|
+
proximity: e.value.style.chart.words.proximity
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const g = K(() => {
|
|
262
|
+
const t = _.value.map((o) => ({
|
|
263
|
+
name: o.name,
|
|
264
|
+
color: o.color
|
|
265
|
+
})), s = _.value.map((o) => o.value);
|
|
266
|
+
return { head: t, body: s };
|
|
267
|
+
});
|
|
268
|
+
function C() {
|
|
269
|
+
we(() => {
|
|
270
|
+
const t = g.value.head.map((k, y) => [[
|
|
271
|
+
k.name
|
|
272
|
+
], [g.value.body[y]]]), s = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), o = qe(s);
|
|
273
|
+
Ye({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
const oe = K(() => {
|
|
277
|
+
const t = [
|
|
278
|
+
e.value.table.columnNames.series,
|
|
279
|
+
e.value.table.columnNames.value
|
|
280
|
+
], s = g.value.head.map((y, B) => {
|
|
281
|
+
const D = je({ p: e.value.table.td.prefix, v: g.value.body[B], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
282
|
+
return [
|
|
283
|
+
{
|
|
284
|
+
color: y.color,
|
|
285
|
+
name: y.name
|
|
286
|
+
},
|
|
287
|
+
D
|
|
288
|
+
];
|
|
289
|
+
}), o = {
|
|
290
|
+
th: {
|
|
291
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
292
|
+
color: e.value.table.th.color,
|
|
293
|
+
outline: e.value.table.th.outline
|
|
294
|
+
},
|
|
295
|
+
td: {
|
|
296
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
297
|
+
color: e.value.table.td.color,
|
|
298
|
+
outline: e.value.table.td.outline
|
|
299
|
+
},
|
|
300
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
301
|
+
};
|
|
302
|
+
return {
|
|
303
|
+
colNames: [
|
|
304
|
+
e.value.table.columnNames.series,
|
|
305
|
+
e.value.table.columnNames.value
|
|
306
|
+
],
|
|
307
|
+
head: t,
|
|
308
|
+
body: s,
|
|
309
|
+
config: o
|
|
310
|
+
};
|
|
311
|
+
}), ae = h(!1);
|
|
312
|
+
function Fe(t) {
|
|
313
|
+
ae.value = t, a.value += 1;
|
|
314
|
+
}
|
|
315
|
+
function Me() {
|
|
316
|
+
return _.value;
|
|
317
|
+
}
|
|
318
|
+
function fe() {
|
|
319
|
+
d.value.showTable = !d.value.showTable;
|
|
320
|
+
}
|
|
321
|
+
function me() {
|
|
322
|
+
d.value.showTooltip = !d.value.showTooltip;
|
|
323
|
+
}
|
|
324
|
+
const Z = h(!1);
|
|
325
|
+
function ie() {
|
|
326
|
+
Z.value = !Z.value;
|
|
327
|
+
}
|
|
328
|
+
const Pe = K(() => !Z.value && e.value.style.chart.zoom.show), { viewBox: le, resetZoom: pe, isZoom: ze } = ct(X, {
|
|
329
|
+
x: 0,
|
|
330
|
+
y: 0,
|
|
331
|
+
width: c.value.width <= 0 ? 10 : c.value.width,
|
|
332
|
+
height: c.value.height <= 0 ? 10 : c.value.height
|
|
333
|
+
}, 1, Pe);
|
|
334
|
+
m({
|
|
335
|
+
getData: Me,
|
|
336
|
+
generateCsv: C,
|
|
337
|
+
generatePdf: A,
|
|
338
|
+
generateImage: N,
|
|
339
|
+
toggleTable: fe,
|
|
340
|
+
toggleTooltip: me,
|
|
341
|
+
toggleAnnotator: ie
|
|
342
|
+
});
|
|
343
|
+
const E = h(null), J = h(!1), ue = h(""), ce = h(null);
|
|
344
|
+
function Oe(t) {
|
|
345
|
+
if (!d.value.showTooltip) return;
|
|
346
|
+
E.value = t.id, ce.value = { datapoint: t, config: e.value };
|
|
347
|
+
const s = e.value.style.chart.tooltip.customFormat;
|
|
348
|
+
if (J.value = !1, Ze(s))
|
|
349
|
+
try {
|
|
350
|
+
const o = s({
|
|
351
|
+
datapoint: t,
|
|
352
|
+
config: e.value
|
|
353
|
+
});
|
|
354
|
+
typeof o == "string" && (ue.value = o, J.value = !0);
|
|
355
|
+
} catch {
|
|
356
|
+
console.warn("Custom format cannot be applied."), J.value = !1;
|
|
357
|
+
}
|
|
358
|
+
if (!J.value) {
|
|
359
|
+
let o = `<svg viewBox="0 0 10 10" height="${e.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${t.color}"/></svg><span>${t.name}:</span><b>${(t.value || 0).toFixed(e.value.style.chart.tooltip.roundingValue)}</b>`;
|
|
360
|
+
ue.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${o}</div>`;
|
|
361
|
+
}
|
|
362
|
+
P.value = !0;
|
|
363
|
+
}
|
|
364
|
+
return (t, s) => (b(), V("div", {
|
|
365
|
+
class: "vue-ui-word-cloud",
|
|
366
|
+
ref_key: "wordCloudChart",
|
|
367
|
+
ref: n,
|
|
368
|
+
id: `wordCloud_${l.value}`,
|
|
369
|
+
style: ne(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
370
|
+
onMouseenter: s[3] || (s[3] = () => v(ee)(!0)),
|
|
371
|
+
onMouseleave: s[4] || (s[4] = () => v(ee)(!1))
|
|
372
|
+
}, [
|
|
373
|
+
e.value.userOptions.buttons.annotator ? (b(), Q(rt, {
|
|
374
|
+
key: 0,
|
|
375
|
+
svgRef: v(X),
|
|
376
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
377
|
+
color: e.value.style.chart.color,
|
|
378
|
+
active: Z.value,
|
|
379
|
+
onClose: ie
|
|
380
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : U("", !0),
|
|
381
|
+
e.value.style.chart.title.text ? (b(), V("div", {
|
|
382
|
+
key: 1,
|
|
383
|
+
ref_key: "chartTitle",
|
|
384
|
+
ref: r,
|
|
385
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
386
|
+
}, [
|
|
387
|
+
(b(), Q(Je, {
|
|
388
|
+
key: `title_${M.value}`,
|
|
389
|
+
config: {
|
|
390
|
+
title: {
|
|
391
|
+
...e.value.style.chart.title
|
|
392
|
+
},
|
|
393
|
+
subtitle: {
|
|
394
|
+
...e.value.style.chart.title.subtitle
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}, null, 8, ["config"]))
|
|
398
|
+
], 512)) : U("", !0),
|
|
399
|
+
e.value.userOptions.show && u.value && (v(te) || v(j)) ? (b(), Q(Qe, {
|
|
400
|
+
ref: "details",
|
|
401
|
+
key: `user_option_${a.value}`,
|
|
402
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
403
|
+
color: e.value.style.chart.color,
|
|
404
|
+
isPrinting: v(W),
|
|
405
|
+
isImaging: v(O),
|
|
406
|
+
uid: l.value,
|
|
407
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
408
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
409
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
410
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
411
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
412
|
+
isFullscreen: ae.value,
|
|
413
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
414
|
+
chartElement: n.value,
|
|
415
|
+
position: e.value.userOptions.position,
|
|
416
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
417
|
+
isTooltip: d.value.showTooltip,
|
|
418
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
419
|
+
isAnnotation: Z.value,
|
|
420
|
+
onToggleFullscreen: Fe,
|
|
421
|
+
onGeneratePdf: v(A),
|
|
422
|
+
onGenerateCsv: C,
|
|
423
|
+
onGenerateImage: v(N),
|
|
424
|
+
onToggleTable: fe,
|
|
425
|
+
onToggleTooltip: me,
|
|
426
|
+
onToggleAnnotator: ie,
|
|
427
|
+
style: ne({
|
|
428
|
+
visibility: v(te) ? v(j) ? "visible" : "hidden" : "visible"
|
|
429
|
+
})
|
|
430
|
+
}, _e({ _: 2 }, [
|
|
431
|
+
t.$slots.menuIcon ? {
|
|
432
|
+
name: "menuIcon",
|
|
433
|
+
fn: S(({ isOpen: o, color: k }) => [
|
|
434
|
+
$(t.$slots, "menuIcon", G(L({ isOpen: o, color: k })), void 0, !0)
|
|
435
|
+
]),
|
|
436
|
+
key: "0"
|
|
437
|
+
} : void 0,
|
|
438
|
+
t.$slots.optionPdf ? {
|
|
439
|
+
name: "optionPdf",
|
|
440
|
+
fn: S(() => [
|
|
441
|
+
$(t.$slots, "optionPdf", {}, void 0, !0)
|
|
442
|
+
]),
|
|
443
|
+
key: "1"
|
|
444
|
+
} : void 0,
|
|
445
|
+
t.$slots.optionCsv ? {
|
|
446
|
+
name: "optionCsv",
|
|
447
|
+
fn: S(() => [
|
|
448
|
+
$(t.$slots, "optionCsv", {}, void 0, !0)
|
|
449
|
+
]),
|
|
450
|
+
key: "2"
|
|
451
|
+
} : void 0,
|
|
452
|
+
t.$slots.optionImg ? {
|
|
453
|
+
name: "optionImg",
|
|
454
|
+
fn: S(() => [
|
|
455
|
+
$(t.$slots, "optionImg", {}, void 0, !0)
|
|
456
|
+
]),
|
|
457
|
+
key: "3"
|
|
458
|
+
} : void 0,
|
|
459
|
+
t.$slots.optionTable ? {
|
|
460
|
+
name: "optionTable",
|
|
461
|
+
fn: S(() => [
|
|
462
|
+
$(t.$slots, "optionTable", {}, void 0, !0)
|
|
463
|
+
]),
|
|
464
|
+
key: "4"
|
|
465
|
+
} : void 0,
|
|
466
|
+
t.$slots.optionFullscreen ? {
|
|
467
|
+
name: "optionFullscreen",
|
|
468
|
+
fn: S(({ toggleFullscreen: o, isFullscreen: k }) => [
|
|
469
|
+
$(t.$slots, "optionFullscreen", G(L({ toggleFullscreen: o, isFullscreen: k })), void 0, !0)
|
|
470
|
+
]),
|
|
471
|
+
key: "5"
|
|
472
|
+
} : void 0,
|
|
473
|
+
t.$slots.optionAnnotator ? {
|
|
474
|
+
name: "optionAnnotator",
|
|
475
|
+
fn: S(({ toggleAnnotator: o, isAnnotator: k }) => [
|
|
476
|
+
$(t.$slots, "optionAnnotator", G(L({ toggleAnnotator: o, isAnnotator: k })), void 0, !0)
|
|
477
|
+
]),
|
|
478
|
+
key: "6"
|
|
479
|
+
} : void 0
|
|
480
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : U("", !0),
|
|
481
|
+
u.value ? (b(), V("svg", {
|
|
482
|
+
key: 3,
|
|
483
|
+
ref_key: "svgRef",
|
|
484
|
+
ref: X,
|
|
485
|
+
class: ye({ "vue-data-ui-fullscreen--on": ae.value, "vue-data-ui-fulscreen--off": !ae.value }),
|
|
486
|
+
xmlns: v(Xe),
|
|
487
|
+
viewBox: `${v(le).x} ${v(le).y} ${v(le).width} ${v(le).height}`,
|
|
488
|
+
style: "overflow:hidden;background:transparent;"
|
|
489
|
+
}, [
|
|
490
|
+
ve(nt),
|
|
491
|
+
t.$slots["chart-background"] ? (b(), V("foreignObject", {
|
|
492
|
+
key: 0,
|
|
493
|
+
x: 0,
|
|
494
|
+
y: 0,
|
|
495
|
+
width: c.value.width <= 0 ? 10 : c.value.width,
|
|
496
|
+
height: c.value.height <= 0 ? 10 : c.value.height,
|
|
497
|
+
style: {
|
|
498
|
+
pointerEvents: "none"
|
|
499
|
+
}
|
|
500
|
+
}, [
|
|
501
|
+
$(t.$slots, "chart-background", {}, void 0, !0)
|
|
502
|
+
], 8, gt)) : U("", !0),
|
|
503
|
+
he("g", {
|
|
504
|
+
transform: `translate(${(c.value.width <= 0 ? 10 : c.value.width) / 2}, ${(c.value.height <= 0 ? 10 : c.value.height) / 2})`
|
|
505
|
+
}, [
|
|
506
|
+
(b(!0), V(Re, null, We(_.value, (o, k) => (b(), V("g", null, [
|
|
507
|
+
(b(), V("text", {
|
|
508
|
+
fill: o.color,
|
|
509
|
+
"font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
|
|
510
|
+
key: k,
|
|
511
|
+
x: o.x,
|
|
512
|
+
y: o.y,
|
|
513
|
+
"font-size": o.fontSize,
|
|
514
|
+
transform: `translate(${o.width / 2}, ${o.height / 2})`,
|
|
515
|
+
class: ye({ animated: e.value.useCssAnimation, "word-selected": E.value && E.value === o.id && d.value.showTooltip, "word-not-selected": E.value && E.value !== o.id && d.value.showTooltip }),
|
|
516
|
+
"text-anchor": "middle",
|
|
517
|
+
"dominant-baseline": "central",
|
|
518
|
+
onMouseover: (y) => Oe(o),
|
|
519
|
+
onMouseleave: s[0] || (s[0] = (y) => {
|
|
520
|
+
E.value = null, P.value = !1;
|
|
521
|
+
}),
|
|
522
|
+
style: ne(`animation-delay:${k * e.value.animationDelayMs}ms !important;`)
|
|
523
|
+
}, be(o.name), 47, bt))
|
|
524
|
+
]))), 256))
|
|
525
|
+
], 8, yt),
|
|
526
|
+
$(t.$slots, "svg", {
|
|
527
|
+
svg: { height: c.value.height, width: c.value.width }
|
|
528
|
+
}, void 0, !0)
|
|
529
|
+
], 10, pt)) : U("", !0),
|
|
530
|
+
t.$slots.watermark ? (b(), V("div", wt, [
|
|
531
|
+
$(t.$slots, "watermark", G(L({ isPrinting: v(W) || v(O) })), void 0, !0)
|
|
532
|
+
])) : U("", !0),
|
|
533
|
+
v(ze) ? (b(), V("div", Ct, [
|
|
534
|
+
$(t.$slots, "reset-action", { reset: v(pe) }, () => [
|
|
535
|
+
he("button", {
|
|
536
|
+
"data-cy-reset": "",
|
|
537
|
+
tabindex: "0",
|
|
538
|
+
role: "button",
|
|
539
|
+
class: "vue-data-ui-refresh-button",
|
|
540
|
+
style: ne({
|
|
541
|
+
background: e.value.style.chart.backgroundColor
|
|
542
|
+
}),
|
|
543
|
+
onClick: s[1] || (s[1] = (o) => v(pe)(!0))
|
|
544
|
+
}, [
|
|
545
|
+
ve(dt, {
|
|
546
|
+
name: "refresh",
|
|
547
|
+
stroke: e.value.style.chart.color
|
|
548
|
+
}, null, 8, ["stroke"])
|
|
549
|
+
], 4)
|
|
550
|
+
], !0)
|
|
551
|
+
])) : U("", !0),
|
|
552
|
+
ve(st, {
|
|
553
|
+
show: d.value.showTooltip && P.value,
|
|
554
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
555
|
+
color: e.value.style.chart.tooltip.color,
|
|
556
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
557
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
558
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
559
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
560
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
561
|
+
position: e.value.style.chart.tooltip.position,
|
|
562
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
563
|
+
parent: n.value,
|
|
564
|
+
content: ue.value,
|
|
565
|
+
isCustom: J.value
|
|
566
|
+
}, {
|
|
567
|
+
"tooltip-before": S(() => [
|
|
568
|
+
$(t.$slots, "tooltip-before", G(L({ ...ce.value })), void 0, !0)
|
|
569
|
+
]),
|
|
570
|
+
"tooltip-after": S(() => [
|
|
571
|
+
$(t.$slots, "tooltip-after", G(L({ ...ce.value })), void 0, !0)
|
|
572
|
+
]),
|
|
573
|
+
_: 3
|
|
574
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
575
|
+
t.$slots.source ? (b(), V("div", {
|
|
576
|
+
key: 6,
|
|
577
|
+
ref_key: "source",
|
|
578
|
+
ref: F,
|
|
579
|
+
dir: "auto"
|
|
580
|
+
}, [
|
|
581
|
+
$(t.$slots, "source", {}, void 0, !0)
|
|
582
|
+
], 512)) : U("", !0),
|
|
583
|
+
u.value ? (b(), Q(at, {
|
|
584
|
+
key: 7,
|
|
585
|
+
hideDetails: "",
|
|
586
|
+
config: {
|
|
587
|
+
open: d.value.showTable,
|
|
588
|
+
maxHeight: 1e4,
|
|
589
|
+
body: {
|
|
590
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
591
|
+
color: e.value.style.chart.color
|
|
592
|
+
},
|
|
593
|
+
head: {
|
|
594
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
595
|
+
color: e.value.style.chart.color
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}, {
|
|
599
|
+
content: S(() => [
|
|
600
|
+
(b(), Q(lt, {
|
|
601
|
+
key: `table_${x.value}`,
|
|
602
|
+
colNames: oe.value.colNames,
|
|
603
|
+
head: oe.value.head,
|
|
604
|
+
body: oe.value.body,
|
|
605
|
+
config: oe.value.config,
|
|
606
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
607
|
+
onClose: s[2] || (s[2] = (o) => d.value.showTable = !1)
|
|
608
|
+
}, {
|
|
609
|
+
th: S(({ th: o }) => [
|
|
610
|
+
he("div", {
|
|
611
|
+
innerHTML: o,
|
|
612
|
+
style: { display: "flex", "align-items": "center" }
|
|
613
|
+
}, null, 8, kt)
|
|
614
|
+
]),
|
|
615
|
+
td: S(({ td: o }) => [
|
|
616
|
+
Ve(be(o.name || o), 1)
|
|
617
|
+
]),
|
|
618
|
+
_: 1
|
|
619
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
620
|
+
]),
|
|
621
|
+
_: 1
|
|
622
|
+
}, 8, ["config"])) : U("", !0)
|
|
623
|
+
], 44, mt));
|
|
624
|
+
}
|
|
625
|
+
}, Bt = /* @__PURE__ */ vt($t, [["__scopeId", "data-v-d3519257"]]);
|
|
626
|
+
export {
|
|
627
|
+
Bt as default
|
|
628
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-CuIvJLJx.cjs"),pe=require("./Title-CcW9kRtT.cjs"),ne=require("./usePrinter-BwwdT1Uh.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-ZlcsLKVn.cjs"),ge=require("./DataTable-DJyyRRlW.cjs"),re=require("./useNestedProp-B3OcLUMU.cjs"),ye=require("./PackageVersion-Di08b2vs.cjs"),be=require("./Tooltip-BzDUupFB.cjs"),we=require("./PenAndPaper-C0I2pjPq.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-OIGwOnCM.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se({word:b,fontSize:p,pad:f,canvas:i,ctx:c,svg:n}){c.save(),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`;const a=c.measureText(b.name),r=Math.ceil(a.width)+2+(f?f*2:0),u=Math.ceil(p)+2+(f?f*2:0);i.width=r,i.height=u,c.clearRect(0,0,r,u),c.font=`${n.style&&n.style.bold?"bold ":""}${p}px Arial`,c.textAlign="center",c.textBaseline="middle",c.fillStyle="black",c.fillText(b.name,r/2,u/2);const S=c.getImageData(0,0,r,u).data,C=[];for(let T=0;T<u;T+=1)for(let t=0;t<r;t+=1)S[(T*r+t)*4+3]>1&&C.push([t,T]);return c.restore(),{w:r,h:u,wordMask:C}}function ue({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];if(r<0||u<0||r>=p||u>=f||b[u*p+r])return!1}return!0}function ie({mask:b,maskW:p,maskH:f,wx:i,wy:c,wordMask:n}){for(let a=0;a<n.length;a+=1){const r=i+n[a][0],u=c+n[a][1];r>=0&&u>=0&&r<p&&u<f&&(b[u*p+r]=1)}}function Te({wordMask:b,w:p,h:f,dilation:i}){const c=new Set(b.map(([a,r])=>`${a},${r}`)),n=new Set(c);for(let[a,r]of b)for(let u=-i;u<=i;u+=1)for(let $=-i;$<=i;$+=1){if(u===0&&$===0)continue;const S=a+u,C=r+$;S>=0&&S<p&&C>=0&&C<f&&n.add(`${S},${C}`)}return Array.from(n).map(a=>a.split(",").map(Number))}function Pe({words:b,proximity:p=0,svg:f}){const{width:i,height:c}=f,n=Math.round(i),a=Math.round(c),r=1,u=f.minFontSize,$=f.maxFontSize,S=b.map(m=>m.value),C=Math.min(...S),T=Math.max(...S),t=new Uint8Array(n*a),O=document.createElement("canvas"),E=O.getContext("2d",{willReadFrequently:!0});O.width=n,O.height=a;const R=6,H=2,L=2,q=1,W=Math.floor(n/2),d=Math.floor(a/2),Y=[...b].sort((m,P)=>P.value-m.value),U=[];for(const m of Y){let P=u;T!==C&&(P=(m.value-C)/(T-C)*($-u)+u),P=Math.max(u,Math.min($,P));let A=!1,N=P;for(;!A&&N>=r;){let{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});v=Te({wordMask:v,w:z,h:B,dilation:2});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<1e4;){for(let x=0;x<360;x+=R){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=H}A||(N-=1)}if(!A&&N<r){N=r;const{w:z,h:B,wordMask:v}=se({word:m,fontSize:N,pad:p,canvas:O,ctx:E,svg:f});let F=0,M=0;for(;F<Math.max(n,a)&&!A&&M<25e3;){for(let x=0;x<360;x+=L){M+=1;const g=Math.round(W+F*Math.cos(x*Math.PI/180)-z/2),w=Math.round(d+F*Math.sin(x*Math.PI/180)-B/2);if(!(g<0||w<0||g+z>n||w+B>a)&&ue({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v})){U.push({...m,x:g-n/2,y:w-a/2,fontSize:N,width:z,height:B,angle:0}),ie({mask:t,maskW:n,maskH:a,wx:g,wy:w,wordMask:v}),A=!0;break}}F+=q}}}return U.sort((m,P)=>P.fontSize-m.fontSize)}const Ne=["id"],ze=["xmlns","viewBox"],Be=["width","height"],Fe=["transform"],Me=["fill","font-weight","x","y","font-size","transform","onMouseover"],Oe={key:4,class:"vue-data-ui-watermark"},Ae={key:5,"data-dom-to-png-ignore":"",class:"reset-wrapper"},Ve=["innerHTML"],Ie={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(b,{expose:p}){e.useCssVars(o=>({"1461b4f2":o.slicerColor}));const{vue_ui_word_cloud:f}=h.useConfig(),i=b,c=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),n=e.ref(h.createUid()),a=e.ref(0),r=e.ref(null),u=e.ref(null),$=e.ref(null),S=e.ref(0),C=e.ref(0),T=e.ref(!1),t=e.computed({get:()=>W(),set:o=>o}),O=e.ref(E());function E(){return typeof i.dataset=="string"?h.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,s)=>({...o,value:h.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{O.value=E(),x()});const{userOptionsVisible:R,setUserOptionsVisibility:H,keepUserOptionState:L}=ke.useUserOptionState({config:t.value}),{svgRef:q}=Ce.useChartAccessibility({config:t.value.style.chart.title});function W(){const o=re.useNestedProp({userConfig:i.config,defaultConfig:f});return o.theme?{...re.useNestedProp({userConfig:h.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:h.themePalettes[o.theme]||h.palette}:o}e.watch(()=>i.config,o=>{t.value=W(),R.value=!t.value.userOptions.showOnChartHover,P(),S.value+=1,C.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const d=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}),Y=ee.debounce(()=>{x()},10),U=ee.throttle(()=>{const{width:o,height:s}=ee.useResponsive({chart:r.value,title:t.value.style.chart.title.text?u.value:null,source:$.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=s,e.nextTick(Y)})}),m=e.ref(null);e.onMounted(P);function P(){h.objectIsEmpty(i.dataset)?h.error({componentName:"VueUiWordCloud",type:"dataset"}):O.value.forEach((o,s)=>{h.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{c.value=!1,h.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:s})})}),t.value.responsive&&(m.value=new ResizeObserver(U),m.value.observe(r.value.parentNode))}e.onBeforeUnmount(()=>{m.value&&m.value.disconnect()});const{isPrinting:A,isImaging:N,generatePdf:z,generateImage:B}=ne.usePrinter({elementId:`wordCloud_${n.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function F(o,s,l="Arial"){const y=document.createElement("canvas").getContext("2d");return y.font=`${s}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:y.measureText(o).width+t.value.style.chart.words.proximity,height:s}}const M=e.ref([]);e.watch(()=>i.dataset,x,{immediate:!0});function x(){const o=[...O.value].map(y=>y.value),s=Math.max(...o),l=Math.min(...o),k=[...O.value].map((y,V)=>{let I=(y.value-l)/(s-l)*(d.value.maxFontSize-d.value.minFontSize)+d.value.minFontSize;I=isNaN(I)?d.value.minFontSize:I;const ae=F(y.name,I);return{...y,id:h.createUid(),fontSize:I,width:ae.width,height:ae.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[V]||t.value.customPalette[V%t.value.customPalette.length]||h.palette[V]||h.palette[V%h.palette.length]:t.value.style.chart.words.color}});M.value=Pe({words:k,svg:d.value,proximity:t.value.style.chart.words.proximity})}const g=e.computed(()=>{const o=M.value.map(l=>({name:l.name,color:l.color})),s=M.value.map(l=>l.value);return{head:o,body:s}});function w(){e.nextTick(()=>{const o=g.value.head.map((k,y)=>[[k.name],[g.value.body[y]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=h.createCsvContent(s);h.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const j=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=g.value.head.map((y,V)=>{const I=h.dataLabel({p:t.value.table.td.prefix,v:g.value.body[V],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name},I]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:s,config:l}}),X=e.ref(!1);function ce(o){X.value=o,a.value+=1}function de(){return M.value}function te(){v.value.showTable=!v.value.showTable}function oe(){v.value.showTooltip=!v.value.showTooltip}const D=e.ref(!1);function J(){D.value=!D.value}const ve=e.computed(()=>!D.value&&t.value.style.chart.zoom.show),{viewBox:Z,resetZoom:le,isZoom:he}=xe.usePanZoom(q,{x:0,y:0,width:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height},1,ve);p({getData:de,generateCsv:w,generatePdf:z,generateImage:B,toggleTable:te,toggleTooltip:oe,toggleAnnotator:J});const _=e.ref(null),G=e.ref(!1),K=e.ref(""),Q=e.ref(null);function fe(o){if(!v.value.showTooltip)return;_.value=o.id,Q.value={datapoint:o,config:t.value};const s=t.value.style.chart.tooltip.customFormat;if(G.value=!1,h.isFunction(s))try{const l=s({datapoint:o,config:t.value});typeof l=="string"&&(K.value=l,G.value=!0)}catch{console.warn("Custom format cannot be applied."),G.value=!1}if(!G.value){let l=`<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>`;K.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}T.value=!0}return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:r,id:`wordCloud_${n.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:s[3]||(s[3]=()=>e.unref(H)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(H)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we.PenAndPaper,{key:0,svgRef:e.unref(q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:D.value,onClose:J},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:u,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${S.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&&c.value&&(e.unref(L)||e.unref(R))?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${a.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(N),uid:n.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:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:r.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:v.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:D.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(z),onGenerateCsv:w,onGenerateImage:e.unref(B),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(L)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:k})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:k})),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:l,isFullscreen:k})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:k})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:k})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:k})),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),c.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:q,class:e.normalizeClass({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),xmlns:e.unref(h.XMLNS),viewBox:`${e.unref(Z).x} ${e.unref(Z).y} ${e.unref(Z).width} ${e.unref(Z).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:d.value.width<=0?10:d.value.width,height:d.value.height<=0?10:d.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(d.value.width<=0?10:d.value.width)/2}, ${(d.value.height<=0?10:d.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(l,k)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(),e.createElementBlock("text",{fill:l.color,"font-weight":t.value.style.chart.words.bold?"bold":"normal",key:k,x:l.x,y:l.y,"font-size":l.fontSize,transform:`translate(${l.width/2}, ${l.height/2})`,class:e.normalizeClass({animated:t.value.useCssAnimation,"word-selected":_.value&&_.value===l.id&&v.value.showTooltip,"word-not-selected":_.value&&_.value!==l.id&&v.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:y=>fe(l),onMouseleave:s[0]||(s[0]=y=>{_.value=null,T.value=!1}),style:e.normalizeStyle(`animation-delay:${k*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Me))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:d.value.height,width:d.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(A)||e.unref(N)})),void 0,!0)])):e.createCommentVNode("",!0),e.unref(he)?(e.openBlock(),e.createElementBlock("div",Ae,[e.renderSlot(o.$slots,"reset-action",{reset:e.unref(le)},()=>[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:s[1]||(s[1]=l=>e.unref(le)(!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:v.value.showTooltip&&T.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:r.value,content:K.value,isCustom:G.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Q.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:$,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createBlock(me.default,{key:7,hideDetails:"",config:{open:v.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_${C.value}`,colNames:j.value.colNames,head:j.value.head,body:j.value.body,config:j.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=l=>v.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ve)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],44,Ne))}},_e=Se._export_sfc(Ie,[["__scopeId","data-v-d3519257"]]);exports.default=_e;
|