vue-data-ui 2.6.46 → 2.6.48
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-D4sCAfTr.js → Arrow-DeHvznlG.js} +1 -1
- package/dist/{Arrow-l2Rjf1KV.cjs → Arrow-jh252AWJ.cjs} +1 -1
- package/dist/{BaseIcon-Dx5FJt-N.js → BaseIcon-CZ5jKnR9.js} +10 -3
- package/dist/{BaseIcon-BpdQLb-0.cjs → BaseIcon-DWuVl2GU.cjs} +1 -1
- package/dist/{ColorPicker-Ag9OY75a.js → ColorPicker-BRTL96G8.js} +3 -3
- package/dist/{ColorPicker-BkUHmkbg.cjs → ColorPicker-yVPblb7p.cjs} +1 -1
- package/dist/{DataTable-D9wdDVT6.js → DataTable-BgfkOnBv.js} +2 -2
- package/dist/{DataTable-B8Ui_Pd4.cjs → DataTable-zudSEeN9.cjs} +1 -1
- package/dist/{Legend-BFB4DMQS.cjs → Legend-B0HXtacF.cjs} +1 -1
- package/dist/{Legend-BCngKEVr.js → Legend-cMLffIlh.js} +2 -2
- package/dist/{PackageVersion-Da8iEjju.cjs → PackageVersion-C6rcQig3.cjs} +1 -1
- package/dist/{PackageVersion-DR6SOSy8.js → PackageVersion-D4qZn7kl.js} +1 -1
- package/dist/{PenAndPaper-DxsKkGjV.js → PenAndPaper-BAQpQDGa.js} +3 -3
- package/dist/{PenAndPaper-Dpjaroq-.cjs → PenAndPaper-DrtaW-dp.cjs} +1 -1
- package/dist/{Shape-CcATSdDH.js → Shape-CsDyTgir.js} +1 -1
- package/dist/{Shape-DomxDqtX.cjs → Shape-DllpVFvn.cjs} +1 -1
- package/dist/{Slicer-DlCXj2P9.cjs → Slicer-BlR2F0u2.cjs} +1 -1
- package/dist/{Slicer-Bw4VblBK.js → Slicer-msNNVisO.js} +3 -3
- package/dist/{Title-CFmNnjPN.cjs → Title-BMptuaY_.cjs} +1 -1
- package/dist/{Title-Dr0O3Ohb.js → Title-CzrNFvru.js} +1 -1
- package/dist/{Tooltip-UBWsyt1M.cjs → Tooltip-3cVqgTfY.cjs} +1 -1
- package/dist/{Tooltip-C8mLFDBp.js → Tooltip-BjCE_Xgz.js} +1 -1
- package/dist/index-BkXUnRSw.cjs +9 -0
- package/dist/{index-BdV23M_4.js → index-CFFS5fou.js} +3 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +42 -1
- package/dist/types/vue-data-ui.d.ts +42 -1
- package/dist/{useNestedProp-BIeXIQxH.cjs → useNestedProp-BeNFEsBg.cjs} +1 -1
- package/dist/{useNestedProp-DyW-iWus.js → useNestedProp-WmGLMI7a.js} +1 -1
- package/dist/{usePrinter-TFomTfxX.js → usePrinter-V42TEKtB.js} +1 -1
- package/dist/{usePrinter-BUMwWyWM.cjs → usePrinter-pQdLIFcU.cjs} +1 -1
- package/dist/useResponsive-Cw4oZ8sQ.js +192 -0
- package/dist/useResponsive-DQmBAoBf.cjs +1 -0
- package/dist/{vue-data-ui-Cal0DvqU.js → vue-data-ui-BHqGQu50.js} +61 -61
- package/dist/{vue-data-ui-DBoVETZN.cjs → vue-data-ui-CSvoco2Z.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +22 -20
- package/dist/{vue-ui-3d-bar-DUMfvSbU.js → vue-ui-3d-bar-3HSZgDqW.js} +9 -9
- package/dist/{vue-ui-3d-bar-GTKfWFni.cjs → vue-ui-3d-bar-enGIMYF-.cjs} +1 -1
- package/dist/{vue-ui-accordion-2_hSAOvX.js → vue-ui-accordion-68aNqLIG.js} +3 -3
- package/dist/{vue-ui-accordion-BIBhKMbJ.cjs → vue-ui-accordion-C0Xh8ENO.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DotN5JY1.cjs → vue-ui-age-pyramid-0ARpZkDU.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-C0UfrmeD.js → vue-ui-age-pyramid-DqO9Yf9E.js} +11 -11
- package/dist/{vue-ui-annotator-C0V4kD4I.cjs → vue-ui-annotator-DO9HUbCU.cjs} +1 -1
- package/dist/{vue-ui-annotator-C-9pwUrR.js → vue-ui-annotator-ONpVjIMZ.js} +1 -1
- package/dist/{vue-ui-bullet-6vftOeqJ.js → vue-ui-bullet-8GyHi1kK.js} +8 -8
- package/dist/{vue-ui-bullet-Ct39TnfH.cjs → vue-ui-bullet-DHH7hqHz.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Cxpk32bR.cjs → vue-ui-candlestick-BumYsF-O.cjs} +1 -1
- package/dist/{vue-ui-candlestick-IxSh2gnY.js → vue-ui-candlestick-C77dJq5O.js} +12 -12
- package/dist/{vue-ui-carousel-table-DreHo_wE.js → vue-ui-carousel-table-BgdM7pov.js} +4 -4
- package/dist/{vue-ui-carousel-table-BinpEAPd.cjs → vue-ui-carousel-table-BxFiQRr9.cjs} +1 -1
- package/dist/{vue-ui-chestnut-3saDHpZ-.js → vue-ui-chestnut-COPZicvP.js} +8 -8
- package/dist/{vue-ui-chestnut-CpYTb1wd.cjs → vue-ui-chestnut-CQkrFvJa.cjs} +1 -1
- package/dist/{vue-ui-circle-pack-BechgWzd.js → vue-ui-circle-pack-DFr3W9PK.js} +10 -10
- package/dist/{vue-ui-circle-pack-BfskRpSw.cjs → vue-ui-circle-pack-orK3sDBb.cjs} +1 -1
- package/dist/{vue-ui-cursor-BEuJm8Mb.js → vue-ui-cursor-CqT_0xhF.js} +2 -2
- package/dist/{vue-ui-cursor-CRMGfBFa.cjs → vue-ui-cursor-Dd01d8dq.cjs} +1 -1
- package/dist/{vue-ui-dashboard-TQto_FFI.cjs → vue-ui-dashboard-BIY1p9ii.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DSrb1InR.js → vue-ui-dashboard-CwlJ0U8Z.js} +2 -2
- package/dist/{vue-ui-digits-BeoOy04C.js → vue-ui-digits-DWbFzx6q.js} +2 -2
- package/dist/{vue-ui-digits-BRPGEv7S.cjs → vue-ui-digits-ejZtkmOF.cjs} +1 -1
- package/dist/{vue-ui-donut-BWQ3vgjP.js → vue-ui-donut-IqhIH5Hs.js} +229 -219
- package/dist/vue-ui-donut-ZjQOuqdK.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DQIaWcso.js → vue-ui-donut-evolution-DK4Ry8OG.js} +11 -11
- package/dist/{vue-ui-donut-evolution-DOXHsGwg.cjs → vue-ui-donut-evolution-DzBOXBNU.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-BAA0L5kU.js → vue-ui-dumbbell-CxDinKeH.js} +11 -11
- package/dist/{vue-ui-dumbbell--mlgQyZ7.cjs → vue-ui-dumbbell-DoERaO7T.cjs} +1 -1
- package/dist/{vue-ui-flow-CbIxR8qu.js → vue-ui-flow-BnE9cqZL.js} +9 -9
- package/dist/{vue-ui-flow-zigj6Xbo.cjs → vue-ui-flow-BuaBA2J_.cjs} +1 -1
- package/dist/{vue-ui-funnel-C1CjZHuh.js → vue-ui-funnel-CYtp-5QK.js} +10 -10
- package/dist/{vue-ui-funnel-Cs-Kjiev.cjs → vue-ui-funnel-mn1BtOGd.cjs} +1 -1
- package/dist/{vue-ui-galaxy-G9AFzo0J.js → vue-ui-galaxy-Cb6K-pE8.js} +11 -11
- package/dist/{vue-ui-galaxy-CWI4H3RW.cjs → vue-ui-galaxy-D4bzB7id.cjs} +1 -1
- package/dist/{vue-ui-gauge-CsyLGIqh.cjs → vue-ui-gauge-Cs0dyaGc.cjs} +1 -1
- package/dist/{vue-ui-gauge-hDpxwLu6.js → vue-ui-gauge-CwefloBc.js} +8 -8
- package/dist/{vue-ui-gizmo-BIcmHlyo.cjs → vue-ui-gizmo-Breb8hRA.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Bc-DWND7.js → vue-ui-gizmo-CRp_vQxS.js} +3 -3
- package/dist/{vue-ui-heatmap-DZ9xsMHI.cjs → vue-ui-heatmap-BMn83Iw6.cjs} +1 -1
- package/dist/{vue-ui-heatmap-8p4PejGU.js → vue-ui-heatmap-C_64kZde.js} +10 -10
- package/dist/{vue-ui-history-plot-DiTEY9hR.cjs → vue-ui-history-plot-D_0c6-QM.cjs} +1 -1
- package/dist/{vue-ui-history-plot-W2UVpzIY.js → vue-ui-history-plot-DvIN9tLu.js} +12 -12
- package/dist/{vue-ui-kpi-DFFosWUi.js → vue-ui-kpi-D6w1Z0ut.js} +3 -3
- package/dist/{vue-ui-kpi-BXQ6gSky.cjs → vue-ui-kpi-DFXNg3nw.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C2uhjtCz.js → vue-ui-mini-loader-B7tT5tbh.js} +2 -2
- package/dist/{vue-ui-mini-loader-C8hmEB9w.cjs → vue-ui-mini-loader-cO3I00Pq.cjs} +1 -1
- package/dist/{vue-ui-molecule-B1pxOA3p.js → vue-ui-molecule-BsrAlvIA.js} +10 -10
- package/dist/{vue-ui-molecule-CXIE8hWW.cjs → vue-ui-molecule-Cgn3O9Zb.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BuLuDh5y.cjs → vue-ui-mood-radar-ByDpmuxU.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-B-bELxUM.js → vue-ui-mood-radar-Cx_8YqzF.js} +11 -11
- package/dist/{vue-ui-nested-donuts-C4isJwag.js → vue-ui-nested-donuts-DHWlR3jy.js} +221 -211
- package/dist/vue-ui-nested-donuts-aI-ze2j2.cjs +17 -0
- package/dist/{vue-ui-onion-BNPFlq-G.js → vue-ui-onion-B6zylASt.js} +12 -12
- package/dist/{vue-ui-onion-nbqNRCyk.cjs → vue-ui-onion-Dynyp18f.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DFHwTxhN.js → vue-ui-parallel-coordinate-plot-CiLB1BKE.js} +13 -13
- package/dist/{vue-ui-parallel-coordinate-plot-C9FIQC4s.cjs → vue-ui-parallel-coordinate-plot-GWh7DX3Y.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C4NULaSL.js → vue-ui-quadrant-D7SEY4Nj.js} +13 -13
- package/dist/{vue-ui-quadrant-CEyZ6gCX.cjs → vue-ui-quadrant-DxaQZoLd.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-B7PqLKWn.cjs → vue-ui-quick-chart-BxHBJWtp.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-m9kWUtKc.js → vue-ui-quick-chart-D1NfrJg3.js} +10 -10
- package/dist/{vue-ui-radar-CKb7rcO0.js → vue-ui-radar-B9DxtK3T.js} +13 -13
- package/dist/{vue-ui-radar-DHH8CDle.cjs → vue-ui-radar-CoZBZklY.cjs} +1 -1
- package/dist/{vue-ui-rating-BowDISAW.js → vue-ui-rating-DDCXKsJS.js} +2 -2
- package/dist/{vue-ui-rating-nYq9NVf8.cjs → vue-ui-rating-k2SeZNIl.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CXa8v5cY.cjs → vue-ui-relation-circle-B11wnErY.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-CtaNRzML.js → vue-ui-relation-circle-Be4MpIZt.js} +8 -8
- package/dist/{vue-ui-rings-DaydpH_W.js → vue-ui-rings-B2IabkNN.js} +13 -13
- package/dist/{vue-ui-rings-CRgcPBhj.cjs → vue-ui-rings-CnhnlHk4.cjs} +1 -1
- package/dist/{vue-ui-scatter-CH8b47_g.cjs → vue-ui-scatter-tU7Sls6T.cjs} +1 -1
- package/dist/{vue-ui-scatter-Bx16gq37.js → vue-ui-scatter-uyOOlflr.js} +13 -13
- package/dist/{vue-ui-screenshot-BOqEw_Ty.cjs → vue-ui-screenshot-CQUUa4js.cjs} +1 -1
- package/dist/{vue-ui-screenshot-j_ruTkOe.js → vue-ui-screenshot-Y8ZFxWOK.js} +1 -1
- package/dist/{vue-ui-skeleton-CX4m8kLi.cjs → vue-ui-skeleton-BQSnhKj4.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CVnkLuNk.js → vue-ui-skeleton-CE6Rhdwq.js} +3 -3
- package/dist/{vue-ui-smiley-DOcs96EG.cjs → vue-ui-smiley-C9qaB_MO.cjs} +1 -1
- package/dist/{vue-ui-smiley-DGfBC_1p.js → vue-ui-smiley-CwnOcaDD.js} +2 -2
- package/dist/{vue-ui-spark-trend-BjNjO7Al.js → vue-ui-spark-trend-ZMvBWU7T.js} +5 -5
- package/dist/{vue-ui-spark-trend-Cx5_BczW.cjs → vue-ui-spark-trend-xU3yJI0s.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bj9M7Klo.js → vue-ui-sparkbar-CyhZr6ox.js} +4 -4
- package/dist/{vue-ui-sparkbar-CzRw1-5c.cjs → vue-ui-sparkbar-DMJyaiJL.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-iMqket_H.cjs → vue-ui-sparkgauge-BAGFZVWH.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-mx5x8jhB.js → vue-ui-sparkgauge-C59o5PLo.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-knnJtMmd.js → vue-ui-sparkhistogram-Br2lTOWq.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-w4t8R3kU.cjs → vue-ui-sparkhistogram-hR2cA_1P.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BgGreU8G.cjs → vue-ui-sparkline-Cj9Shaxo.cjs} +1 -1
- package/dist/{vue-ui-sparkline-C4xJULc3.js → vue-ui-sparkline-XjVDZSJW.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DKozbgvk.js → vue-ui-sparkstackbar-D1k-uOj4.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-oCiVPgqg.cjs → vue-ui-sparkstackbar-hPuv4RZq.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Bomp_wIS.cjs → vue-ui-stackbar-B3y0c9T0.cjs} +1 -1
- package/dist/{vue-ui-stackbar-avxRfDtE.js → vue-ui-stackbar-DCW5UenP.js} +14 -14
- package/dist/{vue-ui-strip-plot-CdLa8dCp.js → vue-ui-strip-plot-Ctlsvtbq.js} +12 -12
- package/dist/{vue-ui-strip-plot-7k2wQR85.cjs → vue-ui-strip-plot-DNrU2G2r.cjs} +1 -1
- package/dist/{vue-ui-table-CE-PgrMl.cjs → vue-ui-table-CAK_tKR0.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-ycSv15rY.cjs → vue-ui-table-heatmap-BR07D_Jk.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BoI6tise.js → vue-ui-table-heatmap-BqXr-8TN.js} +4 -4
- package/dist/{vue-ui-table-sparkline-idKvXcFK.cjs → vue-ui-table-sparkline-B7B3c3Kb.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Dxx6025N.js → vue-ui-table-sparkline-D_URlvKj.js} +5 -5
- package/dist/{vue-ui-table-C0a-SgcX.js → vue-ui-table-xBKNheLy.js} +1 -1
- package/dist/{vue-ui-thermometer-Bu1o-YxS.cjs → vue-ui-thermometer-BR9SzHOJ.cjs} +1 -1
- package/dist/{vue-ui-thermometer-Cx0BYvoa.js → vue-ui-thermometer-C6PZ9mvq.js} +7 -7
- package/dist/{vue-ui-timer-DkGY_7Z9.js → vue-ui-timer-Bg-ffBSP.js} +6 -6
- package/dist/{vue-ui-timer-D_UKwqRG.cjs → vue-ui-timer-Qv1fF4Rq.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DTm_Xj8_.cjs → vue-ui-tiremarks-BfQsDoMb.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CL8yqBs3.js → vue-ui-tiremarks-CjYT3G69.js} +7 -7
- package/dist/{vue-ui-treemap-rohF9UGD.cjs → vue-ui-treemap-BxdErYLZ.cjs} +1 -1
- package/dist/{vue-ui-treemap-WcZTaeP0.js → vue-ui-treemap-DYmCTmlo.js} +13 -13
- package/dist/{vue-ui-vertical-bar-Czmk3lor.js → vue-ui-vertical-bar-BbSaoHnx.js} +13 -13
- package/dist/{vue-ui-vertical-bar-EJofGF6Z.cjs → vue-ui-vertical-bar-D6020yMP.cjs} +1 -1
- package/dist/{vue-ui-waffle-Ci5lps_0.js → vue-ui-waffle-BYHvDjBd.js} +13 -13
- package/dist/{vue-ui-waffle-C7Lq9EWX.cjs → vue-ui-waffle-DCa7TbcY.cjs} +1 -1
- package/dist/{vue-ui-wheel-DWSgTz2U.js → vue-ui-wheel-CXcHXSmc.js} +8 -8
- package/dist/{vue-ui-wheel-DSUUCTFP.cjs → vue-ui-wheel-Dfpw-TGn.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-pp9BsZMx.cjs → vue-ui-word-cloud-BS68DlmA.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-IoOiZMCJ.js → vue-ui-word-cloud-BaXm2uvH.js} +11 -11
- package/dist/{vue-ui-xy-Bk09XvD1.js → vue-ui-xy-C_ZIwWl7.js} +14 -14
- package/dist/{vue-ui-xy-e1xFpXmD.cjs → vue-ui-xy-DOT-R_9J.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-BEWBX2Os.js → vue-ui-xy-canvas-CW7oyZMn.js} +13 -13
- package/dist/{vue-ui-xy-canvas-hUlid7hP.cjs → vue-ui-xy-canvas-C_LTt1hr.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-FtxQWcA1.cjs +0 -9
- package/dist/useResponsive-N8jl0-aC.cjs +0 -1
- package/dist/useResponsive-vZgZwV-S.js +0 -191
- package/dist/vue-ui-donut-Dam0YSMu.cjs +0 -1
- package/dist/vue-ui-nested-donuts-C4vK7cf-.cjs +0 -17
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useSlots as at, computed as d, ref as v, watch as Ne, onMounted as ot, onBeforeUnmount as ut, createElementBlock as r, openBlock as s, unref as c, normalizeStyle as H, normalizeClass as Be, createBlock as N, createCommentVNode as p, createElementVNode as x, createVNode as re, createSlots as Ve, withCtx as m, renderSlot as g, normalizeProps as U, guardReactiveProps as G, Fragment as $, renderList as L, mergeProps as Me, toDisplayString as A, createTextVNode as De, nextTick as st } from "vue";
|
|
2
|
-
import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, L as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-
|
|
3
|
-
import { t as $t, u as _t } from "./useResponsive-
|
|
4
|
-
import { _ as It } from "./Title-
|
|
5
|
-
import { u as Tt, U as St } from "./usePrinter-
|
|
6
|
-
import { _ as Pt } from "./Tooltip-
|
|
7
|
-
import { D as Ot } from "./DataTable-
|
|
8
|
-
import { L as Lt } from "./Legend-
|
|
9
|
-
import At from "./vue-ui-skeleton-
|
|
10
|
-
import Ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Re } from "./useNestedProp-
|
|
12
|
-
import { _ as zt } from "./PackageVersion-
|
|
13
|
-
import { P as Nt } from "./PenAndPaper-
|
|
2
|
+
import { u as rt, c as nt, t as it, p as B, a as vt, o as ct, e as ne, g as dt, b as ht, i as j, f as _, X as ft, s as pt, w as yt, G as gt, L as mt, d as bt, q as wt, r as kt, x as xt, y as Ct } from "./index-CFFS5fou.js";
|
|
3
|
+
import { t as $t, u as _t } from "./useResponsive-Cw4oZ8sQ.js";
|
|
4
|
+
import { _ as It } from "./Title-CzrNFvru.js";
|
|
5
|
+
import { u as Tt, U as St } from "./usePrinter-V42TEKtB.js";
|
|
6
|
+
import { _ as Pt } from "./Tooltip-BjCE_Xgz.js";
|
|
7
|
+
import { D as Ot } from "./DataTable-BgfkOnBv.js";
|
|
8
|
+
import { L as Lt } from "./Legend-cMLffIlh.js";
|
|
9
|
+
import At from "./vue-ui-skeleton-CE6Rhdwq.js";
|
|
10
|
+
import Ft from "./vue-ui-accordion-68aNqLIG.js";
|
|
11
|
+
import { u as Re } from "./useNestedProp-WmGLMI7a.js";
|
|
12
|
+
import { _ as zt } from "./PackageVersion-D4qZn7kl.js";
|
|
13
|
+
import { P as Nt } from "./PenAndPaper-BAQpQDGa.js";
|
|
14
14
|
import { u as Bt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Vt } from "./Shape-
|
|
15
|
+
import { _ as Vt } from "./Shape-CsDyTgir.js";
|
|
16
16
|
import { u as Mt } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const Rt = ["id"], Ut = ["xmlns", "viewBox"], Gt = ["id"], jt = ["stop-color"], Et = ["stop-color"], Wt = ["id"], qt = ["x", "y", "height", "width"], Ht = ["height", "width"], Xt = { key: 0 }, Yt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], Jt = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], Kt = { key: 1 }, Qt = ["rx", "x", "y", "height", "width", "fill", "filter"], Zt = ["x", "y", "height", "width", "filter"], el = { key: 0 }, tl = { key: 1 }, ll = { key: 2 }, al = { key: 3 }, ol = ["onMouseover", "x", "y", "height", "width"], ul = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-FtxQWcA1.cjs"),ye=require("./useResponsive-N8jl0-aC.cjs"),Fe=require("./Title-CFmNnjPN.cjs"),ge=require("./usePrinter-BUMwWyWM.cjs"),ze=require("./Tooltip-UBWsyt1M.cjs"),Oe=require("./DataTable-B8Ui_Pd4.cjs"),Ae=require("./Legend-BFB4DMQS.cjs"),De=require("./vue-ui-skeleton-CX4m8kLi.cjs"),qe=require("./vue-ui-accordion-BIBhKMbJ.cjs"),me=require("./useNestedProp-BIeXIQxH.cjs"),Me=require("./PackageVersion-Da8iEjju.cjs"),Re=require("./PenAndPaper-Dpjaroq-.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),je=require("./Shape-DomxDqtX.cjs"),Ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ye=["xmlns","viewBox"],Xe=["id"],Je=["stop-color"],Ke=["stop-color"],Qe=["id"],Ze=["x","y","height","width"],et=["height","width"],tt={key:0},lt=["rx","x","y","height","width","stroke","stroke-width","filter"],at=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],ot={key:1},rt=["rx","x","y","height","width","fill","filter"],nt=["x","y","height","width","filter"],ut={key:0},st={key:1},it={key:2},ct={key:3},vt=["onMouseover","x","y","height","width"],dt={key:5,class:"vue-data-ui-watermark"},pt=["onClick"],ht={key:0},ft={key:1},yt=["innerHTML"],gt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:ke,emit:we}){const{vue_ui_waffle:Ce}=u.useConfig(),p=be,xe=e.useSlots(),P=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(u.createUid()),Be=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),N=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>te(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Ue.useUserOptionState({config:t.value}),{svgRef:ee}=Ge.useChartAccessibility({config:t.value.style.chart.title});function te(){const l=me.useNestedProp({userConfig:p.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:u.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=te(),D.value=!t.value.userOptions.showOnChartHover,le(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const V=e.ref(null);function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ye.throttle(()=>{const{width:o,height:a}=ye.useResponsive({chart:N.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,g.value.width=o,g.value.height=a})});V.value=new ResizeObserver(l),V.value.observe(N.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:re,generateImage:ne}=ge.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle",options:t.value.userOptions.print}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),g=e.ref({top:0,left:0,height:512,width:512}),m=e.computed(()=>(g.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(g.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>g.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>g.value.height/t.value.style.chart.layout.grid.size);function se(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),n=r.map(Math.floor),i=r.map(h=>h%1);let d=o-n.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));n[h]+=1,i[h]=0,d-=1}return n}function ie(){return p.dataset.map((l,o)=>({...l,color:u.convertColorToHex(l.color)||ue.value[o]||u.palette[o]||u.palette[o%u.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>ie()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=ie()},{deep:!0});const _e=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,n)=>r+n,0));return se(l)}),$e=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,n)=>r+n));return se(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:_e.value[o]})))),Ne=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:$e.value[o]})));function Te(){return Ne.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Le=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,n=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(n);d+=1)i.push(d);return l=n,{...o,start:r,rects:i}})}),s=e.computed(()=>Le.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),S=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(m.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+g.value.top});return l}),v=e.ref([]),x=e.ref(!1),ce=e.ref(null),ve=e.ref(null);function de(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(n=>n!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=q.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0),a=c.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>n?(cancelAnimationFrame(ce.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[n]}:d),x.value=!1):(x.value=!0,r+=n*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ce.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const n=o;i()}else if(v.value.length<_.value.length-1&&_.value.length>1){let n=function(){r<a/100?(cancelAnimationFrame(ve.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ve.value=requestAnimationFrame(n))};n()}Ee("selectLegend",L.value.map(n=>({name:n.name,color:n.color,value:n.value,proportion:n.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||u.palette[o]||u.palette[o%u.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>de(l.uid),isSegregated:v.value.includes(l.uid)}))),Pe=e.computed(()=>({cy:"waffle-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Ve(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(u.isFunction(a)&&u.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${xe.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const n=u.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${n})</span></div>`:r+=`<b>${n}%</b></div>`}A.value=r}}const Ee=we,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function pe(){e.nextTick(()=>{const l=w.value.head.map((r,n)=>[[r.name],[w.value.body[n]],[isNaN(w.value.body[n]/k.value)?"-":w.value.body[n]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((n,i)=>[{color:n.color,name:n.name},u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":u.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),$=e.ref(!1);function Ie(l){$.value=l,j.value+=1}function he(){y.value.showTable=!y.value.showTable}function fe(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return ke({getData:Te,generatePdf:re,generateCsv:pe,generateImage:ne,toggleTable:he,toggleTooltip:fe,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${$.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re.PenAndPaper,{key:0,svgRef:e.unref(ee),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(oe),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:$.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.setOpacity)(e.unref(u.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ke)],8,Xe))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Qe)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:g.value.height-24,width:g.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,et)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,at))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,rt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(u.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",ut,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(u.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(u.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",it," ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,nt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:n=>Ve(r),onMouseleave:o[0]||(o[0]=n=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,vt))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${K.value}`,legendSet:_.value,config:Pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>de(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",ft," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ht," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(u.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,pt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(je._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:$.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),P.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:y.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(Oe.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,yt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},mt=We._export_sfc(gt,[["__scopeId","data-v-b3044eda"]]);exports.default=mt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BkXUnRSw.cjs"),ye=require("./useResponsive-DQmBAoBf.cjs"),Fe=require("./Title-BMptuaY_.cjs"),ge=require("./usePrinter-pQdLIFcU.cjs"),ze=require("./Tooltip-3cVqgTfY.cjs"),Oe=require("./DataTable-zudSEeN9.cjs"),Ae=require("./Legend-B0HXtacF.cjs"),De=require("./vue-ui-skeleton-BQSnhKj4.cjs"),qe=require("./vue-ui-accordion-C0Xh8ENO.cjs"),me=require("./useNestedProp-BeNFEsBg.cjs"),Me=require("./PackageVersion-C6rcQig3.cjs"),Re=require("./PenAndPaper-DrtaW-dp.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),je=require("./Shape-DllpVFvn.cjs"),Ge=require("./useChartAccessibility-Cm7nkzTG.cjs"),We=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),He=["id"],Ye=["xmlns","viewBox"],Xe=["id"],Je=["stop-color"],Ke=["stop-color"],Qe=["id"],Ze=["x","y","height","width"],et=["height","width"],tt={key:0},lt=["rx","x","y","height","width","stroke","stroke-width","filter"],at=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],ot={key:1},rt=["rx","x","y","height","width","fill","filter"],nt=["x","y","height","width","filter"],ut={key:0},st={key:1},it={key:2},ct={key:3},vt=["onMouseover","x","y","height","width"],dt={key:5,class:"vue-data-ui-watermark"},pt=["onClick"],ht={key:0},ft={key:1},yt=["innerHTML"],gt={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:ke,emit:we}){const{vue_ui_waffle:Ce}=u.useConfig(),p=be,xe=e.useSlots(),P=e.computed(()=>!!p.dataset&&p.dataset.length),f=e.ref(u.createUid()),Be=e.ref(null),O=e.ref(!1),A=e.ref(""),B=e.ref(null),j=e.ref(0),N=e.ref(null),G=e.ref(null),W=e.ref(null),H=e.ref(null),Y=e.ref(null),X=e.ref(0),J=e.ref(0),K=e.ref(0),t=e.computed({get:()=>te(),set:l=>l}),{userOptionsVisible:D,setUserOptionsVisibility:Q,keepUserOptionState:Z}=Ue.useUserOptionState({config:t.value}),{svgRef:ee}=Ge.useChartAccessibility({config:t.value.style.chart.title});function te(){const l=me.useNestedProp({userConfig:p.config,defaultConfig:Ce});return l.theme?{...me.useNestedProp({userConfig:u.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>p.config,l=>{t.value=te(),D.value=!t.value.userOptions.showOnChartHover,le(),X.value+=1,J.value+=1,K.value+=1,y.value.showTable=t.value.table.show,y.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const V=e.ref(null);function le(){if(u.objectIsEmpty(p.dataset)?u.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{u.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ye.throttle(()=>{const{width:o,height:a}=ye.useResponsive({chart:N.value,title:t.value.style.chart.title.text?G.value:null,legend:t.value.style.chart.legend.show?W.value:null,source:H.value,noTitle:Y.value});requestAnimationFrame(()=>{C.value.width=o,C.value.height=a,g.value.width=o,g.value.height=a})});V.value=new ResizeObserver(l),V.value.observe(N.value.parentNode)}}e.onMounted(()=>{le()}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});const{isPrinting:ae,isImaging:oe,generatePdf:re,generateImage:ne}=ge.usePrinter({elementId:`vue-ui-waffle_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle",options:t.value.userOptions.print}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ue=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),C=e.ref({height:512,width:512}),g=e.ref({top:0,left:0,height:512,width:512}),m=e.computed(()=>(g.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),b=e.computed(()=>(g.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),T=e.computed(()=>g.value.width/t.value.style.chart.layout.grid.size),E=e.computed(()=>g.value.height/t.value.style.chart.layout.grid.size);function se(l){const o=t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.size,a=l.reduce((h,U)=>h+U,0),r=l.map(h=>h/a*o),n=r.map(Math.floor),i=r.map(h=>h%1);let d=o-n.reduce((h,U)=>h+U,0);for(;d>0;){let h=i.indexOf(Math.max(...i));n[h]+=1,i[h]=0,d-=1}return n}function ie(){return p.dataset.map((l,o)=>({...l,color:u.convertColorToHex(l.color)||ue.value[o]||u.palette[o]||u.palette[o%u.palette.length],uid:`serie_${o}`,absoluteIndex:o}))}const q=e.computed(()=>ie()),c=e.ref(q.value);e.watch(()=>p.dataset,l=>{c.value=ie()},{deep:!0});const _e=e.computed(()=>{const l=c.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,n)=>r+n,0));return se(l)}),$e=e.computed(()=>{const l=c.value.map((o,a)=>(o.values||[]).reduce((r,n)=>r+n));return se(l)}),L=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&u.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),c.value.filter((l,o)=>!v.value.includes(l.uid)).map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:_e.value[o]})))),Ne=e.computed(()=>c.value.map((l,o)=>({absoluteIndex:l.absoluteIndex,uid:l.uid,name:l.name,color:l.color,value:(l.values||[]).reduce((a,r)=>a+r,0),absoluteValues:l.values||[],proportion:$e.value[o]})));function Te(){return Ne.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion}))}const Le=e.computed(()=>{let l=0;return L.value.map((o,a)=>{const r=l,n=r+o.proportion,i=[];for(let d=Math.floor(r);d<Math.floor(n);d+=1)i.push(d);return l=n,{...o,start:r,rects:i}})}),s=e.computed(()=>Le.value.flatMap((l,o)=>l.rects.map((a,r)=>({isFirst:r===0,isLongEnough:a.length>2,name:l.name,color:l.color,value:l.value,serieIndex:o,absoluteStartIndex:r<3,serieId:l.uid,...l}))).map((l,o)=>({...l,isAbsoluteFirst:o%t.value.style.chart.layout.grid.size===0}))),S=e.computed(()=>{const l=[];for(let o=0;o<t.value.style.chart.layout.grid.size;o+=1)for(let a=0;a<t.value.style.chart.layout.grid.size;a+=1)l.push({isStartOfLine:a===0,position:t.value.style.chart.layout.grid.vertical?o:a,x:(t.value.style.chart.layout.grid.vertical?o:a)*(m.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(b.value+t.value.style.chart.layout.grid.spaceBetween)+g.value.top});return l}),v=e.ref([]),x=e.ref(!1),ce=e.ref(null),ve=e.ref(null);function de(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(n=>n!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=q.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0),a=c.value.find(n=>n.uid===l).values.reduce((n,i)=>n+i,0);let r=a;if(v.value.includes(l)){let i=function(){r>n?(cancelAnimationFrame(ce.value),c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[n]}:d),x.value=!1):(x.value=!0,r+=n*.025,c.value=c.value.map((d,h)=>d.uid===l?{...d,values:[r]}:d),ce.value=requestAnimationFrame(i))};v.value=v.value.filter(d=>d!==l);const n=o;i()}else if(v.value.length<_.value.length-1&&_.value.length>1){let n=function(){r<a/100?(cancelAnimationFrame(ve.value),v.value.push(l),c.value=c.value.map((i,d)=>i.uid===l?{...i,values:[0]}:i),x.value=!1):(x.value=!0,r/=1.15,c.value=c.value.map(i=>i.uid===l?{...i,values:[r]}:i),ve.value=requestAnimationFrame(n))};n()}Ee("selectLegend",L.value.map(n=>({name:n.name,color:n.color,value:n.value,proportion:n.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>c.value.map((l,o)=>({name:l.name,color:l.color||ue[o]||u.palette[o]||u.palette[o%u.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map(l=>({...l,proportion:l.value/c.value.map(o=>(o.values||[]).reduce((a,r)=>a+r,0)).reduce((o,a)=>o+a,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>de(l.uid),isSegregated:v.value.includes(l.uid)}))),Pe=e.computed(()=>({cy:"waffle-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),k=e.computed(()=>L.value.map(l=>l.value).reduce((l,o)=>l+o,0)),M=e.ref(null);function Ve(l){if(v.value.length===p.dataset.length)return;const o=s.value[l];M.value={datapoint:o,seriesIndex:o.absoluteIndex,series:c.value,config:t.value},O.value=!0,B.value=s.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(u.isFunction(a)&&u.functionReturnsString(()=>a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value})))A.value=a({seriesIndex:s.value[l].absoluteIndex,datapoint:o,series:c.value,config:t.value});else{let r="";if(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,r+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${o.color}" />${xe.pattern?`<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${f.value}_${o.absoluteIndex})"/>`:""}</svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:s.value[l].absoluteIndex,series:c.value})}</b>`),t.value.style.chart.tooltip.showPercentage){const n=u.dataLabel({v:o.value/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage});t.value.style.chart.tooltip.showValue?r+=`<span>(${n})</span></div>`:r+=`<b>${n}%</b></div>`}A.value=r}}const Ee=we,w=e.computed(()=>{const l=L.value.map(a=>({name:a.name,color:a.color})),o=L.value.map(a=>a.value);return{head:l,body:o}});function I(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${f.value})`:""}function pe(){e.nextTick(()=>{const l=w.value.head.map((r,n)=>[[r.name],[w.value.body[n]],[isNaN(w.value.body[n]/k.value)?"-":w.value.body[n]/k.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=u.createCsvContent(o);u.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const F=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,k.value,u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:k.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),"100%"],o=w.value.head.map((n,i)=>[{color:n.color,name:n.name},u.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,w.value.body[i],u.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:w.value.body[i],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue})),isNaN(w.value.body[i]/k.value)?"-":u.dataLabel({v:w.value.body[i]/k.value*100,s:"%",r:t.value.table.td.roundingPercentage})]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},shape:"square",breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:o,config:a,colNames:r}}),$=e.ref(!1);function Ie(l){$.value=l,j.value+=1}function he(){y.value.showTable=!y.value.showTable}function fe(){y.value.showTooltip=!y.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return ke({getData:Te,generatePdf:re,generateCsv:pe,generateImage:ne,toggleTable:he,toggleTooltip:fe,toggleAnnotator:R}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${$.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[3]||(o[3]=()=>e.unref(Q)(!0)),onMouseleave:o[4]||(o[4]=()=>e.unref(Q)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re.PenAndPaper,{key:0,svgRef:e.unref(ee),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Y,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:G,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&P.value&&(e.unref(Z)||e.unref(D))?(e.openBlock(),e.createBlock(ge.UserOptions,{ref_key:"details",ref:Be,key:`user_options_${j.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ae),isImaging:e.unref(oe),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:$.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:Ie,onGeneratePdf:e.unref(re),onGenerateCsv:pe,onGenerateImage:e.unref(ne),onToggleTable:he,onToggleTooltip:fe,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(Z)?e.unref(D)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),P.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:ee,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${C.value.width<=0?10:C.value.width} ${C.value.height<=0?10:C.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(u.setOpacity)(e.unref(u.shiftHue)(a.color,.05),100-t.value.style.chart.layout.rect.gradientIntensity)},null,8,Je),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Ke)],8,Xe))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${f.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},o[5]||(o[5]=[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1),e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)]),8,Qe)]),t.value.useCustomCells&&s.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.mergeProps({ref_for:!0},{cell:{...a,color:s.value[r].color,...s.value[r]},isSelected:[null,void 0].includes(B.value)?!0:s.value[r].serieIndex===B.value}),void 0,!0)],8,Ze))),256)):e.createCommentVNode("",!0),!s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock("rect",{key:1,x:12,y:12,height:g.value.height-24,width:g.value.width-24,rx:3,fill:"none",stroke:"black"},null,8,et)):s.value.length&&!t.value.useCustomCells?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,a=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(l.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:a.absoluteIndex,patternId:`pattern_${f.value}_${a.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${f.value}_${r})`:s.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:I(s.value[r].serieIndex)},null,8,at))),256)),l.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{rx:t.value.style.chart.layout.rect.rounded?t.value.style.chart.layout.rect.rounding:0,x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:b.value<=0?1e-4:b.value,width:m.value<=0?1e-4:m.value,fill:`url(#pattern_${f.value}_${s.value[r].absoluteIndex})`,stroke:"none",filter:I(s.value[r].serieIndex)},null,8,rt))),256))])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[s.value.length&&!x.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(s.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||s.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&s.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.labels.captions.offsetY+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value*t.value.style.chart.layout.grid.size<=0?1e-4:T.value*t.value.style.chart.layout.grid.size,filter:I(s.value[r].serieIndex)},[e.createElementVNode("div",{class:"vue-ui-waffle-caption",style:e.normalizeStyle(`height: 100%; width: 100%; font-size:${t.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${T.value/12}px;color:${e.unref(u.adaptColorToBackground)(s.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",ut,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(u.abbreviate)({source:s.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):s.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(e.unref(u.dataLabel)({v:s.value[r].proportion,s:"%",r:t.value.style.chart.layout.labels.captions.roundingPercentage})),1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",it," ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a}))+") ",1)):e.createCommentVNode("",!0),!t.value.style.chart.layout.labels.captions.showPercentage&&t.value.style.chart.layout.labels.captions.showValue?(e.openBlock(),e.createElementBlock("span",ct,e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,s.value[r].value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:s.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}),{datapoint:s.value[r],position:a})),1)):e.createCommentVNode("",!0)],4)],8,nt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:n=>Ve(r),onMouseleave:o[0]||(o[0]=n=>{O.value=!1,B.value=null}),x:a.x+t.value.style.chart.layout.grid.spaceBetween/2,y:a.y+t.value.style.chart.layout.grid.spaceBetween/2,height:E.value<=0?1e-4:E.value,width:T.value<=0?1e-4:T.value,fill:"transparent",stroke:"none"},null,40,vt))),256)),e.renderSlot(l.$slots,"svg",{svg:C.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ae)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),P.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(De.default,{key:6,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:W},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Ae.Legend,{key:`legend_${K.value}`,legendSet:_.value,config:Pe.value,onClickMarker:o[1]||(o[1]=({legend:a})=>de(a.uid))},e.createSlots({item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:r=>a.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(a.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(u.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue,isAnimating:x.value}),{datapoint:a}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",ft," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",ht," ("+e.toDisplayString(isNaN(a.value/k.value)?"-":e.unref(u.dataLabel)({v:a.value/k.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:x.value}))+") ",1))],12,pt)]),_:2},[l.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:a,index:r})=>[e.createVNode(je._sfc_main,{shape:a.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:H,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:y.value.showTooltip&&O.value&&v.value.length<p.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:N.value,content:A.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize,isFullscreen:$.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom","fontSize","isFullscreen"]),P.value?(e.openBlock(),e.createBlock(qe.default,{key:8,hideDetails:"",config:{open:y.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(Oe.DataTable,{key:`table_${J.value}`,colNames:F.value.colNames,head:F.value.head,body:F.value.body,config:F.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[2]||(o[2]=a=>y.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,yt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,He))}},mt=We._export_sfc(gt,[["__scopeId","data-v-b3044eda"]]);exports.default=mt;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed as f, ref as c, watch as J, onMounted as he, onBeforeUnmount as de, createElementBlock as v, openBlock as n, unref as s, normalizeStyle as S, createBlock as _, createCommentVNode as h, createSlots as ye, withCtx as g, renderSlot as y, normalizeProps as $, guardReactiveProps as O, normalizeClass as z, createVNode as fe, Fragment as K, renderList as Q, toDisplayString as pe } from "vue";
|
|
2
|
-
import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-
|
|
3
|
-
import { _ as Ie } from "./Title-
|
|
4
|
-
import { u as Pe, U as xe } from "./usePrinter-
|
|
5
|
-
import { t as Ae, u as Fe } from "./useResponsive-
|
|
6
|
-
import Se from "./vue-ui-skeleton-
|
|
7
|
-
import { u as te } from "./useNestedProp-
|
|
8
|
-
import { _ as ze } from "./PackageVersion-
|
|
9
|
-
import { P as Me } from "./PenAndPaper-
|
|
2
|
+
import { u as ge, c as me, a as ke, o as we, e as be, w as Z, m as Ce, X as _e, i as $e, v as ee, f as Oe } from "./index-CFFS5fou.js";
|
|
3
|
+
import { _ as Ie } from "./Title-CzrNFvru.js";
|
|
4
|
+
import { u as Pe, U as xe } from "./usePrinter-V42TEKtB.js";
|
|
5
|
+
import { t as Ae, u as Fe } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
+
import Se from "./vue-ui-skeleton-CE6Rhdwq.js";
|
|
7
|
+
import { u as te } from "./useNestedProp-WmGLMI7a.js";
|
|
8
|
+
import { _ as ze } from "./PackageVersion-D4qZn7kl.js";
|
|
9
|
+
import { P as Me } from "./PenAndPaper-BAQpQDGa.js";
|
|
10
10
|
import { u as Te } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as Ne } from "./useChartAccessibility-BWojgys7.js";
|
|
12
12
|
import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-FtxQWcA1.cjs"),Q=require("./Title-CFmNnjPN.cjs"),R=require("./usePrinter-BUMwWyWM.cjs"),V=require("./useResponsive-N8jl0-aC.cjs"),Z=require("./vue-ui-skeleton-CX4m8kLi.cjs"),U=require("./useNestedProp-BIeXIQxH.cjs"),ee=require("./PackageVersion-Da8iEjju.cjs"),te=require("./PenAndPaper-Dpjaroq-.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),O=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:_,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=ne.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),O.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),o=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(o.value.width,o.value.height)*.9/2,centerX:o.value.width/2,centerY:o.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:n}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{o.value.width=a,o.value.height=n,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,n)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const n=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+n,l):s.value>l&&(s.value=Math.max(s.value-n,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const n=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(o.value.size/v.value*a),{x:J,y:K}=E(o.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(n,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):n})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[0]||(a[0]=()=>e.unref(_)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(_)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.value,(n,u)=>(e.openBlock(),e.createElementBlock("line",{x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2,stroke:n.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(o.value.width,o.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(n,u)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:n.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=oe._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-BkXUnRSw.cjs"),Q=require("./Title-BMptuaY_.cjs"),R=require("./usePrinter-pQdLIFcU.cjs"),V=require("./useResponsive-DQmBAoBf.cjs"),Z=require("./vue-ui-skeleton-BQSnhKj4.cjs"),U=require("./useNestedProp-BeNFEsBg.cjs"),ee=require("./PackageVersion-C6rcQig3.cjs"),te=require("./PenAndPaper-DrtaW-dp.cjs"),le=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],re=["xmlns","viewBox"],se=["width","height"],ue=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],ie=["d","fill"],ce=["cx","cy","r","stroke","stroke-width"],ve=["x","y","font-size","fill","font-weight"],de={key:5,class:"vue-data-ui-watermark"},he={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(L,{expose:X}){const{vue_ui_wheel:j}=i.useConfig(),c=L,m=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),g=e.ref(i.createUid()),G=e.ref(null),b=e.ref(0),d=e.ref(null),B=e.ref(null),P=e.ref(null),S=e.ref(null),O=e.ref(0),t=e.computed({get:()=>$(),set:l=>l}),{userOptionsVisible:k,setUserOptionsVisibility:_,keepUserOptionState:N}=le.useUserOptionState({config:t.value}),{svgRef:x}=ne.useChartAccessibility({config:t.value.style.chart.title});function $(){const l=U.useNestedProp({userConfig:c.config,defaultConfig:j});return l.theme?{...U.useNestedProp({userConfig:i.themes.vue_ui_wheel[l.theme]||c.config,defaultConfig:l})}:l}e.watch(()=>c.config,l=>{t.value=$(),k.value=!t.value.userOptions.showOnChartHover,M(),O.value+=1},{deep:!0});const{isPrinting:I,isImaging:z,generatePdf:A,generateImage:F}=R.usePrinter({elementId:g.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel",options:t.value.userOptions.print}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),o=e.ref({size:360,height:360,width:360}),w=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(o.value.width,o.value.height)*.9/2,centerX:o.value.width/2,centerY:o.value.height/2}));function E(l,a=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*a,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*a}}const s=e.ref(t.value.style.chart.animation.use?0:c.dataset.percentage||0);e.watch(()=>c.dataset,l=>{t.value.style.chart.animation.use?T(l.percentage):s.value=l.percentage||0},{deep:!0});const h=e.ref(null);e.onMounted(()=>{M()});function M(){if(i.objectIsEmpty(c.dataset)&&i.error({componentName:"VueUiWheel",type:"dataset"}),T(c.dataset.percentage||0),t.value.responsive){const l=V.throttle(()=>{const{width:a,height:n}=V.useResponsive({chart:d.value,title:t.value.style.chart.title.text?B.value:null,source:P.value,noTitle:S.value});requestAnimationFrame(()=>{o.value.width=a,o.value.height=n,w.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(a,n)})});h.value=new ResizeObserver(l),h.value.observe(d.value.parentNode)}}e.onBeforeUnmount(()=>{h.value&&h.value.disconnect()});function T(l){let a=t.value.style.chart.animation.speed;const n=Math.abs(l-s.value)/(a*120);function u(){s.value<l?s.value=Math.min(s.value+n,l):s.value>l&&(s.value=Math.max(s.value-n,l)),s.value!==l&&requestAnimationFrame(u)}u()}const v=e.computed(()=>Math.max(100,t.value.style.chart.layout.wheel.ticks.quantity)),f=e.computed(()=>100/v.value),q=e.computed(()=>{const l=[];for(let a=0;a<v.value;a+=1){const n=s.value>a*f.value?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:u,y:W}=E(o.value.size/v.value*a),{x:J,y:K}=E(o.value.size/v.value*a,t.value.style.chart.layout.wheel.ticks.sizeRatio);l.push({x1:u,y1:W,x2:J,y2:K,color:t.value.style.chart.layout.wheel.ticks.gradient.show?i.shiftHue(n,a*f.value/v.value*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):n})}return l}),D=e.computed(()=>i.makeDonut({series:q.value.map(l=>({name:"",value:1,color:l.color}))},r.value.centerX,r.value.centerY,r.value.radius,r.value.radius,1.99999,2,1,360,105.25,r.value.radius*(1-t.value.style.chart.layout.wheel.ticks.sizeRatio))),y=e.ref(!1);function Y(l){y.value=l,b.value+=1}const p=e.ref(!1);function C(){p.value=!p.value}return X({generatePdf:A,generateImage:F,toggleAnnotator:C}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:d,id:g.value,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[0]||(a[0]=()=>e.unref(_)(!0)),onMouseleave:a[1]||(a[1]=()=>e.unref(_)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(te.PenAndPaper,{key:0,svgRef:e.unref(x),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:p.value,onClose:C},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:S,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:B,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Q._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(N)||e.unref(k))?(e.openBlock(),e.createBlock(R.UserOptions,{ref_key:"details",ref:G,key:`user_options_${b.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(I),isImaging:e.unref(z),uid:g.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:y.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:p.value,chartElement:d.value,onToggleFullscreen:Y,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(F),onToggleAnnotator:C,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:n,color:u})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:n,color:u})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:u})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:n,isAnnotator:u})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:n,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","position","titles","hasAnnotator","isAnnotation","chartElement","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:x,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${o.value.width<=0?10:o.value.width} ${o.value.height<=0?10:o.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(ee._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:o.value.width<=0?10:o.value.width,height:o.value.height<=0?10:o.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,se)):e.createCommentVNode("",!0),t.value.style.chart.layout.wheel.ticks.type==="classic"?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(q.value,(n,u)=>(e.openBlock(),e.createElementBlock("line",{x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2,stroke:n.color,"stroke-width":t.value.style.chart.layout.wheel.ticks.strokeWidth/360*Math.min(o.value.width,o.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ue))),256)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(D.value,(n,u)=>(e.openBlock(),e.createElementBlock("path",{d:n.arcSlice,fill:n.color,class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&u*f.value<=s.value})},null,10,ie))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:3,cx:r.value.centerX,cy:r.value.centerY,r:r.value.radius*.8<=0?1e-4:r.value.radius*.8,stroke:t.value.style.chart.layout.innerCircle.stroke,"stroke-width":t.value.style.chart.layout.innerCircle.strokeWidth,fill:"none"},null,8,ce)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:r.value.centerX,y:r.value.centerY+w.value/3,"font-size":w.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(i.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,s.value/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.wheel.ticks.activeColor,"text-anchor":"middle","font-weight":t.value.style.chart.layout.percentage.bold?"bold":"normal",style:{"font-variant-numeric":"tabluar-nums"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.style.chart.layout.percentage.formatter,e.unref(i.checkNaN)(s.value),e.unref(i.dataLabel)({v:e.unref(i.checkNaN)(s.value),s:"%",r:t.value.style.chart.layout.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:o.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(I)||e.unref(z)})),void 0,!0)])):e.createCommentVNode("",!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Z.default,{key:7,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],44,ae))}},fe=oe._export_sfc(he,[["__scopeId","data-v-0ab72261"]]);exports.default=fe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-FtxQWcA1.cjs"),Te=require("./Title-CFmNnjPN.cjs"),ce=require("./usePrinter-BUMwWyWM.cjs"),H=require("./useResponsive-N8jl0-aC.cjs"),Ne=require("./vue-ui-accordion-BIBhKMbJ.cjs"),Pe=require("./DataTable-B8Ui_Pd4.cjs"),Be=require("./BaseIcon-BpdQLb-0.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=require("./useNestedProp-BIeXIQxH.cjs"),Fe=require("./PackageVersion-Da8iEjju.cjs"),ze=require("./Tooltip-UBWsyt1M.cjs"),Oe=require("./PenAndPaper-Dpjaroq-.cjs"),Ae=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ee={"data-html2canvas-ignore":""},Me={key:0,class:"reset-wrapper"},Ie={key:1,class:"reset-wrapper"},Re={class:"mono-slicer"},_e=["min","max","value"],qe={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(d,{emit:R}){e.useCssVars(y=>({"782b8172":i.value,"102109e6":B.value,"642212d7":$.value,"1f5369d4":d.selectColor,"22b98ab8":C.value}));const v=d,i=e.computed(()=>v.inputColor),C=e.computed(()=>v.background),$=e.computed(()=>`${v.selectColor}33`),B=e.computed(()=>v.borderColor),f=R;function T(){f("reset")}const F=e.computed(()=>{const y=v.max-v.min,m=0,b=(v.value-v.min)/y*100;return{left:`${m}%`,width:`${b-m}%`,background:v.selectColor}});return(y,m)=>(e.openBlock(),e.createElementBlock("div",Ee,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Me,[d.useResetSlot?e.renderSlot(y.$slots,"reset-action",{key:1,reset:T},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:T},[e.createVNode(Be.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ie)),e.createElementVNode("div",Re,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(F.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=b=>f("update:value",Number(b.target.value)))},null,40,_e)])]))}},We=ve._export_sfc(qe,[["__scopeId","data-v-b4e6aee9"]]),Ue=["id"],De=["xmlns","viewBox"],Ge=["width","height"],Le=["transform"],je=["fill","font-weight","x","y","font-size","transform","onMouseover"],He={key:4,class:"vue-data-ui-watermark"},Xe=["innerHTML"],Ye={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:R}){const{vue_ui_word_cloud:v}=s.useConfig(),i=d,C=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),$=e.ref(s.createUid()),B=e.ref(0),f=e.ref(null),T=e.ref(null),F=e.ref(null),y=e.ref(0),m=e.ref(0),b=e.ref(!1),t=e.computed({get:()=>Q(),set:o=>o}),k=e.ref(X());function X(){return typeof i.dataset=="string"?s.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{k.value=X(),O()});const{userOptionsVisible:_,setUserOptionsVisibility:Y,keepUserOptionState:J}=Ae.useUserOptionState({config:t.value}),{svgRef:K}=Ve.useChartAccessibility({config:t.value.style.chart.title});function Q(){const o=de.useNestedProp({userConfig:i.config,defaultConfig:v});return o.theme?{...de.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>i.config,o=>{t.value=Q(),_.value=!t.value.userOptions.showOnChartHover,ee(),y.value+=1,m.value+=1,q(),c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const Z=e.ref(null),w=e.ref(0),r=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}),he=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:f.value,title:t.value.style.chart.title.text?T.value:null,slicer:t.value.style.chart.zoom.show&&Z.value,source:F.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(O)})});e.watch(()=>w.value,()=>{me()});const me=H.debounce(()=>{O()},10);function q(){w.value=W.value}const z=e.ref(null);e.onMounted(()=>{ee(),q()});function ee(){s.objectIsEmpty(i.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):k.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{C.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(z.value=new ResizeObserver(he),z.value.observe(f.value.parentNode))}e.onBeforeUnmount(()=>{z.value&&z.value.disconnect()});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ae}=ce.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),c=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function pe(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function fe(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function ge(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,p=0;return o.forEach(x=>{let L=!1;for(let I=0;I<Math.max(a,l)/2&&!L;I+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const ie=j*Math.PI/180,ke=h+I*Math.cos(ie)-x.width/2,we=p+I*Math.sin(ie)-x.height/2,g={...x,x:ke,y:we},Se=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,xe=u.some($e=>fe(g,$e));Se&&!xe&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>i.dataset,O,{immediate:!0});const W=e.computed(()=>Math.round(Math.min(...k.value.map(o=>o.value)))),ne=e.computed(()=>Math.round(Math.max(...k.value.map(o=>o.value))));function O(){const o=[...k.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...k.value].filter(n=>n.value>=w.value).map((n,h)=>{let p=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;p=isNaN(p)?r.value.minFontSize:p;const x=pe(n.name,p);return{...n,id:s.createUid(),fontSize:p,width:x.width,height:x.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=ge(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const A=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function re(){e.nextTick(()=>{const o=A.value.head.map((u,n)=>[[u.name],[A.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const V=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=A.value.head.map((n,h)=>{const p=s.dataLabel({p:t.value.table.td.prefix,v:A.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},p]}),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:a,config:l}}),E=e.ref(!1);function ye(o){E.value=o,B.value+=1}function be(){return N.value}function se(){c.value.showTable=!c.value.showTable}function ue(){c.value.showTooltip=!c.value.showTooltip}const M=e.ref(!1);function U(){M.value=!M.value}R({getData:be,generateCsv:re,generatePdf:le,generateImage:ae,toggleTable:se,toggleTooltip:ue,toggleAnnotator:U});const S=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function Ce(o){if(!c.value.showTooltip)return;S.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.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>`;D.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}b.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:f,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(Y)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(Y)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Oe.PenAndPaper,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:U},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:T,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${y.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(J)||e.unref(_))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref:"details",key:`user_option_${B.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:$.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:E.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:c.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(le),onGenerateCsv:re,onGenerateImage:e.unref(ae),onToggleTable:se,onToggleTooltip:ue,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:u})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:u})),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:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),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:K,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Fe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,u)=>(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:u,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":S.value&&S.value===l.id&&c.value.showTooltip,"word-not-selected":S.value&&S.value!==l.id&&c.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>Ce(l),onMouseleave:a[0]||(a[0]=n=>{S.value=null,b.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,je))]))),256))],8,Le),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,De)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:c.value.showTooltip&&b.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:f.value,content:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:Z,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&W.value<ne.value?(e.openBlock(),e.createBlock(We,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:W.value,max:ne.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:q},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:F,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,hideDetails:"",config:{open:c.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(Pe.DataTable,{key:`table_${m.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Xe)]),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,Ue))}},Je=ve._export_sfc(Ye,[["__scopeId","data-v-117f5e65"]]);exports.default=Je;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BkXUnRSw.cjs"),Te=require("./Title-BMptuaY_.cjs"),ce=require("./usePrinter-pQdLIFcU.cjs"),H=require("./useResponsive-DQmBAoBf.cjs"),Ne=require("./vue-ui-accordion-C0Xh8ENO.cjs"),Pe=require("./DataTable-zudSEeN9.cjs"),Be=require("./BaseIcon-DWuVl2GU.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=require("./useNestedProp-BeNFEsBg.cjs"),Fe=require("./PackageVersion-C6rcQig3.cjs"),ze=require("./Tooltip-3cVqgTfY.cjs"),Oe=require("./PenAndPaper-DrtaW-dp.cjs"),Ae=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ee={"data-html2canvas-ignore":""},Me={key:0,class:"reset-wrapper"},Ie={key:1,class:"reset-wrapper"},Re={class:"mono-slicer"},_e=["min","max","value"],qe={__name:"MonoSlicer",props:{min:{type:Number,default:0},max:{type:Number,default:0},inputColor:{type:String,default:"#1A1A1A"},background:{type:String,default:"#FFFFFF"},borderColor:{type:String,default:"#FFFFFF"},selectColor:{type:String,default:"#4A4A4A"},textColor:{type:String,default:"#1A1A1A"},useResetSlot:{type:Boolean,default:!1},value:{type:Number,default:0},source:{type:Number,default:0}},emits:["update:value","reset"],setup(d,{emit:R}){e.useCssVars(y=>({"782b8172":i.value,"102109e6":B.value,"642212d7":$.value,"1f5369d4":d.selectColor,"22b98ab8":C.value}));const v=d,i=e.computed(()=>v.inputColor),C=e.computed(()=>v.background),$=e.computed(()=>`${v.selectColor}33`),B=e.computed(()=>v.borderColor),f=R;function T(){f("reset")}const F=e.computed(()=>{const y=v.max-v.min,m=0,b=(v.value-v.min)/y*100;return{left:`${m}%`,width:`${b-m}%`,background:v.selectColor}});return(y,m)=>(e.openBlock(),e.createElementBlock("div",Ee,[d.value!==d.source?(e.openBlock(),e.createElementBlock("div",Me,[d.useResetSlot?e.renderSlot(y.$slots,"reset-action",{key:1,reset:T},void 0,!0):(e.openBlock(),e.createElementBlock("button",{key:0,"data-cy-reset":"",tabindex:"0",role:"button",class:"vue-data-ui-refresh-button",onClick:T},[e.createVNode(Be.default,{name:"refresh",stroke:d.textColor},null,8,["stroke"])]))])):(e.openBlock(),e.createElementBlock("div",Ie)),e.createElementVNode("div",Re,[m[1]||(m[1]=e.createElementVNode("div",{class:"slider-track"},null,-1)),e.createElementVNode("div",{class:"range-highlight",style:e.normalizeStyle(F.value)},null,4),e.createElementVNode("input",{type:"range",min:d.min,max:d.max,value:Number(d.value),onInput:m[0]||(m[0]=b=>f("update:value",Number(b.target.value)))},null,40,_e)])]))}},We=ve._export_sfc(qe,[["__scopeId","data-v-b4e6aee9"]]),Ue=["id"],De=["xmlns","viewBox"],Ge=["width","height"],Le=["transform"],je=["fill","font-weight","x","y","font-size","transform","onMouseover"],He={key:4,class:"vue-data-ui-watermark"},Xe=["innerHTML"],Ye={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(d,{expose:R}){const{vue_ui_word_cloud:v}=s.useConfig(),i=d,C=e.computed({get(){return!!i.dataset&&i.dataset.length},set(o){return o}}),$=e.ref(s.createUid()),B=e.ref(0),f=e.ref(null),T=e.ref(null),F=e.ref(null),y=e.ref(0),m=e.ref(0),b=e.ref(!1),t=e.computed({get:()=>Q(),set:o=>o}),k=e.ref(X());function X(){return typeof i.dataset=="string"?s.createWordCloudDatasetFromPlainText(i.dataset):i.dataset.map((o,a)=>({...o,value:s.checkNaN(o.value)}))}e.watch(()=>i.dataset,()=>{k.value=X(),O()});const{userOptionsVisible:_,setUserOptionsVisibility:Y,keepUserOptionState:J}=Ae.useUserOptionState({config:t.value}),{svgRef:K}=Ve.useChartAccessibility({config:t.value.style.chart.title});function Q(){const o=de.useNestedProp({userConfig:i.config,defaultConfig:v});return o.theme?{...de.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||i.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}e.watch(()=>i.config,o=>{t.value=Q(),_.value=!t.value.userOptions.showOnChartHover,ee(),y.value+=1,m.value+=1,q(),c.value.showTable=t.value.table.show,c.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const Z=e.ref(null),w=e.ref(0),r=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}),he=H.throttle(()=>{const{width:o,height:a}=H.useResponsive({chart:f.value,title:t.value.style.chart.title.text?T.value:null,slicer:t.value.style.chart.zoom.show&&Z.value,source:F.value});requestAnimationFrame(()=>{r.value.width=o,r.value.height=a,e.nextTick(O)})});e.watch(()=>w.value,()=>{me()});const me=H.debounce(()=>{O()},10);function q(){w.value=W.value}const z=e.ref(null);e.onMounted(()=>{ee(),q()});function ee(){s.objectIsEmpty(i.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):k.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{C.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive&&(z.value=new ResizeObserver(he),z.value.observe(f.value.parentNode))}e.onBeforeUnmount(()=>{z.value&&z.value.disconnect()});const{isPrinting:te,isImaging:oe,generatePdf:le,generateImage:ae}=ce.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud",options:t.value.userOptions.print}),c=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show});function pe(o,a,l="Arial"){const n=document.createElement("canvas").getContext("2d");return n.font=`${a}px ${t.value.style.chart.words.bold?"bold":"normal"} ${l}`,{width:n.measureText(o).width+t.value.style.chart.words.proximity,height:a}}function fe(o,a){return o.x<a.x+a.width&&o.x+o.width>a.x&&o.y<a.y+a.height&&o.y+o.height>a.y}function ge(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},h=0,p=0;return o.forEach(x=>{let L=!1;for(let I=0;I<Math.max(a,l)/2&&!L;I+=t.value.style.chart.words.packingWeight)for(let j=0;j<360&&!L;j+=t.value.style.chart.words.packingWeight){const ie=j*Math.PI/180,ke=h+I*Math.cos(ie)-x.width/2,we=p+I*Math.sin(ie)-x.height/2,g={...x,x:ke,y:we},Se=g.x>=n.x&&g.y>=n.y&&g.x+g.width<=n.x+n.width&&g.y+g.height<=n.y+n.height,xe=u.some($e=>fe(g,$e));Se&&!xe&&(u.push(g),L=!0)}}),u}const N=e.ref([]);e.watch(()=>i.dataset,O,{immediate:!0});const W=e.computed(()=>Math.round(Math.min(...k.value.map(o=>o.value)))),ne=e.computed(()=>Math.round(Math.max(...k.value.map(o=>o.value))));function O(){const o=[...k.value].filter(n=>n.value>=w.value).map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=[...k.value].filter(n=>n.value>=w.value).map((n,h)=>{let p=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize;p=isNaN(p)?r.value.minFontSize:p;const x=pe(n.name,p);return{...n,id:s.createUid(),fontSize:p,width:x.width,height:x.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[h]||t.value.customPalette[h%t.value.customPalette.length]||s.palette[h]||s.palette[h%s.palette.length]:t.value.style.chart.words.color}});N.value=ge(u,r.value.width,r.value.height).sort((n,h)=>h.fontSize-n.fontSize)}const A=e.computed(()=>{const o=N.value.map(l=>({name:l.name,color:l.color})),a=N.value.map(l=>l.value);return{head:o,body:a}});function re(){e.nextTick(()=>{const o=A.value.head.map((u,n)=>[[u.name],[A.value.body[n]]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],[t.value.table.columnNames.value]]].concat(o),l=s.createCsvContent(a);s.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-word-cloud"})})}const V=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=A.value.head.map((n,h)=>{const p=s.dataLabel({p:t.value.table.td.prefix,v:A.value.body[h],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},p]}),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:a,config:l}}),E=e.ref(!1);function ye(o){E.value=o,B.value+=1}function be(){return N.value}function se(){c.value.showTable=!c.value.showTable}function ue(){c.value.showTooltip=!c.value.showTooltip}const M=e.ref(!1);function U(){M.value=!M.value}R({getData:be,generateCsv:re,generatePdf:le,generateImage:ae,toggleTable:se,toggleTooltip:ue,toggleAnnotator:U});const S=e.ref(null),P=e.ref(!1),D=e.ref(""),G=e.ref(null);function Ce(o){if(!c.value.showTooltip)return;S.value=o.id,G.value={datapoint:o,config:t.value};const a=t.value.style.chart.tooltip.customFormat;if(P.value=!1,s.isFunction(a))try{const l=a({datapoint:o,config:t.value});typeof l=="string"&&(D.value=l,P.value=!0)}catch{console.warn("Custom format cannot be applied."),P.value=!1}if(!P.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>`;D.value=`<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${l}</div>`}b.value=!0}return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:f,id:`wordCloud_${$.value}`,style:e.normalizeStyle(`width: 100%; font-family:${t.value.style.fontFamily};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:a[3]||(a[3]=()=>e.unref(Y)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(Y)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Oe.PenAndPaper,{key:0,svgRef:e.unref(K),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:U},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:T,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Te._sfc_main,{key:`title_${y.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(J)||e.unref(_))?(e.openBlock(),e.createBlock(ce.UserOptions,{ref:"details",key:`user_option_${B.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(te),isImaging:e.unref(oe),uid:$.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:E.value,titles:{...t.value.userOptions.buttonTitles},chartElement:f.value,position:t.value.userOptions.position,hasTooltip:t.value.style.chart.tooltip.show&&t.value.userOptions.buttons.tooltip,isTooltip:c.value.showTooltip,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(le),onGenerateCsv:re,onGenerateImage:e.unref(ae),onToggleTable:se,onToggleTooltip:ue,onToggleAnnotator:U,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:u})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:u})),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:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),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:K,class:e.normalizeClass({"vue-data-ui-fullscreen--on":E.value,"vue-data-ui-fulscreen--off":!E.value}),xmlns:e.unref(s.XMLNS),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:"overflow:visible;background:transparent;"},[e.createVNode(Fe._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),e.createElementVNode("g",{transform:`translate(${(r.value.width<=0?10:r.value.width)/2}, ${(r.value.height<=0?10:r.value.height)/2})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,u)=>(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:u,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":S.value&&S.value===l.id&&c.value.showTooltip,"word-not-selected":S.value&&S.value!==l.id&&c.value.showTooltip}),"text-anchor":"middle","dominant-baseline":"central",onMouseover:n=>Ce(l),onMouseleave:a[0]||(a[0]=n=>{S.value=null,b.value=!1}),style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important;`)},e.toDisplayString(l.name),47,je))]))),256))],8,Le),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],10,De)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(te)||e.unref(oe)})),void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:c.value.showTooltip&&b.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:f.value,content:D.value,isCustom:P.value},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),e.createElementVNode("div",{ref_key:"chartSlicer",ref:Z,style:"width:100%;background:transparent","data-html2canvas-ignore":""},[t.value.style.chart.zoom.show&&W.value<ne.value?(e.openBlock(),e.createBlock(We,{key:0,value:w.value,"onUpdate:value":a[1]||(a[1]=l=>w.value=l),min:W.value,max:ne.value,textColor:t.value.style.chart.color,inputColor:t.value.style.chart.zoom.color,selectColor:t.value.style.chart.zoom.highlightColor,useResetSlot:t.value.style.chart.zoom.useResetSlot,background:t.value.style.chart.zoom.color,borderColor:t.value.style.chart.backgroundColor,source:t.value.style.chart.width,onReset:q},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(o.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["value","min","max","textColor","inputColor","selectColor","useResetSlot","background","borderColor","source"])):e.createCommentVNode("",!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"source",ref:F,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:6,hideDetails:"",config:{open:c.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(Pe.DataTable,{key:`table_${m.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>c.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Xe)]),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,Ue))}},Je=ve._export_sfc(Ye,[["__scopeId","data-v-117f5e65"]]);exports.default=Je;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useCssVars as Ge, computed as y, createElementBlock as m, openBlock as r, createElementVNode as N, renderSlot as i, createVNode as ne, normalizeStyle as J, ref as n, watch as H, onMounted as Le, onBeforeUnmount as Xe, unref as c, createBlock as M, createCommentVNode as k, createSlots as je, withCtx as h, normalizeProps as S, guardReactiveProps as F, normalizeClass as $e, Fragment as qe, renderList as He, toDisplayString as xe, createTextVNode as Ye, nextTick as Te } from "vue";
|
|
2
|
-
import { u as Je, c as Se, a6 as Ke, v as Qe, t as Ze, p as Y, a as et, o as tt, e as Fe, g as ot, f as at, X as lt, q as st, r as nt, x as rt } from "./index-
|
|
3
|
-
import { _ as ut } from "./Title-
|
|
4
|
-
import { u as it, U as ct } from "./usePrinter-
|
|
5
|
-
import { d as dt, t as vt, u as ht } from "./useResponsive-
|
|
6
|
-
import mt from "./vue-ui-accordion-
|
|
7
|
-
import { D as ft } from "./DataTable-
|
|
8
|
-
import pt from "./BaseIcon-
|
|
2
|
+
import { u as Je, c as Se, a6 as Ke, v as Qe, t as Ze, p as Y, a as et, o as tt, e as Fe, g as ot, f as at, X as lt, q as st, r as nt, x as rt } from "./index-CFFS5fou.js";
|
|
3
|
+
import { _ as ut } from "./Title-CzrNFvru.js";
|
|
4
|
+
import { u as it, U as ct } from "./usePrinter-V42TEKtB.js";
|
|
5
|
+
import { d as dt, t as vt, u as ht } from "./useResponsive-Cw4oZ8sQ.js";
|
|
6
|
+
import mt from "./vue-ui-accordion-68aNqLIG.js";
|
|
7
|
+
import { D as ft } from "./DataTable-BgfkOnBv.js";
|
|
8
|
+
import pt from "./BaseIcon-CZ5jKnR9.js";
|
|
9
9
|
import { _ as Oe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
import { u as Ne } from "./useNestedProp-
|
|
11
|
-
import { _ as gt } from "./PackageVersion-
|
|
12
|
-
import { _ as yt } from "./Tooltip-
|
|
13
|
-
import { P as bt } from "./PenAndPaper-
|
|
10
|
+
import { u as Ne } from "./useNestedProp-WmGLMI7a.js";
|
|
11
|
+
import { _ as gt } from "./PackageVersion-D4qZn7kl.js";
|
|
12
|
+
import { _ as yt } from "./Tooltip-BjCE_Xgz.js";
|
|
13
|
+
import { P as bt } from "./PenAndPaper-BAQpQDGa.js";
|
|
14
14
|
import { u as Ct } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as kt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
const wt = { "data-html2canvas-ignore": "" }, $t = {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Q as H, Y as q, a7 as j, c as X, A as $, F as ee, w as te, s as le, o as ae, $ as re, a8 as ie, x as se, C as ne, y as ce, a5 as oe, e as he, r as ue, f as U, a9 as de, S as ge, T as fe, q as Ie, b as me, z as Ne, d as xe, aa as be, v as Fe, ab as _e, a3 as ye, ac as Ae, i as Le, G as Ce, L as Se, u as ke, p as we, B as Oe, a as Ge, t as ve } from "./index-
|
|
2
|
-
import { D as pe } from "./DataTable-
|
|
3
|
-
import { _ as Me } from "./Title-
|
|
4
|
-
import { u as ze, _ as Te } from "./Tooltip-
|
|
5
|
-
import { U as Pe } from "./usePrinter-
|
|
6
|
-
import { _ as Ve } from "./Shape-
|
|
7
|
-
import Re from "./BaseIcon-
|
|
8
|
-
import He from "./vue-ui-table-sparkline-
|
|
9
|
-
import De from "./vue-ui-skeleton-
|
|
10
|
-
import { S as Be } from "./Slicer-
|
|
11
|
-
import Ee from "./vue-ui-accordion-
|
|
12
|
-
import { u as Z } from "./useNestedProp-
|
|
13
|
-
import { _ as Ye } from "./PackageVersion-
|
|
14
|
-
import { P as We } from "./PenAndPaper-
|
|
1
|
+
import { Q as H, Y as q, a7 as j, c as X, A as $, F as ee, w as te, s as le, o as ae, $ as re, a8 as ie, x as se, C as ne, y as ce, a5 as oe, e as he, r as ue, f as U, a9 as de, S as ge, T as fe, q as Ie, b as me, z as Ne, d as xe, aa as be, v as Fe, ab as _e, a3 as ye, ac as Ae, i as Le, G as Ce, L as Se, u as ke, p as we, B as Oe, a as Ge, t as ve } from "./index-CFFS5fou.js";
|
|
2
|
+
import { D as pe } from "./DataTable-BgfkOnBv.js";
|
|
3
|
+
import { _ as Me } from "./Title-CzrNFvru.js";
|
|
4
|
+
import { u as ze, _ as Te } from "./Tooltip-BjCE_Xgz.js";
|
|
5
|
+
import { U as Pe } from "./usePrinter-V42TEKtB.js";
|
|
6
|
+
import { _ as Ve } from "./Shape-CsDyTgir.js";
|
|
7
|
+
import Re from "./BaseIcon-CZ5jKnR9.js";
|
|
8
|
+
import He from "./vue-ui-table-sparkline-D_URlvKj.js";
|
|
9
|
+
import De from "./vue-ui-skeleton-CE6Rhdwq.js";
|
|
10
|
+
import { S as Be } from "./Slicer-msNNVisO.js";
|
|
11
|
+
import Ee from "./vue-ui-accordion-68aNqLIG.js";
|
|
12
|
+
import { u as Z } from "./useNestedProp-WmGLMI7a.js";
|
|
13
|
+
import { _ as Ye } from "./PackageVersion-D4qZn7kl.js";
|
|
14
|
+
import { P as We } from "./PenAndPaper-BAQpQDGa.js";
|
|
15
15
|
import { resolveComponent as R, createElementBlock as i, openBlock as r, normalizeStyle as x, normalizeClass as B, createBlock as D, createCommentVNode as u, createVNode as W, createSlots as qe, withCtx as P, renderSlot as S, normalizeProps as E, guardReactiveProps as Y, createElementVNode as f, createTextVNode as J, Fragment as d, renderList as I, toDisplayString as T, mergeProps as Q, withDirectives as Xe, vModelCheckbox as Ue } from "vue";
|
|
16
16
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Je = X(), Qe = {
|