vue-data-ui 2.10.2-beta.0 → 2.10.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-DvrzYEem.js → Arrow-B2-rOYz8.js} +1 -1
- package/dist/{Arrow-DiKmN6eo.cjs → Arrow-D6UBVyNr.cjs} +1 -1
- package/dist/{BaseIcon-1opvCDaQ.js → BaseIcon-Br5G8Cdk.js} +1 -1
- package/dist/{BaseIcon-BRmHoHji.cjs → BaseIcon-DfoJJxST.cjs} +1 -1
- package/dist/{ColorPicker-G7dML0BS.js → ColorPicker-CiQzB3a-.js} +3 -3
- package/dist/{ColorPicker-BQY41CwB.cjs → ColorPicker-Dvgprgpv.cjs} +1 -1
- package/dist/{DataTable-DSZwidNa.cjs → DataTable-CGucPqAQ.cjs} +1 -1
- package/dist/{DataTable-DVAtzq48.js → DataTable-Dk-94kK2.js} +2 -2
- package/dist/{Legend-DUY48WfL.cjs → Legend-B9aoKeq3.cjs} +1 -1
- package/dist/{Legend-ClChB3yO.js → Legend-Cx6NYPTA.js} +2 -2
- package/dist/{PackageVersion-BVqKnl8d.js → PackageVersion-BdNfnIm2.js} +3 -3
- package/dist/PackageVersion-C2bjLIu9.cjs +1 -0
- package/dist/{PenAndPaper-Bt9JtDPx.cjs → PenAndPaper-CJIFAI78.cjs} +1 -1
- package/dist/{PenAndPaper-3jmU5GLm.js → PenAndPaper-wrVNMaG8.js} +3 -3
- package/dist/{Shape-x1m9d0T3.cjs → Shape-Cn2RU1NY.cjs} +1 -1
- package/dist/{Shape-BOc09O7_.js → Shape-vIKj52KP.js} +1 -1
- package/dist/{Slicer-B7Gt3_Nl.cjs → Slicer-t3EfI94H.cjs} +1 -1
- package/dist/{Slicer-dM7HrmEG.js → Slicer-yki6JqTB.js} +2 -2
- package/dist/{Title-CcgS3et4.cjs → Title-Bae0QJu7.cjs} +1 -1
- package/dist/{Title-Bsx1bBKe.js → Title-CDYBDpu3.js} +1 -1
- package/dist/{Tooltip-C8rHMEUK.js → Tooltip-BzsAOdBd.js} +1 -1
- package/dist/{Tooltip-DWCw-8oz.cjs → Tooltip-CfqYTd5O.cjs} +1 -1
- package/dist/{dom-to-png-CHXF3z4X.cjs → dom-to-png-DgRl9bEH.cjs} +1 -1
- package/dist/{dom-to-png-JSc0Wutr.js → dom-to-png-IAiARGiU.js} +1 -1
- package/dist/{img-7aPSvY3c.js → img-DaDUVggy.js} +1 -1
- package/dist/{img-Czqt0BR-.cjs → img-DxEvbX77.cjs} +1 -1
- package/dist/{index-DooXAewR.js → index-BI6O7K58.js} +1 -1
- package/dist/{index-BzyzkUsY.cjs → index-DgIVCHLv.cjs} +1 -1
- package/dist/{pdf-CS-UdLZt.js → pdf-DBVNp7s2.js} +1 -1
- package/dist/{pdf-B9tvtSl9.cjs → pdf-Dq3h9PEr.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CWnDOg1g.cjs → useNestedProp-CCR03NVM.cjs} +1 -1
- package/dist/{useNestedProp-CeA-IFZT.js → useNestedProp-Cvz4MkSy.js} +1 -1
- package/dist/{usePrinter-CBfmcTyQ.cjs → usePrinter-B2xVvtiy.cjs} +1 -1
- package/dist/{usePrinter-rVrVRW1p.js → usePrinter-Jr3eyr8H.js} +3 -3
- package/dist/{vue-data-ui-B7d3aUDp.cjs → vue-data-ui-DhWKehHS.cjs} +1 -1
- package/dist/{vue-data-ui-Tce5_-Eb.js → vue-data-ui-bm5wfGa_.js} +62 -62
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-gO5QnUl-.cjs → vue-ui-3d-bar-Bpm8dKya.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B8Xjt8JB.js → vue-ui-3d-bar-CHOAZoDV.js} +9 -9
- package/dist/{vue-ui-accordion-B4ML49fc.cjs → vue-ui-accordion-DE1isSE9.cjs} +1 -1
- package/dist/{vue-ui-accordion-DLa3SOIQ.js → vue-ui-accordion-ldF7KsjV.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DLDGvlfL.cjs → vue-ui-age-pyramid-BnHOxOPT.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BRLXIdCs.js → vue-ui-age-pyramid-BuKSta-B.js} +10 -10
- package/dist/{vue-ui-annotator-DpgWa9Cn.cjs → vue-ui-annotator-B9j16TKW.cjs} +1 -1
- package/dist/{vue-ui-annotator-NtzLi6e5.js → vue-ui-annotator-BBuH-QB4.js} +2 -2
- package/dist/{vue-ui-bullet-oESdTIjM.js → vue-ui-bullet-B0C_rPTQ.js} +8 -8
- package/dist/{vue-ui-bullet-DIGwu5xc.cjs → vue-ui-bullet-CRChR0Qe.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dsb2-JRF.cjs → vue-ui-candlestick-Bq66GLxw.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CnAI7klD.js → vue-ui-candlestick-By5MsCcS.js} +11 -11
- package/dist/{vue-ui-carousel-table-CAmFkQql.js → vue-ui-carousel-table-BOtjI2Ov.js} +4 -4
- package/dist/{vue-ui-carousel-table-DUu0feRu.cjs → vue-ui-carousel-table-CyywZulq.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CCrwb8aH.js → vue-ui-chestnut-BS2kXrPU.js} +8 -8
- package/dist/{vue-ui-chestnut-Bkg_-3Jh.cjs → vue-ui-chestnut-D8QPZS8n.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-Baw5MjxR.js → vue-ui-circle-pack-C8m10WZ0.js} +9 -9
- package/dist/{vue-ui-circle-pack-D2LmdTWH.cjs → vue-ui-circle-pack-iOxdB75t.cjs} +1 -1
- package/dist/{vue-ui-cursor-BC3eK7ZM.js → vue-ui-cursor-Bn-CCFO0.js} +2 -2
- package/dist/{vue-ui-cursor-CfMz226i.cjs → vue-ui-cursor-Ccym3tFb.cjs} +1 -1
- package/dist/{vue-ui-dashboard-OU8D2OTa.cjs → vue-ui-dashboard-Cw4IXhXY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BOU2cJ2b.js → vue-ui-dashboard-D-vs2N_7.js} +62 -62
- package/dist/{vue-ui-digits-DGQWpbm2.js → vue-ui-digits-BXBXg7wv.js} +2 -2
- package/dist/{vue-ui-digits-BSLSYNb7.cjs → vue-ui-digits-D66h3nUw.cjs} +1 -1
- package/dist/{vue-ui-donut-LglxgRri.js → vue-ui-donut-BGZIwC5D.js} +12 -12
- package/dist/{vue-ui-donut-DO9gOTvW.cjs → vue-ui-donut-Bf3THSxi.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CGnR05_I.js → vue-ui-donut-evolution-5yOibvNM.js} +11 -11
- package/dist/{vue-ui-donut-evolution-jwuqDtAA.cjs → vue-ui-donut-evolution-xxrUJzgG.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-DkBWRski.js → vue-ui-dumbbell-C-KqKhxI.js} +10 -10
- package/dist/{vue-ui-dumbbell-CSE5loIk.cjs → vue-ui-dumbbell-CWn7cNsm.cjs} +1 -1
- package/dist/{vue-ui-flow-B2AXCnm5.js → vue-ui-flow-D4_2VnaB.js} +9 -9
- package/dist/{vue-ui-flow-tg58e_cr.cjs → vue-ui-flow-DFxWNRRJ.cjs} +1 -1
- package/dist/{vue-ui-funnel-DuzxYzyD.js → vue-ui-funnel-ADEjZ8yz.js} +9 -9
- package/dist/{vue-ui-funnel-DcQWW2NS.cjs → vue-ui-funnel-DIoqpwbm.cjs} +1 -1
- package/dist/{vue-ui-galaxy-ySnbPS-x.cjs → vue-ui-galaxy-BRle40mR.cjs} +1 -1
- package/dist/{vue-ui-galaxy-ESjv8ZqA.js → vue-ui-galaxy-DLtA9Ebb.js} +11 -11
- package/dist/{vue-ui-gauge-Bwo4YkkZ.cjs → vue-ui-gauge-B4vEWkRk.cjs} +1 -1
- package/dist/{vue-ui-gauge-vp6PLuJ2.js → vue-ui-gauge-BVj-IBdi.js} +7 -7
- package/dist/{vue-ui-gizmo-BrN-J1Ee.js → vue-ui-gizmo-BTe8CPyi.js} +3 -3
- package/dist/{vue-ui-gizmo-CddlRjeu.cjs → vue-ui-gizmo-BwBtkZ5z.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CBRtJ8Cd.js → vue-ui-heatmap-DrXMOxbe.js} +10 -10
- package/dist/{vue-ui-heatmap-s-ma5UVQ.cjs → vue-ui-heatmap-VdFtflO6.cjs} +1 -1
- package/dist/{vue-ui-history-plot-Yc_8sbsM.cjs → vue-ui-history-plot-B-ScOcEy.cjs} +1 -1
- package/dist/{vue-ui-history-plot-CaZhV-nU.js → vue-ui-history-plot-_DfuZIMP.js} +11 -11
- package/dist/{vue-ui-kpi-IRvK3TS2.cjs → vue-ui-kpi-DSQV0Kf2.cjs} +1 -1
- package/dist/{vue-ui-kpi-CjkmnlkE.js → vue-ui-kpi-DfFiDtCP.js} +3 -3
- package/dist/{vue-ui-mini-loader-CYVzNUON.js → vue-ui-mini-loader-1JZipPcP.js} +2 -2
- package/dist/{vue-ui-mini-loader-BQzcs6uB.cjs → vue-ui-mini-loader-CDOlO_1_.cjs} +1 -1
- package/dist/{vue-ui-molecule-Bci1mou3.js → vue-ui-molecule-Db_C7mVS.js} +11 -11
- package/dist/{vue-ui-molecule-DJ5RuqdD.cjs → vue-ui-molecule-jEcRTe4V.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CjKeANNT.cjs → vue-ui-mood-radar-BoKSTE-Y.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BQBLof4Z.js → vue-ui-mood-radar-m48vvkft.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DrNhJSPg.js → vue-ui-nested-donuts-DNhMOryo.js} +11 -11
- package/dist/{vue-ui-nested-donuts-a1bC0MIy.cjs → vue-ui-nested-donuts-ihd00Tpn.cjs} +1 -1
- package/dist/{vue-ui-onion-Xy3gKPoa.cjs → vue-ui-onion-D9AHOWa5.cjs} +1 -1
- package/dist/{vue-ui-onion-S2zaH8gC.js → vue-ui-onion-YKxsqnI7.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-B1SL_FlT.js → vue-ui-parallel-coordinate-plot-7SCwFkrU.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-DlDkqRXZ.cjs → vue-ui-parallel-coordinate-plot-BmO6zenq.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BbI_WV9P.js → vue-ui-quadrant-Bi0by7IK.js} +12 -12
- package/dist/{vue-ui-quadrant-Er30dYmu.cjs → vue-ui-quadrant-CAJ4dTBu.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-F5MYUxBh.cjs → vue-ui-quick-chart-C37lGqa1.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-CuQeZuMv.js → vue-ui-quick-chart-DlV0Qv_x.js} +9 -9
- package/dist/{vue-ui-radar-ZGmdrOWg.js → vue-ui-radar-B14zLIww.js} +12 -12
- package/dist/{vue-ui-radar-ODXlpihN.cjs → vue-ui-radar-H08KmB3s.cjs} +1 -1
- package/dist/{vue-ui-rating-CGDzme3N.cjs → vue-ui-rating-CYarWaTf.cjs} +1 -1
- package/dist/{vue-ui-rating-kTiSrHnd.js → vue-ui-rating-CdSQUBG6.js} +2 -2
- package/dist/{vue-ui-relation-circle-Ciae1qCQ.cjs → vue-ui-relation-circle-A4Vw8kYl.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CbQYCuW1.js → vue-ui-relation-circle-IzAvPPGl.js} +7 -7
- package/dist/{vue-ui-ridgeline-BYyeFIhk.js → vue-ui-ridgeline-BF5X6KQR.js} +12 -12
- package/dist/{vue-ui-ridgeline-c1obnD3W.cjs → vue-ui-ridgeline-BaHgOn_p.cjs} +1 -1
- package/dist/{vue-ui-rings-DlT7Q9C_.js → vue-ui-rings-DUhnXy1h.js} +12 -12
- package/dist/{vue-ui-rings-JyiU6_sc.cjs → vue-ui-rings-DnVeMrOw.cjs} +1 -1
- package/dist/{vue-ui-scatter-ntN0LVrZ.js → vue-ui-scatter-D7bXuxob.js} +12 -12
- package/dist/{vue-ui-scatter-CuJCs6sT.cjs → vue-ui-scatter-DoGX7iHp.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CZb-ZjJ-.cjs → vue-ui-skeleton-DeEGdJEn.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BJBwGLvQ.js → vue-ui-skeleton-Dxm7rqic.js} +3 -3
- package/dist/{vue-ui-smiley-TZDNziHi.js → vue-ui-smiley-95l4UiqT.js} +2 -2
- package/dist/{vue-ui-smiley-BPtUaxih.cjs → vue-ui-smiley-DmAtXVht.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-bueclFIq.cjs → vue-ui-spark-trend-C3CO25Jy.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Dcr7S70f.js → vue-ui-spark-trend-DdH43oVm.js} +5 -5
- package/dist/{vue-ui-sparkbar-BQlWKjxx.cjs → vue-ui-sparkbar-C2roDWfv.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CmMSpIWT.js → vue-ui-sparkbar-DTe3QrR3.js} +4 -4
- package/dist/{vue-ui-sparkgauge-BZyTGzW5.js → vue-ui-sparkgauge-BwclNj3C.js} +4 -4
- package/dist/{vue-ui-sparkgauge-B7nCrYcd.cjs → vue-ui-sparkgauge-nq6-9TjT.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-Dlnfvocd.cjs → vue-ui-sparkhistogram-BdWirDjI.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-C9a9yysC.js → vue-ui-sparkhistogram-Brau127G.js} +5 -5
- package/dist/{vue-ui-sparkline-BYXy4_ye.cjs → vue-ui-sparkline-B2mOJzkG.cjs} +1 -1
- package/dist/{vue-ui-sparkline-SWxohDk9.js → vue-ui-sparkline-qqfyQyVz.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DLHaGMca.cjs → vue-ui-sparkstackbar-BJl9lbBp.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-B2kazMC5.js → vue-ui-sparkstackbar-DLlDU0B2.js} +5 -5
- package/dist/{vue-ui-stackbar-DFHLxQ-o.cjs → vue-ui-stackbar-CEvmDjq3.cjs} +1 -1
- package/dist/{vue-ui-stackbar-AvRusEob.js → vue-ui-stackbar-RRGnblUm.js} +13 -13
- package/dist/{vue-ui-strip-plot-ISii3FHM.js → vue-ui-strip-plot-C9LKjSkW.js} +11 -11
- package/dist/{vue-ui-strip-plot-BtqRC7h3.cjs → vue-ui-strip-plot-Dlsv-yRI.cjs} +1 -1
- package/dist/{vue-ui-table-DKsKbnap.js → vue-ui-table-DxdJ151X.js} +3 -3
- package/dist/{vue-ui-table-heatmap-C5G_CELV.cjs → vue-ui-table-heatmap-BhxOvDDW.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CLLk1u2z.js → vue-ui-table-heatmap-CzGeU_uL.js} +4 -4
- package/dist/{vue-ui-table-DeSxVc3g.cjs → vue-ui-table-qULtmHGA.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-5vuYcAME.cjs → vue-ui-table-sparkline-D1hriLB0.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BncY35Is.js → vue-ui-table-sparkline-DSZhEDKX.js} +5 -5
- package/dist/{vue-ui-thermometer-jm_63HZL.cjs → vue-ui-thermometer-Cvnh4jvE.cjs} +1 -1
- package/dist/{vue-ui-thermometer-xOTD55R3.js → vue-ui-thermometer-Pw4X3Bun.js} +7 -7
- package/dist/{vue-ui-timer-DmwSXmTW.cjs → vue-ui-timer-BlmIXPv6.cjs} +1 -1
- package/dist/{vue-ui-timer-m_ncHz58.js → vue-ui-timer-CvvexEeN.js} +5 -5
- package/dist/{vue-ui-tiremarks-0UU9Mw4i.cjs → vue-ui-tiremarks-BAkMBz3o.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-GaLo5qjV.js → vue-ui-tiremarks-DbZQvV_2.js} +7 -7
- package/dist/{vue-ui-treemap-CFSNLj9T.js → vue-ui-treemap-CF-RjM16.js} +12 -12
- package/dist/{vue-ui-treemap-BVFJiMAZ.cjs → vue-ui-treemap-a6b1vWy-.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CWaIXNCd.cjs → vue-ui-vertical-bar-Dm5zMIeE.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-z2t7Pcta.js → vue-ui-vertical-bar-ZJbSI-xR.js} +12 -12
- package/dist/{vue-ui-waffle-B57vn44W.js → vue-ui-waffle-I9AKkwb4.js} +12 -12
- package/dist/{vue-ui-waffle-DFH1pRat.cjs → vue-ui-waffle-XNiw-qtb.cjs} +1 -1
- package/dist/{vue-ui-wheel-CeDuJhdJ.js → vue-ui-wheel-BA7wZUZL.js} +7 -7
- package/dist/{vue-ui-wheel-BInY09xB.cjs → vue-ui-wheel-DJUrO6CA.cjs} +1 -1
- package/dist/vue-ui-word-cloud-BVqb1Yix.js +648 -0
- package/dist/vue-ui-word-cloud-ByjkRq1g.cjs +1 -0
- package/dist/{vue-ui-world-KRmkbVed.cjs → vue-ui-world-9nlcZMH1.cjs} +1 -1
- package/dist/{vue-ui-world-OzkiVQUb.js → vue-ui-world-DkYRlp5s.js} +11 -11
- package/dist/{vue-ui-xy-CfE-caY1.js → vue-ui-xy-B1HwPMFi.js} +16 -16
- package/dist/{vue-ui-xy-vkK0CrKz.cjs → vue-ui-xy-B4sqGuw6.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-CkjbrUpb.cjs → vue-ui-xy-canvas-C-rykR_6.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-DtQzJAsY.js → vue-ui-xy-canvas-CGCtkn9g.js} +12 -12
- package/package.json +1 -1
- package/dist/PackageVersion-B5BeU3j9.cjs +0 -1
- package/dist/vue-ui-word-cloud-CrQ8lUc4.js +0 -630
- package/dist/vue-ui-word-cloud-OChNmjNF.cjs +0 -1
|
@@ -1,630 +0,0 @@
|
|
|
1
|
-
import { useCssVars as Ne, computed as J, ref as h, watch as de, onMounted as _e, onBeforeUnmount as Ae, createElementBlock as I, openBlock as b, unref as v, normalizeStyle as ne, createBlock as K, createCommentVNode as U, createVNode as ve, createSlots as Ie, withCtx as P, renderSlot as T, normalizeProps as j, guardReactiveProps as X, 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-DooXAewR.js";
|
|
3
|
-
import { _ as Je } from "./Title-Bsx1bBKe.js";
|
|
4
|
-
import { u as Ke, U as Qe } from "./usePrinter-rVrVRW1p.js";
|
|
5
|
-
import { t as et, u as tt, d as ot } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
-
import at from "./vue-ui-accordion-DLa3SOIQ.js";
|
|
7
|
-
import { D as lt } from "./DataTable-DVAtzq48.js";
|
|
8
|
-
import { u as $e } from "./useNestedProp-CeA-IFZT.js";
|
|
9
|
-
import { _ as nt } from "./PackageVersion-BVqKnl8d.js";
|
|
10
|
-
import { _ as st } from "./Tooltip-C8rHMEUK.js";
|
|
11
|
-
import { _ as rt } from "./PenAndPaper-3jmU5GLm.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-1opvCDaQ.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: r,
|
|
22
|
-
ctx: i,
|
|
23
|
-
svg: d
|
|
24
|
-
}) {
|
|
25
|
-
i.save(), i.font = `${d.style && d.style.bold ? "bold " : ""}${m}px Arial`;
|
|
26
|
-
const l = i.measureText(w.name), a = Math.ceil(l.width) + 2 + (f ? f * 2 : 0), s = Math.ceil(m) + 2 + (f ? f * 2 : 0);
|
|
27
|
-
r.width = a, r.height = s, i.clearRect(0, 0, a, s), i.font = `${d.style && d.style.bold ? "bold " : ""}${m}px Arial`, i.textAlign = "center", i.textBaseline = "middle", i.fillStyle = "black", i.fillText(w.name, a / 2, s / 2);
|
|
28
|
-
const z = i.getImageData(0, 0, a, s).data, F = [];
|
|
29
|
-
for (let M = 0; M < s; M += 1)
|
|
30
|
-
for (let e = 0; e < a; e += 1)
|
|
31
|
-
z[(M * a + e) * 4 + 3] > 1 && F.push([e, M]);
|
|
32
|
-
return i.restore(), { w: a, h: s, wordMask: F };
|
|
33
|
-
}
|
|
34
|
-
function Te({ mask: w, maskW: m, maskH: f, wx: r, wy: i, wordMask: d }) {
|
|
35
|
-
for (let l = 0; l < d.length; l += 1) {
|
|
36
|
-
const a = r + d[l][0], s = i + d[l][1];
|
|
37
|
-
if (a < 0 || s < 0 || a >= m || s >= f || w[s * m + a]) return !1;
|
|
38
|
-
}
|
|
39
|
-
return !0;
|
|
40
|
-
}
|
|
41
|
-
function Se({ mask: w, maskW: m, maskH: f, wx: r, wy: i, wordMask: d }) {
|
|
42
|
-
for (let l = 0; l < d.length; l += 1) {
|
|
43
|
-
const a = r + d[l][0], s = i + d[l][1];
|
|
44
|
-
a >= 0 && s >= 0 && a < m && s < f && (w[s * m + a] = 1);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
function ht({ wordMask: w, w: m, h: f, dilation: r }) {
|
|
48
|
-
const i = new Set(w.map(([l, a]) => `${l},${a}`)), d = new Set(i);
|
|
49
|
-
for (let [l, a] of w)
|
|
50
|
-
for (let s = -r; s <= r; s += 1)
|
|
51
|
-
for (let S = -r; S <= r; S += 1) {
|
|
52
|
-
if (s === 0 && S === 0) continue;
|
|
53
|
-
const z = l + s, F = a + S;
|
|
54
|
-
z >= 0 && z < m && F >= 0 && F < f && d.add(`${z},${F}`);
|
|
55
|
-
}
|
|
56
|
-
return Array.from(d).map((l) => l.split(",").map(Number));
|
|
57
|
-
}
|
|
58
|
-
function ft({
|
|
59
|
-
words: w,
|
|
60
|
-
proximity: m = 0,
|
|
61
|
-
svg: f,
|
|
62
|
-
strictPixelPadding: r
|
|
63
|
-
}) {
|
|
64
|
-
const { width: i, height: d } = f, l = Math.round(i), a = Math.round(d), s = 1, S = f.minFontSize, z = f.maxFontSize, F = w.map((C) => C.value), M = Math.min(...F), e = Math.max(...F), R = new Uint8Array(l * a), B = document.createElement("canvas"), L = B.getContext("2d", { willReadFrequently: !0 });
|
|
65
|
-
B.width = l, B.height = a;
|
|
66
|
-
const Q = 6, ee = 2, q = 2, te = 1, u = Math.floor(l / 2), oe = Math.floor(a / 2), re = [...w].sort((C, O) => O.value - C.value), D = [];
|
|
67
|
-
for (const C of re) {
|
|
68
|
-
let O = S;
|
|
69
|
-
e !== M && (O = (C.value - M) / (e - M) * (z - S) + S), O = Math.max(S, Math.min(z, O));
|
|
70
|
-
let A = !1, N = O;
|
|
71
|
-
for (; !A && N >= s; ) {
|
|
72
|
-
let { w: _, h: c, wordMask: W } = xe({
|
|
73
|
-
word: C,
|
|
74
|
-
fontSize: N,
|
|
75
|
-
pad: m,
|
|
76
|
-
canvas: B,
|
|
77
|
-
ctx: L,
|
|
78
|
-
svg: f
|
|
79
|
-
});
|
|
80
|
-
r && (W = ht({ wordMask: W, w: _, h: c, dilation: 1 }));
|
|
81
|
-
let g = 0, V = 0;
|
|
82
|
-
for (; g < Math.max(l, a) && !A && V < 1e4; ) {
|
|
83
|
-
for (let k = 0; k < 360; k += Q) {
|
|
84
|
-
V += 1;
|
|
85
|
-
const $ = Math.round(u + g * Math.cos(k * Math.PI / 180) - _ / 2), p = Math.round(oe + g * Math.sin(k * Math.PI / 180) - c / 2);
|
|
86
|
-
if (!($ < 0 || p < 0 || $ + _ > l || p + c > a) && Te({ mask: R, maskW: l, maskH: a, wx: $, wy: p, wordMask: W })) {
|
|
87
|
-
D.push({ ...C, x: $ - l / 2, y: p - a / 2, fontSize: N, width: _, height: c, angle: 0 }), Se({ mask: R, maskW: l, maskH: a, wx: $, wy: p, wordMask: W }), A = !0;
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
g += ee;
|
|
92
|
-
}
|
|
93
|
-
A || (N -= 1);
|
|
94
|
-
}
|
|
95
|
-
if (!A && N < s) {
|
|
96
|
-
N = s;
|
|
97
|
-
const { w: _, h: c, wordMask: W } = xe({
|
|
98
|
-
word: C,
|
|
99
|
-
fontSize: N,
|
|
100
|
-
pad: m,
|
|
101
|
-
canvas: B,
|
|
102
|
-
ctx: L,
|
|
103
|
-
svg: f
|
|
104
|
-
});
|
|
105
|
-
let g = 0, V = 0;
|
|
106
|
-
for (; g < Math.max(l, a) && !A && V < 25e3; ) {
|
|
107
|
-
for (let k = 0; k < 360; k += q) {
|
|
108
|
-
V += 1;
|
|
109
|
-
const $ = Math.round(u + g * Math.cos(k * Math.PI / 180) - _ / 2), p = Math.round(oe + g * Math.sin(k * Math.PI / 180) - c / 2);
|
|
110
|
-
if (!($ < 0 || p < 0 || $ + _ > l || p + c > a) && Te({ mask: R, maskW: l, maskH: a, wx: $, wy: p, wordMask: W })) {
|
|
111
|
-
D.push({ ...C, x: $ - l / 2, y: p - a / 2, fontSize: N, width: _, height: c, angle: 0 }), Se({ mask: R, maskW: l, maskH: a, wx: $, wy: p, wordMask: W }), A = !0;
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
g += te;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return D.sort((C, O) => O.fontSize - C.fontSize);
|
|
120
|
-
}
|
|
121
|
-
const mt = ["id"], pt = ["xmlns", "viewBox"], gt = ["width", "height"], yt = ["transform"], bt = ["fill", "font-weight", "x", "y", "font-size", "transform", "onMouseover"], wt = {
|
|
122
|
-
key: 4,
|
|
123
|
-
class: "vue-data-ui-watermark"
|
|
124
|
-
}, Ct = {
|
|
125
|
-
key: 5,
|
|
126
|
-
"data-dom-to-png-ignore": "",
|
|
127
|
-
class: "reset-wrapper"
|
|
128
|
-
}, kt = ["innerHTML"], $t = {
|
|
129
|
-
__name: "vue-ui-word-cloud",
|
|
130
|
-
props: {
|
|
131
|
-
config: {
|
|
132
|
-
type: Object,
|
|
133
|
-
default() {
|
|
134
|
-
return {};
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
dataset: {
|
|
138
|
-
type: [Array, String],
|
|
139
|
-
default() {
|
|
140
|
-
return [];
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
setup(w, { expose: m }) {
|
|
145
|
-
Ne((t) => ({
|
|
146
|
-
"180547ea": t.slicerColor
|
|
147
|
-
}));
|
|
148
|
-
const { vue_ui_word_cloud: f } = Ue(), r = w, i = J({
|
|
149
|
-
get() {
|
|
150
|
-
return !!r.dataset && r.dataset.length;
|
|
151
|
-
},
|
|
152
|
-
set(t) {
|
|
153
|
-
return t;
|
|
154
|
-
}
|
|
155
|
-
}), d = h(Ce()), l = h(0), a = h(null), s = h(null), S = h(null), z = h(0), F = h(0), M = h(!1), e = J({
|
|
156
|
-
get: () => te(),
|
|
157
|
-
set: (t) => t
|
|
158
|
-
}), R = h(B());
|
|
159
|
-
function B() {
|
|
160
|
-
return typeof r.dataset == "string" ? Be(r.dataset) : r.dataset.map((t, n) => ({
|
|
161
|
-
...t,
|
|
162
|
-
value: De(t.value)
|
|
163
|
-
}));
|
|
164
|
-
}
|
|
165
|
-
de(() => r.dataset, () => {
|
|
166
|
-
R.value = B(), V();
|
|
167
|
-
});
|
|
168
|
-
const { userOptionsVisible: L, setUserOptionsVisibility: Q, keepUserOptionState: ee } = it({ config: e.value }), { svgRef: q } = ut({ config: e.value.style.chart.title });
|
|
169
|
-
function te() {
|
|
170
|
-
const t = $e({
|
|
171
|
-
userConfig: r.config,
|
|
172
|
-
defaultConfig: f
|
|
173
|
-
});
|
|
174
|
-
return t.theme ? {
|
|
175
|
-
...$e({
|
|
176
|
-
userConfig: Ge.vue_ui_word_cloud[t.theme] || r.config,
|
|
177
|
-
defaultConfig: t
|
|
178
|
-
}),
|
|
179
|
-
customPalette: Ee[t.theme] || se
|
|
180
|
-
} : t;
|
|
181
|
-
}
|
|
182
|
-
de(() => r.config, (t) => {
|
|
183
|
-
e.value = te(), L.value = !e.value.userOptions.showOnChartHover, C(), z.value += 1, F.value += 1, c.value.showTable = e.value.table.show, c.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
184
|
-
}, { deep: !0 });
|
|
185
|
-
const u = h({
|
|
186
|
-
width: e.value.style.chart.width,
|
|
187
|
-
height: e.value.style.chart.height,
|
|
188
|
-
maxFontSize: e.value.style.chart.words.maxFontSize,
|
|
189
|
-
minFontSize: e.value.style.chart.words.minFontSize,
|
|
190
|
-
bold: e.value.style.chart.words.bold
|
|
191
|
-
}), oe = ot(() => {
|
|
192
|
-
V();
|
|
193
|
-
}, 10), re = et(() => {
|
|
194
|
-
const { width: t, height: n } = tt({
|
|
195
|
-
chart: a.value,
|
|
196
|
-
title: e.value.style.chart.title.text ? s.value : null,
|
|
197
|
-
source: S.value
|
|
198
|
-
});
|
|
199
|
-
requestAnimationFrame(() => {
|
|
200
|
-
u.value.width = t, u.value.height = n, we(oe);
|
|
201
|
-
});
|
|
202
|
-
}), D = h(null);
|
|
203
|
-
_e(C);
|
|
204
|
-
function C() {
|
|
205
|
-
Le(r.dataset) ? ke({
|
|
206
|
-
componentName: "VueUiWordCloud",
|
|
207
|
-
type: "dataset"
|
|
208
|
-
}) : R.value.forEach((t, n) => {
|
|
209
|
-
He({
|
|
210
|
-
datasetObject: t,
|
|
211
|
-
requiredAttributes: ["name", "value"]
|
|
212
|
-
}).forEach((o) => {
|
|
213
|
-
i.value = !1, ke({
|
|
214
|
-
componentName: "VueUiWordCloud",
|
|
215
|
-
type: "datasetSerieAttribute",
|
|
216
|
-
property: o,
|
|
217
|
-
index: n
|
|
218
|
-
});
|
|
219
|
-
});
|
|
220
|
-
}), e.value.responsive && (D.value = new ResizeObserver(re), D.value.observe(a.value.parentNode));
|
|
221
|
-
}
|
|
222
|
-
Ae(() => {
|
|
223
|
-
D.value && D.value.disconnect();
|
|
224
|
-
});
|
|
225
|
-
const { isPrinting: O, isImaging: A, generatePdf: N, generateImage: _ } = Ke({
|
|
226
|
-
elementId: `wordCloud_${d.value}`,
|
|
227
|
-
fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
|
|
228
|
-
options: e.value.userOptions.print
|
|
229
|
-
}), c = h({
|
|
230
|
-
showTable: e.value.table.show,
|
|
231
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
232
|
-
});
|
|
233
|
-
function W(t, n, o = "Arial") {
|
|
234
|
-
const y = document.createElement("canvas").getContext("2d");
|
|
235
|
-
return y.font = `${n}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${o}`, {
|
|
236
|
-
width: y.measureText(t).width + e.value.style.chart.words.proximity,
|
|
237
|
-
height: n
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
const g = h([]);
|
|
241
|
-
de(() => r.dataset, V, { immediate: !0 });
|
|
242
|
-
function V() {
|
|
243
|
-
const t = [...R.value].map((y) => y.value), n = Math.max(...t), o = Math.min(...t), x = [...R.value].map((y, E) => {
|
|
244
|
-
let G = (y.value - o) / (n - o) * (u.value.maxFontSize - u.value.minFontSize) + u.value.minFontSize;
|
|
245
|
-
G = isNaN(G) ? u.value.minFontSize : G;
|
|
246
|
-
const ge = W(y.name, G);
|
|
247
|
-
return {
|
|
248
|
-
...y,
|
|
249
|
-
id: Ce(),
|
|
250
|
-
fontSize: G,
|
|
251
|
-
width: ge.width,
|
|
252
|
-
height: ge.height,
|
|
253
|
-
color: e.value.style.chart.words.usePalette ? e.value.customPalette[E] || e.value.customPalette[E % e.value.customPalette.length] || se[E] || se[E % se.length] : e.value.style.chart.words.color
|
|
254
|
-
};
|
|
255
|
-
});
|
|
256
|
-
g.value = ft({
|
|
257
|
-
words: x,
|
|
258
|
-
svg: u.value,
|
|
259
|
-
proximity: e.value.style.chart.words.proximity,
|
|
260
|
-
strictPixelPadding: e.value.strictPixelPadding
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
const k = J(() => {
|
|
264
|
-
const t = g.value.map((o) => ({
|
|
265
|
-
name: o.name,
|
|
266
|
-
color: o.color
|
|
267
|
-
})), n = g.value.map((o) => o.value);
|
|
268
|
-
return { head: t, body: n };
|
|
269
|
-
});
|
|
270
|
-
function $() {
|
|
271
|
-
we(() => {
|
|
272
|
-
const t = k.value.head.map((x, y) => [[
|
|
273
|
-
x.name
|
|
274
|
-
], [k.value.body[y]]]), n = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(t), o = qe(n);
|
|
275
|
-
Ye({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
const p = J(() => {
|
|
279
|
-
const t = [
|
|
280
|
-
e.value.table.columnNames.series,
|
|
281
|
-
e.value.table.columnNames.value
|
|
282
|
-
], n = k.value.head.map((y, E) => {
|
|
283
|
-
const G = je({ p: e.value.table.td.prefix, v: k.value.body[E], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
|
|
284
|
-
return [
|
|
285
|
-
{
|
|
286
|
-
color: y.color,
|
|
287
|
-
name: y.name
|
|
288
|
-
},
|
|
289
|
-
G
|
|
290
|
-
];
|
|
291
|
-
}), o = {
|
|
292
|
-
th: {
|
|
293
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
294
|
-
color: e.value.table.th.color,
|
|
295
|
-
outline: e.value.table.th.outline
|
|
296
|
-
},
|
|
297
|
-
td: {
|
|
298
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
299
|
-
color: e.value.table.td.color,
|
|
300
|
-
outline: e.value.table.td.outline
|
|
301
|
-
},
|
|
302
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
303
|
-
};
|
|
304
|
-
return {
|
|
305
|
-
colNames: [
|
|
306
|
-
e.value.table.columnNames.series,
|
|
307
|
-
e.value.table.columnNames.value
|
|
308
|
-
],
|
|
309
|
-
head: t,
|
|
310
|
-
body: n,
|
|
311
|
-
config: o
|
|
312
|
-
};
|
|
313
|
-
}), ae = h(!1);
|
|
314
|
-
function Fe(t) {
|
|
315
|
-
ae.value = t, l.value += 1;
|
|
316
|
-
}
|
|
317
|
-
function Me() {
|
|
318
|
-
return g.value;
|
|
319
|
-
}
|
|
320
|
-
function fe() {
|
|
321
|
-
c.value.showTable = !c.value.showTable;
|
|
322
|
-
}
|
|
323
|
-
function me() {
|
|
324
|
-
c.value.showTooltip = !c.value.showTooltip;
|
|
325
|
-
}
|
|
326
|
-
const Y = h(!1);
|
|
327
|
-
function ie() {
|
|
328
|
-
Y.value = !Y.value;
|
|
329
|
-
}
|
|
330
|
-
const Pe = J(() => !Y.value && e.value.style.chart.zoom.show), { viewBox: le, resetZoom: pe, isZoom: ze } = ct(q, {
|
|
331
|
-
x: 0,
|
|
332
|
-
y: 0,
|
|
333
|
-
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
334
|
-
height: u.value.height <= 0 ? 10 : u.value.height
|
|
335
|
-
}, 1, Pe);
|
|
336
|
-
m({
|
|
337
|
-
getData: Me,
|
|
338
|
-
generateCsv: $,
|
|
339
|
-
generatePdf: N,
|
|
340
|
-
generateImage: _,
|
|
341
|
-
toggleTable: fe,
|
|
342
|
-
toggleTooltip: me,
|
|
343
|
-
toggleAnnotator: ie
|
|
344
|
-
});
|
|
345
|
-
const H = h(null), Z = h(!1), ue = h(""), ce = h(null);
|
|
346
|
-
function Oe(t) {
|
|
347
|
-
if (!c.value.showTooltip) return;
|
|
348
|
-
H.value = t.id, ce.value = { datapoint: t, config: e.value };
|
|
349
|
-
const n = e.value.style.chart.tooltip.customFormat;
|
|
350
|
-
if (Z.value = !1, Ze(n))
|
|
351
|
-
try {
|
|
352
|
-
const o = n({
|
|
353
|
-
datapoint: t,
|
|
354
|
-
config: e.value
|
|
355
|
-
});
|
|
356
|
-
typeof o == "string" && (ue.value = o, Z.value = !0);
|
|
357
|
-
} catch {
|
|
358
|
-
console.warn("Custom format cannot be applied."), Z.value = !1;
|
|
359
|
-
}
|
|
360
|
-
if (!Z.value) {
|
|
361
|
-
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>`;
|
|
362
|
-
ue.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${o}</div>`;
|
|
363
|
-
}
|
|
364
|
-
M.value = !0;
|
|
365
|
-
}
|
|
366
|
-
return (t, n) => (b(), I("div", {
|
|
367
|
-
class: "vue-ui-word-cloud",
|
|
368
|
-
ref_key: "wordCloudChart",
|
|
369
|
-
ref: a,
|
|
370
|
-
id: `wordCloud_${d.value}`,
|
|
371
|
-
style: ne(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
|
|
372
|
-
onMouseenter: n[3] || (n[3] = () => v(Q)(!0)),
|
|
373
|
-
onMouseleave: n[4] || (n[4] = () => v(Q)(!1))
|
|
374
|
-
}, [
|
|
375
|
-
e.value.userOptions.buttons.annotator ? (b(), K(rt, {
|
|
376
|
-
key: 0,
|
|
377
|
-
svgRef: v(q),
|
|
378
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
379
|
-
color: e.value.style.chart.color,
|
|
380
|
-
active: Y.value,
|
|
381
|
-
onClose: ie
|
|
382
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : U("", !0),
|
|
383
|
-
e.value.style.chart.title.text ? (b(), I("div", {
|
|
384
|
-
key: 1,
|
|
385
|
-
ref_key: "chartTitle",
|
|
386
|
-
ref: s,
|
|
387
|
-
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
388
|
-
}, [
|
|
389
|
-
(b(), K(Je, {
|
|
390
|
-
key: `title_${z.value}`,
|
|
391
|
-
config: {
|
|
392
|
-
title: {
|
|
393
|
-
...e.value.style.chart.title
|
|
394
|
-
},
|
|
395
|
-
subtitle: {
|
|
396
|
-
...e.value.style.chart.title.subtitle
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
}, null, 8, ["config"]))
|
|
400
|
-
], 512)) : U("", !0),
|
|
401
|
-
e.value.userOptions.show && i.value && (v(ee) || v(L)) ? (b(), K(Qe, {
|
|
402
|
-
ref: "details",
|
|
403
|
-
key: `user_option_${l.value}`,
|
|
404
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
405
|
-
color: e.value.style.chart.color,
|
|
406
|
-
isPrinting: v(O),
|
|
407
|
-
isImaging: v(A),
|
|
408
|
-
uid: d.value,
|
|
409
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
410
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
411
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
412
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
413
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
414
|
-
isFullscreen: ae.value,
|
|
415
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
416
|
-
chartElement: a.value,
|
|
417
|
-
position: e.value.userOptions.position,
|
|
418
|
-
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
419
|
-
isTooltip: c.value.showTooltip,
|
|
420
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
421
|
-
isAnnotation: Y.value,
|
|
422
|
-
onToggleFullscreen: Fe,
|
|
423
|
-
onGeneratePdf: v(N),
|
|
424
|
-
onGenerateCsv: $,
|
|
425
|
-
onGenerateImage: v(_),
|
|
426
|
-
onToggleTable: fe,
|
|
427
|
-
onToggleTooltip: me,
|
|
428
|
-
onToggleAnnotator: ie,
|
|
429
|
-
style: ne({
|
|
430
|
-
visibility: v(ee) ? v(L) ? "visible" : "hidden" : "visible"
|
|
431
|
-
})
|
|
432
|
-
}, Ie({ _: 2 }, [
|
|
433
|
-
t.$slots.menuIcon ? {
|
|
434
|
-
name: "menuIcon",
|
|
435
|
-
fn: P(({ isOpen: o, color: x }) => [
|
|
436
|
-
T(t.$slots, "menuIcon", j(X({ isOpen: o, color: x })), void 0, !0)
|
|
437
|
-
]),
|
|
438
|
-
key: "0"
|
|
439
|
-
} : void 0,
|
|
440
|
-
t.$slots.optionPdf ? {
|
|
441
|
-
name: "optionPdf",
|
|
442
|
-
fn: P(() => [
|
|
443
|
-
T(t.$slots, "optionPdf", {}, void 0, !0)
|
|
444
|
-
]),
|
|
445
|
-
key: "1"
|
|
446
|
-
} : void 0,
|
|
447
|
-
t.$slots.optionCsv ? {
|
|
448
|
-
name: "optionCsv",
|
|
449
|
-
fn: P(() => [
|
|
450
|
-
T(t.$slots, "optionCsv", {}, void 0, !0)
|
|
451
|
-
]),
|
|
452
|
-
key: "2"
|
|
453
|
-
} : void 0,
|
|
454
|
-
t.$slots.optionImg ? {
|
|
455
|
-
name: "optionImg",
|
|
456
|
-
fn: P(() => [
|
|
457
|
-
T(t.$slots, "optionImg", {}, void 0, !0)
|
|
458
|
-
]),
|
|
459
|
-
key: "3"
|
|
460
|
-
} : void 0,
|
|
461
|
-
t.$slots.optionTable ? {
|
|
462
|
-
name: "optionTable",
|
|
463
|
-
fn: P(() => [
|
|
464
|
-
T(t.$slots, "optionTable", {}, void 0, !0)
|
|
465
|
-
]),
|
|
466
|
-
key: "4"
|
|
467
|
-
} : void 0,
|
|
468
|
-
t.$slots.optionFullscreen ? {
|
|
469
|
-
name: "optionFullscreen",
|
|
470
|
-
fn: P(({ toggleFullscreen: o, isFullscreen: x }) => [
|
|
471
|
-
T(t.$slots, "optionFullscreen", j(X({ toggleFullscreen: o, isFullscreen: x })), void 0, !0)
|
|
472
|
-
]),
|
|
473
|
-
key: "5"
|
|
474
|
-
} : void 0,
|
|
475
|
-
t.$slots.optionAnnotator ? {
|
|
476
|
-
name: "optionAnnotator",
|
|
477
|
-
fn: P(({ toggleAnnotator: o, isAnnotator: x }) => [
|
|
478
|
-
T(t.$slots, "optionAnnotator", j(X({ toggleAnnotator: o, isAnnotator: x })), void 0, !0)
|
|
479
|
-
]),
|
|
480
|
-
key: "6"
|
|
481
|
-
} : void 0
|
|
482
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : U("", !0),
|
|
483
|
-
i.value ? (b(), I("svg", {
|
|
484
|
-
key: 3,
|
|
485
|
-
ref_key: "svgRef",
|
|
486
|
-
ref: q,
|
|
487
|
-
class: ye({ "vue-data-ui-fullscreen--on": ae.value, "vue-data-ui-fulscreen--off": !ae.value }),
|
|
488
|
-
xmlns: v(Xe),
|
|
489
|
-
viewBox: `${v(le).x} ${v(le).y} ${v(le).width} ${v(le).height}`,
|
|
490
|
-
style: "overflow:hidden;background:transparent;"
|
|
491
|
-
}, [
|
|
492
|
-
ve(nt),
|
|
493
|
-
t.$slots["chart-background"] ? (b(), I("foreignObject", {
|
|
494
|
-
key: 0,
|
|
495
|
-
x: 0,
|
|
496
|
-
y: 0,
|
|
497
|
-
width: u.value.width <= 0 ? 10 : u.value.width,
|
|
498
|
-
height: u.value.height <= 0 ? 10 : u.value.height,
|
|
499
|
-
style: {
|
|
500
|
-
pointerEvents: "none"
|
|
501
|
-
}
|
|
502
|
-
}, [
|
|
503
|
-
T(t.$slots, "chart-background", {}, void 0, !0)
|
|
504
|
-
], 8, gt)) : U("", !0),
|
|
505
|
-
he("g", {
|
|
506
|
-
transform: `translate(${(u.value.width <= 0 ? 10 : u.value.width) / 2}, ${(u.value.height <= 0 ? 10 : u.value.height) / 2})`
|
|
507
|
-
}, [
|
|
508
|
-
(b(!0), I(Re, null, We(g.value, (o, x) => (b(), I("g", null, [
|
|
509
|
-
(b(), I("text", {
|
|
510
|
-
fill: o.color,
|
|
511
|
-
"font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
|
|
512
|
-
key: x,
|
|
513
|
-
x: o.x,
|
|
514
|
-
y: o.y,
|
|
515
|
-
"font-size": o.fontSize,
|
|
516
|
-
transform: `translate(${o.width / 2}, ${o.height / 2})`,
|
|
517
|
-
class: ye({ animated: e.value.useCssAnimation, "word-selected": H.value && H.value === o.id && c.value.showTooltip, "word-not-selected": H.value && H.value !== o.id && c.value.showTooltip }),
|
|
518
|
-
"text-anchor": "middle",
|
|
519
|
-
"dominant-baseline": "central",
|
|
520
|
-
onMouseover: (y) => Oe(o),
|
|
521
|
-
onMouseleave: n[0] || (n[0] = (y) => {
|
|
522
|
-
H.value = null, M.value = !1;
|
|
523
|
-
}),
|
|
524
|
-
style: ne(`animation-delay:${x * e.value.animationDelayMs}ms !important;`)
|
|
525
|
-
}, be(o.name), 47, bt))
|
|
526
|
-
]))), 256))
|
|
527
|
-
], 8, yt),
|
|
528
|
-
T(t.$slots, "svg", {
|
|
529
|
-
svg: { height: u.value.height, width: u.value.width }
|
|
530
|
-
}, void 0, !0)
|
|
531
|
-
], 10, pt)) : U("", !0),
|
|
532
|
-
t.$slots.watermark ? (b(), I("div", wt, [
|
|
533
|
-
T(t.$slots, "watermark", j(X({ isPrinting: v(O) || v(A) })), void 0, !0)
|
|
534
|
-
])) : U("", !0),
|
|
535
|
-
v(ze) ? (b(), I("div", Ct, [
|
|
536
|
-
T(t.$slots, "reset-action", { reset: v(pe) }, () => [
|
|
537
|
-
he("button", {
|
|
538
|
-
"data-cy-reset": "",
|
|
539
|
-
tabindex: "0",
|
|
540
|
-
role: "button",
|
|
541
|
-
class: "vue-data-ui-refresh-button",
|
|
542
|
-
style: ne({
|
|
543
|
-
background: e.value.style.chart.backgroundColor
|
|
544
|
-
}),
|
|
545
|
-
onClick: n[1] || (n[1] = (o) => v(pe)(!0))
|
|
546
|
-
}, [
|
|
547
|
-
ve(dt, {
|
|
548
|
-
name: "refresh",
|
|
549
|
-
stroke: e.value.style.chart.color
|
|
550
|
-
}, null, 8, ["stroke"])
|
|
551
|
-
], 4)
|
|
552
|
-
], !0)
|
|
553
|
-
])) : U("", !0),
|
|
554
|
-
ve(st, {
|
|
555
|
-
show: c.value.showTooltip && M.value,
|
|
556
|
-
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
557
|
-
color: e.value.style.chart.tooltip.color,
|
|
558
|
-
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
559
|
-
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
560
|
-
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
561
|
-
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
562
|
-
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
563
|
-
position: e.value.style.chart.tooltip.position,
|
|
564
|
-
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
565
|
-
parent: a.value,
|
|
566
|
-
content: ue.value,
|
|
567
|
-
isCustom: Z.value
|
|
568
|
-
}, {
|
|
569
|
-
"tooltip-before": P(() => [
|
|
570
|
-
T(t.$slots, "tooltip-before", j(X({ ...ce.value })), void 0, !0)
|
|
571
|
-
]),
|
|
572
|
-
"tooltip-after": P(() => [
|
|
573
|
-
T(t.$slots, "tooltip-after", j(X({ ...ce.value })), void 0, !0)
|
|
574
|
-
]),
|
|
575
|
-
_: 3
|
|
576
|
-
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
577
|
-
t.$slots.source ? (b(), I("div", {
|
|
578
|
-
key: 6,
|
|
579
|
-
ref_key: "source",
|
|
580
|
-
ref: S,
|
|
581
|
-
dir: "auto"
|
|
582
|
-
}, [
|
|
583
|
-
T(t.$slots, "source", {}, void 0, !0)
|
|
584
|
-
], 512)) : U("", !0),
|
|
585
|
-
i.value ? (b(), K(at, {
|
|
586
|
-
key: 7,
|
|
587
|
-
hideDetails: "",
|
|
588
|
-
config: {
|
|
589
|
-
open: c.value.showTable,
|
|
590
|
-
maxHeight: 1e4,
|
|
591
|
-
body: {
|
|
592
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
593
|
-
color: e.value.style.chart.color
|
|
594
|
-
},
|
|
595
|
-
head: {
|
|
596
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
597
|
-
color: e.value.style.chart.color
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}, {
|
|
601
|
-
content: P(() => [
|
|
602
|
-
(b(), K(lt, {
|
|
603
|
-
key: `table_${F.value}`,
|
|
604
|
-
colNames: p.value.colNames,
|
|
605
|
-
head: p.value.head,
|
|
606
|
-
body: p.value.body,
|
|
607
|
-
config: p.value.config,
|
|
608
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
609
|
-
onClose: n[2] || (n[2] = (o) => c.value.showTable = !1)
|
|
610
|
-
}, {
|
|
611
|
-
th: P(({ th: o }) => [
|
|
612
|
-
he("div", {
|
|
613
|
-
innerHTML: o,
|
|
614
|
-
style: { display: "flex", "align-items": "center" }
|
|
615
|
-
}, null, 8, kt)
|
|
616
|
-
]),
|
|
617
|
-
td: P(({ td: o }) => [
|
|
618
|
-
Ve(be(o.name || o), 1)
|
|
619
|
-
]),
|
|
620
|
-
_: 1
|
|
621
|
-
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
622
|
-
]),
|
|
623
|
-
_: 1
|
|
624
|
-
}, 8, ["config"])) : U("", !0)
|
|
625
|
-
], 44, mt));
|
|
626
|
-
}
|
|
627
|
-
}, Bt = /* @__PURE__ */ vt($t, [["__scopeId", "data-v-ef0e786a"]]);
|
|
628
|
-
export {
|
|
629
|
-
Bt as default
|
|
630
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),h=require("./index-BzyzkUsY.cjs"),pe=require("./Title-CcgS3et4.cjs"),ne=require("./usePrinter-CBfmcTyQ.cjs"),ee=require("./useResponsive-DQmBAoBf.cjs"),me=require("./vue-ui-accordion-B4ML49fc.cjs"),ge=require("./DataTable-DSZwidNa.cjs"),re=require("./useNestedProp-CWnDOg1g.cjs"),ye=require("./PackageVersion-B5BeU3j9.cjs"),be=require("./Tooltip-DWCw-8oz.cjs"),we=require("./PenAndPaper-Bt9JtDPx.cjs"),ke=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./useChartAccessibility-Cm7nkzTG.cjs"),xe=require("./usePanZoom-PXRi2Rwx.cjs"),$e=require("./BaseIcon-BRmHoHji.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se({word:b,fontSize:p,pad:f,canvas:i,ctx:u,svg:v}){u.save(),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`;const n=u.measureText(b.name),a=Math.ceil(n.width)+2+(f?f*2:0),s=Math.ceil(p)+2+(f?f*2:0);i.width=a,i.height=s,u.clearRect(0,0,a,s),u.font=`${v.style&&v.style.bold?"bold ":""}${p}px Arial`,u.textAlign="center",u.textBaseline="middle",u.fillStyle="black",u.fillText(b.name,a/2,s/2);const P=u.getImageData(0,0,a,s).data,S=[];for(let T=0;T<s;T+=1)for(let t=0;t<a;t+=1)P[(T*a+t)*4+3]>1&&S.push([t,T]);return u.restore(),{w:a,h:s,wordMask:S}}function ie({mask:b,maskW:p,maskH:f,wx:i,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const a=i+v[n][0],s=u+v[n][1];if(a<0||s<0||a>=p||s>=f||b[s*p+a])return!1}return!0}function ue({mask:b,maskW:p,maskH:f,wx:i,wy:u,wordMask:v}){for(let n=0;n<v.length;n+=1){const a=i+v[n][0],s=u+v[n][1];a>=0&&s>=0&&a<p&&s<f&&(b[s*p+a]=1)}}function Te({wordMask:b,w:p,h:f,dilation:i}){const u=new Set(b.map(([n,a])=>`${n},${a}`)),v=new Set(u);for(let[n,a]of b)for(let s=-i;s<=i;s+=1)for(let $=-i;$<=i;$+=1){if(s===0&&$===0)continue;const P=n+s,S=a+$;P>=0&&P<p&&S>=0&&S<f&&v.add(`${P},${S}`)}return Array.from(v).map(n=>n.split(",").map(Number))}function Pe({words:b,proximity:p=0,svg:f,strictPixelPadding:i}){const{width:u,height:v}=f,n=Math.round(u),a=Math.round(v),s=1,$=f.minFontSize,P=f.maxFontSize,S=b.map(w=>w.value),T=Math.min(...S),t=Math.max(...S),M=new Uint8Array(n*a),V=document.createElement("canvas"),R=V.getContext("2d",{willReadFrequently:!0});V.width=n,V.height=a;const G=6,H=2,W=2,L=1,c=Math.floor(n/2),j=Math.floor(a/2),Y=[...b].sort((w,N)=>N.value-w.value),I=[];for(const w of Y){let N=$;t!==T&&(N=(w.value-T)/(t-T)*(P-$)+$),N=Math.max($,Math.min(P,N));let F=!1,z=N;for(;!F&&z>=s;){let{w:B,h:d,wordMask:O}=se({word:w,fontSize:z,pad:p,canvas:V,ctx:R,svg:f});i&&(O=Te({wordMask:O,w:B,h:d,dilation:1}));let g=0,A=0;for(;g<Math.max(n,a)&&!F&&A<1e4;){for(let k=0;k<360;k+=G){A+=1;const C=Math.round(c+g*Math.cos(k*Math.PI/180)-B/2),m=Math.round(j+g*Math.sin(k*Math.PI/180)-d/2);if(!(C<0||m<0||C+B>n||m+d>a)&&ie({mask:M,maskW:n,maskH:a,wx:C,wy:m,wordMask:O})){I.push({...w,x:C-n/2,y:m-a/2,fontSize:z,width:B,height:d,angle:0}),ue({mask:M,maskW:n,maskH:a,wx:C,wy:m,wordMask:O}),F=!0;break}}g+=H}F||(z-=1)}if(!F&&z<s){z=s;const{w:B,h:d,wordMask:O}=se({word:w,fontSize:z,pad:p,canvas:V,ctx:R,svg:f});let g=0,A=0;for(;g<Math.max(n,a)&&!F&&A<25e3;){for(let k=0;k<360;k+=W){A+=1;const C=Math.round(c+g*Math.cos(k*Math.PI/180)-B/2),m=Math.round(j+g*Math.sin(k*Math.PI/180)-d/2);if(!(C<0||m<0||C+B>n||m+d>a)&&ie({mask:M,maskW:n,maskH:a,wx:C,wy:m,wordMask:O})){I.push({...w,x:C-n/2,y:m-a/2,fontSize:z,width:B,height:d,angle:0}),ue({mask:M,maskW:n,maskH:a,wx:C,wy:m,wordMask:O}),F=!0;break}}g+=L}}}return I.sort((w,N)=>N.fontSize-w.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=>({"180547ea":o.slicerColor}));const{vue_ui_word_cloud:f}=h.useConfig(),i=b,u=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),v=e.ref(h.createUid()),n=e.ref(0),a=e.ref(null),s=e.ref(null),$=e.ref(null),P=e.ref(0),S=e.ref(0),T=e.ref(!1),t=e.computed({get:()=>L(),set:o=>o}),M=e.ref(V());function V(){return typeof i.dataset=="string"?h.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,r)=>({...o,value:h.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{M.value=V(),A()});const{userOptionsVisible:R,setUserOptionsVisibility:G,keepUserOptionState:H}=ke.useUserOptionState({config:t.value}),{svgRef:W}=Ce.useChartAccessibility({config:t.value.style.chart.title});function L(){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=L(),R.value=!t.value.userOptions.showOnChartHover,w(),P.value+=1,S.value+=1,d.value.showTable=t.value.table.show,d.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const c=e.ref({width:t.value.style.chart.width,height:t.value.style.chart.height,maxFontSize:t.value.style.chart.words.maxFontSize,minFontSize:t.value.style.chart.words.minFontSize,bold:t.value.style.chart.words.bold}),j=ee.debounce(()=>{A()},10),Y=ee.throttle(()=>{const{width:o,height:r}=ee.useResponsive({chart:a.value,title:t.value.style.chart.title.text?s.value:null,source:$.value});requestAnimationFrame(()=>{c.value.width=o,c.value.height=r,e.nextTick(j)})}),I=e.ref(null);e.onMounted(w);function w(){h.objectIsEmpty(i.dataset)?h.error({componentName:"VueUiWordCloud",type:"dataset"}):M.value.forEach((o,r)=>{h.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{u.value=!1,h.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:r})})}),t.value.responsive&&(I.value=new ResizeObserver(Y),I.value.observe(a.value.parentNode))}e.onBeforeUnmount(()=>{I.value&&I.value.disconnect()});const{isPrinting:N,isImaging:F,generatePdf:z,generateImage:B}=ne.usePrinter({elementId:`wordCloud_${v.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),d=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function O(o,r,l="Arial"){const y=document.createElement("canvas").getContext("2d");return y.font=`${r}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:y.measureText(o).width+t.value.style.chart.words.proximity,height:r}}const g=e.ref([]);e.watch(()=>i.dataset,A,{immediate:!0});function A(){const o=[...M.value].map(y=>y.value),r=Math.max(...o),l=Math.min(...o),x=[...M.value].map((y,_)=>{let E=(y.value-l)/(r-l)*(c.value.maxFontSize-c.value.minFontSize)+c.value.minFontSize;E=isNaN(E)?c.value.minFontSize:E;const ae=O(y.name,E);return{...y,id:h.createUid(),fontSize:E,width:ae.width,height:ae.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[_]||t.value.customPalette[_%t.value.customPalette.length]||h.palette[_]||h.palette[_%h.palette.length]:t.value.style.chart.words.color}});g.value=Pe({words:x,svg:c.value,proximity:t.value.style.chart.words.proximity,strictPixelPadding:t.value.strictPixelPadding})}const k=e.computed(()=>{const o=g.value.map(l=>({name:l.name,color:l.color})),r=g.value.map(l=>l.value);return{head:o,body:r}});function C(){e.nextTick(()=>{const o=k.value.head.map((x,y)=>[[x.name],[k.value.body[y]]]),r=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=h.createCsvContent(r);h.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const m=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],r=k.value.head.map((y,_)=>{const E=h.dataLabel({p:t.value.table.td.prefix,v:k.value.body[_],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name},E]}),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:r,config:l}}),X=e.ref(!1);function ce(o){X.value=o,n.value+=1}function de(){return g.value}function te(){d.value.showTable=!d.value.showTable}function oe(){d.value.showTooltip=!d.value.showTooltip}const U=e.ref(!1);function J(){U.value=!U.value}const ve=e.computed(()=>!U.value&&t.value.style.chart.zoom.show),{viewBox:Z,resetZoom:le,isZoom:he}=xe.usePanZoom(W,{x:0,y:0,width:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height},1,ve);p({getData:de,generateCsv:C,generatePdf:z,generateImage:B,toggleTable:te,toggleTooltip:oe,toggleAnnotator:J});const q=e.ref(null),D=e.ref(!1),K=e.ref(""),Q=e.ref(null);function fe(o){if(!d.value.showTooltip)return;q.value=o.id,Q.value={datapoint:o,config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(D.value=!1,h.isFunction(r))try{const l=r({datapoint:o,config:t.value});typeof l=="string"&&(K.value=l,D.value=!0)}catch{console.warn("Custom format cannot be applied."),D.value=!1}if(!D.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,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:a,id:`wordCloud_${v.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:r[3]||(r[3]=()=>e.unref(G)(!0)),onMouseleave:r[4]||(r[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we._sfc_main,{key:0,svgRef:e.unref(W),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:U.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:s,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(pe._sfc_main,{key:`title_${P.value}`,config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&u.value&&(e.unref(H)||e.unref(R))?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${n.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(F),uid:v.value,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:X.value,titles:{...t.value.userOptions.buttonTitles},chartElement:a.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:d.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:U.value,onToggleFullscreen:ce,onGeneratePdf:e.unref(z),onGenerateCsv:C,onGenerateImage:e.unref(B),onToggleTable:te,onToggleTooltip:oe,onToggleAnnotator:J,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:x})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:x})),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:x})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:x})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:x})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:x})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasTooltip","isTooltip","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:W,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:c.value.width<=0?10:c.value.width,height:c.value.height<=0?10:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Be)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(c.value.width<=0?10:c.value.width)/2}, ${(c.value.height<=0?10:c.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,x)=>(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:x,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":q.value&&q.value===l.id&&d.value.showTooltip,"word-not-selected":q.value&&q.value!==l.id&&d.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:y=>fe(l),onMouseleave:r[0]||(r[0]=y=>{q.value=null,T.value=!1}),style:e.normalizeStyle(`animation-delay:${x*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,Me))]))),256))],8,Fe),e.renderSlot(o.$slots,"svg",{svg:{height:c.value.height,width:c.value.width}},void 0,!0)],10,ze)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Oe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(N)||e.unref(F)})),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:r[1]||(r[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:d.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:a.value,content:K.value,isCustom:D.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),u.value?(e.openBlock(),e.createBlock(me.default,{key:7,hideDetails:"",config:{open:d.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_${S.value}`,colNames:m.value.colNames,head:m.value.head,body:m.value.body,config:m.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[2]||(r[2]=l=>d.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-ef0e786a"]]);exports.default=_e;
|