vue-data-ui 2.3.7 → 2.3.8
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-nwrjVtgP.js → Arrow-CS3h3CsG.js} +1 -1
- package/dist/{Arrow-BZtTM41y.cjs → Arrow-DUJvJpMd.cjs} +1 -1
- package/dist/{BaseIcon-DWx8aSo2.cjs → BaseIcon-ByV6y3w8.cjs} +1 -1
- package/dist/{BaseIcon-DLlcdgWI.js → BaseIcon-CVk_WG9x.js} +1 -1
- package/dist/{DataTable-BFsn-W_6.js → DataTable-B-LJlgjS.js} +2 -2
- package/dist/{DataTable-BSoyXOFT.cjs → DataTable-C4CMZu2s.cjs} +1 -1
- package/dist/{Legend-DThjLfzi.js → Legend-DVsCAbZS.js} +1 -1
- package/dist/{Legend-DZhpxKg4.cjs → Legend-DWBU0qDC.cjs} +1 -1
- package/dist/{Shape-CoCdB8es.cjs → Shape-CcbBblwI.cjs} +1 -1
- package/dist/{Shape-DdhpbOB2.js → Shape-w47nQzLj.js} +1 -1
- package/dist/{Slicer-CBsGmIKc.js → Slicer-2MG0k2PP.js} +1 -1
- package/dist/{Slicer-Bb7zhtxv.cjs → Slicer-CY-QTbH4.cjs} +1 -1
- package/dist/{Title-Ci74YZxW.cjs → Title-D6zeMzr0.cjs} +1 -1
- package/dist/{Title-CfofmWzW.js → Title-D_FeWJsx.js} +1 -1
- package/dist/{Tooltip-BNMjZUBc.cjs → Tooltip-2d9jRdHk.cjs} +1 -1
- package/dist/{Tooltip-cIpD1ChA.js → Tooltip-BY94WbUk.js} +1 -1
- package/dist/{index-DFXgoR1T.cjs → index-BQbaKiSm.cjs} +1 -1
- package/dist/{index-CGb3gF5A.js → index-DLi6mPet.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-CbZUIZc0.cjs → useNestedProp-B6CpIX-3.cjs} +1 -1
- package/dist/{useNestedProp-DCBzUHfz.js → useNestedProp-DmMzRJ1O.js} +1 -1
- package/dist/{usePrinter-DoFYRZKM.cjs → usePrinter-BANjHBXe.cjs} +1 -1
- package/dist/{usePrinter-VlAyPtaS.js → usePrinter-BnaEziDF.js} +1 -1
- package/dist/{vue-data-ui-DkU-TK4x.js → vue-data-ui-Br12h04t.js} +55 -55
- package/dist/{vue-data-ui-DT5BwtL1.cjs → vue-data-ui-DWSz421j.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BwdmaNwO.cjs → vue-ui-3d-bar-BFu2IXOP.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-B2ZdZ5yW.js → vue-ui-3d-bar-CNpZvjQ1.js} +7 -7
- package/dist/{vue-ui-accordion-P9OYffC3.cjs → vue-ui-accordion-CHVCSgY3.cjs} +1 -1
- package/dist/{vue-ui-accordion-Br7xhAKF.js → vue-ui-accordion-DzCdp527.js} +3 -3
- package/dist/{vue-ui-age-pyramid-D_GP1VkP.js → vue-ui-age-pyramid-CCezvPxx.js} +8 -8
- package/dist/{vue-ui-age-pyramid-CJGz5iEy.cjs → vue-ui-age-pyramid-DaUZgLYc.cjs} +1 -1
- package/dist/{vue-ui-annotator-C9I6Zikz.cjs → vue-ui-annotator-CZ3Lk0Ky.cjs} +1 -1
- package/dist/{vue-ui-annotator-BHI5Uicp.js → vue-ui-annotator-QPK7ARtK.js} +1 -1
- package/dist/{vue-ui-candlestick-B3Z-Zw-o.cjs → vue-ui-candlestick-CaofVEg_.cjs} +1 -1
- package/dist/{vue-ui-candlestick-BMz6lY9I.js → vue-ui-candlestick-kh_Ft3mr.js} +9 -9
- package/dist/vue-ui-carousel-table-Cti_GQvV.cjs +1 -0
- package/dist/{vue-ui-carousel-table-9W-FPpp4.js → vue-ui-carousel-table-CxTbe6SP.js} +36 -36
- package/dist/{vue-ui-chestnut-DikFweqJ.js → vue-ui-chestnut-BypPYKEQ.js} +6 -6
- package/dist/{vue-ui-chestnut-C4vJDydB.cjs → vue-ui-chestnut-joiWg5ii.cjs} +1 -1
- package/dist/{vue-ui-cursor-CmWl10Om.js → vue-ui-cursor-CVwqSrVu.js} +2 -2
- package/dist/{vue-ui-cursor-CxvSx8wW.cjs → vue-ui-cursor-CaxdcYVa.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BRZFA0Yv.cjs → vue-ui-dashboard-B12glgQZ.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CqNO4CkA.js → vue-ui-dashboard-C7roqJdv.js} +2 -2
- package/dist/{vue-ui-digits-B5AQ1wb4.cjs → vue-ui-digits-BeGGrWds.cjs} +1 -1
- package/dist/{vue-ui-digits-Bq86VtLg.js → vue-ui-digits-DZBXECIq.js} +2 -2
- package/dist/{vue-ui-donut-BSM49MRr.js → vue-ui-donut-DoMzPJHF.js} +9 -9
- package/dist/{vue-ui-donut-fUSFXY5z.cjs → vue-ui-donut-diN8RiYm.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-D4vsG4oJ.cjs → vue-ui-donut-evolution-CTgTqsih.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-hXH6wndl.js → vue-ui-donut-evolution-CXT7c3_C.js} +9 -9
- package/dist/{vue-ui-dumbbell-DF7resYk.js → vue-ui-dumbbell-1StMWJ5B.js} +8 -8
- package/dist/{vue-ui-dumbbell-CSxoMYt4.cjs → vue-ui-dumbbell-B6th1M9b.cjs} +1 -1
- package/dist/{vue-ui-flow-qhWWfhM9.cjs → vue-ui-flow-Bux2O68S.cjs} +1 -1
- package/dist/{vue-ui-flow-2Wc505ek.js → vue-ui-flow-ynx-run3.js} +7 -7
- package/dist/{vue-ui-galaxy-C1tqFf2k.js → vue-ui-galaxy-C7GEYMQB.js} +9 -9
- package/dist/{vue-ui-galaxy-DTYcNRMO.cjs → vue-ui-galaxy-D9QnmX0M.cjs} +1 -1
- package/dist/{vue-ui-gauge-qkz3wSir.js → vue-ui-gauge-DU8VU1m7.js} +4 -4
- package/dist/{vue-ui-gauge-4oL43tii.cjs → vue-ui-gauge-DrgKJTGw.cjs} +1 -1
- package/dist/vue-ui-heatmap-BIBsrwjz.cjs +1 -0
- package/dist/{vue-ui-heatmap-SUwlu7rR.js → vue-ui-heatmap-DUuN0fGR.js} +227 -227
- package/dist/{vue-ui-kpi-jQgfkbVw.js → vue-ui-kpi-BoGsykfq.js} +2 -2
- package/dist/{vue-ui-kpi-Bw-xbRgX.cjs → vue-ui-kpi-CLEQSt4V.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-DT-Ww_uE.cjs → vue-ui-mini-loader-CIPfR_lB.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-5YEExcv8.js → vue-ui-mini-loader-CNCZkUvI.js} +2 -2
- package/dist/{vue-ui-molecule-sddRGEOr.js → vue-ui-molecule-Brw0qOjw.js} +9 -9
- package/dist/{vue-ui-molecule-DA0NQGMP.cjs → vue-ui-molecule-Da19KH5g.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CUfTRsXf.cjs → vue-ui-mood-radar-BktJHBX_.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BlwtCy7m.js → vue-ui-mood-radar-hIUOJ8Cd.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CyhCktfb.cjs → vue-ui-nested-donuts-2GqE8lhb.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BYDoEtqK.js → vue-ui-nested-donuts-DXZXCu5s.js} +9 -9
- package/dist/{vue-ui-onion-BiS7G_xb.js → vue-ui-onion-Bx2_3hmi.js} +9 -9
- package/dist/{vue-ui-onion-DKjJWVtm.cjs → vue-ui-onion-DqnFyhwy.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-CB5WohUW.cjs → vue-ui-parallel-coordinate-plot-CIkVq6XI.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-BcZOH5MA.js → vue-ui-parallel-coordinate-plot-DgjecbC2.js} +10 -10
- package/dist/{vue-ui-quadrant-aRRuJrr1.cjs → vue-ui-quadrant-DUNTLV5w.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BX2Z_BiG.js → vue-ui-quadrant-DlSMixki.js} +10 -10
- package/dist/{vue-ui-quick-chart-BSov5yuk.cjs → vue-ui-quick-chart-CpdxM7qN.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-aCDLYVC0.js → vue-ui-quick-chart-_ysWkoF7.js} +6 -6
- package/dist/{vue-ui-radar-B3DWzSx8.cjs → vue-ui-radar-B8fTGb35.cjs} +1 -1
- package/dist/{vue-ui-radar-DGhNZx7E.js → vue-ui-radar-Fh5UQO5Z.js} +10 -10
- package/dist/{vue-ui-rating-DI2herA3.cjs → vue-ui-rating-BTbg-bNd.cjs} +1 -1
- package/dist/{vue-ui-rating-QJp1mzIX.js → vue-ui-rating-CwV_45UQ.js} +2 -2
- package/dist/{vue-ui-relation-circle-DRKymwCT.js → vue-ui-relation-circle-B61AGVtF.js} +5 -5
- package/dist/{vue-ui-relation-circle-Dgk6ILFm.cjs → vue-ui-relation-circle-BrHBPn8C.cjs} +1 -1
- package/dist/{vue-ui-rings-m9Gm4w5-.cjs → vue-ui-rings-BSbFTwmB.cjs} +1 -1
- package/dist/{vue-ui-rings-Dc_Xgav-.js → vue-ui-rings-DwtqKTGk.js} +9 -9
- package/dist/{vue-ui-scatter-CwNnmbpv.cjs → vue-ui-scatter-BdphtRDE.cjs} +1 -1
- package/dist/{vue-ui-scatter-3p_U1RQz.js → vue-ui-scatter-CFXQQZQr.js} +10 -10
- package/dist/{vue-ui-screenshot-Bdg6KSR_.cjs → vue-ui-screenshot-ChP1r5WI.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DjN1leGW.js → vue-ui-screenshot-CkI4Gtys.js} +1 -1
- package/dist/{vue-ui-skeleton-B0udzFdQ.js → vue-ui-skeleton-CmXMTbOC.js} +2 -2
- package/dist/{vue-ui-skeleton-CmABeGyu.cjs → vue-ui-skeleton-DIm7kxhc.cjs} +1 -1
- package/dist/{vue-ui-smiley-CIMwndRh.cjs → vue-ui-smiley-BQ1_0eFh.cjs} +1 -1
- package/dist/{vue-ui-smiley-BJdbZUnl.js → vue-ui-smiley-BQJ6XX_L.js} +2 -2
- package/dist/{vue-ui-spark-trend-BiqhJCi0.cjs → vue-ui-spark-trend-COUBPV4j.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Bs8wWJc2.js → vue-ui-spark-trend-Dx4w74bw.js} +4 -4
- package/dist/{vue-ui-sparkbar-C2YT0NxS.cjs → vue-ui-sparkbar-Cdcndp7Q.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CDi8i8_Q.js → vue-ui-sparkbar-CxKIVunV.js} +3 -3
- package/dist/{vue-ui-sparkgauge-D7sVelKC.cjs → vue-ui-sparkgauge-Bd2F7zw1.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-11o7Kgbf.js → vue-ui-sparkgauge-BhVgI98W.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-C6nnvqeP.cjs → vue-ui-sparkhistogram-B1Txwx4N.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-DW4yBl5Z.js → vue-ui-sparkhistogram-CKw6tZnv.js} +4 -4
- package/dist/{vue-ui-sparkline-B-jMIILk.js → vue-ui-sparkline-CSEByr6z.js} +3 -3
- package/dist/{vue-ui-sparkline-Bnc9Cv0E.cjs → vue-ui-sparkline-CrXPLabK.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CVyS6viy.cjs → vue-ui-sparkstackbar-BfP1wyyg.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-cUpn5wUS.js → vue-ui-sparkstackbar-CQLWpdxG.js} +3 -3
- package/dist/{vue-ui-strip-plot-CpfV9-gw.js → vue-ui-strip-plot-DAJ0qjKU.js} +9 -9
- package/dist/{vue-ui-strip-plot-Dc1Y7Lfz.cjs → vue-ui-strip-plot-N-_mlbwb.cjs} +1 -1
- package/dist/{vue-ui-table-CaCOIekW.js → vue-ui-table-DFe98urD.js} +1 -1
- package/dist/{vue-ui-table-heatmap-s7r2sGYk.js → vue-ui-table-heatmap-DUonA4jJ.js} +4 -4
- package/dist/{vue-ui-table-heatmap-r9XRz_dD.cjs → vue-ui-table-heatmap-oEi-vxRg.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-BS7VAPDv.js → vue-ui-table-sparkline-BIY7GWik.js} +5 -5
- package/dist/{vue-ui-table-sparkline-Dk_FjirH.cjs → vue-ui-table-sparkline-DKoH5PeD.cjs} +1 -1
- package/dist/{vue-ui-table-BHENqbW6.cjs → vue-ui-table-t1jDOoJW.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BQLqVj-X.js → vue-ui-thermometer-BiWx3ujG.js} +5 -5
- package/dist/{vue-ui-thermometer-DU49ev3a.cjs → vue-ui-thermometer-ZgNA47Fv.cjs} +1 -1
- package/dist/{vue-ui-timer-DGM9AHJ5.js → vue-ui-timer-BFKnN8tS.js} +4 -4
- package/dist/{vue-ui-timer-9QQVkkbc.cjs → vue-ui-timer-BmThVcD0.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-Bxop3uDk.js → vue-ui-tiremarks-BO_X27nw.js} +5 -5
- package/dist/{vue-ui-tiremarks-CJ9xiM-i.cjs → vue-ui-tiremarks-D9ClW4XX.cjs} +1 -1
- package/dist/{vue-ui-treemap-BOEC1m08.cjs → vue-ui-treemap-BVV-tfRq.cjs} +1 -1
- package/dist/{vue-ui-treemap-CQ9rJnkn.js → vue-ui-treemap-Crrd_rpP.js} +9 -9
- package/dist/{vue-ui-vertical-bar-CwcIKeM-.js → vue-ui-vertical-bar-CyuImTrh.js} +9 -9
- package/dist/{vue-ui-vertical-bar-BBHN-hhJ.cjs → vue-ui-vertical-bar-k9KkT9mN.cjs} +1 -1
- package/dist/{vue-ui-waffle-DB3cEJx6.js → vue-ui-waffle-CYSDDS3-.js} +9 -9
- package/dist/{vue-ui-waffle-Bg_hB8yK.cjs → vue-ui-waffle-DenwQo8B.cjs} +1 -1
- package/dist/{vue-ui-wheel-CF6psk6N.js → vue-ui-wheel-C8-f39P2.js} +5 -5
- package/dist/{vue-ui-wheel-DpTCJpZn.cjs → vue-ui-wheel-Cx7SBWWF.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DVu3gTbu.cjs → vue-ui-word-cloud-CMsakywD.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-QlpZWR2c.js → vue-ui-word-cloud-D9y9Iht6.js} +6 -6
- package/dist/{vue-ui-xy-DFiOxWGU.cjs → vue-ui-xy-BxCALt6U.cjs} +1 -1
- package/dist/{vue-ui-xy-CpcGvBUq.js → vue-ui-xy-Dhpahzod.js} +12 -12
- package/dist/{vue-ui-xy-canvas-DR_8n36F.cjs → vue-ui-xy-canvas-B_Fi2be0.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-CBlzHZ_m.js → vue-ui-xy-canvas-COwqkdZB.js} +10 -10
- package/package.json +1 -1
- package/dist/vue-ui-carousel-table-ZyIsiWGm.cjs +0 -1
- package/dist/vue-ui-heatmap-B8vDpGuW.cjs +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as w, ref as y, onMounted as He, onBeforeUnmount as Ee, openBlock as m, createElementBlock as x, normalizeClass as Ce, normalizeStyle as D, createVNode as ne, createCommentVNode as H, createBlock as ee, unref as T, createSlots as Ue, withCtx as $, renderSlot as _, normalizeProps as j, guardReactiveProps as Y, Fragment as ke, renderList as xe, createElementVNode as O, toDisplayString as G, createTextVNode as $e, nextTick as Ge, pushScopeId as Xe, popScopeId as qe } from "vue";
|
|
2
|
-
import { u as je, c as Te, t as Ye, a as Ze, p as C, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as _e, C as Oe, v as Se, w as tt, n as lt, q as ot } from "./index-
|
|
3
|
-
import { _ as at } from "./Title-
|
|
4
|
-
import { u as nt, U as st } from "./usePrinter-
|
|
5
|
-
import { _ as rt } from "./Tooltip-
|
|
6
|
-
import { L as ut } from "./Legend-
|
|
7
|
-
import it from "./vue-ui-skeleton-
|
|
8
|
-
import { D as ct } from "./DataTable-
|
|
9
|
-
import dt from "./vue-ui-accordion-
|
|
2
|
+
import { u as je, c as Te, t as Ye, a as Ze, p as C, b as Je, o as Ke, e as Qe, d as te, f as le, X as et, l as _e, C as Oe, v as Se, w as tt, n as lt, q as ot } from "./index-DLi6mPet.js";
|
|
3
|
+
import { _ as at } from "./Title-D_FeWJsx.js";
|
|
4
|
+
import { u as nt, U as st } from "./usePrinter-BnaEziDF.js";
|
|
5
|
+
import { _ as rt } from "./Tooltip-BY94WbUk.js";
|
|
6
|
+
import { L as ut } from "./Legend-DVsCAbZS.js";
|
|
7
|
+
import it from "./vue-ui-skeleton-CmXMTbOC.js";
|
|
8
|
+
import { D as ct } from "./DataTable-B-LJlgjS.js";
|
|
9
|
+
import dt from "./vue-ui-accordion-DzCdp527.js";
|
|
10
10
|
import { t as vt, u as ht } from "./useResponsive-NZB-WLRF.js";
|
|
11
|
-
import { u as Ne } from "./useNestedProp-
|
|
11
|
+
import { u as Ne } from "./useNestedProp-DmMzRJ1O.js";
|
|
12
12
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
function ze(a, i) {
|
|
14
14
|
const s = a.length;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { useCssVars as De, computed as f, ref as v, onMounted as Re, onBeforeUnmount as Me, openBlock as d, createElementBlock as h, normalizeClass as S, normalizeStyle as i, createVNode as D, createCommentVNode as b, createBlock as J, unref as T, createSlots as Ue, withCtx as m, renderSlot as x, normalizeProps as Q, guardReactiveProps as Y, createElementVNode as o, toDisplayString as u, Fragment as R, renderList as M, withKeys as Xe, createTextVNode as Ae } from "vue";
|
|
2
|
-
import { u as Ee, c as Ge, t as He, a as We, p as V, b as je, o as be, e as Z, d as ee, X as qe, s as Ke, r as te, v as Je, w as Qe, f as Ye, n as Ze, q as et } from "./index-
|
|
2
|
+
import { u as Ee, c as Ge, t as He, a as We, p as V, b as je, o as be, e as Z, d as ee, X as qe, s as Ke, r as te, v as Je, w as Qe, f as Ye, n as Ze, q as et } from "./index-DLi6mPet.js";
|
|
3
3
|
import { t as tt, u as lt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as ot, U as nt } from "./usePrinter-
|
|
6
|
-
import { _ as ut } from "./Tooltip-
|
|
7
|
-
import { L as me } from "./Legend-
|
|
8
|
-
import rt from "./vue-ui-skeleton-
|
|
9
|
-
import st from "./BaseIcon-
|
|
10
|
-
import it from "./vue-ui-accordion-
|
|
11
|
-
import { u as _e } from "./useNestedProp-
|
|
4
|
+
import { _ as at } from "./Title-D_FeWJsx.js";
|
|
5
|
+
import { u as ot, U as nt } from "./usePrinter-BnaEziDF.js";
|
|
6
|
+
import { _ as ut } from "./Tooltip-BY94WbUk.js";
|
|
7
|
+
import { L as me } from "./Legend-DVsCAbZS.js";
|
|
8
|
+
import rt from "./vue-ui-skeleton-CmXMTbOC.js";
|
|
9
|
+
import st from "./BaseIcon-CVk_WG9x.js";
|
|
10
|
+
import it from "./vue-ui-accordion-DzCdp527.js";
|
|
11
|
+
import { u as _e } from "./useNestedProp-DmMzRJ1O.js";
|
|
12
12
|
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const ct = ["id"], vt = ["onClick"], ht = ["xmlns", "viewBox"], pt = ["id"], gt = ["stop-color"], yt = ["stop-color"], ft = ["x", "y", "width", "height", "fill", "rx"], bt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], mt = ["x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "font-size", "fill", "font-weight"], xt = ["x", "y", "font-size", "fill", "font-weight"], $t = ["x", "y", "font-size", "fill", "font-weight"], kt = ["x", "y", "font-size", "fill", "font-weight"], Ct = ["y", "width", "height", "fill", "onMouseenter"], wt = ["onClick"], Tt = { style: "width:100%;padding-top: 36px;position:relative" }, Nt = { class: "vue-ui-data-table" }, Lt = { key: 0 }, Pt = { style: { width: "100%" } }, Vt = ["data-cell"], St = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ft = ["data-cell"], zt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Bt = ["data-cell"], It = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ot = ["data-cell"], Dt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rt = ["data-cell"], Mt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ut = ["data-cell"], Xt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, At = ["data-cell"], Et = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Gt = {
|
|
14
14
|
__name: "vue-ui-vertical-bar",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BQbaKiSm.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-D6zeMzr0.cjs"),Z=require("./usePrinter-BANjHBXe.cjs"),be=require("./Tooltip-2d9jRdHk.cjs"),ee=require("./Legend-DWBU0qDC.cjs"),ke=require("./vue-ui-skeleton-DIm7kxhc.cjs"),xe=require("./BaseIcon-ByV6y3w8.cjs"),Ce=require("./vue-ui-accordion-CHVCSgY3.cjs"),te=require("./useNestedProp-B6CpIX-3.cjs"),_e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ne=["onClick"],we=["xmlns","viewBox"],Se=["id"],Ve=["stop-color"],Te=["stop-color"],Ee=["x","y","width","height","fill","rx"],Be=["x","y","width","height","fill","rx","stroke","stroke-width"],ze=["x2","y1","y2","stroke","stroke-width"],Pe=["x","y","font-size","fill","font-weight"],Le=["x","y","font-size","fill","font-weight"],De=["x","y","font-size","fill","font-weight"],Fe=["x","y","font-size","fill","font-weight"],Ie=["y","width","height","fill","onMouseenter"],Oe=["onClick"],Re={style:"width:100%;padding-top: 36px;position:relative"},Me={class:"vue-ui-data-table"},qe={key:0},He={style:{width:"100%"}},Ue=["data-cell"],Ae={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ge=["data-cell"],Xe={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},je=["data-cell"],We={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ke=["data-cell"],Je={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qe=["data-cell"],Ye={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ze=["data-cell"],et={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tt=["data-cell"],lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},at={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(le,{expose:ae,emit:oe}){const f=le;e.useCssVars(l=>({"7410f552":l.tdo}));const{vue_ui_vertical_bar:ne}=r.useConfig(),w=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(r.createUid()),re=e.ref(null),E=e.ref(!1),B=e.ref(""),S=e.ref(0),ue=e.ref(null),F=e.ref(0),x=e.ref(null),I=e.ref(null),z=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:f.config,defaultConfig:ne});return l.theme?{...te.useNestedProp({userConfig:r.themes.vue_ui_vertical_bar[l.theme]||f.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),{isPrinting:ie,isImaging:se,generatePdf:O,generateImage:R}=Z.usePrinter({elementId:`vue-ui-vertical-bar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),q=e.ref(null),H=e.ref(!1),ce=e.computed(()=>t.value.table.responsiveBreakpoint),V=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(f.dataset)&&r.error({componentName:"VueUiVerticalBar",type:"dataset"}),S.value=f.dataset.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0),de(),t.value.responsive){const l=Y.throttle(()=>{const{width:o,height:a}=Y.useResponsive({chart:x.value,title:t.value.style.chart.title.text?I.value:null,legend:t.value.style.chart.legend.show?z.value:null});G.value=o,s.value=a/S.value-d.value*2});V.value=new ResizeObserver(l),V.value.observe(x.value.parentNode)}}),e.onBeforeUnmount(()=>{V.value&&V.value.disconnect()});function de(){new ResizeObserver(o=>{o.forEach(a=>{H.value=a.contentRect.width<ce.value})}).observe(q.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),U=e.computed(()=>h.value.sortDesc),b=e.computed(()=>(f.dataset.forEach((l,o)=>{l.children&&(r.objectIsEmpty(l.children)?r.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):l.children.forEach((a,n)=>{[null,void 0].includes(a.name)&&r.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:n})}))}),f.dataset.map((l,o)=>{const a=`vertical_parent_${o}_${m.value}`,n=!!l.children&&l.children.length>0;return![null,void 0].includes(l.value)&&l.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${l.name||"serie at index"+o} has the following value: ${l.value}`),{...l,id:a,shape:"square",opacity:y.value.includes(a)?.5:1,value:n?l.children.map(u=>u.value||0).reduce((u,i)=>u+i,0):l.value||0,hasChildren:n,isChild:!1,segregate:()=>C(a),isSegregated:y.value.includes(a),color:r.convertColorToHex(l.color)||M.value[o]||r.palette[o]||r.palette[o%r.palette.length],children:!l.children||!l.children.length?[]:l.children.toSorted((u,i)=>U.value?i.value-u.value:u.value-i.value).map((u,i)=>(![null,void 0].includes(u.value)&&u.value<0&&console.warn(`VueUiVerticalBar is not designed to graph negative values. ${u.name+" child serie"||"child serie at index"+o+", "+i} has the following value: ${u.value}`),{...u,value:u.value||0,isChild:!0,parentId:a,parentName:l.name,parentValue:l.value,id:`vertical_child_${o}_${i}_${m.value}`,childIndex:i,color:r.convertColorToHex(u.color)||r.convertColorToHex(l.color)||M.value[o]||r.palette[o]||r.palette[o%r.palette.length]})).map((u,i)=>({...u,isFirstChild:i===0,isLastChild:i===l.children.length-1}))}}).toSorted((l,o)=>U.value?o.value-l.value:l.value-o.value))),A=e.computed(()=>({cy:"vertical-bar-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":""})),s=e.ref(t.value.style.chart.layout.bars.height),d=e.ref(t.value.style.chart.layout.bars.gap),ve=e.computed(()=>(s.value+d.value)*S.value),G=e.ref(512),c=e.computed(()=>({width:G.value,height:ve.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),v=e.computed(()=>({fullHeight:c.value.padding.top+c.value.padding.bottom+c.value.height,top:c.value.padding.top,left:c.value.padding.left,right:c.value.width-c.value.padding.right,bottom:c.value.padding.top+c.value.height,width:c.value.width-(c.value.padding.left+c.value.padding.right)}));function P(){S.value=k.value.flatMap(l=>l.children&&l.children.length>0?l.children.length:1).reduce((l,o)=>l+o,0)}const y=e.ref([]);function C(l){y.value.includes(l)?y.value=y.value.filter(o=>o!==l):y.value.push(l),P(),oe("selectLegend",k.value)}const k=e.computed(()=>b.value.filter(l=>!y.value.includes(l.id))),p=e.computed(()=>k.value.map(l=>l.value).reduce((l,o)=>l+o));function X(l,o=!1,a=0){return o?(l/p.value*100).toFixed(a)+"%":l/p.value}const _=e.computed(()=>k.value.flatMap(l=>l.hasChildren?l.children:l)),he=e.computed(()=>Math.max(...k.value.flatMap(l=>l.children&&l.children.length?Math.max(...l.children.map(o=>o.value)):l.value)));function $(l){const o=l/he.value;return v.value.width*o}function pe(l){return $(l)+v.value.left}function T(l,o){const a=k.value.find(i=>i.id===l.parentId),n=v.value.top+(d.value+s.value)*o,u=a.children.length*(d.value+s.value);return{y:n+u/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:a.name,value:[void 0,NaN,null].includes(a.value)?"":a.value.toFixed(t.value.style.chart.layout.bars.dataLabels.value.roundingValue),percentageToTotal:isNaN(a.value/p.value)?"":X(a.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)}}function ge(){return k.value}const L=e.ref(null),D=e.ref(null);function ye(l,o){D.value={datapoint:l,seriesIndex:o,series:b.value,config:t.value},E.value=!0,L.value=l.id;let a="";const n=l.isChild?l.parentName:l.name,u=l.isChild?l.name:"",i=t.value.style.chart.tooltip.customFormat;r.isFunction(i)&&r.functionReturnsString(()=>i({datapoint:l,series:b.value,config:t.value,seriesIndex:o}))?B.value=i({datapoint:l,series:b.value,config:t.value,seriesIndex:o}):(a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
2
|
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${l.color}"/></svg> ${n}</div>
|
|
3
3
|
${u?`<div>${u}</div>`:""}
|
|
4
4
|
</div>`,t.value.style.chart.tooltip.showValue&&(a+=`<div>${t.value.translations.value}: <b>${t.value.style.chart.tooltip.prefix}${[void 0,NaN,null].includes(l.value)?"-":l.value.toFixed(t.value.style.chart.tooltip.roundingValue)}${t.value.style.chart.tooltip.suffix}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(a+=`<div>${t.value.translations.percentageToTotal} : <b>${isNaN(l.value/p.value)?"-":`${(l.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`,l.isChild&&(a+=`<div>${t.value.translations.percentageToSerie}: <b>${isNaN(l.value/l.parentValue)?"-":`${(l.value/l.parentValue*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`)),B.value=`<div style="text-align:left">${a}</div>`)}function j(l){if(isNaN(l)||!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const o=r.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:l,s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),a=`(${X(l,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${o}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${a}`:""}`}const g=e.computed(()=>{const l=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=_.value.map(a=>a.isChild?a.isFirstChild?{color:a.color,parentName:a.parentName,parentValue:a.parentValue,percentageToTotal:a.parentValue/p.value,childName:a.name,childValue:a.value,childPercentageToParent:a.value/a.parentValue,childPercentageToTotal:a.value/p.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:a.name,childValue:a.value,childPercentageToParent:a.value/a.parentValue,childPercentageToTotal:a.value/p.value}:{color:a.color,parentName:a.name,parentValue:a.value,percentageToTotal:a.value/p.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:l,body:o}});function W(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=g.value.head,a=g.value.body.map(i=>[i.parentName,i.parentValue,i.percentageToTotal,i.childName,i.childValue,i.childPercentageToParent,i.childPercentageToTotal]),n=l.concat([o]).concat(a),u=r.createCsvContent(n);r.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const N=e.ref(!1);function fe(l){N.value=l,F.value+=1}function K(){h.value.showTable=!h.value.showTable}function J(){h.value.sortDesc=!h.value.sortDesc,P()}function Q(){h.value.showTooltip=!h.value.showTooltip}return ae({getData:ge,recalculateHeight:P,generatePdf:O,generateCsv:W,generateImage:R,toggleTable:K,toggleSort:J,toggleTooltip:Q}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${N.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:x,id:`vue-ui-vertical-bar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:I,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(me._sfc_main,{config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:re,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(se),isPrinting:e.unref(ie),uid:m.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,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:N.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:x.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(O),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:K,onToggleSort:J,onToggleTooltip:Q},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},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.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartLegend",ref:z},[e.createVNode(ee.Legend,{legendSet:b.value,config:A.value,onClickMarker:o[0]||(o[0]=({legend:a})=>C(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:n=>C(a.id),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+": "+e.toDisplayString(t.value.style.chart.legend.prefix)+e.toDisplayString(a.value.toFixed(t.value.style.chart.legend.roundingValue))+e.toDisplayString(t.value.style.chart.legend.suffix),13,Ne)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":N.value,"vue-data-ui-fulscreen--off":!N.value}),viewBox:`0 0 ${c.value.width<=0?10:c.value.width} ${v.value.fullHeight<=0?10:v.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${m.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,Ve),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(r.shiftHue)(a.color,.03)}${e.unref(r.opacity)[100-t.value.style.chart.layout.bars.gradientIntensity]}`},null,8,Te)],8,Se))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:v.value.left,y:v.value.top+(d.value+s.value)*n,width:$(a.value)<=0?1e-4:$(a.value),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Ee)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:v.value.left,y:v.value.top+(d.value+s.value)*n,width:$(a.value)<=0?1e-4:$(a.value),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${m.value}_${n})`:`${a.color}${e.unref(r.opacity)[t.value.style.chart.layout.bars.fillOpacity]}`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?a.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Be),(!a.isChild||a.isLastChild)&&t.value.style.chart.layout.separators.show&&n!==_.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:v.value.left,y1:s.value+d.value/2+v.value.top+(d.value+s.value)*n,y2:s.value+d.value/2+v.value.top+(d.value+s.value)*n,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,ze)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:pe(a.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:v.value.top+(d.value+s.value)*n+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":"start","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(j(a.value)),9,Pe),(a.isChild||!a.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"end",x:v.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:v.value.top+(d.value+s.value)*n+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(a.name),9,Le)):e.createCommentVNode("",!0),a.isChild&&a.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:T(a,n).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(T(a,n).name),9,De)):e.createCommentVNode("",!0),a.isChild&&a.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:T(a,n).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(j(T(a,n).value)),9,Fe)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:v.value.top+(d.value+s.value)*n-d.value/2,width:c.value.width<=0?1e-4:c.value.width,height:s.value+d.value<=0?1e-4:s.value+d.value,fill:L.value===a.id?`${t.value.style.chart.layout.highlighter.color}${e.unref(r.opacity)[t.value.style.chart.layout.highlighter.opacity]}`:"transparent",onMouseenter:u=>ye(a,n),onMouseleave:o[1]||(o[1]=u=>{ue.value=null,E.value=!1,L.value=null})},null,40,Ie)]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,we)):e.createCommentVNode("",!0),w.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ke.default,{key:4,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartLegend",ref:z},[e.createVNode(ee.Legend,{legendSet:b.value,config:A.value,onClickMarker:o[2]||(o[2]=({legend:a})=>C(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{onClick:n=>C(a.id),style:e.normalizeStyle(`opacity:${y.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name)+" : "+e.toDisplayString(t.value.style.chart.legend.prefix)+e.toDisplayString(a.value.toFixed(t.value.style.chart.legend.roundingValue))+e.toDisplayString(t.value.style.chart.legend.suffix),13,Oe)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:b.value},void 0,!0),e.createVNode(be._sfc_main,{show:h.value.showTooltip&&E.value&&y.value.length<f.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,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:x.value,content:B.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...D.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),w.value?(e.openBlock(),e.createBlock(Ce.default,{key:6,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:q,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",Re,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=a=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(a=>h.value.showTable=!1,["enter"]))},[e.createVNode(xe.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("table",Me,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",qe,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.head,a=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",He,e.toDisplayString(a),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(p.value)?"":p.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.body,(a,n)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":g.value.head[0]??""},[e.createElementVNode("div",Ae,[a.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${a.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(a.parentName),1)])],12,Ue),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[1]??""},[e.createElementVNode("div",Xe,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.parentValue)?"":a.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Ge),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[2]??""},[e.createElementVNode("div",We,e.toDisplayString(["",NaN,void 0].includes(a.percentageToTotal)?"":`${(a.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,je),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[3]??""},[e.createElementVNode("div",Je,e.toDisplayString(a.childName),1)],12,Ke),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[4]??""},[e.createElementVNode("div",Ye,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(a.childValue)?"":a.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,Qe),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[5]??""},[e.createElementVNode("div",et,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToParent)?"":`${(a.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Ze),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[6]??""},[e.createElementVNode("div",lt,e.toDisplayString(["",NaN,void 0].includes(a.childPercentageToTotal)?"":`${(a.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,tt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,$e))}},ot=_e._export_sfc(at,[["__scopeId","data-v-22e85059"]]);exports.default=ot;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { computed as c, ref as v, onMounted as Ve, onBeforeUnmount as Me, openBlock as s, createElementBlock as n, normalizeClass as ge, normalizeStyle as U, createVNode as te, createCommentVNode as w, createBlock as X, unref as f, createSlots as Be, withCtx as y, renderSlot as g, normalizeProps as Y, guardReactiveProps as J, createElementVNode as m, Fragment as $, renderList as M, toDisplayString as T, createTextVNode as me, nextTick as De, pushScopeId as Ee, popScopeId as Ge } from "vue";
|
|
2
|
-
import { u as Re, c as Ue, t as je, a as We, p as O, o as He, e as le, g as qe, b as Xe, d as Ye, f as I, X as Je, s as Ke, r as Qe, C as Ze, E as et, v as tt, w as lt, n as at, q as ot } from "./index-
|
|
2
|
+
import { u as Re, c as Ue, t as je, a as We, p as O, o as He, e as le, g as qe, b as Xe, d as Ye, f as I, X as Je, s as Ke, r as Qe, C as Ze, E as et, v as tt, w as lt, n as at, q as ot } from "./index-DLi6mPet.js";
|
|
3
3
|
import { t as ut, u as rt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as st } from "./Title-
|
|
5
|
-
import { u as nt, U as it } from "./usePrinter-
|
|
6
|
-
import { _ as ct } from "./Tooltip-
|
|
7
|
-
import { D as vt } from "./DataTable-
|
|
8
|
-
import { L as dt } from "./Legend-
|
|
9
|
-
import ht from "./vue-ui-skeleton-
|
|
10
|
-
import pt from "./vue-ui-accordion-
|
|
11
|
-
import { u as be } from "./useNestedProp-
|
|
4
|
+
import { _ as st } from "./Title-D_FeWJsx.js";
|
|
5
|
+
import { u as nt, U as it } from "./usePrinter-BnaEziDF.js";
|
|
6
|
+
import { _ as ct } from "./Tooltip-BY94WbUk.js";
|
|
7
|
+
import { D as vt } from "./DataTable-B-LJlgjS.js";
|
|
8
|
+
import { L as dt } from "./Legend-DVsCAbZS.js";
|
|
9
|
+
import ht from "./vue-ui-skeleton-CmXMTbOC.js";
|
|
10
|
+
import pt from "./vue-ui-accordion-DzCdp527.js";
|
|
11
|
+
import { u as be } from "./useNestedProp-DmMzRJ1O.js";
|
|
12
12
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = ["xmlns", "viewBox"], mt = ["id"], bt = ["stop-color"], wt = ["stop-color"], xt = ["id"], kt = /* @__PURE__ */ we(() => /* @__PURE__ */ m("feGaussianBlur", {
|
|
14
14
|
in: "SourceGraphic",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DFXgoR1T.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-Ci74YZxW.cjs"),ee=require("./usePrinter-DoFYRZKM.cjs"),be=require("./Tooltip-BNMjZUBc.cjs"),ke=require("./DataTable-BSoyXOFT.cjs"),we=require("./Legend-DZhpxKg4.cjs"),xe=require("./vue-ui-skeleton-CmABeGyu.cjs"),Ce=require("./vue-ui-accordion-P9OYffC3.cjs"),te=require("./useNestedProp-CbZUIZc0.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=S=>(e.pushScopeId("data-v-e4e6d49b"),S=S(),e.popScopeId(),S),_e=["id"],Se=["xmlns","viewBox"],Ne=["id"],$e=["stop-color"],Te=["stop-color"],Ve=["id"],Ie=le(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ee=le(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Pe=[Ie,Ee],ze=["x","y","height","width"],Fe=["rx","x","y","height","width","stroke","stroke-width","filter"],Le=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Oe=["x","y","height","width","filter"],De={key:0},Ae={key:1},Me={key:2},qe={key:3},Re=["onMouseover","x","y","height","width"],Ue=["onClick"],je={key:0},Ge={key:1},We=["innerHTML"],He={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ae,emit:oe}){const p=S,{vue_ui_waffle:re}=s.useConfig(),I=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(s.createUid()),ue=e.ref(null),F=e.ref(!1),L=e.ref(""),B=e.ref(null),A=e.ref(0),N=e.ref(null),M=e.ref(null),q=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:p.config,defaultConfig:re});return l.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),E=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(p.dataset)?s.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=Z.throttle(()=>{const{width:o,height:a}=Z.useResponsive({chart:N.value,title:t.value.style.chart.title.text?M.value:null,legend:t.value.style.chart.legend.show?q.value:null});b.value.width=o,b.value.height=a,k.value.width=o,k.value.height=a});E.value=new ResizeObserver(l),E.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:ne,isImaging:se,generatePdf:R,generateImage:U}=ee.usePrinter({elementId:`vue-ui-waffle_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),j=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),b=e.ref({height:512,width:512}),k=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(k.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(k.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>k.value.width/t.value.style.chart.layout.grid.size),P=e.computed(()=>k.value.height/t.value.style.chart.layout.grid.size);function G(l){const o=l.reduce((u,n)=>u+n,0),a=l.map(u=>Math.round(u/o*100)/100),r=a.reduce((u,n)=>u+n,0);if(r!==1){const u=a.length-1;a[u]+=1-r,a[u]=Math.round(a[u]*100)/100}return a}const W=e.computed(()=>p.dataset.map((l,o)=>({...l,color:s.convertColorToHex(l.color)||j.value[o]||s.palette[o]||s.palette[o%s.palette.length],uid:`serie_${o}`,absoluteIndex:o}))),d=e.ref(W.value),ie=e.computed(()=>{const l=d.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return G(l)}),ce=e.computed(()=>{const l=d.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return G(l)}),h=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),d.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:ie.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})))),de=e.computed(()=>d.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:ce.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})));function ve(){return de.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)}))}const pe=e.computed(()=>h.value.map((l,o)=>{const a=o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,r=a+l.proportion,u=[];for(let n=a;n<=r;n+=1)u.push(n);return{...l,start:o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,rects:u}})),i=e.computed(()=>pe.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}))),T=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)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+k.value.top});return l}),v=e.ref([]),C=e.ref(!1),H=e.ref(null),X=e.ref(null);function Y(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=W.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);let r=d.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);if(v.value.includes(l)){let n=function(){r>u?(cancelAnimationFrame(H.value),d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[u]}:c),C.value=!1):(C.value=!0,r+=u*.025,d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[r]}:c),H.value=requestAnimationFrame(n))};v.value=v.value.filter(c=>c!==l);const u=o;n()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){r<.1?(cancelAnimationFrame(X.value),v.value.push(l),d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[0]}:n),C.value=!1):(C.value=!0,r/=1.5,d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[r]}:n),X.value=requestAnimationFrame(u))};u()}oe("selectLegend",h.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>d.value.map((l,o)=>({name:l.name,color:l.color||j[o]||s.palette[o]||s.palette[o%s.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map((l,o)=>({...l,proportion:l.value/d.value.map(a=>(a.values||[]).reduce((r,u)=>r+u,0)).reduce((a,r)=>a+r,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Y(l.uid),isSegregated:v.value.includes(l.uid)}))),he=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":""})),f=e.computed(()=>h.value.map(l=>l.value).reduce((l,o)=>l+o,0)),O=e.ref(null);function fe(l){if(v.value.length===p.dataset.length)return;const o=i.value[l];O.value={datapoint:o,seriesIndex:o.absoluteIndex,series:d.value,config:t.value},F.value=!0,B.value=i.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value})))L.value=a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value});else{let r="";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 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${s.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})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?r+=`<span>(${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:r+=`<b>${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),L.value=r}}const g=e.computed(()=>{const l=h.value.map(a=>({name:a.name,color:a.color})),o=h.value.map(a=>a.value);return{head:l,body:o}});function D(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${m.value})`:""}function J(){e.nextTick(()=>{const l=g.value.head.map((r,u)=>[[r.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=s.createCsvContent(o);s.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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>',s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],o=g.value.head.map((u,n)=>[{color:u.color,name:u.name},s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[n],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(g.value.body[n]/f.value)?"-":(g.value.body[n]/f.value*100).toFixed(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}}),V=e.ref(!1);function ye(l){V.value=l,A.value+=1}function K(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}return ae({getData:ve,generatePdf:R,generateCsv:J,generateImage:U,toggleTable:K,toggleTooltip:Q}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:M,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(me._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&I.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(se),uid:m.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:V.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(R),onGenerateCsv:J,onGenerateImage:e.unref(U),onToggleTable:K,onToggleTooltip:Q},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},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.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}: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:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${b.value.width<=0?10:b.value.width} ${b.value.height<=0?10:b.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(s.shiftHue)(a.color,.05)}${e.unref(s.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,Ne))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Pe,8,Ve)]),t.value.useCustomCells?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:i.value[r].color,...i.value[r]},isSelected:[null,void 0].includes(B.value)?!0:i.value[r].serieIndex===B.value})),void 0,!0)],8,ze))),256)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Fe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${m.value}_${r})`:i.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Le))),256))],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(i.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||i.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&i.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX,y:a.y+t.value.style.chart.layout.labels.captions.offsetY,height:P.value<=0?1e-4:P.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:D(i.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 ${$.value/12}px;color:${e.unref(s.adaptColorToBackground)(i.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(s.abbreviate)({source:i.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):i.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",Ae,e.toDisplayString(e.unref(s.dataLabel)({v:i.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",Me," ("+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}))+") ",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",qe,e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue})),1)):e.createCommentVNode("",!0)],4)],8,Oe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>fe(r),onMouseleave:o[0]||(o[0]=u=>{F.value=!1,B.value=null}),x:a.x,y:a.y,height:P.value<=0?1e-4:P.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,Re))),256)),e.renderSlot(l.$slots,"svg",{svg:b.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:q},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:_.value,config:he.value,onClickMarker:o[1]||(o[1]=({legend:a})=>Y(a.uid))},{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(s.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:C.value}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(s.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(be._sfc_main,{show:y.value.showTooltip&&F.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,parent:N.value,content:L.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom","fontSize"]),I.value?(e.openBlock(),e.createBlock(Ce.default,{key:4,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.createVNode(ke.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.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,We)]),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)],14,_e))}},Xe=Be._export_sfc(He,[["__scopeId","data-v-e4e6d49b"]]);exports.default=Xe;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BQbaKiSm.cjs"),Z=require("./useResponsive-B3TrDDIG.cjs"),me=require("./Title-D6zeMzr0.cjs"),ee=require("./usePrinter-BANjHBXe.cjs"),be=require("./Tooltip-2d9jRdHk.cjs"),ke=require("./DataTable-C4CMZu2s.cjs"),we=require("./Legend-DWBU0qDC.cjs"),xe=require("./vue-ui-skeleton-DIm7kxhc.cjs"),Ce=require("./vue-ui-accordion-CHVCSgY3.cjs"),te=require("./useNestedProp-B6CpIX-3.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=S=>(e.pushScopeId("data-v-e4e6d49b"),S=S(),e.popScopeId(),S),_e=["id"],Se=["xmlns","viewBox"],Ne=["id"],$e=["stop-color"],Te=["stop-color"],Ve=["id"],Ie=le(()=>e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2},null,-1)),Ee=le(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),Pe=[Ie,Ee],ze=["x","y","height","width"],Fe=["rx","x","y","height","width","stroke","stroke-width","filter"],Le=["rx","x","y","height","width","fill","stroke","stroke-width","filter"],Oe=["x","y","height","width","filter"],De={key:0},Ae={key:1},Me={key:2},qe={key:3},Re=["onMouseover","x","y","height","width"],Ue=["onClick"],je={key:0},Ge={key:1},We=["innerHTML"],He={__name:"vue-ui-waffle",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(S,{expose:ae,emit:oe}){const p=S,{vue_ui_waffle:re}=s.useConfig(),I=e.computed(()=>!!p.dataset&&p.dataset.length),m=e.ref(s.createUid()),ue=e.ref(null),F=e.ref(!1),L=e.ref(""),B=e.ref(null),A=e.ref(0),N=e.ref(null),M=e.ref(null),q=e.ref(null),t=e.computed(()=>{const l=te.useNestedProp({userConfig:p.config,defaultConfig:re});return l.theme?{...te.useNestedProp({userConfig:s.themes.vue_ui_waffle[l.theme]||p.config,defaultConfig:l}),customPalette:s.themePalettes[l.theme]||s.palette}:l}),E=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(p.dataset)?s.error({componentName:"VueUiWaffle",type:"dataset"}):p.dataset.forEach((l,o)=>{s.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(a=>{s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=Z.throttle(()=>{const{width:o,height:a}=Z.useResponsive({chart:N.value,title:t.value.style.chart.title.text?M.value:null,legend:t.value.style.chart.legend.show?q.value:null});b.value.width=o,b.value.height=a,k.value.width=o,k.value.height=a});E.value=new ResizeObserver(l),E.value.observe(N.value.parentNode)}}),e.onBeforeUnmount(()=>{E.value&&E.value.disconnect()});const{isPrinting:ne,isImaging:se,generatePdf:R,generateImage:U}=ee.usePrinter({elementId:`vue-ui-waffle_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-waffle"}),j=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),y=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),b=e.ref({height:512,width:512}),k=e.ref({top:0,left:0,height:512,width:512}),w=e.computed(()=>(k.value.width-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),x=e.computed(()=>(k.value.height-t.value.style.chart.layout.grid.size*t.value.style.chart.layout.grid.spaceBetween)/t.value.style.chart.layout.grid.size),$=e.computed(()=>k.value.width/t.value.style.chart.layout.grid.size),P=e.computed(()=>k.value.height/t.value.style.chart.layout.grid.size);function G(l){const o=l.reduce((u,n)=>u+n,0),a=l.map(u=>Math.round(u/o*100)/100),r=a.reduce((u,n)=>u+n,0);if(r!==1){const u=a.length-1;a[u]+=1-r,a[u]=Math.round(a[u]*100)/100}return a}const W=e.computed(()=>p.dataset.map((l,o)=>({...l,color:s.convertColorToHex(l.color)||j.value[o]||s.palette[o]||s.palette[o%s.palette.length],uid:`serie_${o}`,absoluteIndex:o}))),d=e.ref(W.value),ie=e.computed(()=>{const l=d.value.filter((o,a)=>!v.value.includes(o.uid)).map((o,a)=>(o.values||[]).reduce((r,u)=>r+u,0));return G(l)}),ce=e.computed(()=>{const l=d.value.map((o,a)=>(o.values||[]).reduce((r,u)=>r+u));return G(l)}),h=e.computed(()=>(p.dataset.forEach((l,o)=>{[null,void 0].includes(l.values)&&s.error({componentName:"VueUiWaffle",type:"datasetSerieAttribute",property:"values (number[])",index:o})}),d.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:ie.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})))),de=e.computed(()=>d.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:ce.value[o]*Math.pow(t.value.style.chart.layout.grid.size,2)})));function ve(){return de.value.map(l=>({name:l.name,color:l.color,value:l.value,proportion:l.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)}))}const pe=e.computed(()=>h.value.map((l,o)=>{const a=o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,r=a+l.proportion,u=[];for(let n=a;n<=r;n+=1)u.push(n);return{...l,start:o>0?h.value.filter((n,c)=>c<o).map(n=>n.proportion).reduce((n,c)=>n+c)+l.proportion-h.value[o-1].proportion:l.proportion-l.proportion,rects:u}})),i=e.computed(()=>pe.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}))),T=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)*(w.value+t.value.style.chart.layout.grid.spaceBetween),y:(t.value.style.chart.layout.grid.vertical?a:o)*(x.value+t.value.style.chart.layout.grid.spaceBetween)+k.value.top});return l}),v=e.ref([]),C=e.ref(!1),H=e.ref(null),X=e.ref(null);function Y(l){if(!t.value.useAnimation){v.value.includes(l)?v.value=v.value.filter(u=>u!==l):v.value.length<_.value.length-1&&_.value.length>1&&v.value.push(l);return}const o=W.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);let r=d.value.find(u=>u.uid===l).values.reduce((u,n)=>u+n,0);if(v.value.includes(l)){let n=function(){r>u?(cancelAnimationFrame(H.value),d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[u]}:c),C.value=!1):(C.value=!0,r+=u*.025,d.value=d.value.map((c,ge)=>c.uid===l?{...c,values:[r]}:c),H.value=requestAnimationFrame(n))};v.value=v.value.filter(c=>c!==l);const u=o;n()}else if(v.value.length<_.value.length-1&&_.value.length>1){let u=function(){r<.1?(cancelAnimationFrame(X.value),v.value.push(l),d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[0]}:n),C.value=!1):(C.value=!0,r/=1.5,d.value=d.value.map((n,c)=>n.uid===l?{...n,values:[r]}:n),X.value=requestAnimationFrame(u))};u()}oe("selectLegend",h.value.map(u=>({name:u.name,color:u.color,value:u.value,proportion:u.proportion/Math.pow(t.value.style.chart.layout.grid.size,2)})))}const _=e.computed(()=>d.value.map((l,o)=>({name:l.name,color:l.color||j[o]||s.palette[o]||s.palette[o%s.palette.length],value:(l.values||[]).reduce((a,r)=>a+r,0),uid:l.uid,shape:"square"})).map((l,o)=>({...l,proportion:l.value/d.value.map(a=>(a.values||[]).reduce((r,u)=>r+u,0)).reduce((a,r)=>a+r,0),opacity:v.value.includes(l.uid)?.5:1,segregate:()=>Y(l.uid),isSegregated:v.value.includes(l.uid)}))),he=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":""})),f=e.computed(()=>h.value.map(l=>l.value).reduce((l,o)=>l+o,0)),O=e.ref(null);function fe(l){if(v.value.length===p.dataset.length)return;const o=i.value[l];O.value={datapoint:o,seriesIndex:o.absoluteIndex,series:d.value,config:t.value},F.value=!0,B.value=i.value[l].serieIndex;const a=t.value.style.chart.tooltip.customFormat;if(s.isFunction(a)&&s.functionReturnsString(()=>a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value})))L.value=a({seriesIndex:i.value[l].absoluteIndex,datapoint:o,series:d.value,config:t.value});else{let r="";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 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(r+=`<b>${s.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})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?r+=`<span>(${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:r+=`<b>${(o.value/f.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),L.value=r}}const g=e.computed(()=>{const l=h.value.map(a=>({name:a.name,color:a.color})),o=h.value.map(a=>a.value);return{head:l,body:o}});function D(l){return t.value.useBlurOnHover&&![null,void 0].includes(B.value)&&B.value!==l?`url(#blur_${m.value})`:""}function J(){e.nextTick(()=>{const l=g.value.head.map((r,u)=>[[r.name],[g.value.body[u]],[isNaN(g.value.body[u]/f.value)?"-":g.value.body[u]/f.value*100]]),o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),a=s.createCsvContent(o);s.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-waffle"})})}const z=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>',s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],o=g.value.head.map((u,n)=>[{color:u.color,name:u.name},s.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:g.value.body[n],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(g.value.body[n]/f.value)?"-":(g.value.body[n]/f.value*100).toFixed(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}}),V=e.ref(!1);function ye(l){V.value=l,A.value+=1}function K(){y.value.showTable=!y.value.showTable}function Q(){y.value.showTooltip=!y.value.showTooltip}return ae({getData:ve,generatePdf:R,generateCsv:J,generateImage:U,toggleTable:K,toggleTooltip:Q}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-waffle ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"waffleChart",ref:N,id:`vue-ui-waffle_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:M,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(me._sfc_main,{config:{title:{cy:"waffle-title",...t.value.style.chart.title},subtitle:{cy:"waffle-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&I.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ue,key:`user_options_${A.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(se),uid:m.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:V.value,isTooltip:y.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,onToggleFullscreen:ye,onGeneratePdf:e.unref(R),onGenerateCsv:J,onGenerateImage:e.unref(U),onToggleTable:K,onToggleTooltip:Q},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},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.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}: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:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${b.value.width<=0?10:b.value.width} ${b.value.height<=0?10:b.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(a,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(s.shiftHue)(a.color,.05)}${e.unref(s.opacity)[100-t.value.style.chart.layout.rect.gradientIntensity]}`},null,8,$e),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Te)],8,Ne))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},Pe,8,Ve)]),t.value.useCustomCells?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("foreignObject",{x:a.x,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,class:"vue-ui-waffle-custom-cell-foreignObject"},[e.renderSlot(l.$slots,"cell",e.normalizeProps(e.guardReactiveProps({cell:{...a,color:i.value[r].color,...i.value[r]},isSelected:[null,void 0].includes(B.value)?!0:i.value[r].serieIndex===B.value})),void 0,!0)],8,ze))),256)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:"white",stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Fe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.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,y:a.y,height:x.value<=0?1e-4:x.value,width:w.value<=0?1e-4:w.value,fill:t.value.style.chart.layout.rect.useGradient&&t.value.style.chart.layout.rect.gradientIntensity>0?`url(#gradient_${m.value}_${r})`:i.value[r].color,stroke:t.value.style.chart.layout.rect.stroke,"stroke-width":t.value.style.chart.layout.rect.strokeWidth,filter:D(i.value[r].serieIndex)},null,8,Le))),256))],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[!C.value&&!t.value.style.chart.layout.grid.vertical&&t.value.style.chart.layout.labels.captions.show&&(i.value[r].isFirst&&a.position<t.value.style.chart.layout.grid.size-2||i.value[r].isAbsoluteFirst&&r%t.value.style.chart.layout.grid.size===0&&i.value[r].absoluteStartIndex)?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:a.x+t.value.style.chart.layout.labels.captions.offsetX,y:a.y+t.value.style.chart.layout.labels.captions.offsetY,height:P.value<=0?1e-4:P.value,width:$.value*t.value.style.chart.layout.grid.size<=0?1e-4:$.value*t.value.style.chart.layout.grid.size,filter:D(i.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 ${$.value/12}px;color:${e.unref(s.adaptColorToBackground)(i.value[r].color)};gap:2px`)},[t.value.style.chart.layout.labels.captions.showSerieName?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.value.style.chart.layout.labels.captions.serieNameAbbreviation?e.unref(s.abbreviate)({source:i.value[r].name,length:t.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize}):i.value[r].name)+": ",1)):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.captions.showPercentage?(e.openBlock(),e.createElementBlock("span",Ae,e.toDisplayString(e.unref(s.dataLabel)({v:i.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",Me," ("+e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue}))+") ",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",qe,e.toDisplayString(e.unref(s.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:i.value[r].value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.captions.roundingValue})),1)):e.createCommentVNode("",!0)],4)],8,Oe)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{onMouseover:u=>fe(r),onMouseleave:o[0]||(o[0]=u=>{F.value=!1,B.value=null}),x:a.x,y:a.y,height:P.value<=0?1e-4:P.value,width:$.value<=0?1e-4:$.value,fill:"transparent",stroke:"none"},null,40,Re))),256)),e.renderSlot(l.$slots,"svg",{svg:b.value},void 0,!0)],14,Se)):e.createCommentVNode("",!0),I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"waffle",style:{backgroundColor:t.value.style.chart.backgroundColor,waffle:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:q},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:_.value,config:he.value,onClickMarker:o[1]||(o[1]=({legend:a})=>Y(a.uid))},{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(s.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:C.value}))+" ",1),v.value.includes(a.uid)?(e.openBlock(),e.createElementBlock("span",Ge," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(a.value/f.value)?"-":e.unref(s.dataLabel)({v:a.value/f.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage,isAnimating:C.value}))+") ",1))],12,Ue)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:_.value},void 0,!0)],512),e.createVNode(be._sfc_main,{show:y.value.showTooltip&&F.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,parent:N.value,content:L.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function",fontSize:t.value.style.chart.tooltip.fontSize},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom","fontSize"]),I.value?(e.openBlock(),e.createBlock(Ce.default,{key:4,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.createVNode(ke.DataTable,{colNames:z.value.colNames,head:z.value.head,body:z.value.body,config:z.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,We)]),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)],14,_e))}},Xe=Be._export_sfc(He,[["__scopeId","data-v-e4e6d49b"]]);exports.default=Xe;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { computed as m, ref as n, watch as D, onMounted as H, onBeforeUnmount as W, openBlock as c, createElementBlock as h, normalizeStyle as C, createVNode as q, createCommentVNode as v, createBlock as S, unref as d, createSlots as J, withCtx as _, renderSlot as p, normalizeProps as K, guardReactiveProps as Q, normalizeClass as O, Fragment as Z, renderList as ee, toDisplayString as te } from "vue";
|
|
2
|
-
import { u as ae, c as le, t as ne, o as oe, e as se, s as N, X as re } from "./index-
|
|
3
|
-
import { _ as ue } from "./Title-
|
|
4
|
-
import { u as ie, U as ce } from "./usePrinter-
|
|
2
|
+
import { u as ae, c as le, t as ne, o as oe, e as se, s as N, X as re } from "./index-DLi6mPet.js";
|
|
3
|
+
import { _ as ue } from "./Title-D_FeWJsx.js";
|
|
4
|
+
import { u as ie, U as ce } from "./usePrinter-BnaEziDF.js";
|
|
5
5
|
import { t as he, u as ve } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
-
import de from "./vue-ui-skeleton-
|
|
7
|
-
import { u as A } from "./useNestedProp-
|
|
6
|
+
import de from "./vue-ui-skeleton-CmXMTbOC.js";
|
|
7
|
+
import { u as A } from "./useNestedProp-DmMzRJ1O.js";
|
|
8
8
|
import { _ as ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const fe = ["id"], ge = ["xmlns", "viewBox"], me = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-linecap"], pe = ["cx", "cy", "r", "stroke", "stroke-width"], ke = ["x", "y", "font-size", "fill", "font-weight"], we = {
|
|
10
10
|
__name: "vue-ui-wheel",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-BQbaKiSm.cjs"),q=require("./Title-D6zeMzr0.cjs"),x=require("./usePrinter-BANjHBXe.cjs"),_=require("./useResponsive-B3TrDDIG.cjs"),T=require("./vue-ui-skeleton-DIm7kxhc.cjs"),B=require("./useNestedProp-B6CpIX-3.cjs"),U=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),G=["id"],L=["xmlns","viewBox"],X=["x1","x2","y1","y2","stroke","stroke-width","stroke-linecap"],j=["cx","cy","r","stroke","stroke-width"],H=["x","y","font-size","fill","font-weight"],R={__name:"vue-ui-wheel",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(I,{expose:P}){const o=I,{vue_ui_wheel:S}=c.useConfig(),y=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length),f=e.ref(c.createUid()),F=e.ref(null),m=e.ref(0),h=e.ref(null),p=e.ref(null),t=e.computed(()=>{const l=B.useNestedProp({userConfig:o.config,defaultConfig:S});return l.theme?{...B.useNestedProp({userConfig:c.themes.vue_ui_wheel[l.theme]||o.config,defaultConfig:l})}:l}),{isPrinting:N,isImaging:z,generatePdf:k,generateImage:w}=x.usePrinter({elementId:f.value,fileName:t.value.style.chart.title.text||"vue-ui-wheel"}),n=e.ref({size:360,height:360,width:360}),g=e.ref(t.value.style.chart.layout.percentage.fontSize),r=e.computed(()=>({radius:Math.min(n.value.width,n.value.height)*.9/2,centerX:n.value.width/2,centerY:n.value.height/2}));function C(l,s=1){return{x:r.value.centerX+r.value.radius*Math.cos(29.85+l*Math.PI/180)*s,y:r.value.centerY+r.value.radius*Math.sin(29.85+l*Math.PI/180)*s}}const u=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0);e.watch(()=>o.dataset.percentage,()=>{u.value=e.ref(t.value.style.chart.animation.use?0:o.dataset.percentage||0),b()});const v=e.ref(null);e.onMounted(()=>{if(c.objectIsEmpty(o.dataset)&&c.error({componentName:"VueUiWheel",type:"dataset"}),b(),t.value.responsive){const l=_.throttle(()=>{const{width:s,height:a}=_.useResponsive({chart:h.value,title:t.value.style.chart.title.text?p.value:null});n.value.width=s,n.value.height=a,g.value=t.value.style.chart.layout.percentage.fontSize/360*Math.min(s,a)});v.value=new ResizeObserver(l),v.value.observe(h.value.parentNode)}}),e.onBeforeUnmount(()=>{v.value&&v.value.disconnect()});function b(){let l=0,s=t.value.style.chart.animation.speed,a=.005*t.value.style.chart.animation.acceleration;function i(){u.value+=s+l,l+=a,u.value<(o.dataset.percentage||0)?requestAnimationFrame(i):u.value=o.dataset.percentage||0}t.value.style.chart.animation.use&&(u.value=0,i())}const $=e.computed(()=>{const l=[];for(let a=0;a<100;a+=1){const i=u.value>a?t.value.style.chart.layout.wheel.ticks.activeColor:t.value.style.chart.layout.wheel.ticks.inactiveColor,{x:E,y:A}=C(n.value.size/100*a),{x:M,y:V}=C(n.value.size/100*a,.9);l.push({x1:E,y1:A,x2:M,y2:V,color:t.value.style.chart.layout.wheel.ticks.gradient.show?c.shiftHue(i,a/100*(t.value.style.chart.layout.wheel.ticks.gradient.shiftHueIntensity/100)):i})}return l}),d=e.ref(!1);function O(l){d.value=l,m.value+=1}return P({generatePdf:k,generateImage:w}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-wheel",ref_key:"wheelChart",ref:h,id: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%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:p,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(q._sfc_main,{config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&y.value?(e.openBlock(),e.createBlock(x.UserOptions,{ref_key:"details",ref:F,key:`user_options_${m.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(N),isImaging:e.unref(z),uid:f.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:d.value,titles:{...t.value.userOptions.buttonTitles},chartElement:h.value,onToggleFullscreen:O,onGeneratePdf:e.unref(k),onGenerateImage:e.unref(w)},e.createSlots({_:2},[l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:i})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:i})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":d.value,"vue-data-ui-fulscreen--off":!d.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(a,i)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2,stroke:a.color,"stroke-width":5/360*Math.min(n.value.width,n.value.height),"stroke-linecap":t.value.style.chart.layout.wheel.ticks.rounded?"round":"butt",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&i<=u.value})},null,10,X))),256)),t.value.style.chart.layout.innerCircle.show?(e.openBlock(),e.createElementBlock("circle",{key:0,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,j)):e.createCommentVNode("",!0),t.value.style.chart.layout.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:1,x:r.value.centerX,y:r.value.centerY+g.value/3,"font-size":g.value,fill:t.value.style.chart.layout.wheel.ticks.gradient.show?e.unref(c.shiftHue)(t.value.style.chart.layout.wheel.ticks.activeColor,u.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(Number(u.value.toFixed(t.value.style.chart.layout.percentage.rounding)).toLocaleString())+"% ",9,H)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,L)):e.createCommentVNode("",!0),y.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T.default,{key:3,config:{type:"wheel",style:{backgroundColor:t.value.style.chart.backgroundColor,wheel:{color:"#CCCCCC"}}}},null,8,["config"]))],12,G))}},Y=U._export_sfc(R,[["__scopeId","data-v-9e158d61"]]);exports.default=Y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BQbaKiSm.cjs"),Z=require("./Title-D6zeMzr0.cjs"),E=require("./usePrinter-BANjHBXe.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ee=require("./vue-ui-accordion-CHVCSgY3.cjs"),te=require("./DataTable-C4CMZu2s.cjs"),M=require("./useNestedProp-B6CpIX-3.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le=["id"],ae=["xmlns","viewBox"],ne=["transform"],se=["fill","font-weight","x","y","font-size","transform"],re=["innerHTML"],ue={__name:"vue-ui-word-cloud",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,String],default(){return[]}}},setup(D,{expose:W}){const c=D,{vue_ui_word_cloud:q}=s.useConfig(),f=e.computed({get(){return!!c.dataset&&c.dataset.length},set(o){return o}}),x=e.ref(typeof c.dataset=="string"?s.createWordCloudDatasetFromPlainText(c.dataset):c.dataset),$=e.ref(s.createUid()),P=e.ref(0),g=e.ref(null),S=e.ref(null),t=e.computed(()=>{const o=M.useNestedProp({userConfig:c.config,defaultConfig:q});return o.theme?{...M.useNestedProp({userConfig:s.themes.vue_ui_word_cloud[o.theme]||c.config,defaultConfig:o}),customPalette:s.themePalettes[o.theme]||s.palette}:o}),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}),p=e.ref(null);e.onMounted(()=>{if(s.objectIsEmpty(c.dataset)?s.error({componentName:"VueUiWordCloud",type:"dataset"}):x.value.forEach((o,a)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","value"]}).forEach(l=>{f.value=!1,s.error({componentName:"VueUiWordCloud",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=V.throttle(()=>{const{width:a,height:l}=V.useResponsive({chart:g.value,title:t.value.style.chart.title.text?S.value:null});r.value.width=a,r.value.height=l,e.nextTick(F)});p.value=new ResizeObserver(o),p.value.observe(g.value.parentNode)}}),e.onBeforeUnmount(()=>{p.value&&p.value.disconnect()});const{isPrinting:A,isImaging:U,generatePdf:_,generateImage:z}=E.usePrinter({elementId:`wordCloud_${$.value}`,fileName:t.value.style.chart.title.text||"vue-ui-word-cloud"}),y=e.ref({showTable:t.value.table.show});function G(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 L(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 R(o,a,l){const u=[],n={x:-a/2,y:-l/2,width:a,height:l},i=0,v=0;return o.forEach(h=>{let T=!1;for(let k=0;k<Math.max(a,l)/2&&!T;k+=t.value.style.chart.words.packingWeight)for(let N=0;N<360&&!T;N+=t.value.style.chart.words.packingWeight){const O=N*Math.PI/180,H=i+k*Math.cos(O)-h.width/2,Y=v+k*Math.sin(O)-h.height/2,d={...h,x:H,y:Y},J=d.x>=n.x&&d.y>=n.y&&d.x+d.width<=n.x+n.width&&d.y+d.height<=n.y+n.height,K=u.some(Q=>L(d,Q));J&&!K&&(u.push(d),T=!0)}}),u}const m=e.ref([]);e.watch(()=>c.dataset,F,{immediate:!0});function F(){const o=x.value.map(n=>n.value),a=Math.max(...o),l=Math.min(...o),u=x.value.map((n,i)=>{const v=(n.value-l)/(a-l)*(r.value.maxFontSize-r.value.minFontSize)+r.value.minFontSize,h=G(n.name,v);return{...n,id:s.createUid(),fontSize:v,width:h.width,height:h.height,color:t.value.style.chart.words.usePalette?t.value.customPalette[i]||t.value.customPalette[i%t.value.customPalette.length]||s.palette[i]||s.palette[i%s.palette.length]:t.value.style.chart.words.color}});m.value=R(u,r.value.width,r.value.height).sort((n,i)=>i.fontSize-n.fontSize)}const b=e.computed(()=>{const o=m.value.map(l=>({name:l.name,color:l.color})),a=m.value.map(l=>l.value);return{head:o,body:a}});function B(){e.nextTick(()=>{const o=b.value.head.map((u,n)=>[[u.name],[b.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 C=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value],a=b.value.head.map((n,i)=>{const v=s.dataLabel({p:t.value.table.td.prefix,v:b.value.body[i],s:t.value.table.td.suffix,r:t.value.table.td.roundingValue});return[{color:n.color,name:n.name},v]}),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}}),w=e.ref(!1);function X(o){w.value=o,P.value+=1}function j(){return m.value}function I(){y.value.showTable=!y.value.showTable}return W({getData:j,generateCsv:B,generatePdf:_,generateImage:z,toggleTable:I}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-word-cloud",ref_key:"wordCloudChart",ref:g,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%":""}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:S,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(Z._sfc_main,{config:{title:{...t.value.style.chart.title},subtitle:{...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&f.value?(e.openBlock(),e.createBlock(E.UserOptions,{ref:"details",key:`user_option_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(A),isImaging:e.unref(U),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:w.value,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,onToggleFullscreen:X,onGeneratePdf:e.unref(_),onGenerateCsv:B,onGenerateImage:e.unref(z),onToggleTable:I},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("svg",{key:2,class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.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:e.normalizeStyle(`overflow:visible;background:${t.value.style.chart.backgroundColor};`)},[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(m.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})`,style:e.normalizeStyle(`animation-delay:${u*t.value.animationDelayMs}ms !important`),class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":"middle","dominant-baseline":"middle"},e.toDisplayString(l.name),15,se))]))),256))],8,ne),e.renderSlot(o.$slots,"svg",{svg:{height:r.value.height,width:r.value.width}},void 0,!0)],14,ae)):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createBlock(ee.default,{key:3,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.createVNode(te.DataTable,{colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.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[0]||(a[0]=l=>y.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,re)]),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)],12,le))}},ie=oe._export_sfc(ue,[["__scopeId","data-v-83c65691"]]);exports.default=ie;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as P, ref as r, onMounted as he, onBeforeUnmount as me, watch as fe, openBlock as d, createElementBlock as f, normalizeStyle as F, createVNode as L, createCommentVNode as N, createBlock as X, unref as b, createSlots as ge, withCtx as v, renderSlot as g, normalizeProps as pe, guardReactiveProps as be, normalizeClass as R, createElementVNode as j, Fragment as ye, renderList as Ce, toDisplayString as H, createTextVNode as we, nextTick as q } from "vue";
|
|
2
|
-
import { u as xe, S as ke, c as Y, t as $e, a as _e, p as z, o as Te, e as J, g as Pe, f as Fe, X as Ne, n as ze, q as Ie } from "./index-
|
|
3
|
-
import { _ as Se } from "./Title-
|
|
4
|
-
import { u as Oe, U as Me } from "./usePrinter-
|
|
2
|
+
import { u as xe, S as ke, c as Y, t as $e, a as _e, p as z, o as Te, e as J, g as Pe, f as Fe, X as Ne, n as ze, q as Ie } from "./index-DLi6mPet.js";
|
|
3
|
+
import { _ as Se } from "./Title-D_FeWJsx.js";
|
|
4
|
+
import { u as Oe, U as Me } from "./usePrinter-BnaEziDF.js";
|
|
5
5
|
import { t as De, u as We } from "./useResponsive-NZB-WLRF.js";
|
|
6
|
-
import Ee from "./vue-ui-accordion-
|
|
7
|
-
import { D as Ae } from "./DataTable-
|
|
8
|
-
import { u as K } from "./useNestedProp-
|
|
6
|
+
import Ee from "./vue-ui-accordion-DzCdp527.js";
|
|
7
|
+
import { D as Ae } from "./DataTable-B-LJlgjS.js";
|
|
8
|
+
import { u as K } from "./useNestedProp-DmMzRJ1O.js";
|
|
9
9
|
import { _ as Ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const Be = ["id"], Ue = ["xmlns", "viewBox"], Ge = ["transform"], Le = ["fill", "font-weight", "x", "y", "font-size", "transform"], Xe = ["innerHTML"], Re = {
|
|
11
11
|
__name: "vue-ui-word-cloud",
|