vue-data-ui 2.4.67 → 2.4.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -16
- package/dist/{Arrow-Pw0XdelV.js → Arrow-D5Ik6Rl_.js} +1 -1
- package/dist/{Arrow-BgFoJ_7c.cjs → Arrow-DTyx6yXe.cjs} +1 -1
- package/dist/{BaseIcon-Bo_1SPIG.cjs → BaseIcon-At97xJaA.cjs} +1 -1
- package/dist/{BaseIcon-Dog_ErJD.js → BaseIcon-D7H3G8-f.js} +1 -1
- package/dist/{DataTable-BLV7zzyw.js → DataTable-CNH8bChE.js} +2 -2
- package/dist/{DataTable-1WuyQJQK.cjs → DataTable-Dng-zRfh.cjs} +1 -1
- package/dist/{Legend-ynYWBX3Z.js → Legend-kF7sC1KK.js} +2 -2
- package/dist/{Legend-DoFd_NOd.cjs → Legend-kMbr5DZt.cjs} +1 -1
- package/dist/{PackageVersion-BachziuZ.cjs → PackageVersion-CHUMvFGr.cjs} +1 -1
- package/dist/{PackageVersion-BazXxXqy.js → PackageVersion-m6HC0skh.js} +1 -1
- package/dist/{PenAndPaper-D6E7hDYd.cjs → PenAndPaper-DmMAK04m.cjs} +1 -1
- package/dist/{PenAndPaper-D4nWibJ3.js → PenAndPaper-FOhKSug_.js} +3 -3
- package/dist/{Shape-C8aWG3A1.cjs → Shape-Ajzs1V3O.cjs} +1 -1
- package/dist/{Shape-Bz-gcdva.js → Shape-CfcWXI5g.js} +1 -1
- package/dist/{Slicer-CL0kQ_HB.js → Slicer-Bq3BajcJ.js} +2 -2
- package/dist/{Slicer-hEQW3UhE.cjs → Slicer-Cgyw5vYE.cjs} +1 -1
- package/dist/{Title-CFqlh_YB.cjs → Title-C7y-iI1m.cjs} +1 -1
- package/dist/{Title-CEILAOdT.js → Title-L52l_KMR.js} +1 -1
- package/dist/{Tooltip-CgY3ZV9q.js → Tooltip-FYp9ljnj.js} +1 -1
- package/dist/{Tooltip-BA_0hLX8.cjs → Tooltip-Y622sV6l.cjs} +1 -1
- package/dist/{index-CnwO8xcH.js → index-3_ulDZ6w.js} +1 -1
- package/dist/{index-DVvHP4A_.cjs → index-CPtAxuTc.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DPMt3Iiy.js → useNestedProp-Bs6ltq3I.js} +1 -1
- package/dist/{useNestedProp-CsmZqXml.cjs → useNestedProp-BtCZVKOm.cjs} +1 -1
- package/dist/{usePrinter-a7rkFhGa.cjs → usePrinter-BmNhTUGE.cjs} +1 -1
- package/dist/{usePrinter-BEBjMPUP.js → usePrinter-NdwnpHUu.js} +1 -1
- package/dist/{vue-data-ui-DEys4N5t.cjs → vue-data-ui-C4MFJb3X.cjs} +1 -1
- package/dist/{vue-data-ui-BRdOwa-y.js → vue-data-ui-qqS_JEAb.js} +60 -60
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CvpX7WMe.js → vue-ui-3d-bar-B-DPM6sB.js} +9 -9
- package/dist/{vue-ui-3d-bar-Dh0cv4h8.cjs → vue-ui-3d-bar-D1Q5GpB8.cjs} +1 -1
- package/dist/{vue-ui-accordion-DDF-Fm2i.js → vue-ui-accordion-DXlXtAML.js} +3 -3
- package/dist/{vue-ui-accordion-Dghh8xxy.cjs → vue-ui-accordion-Dd0mfQys.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DPWG69uQ.js → vue-ui-age-pyramid-CEw1j90S.js} +10 -10
- package/dist/{vue-ui-age-pyramid-a4H5S4cY.cjs → vue-ui-age-pyramid-Dn8sTUD1.cjs} +1 -1
- package/dist/{vue-ui-annotator-C0sEr9cJ.cjs → vue-ui-annotator-DLwKn7nJ.cjs} +1 -1
- package/dist/{vue-ui-annotator-DUePPHtb.js → vue-ui-annotator-I7b5208U.js} +1 -1
- package/dist/{vue-ui-bullet-D4-xLewd.cjs → vue-ui-bullet-B_toFHM0.cjs} +1 -1
- package/dist/{vue-ui-bullet-BbaaoPyS.js → vue-ui-bullet-CUpzxv8b.js} +8 -8
- package/dist/{vue-ui-candlestick-tUuVLgBm.js → vue-ui-candlestick-D4poOC-A.js} +11 -11
- package/dist/{vue-ui-candlestick-DsBReIGb.cjs → vue-ui-candlestick-DUjJP9IX.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-Bz2AtsF0.cjs → vue-ui-carousel-table-BRdt1LUl.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-_uE3nbkS.js → vue-ui-carousel-table-CMP41H6W.js} +4 -4
- package/dist/{vue-ui-chestnut-BL0oYXve.cjs → vue-ui-chestnut-BGpagpDQ.cjs} +1 -1
- package/dist/{vue-ui-chestnut-3lzZH1Ax.js → vue-ui-chestnut-BzCjWlbs.js} +8 -8
- package/dist/{vue-ui-cursor-Co96syV2.js → vue-ui-cursor-CdhhPJ2w.js} +2 -2
- package/dist/{vue-ui-cursor-B6WmdWgg.cjs → vue-ui-cursor-Ike72xN1.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BL0Fl8-5.js → vue-ui-dashboard-CDUpQHzg.js} +2 -2
- package/dist/{vue-ui-dashboard-CxVP2i4u.cjs → vue-ui-dashboard-CFF1xhGw.cjs} +1 -1
- package/dist/{vue-ui-digits-B9fsrbIE.js → vue-ui-digits-Cje8oZYA.js} +2 -2
- package/dist/{vue-ui-digits-BJg4hobZ.cjs → vue-ui-digits-Cu3AtNFJ.cjs} +1 -1
- package/dist/{vue-ui-donut-BdWF8vMH.cjs → vue-ui-donut-BNmui7ee.cjs} +1 -1
- package/dist/{vue-ui-donut-D3Hz4Vfa.js → vue-ui-donut-DyEbJv8M.js} +12 -12
- package/dist/{vue-ui-donut-evolution-Dw4I7fhN.js → vue-ui-donut-evolution-B_kVMwY5.js} +11 -11
- package/dist/{vue-ui-donut-evolution-BlwoTXwM.cjs → vue-ui-donut-evolution-BxElmgKr.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-COjyZaXJ.cjs → vue-ui-dumbbell-Bb4_UIZL.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-Bl6xGSLF.js → vue-ui-dumbbell-XSwVUKkI.js} +10 -10
- package/dist/{vue-ui-flow-D5u54RzI.cjs → vue-ui-flow-BxSDPsTX.cjs} +1 -1
- package/dist/{vue-ui-flow-D2zRJ6wq.js → vue-ui-flow-CT9Ikm2q.js} +9 -9
- package/dist/{vue-ui-funnel-CSZWnJYH.cjs → vue-ui-funnel-4Xz5KcCC.cjs} +1 -1
- package/dist/{vue-ui-funnel-Ds3ZEPq6.js → vue-ui-funnel-xE-KSwUY.js} +9 -9
- package/dist/{vue-ui-galaxy-C9byGzin.cjs → vue-ui-galaxy-BKyxc95s.cjs} +1 -1
- package/dist/{vue-ui-galaxy-pt_aAhOb.js → vue-ui-galaxy-CQu_2tM7.js} +11 -11
- package/dist/{vue-ui-gauge-DpZjO3xY.js → vue-ui-gauge-BML0PHj7.js} +7 -7
- package/dist/{vue-ui-gauge-D888JxSB.cjs → vue-ui-gauge-BY-_g8oh.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CqLVPIN1.js → vue-ui-gizmo-CZdz1ws4.js} +3 -3
- package/dist/{vue-ui-gizmo-D2-_xuYD.cjs → vue-ui-gizmo-DCDez8vm.cjs} +1 -1
- package/dist/{vue-ui-heatmap-E0PqMLPl.cjs → vue-ui-heatmap-B6TqJ0rT.cjs} +1 -1
- package/dist/{vue-ui-heatmap-Cs6oP4_Y.js → vue-ui-heatmap-BBhBotdK.js} +10 -10
- package/dist/{vue-ui-history-plot-CJSEFhv8.js → vue-ui-history-plot-CEGzb0go.js} +11 -11
- package/dist/{vue-ui-history-plot-CjTLuCZR.cjs → vue-ui-history-plot-ICiiX_iG.cjs} +1 -1
- package/dist/{vue-ui-kpi-BHb8giSN.js → vue-ui-kpi-CcY9SiQU.js} +3 -3
- package/dist/{vue-ui-kpi-DUe_KvC1.cjs → vue-ui-kpi-b1KYFaD5.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Dg7oL6ff.js → vue-ui-mini-loader-ChYeDs8b.js} +2 -2
- package/dist/{vue-ui-mini-loader-Dz80iGWP.cjs → vue-ui-mini-loader-DRDOwWX4.cjs} +1 -1
- package/dist/{vue-ui-molecule-DhWn7i2n.cjs → vue-ui-molecule-BC9pfKLe.cjs} +1 -1
- package/dist/{vue-ui-molecule-BY_0F7Mg.js → vue-ui-molecule-C7RlUrep.js} +11 -11
- package/dist/{vue-ui-mood-radar-CLv01TXT.cjs → vue-ui-mood-radar-DuyOelxm.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C0ukSxB9.js → vue-ui-mood-radar-MwQGdQBk.js} +11 -11
- package/dist/{vue-ui-nested-donuts-B7iIvgEq.js → vue-ui-nested-donuts-CTjWqxm1.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BmOh6Y2M.cjs → vue-ui-nested-donuts-DV_fUt8X.cjs} +1 -1
- package/dist/{vue-ui-onion-BOTGL-Ks.cjs → vue-ui-onion-CMJQd4hJ.cjs} +1 -1
- package/dist/{vue-ui-onion-B1rP-YG7.js → vue-ui-onion-DQU2quzY.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-C0Yj3ecn.js → vue-ui-parallel-coordinate-plot-el0qRCNH.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-AjSZELcj.cjs → vue-ui-parallel-coordinate-plot-mr_VL-5e.cjs} +1 -1
- package/dist/{vue-ui-quadrant-C3lCo2lR.js → vue-ui-quadrant-D4JbzGnx.js} +12 -12
- package/dist/{vue-ui-quadrant-C4KVaPPD.cjs → vue-ui-quadrant-p1PqQgE8.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-D0JIO11E.js → vue-ui-quick-chart-C7dbfJas.js} +9 -9
- package/dist/{vue-ui-quick-chart-BjiYIerq.cjs → vue-ui-quick-chart-CpVCnKQR.cjs} +1 -1
- package/dist/{vue-ui-radar-C1IEsGcq.cjs → vue-ui-radar-B8w_jmnj.cjs} +1 -1
- package/dist/{vue-ui-radar-CVHSHTIW.js → vue-ui-radar-DwcDudGq.js} +12 -12
- package/dist/{vue-ui-rating-UOowmV6D.cjs → vue-ui-rating-CF611kMg.cjs} +1 -1
- package/dist/{vue-ui-rating-CQQnfz6s.js → vue-ui-rating-CVWVcuH4.js} +2 -2
- package/dist/{vue-ui-relation-circle-CoNtvSYN.js → vue-ui-relation-circle-DOqHTAlr.js} +7 -7
- package/dist/{vue-ui-relation-circle-BrdUzD5q.cjs → vue-ui-relation-circle-i-IWbtjG.cjs} +1 -1
- package/dist/{vue-ui-rings-Bn8O1_X5.js → vue-ui-rings-CYtiwLoa.js} +12 -12
- package/dist/{vue-ui-rings-DD-JSPqp.cjs → vue-ui-rings-HITb7jlj.cjs} +1 -1
- package/dist/{vue-ui-scatter-BH1LZ7XU.js → vue-ui-scatter-Cz4FEjWs.js} +12 -12
- package/dist/{vue-ui-scatter-uwcz6Dui.cjs → vue-ui-scatter-OHMJOdMx.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CupnT9Fr.js → vue-ui-screenshot-BdztwxL8.js} +1 -1
- package/dist/{vue-ui-screenshot-Dv20cwPs.cjs → vue-ui-screenshot-PgLhVqsE.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Bw4w98Z_.cjs → vue-ui-skeleton-DkZB7ae3.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DyIz4SMi.js → vue-ui-skeleton-uAX1ZH1F.js} +3 -3
- package/dist/{vue-ui-smiley-bhbvfV3Y.js → vue-ui-smiley-B8AEl3OB.js} +2 -2
- package/dist/{vue-ui-smiley-Ce8lEqra.cjs → vue-ui-smiley-CdtUIpXZ.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D_YPkSzD.cjs → vue-ui-spark-trend-BvYBFEgW.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-Cft_rb44.js → vue-ui-spark-trend-C4TeGkYj.js} +5 -5
- package/dist/{vue-ui-sparkbar-DgaxPc1h.js → vue-ui-sparkbar-CTjfAkYo.js} +4 -4
- package/dist/{vue-ui-sparkbar-BDgJFX4N.cjs → vue-ui-sparkbar-DB7UzjAD.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dl20cigA.js → vue-ui-sparkgauge-BlPTNi74.js} +4 -4
- package/dist/{vue-ui-sparkgauge-oNVmAtjA.cjs → vue-ui-sparkgauge-Bn2BPZoT.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-ChgeNYIQ.cjs → vue-ui-sparkhistogram-B1mF8U0R.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-c4jnOFhu.js → vue-ui-sparkhistogram-BKRqTMvf.js} +5 -5
- package/dist/{vue-ui-sparkline-fHgH7VCW.js → vue-ui-sparkline-Bg-TapoG.js} +4 -4
- package/dist/{vue-ui-sparkline-CJDCb22O.cjs → vue-ui-sparkline-Dj0hFEo0.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-kG-HctgQ.js → vue-ui-sparkstackbar-D8KqTPqH.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-B9uRFWik.cjs → vue-ui-sparkstackbar-DzI-MFl3.cjs} +1 -1
- package/dist/{vue-ui-stackbar-Sg4hlIIU.js → vue-ui-stackbar-6vF4VXMO.js} +13 -13
- package/dist/{vue-ui-stackbar-B18q0nZn.cjs → vue-ui-stackbar-e1b5UPvn.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BpXdYlYa.cjs → vue-ui-strip-plot-GsQbr3zj.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-BxN4hG2t.js → vue-ui-strip-plot-sWs8kbbo.js} +11 -11
- package/dist/{vue-ui-table-BL1egpui.cjs → vue-ui-table-CJVmhYep.cjs} +1 -1
- package/dist/{vue-ui-table-QB-vjlCq.js → vue-ui-table-SRSARac3.js} +1 -1
- package/dist/{vue-ui-table-heatmap-BvtvK493.js → vue-ui-table-heatmap-CKiO41aZ.js} +4 -4
- package/dist/{vue-ui-table-heatmap-D-gPys1-.cjs → vue-ui-table-heatmap-D1xntRRZ.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Bl8bzMSu.cjs → vue-ui-table-sparkline-BZJqRwhf.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Bl6CBllu.js → vue-ui-table-sparkline-hyCYl7SR.js} +5 -5
- package/dist/{vue-ui-thermometer-CQBwx4Sr.cjs → vue-ui-thermometer-0bxewTlH.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DvkQCKJ8.js → vue-ui-thermometer-uYO2Cbv6.js} +7 -7
- package/dist/{vue-ui-timer-CTPxmrXy.js → vue-ui-timer-DO2sPtaA.js} +5 -5
- package/dist/{vue-ui-timer-mGjVAf8m.cjs → vue-ui-timer-hehskDGP.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-8Oi7eeFT.cjs → vue-ui-tiremarks-C3Y478uT.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-DxwcalRe.js → vue-ui-tiremarks-DQjOkAad.js} +7 -7
- package/dist/{vue-ui-treemap-CaDJCGUj.js → vue-ui-treemap-Bv36Ha7O.js} +11 -11
- package/dist/{vue-ui-treemap-BquPyE0p.cjs → vue-ui-treemap-_4nb3nS1.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BbFt098V.js → vue-ui-vertical-bar-DeP6cUWy.js} +12 -12
- package/dist/{vue-ui-vertical-bar-D3xJyfKa.cjs → vue-ui-vertical-bar-LquYjKVD.cjs} +1 -1
- package/dist/{vue-ui-waffle-BmNA6NLx.js → vue-ui-waffle-BfzfWmf5.js} +304 -276
- package/dist/vue-ui-waffle-Hlsl5QtL.cjs +1 -0
- package/dist/{vue-ui-wheel-BAcTVwye.cjs → vue-ui-wheel--e6UBwL4.cjs} +1 -1
- package/dist/{vue-ui-wheel-Cb-feR-M.js → vue-ui-wheel-DJC5YCbw.js} +7 -7
- package/dist/{vue-ui-word-cloud-DaHs0ide.cjs → vue-ui-word-cloud-AGcxc9Jb.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-zx7YU5O2.js → vue-ui-word-cloud-CVsld1uE.js} +10 -10
- package/dist/{vue-ui-xy-wZOHLmBv.cjs → vue-ui-xy-DiZVwKYl.cjs} +1 -1
- package/dist/{vue-ui-xy-DOEHuFSz.js → vue-ui-xy-DwwIMZEo.js} +14 -14
- package/dist/{vue-ui-xy-canvas-B_LyiCyr.js → vue-ui-xy-canvas-ChBRm7Zw.js} +11 -11
- package/dist/{vue-ui-xy-canvas-7u6MWjcr.cjs → vue-ui-xy-canvas-D1kEOzE6.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-waffle-3cY5r2QB.cjs +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useSlots as at, onMounted as Ie, computed as k, ref as f, watch as nt, onBeforeUnmount as st, openBlock as g, createElementBlock as w, normalizeClass as Le, normalizeStyle as R, unref as y, createBlock as E, createCommentVNode as S, createSlots as rt, withCtx as T, renderSlot as $, normalizeProps as G, guardReactiveProps as X, createVNode as Re, Fragment as De, renderList as Me, createElementVNode as N, toDisplayString as Y, createTextVNode as Ve, nextTick as ut, pushScopeId as it, popScopeId as ct } from "vue";
|
|
2
|
-
import { u as dt, c as Ue, t as vt, a as ht, p as _, b as ft, o as pt, e as gt, d as ae, i as ne, f as K, X as yt, l as Be, G as He, x as We, y as mt, q as bt, r as kt } from "./index-
|
|
3
|
-
import { _ as wt } from "./Title-
|
|
4
|
-
import { u as Ct, U as $t } from "./usePrinter-
|
|
5
|
-
import { _ as xt } from "./Tooltip-
|
|
6
|
-
import { L as Tt } from "./Legend-
|
|
7
|
-
import _t from "./vue-ui-skeleton-
|
|
8
|
-
import { D as Ot } from "./DataTable-
|
|
9
|
-
import St from "./vue-ui-accordion-
|
|
2
|
+
import { u as dt, c as Ue, t as vt, a as ht, p as _, b as ft, o as pt, e as gt, d as ae, i as ne, f as K, X as yt, l as Be, G as He, x as We, y as mt, q as bt, r as kt } from "./index-3_ulDZ6w.js";
|
|
3
|
+
import { _ as wt } from "./Title-L52l_KMR.js";
|
|
4
|
+
import { u as Ct, U as $t } from "./usePrinter-NdwnpHUu.js";
|
|
5
|
+
import { _ as xt } from "./Tooltip-FYp9ljnj.js";
|
|
6
|
+
import { L as Tt } from "./Legend-kF7sC1KK.js";
|
|
7
|
+
import _t from "./vue-ui-skeleton-uAX1ZH1F.js";
|
|
8
|
+
import { D as Ot } from "./DataTable-CNH8bChE.js";
|
|
9
|
+
import St from "./vue-ui-accordion-DXlXtAML.js";
|
|
10
10
|
import { t as Nt, u as zt } from "./useResponsive-CoxXLe23.js";
|
|
11
|
-
import { u as Ee } from "./useNestedProp-
|
|
12
|
-
import { _ as Pt } from "./PackageVersion-
|
|
13
|
-
import { P as At } from "./PenAndPaper-
|
|
11
|
+
import { u as Ee } from "./useNestedProp-Bs6ltq3I.js";
|
|
12
|
+
import { _ as Pt } from "./PackageVersion-m6HC0skh.js";
|
|
13
|
+
import { P as At } from "./PenAndPaper-FOhKSug_.js";
|
|
14
14
|
import { u as Ft } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
function Ge(a, c) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-DVvHP4A_.cjs"),Ee=require("./Title-CFqlh_YB.cjs"),ye=require("./usePrinter-a7rkFhGa.cjs"),Le=require("./Tooltip-BA_0hLX8.cjs"),Re=require("./Legend-DoFd_NOd.cjs"),Ae=require("./vue-ui-skeleton-Bw4w98Z_.cjs"),Fe=require("./DataTable-1WuyQJQK.cjs"),Ie=require("./vue-ui-accordion-Dghh8xxy.cjs"),be=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./useNestedProp-CsmZqXml.cjs"),De=require("./PackageVersion-BachziuZ.cjs"),qe=require("./PenAndPaper-D6E7hDYd.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Ce(n,v){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,d=-1/0,p=0;for(let g=0;g<s;g+=1){const h=n[g].normalizedValue;h<u&&(u=h),h>d&&(d=h),p+=h}return Math.max(v**2*d/p**2,p**2/(v**2*u))}}function we(n){const{xOffset:v,yOffset:s,width:u,height:d}=n;return{x0:v,y0:s,x1:v+u,y1:s+d}}function Ue(n,v,s){if(n.length===0)return!0;{const u=n.concat(v),d=Ce(n,s),p=Ce(u,s);return d>=p}}function We(n){const v=[],s=n.length;for(let u=0;u<s;u+=1){const d=n[u],p=d.length;for(let c=0;c<p;c+=1)v.push(d[c])}return v}function Ge(n,v){const s={...v,children:n};return Te(s)}function je(n){return(n.x1-n.x0)*(n.y1-n.y0)}function xe(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(v),c=n.length,g=n.map(f=>f.normalizedValue||0).reduce((f,y)=>f+y,0),h=g/u,w=g/s;let C=d,b=p;const k=[];if(s>=u){for(let f=0;f<c;f+=1){const y=n[f],x=b+y.normalizedValue/h,B={x0:C,y0:b,x1:C+h,y1:x},T=Object.assign({},y,B);b=x,k.push(T)}return k}else{for(let f=0;f<c;f+=1){const y=n[f],x=C+y.normalizedValue/w,B={x0:C,y0:b,x1:x,y1:b+w},T=Object.assign({},y,B);C=x,k.push(T)}return k}}function Xe(n){const v=Y(n),s=v.width,u=v.height;return Math.min(s,u)}function Ye(n,v){const s=n.length,u=n.map(h=>h.value??0).reduce((h,w)=>h+w,0),d=v/u,p=[];let c,g;for(let h=0;h<s;h+=1)g=n[h],c=Object.assign({},g,{normalizedValue:g.value*(d||0)}),p.push(c);return p}function Y(n){const{x0:v,y0:s,x1:u,y1:d}=n;return{xOffset:v,yOffset:s,width:u-v,height:d-s}}function Ze(n,v,s,u){let d=n,p=v,c=s,g=u;for(;;){const h=d.length;if(h===0){const k=xe(p,c);return g.concat(k)}const w=Xe(c),C=d[0],b=d.slice(1,h);if(Ue(p,C,w)){const k=p.concat(C);d=b,p=k,c=c,g=g}else{const k=p.length;let f=0;for(let T=0;T<k;T+=1)f+=p[T].normalizedValue;const y=Je(c,f),x=xe(p,c),B=g.concat(x);d=d,p=[],c=y,g=B}}}function Te(n){if(typeof n.children>"u"||!n.children.length)return[n];{const v=Ye(n.children,je(n)),s=Ze(v,[],n,[]),u=s.length,d=[];for(let c=0;c<u;c+=1)d.push(Te(s[c]));return We(d)}}function Je(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(n);if(s>=u){const c=v/u,g=s-c,h={xOffset:d+c,yOffset:p,width:g,height:u};return we(h)}else{const c=v/s,g=u-c,h={xOffset:d,yOffset:p+c,width:s,height:g};return we(h)}}const Ke=n=>(e.pushScopeId("data-v-d58b1737"),n=n(),e.popScopeId(),n),Qe=["id"],et=["xmlns","viewBox"],tt={key:0},ot=["id"],lt=["stop-color"],at=["stop-color"],nt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],rt=["x","y","height","width"],ut={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},st=Ke(()=>e.createElementVNode("br",null,null,-1)),it={key:5,class:"vue-data-ui-watermark"},ct=["onClick"],dt={key:0},vt={key:1},ht=["innerHTML"],pt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:v,emit:s}){const u=n,{vue_ui_treemap:d}=r.useConfig(),p=e.useSlots();e.onMounted(()=>{p["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const c=e.computed(()=>!!u.dataset&&u.dataset.length),g=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),h=e.ref(r.createUid()),w=e.ref(!1),C=e.ref(""),b=e.ref(!1),k=e.ref(0),f=e.ref([]),y=e.ref(null),x=e.ref(null),B=e.ref(null),T=e.ref(null),Z=e.ref(null),J=e.ref(0),K=e.ref(0),Q=e.ref(0),t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:U,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value});function oe(){const o=ke.useNestedProp({userConfig:u.config,defaultConfig:d});return o.theme?{...ke.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=oe(),U.value=!t.value.showOnChartHover,J.value+=1,K.value+=1,Q.value+=1},{deep:!0});const{isPrinting:le,isImaging:ae,generatePdf:ne,generateImage:re}=ye.usePrinter({elementId:`treemap_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),O=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function ue(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),ue(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{$e()});function $e(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),ue(V.value),t.value.responsive){const o=be.throttle(()=>{const{width:a,height:l}=be.useResponsive({chart:y.value,title:t.value.style.chart.title.text?x.value:null,legend:t.value.style.chart.legend.show?B.value:null,source:T.value,noTitle:Z.value});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!f.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!f.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),se=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ie(o,a){return o.value/a}function Ne(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ie(a,l);return r.lightenHexColor(o,i<0?0:i)}function ce(o,a,l,i){return o.map((m,_)=>{const H=Ne(r.convertColorToHex(a)||I.value[_]||r.palette[_]||r.palette[_%r.palette.length],m,i),Ve=ie(m,i);return{...m,color:H,proportion:Ve,parentName:l,children:m.children?ce(m.children,H,m.name,i):void 0}})}const F=e.computed(()=>Ge(se.value.map((o,a)=>{const l=o.children?o.children.reduce((i,m)=>i+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ce(o.children.sort((i,m)=>m.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function de({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function ve({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Be(o){b.value=o,k.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),S=e.ref(!1);function G(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=G(o,l.children);if(i)return i}}return null}function Oe(o){if(S.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!G(o.parentId))return;W.value=[G(o.parentId)]}S.value=!S.value}const $=e.ref(null),he=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:f.value.includes(o.id)?.5:1}))),Pe=e.computed(()=>({cy:"treemap-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":""}));function pe(o){S.value=!1,$.value=null,f.value.includes(o.id)?f.value=f.value.filter(a=>a!==o.id):f.value.length<u.dataset.length-1&&f.value.push(o.id),s("selectLegend",se.value)}const j=e.ref(null);function _e({datapoint:o,seriesIndex:a}){$.value=o,j.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<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>`,i+=`<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" fill="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}w.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function fe(){e.nextTick(()=>{const o=N.value.head.map((i,m)=>[[i.name],[N.value.body[m]],[isNaN(N.value.body[m]/L.value)?"-":N.value.body[m]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((m,_)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[_],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[_],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},H,isNaN(N.value.body[_]/L.value)?"-":r.dataLabel({v:N.value.body[_]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),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}});function ze(){return F.value}function ge(){O.value.showTable=!O.value.showTable}function me(){O.value.showTooltip=!O.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return v({getData:ze,generateCsv:fe,generateImage:re,generatePdf:ne,toggleTable:ge,toggleTooltip:me,toggleAnnotator:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:y,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${h.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ee)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(qe.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:x,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(te)||e.unref(U))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref:"details",key:`user_option_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,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:b.value,isTooltip:O.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(ne),onGenerateCsv:fe,onGenerateImage:e.unref(re),onToggleTable:ge,onToggleTooltip:me,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(U)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!S.value,"vue-data-ui-zoom-minus":S.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(De._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",tt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,at)],8,ot)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:de(l),width:ve(l),fill:g.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:m=>Oe(l),onMouseenter:()=>_e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=m=>{$.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,nt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:de(l),width:ve(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ut,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),st,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value,fontSize:E(l),isZoom:S.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,rt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:S.value,rect:$.value,config:t.value})),void 0,!0)],14,et)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:B},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Re.Legend,{key:`legend_${Q.value}`,legendSet:he.value,config:Pe.value,id:`treemap_legend_${h.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>pe(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:m=>pe(l),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),f.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",vt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ct)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:he.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:T,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:O.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:C.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ie.default,{key:8,hideDetails:"",config:{open:O.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${K.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>O.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ht)]),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)],46,Qe))}},ft=He._export_sfc(pt,[["__scopeId","data-v-d58b1737"]]);exports.default=ft;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CPtAxuTc.cjs"),Ee=require("./Title-C7y-iI1m.cjs"),ye=require("./usePrinter-BmNhTUGE.cjs"),Le=require("./Tooltip-Y622sV6l.cjs"),Re=require("./Legend-kMbr5DZt.cjs"),Ae=require("./vue-ui-skeleton-DkZB7ae3.cjs"),Fe=require("./DataTable-Dng-zRfh.cjs"),Ie=require("./vue-ui-accordion-Dd0mfQys.cjs"),be=require("./useResponsive-BJ7DTGpm.cjs"),ke=require("./useNestedProp-BtCZVKOm.cjs"),De=require("./PackageVersion-CHUMvFGr.cjs"),qe=require("./PenAndPaper-DmMAK04m.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function Ce(n,v){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,d=-1/0,p=0;for(let g=0;g<s;g+=1){const h=n[g].normalizedValue;h<u&&(u=h),h>d&&(d=h),p+=h}return Math.max(v**2*d/p**2,p**2/(v**2*u))}}function we(n){const{xOffset:v,yOffset:s,width:u,height:d}=n;return{x0:v,y0:s,x1:v+u,y1:s+d}}function Ue(n,v,s){if(n.length===0)return!0;{const u=n.concat(v),d=Ce(n,s),p=Ce(u,s);return d>=p}}function We(n){const v=[],s=n.length;for(let u=0;u<s;u+=1){const d=n[u],p=d.length;for(let c=0;c<p;c+=1)v.push(d[c])}return v}function Ge(n,v){const s={...v,children:n};return Te(s)}function je(n){return(n.x1-n.x0)*(n.y1-n.y0)}function xe(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(v),c=n.length,g=n.map(f=>f.normalizedValue||0).reduce((f,y)=>f+y,0),h=g/u,w=g/s;let C=d,b=p;const k=[];if(s>=u){for(let f=0;f<c;f+=1){const y=n[f],x=b+y.normalizedValue/h,B={x0:C,y0:b,x1:C+h,y1:x},T=Object.assign({},y,B);b=x,k.push(T)}return k}else{for(let f=0;f<c;f+=1){const y=n[f],x=C+y.normalizedValue/w,B={x0:C,y0:b,x1:x,y1:b+w},T=Object.assign({},y,B);C=x,k.push(T)}return k}}function Xe(n){const v=Y(n),s=v.width,u=v.height;return Math.min(s,u)}function Ye(n,v){const s=n.length,u=n.map(h=>h.value??0).reduce((h,w)=>h+w,0),d=v/u,p=[];let c,g;for(let h=0;h<s;h+=1)g=n[h],c=Object.assign({},g,{normalizedValue:g.value*(d||0)}),p.push(c);return p}function Y(n){const{x0:v,y0:s,x1:u,y1:d}=n;return{xOffset:v,yOffset:s,width:u-v,height:d-s}}function Ze(n,v,s,u){let d=n,p=v,c=s,g=u;for(;;){const h=d.length;if(h===0){const k=xe(p,c);return g.concat(k)}const w=Xe(c),C=d[0],b=d.slice(1,h);if(Ue(p,C,w)){const k=p.concat(C);d=b,p=k,c=c,g=g}else{const k=p.length;let f=0;for(let T=0;T<k;T+=1)f+=p[T].normalizedValue;const y=Je(c,f),x=xe(p,c),B=g.concat(x);d=d,p=[],c=y,g=B}}}function Te(n){if(typeof n.children>"u"||!n.children.length)return[n];{const v=Ye(n.children,je(n)),s=Ze(v,[],n,[]),u=s.length,d=[];for(let c=0;c<u;c+=1)d.push(Te(s[c]));return We(d)}}function Je(n,v){const{width:s,height:u,xOffset:d,yOffset:p}=Y(n);if(s>=u){const c=v/u,g=s-c,h={xOffset:d+c,yOffset:p,width:g,height:u};return we(h)}else{const c=v/s,g=u-c,h={xOffset:d,yOffset:p+c,width:s,height:g};return we(h)}}const Ke=n=>(e.pushScopeId("data-v-d58b1737"),n=n(),e.popScopeId(),n),Qe=["id"],et=["xmlns","viewBox"],tt={key:0},ot=["id"],lt=["stop-color"],at=["stop-color"],nt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],rt=["x","y","height","width"],ut={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},st=Ke(()=>e.createElementVNode("br",null,null,-1)),it={key:5,class:"vue-data-ui-watermark"},ct=["onClick"],dt={key:0},vt={key:1},ht=["innerHTML"],pt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:v,emit:s}){const u=n,{vue_ui_treemap:d}=r.useConfig(),p=e.useSlots();e.onMounted(()=>{p["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const c=e.computed(()=>!!u.dataset&&u.dataset.length),g=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),h=e.ref(r.createUid()),w=e.ref(!1),C=e.ref(""),b=e.ref(!1),k=e.ref(0),f=e.ref([]),y=e.ref(null),x=e.ref(null),B=e.ref(null),T=e.ref(null),Z=e.ref(null),J=e.ref(0),K=e.ref(0),Q=e.ref(0),t=e.computed({get:()=>oe(),set:o=>o}),{userOptionsVisible:U,setUserOptionsVisibility:ee,keepUserOptionState:te}=Me.useUserOptionState({config:t.value});function oe(){const o=ke.useNestedProp({userConfig:u.config,defaultConfig:d});return o.theme?{...ke.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=oe(),U.value=!t.value.showOnChartHover,J.value+=1,K.value+=1,Q.value+=1},{deep:!0});const{isPrinting:le,isImaging:ae,generatePdf:ne,generateImage:re}=ye.usePrinter({elementId:`treemap_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Se=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),O=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function ue(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),ue(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{$e()});function $e(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),ue(V.value),t.value.responsive){const o=be.throttle(()=>{const{width:a,height:l}=be.useResponsive({chart:y.value,title:t.value.style.chart.title.text?x.value:null,legend:t.value.style.chart.legend.show?B.value:null,source:T.value,noTitle:Z.value});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(y.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!f.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!f.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),se=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function ie(o,a){return o.value/a}function Ne(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-ie(a,l);return r.lightenHexColor(o,i<0?0:i)}function ce(o,a,l,i){return o.map((m,_)=>{const H=Ne(r.convertColorToHex(a)||I.value[_]||r.palette[_]||r.palette[_%r.palette.length],m,i),Ve=ie(m,i);return{...m,color:H,proportion:Ve,parentName:l,children:m.children?ce(m.children,H,m.name,i):void 0}})}const F=e.computed(()=>Ge(se.value.map((o,a)=>{const l=o.children?o.children.reduce((i,m)=>i+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ce(o.children.sort((i,m)=>m.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function de({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function ve({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Be(o){b.value=o,k.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),S=e.ref(!1);function G(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=G(o,l.children);if(i)return i}}return null}function Oe(o){if(S.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!G(o.parentId))return;W.value=[G(o.parentId)]}S.value=!S.value}const $=e.ref(null),he=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:f.value.includes(o.id)?.5:1}))),Pe=e.computed(()=>({cy:"treemap-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":""}));function pe(o){S.value=!1,$.value=null,f.value.includes(o.id)?f.value=f.value.filter(a=>a!==o.id):f.value.length<u.dataset.length-1&&f.value.push(o.id),s("selectLegend",se.value)}const j=e.ref(null);function _e({datapoint:o,seriesIndex:a}){$.value=o,j.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<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>`,i+=`<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" fill="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}w.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function fe(){e.nextTick(()=>{const o=N.value.head.map((i,m)=>[[i.name],[N.value.body[m]],[isNaN(N.value.body[m]/L.value)?"-":N.value.body[m]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((m,_)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[_],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[_],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},H,isNaN(N.value.body[_]/L.value)?"-":r.dataLabel({v:N.value.body[_]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),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}});function ze(){return F.value}function ge(){O.value.showTable=!O.value.showTable}function me(){O.value.showTooltip=!O.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return v({getData:ze,generateCsv:fe,generateImage:re,generatePdf:ne,toggleTable:ge,toggleTooltip:me,toggleAnnotator:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:y,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${h.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(ee)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(ee)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(qe.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:X},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Se.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:Z,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:x,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ee._sfc_main,{key:`title_${J.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&c.value&&(e.unref(te)||e.unref(U))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref:"details",key:`user_option_${k.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,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:b.value,isTooltip:O.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(ne),onGenerateCsv:fe,onGenerateImage:e.unref(re),onToggleTable:ge,onToggleTooltip:me,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(te)?e.unref(U)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!S.value,"vue-data-ui-zoom-minus":S.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(De._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",tt,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,lt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,at)],8,ot)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:de(l),width:ve(l),fill:g.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:m=>Oe(l),onMouseenter:()=>_e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=m=>{$.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,nt),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:de(l),width:ve(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",ut,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),st,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value,fontSize:E(l),isZoom:S.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,rt))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:S.value,rect:$.value,config:t.value})),void 0,!0)],14,et)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",it,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ae.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:B},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Re.Legend,{key:`legend_${Q.value}`,legendSet:he.value,config:Pe.value,id:`treemap_legend_${h.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>pe(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:m=>pe(l),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),f.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",vt," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",dt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ct)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:he.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:T,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:O.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:C.value,isFullscreen:b.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),c.value?(e.openBlock(),e.createBlock(Ie.default,{key:8,hideDetails:"",config:{open:O.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Fe.DataTable,{key:`table_${K.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>O.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ht)]),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)],46,Qe))}},ft=He._export_sfc(pt,[["__scopeId","data-v-d58b1737"]]);exports.default=ft;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCssVars as nt, useSlots as ut, computed as b, ref as d, watch as Be, onMounted as st, onBeforeUnmount as rt, openBlock as u, createElementBlock as r, normalizeClass as z, normalizeStyle as c, unref as i, createBlock as A, createCommentVNode as p, createSlots as de, withCtx as k, renderSlot as m, normalizeProps as X, guardReactiveProps as E, createElementVNode as n, toDisplayString as h, createVNode as Y, Fragment as H, renderList as G, withKeys as it, createTextVNode as dt } from "vue";
|
|
2
|
-
import { u as vt, c as ct, t as ht, a as pt, p as B, b as yt, o as De, e as ee, v as N, d as ve, i as te, f as D, X as gt, s as ce, w as ft, x as bt, y as mt, q as _t, r as kt } from "./index-
|
|
2
|
+
import { u as vt, c as ct, t as ht, a as pt, p as B, b as yt, o as De, e as ee, v as N, d as ve, i as te, f as D, X as gt, s as ce, w as ft, x as bt, y as mt, q as _t, r as kt } from "./index-3_ulDZ6w.js";
|
|
3
3
|
import { t as $t, u as xt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as wt } from "./Title-
|
|
5
|
-
import { u as Ct, U as Tt } from "./usePrinter-
|
|
6
|
-
import { _ as Lt } from "./Tooltip-
|
|
7
|
-
import { L as Re } from "./Legend-
|
|
8
|
-
import Nt from "./vue-ui-skeleton-
|
|
9
|
-
import Pt from "./BaseIcon-
|
|
10
|
-
import St from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ue } from "./useNestedProp-
|
|
12
|
-
import { _ as Vt } from "./PackageVersion-
|
|
13
|
-
import { P as It } from "./PenAndPaper-
|
|
4
|
+
import { _ as wt } from "./Title-L52l_KMR.js";
|
|
5
|
+
import { u as Ct, U as Tt } from "./usePrinter-NdwnpHUu.js";
|
|
6
|
+
import { _ as Lt } from "./Tooltip-FYp9ljnj.js";
|
|
7
|
+
import { L as Re } from "./Legend-kF7sC1KK.js";
|
|
8
|
+
import Nt from "./vue-ui-skeleton-uAX1ZH1F.js";
|
|
9
|
+
import Pt from "./BaseIcon-D7H3G8-f.js";
|
|
10
|
+
import St from "./vue-ui-accordion-DXlXtAML.js";
|
|
11
|
+
import { u as Ue } from "./useNestedProp-Bs6ltq3I.js";
|
|
12
|
+
import { _ as Vt } from "./PackageVersion-m6HC0skh.js";
|
|
13
|
+
import { P as It } from "./PenAndPaper-FOhKSug_.js";
|
|
14
14
|
import { u as Ot } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Xe } from "./Shape-
|
|
15
|
+
import { _ as Xe } from "./Shape-CfcWXI5g.js";
|
|
16
16
|
import { _ as Ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Mt = ["id"], zt = ["onClick"], At = ["xmlns", "viewBox"], Bt = ["width", "height"], Dt = ["id"], Rt = ["stop-color"], Ut = ["stop-color"], Xt = { key: 1 }, Et = ["x", "y", "width", "height", "fill", "rx"], Ht = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Gt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Wt = ["x2", "y1", "y2", "stroke", "stroke-width"], jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Yt = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], qt = ["x", "y", "font-size", "fill", "font-weight"], Kt = ["x", "y", "font-size", "fill", "font-weight"], Jt = ["x", "y", "font-size", "fill", "font-weight"], Qt = ["y", "width", "height", "fill", "onMouseenter"], Zt = {
|
|
18
18
|
key: 6,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CPtAxuTc.cjs"),pe=require("./useResponsive-BJ7DTGpm.cjs"),De=require("./Title-C7y-iI1m.cjs"),ye=require("./usePrinter-BmNhTUGE.cjs"),Fe=require("./Tooltip-Y622sV6l.cjs"),ge=require("./Legend-kMbr5DZt.cjs"),Oe=require("./vue-ui-skeleton-DkZB7ae3.cjs"),Ie=require("./BaseIcon-At97xJaA.cjs"),Me=require("./vue-ui-accordion-Dd0mfQys.cjs"),fe=require("./useNestedProp-BtCZVKOm.cjs"),Ae=require("./PackageVersion-CHUMvFGr.cjs"),Re=require("./PenAndPaper-DmMAK04m.cjs"),qe=require("./useUserOptionState-BgepsfED.cjs"),me=require("./Shape-Ajzs1V3O.cjs"),He=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ue=["id"],Xe=["onClick"],je=["xmlns","viewBox"],Ge=["width","height"],We=["id"],Ye=["stop-color"],Ke=["stop-color"],Je={key:1},Qe=["x","y","width","height","fill","rx"],Ze=["x","y","width","height","fill","rx","stroke","stroke-width"],et=["x","y","width","height","fill","rx","stroke","stroke-width"],tt=["x2","y1","y2","stroke","stroke-width"],lt=["x1","x2","y1","y2","stroke","stroke-width"],at=["x","y","text-anchor","font-size","fill","font-weight"],ot=["x","y","font-size","fill","font-weight"],nt=["x","y","font-size","fill","font-weight"],rt=["x","y","font-size","fill","font-weight"],ut=["y","width","height","fill","onMouseenter"],st={key:6,class:"vue-data-ui-watermark"},it=["onClick"],ct={style:"width:100%;padding-top: 36px;position:relative"},dt={class:"vue-ui-data-table"},vt={key:0},ht={style:{width:"100%"}},pt=["data-cell"],yt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},gt=["data-cell"],ft={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},mt=["data-cell"],bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},kt=["data-cell"],Ct={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_t=["data-cell"],xt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$t=["data-cell"],St={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Vt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(be,{expose:ke,emit:Ce}){const f=be;e.useCssVars(a=>({"646b6c72":a.tdo}));const{vue_ui_vertical_bar:_e}=n.useConfig(),xe=e.useSlots(),T=e.computed(()=>!!f.dataset&&f.dataset.length),y=e.ref(n.createUid()),Ne=e.ref(null),D=e.ref(!1),F=e.ref(""),E=e.ref(0),we=e.ref(null),H=e.ref(0),$=e.ref(null),U=e.ref(null),O=e.ref(null),X=e.ref(null),j=e.ref(null),G=e.ref(0),I=e.ref(0),t=e.computed({get:()=>K(),set:a=>a}),{userOptionsVisible:M,setUserOptionsVisibility:W,keepUserOptionState:Y}=qe.useUserOptionState({config:t.value});function K(){const a=fe.useNestedProp({userConfig:f.config,defaultConfig:_e});return a.theme?{...fe.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||f.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>f.config,a=>{t.value=K(),M.value=!t.value.showOnChartHover,oe(),G.value+=1,I.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap},{deep:!0}),e.watch(()=>f.dataset,P,{deep:!0});const{isPrinting:J,isImaging:Q,generatePdf:Z,generateImage:ee}=ye.usePrinter({elementId:`vue-ui-vertical-bar_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),$e=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),te=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),le=e.ref(null),ae=e.ref(!1),Se=e.computed(()=>t.value.table.responsiveBreakpoint),L=e.ref(null);e.onMounted(()=>{oe()});function oe(){if(n.objectIsEmpty(f.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),E.value=f.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Ve(),t.value.responsive){const a=pe.throttle(()=>{const{width:o,height:l}=pe.useResponsive({chart:$.value,title:t.value.style.chart.title.text?U.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:X.value,noTitle:j.value});ue.value=o,s.value=l/E.value-c.value*2});L.value=new ResizeObserver(a),L.value.observe($.value.parentNode)}}e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});function Ve(){new ResizeObserver(o=>{o.forEach(l=>{ae.value=l.contentRect.width<Se.value})}).observe(le.value)}const g=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),ne=e.computed(()=>g.value.sortDesc),_=e.computed(()=>(f.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),f.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${y.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(p=>p.value||0).reduce((p,C)=>p+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>V(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||te.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted((p,C)=>ne.value?C.value-p.value:p.value-C.value).map((p,C)=>({...p,value:n.checkNaN(Math.abs(p.value)),absoluteIndex:o,sign:p.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${y.value}`,childIndex:C,color:n.convertColorToHex(p.color)||n.convertColorToHex(a.color)||te.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((p,C)=>({...p,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted((a,o)=>ne.value?o.value-a.value:a.value-o.value))),re=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),c=e.ref(t.value.style.chart.layout.bars.gap),Be=e.computed(()=>(s.value+c.value)*E.value),ue=e.ref(512),i=e.computed(()=>({width:ue.value,height:Be.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function P(){E.value=x.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function V(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),P(),Ce("selectLegend",x.value)}const x=e.computed(()=>_.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>x.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function se(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>x.value.flatMap(a=>a.hasChildren?a.children:a)),w=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),Te=e.computed(()=>Math.max(...x.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function h(a){const o=a/Te.value;return u.value.width/(w.value?2:1)*o}function Ee(a){return h(a)+u.value.left}function B(a,o){const l=x.value.find(d=>d.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/k.value)?"":se(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Le(){return x.value}const A=e.ref(null),R=e.ref(null);function Pe(a,o){R.value={datapoint:a,seriesIndex:o,series:_.value,config:t.value},D.value=!0,A.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:_.value,config:t.value,seriesIndex:o}))?F.value=d({datapoint:a,series:_.value,config:t.value,seriesIndex:o}):(l+=`<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 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${xe.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${y.value}_${a.absoluteIndex})"/>`:""}</svg> ${r}</div>
|
|
3
3
|
${v?`<div>${v}</div>`:""}
|
|
4
4
|
</div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/k.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),F.value=`<div style="text-align:left">${l}</div>`)}function ie(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),d=`(${se(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${d}`:""}`}const m=e.computed(()=>{const a=[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=N.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/k.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/k.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/k.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function ce(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=m.value.head,l=m.value.body.map(d=>[d.parentName,d.parentValue,d.percentageToTotal,d.childName,d.childValue,d.childPercentageToParent,d.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const S=e.ref(!1);function ze(a){S.value=a,H.value+=1}function de(){g.value.showTable=!g.value.showTable}function ve(){g.value.sortDesc=!g.value.sortDesc,P()}function he(){g.value.showTooltip=!g.value.showTooltip}const z=e.ref(!1);function q(){z.value=!z.value}return ke({getData:Le,recalculateHeight:P,generatePdf:Z,generateCsv:ce,generateImage:ee,toggleTable:de,toggleSort:ve,toggleTooltip:he,toggleAnnotator:q}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${S.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:$,id:`vue-ui-vertical-bar_${y.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[5]||(o[5]=()=>e.unref(W)(!0)),onMouseleave:o[6]||(o[6]=()=>e.unref(W)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Re.PenAndPaper,{key:0,parent:$.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:q},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),$e.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:j,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:U,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(De._sfc_main,{key:`title_${G.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value&&(e.unref(Y)||e.unref(M))?(e.openBlock(),e.createBlock(ye.UserOptions,{ref_key:"details",ref:Ne,key:`user_options_${H.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Q),isPrinting:e.unref(J),uid:y.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:S.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:ze,onGeneratePdf:e.unref(Z),onGenerateCsv:ce,onGenerateImage:e.unref(ee),onToggleTable:de,onToggleSort:ve,onToggleTooltip:he,onToggleAnnotator:q,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(M)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"7"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:O},[(e.openBlock(),e.createBlock(ge.Legend,{key:`legend_top_${I.value}`,legendSet:_.value,config:re.value,onClickMarker:o[0]||(o[0]=({legend:l})=>V(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:v=>V(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Xe)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(me._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${y.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:5,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width<=0?10:i.value.width,height:u.value.fullHeight<=0?10:u.value.fullHeight,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ge)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${y.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,Ke)],8,We))),256)),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.normalizeProps(e.guardReactiveProps({seriesIndex:l.absoluteIndex,patternId:`pattern_${y.value}_${l.absoluteIndex}`})),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)(w.value?u.value.left+u.value.width/2-(l.sign===1?0:h(l.value)<=0?1e-4:h(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(h(l.value)<=0?1e-4:h(l.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,Qe)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)(w.value?u.value.left+u.value.width/2-(l.sign===1?0:h(l.value)<=0?1e-4:h(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(h(l.value)<=0?1e-4:h(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${y.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.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,Ze),a.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:0,x:e.unref(n.checkNaN)(w.value?u.value.left+u.value.width/2-(l.sign===1?0:h(l.value)<=0?1e-4:h(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(h(l.value)<=0?1e-4:h(l.value)),height:s.value<=0?1e-4:s.value,fill:`url(#pattern_${y.value}_${l.absoluteIndex})`,rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.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,et)):e.createCommentVNode("",!0),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==N.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:1,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,tt)):e.createCommentVNode("",!0),w.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:2,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,lt)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:w.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):Ee(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!w.value||l.sign===-1?"start":"end","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(ie(l.value,l,r,l.sign)),9,at),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+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(l.name),9,ot)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).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(B(l,r).name),9,nt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(l,r).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(ie(B(l,r).value),B(l,r),r,l.parentSign||l.sign),9,rt)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:i.value.width<=0?1e-4:i.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:A.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>Pe(l,r),onMouseleave:o[1]||(o[1]=v=>{we.value=null,D.value=!1,A.value=null})},null,40,ut)]))),256)),e.renderSlot(a.$slots,"svg",{svg:i.value},void 0,!0)],14,je)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",st,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Oe.default,{key:7,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:8,ref_key:"chartLegend",ref:O},[(e.openBlock(),e.createBlock(ge.Legend,{key:`legend_bottom_${I.value}`,legendSet:_.value,config:re.value,onClickMarker:o[2]||(o[2]=({legend:l})=>V(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>V(l.id),style:e.normalizeStyle(`opacity:${b.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,it)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(me._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${y.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:_.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:X,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Fe._sfc_main,{show:g.value.showTooltip&&D.value&&b.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,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:F.value,isFullscreen:S.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...R.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),T.value?(e.openBlock(),e.createBlock(Me.default,{key:10,hideDetails:"",config:{open:g.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:le,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",ct,[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]=l=>g.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>g.value.showTable=!1,["enter"]))},[e.createVNode(Ie.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":ae.value})},[e.createElementVNode("table",dt,[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",vt,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(m.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",ht,e.toDisplayString(l),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(k.value)?"":k.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(m.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%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":m.value.head[0]??""},[e.createElementVNode("div",yt,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,pt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[1]??""},[e.createElementVNode("div",ft,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,gt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[2]??""},[e.createElementVNode("div",bt,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,mt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[3]??""},[e.createElementVNode("div",Ct,e.toDisplayString(l.childName),1)],12,kt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[4]??""},[e.createElementVNode("div",xt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,_t),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[5]??""},[e.createElementVNode("div",wt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Nt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[6]??""},[e.createElementVNode("div",St,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,$t)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ue))}},Bt=He._export_sfc(Vt,[["__scopeId","data-v-b7b6fe7f"]]);exports.default=Bt;
|