vue-data-ui 2.10.1 → 2.10.2-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/dist/{Arrow-QSJq1QXz.cjs → Arrow-DiKmN6eo.cjs} +1 -1
- package/dist/{Arrow-BiwOlXfX.js → Arrow-DvrzYEem.js} +1 -1
- package/dist/{BaseIcon-CugzlRIB.js → BaseIcon-1opvCDaQ.js} +1 -1
- package/dist/{BaseIcon-CccbUmmx.cjs → BaseIcon-BRmHoHji.cjs} +1 -1
- package/dist/{ColorPicker-DANVWfwS.cjs → ColorPicker-BQY41CwB.cjs} +1 -1
- package/dist/{ColorPicker-Bqv3ZR7N.js → ColorPicker-G7dML0BS.js} +3 -3
- package/dist/{DataTable-BtWdtAUt.cjs → DataTable-DSZwidNa.cjs} +1 -1
- package/dist/{DataTable--GI-DrhZ.js → DataTable-DVAtzq48.js} +2 -2
- package/dist/{Legend-Bh3njoaI.js → Legend-ClChB3yO.js} +2 -2
- package/dist/{Legend-BYAydsbU.cjs → Legend-DUY48WfL.cjs} +1 -1
- package/dist/{PackageVersion-CIG1jUoQ.cjs → PackageVersion-B5BeU3j9.cjs} +1 -1
- package/dist/{PackageVersion-GwcyKwzb.js → PackageVersion-BVqKnl8d.js} +1 -1
- package/dist/{PenAndPaper-C8nE9Htd.js → PenAndPaper-3jmU5GLm.js} +3 -3
- package/dist/{PenAndPaper-CvqghU08.cjs → PenAndPaper-Bt9JtDPx.cjs} +1 -1
- package/dist/{Shape-CoxSOYo0.js → Shape-BOc09O7_.js} +1 -1
- package/dist/{Shape-DuCjoYEa.cjs → Shape-x1m9d0T3.cjs} +1 -1
- package/dist/{Slicer-iaOAIWyg.cjs → Slicer-B7Gt3_Nl.cjs} +1 -1
- package/dist/{Slicer-DCRA_8yB.js → Slicer-dM7HrmEG.js} +2 -2
- package/dist/{Title-CASnfBZ_.js → Title-Bsx1bBKe.js} +1 -1
- package/dist/{Title-CQxTyQdP.cjs → Title-CcgS3et4.cjs} +1 -1
- package/dist/{Tooltip-j8icrqWr.js → Tooltip-C8rHMEUK.js} +1 -1
- package/dist/{Tooltip-DpeUgH6i.cjs → Tooltip-DWCw-8oz.cjs} +1 -1
- package/dist/{dom-to-png-C8nt61zy.cjs → dom-to-png-CHXF3z4X.cjs} +1 -1
- package/dist/{dom-to-png-CaJWmfYX.js → dom-to-png-JSc0Wutr.js} +1 -1
- package/dist/{img-D3H0MQ0_.js → img-7aPSvY3c.js} +1 -1
- package/dist/{img-5e_6eDJP.cjs → img-Czqt0BR-.cjs} +1 -1
- package/dist/index-BzyzkUsY.cjs +9 -0
- package/dist/{index-CvceFsAt.js → index-DooXAewR.js} +3 -1
- package/dist/{pdf-0YdU2asU.cjs → pdf-B9tvtSl9.cjs} +1 -1
- package/dist/{pdf-D39cNF6K.js → pdf-CS-UdLZt.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-BKE4eQv3.cjs → useNestedProp-CWnDOg1g.cjs} +1 -1
- package/dist/{useNestedProp-CCO2zzSz.js → useNestedProp-CeA-IFZT.js} +1 -1
- package/dist/{usePrinter-DyQISLol.cjs → usePrinter-CBfmcTyQ.cjs} +1 -1
- package/dist/{usePrinter-ximty4az.js → usePrinter-rVrVRW1p.js} +3 -3
- package/dist/{vue-data-ui-Cnu3pIt-.cjs → vue-data-ui-B7d3aUDp.cjs} +1 -1
- package/dist/{vue-data-ui-4Sp3kGRk.js → vue-data-ui-Tce5_-Eb.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-WcfPdvHo.js → vue-ui-3d-bar-B8Xjt8JB.js} +9 -9
- package/dist/{vue-ui-3d-bar-CpZKk74W.cjs → vue-ui-3d-bar-gO5QnUl-.cjs} +1 -1
- package/dist/{vue-ui-accordion-B6zl7smQ.cjs → vue-ui-accordion-B4ML49fc.cjs} +1 -1
- package/dist/{vue-ui-accordion-C-Crf9Kp.js → vue-ui-accordion-DLa3SOIQ.js} +3 -3
- package/dist/{vue-ui-age-pyramid-pBC0KAC8.js → vue-ui-age-pyramid-BRLXIdCs.js} +10 -10
- package/dist/{vue-ui-age-pyramid-C9w9oTK4.cjs → vue-ui-age-pyramid-DLDGvlfL.cjs} +1 -1
- package/dist/{vue-ui-annotator-BmRIPGkd.cjs → vue-ui-annotator-DpgWa9Cn.cjs} +1 -1
- package/dist/{vue-ui-annotator-DM_4LsN-.js → vue-ui-annotator-NtzLi6e5.js} +2 -2
- package/dist/{vue-ui-bullet-DOhxxyQ7.cjs → vue-ui-bullet-DIGwu5xc.cjs} +1 -1
- package/dist/{vue-ui-bullet-Stv9P9bD.js → vue-ui-bullet-oESdTIjM.js} +8 -8
- package/dist/{vue-ui-candlestick-BOhHukQT.js → vue-ui-candlestick-CnAI7klD.js} +11 -11
- package/dist/{vue-ui-candlestick-CxpYZEKV.cjs → vue-ui-candlestick-Dsb2-JRF.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CwUTxYnK.js → vue-ui-carousel-table-CAmFkQql.js} +4 -4
- package/dist/{vue-ui-carousel-table-DqbmvlOl.cjs → vue-ui-carousel-table-DUu0feRu.cjs} +1 -1
- package/dist/{vue-ui-chestnut-C8WpvC_j.cjs → vue-ui-chestnut-Bkg_-3Jh.cjs} +1 -1
- package/dist/{vue-ui-chestnut-g5CchL-G.js → vue-ui-chestnut-CCrwb8aH.js} +8 -8
- package/dist/{vue-ui-circle-pack-C-kJTnDN.js → vue-ui-circle-pack-Baw5MjxR.js} +9 -9
- package/dist/{vue-ui-circle-pack-C-b8MtVb.cjs → vue-ui-circle-pack-D2LmdTWH.cjs} +1 -1
- package/dist/{vue-ui-cursor-BXAcaXWy.js → vue-ui-cursor-BC3eK7ZM.js} +2 -2
- package/dist/{vue-ui-cursor-BYIDY_XT.cjs → vue-ui-cursor-CfMz226i.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CuJXUgxz.js → vue-ui-dashboard-BOU2cJ2b.js} +62 -62
- package/dist/{vue-ui-dashboard-CRolbu6z.cjs → vue-ui-dashboard-OU8D2OTa.cjs} +1 -1
- package/dist/{vue-ui-digits-NO6lt99x.cjs → vue-ui-digits-BSLSYNb7.cjs} +1 -1
- package/dist/{vue-ui-digits-DSOpmvDy.js → vue-ui-digits-DGQWpbm2.js} +2 -2
- package/dist/{vue-ui-donut-B_iglo-e.cjs → vue-ui-donut-DO9gOTvW.cjs} +1 -1
- package/dist/{vue-ui-donut-xBtAG6tV.js → vue-ui-donut-LglxgRri.js} +12 -12
- package/dist/{vue-ui-donut-evolution-B3vjCqx3.js → vue-ui-donut-evolution-CGnR05_I.js} +11 -11
- package/dist/{vue-ui-donut-evolution-B-qz0knN.cjs → vue-ui-donut-evolution-jwuqDtAA.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BtZEureY.cjs → vue-ui-dumbbell-CSE5loIk.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-sb2hF1XY.js → vue-ui-dumbbell-DkBWRski.js} +10 -10
- package/dist/{vue-ui-flow-BnOUifwC.js → vue-ui-flow-B2AXCnm5.js} +9 -9
- package/dist/{vue-ui-flow-BGWHcBp1.cjs → vue-ui-flow-tg58e_cr.cjs} +1 -1
- package/dist/{vue-ui-funnel-CmlGCH6m.cjs → vue-ui-funnel-DcQWW2NS.cjs} +1 -1
- package/dist/{vue-ui-funnel-CK560PmT.js → vue-ui-funnel-DuzxYzyD.js} +9 -9
- package/dist/{vue-ui-galaxy-DX86TMbo.js → vue-ui-galaxy-ESjv8ZqA.js} +11 -11
- package/dist/{vue-ui-galaxy-uFa9S6wW.cjs → vue-ui-galaxy-ySnbPS-x.cjs} +1 -1
- package/dist/{vue-ui-gauge-Bvibjzuh.cjs → vue-ui-gauge-Bwo4YkkZ.cjs} +1 -1
- package/dist/{vue-ui-gauge-p7HDLD8Q.js → vue-ui-gauge-vp6PLuJ2.js} +7 -7
- package/dist/{vue-ui-gizmo-O7xD1RVH.js → vue-ui-gizmo-BrN-J1Ee.js} +3 -3
- package/dist/{vue-ui-gizmo-mGk58l53.cjs → vue-ui-gizmo-CddlRjeu.cjs} +1 -1
- package/dist/{vue-ui-heatmap-zJv6LywK.js → vue-ui-heatmap-CBRtJ8Cd.js} +10 -10
- package/dist/{vue-ui-heatmap-Bgd9OCN7.cjs → vue-ui-heatmap-s-ma5UVQ.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DLQ_iKLU.js → vue-ui-history-plot-CaZhV-nU.js} +11 -11
- package/dist/{vue-ui-history-plot-ByohcmFh.cjs → vue-ui-history-plot-Yc_8sbsM.cjs} +1 -1
- package/dist/{vue-ui-kpi-BqAVbl-C.js → vue-ui-kpi-CjkmnlkE.js} +3 -3
- package/dist/{vue-ui-kpi-q4rtUh1J.cjs → vue-ui-kpi-IRvK3TS2.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BuaDAatX.cjs → vue-ui-mini-loader-BQzcs6uB.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BUI1DhPA.js → vue-ui-mini-loader-CYVzNUON.js} +2 -2
- package/dist/{vue-ui-molecule-DT_XgzVP.js → vue-ui-molecule-Bci1mou3.js} +11 -11
- package/dist/{vue-ui-molecule-CiKnN8sY.cjs → vue-ui-molecule-DJ5RuqdD.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-mZEDM0NK.js → vue-ui-mood-radar-BQBLof4Z.js} +11 -11
- package/dist/{vue-ui-mood-radar-DJ7zpX69.cjs → vue-ui-mood-radar-CjKeANNT.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-ADHpRSrO.js → vue-ui-nested-donuts-DrNhJSPg.js} +11 -11
- package/dist/{vue-ui-nested-donuts-B7zoKnsX.cjs → vue-ui-nested-donuts-a1bC0MIy.cjs} +1 -1
- package/dist/{vue-ui-onion-KlRwElox.js → vue-ui-onion-S2zaH8gC.js} +11 -11
- package/dist/{vue-ui-onion-Bvs_owV9.cjs → vue-ui-onion-Xy3gKPoa.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DxfFMJcf.js → vue-ui-parallel-coordinate-plot-B1SL_FlT.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-j0C-98v6.cjs → vue-ui-parallel-coordinate-plot-DlDkqRXZ.cjs} +1 -1
- package/dist/{vue-ui-quadrant-mTEq7vUM.js → vue-ui-quadrant-BbI_WV9P.js} +12 -12
- package/dist/{vue-ui-quadrant-FrEtaNmB.cjs → vue-ui-quadrant-Er30dYmu.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-wDAfCdZi.js → vue-ui-quick-chart-CuQeZuMv.js} +9 -9
- package/dist/{vue-ui-quick-chart-xomrTLjF.cjs → vue-ui-quick-chart-F5MYUxBh.cjs} +1 -1
- package/dist/{vue-ui-radar-CwIDYXn3.cjs → vue-ui-radar-ODXlpihN.cjs} +1 -1
- package/dist/{vue-ui-radar-tW6hVA3D.js → vue-ui-radar-ZGmdrOWg.js} +12 -12
- package/dist/{vue-ui-rating-D_TuyOn5.cjs → vue-ui-rating-CGDzme3N.cjs} +1 -1
- package/dist/{vue-ui-rating-BXxHwgli.js → vue-ui-rating-kTiSrHnd.js} +2 -2
- package/dist/{vue-ui-relation-circle-D11cM4iJ.js → vue-ui-relation-circle-CbQYCuW1.js} +7 -7
- package/dist/{vue-ui-relation-circle-CxJJtooQ.cjs → vue-ui-relation-circle-Ciae1qCQ.cjs} +1 -1
- package/dist/{vue-ui-ridgeline-gD8UVkMZ.js → vue-ui-ridgeline-BYyeFIhk.js} +12 -12
- package/dist/{vue-ui-ridgeline-DRC1lIXN.cjs → vue-ui-ridgeline-c1obnD3W.cjs} +1 -1
- package/dist/{vue-ui-rings-DSJRz7iR.js → vue-ui-rings-DlT7Q9C_.js} +12 -12
- package/dist/{vue-ui-rings-r4xAd8lk.cjs → vue-ui-rings-JyiU6_sc.cjs} +1 -1
- package/dist/{vue-ui-scatter-W1OKGdmQ.cjs → vue-ui-scatter-CuJCs6sT.cjs} +1 -1
- package/dist/{vue-ui-scatter-BzC8zkfh.js → vue-ui-scatter-ntN0LVrZ.js} +12 -12
- package/dist/{vue-ui-skeleton-eU-_7BdW.js → vue-ui-skeleton-BJBwGLvQ.js} +3 -3
- package/dist/{vue-ui-skeleton-DRxcfKaL.cjs → vue-ui-skeleton-CZb-ZjJ-.cjs} +1 -1
- package/dist/{vue-ui-smiley-Bm7OiLoq.cjs → vue-ui-smiley-BPtUaxih.cjs} +1 -1
- package/dist/{vue-ui-smiley-CcekqVQx.js → vue-ui-smiley-TZDNziHi.js} +2 -2
- package/dist/{vue-ui-spark-trend-BN42Fnf2.js → vue-ui-spark-trend-Dcr7S70f.js} +5 -5
- package/dist/{vue-ui-spark-trend-mobyLUha.cjs → vue-ui-spark-trend-bueclFIq.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-D3iVdCuI.cjs → vue-ui-sparkbar-BQlWKjxx.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-hgySC-4O.js → vue-ui-sparkbar-CmMSpIWT.js} +4 -4
- package/dist/{vue-ui-sparkgauge-C6liWKmp.cjs → vue-ui-sparkgauge-B7nCrYcd.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dm2vyIx8.js → vue-ui-sparkgauge-BZyTGzW5.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-D07Q0Gk7.js → vue-ui-sparkhistogram-C9a9yysC.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-BnzOIDWc.cjs → vue-ui-sparkhistogram-Dlnfvocd.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CQVRc2MO.cjs → vue-ui-sparkline-BYXy4_ye.cjs} +1 -1
- package/dist/{vue-ui-sparkline-CACBeqAa.js → vue-ui-sparkline-SWxohDk9.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-UVd-HK1b.js → vue-ui-sparkstackbar-B2kazMC5.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DFkUjUYc.cjs → vue-ui-sparkstackbar-DLHaGMca.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DxovHxOT.js → vue-ui-stackbar-AvRusEob.js} +13 -13
- package/dist/{vue-ui-stackbar-0sIYiF_A.cjs → vue-ui-stackbar-DFHLxQ-o.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Cvba07hW.cjs → vue-ui-strip-plot-BtqRC7h3.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-HxXmARoE.js → vue-ui-strip-plot-ISii3FHM.js} +11 -11
- package/dist/{vue-ui-table-0pQLbxUq.js → vue-ui-table-DKsKbnap.js} +3 -3
- package/dist/{vue-ui-table-BX80lD6q.cjs → vue-ui-table-DeSxVc3g.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DV26Cbjg.cjs → vue-ui-table-heatmap-C5G_CELV.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DE2bkasJ.js → vue-ui-table-heatmap-CLLk1u2z.js} +4 -4
- package/dist/{vue-ui-table-sparkline-Ch4LVVdJ.cjs → vue-ui-table-sparkline-5vuYcAME.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DGECSD-C.js → vue-ui-table-sparkline-BncY35Is.js} +5 -5
- package/dist/{vue-ui-thermometer-B29iIlzg.cjs → vue-ui-thermometer-jm_63HZL.cjs} +1 -1
- package/dist/{vue-ui-thermometer-WFaVRptV.js → vue-ui-thermometer-xOTD55R3.js} +7 -7
- package/dist/{vue-ui-timer-D1rjeIkc.cjs → vue-ui-timer-DmwSXmTW.cjs} +1 -1
- package/dist/{vue-ui-timer-ElOn6Dkf.js → vue-ui-timer-m_ncHz58.js} +5 -5
- package/dist/{vue-ui-tiremarks-BczAiMV8.cjs → vue-ui-tiremarks-0UU9Mw4i.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Cfv0NwR7.js → vue-ui-tiremarks-GaLo5qjV.js} +7 -7
- package/dist/{vue-ui-treemap-BFN5b5_L.cjs → vue-ui-treemap-BVFJiMAZ.cjs} +1 -1
- package/dist/{vue-ui-treemap-DxEbCrpf.js → vue-ui-treemap-CFSNLj9T.js} +12 -12
- package/dist/{vue-ui-vertical-bar-590VwiLn.cjs → vue-ui-vertical-bar-CWaIXNCd.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-ClDqkmhk.js → vue-ui-vertical-bar-z2t7Pcta.js} +12 -12
- package/dist/{vue-ui-waffle-wYqijCXR.js → vue-ui-waffle-B57vn44W.js} +12 -12
- package/dist/{vue-ui-waffle-BQblwMWf.cjs → vue-ui-waffle-DFH1pRat.cjs} +1 -1
- package/dist/{vue-ui-wheel-CZMPP-La.cjs → vue-ui-wheel-BInY09xB.cjs} +1 -1
- package/dist/{vue-ui-wheel-DVOyAzMM.js → vue-ui-wheel-CeDuJhdJ.js} +7 -7
- package/dist/vue-ui-word-cloud-CrQ8lUc4.js +630 -0
- package/dist/vue-ui-word-cloud-OChNmjNF.cjs +1 -0
- package/dist/{vue-ui-world-CvDlnus7.cjs → vue-ui-world-KRmkbVed.cjs} +1 -1
- package/dist/{vue-ui-world-h-pQmlJM.js → vue-ui-world-OzkiVQUb.js} +11 -11
- package/dist/{vue-ui-xy-BkmYEX1m.js → vue-ui-xy-CfE-caY1.js} +16 -16
- package/dist/{vue-ui-xy-canvas-BDpExYvk.cjs → vue-ui-xy-canvas-CkjbrUpb.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CwuoyOXd.js → vue-ui-xy-canvas-DtQzJAsY.js} +12 -12
- package/dist/{vue-ui-xy-DDNWiRTX.cjs → vue-ui-xy-vkK0CrKz.cjs} +2 -2
- package/package.json +1 -1
- package/dist/index-CHDUeW3x.cjs +0 -9
- package/dist/vue-ui-word-cloud-8o2Ipe1I.js +0 -628
- package/dist/vue-ui-word-cloud-DAKB2THN.cjs +0 -1
|
@@ -1,628 +0,0 @@
|
|
|
1
|
-
import { useCssVars as Ne, computed as K, ref as h, watch as de, onMounted as _e, onBeforeUnmount as Ae, createElementBlock as V, openBlock as b, unref as v, normalizeStyle as ne, createBlock as Q, createCommentVNode as U, createVNode as ve, createSlots as Ie, 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, ai 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-CvceFsAt.js";
|
|
3
|
-
import { _ as Je } from "./Title-CASnfBZ_.js";
|
|
4
|
-
import { u as Ke, U as Qe } from "./usePrinter-ximty4az.js";
|
|
5
|
-
import { t as et, u as tt, d as ot } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
-
import at from "./vue-ui-accordion-C-Crf9Kp.js";
|
|
7
|
-
import { D as lt } from "./DataTable--GI-DrhZ.js";
|
|
8
|
-
import { u as $e } from "./useNestedProp-CCO2zzSz.js";
|
|
9
|
-
import { _ as nt } from "./PackageVersion-GwcyKwzb.js";
|
|
10
|
-
import { _ as st } from "./Tooltip-j8icrqWr.js";
|
|
11
|
-
import { _ as rt } from "./PenAndPaper-C8nE9Htd.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-CugzlRIB.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 z = 0; z < r; z += 1)
|
|
30
|
-
for (let e = 0; e < n; e += 1)
|
|
31
|
-
M[(z * n + e) * 4 + 3] > 1 && x.push([e, z]);
|
|
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), z = 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, O) => O.value - p.value), Y = [];
|
|
66
|
-
for (const p of re) {
|
|
67
|
-
let O = r;
|
|
68
|
-
z !== x && (O = (p.value - x) / (z - x) * (F - r) + r), O = Math.max(r, Math.min(F, O));
|
|
69
|
-
let W = !1, P = O;
|
|
70
|
-
for (; !W && P >= n; ) {
|
|
71
|
-
let { w: N, h: _, wordMask: d } = xe({
|
|
72
|
-
word: p,
|
|
73
|
-
fontSize: P,
|
|
74
|
-
pad: m,
|
|
75
|
-
canvas: R,
|
|
76
|
-
ctx: H,
|
|
77
|
-
svg: f
|
|
78
|
-
});
|
|
79
|
-
d = ht({ wordMask: d, w: N, h: _, dilation: 2 });
|
|
80
|
-
let A = 0, I = 0;
|
|
81
|
-
for (; A < Math.max(l, a) && !W && I < 1e4; ) {
|
|
82
|
-
for (let T = 0; T < 360; T += j) {
|
|
83
|
-
I += 1;
|
|
84
|
-
const g = Math.round(q + A * Math.cos(T * Math.PI / 180) - N / 2), C = Math.round(c + A * Math.sin(T * Math.PI / 180) - _ / 2);
|
|
85
|
-
if (!(g < 0 || C < 0 || g + N > l || C + _ > 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: P, width: N, height: _, angle: 0 }), Se({ mask: e, maskW: l, maskH: a, wx: g, wy: C, wordMask: d }), W = !0;
|
|
87
|
-
break;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
A += ee;
|
|
91
|
-
}
|
|
92
|
-
W || (P -= 1);
|
|
93
|
-
}
|
|
94
|
-
if (!W && P < n) {
|
|
95
|
-
P = n;
|
|
96
|
-
const { w: N, h: _, wordMask: d } = xe({
|
|
97
|
-
word: p,
|
|
98
|
-
fontSize: P,
|
|
99
|
-
pad: m,
|
|
100
|
-
canvas: R,
|
|
101
|
-
ctx: H,
|
|
102
|
-
svg: f
|
|
103
|
-
});
|
|
104
|
-
let A = 0, I = 0;
|
|
105
|
-
for (; A < Math.max(l, a) && !W && I < 25e3; ) {
|
|
106
|
-
for (let T = 0; T < 360; T += te) {
|
|
107
|
-
I += 1;
|
|
108
|
-
const g = Math.round(q + A * Math.cos(T * Math.PI / 180) - N / 2), C = Math.round(c + A * Math.sin(T * Math.PI / 180) - _ / 2);
|
|
109
|
-
if (!(g < 0 || C < 0 || g + N > l || C + _ > 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: P, width: N, height: _, angle: 0 }), Se({ mask: e, maskW: l, maskH: a, wx: g, wy: C, wordMask: d }), W = !0;
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
A += X;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return Y.sort((p, O) => O.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
|
-
Ne((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), z = 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, O(), 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
|
-
_e(O);
|
|
203
|
-
function O() {
|
|
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
|
-
Ae(() => {
|
|
222
|
-
p.value && p.value.disconnect();
|
|
223
|
-
});
|
|
224
|
-
const { isPrinting: W, isImaging: P, generatePdf: N, generateImage: _ } = 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 A(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 I = 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 = A(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
|
-
I.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 = I.value.map((o) => ({
|
|
263
|
-
name: o.name,
|
|
264
|
-
color: o.color
|
|
265
|
-
})), s = I.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 I.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 ze = K(() => !Z.value && e.value.style.chart.zoom.show), { viewBox: le, resetZoom: pe, isZoom: Oe } = 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, ze);
|
|
334
|
-
m({
|
|
335
|
-
getData: Me,
|
|
336
|
-
generateCsv: C,
|
|
337
|
-
generatePdf: N,
|
|
338
|
-
generateImage: _,
|
|
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 Pe(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
|
-
z.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(P),
|
|
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(N),
|
|
422
|
-
onGenerateCsv: C,
|
|
423
|
-
onGenerateImage: v(_),
|
|
424
|
-
onToggleTable: fe,
|
|
425
|
-
onToggleTooltip: me,
|
|
426
|
-
onToggleAnnotator: ie,
|
|
427
|
-
style: ne({
|
|
428
|
-
visibility: v(te) ? v(j) ? "visible" : "hidden" : "visible"
|
|
429
|
-
})
|
|
430
|
-
}, Ie({ _: 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(I.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) => Pe(o),
|
|
519
|
-
onMouseleave: s[0] || (s[0] = (y) => {
|
|
520
|
-
E.value = null, z.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(P) })), void 0, !0)
|
|
532
|
-
])) : U("", !0),
|
|
533
|
-
v(Oe) ? (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 && z.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
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-CHDUeW3x.cjs"),pe=require("./Title-CQxTyQdP.cjs"),ne=require("./usePrinter-DyQISLol.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-B6zl7smQ.cjs"),ge=require("./DataTable-BtWdtAUt.cjs"),re=require("./useNestedProp-BKE4eQv3.cjs"),ye=require("./PackageVersion-CIG1jUoQ.cjs"),be=require("./Tooltip-DpeUgH6i.cjs"),we=require("./PenAndPaper-CvqghU08.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-CccbUmmx.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._sfc_main,{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;
|